webpackJsonp([0,2],[function(e,t,n){function i(){var e=a.initial(arguments).concat({escape:!0});return new r.SafeString(s.apply(s,e))}var a=n(2),r=n(6),s=n(4).default;e.exports=i},,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(2216),r=i(a),s=n(900),o=i(s);t.default=function(){var e="function"==typeof o.default&&r.default&&(0,r.default)("react.element")||60103;return function(t,n,i,a){var r=t&&t.defaultProps,s=arguments.length-3;if(n||0===s||(n={}),
n&&r)for(var o in r)void 0===n[o]&&(n[o]=r[o]);else n||(n=r||{});if(1===s)n.children=a;else if(s>1){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+3];n.children=l}return{$$typeof:e,type:t,key:void 0===i?null:""+i,ref:null,props:n,_owner:null}}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(313);t.default=function(){return i.a.t.apply(i.a,arguments)}},,function(e,t,n){e.exports=n(2360)},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{
default:e}}t.__esModule=!0;var a=n(2213),r=i(a);t.default=r.default||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}},function(e,t,n){"use strict";var i=n(34),a=n(52),r=i.a.extend({mixins:a.a});t.a=new r},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){return e===t}function r(e){var t=arguments.length<=1||void 0===arguments[1]?a:arguments[1],n=null,i=null;
return function(){for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return null!==n&&n.length===r.length&&r.every(function(e,i){return t(e,n[i])})?i:(n=r,i=e.apply(void 0,r))}}function s(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e})){var n=t.map(function(e){return typeof e}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, "+("instead received the following types: ["+n+"]"))}return t}function o(e){
for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return function(){for(var t=arguments.length,a=Array(t),r=0;r<t;r++)a[r]=arguments[r];var o=0,l=a.pop(),c=s(a),u=e.apply(void 0,[function(){return o++,l.apply(void 0,arguments)}].concat(n)),d=function(e,t){for(var n=arguments.length,a=Array(n>2?n-2:0),r=2;r<n;r++)a[r-2]=arguments[r];var s=c.map(function(n){return n.apply(void 0,[e,t].concat(a))});return u.apply(void 0,i(s))};return d.resultFunc=l,d.recomputations=function(){
return o},d.resetRecomputations=function(){return o=0},d}}function l(){return o(r).apply(void 0,arguments)}function c(e){var t=arguments.length<=1||void 0===arguments[1]?l:arguments[1];if("object"!=typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map(function(t){return e[t]}),function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.reduce(function(e,t,i){
return e[n[i]]=t,e},{})})}t.__esModule=!0,t.defaultMemoize=r,t.createSelectorCreator=o,t.createSelector=l,t.createStructuredSelector=c},function(e,t,n){"use strict";var i=n(93),a=n.n(i),r=n(2),s=n.n(r),o=n(47),l=n(614),c=n.n(l),u=n(33),d=n(27);n(1228),n(1227),n(1229);c.a.isNodeAttached=function(e){return o.a.$.contains(document.documentElement,e)};var h=s.a.clone(c.a.View.prototype),p=s.a.clone(c.a.CollectionView.prototype),f=s.a.clone(c.a.Region.prototype),g=s.a.clone(c.a.Region),m=s.a.clone(c.a.Layout.prototype),v={
constructor:function(){this.wrapAfterRender(),h.constructor.apply(this,arguments),this.listenViewEvents()},listenViewEvents:function(){var e=this;this.stopListeningViewEvents();var t=s.a.result(this,"viewEvents");t&&(this._viewEventsListeners=s.a.mapObject(t,function(t){return s.a.isString(t)?e[t]:t}),this.listenTo(this,this._viewEventsListeners))},stopListeningViewEvents:function(){this._viewEventsListeners&&(this.stopListening(this,this._viewEventsListeners),delete this._viewEventsListeners)},_setElement:function(){
h._setElement.apply(this,arguments),this.el&&(this.el._viewInstance?this.el._viewInstance!==this&&d.a.warn('Multiple views registered for a single element with class="%s"',this.el.className):this.el._viewInstance=this)},_removeElement:function(){this.el&&delete this.el._viewInstance,h._removeElement.apply(this,arguments)},bindAllWhenRendered:function(){n.i(u.a)(arguments.length>0,"`bindAllWhenRendered` requires at least one function");var e=s.a.isArray(arguments[0])?arguments[0]:arguments;s.a.each(e,function(e){
try{this[e]=this.whenRendered(this[e])}catch(t){n.i(u.a)(!1,"`bindAllWhenRendered` is unable to wrap "+a()(e))}},this)},whenRendered:function(e){return n.i(u.a)(s.a.isFunction(e),"`whenRendered` must be called with a single function"),s.a.bind(function(){if(!this.isClosed){var t=s.a.toArray(arguments),n=s.a.bind(function(){this.isRendered&&!this.isClosed&&e.apply(this,t)},this);return this.isRendered?void s.a.defer(n):void this.listenToOnce(this,"render",function(){s.a.defer(n)})}},this)},wrapAfterRender:function(){
void 0!==this.onlyAfterRender&&(n.i(u.a)(s.a.isArray(this.onlyAfterRender),"`onlyAfterRender` must be an array"),this.bindAllWhenRendered.apply(this,this.onlyAfterRender))},bindUIElements:function(){h.bindUIElements.apply(this,arguments),this.bindToModel(),this.isRendered=!0},unbindUIElements:function(){h.unbindUIElements.apply(this,arguments),this.unbindFromModel()},_getImmediateChildren:function(){return[]},_getNestedViews:function(){var e=this._getImmediateChildren();return e.length?s.a.reduce(e,function(e,t){
return t._getNestedViews?e.concat(t._getNestedViews()):e},e):e}},y={constructor:function(){p.constructor.apply(this,arguments)},triggerRendered:function(){return this.isRendered=!0,p.triggerRendered.apply(this,arguments)},rebase:function(e){return this.stopListening(this.collection),this.collection=e,this._initialEvents(),s.a.isFunction(this._renderChildren)?this._renderChildren():this.render(),this},buildItemView:function(){var e=p.buildItemView.apply(this,arguments);return e._parentView=this,e},
_getImmediateChildren:function(){return s.a.values(this.children._views)}},b={constructor:function(){p.constructor.apply(this,arguments)}},S={append:function(e,t,n){var i=e.isClosed||s.a.isUndefined(e.$el),a=e!==this.currentView;return a&&this.close(),e.render(),(a||i)&&(t||(t=this.getEl(this.el)),n?t.prepend(e.el):t.append(e.el)),this.attachView(e),c.a.triggerMethod.call(this,"show",e),c.a.triggerMethod.call(e,"show"),this._updateParentView(e),this._triggerAttached(e,t),this},prepend:function(e,t){
return this.append(e,t,!0)},show:function(e){f.show.apply(this,arguments),this._updateParentView(e),this._triggerAttached(e,this.$el)},_triggerAttached:function(e,t){if(c.a.isNodeAttached(t.get(0))){var n=s.a.union([e],s.a.result(e,"_getNestedViews")||[]);s.a.each(n,function(e){e.triggerMethod&&e.triggerMethod("attached",this)},this)}},_updateParentView:function(e){e&&(e._parentView=this._parentView)}},w={buildRegion:function(e,t){var n=g.buildRegion.apply(this,arguments);return n._parentView=e._parentView,
n}},M={_buildRegions:function(e){var t=this,n=s.a.mapObject(e,function(e){return s.a.isString(e)?{_parentView:t,selector:e}:s.a.defaults(e,{_parentView:t})});return m._buildRegions.call(this,n)},_getImmediateChildren:function(){return s.a.chain(this.regionManager._regions).values().pluck("currentView").compact().value()}};s.a.extend(c.a.View.prototype,v),s.a.extend(c.a.ItemView.prototype,v),s.a.extend(c.a.CollectionView.prototype,v,y),s.a.extend(c.a.CompositeView.prototype,v,b),s.a.extend(c.a.Region.prototype,S),
s.a.extend(c.a.Region,w),s.a.extend(c.a.Layout.prototype,M),c.a.extend=o.a.Model.extend,c.a.Controller.extend=c.a.extend,c.a.Region.extend=c.a.extend,c.a.Application.extend=c.a.extend,c.a.Module.extend=c.a.extend,c.a.View.extend=c.a.extend,c.a.ItemView.extend=c.a.extend,c.a.CollectionView.extend=c.a.extend,c.a.CompositeView.extend=c.a.extend,c.a.Layout.extend=c.a.extend,t.a=c.a},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");
}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(2215),r=i(a),s=n(899),o=i(s),l=n(119),c=i(l);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,c.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){
"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(119),r=i(a);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,r.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";function i(e,t){if(!t)return e;var n={};return t.forEach(function(t){n[t]=function(){return e[t].apply(e,arguments)}}),n}function a(e,t,n){p[e]=i(t,n);var a=f[e];
a&&(delete f[e],a.resolve(p[e]))}function r(e){u.a.each(e,function(e,t){var n=void 0,i=void 0;u.a.isArray(e)?(n=e[0],i=e[1]):n=e,a(t,n,i)})}function s(e){return o(e)?h.a.Deferred().resolve(p[e]).promise():(f[e]||(f[e]=h.a.Deferred()),f[e].promise())}function o(e){return p.hasOwnProperty(e)}function l(e){return p[e]}var c=n(2),u=n.n(c),d=n(5),h=n.n(d);n(33);t.c=a,t.d=r,t.e=s,t.b=o,t.a=l;var p={},f={}},function(e,t,n){"use strict";var i=n(3021),a=(n(978),n(3022));n.d(t,"a",function(){return i.a}),n.d(t,"b",function(){
return a.a})},function(e,t,n){"use strict";function i(e){return!0}function a(e){return h.a.isObject(e)&&!h.a.isArray(e)}function r(e,t){t||(t={});var n=h.a.defaults(t,{typeName:e,parse:h.a.bind(p.a.parseType,p.a,e),stringify:h.a.bind(p.a.stringifyType,p.a,e)});return n.validate=t.validate?s(t.validate):i,n.isRequired=u()({},n,{validate:function(e){return null!=e&&n.validate(e)},typeName:n.typeName+"<required>"}),n}function s(e){return function(t){return null==t||e(t)}}var o=n(2210),l=n.n(o),c=n(7),u=n.n(c),d=n(2),h=n.n(d),p=n(38),f=["boolean","integer","float","string","object","array"],g={
any:r("any"),boolean:r("boolean",{validate:h.a.isBoolean}),integer:r("integer",{validate:l.a}),float:r("float",{validate:h.a.isNumber}),string:r("string",{validate:h.a.isString}),object:r("object",{validate:a}),array:r("array",{validate:h.a.isArray}),list:r("list",{validate:h.a.isArray}),encodedString:r("encodedString",{validate:h.a.isString}),queryString:r("queryString",{validate:a}),instanceOf:function(){var e=h.a.toArray(arguments);return r("instanceOf",{validate:function(t){return h.a.some(e,function(e){
return t instanceof e})}})},oneOf:function(){var e=h.a.toArray(arguments);return r("oneOf",{validate:function(t){return h.a.contains(e,t)}})},oneOfType:function(){var e=h.a.toArray(arguments);return r("oneOfType",{validate:function(t){return h.a.some(e,function(e){return e.validate(t)})}})},custom:function(e){return r("custom",{validate:e})},getAttrTypeFor:function(e){if(null==e)return g.any;for(var t=0,n=f.length;t<n;t++){var i=f[t],a=g[i];if(a.validate(e))return a}return g.any}};t.a=g},function(e,t,n){
"use strict";t.__esModule=!0,t.default=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}},function(e,t,n){"use strict";var i=n(119),a=n.n(i),r=n(66),s=n.n(r),o=n(93),l=n.n(o),c=n(2),u=n.n(c),d=n(47),h=n(5),p=n.n(h),f=n(8),g=n(38),m=n(700),v=n(33),y=n(20),b=n(316),S=n(16),w=n(57),M=n(35),I=n(59),C=/^change:[\w]+$/,D=d.a.Model.extend({mixins:[b.a],name:"AbstractModel",responseType:w.a.xml,hasInitialRelations:!1,_context:["parent","skipCache"],
cache:null,cacheKey:function(e){return e[this.idAttribute]},constructor:function(e,t){e||(e={}),t||(t={});var n;if(this.initialize!==d.a.Model.prototype.initialize&&(n=this.initialize,this.initialize=function(){}),u.a.each(this.getContext(),function(e){var n=this.findOption(t,e);void 0!==n&&(this[e]=n)},this),!this.cache||this.findOption(t,"skipCache"))return d.a.Model.prototype.constructor.apply(this,arguments),this._initModel(t),void(n&&(n.apply(this,arguments),this.initialize=n));var i=this.findOption(t,"onlyIfCached"),a=this.cache.getItemCacheKey(this,e),r=this.cache.get(a);
return r?(this.uninitialize(),i||(this.mergeStrategy&&(r.isMergingAttributes=!0),t.parse?e=r.parse(e):u.a.extend(e,r._getRelations(this.syncedRelations,e)),r.set(e),r.isMergingAttributes=!1),u.a.each(this.getContext(),function(e){r.setContext(e,this[e]||r[e])},this),t.collection&&(r.collection=t.collection),r._computedEntityID&&r.updateEntity(),r):i?{}:(d.a.Model.prototype.constructor.apply(this,arguments),this._initModel(t),n&&(n.apply(this,arguments),this.initialize=n),void this.cache.store(this,a));
},uninitialize:function(){this.stopListening()},_initModel:function(e){I.a.get("shouldCreateStateTree")&&this.entityID&&(this.state=this.toState()),this._initRelations(e),this._initDerived(e),this._initState()},_initRelations:function(e){this._relationListeners={};var t=u.a.extend({},this.sessionRelations,this.syncedRelations);u.a.each(t,function(e,t){this._initRelation(e,t);var n=u.a.bind(this._initRelation,this,e,t);this.on("change:"+t,n)},this),this.hasInitialRelations=!0,this.set(this._getRelations(this.sessionRelations,this.attributes)),
e.parse||this.set(this._getRelations(this.syncedRelations,this.attributes))},_initRelation:function(e,t){var n=this._resolveRelationDefinition(e),i=n.relationClass,a=this.get(t),r=this.previous(t),s=a&&a instanceof i,o=r&&r instanceof i;o&&u.a.has(this._relationListeners,t)&&(r.off("all",this._relationListeners[t]),this._relationListeners[t]=null),s&&this._forwardRelationEvents(a,t)},_initDerived:function(){u.a.each(this.derivedAttrs,this._setDerived,this)},_initState:function(){I.a.get("shouldCreateStateTree")&&(this.state=this.toState(),
this.updateState=this.updateState.bind(this),this._computedEntityID&&this.updateEntity(),this.on("all",this.onEvent,this))},findOption:function(e,t){return e[t]||e.collection&&e.collection[t]},getContext:function(){if(!this.context)return this._context;var e=u.a.result(this,"context");return this._context.concat(e)},setContext:function(e,t){if(this.getContext().indexOf(e)!==-1&&this[e]!==t){if(this[e]=t,this.hasDerived(e)){var n=this.derivedAttrs[e],i=n.call(this);this.set(e,i)}if("parent"!==e){var a=u.a.extend({},this.sessionRelations,this.syncedRelations);
u.a.each(a,function(n,i){var a=this.get(i);a&&a.setContext(e,t)},this)}}},getScopedKey:function(e){return null!=e&&u.a.isFunction(this.cacheKey)?this.cacheKey(this.attributes)+"!"+e:e},getState:function(){return this._computedEntityID||this.state},updateState:function(){var e=this.getState();this.state=this.toState();var t=this.getState();this._computedEntityID&&t!==e&&this.updateEntity(),this.trigger("statechange",this,t,e)},updateEntity:function(){this.skipCache||(n.i(v.a)(this.entityType,this.name+" requires an `entityType`"),
f.a.trigger("change:entity",{type:this.entityType,id:this._computedEntityID,model:this}))},toState:function(){var e=s()(this.attributes),t=u.a.reduce(e,this.reduceState,{possibleEntityContainers:[]},this);return Object.defineProperty(t,"possibleEntityContainers",{enumerable:!1}),this.entityID&&(this._computedEntityID=this.entityID(t)),t},reduceState:function(e,t){var n=this.attributes[t];return n&&n.getState?(e.possibleEntityContainers.push(t),e[t]=n.getState(),e):n&&n.initialize?e:(e[t]=n,e)},shouldUpdateRelationState:function(e,t,n){
return t!==n},toJSON:function(){function e(e,i){var a=this.get(i);if(a){var r;r=t.excludeDefaults?a instanceof d.a.Collection?a.map(function(e){return n.i(m.a)(u.a.result(e,"defaults"),e.toJSON(t))}):n.i(m.a)(u.a.result(a,"defaults"),a.toJSON(t)):a.toJSON(t),g[i]=r}}var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this.syncedAttrs,a=this.sessionRelations,r=this.syncedRelations,s=this.attributes,o={};for(var l in s){var c=a&&u.a.has(a,l),h=r&&u.a.has(r,l),f=t.syncedOnly&&(!i||!u.a.has(i,l));
c||h||f||(o[l]=s[l])}var g=p.a.extend(!0,{},o);return t.excludeDefaults&&(g=n.i(m.a)(u.a.result(this,"defaults"),g)),t.syncedOnly||u.a.each(a,e,this),u.a.each(r,e,this),g},clone:function(){var e=u.a.extend(u.a.pick(this,this.getContext()),{skipCache:!0});return new this.constructor(this.toJSON(),e)||null},copy:function(e){n.i(v.a)(e instanceof this.constructor,"Only a model of the same type may be copied");var t=e.toJSON();return u.a.extend(t,this._getRelations(this.sessionRelations,t,{parse:!0}),this._getRelations(this.syncedRelations,t,{
parse:!0})),this.set(t)},restoreDefaults:function(e){var t={};return u.a.each(this.attributes,function(e,n){this.derivedAttrs&&u.a.has(this.derivedAttrs,n)||(t[n]=void 0)},this),u.a.extend(t,this._getRelations(this.sessionRelations,{},{reset:!0}),this._getRelations(this.syncedRelations,{},{reset:!0}),u.a.result(this,"defaults"),e),this.set(t)},set:function(e,t,n){var i;u.a.isObject(e)?(i=e,n=t):(i={})[e]=t,n||(n={});var a;return!this.isMergingAttributes&&n.merge&&this.mergeStrategy&&(a=!0,this.isMergingAttributes=!0),
this.isMergingAttributes&&(i=this._mergeAttributes(i)),d.a.Model.prototype.set.call(this,i,n),a&&(this.isMergingAttributes=!1),this},hasAttr:function(e){var t=this.sessionAttrs&&u.a.has(this.sessionAttrs,e),n=this.syncedAttrs&&u.a.has(this.syncedAttrs,e);return!(!t&&!n)},hasRelation:function(e){var t=this.sessionRelations&&u.a.has(this.sessionRelations,e),n=this.syncedRelations&&u.a.has(this.syncedRelations,e);return!(!t&&!n)},hasDerived:function(e){return!(!this.derivedAttrs||!u.a.has(this.derivedAttrs,e));
},validate:function(e,t){var i=u.a.extend({},this.sessionAttrs,this.syncedAttrs,this.sessionRelations,this.syncedRelations),a=this._validateTypes(e,i);return a&&n.i(v.a)(!1,a),a},parse:function(e,t){return t&&t.save&&!this.hasResponseOnSave?this.attributes:this.convert(e,t)},convert:function(e,t){var n,i=e,a=u.a.result(this,"responseType");u.a.isString(i)&&(n=!0,u.a.isFunction(this.augmentResponseText)&&(i=this.augmentResponseText(i,a)),i=a.parse(i),a===w.a.json&&i.MediaContainer&&(i=i.MediaContainer)),
u.a.isFunction(this.augmentResponse)&&(i=this.augmentResponse(i,a)),n&&this.rootPropertyName&&u.a.has(i,this.rootPropertyName)&&(i=i[this.rootPropertyName]);var r,s={};u.a.each(this.sessionAttrs,function(e,t){u.a.has(i,t)&&(s[t]=i[t])}),u.a.each(this.syncedAttrs,function(e,t){if(u.a.has(i,t)){var n,a=e;a.typeName||(a=e.type,n=u.a.omit(e,"type")),s[t]=a===S.a.string?i[t]:a.parse(i[t],n)}else this.has(t)&&(r||(r=u.a.result(this,"defaults")),s[t]=r&&u.a.has(r,t)?r[t]:void 0)},this);var o=u.a.extend({},t,{
parse:!0});return u.a.extend(s,this._getRelations(this.syncedRelations,i,o)),s},save:function(e,t,n){var i;null==e||"object"===("undefined"==typeof e?"undefined":a()(e))?(i=e,n=t):(i={})[e]=t;var r=u.a.extend({save:!0},n),s=u.a.extend(this.getSaveParams(i),r.data);if(u.a.isEmpty(s))return r.success&&r.success(this),p.a.Deferred().resolve(this);r.data=s;var o=r.success;return r.success=function(e,t,n){e.cache&&e.cache.store(e),o&&o(e,t,n)},d.a.Model.prototype.save.call(this,i,r)},sync:function(e,t,n){
var i=n?u.a.clone(n):{};if("create"===e||"update"===e){var a=i.data,r=i.url||u.a.result(this,"saveUrl")||u.a.result(this,"syncUrl")||u.a.result(this,"url");i.url=y.join(r,a),i.data=""}return d.a.Model.prototype.sync.call(this,e,t,i)},getSaveParams:function(e){var t=this._getSaveAttrs(e),n=u.a.reduce(t,function(e,t,n){var i=t.definition,a=t.value,r=n;if(!i)return e[r]=a,e;var s=i.relationClass;if(s){var o,l=s.prototype.model;i.rootPropertyName?o=i.rootPropertyName:a.rootPropertyName?o=a.rootPropertyName:l&&l.prototype&&(o=l.prototype.rootPropertyName),
a=a.getSaveParams(),o&&(r=o)}else{var c,d;u.a.has(i,"type")?(c=i.type,d=u.a.omit(i,"type")):c=i,a=c.stringify(a,d)}return e[r]=a,e},{},this);return n},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void n.i(v.a)(!1,this.name+" is already capturing events");var e=this.set,t=[],i=u.a.clone(this.attributes);this.set=function(n,i,r){var s,o=u.a.extend({},r,{silent:!0});return"object"===("undefined"==typeof n?"undefined":a()(n))?(s=n,r=i):(s={})[n]=i,u.a.each(s,function(n,i){
this.get(i)!==n&&(t.push({key:i,value:n}),e.call(this,i,n,o))},this),u.a.each(this._derivedListeners,function(n){var i=n.key,a=this.derivedAttrs[i],r=a.call(this);this.get(i)!==r&&(t.push({key:i,value:r}),e.call(this,i,r,o))},this),this},this.releaseCapturedChangeEvents=function(){this.set=e,this.releaseCapturedChangeEvents=null,this.discardCapturedChangeEvents=null,this._previousAttributes=i,this._changing=!0,u.a.each(t,function(e){this.trigger("change:"+e.key,this,e.value)},this),this._changing=!1,
u.a.isEmpty(t)||this.trigger("change",this,{})},this.discardCapturedChangeEvents=function(){this.set=e,this.releaseCapturedChangeEvents=null,this.discardCapturedChangeEvents=null,t.length=0}},spyOnGet:function(e){var t=[],n=this.get;return this.get=function(e){return t.push("change:"+e),this.hasRelation(e)&&t.push("change:"+e+".change"),n.apply(this,arguments)},e.call(this),this.get=n,t},_mergeAttributes:function(e){var t=this.mergeStrategy;if(!t)return e;var n=u.a.reduce(e,function(e,n,i){return e[i]=t(i,this.get(i),n),
e},{},this);return n},_resolveRelationDefinition:function(e){return u.a.isFunction(e)?e.call(this):e},_getRelations:function(e,t,i){t||(t={}),i||(i={});var a={};return u.a.each(e,function(e,r){var s=this._resolveRelationDefinition(e),o=s.relationClass;n.i(v.a)(o,this.name+" requires a `relationClass` for the "+r+" relation");var l=r;i.parse&&!u.a.has(t,r)&&u.a.has(s,"rootPropertyName")&&(l=s.rootPropertyName);var c=t[l];if(c instanceof o)return void(a[r]=c);if(!c&&s.deferred)return void(a[r]=void 0);
var h=i.reset?null:this.get(r),p=h instanceof o,f=o.prototype instanceof d.a.Collection;if(f?c=g.a.parseArray(c):c||(c={}),p&&!f&&(i.parse&&(c=h.parse(c)),p=h.id===c[h.idAttribute||"id"]),p){h.isMergingAttributes=this.isMergingAttributes;var m=s.setOptions;u.a.isFunction(m)&&(m=m.call(this,i)),f?h.set(c,u.a.extend({parse:i.parse,remove:!this.isMergingAttributes},m)):h.set(c,m),h.isMergingAttributes=!1}else{var y={parse:i.parse};if(u.a.each(this.getContext(),function(e){y[e]=this[e]},this),!f){var b=s.attrs;
u.a.isFunction(b)&&(b=b.call(this,t)),c=u.a.extend({},c,b)}var S=s.options;u.a.isFunction(S)&&(S=S.call(this,t)),u.a.extend(y,{parent:this},S),h=new o(c,y)}a[r]=h},this),a},_forwardRelationEvents:function(e,t){function n(){var n=arguments[0];if("change"!==n){if("statechange"===n)return void(this.shouldUpdateRelationState.apply(this,u.a.rest(arguments,1))&&M.b(this.updateState,this));var a=u.a.toArray(arguments);a[0]="change:"+t+"."+n,this.trigger.apply(this,a),u.a.contains(i,n)||(this.trigger("change:"+t+".change",this,e),
this.trigger("change",this))}}var i=["sync","request","sort","invalid","error","add","remove"];e.on("all",n,this),this._relationListeners[t]=n},_setDerived:function(e,t){var i,a=this.spyOnGet(function(){var a=this.set;this.set=function(){n.i(v.a)(!1,this.name+" blocked `set` in the "+t+" attribute. Derived attributes are read-only.")},i=e.call(this),this.set=a});this.set(t,i),u.a.each(a,function(n){this._addDerivedListener(t,n,e)},this)},_addDerivedListener:function(e,t,n){this._derivedListeners||(this._derivedListeners=[]);
var i={key:e,name:t,callback:u.a.bind(this._setDerived,this,n,e)},a=u.a.findWhere(this._derivedListeners,{key:e,name:i.name});a||(this._derivedListeners.push(i),this.on(i.name,i.callback))},_getSaveAttrs:function(e){var t;if(e)t=u.a.reduce(e,function(e,t,n){return e[n]={definition:this.syncedAttrs[n],value:t},e},{},this);else{var n=u.a.extend({},this.syncedAttrs,this.syncedRelations);t=u.a.reduce(n,function(e,t,n){var i=this._resolveRelationDefinition(t),a=i.save;return u.a.isFunction(a)&&(a=a.call(this)),
a&&(e[n]={definition:i,value:this.get(n)}),e},{},this)}return t},_validateTypes:function(e,t){var n=s()(e),i=u.a.reduce(n,function(n,i){if(this.hasDerived(i))return n;if(!u.a.has(t,i))return n.push(this.name+" received an unknown attribute: "+i+". All attributes must be defined in `sessionAttrs`, `syncedAttrs`, `sessionRelations`, or `syncedRelations`."),n;var a,r=e[i],s=this._resolveRelationDefinition(t[i]),o=s.relationClass;a=o?this.hasInitialRelations?S.a.instanceOf(o):o.prototype instanceof d.a.Collection?S.a.oneOfType(S.a.array,S.a.object):S.a.object:s.type?s.type:s;
var c=a.validate;return c?c(r)||n.push(i+" of type "+a.typeName+" has an invalid value: "+l()(r)):n.push(i+" has an unknown type. Specify the type in the attribute definition or use attrTypes.any as a wildcard type."),n},[],this);if(i.length>0)return i.join("\n")},onEvent:function(e){C.test(e)&&M.b(this.updateState,this)}});t.a=D},function(e,t){function n(e,t,n){return e===t?n.fn(this):n.inverse(this)}e.exports=n},function(e,t,n){"use strict";function i(e){return String(e).replace(/^\/|\/$/g,"")}
function a(e){return!!e&&0===e.indexOf("/")}function r(e,t){var r=void 0,s=void 0;if(p.a.isArray(e)){var l=p.a.compact(e);r=a(p.a.first(l)),s=p.a.map(l,i).join("/")}else p.a.isString(e)?(r=a(e),s=i(e)):n.i(m.a)(!1,"`path.join` requires either a string or an array of strings");if(r&&(s="/"+s),t&&!p.a.isEmpty(t)){var c=p.a.isString(t)?t:o(t),u=s.indexOf("?"),d=s.length;s+=u>-1?u<d-1?"&":"":"?",s+=c}return s}function s(e){return e?p.a.first(/[^\/\\]+$/.exec(e))||e:""}function o(e,t){return g.a.stringify(e,d()({
arrayFormat:"repeat"},t))}function l(e,t){return g.a.parse(e,t)}function c(e,t){v.href=e;var n=p.a.pick(v,"hash","host","hostname","href","origin","pathname","port","protocol","search");return n.isAbsolute=/^[\w:]*\/\//.test(e),n.search&&(n.params=l(n.search.substring(1))),n.origin||(n.origin=n.protocol+"//"+n.host),n}Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=n.n(u),h=n(2),p=n.n(h),f=n(948),g=n.n(f),m=n(33);t.join=r,t.getLastSegment=s,t.stringifyParams=o,t.parseParams=l,t.parseUrl=c;
var v=document.createElement("a")},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(33),s=n(27),o={_map:{},register:function(e,t){n.i(r.a)(a.a.isFunction(t),'The "'+e+'" command must be a function'),this._map[e]=t},registerAll:function(e){var t=this;a.a.each(e,function(e,n){"__esModule"!==n&&t.register(n,e)})},reset:function(){this._map={}},execute:function(e){var t=this._map[e];if(n.i(r.a)(t,'The "'+e+'" command has not been registered'),t){n.i(s.a)("[Commands] Executing",e);for(var i=arguments.length,a=Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];
return t.apply(void 0,a)}}};t.a=o},function(e,t,n){"use strict";var i=n(93),a=(n.n(i),n(2)),r=n.n(a),s=n(47),o=n(5),l=n.n(o),c=(n(33),n(20)),u=n(316),d=n(57),h=n(35),p=n(59),f=s.a.Collection.extend({mixins:[u.a],responseType:d.a.xml,instanceOptions:["url","path","pageStart","pageSize","persistInCache","skipCache"],_context:["parent"],cache:null,cacheKey:function(){return r.a.result(this,"url")},constructor:function(e,t){t||(t={}),r.a.each(this.getContext(),function(e){var n=t[e];void 0!==n&&this.setContext(e,n);
},this);var n=r.a.result(this,"instanceOptions");if(r.a.each(n,function(e){r.a.has(t,e)&&(this[e]=t[e])},this),null==this.pageStart&&null==this.pageSize||(this.pageStart||(this.pageStart=0),this.pageSize||(this.pageSize=0)),t.populated&&this.resetPopulatePromise(l.a.Deferred().resolve().promise()),!this.cache||this.skipCache)return s.a.Collection.prototype.constructor.apply(this,arguments),void this._initState();this.initialize.apply(this,arguments);var i=this.cache.getItemCacheKey(this),a=this.cache.get(i);
return this.uninitialize(),a?a:t.onlyIfCached?{}:(s.a.Collection.prototype.constructor.apply(this,arguments),this._initState(),void this.cache.store(this,i))},uninitialize:function(){this.stopListening()},_initState:function(){p.a.get("shouldCreateStateTree")&&(this.state=this.toState(),this.updateState=this.updateState.bind(this),this.on("reset update sort",this.onCollectionChange,this),this.on("statechange",this.onStateChange,this))},getContext:function(){if(!this.context)return this._context;var e=r.a.result(this,"context");
return this._context.concat(e)},setContext:function(e,t){this.getContext().indexOf(e)!==-1&&this[e]!==t&&(this[e]=t,this.each(function(n){n.setContext(e,t)}))},getState:function(){return this.state},updateState:function(){var e=this.getState();this.state=this.toState();var t=this.getState();this.trigger("statechange",this,t,e)},toState:function(){return this.reduce(this.reduceState,[])},reduceState:function(e,t){var n=t.getState();return n&&e.push(n),e},shouldUpdateModelState:function(e,t,n){return t!==n;
},sync:function(){return this.cache&&this.cache.store(this),s.a.sync.apply(this,arguments)},syncUrl:function(){var e="";if(this.url&&(e=r.a.result(this,"url")),this.path&&(e=c.join([e,r.a.result(this,"path")])),null!=this.pageStart||null!=this.pageSize){var t={"X-Plex-Container-Start":this.pageStart||0,"X-Plex-Container-Size":this.pageSize||0};e=c.join(e,t)}return e},parse:function(e,t){return this.convert(e)},convert:function(e){var t=e;if(r.a.isString(t)){var n=r.a.result(this,"responseType");r.a.isFunction(this.augmentResponseText)&&(t=this.augmentResponseText(t,n)),
t=n.parse(t),n===d.a.json&&t.MediaContainer&&(t=t.MediaContainer)}if(r.a.isFunction(this.augmentResponse)&&(t=this.augmentResponse(t)),r.a.isArray(t))return t;var i=this.model.prototype.rootPropertyName;if(!i)return t;var a=t[i];return a?(r.a.isArray(a)||(a=[a]),a):[]},clone:function(e){e||(e=this.models);var t=r.a.result(this,"instanceOptions"),n=r.a.extend(r.a.pick(this,t),r.a.pick(this,this.getContext()),{skipCache:!0,persistInCache:!1});return new this.constructor(e,n)||null},cloneDeep:function(e){
e||(e=this.models);var t=r.a.map(e,function(e){return e.clone()});return this.clone(t)},clear:function(e){e=r.a.extend({silent:!0},e),this.abortPendingPopulate(),this.resetPopulatePromise(null),this.reset([],e)},getSaveParams:function(){return this.map(function(e){return e.getSaveParams()})},onCollectionChange:function(){h.b(this.updateState,this)},onStateChange:function(e,t,n){e!==this&&this.shouldUpdateModelState(e,t,n)&&h.b(this.updateState,this)}});t.a=f},function(e,t,n){"use strict";var i=n(1317);
n.d(t,"f",function(){return i});var a=n(132);n.d(t,"c",function(){return a});var r=n(219);n.d(t,"d",function(){return r});var s=n(1318);n.d(t,"a",function(){return s});var o=n(1319);n.d(t,"e",function(){return o});var l=n(2205);n.d(t,"b",function(){return l})},function(e,t,n){function i(e,t){var n=r.partials[e],i=a.extend({},t.hash.context||this,t.hash);return new r.SafeString(n(i))}var a=n(2),r=n(6);e.exports=i},function(e,t,n){"use strict";function i(e,t,i,r){var s=n.i(a.a)(e.props,t),o=n.i(a.a)(e.state,i),l=!r||n.i(a.a)(e.context,r),c=!s||!o||!l;
return c}var a=n(274);t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(17),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(46),m=n.n(g),v=n(28),y=n.n(v),b=n(33),S=n(25),w=n(23),M=n(895),I=n(2387),C=n.n(I),D=function(e){function t(i,a){l()(this,t);var r=u()(this,e.call(this,i,a));return r.onTouchStart=function(e){r._isTouch=!0,r._preventFocus=r._shouldPreventFocus(),1===e.touches.length&&r._activate(!0),r.props.onTouchStart&&r.props.onTouchStart(e)},r.onTouchMove=function(e){
r._activate(!1),r.props.onTouchMove&&r.props.onTouchMove(e)},r.onTouchEnd=function(e){var t=r.props,n=t.to,i=t.target,a=t.isDisabled,s=t.onTouchEnd;r._isActive&&!a&&(!n||i&&"_self"!==i||(e.preventDefault(),window.location.href=n),r._press(e)),r._activate(!1),s&&s(e)},r.onTouchCancel=function(e){r._isTouch=!1,r._activate(!1),r.props.onTouchCancel&&r.props.onTouchCancel(e)},r.onMouseDown=function(e){r._isTouch||(r._preventFocus=r._shouldPreventFocus(),0===e.button&&r._activate(!0),r.props.onMouseDown&&r.props.onMouseDown(e));
},r.onMouseUp=function(e){if(!r._isTouch){var t=r.props,n=t.isDisabled,i=t.onMouseUp;r._isActive&&!n&&(r._press(e),r._preventOnClick=!0),r._activate(!1),i&&i(e)}},r.onMouseLeave=function(e){r._isTouch||(r._isActive&&r.setState({isActive:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(e))},r.onClick=function(e){r._preventFocus=!1;var t=r.props.isDisabled;r._preventOnClick||r._isTouch||r._isActive||!r._isFocused||t||r._press(e),r._preventOnClick=!1,r._isTouch=!1},r.onFocus=function(e){return r._preventFocus?void(r._preventFocus=!1):(r._focus(!0),
void(r.props.onFocus&&r.props.onFocus(e)))},r.onBlur=function(e){r._focus(!1),r.props.onBlur&&r.props.onBlur(e)},n.i(b.a)(!i.onClick,"Use `onPress` instead of `onClick` for reliable behavior on touch screens"),r._preventFocus=!1,r._preventOnClick=!1,r._isTouch=!1,r._isActive=!1,r._isFocused=!1,r.state={isActive:!1,isFocused:!1},r}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(S.a)(this,e,t)},t.prototype._activate=function(e){this._isActive=e,this.setState({isActive:e});
},t.prototype._focus=function(e){this._isFocused=e,this.setState({isFocused:e})},t.prototype._shouldPreventFocus=function(){if(this.props.allowFocusOnPress)return!1;var e=m.a.findDOMNode(this)===document.activeElement;return!e},t.prototype._press=function(e){var t=this.props.onPress;t&&t(e)},t.prototype._isActiveRoute=function(){var e=window.location.hash,t=this.props.to;return!(!e||!t)&&0===e.indexOf(t)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.to,i=e.kind,r=e.size,o=e.isSelected,l=e.isDisabled,c=e.component,u=e.highlightActiveRoute,d=s()(e,["className","to","kind","size","isSelected","isDisabled","component","highlightActiveRoute"]),h=this.state,p=h.isActive,g=h.isFocused,m={},v=c;
return n?(v="a",m.href=n,m["aria-role"]="link"):m["aria-role"]="button",m.className=y()(t,C.a.link,C.a[i],r&&C.a[r],o&&C.a.isSelected,p&&M.a,g&&M.b,l&&M.c,u&&this._isActiveRoute()&&C.a.isActiveRoute),"button"!==v&&"input"!==v||(m.type=d.type||"button",m.disabled=l),f.a.createElement(v,a()({},d,m,{onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onTouchCancel:this.onTouchCancel,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onMouseLeave:this.onMouseLeave,
onClick:this.onClick,onFocus:this.onFocus,onBlur:this.onBlur}))},t}(p.Component);D.defaultProps={component:"button",kind:w.c.DEFAULT,isSelected:!1,isDisabled:!1,allowFocusOnPress:!1,highlightActiveRoute:!1},t.a=D},function(e,t,n){"use strict";var i=n(93),a=n.n(i),r=n(2211),s=n.n(r),o=n(2212),l=n.n(o),c=n(66),u=n.n(c),d=n(8),h="log:message",p="log:group",f="log:groupCollapsed",g="log:groupEnd",m={accessToken:1,address:1,auth_token:1,authToken:1,Authorization:1,clientIdentifier:1,email:1,host:1,myPlexAccessToken:1,
password:1,uri:1,"X-Plex-Token":1},v=new RegExp("("+u()(m).join("|")+")(\\s?=\\s?)(['\"]?)[^'\"\n]+(['\"]?)","g"),y=/%[sdif]/g,b=/(error|exception)\]$/i,S={"%s":function(e){return e},"%d":function(e){return l()(e,10)},"%f":function(e){return s()(e)}},w=function(e,t,n){return function(){var i,a=arguments.length;if(t=void 0===t?M.LEVEL_LOG:t,!(M.level<t)){if(0===a&&n)i=n;else if(1===a)i=M.serialize(arguments[0]);else if(a>1){for(var r=Array(a),s=-1;++s<a;)r[s]=M.serialize(arguments[s]);r[0]=r[0].replace(y,function(e,t){
var n=e;return r.length>1&&(n=S[e](r[1]),r.splice(1,1)),n}),i=r.join(" ")}return i&&d.a.trigger(e,{type:e,level:t,message:i}),i}}},M=w(h);M.LEVEL_NONE=-1,M.LEVEL_ERROR=0,M.LEVEL_WARN=1,M.LEVEL_INFO=2,M.LEVEL_DEBUG=3,M.LEVEL_LOG=4,M.LEVEL_GROUP=M.LEVEL_INFO,M.LEVEL_GROUP_END=M.LEVEL_INFO,M.level=M.LEVEL_LOG,M.redacts=!0,M.setLevel=function(e){M.level=Math.max(M.LEVEL_NONE,Math.min(e,M.LEVEL_LOG))},M.debug=w(h,M.LEVEL_DEBUG),M.info=w(h,M.LEVEL_INFO),M.warn=w(h,M.LEVEL_WARN),M.error=w(h,M.LEVEL_ERROR),
M.group=w(p,M.LEVEL_GROUP,"Group"),M.groupCollapsed=w(f,M.LEVEL_GROUP,"Group"),M.groupEnd=function(){M.level<M.LEVEL_GROUP_END||d.a.trigger(g,{type:g,level:M.LEVEL_GROUP_END})},M.serialize=function(e){var t=void 0;switch(t=void 0===e?"[object Undefined]":null===e?"[object Null]":Object.prototype.toString.call(e)){case"[object String]":return M.redacts?e.replace(v,"$1$2$3REDACTED$4"):e;case"[object Object]":case"[object Array]":try{var n=M.redacts?M._jsonReplacer:null;return a()(e,n,2)}catch(e){return"Unable to serialize value";
}case"[object Boolean]":case"[object Number]":case"[object Function]":case"[object RegExp]":return e.toString();case"[object Date]":return e.toUTCString();case"[object Undefined]":return"undefined";case"[object Null]":return"null";default:if(b.test(t)){var i=M._getMaxStackLength(),r=e.stacktrace||e.stack;return r&&r.length>i&&(r=r.substr(0,i-3)+"..."),M.serialize({type:t,stack:r,name:e.name,message:e.message})}return e.toString()}},M._jsonReplacer=function(e,t){return m[e]?"REDACTED":"[object String]"===Object.prototype.toString.call(t)?M.serialize(t):t;
},M._getMaxStackLength=function(){return 1e3},t.a=M},function(e,t,n){var i,a;/*!
  Copyright (c) 2016 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var i=arguments[t];if(i){var a=typeof i;if("string"===a||"number"===a)e.push(i);else if(Array.isArray(i))e.push(n.apply(null,i));else if("object"===a)for(var s in i)r.call(i,s)&&i[s]&&e.push(s)}}return e.join(" ")}var r={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(i=[],a=function(){return n}.apply(t,i),!(void 0!==a&&(e.exports=a)))}()},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){
var n=t.metadataItemEntityID;return n},r.a,function(e,t){return t[e]})}var a=n(9),r=(n.n(a),n(323));t.a=i},function(e,t,n){"use strict";function i(e){var t=e["aria-label"],n=e.className,i=e.name,a=e.style;return r()("i",{className:n?l()(i,n):i,"aria-hidden":!t,"aria-label":t,style:a})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(28)),l=n.n(o);t.a=i},function(e,t,n){"use strict";var i=n(436);n.d(t,"_163",function(){return i.c}),n.d(t,"_164",function(){return i.a}),n.d(t,"_165",function(){return i.b}),n.d(t,"D",function(){
return a}),n.d(t,"E",function(){return r}),n.d(t,"F",function(){return s}),n.d(t,"G",function(){return o}),n.d(t,"H",function(){return l}),n.d(t,"I",function(){return c}),n.d(t,"J",function(){return u}),n.d(t,"_107",function(){return d}),n.d(t,"_108",function(){return h}),n.d(t,"_109",function(){return p}),n.d(t,"_110",function(){return f}),n.d(t,"_111",function(){return g}),n.d(t,"_112",function(){return m}),n.d(t,"_113",function(){return v}),n.d(t,"_114",function(){return y}),n.d(t,"_115",function(){
return b}),n.d(t,"_116",function(){return S}),n.d(t,"_117",function(){return w}),n.d(t,"_118",function(){return M}),n.d(t,"_119",function(){return I}),n.d(t,"_120",function(){return C}),n.d(t,"_121",function(){return D}),n.d(t,"_122",function(){return T}),n.d(t,"_123",function(){return x}),n.d(t,"_2",function(){return P}),n.d(t,"_3",function(){return E}),n.d(t,"_4",function(){return A}),n.d(t,"_5",function(){return L}),n.d(t,"_6",function(){return k}),n.d(t,"_7",function(){return N}),n.d(t,"_8",function(){
return _}),n.d(t,"_9",function(){return O}),n.d(t,"_10",function(){return R}),n.d(t,"_11",function(){return j}),n.d(t,"_12",function(){return z}),n.d(t,"i",function(){return U}),n.d(t,"j",function(){return F}),n.d(t,"k",function(){return B}),n.d(t,"l",function(){return V}),n.d(t,"m",function(){return H}),n.d(t,"n",function(){return W}),n.d(t,"o",function(){return Q}),n.d(t,"p",function(){return Y}),n.d(t,"q",function(){return G}),n.d(t,"r",function(){return K}),n.d(t,"s",function(){return q}),n.d(t,"t",function(){
return Z}),n.d(t,"u",function(){return X}),n.d(t,"v",function(){return J}),n.d(t,"w",function(){return $}),n.d(t,"x",function(){return ee}),n.d(t,"y",function(){return te}),n.d(t,"z",function(){return ne}),n.d(t,"A",function(){return ie}),n.d(t,"B",function(){return ae}),n.d(t,"C",function(){return re}),n.d(t,"_20",function(){return se}),n.d(t,"_21",function(){return oe}),n.d(t,"_22",function(){return le}),n.d(t,"_23",function(){return ce}),n.d(t,"_24",function(){return ue}),n.d(t,"_25",function(){
return de}),n.d(t,"_97",function(){return he}),n.d(t,"_98",function(){return pe}),n.d(t,"_99",function(){return fe}),n.d(t,"_100",function(){return ge}),n.d(t,"_101",function(){return me}),n.d(t,"_102",function(){return ve}),n.d(t,"_103",function(){return ye}),n.d(t,"_104",function(){return be}),n.d(t,"_105",function(){return Se}),n.d(t,"_106",function(){return we}),n.d(t,"_28",function(){return Me}),n.d(t,"_29",function(){return Ie}),n.d(t,"_30",function(){return Ce}),n.d(t,"_31",function(){return De;
}),n.d(t,"_32",function(){return Te}),n.d(t,"_33",function(){return xe}),n.d(t,"_34",function(){return Pe}),n.d(t,"_35",function(){return Ee}),n.d(t,"_36",function(){return Ae}),n.d(t,"_37",function(){return Le}),n.d(t,"_38",function(){return ke}),n.d(t,"_39",function(){return Ne}),n.d(t,"_40",function(){return _e}),n.d(t,"_42",function(){return Oe}),n.d(t,"_41",function(){return Re}),n.d(t,"_43",function(){return je}),n.d(t,"_44",function(){return ze}),n.d(t,"_45",function(){return Ue}),n.d(t,"_46",function(){
return Fe}),n.d(t,"_47",function(){return Be}),n.d(t,"_48",function(){return Ve}),n.d(t,"_49",function(){return He}),n.d(t,"_50",function(){return We}),n.d(t,"_51",function(){return Qe}),n.d(t,"_52",function(){return Ye}),n.d(t,"_155",function(){return Ge}),n.d(t,"_156",function(){return Ke}),n.d(t,"_157",function(){return qe}),n.d(t,"_158",function(){return Ze}),n.d(t,"_159",function(){return Xe}),n.d(t,"_160",function(){return Je}),n.d(t,"_152",function(){return $e}),n.d(t,"_153",function(){return et;
}),n.d(t,"_154",function(){return tt}),n.d(t,"_145",function(){return nt}),n.d(t,"_146",function(){return it}),n.d(t,"_147",function(){return at}),n.d(t,"_144",function(){return rt}),n.d(t,"_150",function(){return st}),n.d(t,"_149",function(){return ot}),n.d(t,"_148",function(){return lt}),n.d(t,"_151",function(){return ct}),n.d(t,"_26",function(){return ut}),n.d(t,"_27",function(){return dt}),n.d(t,"_137",function(){return ht}),n.d(t,"_138",function(){return pt}),n.d(t,"_139",function(){return ft;
}),n.d(t,"_140",function(){return gt}),n.d(t,"_161",function(){return mt}),n.d(t,"_162",function(){return vt}),n.d(t,"_124",function(){return yt}),n.d(t,"_125",function(){return bt}),n.d(t,"_126",function(){return St}),n.d(t,"_127",function(){return wt}),n.d(t,"_128",function(){return Mt}),n.d(t,"_129",function(){return It}),n.d(t,"_130",function(){return Ct}),n.d(t,"_131",function(){return Dt}),n.d(t,"_132",function(){return Tt}),n.d(t,"_133",function(){return xt}),n.d(t,"_134",function(){return Pt;
}),n.d(t,"_135",function(){return Et}),n.d(t,"_136",function(){return At}),n.d(t,"_92",function(){return Lt}),n.d(t,"_93",function(){return kt}),n.d(t,"_94",function(){return Nt}),n.d(t,"_95",function(){return _t}),n.d(t,"_96",function(){return Ot}),n.d(t,"_87",function(){return Rt}),n.d(t,"_88",function(){return jt}),n.d(t,"_89",function(){return zt}),n.d(t,"_90",function(){return Ut}),n.d(t,"_91",function(){return Ft}),n.d(t,"_53",function(){return Bt}),n.d(t,"_54",function(){return Vt}),n.d(t,"_55",function(){
return Ht}),n.d(t,"_56",function(){return Wt}),n.d(t,"_59",function(){return Qt}),n.d(t,"_60",function(){return Yt}),n.d(t,"_57",function(){return Gt}),n.d(t,"_58",function(){return Kt}),n.d(t,"_61",function(){return qt}),n.d(t,"_62",function(){return Zt}),n.d(t,"_63",function(){return Xt}),n.d(t,"_64",function(){return Jt}),n.d(t,"_65",function(){return $t}),n.d(t,"_66",function(){return en}),n.d(t,"_77",function(){return tn}),n.d(t,"_78",function(){return nn}),n.d(t,"_67",function(){return an}),
n.d(t,"_68",function(){return rn}),n.d(t,"_69",function(){return sn}),n.d(t,"_70",function(){return on}),n.d(t,"_71",function(){return ln}),n.d(t,"_72",function(){return cn}),n.d(t,"_73",function(){return un}),n.d(t,"_74",function(){return dn}),n.d(t,"_75",function(){return hn}),n.d(t,"_76",function(){return pn}),n.d(t,"_79",function(){return fn}),n.d(t,"_80",function(){return gn}),n.d(t,"_81",function(){return mn}),n.d(t,"_82",function(){return vn}),n.d(t,"_83",function(){return yn}),n.d(t,"_84",function(){
return bn}),n.d(t,"_85",function(){return Sn}),n.d(t,"_86",function(){return wn}),n.d(t,"K",function(){return Mn}),n.d(t,"L",function(){return In}),n.d(t,"M",function(){return Cn}),n.d(t,"N",function(){return Dn}),n.d(t,"O",function(){return Tn}),n.d(t,"P",function(){return xn}),n.d(t,"Q",function(){return Pn}),n.d(t,"R",function(){return En}),n.d(t,"S",function(){return An}),n.d(t,"T",function(){return Ln}),n.d(t,"a",function(){return kn}),n.d(t,"b",function(){return Nn}),n.d(t,"c",function(){return _n;
}),n.d(t,"d",function(){return On}),n.d(t,"e",function(){return Rn}),n.d(t,"f",function(){return jn}),n.d(t,"g",function(){return zn}),n.d(t,"h",function(){return Un});n.d(t,"_13",function(){return Fn});n.d(t,"_14",function(){return Bn}),n.d(t,"_15",function(){return Vn}),n.d(t,"_16",function(){return Hn}),n.d(t,"_17",function(){return Wn}),n.d(t,"_19",function(){return Qn}),n.d(t,"_18",function(){return Yn}),n.d(t,"U",function(){return Gn}),n.d(t,"V",function(){return Kn}),n.d(t,"W",function(){return qn;
}),n.d(t,"X",function(){return Zn}),n.d(t,"Y",function(){return Xn}),n.d(t,"Z",function(){return Jn}),n.d(t,"_0",function(){return $n}),n.d(t,"_1",function(){return ei}),n.d(t,"_141",function(){return ti}),n.d(t,"_142",function(){return ni}),n.d(t,"_143",function(){return ii});var a="SHOW_ALERT",r="SAVE_SETTINGS",s="DOWNLOAD_SERVER",o="DISCOVER_SERVERS",l="REDIRECT_TO_ROUTE",c="REDIRECT_TO_HTTP",u="GARBAGE_COLLECT_ENTITIES",d="SELECT_ITEM",h="SELECT_MODELS",p="DESELECT_ALL_ITEMS",f="DESELECT_MODELS",g="DESELECT_COLLECTION",m="SELECT_RANGE",v="DESELECT_RANGE",y="PLAY_SELECTED_ITEMS",b="ADD_SELECTED_ITEMS_TO_PLAYLIST",S="UPDATE_SELECTED_ITEMS_WATCHED_STATUS",w="EDIT_SELECTED_ITEMS",M="REFRESH_SELECTED_ITEMS",I="ANALYZE_SELECTED_ITEMS",C="SYNC_METADATA_ITEMS",D="OPTIMIZE_METADATA_ITEMS",T="MERGE_SELECTED_ITEMS",x="DELETE_SELECTED_ITEMS",P="FETCH_PLANS",E="POPULATE_PLANS",A="REPOPULATE_UNWATCHED_WATCH_LATER_LIST",L="REPOPULATE_UNWATCHED_RECOMMENDED_LIST",k="UPDATE_USER",N="CLEAR_UPDATE_USER_ERROR",_="FETCH_WEBHOOKS",O="ADD_WEBHOOK",R="REPLACE_WEBHOOK",j="CLEAR_UPDATE_WEBHOOK_ERROR",z="REMOVE_WEBHOOK",U="TEST_SERVER",F="SET_RELAY_REMINDER",B="FETCH_PROVIDERS",V="POPULATE_PROVIDERS",H="FETCH_LIBRARIES",W="POPULATE_LIBRARIES",Q="ADD_LIBRARY",Y="START_LIBRARIES_REFRESH",G="SHARE_LIBRARIES",K="ENABLE_HTTP_FALLBACK",q="OPTIMIZE_DATABASE",Z="CLEAN_BUNDLES",X="EMPTY_TRASH",J="DELETE_SERVER",$="START_ACTIVITY",ee="UPDATE_ACTIVITY",te="FINISH_ACTIVITY",ne="START_SYNTHETIC_ACTIVITY",ie="FINISH_SYNTHETIC_ACTIVITY",ae="EVENT_CONNECTION_OPEN",re="RESTART_PERSONAL_CLOUD_SERVER",se="SHARE_LIBRARY",oe="START_LIBRARY_REFRESH",le="EDIT_LIBRARY",ce="ANALYZE_LIBRARY",ue="EMPTY_TRASH_LIBRARY",de="DELETE_LIBRARY",he="POPULATE_METADATA_LIST_RANGE",pe="REPOPULATE_METADATA_LIST_RANGE",fe="PLAY_METADATA_LIST",ge="ADD_METADATA_LIST_TO_PLAYLIST",me="SYNC_METADATA_LIST",ve="OPTIMIZE_METADATA_LIST",ye="SELECT_METADATA_LIST_ITEM",be="DESELECT_METADATA_LIST_ITEM",Se="DESELECT_ALL_METADATA_LIST_ITEMS",we="RESET_METADATA_LIST",Me="ADD_METADATA_ITEM_TO_PLAYLIST",Ie="ANALYZE_METADATA_ITEM",Ce="DELETE_METADATA_ITEM",De="DELETE_METADATA_ITEM_VERSION",Te="DOWNLOAD_METADATA_ITEM_VERSION",xe="EDIT_METADATA_ITEM",Pe="FIX_METADATA_ITEM_MATCH",Ee="GET_METADATA_ITEM_INFO",Ae="MARK_METADATA_ITEM_UNWATCHED",Le="MARK_METADATA_ITEM_WATCHED",ke="OPTIMIZE_METADATA_ITEM",Ne="PLAY_METADATA_ITEM",_e="PLAY_METADATA_ITEM_VERSION",Oe="PLAY_RELATED_MIX",Re="PLAY_PRIMARY_EXTRA",je="QUEUE_METADATA_ITEM",ze="RATE_METADATA_ITEM",Ue="RECOMMEND_METADATA_ITEM",Fe="REFRESH_METADATA_ITEM",Be="SHARE_METADATA_ITEM",Ve="SPLIT_METADATA_ITEM_APART",He="SYNC_METADATA_ITEM",We="UNMATCH_METADATA_ITEM",Qe="WATCH_METADATA_ITEM_LATER",Ye="CHANGE_METADATA_ITEM_FIELD",Ge="START_PLAYBACK",Ke="END_PLAYBACK",qe="CLOSE_PLAYER",Ze="PLAY_NEXT_ITEM",Xe="PLAY_PREVIOUS_ITEM",Je="PLAY_ITEM",$e="TOGGLE_SLIDESHOW",et="TOGGLE_RELATED",tt="PHOTO_PLAYER_TICK",nt="MAKE_VIDEO_DECISION",it="REMOVE_VIDEO_DECISION",at="REPORT_PLAYBACK_ERROR",rt="TOGGLE_VIDEO_PLAY_PAUSE",st="CHANGE_VIDEO_QUALITY",ot="CHANGE_PLAYER_POSITION",lt="UPDATE_PLAYER_POSITION",ct="VIDEO_PLAYER_TICK",ut="REPOPULATE_PAGE",dt="VIEW_ITEM_DETAILS",ht="INIT_DASHBOARD_PAGE",pt="CLEAR_DASHBOARD_PAGE",ft="FETCH_HUBS",gt="POPULATE_HUBS",mt="INIT_METADATA_LIST_PAGE",vt="CLEAR_METADATA_LIST_PAGE",yt="INIT_LIBRARY_PAGE",bt="CLEAR_LIBRARY_PAGE",St="FETCH_LIBRARY_METADATA_TYPES",wt="POPULATE_LIBRARY_METADATA_TYPES",Mt="FETCH_LIBRARY_FIRST_CHARACTERS",It="POPULATE_LIBRARY_FIRST_CHARACTERS",Ct="SELECT_LIBRARY_FILTER",Dt="DESELECT_LIBRARY_FILTER",Tt="FETCH_LIBRARY_FILTER_OPTIONS",xt="POPULATE_LIBRARY_FILTER_OPTIONS",Pt="SEARCH_LIBRARY_FILTER_OPTIONS",Et="SELECT_LIBRARY_TABLE_COLUMN",At="DESELECT_LIBRARY_TABLE_COLUMN",Lt="INIT_PRE_PLAY_PAGE",kt="INIT_PRE_PLAY_DESCENDANT_LIST",Nt="CLEAR_PRE_PLAY_PAGE",_t="FETCH_PRE_PLAY_METADATA_ITEM",Ot="FETCH_PRE_PLAY_RELATED_HUBS",Rt="INIT_LIVE_TV_SETTINGS_PAGE",jt="CLEAR_LIVE_TV_SETTINGS_PAGE",zt="FETCH_DVRS",Ut="REMOVE_DVR",Ft="RELOAD_GUIDE",Bt="CLEAR_DVR_SETUP",Vt="DVR_SETUP_NEXT_STEP",Ht="DVR_SETUP_PREVIOUS_STEP",Wt="FETCH_DEVICES",Qt="SELECT_DEVICE",Yt="SELECT_DEVICE_SOURCE",Gt="DISCOVER_DEVICES",Kt="ADD_DEVICE",qt="FETCH_DEVICE_DETAILS",Zt="FETCH_DEVICE_CHANNELS",Xt="SCAN_DEVICE_CHANNELS",Jt="CANCEL_SCAN_DEVICE_CHANNELS",$t="FIND_BEST_EPG_LINEUP",en="SELECT_EPG_LINEUP",tn="FETCH_LINEUP_CHANNELS",nn="FETCH_CHANNEL_MAP",an="CLEAR_CHANNEL_MAP_ERROR",rn="SAVE_CHANNEL_MAP",sn="CLEAR_CHANNEL_MAPPINGS_SAVE_ERROR",on="SAVE_DVR",ln="ADD_DVR_DEVICE",cn="REMOVE_DVR_DEVICE",un="SAVE_DVR_SETTINGS",dn="CLEAR_DVR_SETTINGS_SAVE_ERROR",hn="SAVE_DEVICE_SETTINGS",pn="CLEAR_DEVICE_SETTINGS_SAVE_ERROR",fn="RESET_EPG_SETTINGS",gn="FETCH_EPG_COUNTRIES",mn="FETCH_EPG_LANGUAGES",vn="SELECT_EPG_COUNTRY",yn="SELECT_EPG_LANGUAGE",bn="SELECT_EPG_REGION",Sn="SET_EPG_POSTAL_CODE",wn="FETCH_EPG_LINEUPS",Mn="INIT_RECORDING_SCHEDULE_PAGE",In="CLEAR_RECORDING_SCHEDULE_PAGE",Cn="FETCH_MEDIA_SUBSCRIPTIONS",Dn="MOVE_MEDIA_SUBSCRIPTION",Tn="SET_VISIBLE_DAYS",xn="GO_TO_TODAY",Pn="GO_TO_PREVIOUS_RANGE",En="GO_TO_NEXT_RANGE",An="FETCH_CALENDAR",Ln="PLAY_RECORDING",kn="INIT_MEDIA_SUBSCRIPTION_MODAL",Nn="CLEAR_MEDIA_SUBSCRIPTION_MODAL",_n="FETCH_MEDIA_SUBSCRIPTION",On="SAVE_MEDIA_SUBSCRIPTION",Rn="CHANGE_MEDIA_SUBSCRIPTION_TEMPLATE_MODE",jn="CLEAR_MEDIA_SUBSCRIPTION_MODAL_ERROR",zn="MOVE_MEDIA_SUBSCRIPTION_MODAL",Un="DELETE_MEDIA_SUBSCRIPTION_MODAL",Fn="SHOW_PROVISION_PERSONAL_CLOUD_SERVER_MODAL",Bn="PROVISION_PERSONAL_CLOUD_SERVER",Vn="CONNECT_TO_OWNED_PERSONAL_CLOUD_SERVER",Hn="POPULATE_PERSONAL_CLOUD_SERVER_CACHE",Wn="FETCH_PERSONAL_CLOUD_SERVER_PROVIDERS",Qn="FETCH_PERSONAL_CLOUD_SERVER_STATUS",Yn="UNLINK_PERSONAL_CLOUD_SERVER_PROVIDER",Gn="INIT_QUICK_SEARCH",Kn="RESET_QUICK_SEARCH",qn="FETCH_QUICK_SEARCH",Zn="CHANGE_SEARCH_QUERY",Xn="CHANGE_SEARCH_SETTINGS",Jn="SELECT_SEARCH_RESULT",$n="NAVIGATE_SEARCH_RESULT",ei="PLAY_SEARCH_RESULT",ti="POPULATE_SEARCH_PROVIDERS",ni="FETCH_SEARCH_PAGE",ii="CLEAR_SEARCH_PAGE";
},function(e,t,n){"use strict";function i(e){var t="",n="";e?(t=e.userAgent,n=e.platform):null!=window.navigator&&(t=window.navigator.userAgent,n=window.navigator.platform),this.detect({userAgent:t,platform:n})}var a=/version\/(\d+(\.\d+)?)/i,r=/(?:chrome|crios|gfibertv)[\/-](\d+(\.\d+)?)/i,s=/firefox[ \/](\d+(\.\d+)?)/i,o=/(msie |rv:)(\d+(\.\d+)?)/i,l=/(?:applewebkit|safari)\/(\d+(\.\d+)?)/i,c=function(e){var t=/\(.* ([^\)]+)\)$/.exec(e);return t&&t[1]||void 0};i.prototype={constructor:i,browsers:[{
id:"konvergo",name:"Plex Media Player",webkit:!0,regex:/plexmediaplayer/i,versionRegex:/plexmediaplayer (\d+\.\d+\.\d+)/i},{id:"anvergo",name:"Anvergo",webkit:!0,regex:/anvergo/i,versionRegex:/anvergo.*-(.*)/i},{id:"wiiu",name:"Wii U",regex:/wiiu/i,versionRegex:l,webkit:!0},{id:"ps3",name:"Unknown Browser",webkit:!0,regex:/\(PLAYSTATION 3 \d\./},{id:"ps4",name:"Unknown Browser",webkit:!0,regex:/\(PlayStation 4 \d\./},{id:"ps3",name:"Mystery 3",webkit:!0,regex:/\(PlayStation 3\)/,versionRegex:l},{
id:"ps4",name:"Mystery 4",webkit:!0,regex:/\(PlayStation 4\)/,versionRegex:l},{id:"edge",name:"Microsoft Edge",regex:/edge|(windows phone.+chrome)/i,versionRegex:/edge\/(\d+(\.\d+)?)/i},{id:"ie",name:"Internet Explorer",msie:!0,regex:/(msie|trident|iemobile)/i,versionRegex:o,versionMatchIndex:2},{id:"opera",name:"Opera",presto:!0,regex:/opera/i,versionRegex:a},{id:"opera",name:"Opera",webkit:!0,regex:/OPR\//,versionRegex:/OPR\/\s?(\d+(\.\d+)?)/},{id:"vivaldi",name:"Vivaldi",webkit:!0,regex:/vivaldi/i,
versionRegex:/Vivaldi\/\s?(\d+(\.\d+)?)/},{id:"chrome",name:"Chrome",webkit:!0,regex:/(chrome|crios|gfiber|netbox)/i,versionRegex:r},{id:"firefox",name:"Firefox",gecko:!0,regex:/firefox/i,versionRegex:s},{id:"safari",name:"Safari",webkit:!0,regex:/macintosh.+safari/i,versionRegex:a},{id:"safari",name:"Safari",webkit:!0,regex:/applewebkit/i,versionRegex:l}],platforms:[{id:"wpe",name:"WebKit for Wayland",tv:!0,regex:/WPE$/},{id:"netgem",name:"Netgem",tv:!0,regex:/^Netbox/,version:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";
return e.split("/")[1]||e}},{id:"netcast",name:"NetCast",tv:!0,predicate:function(e){return/netcast/i.test(e)&&!/web[o0]s/i.test(e)}},{id:"webos",name:"webOS",tv:!0,predicate:function(e){return/web[o0]s/i.test(e)&&/smarttv/i.test(e)},version:function(e){try{return JSON.parse(window.PalmSystem.deviceInfo).platformVersion}catch(e){}}},{id:"blackberry",name:"Blackberry",mobile:!0,regex:/BlackBerry|RIM|BB10/,version:function(e){var t=/PlayBook/.test(e)?/Tablet OS (\d+\.\d+)/:a,n=t.exec(e);return n&&n[1];
}},{id:"ps3",name:"PlayStation 3",tv:!0,regex:/P(lay)?S(tation )?3/i,version:function(e){return window.WM_devSettings?window.WM_devSettings.version:void 0}},{id:"ps4",name:"PlayStation 4",tv:!0,regex:/P(lay)?S(tation )?4/i,version:function(e){return window.WM_devSettings?window.WM_devSettings.version:void 0}},{id:"wiiu",name:"Wii U",tv:!0,regex:/Nintendo WiiU/},{id:"tizen",name:"Tizen",tv:!0,predicate:function(e){return!!this.version(e)},version:function(e){var t=/Tizen (\d+(\.\d+)*)/i.exec(e);return t&&t[1]||void 0;
}},{id:"winvergo",name:"Winvergo",tv:!0,predicate:function(e){return!!window.Windows}},{id:"sta",name:"Smart TV Alliance",tv:!0,version:function e(t){var e,n;if(/SmartTvA/.test(t))n=/SmartTvA\/(\d+\.\d+)/.exec(t),e=n&&n[1]||e;else{var i=[/Linux i686.+Chromium\/18/,/nettv\/4.2/i,/toshiba-dtv/i,/viera/i],a=[/nettv\/4/i],r=[/nettv/i],s=function(e){return e.test(t)};i.some(s)?e="2.0":a.some(s)?e="1.0":r.some(s)&&(e="0")}return e},predicate:function(e){return void 0!==this.version(e)}},{id:"tivo",name:"TiVo",
tv:!0,regex:/TiVo/,version:function(e){var t=/TCD[^,]+/.exec(e);return t&&t[0]||void 0}},{id:"viziomtk",name:"Vizio MTK",tv:!0,predicate:function(e){return/opera/i.test(e)&&"undefined"!=typeof iMTK_JSP}},{id:"viziosigma",name:"Vizio Sigma",tv:!0,predicate:function(e){return/opera/i.test(e)&&/vizio/i.test(e)},version:function(e){var t=/\/([^\s]+) \(Vizio/.exec(e);return t&&t[1]||void 0}},{id:"operatvstore",name:"Opera TV Store",tv:!0,predicate:function(e){var t=/Opera TV Store/.test(e),n=/TV Store/.test(e)&&/OMI\//.test(e);
return t||n}},{id:"operatv",name:"Opera TV",tv:!0,regex:/opera\/\d+\.\d+ \(linux (mips|arm)/i},{id:"android",name:"Android",tv:!0,regex:/Anvergo-Android/,version:function(e){var t=/Android (\d+\.\d+)/.exec(e);return t&&t[1]}},{id:"ios",name:"iOS",mobile:!0,regex:/(iphone|ipad|ipod)/i,version:function(e){var t=/OS (\d+_\d+)/.exec(e);return t&&t[1]?t[1].replace("_","."):void 0}},{id:"windowsphone",name:"Windows Phone",mobile:!0,regex:/windows phone/i,version:function(e){var t=/windows phone[ os]*(\d+\.\d+);/i.exec(e);
return t&&t[1]}},{id:"android",name:"Android",mobile:!0,regex:/android/i,version:function(e){var t=/Android (\d+\.\d+)/.exec(e);return t&&t[1]}},{id:"webos",name:"webOS",mobile:!0,predicate:function(e){return/hpwOS/.test(e)||/web[o0]s/i.test(e)&&!/smarttv/i.test(e)},version:function(e){var t=/(?:hpw|web)OS\/(\d+\.\d+)/.exec(e);return t&&t[1]}},{id:"openelec-rpi2",name:"Embedded (Raspberry Pi)",tv:!0,regex:/plexmediaplayer.*openelec-rpi2/i,version:c},{id:"openelec",name:"Embedded",tv:!0,regex:/plexmediaplayer.*openelec/i,
version:c},{id:"linuxkonvergo",name:"Linux",tv:!0,regex:/plexmediaplayer.*linux/i,version:c},{id:"osxkonvergo",name:"OSX",tv:!0,regex:/plexmediaplayer.*mac/i,version:c},{id:"windowskonvergo",name:"Windows",tv:!0,regex:/plexmediaplayer.*win/i,version:c},{id:"linux",name:"Linux",regex:/linux/i},{id:"osx",name:"OSX",regex:/Macintosh/,version:function(e){var t=/OS X (\d+)[_.]?(\d+)?/.exec(e);if(t)return t[2]?t[1]+"."+t[2]:t[1]}},{id:"windows",name:"Windows",regex:/Windows/,version:function(e){var t={
"6.0":"Vista / Server 2008",6.1:"7 / Server 2008 R2",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},n=/Windows [^\d;\)]*(\d+\.\d+)/.exec(e);if(n)return t[n[1]]}}],id:"unknown",name:"Unknown Browser",version:"0",platformID:"unknown",platform:"Unknown Platform",platformVersion:"0",webkit:!1,gecko:!1,msie:!1,presto:!1,tv:!1,mobile:!1,detect:function(e){var t,n=this.runTests(this.browsers,e),i=this.runTests(this.platforms,e);n&&(this.id=n.id,this.name=n.name,this.version=this.getVersion(e.userAgent,n.versionRegex,n.versionMatchIndex||1),
this.webkit=!!n.webkit,this.gecko=!!n.gecko,this.msie=!!n.msie,this.presto=!!n.presto),i&&(t="function"==typeof i.version?i.version(e.userAgent):i.version,this.platform=i.name,this.platformID=i.id,this.platformVersion=t||this.platformVersion,this.mobile=!!i.mobile,this.tv=!!i.tv),this.tv||(this.platformModifierKey="osx"===this.platformID||"ios"===this.platformID?"command":"ctrl")},runTests:function(e,t){for(var n,i,a,r=0;i!==!0&&(a=e[r++]);)n=t[a.context||"userAgent"],a.regex?i=a.regex.test(n):a.predicate&&(i=a.predicate(n));
return a},getVersion:function(e,t,n){var i=e.match(t);return i&&i.length>n&&i[n]||"0"},toJSON:function(){var e={};for(var t in this)this[t]&&"browsers"!==t&&"platforms"!==t&&(e[t]=this[t]);return e}},t.a=new i},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e)return!0;if(a.a.error(t),n)throw new Error(t);return!1}var a=n(27),r="`assert` requires an error message argument";t.a=i},function(e,t,n){
"use strict";function i(){r.a.isFunction(this.initialize)&&this.initialize.apply(this,arguments)}var a=n(2),r=n.n(a),s=function(e,t){var n,i=this;n=e&&r.a.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)||null},r.a.extend(n,i,t);var a=function(){this.constructor=n};if(a.prototype=i.prototype,n.prototype=new a,e&&e.hasOwnProperty("mixins")){var s=e.mixins;delete e.mixins,r.a.isArray(s)||(s=[s]),r.a.each(s,function(e){r.a.extend(n.prototype,e)})}return e&&r.a.extend(n.prototype,e),
n.__super__=i.prototype,n};i.extend=s,t.a=i},function(e,t,n){"use strict";function i(){m&&(m=clearTimeout(m))}function a(){v&&(v=clearTimeout(v))}function r(){var e=y;y=null,e()}function s(){i(),a();var e=n.i(u.a)(),t=void 0;for(p=!0;d.length&&(!t||t-e<f);)d.pop()(),t=n.i(u.a)();p=!1,d.length?m=setTimeout(s,g):y&&(v=setTimeout(r,g))}function o(e){for(i(),a(),p=!0,h=!0;d.length;)d.pop()();if(e)try{e()}catch(e){n.i(c.a)(!1,e.name+": "+e.message)}y&&r(),p=!1,h=!1}function l(e,t){return t.isStateTreeRoot?(y=e,
void(p||v||(v=setTimeout(r,g)))):h?void e():(a(),d[0]!==e&&d.unshift(e),void(p||m||(m=setTimeout(s,g))))}var c=n(33),u=n(726);t.a=o,t.b=l;var d=[],h=!1,p=!1,f=1e3/60,g=1e3/60,m=void 0,v=void 0,y=void 0},function(e,t,n){"use strict";function i(e){var t=g.get(e);if(!t)return[];var n=u.a.compact(u.a.map(f,function(e){if(t.hasOwnProperty(e))return g.get(t[e])}));return n.unshift(t),n}function a(e){var t=g.get(e);if(t){var n=t.grandparent||t.parent;return n?g.get(n):t}}function r(e){var t=g.get(e);if(t){
var n=t.grandchild||t.child;return n?g.get(n):t}}function s(e){var t=r(e);return!!t&&t.typeString!==e}var o=n(7),l=n.n(o),c=n(2),u=n.n(c),d=n(215),h=n(4),p=["id","typeString"],f=["grandparent","parent","child","grandchild"],g=n.i(d.a)(p,[{id:1,typeString:"movie",title:function(){return n.i(h.default)("Movie")},plural:function(){return n.i(h.default)("Movies")},element:"video"},{id:2,typeString:"show",title:function(){return n.i(h.default)("Show")},plural:function(){return n.i(h.default)("Shows")},
element:"directory",child:3,grandchild:4},{id:3,typeString:"season",title:function(){return n.i(h.default)("Season")},plural:function(){return n.i(h.default)("Seasons")},element:"directory",parent:2,child:4},{id:4,typeString:"episode",title:function(){return n.i(h.default)("Episode")},plural:function(){return n.i(h.default)("Episodes")},element:"video",grandparent:2,parent:3},{id:5,typeString:"trailer",title:function(){return n.i(h.default)("Trailer")},plural:function(){return n.i(h.default)("Trailers");
},element:"video"},{id:6,typeString:"comic",title:function(){return n.i(h.default)("Comic")},plural:function(){return n.i(h.default)("Comics")},element:"photo"},{id:7,typeString:"person",title:function(){return n.i(h.default)("Person")},plural:function(){return n.i(h.default)("People")},element:"directory"},{id:8,typeString:"artist",title:function(){return n.i(h.default)("Artist")},plural:function(){return n.i(h.default)("Artists")},element:"directory",child:9,grandchild:10},{id:9,typeString:"album",
title:function(){return n.i(h.default)("Album")},plural:function(){return n.i(h.default)("Albums")},element:"directory",parent:8,child:10},{id:10,typeString:"track",title:function(){return n.i(h.default)("Track")},plural:function(){return n.i(h.default)("Tracks")},element:"audio",grandparent:8,parent:9},{id:11,typeString:"picture",title:function(){return n.i(h.default)("Picture")},plural:function(){return n.i(h.default)("Pictures")},element:"photo"},{id:12,typeString:"clip",title:function(){return n.i(h.default)("Clip");
},plural:function(){return n.i(h.default)("Clips")},element:"video"},{id:13,typeString:"photo",title:function(){return n.i(h.default)("Photo")},plural:function(){return n.i(h.default)("Photos")},element:"photo",parent:14},{id:14,typeString:"photoalbum",title:function(){return n.i(h.default)("Photo Album")},plural:function(){return n.i(h.default)("Photo Albums")},element:"directory",child:13},{id:15,typeString:"playlist",title:function(){return n.i(h.default)("Playlist")},plural:function(){return n.i(h.default)("Playlists");
},element:"directory"},{id:16,typeString:"playlistFolder",title:function(){return n.i(h.default)("Playlist")},plural:function(){return n.i(h.default)("Playlists")},element:"directory",child:15},{id:1001,typeString:"userPlaylistItem",title:function(){return n.i(h.default)("Clip")},plural:function(){return n.i(h.default)("Clips")},element:"video"}]);t.a=l()({},g,{getRelatedMediaTypes:i,getLibraryType:a,getChildMediaType:r,typeHasChildMedia:s})},,function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(580),s=n.n(r),o=n(27),l=new s.a(!1,"",!0),c=["Directory","Video","Track","Photo","Playlist"],u=a.a.reduce(c,function(e,t){
return e[t]="Metadata",e},{}),d={parseType:function(e,t,n){var i=this.getByType("parse",e,this._parseTypeMap);return i?i(t,n):t},stringifyType:function(e,t,n){if(a.a.isString(t))return t;if(null==t)return"";var i=this.getByType("stringify",e,this._stringifyTypeMap);return i?i(t,n):t},getByType:function(e,t,n){if(n&&a.a.has(n,t))return n[t];var i=t.charAt(0).toUpperCase()+t.slice(1),r=e+i;return a.a.has(this,r)?(n[t]=this[r],this[r]):void 0},parseBoolean:function(e){return 1===Number(e)||"true"===e;
},stringifyBoolean:function(e){return e?"1":"0"},parseInteger:function(e){return null==e||""===e?0:parseInt(e,10)},parseFloat:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return null==e||""===e?0:parseFloat(e)}),parseString:function(e){return null==e?"":e.toString()},parseEncodedString:function(e){if(null==e)return"";try{return decodeURIComponent(e)}catch(t){return o.a.warn("[Parser] Unable to parse encoded string"),e}},
parseArray:function(e){return e?a.a.isArray(e)?e:[e]:[]},parseList:function(e){return e?a.a.isArray(e)?e:e.split(","):[]},stringifyList:function(e){return e.join(",")},parseQueryString:function(e,t){if(t||(t={}),a.a.isObject(e))return e;if(!a.a.isString(e))return{};if(e=e.trim().replace(/^(\?|#)/,""),!e)return{};var n=t.separator||"&";return a.a.reduce(e.split(n),function(e,t){var n=t.split("="),i=n[0],a=n[1];try{i=decodeURIComponent(i),a=void 0===a?null:decodeURIComponent(a),e.hasOwnProperty(i)?Array.isArray(e[i])?e[i].push(a):e[i]=[e[i],a]:e[i]=a;
}catch(e){o.a.warn("[Parser] Unable to decode query string at "+i)}return e},{})},stringifyQueryString:function(e,t){t||(t={});var n=t.separator||"&",i=a.a.map(a.a.keys(e),function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])});return i.join(n)},parseJSON:function(e){try{return JSON.parse(e)}catch(n){var t=a.a.isString(e)?e.substring(0,50):"no response";return o.a.warn("[Parser] Unable to parse JSON: "+n.message+" ("+t+")"),{}}},parseXML:function(e){var t=l.parseXmlString(e);if(!t)return o.a.warn("[Parser] No XML document created"),
{};if(t.getElementsByTagName("parsererror").length)return o.a.warn("[Parser] Errors found while parsing XML document"),{};try{return l.xml2json(t)}catch(e){return o.a.warn("[Parser] Unable to parse XML: "+e.message),{}}},replaceXMLElementNames:function(e,t,n){a.a.isArray(t)||(t=[t]);var i=t.join("|"),r=new RegExp("<("+i+")","g"),s=new RegExp("</("+i+")>","g");return e=e.replace(r,"<"+n+' elementName="$1"'),e=e.replace(s,"</"+n+">")},replaceMetadataXMLElementNames:function(e){return this.replaceXMLElementNames(e,c,"Metadata");
},splitChildren:function(e){if(!e||!e._children)return e;var t=a.a.clone(e),n=t._children;return a.a.isArray(n)&&(n.forEach(function(e){var n=e._elementType;if(e._elementType=null,e.elementName=n,n){var i=u[n]||n,r=t[i],s=this.splitChildren(e);r?a.a.isArray(r)?r.push(s):t[i]=[r,s]:t[i]=s}}.bind(this)),t._children=null),t},reset:function(){this._parseTypeMap={json:this.parseJSON,xml:this.parseXML},this._stringifyTypeMap={}}};d.reset(),t.a=d},function(e,t,n){"use strict";function i(e,t){var n=r.a.invert(e);
return r.a.reduce(e,function(e,i){return e[i]=t[n[i]],e},{})}var a=n(2),r=n.n(a),s=n(34),o={playing:"playing",paused:"paused",stopped:"paused",error:"paused",buffering:"playing"},l=s.a.extend({types:{VIDEO:"video",MUSIC:"music",PHOTO:"photo"},elements:{VIDEO:"video",MUSIC:"audio",PHOTO:"photo"},streams:{VIDEO:"video",MUSIC:"audio",PHOTO:"photo"},states:{STOPPED:"stopped",PAUSED:"paused",PLAYING:"playing",BUFFERING:"buffering",ERROR:"error"},slideshowStates:{PLAYING:"playing",PAUSED:"paused"},castStates:{
ERROR:"IDLE",STOPPED:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING",BUFFERING:"BUFFERING"},mediaStates:{LOADING:"LOADING",BUFFERING:"BUFFERING",READY:"READY",ERROR:"ERROR"},initialize:function(){this.typeByElement=i(this.elements,this.types),this.elementByType=i(this.types,this.elements),this.typeByStream=i(this.streams,this.types),this.streamByType=i(this.types,this.streams),this.statebyCastState=i(this.castStates,this.states),this.castStateByState=i(this.states,this.castStates)},getTypeByElement:function(e){
return this.typeByElement[e]},getElementByType:function(e){return this.elementByType[e]},getTypeByStream:function(e){return this.typeByStream[e]},getStreamByType:function(e){return this.streamByType[e]},getStateByCastState:function(e){return this.statebyCastState[e]},getCastStateByState:function(e){return this.castStateByState[e]},getSlideshowStateByState:function(e){return o[e]}}),c=new l;t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(10),s=r.a.CollectionView.extend({appendHtml:function(e,t,n){
return this.sorted?this.sortedAppendHtml.apply(this,arguments):this.reversed?this.reversedAppendHtml.apply(this,arguments):r.a.CollectionView.prototype.appendHtml.apply(this,arguments)},sortedAppendHtml:function(e,t,n){if(e.isBuffering){var i=e.elBuffer.childNodes;i.length<=n?e.elBuffer.appendChild(t.el):e.elBuffer.insertBefore(t.el,i[n]),e._bufferedChildren.push(t)}else{var a=e.itemViewContainer?e.$(e.itemViewContainer):e.$el,r=a.children();r.size()<=n?a.append(t.el):r.eq(n).before(t.el)}},reversedAppendHtml:function(e,t,n){
if(e.isBuffering)e.elBuffer.insertBefore(t.el,e.elBuffer.firstChild),e._bufferedChildren.push(t);else{var i=e.itemViewContainer?e.$(e.itemViewContainer):e.$el;i.prepend(t.el)}},measureList:function(){if(this.children.length){var e=this.children._views,t=e[a.a.first(a.a.keys(e))];a.a.defer(a.a.bind(function(){this.itemWidth=t.$el.outerWidth(!0),this.itemHeight=t.$el.outerHeight(!0),this.itemMarginRight=parseInt(t.$el.css("margin-right"),10),this.itemMarginBottom=parseInt(t.$el.css("margin-bottom"),10),
this.triggerMethod("measure",this)},this))}},getViewForModel:function(e){var t=this.children._indexByModel[e.cid];return this.children._views[t]},reorder:function(){var e=this.children,t=this.collection.models,n=a.a.map(t,function(t,n){var i=e.findByModel(t);return i._index=n,i.el});this.$el.append(n)},onCollectionRendered:function(){this.measure&&this.measureList()}});t.a=s},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.containerClassName,a=e.labelClassName,s=e.size,o=e.label,u=l()(t,h.a[s]);
return o?r()("div",{className:l()(i,h.a.spinnerContainer)},void 0,r()("div",{className:u}),r()("div",{className:l()(a,h.a.spinnerLabel)},void 0,o)):r()("div",{className:u,"aria-label":n.i(c.default)("Loading")})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(28)),l=n.n(o),c=n(4),u=n(23),d=n(2383),h=n.n(d);i.defaultProps={size:u.d.MEDIUM},t.a=i},function(e,t,n){"use strict";var i=n(2785),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(50),u=c.a.extend({className:"confirm-modal modal modal-sm fade",template:a.a,
ui:{doubleConfirmMessage:".double-confirm-message",confirmBtn:".confirm-btn",confirmLabel:".confirm-btn .btn-label"},events:s.a.extend({"click .confirm-btn":"onConfirm"},c.a.prototype.events),whitelistedOptions:["title","message","confirmLabel","cancelLabel","hasDanger","hideCancel"],initialize:function(e){c.a.prototype.initialize.apply(this,arguments),this.async=e.async,this.data=s.a.pick(e,this.whitelistedOptions),this.promise=l.a.Deferred()},serializeData:function(){return s.a.defaults(this.data,{
confirmLabel:"Yes",cancelLabel:"No"})},onRender:function(){c.a.prototype.onRender.apply(this,arguments),setTimeout(s.a.bind(function(){this.ui.confirmBtn.focus()},this),this.focusDelay)},onHide:function(e){c.a.prototype.onHide.apply(this,arguments),this.promise.reject()},onConfirm:function(e){if(e.preventDefault(),this.options.requireDoubleConfirm&&!this.hasConfirmedOnce){this.hasConfirmedOnce=!0;var t=this.options.doubleConfirmMessage,n=this.options.doubleConfirmLabel;return t&&this.ui.doubleConfirmMessage.text(t),
void(n&&this.ui.confirmLabel.text(n))}this.promise.resolve(),this.async?this.ui.confirmBtn.addClass("active"):this.hide()}});t.a=u},,function(e,t,n){"use strict";function i(e,t){s.a.isArray(t)?s.a.each(t,e):e(t)}function a(e){return s.a.reduce(e,function(e,t){var n=t.split("="),i=n[0],a=n[1];try{i=decodeURIComponent(i),a=void 0===a?null:decodeURIComponent(a),e.hasOwnProperty(i)?Array.isArray(e[i])?e[i].push(a):e[i]=[e[i],a]:e[i]=a}catch(e){c.a.warn("Unable to decode query string at "+i)}return e},{});
}var r=n(2),s=n.n(r),o=n(580),l=n.n(o),c=n(27),u=new l.a(!1,"",!0),d={parseXML:function(e){if(!e)return{};var t=u.parseXmlString(e);if(!t)return c.a.warn("parseXML: No XML document created"),{};if(t.getElementsByTagName("parsererror").length)return c.a.warn("parseXML: Errors found while parsing XML document"),{};try{return u.xml2json(t)}catch(e){return c.a.warn("parseXML: Unable to parse XML: "+e.message),{}}},replaceXMLElementNames:function(e,t,n){s.a.isArray(t)||(t=[t]);var i=t.join("|"),a=new RegExp("<("+i+")","g"),r=new RegExp("</("+i+")>","g");
return e=e.replace(a,"<"+n+' elementName="$1"'),e=e.replace(r,"</"+n+">")},parseEncodedString:function(e,t){function n(t){if(e.hasOwnProperty(t)){var n=e[t];if(null==n)e[t]="";else try{e[t]=decodeURIComponent(n)}catch(e){}}}e&&i(n,t)},parseInteger:function(e,t){function n(t){if(e.hasOwnProperty(t)){var n=e[t];null==n||""===n?e[t]=0:e[t]=parseInt(n,10)}}e&&i(n,t)},parseFloat:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,t){
function n(t){if(e.hasOwnProperty(t)){var n=e[t];null===n||""===n?e[t]=0:e[t]=parseFloat(n)}}e&&i(n,t)}),parseBoolean:function(e,t){function n(t){if(e.hasOwnProperty(t)){var n=e[t];e[t]=1===Number(n)||"true"===n}}e&&i(n,t)},parseArray:function(e,t){function n(t){if(e.hasOwnProperty(t)){var n=e[t];s.a.isArray(n)||(e[t]=[n])}else e[t]=[]}e&&i(n,t)},parseQueryString:function(e,t,n){function r(t){if(e.hasOwnProperty(t)){var i=e[t];if(!s.a.isObject(i))return s.a.isString(i)&&(i=i.trim().replace(/^(\?|#)/,""))?void(e[t]=a(i.split(n))):void(e[t]={});
}}e&&(n||(n="&"),i(r,t))}};t.a=d},,,function(e,t,n){"use strict";function i(e){var t={},n=c.a.result(e,"responseType");return n&&n.accept&&(t.Accept=n.accept),t}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(2),c=n.n(l),u=n(208),d=n.n(u),h=n(34),p=n(20),f=n(1096),g=d.a.noConflict(),m=g.sync;g.sync=function(e,t,n){var a=n.url,s=n.data,l=n.headers,u=o()(n,["url","data","headers"]),d=u.server||t.server||t,h=a||c.a.result(t,"syncUrl")||c.a.result(t,"url"),f=c.a.isObject(s)?p.stringifyParams(s):s,g=r()({data:f,
dataType:"text",processData:!1,headers:c.a.extend(i(t),l),timeout:f&&f.indexOf("checkFiles=1")>-1?6e4:15e3},u);return c.a.isFunction(d.getXHROptions)?(g=d.getXHROptions(h,g),"cloudsync"===d.get("platform")&&(g.url=p.join(g.url,{redirect:0}))):g.url=h,m(e,t,g)},g.wrapError=function(e,t){var n=t.error;t.error=function(i){n&&n(e,i,t),e.trigger("error",e,i,t)}},c.a.extend(g.View.prototype,f.a),g.Model.extend=h.a.extend,g.Collection.extend=h.a.extend,g.Router.extend=h.a.extend,g.View.extend=h.a.extend,
g.History.extend=h.a.extend,t.a=g},function(e,t,n){"use strict";var i=n(1);n.n(i);n.d(t,"c",function(){return a}),n.d(t,"b",function(){return r}),n.d(t,"a",function(){return s}),n.d(t,"d",function(){return o});var a="library",r="continueWatching",s="prePlay",o="search";i.PropTypes.oneOf([a,r,s,o])},function(e,t,n){"use strict";var i=n(119),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(4),u=n(44),d=n(38),h=n(20),p=n(329),f=n(128),g=n(36),m=n(88),v=n(261),y=n(67),b=n(65),S=n(151),w=n(16),M=n(57),I=n(18),C=n(254),D=n(1134),T=n(1123),x=n(637),P=n(1125),E=I.a.extend({
name:"MetadataModel",context:["server","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey","relatedOptions"],responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:y.b,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(b.a)(this.entityType,e.key||this.cid,this.server.entityID())},idAttribute:"ratingKey",rootPropertyName:"Metadata",cache:new S.a,mergeStrategy:D.a,
url:function(){return this.get("key")},urlRoot:function(){return this.get("key")},cacheKey:function(e){this.isLibraryItem(this.identifier,e.key)||(e=this.normalizeChannelKey(e));var t=this.extractChildrenKey(e.key);return this.server&&this.server.getScopedKey(t.key)},sessionAttrs:{indirectHttpHeaders:w.a.object},syncedAttrs:{elementName:w.a.string,ratingKey:w.a.string,parentRatingKey:w.a.string,grandparentRatingKey:w.a.string,key:w.a.string,childrenKey:w.a.string,parentKey:w.a.string,grandparentKey:w.a.string,
primaryExtraKey:w.a.string,guid:w.a.string,librarySectionID:w.a.string,librarySectionUUID:w.a.string,librarySectionKey:w.a.string,type:w.a.string,title:w.a.string,titleSort:w.a.string,originalTitle:w.a.string,parentTitle:w.a.string,grandparentTitle:w.a.string,year:w.a.string,tagline:w.a.string,summary:w.a.string,studio:w.a.string,contentRating:w.a.string,originallyAvailableAt:w.a.string,thumb:w.a.string,parentThumb:w.a.string,grandparentThumb:w.a.string,banner:w.a.string,art:w.a.string,parentArt:w.a.string,
grandparentArt:w.a.string,theme:w.a.string,parentTheme:w.a.string,grandparentTheme:w.a.string,chapterSource:w.a.string,ratingImage:w.a.string,audienceRating:w.a.float,audienceRatingImage:w.a.string,metadataState:w.a.string,mediaState:w.a.string,rating:w.a.float,userRating:w.a.float,index:w.a.integer,parentIndex:w.a.integer,absoluteIndex:w.a.integer,duration:w.a.integer,viewOffset:w.a.integer,viewCount:w.a.integer,childCount:w.a.integer,leafCount:w.a.integer,viewedLeafCount:w.a.integer,ratingCount:w.a.integer,
extraType:w.a.integer,lastViewedAt:w.a.integer,addedAt:w.a.integer,updatedAt:w.a.integer,deletedAt:w.a.integer,url:w.a.string,playlistID:w.a.integer,playlistType:w.a.string,smart:w.a.boolean,composite:w.a.string,durationInSeconds:w.a.integer,skipChildren:w.a.boolean,skipParent:w.a.boolean,subscriptionID:w.a.string,grandparentSubscriptionID:w.a.string,subscriptionType:w.a.string,grandparentSubscriptionType:w.a.string,Channel:w.a.array,Media:w.a.array,Collection:w.a.array,Director:w.a.array,Producer:w.a.array,
Writer:w.a.array,Genre:w.a.array,Mood:w.a.array,Country:w.a.array,Label:w.a.array,Role:w.a.array,Location:w.a.array},sessionRelations:{children:function(){return{relationClass:n(82).default}}},syncedRelations:{chapters:{relationClass:T.a,rootPropertyName:"Chapter",deferred:!0},overlays:{relationClass:x.a,rootPropertyName:"Overlay",deferred:!0},preferences:{relationClass:C.a,rootPropertyName:"Preferences",deferred:!0},onDeck:function(){return{relationClass:E,rootPropertyName:"OnDeck",deferred:!0}},
related:function(){var e={skipCache:!0};return this.relatedOptions&&s.a.extend(e,this.relatedOptions),{relationClass:n(146).default,rootPropertyName:"RelatedHubs",deferred:!0,options:e}},popularLeaves:function(){return{relationClass:n(82).default,rootPropertyName:"PopularLeaves",deferred:!0}},extras:function(){return{relationClass:n(82).default,rootPropertyName:"Extras",deferred:!0,attrs:function(e){return{containerKey:h.join([e.key,"extras"])}}}},concerts:{relationClass:P.a,rootPropertyName:"Concert",
deferred:!0}},derivedAttrs:{identifier:function(){return this.identifier},mediaTagPrefix:function(){return this.mediaTagPrefix},mediaTagVersion:function(){return this.mediaTagVersion},allowSync:function(){return this.allowSync},containerKey:function(){return this.containerKey},isLibraryItem:function(){return this.isLibraryItem(this.get("identifier"),this.get("key"))},isPlaylist:function(){var e=g.a.get("playlist"),t=e.typeString;return this.get("type")===t},isFolder:function(){return/\/folder\?parent\=/.test(this.get("key"));
},isExtra:function(){return!!this.get("extraType")},unviewedLeafCount:function(){var e=this.get("leafCount"),t=this.get("viewedLeafCount");if(e)return e-t},downloadUrl:function(){var e=this,t=this.get("Media");if(t&&1===t.length){var n=function(){var n=s.a.first(s.a.first(t).Part),i=n&&n.key;if(i)return{v:function(){var t=h.join(i,{download:1});return e.server.resolveUrl(t,{appendToken:!0})}}}();if("object"===("undefined"==typeof n?"undefined":a()(n)))return n.v}}},defaults:{rating:0,Media:[],Collection:[],
Director:[],Producer:[],Writer:[],Genre:[],Mood:[],Country:[],Label:[],Role:[],Location:[]},initialize:function(){this.setChildrenKey(this.get("childrenKey")),this.on("socket:timeline",this.onSocketTimeline,this),this.on("change:childrenKey",this.onChildrenKeyChange,this)},uninitialize:function(){this.off("socket:timeline",this.onSocketTimeline,this),this.off("change:childrenKey",this.onChildrenKeyChange,this),this.stopListening()},fetch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
return e.data&&(this._populatedParams=s.a.extend({},this._populatedParams,e.data)),e.usePopulatedParams&&(e.data=this._populatedParams),I.a.prototype.fetch.call(this,e)},augmentResponseText:function(e,t){return t===M.a.xml?d.a.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e,t){var n=this;this.responseContext.forEach(function(t){var i=e[t];void 0!==i&&n.setContext(t,i)});var i=e[this.rootPropertyName];i&&(i.librarySectionID=e.librarySectionID,i.librarySectionUUID=e.librarySectionUUID);
var a=i||e,r=a.Related,o=a.OnDeck,l=a.Preferences,c=this.extractChildrenKey(a.key);return c.childrenKey&&(a.childrenKey=c.childrenKey,a.key=c.key),t===M.a.xml&&(a.Media=this.convertMediaItems(a.Media)),r&&(a.RelatedHubs=s.a.compact([].concat(r.Hub,r.Metadata))),o&&(a.OnDeck=o.Metadata),l&&(a.Preferences=l.Setting),this.normalize(a)},extractChildrenKey:function(e){var t=/(.*)\/(children|items)$/.exec(e),n=void 0;return t&&(n=e,e=t[1]),{childrenKey:n,key:e}},setChildrenKey:function(e){e&&("album"===this.get("type")&&(e=h.join(e,{
includeRelated:1})),this.get("children").set("containerKey",e))},convertMediaItems:function(e){var t=d.a.parseArray(e);return s.a.each(t,function(e){u.a.parseBoolean(e,["indirect","optimizedForStreaming","premium","premiere","selected"]),u.a.parseInteger(e,["id","duration","width","height","bitrate","audioChannels","proxyType","beginsAt","endsAt","beginOffset","startOffsetSeconds","endOffsetSeconds"]),u.a.parseArray(e,"Part"),s.a.each(e.Part,function(e){null!=e.exists&&(e.exists=d.a.parseBoolean(e.exists)),
null!=e.accessible&&(e.accessible=d.a.parseBoolean(e.accessible)),u.a.parseInteger(e,["id","duration","size"]),u.a.parseBoolean(e,"optimizedForStreaming"),u.a.parseEncodedString(e,"file"),u.a.parseArray(e,"Stream"),s.a.each(e.Stream,function(e){u.a.parseBoolean(e,["selected","default","forced","timed","cabac","hasScalingMatrix","headerStripping"]),u.a.parseInteger(e,["id","index","streamType","duration","width","height","bitrate","bitDepth","level","refFrames","samplingRate","channels","minLines"]),
u.a.parseFloat(e,"frameRate")})})}),this.addNoneSubtitlesStreams(t)},addNoneSubtitlesStreams:function(e){var t=m.a.get("subtitles");return s.a.each(e,function(e){var i=s.a.first(e.Part);if(i&&i.Stream&&n.i(p.a)(e)){var a=n.i(f.a)(e,{streamType:t.id,selected:!0}),r={id:0,streamType:t.id,language:n.i(c.default)("None")};a.length||(r.selected=!0),i.Stream.unshift(r)}}),e},normalize:function(e){return this.isLibraryItem(this.identifier,e.key)?e=this.normalizeType(e):(e=this.normalizeChannelKey(e),e=this.normalizeChannelType(e),
e=this.normalizeChannelMetadata(e)),e},normalizeType:function(e){return"photo"===e.type&&e.childrenKey&&(e.type="photoalbum"),e},normalizeChannelKey:function(e){var t=e.key&&e.key.split("/");return t&&(1===t.length&&this.containerKey&&(e.hasInvalidKey=!0,e.originalKey=e.key,e.key=this.containerKey+"/"+e.key),e.ratingKey||(e.ratingKey=e.originalKey||e.key)),e},normalizeChannelType:function(e){return e.type||(e.mediaType?e.type=e.mediaType:e.elementName&&(e.type=e.elementName.toLowerCase())),/image/i.test(e.type)&&(e.type="photo"),
g.a.get(e.type)||(e.type="channelDirectory"),e},normalizeChannelMetadata:function(e){return e.label?e.title=e.label:e.artist&&(e.track?(e.title=e.track,e.originalTitle=e.artist,e.parentTitle=e.album,e.grandparentTitle=e.albumArtist):e.album?(e.title=e.album,e.parentTitle=e.artist):e.title=e.artist),e.totalTime&&(e.duration=e.totalTime),e},refreshChildren:function(){var e=this.get("children");e&&e.populatePromise&&e.fetch().always(function(){e.get("metadataItems").invoke("refreshChildren")})},resolveIndirect:function(e,t){
var n=this,i=l.a.Deferred();if(!e||!t)return i.reject(this).promise();if(!e.indirect)return i.resolve(this).promise();if(t.postURL){var a=s.a.find([this.server,this.server.parent.get("primaryServer")],function(e){return e&&e.get("isConnected")&&e.get("isFullServer")&&!e.get("activeConnection").get("isPossiblyCrossNetworkProtected")});if(a)return this.resolvePostUrl(e,t,a)}var r=t.key;this.server.get("isCloud")&&(r=this.server.swizzleNodeUrl(r));var o=l.a.ajax(this.server.getXHROptions(r));return o.done(function(a){
n.mergeIndirectResponse(a,e,t)?i.resolve(n):i.reject(n)}),o.fail(function(){i.reject(n)}),i.promise()},resolvePostUrl:function(e,t,n){var i=this,a=l.a.Deferred(),r=t.key,s=t.postURL,o=n.getXHROptions("/system/proxy");o.headers=o.headers||{},o.headers["X-Plex-Url"]=s;var c=l.a.ajax(o);return c=c.then(function(e,t,n){var a=h.join(r,{postURL:s});i.server.get("isCloud")&&(a=i.server.swizzleNodeUrl(a));var o=i.server.getXHROptions(a);return o.type="POST",o.headers=o.headers||{},o.data=n.getAllResponseHeaders()+"\r\n"+e,
l.a.ajax(o)}),c.done(function(n,r,s){i.mergeIndirectResponse(n,e,t)?a.resolve(i):a.reject(i)}),c.fail(function(){a.reject(i)}),a.promise()},mergeIndirectResponse:function(e,t,n){var i=d.a.parseXML(d.a.replaceMetadataXMLElementNames(e));if(!(i&&i.Metadata&&i.Metadata.Media&&i.Metadata.Media.Part))return!1;var a=s.a.first(this.convertMediaItems(i.Metadata.Media)),r=d.a.parseArray(a.Part),o=s.a.first(r);if(!a||!o)return!1;if(a.indirect=!1,s.a.extend(t,s.a.omit(a,"Part")),s.a.extend(n,o),r.length>1){
var l;(l=t.Part).push.apply(l,r.slice(1))}if(i.httpHeaders){for(var c,u=new RegExp("([^=]+)=([^&]+)&?","g"),h={};c=u.exec(i.httpHeaders);)c[1]in h?(s.a.isArray(h[c[1]])||(h[c[1]]=[h[c[1]]]),h[c[1]].push(c[2])):h[c[1]]=c[2];this.set("indirectHttpHeaders",h)}return!0},batchAdd:function(e,t,n){var i=s.a.map(e,function(e){return e.get("ratingKey")}),a=h.join(["/library/metadata",i.join(","),t,"add"],{tag:n}),r=this.server.getXHROptions(a,{type:"PUT"});return l.a.ajax(r)},getDownloadUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.get("Media")[e];
if(t){var n=s.a.first(t.Part),i=n&&n.key;if(i){var a=h.join(i,{download:1});return this.server.resolveUrl(a,{appendToken:!0})}}},getFilepath:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.get("Media")[e];if(t){var n=s.a.first(t.Part);if(n)return n.file}},getLocation:function(){var e=this.get("Location");return e.length?s.a.first(e).path:this.getFilepath()},getMediaKey:function(){var e=s.a.first(this.get("Media"));if(e){var t=s.a.first(e.Part);if(t)return t.key}return this.get("key");
},isLibraryItem:function(e,t){return e?"com.plexapp.plugins.library"===e:/^(\/sync\/[\w\d-\/]*)?\/library\//.test(t)},isPlexMusicItem:function(){var e=this.section;return e&&"com.plexapp.agents.plexmusic"===e.get("agent")},onSocketTimeline:function(e){e.state===v.a.PROCESSED?(this.fetch({data:{skipRefresh:1},usePopulatedParams:!0}),this.refreshChildren()):e.state===v.a.DELETED&&this.trigger("destroy",this,this.collection)},onChildrenKeyChange:function(e,t){this.setChildrenKey(t)}});t.a=E},function(e,t,n){
"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(8),c=0,u=[],d=o.a.Layout.extend({className:"modal fade",focusDelay:500,animationDelay:500,events:{"hide.bs.modal":"onHide"},initialize:function(e){this.once("render",function(){c+=1,l.a.trigger("anyModalOpen")}),this.once("close",function(){c-=1,0===c&&l.a.trigger("allModalsClosed")})},hide:function(){this.isClosed||this.isHidden||this.$el.modal("hide")},onRender:function(){this.rerender||(this.isForced?this.$el.modal({backdrop:"static",
keyboard:!1}):(this.listenTo(l.a,"shortcut:escape",a.a.bind(function(){u[0]===this&&this.hide()},this)),this.listenToOnce(this,"close",function(){var e=u.indexOf(this);e!==-1&&u.splice(e,1)}),u.unshift(this),this.$el.modal()),s()(":focus").blur())},onHide:function(e){this.isHidden=!0,a.a.each(this.panes,function(e,t){var n=e.constructor.onModalClose;n&&n.apply(this)},this),setTimeout(a.a.bind(function(){l.a.trigger("hide:modal",this),this.trigger("close")},this),this.animationDelay)}});t.a=d},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.children,i=e.kind,a=e.size,s=o()(e,["className","children","kind","size"]);return c.a.createElement(p.a,r()({className:d()(t,g.a.button,g.a[i],g.a[a])},s),n)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(28),d=n.n(u),h=n(23),p=n(26),f=n(2385),g=n.n(f);i.defaultProps={kind:h.c.DEFAULT,size:h.d.MEDIUM},t.a=i},function(e,t,n){"use strict";var i=n(119),a=n.n(i),r=n(2),s=n.n(r),o=/\s+/,l=function(e,t,n,i){if(!n)return!0;if("object"===("undefined"==typeof n?"undefined":a()(n))){
for(var r in n)e[t].apply(e,[r,n[r]].concat(i));return!1}if(o.test(n)){for(var s=n.split(o),l=0,c=s.length;l<c;l++)e[t].apply(e,[s[l]].concat(i));return!1}return!0},c=function(e,t){var n,i=-1,a=e.length,r=t[0],s=t[1],o=t[2];switch(t.length){case 0:for(;++i<a;)(n=e[i]).callback.call(n.ctx);return;case 1:for(;++i<a;)(n=e[i]).callback.call(n.ctx,r);return;case 2:for(;++i<a;)(n=e[i]).callback.call(n.ctx,r,s);return;case 3:for(;++i<a;)(n=e[i]).callback.call(n.ctx,r,s,o);return;default:for(;++i<a;)(n=e[i]).callback.apply(n.ctx,t);
}},u={on:function(e,t,n){if(!l(this,"on",e,[t,n])||!t)return this;this._events||(this._events={});var i=this._events[e]||(this._events[e]=[]);return i.push({callback:t,context:n,ctx:n||this}),this},once:function e(t,n,i){if(!l(this,"once",t,[n,i])||!n)return this;var a=this,e=s.a.once(function(){a.off(t,e),n.apply(this,arguments)});return e._callback=n,this.on(t,e,i)},off:function(e,t,n){var i,a,r,o,c,u,d,h;if(!this._events||!l(this,"off",e,[t,n]))return this;if(!e&&!t&&!n)return this._events=void 0,
this;for(o=e?[e]:s.a.keys(this._events),c=0,u=o.length;c<u;c++)if(e=o[c],r=this._events[e]){if(this._events[e]=i=[],t||n)for(d=0,h=r.length;d<h;d++)a=r[d],(t&&t!==a.callback&&t!==a.callback._callback||n&&n!==a.context)&&i.push(a);i.length||delete this._events[e]}return this},trigger:function(e){if(!this._events)return this;var t=[].slice.call(arguments,1);if(!l(this,"trigger",e,t))return this;var n=this._events[e],i=this._events.all;return n&&c(n,t),i&&c(i,arguments),this},stopListening:function(e,t,n){
var i=this._listeningTo;if(!i)return this;var r=!t&&!n;n||"object"!==("undefined"==typeof t?"undefined":a()(t))||(n=this),e&&((i={})[e._listenId]=e);for(var o in i)e=i[o],e.off(t,n,this),(r||s.a.isEmpty(e._events))&&delete this._listeningTo[o];return this},hasListener:function(e){var t=this._events&&this._events[e];return s.a.isArray(t)&&t.length>0}},d={listenTo:"on",listenToOnce:"once"};s.a.each(d,function(e,t){u[t]=function(t,n,i){var r=this._listeningTo||(this._listeningTo={}),o=t._listenId||(t._listenId=s.a.uniqueId("l"));
return r[o]=t,i||"object"!==("undefined"==typeof n?"undefined":a()(n))||(i=this),t[e](n,i,this),this}}),u.bind=u.on,u.unbind=u.off,t.a=u},function(e,t,n){"use strict";function i(e,t){var n="function"==typeof t;return function(){var i=n?t.apply(void 0,arguments):arguments[0];return{type:e,payload:i}}}n(33);t.a=i},function(e,t,n){"use strict";var i=n(269),a=n(331),r=n(105),s=r.a.extend({background:!0,setup:function(e){this.minSize=!0,this.type=e.type,this.modelAttribute=e.modelAttribute||"thumb",e.placeholder!==!1&&(this.model&&this.model.get("isFolder")?this.placeholderClass=a.a.folder:e.placeholderClass||(this.placeholderClass=a.a[this.type])),
r.a.prototype.setup.apply(this,arguments)},setDimensions:function(e){e.width?e.height=i.a.getPosterHeight(this.type,e.width):e.height&&(e.width=i.a.getPosterWidth(this.type,e.height)),r.a.prototype.setDimensions.call(this,e)},setModel:function(e,t){r.a.prototype.setModel.apply(this,arguments),this.model&&this.model.get("isFolder")&&(this.placeholderClass=a.a.folder)}});t.a=s},function(e,t,n){"use strict";var i=n(119),a=n.n(i),r=n(2),s=n.n(r),o=n(47),l=n(5),c=n.n(l),u=n(44),d=n(33),h=n(20),p=n(151),f=n(316),g=o.a.Model.extend({
mixins:[f.a],cache:new p.a,constructor:function(e,t){e||(e={}),t||(t={}),this.server=this.findOption(t,"server"),this.section=this.findOption(t,"section"),this.channel=this.findOption(t,"channel"),this.device=this.findOption(t,"device"),this.parent=this.findOption(t,"parent");var n=this.findOption(t,"skipCache");if(n)return void o.a.Model.prototype.constructor.apply(this,arguments);var i=this.cache.getItemCacheKey(this,e),a=this.cache.get(i);if(a)return t.parse&&(e=a.parse(e)),this.preserveCachedAttributes&&this.preserveCachedAttributes(t.url)?s.a.each(e,function(e,t){
s.a.isUndefined(a.get(t))&&!s.a.isUndefined(e)&&a.set(t,e)}):a.set(e),a.server=this.server||a.server,a.section=this.section||a.section,a.channel=this.channel||a.channel,a.device=this.device||a.device,a.parent=this.parent||a.parent,t.collection&&(a.collection=t.collection),a;var r=this.findOption(t,"onlyIfCached");return r?{}:(o.a.Model.prototype.constructor.apply(this,arguments),void this.cache.store(this,i))},findOption:function(e,t){return e[t]||e.collection&&e.collection[t]},clone:function(){var e={
server:this.server,section:this.section,channel:this.channel,parent:this.parent,skipCache:!0};return new this.constructor(this.attributes,e)||null},convert:function(e){var t=s.a.isObject(e)?e:u.a.parseXML(e);return t},parse:function(e,t){var n=this.convert(e);return this.whitelistedAttrs&&(n=s.a.pick(n,this.whitelistedAttrs)),n},save:function(e,t,n){var i,r,l,u=this.attributes;null==e||"object"===("undefined"==typeof e?"undefined":a()(e))?(i=e,n=t):(i={})[e]=t,n=s.a.extend({validate:!0},n);var d=this.getSaveParams(i,n);
if(s.a.extend(d,n.data),i&&!n.wait){if(!this.set(i,n))return!1}else if(!this._validate(i,n))return!1;if(i&&n.wait&&(this.attributes=s.a.extend({},u,i)),s.a.isEmpty(d)&&!n.force)return n.success&&n.success(this),c.a.Deferred().resolve(this);void 0===n.parse&&(n.parse=!0);var p=this,f=n.success;n.success=function(e){if(p.attributes=u,e){var t=p.parse(e,n);if(n.wait&&(t=s.a.extend(i||{},t)),s.a.isObject(t)&&!p.set(t,n))return!1;p.cache.store(p)}f&&f(p,e,n),p.trigger("sync",p,e,n)},o.a.wrapError(this,n),
r=this.isNew()?"create":n.patch?"patch":"update","patch"===r&&(n.attrs=i);var g=s.a.result(this,"saveUrl")||s.a.result(this,"url");return s.a.isEmpty(d)||(n.url=h.join(g,d)),n.data="",l=this.sync(r,this,n),i&&n.wait&&(this.attributes=u),l},getSaveParams:function(e,t){return this.isNew()?e||this.toJSON():this.changedAttributes(e)||{}},getScopedKey:function(e){return null!=e&&s.a.isFunction(this.cacheKey)?this.cacheKey(this.attributes)+"!"+e:e},restoreDefaults:function(e){var t=s.a.result(this,"defaults");
if(!t)return this.clear(e);var n,i=this.attributes;for(n in i)n in t||this.unset(n,e);return this.set(t,e),this},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void n.i(d.a)(!1,"This model is already capturing events");var e=this.set,t={};this.set=function(n,i,r){var o;"object"===("undefined"==typeof n?"undefined":a()(n))?(o=n,r=i):(o={})[n]=i;var l=s.a.extend({},r,{silent:!0}),c=e.call(this,o,l);return s.a.extend(t,this.changed),c},this.releaseCapturedChangeEvents=function(){
s.a.each(t,function(e,t){this.trigger("change:"+t,this,e)},this),s.a.isEmpty(t)||this.trigger("change",this,{}),t={},this.set=e,this.releaseCapturedChangeEvents=null}}});g.extend=function(){var e=o.a.Model.extend.apply(this,arguments);return e.prototype.cache=new p.a,e},t.a=g},,function(e,t,n){"use strict";function i(e,t){t||(t={});var n=r.a.defaults(t,{typeName:e,parse:r.a.bind(s.a.parseType,s.a,e)});return n}var a=n(2),r=n.n(a),s=n(38),o={xml:i("xml"),json:i("json",{accept:"application/json"}),
text:i("text")};t.a=o},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e,t){return e.entities.servers[t]},function(e){return e?{machineIdentifier:e.machineIdentifier,allowSync:e.allowSync,allowMediaDeletion:e.allowMediaDeletion,backgroundProcessing:e.backgroundProcessing,transcoderVideo:e.transcoderVideo,isFullServer:e.isFullServer,isFullOwnedServer:e.isFullOwnedServer}:{}})}function a(e,t){var a=t.serverEntityID,r=o[a];return r||(r=n.i(s.a)(i(),function(e){return e;
}),o[a]=r),r(e,a)}var r=n(9),s=(n.n(r),n(173));t.a=a;var o={}},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(47),s=n(1401).default,o=r.a.Model.extend({defaults:a.a.extend({allowFlash:!1,allowServerUpdates:!1,testPrivateConnectionsWhenPublicAddressDoesNotMatch:!0,allowHttpsMediaServerConnections:!1,allowMediaServerRelayConnections:!1,allowLoopbackDiscovery:!1,allowMixedContent:!1,allowBaseImagePreloading:!0,allowBaseImageBlobs:!0,emulateCNP:!1,heartbeatInterval:1e4,allowManualServers:!1,allowCloudSyncServers:!1,
allowMobileServers:!1,maximumConcurrentConnectionTests:5,shouldCreateFlexModels:!1,shouldCreateStateTree:!1,proxied:!1,requiresSignIn:!0,myPlexScheme:"https",myPlexUrl:"plex.tv",requiresPlexPass:!1,myPlexAccessToken:null,alerts:null,continueUrl:null,primaryServer:null},s,window.PLEXWEB)}),l=new o;t.a=l},function(e,t,n){"use strict";function i(e){return e}var a=n(66);n.n(a),n(180),n(33);t.a=i},function(e,t,n){"use strict";var i=n(32),a={isHostedHttps:"https:"===window.location.protocol,hasConsole:!!(window.console&&window.console.log&&window.console.log.call),
hasWebSocket:!!window.WebSocket,hasEventSource:!!window.EventSource,hasReplaceState:!(!window.history||!window.history.replaceState),hasFileUpload:!!(window.File&&window.FileList&&window.FileReader),hasMediaSource:!(!window.MediaSource&&!window.WebKitMediaSource),hasObjectUrl:function(){var e="ie"===i.a.id&&11===parseInt(i.a.version,10);return!e&&!i.a.presto&&!!(window.URL&&window.URL.createObjectURL&&window.URL.revokeObjectURL)}(),hasBlob:function(){try{return!!new window.Blob}catch(e){return!1}
}(),hasFullscreen:function(){var e=document.createElement("div");return!!(e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen)}(),hasCanvas:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))}(),hasTouchScreen:!!("ontouchstart"in window),hasPageVisibility:function(){return document.hidden===!0||document.hidden===!1}(),hasWebKitPageVisibility:function(){return document.webkitHidden===!0||document.webkitHidden===!1}(),
hasPassiveEventListeners:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}(),hasWebSpeech:!!window.speechSynthesis,isChromeApp:!(!window.chrome||!window.chrome.storage)};t.a=a},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e,t){return e.entities.providers[t]},function(e){return e?{identifier:e.identifier,isLibraryProvider:e.isLibraryProvider,protocols:e.protocols.reduce(function(e,t){
return e[t]=!0,e},{}),features:e.features.reduce(function(e,t){return e[t.type]=!0,e},{})}:{}})}function a(e,t){var a=t.providerEntityID,r=o[a];return r||(r=n.i(s.a)(i(),function(e){return e}),o[a]=r),r(e,a)}var r=n(9),s=(n.n(r),n(664));t.a=a;var o={}},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){var n=t.serverEntityID;return n},r.a,function(e,t){return t[e]})}var a=n(9),r=(n.n(a),n(256));t.a=i},function(e,t){function n(e,t,n){return e!==t?n.fn(this):n.inverse(this);
}e.exports=n},function(e,t,n){"use strict";function i(e,t){if(t){var n=[];n.push(e);for(var i=arguments.length,a=Array(i>2?i-2:0),r=2;r<i;r++)a[r-2]=arguments[r];for(var s=0,o=a.length;s<o;s++){var l=a[s];l&&n.push(l)}return n.push(t),n.join("--")}}t.a=i},function(e,t,n){e.exports={default:n(2225),__esModule:!0}},function(e,t,n){"use strict";n.d(t,"f",function(){return i}),n.d(t,"e",function(){return a}),n.d(t,"g",function(){return r}),n.d(t,"c",function(){return s}),n.d(t,"d",function(){return o;
}),n.d(t,"b",function(){return l}),n.d(t,"i",function(){return c}),n.d(t,"h",function(){return u}),n.d(t,"a",function(){return d});var i="servers",a="providers",r="libraries",s="hubs",o="metadataLists",l="metadataItems",c="sessions",u="userPlaylistItems",d="mediaSubscriptions"},,function(e,t){function n(e){return encodeURIComponent(e||"")}e.exports=n},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(17),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(28),m=n.n(g),v=n(946),y=n.n(v),b=n(945),S=n.n(b),w=n(747),M=n(25),I=n(23),C=n(2381),D=n.n(C),T=function(e){
function t(n,i){l()(this,t);var a=u()(this,e.call(this,n,i));return a.onScroll=function(e){if(e.target===a.refs.scroller){var t=e.target.scrollTop,n=e.target.scrollLeft,i=t!==a._currentScrollTop,r=n!==a._currentScrollLeft;(i||r)&&a._setScrollPosition({scrollTop:t,scrollLeft:n}),a.props.onScroll&&a.props.onScroll(e)}},a.onScrollPositionChange=function(){a._animationFrameID=null,a.props.onScrollPositionChange({scrollTop:a._currentScrollTop,scrollLeft:a._currentScrollLeft})},a.onScrollTimeout=function(){
a.setState({isScrolling:!1})},a.onScrollToUpdate=function(){a._updateScrollPosition(a._scrollToPosition),a.props.onScrollToUpdate&&a.props.onScrollToUpdate(a._scrollToPosition)},a.onScrollToComplete=function(){a._scrollToTween=null,a._scrollToPosition=null,a.props.onScrollToComplete&&a.props.onScrollToComplete()},a.state={isScrolling:!1},a._currentScrollTop=0,a._currentScrollLeft=0,a}return h()(t,e),t.prototype.componentDidMount=function(){this._scrollTo(this.props)},t.prototype.componentWillReceiveProps=function(e){
e.scrollTop===this.props.scrollTop&&e.scrollLeft===this.props.scrollLeft||this.setState({isScrolling:!0})},t.prototype.shouldComponentUpdate=function(e,t){return n.i(M.a)(this,e,t)},t.prototype.componentDidUpdate=function(e){this.state.isScrolling&&(this._scrollTimeoutID&&clearTimeout(this._scrollTimeoutID),this._scrollTimeoutID=setTimeout(this.onScrollTimeout,this.props.isScrollingTimeout)),this._scrollTo(this.props)},t.prototype.componentWillUnmount=function(){this._clearTimeouts(),this._cancelScrollTo();
},t.prototype._setScrollPosition=function(e){var t=e.scrollTop,n=e.scrollLeft;this._clearTimeouts(),this._currentScrollTop=t,this._currentScrollLeft=n,this._animationFrameID=window.requestAnimationFrame(this.onScrollPositionChange)},t.prototype._updateScrollPosition=function(e){var t=e.scrollTop,n=e.scrollLeft;null!=t&&(this.refs.scroller.scrollTop=t),null!=n&&(this.refs.scroller.scrollLeft=n)},t.prototype._scrollTo=function(e){var t=e.scrollTop,n=e.scrollLeft;if(null!=t||null!=n){var i=null!=t&&t!==this._currentScrollTop,a=null!=n&&n!==this._currentScrollLeft;
if(i||a){if(!this.props.smoothScroll)return this._currentScrollTop=t,this._currentScrollLeft=n,void this._updateScrollPosition({scrollTop:t,scrollLeft:n});var r=this.props.smoothScrollDuration/1e3,s={ease:S.a.Power3.easeOut,onUpdate:this.onScrollToUpdate,onComplete:this.onScrollToComplete};this._scrollToPosition={},i&&(s.scrollTop=Math.min(t,this.refs.scroller.scrollHeight-this.refs.scroller.clientHeight),this._scrollToPosition.scrollTop=this.refs.scroller.scrollTop),a&&(s.scrollLeft=Math.min(n,this.refs.scroller.scrollWidth-this.refs.scroller.clientWidth),
this._scrollToPosition.scrollLeft=this.refs.scroller.scrollLeft),this._cancelScrollTo(),this._scrollToTween=y.a.to(this._scrollToPosition,r,s)}}},t.prototype._cancelScrollTo=function(){this._scrollToTween&&(this._scrollToTween.kill(),this._scrollToTween=null)},t.prototype._clearTimeouts=function(){this._animationFrameID&&window.cancelAnimationFrame(this._animationFrameID),this._scrollTimeoutID&&clearTimeout(this._scrollTimeoutID)},t.prototype.render=function(){var e=this,t=this.props,i=t.className,r=t.children,o=t.scrollDirection,l=t.autoScroll,c=t.enableChildrenProps,u=t.onScroll,d=t.onScrollPositionChange,h=s()(t,["className","children","scrollDirection","autoScroll","enableChildrenProps","onScroll","onScrollPositionChange"]);
return f.a.createElement("div",a()({ref:"scroller",className:m()(i,D.a.scroller,D.a[o],l&&D.a.auto),onScroll:d?this.onScroll:u},h),c?n.i(w.a)(r,function(t){return f.a.cloneElement(t,{isScrolling:e.state.isScrolling,scrollTop:e._currentScrollTop,scrollLeft:e._currentScrollLeft})}):r)},t}(p.Component);T.defaultProps={scrollDirection:I.a.VERTICAL,autoScroll:!1,smoothScroll:!0,smoothScrollDuration:400,enableChildrenProps:!1,isScrollingTimeout:100},t.a=T},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.innerClassName,a=e.scrollDirection,s=c()(e,["children","className","innerClassName","scrollDirection"]),l=a!==h.a.NONE;
return n||(n=l?g.a.modalScroller:g.a.modalBody),d.a.createElement(p.a,r()({className:n,scrollDirection:a,autoScroll:!0},s),l?o()("div",{className:i},void 0,t):t)}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(23),p=n(70),f=n(2411),g=n.n(f);i.defaultProps={innerClassName:g.a.innerModalBody},t.a=i},function(e,t,n){"use strict";var i=n(67),a=n(65),r=n(16),s=n(18),o=n(644);n.d(t,"a",function(){return l});var l={LIBRARY_PROVIDER_IDENTIFIER:"com.plexapp.plugins.library",CHANNEL_PROVIDER_IDENTIFIER:"tv.plex.providers.channel",
EPG_IDENTIFIER:/tv\.plex\.providers\.epg\./},c=s.a.extend({name:"ProviderModel",context:["server"],entityType:i.e,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(a.a)(this.entityType,e.identifier,this.server.entityID())},idAttribute:"identifier",rootPropertyName:"MediaProvider",syncedAttrs:{identifier:r.a.string,title:r.a.string,types:r.a.list,protocols:r.a.list,subscriptions:r.a.boolean},syncedRelations:{features:{relationClass:o.a,rootPropertyName:"Feature",
options:function(){return{provider:this}}}},derivedAttrs:{isLibraryProvider:function(){return this.get("identifier")===l.LIBRARY_PROVIDER_IDENTIFIER}}});t.b=c},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(17),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(46),m=n.n(g),v=n(350),y=n(25),b=n(747),S=n(272),w=n(155),M=n(745),I=n(299),C=n(23),D=n(166),T=n.n(D),x=n(218),P=n(70),E=n(1852),A=n(2404),L=n.n(A),k=n.i(w.a)(T.a.menuSpeed),N={appear:L.a.enter,appearActive:L.a.enterActive,
enter:L.a.enter,enterActive:L.a.enterActive,leave:L.a.leave,leaveActive:L.a.leaveActive},_=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onWindowPress=function(e){var t=i.props.target,n=m.a.findDOMNode(i.refs.menu),a=n&&n.contains(e.target),r=!a&&m.a.findDOMNode(t),s=r&&r.contains(e.target);a||s||i.props.onMenuClose()},i.onKeyDown=function(e){var t=e.keyCode;t===v.a?I.a(e):t===v.b&&(e.preventDefault(),
e.stopPropagation(),i.props.onMenuClose(),I.b())},a=n,u()(i,a)}return h()(t,e),t.prototype.componentDidMount=function(){this.props.isOpen&&this._openMenu()},t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.componentDidUpdate=function(e){!e.isOpen&&this.props.isOpen?this._openMenu():e.isOpen&&!this.props.isOpen&&this._closeMenu()},t.prototype.componentWillUnmount=function(){this.props.isOpen&&this._closeMenu()},t.prototype._openMenu=function(){I.c(m.a.findDOMNode(this.refs.menu)),
document.addEventListener("mouseup",this.onWindowPress),document.addEventListener("touchend",this.onWindowPress),document.addEventListener("keydown",this.onKeyDown)},t.prototype._closeMenu=function(){document.removeEventListener("mouseup",this.onWindowPress),document.removeEventListener("touchend",this.onWindowPress),document.removeEventListener("keydown",this.onKeyDown)},t.prototype.render=function(){var e=this.props,t=e.children,i=e.target,r=e.options,o=e.isOpen,l=e.scrollerProps,c=e.onMenuClose,u=s()(e,["children","target","options","isOpen","scrollerProps","onMenuClose"]);
return a()(M.a,{className:L.a.menuPortal,target:i,options:r,isOpen:o,closeTimeout:k},void 0,f.a.createElement(x.a,{ref:"menu",isOpen:o,transitionName:N,transitionAppearTimeout:k,transitionEnterTimeout:k,transitionLeaveTimeout:k},o&&f.a.createElement(E.a,u,f.a.createElement(P.a,l,n.i(b.a)(t,function(e){var t=n.i(S.a)(c,e.props.onPress);return f.a.cloneElement(e,{onPress:t})})))))},t}(p.Component);_.defaultProps={className:L.a.menu,scrollerProps:{className:L.a.menuScroller,scrollDirection:C.a.VERTICAL,
autoScroll:!0}},t.a=_},,function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(47),s=n(5),o=n.n(s),l=n(44),c=n(20),u=n(441),d=n(316),h=r.a.Collection.extend({mixins:[d.a],cache:new u.a,constructor:function(e,t){if(t||(t={}),this.server=t.server,this.section=t.section,this.channel=t.channel,this.device=t.device,this.parent=t.parent,this.allowInCache=t.allowInCache,this.persistInCache=t.persistInCache,this.skipCache=t.skipCache,t.url&&(this.url=t.url),t.path&&(this.path=t.path),null==t.pageStart&&null==t.pageSize||(this.pageStart=t.pageStart||0,
this.pageSize=t.pageSize||0),t.populated&&this.resetPopulatePromise(o.a.Deferred().resolve().promise()),!t.allowInCache&&!t.persistInCache)return void r.a.Collection.prototype.constructor.apply(this,arguments);this.initialize.apply(this,arguments);var n=this.cache.getItemCacheKey(this),i=this.cache.get(n);return this.uninitialize(),t.onlyIfCached&&(i||(i={})),i?i:(r.a.Collection.prototype.constructor.apply(this,arguments),void this.cache.store(this,n))},uninitialize:function(){this.stopListening();
},sync:function(){return(this.allowInCache||this.persistInCache)&&this.cache.store(this),r.a.sync.apply(this,arguments)},syncUrl:function(){var e="";if(this.url&&(e=a.a.result(this,"url")),this.path&&(e=c.join([e,a.a.result(this,"path")])),null!=this.pageStart||null!=this.pageSize){var t=this.pageStart||0,n=this.pageSize||0,i={};i["X-Plex-Container-Start"]=t,i["X-Plex-Container-Size"]=n,e=c.join(e,i)}return e},convert:function(e,t){var n=a.a.isObject(e)?e:l.a.parseXML(e);if(!t)return n;var i=n[t];
return i?(a.a.isArray(i)||(i=[i]),i):[]},clone:function(e){var t={server:this.server,section:this.section,parent:this.parent,url:this.url};return e||(e=this.models),new this.constructor(e,t)},cloneDeep:function(e){return e||(e=this.map(function(e){return e.clone()})),this.clone(e)},clear:function(e){e=a.a.extend({silent:!0},e),this.abortPendingPopulate(),this.resetPopulatePromise(null),this.reset([],e)}});h.extend=function(){var e=r.a.Collection.extend.apply(this,arguments);return e.prototype.cache=new u.a,
e},t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(442),s=n(53),o=n(31),l=n(659);n.d(t,"c",function(){return l.a}),n.d(t,"g",function(){return c}),n.d(t,"a",function(){return u}),n.d(t,"d",function(){return d}),n.d(t,"e",function(){return h}),n.d(t,"h",function(){return p}),n.d(t,"f",function(){return f}),n.d(t,"b",function(){return g});var c=n.i(s.a)(o.D,function(e){return a.a.isString(e)?{type:r.a,message:e}:e}),u=n.i(s.a)(o.E),d=n.i(s.a)(o.F),h=n.i(s.a)(o.G),p=n.i(s.a)(o.H),f=n.i(s.a)(o.I),g=n.i(s.a)(o.J);
},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),a=n.n(i),r=n(53),s=n(20),o=n(31);n.d(t,"clearDVRSetup",function(){return l}),n.d(t,"dvrSetupNextStep",function(){return c}),n.d(t,"dvrSetupPreviousStep",function(){return u}),n.d(t,"fetchDevices",function(){return d}),n.d(t,"discoverDevices",function(){return h}),n.d(t,"addDevice",function(){return p}),n.d(t,"selectDevice",function(){return f}),n.d(t,"selectDeviceSource",function(){return g}),n.d(t,"fetchDeviceDetails",function(){
return m}),n.d(t,"fetchDeviceChannels",function(){return v}),n.d(t,"scanDeviceChannels",function(){return y}),n.d(t,"cancelScanDeviceChannels",function(){return b}),n.d(t,"findBestEPGLineup",function(){return S}),n.d(t,"selectEPGLineup",function(){return w}),n.d(t,"clearChannelMapError",function(){return M}),n.d(t,"saveChannelMap",function(){return I}),n.d(t,"clearChannelMappingsSaveError",function(){return C}),n.d(t,"saveDVR",function(){return D}),n.d(t,"addDVRDevice",function(){return T}),n.d(t,"removeDVRDevice",function(){
return x}),n.d(t,"saveDVRSettings",function(){return P}),n.d(t,"clearDVRSettingsSaveError",function(){return E}),n.d(t,"saveDeviceSettings",function(){return A}),n.d(t,"clearDeviceSettingsSaveError",function(){return L}),n.d(t,"fetchLineupChannels",function(){return k}),n.d(t,"fetchChannelMap",function(){return N});var l=n.i(r.a)(o._53),c=n.i(r.a)(o._54),u=n.i(r.a)(o._55),d=n.i(r.a)(o._56),h=n.i(r.a)(o._57),p=n.i(r.a)(o._58),f=n.i(r.a)(o._59),g=n.i(r.a)(o._60),m=n.i(r.a)(o._61),v=n.i(r.a)(o._62),y=n.i(r.a)(o._63),b=n.i(r.a)(o._64),S=n.i(r.a)(o._65),w=n.i(r.a)(o._66),M=n.i(r.a)(o._67),I=n.i(r.a)(o._68),C=n.i(r.a)(o._69),D=n.i(r.a)(o._70),T=n.i(r.a)(o._71),x=n.i(r.a)(o._72),P=n.i(r.a)(o._73),E=n.i(r.a)(o._74),A=n.i(r.a)(o._75),L=n.i(r.a)(o._76),k=n.i(r.a)(o._77,function(e){
var t=s.join("/livetv/epg/channels",{lineup:e.lineupUUID});return a()({options:{url:t}},e)}),N=n.i(r.a)(o._78,function(e){var t=s.join("/livetv/epg/channelmap",{device:e.deviceUUID,lineup:e.lineupUUID});return a()({options:{url:t}},e)})},function(e,t,n){"use strict";function i(e){var t=e.children,n=r()(e,["children"]);return o.a.createElement("div",n,t)}var a=n(17),r=n.n(a),s=n(1),o=n.n(s),l=n(2416),c=n.n(l);i.defaultProps={className:c.a.buttonBar},t.a=i},function(e,t,n){"use strict";var i=n(1);n.n(i),
i.PropTypes.shape({identifier:i.PropTypes.string.isRequired,isLibraryProvider:i.PropTypes.bool.isRequired,protocols:i.PropTypes.object.isRequired,features:i.PropTypes.object.isRequired})},function(e,t,n){"use strict";var i=n(1);n.n(i),i.PropTypes.shape({machineIdentifier:i.PropTypes.string.isRequired,allowSync:i.PropTypes.bool,allowMediaDeletion:i.PropTypes.bool,transcoderVideo:i.PropTypes.bool,isFullServer:i.PropTypes.bool.isRequired,isFullOwnedServer:i.PropTypes.bool.isRequired})},function(e,t,n){
"use strict";var i=n(111),a=new i.a({interface:["get","set","remove","clear"]});t.a=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=n.n(i),r=n(38),s=n(67),o=n(65),l=n(210),c=n(16),u=n(57),d=n(18),h=n(253),p=d.a.extend({mixins:[l.a],name:"MetadataListModel",context:["server","section","metadataItem","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync"],responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:s.d,
entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state,t=e.listIdentifier||e.containerKey||e.key;return n.i(o.a)(this.entityType,t,this.server.entityID(),this.section&&this.section.entityID(),this.metadataItem&&this.metadataItem.entityID())},idAttribute:"containerKey",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(this.get("containerKey")||this.get("key"))},sessionAttrs:{isMetadataList:c.a.boolean,listIdentifier:c.a.string,containerKey:c.a.string,
containerTitle:c.a.string,currentPageStart:c.a.integer,currentPageSize:c.a.integer,populatedRange:c.a.object,isPending:c.a.boolean,isPopulated:c.a.boolean,error:c.a.object},syncedAttrs:{key:c.a.string,librarySectionID:c.a.string,totalSize:c.a.integer,viewGroup:c.a.string,title:c.a.string,thumb:c.a.string,art:c.a.string,banner:c.a.string,theme:c.a.string,allowSync:c.a.boolean},syncedRelations:{metadataItems:{relationClass:h.a,rootPropertyName:"Metadata",options:function(e){return{containerKey:e.containerKey||e.key
}},setOptions:function(e){return{remove:e.remove,at:e.at}}}},derivedAttrs:{firstItemType:function(){var e=this.getCollection().first();return e?e.get("type"):this.attributes.firstItemType},isFirstItemLibraryItem:function(){var e=this.getCollection().first();return e?e.get("isLibraryItem"):this.attributes.isFirstItemLibraryItem}},defaults:function(){return{isMetadataList:!0,populatedRange:{start:0,end:0,size:0},isPending:!0,isPopulated:!1,error:null}},initialize:function(e){this._totalSizeAdjustment=0,
this.startPopulatedRangeMonitor(),this.on("change:key change:containerKey",this.onContainerKeyChange,this)},uninitialize:function(){this.off("change:key change:containerKey",this.onContainerKeyChange,this),this.stopListening()},augmentResponseText:function(e,t){return t===u.a.xml?r.a.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e,t){var n=this;this.responseContext.forEach(function(t){var i=e[t];void 0!==i&&n.setContext(t,i)});var i=r.a.parseArray(e.Metadata),s=r.a.parseInteger(e.totalSize);
return this.allowAllLeaves||(e.Metadata=a.a.reject(i,function(e){var t=/\/allLeaves$/.test(e.key);return t&&(this._totalSizeAdjustment-=1),t},this)),s&&this._totalSizeAdjustment&&(e.totalSize=s-this._totalSizeAdjustment),!e.title&&e.title1&&(e.title=e.title1),e},onContainerKeyChange:function(e,t){var n=this.get("metadataItems"),i=this.syncedRelations.metadataItems.options(this.attributes);a.a.each(i,function(e,t){n.setContext(t,e)})}});t.default=p},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(17),s=n.n(r),o=n(2),l=n.n(o),c=n(47),u=n(14),d=n(33),h=n(20),p=n(61),f=n(449),g=n(67),m=n(65),v=n(151),y=n(259),b=n(248),S=n(27),w=n(21),M=n(59),I=n(16),C=n(421),D=n(428),T=n(18),x=n(630),P=n(423),E=n(209),A=n(1112),L=n(431),k=n(147),N=n(149),_={
PENDING:"pending",CONNECTED:"connected",UNAVAILABLE:"unavailable",UNAUTHORIZED:"unauthorized"},O={PENDING:"pending",RESOLVED:"resolved",REJECTED:"rejected"},R={SECONDARY:"secondary"},j=["camera_upload","cloudsync","content_filter","home","lyrics","music_videos","pass","premium_music_metadata","sync","trailers"],z=T.a.extend({mixins:[D.a],name:"ServerModel",entityType:g.f,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(m.a)(this.entityType,e.machineIdentifier||this.cid);
},idAttribute:"machineIdentifier",connectionTestTimeout:1e4,cache:new v.a,persistInCache:!0,sessionAttrs:{connectionTestResult:I.a.oneOf(_.PENDING,_.CONNECTED,_.UNAVAILABLE,_.UNAUTHORIZED).isRequired,promiseState:I.a.oneOf(O.PENDING,O.RESOLVED,O.REJECTED).isRequired,sections:I.a.instanceOf(P.a).isRequired,playlists:I.a.instanceOf(A.a).isRequired,playQueueManager:I.a.instanceOf(x.a).isRequired,isShared:I.a.boolean.isRequired,isBundled:I.a.boolean.isRequired,isCloud:I.a.boolean.isRequired,isMerged:I.a.boolean.isRequired,
superToken:I.a.string,accessToken:I.a.string,sourceTitle:I.a.string,publicAddressMatches:I.a.boolean,httpsRequired:I.a.boolean,presence:I.a.boolean,home:I.a.boolean,synced:I.a.boolean,createdAt:I.a.integer,lastSeenAt:I.a.integer,serverClass:I.a.oneOf(R.SECONDARY)},sessionRelations:{activeConnection:{relationClass:k.a,deferred:!0},connections:{relationClass:L.a,options:function(){return{server:this}}}},syncedAttrs:{machineIdentifier:I.a.string,friendlyName:I.a.string,startState:I.a.string,version:I.a.string,
platform:I.a.string,platformVersion:I.a.string,sync:I.a.boolean,backgroundProcessing:I.a.boolean,multiuser:I.a.boolean,transcoderLyrics:I.a.boolean,myPlex:I.a.boolean,myPlexMappingState:I.a.string,myPlexSigninState:I.a.string,myPlexSubscription:I.a.boolean,myPlexUsername:I.a.string,transcoderPhoto:I.a.boolean,transcoderAudio:I.a.boolean,transcoderVideo:I.a.boolean,transcoderVideoRemuxOnly:I.a.boolean,transcoderSubtitles:I.a.boolean,transcoderActiveVideoSessions:I.a.integer,allowMediaDeletion:I.a.boolean,
allowCameraUpload:I.a.boolean,allowChannelAccess:I.a.boolean,allowSync:I.a.boolean,diagnostics:I.a.list,companionProxy:I.a.boolean,updater:I.a.boolean,isDesktop:I.a.boolean,photoAutoTag:I.a.boolean,updatedAt:I.a.integer,countryCode:I.a.string,ownerFeatures:I.a.list,mediaProviders:I.a.integer,maxUploadBitrate:I.a.integer,maxUploadBitrateReason:I.a.string,maxUploadBitrateReasonMessage:I.a.string},derivedAttrs:{debugName:function(){var e=this.get("machineIdentifier"),t=this.get("connections"),n=1===t.length&&t.at(0).get("isLoopback"),i=this.get("friendlyName");
return!i&&n&&(i="[Loopback]"),i||(e?"["+e+"]":"[Anonymous]")},shortVersion:function(){var e=this.get("version"),t=/(\d+\.){2,3}\d+/.exec(e);return l.a.first(t)||e},isConnected:function(){return this.get("connectionTestResult")===_.CONNECTED},isUnavailable:function(){return this.get("connectionTestResult")===_.UNAVAILABLE},isUnauthorized:function(){return this.get("connectionTestResult")===_.UNAUTHORIZED},isResolved:function(){return this.get("promiseState")===O.RESOLVED},isRejected:function(){return this.get("promiseState")===O.REJECTED;
},isRelayed:function(){var e=this.get("activeConnection");return!(!e||!e.get("relay"))},isSecure:function(){var e=this.get("activeConnection");return!(!e||!e.get("isSecure"))},hasHttpsConnections:function(){var e=this.get("connections");return!!e.findWhere({isHttps:!0})},hasFallbackConnections:function(){var e=this.get("connections");return!!e.findWhere({isFallback:!0})},isCloudSyncServer:function(){return!!this.get("synced")},isPersonalCloudServer:function(){return"Cloud"===this.get("platform")},
isMobileServer:function(){return!this.get("synced")&&this.get("serverClass")===R.SECONDARY},isFullServer:function(){return!this.get("isCloud")&&!this.get("isCloudSyncServer")&&!this.get("isMobileServer")},isCloudBased:function(){return this.get("isCloud")||this.get("isCloudSyncServer")},isFullOwnedServer:function(){return this.get("isFullServer")&&!this.get("isShared")},isPrimaryEligible:function(){return!(!M.a.get("allowCloudSyncServers")&&this.get("isCloudSyncServer"))&&(!(!M.a.get("allowMobileServers")&&this.get("isMobileServer"))&&(!!this.get("machineIdentifier")&&!this.get("isUnauthorized")&&!this.get("isCloud")));
},isOutOfDate:function(){return!this.get("isCloudSyncServer")&&(!this.get("isMobileServer")&&!this.isVersionOrNewer("0.9.16.0"))},isClaimed:function(){return!!this.get("isPersonalCloudServer")||(this.get("isConnected")?"ok"===this.get("myPlexSigninState"):void 0)},hasManualConnection:function(){var e=this.get("connections");return e.some(function(e){return e.get("sources").some(function(e){return/^manual/.test(e.id)})})},shared:function(){return this.get("isShared")},bundled:function(){return this.get("isBundled");
},cloud:function(){return this.get("isCloud")},merged:function(){return this.get("isMerged")},connected:function(){var e=this.get("connectionTestResult")===_.PENDING;return e?null:this.get("isConnected")},available:function(){var e=this.get("connectionTestResult")===_.PENDING;return e?null:!this.get("isUnavailable")},authorized:function(){var e=this.get("connectionTestResult")===_.PENDING;return e?null:this.get("isResolved")},relayed:function(){return this.get("isRelayed")}},defaults:function(){return{
connectionTestResult:_.PENDING,promiseState:O.PENDING,sections:new P.a([],{server:this}),playlists:new A.a({},{server:this}),playQueueManager:new x.a({server:this}),isShared:!1,isBundled:!1,isCloud:!1,isMerged:!1,sync:!1,backgroundProcessing:!1,allowChannelAccess:!1,updater:!0}},url:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.get("activeConnection");n.i(d.a)(t,"An active or manual connection is required for a server url");var e=l.a.result(t,"url");return/\/$/.test(e)||(e+="/"),
e},initialize:function(){this._reset(),this.on("change:machineIdentifier",this.onMachineIdentifierChange,this),this.listenTo(this.get("connections"),{remove:this.onConnectionRemove,reset:this.onConnectionsReset})},uninitialize:function(){this.off("change:machineIdentifier",this.onMachineIdentifierChange,this),this.stopListening()},updateEntity:function(){if(!this.get("isMerged"))return T.a.prototype.updateEntity.apply(this,arguments)},fetch:function(){return c.a.Model.prototype.fetch.apply(this,arguments);
},resolveUrl:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(/^\w+:\/\//.test(e))return e;var n=t.useLoopback?"http://127.0.0.1:"+this.getLoopbackPort()+"/":this.url(t.connection),i=this.get("accessToken"),a=l.a.extend({},t.params);return t.appendHeaders&&l.a.defaults(a,this.getHeaders()),t.appendToken&&i&&(a["X-Plex-Token"]=i),h.join([n,e],a)},swizzleUrl:function(e,t){var n=e.match(/^\w+:\/\/.+?(\/.+)$/),i=n?n[1]:e;return this.resolveUrl(i,t)},getXHROptions:function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.headers,i=s()(t,["headers"]);return a()({url:this.resolveUrl(e),dataType:"text",headers:l.a.extend(this.getHeaders(),n),allowHeadersInUrl:!0,allowBlacklistedMethodHeaders:this.supports("allowBlacklistedMethodHeaders")},i)},getHeaders:function(){var e=b.a.getInstance(),t=l.a.clone(e),i=this.get("accessToken");i&&(t["X-Plex-Token"]=i);var a=n.i(u.a)("appModel").get("settings"),r=a.get("language");return r&&(t["Accept-Language"]=r),
t},addConnection:function(e){e.sources||(e.sources=[{id:"internal"}]);var t=this.get("connections"),n=new k.a(e),i=t.get(n.id);if(i){var a=i.get("sources");return a.set(e.sources,{remove:!1}),i}return t.add(e)},hasSource:function(e){return this.get("connections").some(function(t){return t.hasSource(e)})},removeSource:function(e){for(var t=this.get("connections"),n=t.length-1;n>=0;){var i=t.at(n),a=i.get("sources");a.remove(e),n--}},testAllConnections:function(){var e=this,t=this.get("connections");
return n.i(S.a)("[Connections] Testing all %s connection(s) for %s",t.length,this.get("debugName")),this._reset(),t.each(function(t){var n=!t.get("relay"),i=!t.get("isUntested");(n||i)&&e.testConnection(t)}),this.populatePromise},testOnlyUntestedConnections:function(){var e=this,t=this.get("connections");return t.each(function(t){var n=!t.get("relay"),i=t.get("isUntested"),a=t.get("isAborted");n&&(i||a)&&e.testConnection(t)}),this.populatePromise},testOnlyUntestedRelayConnections:function(){var e=this,t=this.get("connections");
return t.each(function(t){var n=t.get("relay"),i=t.get("isUntested");n&&i&&e.testConnection(t)}),this.populatePromise},testConnection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.server=this,t.connection=e,this.get("promiseState")===O.REJECTED&&this._reset();var n=w.a.execute("testServerConnection",t).done(this.onConnectionTestSuccess.bind(this)).fail(this.onConnectionTestError.bind(this));return n},abortAllConnectionTests:function(){var e=this,t=this.get("connections");
n.i(S.a)("[Connections] Aborting all pending connection tests for",this.get("debugName")),t.each(function(t){e.abortConnectionTest(t)})},abortConnectionTest:function(e){var t={server:this,connection:e};w.a.execute("abortServerConnectionTest",t)},populateIdentity:function(e){var t=this;if(this._identityPromise)return this._identityPromise;var n=w.a.execute("populateServerIdentity",{server:this,connection:e});return n.done(function(e){t.set("machineIdentifier",e)}),this._identityPromise=n,n},updateCacheKey:function(){
var e=this.get("debugName"),t=this.cacheKey(this.attributes),i=this.cache.get(t);if(i){var a=i.get("debugName");S.a.warn("[Identity] %s and %s (cached) collide",e,a),i.get("isConnected")||!this.get("isConnected")?(n.i(S.a)("[Identity] Merging %s into %s (cached)",e,a),i.merge(this)):(n.i(S.a)("[Identity] Merging %s (cached) into %s",a,e),this.merge(i),this.cache.store(this,t))}else this.cache.store(this,t)},merge:function(e){var t=this;e.set("isMerged",!0),e.get("isBundled")&&this.set("isBundled",!0),
e.get("connections").each(function(e){t.addConnection(e.toJSON())}),this.collection&&(this.collection.remove(e.cid,{silent:!0}),this.collection._byId[this.id]=this,this.collection.trigger("remove",e,this.collection),this.collection.trigger("update",this.collection)),this.cache.remove(e),M.a.get("shouldCreateStateTree")&&this.updateEntity()},hasOwnerFeature:function(e){if(this.supports("ownerFeatures")){var t=this.get("ownerFeatures");return!!t&&t.indexOf(e)>-1}return!!this.get("myPlexSubscription")&&j.indexOf(e)>-1;
},supports:function(e){var t=this.get(e);if(l.a.isBoolean(t))return t;var n=N.a[e];return null!=n&&this.isVersionOrNewer(n)},isVersionOrNewer:function(e){var t=this.get("shortVersion");return!e||n.i(f.a)(t,e)},getSectionForItem:function(e){if(e.section)return e.section;if(e.get("isSection"))return e;var t=e.get("librarySectionID");if(t){var n=new E.a({key:e.get("librarySectionID")},{server:e.server,onlyIfCached:!0});return l.a.isEmpty(n)?void 0:n}return e.parent?this.getSectionForItem(e.parent):void 0;
},canAllowHttpFallback:function(){if(!this.get("isFullServer")||this.get("isPersonalCloudServer"))return!1;if(p.a.isHostedHttps&&!M.a.get("allowMixedContent"))return!1;var e=n.i(u.a)("appModel").get("settings"),t=e.get("allowHttpFallback"),i=t===y.a.ALWAYS,a=t===y.a.SAME_NETWORK,r=i||a&&this.get("publicAddressMatches");return!!r},hasOtherLoopbackServer:function(){return!!this.collection&&this.collection.hasLoopbackServer()},getLoopbackPort:function(){var e=this.get("connections").findWhere({isPrivate:!0
});return e?e.get("port"):"32400"},hasLocalConnection:function(){var e=this.get("activeConnection");return e&&e.get("isPrivate")},hasLoopbackConnection:function(){var e=this.get("activeConnection");return e&&e.get("isLoopback")},hasSecureConnection:function(){return this.get("isSecure")},authenticate:function(e){this._resolve({accessToken:e})},deauthenticate:function(){this._reject({accessToken:null})},_reset:function(){this.startCapturingChangeEvents(),this.set("promiseState",O.PENDING),this._resetPopulate(),
this.releaseCapturedChangeEvents()},_resolve:function(e){var t=l.a.extend({connectionTestResult:_.CONNECTED,promiseState:O.RESOLVED},e);this.startCapturingChangeEvents(),this.set(t),this._resolvePopulate(),this.releaseCapturedChangeEvents()},_reject:function(e){var t=this.get("connections");t.hasOnlyFailedConnections()&&S.a.warn("[Connections] All connections to %s failed",this.get("debugName"));var n=t.findWhere({isUnauthorized:!0})?_.UNAUTHORIZED:_.UNAVAILABLE,i=l.a.extend({connectionTestResult:n,
promiseState:O.REJECTED},e);this.startCapturingChangeEvents(),this.set(i),this._rejectPopulate(),this.releaseCapturedChangeEvents()},_checkActiveConnection:function(){var e=this.get("activeConnection"),t=this.get("connections");if(e&&!t.contains(e)){var n=t.getBestConnection();n?this.set(a()({activeConnection:n},n.get("serverAttrs"))):this.testAllConnections()}},onMachineIdentifierChange:function(e,t){this.collection?this.listenToOnce(this.collection,"change:machineIdentifier",function(){this.updateCacheKey();
}):this.updateCacheKey()},onConnectionRemove:function(e,t){t.length?this._checkActiveConnection():(this.trigger("change:connections.remove",e,t),this.trigger("change:connections.change",this,t),this.trigger("destroy",this,this.collection))},onConnectionsReset:function(e,t){e.length?this._checkActiveConnection():(this.trigger("change:connections.reset",e,t),this.trigger("change:connections.change",this,e),this.trigger("destroy",this,this.collection))},onConnectionTestSuccess:function(e){var t=this.get("connections").getBestConnection();
if(t!==this.get("activeConnection")&&S.a.info("[Connections] Active connection to %s is %s",this.get("debugName"),t.id),this._resolve(a()({activeConnection:t},t.get("serverAttrs"))),M.a.get("allowLoopbackDiscovery")){var i=this.get("connections"),r=this.get("activeConnection"),s=r.get("isPrivate"),o=!!i.findWhere({isLoopback:!0});!s||o||this.hasOtherLoopbackServer()||(n.i(S.a)("[Connections] Adding possible loopback connection for",this.get("debugName")),this.addConnection(r.getLoopbackAttributes()));
}},onConnectionTestError:function(e,t){var i=this;if(!e.get("isAborted")){var a=this.get("connections");if(e.get("isHttps")&&!e.get("isUnauthorized")&&!e.get("relay"))if(this.canAllowHttpFallback()){var r=this.addConnection({scheme:"http",address:e.get("address"),port:e.get("port"),isFallback:!0});n.i(S.a)("[Connections] Added insecure fallback connection for %s at %s",this.get("debugName"),r.id)}else S.a.warn("[Connections] Prevented fallback to insecure connection for",this.get("debugName"));!this.id&&e.get("isUnauthorized")&&this.populateIdentity(e),
a.hasOnlyFailedConnections()?this.id||!this._identityPromise?this._reject():this._identityPromise.always(function(){a.hasOnlyFailedConnections()&&i._reject()}):a.hasFailedEveryDirectConnection()&&this.testOnlyUntestedRelayConnections()}}},{connectionTestResults:_,promiseStates:O,serverClasses:R});n.i(C.a)(z,function(){return{relationClass:n.i(u.a)("ServerFlexModel"),options:{server:this}}}),t.a=z},function(e,t,n){function i(e){return function(){return e.apply(this,a.initial(arguments))}}var a=n(2);
e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),a=n.n(i),r=n(53),s=n(31);n.d(t,"testServer",function(){return o}),n.d(t,"setRelayReminder",function(){return l}),n.d(t,"fetchProviders",function(){return c}),n.d(t,"populateProviders",function(){return u}),n.d(t,"fetchLibraries",function(){return d}),n.d(t,"populateLibraries",function(){return h}),n.d(t,"addLibrary",function(){return p}),n.d(t,"startLibrariesRefresh",function(){return f}),n.d(t,"shareLibraries",function(){
return g}),n.d(t,"enableHttpFallback",function(){return m}),n.d(t,"optimizeDatabase",function(){return v}),n.d(t,"cleanBundles",function(){return y}),n.d(t,"emptyTrash",function(){return b}),n.d(t,"deleteServer",function(){return S}),n.d(t,"startActivity",function(){return w}),n.d(t,"updateActivity",function(){return M}),n.d(t,"finishActivity",function(){return I}),n.d(t,"startSyntheticActivity",function(){return C}),n.d(t,"finishSyntheticActivity",function(){return D}),n.d(t,"eventConnectionOpen",function(){
return T}),n.d(t,"restartPersonalCloudServer",function(){return x}),n.d(t,"cancelLibrariesRefresh",function(){return P});var o=n.i(r.a)(s.i),l=n.i(r.a)(s.j),c=n.i(r.a)(s.k),u=n.i(r.a)(s.l),d=n.i(r.a)(s.m),h=n.i(r.a)(s.n),p=n.i(r.a)(s.o),f=n.i(r.a)(s.p),g=n.i(r.a)(s.q),m=n.i(r.a)(s.r),v=n.i(r.a)(s.s),y=n.i(r.a)(s.t),b=n.i(r.a)(s.u),S=n.i(r.a)(s.v),w=n.i(r.a)(s.w),M=n.i(r.a)(s.x),I=n.i(r.a)(s.y),C=n.i(r.a)(s.z),D=n.i(r.a)(s.A),T=n.i(r.a)(s.B),x=n.i(r.a)(s.C),P=n.i(r.a)(s.p,function(e){return a()({},e,{
cancel:!0})})},function(e,t,n){"use strict";function i(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"details";if(e&&t&&n){var s=encodeURIComponent(e.machineIdentifier),o=encodeURIComponent(t.identifier),l=encodeURIComponent(n),c=t.isLibraryProvider?"#!/server/"+s+"/"+r+"/"+l:"#!/server/"+s+"/provider/"+o+"/details?key="+l;return a.join(c,i)}}var a=n(20);t.a=i},function(e,t,n){"use strict";var i=function(e,t,n,i,a,r,s,o){
if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,i,a,r,s,o],u=0;l=new Error(t.replace(/%s/g,function(){return c[u++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=i},function(e,t,n){"use strict";var i=n(4),a=n(215),r=["id","typeString"],s=n.i(a.a)(r,[{id:1,typeString:"video",key:"videoStreamID",title:function(){return n.i(i.default)("Video")}},{
id:2,typeString:"audio",key:"audioStreamID",title:function(){return n.i(i.default)("Audio")}},{id:3,typeString:"subtitles",key:"subtitleStreamID",title:function(){return n.i(i.default)("Subtitles")}},{id:4,typeString:"lyrics",key:"lyricStreamID",title:function(){return n.i(i.default)("Lyrics")}}]);t.a=s},function(e,t,n){"use strict";function i(e,t){var i=t.searchResultEntityID;return n.i(a.a)(e,r.SEARCH_RESULT,i)}var a=n(335),r=n(185),s=n(461);n.d(t,"a",function(){return s.a}),n.d(t,"b",function(){
return s.b}),n.d(t,"d",function(){return s.d}),n.d(t,"e",function(){return s.e}),n.d(t,"f",function(){return s.f}),t.c=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.errorClassName,a=e.name,s=e.hasError,l=o()(e,["children","className","errorClassName","name","hasError"]);return c.a.createElement("label",r()({},l,{className:d()(n,s&&i),htmlFor:a}),t)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(28),d=n.n(u),h=n(2395),p=n.n(h);i.defaultProps={className:p.a.label,
errorClassName:p.a.hasError},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.onModalClose,a=c()(e,["className","children","onModalClose"]);return d.a.createElement("div",r()({className:t},a),o()(p.a,{className:g.a.closeButton,onPress:i},void 0,m),n)}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(30),p=n(26),f=n(2412),g=n.n(f),m=o()(h.a,{name:"plex-icon-remove-560"});i.defaultProps={className:g.a.modalContent},t.a=i},function(e,t,n){"use strict";
function i(e){var t=e.className,n=e.children,i=o()(e,["className","children"]);return c.a.createElement("div",r()({className:t},i),n)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(2415),d=n.n(u);i.defaultProps={className:d.a.modalFooter},t.a=i},function(e,t,n){e.exports={default:n(2218),__esModule:!0}},function(e,t,n){"use strict";var i=(n(33),n(16)),a=n(420),r=n(1194),s=a.a.extend({name:"UserStorageModel",storageKey:"users",sessionAttrs:{activeUserID:i.a.integer},syncedRelations:{users:{
relationClass:r.a}},initialize:function(){this.debouncedSaveTimeout=null},debouncedSave:function(){var e=this;this.debouncedSaveTimeout&&clearTimeout(this.debouncedSaveTimeout),this.debouncedSaveTimeout=setTimeout(function(){return e.save()},2e3)},flushDebouncedSave:function(){this.debouncedSaveTimeout&&(clearTimeout(this.debouncedSaveTimeout),this.save())},getActiveUser:function(){var e=this.get("users"),t=this.get("activeUserID");if(t)return e.get(t)},clearActiveUser:function(){var e=this.getActiveUser();
return e&&e.clearSensitiveAttributes(),this.unset("activeUserID"),this.save()},getActiveServers:function(){var e=this.getActiveUser();if(e)return e.get("servers")}});t.a=new s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(329),s=n(458),o=a.a.extend({},s.a,{type:"video",qualities:{bitrate:[64,96,208,320,720,1500,2e3,3e3,4e3,8e3,1e4,12e3,2e4],videoResolution:["220x128","220x128","284x160","420x240","576x320","720x480","1280x720","1280x720","1280x720","1920x1080","1920x1080","1920x1080","1920x1080"],
videoQuality:[10,20,30,30,40,60,60,75,100,60,75,90,100]},getAvailableQualitiesFor:function(e,t,i){if(!e||!t)return[];var s=t.get("transcoderVideo"),o=t.get("transcoderVideoRemuxOnly"),l=n.i(r.a)(e),c=!(!l||!l.bitrate),u=!!e.videoResolution;if(!s||o||!c&&!u)return[];var d,h=t.get("maxUploadBitrate");if(h){var p=c?Math.min(l.bitrate,h):h;if(p===h){var f=a.a.extend({},i,{comparator:function(e){var t=this.qualities.bitrate[e];return t>p}});d=this.getAvailableQualities(f)}else d=this.getAvailableQualitiesBelowBitrate(p,i);
}else d=c?this.getAvailableQualitiesBelowBitrate(l.bitrate,i):this.getAvailableQualitiesBelowResolution(e.videoResolution,i);return d},getAvailableQualitiesBelowBitrate:function(e,t){return t||(t={}),t.comparator=function(t){var n=this.qualities.bitrate[t];return n>=e},this.getAvailableQualities(t)},getAvailableQualitiesBelowResolution:function(e,t){t||(t={});var n=this.getHeightFromResolution(e);return t.comparator=function(e){var t=this.qualities.videoResolution[e],i=this.getHeightFromResolution(this.getResolutionFromSize(t));
return i>=n},this.getAvailableQualities(t)},getNearestIndexToBitrate:function(e){return this.getNearestIndex(this.qualities.bitrate,e)},getMinimumQuality:function(e,t){var n=e===o.ORIGINAL?Number.MAX_VALUE:e,i=t===o.ORIGINAL?Number.MAX_VALUE:t;return n<i?e:t},getMaximumQuality:function(e,t){return this.getMinimumQuality(e,t)===e?t:e}});t.a=o},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n.i(i.createSelector)(function(e){return e.ui.liveTVSettingsPage},function(e){return e.dvrSetup}));t.a=a},function(e,t,n){
"use strict";function i(e){var t=e.children,n=e.className,i=e.spinnerSize,a=e.isSpinning,s=c()(e,["children","className","spinnerSize","isSpinning"]);return d.a.createElement(m.a,r()({className:p()(n,y.a.button,a&&y.a.isSpinning),isDisabled:a},s),o()("span",{className:y.a.spinnerContainer},void 0,o()(g.a,{className:y.a.spinner,size:i})),o()("span",{className:y.a.label},void 0,t))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(28),p=n.n(h),f=n(23),g=n(41),m=n(51),v=n(2391),y=n.n(v);
i.defaultProps={isSpinning:!1,spinnerSize:f.d.SMALL},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=o()(e,["children"]);return c.a.createElement("div",r()({className:d.a.modalHeader},n),t)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(2417),d=n.n(u);t.a=i},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},,,function(e,t,n){"use strict";function i(e){var t=e.key,i=e.getModel,s=n.i(r.a)(t),o="is"+s+"Pending",l="is"+s+"Populated",c=t?t+"Error":"error";
return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i(e,r),u=t?s.get(t):s,d=s.sessionAttrs;n.i(a.a)(!!d,s.name+" is missing session attributes "+o+", "+l+", and "+c),n.i(a.a)(d.hasOwnProperty(o),s.name+" is missing a session attribute for "+o),n.i(a.a)(d.hasOwnProperty(l),s.name+" is missing a session attribute for "+l),n.i(a.a)(d.hasOwnProperty(c),s.name+" is missing a session attribute for "+c);var h=s.get(o);s.set(o,!0),u.fetch(r.options).done(function(){var e;s.set((e={},
e[o]=!1,e[l]=!0,e[c]=null,e))}).fail(function(e,t){var n;return t.aborting?void s.set(o,h):void s.set((n={},n[o]=!1,n[c]=t,n))})}}var a=n(33),r=n(214);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){var n=t.providerEntityID;return n},r.a,function(e,t){return t[e]})}var a=n(9),r=(n.n(a),n(324));t.a=i},function(e,t,n){"use strict";var i=n(4),a=n(215),r=["key","typeID","typeString"],s=n.i(a.a)(r,[{key:"movies",typeID:"1",typeString:"movie",title:function(){
return n.i(i.default)("Movies")},defaultAgent:"com.plexapp.agents.imdb",defaultLanguage:"en",defaultScanner:"Plex Movie Scanner",sectionTypeIcon:"plex-icon-movies-560"},{key:"tv",typeID:"2",typeString:"show",title:function(){return n.i(i.default)("TV Shows")},defaultAgent:"com.plexapp.agents.thetvdb",defaultLanguage:"en",defaultScanner:"Plex Series Scanner",sectionTypeIcon:"plex-icon-shows-560"},{key:"music",typeID:"8",typeString:"artist",title:function(){return n.i(i.default)("Music")},defaultAgent:"com.plexapp.agents.lastfm",
defaultLanguage:"en",defaultScanner:"Plex Music Scanner",sectionTypeIcon:"plex-icon-music-560",exclusiveAgents:["com.plexapp.agents.plexmusic"],exclusiveScanners:["Plex Premium Music Scanner"]},{key:"photos",typeID:"13",typeString:"photo",title:function(){return n.i(i.default)("Photos")},defaultAgent:"com.plexapp.agents.none",defaultLanguage:"en",defaultScanner:"Plex Photo Scanner",sectionTypeIcon:"plex-icon-photos-560"},{key:"videos",typeID:"1",typeString:"movie",title:function(){return n.i(i.default)("Other Videos");
},defaultAgent:"com.plexapp.agents.none",defaultLanguage:"xn",defaultScanner:"Plex Video Files Scanner",sectionTypeIcon:"plex-icon-clips-560"}]);t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(14),c=n(61),u=n(271),d=n(677),h=n(263),p=n(59),f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",g=o.a.ItemView.extend({tagName:"img",background:!1,backgroundSize:"",cache:new d.a,initialize:function(e){e||(e={}),a.a.bindAll(this,"onLoad","onError","loadImage"),
this.url=e.url,this.server=e.server,this.placeholder=e.placeholder,this.placeholderClass=e.placeholderClass,this.modelAttribute=e.modelAttribute,this.ignoreAttributeChanges=e.ignoreAttributeChanges,this.exposeUrl=e.exposeUrl,this.resetOnError=e.resetOnError,this.emptyImage=e.explicitEmpty?"url("+f+")":"",e.background&&(this.background=e.background),e.backgroundSize&&(this.backgroundSize=e.backgroundSize),e.format&&(this.format=e.format),e.quality&&(this.quality=e.quality),a.a.isFunction(e.getUrl)&&(this.getUrl=e.getUrl),
this.allowBaseImageBlobs=p.a.get("allowBaseImageBlobs"),this.allowBaseImagePreloading=p.a.get("allowBaseImagePreloading"),this.setup(e)},setup:function(e){this.setDimensions(e),this.setFilters(e.filters),this.setModel(e.model,e)},setDimensions:function(e){e.width&&e.height&&(this.transcode=!0,this.width=e.width,this.height=e.height)},setFilters:function(e){this.filters=e||void 0},hasFilters:function(){return void 0!==this.filters},setModel:function(e,t){t||(t={}),this.stopListening(),this.src=null,
this.model=e,e&&(this.server||(this.server=e.server),t.url||this.modelAttribute&&(this.url=this.getUrl(e.get(this.modelAttribute)),this.ignoreAttributeChanges||this.listenTo(e,"change:"+this.modelAttribute,this.onChange)))},setElement:function(e){o.a.ItemView.prototype.setElement.apply(this,arguments),this.render({force:!0})},getUrl:function(e){return e},getTranscodeUrl:function(e){if(!this.server||!this.transcode)return e;var t=l.a("appModel"),i=n.i(h.a)();return u.a.image(this.server,e,{fallbackServer:t.get("primaryServer"),
width:this.width*i,height:this.height*i,minSize:this.minSize,filters:this.filters,format:this.format,quality:this.quality})},render:function(e){return e||(e={}),this.url||this.placeholder||this.placeholderClass?this.src?(e.force&&this.showImage(this.src),this):(this.isPlaceholderRendered&&this.url||this.showPlaceholder(),this.url&&this.load(this.url,this.transcode).then(this.onLoad,this.onError,this.onLoad),this):this},showPlaceholder:function(){return this.isPlaceholderRendered=!0,this.$el.removeClass("loaded"),
this.placeholderClass?(this.$el.addClass(this.placeholderClass),void this.$el.css("background-image",this.emptyImage)):this.placeholder?void this.showImage(this.placeholder):void this.clearImage()},clearImage:function(){this.background?this.$el.css("background-image",this.emptyImage):this.showImage(f)},showImage:function(e){return this.background?void this.showBackgroundImage(e):void this.$el.attr("src",e).removeAttr("width").removeAttr("height")},showBackgroundImage:function(e){this.$el.css("background-image","url("+e+")");
},load:function(e){if(!e)return s.a.Deferred().reject().promise();if(e=this.getTranscodeUrl(e),this.exposeUrl&&this.$el.attr("data-image-url",e),this.allowBaseImageBlobs&&c.a.hasBlob&&c.a.hasObjectUrl){var t=this.loadBlob(e);return t=t.then(this.loadImage,null,this.loadImage)}return this.allowBaseImagePreloading?this.loadImage(e):s.a.Deferred().resolve(e).promise()},loadBlob:function(e){var t=s.a.Deferred();this.cancel();var n=this.cache.getBlobUrl(e);if(n)return t.resolve(n),t.promise();var i=this.cache.getPlaceholder(e);
i&&t.notify(i,!0);var r=new window.XMLHttpRequest;return r.open("GET",e,!0),r.responseType="arraybuffer",this.xhr=r,r.onreadystatechange=a.a.bind(function(){if(4===r.readyState)if(r.onreadystatechange=null,this.xhr=null,200===r.status){var n=new window.Blob([r.response],{type:"image/jpeg"}),i=window.URL.createObjectURL(n);this.cache.store({url:e,blobUrl:i}),t.resolve(i)}else t.reject()},this),r.send(),t.promise()},loadImage:function(e,t){var n=s.a.Deferred(),i=new window.Image;return i.onload=function(){
i.onload=i.onabort=i.onerror=null,t?n.notify(e,i.width,i.height):n.resolve(e,i.width,i.height)},i.onabort=i.onerror=function(){i.onload=i.onabort=i.onerror=null,n.reject()},i.src=e,n.promise()},cancel:function(){this.xhr&&(this.xhr.onreadystatechange=null,this.xhr.abort(),this.xhr=null)},onLoad:function(e,t,n){if(this.backgroundSize){var i=t&&t>this.width||n&&n>this.height?this.backgroundSize:"auto";this.$el[0].style.backgroundSize=i}this.src=e,this.placeholderClass&&this.$el.removeClass(this.placeholderClass),
this.$el.addClass("loaded"),this.showImage(e),this.trigger("load",e,t,n)},onError:function(){this.resetOnError&&this.showPlaceholder(),this.trigger("error")},onClose:function(){this.cancel()},onChange:function(e,t){return t=this.getUrl(t),this.url===t?this:(this.url=t,this.src=null,void this.render())}});t.a=g},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.cellX,a=e.cellY,s=e.cellWidth,o=e.cellHeight,l="translate3d("+i+"px, "+a+"px, 0)",c={position:"absolute",width:s,
height:o,WebkitTransform:l,msTransform:l,transform:l};return r()("div",{className:t,style:c},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";var i=n(18),a=n(57),r=n(16);n.d(t,"a",function(){return s});var s={GRABBER_GRAB:"grabber.grab",PROVIDER_DEVICE_CHANNELSCAN:"provider.device.channelscan",PROVIDER_EPG_LOAD:"provider.epg.load",PROVIDER_SUBSCRIPTION_PROCESS:"provider.subscriptions.process",GENERAL_BUNDLE_CLEAN:"general.bundle.clean",LIBRARY_DELETE:"library.delete"
},o=i.a.extend({name:"ActivityModel",context:["server"],idAttribute:"uuid",rootPropertyName:"Activity",responseType:function(){return this.server.supports("json")?a.a.json:a.a.xml},sessionAttrs:{synthetic:r.a.boolean},syncedAttrs:{uuid:r.a.string,userID:r.a.integer,title:r.a.string,subtitle:r.a.string,progress:r.a.integer,event:r.a.string,cancellable:r.a.boolean,type:r.a.string,Context:r.a.object,Response:r.a.object},defaults:function(){return{Context:{},Response:{}}}});t.b=o},function(e,t,n){"use strict";
function i(e){var t=e.className,n=e.separator;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2375)),l=n.n(o);i.defaultProps={className:l.a.separator,separator:"\u2014"},t.a=i},function(e,t){e.exports={sliderTrackWidth:"60px",sliderThumbSize:"12px",tooltipArrowSize:"6px",sidebarWidth:"240px",sidebarLeftGutterWidth:"25px",searchHubTitleHeight:"18px",searchResultWidth:"346px",searchResultHeight:"50px",posterTitlePadding:"10px",posterTitleHeight:"20px",posterCenterCircleSize:"42px",
posterBadgeHeight:"24px",posterHoverSlideDistance:"10px",pageHeaderHeight:"60px",pagePadding:"60px",recordingPriorityPaneWidth:"360px",recordingPriorityPaneBorderWidth:"4px",recordingPriorityDragHandleWidth:"62px",breakpointExtraSmall:"480px",breakpointSmall:"768px",breakpointMedium:"992px",breakpointLarge:"1200px",jumpBarCharacterHeight:"35px",jumpBarGutter:"30px",tableHeaderHeight:"40px",tableRowHeight:"40px",tableCellPadding:"20px",playCellWidth:"42px",actionsCellWidth:"122px",summaryCellHeight:"136px",
summaryCellPadding:"20px"}},,function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(34),l=n(52),c=o.a.extend({mixins:l.a,initialize:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interface&&(this.interface=t.interface),t.props&&(this.props=t.props),a.a.each(this.interface,function(t){e[t]=a.a.bind(e._proxy,e,t)})},_proxy:function(e){for(var t=this.getInstance(),n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return t[e].apply(t,i);
},register:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.hasInstance()&&!t.ignorePrevious&&(this._previousInstance=this.getInstance()),this._instance=e,t.silent||this.trigger("change:instance",e)},registerOnce:function(e){if(!this.hasInstance()){var t=e();this.register(t.instance||t,t.options||void 0)}},restorePrevious:function(){this._previousInstance&&this.register(this._previousInstance)},registered:function(){var e=s.a.Deferred();return this.hasInstance()?e.resolve(this.getInstance()):this.listenToOnce(this,"change:instance",e.resolve),
e.promise()},getInstance:function(){if(this.hasInstance())return this._instance;throw new Error("Nothing has been registered to this adapter.")},hasInstance:function(){return null!=this._instance},prop:function(e){if(a.a.contains(this.props,e))return this.getInstance()[e];throw new Error("The "+e+" property has not been defined for this adapter")}});t.a=c},function(e,t,n){"use strict";function i(e){var t=r.a.Deferred();return e.always(function(){t.resolve.apply(t,arguments)}),t.promise()}var a=n(5),r=n.n(a);
t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),a=n.n(i),r=n(53),s=n(31);n.d(t,"addMetadataItemToPlaylist",function(){return o}),n.d(t,"analyzeMetadataItem",function(){return l}),n.d(t,"deleteMetadataItem",function(){return c}),n.d(t,"deleteMetadataItemVersion",function(){return u}),n.d(t,"downloadMetadataItemVersion",function(){return d}),n.d(t,"editMetadataItem",function(){return h}),n.d(t,"fixMetadataItemMatch",function(){return p}),n.d(t,"getMetadataItemInfo",function(){
return f}),n.d(t,"markMetadataItemUnwatched",function(){return g}),n.d(t,"markMetadataItemWatched",function(){return m}),n.d(t,"optimizeMetadataItem",function(){return v}),n.d(t,"playMetadataItem",function(){return y}),n.d(t,"playMetadataItemVersion",function(){return b}),n.d(t,"playPrimaryExtra",function(){return S}),n.d(t,"playRelatedMix",function(){return w}),n.d(t,"queueMetadataItem",function(){return M}),n.d(t,"rateMetadataItem",function(){return I}),n.d(t,"recommendMetadataItem",function(){
return C}),n.d(t,"refreshMetadataItem",function(){return D}),n.d(t,"shareMetadataItem",function(){return T}),n.d(t,"splitMetadataItemApart",function(){return x}),n.d(t,"syncMetadataItem",function(){return P}),n.d(t,"unmatchMetadataItem",function(){return E}),n.d(t,"watchMetadataItemLater",function(){return A}),n.d(t,"changeMetadataItemField",function(){return L}),n.d(t,"addMetadataItemToQueue",function(){return k}),n.d(t,"playMetadataItemAll",function(){return N}),n.d(t,"playMetadataItemNext",function(){
return _}),n.d(t,"shuffleMetadataItem",function(){return O});var o=n.i(r.a)(s._28),l=n.i(r.a)(s._29),c=n.i(r.a)(s._30),u=n.i(r.a)(s._31),d=n.i(r.a)(s._32),h=n.i(r.a)(s._33),p=n.i(r.a)(s._34),f=n.i(r.a)(s._35),g=n.i(r.a)(s._36),m=n.i(r.a)(s._37),v=n.i(r.a)(s._38),y=n.i(r.a)(s._39),b=n.i(r.a)(s._40),S=n.i(r.a)(s._41),w=n.i(r.a)(s._42),M=n.i(r.a)(s._43),I=n.i(r.a)(s._44),C=n.i(r.a)(s._45),D=n.i(r.a)(s._46),T=n.i(r.a)(s._47),x=n.i(r.a)(s._48),P=n.i(r.a)(s._49),E=n.i(r.a)(s._50),A=n.i(r.a)(s._51),L=n.i(r.a)(s._52),k=n.i(r.a)(s._43,function(e){
return a()({},e,{next:!1})}),N=n.i(r.a)(s._39,function(e){return a()({},e,{unwatched:!1})}),_=n.i(r.a)(s._43,function(e){return a()({},e,{next:!0})}),O=n.i(r.a)(s._39,function(e){return a()({},e,{shuffle:!0})})},function(e,t,n){"use strict";var i=n(786),a=n(2628),r=n.n(a),s=n(2369),o=n.n(s),l=i.a.extend({template:r.a,ui:{sidebar:".sidebar-container",page:".page-container"},serializeData:function(){return{styles:o.a}}});t.a=l},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.kind,a=o()(e,["className","children","kind"]);
return c.a.createElement(p.a,r()({className:d()(t,g.a.menuItem,g.a[i]),role:"menuitem"},a),n)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(28),d=n.n(u),h=n(23),p=n(26),f=n(2406),g=n.n(f);i.defaultProps={kind:h.c.DEFAULT},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.className,a=e.isSelected,s=e.selectedIconName,l=e.selectedIconAriaLabel,u=c()(e,["children","className","isSelected","selectedIconName","selectedIconAriaLabel"]);return d.a.createElement(m.a,r()({className:p()(i,a&&y.a.isSelected)
},u),o()("div",{className:y.a.menuItemContainer},void 0,o()("div",{className:y.a.menuLabel},void 0,t),a&&o()("div",{className:y.a.selectedIcon},void 0,o()(g.a,{name:s,"aria-label":l||n.i(f.default)("Selected")}))))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(28),p=n.n(h),f=n(4),g=n(30),m=n(115),v=n(2408),y=n.n(v);i.defaultProps={selectedIconName:"plex-icon-selected-560"},t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(46),m=n.n(g),v=n(350),y=n(25),b=n(23),S=n(155),w=n(299),M=n(166),I=n.n(M),C=n(468),D=n(218),T=n(1853),x=n(2410),P=n.n(x),E=n.i(S.a)(I.a.modalSpeed),A={
appear:P.a.enter,appearActive:P.a.enterActive,enter:P.a.enter,enterActive:P.a.enterActive,leave:P.a.leave,leaveActive:P.a.leaveActive},L=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onBackdropBeginPress=function(e){i._isBackdropPressed=i._isBackdropTarget(e)},i.onBackdropEndPress=function(e){i._isBackdropPressed&&i._isBackdropTarget(e)&&i.props.onModalClose(),i._isBackdropPressed=!1;
},i.onTouchMove=function(e){i._isBackdropPressed=!1},i.onTouchCancel=function(e){i._isBackdropPressed=!1},i.onKeyDown=function(e){var t=e.keyCode;t===v.a?w.a(e):t===v.b&&(e.preventDefault(),e.stopPropagation(),i.props.onModalClose(),w.b())},a=n,u()(i,a)}return h()(t,e),t.prototype.componentDidMount=function(){this.props.isOpen&&this._openModal()},t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.componentDidUpdate=function(e){!e.isOpen&&this.props.isOpen?this._openModal():e.isOpen&&!this.props.isOpen&&this._closeModal();
},t.prototype.componentWillUnmount=function(){this.props.isOpen&&this._closeModal()},t.prototype._openModal=function(){w.c(m.a.findDOMNode(this.refs.modal)),this._autoFocusTimeoutID=setTimeout(w.d,E),document.addEventListener("keydown",this.onKeyDown)},t.prototype._closeModal=function(){clearTimeout(this._autoFocusTimeoutID),document.removeEventListener("keydown",this.onKeyDown)},t.prototype._isBackdropTarget=function(e){var t=this._findEventTarget(e);if(t){var n=m.a.findDOMNode(this.refs.modal);return!n||!n.contains(t);
}return!1},t.prototype._findEventTarget=function(e){var t=e.changedTouches;if(!t)return e.target;if(1===t.length){var n=t[0];return document.elementFromPoint(n.clientX,n.clientY)}},t.prototype.render=function(){var e=this.props,t=e.className,n=e.backdropClassName,i=e.children,r=e.size,o=e.metricsPage,l=e.metricsProperties,c=e.isOpen;return s()(C.a,{isOpen:c,closeTimeout:E},void 0,s()(D.a,{className:P.a.modalContainer,transitionName:A,transitionAppearTimeout:E,transitionEnterTimeout:E,transitionLeaveTimeout:E
},void 0,c&&f.a.createElement(T.a,a()({},l,{page:o}),s()("div",{className:n,onMouseDown:this.onBackdropBeginPress,onMouseUp:this.onBackdropEndPress,onTouchStart:this.onBackdropBeginPress,onTouchEnd:this.onBackdropEndPress,onTouchMove:this.onTouchMove,onTouchCancel:this.onTouchCancel},void 0,f.a.createElement("div",{ref:"modal",className:t||P.a[r]},i)))))},t}(p.Component);L.defaultProps={backdropClassName:P.a.modalBackdrop,size:b.d.MEDIUM},t.a=L},function(e,t,n){"use strict";function i(e){return o.a.createElement(l.a,r()({
iconClassName:u.a.icon,icon:"plex-icon-alert-560"},e))}var a=n(7),r=n.n(a),s=n(1),o=n.n(s),l=n(140),c=n(2493),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(2217),r=i(a),s=n(900),o=i(s),l="function"==typeof o.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};t.default="function"==typeof o.default&&"symbol"===l(r.default)?function(e){
return"undefined"==typeof e?"undefined":l(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":"undefined"==typeof e?"undefined":l(e)}},function(e,t,n){var i=n(121),a=n(99),r=n(902),s=n(235),o="prototype",l=function(e,t,n){var c,u,d,h=e&l.F,p=e&l.G,f=e&l.S,g=e&l.P,m=e&l.B,v=e&l.W,y=p?a:a[t]||(a[t]={}),b=y[o],S=p?i:f?i[t]:(i[t]||{})[o];p&&(n=t);for(c in n)u=!h&&S&&void 0!==S[c],u&&c in y||(d=u?S[c]:n[c],y[c]=p&&"function"!=typeof S[c]?n[c]:m&&u?r(d,i):v&&S[c]==d?function(e){
var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t[o]=e[o],t}(d):g&&"function"==typeof d?r(Function.call,d):d,g&&((y.virtual||(y.virtual={}))[c]=d,e&l.R&&b&&!b[c]&&s(b,c,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();
"number"==typeof __g&&(__g=n)},,function(e,t,n){"use strict";var i,a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(10),c=n(14),u=n(8),d=n(154),h=n(49),p=n(628),f=n(172),g=(n(146),!1),m=l.a.Controller.extend({populateView:function(e){e||(e={}),e.showLoading!==!1&&u.a.trigger("show:loading",{navigating:!0}),this.abortPendingPopulate();var t={options:e},n=o.a.Deferred().resolve(t).promise(),a=this.populateUser(n,t);return a=this.populateServer(a,e.serverID,t),e.primaryServer&&(a=this.populatePrimaryServer(a,t)),
e.sectionID&&(a=this.populateSection(e,a,t)),e.key&&(a=this.populateMetadata(e,a,t)),e.channelID&&(a=this.populateChannel(e,a,t)),e.channelKey&&(a=this.populateChannelMetadata(e,a,t)),a=a.then(function(){return o.a.Deferred().resolve(t).promise()},function(e){return g?g=!1:u.a.trigger("navigate","unauthorized",{result:t,silent:!0}),o.a.Deferred().reject(t).promise()}),i=a,a},abortPendingPopulate:function(){i&&"pending"===i.state()&&(g=!0),d.a.abortAll("page")},populateUser:function(e,t){var n=c.a("appModel"),i=n.get("user"),a=function(){
var e=i.get("isLocked"),n=o.a.Deferred();return e?n.reject(t):n.resolve(t),n.promise()},r=i.get("lockState")===f.a.lockStates.PENDING?i.server.populate():o.a.Deferred().resolve().promise();return e=r.then(a,a)},populateServer:function(e,t,n){var i=c.a("appModel");return e=e.then(function(){var e=i.get("servers"),a=void 0;if(!t)return e.populateAnyServer();if(/^transient/.test(t)){var r=i.get("transientServer");if(!r||r.id!==t)return u.a.trigger("navigate:refresh:dashboard"),o.a.Deferred().reject().promise();
a=o.a.Deferred().resolve(r).promise()}else a=e.populateServer(t);return a.done(function(e){n.server=e}),a.fail(function(){n.server=e.get(t)}),a})},populatePrimaryServer:function(e,t){var n=c.a("appModel");return e=e.then(function(){function e(r,s){s||(n.off("change:isWaitingForPrimaryServer",e),a=n.get("primaryServer"),a?(t.server=a,a.populate().done(i.resolve).fail(i.reject)):i.reject())}var i=o.a.Deferred(),a=n.get("primaryServer");return a?(t.server=a,i.resolve().promise()):n.get("isWaitingForPrimaryServer")?(n.on("change:isWaitingForPrimaryServer",e),
i.promise()):i.reject().promise()})},populateSection:function(e,t,n){return t=t.then(function(){var e=n.server.get("sections"),t=e.find(function(e){return e.isNew()});return t?e.fetch():e.populate()}),t=t.then(function(t){var i=n.item,a=e.sectionID;if(i&&(a=i.get("librarySectionID"),!a||!n.server.get("isFullServer")))return o.a.Deferred().resolve();var r=t.get(a);return r?(n.section=r,i&&i.setContext("section",r),o.a.Deferred().resolve(r)):o.a.Deferred().reject()})},populateMetadata:function(e,t,n){
return t=t.then(function(){var t=new h.a({key:e.key},{server:n.server,relatedOptions:e.relatedOptions});return n.item=t,t.fetch({scope:"page",data:r.a.extend({checkFiles:"1",includeExtras:"1",includeRelated:"1",includeRelatedCount:"0",includeOnDeck:"1",includeChapters:"1"},e.populateData)})}),t=this.populateSection(e,t,n)},populateChannel:function(e,t,n){return t=t.then(function(){var t=e.channelID,i={};/^\/\w+\//.test(t)?i.key=t:i.identifier=t;var a=new p.a(i,{server:n.server});return n.channel=a,
a.fetch({scope:"page"})})},populateChannelMetadata:function(e,t,n){return t=t.then(function(){var t=new p.a({key:e.channelKey},{server:n.server,channel:n.channel});return n.channelItem=t,t.fetch({scope:"page"})})}});t.a=m},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(47),s=n(10),o=n(14),l=n(8),c=s.a.AppRouter.extend({initialize:function(){this.uniqueRoutes=a.a.uniq(a.a.values(this.appRoutes)),this.fragments=a.a.invert(this.appRoutes),this.listenTo(this,"route",this.onRoute),this.listenTo(l.a,"navigate",this.onNavigate);
},resolveUrlFragment:function(e,t){var n=e.match(/:\w+/g);return n&&a.a.each(n,function(n){var i=n.slice(1),a=t[i];if(null==a){var r=new RegExp("\\([^\\)]*"+n+"[^\\)]*\\)","g");e=e.replace(r,"")}else e=e.replace(n,encodeURIComponent(a))}),e.replace(/\(|\)/g,"")},onRoute:function(e){var t=o.a("appModel"),n=t.get("history"),i=t.get("forwardHistory"),s=r.a.history.getFragment();s===i[0]?n.push(i.shift()):s!==a.a.last(n)&&(n.push(s),i.splice(0)),t.trigger("change:history",t,n)},onNavigate:function(e,t){
if(a.a.indexOf(this.uniqueRoutes,e)!==-1){t||(t={});var n=!1;if(null!=t.silent&&(n=t.silent,delete t.silent),null==t.trigger&&(t.trigger=!0),n)this.controller[e].apply(this.controller,a.a.values(t));else{var i=this.resolveUrlFragment(this.fragments[e],t);this.navigate(i,{trigger:t.trigger,replace:t.replace})}}}});t.a=c},function(e,t,n){"use strict";function i(e){if(e<=0||!r.a.isNumber(e))return"0:00";var t=o.a.duration(e),n=t.seconds(),i=t.minutes(),a=t.hours()+24*t.days(),s="";return s=n<10?":0"+n:":"+n,
s=i<10&&a>0?"0"+i+s:i+s,a>0&&(s=a+":"+s),s}var a=n(2),r=n.n(a),s=n(43),o=n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){return n.i(a.a)(e,{limit:"past"})}var a=n(1215);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.seasonPrefix||"S{1}",i=e.episodePrefix||"E{1}",a=e.seasonIndex,l=e.episodeIndex;if((l>0||0===l)&&a<1e3){e.noLeadingZero||(a=n.i(o.a)(a),l=n.i(o.a)(l));var c=e.separator||"";return n.i(s.default)(t,a)+c+n.i(s.default)(i,l)}return e.date?r()(e.date).format("M/D/YY"):"";
}var a=n(43),r=n.n(a),s=n(4),o=n(456);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=[];if(e){var i=r.a.first(e.Part);i&&i.Stream&&n.push.apply(n,r.a.where(i.Stream,t))}return n}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";var i=n(20),a=n(263),r=n(54),s=r.a.extend({getUrl:function(e){if(e){var t=n.i(a.a)();return i.join(e,{size:Math.round(this.width*t)})}return e}});t.a=s},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=(n(33),
n(25)),f=n(2365),g=n.n(f),m=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));v.call(a);var r=n.ignoreWidth,o=n.ignoreHeight,c=n.ignorePosition;return a.state={isMeasured:!1,width:r?void 0:0,scrollWidth:r?void 0:0,height:o?void 0:0,scrollHeight:o?void 0:0,x:c?void 0:0,y:c?void 0:0},a}return u()(t,e),t.prototype.componentDidMount=function(){this._requestFrame()},t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.componentWillUnmount=function(){
this._cancelFrame(),this._clearTimeout()},t.prototype._cancelFrame=function(){this._frameRequestID&&(this._frameRequestID=window.cancelAnimationFrame(this._frameRequestID))},t.prototype._clearTimeout=function(){this._measureTimeoutID&&(this._measureTimeoutID=clearTimeout(this._measureTimeoutID))},t.prototype._reset=function(){var e=this.refs.expandContainer,t=this.refs.shrinkContainer;e.scrollTop=1e5,e.scrollLeft=1e5,t.scrollTop=1e5,t.scrollLeft=1e5},t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,i=(e.onMeasure,
"function"!=typeof n);return h.a.createElement("div",{ref:"container",className:t},i?n:n(this.state),h.a.createElement("div",{ref:"expandContainer",className:g.a.scrollContainer,onScroll:this.onScroll},a()("div",{className:g.a.expandContent})),h.a.createElement("div",{ref:"shrinkContainer",className:g.a.scrollContainer,onScroll:this.onScroll},a()("div",{className:g.a.shrinkContent})))},t}(d.Component),v=function(){var e=this;this._requestFrame=function(){e._clearTimeout(),e._cancelFrame(),e._frameRequestID=window.requestAnimationFrame(e._measure);
},this._measure=function(){var t=e.props,n=t.ignoreWidth,i=t.ignoreHeight,a=t.ignorePosition,r=e.state,s=r.isMeasured,o=r.width,l=r.scrollWidth,c=r.height,u=r.scrollHeight,d=r.x,h=r.y,p=e.refs.container,f=p.getBoundingClientRect(),g=s!==!0,m=!a&&(f.left!==d||f.top!==h),v=!n&&(f.width!==o||p.scrollWidth!==l),y=!i&&(f.height!==c||p.scrollHeight!==u);if(g||m||v||y){var b={isMeasured:!0};a||(b.x=m?f.left:d,b.y=m?f.top:h),n||(b.width=v?f.width:o,b.scrollWidth=v?p.scrollWidth:l),i||(b.height=y?f.height:c,
b.scrollHeight=y?p.scrollHeight:u),e.setState(b),e.props.onMeasure&&e.props.onMeasure(b)}e._reset()},this.onScroll=function(t){e._cancelFrame(),e._clearTimeout(),e._measureTimeoutID=setTimeout(e._requestFrame,e.props.resizeTimeout)}};m.defaultProps={className:g.a.container,ignoreWidth:!1,ignoreHeight:!1,ignorePosition:!1,resizeTimeout:100},t.a=m},function(e,t,n){"use strict";function i(e){var t=function(t){function i(e,n){c()(this,i);var a=d()(this,t.call(this,e,n));return a.onMoveTimeout=function(){
a.setState({isMoving:!1})},a.state={isMoving:!1},a}return p()(i,t),i.prototype.componentDidMount=function(){this._setRenderedItem(),this._setVisibleItem()},i.prototype.componentWillReceiveProps=function(e,t){var n=this.props[this.props.keyPropName],i=e[e.keyPropName],a=null!=n&&n===i;a?this.props.cellIndex!==e.cellIndex&&(this.setState({isMoving:!0}),this._clearMoveTimeout(),this._moveTimeoutID=setTimeout(this.onMoveTimeout,this.props.moveTimeout)):(this._renderedItem=null,this._visibleItem=null,
this.setState({isMoving:!1}),this._clearMoveTimeout())},i.prototype.shouldComponentUpdate=function(e,t){return n.i(b.a)(this,e,t)},i.prototype.componentDidUpdate=function(){this._setRenderedItem(),this._setVisibleItem()},i.prototype.componentWillUnmount=function(){this._clearMoveTimeout()},i.prototype._setRenderedItem=function(){this.props.isScrolling||(this._renderedItem=this.props[this.props.keyPropName])},i.prototype._setVisibleItem=function(){this.props.isVisible&&(this._visibleItem=this.props[this.props.keyPropName]);
},i.prototype._clearMoveTimeout=function(){this._moveTimeoutID&&(this._moveTimeoutID=clearTimeout(this._moveTimeoutID))},i.prototype.render=function(){var t=this.props,n=t.className,i=t.keyPropName,a=t.isScrolling,s=t.isVisible,l=(t.moveTimeout,o()(t,["className","keyPropName","isScrolling","isVisible","moveTimeout"])),c=l[i],u=a&&c!==this._renderedItem,d=!s&&c!==this._visibleItem;return g.a.createElement(e,r()({className:v()(n,w.a.cell,this.state.isMoving&&w.a.isMoving),showScrollPlaceholder:u,showOffscreenPlaceholder:d
},l))},i}(f.Component);return t.displayName="Virtualized("+n.i(y.a)(e)+")",t.WrappedComponent=e,t.defaultProps={moveTimeout:400},t}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(11),c=n.n(l),u=n(13),d=n.n(u),h=n(12),p=n.n(h),f=n(1),g=n.n(f),m=n(28),v=n.n(m),y=n(273),b=n(25),S=n(2366),w=n.n(S);t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"DEFAULT",function(){return i}),n.d(t,"PRIMARY",function(){return a}),n.d(t,"SUCCESS",function(){return r}),n.d(t,"DANGER",function(){
return s}),n.d(t,"all",function(){return o});var i="default",a="primary",r="success",s="danger",o=[i,a,r,s]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),a=n.n(i),r=n(53),s=n(31);n.d(t,"populateMetadataListRange",function(){return o}),n.d(t,"repopulateMetadataListRange",function(){return l}),n.d(t,"playMetadataList",function(){return c}),n.d(t,"addMetadataListToPlaylist",function(){return u}),n.d(t,"syncMetadataList",function(){return d}),n.d(t,"optimizeMetadataList",function(){
return h}),n.d(t,"selectMetadataListItem",function(){return p}),n.d(t,"deselectMetadataListItem",function(){return f}),n.d(t,"deselectAllMetadataListItems",function(){return g}),n.d(t,"resetMetadataList",function(){return m}),n.d(t,"shuffleMetadataList",function(){return v});var o=n.i(r.a)(s._97),l=n.i(r.a)(s._98),c=n.i(r.a)(s._99),u=n.i(r.a)(s._100),d=n.i(r.a)(s._101),h=n.i(r.a)(s._102),p=n.i(r.a)(s._103),f=n.i(r.a)(s._104),g=n.i(r.a)(s._105),m=n.i(r.a)(s._106),v=n.i(r.a)(s._99,function(e){return a()({},e,{
shuffle:!0})})},function(e,t,n){"use strict";var i=n(53),a=n(31);n.d(t,"a",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"d",function(){return o}),n.d(t,"c",function(){return l}),n.d(t,"e",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return d});var r=n.i(i.a)(a._13),s=n.i(i.a)(a._14),o=n.i(i.a)(a._15),l=n.i(i.a)(a._16),c=n.i(i.a)(a._17),u=n.i(i.a)(a._18),d=n.i(i.a)(a._19)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),a=n(31);
n.d(t,"initQuickSearch",function(){return r}),n.d(t,"resetQuickSearch",function(){return s}),n.d(t,"fetchQuickSearch",function(){return o}),n.d(t,"changeQuickSearchQuery",function(){return l}),n.d(t,"changeQuickSearchSettings",function(){return c}),n.d(t,"selectQuickSearchResult",function(){return u}),n.d(t,"navigateQuickSearchResult",function(){return d}),n.d(t,"playQuickSearchItem",function(){return h});var r=n.i(i.a)(a.U),s=n.i(i.a)(a.V),o=n.i(i.a)(a.W),l=n.i(i.a)(a.X),c=n.i(i.a)(a.Y),u=n.i(i.a)(a.Z),d=n.i(i.a)(a._0),h=n.i(i.a)(a._1);
},function(e,t,n){"use strict";function i(e){return e.multiSelect}t.a=i},function(e,t,n){"use strict";var i=n(2747),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),c=n(10),u=n(14),d=n(4),h=n(8),p=n(127),f=n(152),g=n(212),m=n(126),v=n(267),y=n(21),b=n(753),S=n(156),w=n(1694),M=n(158),I=n(353),C=n(225),D=c.a.Layout.extend({mixins:[b.a],tagName:"li",className:"striped-list-item media-list-item",template:a.a,visible:!1,ui:{container:".media-list-inner-item",actions:".media-actions",dropdown:".media-actions-dropdown"
},regions:{rating:".media-rating",progress:".media-progress"},events:{"mouseenter > a":"onMouseEnter","mouseleave > a":"onMouseLeave","mousedown > a":"onMouseDown","click > a":"onClick","click .play-btn":"onPlayClick","click .play-unwatched-btn":"onPlayUnwatchedClick","click .edit-btn":"onEditClick","click .more-btn":"onMoreClick","click .media-title-link":"onTitleClick","hide.bs.dropdown .media-actions-dropdown":"onDropdownHide"},onlyAfterRender:["select","deselect"],initialize:function(e){l.a.bindAll(this,"onResize"),
this.skipFirstRender=e.skipFirstRender,this.continuousPlay=e.continuousPlay;var t;this.model&&(t=this.model.get("type")),t||(t=e.type),this.type=t,this.isPhotoSection=this.model&&this.model.section&&"photo"===this.model.section.get("type"),"clip"===this.type&&this.isPhotoSection&&(this.type="photo"),this.sort=e.sort,this.$el.addClass(this.type),this.sort&&/^(?:addedAt|originallyAvailableAt|rating|mediaHeight|duration)$/.test(this.sort)&&this.$el.addClass("show-sort"),this.parentMediaActions=e.mediaActions;
var n=this.model&&this.model.server||this.parentMediaActions&&this.parentMediaActions.server;this.mediaActions=new S.a({},{item:this.model,type:t,server:n}),this.listenTo(this.mediaActions,{"change:showPlay":this.onActionsChange,"change:showEdit":this.onActionsChange,"change:showListDropdown":this.onActionsChange}),h.a.trigger("content.subscribe:resize",this.onResize)},serializeData:function(){this.shared=this.model.server.get("shared"),this.synced=!this.model.server.get("isFullServer"),this.multiuser=this.model.server.get("multiuser");
var e=this.model.toJSON(),t="#!/server/"+encodeURIComponent(this.model.server.id);if(e.isFolder)t+="/section/"+encodeURIComponent(this.model.section.id)+"/folder/"+encodeURIComponent(e.key);else if(!e.isLibraryItem&&this.model.channel){var n=this.model.channel,i=n.id?n.id:n.get("identifier");t+="/channel/"+encodeURIComponent(i),t+="clip"===e.type?"/details/"+encodeURIComponent(e.key):"/"+encodeURIComponent(e.key)}else"userPlaylistItem"===e.type?t="#!/playlist/"+this.model.userPlaylistKey+"/details/"+e.id:t+="/details/"+encodeURIComponent(e.key);
return{item:e,url:t,selected:this.model.selected,showActions:this.showActions(),sort:this.sort}},render:function(){return this.model?this.skipFirstRender?(this.skipFirstRender=!1,this):(this.visible=!0,void c.a.Layout.prototype.render.apply(this,arguments)):this},show:function(){this.model&&!this.visible&&(this.image&&this.image.setModel(this.model),this.mediaActions&&this.mediaActions.setParent({item:this.model}),this.visible=!0,this.render())},hide:function(){this.model&&this.visible&&(this.image&&this.image.cancel(),
this.visible=!1,this.stopListening(this.model),this.$el.empty())},select:function(){this.ui.container.addClass("selected")},deselect:function(){this.ui.container.removeClass("selected")},getPosterUrl:function(e){return"show"===this.type?this.model.get("grandparentThumb")||this.model.get("parentThumb")||e:e||this.model.get("parentThumb")||this.model.get("grandparentThumb")},showActions:function(){return this.mediaActions&&(this.mediaActions.get("showPlay")||this.mediaActions.get("showEdit")||this.mediaActions.get("showListDropdown"));
},canPlaySiblings:function(){return!this.model.get("isExtra")&&(!/^\/search\/?/.test(this.model.get("containerKey"))&&/^(track|photo|clip|userPlaylistItem)$/.test(this.type))},bindings:{".play-btn":{model:"mediaActions",modelAttribute:"showPlay",manual:!0,autohide:!0},".play-unwatched-btn":{model:"mediaActions",modelAttribute:"showPlayUnwatched",manual:!0,autohide:!0},".edit-btn":{model:"mediaActions",modelAttribute:"showEdit",manual:!0,autohide:!0},".more-btn":{model:"mediaActions",modelAttribute:"showListDropdown",
manual:!0,autohide:!0},".unwatched-icon":{modelAttribute:"viewCount",modelListeners:["viewCount","viewOffset"],manual:!0,autohide:function(){var e=n.i(u.a)("appModel").get("settings");if(!this.bypassShowUnwatchedIconsSetting&&!e.get("showUnwatchedIcons"))return!1;if(!/^(movie|episode|userPlaylistItem)$/.test(this.model.get("type")))return!1;if(this.model.get("isFolder"))return!1;if(this.shared&&!this.multiuser)return!1;var t=this.model.get("viewCount"),i=this.model.get("viewOffset");return!t||i},
formatter:function(e,t){var n=this.model.get("viewOffset");n&&t.toggleClass("unwatched-icon-partial",!0)}},".media-title":{modelAttribute:"title",modelListeners:["title","parentTitle","grandparentTitle"],isHtml:!0,formatter:function(e){var t=this.model.get("grandparentTitle")||this.model.get("parentTitle")||e,n=this.model.get("type");return/^(season|episode|album|track)$/.test(n)&&this.model.get("isLibraryItem")?'<span class="btn-metadata-link media-title-link">'+l.a.escape(t)+"</span>":l.a.escape(t);
}},".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","parentTitle","grandparentTitle","year"],autohide:!0,formatter:function(e){var t;if("userPlaylistItem"===this.model.get("type"))this.model.get("recommender")&&(t=n.i(d.default)("from {1}",this.model.get("recommender")));else{var i=this.model.get("grandparentTitle")||this.model.get("parentTitle");t=i?this.model.get("title"):e}return this.$el.toggleClass("show-subtitle",!!t),t}},".media-subtitle-2":{modelAttribute:"index",modelListeners:["index","message"],
autohide:!0,formatter:function(e){var t=this.model.get("type");return"userPlaylistItem"===t?this.model.get("message"):"episode"===t?n.i(p.a)({seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "}):void 0}},".media-added-at":{modelAttribute:"addedAt",autohide:!0,formatter:function(e){return n.i(m.a)(e)}},".media-available-at":{modelAttribute:"originallyAvailableAt",autohide:!0,formatter:function(e){return n.i(f.default)(e);
}},".media-resolution":{modelAttribute:"Media",autohide:!0,formatter:function(e){return e&&e.length?n.i(v.default)(e[0].videoResolution):""}},".media-duration":{modelAttribute:"duration",autohide:!0,formatter:function(e){return n.i(g.a)(e)}},".video-badge":{modelAttribute:"type",manual:!0,autohide:function(e){return"clip"===e&&this.isPhotoSection}}},onRender:function(){this.image&&this.image.setElement(this.ui.poster),("rating"===this.sort||this.showRating)&&this.rating.show(new M.a({model:this.model,
disabled:!0})),this.progress&&this.progress.show(new w.a({model:this.model}))},onClose:function(){this.image&&this.image.close(),this.dropdown&&this.dropdown.close(),h.a.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e,this.mediaActions&&this.mediaActions.stopListening()},onActionsChange:function(e){if(this.isRendered){var t=!this.showActions();this.ui.container.toggleClass("hide-actions",t),this.ui.actions.toggleClass("hidden",t)}},onClick:function(e){
this.stopTrackingSelecting(e,function(){var t=this.model.get("type"),n=/^(track|photo)$/;if(this.isPhotoSection&&(n=/^(track|photo|clip)$/),n.test(t)){e.preventDefault();var i={item:this.model,siblings:this.canPlaySiblings()};"photo"===t&&(i.autoplay=!1),y.a.execute("playMedia",i)}})},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),y.a.execute("playMedia",{item:this.model,continuous:this.continuousPlay,siblings:this.canPlaySiblings()})},onPlayUnwatchedClick:function(e){e.preventDefault(),
e.stopImmediatePropagation(),y.a.execute("playMedia",{item:this.model,unwatched:!0,siblings:this.canPlaySiblings()})},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=s()(e.currentTarget),n=t.hasClass("btn-loading")?t:this.$el;if(!n.hasClass("active")){n.addClass("active");var i=this.model.fetch({data:{includePreferences:"1"}});i.done(l.a.bind(function(){h.a.trigger("show:modal",new C.a({mediaActions:this.mediaActions}))},this)),i.always(l.a.bind(function(){n.removeClass("active");
},this))}},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),s()(".media-actions-dropdown").trigger("hide.bs.dropdown"),this.dropdown=new I.a({model:this.model,mediaActions:this.mediaActions}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover on-top");var t=s()(e.currentTarget),n=this.ui.actions.position().top,i=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(i)},onTitleClick:function(e){
e.preventDefault(),e.stopImmediatePropagation(),h.a.trigger("navigate","details",{serverID:this.model.server.id,key:this.model.get("grandparentKey")||this.model.get("parentKey")})},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.$el.removeClass("force-hover on-top"))}});t.a=D},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(50),l=o.a.extend({className:"select-modal modal modal-sm fade",events:a.a.extend({"click a":"onClick"},o.a.prototype.events),
initialize:function(){o.a.prototype.initialize.apply(this,arguments),this.promise=s.a.Deferred()},onRender:function(){o.a.prototype.onRender.apply(this,arguments)},onHide:function(e){o.a.prototype.onHide.apply(this,arguments),this.promise.reject()},onClick:function(e){e.preventDefault(),this.promise.resolve(s()(e.currentTarget).data("value")),this.hide()}});t.a=l},function(e,t,n){"use strict";function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],i=n.type,a=n.payload;
switch(i){case w.CHANGE:var r=a.name,s=a.change;if(null==s){var o=p()({},t);return delete o[r],o}return p()({},t,(e={},e[r]=s,e));case w.REPLACE_STATE:return a;case w.RESET:return{};case w.SHOW_ERRORS:return g.a.mapObject(t,function(e){return p()({},e,{showErrors:0!==e.errors.length})});default:return t}}var a=n(17),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(7),p=n.n(h),f=n(2),g=n.n(f),m=n(1),v=n.n(m),y=n(611),b=(n.n(y),n(749)),S=n(53);n.d(t,"b",function(){return M});var w={CHANGE:"CHANGE",
REPLACE_STATE:"REPLACE_STATE",RESET:"RESET",SHOW_ERRORS:"SHOW_ERRORS"},M={change:n.i(S.a)(w.CHANGE),replaceState:n.i(S.a)(w.REPLACE_STATE),reset:n.i(S.a)(w.RESET),showErrors:n.i(S.a)(w.SHOW_ERRORS)},I=function(e){function t(a,r){o()(this,t);var s=c()(this,e.call(this,a,r));return s.onFormStoreChange=function(){var e=s.store.getState();e!==s.prevState&&(s.prevState=e,s.props.onChange(e))},s.onSubmit=function(e){e.preventDefault(),e.nativeEvent.preventDefault();var t=s.store.getState(),n=g.a.some(t,function(e,t){
return 0!==e.errors.length});if(n)s.actions.showErrors();else{var i=g.a.mapObject(t,function(e,t){return e.value});s.props.onSubmit(i,t)}},s.store=n.i(y.createStore)(i),s.actions=n.i(y.bindActionCreators)(M,s.store.dispatch),s}return d()(t,e),t.prototype.getChildContext=function(){return{formStore:this.store}},t.prototype.componentWillMount=function(){this.unsubscribe=this.store.subscribe(this.onFormStoreChange)},t.prototype.componentWillReceiveProps=function(e){e.formState&&this.store.getState()!==e.formState&&this.actions.replaceState(e.formState);
},t.prototype.componentWillUnmount=function(){this.unsubscribe&&(this.unsubscribe(),this.store.replaceReducer(function(e){return e}))},t.prototype.render=function(){var e=this.props,t=e.children,n=(e.onChange,r()(e,["children","onChange"]));return v.a.createElement("form",p()({},n,{onSubmit:this.onSubmit}),t)},t}(m.Component);I.childContextTypes={formStore:b.a},I.defaultProps={onSubmit:function(){},onChange:function(){}},t.a=I},function(e,t,n){"use strict";function i(e){var t=e.contentClassName,n=e.iconClassName,i=e.titleClassName,a=e.descriptionClassName,s=e.footerClassName,l=e.children,u=e.kind,h=e.icon,f=e.title,v=e.description,b=e.footer,S=c()(e,["contentClassName","iconClassName","titleClassName","descriptionClassName","footerClassName","children","kind","icon","title","description","footer"]);
return d.a.createElement(m.a,r()({className:y.a.emptyPage},S),o()("div",{className:t},void 0,!!h&&o()(g.a,{name:h,className:p()(y.a[u],n)}),!!f&&o()("div",{className:i},void 0,f),!!v&&o()("div",{className:a},void 0,v),l),!!b&&o()("div",{className:s},void 0,b))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(28),p=n.n(h),f=n(23),g=n(30),m=n(70),v=n(2492),y=n.n(v);i.defaultProps={contentClassName:y.a.content,iconClassName:y.a.icon,titleClassName:y.a.title,descriptionClassName:y.a.description,
footerClassName:y.a.footer,kind:f.c.DEFAULT},t.a=i},function(e,t,n){"use strict";function i(e){return r()(l.a,{},void 0,o.a.createElement(c.a,e))}var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(883),c=n(882);t.a=i},,,,function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(711),s=n(708),o=n(152),l=n(212),c=n(1298),u={tagsRenderer:c.a,tagsRendererOptions:{},defaultBindings:{".item-title":{modelAttribute:"title"},".item-year":{modelAttribute:"year"},".item-progress":{modelAttribute:"viewOffset",manual:!0,formatter:function(e,t){
var i=this.model.get("duration"),a=n.i(r.a)(e,i);a&&t.css("width",a+"%"),t.parent().toggleClass("hidden",!a)}},".item-duration":{modelAttribute:"duration",autohide:!0,formatter:function(e){return e?n.i(l.a)(e):0}},".item-unwatched-label":{modelAttribute:"viewCount",modelListeners:["viewCount","viewOffset"],manual:!0,autohide:function(e){if(this.shared&&!this.multiuser)return!1;var t=this.model.get("viewOffset");return!e&&!t}},".item-unavailable-btn":{modelAttribute:"Media",manual:!0,autohide:function(e){
var t=n.i(s.a)(e);return!!t.length}},".item-available-at":{modelAttribute:"originallyAvailableAt",autohide:!0,formatter:function(e){return n.i(o.default)(e)}},".item-tagline":{modelAttribute:"tagline",autohide:!0},".item-genre":{modelAttribute:"Genre",autohide:!0,isHtml:!0,formatter:function(e){if(!e||!e.length)return"";var t=this.tagsRenderer(a.a.extend({},this.tagsRendererOptions,{model:this.model,key:"genre",tags:e,maxLen:50,maxTags:2}));return t}},".item-director":{modelAttribute:"Director",manual:!0,
autohide:!0,formatter:function(e,t){if(!e||!e.length)return"";var n=this.tagsRenderer(a.a.extend({},this.tagsRendererOptions,{model:this.model,key:"director",tags:e,maxLen:50,maxTags:3}));return t.find(".metadata-tag-list").html(n),n}},".item-writer":{modelAttribute:"Writer",manual:!0,autohide:!0,formatter:function(e,t){if(!e||!e.length)return"";var n=this.tagsRenderer(a.a.extend({},this.tagsRendererOptions,{model:this.model,key:"writer",tags:e,maxLen:50,maxTags:3}));return t.find(".metadata-tag-list").html(n),
n}},".item-cast":{modelAttribute:"Role",manual:!0,autohide:!0,formatter:function(e,t){if(!e||!e.length)return"";var n=this.tagsRenderer(a.a.extend({},this.tagsRendererOptions,{model:this.model,key:"actor",tags:e,maxLen:50,maxTags:5}));return t.find(".metadata-tag-list").html(n),n}},".item-summary":{modelAttribute:"summary",autohide:!0},".item-content-rating":{modelAttribute:"contentRating",autohide:!0},".media-count-badge":{modelAttribute:"Media",formatter:function(e){return e.length},autohide:function(e){
return e>1}},".details-unwatched-count-badge":{modelAttribute:"unviewedLeafCount",autohide:function(e){return!(this.shared&&!this.multiuser)&&!!e}},".content-rating-flag-container":{modelAttribute:"contentRating",manual:!0,autohide:!0},".studio-flag-container":{modelAttribute:"studio",manual:!0,autohide:!0}}};t.a=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=n.n(i),r=n(8),s=n(38),o=n(20),l=n(441),c=n(214),u=n(57),d=n(22),h=n(636),p=d.a.extend({name:"HubCollection",
context:["server","section","metadataItem","hubKey","hubCount","count","includeEmpty","excludes","allowSync","maxLength"],responseContext:["allowSync"],model:h.a,cache:new l.a,url:function(){var e="/hubs";this.hubKey?e=this.hubKey:this.section&&(e="/hubs/sections/"+encodeURIComponent(this.section.id));var t={excludeFields:"summary"};return this.count&&(t.count=this.count),this.hubCount&&(t.hubCount=this.hubCount),this.includeEmpty&&(t.includeEmpty=1),this.excludes&&this.excludes.length&&this.excludes.forEach(function(e){
t["exclude"+n.i(c.a)(e)]=1}),o.join(e,t)},initialize:function(){this.section&&this.listenTo(r.a,"clear:sections:hubs",this.clear)},fetch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=a.a.clone(e);return e.onlyTransient&&this.populatePromise&&(t.remove=!1,t.url=o.join(a.a.result(this,"url"),{onlyTransient:1})),d.a.prototype.fetch.call(this,t)},augmentResponseText:function(e,t){return t===u.a.xml?s.a.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){var t=this,n=this.model.prototype.rootPropertyName;
if(e&&n){if(a.a.isArray(e)){var i;i={},i[n]=e,e=i}else if(e[n]&&!a.a.isArray(e[n])){var r;r={},r[n]=[e[n]],e=r}var s=e[n],o=s&&s.length;if(o){if(!this.includeEmpty)for(;o&&o--;)s[o].size<=0&&s.splice(o,1);this.maxLength&&s.splice(this.maxLength),e.size>s.length&&(e.size=String(s.length))}}return this.responseContext.forEach(function(n){var i=e[n];void 0!==i&&t.setContext(n,i)}),e}});t.default=p},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(33),s=n(465),o=n(20),l=n(16),c=n(18),u=n(1150),d={
UNTESTED:"untested",PENDING:"pending",CONNECTED:"connected",UNAUTHORIZED:"unauthorized",UNAVAILABLE:"unavailable",ABORTED:"aborted"},h=l.a.boolean.isRequired,p=c.a.extend({name:"ConnectionModel",context:["server"],idAttribute:"uri",sessionAttrs:{currentTest:l.a.custom(function(e){return a.a.isFunction(e.abort)}),testState:l.a.oneOf(d.UNTESTED,d.PENDING,d.CONNECTED,d.UNAUTHORIZED,d.UNAVAILABLE,d.ABORTED).isRequired,isBundled:h,isFallback:h,serverAttrs:l.a.object,currentReachabilityTest:l.a.custom(function(e){
return a.a.isFunction(e.abort)}),isPossiblyCrossNetworkProtected:l.a.boolean.isRequired},sessionRelations:{sources:{relationClass:u.a}},syncedAttrs:{uri:l.a.string,scheme:l.a.string,address:l.a.string,port:l.a.string,relay:l.a.boolean},derivedAttrs:{isUntested:function(){return this.get("testState")===d.UNTESTED},isPending:function(){return this.get("testState")===d.PENDING},isConnected:function(){return this.get("testState")===d.CONNECTED},isUnauthorized:function(){return this.get("testState")===d.UNAUTHORIZED;
},isUnavailable:function(){return this.get("testState")===d.UNAVAILABLE},isFailed:function(){return this.get("isUnauthorized")||this.get("isUnavailable")},isAborted:function(){return this.get("testState")===d.ABORTED},isLoopback:function(){var e=this.get("address");return"localhost"===e||s.a.isLoopbackAddress(e)},isPrivate:function(){return this.get("isLoopback")||s.a.isPrivateAddress(this.get("address"))},isHttps:function(){return"https"===this.get("scheme")},isSecure:function(){return this.get("isLoopback")||this.get("isHttps");
},isPlexDirect:function(){return/\.plex\.direct:/.test(this.get("uri"))}},defaults:{testState:d.UNTESTED,isBundled:!1,isFallback:!1,relay:!1,isPossiblyCrossNetworkProtected:!1},url:function(){return this.get("uri")},constructor:function(e,t){var i=a.a.clone(e);a.a.isObject(e)&&!e.uri&&(n.i(r.a)(e.scheme&&e.address,"A server connection requires either a uri or a scheme and address. "+e.scheme+"://"+e.address),i.uri=e.scheme+"://"+e.address,e.port&&(i.uri+=":"+e.port)),c.a.prototype.constructor.call(this,i,t);
},initialize:function(){this.listenTo(this.get("sources"),"remove reset",this.onSourcesChange)},augmentResponse:function(e){var t=e.protocol;return t?a.a.extend({},e,{scheme:t}):e},getAddressFromUri:function(){return n.i(o.parseUrl)(this.get("uri")).hostname},getIpAddressFromPlexDirectAddress:function(){var e=this.get("address");if(/\.plex\.direct$/.test(e)){var t=e.indexOf(".");t>0&&(e=e.substring(0,t),e=e.replace(/\-/g,"."))}return e},getLoopbackAttributes:function(){var e={scheme:"http",address:"127.0.0.1",
port:this.get("port")};return e},hasSource:function(e){return this.get("sources").some(function(t){return e&&t.get("id")===e})},onSourcesChange:function(){this.get("sources").length||this.trigger("destroy",this,this.collection)}},{testStates:d});t.a=p},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(75),s=n(1159),o=r.a.extend({model:s.a,url:"/:/prefs",initialize:function(e,t){this.server.on("socket:setting",function(e){var t=this.get(e.id);t&&(e=t.parse(e),t.set("value",e.value),"FriendlyName"===e.id&&e.value?this.server.set("friendlyName",e.value):"allowMediaDeletion"===e.id&&this.server.set("allowMediaDeletion",e.value));
},this)},parse:function(e){var t=this.convert(e,"Setting");return a.a.filter(t,function(e){return e.id})}});t.a=o},function(e,t,n){"use strict";var i={json:"1.3.0",libraryDeleteActivity:"1.2.1",cleanBundlesActivity:"1.2.1",decisionEndpoint:"1.0.3",defaultSections:"0.9.17.3",ownerFeatures:"0.9.17.0",replaceTranscodeTarget:"0.9.17.0",quickSearch:"0.9.16.0",relay:"0.9.15.0",claimServer:"0.9.14.2",searchSpecificType:"0.9.14.2",linkedYearMetadata:"0.9.14.0",streamReady:"0.9.14.0",syncOriginalQuality:"0.9.14.0",
allPartsStreamSelection:"0.9.12.5",sharedChannels:"0.9.12.5",shortenTranscodeURL:"0.9.12.5",companionProxy:"0.9.12.5",editSimilarArtists:"0.9.12.2",neuterRedirect:"0.9.12.0",audioAsVideo:"0.9.12.0",compositeDelete:"0.9.12.0",batchEdit:"0.9.12.0",premiumMusic:"0.9.12.0",transientToken:"0.9.12.0",softSubtitles:"0.9.12.0",sharedSyncStatus:"0.9.11.14",reachability:"0.9.11.14",photoPlayQueues:"0.9.11.12",publicNowPlaying:"0.9.11.3",labels:"0.9.11.2",updater:"0.9.11.1",playItemsBatchAdd:"0.9.9.16",playlists:"0.9.9.13",
imageFilters:"0.9.9.13",hubFilterSigns:"0.9.9.12",cancelAllUpdates:"0.9.9.10",playQueues:"0.9.9.6",sectionSettings:"0.9.9.6",hubFilters:"0.9.9.2",streamingMKV:"0.9.9.16",chunkedHTTP:"0.9.9.3",sharedSync:"0.9.9.3",dash:"0.9.8.6",specificMediaDeletion:"0.9.7.23",sharedSettings:"0.9.7.23",syncNotifications:"0.9.7.23",universalMusicTranscoder:"0.9.8.3",universalTranscoder:"0.9.7.17",sync:"0.9.7.10",artworkUpload:"0.9.7.9",firstRunPref:"0.9.7.3",timelineState:"0.9.7.2",cleanBundles:"0.9.7.0",advancedFilters:"0.9.7.0",
search:"0.9.7.0",merge:"0.9.7.0",splitApart:"0.9.7.0",allowBlacklistedMethodHeaders:"1.2.1.0"};t.a=i},function(e,t,n){"use strict";function i(e){return e.entities}t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(440),s=r.a.extend({maxCycles:5,maxSize:100,getItemCacheKey:function(e,t){if(a.a.isFunction(e.cacheKey))return t||(t=e.toJSON()),e.cacheKey(t)}});t.a=s},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MMMM D, YYYY";return e?r()(e).format(t):"";
}Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),r=n.n(a);t.default=i},function(e,t,n){var i=n(455).default,a=n(84);e.exports=a(i)},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(14),l=n(20),c=n(34),u=n(27),d=n(705),h=c.a.extend({initialize:function(){a.a.bindAll(this,"onAjaxSend","onAjaxComplete"),this.requests=[],this.byId={}},startListening:function(){var e=s()(document);e.on("ajaxSend",this.onAjaxSend),e.on("ajaxComplete",this.onAjaxComplete)},stopListening:function(){
var e=s()(document);e.off("ajaxSend",this.onAjaxSend),e.off("ajaxComplete",this.onAjaxComplete)},abortAll:function(e){for(var t=this.requests.length-1;t>-1;t--){var n=this.requests[t];null!=e&&e!==n.settings.scope||this.abort(n)}},abort:function(e){var t=a.a.isString(e)?this.byId[e]:e;t&&(t.xhr.aborting=!0,t.xhr.abort(),this.remove(t))},store:function(e,t){var n=a.a.uniqueId("r");e.rid=n;var i={xhr:e,settings:t};return this.requests.push(i),this.byId[n]=i,i},remove:function(e){var t=a.a.indexOf(this.requests,e);
t>-1&&this.requests.splice(t,1),this.byId.hasOwnProperty(e.xhr.rid)&&delete this.byId[e.xhr.rid]},onAjaxSend:function(e,t,n){var i=this;if(!n.skipCorsWithRedirect){var a=this.store(t,n);t.always(function(){t.aborting||i.remove(a)})}},onAjaxComplete:function(e,t,i){var r=n.i(d.a)(t);if(!t.aborting&&r){var s=n.i(l.parseUrl)(i.url);if(!r||"/log"!==s.pathname){var c=n.i(o.a)("appModel").get("servers").find(function(e){var t=e.get("activeConnection"),n=t&&t.get("isConnected"),r=a.a.result(t,"url");return!!n&&0===i.url.indexOf(r);
});c&&(n.i(u.a)('[Connections] Active connection to "%s" lost authorization',c.get("debugName")),c.trigger("error:connection",c))}}}});t.a=new h},function(e,t,n){"use strict";function i(e){var t=parseFloat(e,10),n=e.match(/m?s/);switch(n&&(n=n[0]),n){case"s":return 1e3*t;case"ms":return t}return 0}t.a=i},function(e,t,n){"use strict";function i(e){return e.get("unviewedLeafCount")>0}function a(e){var t=e.get("viewCount"),n=e.get("viewOffset");return!(t&&!n)}function r(e){return!(!e||e.get("isFolder"))&&!h.a.get(e.get("type")).child;
}function s(e){return!i(e)}function o(e){return!a(e)}var l=n(2),c=n.n(l),u=n(14),d=n(4),h=n(36),p=n(55),f={movie:{showAddToPlaylist:!0,showAnalyze:!0,showDelete:!0,showDeleteVersions:!0,showDownload:!0,showEdit:!0,showFixMatch:!0,showInfo:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMatch:!0,showPlay:!0,showPlayVersion:!0,showPlayTrailer:!0,showQueue:!0,showRefresh:!0,showSplitApart:!0,showSync:!0,showConvert:!0,showUnmatch:!0,showShare:!0,showWatchLater:!0},show:{showAddToPlaylist:!0,showEdit:!0,
showDelete:!0,showFixMatch:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMatch:!0,showPlayAll:!0,showPlayUnwatched:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSplitApart:!0,showSync:!0,showConvert:!0,showUnmatch:!0},season:{showAddToPlaylist:!0,showEdit:!0,showDelete:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlayAll:!0,showPlayUnwatched:!0,showQueue:!0,showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0},episode:{showAddToPlaylist:!0,showAnalyze:!0,showDelete:!0,showDeleteVersions:!0,
showDownload:!0,showEdit:!0,showInfo:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlay:!0,showPlayVersion:!0,showQueue:!0,showRefresh:!0,showSync:!0,showConvert:!0,showShare:!0,showWatchLater:!0},artist:{showAddToPlaylist:!0,showEdit:!0,showDelete:!0,showFixMatch:!0,showMerge:!0,showMatch:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSplitApart:!0,showSync:!0,showUnmatch:!0},album:{showAddToPlaylist:!0,showEdit:!0,showDelete:!0,showFixMatch:!0,showMatch:!0,showPlay:!0,
showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSplitApart:!0,showSync:!0,showUnmatch:!0},track:{showAddToPlaylist:!0,showAnalyze:!0,showDelete:!0,showDownload:!0,showEdit:!0,showInfo:!0,showPlayMix:!0,showPlayMusicVideo:!0,showQueue:!0,showSelect:!0,showSync:!0},photoalbum:{showAddToPlaylist:!0,showEdit:!0,showPlay:!0,showQueue:!0,showShuffle:!0,showSync:!0},photo:{showAddToPlaylist:!0,showAnalyze:!0,showDelete:!0,showDownload:!0,showEdit:!0,showInfo:!0,showSync:!0},clip:{showEdit:!0,
showInfo:!0,showPlay:!0,showPlayVersion:!0,showShare:!0,showWatchLater:!0},userPlaylistItem:{showDeleteFromUserPlaylist:!0,showInfo:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlay:!0,showShare:!0,showSync:!0,showWatchLater:!0},playlist:{showDelete:!0,showEdit:!0,showPlay:!0,showQueue:!0,showShuffle:!0,showSync:!0},movieSection:{showAddToCollection:!0,showAddToPlaylist:!0,showAnalyze:!0,showEdit:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMerge:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,
showShuffle:!0,showSync:!0,showConvert:!0,showDelete:!0},showSection:{showAddToCollection:!0,showAddToPlaylist:!0,showEdit:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMerge:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0,showDelete:!0},seasonSection:{showAddToPlaylist:!0,showEdit:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMerge:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0,showDelete:!0},
episodeSection:{showAddToPlaylist:!0,showAnalyze:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0,showDelete:!0},artistSection:{showAddToCollection:!0,showAddToPlaylist:!0,showEdit:!0,showMerge:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showDelete:!0},albumSection:{showAddToPlaylist:!0,showEdit:!0,showMerge:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,
showSync:!0,showDelete:!0},trackSection:{showAddToPlaylist:!0,showEdit:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showDelete:!0},photoSection:{showAddToPlaylist:!0,showAnalyze:!0,showPlay:!0,showQueue:!0,showSelect:!0,showShuffle:!0,showSync:!0,showDelete:!0}},g={showListDropdown:["showShuffle","showQueue","showRefresh","showSync","showDownload","showWatchLater","showShare","showInfo"]},m=p.a.extend({initialize:function(e,t){t||(t={});var n=u.a("appModel");
this.item=t.item,this.playQueue=t.playQueue,this.parent=this.item||this.section,this.showAdvanced=t.showAdvanced,this.user=n.get("user"),this.signedIn=this.user.get("signedIn"),this.devices=this.user.get("desktop").get("devices"),this.setDefaults(t.type),this.listenToParent(),this.listenTo(this.user,{"change:signedIn":this.onSignedInChange,"change:providers.change":this.onUserProvidersChange}),this.listenTo(this.devices,"reset",this.onDevicesChange),this.listenTo(this,{"change:selecting":this.onSelectingChange,
"change:selectedItems":this.onSelectedItemsChange})},setDefaults:function(e){e&&e!==this.type&&(this.type=e,this.section&&(e+="Section"),this.defaults=c.a.clone(f[e]||{}),this.defaults.selecting=!1,this.defaults.selectedItems=[],this.clear().set(this.defaults))},setParent:function(e){this.parent&&this.stopListening(this.parent),this.server&&this.stopListening(this.server),this.item=e.item,this.section=e.section,this.parent=this.item||this.section,this.listenToParent()},listenToParent:function(){if(this.section){
var e=this.parent.get("currentType");e&&this.setDefaults(e.get("typeString")),this.listenTo(this.parent,{"change:currentType":this.onCurrentTypeChange,"change:allowSync":this.onAllowSyncChange})}else this.item&&(this.setDefaults(this.item.get("type")),this.listenTo(this.parent,{"change:primaryExtraKey":this.onPrimaryExtraChange,"change:unviewedLeafCount":this.onViewStateChange,"change:viewOffset":this.onViewStateChange,"change:viewCount":this.onViewStateChange}),this.showAdvanced&&this.listenTo(this.parent,{
"change:guid":this.onGuidChange,"change:Media":this.onMediaChange}));this.parent&&(this.server=this.parent.server,this.shared=this.server.get("shared"),this.synced=!this.server.get("isFullServer"),this.multiuser=this.server.get("multiuser"),this.playQueues=this.server.get("playQueueManager"),this.listenTo(this.server,"change:shared",this.onServerSharedChange)),this.updateAll()},updateAll:function(){this.updateSelectionStates(),this.updateAction("showPlay",this.canPlay),this.updateAction("showPlayAll",this.canPlay),
this.updateAction("showPlayUnwatched",this.canPlay),this.updateAction("showPlayVersion",this.canPlayVersion),this.updateAction("showPlayMix",this.canPlayMix),this.updateAction("showPlayTrailer",this.canPlayPrimaryExtra),this.updateAction("showPlayMusicVideo",this.canPlayPrimaryExtra),this.updateAction("showShuffle",this.canPlay,{shuffle:!0}),this.updateAction("showQueue",this.canQueue),this.updateAction("showEdit",this.canEdit),this.updateAction("showRefresh",this.canRefresh),this.updateAction("showSync",this.canSync),
this.updateAction("showConvert",this.canConvert),this.updateAction("showDownload",this.canDownload),this.updateAction("showAddToPlaylist",this.canAddToPlaylist),this.updateAction("showWatchLater",this.canWatchLater),this.updateAction("showShare",this.canShare),this.updateAction("showDelete",this.canDelete),this.updateAction("showDeleteVersions",this.canDeleteVersions),this.updateAction("showInfo",this.isMedia),this.updateAction("showMarkWatched",this.canMarkWatched),this.updateAction("showMarkUnwatched",this.canMarkUnwatched),
this.showAdvanced&&(this.updateAction("showSelect",this.canMultiSelect),this.updateAction("showAnalyze",this.canMultiAction),this.updateAction("showMerge",this.canMerge),this.updateAction("showAddToCollection",this.canMultiAction),this.updateAction("showMatch",this.canMatch),this.updateAction("showFixMatch",this.canFixMatch),this.updateAction("showUnmatch",this.canUnmatch),this.updateAction("showSplitApart",this.canSplitApart)),this.updateDropdown("showListDropdown")},updateAction:function(e,t,n){
var i=!!this.defaults&&this.defaults[e];this.set(e,t.call(this,i,n))},updateDropdown:function(e){var t=g[e],n=c.a.map(t,function(e){return this.get(e)},this);this.set(e,c.a.some(n))},updateSelectionStates:function(){var e=this.getActionTargets();if(e){var t=e[0].get("type"),n="show"===t||"season"===t,r=this.get("selectedItems"),l=!(!r||!r.length),u=c.a.some(r,function(e){return e.get("isFolder")}),d=!!c.a.some(e,n?i:a),h=!!c.a.some(e,n?s:o);this.set({selecting:l,hasSelectedFolder:u,hasUnwatched:d,
hasWatched:h})}},canPlay:function(e,t){return!!e&&(!(this.parent&&!this.playQueues.canCreateFor(this.parent,t))&&(!this.item||!this.item.get("isFolder")&&!this.item.get("hasInvalidKey")))},canQueue:function(e){return!(this.item&&!this.item.get("isLibraryItem"))&&(this.isMedia(e)&&this.canPlay(e))},canPlayVersion:function(e,t){return!(!e||!this.item)&&this.item.get("Media").length>1},canPlayMix:function(e){if(!e||!this.item)return!1;var t=this.item.get("related");return!(!t||!t.findWhere({browse:!1
}))},canPlayPrimaryExtra:function(e){return!(!e||!this.item)&&!!this.item.get("primaryExtraKey")},canAddToPlaylist:function(e){if(!e||!this.server)return!1;if(this.playQueue&&this.playQueue.get("isRadio"))return!1;var t,n=this.server.supports("playlists"),i=this.parent&&this.parent.get("currentSubset");if(i){var a=this.get("selectedItems"),r=c.a.some(a,function(e){return e.get("isFolder")});t=("all"===i.id||a&&a.length>0)&&!r}else t=this.item&&this.item.get("isLibraryItem");return n&&t},canRefresh:function(e){
if(!e||this.synced)return!1;var t=this.getActionTargets(),n=c.a.every(t,function(e){var t=this.shared&&e.get("isPlaylist"),n=e.get("isSection"),i=!this.shared&&(n||e.get("isLibraryItem")&&!e.get("isFolder"));return t||i},this);return n},canDownload:function(e){return(!this.playQueue||!this.playQueue.get("isRadio"))&&this.canRefresh(e)},canEdit:function(e){if(!e||!this.canRefresh(e))return!1;var t=this.getActionTargets();return!(t&&t.length>1&&!t[0].server.supports("batchEdit"))},canMultiSelect:function(e){
return!!e&&(!this.shared||this.multiuser)},canMultiAction:function(e){return!!e&&(this.item?this.canEdit(e):!this.shared&&!this.synced&&this.section)},canMarkWatched:function(e){if(!e)return!1;if(!this.item&&!this.section)return!1;if(!this.canMultiSelect(e)&&!r(this.item))return!1;var t=this.getActionTargets();if(!t)return!1;var n=t[0];return!(n.get("isSection")||n.get("isFolder")||!n.get("isLibraryItem"))&&this.get("hasUnwatched")},canMarkUnwatched:function(e){if(!e)return!1;if(!this.canMultiSelect(e)&&!r(this.item))return!1;
var t=this.getActionTargets();if(!t)return!1;var n=t[0];return!(n.get("isSection")||n.get("isFolder")||!n.get("isLibraryItem"))&&this.get("hasWatched")},canMatch:function(e){return this.canEdit(e)&&!this.canUnmatch(e)},canFixMatch:function(e){return this.canEdit(e)&&this.canUnmatch(e)},canUnmatch:function(e){if(!e||!this.item||this.shared||this.synced)return!1;var t=this.item.get("guid");return!(!t||/(local|none)\:\/\//.test(t))},canSplitApart:function(e){if(!e||!this.item||this.shared||this.synced)return!1;
var t;if("movie"===this.type){var n=this.item.get("Media");t=c.a.filter(n,function(e){return!e.proxyType})}else t=this.item.get("Location");return t.length>1&&this.server.supports("splitApart")},canMerge:function(e){if(!e)return!1;if(!this.canEdit(e))return!1;if(!this.server.supports("merge"))return!1;var t=this.get("selectedItems");return!(!t||t.length<2)},canSync:function(e){if(!e||!this.parent||this.synced)return!1;var t=this.devices.filterSyncDevices(this.item||this.section);if(!t.length)return!1;
var n=this.shared?"sharedSync":"sync",i=this.server.supports(n);if(!i||this.parent.get("isFolder"))return!1;var a;if(this.shared){var r=this.section||this.item.section;a=r&&r.get("allowSync")}else a=this.parent.get("allowSync")||this.parent.collection&&this.parent.collection.allowSync;return!!a},canConvert:function(e){if(!e||!this.parent||this.shared||this.synced)return!1;if(this.item&&!this.item.get("isLibraryItem"))return!1;var t=this.server.supports("streamReady"),n=this.server.get("transcoderVideo")&&this.server.get("backgroundProcessing");
return!(!t||!n||this.parent.get("isFolder"))},canWatchLater:function(e){if(!e||!this.item)return!1;var t="video"===h.a.getChildMediaType(this.type).element,n=!!this.item.get("url"),i=!this.item.userPlaylistKey||"queue"!==this.item.userPlaylistKey;return this.signedIn&&this.user.get("queueUid")&&t&&n&&i},canShare:function(e){if(!e)return!1;var t=this.item&&this.item.get("isLibraryItem");return!t&&this.signedIn&&!this.user.get("restricted")},canDelete:function(e){if(!e)return!1;if(this.item&&!this.item.get("isSection"))return this.canDeleteSingleItem(this.item);
if(!this.canMultiSelect(e))return!1;var t=this.getActionTargets();return!!t&&c.a.every(t,this.canDeleteSingleItem,this)},canDeleteSingleItem:function(e){if(!e||this.synced||e.get("isSection"))return!1;if(!r(e)&&!e.server.supports("compositeDelete"))return!1;var t=!(!e.get("isLibraryItem")||!this.server.get("allowMediaDeletion")||this.shared),n=e.get("playlistType");return t||n},canDeleteVersions:function(e){if(!e||!this.item||this.shared||this.synced)return!1;if(!this.server.get("allowMediaDeletion"))return!1;
var t=this.item.get("Media"),n=c.a.filter(t,function(e){return!!e.proxyType});return!!n.length},isMedia:function(e){if(!e)return!1;if(this.playQueue&&this.playQueue.get("isRadio"))return!1;if(!this.item)return!0;var t="photo"===this.type&&!this.item.get("isLibraryItem");return!t&&!this.item.get("isFolder")},shouldStartTrackingSelecting:function(e){var t=this.canMultiSelect(this.get("showSelect")),n=e.metaKey||e.ctrlKey||e.shiftKey;return t&&(n||this.get("selecting"))},selectItems:function(e,t){if(0!==e.length){
var n=this.get("selectedItems"),i=c.a.bind(this.updateAll,this),a=c.a.filter(e,function(e){return!c.a.contains(n,e)});c.a.each(a,function(e){e.selected=!0,n.push(e),this.listenTo(e,{"change:viewCount":i,"change:viewOffset":i,"change:unviewedLeafCount":i,"change:viewedLeafCount":i})},this);var r=this.sortSelectedItems(n,t);this.set("selectedItems",r),this.trigger("change:selectedItems",this,r)}},sortSelectedItems:function(e,t){var n=t&&t.superset;return n?c.a.sortBy(e,function(e){return n.indexOf(e);
}):c.a.clone(e)},deselectItems:function(e,t){if(0!==e.length){var n=this.get("selectedItems");c.a.each(e,function(e){var t=c.a.indexOf(n,e);t!==-1&&(e.selected=!1,n.splice(t,1),this.stopListening(e))},this),n.length||this.set("selecting",!1),this.trigger("change:selectedItems",this,n)}},selectItem:function(e,t){this.selectItems([e],t)},deselectItem:function(e,t){this.deselectItems([e],t)},deselectAll:function(){var e=this.get("selectedItems");e&&0!==e.length&&(c.a.each(e,function(e){e.selected=!1;
}),e.length=0,this.trigger("change:selectedItems",this,e))},getActionTargets:function(){var e=this.get("selectedItems");return e&&e.length>0?e:this.parent?[this.parent]:void 0},getActionTargetsTitle:function(){var e=this.getActionTargets();if(1===e.length){var t=e[0];return t.get("isSection")?t.getSyncTitle():t.get("title")}return 2===e.length?n.i(d.default)("{1} and {2}",e[0].get("title"),e[1].get("title")):3===e.length?n.i(d.default)("{1}, {2}, and {3}",e[0].get("title"),e[1].get("title"),e[2].get("title")):n.i(d.default)("{1}, {2}, and {3} others",e[0].get("title"),e[1].get("title"),e.length-2);
},onSignedInChange:function(e,t){this.signedIn=t,this.updateAction("showWatchLater",this.canWatchLater),this.updateAction("showShare",this.canShare),this.updateDropdown("showListDropdown")},onCurrentTypeChange:function(e,t){this.deselectAll(),this.setDefaults(t.get("typeString")),this.updateAll()},onAllowSyncChange:function(){this.updateAction("showSync",this.canSync)},onPrimaryExtraChange:function(){this.updateAction("showPlayTrailer",this.canPlayPrimaryExtra),this.updateAction("showPlayMusicVideo",this.canPlayPrimaryExtra);
},onViewStateChange:function(){this.updateSelectionStates(),this.updateAction("showMarkWatched",this.canMarkWatched),this.updateAction("showMarkUnwatched",this.canMarkUnwatched)},onGuidChange:function(){this.updateAction("showUnmatch",this.canUnmatch),this.updateAction("showMatch",this.canMatch),this.updateAction("showFixMatch",this.canFixMatch)},onMediaChange:function(){this.updateAction("showDeleteVersions",this.canDeleteVersions)},onServerSharedChange:function(e,t){this.shared=t,this.updateAll();
},onDevicesChange:function(){this.updateAction("showSync",this.canSync)},onSelectingChange:function(e,t){t||this.deselectAll()},onSelectedItemsChange:function(e,t){this.updateAll()}});t.a=m},function(e,t,n){"use strict";function i(e){return e.experienceSettings}t.a=i},function(e,t,n){"use strict";var i=n(2647),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),c=n(356),u=n(21),d=c.a.extend({tagName:"span",className:"rating star-rating",template:a.a,disabled:!0,modelEvents:{"change:rating":"onRatingChange",
"change:userRating":"onRatingChange"},events:l.a.extend({mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},c.a.prototype.events),initialize:function(e){c.a.prototype.initialize.apply(this,arguments);var t=this.model.server.get("shared")&&!this.model.server.get("multiuser");this.disabled=e.disabled||t,this.passive=e.passive,this.updateRating()},updateRating:function(){this.metadataRating=this.model.get("rating")||0,this.userRating=this.model.get("userRating"),this.setValue(this.userRating>0?this.userRating:this.metadataRating);
},normalizeRating:function(e){return Math.round(e/2)},serializeData:function(){var e=this.normalizeRating(this.currentValue);return{stars:[e>0,e>1,e>2,e>3,e>4]}},getValueForPosition:function(e){var t=this.$el,n=e-t.offset().left,i=n/t.width();return i=Math.min(Math.max(i,0),1),i=2*Math.ceil(5*i)},persistValue:function(){var e=this.currentValue||-1;u.a.execute("rate",{item:this.model,rating:e,passive:this.passive}),this.updateRating(),this.render()},displayValue:function(e){this.$el.data("value",e);
var t=this.normalizeRating(e),n=this.$(".star-icon");n.each(function(e){var n=t>e;s()(this).toggleClass("star",n).toggleClass("dislikes",!n)}),this.$el.toggleClass("unrated",!e)},onRender:function(){c.a.prototype.onRender.apply(this,arguments),this.$el.toggleClass("unrated",!this.currentValue),this.$el.toggleClass("user-rating",this.userRating>0),this.$el.toggleClass("disabled",this.disabled)},onRatingChange:function(e,t){this.updateRating(),this.render()},onMouseEnter:function(e){this.disabled||(this.$el.addClass("user-rating"),
this.$el.removeClass("unrated"))},onMouseLeave:function(e){this.disabled||this.render()},onMouseMove:function(e){if(!this.disabled)if(this.dragging)this.updateForPosition(e.pageX);else{var t=this.getValueForPosition(e.pageX);this.displayValue(t)}},onDragComplete:function(){this.disabled||this.persistValue()}});t.a=d},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(47),s=n(10),o=n(14),l=n(4),c=n(8),u=n(39),d=n(36),h=n(95),p=n(268),f=n(266),g=n(249),m=n(314),v=n(21),y=n(145),b=n(286),S=s.a.Layout.extend({
mixins:y.a,posterWidth:250,ui:{poster:".item-poster"},regions:{rating:".rating-container",summary:".summary-container",audio:".item-audio",subtitles:".item-subtitles",studio:".studio-flag-container",contentRating:".content-rating-flag-container",videoResolution:".video-audio-flags-container",audioCodec:".video-audio-flags-container",audioChannels:".video-audio-flags-container",poster:".details-poster-container",list:".details-list-region"},events:{"click .details-poster-container > .play-btn":"onPlayClick",
"click .item-unavailable-btn":"onUnavailableClick"},initialize:function(e){a.a.bindAll(this,"onResize","onScroll");var t=n.i(o.a)("appModel");this.mediaActions=e.mediaActions,this.children=this.model.get("children"),this.shared=this.model.server.get("shared"),this.synced=!this.model.server.get("isFullServer"),this.multiuser=this.model.server.get("multiuser"),this.progress=new r.a.Model({loading:!1,failed:!1}),this.listenTo(t,"change:primaryPlayer",this.onPrimaryPlayerChange),this.pageSize&&(c.a.trigger("content.subscribe:resize",this.onResize),
c.a.trigger("content.subscribe:scroll",this.onScroll)),this.mirror()},serializeData:function(){var e=this.model.server.get("playQueueManager"),t=this.model.get("grandparentKey"),n=this.model.get("parentKey");return{serverID:this.model.server.id,grandparentKey:n?encodeURIComponent(t):null,parentKey:n?encodeURIComponent(n):null,canPlay:e.canCreateFor(this.model),limited:this.shared||this.synced}},mirror:function(){var e=n.i(o.a)("appModel");if(this.allowMirror&&e.get("primaryPlayer")){var t;t=this.model.get("isPlaylist")?this.model.get("playlistType"):d.a.getChildMediaType(this.model.get("type")).element;
var i=u.a.getTypeByElement(t),a=g.a.getInstance(i,{isPassive:!0});a&&a.mirror({item:this.model})}},populatePage:function(){this.progress.set("loading",!0);var e=this.children.populateRange({start:0,end:this.children.get("populatedRange").end+this.pageSize,scope:"page"});return e.always(a.a.bind(function(){this.progress.set("loading",!1)},this)),e},getPreferredMedia:function(){var e=n.i(o.a)("appModel"),t=e.get("settings"),i=d.a.getChildMediaType(this.model.get("type")).element,a={item:this.model,
type:i,profile:m.a.prop(i),transcodeServer:p.a.resolveTranscodeServer({type:i,item:this.model,fallbackServer:e.get("primaryServer")}),allowDirectPlay:t.get("directPlay"),allowedAC3Containers:t.get("allowAC3")?"mp4":null,subtitlesBurnLevel:t.get("subtitlesBurnLevel")};return i===u.a.types.VIDEO&&(a.quality=h.a.getCurrentQuality(this.model,t)),f.a.getMediaDecision(a).media},onRender:function(){if(this.children&&this.ListConstructor){var e;e=this.pageSize?this.populatePage():this.children.fetch({scope:"page"
}),e.fail(a.a.bind(function(){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem loading these items.")}),this.progress.set("failed",!0)},this)),this.list.append(new this.ListConstructor({model:this.model,mediaActions:this.mediaActions,listModel:this.children,collection:this.children.get("metadataItems"),itemViewOptions:this.listItemViewOptions}))}this.starRatingView&&this.rating.show(this.starRatingView),this.audioDropdown&&this.audio.append(this.audioDropdown),this.subtitlesDropdown&&this.subtitles.append(this.subtitlesDropdown),
this.posterImage&&this.posterImage.setElement(this.ui.poster),this.studioFlag&&this.studio.show(this.studioFlag),this.contentRatingFlag&&this.contentRating.show(this.contentRatingFlag),this.videoResolutionFlag&&this.videoResolution.append(this.videoResolutionFlag),this.audioCodecFlag&&this.audioCodec.append(this.audioCodecFlag),this.audioChannelsFlag&&this.audioChannels.append(this.audioChannelsFlag),this.summaryView&&this.summary.append(this.summaryView)},onClose:function(){this.posterImage&&this.posterImage.close(),
this.pageSize&&(c.a.trigger("content.unsubscribe:resize",this.onResize),c.a.trigger("content.unsubscribe:scroll",this.onScroll))},onPrimaryPlayerChange:function(e,t){t&&this.mirror()},onPlayClick:function(e){e.preventDefault(),v.a.execute("playMedia",{item:this.model})},onUnavailableClick:function(e){e.preventDefault(),c.a.trigger("show:modal",new b.a({model:this.model}))},onResize:function(e){this.containerSize=e},onScroll:function(e){if(!this.progress.get("loading")){var t=this.model.get("children"),n=e.scrollHeight-this.containerSize.innerHeight,i=n-e.scrollTop<10,a=t.get("populatedRange").end<t.get("totalSize");
i&&a&&this.populatePage()}}});t.a=S},function(e,t,n){"use strict";var i=n(2781),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(47),u=n(4),d=n(8),h=n(36),p=n(638),f=n(427),g=n(1702),m=n(138),v=m.a.extend({name:"addToPlaylistModal",className:"add-to-playlist-modal select-modal modal modal-sm fade",template:a.a,ui:{addBtn:".add-btn",newPlaylist:".message"},regions:{list:".playlists-container"},events:s.a.extend({"click .playlist":"onPlaylistClick","keyup .message":"onNewPlaylistKeyUp","click .message":"onNewPlaylistClick",
"click .add-btn":"onAddClick"},m.a.prototype.events),initialize:function(e){m.a.prototype.initialize.apply(this,arguments),this.items=e.items,this.title=e.title,(!this.items||1===this.items.length&&this.items[0]===this.model)&&(this.ignoreTargets=!0),this.model.get("isMetadataList")?this.leafType=h.a.getChildMediaType(this.model.get("firstItemType")).element:this.model.get("playQueueID")?this.leafType=this.model.get("mediaType"):this.leafType=h.a.getChildMediaType(this.model.get("type")).element,
this.smart=this.model.get("isSection")&&this.ignoreTargets,this.playlistList=new p.a({},{server:this.model.server,section:new c.a.Model({currentType:this.leafType,onlyDumb:!0})}),this.playlists=this.playlistList.getCollection(),this.loading=!0,this.playlistList.populate().always(this.whenRendered(this.onPopulated))},serializeData:function(){return{loading:this.loading,showExisting:!this.smart,hasPlaylists:this.playlists.length>0}},toggleAddButton:function(){var e=this.ui.newPlaylist.val().trim();this.ui.addBtn.toggleClass("disabled",!e);
},suggestTitleIfEmpty:function(){""===this.ui.newPlaylist.val()&&(this.ui.newPlaylist.val(this.title),this.ui.newPlaylist.select(),this.toggleAddButton())},_addToPlaylist:function(e){this.ui.addBtn.addClass("active");var t,i=this.model.server;this.ignoreTargets||(t=i.supports("playItemsBatchAdd")?this.items:s.a.first(this.items));var a=e.addContent(this.model,{items:t});return a.done(this.whenRendered(this.hide)),a.fail(this.whenRendered(function(){this.ui.addBtn.removeClass("active"),d.a.trigger("show:alert",{
type:"error",message:n.i(u.default)("There was a problem adding to the playlist.")})})),a},_createPlaylist:function(){var e=this.ui.newPlaylist.val().trim();if(e){var t=new f.a({title:e,playlistType:this.leafType,smart:this.smart},{server:this.model.server}),n=this._addToPlaylist(t);n.then(s.a.bind(function(){d.a.trigger("navigate","playlist",{serverID:t.server.id,key:t.get("ratingKey")})},this))}},onRender:function(){m.a.prototype.onRender.apply(this,arguments),this.smart&&setTimeout(this.whenRendered(function(){
this.ui.newPlaylist.focus(),this.suggestTitleIfEmpty()}),this.focusDelay)},onPopulated:function(){this.loading=!1,this.render(),this.list.show(new g.a({collection:this.playlists}))},onNewPlaylistKeyUp:function(e){this.toggleAddButton(),13===e.keyCode&&this._createPlaylist()},onNewPlaylistClick:function(){this.suggestTitleIfEmpty()},onPlaylistClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("id"),i=this.playlists.get(n);this._addToPlaylist(i)},onAddClick:function(e){e.preventDefault(),
this.ui.addBtn.isDisabled()||this._createPlaylist()}});t.a=v},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(17),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(28),m=n.n(g),v=n(219),y=n(2399),b=n.n(y),S=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onChange=function(e){i.props.onChange(e.target.value)},i.onRef=function(e){i.inputElement=e;
},a=n,u()(i,a)}return h()(t,e),t.prototype.componentDidMount=function(){this.props.focusOnMount&&this.inputElement.focus()},t.prototype.render=function(){var e=this.props,t=e.className,n=e.errorClassName,i=e.disabledClassName,r=e.isDisabled,o=e.size,l=e.type,c=e.name,u=e.hasError,d=s()(e,["className","errorClassName","disabledClassName","isDisabled","size","type","name","hasError"]);return f.a.createElement("input",a()({},d,{ref:this.props.focusOnMount?this.onRef:null,id:c,name:c,type:l,disabled:r,
className:m()(t,b.a[o],r&&i,u&&n),onChange:this.onChange}))},t}(p.Component);S.defaultProps={className:b.a.input,errorClassName:b.a.hasError,disabledClassName:b.a.isDisabled,isDisabled:!1,size:v.LARGE,type:"text",hasError:!1,focusOnMount:!1},t.a=S},function(e,t,n){"use strict";function i(e){var t=function(t){function i(e,a){o()(this,i);var s=c()(this,t.call(this,e,a));return s.onFormStoreChange=function(){var e=s.props.name,t=s.store.getState(),i=t[e];i||s.initializeInputState(s.props),n.i(b.a)(t,s.previousFormState)||(s.previousFormState=t,
s.handleStateChange(s.props)),s.state!==i&&null!=i&&s.setState(i)},s.onChange=function(e){s.handleStateChange(s.props,e)},s.onBlur=function(){if(!s.hasBlurred){s.hasBlurred=!0;var e=s.store.getState(),t=s.props.name,n=e[t],i=s.calculateErrors(n.value,e,s.props);s.actions.change({name:t,change:r()({},n,{errors:i,showErrors:0!==i.length})})}},s.store=a.formStore,s.actions=n.i(m.bindActionCreators)(M.b,s.store.dispatch),s.state=null,s.hasBlurred=!1,s}return d()(i,t),i.prototype.componentWillMount=function(){
this.previousFormState=this.store.getState(),this.unsubscribe=this.store.subscribe(this.onFormStoreChange),this.initializeInputState(this.props)},i.prototype.componentWillReceiveProps=function(e){n.i(v.a)(e.initialValue)&&n.i(v.a)(this.props.initialValue)?n.i(b.a)(e.initialValue,this.props.initialValue)||this.handleStateChange(e,e.initialValue):e.initialValue!==this.props.initialValue&&this.handleStateChange(e,e.initialValue)},i.prototype.shouldComponentUpdate=function(e,t){return n.i(S.a)(this,e,t);
},i.prototype.componentWillUnmount=function(){var e=this.props.name;this.unsubscribe&&this.unsubscribe(),this.actions.change({name:e,change:null})},i.prototype.initializeInputState=function(e){var t=e.name,n=e.initialValue;this.actions.change({name:t,change:{errors:[],showErrors:!1,value:n}})},i.prototype.handleStateChange=function(e,t){var n=this.store.getState(),i=e.name,a=n[i],r=null!=t?t:a.value,s=this.calculateErrors(r,n,e);a.value===r&&p.a.isEqual(a.errors,s)||this.actions.change({name:i,change:{
errors:s,showErrors:this.hasBlurred&&0!==s.length,value:r}})},i.prototype.calculateErrors=function(e,t,n){var i=n.validations,a=i.map(function(n){return n(e,t)}).filter(function(e){return null!=e});return a},i.prototype.render=function(){var t=this.props.errors;if(!this.state)return null;var n=t.length>0,i=this.state,a=i.value,s=i.errors,o=i.showErrors;return g.a.createElement(e,r()({},this.props,{showErrors:!!n||o,errors:n?t:s,value:a,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur
}))},i}(f.Component);return t.displayName="FormInput("+n.i(y.a)(e)+")",t.WrappedComponent=e,t.contextTypes={formStore:w.a},t.defaultProps={validations:[],errors:[]},t}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(2),p=n.n(h),f=n(1),g=n.n(f),m=n(611),v=(n.n(m),n(33),n(180)),y=n(273),b=n(274),S=n(25),w=n(749),M=n(139);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(7),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(14),m=n(4),v=n(25),y=n(23),b=n(51),S=n(97),w=n(822),M=n(117),I=n(91),C=n(98),D=n(71),T=n(92),x=n(78),P=n(2409),E=n.n(P),A=function(e){
function t(i,a){l()(this,t);var r=u()(this,e.call(this,i,a));return r.onCancel=function(){var e=n.i(g.a)("metrics");e.trackClick(s()({},r.props.metricsProperties,{page:r.props.metricsPage,action:"cancel"})),r.props.onCancel()},r.onAccordChange=function(e){r.setState({isAccordGiven:e.target.checked})},r.state={isAccordGiven:!1},r}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.isCancelButtonDisabled,i=e.isConfirmButtonSpinning,r=e.isOpen,o=e.metricsPage,l=e.metricsProperties,c=e.kind,u=e.title,d=e.message,h=e.accordMessage,p=e.confirmLabel,g=e.cancelLabel,v=e.hideCancelButton,P=e.onConfirm,A=!!h,L=i||A&&!this.state.isAccordGiven;
return a()(M.a,{size:y.d.SMALL,isOpen:r,metricsPage:o,metricsProperties:l,onModalClose:this.onCancel},void 0,a()(I.a,{onModalClose:this.onCancel},void 0,a()(C.a,{},void 0,u),a()(D.a,{className:E.a.confirmBody},void 0,d,A&&a()("label",{className:E.a.accordLabel},void 0,a()("input",{type:"checkbox",className:E.a.accordInput,checked:this.state.isAccordGiven,onChange:this.onAccordChange}),h)),a()(T.a,{},void 0,a()(x.a,{},void 0,!v&&a()(b.a,{className:E.a.cancelButton,kind:y.c.DEFAULT,isDisabled:t,onPress:this.onCancel
},void 0,g||n.i(m.default)("Cancel")),f.a.createElement(w.a,s()({},l,{page:o,action:"confirm"}),a()(S.a,{className:E.a.confirmButton,"data-autofocus":!0,kind:c,isDisabled:L,isSpinning:i,onPress:P},void 0,p||n.i(m.default)("OK")))))))},t}(p.Component);A.defaultProps={isConfirmButtonSpinning:!1,kind:y.c.PRIMARY},t.a=A},function(e,t,n){"use strict";function i(e){return o.a.createElement(c.a,r()({className:d.a.innerEmptyPage,contentClassName:d.a.innerEmptyPageContent,scrollDirection:l.a.NONE},e))}var a=n(7),r=n.n(a),s=n(1),o=n.n(s),l=n(23),c=n(140),u=n(935),d=n.n(u);
t.a=i},function(e,t,n){"use strict";function i(e,t,n,i){var a=encodeURIComponent(e.machineIdentifier),s=encodeURIComponent(n),o=["#!/server",a,"section",s];if(i.filters){var l=i.filters.split("="),c=l[0],u=l[1];o.push("filter","0",c,u,encodeURIComponent(i.filterLabel))}return r.join(o)}function a(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e&&t&&n){if(t.isLibraryProvider)return i(e,t,n,a);var s=encodeURIComponent(e.machineIdentifier),o=encodeURIComponent(t.identifier),l=encodeURIComponent(n);
return r.join("#!/server/"+s+"/provider/"+o+"?key="+l,a)}}var r=n(20);t.a=a},function(e,t){e.exports={defaultSpeed:"0.2s",slowSpeed:"0.6s",fastSpeed:"0.1s",motionEasing:"cubic-bezier(0.6, 0.4, 0.2, 1.4)",menuSpeed:"0.15s",modalSpeed:"0.2s",tooltipSpeed:"0.15s",starSpeed:"0.3s",posterFlipSpeed:"0.8s",overlaySpeed:"0.3s"}},,,,,function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(1147);n.d(t,"a",function(){return s});var s={CONTENT:"content",SUBSCRIBE:"subscribe",SEARCH:"search",MATCH:"match",METADATA:"metadata",
TIMELINE:"timeline",PLAY_QUEUE:"playqueue",RATE:"rate",MANAGE:"manage"},o=a.a.extend({name:"ProviderFeatureModel",context:["server","provider"],idAttribute:"type",syncedAttrs:{key:i.a.string,scrobbleKey:i.a.string,unscrobbleKey:i.a.string,type:i.a.string},syncedRelations:{directories:{relationClass:r.a,rootPropertyName:"Directory",deferred:!0}}});t.b=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(47),l=n(2361),c=n.n(l),u=n(14),d=n(81),h=n(428),p=n(59),f=n(16),g=n(421),m=n(18),v=n(94),y=n(705),b=n(435),S=n(658),w=n(654),M=n(657),I=n(653),C=n(1181),D={
PENDING:"pending",LOCKED:"locked",UNLOCKED:"unlocked"},T={EMPTY:"",UNSUBSCRIBED:"unsubscribed",ACTIVE:"active",ERROR:"error",REMOVED:"removed"},x=m.a.extend({mixins:[h.a],name:"UserModel",context:["server"],url:"/api/v2/user",sessionAttrs:{isSignedIn:f.a.boolean.isRequired,hasInvalidToken:f.a.boolean.isRequired,lastPrimaryServerID:f.a.string,lockState:f.a.oneOf(D.PENDING,D.LOCKED,D.UNLOCKED).isRequired,homeUsers:f.a.instanceOf(I.a).isRequired,homeDetails:f.a.instanceOf(C.a).isRequired},syncedAttrs:{
id:f.a.integer,uuid:f.a.string,authToken:f.a.string,username:f.a.string,email:f.a.string,emailOnlyAuth:f.a.boolean,title:f.a.string,locale:f.a.string,thumb:f.a.string,pin:f.a.string,home:f.a.boolean,restricted:f.a.boolean,guest:f.a.boolean,homeSize:f.a.integer,maxHomeSize:f.a.integer,queueUid:f.a.string,queueEmail:f.a.string,hasAllEntitlements:f.a.boolean,mailingListActive:f.a.boolean,mailingListStatus:f.a.oneOf(T.EMPTY,T.UNSUBSCRIBED,T.ACTIVE,T.ERROR,T.REMOVED)},syncedRelations:{subscription:{relationClass:b.a
},roles:{relationClass:S.a},entitlements:{relationClass:w.a},providers:{relationClass:M.a}},derivedAttrs:{isLocked:function(){return this.get("lockState")===D.LOCKED},isUnlocked:function(){return this.get("lockState")===D.UNLOCKED},isFullUser:function(){return!!this.get("username")},isEmployee:function(){return!!this.get("roles").get("employee")},isNinja:function(){return this.get("isEmployee")||!!this.get("roles").get("ninja")},hasPlexPass:function(){return!!this.get("subscription").get("active");
},canGoPremium:function(){var e=this.get("homeSize")>1;return this.get("signedIn")&&!this.get("restricted")&&!this.get("hasPlexPass")&&!e},signedIn:function(){return this.get("isSignedIn")},locked:function(){var e=this.get("lockState");return e===D.LOCKED||e!==D.UNLOCKED&&null}},defaults:function(){var e={server:this.server,parent:this};return{isSignedIn:!1,hasInvalidToken:!1,lockState:D.PENDING,homeUsers:new I.a([],e),homeDetails:new C.a({},e)}},initialize:function(e,t){this._resetPopulate(),this.onHomeUsersChange(this,this.get("homeUsers")),
this.on("change:homeUsers",this.onHomeUsersChange,this),this.listenTo(this.server,{"change:isConnected":this.onServerConnectedChange,"change:isUnavailable":this.onServerUnavailableChange})},uninitialize:function(){this.off("change:homeUsers",this.onHomeUsersChange,this),this.stopListening()},fetch:function(){return o.a.Model.prototype.fetch.apply(this,arguments)},augmentResponse:function(e){var t=e.roles,n=e.entitlements,i=e.providers,r=a.a.extend({},e,{roles:t&&t.role,hasAllEntitlements:n&&n.all,
entitlements:n&&n.entitlement,providers:i&&i.provider});return r},signInWithStoredToken:function(){var e=this;if(!this._isSigningIn){this._isSigningIn=!0;var t=d.a.get("myPlexAccessToken");t.done(function(t){var i,r=e.server.getXHROptions(a.a.result(e,"url")),o=a.a.extend({},r.headers,(i={},i["X-Plex-Token"]=t,i));r.headers=o;var l=s.a.ajax(r);l.done(function(t){var i=e.get("homeDetails"),a=i.fetch({headers:o});a.always(function(){var a=e.parse(t),r=e.get("lockState");if(r!==D.UNLOCKED){var s=n.i(u.a)("appModel").get("settings"),o=p.a.get("proxied")||s.get("autoLogin"),l=!!a.guest&&!i.get("guestEnabled"),c=!!a.home&&(!o||l);
r=c?D.LOCKED:D.UNLOCKED}e.signIn(a,{lockState:r}),e._isSigningIn=!1})}),l.fail(function(t){if(t.aborting)return void(e._isSigningIn=!1);var i=n.i(y.a)(t);e.signOut({hasInvalidToken:i}),e.server.testAllConnections(),i&&e.clearAccessToken(),e._isSigningIn=!1})}),t.fail(function(){e.signOut(),e._isSigningIn=!1})}},signIn:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=a.a.isString(e)?this.parse(e):e,r=i.authToken,s=a.a.extend({
isSignedIn:!0},i,t);return this._resolve(s,n),d.a.set("myPlexAccessToken",r)},signOut:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._reject(e),s.a.Deferred().resolve().promise()},activateStoredUser:function(e){v.a.set("activeUserID",e);var t=v.a.getActiveUser();if(t){var n=t.get("lastPrimaryServerID");this.set("lastPrimaryServerID",n)}},clearAccessToken:function(){window.PLEXWEB&&window.PLEXWEB.myPlexAccessToken&&delete window.PLEXWEB.myPlexAccessToken;var e=d.a.remove("myPlexAccessToken");
return e=e.then(function(){return v.a.clearActiveUser()})},hashPIN:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.get("authToken");return c.a.SHA256_hash(e+t)},hasEntitlement:function(e){var t=this.get("hasAllEntitlements"),n=this.get("entitlements");return!(!t&&!n.get(e))},hasHome:function(){return!!this.get("pin")||this.get("homeUsers").length>1},isFullUser:function(){return this.get("isFullUser")},isEmployee:function(){return this.get("isEmployee")},isNinja:function(){
return this.get("isNinja")},hasPlexPass:function(){return this.get("hasPlexPass")},_resolve:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.startCapturingChangeEvents(),this.activateStoredUser(e.id),this.set(e),this._resolvePopulate(),this.server.authenticate(e.authToken),t.silent?this.discardCapturedChangeEvents():this.releaseCapturedChangeEvents()},_reject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.startCapturingChangeEvents(),
this.restoreDefaults(e),this._rejectPopulate(),this.server.deauthenticate(),t.silent?this.discardCapturedChangeEvents():this.releaseCapturedChangeEvents()},onHomeUsersChange:function(e,t){var n=e.previous("homeUsers");n&&this.stopListening(n),this.listenTo(this.get("homeUsers"),"reset add remove",this.onHomeUsersUpdate)},onHomeUsersUpdate:function(){this.set("homeSize",this.get("homeUsers").length),this.get("homeDetails").fetch()},onServerConnectedChange:function(e,t){t&&this.signInWithStoredToken();
},onServerUnavailableChange:function(e,t){t&&this.signOut({lockState:this.get("lockState")})}},{lockStates:D,mailingListStates:T});n.i(g.a)(x,function(){return{relationClass:n.i(u.a)("UserFlexModel")}}),t.a=x},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(274)),r=n.i(i.createSelectorCreator)(i.defaultMemoize,a.a);t.a=r},function(e,t,n){"use strict";function i(e){return e.user}t.a=i},function(e,t,n){"use strict";t.a={NORMAL:0,LOCAL:42,CLOUD:43}},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(20),s=n(47),o=n(127),l=n(36),c=n(736),u=n(636),d={
uri:function(e,t){var n=t&&t.items;if(n&&n.length){if(n.length>1)return this.getBatchLibraryMetadataURI(n,t);e||(e=a.a.first(n))}if(e instanceof s.a.Model){if(e.get("isSection"))return this.getSectionURI(e,t);if(e.get("isMetadataList"))return this.getMetadataListURI(e,t);if(e.get("isPlaylist"))return this.getPlaylistURI(e,t);if(e.channel)return this.getChannelURI(e,t)}return this.getLibraryMetadataURI(e,t)},getSectionURI:function(e,t){var n,i=a.a.result(e,"url"),s=e.get("currentSubset"),o=e.get("currentFolderKey"),c=e.get("currentType");
if("folder"===s.id)n=o?o:r.join([i,"all"]);else{var u=e.get("items"),d=u.getParams();if(d.type&&delete d.type,d.timelineState&&delete d.timelineState,d.unwatchedLeaves){var h=l.a.getChildMediaType(e.get("type")).typeString;d[h+".unwatched"]=1,delete d.unwatchedLeaves}c&&(d.sourceType=c.id),n=r.join([i,s.id],d),n=u.replaceSpecialFilterOperators(n)}return this._resolveURI({prefix:"library",parts:[e.get("uuid"),"directory",n]})},getBatchLibraryMetadataURI:function(e,t){var n=this._getSectionInfo(a.a.first(e)),i=a.a.map(e,function(e){
return e.get("ratingKey")}),r="/library/metadata/"+i.join(",");return this._resolveURI({prefix:"library",parts:[n.sectionUUID,"directory",r]})},getLibraryMetadataURI:function(e,t){t||(t={});var n,i=this._getSectionInfo(e),s=a.a.result(e,"url");return t.excludeSeedItem&&(s=r.join(s,{excludeSeedItem:1})),n=e.models||e.collectionName||e instanceof u.a?"directory":"item",this._resolveURI({prefix:"library",parts:[i.sectionUUID,n,s]})},getMetadataListURI:function(e,t){var n=this._getSectionInfo(e);return this._resolveURI({
prefix:"library",parts:[n.sectionUUID,"directory",e.get("containerKey")]})},getPlaylistURI:function(e,t){return this._resolveURI({prefix:"playlist",parts:["",e.get("guid")]})},getChannelURI:function(e,t){t||(t={});var n=a.a.result(e,"url"),i=e.get("items"),r=i&&i.length?"directory":"item";return this._resolveURI({prefix:"channel",parts:[e.channel.get("identifier"),r,n]})},title:function(e,t){var n=t&&t.items;if(n&&n.length){if(n.length>1)return this.getBatchLibraryMetadataTitle(n,t);e=a.a.first(n);
}return e.get("isSection")?this.getSectionTitle(e,t):e.get("isMetadataList")?this.getMetadataListTitle(e,t):this.getLibraryMetadataTitle(e,t)},getSectionTitle:function(e){var t=e.get("title"),n=e.get("currentSubset"),i=e.get("currentFilters");if("all"!==n.id)return t+": "+n.get("title");if(!i.length)return t;var r=a.a.flatten(a.a.map(i,function(e){return e.titles}));return t+": "+r.join(", ")},getMetadataListTitle:function(e){return e.get("containerTitle")||e.get("title")},getBatchLibraryMetadataTitle:function(e){
var t=a.a.map(e,function(e){return e.get("title")});return n.i(c.a)(t)},getLibraryMetadataTitle:function(e){var t=e.get("grandparentTitle")||e.get("parentTitle"),i=e.get("title");if(t&&(i=t+" - "+i),"episode"===e.get("type")){var a=n.i(o.a)({seasonIndex:e.get("parentIndex"),episodeIndex:e.get("index"),date:e.get("originallyAvailableAt"),noLeadingZero:!0,separator:" "});i+=" ("+a+")"}return i},_resolveURI:function(e){var t=e.parts,n=a.a.map(t,function(e){return e?encodeURIComponent(e):""});return e.prefix+"://"+n.join("/");
},_getSectionInfo:function(e){var t=e.get("librarySectionUUID"),n=e.get("librarySectionID");if(!t||!n){var i=e.server.getSectionForItem(e);a.a.isEmpty(i)||(t=i.get("uuid"),n=i.id)}return{sectionUUID:t,sectionID:n}}};t.a=d},function(e,t,n){"use strict";function i(e){if(!e)return"";var t=r.a.find(u,function(t){var n=t[0];return e<=n}),n=t[1];return n(e)}var a=n(2),r=n.n(a),s=n(685),o=n(212),l=n(684),c=n(683),u=[[54e5,s.a],[864e5,o.a],[6048e5,l.a],[1/0,c.a]];t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){
return i}),n.d(t,"b",function(){return a});var i="boolean",a="other"},function(e,t,n){"use strict";function i(e,t){if(!e)return t;var n=a.a.parseXML(e.responseText);return n&&n.message?n.message:t}var a=n(38);t.a=i},function(e,t,n){"use strict";function i(e){if(!e||"object"!==("undefined"==typeof e?"undefined":o()(e)))return!1;var t="function"==typeof e.constructor?r()(e):Object.prototype;if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&l(n)===c}var a=n(2214),r=n.n(a),s=n(119),o=n.n(s);
t.a=i;var l=function(e){return Function.prototype.toString.call(e)},c=l(Object)},function(e,t,n){"use strict";var i={waitingRegex:/^(transcoded|downloaded|directplay|processed)$/,processingRegex:/^(pending|transcoding|downloading)$/,failedRegex:/^(failed|error)$/,addVersionHeader:function(e,t){return t||(t={}),t.headers||(t.headers={}),t.headers["X-Plex-Sync-Version"]=e,t},addVersionHeaderForDevice:function(e,t){var n=e&&e.get("syncList");return n&&n.get("version")?this.addVersionHeader(n.get("version"),t):t;
},getSyncStateFromPart:function(e){return e.transcodeState||e.syncState},getSyncStateContextFromPart:function(e){return e.transcodeStateContext||e.syncStateContext}};t.a=i},function(e,t,n){"use strict";function i(e){if(c===e)return u;var t=e.split("?"),n=t.length>1?t[1]:void 0,i=n?o.parseParams(n):{};return c=e,u={url:t[0],params:i}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.hash,a=i(t);return o.join(a.url,s()({},a.params,{type:e.type,filters:n.i(l.a)(e.filters),
filterLabel:e.filterLabel,sort:e.sort}))}var r=n(7),s=n.n(r),o=n(20),l=n(699);t.a=a;var c=void 0,u=void 0},function(e,t,n){"use strict";var i=n(53),a=n(31);n.d(t,"b",function(){return r}),n.d(t,"a",function(){return s});var r=n.i(i.a)(a._26),s=n.i(i.a)(a._27)},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(r.a)(),function(e){var t=e.desktop;return t.activities})}var a=n(9),r=(n.n(a),n(63));t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0
});var i=n(67);n.d(t,"SERVER",function(){return i.f}),n.d(t,"PROVIDER",function(){return i.e}),n.d(t,"LIBRARY",function(){return i.g}),n.d(t,"HUB",function(){return i.c}),n.d(t,"METADATA_LIST",function(){return i.d}),n.d(t,"METADATA_ITEM",function(){return i.b}),n.d(t,"SESSION",function(){return i.i}),n.d(t,"USER_PLAYLIST_ITEM",function(){return i.h}),n.d(t,"MEDIA_SUBSCRIPTION",function(){return i.a}),n.d(t,"SEARCH_RESULT",function(){return a}),n.d(t,"SYNC_METADATA_ITEM",function(){return r});var a="searchResults",r="syncMetadataItems";
},function(e,t,n){"use strict";var i=n(2683),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(4),d=n(8),h=c.a.ItemView.extend({className:"summary",template:a.a,ui:{summary:".metadata-summary",divider:".summary-divider",dividerBtn:".summary-divider-btn"},events:{"click .summary-divider-btn":"onMoreSummaryClick"},onlyAfterRender:["onDeferredRender","updateDividerBtnVisibility"],bindings:{".item-summary":{modelAttribute:"summary",autohide:!0,isHtml:!0,formatter:function(e){if(this.$el.toggleClass("hidden",!e),
this.updateDividerBtnVisibility(),e){var t=s.a.map(s.a.compact(e.split("\n")),function(e){return l.a.trim(s.a.escape(e))});if(t.length)return"<p>"+t.join("</p><p>")+"</p>"}}}},initialize:function(){this.listenTo(d.a,"resize",this.onResize),this.listenTo(this.model,"change:summary",this.onSummaryChange)},updateDividerBtn:function(e){var t=e?n.i(u.default)("More"):n.i(u.default)("Less");this.ui.dividerBtn.html(t)},updateDividerBtnVisibility:function(){if(this.originalHeight){var e=this.ui.summary.prop("scrollHeight");
e<=this.originalHeight?this.ui.divider.addClass("hidden"):(this.updateDividerBtn(!this.expanded),this.ui.divider.removeClass("hidden"))}},onRender:function(){s.a.defer(s.a.bind(this.onDeferredRender,this))},onDeferredRender:function(){this.expanded=!1;var e=this.ui.summary.prop("scrollHeight"),t=this.ui.summary.prop("clientHeight");this.originalHeight=t,e>t&&(this.ui.summary.css("max-height",t+"px"),this.ui.divider.removeClass("hidden"))},onResize:function(){this.isClosed||this.updateDividerBtnVisibility();
},onMoreSummaryClick:function(){var e=this.ui.summary.prop("scrollHeight")+100;this.expanded?(this.ui.summary.css("max-height",this.originalHeight+"px"),this.expanded=!1):(this.ui.summary.css("max-height",e+"px"),this.expanded=!0),this.updateDividerBtn(!this.expanded)},onSummaryChange:function(){this.originalHeight&&(this.expanded&&this.ui.summary.css("max-height",this.originalHeight+"px"),this.onDeferredRender())}});t.a=h},function(e,t,n){"use strict";var i=n(244),a=n.n(i),r=n(1307),s=r.a.extend({
className:"container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2787),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(4),u=n(8),d=n(44),h=n(20),p=n(104),f=n(36),g=n(21),m=n(209),v=n(1640),y=n(1643),b=n(1644),S=n(1650),w=n(1642),M=n(50),I=n(285),C=n(275),D=M.a.extend({mixins:[C.a],name:"editSectionModal",className:"edit-section-modal modal modal-lg fade",template:a.a,panes:{type:{constructor:S.a,nextPane:"folders",dependentPanes:["folders"]},folders:{constructor:y.a,nextPane:"options",
dependentPanes:["options","advanced"]},options:{constructor:b.a,nextPane:"advanced"},advanced:{constructor:v.a},error:{constructor:w.a}},panesModel:"tempModel",ui:{sidebar:".modal-nav-list",optionsBtn:".options-btn",saveBtn:".save-btn",message:".form-message",headerSectionType:".section-type-title"},regions:{paneRegion:".pane-region"},events:s.a.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onSaveClick","click .delete-btn":"onDeleteClick","submit .edit-section-type-form":"onGeneralFormSubmit"
},M.a.prototype.events),onlyAfterRender:["showPane","updateMessage","updateSectionTitle","updateSectionTitleDestabilized","updateSaveBtn"],paneConstructorArg:function(){return{isDefaultSection:this.isDefaultSection}},initialize:function(e){M.a.prototype.initialize.apply(this,arguments),this.server=e.server,this.redirect=e.redirect,this.isDefaultSection=e.isDefaultSection,this.model?(this.tempModel=this.model.clone(),this.tempModel.collection=this.model.collection):this.tempModel=new m.a({},{server:this.server,
collection:this.server.get("sections")}),this.listenTo(this.tempModel,"change:type",this.onSectionTypeChange),this.showPane(e.selectedPane||"type"),this.tempModel.isNew()&&e.seedAttrs&&this.tempModel.set(this.tempModel.parse(e.seedAttrs)),this._deferred=l.a.Deferred(),this.promise=this._deferred.promise()},serializeData:function(){var e=this.tempModel,t=e.isNew(),n={add:t,edit:!t,section:e&&e.toJSON(),selectedPane:this.selectedPane,canDelete:this.isDefaultSection||this.model&&!this.model.isNew()};
return n},updateMessage:function(e){this.ui.message.text(e||"")},updateSaveBtn:function e(){var t=this.ui.saveBtn,n=this.panes[this.selectedPane],e=s.a.bind(function(e){var i=n.nextPane,a=this.tempModel.isNew(),r=!n.constructor.prototype.validate||0===n.constructor.prototype.validate(this.tempModel).length,s=!this.getReachablePanes().isAnyInvalid;this.ui.optionsBtn.toggleClass("hidden",!e.showOptions);var o,l=s||a&&r;o=i,e.showOptions||"options"!==i||(o=!1),s&&(o=!1),e.showOptions&&"options"===i&&(o=!0),
e.showAdvanced&&"advanced"===i&&(o=!0),t.toggleClass("save",!o),t.toggleClass("next",!!o),t.toggleClass("disabled",!l)},this),i=this.tempModel.server,a=this.tempModel.sectionType,r=a&&"music"===a.key,o=a&&"photos"===a.key,l=r&&i.supports("premiumMusic"),c=o&&i.get("photoAutoTag")&&i.hasOwnerFeature("photo_autotags"),u=this.tempModel.isNew();l?this.paneRegion.currentView.populateAgents().then(function(t){var n=t.findWhere({identifier:"com.plexapp.agents.plexmusic"}),i=u&&n;e({showOptions:i,showAdvanced:i
})}):c?this.paneRegion.currentView.populateSectionSettings().then(function(){e({showOptions:!0,showAdvanced:!1})}):e({})},updateSectionTitle:function(){var e=p.a.get(this.tempModel.get("type"));if(e){this.updateSectionTitleDestabilized();var t=n.i(c.default)(e.title,{escape:!0});this.ui.headerSectionType.html(t)}},updateSectionTitleDestabilized:function(){this.ui.headerSectionType.addClass("section-type-title-unstable"),this.ui.headerSectionType.triggerReflow(),this.ui.headerSectionType.removeClass("section-type-title-unstable");
},save:function(){var e=this.ui.saveBtn;this.updateMessage(""),e.addClass("active");var t=this.saveModel();t.always(function(){e.removeClass("active")}),t.fail(s.a.bind(function(e){503===e.status?u.a.trigger("show:modal",new I.a({model:this.server})):this.updateMessage(n.i(c.default)("Your changes could not be saved."))},this)),t.then(s.a.bind(function(){if(!this.redirect)return this._deferred.resolve(),void this.hide();var e={serverID:this.model.server.id,sectionID:this.model.id};return"artist"!==this.model.get("type")?(u.a.trigger("navigate","section",e),
this._deferred.resolve(),void this.hide()):(e.type=f.a.get("album").id,e.sortKey="addedAt",e.sortDirection="desc",this._deferred.resolve(),this.hide(),void u.a.trigger("navigate","sectionType",e))},this))},saveModel:function(){var e;return this.tempModel.isNew()?(e=this.tempModel.save(),e=e.then(s.a.bind(function(e,t,n){var i=d.a.parseXML(e);if(201===n.status){if(i.Directory&&(i=i.Directory),!i.key){var a=n.getResponseHeader("Location");a&&(i.key=a.substring(a.lastIndexOf("/")+1))}var r=this.server;
return r.supports("advancedFilters")&&(i.filters=!0),this.model=new m.a(i,{parse:!0,server:this.server}),r.get("sections").add(this.model),n}},this))):(this.model.copy(this.tempModel),e=this.model.save()),e=e.then(s.a.bind(this.saveSettings,this)),e=e.then(s.a.bind(this.saveAgentSettings,this))},saveSettings:function(){var e=l.a.Deferred().resolve(this.model).promise();if(!this.server.supports("sectionSettings"))return e;var t=this.tempModel.settings;if(!t)return e;var n=this.getSettingsChanges(t);
if(s.a.isEmpty(n))return e;var i=t.first(),a=i.getSaveParams(n),r=h.join(["/library/sections/",this.model.id,"/prefs"],a),o=s.a.extend(this.server.getXHROptions(r),{type:"PUT"});return l.a.ajax(o).promise().then(function(){return e})},saveAgentSettings:function(){var e=l.a.Deferred().resolve(this.model).promise(),t=this.tempModel.agentSettings;if(!this.tempModel.agentSettings)return e;var n=this.getSettingsChanges(t);if(s.a.isEmpty(n))return e;var i=t.first(),a=i.getSaveParams(n),r=s.a.result(t,"url"),o=h.join([r,"/set"],a),c=i.server.getXHROptions(o);
return l.a.ajax(c).promise().then(function(){return e})},getSettingsChanges:function(e){var t=e.filter(function(e){return e.changedAttributes()}).reduce(function(e,t){var n=t.get("value");return"bool"===t.get("type")&&(n=n?"1":"0"),e[t.get("id")]=n,e},{});return t},onPaneShow:function(e,t){this.listenTo(t,"valid",this.updateSaveBtn),this.listenTo(t,"invalid",this.updateSaveBtn),this.updateSaveBtn()},onPaneHide:function(e,t){this.stopListening(t,"valid",this.updateSaveBtn),this.stopListening(t,"invalid",this.updateSaveBtn);
},onChangePaneClick:function(e){e.preventDefault();var t=this.$(e.currentTarget);t.isDisabled()||this.showPane(t.data("pane"))},onSaveClick:function(e){e.preventDefault();var t=this.ui.saveBtn;if(!t.isDisabled())if(t.hasClass("next")){var n=this.panes[this.selectedPane].nextPane;n&&!this.ui.sidebar.find("."+n+"-btn").isDisabled()&&this.showPane(n)}else this.save()},onDeleteClick:function(e){e.preventDefault();var t=g.a.execute("deleteSection",{section:this.model});this.isDefaultSection||t.done(function(){
u.a.trigger("navigate","dashboard")})},onGeneralFormSubmit:function(e){this.onSaveClick(e)},onSectionTypeChange:function(){this.updateSaveBtn()}});t.a=D},function(e,t,n){"use strict";var i=n(2811),a=n.n(i),r=n(5),s=n.n(r),o=n(221),l=n(474),c=n(1449),u=n(1440),d=n(50),h=n(1759),p=n(1758),f=n(1760),g=n(1755),m=d.a.extend({mixins:[o.a],name:"convertModal",className:"convert-modal modal fade",template:a.a,regions:{bodyRegion:".modal-body-region"},initialize:function(e){d.a.prototype.initialize.apply(this,arguments),
this.server=this.model?this.model.server:e.item.server;var t={server:this.server,allowInCache:!0};this.playlists=new l.a([],t),this.targets=new c.a([],t),this.profiles=new u.a([],t)},initialState:"loading",states:{loading:{nextState:"form",onEnter:function(){this.bodyRegion.show(new h.a),this.listenForStateRequests();var e=this.options.item,t=e&&!e.get("isMetadataList"),n=s.a.when(t?e.populate():null,this.playlists.populate(),this.targets.populate(),this.profiles.populate(),this.server.get("sections").populate());
n.done(this.whenRendered(function(){this.playlist=this.playlists.first(),this.playlist?this.enterNextState():this.enterState("error")})),n.fail(this.whenRendered(function(){this.enterState("error")}))}},form:{nextState:"success",onEnter:function(){this.bodyRegion.show(new p.a({model:this.model,item:this.options.item,items:this.options.items,playlist:this.playlist,targets:this.targets,profiles:this.profiles})),this.listenForStateRequests()}},success:{onEnter:function(){this.model?this.hide():(this.bodyRegion.show(new f.a({
server:this.server})),this.listenForStateRequests())}},error:{onEnter:function(e){this.bodyRegion.show(new g.a({status:e})),this.listenForStateRequests()}}},listenForStateRequests:function(){this.bodyRegion&&this.bodyRegion.currentView&&this.listenTo(this.bodyRegion.currentView,{"request:state":this.enterState,"request:nextState":this.enterNextState})},onRender:function(){d.a.prototype.onRender.apply(this,arguments),this.enterNextState()},onStateMachineComplete:function(){this.hide()}});t.a=m},function(e,t,n){
"use strict";var i=n(2819),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(14),u=n(4),d=n(8),h=n(44),p=n(21),f=n(652),g=n(434),m=n(1493),v=n(50),y=n(1767),b=n(1775),S=n(1766),w=n(1770),M=n(1774),I=n(1771),C=n(129),D=v.a.extend({name:"editFriendModal",className:"edit-friend-modal modal modal-lg fade",template:a.a,panes:{username:b.a,general:S.a,ownedServer:w.a,sharedServer:M.a,restrictions:I.a},ui:{poster:".modal-poster",title:".modal-title",message:".form-message",nextBtn:".next-btn",submitBtn:".submit-btn"
},regions:{nav:".modal-nav-pane",body:".modal-body-pane"},events:s.a.extend({"submit #share-server-form":"onSubmit"},v.a.prototype.events),initialize:function(e){v.a.prototype.initialize.apply(this,arguments),e||(e={}),this.type=e.type||"friend",this.isAdmin=e.isAdmin,this.defaultPaneType=e.defaultPaneType,this.defaultPaneID=e.defaultPaneID,"home"===this.type&&this.initHomeUser(e),this.initModel(e),this.initServerOverviews(e),this.initServerShares(e),this.image=new C.a({model:this.model,type:"friend",
width:40}),this.listenTo(this.body,"show",this.onShowPane)},initHomeUser:function(e){var t=c.a("appModel");if(this.homeUser=e.homeUser,this.homeUser){var n=t.get("user"),i=n.get("desktop").get("friends");this.model=i.findWhere({id:e.homeUser.id}),this.tempHomeUser=this.homeUser.clone()}else this.tempHomeUser=new g.a({admin:!1},{server:t.get("user").server})},initModel:function(e){var t=c.a("appModel");this.model?this.tempModel=this.model.cloneDeep():(this.tempModel=new f.a({},{server:t.get("user").server
}),this.tempModel.parseServers({Server:[]}))},initServerOverviews:function(e){var t=c.a("appModel"),n=t.get("servers"),i=t.get("user"),a=this.tempModel.get("serverOverviews");a||(a=new m.a([],{server:i.server,parent:this.tempModel}),this.tempModel.set("serverOverviews",a));var r=n.filter(function(e){var t=!e.get("shared")&&!e.get("cloud"),n=e.get("isFullServer")||e.get("isCloudSyncServer");return e.id&&t&&n});s.a.each(r,function(e){var t=a.add({machineIdentifier:e.id,name:e.get("friendlyName")});t.populate();
})},initServerShares:function(e){var t=this.tempModel.get("serverShares");t.each(function(e){e.populate()})},serializeData:function(){return{type:this.type,title:this.tempModel.get("title")}},showNextPane:function(e){var t,n={};if(e||(e=this.tempModel.isNew()?"username":this.defaultPaneType||"general"),"ownedServer"===e||"sharedServer"===e){var i,a;if("ownedServer"===e?(i=this.tempModel.get("serverOverviews"),a="serverOverview"):(i=this.tempModel.get("serverShares"),a="serverShare"),i.length){var r;
this.defaultPaneID&&(r=i.findWhere({machineIdentifier:this.defaultPaneID})),r||(r=i.first()),t=r.id,n[a]=r}else e="general"}t||(t=e),this.showPane(e,t,n)},showPane:function(e,t,n){this.currentPane&&(this.currentPane.flushChanges(),this.stopListening(this.currentPane),"username"===this.currentPane.paneID&&(this.ui.title.text(this.tempModel.get("username")||this.tempModel.get("title")),this.findExistingFriend()));var i=this.panes[e],a=new i(s.a.extend({paneID:t,model:this.tempModel,homeUser:this.tempHomeUser,
type:this.type,isAdmin:this.isAdmin},n));return this.listenTo(a,{"change:pane":this.onChangePane,"change:errorMessage":this.onErrorMessageChange,"enable:submit":this.onEnableSubmit,"destroy:homeUser":this.onHomeUserDestroy,"destroy:friend":this.onFriendDestroy,"destroy:serverShare":this.onServerShareDestroy,"disable:guest":this.onGuestDisable}),this.currentPane=a,this.nav.currentView.selectItem(t),this.body.show(a),a},getSubmitBtn:function(){return this.currentPane&&"username"===this.currentPane.paneID?this.ui.nextBtn:this.ui.submitBtn;
},findExistingFriend:function(){var e,t=c.a("appModel"),n=t.get("user"),i=n.get("desktop").get("friends"),a=this.tempModel.get("username");if(this.tempModel.get("restricted")?e=i.findWhere({restricted:!0,title:a}):(e=i.findWhere({username:a}),e||(e=i.findWhere({email:a}))),e){var r=this.tempModel.get("serverOverviews");this.model=e,this.tempModel=e.cloneDeep(),this.tempModel.set("serverOverviews",r),this.initServerShares(),this.image.setModel(this.model),this.image.render(),this.nav.currentView.setModel(this.tempModel);
}},sendRequests:function(){var e=this.tempHomeUser&&this.tempHomeUser.isNew(),t=!e&&this.tempModel.isNew(),i=[];i.push(this.sendFriendInvite()),i.push(this.sendHomeInvite());var a=l.a.when.apply(l.a,i);return a=a.then(s.a.bind(function(){return Array.prototype.push.apply(i,this.sendServerShareInvites()),this.tempModel.isNew()||i.push(this.tempModel.save({},{parse:!1})),this.tempHomeUser&&!e&&i.push(this.tempHomeUser.save()),l.a.when.apply(l.a,i)},this)),a.done(s.a.bind(function(){var e=c.a("appModel"),t=e.get("user");
t.get("desktop").get("friends").fetch(),"home"===this.type&&t.get("homeUsers").fetch(),this.tempModel.get("restricted")||t.get("desktop").get("sentInvites").fetch(),this.hide()},this)),a.fail(s.a.bind(function(i){var a=h.a.parseXML(i.responseText),r=a&&a.status;s.a.isString(r)||(r=e?n.i(u.default)("This user could not be added to your home."):t?n.i(u.default)("An invite could not be sent to this user."):n.i(u.default)("Your changes could not be saved.")),d.a.trigger("show:alert",{type:"error",message:r
})},this)),a},sendFriendInvite:function(){if("friend"===this.type){var e=this.tempModel.get("serverShares").getActiveCount();return this.tempModel.isNew()&&!e?this.tempModel.save({user:this.tempModel.get("username")}):void 0}},sendHomeInvite:function(){if("home"===this.type&&this.tempHomeUser.isNew()){var e=this.tempHomeUser.save();return e.done(s.a.bind(function(){if(this.tempHomeUser.get("restricted")){this.tempModel.set("id",this.tempHomeUser.id);var e=c.a("appModel"),t=e.get("user");t.set("home",!0);
}this.showHomeWarnings()},this)),e}},showHomeWarnings:function(){p.a.execute("showHomeWarningsModal")},sendServerShareInvites:function(){var e=this.model&&this.model.get("serverShares").filterByOwned(),t=this.tempModel.get("serverShares").filterByOwned(),n=e?e.pluck("machineIdentifier"):[],i=t?t.pluck("machineIdentifier"):[],a=s.a.union(n,i),r=[];return s.a.each(a,function(n){var i=e&&e.findWhere({machineIdentifier:n}),a=t&&t.findWhere({machineIdentifier:n}),s=i&&i.isActive(),o=a&&a.isActive();o?r.push(p.a.execute("shareServer",{
user:this.tempModel,serverShare:a})):s&&r.push(i.destroy({wait:!0}))},this),r},onRender:function(){v.a.prototype.onRender.apply(this,arguments),this.image.setElement(this.ui.poster);var e=new y.a({model:this.tempModel});this.listenTo(e,"change:pane",this.onChangePane),this.nav.show(e),this.showNextPane()},onClose:function(){this.image.close()},onChangePane:function(e,t,n){t||(t=e),this.showPane(e,t,n)},onShowPane:function(){var e="username"===this.currentPane.paneID;this.nav.currentView.toggleDisabled(e),
this.ui.nextBtn.toggleClass("hidden",!e),this.ui.submitBtn.toggleClass("hidden",e)},onErrorMessageChange:function(e){this.ui.message.text(e)},onEnableSubmit:function(e){this.getSubmitBtn().toggleClass("disabled",!e)},onHomeUserDestroy:function(){if(this.homeUser){var e=p.a.execute("removeHomeUser",{homeUser:this.homeUser});e.done(s.a.bind(this.hide,this))}},onFriendDestroy:function(){if(this.model){var e=p.a.execute("removeFriend",{friend:this.model});e.done(s.a.bind(this.hide,this))}},onServerShareDestroy:function(e){
var t=p.a.execute("removeServerShare",{serverShare:e});t.done(s.a.bind(function(){var t=this.model.get("serverShares");t.remove(e.id),this.showNextPane("general")},this))},onGuestDisable:function(){var e=c.a("appModel"),t=p.a.execute("toggleGuest",{user:e.get("user"),enable:!1});t.done(s.a.bind(this.hide,this))},onSubmit:function(e){e.preventDefault();var t=this.getSubmitBtn();if(!t.isDisabled()){if("username"===this.currentPane.paneID)return void this.showNextPane("ownedServer");t.addClass("active"),
this.currentPane.flushChanges(),this.sendRequests().fail(s.a.bind(function(){this.ui.submitBtn.removeClass("active")},this))}}});t.a=D},function(e,t,n){"use strict";var i=n(2884),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(4),c=o.a.Layout.extend({className:"form-group",template:a.a,isDisabled:!0,isActive:!1,ui:{submitBtn:".submit-btn",message:".form-message"},events:{"change #server-settings-form input[name]":"onInputChange","input #server-settings-form input[type=text]":"onInputChange","change #server-settings-form select[name]":"onInputChange",
"submit #server-settings-form":"onSubmit"},initialize:function(e){this.changes=e.changes},serializeData:function(){return s.a.where(this.collection.toJSON(),{group:this.options.group,hidden:!1})},enable:function(){this.isDisabled=!1,this.ui.submitBtn.removeClass("disabled"),this.ui.message.text("")},updateModel:function(e,t){var n=this.collection.get(e);if(n)return n.set("value",t)},onRender:function(){s.a.isEmpty(this.changes)||this.enable()},onInputChange:function(e){var t=e.currentTarget,n=t.name,i=t.value,a=t.value;
if(n){"checkbox"===t.type&&(a=t.checked,a||(i="0"));var r=this.updateModel(n,a);r&&(this.changes[t.name]=i,this.enable())}},onSubmit:function(e){e.preventDefault(),this.trigger("save")},onBeforeSave:function(){this.isActive=!0,this.ui.submitBtn.addClass("active")},onAfterSave:function(e){var t;this.isActive=!1,this.ui.submitBtn.removeClass("active"),e?(this.isDisabled=!0,this.ui.submitBtn.addClass("disabled"),t=n.i(l.default)("Your changes have been saved.")):t=n.i(l.default)("Your changes could not be saved."),
this.ui.message.text(t)}});t.a=c},function(e,t,n){"use strict";function i(e){var t=e.children,n=r()(e,["children"]);return o.a.createElement("div",n,t)}var a=n(17),r=n.n(a),s=n(1),o=n.n(s),l=n(2393),c=n.n(l);i.defaultProps={className:c.a.group},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.onErrorDismiss,i=e.errorMessage;return r()("div",{className:d.a.sectionError},void 0,r()(l.a,{name:"plex-icon-alert-560",className:d.a.sectionErrorIcon}),i?i:n.i(o.default)("There was a problem saving your changes."),r()(c.a,{
className:d.a.sectionErrorDismiss,onPress:t},void 0,h))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(30),c=n(26),u=n(2396),d=n.n(u),h=r()(l.a,{name:"plex-icon-remove-560"});t.a=i},function(e,t,n){"use strict";var i=n(11),a=n.n(i),r=n(13),s=n.n(r),o=n(12),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(76),p=n(1981),f=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentWillUnmount=function(){this.props.garbageCollectEntities()},t.prototype.render=function(){
return u.a.createElement(p.a,this.props)},t}(c.Component);t.a=n.i(d.b)(null,{garbageCollectEntities:h.b})(f)},function(e,t,n){"use strict";function i(e){var t=e.children,n=o()(e,["children"]);return c.a.createElement("div",r()({className:d.a.pageHeader},n),t)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(2479),d=n.n(u);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=o()(e,["children"]);return c.a.createElement("div",r()({className:d.a.pageHeaderLeft},n),t)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(2482),d=n.n(u);
t.a=i},function(e,t,n){"use strict";function i(e){return{isWaitingForPrimaryServer:e.isWaitingForPrimaryServer,primaryServerEntityID:e.primaryServer}}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(1),d=n.n(u),h=n(15),p=n(35),f=n(76),g=n(1982),m=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){e.machineIdentifier&&e.machineIdentifier!==this.props.machineIdentifier&&this._populate(e);
},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;n.i(p.a)(function(){e.machineIdentifier&&e.changePrimaryServer(e.machineIdentifier)})},t.prototype.render=function(){return d.a.createElement(g.a,this.props)},t}(u.Component);t.a=n.i(h.b)(i,{changePrimaryServer:f.c})(m)},function(e,t,n){"use strict";function i(){return n.i(p.createSelector)(function(e,t){var n=t.providerEntityID;return n},n.i(b.a)(),n.i(y.a)(),function(e,t,i){var a=i.desktop,r=a.providers,s=a.isProvidersPopulated,o=a.providersError,l=a.libraries,c=a.isLibrariesPopulated,u=a.librariesError,d=!s&&!o,h=!c&&!u,p=e||n.i(g.a)(f.PROVIDER,v.a.LIBRARY_PROVIDER_IDENTIFIER,i.entityID),m=r.indexOf(p)>-1;
return{providerEntityID:p,providerIdentifier:t?t.identifier:null,hasProvider:m,showSpinner:d||h,showError:!!u&&!l.length}})}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(1),d=n.n(u),h=n(15),p=n(9),f=(n.n(p),n(185)),g=n(65),m=n(35),v=n(72),y=n(63),b=n(103),S=n(85),w=n(135),M=n(1984),I={populateLibraries:S.populateLibraries,populateProviders:S.populateProviders,changeQuickSearchSettings:w.changeQuickSearchSettings},C=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments));
}return c()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){var t=e.serverEntityID!==this.props.serverEntityID,n=e.providerIdentifier!==this.props.providerIdentifier;(t||n)&&this._populate(e)},t.prototype.componentWillUnmount=function(){this.props.changeQuickSearchSettings({providerIdentifier:null})},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;n.i(m.a)(function(){e.populateProviders({
serverEntityID:e.serverEntityID}),e.populateLibraries({serverEntityID:e.serverEntityID}),e.changeQuickSearchSettings({providerIdentifier:e.providerIdentifier})})},t.prototype.render=function(){return d.a.createElement(M.a,this.props)},t}(u.Component);t.a=n.i(h.b)(i,I)(C)},function(e,t,n){"use strict";function i(e){var t=e.children,n=o()(e,["children"]);return c.a.createElement(d.a,r()({className:p.a.innerEmptyPage,contentClassName:p.a.innerEmptyPageContent,scrollDirection:u.a.NONE},n),t)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(23),d=n(297),h=n(935),p=n.n(h);
t.a=i},function(e,t,n){"use strict";var i=n(15),a=n(9),r=(n.n(a),n(325)),s=n(76),o=n(2159),l=n.i(a.createStructuredSelector)({primaryServerEntityID:function(e){return e.primaryServer},serverEntityIDs:function(e){return e.servers},canProvisionPersonalCloudServer:r.a}),c={onServerMenuOpen:s.e},u=n.i(i.b)(l,c)(o.a);t.a=u},function(e,t,n){"use strict";function i(e){var t=e.message,n=e.children;return r()("div",{},void 0,r()("p",{className:l.a.sidebarMessage},void 0,t),n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(2588)),l=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e,t){if(t)switch(t){case s.a:switch(e){case"episode":return c}break;case s.b:return c}switch(e){case"movie":return o;case"show":return o;case"season":return o;case"episode":return o;case"artist":return l;case"album":return l;case"track":return l;case"photo":return l;case"photoalbum":return l;case"clip":return c;case"extra":return c;case"musicVideo":return c;case"mixed":return o;default:return l}}function a(e,t,n){var a=i(t,n);return Math.round(e*a);
}function r(e,t,n){var a=i(t,n);return Math.round(e/a)}var s=n(48);n.d(t,"d",function(){return o}),t.c=i,t.b=a,t.a=r;var o=1/1.5,l=1,c=16/9},function(e,t,n){"use strict";var i=n(1);n.n(i);n.d(t,"c",function(){return a}),n.d(t,"a",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"d",function(){return o});var a="poster",r="table",s="summary",o="epgEpisode";i.PropTypes.oneOf([a,r,s,o])},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n={}.hasOwnProperty;
e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var i=n(905),a=n(378);e.exports=function(e){return i(a(e))}},,,function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(20),s=n(104),o=n(741),l=n(36),c=n(67),u=n(65),d=n(16),h=n(18),p=n(151),f=n(1132),g=n(424),m=n(1120),v=n(1118),y=n(634),b=n(632),S=n(1114),w=n(425),M=n(426),I=n(422),C=n(633),D=n(1116),T=n(148),x=h.a.extend({name:"SectionModel",context:["server"],entityType:c.g,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;
return n.i(u.a)(this.entityType,e.key,this.server.entityID())},idAttribute:"key",rootPropertyName:"Directory",cache:new p.a,persistInCache:!0,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.key)},url:function e(){if(this.isNew())return a.a.result(this,"urlRoot")||a.a.result(this.collection,"url");var t=a.a.isNaN(parseInt(this.id,10)),e=t?this.id:"/library/sections/"+this.id;return e},sessionAttrs:{isSection:d.a.boolean,currentFilters:d.a.array,currentFolderKey:d.a.string,settings:d.a.instanceOf(T.a)
},syncedAttrs:{key:d.a.oneOfType(d.a.string,d.a.integer),uuid:d.a.string,thumb:d.a.string,art:d.a.string,createdAt:d.a.integer,updatedAt:d.a.integer,allowAdvancedFilters:d.a.boolean,allowSync:d.a.boolean,refreshing:d.a.boolean,name:{type:d.a.string,save:!0},title:{type:d.a.string,save:!0},type:{type:d.a.string,save:!0},agent:{type:d.a.string,save:!0},scanner:{type:d.a.string,save:!0},language:{type:d.a.string,save:!0},importFromiTunes:{type:d.a.boolean,save:!0},enableAutoPhotoTags:{type:d.a.boolean,
save:!0}},syncedRelations:{locations:function(){return{relationClass:D.a,rootPropertyName:"Location",options:{section:this},save:!0}}},sessionRelations:{items:function(){return{relationClass:f.a,options:{section:this}}},currentSubset:function(){return{relationClass:g.a,options:{section:this}}},currentFirstCharacter:function(){return{relationClass:C.a,deferred:!0}},currentType:function(){return{relationClass:y.a,deferred:!0}},currentSort:function(){return{relationClass:M.a,deferred:!0}},types:function(){
return{relationClass:v.a,options:{section:this}}},subsets:function(){return{relationClass:m.a,options:{section:this}}},filters:function(){var e=this.get("allowAdvancedFilters")?b.a:S.a;return{relationClass:e,options:{section:this}}},sorts:function(){return{relationClass:w.a,options:{section:this}}},firstCharacters:function(){return{relationClass:I.a,options:{section:this}}}},defaults:function(){var e=this;return{isSection:!0,currentType:null,currentFilters:[],currentSort:null,currentFirstCharacter:null,
currentFolderKey:null,currentSubset:o.a.get("all"),settings:new T.a([],{server:this.server,url:function(){return r.join(["/library/sections/",e.get("key"),"/prefs"])}})}},initialize:function(e){this.updateMediaTypes(this,e.type),this.set({currentType:this.get("types").at(0)}),this.on("change:type",this.updateMediaTypes,this)},uninitialize:function(){this.off("change:type",this.updateMediaTypes,this),this.stopListening()},augmentResponse:function(e){return e.allowAdvancedFilters=!!e.filters,delete e.filters,
e},getSectionType:function(){var e=this.get("type");return s.a.get(e)},getSaveParams:function(e){var t=h.a.prototype.getSaveParams.apply(this,arguments);if("type"in t){var n=s.a.get(t.type);n&&(t.type=n.typeString)}return"title"in t&&(t.name=t.title,delete t.title),a.a.isObject(t.type)&&(t.type=t.type.typeString),"Location"in t&&(t.location=a.a.pluck(t.Location,"path"),delete t.Location),t},getSyncTitle:function(e){var t=this.get("title"),n=[],i=this.get("currentSubset"),r=this.get("currentFilters");
return e?(a.a.each(e,function(e){n.push(e.get("title"))}),t+": "+n.join(", ")):"all"!==i.id?t+": "+i.get("title"):r.length?(a.a.each(r,function(e){n.push(e.titles.join(", "))}),t+": "+n.join(",")):t},setAgentAndScanner:function(e,t,n,i){var a=e.defaultAgent,r=e.defaultScanner;if(i){var s=e.exclusiveAgents,o=e.exclusiveScanners,l=t.hasExclusiveAgent(s),c=n.hasExclusiveScanner(o);l&&(a=s[0]),c&&(r=o[0])}this.set({agent:a,scanner:r})},updateMediaTypes:function(e,t){var n=l.a.getRelatedMediaTypes(t);this.get("types").reset(n);
}});t.a=x},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(334),l=n(20),c={getCollectionName:function(){return this.collectionName||"items"},getCollection:function(){return this.get(this.getCollectionName())},getTotalSize:function(){return this.get("totalSize")||this.get("populatedRange").size},getPaginatedUrl:function(e){var t=this.get("currentPageStart"),n=this.get("currentPageSize");if(null!=t||null!=n){var i={"X-Plex-Container-Start":t||0,"X-Plex-Container-Size":n||0};return l.join(e,i);
}return e},getCollectionChangeEvents:function(){var e=this.getCollectionName(),t=["change:"+e+".update","change:"+e+".reset"];return t.join(" ")},startPopulatedRangeMonitor:function(){this.updatePopulatedRange(),this.on(this.getCollectionChangeEvents(),this.updatePopulatedRange,this)},stopPopulatedRangeMonitor:function(){this.off(this.getCollectionChangeEvents(),this.updatePopulatedRange,this)},fetchRange:function(e){var t=a.a.extend({},e,{remove:!1});return e.prepend&&(t.at=0),this.set({currentPageStart:e.start,
currentPageSize:e.size}),this.fetch(t).promise()},populateRange:function(e){var t=this.getCollection(),n=this.get("populatedRange"),i=o.a.difference(e,n)[0];if(!i)return s.a.Deferred().resolve().promise();if(i=o.a.degap(i,n),this.isPopulating()){var r=this.get("currentPageStart")!==i.start,l=this.get("currentPageSize")!==i.size;if(!r&&!l)return this.populatePromise;this.abortPendingPopulate()}if(e.reloadThreshold&&i.size>e.reloadThreshold)return t.reset(),this.populateRange(a.a.omit(e,"reloadThreshold"));
var c=a.a.extend({},e,i,{prepend:i.start<n.start});return this.fetchRange(c)},repopulateRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.get("populatedRange").end;return this.set({currentPageStart:0,currentPageSize:Math.max(t,e)}),this.abortPendingPopulate(),this.fetch()},updatePopulatedRange:function(){var e=this.get("currentPageStart"),t=this.get("populatedRange").start,n=this.get("populatedRange").size,i=this.getCollection().length,a=void 0;a=i?n?Math.min(t,null==e?1/0:e):e||t:0,
this.set("populatedRange",{start:a,end:a+i,size:i})}};t.a=c},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=n.i(r.a)(1e3*e);return t?n.i(a.default)("{1} left",t):""}var a=n(4),r=n(177);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=r.a.duration(e),i=t.hours()+24*t.days(),a=t.minutes(),o=t.seconds();return i&&a?n.i(s.default)("{1} hr {2} min",i,a):i?n.i(s.default)("{1} hr",i):a?n.i(s.default)("{1} min",a):o>0?n.i(s.default)("{1} sec",o):""}var a=n(43),r=n.n(a),s=n(4);
t.a=i},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MMMM D, YYYY";return e?r.a.unix(e).format(t):""}Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),r=n.n(a);t.default=i},function(e,t,n){"use strict";function i(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a.clone(e);return t.title=s.a.result(t,"title"),t.hasOwnProperty("plural")&&(t.plural=s.a.result(t,"plural")),
t}function a(e,t){function n(e){for(var t in r){var n=r[t],a=n[e];if(a)return i(a)}o.a.warn("No type was found for "+e)}function a(){return t.map(function(e){return i(e)})}var r={};return e.forEach(function(e){r[e]=t.reduceRight(function(t,n){var i=n[e];return null!=i&&(t[i]=n),t},{})}),{get:n,getAll:a}}var r=n(2),s=n.n(r),o=n(27);t.a=a},function(e,t,n){"use strict";var i=n(10),a=i.a.Layout.extend({regions:{content:".content"}});t.a=a},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),n.i(o.a)(),function(e,t){
return{allowServerFilters:!!e&&!e.isPersonalCloudServer,url:t}})}var a=n(15),r=n(9),s=(n.n(r),n(63)),o=n(665),l=n(467);t.a=n.i(a.b)(i)(l.a)},function(e,t,n){"use strict";var i=n(11),a=n.n(i),r=n(13),s=n.n(r),o=n(12),l=n.n(o),c=n(1),u=n.n(c),d=n(2923),h=n.n(d),p=n(25),f=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){return u.a.createElement(h.a,this.props);
},t}(c.Component);f.defaultProps={component:"div",transitionName:{appear:"appear",enter:"enter",leave:"leave"},transitionAppear:!0,transitionEnter:!0,transitionLeave:!0},t.a=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"SMALL",function(){return i}),n.d(t,"MEDIUM",function(){return a}),n.d(t,"LARGE",function(){return r}),n.d(t,"all",function(){return s});var i="small",a="medium",r="large",s=[i,a,r]},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(10),s=n(334),o={
selectable:!0,events:{mousedown:"onMouseDown",mouseup:"onMouseUp",mouseleave:"onMouseUp"},itemEvents:{select:"onItemSelect",autoselect:"onItemAutoselect"},itemViewOptions:function(){return{mediaActions:this.parentMediaActions||this.mediaActions}},initialize:function(e){e.listModel&&e.mediaActions&&(this.listModel=e.listModel,this.mediaActions=e.mediaActions,this.listenTo(this.mediaActions,{"change:selectedItems":this.onMediaActionsSelectedItemsChange,"change:selecting":this.onMediaActionsSelectingChange
}),this.shiftRange={start:-1,end:-1})},isViewSelected:function(e){var t=this.mediaActions.get("selectedItems");if(0===t.length)return!1;var n=e.model,i=a.a.indexOf(t,n);if(i!==-1)return!0;var r=n.get("children"),s=r&&r.length&&r.every(function(e){return e.selected});return!!s},singleSelect:function(e){this.shiftRange.end=-1;var t=e.model;this.isViewSelected(e)?(this.shiftRange.start=-1,this.deselectItem(t),e.deselect()):(this.shiftRange.start=this.collection.indexOf(t),this.previousCollectionOffset=this.listModel.get("populatedRange").start,
this.selectItem(t),e.select())},multiSelect:function(e){if(this.getViewForModel){var t=this.collection.indexOf(e.model),n=this.listModel.get("populatedRange").start,i=this.previousCollectionOffset-n,r=[],o=[];if(this.previousCollectionOffset=n,this.shiftRange.start<0)this.shiftRange.start=t,r.push(e.model),e.select();else if(this.shiftRange.end<0)this.shiftRange.start+=i,this.shiftRange.end=t,s.a.each(this.shiftRange,function(e){var t=this.collection.at(e);if(t){r.push(t);var n=this.getViewForModel(t);
n&&n.select()}},this);else{s.a.each(this.shiftRange,function(e){var t=this.collection.at(e);t&&o.push(t)},this),this.shiftRange.start+=i,this.shiftRange.end=t,s.a.each(this.shiftRange,function(e){var t=this.collection.at(e);if(t){r.push(t);var n=this.getViewForModel(t);n&&n.select()}},this);var l=[o].concat(r);o=a.a.without.apply(a.a,l),a.a.each(o,function(e){var t=this.getViewForModel(e);t&&t.deselect()},this)}this.mediaActions.selectItems(r,{superset:this.collection}),this.mediaActions.deselectItems(o,{
superset:this.collection})}},selectItem:function(e){this.mediaActions.selectItem(e,{superset:this.collection})},deselectItem:function(e){this.mediaActions.deselectItem(e,{superset:this.collection})},forwardItemViewEvents:function(e){this.stopListening(e,"all"),this.listenTo(e,"all",function(t){var n=Array.prototype.slice.call(arguments);n[0]="itemview:"+t,n.splice(1,0,e);var i=r.a.normalizeMethods.call(this,this.itemEvents);"undefined"!=typeof i&&a.a.isFunction(i[t])&&i[t].apply(this,n),r.a.triggerMethod.apply(this,n);
},this)},onMediaActionsSelectedItemsChange:function(e,t){this.getViewForModel&&(t&&t.length||(this.shiftRange.start=-1,this.shiftRange.end=-1,this.collection.each(function(e){var t=this.getViewForModel(e);t&&t.deselect&&t.deselect()},this)))},onMediaActionsSelectingChange:function(e){this.$el.toggleClass("hide-actions",e)},onClose:function(){this.mediaActions&&this.mediaActions.deselectAll()},onMouseDown:function(e,t){this.isMouseDown=!0},onMouseUp:function(e,t){this.isMouseDown=!1},onItemSelect:function(e,t,n){
this.selectable&&(n||(n={}),n.multiSelect?this.multiSelect(t):this.singleSelect(t))},onItemAutoselect:function(e,t,n){this.isMouseDown&&this.onItemSelect.apply(this,arguments)},onItemRemoved:function(e){e&&e.model.selected&&(this.deselectItem(e.model),e.deselect())}};t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r={currentState:null,enterState:function(e){if(e!==this.currentState){var t=this.currentState,n=this.states[e];if(!n)throw new Error("The state machine is unable to enter undefined state: "+e);
if(t){var i=this.states[t];if(a.a.isFunction(i.onExit)){var r=i.onExit.call(this);if(r===!1)return}}if(this.currentState=e,a.a.isFunction(n.onEnter)){var s=n.onEnter.apply(this,a.a.rest(arguments));if(s===!1)return void(this.currentState=t)}this.triggerMethod("stateMachineChange",{from:t,to:e})}},enterNextState:function(){var e;if(this.currentState){var t=this.states[this.currentState];e=t.nextState}else{if(!this.initialState)throw new Error("An initial state must be defined for the state machine");
e=this.initialState}e?this.enterState(e):this.triggerMethod("stateMachineComplete")}};t.a=r},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n.i(i.createSelector)(function(e){return e.ui.liveTVSettingsPage},function(e){var t=e.dvrSetup.setupErrorMessages;return t.length?t[0].message:null}));t.a=a},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(r.a,function(e,t){var n=t.searchResultEntityID;return n},function(e,t){return e[t]})}var a=n(9),r=(n.n(a),n(1566));t.a=i},function(e,t,n){
"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(4),c=n(20),u=n(104),d=n(343),h=n(1488),p=n(768),f=n(1481),g=n(148),m=o.a.Layout.extend({ui:{formGroup:".form-group"},onlyAfterRender:["showValidationResult"],serializeData:function(){var e={};return this.model.isNew()?e.add=!0:e.edit=!0,e.section=this.model.toJSON(),e},showValidationResult:function(e){var t=this.ui.formGroup;t.removeClass("has-error"),a.a.each(e,function(e){t.filter("."+e+"-group").addClass("has-error")}),this.trigger(e.length?"invalid":"valid");
},createMenuOptions:function(e,t){return a.a.map(e,function(e){return'<option value="'+e.value+'"'+(e.value===t?" selected":"")+">"+e.label+"</option>"}).join("\n")},getSectionType:function(){if(this.model.sectionType)return this.model.sectionType;var e=this.model.get("type"),t=u.a.get(e);return"movie"===e&&"com.plexapp.agents.none"===this.model.get("agent")&&(t=u.a.get("videos")),this.model.sectionType=t,t},setSectionType:function(e){this.model.sectionType=e},populateAgents:function(){var e=this.getSectionType();
return e?(this.model.agents||(this.model.agents=new d.a([],{server:this.model.server,mediaTypeID:e.typeID})),this.model.agents.populate().then(function(e){return e})):s.a.Deferred().reject().promise()},populateScanners:function(){var e=this.getSectionType();return e?(this.model.scanners||(this.model.scanners=new h.a([],{server:this.model.server,sectionTypeID:e.typeID})),this.model.scanners.populate().then(function(e){return e})):s.a.Deferred().reject().promise()},populateAgentsProxy:function(){var e=this.getSectionType().exclusiveAgents,t=new p.a(this.model.agents,e,this.model.get("agent"));
return this.model.agentsProxy=t,s.a.Deferred().resolve(t).promise()},populateScannersProxy:function(){var e=this.getSectionType().exclusiveScanners,t=new f.a(this.model.scanners,e,this.model.get("scanner"));return this.model.scannersProxy=t,s.a.Deferred().resolve(t).promise()},populateSectionSettings:function(){var e=this;if(!this.model.server.supports("sectionSettings"))return s.a.Deferred().resolve().promise();if(!this.model.settings){var t=new g.a([],{server:this.model.server});if(this.model.isNew()){
var i=this.getSectionType(),a=this.model.server.hasOwnerFeature("photo_autotags");"photos"===i.key&&a&&this.model.set("enableAutoPhotoTags",!0);var r={type:i.typeID,agent:this.model.get("agent"),enableAutoPhotoTags:this.model.get("enableAutoPhotoTags")};t.url=c.join(["/library/sections/prefs"],r)}else t.url=c.join(["/library/sections/",this.model.id,"/prefs"]);this.model.settings=t}return this.model.settings.populate().then(function(){var t=e.model.isNew()&&"music"===e.model.get("type")&&e.model.server.supports("premiumMusic")&&!e.model.server.get("isPersonalCloudServer")&&!e.model.settings.findWhere({
id:"importFromiTunes"});return t&&e.model.settings.unshift({type:"bool",id:"importFromiTunes",value:!1,label:n.i(l.default)("Import from iTunes"),summary:n.i(l.default)("Importing from iTunes will import your music playlists. It will also import your ratings, the date you added the music, as well as play and skip counts for tracks in your library.")}),e.model.settings})},populateSectionAgentSettings:function(){if(!this.model.agentSettings){var e=new g.a([],{server:this.model.server,url:c.join(["/:/plugins/",this.model.get("agent"),"/prefs"])
});this.model.agentSettings=e}var t=this.model.agentSettings.populate();return t},onModalClose:function(){this.model.scanners=null,this.model.scannersProxy=null,this.model.agents=null,this.model.agentsProxy=null,this.model.settings=null}});t.a=m},function(e,t,n){"use strict";var i=n(942),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(43),u=n.n(c),d=n(4),h=n(8),p=n(20),f=n(21),g=n(1454),m=n(794),v=n(795),y=n(1637),b=n(1634),S=n(1635),w=n(1633),M=n(50),I=n(42),C=n(275),D={movie:["general","tags","sharing","poster","art","info","advanced"],
show:["general","tags","sharing","poster","banner","art","advanced"],season:["general","poster","art","info","advanced"],episode:["general","tags","poster","art","info","advanced"],artist:["general","tags","poster","art","advanced"],album:["general","tags","sharing","poster","art","info","advanced"],track:["general","tags","info","advanced"],photoalbum:["general","poster","art","advanced"],photo:["general","info","advanced"]},T=["poster","art","banner","info","advanced"],x=M.a.extend({mixins:[C.a],
name:"editMetadataModal",className:"edit-metadata-modal modal modal-lg fade",template:a.a,panes:{general:{constructor:m.a},tags:{constructor:v.a},poster:{constructor:b.a},art:{constructor:b.a},banner:{constructor:b.a},sharing:{constructor:y.a},info:{constructor:S.a},advanced:{constructor:w.a}},events:s.a.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit","submit .edit-metadata-form":"onFormSubmit"},M.a.prototype.events),ui:{saveBtn:".save-btn",message:".form-message",
navPane:".modal-nav-pane",loadingIndicator:".modal-body-pane .loading-inline"},regions:{paneRegion:".pane-region"},onlyAfterRender:["saveChanges","showPane","showNav"],initialize:function(e){M.a.prototype.initialize.apply(this,arguments);var t,i=e.mediaActions,a=e.items||(i?i.getActionTargets():[this.model]),r=a[0];this.model=new g.a({},{server:r.server,metadataItems:a}),t=r.section||r.get("librarySectionID")?l.a.Deferred().resolve().promise():r.populate(),t=t.then(s.a.bind(function(){return this.model.setContext("section",r.server.getSectionForItem(r)),
this.model.populate()},this)),t.done(s.a.bind(function(){this.model.set("originalSaveParams",this.model.getSaveParams()),this.showNav(),this.showPane(e.selectedPane||"general"),this.listenTo(h.a,"shortcut:save",this.saveChanges)},this)),t.fail(s.a.bind(function(){this.ui.message.text(n.i(d.default)("There was an error editing this item")),this.ui.loadingIndicator.addClass("hidden")},this))},serializeData:function(){var e=D[this.model.get("type")]||D.movie;this.model.get("isSingleMetadataItem")||(e=s.a.difference(e,T)),
this.model.getSingleMetadataItem().has("preferences")||(e=s.a.difference(e,["advanced"]));var t=s.a.reduce(e,function(e,t){return e[t]=!0,e},{}),i=n.i(d.default)("Edit {1}",this.model.get("aggregateTitle"),{escape:!0}),a={item:this.model.toJSON(),panes:t,selectedPane:this.selectedPane,paneTitle:i};return a},paneConstructorArg:function(){return{type:this.selectedPane}},invalidChangedAttrs:function(e){var t=[];if("track"===this.model.get("type")){var n=s.a.has(e,"artist.id.value")||s.a.has(e,"artist.title.value")||s.a.has(e,"album.id.value")||s.a.has(e,"album.title.value"),i=e["album.id.value"]||e["album.title.value"],a=e["artist.id.value"]||e["artist.title.value"],r=!n||a&&i;
r||(a||t.push("grandparentTitle"),i||t.push("parentTitle"))}if(s.a.has(e,"originallyAvailableAt.value")){var o=e["originallyAvailableAt.value"];/^\d{4}$/.test(o)&&(e["originallyAvailableAt.value"]+="-01-01",o=e["originallyAvailableAt.value"]),""===o||u()(o,"YYYY-MM-DD",!0).isValid()?this.model.set("originallyAvailableAt",o):t.push("originallyAvailableAt")}return t},markInvalid:function(e){this.paneRegion.currentView.markInvalid(e)},showNav:function(){this.ui.navPane.removeClass("hidden")},saveChanges:function(){
var e=this.ui.saveBtn,t=this.ui.message;if(!e.isDisabled()){t.text(""),this.paneRegion.currentView.flushChanges();var i=[],a=this.model.getSaveParams(),r=this.invalidChangedAttrs(a);if(r.length)return void this.markInvalid(r);e.addClass("active");var o=this.showAdvancedConfirmModal({saving:!0});o.done(s.a.bind(function(){s.a.each(["poster","banner","art"],function(e){var t=this.model.get(e);t&&i.push(f.a.execute("changeArtwork",{item:this.model.getSingleMetadataItem(),artworkType:e,artworkRatingKey:t
}))},this),i.push(this.savePreferences()),i.push(this.model.save());var a=l.a.when.apply(l.a,i);a.done(s.a.bind(function(){this.hide()},this)),a.fail(function(){t.text(n.i(d.default)("Your changes could not be saved."))}),a.always(function(){e.removeClass("active")})},this)),o.fail(s.a.bind(function(){e.removeClass("active"),this.showPane("advanced")},this))}},savePreferences:function(){var e=this.model.get("preferences");if(!e.length)return l.a.Deferred().resolve().promise();var t=this.model.getSingleMetadataItem(),n=p.join(["/library/metadata",t.get("ratingKey"),"prefs"],e.getSaveParams()),i=this.model.server.getXHROptions(n,{
type:"PUT"}),a=l.a.ajax(i);return a.done(function(){var n=t.get("preferences");e.forEach(function(e){var t=n.get(e.id);t.set("value",e.get("value"))})}),a},showAdvancedConfirmModal:function(){var e=this.model.get("preferences").some(function(e){return/^autoDeletion/.test(e.id)});if(!e)return l.a.Deferred().resolve().promise();var t=new I.a({title:n.i(d.default)("Confirm Deletion Settings"),message:n.i(d.default)("Deletion settings will take effect immediately! Files may be deleted and this can't be undone. Are you sure?"),
confirmLabel:n.i(d.default)("Yes"),cancelLabel:n.i(d.default)("Cancel"),requireDoubleConfirm:!0,doubleConfirmMessage:n.i(d.default)("Multiple files may be deleted."),doubleConfirmLabel:n.i(d.default)("Yes, I'm sure"),hasDanger:!0});return h.a.trigger("show:modal",t),t.promise},onPaneShow:function(e,t){this.listenTo(t,"focusSubmit",function(){this.ui.saveBtn.focus()})},onPaneHide:function(e,t){t.flushChanges(),this.stopListening(t)},onFormSubmit:function(e){e.preventDefault(),this.saveChanges()}});
t.a=x},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(946)),p=n.n(h),f=n(945),g=n.n(f),m=n(2208),v=n.n(m),y=n(2373),b=n.n(y),S=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onProgressToUpdate=function(){a.setState({progress:a._progressPosition.progress})},a.onProgressToComplete=function(){a._progressToTween=null},a.state={progress:0},a}return u()(t,e),t.prototype.componentDidMount=function(){
this._progressTo(this.props)},t.prototype.componentDidUpdate=function(e){this._progressTo(this.props)},t.prototype.componentWillUnmount=function(){this._cancelProgressTo()},t.prototype._progressTo=function(e){var t=e.progress,n=this.props.smoothProgressDuration/1e3,i={progress:t,ease:g.a.Power3.easeOut,onUpdate:this.onProgressToUpdate,onComplete:this.onProgressToComplete};this._progressPosition={progress:this.state.progress},this._cancelProgressTo(),this._progressToTween=p.a.to(this._progressPosition,n,i);
},t.prototype._cancelProgressTo=function(){this._progressToTween&&(this._progressToTween.kill(),this._progressToTween=null)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.containerClassName,i=e.backgroundClassName,r=e.size,s=e.lineWidth,o=e.strokeColor,l=e.showProgressText,c=this.state.progress,u=r/2,d=u-s,h=Math.PI*(2*d),p=r+"px",f=r-3*s+"px",g=(100-c)/100*h,m=Math.round(c)+"%";return a()("div",{className:n,style:{width:p,height:p,lineHeight:p}},void 0,a()("svg",{className:t,version:"1.1",
xmlns:"http://www.w3.org/2000/svg",width:r,height:r},void 0,a()("circle",{fill:"transparent",r:d,cx:u,cy:u,strokeDasharray:h,style:{strokeWidth:s,stroke:o,strokeDashoffset:g}})),a()("div",{className:i,style:{width:f,height:f}}),l&&a()("div",{className:b.a.circularProgressBarText},void 0,m))},t}(d.Component);S.defaultProps={className:b.a.circularProgressBar,containerClassName:b.a.circularProgressBarContainer,backgroundClassName:b.a.circularProgressBarBackground,size:60,lineWidth:5,strokeColor:v.a.primaryColor,
showProgressText:!0,smoothProgressDuration:1e3},t.a=S},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=n.n(v),b=n(28),S=n.n(b),w=n(219),M=n(2398),I=n.n(M),C=function(e){function t(){var n,i,a;u()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=h()(this,e.call.apply(e,[this].concat(s))),i.onChange=function(e){i.props.onChange(e.target.value)},a=n,h()(i,a);
}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.errorClassName,i=e.disabledClassName,r=e.isDisabled,o=e.size,c=e.name,u=e.value,d=e.values,h=e.hasError,p=l()(e,["className","errorClassName","disabledClassName","isDisabled","size","name","value","values","hasError"]);return s()("div",{className:S()(t,I.a[o],r&&i,h&&n)},void 0,y.a.createElement("select",a()({},p,{disabled:r,className:I.a.select,id:c,name:c,value:u,onChange:this.onChange}),d.map(function(e){if(m.a.isString(e))return s()("option",{
value:e},e,e);var t=m.a.keys(e),n=t[0];return s()("option",{value:n},n,e[n])})))},t}(v.Component);C.defaultProps={className:I.a.input,errorClassName:I.a.hasError,disabledClassName:I.a.isDisabled,isDisabled:!1,size:w.LARGE,hasError:!1},t.a=C},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(17),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(502),m=n(26),v=n(2418),y=n.n(v),b=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return h()(t,e),
t.prototype.render=function(){var e=this.props,t=e.children,n=e.tooltip,i=e.hideOnPress,r=e.onPress,o=s()(e,["children","tooltip","hideOnPress","onPress"]);return f.a.createElement(g.a,a()({className:y.a.toolbarButton,component:m.a,tooltip:n,tooltipClassName:y.a.toolbarTooltip,hideOnPress:i,onPress:r},o),t)},t}(p.Component);t.a=b},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.errorMessage,a=e.onModalClose;return r()(c.a,{onModalClose:a},void 0,r()(u.a,{},void 0,n.i(o.default)("DVR Setup")),i&&r()("div",{
className:h.a.errorMessage},void 0,r()(l.a,{name:"plex-icon-alert-560",className:h.a.errorIcon}),i),t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(30),c=n(91),u=n(98),d=n(2430),h=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.onModalClose,a=c()(e,["isOpen","metricsProperties","onModalClose"]);return o()(h.a,{isOpen:t,metricsPage:"mediaSubscription",metricsProperties:n,onModalClose:i},void 0,d.a.createElement(p.a,r()({},a,{onModalClose:i})))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(117),p=n(1925);
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.innerClassName,i=c()(e,["children","innerClassName"]);return d.a.createElement(h.a,r()({className:f.a.pageContent},i),o()("div",{className:n},void 0,t))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(70),p=n(2478),f=n.n(p);i.defaultProps={innerClassName:f.a.innerPageContent},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=o()(e,["children"]);return c.a.createElement("div",r()({className:d.a.pageHeaderRight
},n),t)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(2483),d=n.n(u);t.a=i},function(e,t,n){"use strict";function i(e){var t=_.a.get(e);return!(!t||!t.child)}function a(e,t,n){return!!t.protocols.stream&&!n.hasInvalidKey&&!n.deletedAt}function r(e,t,n){return!!a(e,t,n)&&(n.Media&&n.Media.length>1)}function s(e,t,n){return a(e,t,n)}function o(e,t,n){return a(e,t,n)&&!!t.features.playqueue}function l(e,t,n){return!!n.primaryExtraKey}function c(e,t,n){return!!k.a.findWhere(n.related,{browse:!1
})}function u(e,t,n){return!!n.isLibraryItem}function d(e,t,n){return!!t.features.timeline&&(i(n.type)?n.unviewedLeafCount>0:!n.viewCount||!!n.viewOffset)}function h(e,t,n){return!!t.features.timeline&&(i(n.type)?n.viewedLeafCount>0:!!n.viewCount||!!n.viewOffset)}function p(e,t,n){var i=n.isLibraryItem&&!n.isExtra;return!(!t.features.manage||!i)}function f(e,t,n){return p(e,t,n)}function g(e,t,n){return p(e,t,n)}function m(e,t,n){return!!p(e,t,n)&&!(!n.guid||/(local|none)\:\/\//.test(n.guid))}function v(e,t,n){
return!!p(e,t,n)&&(!!n.guid&&!m(e,t,n))}function y(e,t,n){return m(e,t,n)}function b(e,t,n){if(!p(e,t,n))return!1;var a=void 0;return a=i(n.type)?n.Location:k.a.filter(n.Media,function(e){return!e.proxyType}),a.length>1}function S(e,t,n){return!(!e.isFullServer||!n.isLibraryItem)&&!(!e.allowSync||!n.allowSync)}function w(e,t,n){return!!p(e,t,n)&&!(!e.transcoderVideo||!e.backgroundProcessing)}function M(e,t,n){return!!t.protocols.download}function I(e,t,n){return!1}function C(e,t,n){return!1}function D(e,t,n){
return!1}function T(e,t,n){return!!p(e,t,n)&&!!e.allowMediaDeletion}function x(e,t,n){if(!p(e,t,n))return!1;if(!e.allowMediaDeletion)return!1;var i=k.a.filter(n.Media,function(e){return!!e.proxyType});return i.length>0}function P(e,t,n){var i="photo"===n.type&&!n.isLibraryItem;return!i}function E(e,t,n){return!0}function A(e,t,i){var a=i.type,r=R[a];n.i(N.a)(k.a.isArray(r),"getMetadataActionProps: Invalid type, "+a+", provided");var s=r.reduce(function(r,s){var o=O[s];return n.i(N.a)(k.a.isFunction(o),"getMetadataActionProps: Invalid action, "+s+", for "+a),
r[s]=o(e,t,i),r},{});return s}var L=n(2),k=n.n(L),N=n(33),_=n(36);t.a=a,t.e=u,t.f=d,t.g=h,t.b=p,t.h=f,t.i=g,t.j=S,t.k=w,t.l=T,t.c=E,t.d=A;var O={showPlay:a,showPlayVersion:r,showPlayAll:a,showShuffle:s,showQueue:o,showPlayTrailer:l,showPlayPlexMix:c,showPlayMusicVideo:l,showAddToPlaylist:u,showMarkWatched:d,showMarkUnwatched:h,showEdit:p,showRefresh:f,showAnalyze:g,showFixMatch:m,showMatch:v,showUnmatch:y,showSplitApart:b,showSync:S,showOptimize:w,showDownload:M,showWatchLater:I,showShare:C,showRecommend:D,
showDelete:T,showDeleteVersion:x,showGetInfo:P,showSelect:E},R={movie:["showPlay","showPlayVersion","showQueue","showPlayTrailer","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo","showSelect"],show:["showPlay","showPlayAll","showShuffle","showQueue","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDelete","showSelect"],
season:["showPlay","showPlayAll","showShuffle","showQueue","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showSync","showOptimize","showDelete","showSelect"],episode:["showPlay","showPlayVersion","showQueue","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo","showSelect"],artist:["showPlay","showShuffle","showQueue","showAddToPlaylist","showEdit","showRefresh","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showDelete","showSelect"],
album:["showPlay","showShuffle","showQueue","showAddToPlaylist","showEdit","showRefresh","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showDelete","showSelect"],track:["showPlay","showQueue","showPlayPlexMix","showPlayMusicVideo","showAddToPlaylist","showEdit","showAnalyze","showSync","showDownload","showDelete","showGetInfo","showSelect"],photoalbum:["showPlay","showShuffle","showAddToPlaylist","showEdit","showSync","showSelect"],photo:["showPlay","showAddToPlaylist","showEdit","showAnalyze","showSync","showDownload","showDelete","showGetInfo","showSelect"],
clip:["showPlay","showEdit","showPlayVersion","showEdit","showWatchLater","showShare","showRecommend","showGetInfo","showSelect"],playlist:["showDelete","showPlay","showQueue","showShuffle","showSync","showSelect"]}},function(e,t,n){e.exports=!n(204)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(237),a=n(380);e.exports=n(234)?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e;
}},function(e,t,n){var i=n(303),a=n(904),r=n(558),s=Object.defineProperty;t.f=n(234)?Object.defineProperty:function(e,t,n){if(i(e),t=r(t,!0),i(n),a)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var i=n(910),a=n(548);e.exports=Object.keys||function(e){return i(e,a)}},function(e,t,n){var i=n(555)("wks"),a=n(382),r=n(121).Symbol,s="function"==typeof r,o=e.exports=function(e){return i[e]||(i[e]=s&&r[e]||(s?r:a)("Symbol."+e));
};o.store=i},,,,,function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){var i,a,r="";return r+=' <h2 class="text-muted">',(a=n.subtitle)?i=a.call(e,{hash:{},data:t}):(a=e&&e.subtitle,i=typeof a===u?a.call(e,{hash:{},data:t}):a),(i||0===i)&&(r+=i),r+="</h2> "}function s(e,t){var i,a,r="";return r+=" <p>",(a=n.message)?i=a.call(e,{hash:{},data:t}):(a=e&&e.message,i=typeof a===u?a.call(e,{hash:{},data:t}):a),(i||0===i)&&(r+=i),r+="</p> "}this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),a=a||{};var o,l,c="",u="function",d=this;return c+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h1>',(l=n.title)?o=l.call(t,{hash:{},data:a}):(l=t&&t.title,o=typeof l===u?l.call(t,{hash:{},data:a}):l),(o||0===o)&&(c+=o),c+="</h1> ",o=n.if.call(t,t&&t.subtitle,{hash:{},inverse:d.noop,fn:d.program(1,r,a),data:a}),(o||0===o)&&(c+=o),c+=" ",o=n.if.call(t,t&&t.message,{hash:{},inverse:d.noop,fn:d.program(3,s,a),data:a}),(o||0===o)&&(c+=o),c+=" </div> </div>";
})},function(e,t,n){function i(e){if(!s(e)||a(e)!=o)return!1;var t=r(e);if(null===t)return!0;var n=d.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==h}var a=n(3012),r=n(3014),s=n(3020),o="[object Object]",l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=u.call(Object);e.exports=i},,,function(e,t,n){"use strict";var i=n(111),a=new i.a({props:["X-Plex-Client-Identifier","X-Plex-Device","X-Plex-Device-Name","X-Plex-Device-Screen-Resolution","X-Plex-Device-Vendor","X-Plex-Model","X-Plex-Platform","X-Plex-Platform-Version","X-Plex-Product","X-Plex-Version"]
});t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(14),s=n(111),o=n(4),l=n(8),c=n(27),u=s.a.extend({initialize:function(){this.controllers=[]},register:function(e){this.controllers.push(e)},getInstance:function(e,t){t||(t={});var i,s=r.a("appModel"),u=s.get("primaryPlayer");i=u&&!t.forceLocal?u.get("protocol")||"legacy":"local";var d=a.a.find(this.controllers,function(t){var n=i===t.protocol,a=e===t.type||"*"===t.type;return n&&a});if(d)return d.create(e,t);if(t.forceLocal)throw new Error("No player controller found for: "+e);
return c.a.warn("A player did not match the protocol ("+i+") and type ("+e+")."),l.a.trigger("show:alert",{type:"error",message:n.i(o.default)("Playback of this media is not supported with the selected player.")}),this.getInstance(e,{forceLocal:!0})}});t.a=new u},function(e,t,n){"use strict";var i=n(22),a=n(251),r=i.a.extend({name:"PlayQueueItemCollection",context:["server","identifier","mediaTagPrefix","mediaTagVersion"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(66),a=n.n(i),r=n(2),s=n.n(r),o=n(38),l=n(88),c=n(151),u=n(16),d=n(18),h=n(49),p=n(1139),f=d.a.extend({
name:"PlayQueueItemModel",context:["server","identifier","mediaTagPrefix","mediaTagVersion"],idAttribute:"playQueueItemID",cache:new c.a,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.playQueueItemID)},sessionAttrs:{isPlayQueueItem:u.a.boolean},syncedAttrs:{playQueueItemID:u.a.integer,queueIndex:u.a.integer,key:u.a.string,ratingKey:u.a.string,type:u.a.string,advertisement:u.a.boolean,allowSkipAfter:u.a.integer,librarySectionID:u.a.string,syncItemId:u.a.integer,generatorID:u.a.integer,
generatorType:u.a.integer,clientIdentifier:u.a.string,target:u.a.string},syncedRelations:{metadataItem:{relationClass:h.a,deferred:!0},lyricsStreams:{relationClass:p.a,deferred:!0}},defaults:{isPlayQueueItem:!0},augmentResponse:function(e){var t=s.a.pick(e,a()(this.syncedAttrs));t.metadataItem=e;var n=s.a.first(o.a.parseArray(e.Media));if(n){var i=s.a.first(o.a.parseArray(n.Part));if(i){var r=o.a.parseArray(i.Stream);r&&!function(){var e=l.a.get("lyrics");t.lyricsStreams=s.a.filter(r,function(t){
return o.a.parseInteger(t.streamType)===e.id})}()}}return t}});t.a=f},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(8),l=n(176),c=n(44),u=n(20),d=n(55),h=n(250),p={audio:["Track"],photo:["Photo","Video"],video:["Video"]},f=d.a.extend({idAttribute:"playQueueID",defaults:{selectedItem:null,mediaType:null,collection:null,server:null,owned:!0,hasUserAdditions:!1,repeatAll:!1,shuffled:!1,hasUpNext:!1,playQueueID:null,playQueueVersion:0,playQueueSelectedItemID:null,message:null},
url:function(){return"/playQueues/"+this.id},initialize:function(e,t){this.set("server",t.server),this.set("collection",new h.a([],{server:t.server}))},_fetch:function(){var e=a.a.result(this,"url");return this._ajax("GET",e)},convert:function(e){var t=a.a.isObject(e)?e:c.a.parseXML(e);return c.a.parseInteger(t,["playQueueVersion","playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID"]),c.a.parseArray(t,"Metadata"),c.a.parseBoolean(t,"playQueueShuffled"),t.stationService?(c.a.parseBoolean(t,"allowRepeat"),
c.a.parseBoolean(t,"allowSeek"),c.a.parseBoolean(t,"allowShuffle"),c.a.parseBoolean(t,"allowSkipPrevious"),c.a.parseInteger(t,"stationSkipsPerHour"),c.a.parseInteger(t,"serviceSkipsPerDay"),t.isRadio=!0):t.isRadio=!1,t},parse:function(e){var t=p[this.get("mediaType")].concat("Directory");e=c.a.replaceXMLElementNames(e,t,"Metadata");var n=this.convert(e),i=["playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID","message","isRadio","stationTitle","stationThumb","stationService","allowRepeat","allowSeek","allowShuffle","allowSkipPrevious","stationSkipsPerHour","serviceSkipsPerDay"];
n.playQueueVersion>this.get("playQueueVersion")&&i.push("playQueueID","playQueueVersion");var r=a.a.pick(n,i);return r.shuffled=!!n.playQueueShuffled,r.hasUpNext=!!n.playQueueLastAddedItemID,this.set(r),this.parseElementCollection(n)},parseElementCollection:function(e){var t=e.Metadata,n=a()(t).pluck("playQueueItemID").indexOf(e.playQueueSelectedItemID.toString()),i=parseInt(e.playQueueSelectedItemOffset,10),r=i-n,s=this.get("collection");return e.identifier&&s.setContext("identifier",e.identifier),
e.mediaTagPrefix&&s.setContext("mediaTagPrefix",e.mediaTagPrefix),e.mediaTagVersion&&s.setContext("mediaTagVersion",e.mediaTagVersion),a.a.each(t,function(e,t){e.queueIndex=r+t}),t.message=e.message,t.totalSize=parseInt(e.playQueueTotalCount,10),t.availableRange={start:r,end:r+t.length},t},_ajax:function(e,t){var n={repeat:this.get("repeatAll")?1:0,includeChapters:1};"audio"===this.get("mediaType")&&(n.includeRelated=1),t=u.join(t,n);var i=a.a.extend(this.get("server").getXHROptions(t),{type:e}),r=this._$ajax(i),s=a.a.bind(function(e){
var t=this.parse(e);t.message&&o.a.trigger("show:alert",{type:"error",message:t.message});var n=this.get("collection");n.totalSize=t.totalSize,n.availableRange=t.availableRange,n.reset(t,{parse:!0}),this.set("selectedItem",this.getCurrentItem())},this);return r.done(s,this)},_$ajax:function(e){return s.a.ajax(e)},getCurrentItem:function(){var e=this.get("playQueueSelectedItemID");return this.get("collection").findWhere({playQueueItemID:e})||null},queueContent:function(e,t){t||(t={});var n={type:this.get("mediaType")
};if(e.get("playlistType"))n.playlistID=e.get("ratingKey");else{var i=a.a.pick(t,"unwatched","items","excludeSeedItem");n.uri=l.a.uri(e,i)}return t.firstItemKey&&(n.key=t.firstItemKey),t.extrasPrefixCount&&(n.extrasPrefixCount=t.extrasPrefixCount),n.shuffle=t.shuffle?1:0,t.continuous&&"episode"===e.get("type")&&(n.continuous=1),this.isNew()?this._addContentPromise=this._ajax("POST",u.join("/playQueues",n)):(n.next=t.next?1:0,this.set("hasUserAdditions",!0),this._addContentPromise=this._ajax("PUT",u.join(a.a.result(this,"url"),n))),
this._addContentPromise},addContent:function(e,t){return this.queueContent(e,t).then(a.a.bind(this._setSelectedItem,this,t))},_setSelectedItem:function(e){var t;if(e&&e.firstItemKey){var n=e.firstItemKey;t=this.get("collection").find(function(e){return e.get("key")===n})}else t=this.get("collection").at(0);this.set("selectedItem",t)},removeItem:function(e){if(e.get("playQueueItemID")===this.get("selectedItem").get("playQueueItemID"))return s.a.Deferred().resolve().promise();this.set("hasUserAdditions",!0);
var t=u.join([a.a.result(this,"url"),"/items/",e.get("playQueueItemID")]);return this._ajax("DELETE",t)},moveItem:function(e,t){if(e===this.get("selectedItem").get("playQueueItemID"))return s.a.Deferred().resolve().promise();var n=t||this.get("selectedItem").get("playQueueItemID");this.set("hasUserAdditions",!0);var i={after:n},r=u.join([a.a.result(this,"url"),"/items/",e,"/move"],i);return this._ajax("PUT",r)},isItemQueueable:function(e){var t=a()(e).result("url"),n=e.get("playlistType")||/\/(?:library|hubs|services\/gracenote)\//.test(t);
if(!n)return!1;var i=/\/sync\//.test(t);if(i)return!1;var r=/\/folder/.test(t);if(r)return!1;var s=/\/theme\//.test(t);if(s)return!1;var o=e.get("currentSubset")&&e.get("currentSubset").id;if("folder"===o||"recentlyViewedShows"===o)return!1;var l=e.get("type")&&("photoalbum"===e.get("type")||"photo"===e.get("type")),c="photo"===e.viewGroup||l,u=e.server.supports("photoPlayQueues");return u||!c},toggleShuffle:function(){var e=[a.a.result(this,"url")];return this.get("shuffled")?e.push("/unshuffle"):e.push("/shuffle"),
this._ajax("PUT",u.join(e))},setRepeatAll:function(e){return this.set("repeatAll",e),this.fetch()},yieldOwnership:function(){this.set("owned",!1);var e=this._addContentPromise||s.a.Deferred().resolve().promise();return e.then(a.a.bind(function(){return this.get("playQueueID")&&this.get("collection").length>0?a.a.result(this,"url")+"?own=1&window=200":null},this))},takeOwnership:function(){if(this.get("owned"))return s.a.Deferred().resolve().promise();this.set("owned",!0);var e=a.a.result(this,"url")+"?own=1";
return this._ajax("GET",e)},supports:function(){return!0},getIdFromKey:function(e){var t=/playQueues\/([^\/?]+)/.exec(e);return t&&t[1]||null}});t.a=f},function(e,t,n){"use strict";var i=n(38),a=n(57),r=n(22),s=n(49),o=r.a.extend({name:"MetadataCollection",context:["server","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey"],model:s.a,url:function(){return this.containerKey},augmentResponseText:function(e,t){return t===a.a.xml?i.a.replaceMetadataXMLElementNames(e):e;
},splitByType:function(){var e={};return this.each(function(t){var n=t.get("type");e.hasOwnProperty(n)?e[n].push(t):e[n]=[t]}),e}});t.a=o},function(e,t,n){"use strict";var i=n(22),a=n(649),r=i.a.extend({name:"MediaSettingCollection",context:["server"],model:a.b,getSaveParams:function(){return this.reduce(function(e,t){return e[t.id]=t.get("value"),e},{})}});t.a=r},function(e,t,n){"use strict";function i(){return n.i(u.createSelector)(n.i(f.a)(),n.i(g.a)(),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=c.a.findWhere(t.features,{
type:p.a.CONTENT});if(i&&i.directories)return i.directories.map(function(e){return t.isLibraryProvider&&"/hubs"===e.hubKey?o()({isHomeDirectory:!0},e):e});if(t.identifier===h.a.LIBRARY_PROVIDER_IDENTIFIER){var a=function(){var t=[{hubKey:"/hubs",isHomeDirectory:!0,title:n.i(d.default)("Home")}];return e.forEach(function(e){var n=e.key,i=e.title;t.push({key:"/library/sections/"+n,hubKey:"/hubs/sections/"+n,title:i})}),{v:t}}();if("object"===("undefined"==typeof a?"undefined":r()(a)))return a.v}return[];
})}var a=n(119),r=n.n(a),s=n(7),o=n.n(s),l=n(2),c=n.n(l),u=n(9),d=(n.n(u),n(4)),h=n(72),p=n(171),f=n(437),g=n(103);t.a=i},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(150)),r=n.i(i.createSelector)(a.a,function(e){return e.servers});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(9),s=(n.n(r),n(258)),o=n.i(r.createSelector)(s.a,function(e){return a.a.find(e,function(e){return e.isCloud})});t.a=o},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(256)),r=n.i(i.createSelector)(a.a,function(e){
return e.servers},function(e,t){return t?t.map(function(t){return e[t]}):[]});t.a=r},function(e,t,n){"use strict";var i={NEVER:"never",SAME_NETWORK:"samenetwork",ALWAYS:"always"};i.settings=[{value:i.NEVER,title:"Never"},{value:i.SAME_NETWORK,title:"On same network as server"},{value:i.ALWAYS,title:"Always"}],t.a=i},function(e,t,n){"use strict";var i={AUTO:"auto",AVOID:"avoid",ALWAYS:"always",NEVER:"never"};i.settings=[{value:i.AUTO,title:"Automatic"},{value:i.AVOID,title:"Only image formats"},{value:i.ALWAYS,
title:"Always"}],t.a=i},function(e,t,n){"use strict";var i={CREATED:0,PROGRESS:1,MATCHING:2,DOWNLOADING_METADATA:3,LOADING_METADATA:4,PROCESSED:5,ANALYZING:6,DELETED:9};t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return!1;var t=r.a.unix(e);return r()().isSame(t,"day")}var a=n(43),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(){return window.overridePixelRatio||window.devicePixelRatio||1}t.a=i},function(e,t,n){"use strict";function i(e,t){switch(t){case s.SUBSCRIPTION:switch(e){
case"1003":return n.i(r.default)("Subscriptions have been temporarily disabled: too many failed attempts. Please try again later.")}}switch(e){case"1001":return n.i(r.default)("The username or password is incorrect");case"1003":return n.i(r.default)("Sign in has been temporarily disabled: too many failed attempts. Please try again later.");case"1010-login":return n.i(r.default)("Login is required");case"1010-password":return n.i(r.default)("Password is required");case"1010-email":return n.i(r.default)("Email is required");
case"1011-username":return n.i(r.default)("Username has already been taken");case"1011-email":return n.i(r.default)("email has already been taken");case"1030":return n.i(r.default)("This account only allows signing in with an email address");case"1031":return n.i(r.default)("The username or password is incorrect. Repeated attempts may temporarily disable sign in.");case"1032-password":return n.i(r.default)("Password must be at least 8 characters");case"1033-password":return n.i(r.default)("Password is too weak");
case"1034-password":return n.i(r.default)("Password must be different from username or email address");case"1035-email":return n.i(r.default)("Email is not a valid email address");case"1036-username":return n.i(r.default)("Username must not be an email address");case"1037-username":return n.i(r.default)("Username contains invalid characters");case"1038-pin":return n.i(r.default)("Pin must be 4 digits");case"1039-passwordConfirmation":return n.i(r.default)("Confirm Password must match Password");case"1040":
return n.i(r.default)("Invalid Password")}}function a(e,t){if(e){var a=String(e.code),s=e.code+"-"+e.field,o=i(s,t)||i(a,t);return o||e.message||n.i(r.default)("An unknown error occurred")}}var r=n(4);t.a=a;var s={SUBSCRIPTION:"subscription"}},function(e,t,n){"use strict";function i(e){var t=e.episodePrefix||"E{1}",i=e.episodeIndex;if(i>0||0===i)return e.noLeadingZero||(i=n.i(o.a)(i)),n.i(s.default)(t,i);if(e.date){var a=r()(e.date);return n.i(s.default)("{monthNumber}/{dayNumber}/{shortYear}",{monthNumber:a.month()+1,
dayNumber:a.date(),shortYear:a.format("YY")})}return""}var a=n(43),r=n.n(a),s=n(4),o=n(456);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(4),l=n(329),c=n(714),u=n(715),d=n(128),h=n(708),p=n(39),f=n(95),g=n(88),m=n(175),v=n(260),y=n(27),b={getMediaDecision:function(e){var t=this.augmentProfile(e);if(y.a.info("[MDE] Augmented profile:",t),e.media)return this.analyzeMedia(e.media,t,e);var n=e.item,i=n.get("Media");if(!i.length)return{transcodeServer:e.transcodeServer,canPlay:!0,
canDirectPlay:!0};if(1===i.length)return this.analyzeMedia(a.a.first(i),t,e);var r=a.a.map(i,function(n){return this.analyzeMedia(n,t,e)},this);return this.getBestDecision(r)},augmentProfile:function(e){var t=e.profile;if(!t)throw new Error("MDE: No player profile provided for "+e.type);var n=s.a.extend(!0,{},t.directPlay),i=s.a.extend(!0,{},t.directStream),r=n.generic;r&&delete n.generic;var o=e.allowedAC3Containers,l="*"===o;!l&&o&&(o=a.a.isArray(o)?o:[o]);var c=e.allowedEAC3Containers,u="*"===c;
!u&&c&&(c=a.a.isArray(c)?c:[c]);var d=e.allowedDCAContainers,h="*"===d;return!h&&d&&(d=a.a.isArray(d)?d:[d]),a.a.each(n,function(t,n){this.mergeGenericOptions(t,r),this.mergeMaxQualityOptions(t,e),(l||o&&a.a.contains(o,n))&&this.addAudioCodec("ac3",t,e),(u||c&&a.a.contains(c,n))&&this.addAudioCodec("eac3",t,e),(h||d&&a.a.contains(d,n))&&this.addAudioCodec("dca",t,e);var i=p.a.getStreamByType(e.type),s=t[i];if(s){var f=s.codecs;a.a.each(f,function(t,n){this.mergeMaxQualityOptions(t,e,!0),e.videoCodecOptions&&e.videoCodecOptions[n]&&this.mergeVideoCodecOptions(t,e.videoCodecOptions[n]);
},this)}},this),this.mergeMaxQualityOptions(i,e),e.videoCodecOptions&&e.type===p.a.types.VIDEO&&i.video&&a.a.each(i.video.codecs,function(t,n){e.videoCodecOptions[n]&&this.mergeVideoCodecOptions(t,e.videoCodecOptions[n])},this),{directPlay:n,directStream:i}},mergeGenericOptions:function(e,t){t&&(a.a.defaults(e,a.a.omit(t,"video","audio")),a.a.each(["audio","video"],function(n){var i=t[n],r=e[n];i&&(r||(r={},e[n]=r),a.a.defaults(r,a.a.omit(i,"codecs")),i.codecs&&a.a.each(i.codecs,function(e,t){a.a.defaults(this.ensureCodecs(t,r),e);
},this))},this))},mergeVideoCodecOptions:function(e,t){a.a.each(t,function(t,n){e[n]=t},this)},ensureCodecs:function(e,t){return t.codecs||(t.codecs={}),t.codecs[e]||(t.codecs[e]={}),t.codecs[e]},mergeMaxQualityOptions:function(e,t,n){var i=[{option:"bitrate",setting:"maxBitrate"},{option:"videoResolution",setting:"maxVideoResolution"}];a.a.each(i,function(i){if("videoResolution"!==i.option||t.type===p.a.types.VIDEO){var a=this.getMaxQualityOption(e,i.option,t);if(null!=a){var r=i.setting,s=p.a.getStreamByType(t.type);
e.hasOwnProperty(r)?e[r]=a:e.hasOwnProperty(s)?e[s][r]=a:n||(e[s]={},e[s][r]=a)}}},this)},getMaxQualityOption:function(e,t,n){var i=n.quality||{},a="max"+t.charAt(0).toUpperCase()+t.slice(1),r=i[t],s=this.getPrimaryStreamProperty(e,a,n);if("videoResolution"===t&&r&&(r=f.a.getResolutionFromSize(r)),"bitrate"===t){var o=n.item.server,l=o.get("maxUploadBitrate");l&&(!r||l<r)&&(r=l)}if(r||s){var c;return c=r&&s?Math.min(r,s):r||s}},addAudioCodec:function(e,t,n){t.audio||(t.audio={}),this.ensureCodecs(e,t.audio);
},analyzeMedia:function(e,t,i){y.a.info("[MDE] Starting analysis of",this.getMediaTitle(e)),n.i(y.a)("[MDE] Analyzing direct play");var r=this.canDirectPlay(e,t.directPlay,i),s={transcodeServer:i.transcodeServer,item:i.item,media:e,canDirectPlay:r.result,canDirectPlayFailedCheck:r.failedCheck},o=i.transcoderOptions||{};if(a.a.isFunction(o)&&(o=o(s)),i.type===p.a.types.VIDEO){n.i(y.a)("[MDE] Analyzing video direct stream");var d=n.i(l.a)(e);if(d){var h=this.canDirectStream(d,t.directStream.video,i,o);
s.canDirectStreamVideo=h.result,s.canDirectStreamVideoFailedCheck=h.failedCheck}}if(i.type!==p.a.types.PHOTO){n.i(y.a)("[MDE] Analyzing audio direct stream");var f=n.i(c.a)(e);if(f){var g=this.canDirectStream(f,t.directStream.audio,i,o);s.canDirectStreamAudio=g.result,s.canDirectStreamAudioFailedCheck=g.failedCheck}}var m=n.i(u.a)(s.media);return m&&(n.i(y.a)("[MDE] Analyzing subtitles"),a.a.extend(s,this.analyzeSubtitles(m,i))),n.i(y.a)("[MDE] Analyzing playability"),a.a.extend(s,this.canPlay(s,i)),
a.a.extend(s,this.getEffectiveQuality(e,t.directStream,i)),y.a.group("[MDE] Finished analysis of",this.getMediaTitle(e)),this.getDecisionLogs(s).forEach(function(e){return y.a.info(e)}),y.a.groupEnd(),s},canDirectPlay:function(e,t,i){if(i.forceDirectPlay)return n.i(y.a)("[MDE] Direct play forced"),{result:!0};if(i.allowDirectPlay===!1)return y.a.warn("[MDE] Direct play failed; option is disabled"),{result:!1,failedCheck:"allowDirectPlay"};if(i.type===p.a.types.VIDEO&&!this.canDirectPlayVideo(e,i))return{
result:!1,failedCheck:"canDirectPlayVideo"};var r=t[e.container];if(!r)return y.a.warn("[MDE] Direct play failed; unsupported container:",e.container),{result:!1,failedCheck:"containerProfile"};var s=a.a.keys(r);if(s&&s.length){for(var o=0,u=s.length;o<u;o++){var h=s[o],f=r[h];if("mimeType"===h){if(!i.skipCanPlayTypeTest&&!this.canPlayType(p.a.getElementByType(i.type),f))return y.a.warn("[MDE] Direct play failed; canPlayType test, %s: %s",h,f),{result:!1,failedCheck:"canPlayType"}}else if("video"===h||"audio"===h){
var m=g.a.get(h),v=n.i(d.a)(e,{streamType:m.id}),b="video"===h?n.i(l.a)(e):n.i(c.a)(e);if(!b){y.a.warn("[MDE] No stream selected; will not be able to analyze stream codecs");continue}var S="audio"===h&&b!==v[0];if(S&&!i.allowMultiTrackAudio)return y.a.warn("[MDE] Direct play failed; multi-track audio is required"),{result:!1,failedCheck:"allowMultiTrackAudio"};var w=this.analyzeStream(b,f,i);if(!w.result)return{result:!1,failedCheck:w.failedCheck}}else if("photo"===h){var M=this.analyzeStream(a.a.first(e.Part),f,i);
if(!M.result)return{result:!1,failedCheck:M.failedCheck}}else if(!this.validateProfileProperty(h,f,e))return{result:!1,failedCheck:"validateProfileProperty:"+h}}return{result:!0}}return{result:!0}},canDirectPlayVideo:function(e,t){if(!t.allowDirectPlay)return y.a.warn("[MDE] Direct play failed; option is disabled"),!1;if("hls"===e.protocol&&!t.hasNativeHLS)return y.a.warn("[MDE] Direct play failed; cannot play HLS"),!1;if("flv"===e.container&&!t.hasFlash)return y.a.warn("[MDE] Direct play failed; cannot play FLV"),
!1;var n=a.a.first(e.Part);return t.allowSecureDirectPlay!==!1||!n||!/^https:\/\//.test(n.key)||(y.a.warn("[MDE] Direct play prevented; cannot play via HTTPS"),!1)},canPlayType:function(e,t){if(e===p.a.elements.PHOTO)return!0;var n=document.createElement(e);return!(!n.canPlayType||!n.canPlayType(t).replace(/^no$/,""))},canDirectStream:function(e,t,n,i){return i.directStream?this.analyzeStream(e,t,n):(y.a.warn("[MDE] Direct stream failed; option is disabled"),{result:!1,failedCheck:"options:directStream"
})},analyzeStream:function e(t,n,i){var a=n&&n.codecs&&n.codecs[t.codec];for(var r in n){var s=n[r];if("codecs"===r){var o=s[t.codec];if(!o)return{result:!1,failedCheck:"noCodecInProfile:"+t.codec};var e=this.analyzeStream(t,o,i);if(!e.result)return{result:!1,failedCheck:e.failedCheck}}else if(!(a&&r in a||this.validateProfileProperty(r,s,t)))return{result:!1,failedCheck:"validateProfileProperty:"+r}}return{result:!0}},validateProfileProperty:function(e,t,n){var i,r=e.match(/^max(\w)(\w*)/);if(r){
if(e=r[1].toLowerCase()+r[2],i=n[e],null==i&&y.a.warn("[MDE] Unable to validate %s; re-analyze the media if possible",e),null!=i&&"videoResolution"===e&&(i=f.a.getHeightFromResolution(i),t=f.a.getHeightFromResolution(t)),null!=i&&i>t)return y.a.warn("[MDE] Invalid profile property; %s: %s > %s",e,i,t),!1}else if(i=n[e],null==i&&y.a.warn("[MDE] Unable to validate %s; re-analyze the media if possible",e),i!==t&&!a.a.contains(t,i))return y.a.warn("[MDE] Invalid profile property; %s: %s !== %s",e,i,t),
!1;return!0},analyzeSubtitles:function(e,t){var i=t.subtitlesBurnLevel||v.a.ALWAYS,a=e.codec;return n.i(y.a)("[MDE] Subtitle codec:",a),n.i(y.a)("[MDE] Burn level:",i),i===v.a.NEVER?{useSoftSubtitles:!1}:i===v.a.ALWAYS?(y.a.warn("[MDE] Direct play failed; asked to always burn subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles:burnLevelAlways",canDirectStreamVideo:!1}):t.transcodeServer.supports("softSubtitles")?(y.a.warn("[MDE] Direct play failed; %s subtitles",a),
/^(pgs|vobsub)$/i.test(a)?(y.a.warn("[MDE] Soft subtitles failed; bitmap subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):/^(ass|ssa)$/i.test(a)&&i===v.a.AUTO?(y.a.warn("[MDE] Soft subtitles failed; ASS subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):{useSoftSubtitles:!0,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles"}):(y.a.warn("[MDE] Direct play failed; server support requires burn subtitles"),
y.a.warn("[MDE] Soft subtitles failed; server version"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles:softSubtitlesUnsupported",canDirectStreamVideo:!1})},canPlay:function(e,t){var n=this.validateParts(e,t)||this.validateTranscoder(e,t);return n?{canPlay:!1,errorMessage:n}:{canPlay:!0}},validateParts:function(e,t){var i=n.i(h.a)(e.media);if(i.length){y.a.warn("[MDE] Unable to play; missing parts");var r=a.a.first(i);return 1===Number(r.exists)?n.i(o.default)("Please check the permissions for this file."):n.i(o.default)("Please check that the file exists and the necessary drive is mounted.");
}},validateTranscoder:function(e,t){if(!e.canDirectPlay){var i,r=t.type,s=r===p.a.types.MUSIC,l=r===p.a.types.VIDEO,c=t.transcodeServer,u=c.get("transcoderAudio"),d=c.get("transcoderVideo");if(s||"track"===t.item.get("type")){if(i=n.i(o.default)("This server is not powerful enough to convert music."),l&&!d)return y.a.warn("[MDE] Unable to play; server unable to transcode music using video transcoder"),i;if(s&&!u)return y.a.warn("[MDE] Unable to play; server unable to transcode music using audio transcoder"),
i}else if(l){var h=n.i(o.default)("This server is not powerful enough to convert video. You may be able to enable playback by increasing your quality setting."),g=n.i(o.default)("This server is not powerful enough to convert video. Playback qualities are limited because an indirect connection is being used."),m=e.canDirectStreamVideo||!c.get("transcoderVideoRemuxOnly");if(i=n.i(o.default)("This server is not powerful enough to convert video."),!d||!m){if(y.a.warn("[MDE] Unable to play; server unable to transcode video"),
c.get("isCloudSyncServer"))switch(e.canDirectPlayFailedCheck){case"validateProfileProperty:maxLevel":return n.i(o.default)("Synced media cannot be converted to a lower H.264 level.");case"validateProfileProperty:maxBitrate":return n.i(o.default)("Synced media cannot be converted to a lower quality.");case"allowDirectPlay":default:return n.i(o.default)("Converting is not supported for synced media.")}if(t.quality){if(t.quality.index===f.a.ORIGINAL)return i;var v=a.a.clone(t);return v.quality=a.a.extend({
index:f.a.ORIGINAL},a.a.pick(t.quality,"attribute")),this.getMediaDecision(v).canDirectPlay?h:"relay"===c.get("maxUploadBitrateReason")?g:i}return h}}}},getEffectiveQuality:function(e,t,i){var a=i.quality,r={},s={};if(e.bitrate||y.a.warn("[MDE] Unable to determine effective quality; re-analyze the media if possible"),i.type===p.a.types.VIDEO){r.bitrate=e.bitrate,r.videoResolution=f.a.getHeightFromResolution(e.videoResolution);var o=this.getPrimaryStreamProperty(t,"maxBitrate",i);if(o){var c=n.i(l.a)(e),u=c?c.bitrate:e.bitrate;
r.bitrate=Math.min(u,o),s.maxVideoBitrate=o}if(a){var d=a.videoResolution;if(d){var h=f.a.getResolutionFromSize(a.videoResolution),g=f.a.getHeightFromResolution(h);r.videoResolution=Math.min(r.videoResolution,g)}s.videoQuality=a.videoQuality,s.videoResolution=a.videoResolution}}else if(i.type===p.a.types.MUSIC){r.bitrate=e.bitrate;var m=this.getPrimaryStreamProperty(t,"maxBitrate",i);m&&(r.bitrate=Math.min(e.bitrate,m),s.maxAudioBitrate=m)}return r.transcoderQualityOptions=s,r},getPrimaryStreamProperty:function(e,t,n){
var i=p.a.getStreamByType(n.type),a=e[i],r=e[t];return null==r&&a&&(r=a[t]),r},getMediaTitle:function(e){var t=e.title||e.videoResolution||e.bitrate,i=a.a.compact([e.container,e.videoCodec,e.audioCodec]),r=n.i(l.a)(e);return r&&i.push(r.level,r.profile),i.length&&(t+=" ("+i.join(", ")+")"),t},getDecisionLogs:function(e){var t=["canPlay: "+e.canPlay,"canDirectPlay: "+e.canDirectPlay],n=e.canDirectStreamVideo;null!=n&&t.push("canDirectStreamVideo: "+n);var i=e.canDirectStreamAudio;null!=i&&t.push("canDirectStreamAudio: "+i);
var r=e.useSoftSubtitles;null!=r&&t.push("useSoftSubtitles: "+r);var s=e.bitrate;null==s||a.a.isNaN(s)||t.push("bitrate: "+s);var o=e.videoResolution;return null==o||a.a.isNaN(o)||t.push("videoResolution: "+o),t},getBestDecision:function(e){var t=a.a.last(this.sortDecisions(e));return y.a.group("[MDE] Selected %s to play",this.getMediaTitle(t.media)),this.getDecisionLogs(t).forEach(function(e){return y.a.info(e)}),y.a.groupEnd(),t},sortDecisions:function(e){return a.a.chain(e).reverse().sortBy(this.preferHigherBitrate,this).sortBy(this.preferMoreAudioChannels,this).sortBy(this.preferDirectStreamAudio,this).sortBy(this.preferHigherResolution,this).sortBy(this.preferDirectStreamVideo,this).sortBy(this.preferDirectPlay,this).sortBy(this.preferHigherResolutionIfCapable,this).sortBy(this.preferCloudIfRemote,this).sortBy(this.preferPlayable,this).value();
},preferPlayable:function(e){return void 0===e.canPlay?null:e.canPlay},preferCloudIfRemote:function(e){var t=e.media.proxyType===m.a.CLOUD;return e.transcodeServer.hasLocalConnection()?!t:t},preferHigherResolutionIfCapable:function(e){var t=e.transcodeServer,n=t.get("transcoderVideo"),i=t.get("transcoderVideoRemuxOnly");return n&&!i&&(e.canDirectPlay||e.canDirectStreamVideo)?this.preferHigherResolution(e):null},preferDirectPlay:function(e){return void 0===e.canDirectPlay?null:e.canDirectPlay},preferDirectStreamVideo:function(e){
return void 0===e.canDirectStreamVideo?null:e.canDirectStreamVideo},preferHigherResolution:function(e){return void 0===e.videoResolution?null:e.videoResolution},preferDirectStreamAudio:function(e){return void 0===e.canDirectStreamAudio?null:e.canDirectStreamAudio},preferMoreAudioChannels:function(e){var t=e.media.audioChannels;return void 0===t?null:t},preferHigherBitrate:function(e){return void 0===e.bitrate?null:e.bitrate}};t.a=b},function(e,t,n){"use strict";function i(e){if(!e)return"";if("8k"===e)return"8K";
if("4k"===e)return"4K";var t=parseInt(e,10);return r.a.isNaN(t)?e.toUpperCase():e+"p"}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),r=n.n(a);t.default=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(4),l=n(38),c=n(39),u=n(1239),d=n(709),h=n(712),p=n(266),f=n(260),g=n(338),m=n(27),v=n(459),y=n(149),b={getPlayerDecision:function(e){a.a.defaults(e,{offset:0,minVersionForDASH:y.a.dash,minVersionForStreamingMKV:y.a.streamingMKV,transcoderOptions:{}});var t={playbackSessionID:e.playbackSessionID||n.i(g.a)(),
transcodeSessionID:n.i(g.a)(),offset:e.offset},i=this.populateMedia(t,e);return i=i.then(a.a.bind(function(){return this.resolveMedia(t,e)},this)),i=i.then(function(){return s.a.when(t.url)}),i=i.then(function(e){return t.url=e,t})},populateMedia:function(e,t){var i=s.a.Deferred(),r=a.a.bind(i.resolve,i,e);return t.requireAnalysis&&n.i(u.a)(t.item)?t.item.fetch({scope:"player"}).always(r):a.a.defer(r),i.promise()},resolveMedia:function(e,t){var n=a.a.extend({transcodeServer:this.resolveTranscodeServer(t)
},t),i=p.a.getMediaDecision(n),r=i.media,o=s.a.Deferred();return a.a.extend(e,i),r?e.canPlay?"webkit"===r.protocol?(m.a.warn("[PDE] Webkit videos are not supported"),e.redirect=!0,o.reject(e).promise()):"embed"===r.protocol?(m.a.warn("[PDE] An embed is required"),e.embed=!0,e.part=a.a.first(r.Part),o.reject(e).promise()):this.resolvePart(e,t):(m.a.warn("[PDE] Unable to play item;",e.errorMessage),o.reject(e).promise()):this.resolveUrls(e,t)},resolveTranscodeServer:function(e){var t=e.item.server,n=e.fallbackServer;
if(t===n||!n||!n.get("isConnected"))return t;var i;return e.type===c.a.types.VIDEO?i="transcoderVideo":e.type===c.a.types.MUSIC&&(i="transcoderAudio"),i&&!t.get(i)&&n.get(i)?n:t},resolvePart:function(e,t){return t.part?e.part=t.part:t.offset?1===e.media.Part.length?e.part=e.media.Part[0]:(e.part=n.i(d.a)(e.media,t.offset),e.offset=n.i(h.a)(e.media,e.part,t.offset)):e.part=a.a.first(e.media.Part),e.media.indirect?this.resolveIndirect(e,t):this.resolveUrls(e,t)},resolveIndirect:function(e,t){n.i(m.a)("[PDE] Resolving indirect item");
var i=t.item.resolveIndirect(e.media,e.part),r=a.a.bind(function(){return this.resolveMedia(e,t)},this),o=a.a.bind(function(){return s.a.Deferred().reject(e).promise()},this);return i=i.then(r,o)},resolveUrls:function(e,t){var n=s.a.Deferred();return this.validatePlayerType(e,t)?(this.validateSoftSubtitles(e,t)?e.subtitlesUrl=this.resolveSubtitlesUrl(e,t):e.useSoftSubtitles&&(e.useSoftSubtitles=!1),m.a.group("[PDE] Player decision"),m.a.info("Player:",e.playerType),m.a.info("Protocol:",e.protocol),
m.a.info("Direct Play:",e.canDirectPlay),m.a.groupEnd(),e.canDirectPlay?e.url=this.resolveDirectPlayUrl(e,t):e.url=this.resolveTranscoderUrl(e,t),this.resolveDecision(e,t)):n.reject(e).promise()},validatePlayerType:function(e,t){return e.media&&t.type&&t.type!==c.a.types.PHOTO?e.canDirectPlay?("hls"===e.media.protocol?(e.protocol="hls",e.playerType=t.hasNativeHLS?"html":"flash"):(e.protocol="http",e.playerType="flv"===e.media.container?"flash":"html"),!0):this.validatePlayerTranscodeProtocol(e,t):(e.protocol="http",
e.playerType="html",!0)},validatePlayerTranscodeProtocol:function(e,t){var i,a=e.transcodeServer,r=t.transcodeProtocol,s=!0,l=!0,u=!0;if(r&&(s="dash"===r,l="http"===r,u="hls"===r),u&&t.hasNativeHLS)return e.protocol="hls",e.playerType="html",!0;if(l&&t.hasStreamingMKV){if(a.isVersionOrNewer(t.minVersionForStreamingMKV))return e.protocol="http",e.playerType="html",!0;i=t.minVersionForStreamingMKV}if(s&&t.hasDASH){if(a.isVersionOrNewer(t.minVersionForDASH))return e.protocol="dash",e.playerType="html",
!0;i=t.minVersionForDASH}return t.type===c.a.types.MUSIC?(e.protocol="http",e.playerType="html",!0):u&&t.hasFlash?(e.protocol="hls",e.playerType="flash",!0):(i?e.errorMessage=n.i(o.default)("Please update Plex Media Server. This feature requires {1} or later.",i):e.errorMessage=n.i(o.default)("Streaming this media is unsupported."),!1)},validateSoftSubtitles:function(e,t){return e.useSoftSubtitles&&"html"!==e.playerType?(m.a.warn("[PDE] Only the HTML player supports soft subtitles"),!1):e.useSoftSubtitles;
},resolveDirectPlayUrl:function(e,t){var n=t.item,i=e.part,a={"X-Plex-Session-Identifier":e.playbackSessionID};if(i){var r=/(googlevideo|youtube).com/.test(i.key);return"flv"===i.container&&r&&i.postURL?i.postURL:n.server.resolveUrl(i.key,{appendHeaders:!0,params:a})}return n.server.resolveUrl(n.get("key"),{appendHeaders:!0,params:a})},resolveTranscoderUrl:function(e,t,i){var r=t.item,s=e.media,o=e.part,l=t.transcoderOptions;a.a.isFunction(l)&&(l=l(e)),l=a.a.extend({},e.transcoderQualityOptions,l,{
"X-Plex-Session-Identifier":e.playbackSessionID,session:e.transcodeSessionID,protocol:e.protocol,directPlay:e.canDirectPlay?1:0,offset:e.offset/1e3});var u=t.subtitlesBurnLevel;t.type===c.a.types.VIDEO&&(u===f.a.NEVER?l.subtitles=e.canDirectPlay?"none":"auto":e.useSoftSubtitles?(l.subtitles="auto",u===f.a.AVOID&&(l.advancedSubtitles="text")):l.subtitles="burn");var d=t.profileExtra;a.a.isFunction(d)&&(d=d(e)),l["X-Plex-Client-Profile-Extra"]=d,("hls"===l.protocol&&!t.useOffsetHLS||"dash"===l.protocol)&&(n.i(m.a)("[PDE] DASH and HLS should seek forward by default, offset=0"),
delete l.offset),"hls"===l.protocol&&t.useOffsetHLS&&(e.useOffsetHLS=!0,l.offset&&(n.i(m.a)("[PDE] HLS started with an offset, copyts=0"),l.copyts=0)),"http"===l.protocol&&(t.type===c.a.types.MUSIC?(e.useOffsetHTTP=!0,l.copyts=0):l.copyts=1),"http"!==l.protocol||e.canDirectPlay||(l["X-Plex-Chunked"]=1),a.a.each(a.a.keys(l),function(e){var t=l[e];null==t&&delete l[e]});var h=t.type,p=t.transcoder,g=e.transcodeServer;if(h===c.a.types.VIDEO)return p.video(g,r,s,o,l,i);if(h===c.a.types.MUSIC)return p.music(g,r,l,i);
if(h===c.a.types.PHOTO){l.fallbackServer=t.fallbackServer;var v="photo"===r.get("type")?r.getMediaKey():r.get("thumb");return p.image(g,v,l)}},resolveSubtitlesUrl:function(e,t){var n=this.resolveTranscoderUrl(e,t),i=n.substring(n.indexOf("?"));return e.transcodeServer.resolveUrl("/video/:/transcode/universal/subtitles"+i)},resolveDecision:function(e,t){var i=e.transcodeServer,r=s.a.Deferred();if(t.type===c.a.types.PHOTO||!i.supports("decisionEndpoint"))return r.resolve(e).promise();var o=a.a.clone(e);
this.validatePlayerTranscodeProtocol(o,t);var u=this.resolveTranscoderUrl(o,t,"decision"),d=s.a.ajax(i.getXHROptions(u,{timeout:2e3}));return d.done(function(t){var i=l.a.parseXML(t);i.generalDecisionCode&&(e.generalDecisionCode=l.a.parseInteger(i.generalDecisionCode),e.generalDecisionText=i.generalDecisionText),i.mdeDecisionCode&&(e.mdeDecisionCode=l.a.parseInteger(i.mdeDecisionCode),e.mdeDecisionText=i.mdeDecisionText),i.transcodeDecisionCode&&(e.transcodeDecisionCode=l.a.parseInteger(i.transcodeDecisionCode),
e.transcodeDecisionText=i.transcodeDecisionText),n.i(v.a)(e)?r.reject(e):r.resolve(e)}),d.fail(function(){m.a.warn("[PDE] Player decision failed; the transcode server may be a slow or outdated"),r.resolve(e)}),r.promise()}};t.a=b},function(e,t,n){"use strict";var i={sizes:{movie:"portrait",show:"portrait",season:"portrait",episode:"landscape",artist:"square",album:"square",track:"square",photo:"square",photoalbum:"square",clip:"landscape",playlist:"square",playlistFolder:"square",userPlaylistItem:"landscape",
channel:"square",channelDirectory:"square",folder:"portrait",friend:"square",poster:"portrait",art:"landscape",banner:"banner"},ratios:{portrait:1/1.5,square:1,landscape:16/9,banner:5.2},getRatioByType:function(e){return this.ratios[this.sizes[e]]},getPosterWidthUsingRatio:function(e,t){return Math.round(this.ratios[e]*t)},getPosterHeightUsingRatio:function(e,t){return Math.round(this.ratios[e]&t)},getPosterWidth:function(e,t){return Math.round(t*this.getRatioByType(e))},getPosterHeight:function(e,t){
return Math.round(t/this.getRatioByType(e))}};t.a=i},function(e,t,n){"use strict";function i(e,t,n){return null==n&&(n=e+"s"),1===t?e:n}t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(20),s=n(27),o=n(147),l=n(707),c=n(710),u={extensions:{dash:".mpd",hls:".m3u8",http:""},logParams:function(e,t,n){s.a.group("[Transcoder] %s (%s) options",e,t),a.a.forEach(n,function(e,t){return s.a.info("%s: %s",t,e)}),s.a.groupEnd()},serializeParams:function(e,t){var n,i={},s={},o=/^X-Plex/;return a.a.each(e,function(e,t){
o.test(t)?s[t]=e:i[t]=e}),i=r.stringifyParams(i),s=r.stringifyParams(s),n=i&&s?i+"&"+s:i||s},image:function(e,t,n){if(!t)return"";var i,r=n.fallbackServer,s=!1;if(r&&r.get("isConnected")){var l=r.get("isFullServer"),c=r.get("activeConnection").get("isPossiblyCrossNetworkProtected");i=l&&!c?r:null}if(i)if(e.get("cloud"))s=!0;else if(!e.get("isFullServer")){var u=!e.get("activeConnection").get("isPrivate"),d=i.get("activeConnection").get("isPrivate");s=u||d}var h=s?i:e,p=h.id===e.id;e.get("cloud")&&(t=s?i.resolveUrl(t,{
appendToken:!0}):e.resolveUrl(t,{appendToken:!0,connection:new o.a({scheme:"https",address:"node.plexapp.com",port:"32443"})}));var f={url:e.resolveUrl(t,{useLoopback:p,appendToken:!0}),width:n.width&&Math.round(parseFloat(n.width)),height:n.height&&Math.round(parseFloat(n.height))};n.minSize&&(f.minSize=1),n.format&&(f.format=n.format),n.quality&&(f.quality=n.quality),n.filters&&a.a.each(n.filters,function(e,t){void 0!==e&&(f[t]=e)});var g="/photo/:/transcode?"+this.serializeParams(f,h);return h.resolveUrl(g,{
appendToken:!0})},music:function(e,t,n,i){i||(i="start");var r=a.a.first(t.get("Media"));if(r){var s=a.a.first(r.Part);if(s){var o,l;return e.supports("universalMusicTranscoder")?(o=a.a.extend({hasMDE:1,path:e.resolveUrl(t.get("key"),{useLoopback:!0}),mediaIndex:0,partIndex:0},n),l="/music/:/transcode/universal/"+i):(o={identifier:t.get("identifier"),url:e.resolveUrl(s.key,{useLoopback:!0}),format:"mp3",audioCodec:"libmp3lame",audioBitrate:320,audioSamples:44100},l="/music/:/transcode/generic.mp3"),
this.logParams("Music",i,o),o=a.a.extend(o,e.getHeaders()),e.resolveUrl(l+"?"+this.serializeParams(o,e))}}},video:function(e,t,i,r,s,o){s||(s={}),o||(o="start");var u=e.id===t.server.id,d=t.server.get("cloud")?e:t.server,h=e.get("activeConnection"),p=h.get("isPrivate"),f=a.a.extend({hasMDE:1,path:d.resolveUrl(t.get("key"),{useLoopback:u,appendToken:!u}),mediaIndex:n.i(l.a)(t,i.id),partIndex:n.i(c.a)(i,r.key),protocol:"hls",fastSeek:1,directPlay:0,directStream:1,subtitleSize:100,audioBoost:100,location:p?"lan":"wan"
},s);f.path=f.path.replace(/^http[s]?:\/\/node.plexapp.com:[\d]+\//,e.url()),this.logParams("Video",o,f);var g=t.get("indirectHttpHeaders");g&&(f.httpCookies=g.Cookie,f.userAgent=g["User-Agent"]),f=a.a.extend(f,e.getHeaders());var m=this.extensions[f.protocol],v="/video/:/transcode/universal/"+o;return"start"===o&&m&&(v+=m),e.resolveUrl(v+"?"+this.serializeParams(f,e))}};t.a=u},function(e,t,n){"use strict";function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){
for(var e=0,n=t.length;e<n;e++){var i=t[e];"function"==typeof i&&i.apply(void 0,arguments)}}}t.a=i},function(e,t,n){"use strict";function i(e){return e.displayName||e.name||"Component"}t.a=i},function(e,t,n){"use strict";function i(e,t){if(e===t)return!0;var n=r()(e),i=r()(t);if(n.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty,s=0;s<n.length;s++)if(!a.call(t,n[s])||e[n[s]]!==t[n[s]])return!1;return!0}var a=n(66),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=t.constructor.prototype.validate;
return n?n(e):[]}function a(e){var t=this.panes[e],n=o.call(this,t);return 0===i.call(this,n,t).length}function r(e,t){return e.concat(this.panes[t].dependentPanes||[])}function s(){var e=this.$(".change-pane-btn");e.addClass("disabled").removeClass("selected"),c.a.each(this.getReachablePanes(),function(t){e.filter("."+t+"-btn").removeClass("disabled")},this),e.filter("."+this.selectedPane+"-btn").addClass("selected")}function o(e){return this[e.model]||this[this.panesModel]||this.model}var l=n(2),c=n.n(l),u={
showPane:function(e){if(e!==this.selectedPane){var t=this.paneRegion.currentView;t&&(this.stopListening(t,"valid",s),this.stopListening(t,"invalid",s),this.$el.removeClass("pane-"+this.selectedPane),this.onPaneHide&&this.onPaneHide(this.selectedPane,t)),this.selectedPane=e;var n=this.panes[e],i=n.constructor,a=this.paneConstructorArg?this.paneConstructorArg():{},r=new i(c.a.extend(a,{model:o.call(this,n)}));if(r.onModalClose){this._paneOnModalCloseCallbacks||this.listenToOnce(this,"close",function(){
c.a.each(this._paneOnModalCloseCallbacks,function(e){e[1].call(e[0])},this),this._paneOnModalCloseCallbacks=null});var l=this._paneOnModalCloseCallbacks||[];l.push([r,r.onModalClose]),this._paneOnModalCloseCallbacks=c.a.uniq(l,function(e){return e[1]})}this.listenTo(r,"valid",s),this.listenTo(r,"invalid",s),s.call(this),this.onPaneShow&&this.onPaneShow(e,r),this.$el.addClass("pane-"+e),this.paneRegion.show(r),s.call(this)}},getReachablePanes:function(){for(var e,t,n=c.a.reduce(this.panes,function(e,t){
return c.a.union(e,t.dependentPanes||[])},[]),i=c.a.filter(c.a.keys(this.panes),function(e){return!c.a.contains(n,e)}),s=i;s.length;)e=c.a.filter(s,a,this),t=t||e.length!==s.length,s=c.a.reduce(e,r,[],this),i=i.concat(s);return i.isAnyInvalid=t,i},onChangePaneClick:function(e){e.preventDefault();var t=this.$(e.currentTarget);t.isDisabled()||this.showPane(t.data("pane"))}};t.a=u},function(e,t,n){"use strict";var i=n(75),a=n(1439),r=i.a.extend({model:a.a,url:"/status/sessions/background",parse:function(e){
return this.convert(e,"TranscodeJob")}});t.a=r},function(e,t,n){"use strict";var i=n(151),a=n(16),r=n(18),s=n(1448),o=n(1447),l=n(1443),c=n(1445),u=r.a.extend({name:"VersionGeneratorModel",context:["server","section","playlistID"],rootPropertyName:"Item",cache:new i.a,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.id)},urlRoot:function(){var e=this.playlistID||this.parent.id;return"/playlists/"+e+"/items"},syncedAttrs:{id:a.a.integer,clientIdentifier:a.a.string,contentType:a.a.string,
composite:a.a.string,type:{type:a.a.integer,save:!0},title:{type:a.a.string,save:!0},target:{type:a.a.string,save:!0},targetTagID:{type:a.a.integer,save:!0},locationID:{type:a.a.integer,save:!0},Location:{type:a.a.object,save:!0},Device:{type:a.a.object,save:!0}},sessionRelations:{children:{relationClass:c.a,options:function(){return{generator:this}}}},syncedRelations:{status:{relationClass:s.a,rootPropertyName:"Status"},policy:{relationClass:o.a,rootPropertyName:"Policy",save:!0},mediaSettings:{
relationClass:l.a,rootPropertyName:"MediaSettings",save:!0}},derivedAttrs:{isDirectory:function(){var e=this.get("Location");if(e.uri)return/(playlist\:\/\/|library\:\/\/([\w-]*)\/directory\/)/.test(e.uri)}},defaults:function(){return{type:42,locationID:-1,Location:{},Device:{}}},defaultCounts:{video:5,audio:50,photo:50},warningCounts:{video:10,audio:100,photo:100},getSaveParams:function(e,t){var n=r.a.prototype.getSaveParams.apply(this,arguments);return n.targetTagID&&(delete n.MediaSettings,delete n.Device),
{Item:n}},setPolicyDefaultsFor:function(e){var t=this.get("policy"),n=this.get("isDirectory");return t.has("scope")||t.set("scope",n?"count":"all"),!t.has("value")&&n&&t.set("value",this.defaultCounts[e]),this},shouldShowPolicyWarning:function(e,t){var n=this.get("policy").get("scope");return"count"===n?t>this.warningCounts[e]:"all"===n&&this.get("isDirectory")}});t.a=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),a=n(31);n.d(t,"initLibraryPage",function(){
return r}),n.d(t,"clearLibraryPage",function(){return s}),n.d(t,"fetchLibraryMetadataTypes",function(){return o}),n.d(t,"populateLibraryMetadataTypes",function(){return l}),n.d(t,"fetchLibraryFirstCharacters",function(){return c}),n.d(t,"populateLibraryFirstCharacters",function(){return u}),n.d(t,"selectLibraryFilter",function(){return d}),n.d(t,"deselectLibraryFilter",function(){return h}),n.d(t,"fetchLibraryFilterOptions",function(){return p}),n.d(t,"populateLibraryFilterOptions",function(){return f;
}),n.d(t,"searchLibraryFilterOptions",function(){return g}),n.d(t,"selectLibraryTableColumn",function(){return m}),n.d(t,"deselectLibraryTableColumn",function(){return v});var r=n.i(i.a)(a._124),s=n.i(i.a)(a._125),o=n.i(i.a)(a._126),l=n.i(i.a)(a._127),c=n.i(i.a)(a._128),u=n.i(i.a)(a._129),d=n.i(i.a)(a._130),h=n.i(i.a)(a._131),p=n.i(i.a)(a._132),f=n.i(i.a)(a._133),g=n.i(i.a)(a._134),m=n.i(i.a)(a._135),v=n.i(i.a)(a._136)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});
var i=n(53),a=n(31);n.d(t,"initRecordingSchedulePage",function(){return r}),n.d(t,"clearRecordingSchedulePage",function(){return s}),n.d(t,"fetchMediaSubscriptions",function(){return o}),n.d(t,"moveMediaSubscription",function(){return l}),n.d(t,"setVisibleDays",function(){return c}),n.d(t,"goToToday",function(){return u}),n.d(t,"goToPreviousRange",function(){return d}),n.d(t,"goToNextRange",function(){return h}),n.d(t,"fetchCalendar",function(){return p}),n.d(t,"playRecording",function(){return f;
});var r=n.i(i.a)(a.K),s=n.i(i.a)(a.L),o=n.i(i.a)(a.M),l=n.i(i.a)(a.N),c=n.i(i.a)(a.O),u=n.i(i.a)(a.P),d=n.i(i.a)(a.Q),h=n.i(i.a)(a.R),p=n.i(i.a)(a.S),f=n.i(i.a)(a.T)},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e,t){var n=t.deviceID;return n},n.i(o.a)(),function(e,t){if(t)return r.a.find(t.devices,{key:e})})}var a=n(2),r=n.n(a),s=n(9),o=(n.n(s),n(348));t.a=i},function(e,t,n){"use strict";function i(e){if(e){var t=e.split("?"),n=t[1];return n?c.a.parseQueryString(n):void 0;
}}function a(e){if("now"===e)return{};var t=e.match(/[-+]?\d+[smhdwMy]/),n=t[1],i=t[2];if(n&&i){var a;return a={},a[p[i]]=parseInt(n,10),a}return{}}function r(){return n.i(l.createSelector)(function(e,t){var n=t.containerKey;return n},n.i(h.a)(),function(e,t){if(t&&t.Media){for(var r=i(e),s=o.a.sortBy(t.Media,"endsAt"),l=Date.now()/1e3,c=0,h=s.length;c<h;c++){var p=s[c];if(r){var f=r["beginsAt>"],g=r["beginsBefore<"],m=r["endsAt>"],v=r["endsBefore<"];if(f){var y=a(f);if(n.i(d.a)(p.beginsAt,y))continue;
}if(g){var b=a(g);if(n.i(u.a)(p.beginsAt,b))continue}if(m){var S=a(m);if(n.i(d.a)(p.endsAt,S))continue}if(v){var w=a(v);if(n.i(u.a)(p.endsAt,w))continue}}if(p.endsAt>l)return p}return o.a.first(s)}})}var s=n(2),o=n.n(s),l=n(9),c=(n.n(l),n(38)),u=n(688),d=n(689),h=n(29);t.a=r;var p={s:"seconds",m:"minutes",h:"hours",d:"days",w:"weeks",M:"months",y:"years"}},function(e,t,n){"use strict";var i=n(2657),a=n.n(i),r=n(10),s=n(8),o={success:!0,error:!0,notify:!0},l=r.a.ItemView.extend({className:"alert-bar",
template:a.a,events:{"click .close-btn":"onCloseClick"},initialize:function(e){var t=e.alert;if(this.alert=t,t){var n=t.type;n&&o[n]&&this.$el.addClass(n)}},hide:function(){s.a.trigger("hide:bar","alertbar")},serializeData:function(){return this.alert},onCloseClick:function(e){e.preventDefault(),this.hide()}});t.a=l},function(e,t,n){"use strict";var i=n(2695),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(14),c=o.a.ItemView.extend({id:"primary-server-dropdown",tagName:"span",className:"dropdown",template:a.a,
events:{"click .dropdown-menu a":"onServerClick"},initialize:function(e){e||(e={});var t=l.a("appModel");this.showSharedServers=e.showSharedServers,this.model=t.get("primaryServer"),this.collection=t.get("servers"),this.listenTo(t,"change:primaryServer",this.render),this.listenTo(this.collection,{"change:friendlyName":this.render,"change:authorized":this.onServerAuthorizedChange})},serializeData:function(){var e=this.collection.reduce(function(e,t){var n=t.get("shared"),i=t.get("sections");if(n&&!(this.showSharedServers&&i&&i.findWhere({
allowSync:!0})))return e;var a=t.toJSON();return a.authorized&&!(a.cloud||a.synced||a.isOutOfDate)&&e.push(a),e},[],this);return{showDropdown:e.length>1,servers:e,currentServer:this.model?this.model.toJSON():null}},onServerAuthorizedChange:function(e,t){t&&this.render()},onServerClick:function(e){e.preventDefault();var t=l.a("appModel"),n=s()(e.currentTarget).data("id"),i=this.collection.get(n);i&&t.set("primaryServer",i)}});t.a=c},function(e,t,n){"use strict";var i=n(2749),a=n.n(i),r=n(2),s=n.n(r),o=n(137),l=n(54),c=o.a.extend({
className:"poster-item media-tile-list-item",template:a.a,ui:{container:".media-poster-container",poster:".media-poster",actions:".media-poster-actions",dropdown:".media-actions-dropdown",subtitle1Fill:".media-subtitle-1-fill",subtitle2Fill:".media-subtitle-2-fill"},initialize:function(e){o.a.prototype.initialize.apply(this,arguments),this.model&&this.createImageView()},createImageView:function(){var e=this.model.section&&"photo"===this.model.section.get("type")?"photo":this.type,t=150;"episode"===e?e="show":"clip"!==e&&"userPlaylistItem"!==e||(t=250),
this.image=new l.a({model:this.model,type:e,getUrl:this.getPosterUrl,width:t})},updateDim:function(){var e=this.model.get("mediaState"),t=this.model.get("metadataState"),n=t&&"created"!==t||e,i=!!this.model.get("deletedAt");n||i?this.$el.addClass("dim"):this.$el.removeClass("dim")},bindings:s.a.extend({},o.a.prototype.bindings,{".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=o.a.prototype.bindings[".media-subtitle-1"].formatter.apply(this,arguments);
return"userPlaylistItem"!==this.model.get("type")&&this.ui.subtitle1Fill.toggleClass("hidden",!!t),t}},".media-subtitle-2":{modelAttribute:"index",modelListeners:["index","message"],autohide:!0,formatter:function(e){var t=o.a.prototype.bindings[".media-subtitle-2"].formatter.apply(this,arguments);return"episode"===this.model.get("type")&&this.ui.subtitle2Fill.toggleClass("hidden",!!t),t}},".media-count-badge":{modelAttribute:"Media",formatter:function(e){return e.length},autohide:function(e){return!/^(clip|userPlaylistItem)$/.test(this.model.get("type"))&&e>1;
}},".unwatched-count-badge":{modelAttribute:"unviewedLeafCount",autohide:function(e){return!(this.shared&&!this.multiuser)&&(!/^(artist|album)$/.test(this.model.get("type"))&&!!e)}},".analyzing-icon":{modelAttribute:"mediaState",manual:!0,autohide:!0,formatter:function(e,t){return this.updateDim(),e}},".matching-icon":{modelAttribute:"metadataState",manual:!0,autohide:!0,formatter:function(e,t){return this.updateDim(),"matching"===e}},".metadata-icon":{modelAttribute:"metadataState",manual:!0,autohide:!0,
formatter:function(e,t){return this.updateDim(),"processing"===e||"loading"===e}},".trash-icon":{modelAttribute:"deletedAt",manual:!0,autohide:!0,formatter:function(e,t){return this.updateDim(),e}}})});t.a=c},function(e,t,n){"use strict";var i=n(2792),a=n.n(i),r=n(2),s=n.n(r),o=n(50),l=o.a.extend({name:"libraryFailureModal",className:"confirm-modal modal modal-sm fade",template:a.a,events:s.a.extend({"click .confirm-btn":"hide"},o.a.prototype.events),serializeData:function(){return{serverID:this.model.id,
isSignedIn:"ok"===this.model.get("myPlexSigninState"),hasPlexPass:this.model.get("myPlexSubscription")}}});t.a=l},function(e,t,n){"use strict";function i(e){var t=l.a.reject(e,function(e){return 0===e.id}),n=l.a.sortBy(t,"streamType");return l.a.map(n,function(e){return I(e,"streamType")})}function a(e){return l.a.map(e.get("Media"),function(e){return l.a.extend(I(e,"Part"),{Part:l.a.map(e.Part,function(e){return l.a.extend(I(e,"Stream"),{file:e.file,exists:e.exists!==!1,accessible:e.accessible!==!1,
Stream:i(e.Stream)})})})})}var r=n(2793),s=n.n(r),o=n(2),l=n.n(o),c=n(5),u=n.n(c),d=n(14),h=n(1217),p=n(1244),f=n(1293),g=n(20),m=n(50),v=n(21),y=n(156),b=["id","key","index","videoCodec","audioCodec","audioChannels","default","selected","languageCode","codecID","accessible","exists","provider","lines","minLines","follow","requiredBandwidths","deepAnalysisVersion","deepAnalysisDate"],S={size:p.a,duration:h.a,codec:f.a,format:f.a,container:f.a,videoResolution:p.b,channels:p.c,level:p.d,bitrateMode:f.a,
accessible:f.b,exists:f.b,optimizedForStreaming:f.b,timed:f.b,file:g.getLastSegment},w={optimizedForStreaming:"Web Optimized",has64bitOffsets:"Has 64bit Offsets",cabac:"CABAC",postURL:"URL"},M={frameRate:" fps",dialogNorm:" dB",bitrate:" kbps",samplingRate:" Hz"},I=function(e,t){var n={properties:[]};for(var i in e)if(i!==t&&l.a.indexOf(b,i)===-1){var a=w[i],r=e[i];S[i]&&(r=S[i](r)),r&&(M[i]&&(r+=M[i]),a||(a=f.c(i)),n.properties.push({name:a,value:r}))}return t&&e&&(n[t]=e[t]),n},C=m.a.extend({name:"mediaInfoModal",
className:"media-info-modal modal modal-lg fade",template:s.a,ui:{scroller:".modal-body-scroll",files:".files > ul",stickyProps:".media > .props, .part > .props"},events:l.a.extend({"click .delete-btn":"onDeleteClick"},m.a.prototype.events),modelEvents:{"change:Media":"onMediaChange"},initialize:function(e){m.a.prototype.initialize.apply(this,arguments),this.bindAllWhenRendered("onMediaChange","onScroll"),this.loading=!1,this.media=a(this.model),this.mediaActions=new y.a({},{item:this.model}),this.hasStreams()||(this.loading=!0,
this.model.fetch().always(this.whenRendered(function(){this.model.changed.hasOwnProperty("Media")||this.updateMedia()})))},serializeData:function(){var e=this.model.get("key"),t=d.a("appModel"),n=t.get("user"),i=this.model.server;return this.model.get("isLibraryItem")&&(e=g.join(e,{checkFiles:1,includeExtras:1})),{key:e,url:this.model.server.resolveUrl(e,{appendToken:!0}),media:this.media,hasFiles:this.hasFiles(),hasStreams:this.hasStreams()||this.loading,showDeleteFile:i.supports("specificMediaDeletion"),
showFilepath:!i.get("shared")||n.isNinja(),loading:this.loading}},updateMedia:function(){this.loading=!1,this.rerender=!0,this.ui.scroller.off("scroll",this.onScroll),this.media=a(this.model),this.render()},hasFiles:function(){return!!l.a.chain(this.media).pluck("Part").flatten().pluck("file").compact().size().value()},hasStreams:function(){return!!l.a.chain(this.media).pluck("Part").flatten().pluck("Stream").flatten().size().value()},bindingsModel:"mediaActions",bindings:{".delete-btn":{modelAttribute:"showDelete",
manual:!0,autohide:!0}},onRender:function(){m.a.prototype.onRender.apply(this,arguments),this.ui.scroller.on("scroll",this.onScroll),this.$el.tooltip({selector:".files .label",placement:"bottom"})},onClose:function(){this.ui.scroller.off("scroll",this.onScroll)},onMediaChange:function(){if(!this.isHidden)return this.model.get("Media").length?void this.updateMedia():void this.hide()},onDeleteClick:function(e){e.preventDefault(),v.a.execute("deleteMediaItem",{item:this.model,index:u()(e.currentTarget).data("media-item")
})},onScroll:function(){var e=this.ui.scroller.scrollTop(),t=this.ui.scroller.offset().top;return this.ui.files.length&&(t+=parseInt(this.ui.files.css("margin-bottom"),10)),t<0?void setTimeout(this.onScroll,500):void this.ui.stickyProps.each(function(){var n=u()(this),i=n.parent().height()-n.height(),a=e-this.parentNode.offsetTop,r=Math.min(Math.max(a,0),i);r&&r===a?(n.addClass("sticky"),n.css("top",t)):(n.removeClass("sticky"),n.css("top",r))})}});t.a=C},function(e,t,n){"use strict";var i=n(2796),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),c=n(14),u=n(21),d=n(50),h=n(138),p=n(1738),f=h.a.extend({
name:"recommendModal",className:"recommend-modal select-modal modal modal-sm fade",template:a.a,playlistIDs:null,ui:{sendBtn:".send-btn",messageContainer:".message-container",message:".message"},regions:{list:".friends-container"},events:l.a.extend({"click .friend":"onFriendClick","click .friends-btn":"onFriendsClick","click .send-btn":"onSendClick"},d.a.prototype.events),initialize:function(){h.a.prototype.initialize.apply(this,arguments);var e=c.a("appModel"),t=e.get("user");this.collection=t.get("desktop").get("friends").filterByUnrestricted(),
this.playlistIDs=[]},serializeData:function(){return{hasFriends:!!this.collection.length}},onRender:function(){h.a.prototype.onRender.apply(this,arguments),this.list.show(new p.a({collection:this.collection}))},onClose:function(){this.collection.destroy()},onFriendClick:function(e){e.preventDefault();var t=s()(e.currentTarget),n=t.data("id");t.hasClass("selected")?this.playlistIDs.splice(l.a.indexOf(this.playlistIDs,n),1):this.playlistIDs.push(n),t.toggleClass("selected"),this.playlistIDs.length?(this.ui.sendBtn.removeClass("disabled"),
this.ui.messageContainer.removeClass("invisible")):(this.ui.sendBtn.addClass("disabled"),this.ui.messageContainer.addClass("invisible"))},onFriendsClick:function(e){this.hide()},onSendClick:function(e){e.preventDefault();var t=this.ui.sendBtn;if(!t.isDisabled()){t.addClass("active");var n={item:this.model,playlistIDs:this.playlistIDs,message:this.ui.message.val()},i=u.a.execute("recommend",n);i.done(l.a.bind(this.onSendSuccess,this)),i.fail(l.a.bind(this.onSendError,this))}},onSendSuccess:function(){
this.hide()},onSendError:function(){this.ui.sendBtn.removeClass("active")}});t.a=f},function(e,t,n){"use strict";var i=n(2803),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),c=n(14),u=n(21),d=n(50),h=n(138),p=h.a.extend({name:"shareModal",className:"share-modal select-modal modal modal-sm fade",template:a.a,linkedNetworks:null,networkIDs:null,maxLength:null,ui:{shareBtn:".share-btn",messageContainer:".message-container",charactersRemaining:".characters-remaining",message:".message"},events:l.a.extend({
"click .network":"onNetworkClick","keyup .message":"onMessageKeyUp","click .share-btn":"onShareClick"},d.a.prototype.events),initialize:function(){h.a.prototype.initialize.apply(this,arguments);var e=c.a("appModel");this.user=e.get("user"),this.socialNetworks=this.user.get("desktop").get("socialNetworks"),this.linkedNetworks=this.socialNetworks.where({linked:!0}),this.autoSelect=1===this.linkedNetworks.length,this.networkIDs=[]},serializeData:function(){for(var e=[],t=0,n=this.linkedNetworks.length;t<n;t++)e.push(this.linkedNetworks[t].toJSON());
return{networks:e,accountUrl:this.user.server.get("accountUrl"),autoSelect:this.autoSelect}},calculateMaxLength:function(){var e=null,t=this.socialNetworks;l.a.each(this.networkIDs,function(n){var i=t.get(n),a=i.get("maxLength")||null;(null===e||e>a)&&(e=a)}),this.maxLength=e,this.calculateCharactersRemaining()},calculateCharactersRemaining:function(){var e=this.ui.message.val(),t=this.maxLength-e.length;return null===this.maxLength?void this.ui.charactersRemaining.addClass("hidden"):(t<0?(this.ui.charactersRemaining.addClass("error").removeClass("hidden"),
this.ui.shareBtn.addClass("disabled")):(this.ui.charactersRemaining.removeClass("error hidden"),this.ui.shareBtn.removeClass("disabled")),void this.ui.charactersRemaining.text(this.maxLength-e.length))},onRender:function(){h.a.prototype.onRender.apply(this,arguments),this.autoSelect&&(this.networkIDs.push(this.linkedNetworks[0].id),this.calculateMaxLength())},onNetworkClick:function(e){e.preventDefault();var t=s()(e.currentTarget),n=t.data("id");t.hasClass("selected")?this.networkIDs.splice(l.a.indexOf(this.networkIDs,n),1):this.networkIDs.push(n),
t.toggleClass("selected"),this.networkIDs.length?(this.ui.shareBtn.removeClass("disabled"),this.ui.messageContainer.removeClass("invisible")):(this.ui.shareBtn.addClass("disabled"),this.ui.messageContainer.addClass("invisible")),this.calculateMaxLength()},onMessageKeyUp:function(e){this.calculateCharactersRemaining()},onShareClick:function(e){e.preventDefault();var t=this.ui.shareBtn;if(!t.isDisabled()){t.addClass("active");var n={item:this.model,networkIDs:this.networkIDs,message:this.ui.message.val()
},i=u.a.execute("share",n);i.done(l.a.bind(this.onShareSuccess,this)),i.fail(l.a.bind(this.onShareError,this))}},onShareSuccess:function(){this.hide()},onShareError:function(){this.ui.shareBtn.removeClass("active")}});t.a=p},function(e,t,n){"use strict";var i=n(2831),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(14),u=n(59),d=n(50),h=n(1779),p=n(1777),f=n(1776),g=d.a.extend({name:"userSelectModal",className:"user-select-modal modal modal-transparent fade",template:a.a,transparent:!0,panes:{users:h.a,
pin:p.a},regions:{content:".modal-content",alertBar:".modal-alert"},initialize:function(e){d.a.prototype.initialize.apply(this,arguments);var t=c.a("appModel");this.options=e,this.isForced=e.isForced,this.user=t.get("user"),this.promise=l.a.Deferred()},showPane:function(e,t){this.currentPane&&this.stopListening(this.currentPane);var n=this.panes[e],i=new n(s.a.extend({},this.options,t));return this.listenTo(i,{"change:pane":this.onChangePane,resolve:this.onResolve,reject:this.onReject}),this.currentPane=i,
this.content.show(i),i},showAlertBar:function(){var e=u.a.get("alerts");u.a.set("alerts",null);var t=new f.a({alert:s.a.first(e)});this.alertBar.show(t)},onRender:function(){d.a.prototype.onRender.apply(this,arguments),this.model?this.showPane("pin",{focusDelay:this.focusDelay}):this.showPane("users"),this.showAlertBar()},onHide:function(e){d.a.prototype.onHide.apply(this,arguments),"pending"===this.promise.state()&&this.promise.reject()},onChangePane:function(e,t){this.showPane(e,t)},onResolve:function(e){
return u.a.has("continueUrl")&&!this.options.isEditing?void(window.location=u.a.get("continueUrl")):(this.promise.resolve(e),void this.hide())},onReject:function(){this.promise.reject(),this.hide()}});t.a=g},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.kind;return r()("span",{className:c()(t,d.a.badge,d.a[i],!n&&d.a.isHidden)},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(132)),l=n(28),c=n.n(l),u=n(2372),d=n.n(u);i.defaultProps={kind:o.DEFAULT},t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.className,i=e.circleClassName,a=e.iconClassName,s=e.title,l=c()(e,["className","circleClassName","iconClassName","title"]);return d.a.createElement(f.a,r()({className:t,"aria-label":n.i(h.default)("Play {title}",{title:s})},l),o()("div",{className:i},void 0,o()(p.a,{name:"plex-icon-play-560",className:a})))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(4),p=n(30),f=n(26),g=n(2388),m=n.n(g);i.defaultProps={className:m.a.playButton,circleClassName:m.a.playCircle,
iconClassName:m.a.playIcon},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className;return r()(o.a,{className:n},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(92)),l=n(2431),c=n.n(l);i.defaultProps={className:c.a.footer},t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(15),f=n(9),g=(n.n(f),n(35)),m=n(157),v=n(76),y=(n(48),n(1913)),b=n.i(f.createSelector)(m.a,function(e){return{columnAdjustment:e.columnAdjustment,
listStyles:e.listStyles}}),S=function(e){function t(){var i,r,o;s()(this,t);for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return i=r=l()(this,e.call.apply(e,[this].concat(u))),r.onColumnAdjustmentChange=function(e){n.i(g.a)(function(){r.props.saveSettings({name:"experienceSettings",settings:{columnAdjustment:e}})})},r.onListStyleChange=function(e){var t,i,s=r.props,o=s.listStyles,l=s.listType,c=s.listContext,u=a()({},o,(i={},i[c]=a()({},o[c]||{},(t={},t[l]=e,t)),i));n.i(g.a)(function(){
r.props.saveSettings({name:"experienceSettings",settings:{listStyles:u}})})},o=i,l()(r,o)}return u()(t,e),t.prototype.render=function(){return h.a.createElement(y.a,a()({},this.props,{onColumnAdjustmentChange:this.onColumnAdjustmentChange,onListStyleChange:this.onListStyleChange}))},t}(d.Component);t.a=n.i(p.b)(function(e){return b},{saveSettings:v.a})(S)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};
return{grandparentTitle:i.grandparentTitle,grandparentRoute:n.i(c.a)(e,t,i.grandparentKey)}})}var a=n(15),r=n(9),s=(n.n(r),n(58)),o=n(62),l=n(29),c=n(86),u=n(1939);t.a=n.i(a.b)(i)(u.a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{title:i.title,index:i.index,route:n.i(c.a)(e,t,i.key),parentTitle:i.parentTitle,parentIndex:i.parentIndex,parentRoute:n.i(c.a)(e,t,i.parentKey),
originallyAvailableAt:i.originallyAvailableAt}})}var a=n(15),r=n(9),s=(n.n(r),n(58)),o=n(62),l=n(29),c=n(86),u=n(517);t.a=n.i(a.b)(i)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.title,a=e.route;return i?a?r()(o.a,{className:t,tabIndex:n,title:i,to:a},void 0,i):r()("span",{className:t},void 0,i):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(26));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,i=c()(e,["children"]);return d.a.createElement(m.a,r()({
title:n.i(h.default)("There was an unexpected error"),description:n.i(h.default)("Please visit our forums if you continue to experience problems")},i),o()(g.a,{to:p.a,target:"_blank",kind:f.c.PRIMARY},void 0,n.i(h.default)("Go to Forums")),t)}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(4),p=n(443),f=n(23),g=n(26),m=n(118);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className;return r()("div",{className:t})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2515)),l=n.n(o);
i.defaultProps={className:l.a.divider},t.a=i},function(e,t,n){"use strict";function i(e){try{e.focus()}catch(e){}}function a(){var e=document.activeElement;e&&e.blur()}function r(e){g=document.activeElement,m=e,a()}function s(e){n.i(p.a)(m,"Call `startScopedFocus(element)` before `scopeTabEvent`");var t=n.i(f.a)(m);if(t.length){e.preventDefault();var a=document.activeElement,r=a?t.indexOf(a):-1,s=t.length-1,o=void 0;r===-1?o=e.shiftKey?s:0:(o=e.shiftKey?r-1:r+1,o<0?o=s:o>s&&(o=0)),i(t[o])}}function o(){
n.i(p.a)(m,"Call `startScopedFocus(element)` before `scopeAutoFocus`");var e=n.i(f.a)(m),t=d.a.find(e,function(e){return h.a.parseBoolean(e.getAttribute("data-autofocus"))});t&&i(t)}function l(){m=null}function c(){g&&(i(g),g=null)}var u=n(2),d=n.n(u),h=n(38),p=n(33),f=n(2196);t.e=a,t.c=r,t.a=s,t.d=o,t.f=l,t.b=c;var g=void 0,m=void 0},function(e,t,n){"use strict";function i(e,t){if("mixed"===e)return[];switch(t){case x.a:switch(e){case"season":return[o.a,f.a];case"episode":return[o.a,v.a];case"album":
return[o.a,u.a];case"actor":return[M.a,I.a]}break;case x.b:switch(e){case"movie":return[o.a,y.a,u.a];case"clip":return[o.a,y.a];case"episode":return[c.a,y.a,m.a]}break;case x.d:switch(e){case"artist":return[o.a,h.a];case"photo":return[s.a,b.a];case"photoalbum":return[o.a,b.a];case"clip":return[o.a,b.a];case"playlist":return[o.a,d.a];case"actor":return[T.a];case"genre":return[T.a];case"director":return[T.a];case"autotag":return[T.a];case"collection":return[T.a]}}switch(e){case"movie":return[o.a,u.a];
case"show":return[o.a,p.a];case"season":return[l.a,o.a];case"episode":return[c.a,o.a,g.a];case"artist":return[o.a];case"album":return[l.a,o.a];case"track":return[c.a,s.a];case"photo":return[s.a];case"photoalbum":return[o.a];case"clip":return[o.a];case"extra":return[s.a,w.a];case"musicVideo":return[c.a,s.a]}return[s.a]}function a(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=a.activeSort,o=a.isSearch,l=a.isSearchAll,c=a.providerEntityID,u=i(e,t);if(o&&(u.push(C.a),l&&u.push(D.a)),
r.a.EPG_IDENTIFIER.test(c)&&("movie"!==e&&"episode"!==e&&"mixed"!==e||u.push(S.a)),s){var d=n.i(P.a)(s);d&&u.push(d)}return u}var r=n(72),s=n(370),o=n(1958),l=n(513),c=n(294),u=n(371),d=n(847),h=n(842),p=n(518),f=n(516),g=n(1968),m=n(295),v=n(1952),y=n(850),b=n(514),S=n(841),w=n(1954),M=n(1936),I=n(1937),C=n(880),D=n(2155),T=n(881),x=n(48),P=n(2204);t.a=a},function(e,t,n){"use strict";function i(e,t,n){return r()({},e,n,t)}var a=n(7),r=n.n(a);t.a=i},function(e,t,n){"use strict";var i=n(155),a=n(166),r=n.n(a),s=n(2603),o=n.n(s),l=n.i(i.a)(r.a.slowSpeed),c={
appear:o.a.appear,appearActive:o.a.appearActive,enter:o.a.enter,enterActive:o.a.enterActive,leave:o.a.leave,leaveActive:o.a.leaveActive},u={transitionName:c,transitionAppear:!0,transitionAppearTimeout:l,transitionEnterTimeout:l,transitionLeaveTimeout:2*l};t.a=u},function(e,t,n){var i=n(236);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},,,function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var i=n(963),a="object"==typeof self&&self&&self.Object===Object&&self,r=i||a||Function("return this")();
e.exports=r},,,,function(e,t,n){var i,a;/**!
 * Sortable
 * @author	RubaXa   <trash@rubaxa.org>
 * @license MIT
 */
!function(r){"use strict";i=r,a="function"==typeof i?i.call(t,n,t,e):i,!(void 0!==a&&(e.exports=a))}(function(){"use strict";function e(e,t){this.el=e,this.options=t=m({},t),e[N]=this;var i={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(e.nodeName)?"li":">*",ghostClass:"sortable-ghost",ignore:"a, img",filter:null,animation:0,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,
dataIdAttr:"data-id",delay:0};for(var a in i)!(a in t)&&(t[a]=i[a]);var s=t.group;s&&"object"==typeof s||(s=t.group={name:s}),["pull","put"].forEach(function(e){e in s||(s[e]=!0)}),t.groups=" "+s.name+(s.put.join?" "+s.put.join(" "):"")+" ";for(var o in this)"_"===o.charAt(0)&&(this[o]=n(this,this[o]));r(e,"mousedown",this._onTapStart),r(e,"touchstart",this._onTapStart),r(e,"dragover",this),r(e,"dragenter",this),V.push(this._onDragOver),t.store&&this.sort(t.store.get(this))}function t(e){b&&b.state!==e&&(l(b,"display",e?"none":""),
!e&&b.state&&S.insertBefore(b,v),b.state=e)}function n(e,t){var n=B.call(arguments,2);return t.bind?t.bind.apply(t,[e].concat(n)):function(){return t.apply(e,n.concat(B.call(arguments)))}}function i(e,t,n){if(e){n=n||O,t=t.split(".");var i=t.shift().toUpperCase(),a=new RegExp("\\s("+t.join("|")+")\\s","g");do if(">*"===i&&e.parentNode===n||(""===i||e.nodeName.toUpperCase()==i)&&(!t.length||((" "+e.className+" ").match(a)||[]).length==t.length))return e;while(e!==n&&(e=e.parentNode))}return null}function a(e){
e.dataTransfer.dropEffect="move",e.preventDefault()}function r(e,t,n){e.addEventListener(t,n,!1)}function s(e,t,n){e.removeEventListener(t,n,!1)}function o(e,t,n){if(e)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(k," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(k," ")}}function l(e,t,n){var i=e&&e.style;if(i){if(void 0===n)return O.defaultView&&O.defaultView.getComputedStyle?n=O.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),
void 0===t?n:n[t];t in i||(t="-webkit-"+t),i[t]=n+("string"==typeof n?"":"px")}}function c(e,t,n){if(e){var i=e.getElementsByTagName(t),a=0,r=i.length;if(n)for(;a<r;a++)n(i[a],a);return i}return[]}function u(e){e.draggable=!1}function d(){z=!1}function h(e,t){var n=e.lastElementChild,i=n.getBoundingClientRect();return t.clientY-(i.top+i.height)>5&&n}function p(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function f(e){for(var t=0;e&&(e=e.previousElementSibling);)"TEMPLATE"!==e.nodeName.toUpperCase()&&t++;
return t}function g(e,t){var n,i;return function(){void 0===n&&(n=arguments,i=this,setTimeout(function(){1===n.length?e.call(i,n[0]):e.apply(i,n),n=void 0},t))}}function m(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var v,y,b,S,w,M,I,C,D,T,x,P,E,A,L={},k=/\s+/g,N="Sortable"+(new Date).getTime(),_=window,O=_.document,R=_.parseInt,j=!!("draggable"in O.createElement("div")),z=!1,U=function(e,t,n,i,a,r,s){var o=O.createEvent("Event"),l=(e||t[N]).options,c="on"+n.charAt(0).toUpperCase()+n.substr(1);
o.initEvent(n,!0,!0),o.item=i||t,o.from=a||t,o.clone=b,o.oldIndex=r,o.newIndex=s,l[c]&&l[c].call(e,o),t.dispatchEvent(o)},F=Math.abs,B=[].slice,V=[],H=g(function(e,t,n){if(n&&t.scroll){var i,a,r,s,o=t.scrollSensitivity,l=t.scrollSpeed,c=e.clientX,u=e.clientY,d=window.innerWidth,h=window.innerHeight;if(I!==n&&(M=t.scroll,I=n,M===!0)){M=n;do if(M.offsetWidth<M.scrollWidth||M.offsetHeight<M.scrollHeight)break;while(M=M.parentNode)}M&&(i=M,a=M.getBoundingClientRect(),r=(F(a.right-c)<=o)-(F(a.left-c)<=o),
s=(F(a.bottom-u)<=o)-(F(a.top-u)<=o)),r||s||(r=(d-c<=o)-(c<=o),s=(h-u<=o)-(u<=o),(r||s)&&(i=_)),L.vx===r&&L.vy===s&&L.el===i||(L.el=i,L.vx=r,L.vy=s,clearInterval(L.pid),i&&(L.pid=setInterval(function(){i===_?_.scrollTo(_.pageXOffset+r*l,_.pageYOffset+s*l):(s&&(i.scrollTop+=s*l),r&&(i.scrollLeft+=r*l))},24)))}},30);return e.prototype={constructor:e,_onTapStart:function(e){var t=this,n=this.el,a=this.options,r=e.type,s=e.touches&&e.touches[0],o=(s||e).target,l=o,c=a.filter;if(!("mousedown"===r&&0!==e.button||a.disabled)&&(o=i(o,a.draggable,n))){
if(T=f(o),"function"==typeof c){if(c.call(this,e,o,this))return U(t,l,"filter",o,n,T),void e.preventDefault()}else if(c&&(c=c.split(",").some(function(e){if(e=i(l,e.trim(),n))return U(t,e,"filter",o,n,T),!0})))return void e.preventDefault();a.handle&&!i(l,a.handle,n)||this._prepareDragStart(e,s,o)}},_prepareDragStart:function(e,t,n){var i,a=this,s=a.el,o=a.options,l=s.ownerDocument;n&&!v&&n.parentNode===s&&(E=e,S=s,v=n,w=v.nextSibling,P=o.group,i=function(){a._disableDelayedDrag(),v.draggable=!0,
o.ignore.split(",").forEach(function(e){c(v,e.trim(),u)}),a._triggerDragStart(t)},r(l,"mouseup",a._onDrop),r(l,"touchend",a._onDrop),r(l,"touchcancel",a._onDrop),o.delay?(r(l,"mousemove",a._disableDelayedDrag),r(l,"touchmove",a._disableDelayedDrag),a._dragStartTimer=setTimeout(i,o.delay)):i())},_disableDelayedDrag:function(){var e=this.el.ownerDocument;clearTimeout(this._dragStartTimer),s(e,"mousemove",this._disableDelayedDrag),s(e,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(e){
e?(E={target:v,clientX:e.clientX,clientY:e.clientY},this._onDragStart(E,"touch")):j?(r(v,"dragend",this),r(S,"dragstart",this._onDragStart)):this._onDragStart(E,!0);try{O.selection?O.selection.empty():window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(){S&&v&&(o(v,this.options.ghostClass,!0),e.active=this,U(this,S,"start",v,S,T))},_emulateDragOver:function(){if(A){l(y,"display","none");var e=O.elementFromPoint(A.clientX,A.clientY),t=e,n=" "+this.options.group.name,i=V.length;
if(t)do{if(t[N]&&t[N].options.groups.indexOf(n)>-1){for(;i--;)V[i]({clientX:A.clientX,clientY:A.clientY,target:e,rootEl:t});break}e=t}while(t=t.parentNode);l(y,"display","")}},_onTouchMove:function(e){if(E){var t=e.touches?e.touches[0]:e,n=t.clientX-E.clientX,i=t.clientY-E.clientY,a=e.touches?"translate3d("+n+"px,"+i+"px,0)":"translate("+n+"px,"+i+"px)";A=t,l(y,"webkitTransform",a),l(y,"mozTransform",a),l(y,"msTransform",a),l(y,"transform",a),e.preventDefault()}},_onDragStart:function(e,t){var n=e.dataTransfer,i=this.options;
if(this._offUpEvents(),"clone"==P.pull&&(b=v.cloneNode(!0),l(b,"display","none"),S.insertBefore(b,v)),t){var a,s=v.getBoundingClientRect(),o=l(v);y=v.cloneNode(!0),l(y,"top",s.top-R(o.marginTop,10)),l(y,"left",s.left-R(o.marginLeft,10)),l(y,"width",s.width),l(y,"height",s.height),l(y,"opacity","0.8"),l(y,"position","fixed"),l(y,"zIndex","100000"),S.appendChild(y),a=y.getBoundingClientRect(),l(y,"width",2*s.width-a.width),l(y,"height",2*s.height-a.height),"touch"===t?(r(O,"touchmove",this._onTouchMove),
r(O,"touchend",this._onDrop),r(O,"touchcancel",this._onDrop)):(r(O,"mousemove",this._onTouchMove),r(O,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,150)}else n&&(n.effectAllowed="move",i.setData&&i.setData.call(this,n,v)),r(O,"drop",this);setTimeout(this._dragStarted,0)},_onDragOver:function(e){var n,a,r,s=this.el,o=this.options,c=o.group,u=c.put,p=P===c,f=o.sort;if(void 0!==e.preventDefault&&(e.preventDefault(),!o.dragoverBubble&&e.stopPropagation()),P&&!o.disabled&&(p?f||(r=!S.contains(v)):P.pull&&u&&(P.name===c.name||u.indexOf&&~u.indexOf(P.name)))&&(void 0===e.rootEl||e.rootEl===this.el)){
if(H(e,o,this.el),z)return;if(n=i(e.target,o.draggable,s),a=v.getBoundingClientRect(),r)return t(!0),void(b||w?S.insertBefore(v,b||w):f||S.appendChild(v));if(0===s.children.length||s.children[0]===y||s===e.target&&(n=h(s,e))){if(n){if(n.animated)return;m=n.getBoundingClientRect()}t(p),s.appendChild(v),this._animate(a,v),n&&this._animate(m,n)}else if(n&&!n.animated&&n!==v&&void 0!==n.parentNode[N]){C!==n&&(C=n,D=l(n));var g,m=n.getBoundingClientRect(),M=m.right-m.left,I=m.bottom-m.top,T=/left|right|inline/.test(D.cssFloat+D.display),x=n.offsetWidth>v.offsetWidth,E=n.offsetHeight>v.offsetHeight,A=(T?(e.clientX-m.left)/M:(e.clientY-m.top)/I)>.5,L=n.nextElementSibling;
z=!0,setTimeout(d,30),t(p),g=T?n.previousElementSibling===v&&!x||A&&x:L!==v&&!E||A&&E,g&&!L?s.appendChild(v):n.parentNode.insertBefore(v,g?L:n),this._animate(a,v),this._animate(m,n)}}},_animate:function(e,t){var n=this.options.animation;if(n){var i=t.getBoundingClientRect();l(t,"transition","none"),l(t,"transform","translate3d("+(e.left-i.left)+"px,"+(e.top-i.top)+"px,0)"),t.offsetWidth,l(t,"transition","all "+n+"ms"),l(t,"transform","translate3d(0,0,0)"),clearTimeout(t.animated),t.animated=setTimeout(function(){
l(t,"transition",""),l(t,"transform",""),t.animated=!1},n)}},_offUpEvents:function(){var e=this.el.ownerDocument;s(O,"touchmove",this._onTouchMove),s(e,"mouseup",this._onDrop),s(e,"touchend",this._onDrop),s(e,"touchcancel",this._onDrop)},_onDrop:function(t){var n=this.el,i=this.options;clearInterval(this._loopId),clearInterval(L.pid),clearTimeout(this.dragStartTimer),s(O,"drop",this),s(O,"mousemove",this._onTouchMove),s(n,"dragstart",this._onDragStart),this._offUpEvents(),t&&(t.preventDefault(),!i.dropBubble&&t.stopPropagation(),
y&&y.parentNode.removeChild(y),v&&(s(v,"dragend",this),u(v),o(v,this.options.ghostClass,!1),S!==v.parentNode?(x=f(v),U(null,v.parentNode,"sort",v,S,T,x),U(this,S,"sort",v,S,T,x),U(null,v.parentNode,"add",v,S,T,x),U(this,S,"remove",v,S,T,x)):(b&&b.parentNode.removeChild(b),v.nextSibling!==w&&(x=f(v),U(this,S,"update",v,S,T,x),U(this,S,"sort",v,S,T,x))),e.active&&U(this,S,"end",v,S,T,x)),S=v=y=w=b=M=I=E=A=C=D=P=e.active=null,this.save())},handleEvent:function(e){var t=e.type;"dragover"===t||"dragenter"===t?v&&(this._onDragOver(e),
a(e)):"drop"!==t&&"dragend"!==t||this._onDrop(e)},toArray:function(){for(var e,t=[],n=this.el.children,a=0,r=n.length,s=this.options;a<r;a++)e=n[a],i(e,s.draggable,this.el)&&t.push(e.getAttribute(s.dataIdAttr)||p(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach(function(e,a){var r=n.children[a];i(r,this.options.draggable,n)&&(t[e]=r)},this),e.forEach(function(e){t[e]&&(n.removeChild(t[e]),n.appendChild(t[e]))})},save:function(){var e=this.options.store;e&&e.set(this)},closest:function(e,t){
return i(e,t||this.options.draggable,this.el)},option:function(e,t){var n=this.options;return void 0===t?n[e]:void(n[e]=t)},destroy:function(){var e=this.el;e[N]=null,s(e,"mousedown",this._onTapStart),s(e,"touchstart",this._onTapStart),s(e,"dragover",this),s(e,"dragenter",this),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),V.splice(V.indexOf(this._onDragOver),1),this._onDrop(),this.el=e=null}},e.utils={on:r,off:s,css:l,find:c,bind:n,is:function(e,t){
return!!i(e,t,e)},extend:m,throttle:g,closest:i,toggleClass:o,index:f},e.version="1.2.0",e.create=function(t,n){return new e(t,n)},e})},function(e,t,n){!function(t,i){e.exports=i(n(2),n(208))}(this,function(e,t){function n(n){return{underscore:e,backbone:t}[n]}var i=function(e){function t(e){var n=t.cache[e];if(!n){var i={};n=t.cache[e]={id:e,exports:i},t.modules[e].call(i,n,i)}return n.exports}return t.cache=[],t.modules=[function(e,i){function a(e,t){this._superset=e,this._filtered=new o(e,t),this._sorted=new l(this._filtered,t),
this._paginated=new c(this._sorted,t),u(this._paginated,this),d.call(this,this._filtered,f),d.call(this,this._sorted,m),d.call(this,this._paginated,y),this.initialize(t)}var r=n("underscore"),s=n("backbone"),o=t(2),l=t(5),c=t(4),u=t(1),d=t(7),h={superset:function(){return this._superset},getFilteredLength:function(){return this._filtered.length},removeTransforms:function(){return this._filtered.resetFilters(),this._sorted.removeSort(),this._paginated.removePagination(),this},destroy:function(){this.stopListening(),
this._filtered.destroy(),this._sorted.destroy(),this._paginated.destroy(),this.length=0,this.trigger("obscura:destroy")}},p=["filterBy","removeFilter","resetFilters","refilter","hasFilter","getFilters"],f=["filtered:add","filtered:remove","filtered:reset"],g=["setSort","reverseSort","removeSort"],m=["sorted:add","sorted:remove"],v=["setPerPage","setPage","getPerPage","getNumPages","getPage","hasNextPage","hasPrevPage","nextPage","prevPage","movePage","removePagination","firstPage","lastPage"],y=["paginated:change:perPage","paginated:change:page","paginated:change:numPages"],b=["add","create","remove","set","reset","sort","parse","sync","fetch","push","pop","shift","unshift"];
r.each(p,function(e){h[e]=function(){var t=o.prototype[e].apply(this._filtered,arguments);return t===this._filtered?this:t}}),r.each(v,function(e){h[e]=function(){var t=c.prototype[e].apply(this._paginated,arguments);return t===this._paginated?this:t}}),r.each(g,function(e){h[e]=function(){var t=l.prototype[e].apply(this._sorted,arguments);return t===this._sorted?this:t}}),r.each(b,function(e){h[e]=function(){throw new Error("Backbone.Obscura: Unsupported method: "+e+"called on read-only proxy")};
}),r.extend(a.prototype,h,s.Events),a=s.Collection.extend(a.prototype),a.FilteredCollection=o,a.SortedCollection=l,a.PaginatedCollection=c,e.exports=a},function(e,t){function i(e,t){function n(){t.length=e.length}function i(n){var i=a.toArray(arguments),r="change"===n||"change:"===n.slice(0,7);"reset"===n&&(t.models=e.models),a.contains(o,n)?(a.contains(["add","remove","destroy"],n)?i[2]=t:a.contains(["reset","sort"],n)&&(i[1]=t),t.trigger.apply(this,i)):r&&t.contains(i[1])&&t.trigger.apply(this,i);
}var l={};return a.each(a.functions(r.Collection.prototype),function(t){a.contains(s,t)||(l[t]=function(){return e[t].apply(e,arguments)})}),a.extend(t,r.Events,l),t.listenTo(e,"all",n),t.listenTo(e,"all",i),t.models=e.models,n(),t}var a=n("underscore"),r=n("backbone"),s=["_onModelEvent","_prepareModel","_removeReference","_reset","add","initialize","sync","remove","reset","set","push","pop","unshift","shift","sort","parse","fetch","create","model","off","on","listenTo","listenToOnce","bind","trigger","once","stopListening"],o=["add","remove","reset","sort","destroy","sync","request","error"];
e.exports=i},function(e,i){function a(){this._filterResultCache={}}function r(e){for(var t in this._filterResultCache)this._filterResultCache.hasOwnProperty(t)&&delete this._filterResultCache[t][e]}function s(e,t){this._filters[e]&&r.call(this,e),this._filters[e]=t,this.trigger("filtered:add",e)}function o(e){delete this._filters[e],r.call(this,e),this.trigger("filtered:remove",e)}function l(e){this._filterResultCache[e.cid]||(this._filterResultCache[e.cid]={});var t=this._filterResultCache[e.cid];
for(var n in this._filters)if(this._filters.hasOwnProperty(n)&&(t.hasOwnProperty(n)||(t[n]=this._filters[n].fn(e)),!t[n]))return!1;return!0}function c(e){e||(e={});var t=[];this._superset&&(t=this._superset.filter(v.bind(l,this))),e.reset?this._collection.reset(t):this._collection.set(t),this.length=this._collection.length}function u(){c.call(this,{reset:!0})}function d(){var e=!(!this._superset||!this._superset.comparator);c.call(this,{reset:e})}function h(e){if(this._filterResultCache[e.cid]={},
l.call(this,e)){if(!this._collection.get(e.cid)){for(var t=this.superset().indexOf(e),n=null,i=t-1;i>=0;i-=1)if(this.contains(this.superset().at(i))){n=this.indexOf(this.superset().at(i))+1;break}n=n||0,this._collection.add(e,{at:n})}}else this._collection.get(e.cid)&&this._collection.remove(e);this.length=this._collection.length}function p(e){this._filterResultCache[e.cid]={},l.call(this,e)||this._collection.get(e.cid)&&this._collection.remove(e)}function f(e,t,n){"change:"===e.slice(0,7)&&p.call(this,arguments[1]);
}function g(e){this.contains(e)&&this._collection.remove(e),this.length=this._collection.length}function m(e){this._superset=e,this._collection=new y.Collection(e.toArray()),b(this._collection,this),this.resetFilters(),this.listenTo(this._superset,"reset",u),this.listenTo(this._superset,"sort",d),this.listenTo(this._superset,"add change",h),this.listenTo(this._superset,"remove",g),this.listenTo(this._superset,"all",f)}var v=n("underscore"),y=n("backbone"),b=t(1),S=t(3),w={defaultFilterName:"__default",
filterBy:function(e,t){return t||(t=e,e=this.defaultFilterName),s.call(this,e,S(t)),c.call(this),this},removeFilter:function(e){return e||(e=this.defaultFilterName),o.call(this,e),c.call(this),this},resetFilters:function(){return this._filters={},a.call(this),this.trigger("filtered:reset"),c.call(this),this},superset:function(){return this._superset},refilter:function(e){return"object"==typeof e&&e.cid?h.call(this,e):(a.call(this),c.call(this)),this},getFilters:function(){return v.keys(this._filters);
},hasFilter:function(e){return v.contains(this.getFilters(),e)},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this.length=0,this.trigger("filtered:destroy")}};v.extend(m.prototype,w,y.Events),e.exports=m},function(e,t){function i(e,t){return function(n){return n.get(e)===t}}function a(e,t){return function(n){return t(n.get(e))}}function r(e,t){return l.isArray(t)||(t=null),{fn:e,keys:t}}function s(e){var t=l.keys(e),n=l.map(t,function(t){var n=e[t];
return l.isFunction(n)?a(t,n):i(t,n)}),s=function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0};return r(s,t)}function o(e,t){return l.isFunction(e)?r(e,t):l.isObject(e)?s(e):void 0}var l=n("underscore");e.exports=o},function(e,i){function a(){var e=this.getPage()*this.getPerPage(),t=e+this.getPerPage();return[e,t]}function r(){var e=a.call(this);this._collection.reset(this.superset().slice(e[0],e[1]))}function s(){var e=(this._totalPages,this.superset().length),t=this.getPerPage(),n=e%t===0?e/t:Math.floor(e/t)+1,i=this._totalPages!==n;
if(this._totalPages=n,i&&this.trigger("paginated:change:numPages",{numPages:n}),this.getPage()>=n)return this.setPage(n-1),!0}function o(){s.call(this)||r.call(this)}function l(e,t){for(var n=d.max([e.length,t.length]),i=0,a=0;i<n;i+=1,a+=1)if(e[i]!==t[a])if(t[i-1]===e[i])a-=1;else{if(t[i+1]!==e[i])return e[i];a+=1}}function c(e,t,n){if(!s.call(this)){var i=a.call(this),r=i[0],o=i[1],c=l(this.superset().slice(r,o),this._collection.toArray()),u=l(this._collection.toArray(),this.superset().slice(r,o));
u&&this._collection.remove(u),c&&this._collection.add(c,{at:this.superset().indexOf(c)-r})}}function u(e,t){this._superset=e,this._collection=new h.Collection(e.toArray()),this._page=0,this.setPerPage(t&&t.perPage?t.perPage:null),p(this._collection,this),this.listenTo(this._superset,"add remove",c),this.listenTo(this._superset,"reset sort",o)}var d=n("underscore"),h=n("backbone"),p=t(1),f={removePagination:function(){return this.setPerPage(null),this},setPerPage:function(e){return this._perPage=e,
o.call(this),this.setPage(0),this.trigger("paginated:change:perPage",{perPage:e,numPages:this.getNumPages()}),this},setPage:function(e){var t=0,n=this.getNumPages()-1;return e=e>t?e:t,e=e<n?e:n,e=e<0?0:e,this._page=e,r.call(this),this.trigger("paginated:change:page",{page:e}),this},getPerPage:function(){return this._perPage||this.superset().length||1},getNumPages:function(){return this._totalPages},getPage:function(){return this._page},hasNextPage:function(){return this.getPage()<this.getNumPages()-1;
},hasPrevPage:function(){return this.getPage()>0},nextPage:function(){return this.movePage(1),this},prevPage:function(){return this.movePage(-1),this},firstPage:function(){this.setPage(0)},lastPage:function(){this.setPage(this.getNumPages()-1)},movePage:function(e){return this.setPage(this.getPage()+e),this},superset:function(){return this._superset},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this._page=0,this._totalPages=0,this.length=0,this.trigger("paginated:destroy");
}};d.extend(u.prototype,f,h.Events),e.exports=u},function(e,i){function a(e){return d.isFunction(e)?e:function(t){return t.get(e)}}function r(e){return this._comparator?this._reverse?f(this._collection.toArray(),e,a(this._comparator)):d.sortedIndex(this._collection.toArray(),e,a(this._comparator)):this._superset.indexOf(e)}function s(e){var t=r.call(this,e);this._collection.add(e,{at:t})}function o(e){this.contains(e)&&this._collection.remove(e)}function l(e){this.contains(e)&&this._collection.indexOf(e)!==r.call(this,e)&&(this._collection.remove(e),
s.call(this,e))}function c(){if(!this._comparator)return void this._collection.reset(this._superset.toArray());var e=this._superset.sortBy(this._comparator);this._collection.reset(this._reverse?e.reverse():e)}function u(e){this._superset=e,this._reverse=!1,this._comparator=null,this._collection=new h.Collection(e.toArray()),p(this._collection,this),this.listenTo(this._superset,"add",s),this.listenTo(this._superset,"remove",o),this.listenTo(this._superset,"change",l),this.listenTo(this._superset,"reset",c);
}var d=n("underscore"),h=n("backbone"),p=t(1),f=t(6),g={setSort:function(e,t){return this._reverse="desc"===t,this._comparator=e,c.call(this),e?this.trigger("sorted:add"):this.trigger("sorted:remove"),this},reverseSort:function(){return this._reverse=!this._reverse,c.call(this),this},removeSort:function(){return this.setSort(),this},superset:function(){return this._superset},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this.length=0,this.trigger("sorted:destroy");
}};d.extend(u.prototype,g,h.Events),e.exports=u},function(e,t){function i(e){return r.isFunction(e)?e:function(t){return t[e]}}function a(e,t,n,a){n=null==n?r.identity:i(n);for(var s=n.call(a,t),o=0,l=e.length;o<l;){var c=o+l>>>1;n.call(a,e[c])<s?l=c:o=c+1}return o}var r=n("underscore");e.exports=a},function(e,t){function i(e,t){a.each(t,function(t){this.listenTo(e,t,function(){var e=a.toArray(arguments);e.unshift(t),this.trigger.apply(this,e)})},this)}var a=n("underscore");e.exports=i}],t(0)}();return i;
})},function(e,t,n){"use strict";var i=n(111),a=new i.a({interface:["getLanguages","load","t"]});t.a=a},function(e,t,n){"use strict";var i=n(111),a=new i.a({props:["capabilities","video","music","photo"]});t.a=a},function(e,t,n){"use strict";var i=n(111),a=new i.a({interface:["get","set","remove","clear"]});t.a=a},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(47),s=n(154),o={isPopulating:function(){return!!this.populatePromise&&"pending"===this.populatePromise.state()},isPopulated:function(){
return!!this.populatePromise&&"resolved"===this.populatePromise.state()},populate:function(){return this.populatePromise?this.populatePromise:this.fetch.apply(this,arguments)},fetch:function(){var e=this,t=a.a.Deferred(),n=void 0;if(this.isPopulating())return this.populatePromise;n=this._fetch?this._fetch.apply(this,arguments):this instanceof r.a.Collection?r.a.Collection.prototype.fetch.apply(this,arguments):r.a.Model.prototype.fetch.apply(this,arguments);var i=t.promise();return i.rid=n.rid,this.populatePromise=i,
n.done(function(n){e.populatePromise=a.a.Deferred().resolveWith(e,[e]).promise(),t.resolveWith(e,[e,n])}),n.fail(function(n){e.populatePromise=null,t.rejectWith(e,[e,n])}),i},abortPendingPopulate:function(){return this.isPopulating()&&s.a.abort(this.populatePromise.rid),this.populatePromise},resetPopulatePromise:function(e){return this.isPopulating()||(this.populatePromise=e),this.populatePromise}};t.a=o},function(e,t,n){"use strict";function i(e,t){return e?u.a.reduce(t,function(t,n,i){return e.indexOf(i)===-1&&(t[i]=n),
t},{}):t}function a(e,t){var n;try{n=e._getStorageKey()}catch(e){n="no storageKey"}p.a.error("StorageModel ("+n+") "+t)}var r=n(93),s=n.n(r),o=n(119),l=n.n(o),c=n(2),u=n.n(c),d=n(47),h=n(700),p=n(27),f=n(81),g=n(33),m=d.a.Model.extend({sessionAttrs:[],save:function(e,t,a){var r,s=this.attributes;if(null==e||"object"===("undefined"==typeof e?"undefined":l()(e))?(r=e,a=t):(r={})[e]=t,a=u.a.extend({validate:!0},a),r&&!a.wait){if(!this.set(r,a))return!1}else if(!this._validate(r,a))return!1;r&&a.wait&&(this.attributes=u.a.extend({},s,r)),
void 0===a.parse&&(a.parse=!0);var o=this,c=a.success;a.success=function(){o.attributes=s,c&&c(o,s,a),o.trigger("sync",o,s,a)},d.a.wrapError(this,a);var p=this._getStorage(),f=this._getStorageKey(),g=this.attributes;if(p.getInstance().excludeDefaults!==!1){var m=u.a.result(this,"defaults");g=n.i(h.a)(m,g)}var v=u.a.result(this,"sessionAttrs");g=i(v,g);var y=this.serialize(g),b=p.set(f,y);return b.done(a.success).fail(a.error),r&&a.wait&&(this.attributes=s),b},populate:function(){return this.populatePromise||(this.populatePromise=this.fetch.apply(this,arguments)),
this.populatePromise},fetch:function(e){e=e?u.a.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=this,n=e.success;e.success=function(i){return!!t.set(t.parse(i,e),e)&&(n&&n(t,i,e),void t.trigger("sync",t,i,e))},d.a.wrapError(this,e);var i=this._getStorage().get(this._getStorageKey());return i.done(e.success).fail(e.error),this.populatePromise=i,i},destroy:function e(t){t=t?u.a.clone(t):{};var n=this,i=t.success,e=function(){n.trigger("destroy",n,n.collection,t)};t.success=function(a){t.wait&&e(),
i&&i(n,a,t),n.trigger("sync",n,a,t)},d.a.wrapError(this,t);var a=this._getStorage().remove(this._getStorageKey());return a.done(t.success).fail(t.error),t.wait||e(),a},serialize:function(e){var t="";try{t=s()(e)}catch(e){a(this,"serialization error: "+e.message)}return t},parse:function(e){var t;if(null==e)return t;if(u.a.isObject(e))return e;try{t=JSON.parse(e);var n=u.a.result(this,"sessionAttrs");t=i(n,t)}catch(t){var r=u.a.isString(e)?e.substring(0,50):"no response";a(this,"parse error: "+t.message+" ("+r+")");
}return t},sync:function(){throw new Error("storage model doesn`t allow syncing to server")},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void n.i(g.a)(!1,"This model is already capturing events");var e=this.set,t={};this.set=function(n,i,a){var r;"object"===("undefined"==typeof n?"undefined":l()(n))?(r=n,a=i):(r={})[n]=i;var s=u.a.extend({},a,{silent:!0}),o=e.call(this,r,s);return u.a.extend(t,this.changed),o},this.releaseCapturedChangeEvents=function(){u.a.each(t,function(e,t){
this.trigger("change:"+t,this,e)},this),u.a.isEmpty(t)||this.trigger("change",this,{}),t={},this.set=e,this.releaseCapturedChangeEvents=null}},_getStorageKey:function(){var e=u.a.result(this,"storageKey");if(!e)throw new Error("storageKey is required");return e},_getStorage:function(){return f.a}});t.a=m},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(319),s=a.a.extend({name:"FilterModel",context:["server","section","type","standalone"],idAttribute:"filter",rootPropertyName:"Directory",defaults:{
advanced:!1},syncedAttrs:{filter:i.a.string,filterType:i.a.string,type:i.a.string,key:i.a.string,title:i.a.string,advanced:i.a.boolean},syncedRelations:{options:{relationClass:r.a}}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(22),s=n(1113),o=r.a.extend({name:"FilterOptionCollection",context:["server","section","type","standalone"],model:s.a,url:function e(){var t=a.a.result(this.section,"url"),e=t+"/"+this.parent.id;return this.type?e+="?type="+this.type:this.standalone||(e+="?"+this.getUrlParams()),
e},getUrlParams:function(){var e=this,t={},n=[],i=this.section.get("currentType"),r=this.section.get("currentFilters");return i&&(t.type=i.id),a.a.each(r,function(n){n.key!==e.parent.id&&n.values.length&&(t[n.key]=n.values.join(","))}),a.a.each(t,function(e,t){"unviewedLeafCount"===t?n.push(t+">="+e):n.push(t+"="+e)}),n.join("&")},augmentResponse:function(e){return e.Directory&&!a.a.isArray(e.Directory)&&(e.Directory=[e.Directory]),e.Directory=a.a.filter(e.Directory,function(e){return e.title}),e;
},search:function(e){var t=this.filter(function(t){return t.get("title").toLowerCase().indexOf(e.toLowerCase())>-1});return this.clone(t)}});t.a=o},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(17),s=n.n(r),o=n(38),l=n(67),c=n(65),u=n(16),d=n(57),h=n(643),p=n(18),f=n(432),g=n(1173),m=n(254),v=p.a.extend({name:"MediaSubscriptionModel",context:["server"],entityType:l.a,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(c.a)(this.entityType,e.key||this.cid,this.server.entityID());
},idAttribute:"key",rootPropertyName:"MediaSubscription",urlRoot:"/media/subscriptions",mergeStrategy:h.a,syncedAttrs:{key:u.a.string,type:u.a.integer,targetLibrarySectionID:{type:u.a.string,save:!0},targetSectionLocationID:{type:u.a.string,save:!0},title:u.a.string,selected:u.a.boolean,parameters:u.a.string},syncedRelations:{target:{relationClass:g.a,rootPropertyName:"Metadata",deferred:!0},grabOperations:{relationClass:f.a,rootPropertyName:"MediaGrabOperation",deferred:!0},prefs:{relationClass:m.a,
rootPropertyName:"Setting",deferred:!0,save:!0}},augmentResponseText:function(e,t){return t===d.a.xml?o.a.replaceMetadataXMLElementNames(e):e},getSaveParams:function(){var e=p.a.prototype.getSaveParams.apply(this,arguments),t=e.Setting,n=s()(e,["Setting"]);return a()({prefs:t},n)}});t.a=v},function(e,t,n){"use strict";function i(e){var t=e.key,i=e.actionSuffix,s=e.getModel,o=n.i(a.a)(i||t),l=n.i(r.a)(t),c="is"+l+"Populated";return function(e,t,n){var i=s(e,t);i.get(c)||n({type:"FETCH_"+o,payload:t
})}}var a=(n(33),n(734)),r=n(214);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){var n=t.metadataListEntityID;return n},r.a,function(e,t){return t[e]})}var a=n(9),r=(n.n(a),n(669));t.a=i},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(150)),r=n.i(i.createSelector)(a.a,function(e){return e.metadataItems});t.a=r},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(150)),r=n.i(i.createSelector)(a.a,function(e){return e.providers});t.a=r},function(e,t,n){
"use strict";var i=n(9),a=(n.n(i),n(438)),r=n(439),s=n.i(i.createSelector)(r.a,a.a,function(e,t){return!(!e.cpms||t)});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(34),s=r.a.extend({initialize:function(){this._entries=[]},wrapAll:function(e,t,n){a.a.each(e,function(e){this.wrap(e,t,n)},this)},wrap:function(e,t,n){n[e]=a.a.wrap(n[e],a.a.bind(function(e){var i=a.a.toArray(arguments).slice(1);return t.call(n)?e.apply(n,i):void this.add({fn:e,args:i,context:n})},this))},add:function(e){
this._entries.push(e)},process:function(){a.a.each(this._entries,function(e){var t=e.context||this;e.fn.apply(t,e.args)},this),this.clear()},clear:function(){this._entries.length=0}});t.a=s},function(e,t,n){"use strict";function i(e){if(null==e)return!1;var t=r.a.unix(e);return r()().subtract(1,"day").isSame(t,"day")}var a=n(43),r=n.n(a);t.a=i},function(e,t,n){"use strict";var i={aa:"Afaraf",af:"Afrikaans",ab:"Abkhazian",ak:"Akan",sq:"Shqip",am:"Amharic",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",
an:"Aragon\xe9s",hy:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",as:"Assamese",av:"\u0430\u0432\u0430\u0440 \u043c\u0430\u0446\u04c0",ae:"avesta",ay:"aymar aru",az:"az\u0259rbaycan dili",ba:"\u0431\u0430\u0448\u04a1\u043e\u0440\u0442 \u0442\u0435\u043b\u0435",bm:"bamanankan",eu:"euskara",be:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bn:"Bengali",bh:"\u092d\u094b\u091c\u092a\u0941\u0930\u0940",bi:"Bislama",bs:"bosanski jezik",br:"brezhoneg",bg:"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438 \u0435\u0437\u0438\u043a",
my:"Burmese",ca:"Catal\xe0",ch:"Chamoru",ce:"\u043d\u043e\u0445\u0447\u0438\u0439\u043d \u043c\u043e\u0442\u0442",cu:"\u0469\u0437\u044b\u043a\u044a \u0441\u043b\u043e\u0432\u0463\u043d\u044c\u0441\u043a\u044a",cv:"\u0447\u04d1\u0432\u0430\u0448 \u0447\u04d7\u043b\u0445\u0438",kw:"Kernewek",co:"corsu",cr:"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423",dv:"Divehi",dz:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",en:"English","en-GB":"English (UK)",eo:"Esperanto",et:"eesti",ee:"E\u028begbe",fo:"f\xf8royskt",
fj:"vosa Vakaviti",fy:"Frysk",ff:"Fulfulde",ka:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",gd:"G\xe0idhlig",ga:"Gaeilge",gl:"Galego",gv:"Gaelg",gn:"Ava\xf1e&apos;\u1ebd",gu:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",ht:"Krey\xf2l ayisyen",ha:"\u0647\u064e\u0648\u064f\u0633\u064e",hz:"Otjiherero",hi:"\u0939\u093f\u0928\u094d\u0926\u0940",ho:"Hiri Motu",hr:"hrvatski",ig:"As\u1ee5s\u1ee5 Igbo",is:"\xcdslenska",io:"Ido",ii:"\ua188\ua320\ua4bf Nuosuhxop",iu:"\u1403\u14c4\u1483\u144e\u1450\u1466",ie:"Interlingue",
ia:"Interlingua",id:"Bahasa Indonesia",ik:"I\xf1upiaq",jv:"basa Jawa",kl:"kalaallisut",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",ks:"\u0915\u0936\u094d\u092e\u0940\u0930\u0940",kr:"Kanuri",kk:"\u049a\u0430\u0437\u0430\u049b \u0442\u0456\u043b\u0456",km:"Khmer",ki:"G\u0129k\u0169y\u0169",rw:"Ikinyarwanda",ky:"\u043a\u044b\u0440\u0433\u044b\u0437 \u0442\u0438\u043b\u0438",kv:"\u043a\u043e\u043c\u0438 \u043a\u044b\u0432",kg:"KiKongo",kj:"Kuanyama",ku:"Kurd\xee",lo:"Lao",la:"latine",lv:"latvie\u0161u valoda",
li:"Limburgs",ln:"Ling\xe1la",lt:"lietuvi\u0173 kalba",lb:"L\xebtzebuergesch",lu:"Luba-Katanga",lg:"Luganda",mk:"\u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 \u0458\u0430\u0437\u0438\u043a",mh:"Kajin M\u0327aje\u013c",ml:"Malayalam",mi:"te reo M\u0101ori",mr:"\u092e\u0930\u093e\u0920\u0940",ms:"bahasa Melayu",mg:"Malagasy fiteny",mt:"Malti",mo:"Moldavian",mn:"\u043c\u043e\u043d\u0433\u043e\u043b",na:"Ekakair\u0169 Naoero",nv:"Din\xe9 bizaad",nr:"isiNdebele (North)",nd:"isiNdebele (South)",
ng:"Owambo",ne:"\u0928\u0947\u092a\u093e\u0932\u0940",nn:"Norsk nynorsk",nb:"Norsk bokm\xe5l",ny:"chiChe\u0175a",oc:"Occitan",oj:"\u140a\u14c2\u1511\u14c8\u142f\u14a7\u140e\u14d0",or:"Oriya",om:"Afaan Oromoo",os:"\u0438\u0440\u043e\u043d \xe6\u0432\u0437\u0430\u0433",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",pi:"\u092a\u093e\u0934\u093f",ps:"\u067e\u069a\u062a\u0648",qu:"Runa Simi",rm:"rumantsch grischun",ro:"rom\xe2n\u0103",rn:"kiRundi",sg:"y\xe2ng\xe2 t\xee s\xe4ng\xf6",sa:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",
sr:"\u0441\u0440\u043f\u0441\u043a\u0438 \u0458\u0435\u0437\u0438\u043a",si:"Sinhala",sk:"sloven\u010dina",sl:"Sloven\u0161\u010dina",se:"Davvis\xe1megiella",sm:"gagana fa&apos;a Samoa",sn:"chiShona",sd:"\u0938\u093f\u0928\u094d\u0927\u0940",so:"Soomaaliga",st:"Sesotho",sc:"sardu",ss:"SiSwati",su:"Basa Sunda",sw:"Kiswahili",ty:"Reo Tahiti",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",tt:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",te:"Telugu",tg:"\u0442\u043e\u04b7\u0438\u043a\u04e3",tl:"Wikang Tagalog",th:"\u0e44\u0e17\u0e22",
bo:"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42",ti:"Tigrinya",to:"faka Tonga",tn:"Setswana",ts:"Xitsonga",tk:"T\xfcrkmen",tw:"Twi",ug:"Uy\u01a3urq\u0259",uk:"\u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"\u0627\u0631\u062f\u0648",uz:"O&apos;zbek",ve:"Tshiven\u1e13a",vi:"Ti\u1ebfng Vi\u1ec7t",vo:"Volap\xfck",cy:"Cymraeg",wa:"Walon",wo:"Wollof",xh:"isiXhosa",yi:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",yo:"Yor\xf9b\xe1",za:"Sa\u026f cue\u014b\u0185",zu:"isiZulu",pb:"Portugu\xeas (Brasil)",
fr:"Fran\xe7ais","fr-CA":"Fran\xe7ais Canadien",de:"Deutsch",sv:"Svenska",no:"Norsk",da:"Dansk",fi:"Suomeksi",nl:"Nederlands",it:"Italiano",es:"Espa\xf1ol","es-419":"Espa\xf1ol (Latinoam\xe9rica)",pl:"Polski",hu:"Magyar",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",tr:"T\xfcrk\xe7e",zh:"\u4e2d\u6587","zh-TW":"\u81fa\u8a9e",ru:"\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a",he:"\u05e2\u05d1\u05e8\u05d9\u05ea",ja:"\u65e5\u672c\u8a9e",pt:"Portugu\xeas","pt-BR":"Portugu\xeas Brasileiro",
ko:"\ud55c\uad6d\uc5b4",cs:"\u010de\u0161tina",fa:"\u0641\u0627\u0631\u0633\u06cc",xx:"Unknown",xn:"None"};t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a.get("video").id,i=n.i(o.a)(e,{streamType:t});return r.a.first(i)}var a=n(2),r=n.n(a),s=n(88),o=n(128);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);return(e/Math.pow(1e3,n)).toFixed(t)+" "+a[n+1]}Object.defineProperty(t,"__esModule",{value:!0});var a=["bps","kbps","Mbps","Gbps","Tbps"];
t.default=i},function(e,t,n){"use strict";var i="placeholder-standard",a="placeholder-square",r="placeholder-widescreen",s="placeholder-folder",o="placeholder-friend",l={movie:i,show:i,season:i,episode:r,artist:a,album:a,track:a,photo:a,photoalbum:a,clip:r,userPlaylistItem:r,playlist:a,playlistFolder:a,channel:a,channelDirectory:a,folder:s,friend:o,device:a,poster:i,art:r,banner:r};t.a=l},function(e,t,n){"use strict";var i=(n(1259),n(1260),n(1263));n.d(t,"a",function(){return i.a});var a=(n(1264),
n(1265),n(1266),n(1267));n.d(t,"b",function(){return a.a});n(1268),n(1269),n(1270),n(1271),n(727),n(728),n(1272),n(729),n(1273),n(1274),n(1275),n(1276),n(1277),n(1278),n(730),n(731),n(1280),n(1281),n(1279)},function(e,t,n){"use strict";function i(e,t){var n=r.a.Deferred(),i=(new Date).getTime()+t,a=void 0;return e.done(function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];a=function(){return n.resolve.apply(n,t)}}).fail(function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];
a=function(){return n.reject.apply(n,t)}}).always(function(){var e=(new Date).getTime(),t=Math.max(i-e,0);setTimeout(a,t)}),n.promise()}var a=n(5),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a.clone(e);return"undefined"!=typeof t.last?(t.end=t.last+1,t.size=t.end-t.start):"undefined"!=typeof t.size?(t.end=t.start+t.size,t.last=t.end-1):"undefined"!=typeof t.end&&(t.last=t.end-1,t.size=t.end-t.start),t}function a(e,t){return s.a.filter(s.a.map(e,i),function(e){return t?e.size>=0:e.size>0;
})}var r=n(2),s=n.n(r),o={augment:i,difference:function(e,t,n){e=i(e),t=i(t);var r=[{start:e.start,last:Math.min(e.last,t.start-1)},{start:Math.max(e.start,t.end),last:e.last}];return a(r,n)},union:function(e,t,n){if(e=i(e),t=i(t),e.start>t.start){var r=e;e=t,t=r}var s=[e];return t.start<=e.end?s[0].last=Math.max(t.last,e.last):s.push(t),a(s,n)},degap:function(e,t){var n=i(e);return t=i(t),t.size?(n.start>t.end&&(n={start:t.end,end:n.end}),n.end<t.start&&(n={start:n.start,end:t.start}),i(n)):n},each:function(e,t,n){
e=i(e);for(var a=Math.min(e.start,e.end),r=Math.max(e.start,e.end);a<=r;a++)t.call(n,a)},roundByPage:function(e,t){return e=i(e),i({start:Math.floor(e.start/t)*t,end:Math.ceil(e.end/t)*t})}};t.a=o},function(e,t,n){"use strict";function i(e,t,n){var i=e.get("entities").get(t);if(i){var r=i.get(n);if(r)return r.get("model")}a.a.warn('An entity does not exist with the type "%s" and id "%s"',t,n)}var a=n(27);t.a=i},function(e,t,n){"use strict";function i(e){return e?e.toUpperCase():""}Object.defineProperty(t,"__esModule",{
value:!0}),t.default=i},function(e,t,n){"use strict";function i(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}t.a=i},function(e,t,n){"use strict";function i(e){e=e>0?Math.min(e,1024):24;for(var t="";t.length<e;)t+=Math.random().toString(36).substr(2);return t.substr(0,e)}t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(2),s=n.n(r),o=n(14),l=n(34),c=n(39),u=n(36),d=n(415),h=n(27),p=n(52),f=l.a.extend({mixins:[p.a],idleTimelineInterval:1e4,players:{photo:null,video:null,audio:null
},textField:{focused:!1,content:"",secure:!1},initialize:function(){s.a.bindAll(this,"_sendTimeline"),this._sendTimelineThrottle=s.a.throttle(this._sendTimeline,1e3)},registerPlayer:function(e){var t=n.i(o.a)("appModel").get("settings");if(t.get("companion")){var i=u.a.getChildMediaType(e.currentItem.get("type")).element;n.i(h.a)("[Companion Timeline] registering player. Type %s",i),this.players[i]=e,this.listenTo(e.model,{"change:state change:loaded change:lastSeekPosition":this._sendTimeline,"change:position":this._sendTimelineThrottle
}),this._sendTimeline()}},unregisterPlayer:function(e){var t=u.a.getChildMediaType(e.currentItem.get("type")).element;n.i(h.a)("[Companion Timeline] unregistering player. Type %s",t),this.players[t]=null,this.stopListening(e.model),s.a.defer(this._sendTimeline)},enteredTextField:function(e){this.textField=a()({},e,{focused:!0}),this._sendTimeline()},leavedTextField:function(){this.textField.focused=!1,this._sendTimeline()},updatedTextField:function(e){this.textField.content!==e&&(this.textField.content=e,
this._sendTimeline())},start:function(){this.timelineStarted||(this.timelineStarted=!0,n.i(h.a)("[Companion Timeline] Starting"),this._idleTimelineInterval=setInterval(this._sendTimelineThrottle,this.idleTimelineInterval))},stop:function(e){this.timelineStarted&&(e&&this._sendTimeline({requestDisconnect:!0}),this.timelineStarted=!1,n.i(h.a)("[Companion Timeline] Stopping"),this._idleTimelineInterval=clearInterval(this._idleTimelineInterval))},isPlaybackActive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.states||[c.a.states.PLAYING,c.a.states.PAUSED,c.a.states.BUFFERING],n=e.types||s.a.keys(this.players),i=s.a.find(this.players,function(e,i){
return e&&s.a.contains(t,e.model.get("state"))&&s.a.contains(n,i)});return!!i},_sendTimeline:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.timelineStarted){var t=this._buildVideoTimeline(),i=this._buildMusicTimeline(),a=this._buildPhotoTimeline(),r=t._location||a._location||i._location||"navigation",o={MediaContainer:{_location:r,Timeline:[t,i,a]}};e.requestDisconnect&&(o.MediaContainer._disconnected=1),this.textField.focused&&s.a.extend(o.MediaContainer,{_textFieldFocused:this.textField.name,
_textFieldContent:this.textField.content,_textFieldSecure:this.textField.secure?1:0}),n.i(h.a)("[Companion Timeline] sending companion timeline"),d.a.publish(o)}},_buildVideoTimeline:function(){var e=this._buildbaseTimeline(this.players.video,"video");return e._state&&e._state!==c.a.states.STOPPED&&(e._location="fullScreenVideo"),e},_buildPhotoTimeline:function(){var e=this._buildbaseTimeline(this.players.photo,"photo");return e._state&&e._state!==c.a.states.STOPPED&&(e._location="fullScreenPhoto"),
e},_buildMusicTimeline:function(){var e=this._buildbaseTimeline(this.players.audio,"music");return e._state&&e._state!==c.a.states.STOPPED&&(e._location="fullScreenMusic"),e},_buildbaseTimeline:function(e,t){var i=n.i(o.a)("companionPlayerProfile"),a={_type:t,_seekRange:"0-0",_time:"0",_controllable:i[t]};if(!e||!e.currentItem)return a;var r=e.currentItem,l=e.model,c=r.server,u=c.get("originalMachineIdentifier")||c.get("machineIdentifier"),d=c.get("connections"),h=c.get("activeConnection");h.get("isLoopback")&&(h=d.findWhere({
isConnected:!0,isLoopback:!1})||h);var p=l.get("duration"),f=0;l.get("repeatAll")?f=2:l.get("repeatItem")&&(f=1),a=s.a.extend(a,{_protocol:h.get("scheme"),_address:h.getAddressFromUri(),_port:h.get("port"),_token:c.get("accessToken"),_machineIdentifier:u,_guid:r.get("guid"),_key:r.get("key"),_ratingKey:r.get("ratingKey"),_duration:p,_audioStreamID:l.get("audioStreamID"),_state:l.get("state"),_subtitleStreamID:l.get("subtitleStreamID"),_time:l.get("position"),_repeat:f,_mute:0,_shuffle:0,_volume:l.get("volume")
}),p&&(a._seekRange="0-"+p);var g=l.get("playQueue");return s.a.result(g,"url")?a=s.a.extend(a,{_containerKey:"/playQueues/"+g.id,_playQueueID:g.id,_playQueueVersion:g.get("playQueueVersion"),_playQueueItemID:r.get("playQueueItemID")}):a._containerKey=s.a.result(g.get("lastAddedItem"),"url"),a}}),g=new f;t.a=g},function(e,t,n){"use strict";var i=n(4),a=n(215),r=["id","typeString"],s=n.i(a.a)(r,[{id:0,typeString:"tag",title:function(){return n.i(i.default)("Tag")}},{id:1,typeString:"genre",title:function(){
return n.i(i.default)("Genre")}},{id:2,typeString:"collection",title:function(){return n.i(i.default)("Collection")}},{id:3,typeString:"bookmark",title:function(){return n.i(i.default)("Bookmark")}},{id:4,typeString:"director",title:function(){return n.i(i.default)("Director")},isPerson:!0},{id:5,typeString:"writer",title:function(){return n.i(i.default)("Writer")},isPerson:!0},{id:6,typeString:"actor",title:function(){return n.i(i.default)("Actor")},isPerson:!0},{id:7,typeString:"producer",title:function(){
return n.i(i.default)("Producer")},isPerson:!0},{id:8,typeString:"country",title:function(){return n.i(i.default)("Country")}},{id:9,typeString:"chapter",title:function(){return n.i(i.default)("Chapter")}},{id:10,typeString:"review",title:function(){return n.i(i.default)("Review")}},{id:11,typeString:"label",title:function(){return n.i(i.default)("Label")}},{id:42,typeString:"versionBackgroundProcessingTarget",title:function(){return n.i(i.default)("Version Background Processing Target")}},{id:200,
typeString:"make",title:function(){return n.i(i.default)("Make")}},{id:201,typeString:"model",title:function(){return n.i(i.default)("Model")}},{id:202,typeString:"aperture",title:function(){return n.i(i.default)("Aperture")}},{id:203,typeString:"exposure",title:function(){return n.i(i.default)("Exposure")}},{id:204,typeString:"iso",title:function(){return n.i(i.default)("ISO")}},{id:205,typeString:"lens",title:function(){return n.i(i.default)("Lens")}},{id:206,typeString:"device",title:function(){
return n.i(i.default)("Device")}},{id:207,typeString:"autotag",title:function(){return n.i(i.default)("Tag")}},{id:300,typeString:"mood",title:function(){return n.i(i.default)("Mood")}},{id:301,typeString:"bpm",title:function(){return n.i(i.default)("BPM")}},{id:302,typeString:"composer",title:function(){return n.i(i.default)("Composer")}},{id:303,typeString:"featuring",title:function(){return n.i(i.default)("Featuring")}},{id:304,typeString:"trackArtist",title:function(){return n.i(i.default)("Track Artist");
}},{id:305,typeString:"similarArtist",title:function(){return n.i(i.default)("Similar Artist")}},{id:306,typeString:"concert",title:function(){return n.i(i.default)("Concert")}}]);t.a=s},function(e,t,n){"use strict";var i=n(105),a=i.a.extend({setup:function(e){if(e.className&&this.$el.addClass(e.className),this.model=e.model,this.server=e.model.server,e.flag){var t=this.model.get("Media");this.flag=e.flag,t&&t.length&&(this.path=t[0][this.flag]),this.ignoreAttributeChanges||this.listenTo(this.model,"change:Media",this.onMediaChange);
}else this.flag=e.modelAttribute,this.path=this.model.get(this.flag),this.ignoreAttributeChanges||this.listenTo(this.model,"change:"+this.flag,this.onChange);this.prefix=this.model.get("mediaTagPrefix"),this.version=this.model.get("mediaTagVersion"),this.path&&(this.url=this.getUrl(this.path)),this.setDimensions(e)},getUrl:function(e){return this.prefix+this.flag+"/"+encodeURIComponent(e)+"?t="+this.version},onMediaChange:function(e,t){this.onChange(e,t&&t.length?t[0][this.flag]:null)}});t.a=a},function(e,t,n){
"use strict";var i=n(18),a=n(16),r=n(254),s=n(766),o=n(1456);n.d(t,"a",function(){return l}),n.d(t,"b",function(){return c});var l={DEAD:"dead",ALIVE:"alive"},c={DISABLED:"disabled",ENABLED:"enabled"},u=i.a.extend({name:"MediaGrabberDeviceModel",context:["server"],rootPropertyName:"Device",idAttribute:"key",sessionAttrs:{isChannelsPending:a.a.boolean,isChannelsPopulated:a.a.boolean,channelsError:a.a.object,selectedSource:a.a.string,isSaving:a.a.boolean,saveError:a.a.object},sessionRelations:{channels:{
relationClass:o.a}},syncedAttrs:{key:a.a.integer,uuid:a.a.string,parentID:a.a.integer,uri:a.a.string,protocol:a.a.string,status:a.a.string,state:a.a.string,lastSeenAt:a.a.integer,make:a.a.string,model:a.a.string,modelNumber:a.a.string,source:a.a.integer,sources:a.a.list,tuners:a.a.integer},syncedRelations:{channelMappings:{rootPropertyName:"ChannelMapping",relationClass:s.a},prefs:{relationClass:r.a,rootPropertyName:"Setting",deferred:!0,save:!0}},defaults:{isChannelsPending:!1,isChannelsPopulated:!1,
channelsError:null,isSaving:!1,saveError:null}});t.c=u},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(441),s=n(22),o=n(1479),l=s.a.extend({name:"AgentCollection",context:["server","mediaTypeID","primaryAgentID","relatedAgentID"],model:o.a,cache:new r.a,cacheKey:function(){var e=a.a.result(this,"url");return this.server&&this.server.getScopedKey(e)},url:function(){var e="/system/agents";return this.primaryAgentID?e+"/contributors?mediaType="+this.mediaTypeID+"&primaryAgent="+this.primaryAgentID:this.relatedAgentID?e+"/"+this.relatedAgentID+"/config/"+this.mediaTypeID:this.mediaTypeID?e+"?mediaType="+this.mediaTypeID:e;
},hasExclusiveAgent:function(e){return!!a.a.intersection(this.pluck("identifier"),e).length}});t.a=l},function(e,t,n){"use strict";var i=n(18),a=n(16),r=n(761),s=n(342),o=n(766),l=n(1466),c=n(475),u=n(1465),d=n(763),h=n(1458);n.d(t,"a",function(){return p});var p={DEVICE:"device",DEVICE_CHANNELS:"deviceChannels",EPG:"epg",EPG_MAPPING:"epgMapping",CHANNEL_MAPPING:"channelMapping",EPG_DOWNLOAD:"epgDownload"},f=i.a.extend({name:"DVRSetupModel",context:["server"],sessionAttrs:{isDevicesPending:a.a.boolean,
isDevicesPopulated:a.a.boolean,devicesError:a.a.object,isChannelMappingsPending:a.a.boolean,isChannelMappingsPopulated:a.a.boolean,channelMappingsError:a.a.object,isChannelMappingsSaving:a.a.boolean,channelMappingsSaveError:a.a.object,isLineupChannelsPending:a.a.boolean,isLineupChannelsPopulated:a.a.boolean,lineupChannelsError:a.a.object,epgLineupActivityID:a.a.string,epgDownloadActivityID:a.a.string,step:a.a.string,selectedLineupUUID:a.a.string,addDevicePending:a.a.boolean,isSavingDVR:a.a.boolean
},sessionRelations:{devices:{relationClass:r.a},lineupChannels:{relationClass:l.a},epgSettings:{relationClass:u.a},channelMappings:{relationClass:o.a},selectedDVR:{relationClass:d.a,deferred:!0},selectedDevice:{relationClass:s.c,deferred:!0},selectedLanguage:{relationClass:c.a,deferred:!0},setupErrorMessages:{relationClass:h.a}},defaults:{step:p.DEVICE,isDevicesPending:!1,isDevicesPopulated:!1,devicesError:null,isChannelMappingsPending:!1,isChannelMappingsPopulated:!1,channelMappingsError:null,isChannelMappingsSaving:!1,
channelMappingsSaveError:null,isLineupChannelsPending:!1,isLineupChannelsPopulated:!1,lineupChannelsError:null,epgLineupActivityID:"",epgDownloadActivityID:"",addDevicePending:!1,isSavingDVR:!1}});t.b=f},function(e,t,n){"use strict";var i=n(53),a=n(31);n.d(t,"a",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"c",function(){return o}),n.d(t,"i",function(){return l}),n.d(t,"j",function(){return c}),n.d(t,"d",function(){return u}),n.d(t,"e",function(){return d}),n.d(t,"h",function(){return h;
}),n.d(t,"f",function(){return p}),n.d(t,"g",function(){return f});var r=n.i(i.a)(a._2),s=(n.i(i.a)(a._3),n.i(i.a)(a._4)),o=n.i(i.a)(a._5),l=n.i(i.a)(a._6),c=n.i(i.a)(a._7),u=n.i(i.a)(a._8),d=n.i(i.a)(a._9),h=n.i(i.a)(a._10),p=n.i(i.a)(a._11),f=n.i(i.a)(a._12)},function(e,t,n){"use strict";var i=n(53),a=n(31);n.d(t,"b",function(){return r}),n.d(t,"c",function(){return s}),n.d(t,"d",function(){return o}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return c}),n.d(t,"h",function(){return u}),
n.d(t,"a",function(){return d}),n.d(t,"g",function(){return h});var r=n.i(i.a)(a._144),s=n.i(i.a)(a._145),o=n.i(i.a)(a._146),l=n.i(i.a)(a._147),c=n.i(i.a)(a._148),u=n.i(i.a)(a._149),d=n.i(i.a)(a._150),h=n.i(i.a)(a._151)},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e,t){var n=t.activeType;return n},o.a,function(e,t){var n=void 0;return e&&(n=r.a.find(t,function(t){return String(t.type)===e})),n||(n=r.a.first(t)),n})}var a=n(2),r=n.n(a),s=n(9),o=(n.n(s),n(777));t.a=i;
},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e){return e.ui.liveTVSettingsPage},function(e,t){var n=t.dvrID;return n},function(e,t){var n=e.dvrs;return r.a.find(n,{key:t})})}var a=n(2),r=n.n(a),s=n(9);n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(n.i(l.a)(),n.i(c.a)(),function(e,t){return r.a.find(t,function(t){return t.type===o.a.PROVIDER_EPG_LOAD&&t.Context.identifier===e.identifier})})}var a=n(2),r=n.n(a),s=n(9),o=(n.n(s),
n(107)),l=n(103),c=n(184);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"j",function(){return a}),n.d(t,"c",function(){return r}),n.d(t,"d",function(){return s}),n.d(t,"b",function(){return o}),n.d(t,"i",function(){return l}),n.d(t,"h",function(){return c}),n.d(t,"e",function(){return u}),n.d(t,"f",function(){return d}),n.d(t,"g",function(){return h});var i=9,a=13,r=16,s=17,o=27,l=38,c=40,u=91,d=93,h=224},function(e,t,n){"use strict";function i(e,t){return e.get("ui").get(t+"Player");
}function a(e,t){var n=e.get("playQueue");if(n){var i=t-n.get("firstIndex");if(!(i<0||i>=n.get("items").length)){var a=n.get("items").at(i);return a}}}t.b=i,t.a=a},function(e,t,n){"use strict";var i=n(2674),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(8),c=n(14),u=n(135),d=n(21),h=n(49),p=n(156),f=n(1587),g=n(1602),m=n(1616),v=n(1620),y=n(1619),b=n(1615),S=n(1613),w=n(1612),M=n(1617),I=n(1614),C=n(1618),D=n(1621),T={movie:m.a,show:v.a,season:y.a,episode:b.a,artist:S.a,album:w.a,photoalbum:M.a,clip:I.a,userPlaylistItem:I.a,
playlist:C.a},x={playlist:{blur:5,saturation:50}},P=o.a.Layout.extend({className:"details-container",template:a.a,regions:{details:".row"},events:{"click .pivot-link":"onPivotClick"},onlyAfterRender:["playTheme"],initialize:function(){var e=this.model.get("type"),t={};s()(x).has(e)&&(t=x[e]),this.mediaActions=new p.a({},{item:this.model,type:e,showAdvanced:!0}),n.i(c.a)("appModel").get("primaryServer")===this.model.server&&n.i(c.a)("appStore").dispatch(u.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),
section:this.model.get("librarySectionID")})),this.once("render",s.a.bind(function(){l.a.trigger("show:background",{model:this.model,imageFilters:t}),l.a.trigger("show:bar","actionbar",new f.a({model:this.model,mediaActions:this.mediaActions})),this.model.get("isLibraryItem")&&l.a.trigger("show:bar","breadcrumbbar",new g.a({model:this.model}))},this)),this.playTheme()},playTheme:function(){var e=n.i(c.a)("appModel").get("settings");if(e.get("playThemeMusic")){var t=this.model.get("grandparentTheme")||this.model.get("parentTheme")||this.model.get("theme");
if(!t)return null;var i=new h.a({theme:t,key:t,parentKey:this.model.get("key"),type:"track",Media:[]},{server:this.model.server});d.a.execute("playBackgroundMedia",{item:i,volume:50})}},onRender:function(){var e,t=this.model.get("type");if(this.model.get("isLibraryItem")||"movie"!==t&&"episode"!==t||(t="clip"),s()(T).has(t)){var n=T[t];e=new n({model:this.model,mediaActions:this.mediaActions})}else e=new D.a({model:this.model});this.details.append(e,this.$el)},onClose:function(){l.a.trigger("hide:bar","actionbar"),
n.i(c.a)("appModel").get("primaryServer")===this.model.server&&n.i(c.a)("appStore").dispatch(u.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),section:null})),this.model.get("isLibraryItem")&&l.a.trigger("hide:bar","breadcrumbbar")},onPivotClick:function(e){var t=this.model.section;if(t){var n=t.get("items");n.scrollPosition=0}}});t.a=P},function(e,t,n){"use strict";var i=n(2686),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(4),d=n(8),h=n(20),p=n(36),f=n(21),g=n(49),m=n(156),v=n(492),y=n(491),b=n(160),S=n(288),w=n(286),M=n(287),I=n(189),C=c.a.ItemView.extend({
tagName:"ul",className:"dropdown-menu",template:a.a,ui:{divider:".divider"},events:{"click .play-version-btn":"onPlayVersionClick","click .play-all-btn":"onPlayAllClick","click .play-shuffled-btn":"onPlayShuffledClick","click .play-next-btn":"onPlayNextClick","click .add-to-queue-btn":"onAddToQueueClick","click .play-mix-btn":"onPlayMixClick","click .play-primary-extra-btn":"onPlayPrimaryExtraClick","click .add-to-playlist-btn":"onAddToPlaylistClick","click .refresh-btn":"onRefreshClick","click .sync-btn":"onSyncClick",
"click .convert-btn":"onConvertClick","click .mark-watched-btn":"onMarkWatchedClick","click .mark-unwatched-btn":"onMarkUnwatchedClick","click .watch-later-btn":"onWatchLaterClick","click .share-btn":"onShareClick","click .recommend-btn":"onRecommendClick","click .delete-btn":"onDeleteClick","click .info-btn":"onInfoClick","click .download-btn":"onDownloadClick"},initialize:function(e){this.mediaType=p.a.get(this.model.get("type")),this.mediaActions=new m.a({},{item:this.model}),l()(".dropdown.open .dropdown-toggle").dropdown("toggle");
},serializeData:function(){var e,t;if(this.mediaActions.get("showDownload")){e=this.model.getDownloadUrl();var n=this.model.getFilepath();n&&(t=h.getLastSegment(n))}return{defaultLinkTarget:"_self",downloadUrl:e,downloadName:t}},getPosition:function(e,t,n){var i=e.position().left;return e.offset().top+this.$el.outerHeight()>t.offset.top+t.outerHeight&&(n-=this.$el.height()-e.height()),e.offset().left+this.$el.outerWidth()>t.offset.left+t.width&&(i-=this.$el.width()-e.outerWidth()),{top:n,left:i}},
bindingsModel:"mediaActions",bindings:{".play-version-btn":{modelAttribute:"showPlayVersion",manual:!0,autohide:!0},".play-all-btn":{modelAttribute:"showPlayAll",manual:!0,autohide:!0},".play-shuffled-btn":{modelAttribute:"showShuffle",manual:!0,autohide:!0},".play-next-btn, .add-to-queue-btn":{modelAttribute:"showQueue",manual:!0,autohide:!0},".play-mix-btn":{modelAttribute:"showPlayMix",manual:!0,autohide:!0,formatter:function(e,t){if(e){var i=this.model.get("related"),a=i.findWhere({browse:!1}),r=a.get("title");
r&&t.text(n.i(u.default)("Play {1}",r))}return e}},".play-trailer-btn":{modelAttribute:"showPlayTrailer",manual:!0,autohide:!0},".play-music-video-btn":{modelAttribute:"showPlayMusicVideo",manual:!0,autohide:!0},".add-to-playlist-btn":{modelAttribute:"showAddToPlaylist",manual:!0,autohide:!0},".refresh-btn":{modelAttribute:"showRefresh",manual:!0,autohide:!0},".mark-watched-btn":{modelAttribute:"showMarkWatched",manual:!0,autohide:!0},".mark-unwatched-btn":{modelAttribute:"showMarkUnwatched",manual:!0,
autohide:!0},".sync-btn":{modelAttribute:"showSync",manual:!0,autohide:!0},".convert-btn":{modelAttribute:"showConvert",manual:!0,autohide:!0},".download-btn":{modelAttribute:"showDownload",manual:!0,autohide:!0},".watch-later-btn":{modelAttribute:"showWatchLater",manual:!0,autohide:!0},".share-btn, .recommend-btn":{modelAttribute:"showShare",manual:!0,autohide:!0},".delete-btn":{modelAttribute:"showDelete",manual:!0,autohide:!0},".info-btn":{modelAttribute:"showInfo",manual:!0,autohide:!0}},onRender:function(){
var e=this.ui.divider,t=e.prevAll(":not(:has(.hidden))").length,n=e.nextAll(":not(:has(.hidden))").length;e.toggleClass("hidden",!t||!n)},onClose:function(){this.mediaActions.stopListening()},onPlayVersionClick:function(e){e.preventDefault(),d.a.trigger("show:modal",new v.a({model:this.model}))},onPlayAllClick:function(e){e.preventDefault(),f.a.execute("playMedia",{item:this.model})},onPlayShuffledClick:function(e){e.preventDefault(),f.a.execute("playMedia",{item:this.model,shuffle:!0})},onPlayPrimaryExtraClick:function(e){
e.preventDefault();var t=this.model.server.getSectionForItem(this.model);if(!s.a.isEmpty(t)){var n=new g.a({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:t.get("uuid")},{server:this.model.server,section:this.model.section});f.a.execute("playMedia",{item:n})}},onPlayNextClick:function(e){return e.preventDefault(),l()(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void f.a.execute("queueMedia",{item:this.model,next:!0})},onAddToQueueClick:function(e){return e.preventDefault(),
l()(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void f.a.execute("queueMedia",{item:this.model,next:!1})},onPlayMixClick:function(e){e.preventDefault();var t=this.model.get("related"),n=t.findWhere({browse:!1});n.set("type","track"),f.a.execute("playMedia",{item:n})},onAddToPlaylistClick:function(e){return e.preventDefault(),l()(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void d.a.trigger("show:modal",new b.a({model:this.model,items:this.mediaActions.getActionTargets(),
title:this.mediaActions.getActionTargetsTitle()}))},onRefreshClick:function(e){e.preventDefault(),f.a.execute("refreshMetadata",{items:this.mediaActions.getActionTargets()})},onMarkWatchedClick:function(e){e.preventDefault(),f.a.execute("markWatched",{item:this.model})},onMarkUnwatchedClick:function(e){e.preventDefault(),f.a.execute("markUnwatched",{item:this.model})},onSyncClick:function(e){e.preventDefault(),f.a.execute("showSyncModal",{item:this.model})},onConvertClick:function(e){e.preventDefault(),
d.a.trigger("show:modal",new I.a({item:this.model}))},onWatchLaterClick:function(e){e.preventDefault(),f.a.execute("watchLater",{item:this.model})},onShareClick:function(e){e.preventDefault(),d.a.trigger("show:modal",new S.a({model:this.model}))},onRecommendClick:function(e){e.preventDefault(),d.a.trigger("show:modal",new M.a({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),this.model.get("playlistType")?f.a.execute("deletePlaylist",{item:this.model}):f.a.execute("deleteItems",{
item:this.model,skipRedirect:!0})},onInfoClick:function(e){e.preventDefault(),d.a.trigger("show:modal",new w.a({model:this.model}))},onDownloadClick:function(e){this.model.get("Media").length>1&&(e.preventDefault(),d.a.trigger("show:modal",new y.a({model:this.model})))}});t.a=C},function(e,t,n){"use strict";var i=n(20),a=n(263),r=n(105),s=n(331),o=r.a.extend({background:!0,setup:function(e){this.model=e.model,e.noPlaceholder||(this.placeholderClass=s.a.playlist);var t=n.i(a.a)(),r={width:Math.round((e.width||e.height||256)*t),
height:Math.round((e.height||e.width||256)*t),rows:e.rows||2,cols:e.columns||2,border:e.border||0,media:e.media||"thumb",repeat:e.unique?0:1},o=this.model.get("composite");o&&(this.url=this.model.server.resolveUrl(i.join(o,r),{appendToken:!0}))}});t.a=o},function(e,t,n){"use strict";var i=n(2784),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(4),u=n(8),d=n(20),h=n(50),p=h.a.extend({name:"channelSettingsModal",className:"channel-settings-modal modal fade",template:a.a,ui:{submitBtn:".submit-btn"},events:s.a.extend({
"change input[name]":"onInputChange","change select[name]":"onInputChange","submit #channel-settings-form":"onSubmit"},h.a.prototype.events),initialize:function(){h.a.prototype.initialize.apply(this,arguments),this.changes={}},serializeData:function(){var e=this.model.get("title")||this.model.get("name");return{title:e?e:"Preferences...",settings:this.collection.toJSON()}},onInputChange:function(e){var t=e.currentTarget,n=t.value;"checkbox"===t.type&&(n=t.checked),this.changes[t.name]=n},onSubmit:function(e){
if(e.preventDefault(),s.a.isEmpty(this.changes))return void this.hide();var t=this.ui.submitBtn;if(!t.hasClass("active")){t.addClass("active");var i=this.collection.first(),a=i.getSaveParams(this.changes),r=s.a.result(this.collection,"url"),o=d.join([r,"/set"],a),h=l.a.ajax(i.server.getXHROptions(o));h.done(s.a.bind(function(){this.hide()},this)),h.fail(s.a.bind(function(){u.a.trigger("show:alert",{type:"error",message:n.i(c.default)("There was a problem saving these settings.")})},this)),h.always(function(){
t.removeClass("active")})}}});t.a=p},function(e,t,n){"use strict";var i=n(2853),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=c.a.ItemView.extend({className:"player-slider",template:a.a,dragging:!1,ui:{thumb:".player-slider-thumb",track:".player-slider-track",progress:".player-slider-progress"},events:{mousedown:"onMouseDown",touchstart:"onTouchStart"},onlyAfterRender:["displayValue"],initialize:function(e){s.a.bindAll(this,"onMouseMove","onMouseUp","onTouchMove","onTouchEnd"),this.$document=l()(document),
this.currentValue=e.value||0},startDragging:function(){this.dragging=!0,this.$el.addClass("active")},stopDragging:function(){this.dragging=!1,this.$el.removeClass("active"),this.triggerMethod("dragComplete")},updateForPosition:function(e,t){var n=this.getValueForPosition(e);this.setValue(n)&&this.displayValue(n,t)},getValueForPosition:function(e){var t=this.ui.track,n=e-t.offset().left,i=n/t.width();return i=Math.min(Math.max(i,0),1),i=Math.round(100*i)},setValue:function(e){return this.currentValue=e,
this.trigger("change:value",e),!0},displayValue:function(e,t){this.ui.thumb.css("left",e+"%"),this.ui.progress.css("width",e+"%"),this.$el.data("value",e)},onRender:function(){this.displayValue(this.currentValue)},onClose:function(){this.$document.off("mousemove",this.onMouseMove),this.$document.off("mouseup",this.onMouseUp),this.$document.off("touchmove",this.onTouchMove),this.$document.off("touchend",this.onTouchEnd)},onMouseDown:function(e){e.preventDefault(),this.$document.on("mousemove",this.onMouseMove),
this.$document.on("mouseup",this.onMouseUp),this.startDragging(),this.setValue(this.getValueForPosition(e.pageX))},onTouchStart:function(e){this.$document.on("touchmove",this.onTouchMove),this.$document.on("touchend",this.onTouchEnd),this.startDragging();var t=e.originalEvent.touches[0];t&&this.updateForPosition(t.pageX)},onMouseMove:function(e){e.preventDefault(),this.updateForPosition(e.pageX)},onTouchMove:function(e){e.preventDefault();var t=e.originalEvent.touches[0];t&&this.updateForPosition(t.pageX);
},onMouseUp:function(e){e.preventDefault(),this.$document.off("mousemove",this.onMouseMove),this.$document.off("mouseup",this.onMouseUp),this.updateForPosition(e.pageX),this.stopDragging()},onTouchEnd:function(e){this.$document.off("touchmove",this.onTouchMove),this.$document.off("touchend",this.onTouchEnd);var t=e.originalEvent.touches[0];t&&this.updateForPosition(t.pageX),this.stopDragging()}});t.a=u},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.kind,i=e.size,a=e.direction,s=e.isSelected;
return r()("div",{className:l()(t,d.a.disclosureArrow,d.a[a],d.a[n],d.a[i],s&&d.a.isSelected)})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(28)),l=n.n(o),c=n(23),u=n(2376),d=n.n(u);i.defaultProps={direction:c.f.DOWN,kind:c.c.DEFAULT,size:c.d.MEDIUM,isSelected:!1},t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=n.n(v),b=n(28),S=n.n(b),w=n(33),M=n(25),I=n(272),C=n(26),D=n(2382),T=n.n(D),x=function(e){
function t(n,i){u()(this,t);var a=h()(this,e.call(this,n,i));return a.onMouseDown=function(e){e.preventDefault(),0===e.button&&a._startDrag(e.pageX)},a.onTouchStart=function(e){e.preventDefault();var t=m.a.first(e.touches);t&&a._startDrag(t.pageX,!0)},a.onMouseMove=function(e){a._drag(e.pageX)},a.onTouchMove=function(e){var t=m.a.first(e.touches);t&&a._drag(t.pageX)},a.onMouseUp=function(e){a._stopDrag(e.pageX)},a.onTouchEnd=function(e){var t=m.a.first(e.changedTouches);t&&a._stopDrag(t.pageX)},a.state={
isDragging:!1},a}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(M.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this._stopListeningForDrag()},t.prototype._listenForDrag=function(e){e?(document.addEventListener("touchmove",this.onTouchMove),document.addEventListener("touchcancel",this.onTouchEnd),document.addEventListener("touchend",this.onTouchEnd)):(document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp));
},t.prototype._stopListeningForDrag=function(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("touchcancel",this.onTouchEnd),document.removeEventListener("touchend",this.onTouchEnd)},t.prototype._startDrag=function(e,t){document.body.classList.add(T.a.isDragging),this.setState({isDragging:!0}),this._changeValue(this._getValueForPosition(e)),this._listenForDrag(t),
this.props.onDragStart&&this.props.onDragStart()},t.prototype._drag=function(e){this._changeValue(this._getValueForPosition(e))},t.prototype._stopDrag=function(e){document.body.classList.remove(T.a.isDragging),this._stopListeningForDrag();var t=this._getValueForPosition(e),n=this._getSteppedValue(t);this._changeValue(t),this.setState({isDragging:!1}),this.props.onDragComplete&&this.props.onDragComplete({positionValue:t,steppedValue:n})},t.prototype._getValueForPosition=function(e){var t=this.props,i=t.min,a=t.max;
n.i(w.a)(a>i,"The max, "+a+", must be greater than the min, "+i);var r=this.refs.track,s=r.getBoundingClientRect(),o=s.left+document.body.scrollLeft,l=e-o,c=l/r.offsetWidth;return c=Math.min(Math.max(c,0),1),(a-i)*c+i},t.prototype._getSteppedValue=function(e){var t=this.props,i=t.min,a=t.max,r=t.stepSize;if(!r)return e;n.i(w.a)(r>=1,"The step size, "+r+", must be greater or equal to 1");var s=Math.round(e/r)*r;return Math.min(Math.max(s,i),a)},t.prototype._getStickyValue=function(e){var t=this.props,n=t.max,i=t.min,a=t.stepSize,r=t.stickiness;
if(!a||!r)return e;var s=this._getSteppedValue(e),o=Math.abs(s-e)/(n-i);return o<r/100?s:e},t.prototype._changeValue=function(e){e!==this.props.value&&this.props.onChange({positionValue:e,steppedValue:this._getSteppedValue(e)})},t.prototype._getPercent=function(e,t,n){return(e-t)/(n-t)*100},t.prototype.render=function(){var e=this.props,t=e.className,i=e.trackClassName,r=e.fillClassName,o=e.thumbClassName,c=e.label,u=e.value,d=e.min,h=e.max,p=e.showFill,f=e.autoHideThumb,g=e.onMouseDown,m=e.onTouchStart,v=l()(e,["className","trackClassName","fillClassName","thumbClassName","label","value","min","max","showFill","autoHideThumb","onMouseDown","onTouchStart"]),b=this.state.isDragging,w=this._getPercent(this._getStickyValue(u),d,h);
return y.a.createElement("div",a()({className:S()(t,b&&T.a.isDragging,f&&T.a.hasAutoHideThumb),onMouseDown:n.i(I.a)(this.onMouseDown,g),onTouchStart:n.i(I.a)(this.onTouchStart,m)},v),y.a.createElement("div",{ref:"track",className:i},p&&s()("div",{className:r,style:{width:w+"%"}})),s()(C.a,{className:o,style:{left:w+"%"},"aria-role":"slider","aria-labelledby":c,"aria-valuemin":d,"aria-valuemax":h,"aria-valuenow":u}))},t}(v.Component);x.defaultProps={className:T.a.slider,trackClassName:T.a.track,fillClassName:T.a.fill,
thumbClassName:T.a.thumb,min:0,max:100,stepSize:0,stickiness:10,showFill:!1,autoHideThumb:!1},t.a=x},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=(n(23),n(26)),y=n(357),b=n(2386),S=n.n(b),w=function(e){function t(){return u()(this,t),h()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.arrowClassName,i=e.children,r=e.direction,o=e.isSelected,c=l()(e,["className","arrowClassName","children","direction","isSelected"]);
return m.a.createElement(v.a,a()({className:t,"aria-haspopup":!0,isSelected:o},c),i,s()(y.a,{className:n,direction:r,isSelected:o}))},t}(g.Component);w.defaultProps={className:S.a.button,isSelected:!0},t.a=w},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.selectedClassName,a=e.circleClassName,s=e.iconClassName,l=e.title,u=e.isSelected,h=c()(e,["className","selectedClassName","circleClassName","iconClassName","title","isSelected"]);return d.a.createElement(m.a,r()({className:p()(t,u&&i),
"aria-label":u?n.i(f.default)("Deselect {title}",{title:l}):n.i(f.default)("Select {title}",{title:l})},h),o()("div",{className:a},void 0,o()(g.a,{name:"plex-icon-selected-560",className:s})))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(28),p=n.n(h),f=n(4),g=n(30),m=n(26),v=n(2390),y=n.n(v);i.defaultProps={className:y.a.selectButton,selectedClassName:y.a.isSelected,circleClassName:y.a.selectCircle,iconClassName:y.a.selectedIcon},t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.children,n=e.className,i=o()(e,["children","className"]);return c.a.createElement("p",r()({},i,{className:n}),t)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(2394),d=n.n(u);i.defaultProps={className:d.a.help},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.component,a=e.width,s=e.height,l=e.url,u=c()(e,["className","children","component","width","height","url"]);return o()("div",{className:t,style:{width:a,height:s}},void 0,d.a.createElement(i,r()({
width:a,height:s,url:l},u)),n)}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(2401),p=n.n(h);i.defaultProps={className:p.a.card},t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(17),s=n.n(r),o=n(7),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(25),y=n(1316),b=(n(471),n(130)),S=n(469),w=n(70),M=n(23),I=n(2403),C=n.n(I),D=function(e){function t(n,i){u()(this,t);var a=h()(this,e.call(this,n,i));return a.onScrollPositionChange=function(e){
var t=e.scrollTop,n=e.scrollLeft;a.setState({scrollTop:t,scrollLeft:n})},a.onListUpdate=function(e){var t=e.visibleStartIndex,n=a.props,i=n.scrollIndex,r=n.onListScrollIndexChange,s=n.onListUpdate;a._currentScrollIndex=t,a.state.isRestoringScrollPosition&&a.setState({isRestoringScrollPosition:!1}),r&&i!==t&&r(t),s&&s(e)},a.onMeasure=function(e){var t=e.width,n=e.height,i=a.props.onMeasure;a.setState({isMeasured:!0,width:t,height:n}),i&&i(e)},a.state={isRestoringScrollPosition:!1,isMeasured:!1,width:null,
height:null,scrollTop:0,scrollLeft:0},a._currentScrollIndex=0,n.scrollPositionStorageKey&&(a._scrollPositionKey=y.a.getPageKey()+"!scrollPosition!"+n.scrollPositionStorageKey),a}return f()(t,e),t.prototype.componentWillMount=function(){this.props.scrollIndex||this._restoreScrollPosition()},t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.componentDidUpdate=function(e,t){var n=this.props.scrollIndex,i=this.state.isMeasured,a=i&&!t.isMeasured&&n>0,r=n!==e.scrollIndex;
(a||r)&&this._scrollToIndex(n)},t.prototype.componentWillUnmount=function(){this._scrollPositionKey&&y.a.set(this._scrollPositionKey,{scrollTop:this.state.scrollTop,scrollLeft:this.state.scrollLeft})},t.prototype._restoreScrollPosition=function(){if(this._scrollPositionKey){var e=y.a.get(this._scrollPositionKey);e&&this.setState(l()({isRestoringScrollPosition:!0},e))}},t.prototype._scrollToIndex=function(e){if(null!=e&&e!==this._currentScrollIndex){var t=this.props.layout,n=t.options,i=t.getPositionForIndex,a=i(Math.max(e,0)),r=n.outerPaddingTop||0,s=n.outerPaddingLeft||0,o=this.props.scrollDirection===M.a.VERTICAL?0:a.cellX-s,l=this.props.scrollDirection===M.a.HORIZONTAL?0:a.cellY-r;
this.setState({scrollLeft:o,scrollTop:l})}},t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,i=e.scrollerClassName,r=e.ignoreWidth,o=e.ignoreHeight,c=e.scrollDirection,u=(e.scrollIndex,e.scrollPositionStorageKey,e.onListUpdate,e.onMeasure,s()(e,["className","children","scrollerClassName","ignoreWidth","ignoreHeight","scrollDirection","scrollIndex","scrollPositionStorageKey","onListUpdate","onMeasure"])),d=this.state,h=d.isMeasured,p=d.isRestoringScrollPosition,f=d.width,g=d.height,v=d.scrollTop,y=d.scrollLeft;
return a()(b.a,{className:t,ignoreWidth:r,ignoreHeight:o,ignorePosition:!0,onMeasure:this.onMeasure},void 0,h&&a()(w.a,{className:i,smoothScroll:!p,scrollDirection:c,scrollTop:v,scrollLeft:y,enableChildrenProps:!0,onScrollPositionChange:this.onScrollPositionChange},void 0,m.a.createElement(S.a,l()({viewportWidth:f,viewportHeight:g,skipRenderCells:p,onListUpdate:this.onListUpdate},u)),n))},t}(g.Component);D.defaultProps={scrollDirection:M.a.VERTICAL,scrollerClassName:C.a.scroller},t.a=D},function(e,t,n){
"use strict";function i(){return n.i(b.createSelector)(function(e,t){var n=t.columnAdjustment;return n},n.i(w.a)(),M.a,function(e,t,n){var i=g.a.pick(t,"totalSize","populatedRange","allowSync","isPending","isPopulated","error","firstItemType","isFirstItemLibraryItem");return p()({columnAdjustment:e||n.columnAdjustment,metadataItemEntityIDs:t.metadataItems},i)})}var a=n(17),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(7),p=n.n(h),f=n(2),g=n.n(f),m=n(1),v=n.n(m),y=n(15),b=n(9),S=(n.n(b),
n(35)),w=n(322),M=n(157),I=n(133),C=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onPageRequest=function(e){var t=i.props,n=t.metadataListEntityID,a=t.populateMetadataListRange;a(p()({metadataListEntityID:n},e))},a=n,c()(i,a)}return d()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){var t=e.metadataListEntityID;
t!==this.props.metadataListEntityID&&this._populate(e)},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.metadataListEntityID,n=e.shouldResetOnUnmount;this.props.deselectAllMetadataListItems({metadataListEntityID:t}),n&&this.props.resetMetadataList({metadataListEntityID:t})},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;e.initialSize&&n.i(S.a)(function(){e.populateMetadataListRange({metadataListEntityID:e.metadataListEntityID,
startIndex:0,endIndex:e.initialSize})})},t.prototype.render=function(){var e=this.props,t=e.component,n=(e.populateMetadataListRange,r()(e,["component","populateMetadataListRange"]));return v.a.createElement(t,p()({onPageRequest:this.onPageRequest},n))},t}(m.Component);C.defaultProps={shouldResetOnUnmount:!1},t.a=n.i(y.b)(i,I)(C)},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(n.i(c.a)(),u.a,d.a,function(e,t,i){return n.i(f.d)(t,i,e)})}function a(e,t){var n={serverEntityID:t.serverEntityID,
metadataItemEntityID:t.metadataItemEntityID};return{onPlayPress:function(){e(h.playMetadataItem(n)),t.onPress()},onPlayVersionPress:function(){e(h.playMetadataItemVersion(n)),t.onPress()},onPlayAllPress:function(){e(h.playMetadataItemAll(n)),t.onPress()},onShufflePress:function(){e(h.shuffleMetadataItem(n)),t.onPress()},onPlayNextPress:function(){e(h.playMetadataItemNext(n)),t.onPress()},onAddToQueuePress:function(){e(h.addMetadataItemToQueue(n)),t.onPress()},onPlayPlexMixPress:function(){e(h.playRelatedMix(n)),
t.onPress()},onPlayPrimaryExtraPress:function(){e(h.playPrimaryExtra(n)),t.onPress()},onAddToPlaylistPress:function(){e(h.addMetadataItemToPlaylist(n)),t.onPress()},onMarkWatchedPress:function(){e(h.markMetadataItemWatched(n)),t.onPress()},onMarkUnwatchedPress:function(){e(h.markMetadataItemUnwatched(n)),t.onPress()},onEditPress:function(){e(h.editMetadataItem(n)),t.onPress()},onRefreshPress:function(){e(h.refreshMetadataItem(n)),t.onPress()},onAnalyzePress:function(){e(h.analyzeMetadataItem(n)),
t.onPress()},onFixMatchPress:function(){e(h.fixMetadataItemMatch(n)),t.onPress()},onUnmatchPress:function(){e(h.unmatchMetadataItem(n)),t.onPress()},onSplitApartPress:function(){e(h.splitMetadataItemApart(n)),t.onPress()},onSyncPress:function(){e(h.syncMetadataItem(n)),t.onPress()},onOptimizePress:function(){e(h.optimizeMetadataItem(n)),t.onPress()},onDownloadVersionPress:function(){e(h.downloadMetadataItemVersion(n)),t.onPress()},onWatchLaterPress:function(){e(h.watchMetadataItemLater(n)),t.onPress();
},onSharePress:function(){e(h.shareMetadataItem(n)),t.onPress()},onRecommendPress:function(){e(h.recommendMetadataItem(n)),t.onPress()},onDeletePress:function(){e(h.deleteMetadataItem(s()({},n,{skipRedirect:!0}))),t.onPress()},onDeleteVersionPress:function(){e(h.deleteMetadataItemVersion(n)),t.onPress()},onGetInfoPress:function(){e(h.getMetadataItemInfo(n)),t.onPress()}}}var r=n(7),s=n.n(r),o=n(15),l=n(9),c=(n.n(l),n(29)),u=n(58),d=n(62),h=n(113),p=n(301),f=n(233),g=n(1911);t.a=n.i(o.b)(i,a,p.a)(g.a);
},function(e,t,n){"use strict";function i(e){switch(e){case"movie":return[f.a];case"show":return[f.a];case"episode":return[g.a,m.a];case"playlist":return[f.a];default:return[f.a]}}function a(e){var t=e.serverEntityID,a=e.target,r=e.useStaticHeight,o=e.children,c=a.type,f=a.thumb,g=a.grandparentThumb,m="playlist"===c?"show":c;return l()("div",{className:S.a.container},void 0,l()("div",{className:S.a.left},void 0,l()(h.a,{serverEntityID:t,component:p.a,type:m,width:w,height:n.i(d.a)(w,m),url:g||f},void 0,l()("div",{
className:S.a.subscriptionBadge},void 0,l()(v.a,{type:c})))),l()("div",{className:S.a.right},void 0,l()("div",{className:r?S.a.staticHeightTitleContainer:S.a.titleContainer},void 0,i(c).map(function(e,t){return u.a.createElement(y.a,s()({key:t,component:e,isSecondary:t>0},a))})),o))}var r=n(7),s=n.n(r),o=n(3),l=n.n(o),c=n(1),u=n.n(c),d=n(202),h=n(362),p=n(368),f=n(369),g=n(512),m=n(517),v=n(508),y=n(1927),b=n(2459),S=n.n(b),w=130;a.defaultProps={useStaticHeight:!1},t.a=a},function(e,t,n){"use strict";
var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(28),y=n.n(v),b=n(25),S=n(155),w=n(166),M=n.n(w),I=n(1931),C=n(2462),D=n.n(C),T="faceFront",x="faceBack",P=n.i(S.a)(M.a.posterFlipSpeed),E={transitionName:{appear:"appear",enter:"enter",leave:"leave"},transitionAppear:!0,transitionAppearTimeout:0,transitionEnterTimeout:0,transitionLeaveTimeout:0},A=function(e){function t(n,i){u()(this,t);var a=h()(this,e.call(this,n,i));return a.onImageLoad=function(){
a.state.isLoadingFace&&a._flipCard()},a.onImageError=function(){a.state.isLoadingFace&&a._flipCard()},a.onFlipComplete=function(){a.setState({isFlippingFace:!1,previousImageUrl:null})},a.state={visibleFace:T,isLoadingFace:!1,isFlippingFace:!1,previousImageUrl:null},a}return f()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.props.imageUrl,n=e.imageUrl&&t!==e.imageUrl,i=this.props.metadataKey===e.metadataKey;i&&n&&this._prepareFlip(t)},t.prototype.shouldComponentUpdate=function(e,t){
return n.i(b.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this._cancelFlip()},t.prototype._prepareFlip=function(e){this._cancelFlip(),this.setState({isLoadingFace:!0,isFlippingFace:!0,previousImageUrl:e})},t.prototype._flipCard=function(){this.setState({isLoadingFace:!1,visibleFace:this._getInverseFace(this.state.visibleFace)}),this._flipTimeoutID=setTimeout(this.onFlipComplete,P)},t.prototype._cancelFlip=function(){this._flipTimeoutID&&(this._flipTimeoutID=clearTimeout(this._flipTimeoutID));
},t.prototype._getInverseFace=function(e){return e===T?x:T},t.prototype.render=function(){var e=this.props,t=e.metadataKey,n=e.imageWidth,i=e.imageHeight,r=e.imageUrl,o=l()(e,["metadataKey","imageWidth","imageHeight","imageUrl"]),c=this.state,u=c.visibleFace,d=c.isLoadingFace,h=c.isFlippingFace,p=c.previousImageUrl,f=this._getInverseFace(u),g={width:n,height:i};return s()("div",{className:D.a.cardContainer,"data-qa-id":"metadataPosterCard--"+t},t,s()("div",{className:y()(D.a.card,u===x&&D.a.isFlipped),
style:g},void 0,m.a.createElement(I.a,a()({key:u,visibleFace:u,imageWidth:n,imageHeight:i,imageUrl:d?p:r,imageTransitionProps:h?E:void 0,onImageLoad:this.onImageLoad,onImageError:this.onImageError},o)),h&&m.a.createElement(I.a,a()({key:f,visibleFace:f,imageWidth:n,imageHeight:i,imageUrl:d?r:p,imageTransitionProps:h?E:void 0,onImageLoad:this.onImageLoad,onImageError:this.onImageError},o))))},t}(g.Component);t.a=A},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.type,i=e.isOffscreen,a=e.url,s=e.width,c=e.height,u=e.transitionProps,d=e.onLoad,h=e.onError;
return i?null:a?r()(o.a,{serverEntityID:t,url:a,width:s,height:c,backgroundPosition:"artist"===n?"center top":"center",transitionProps:u,onLoad:d,onError:h}):r()(l.a,{type:n,width:s,height:c})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(821)),l=n(838);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.title;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{title:e.title}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(369);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{year:e.year}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(855);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(25),y=n(30),b=n(228),S=function(e){
function t(){return u()(this,t),h()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.icon,i=e.label,r=e.isMenuOpen,o=l()(e,["children","icon","label","isMenuOpen"]);return m.a.createElement(b.a,a()({"aria-haspopup":!0,tooltip:r?void 0:i,hideOnPress:!1},o),s()(y.a,{name:n,"aria-label":i}),t)},t}(g.Component);t.a=S},function(e,t,n){"use strict";function i(e){var t=e.machineIdentifier,i=e.providerIdentifier,a=e.isLibraryProvider,s=e.directories,l=e.selectedDirectory,p=o()(e,["machineIdentifier","providerIdentifier","isLibraryProvider","directories","selectedDirectory"]),f=l&&(l.hubKey||l.key),g=encodeURIComponent(t),m=encodeURIComponent(i);
return c.a.createElement(d.a,p,s&&s.map(function(e){var t=e.key,i=e.hubKey,s=e.title,o=e.isHomeDirectory;if(a&&!i)return null;var l=i||t,c=encodeURIComponent(l),d=a?"#!/server/"+g+"/dashboard?key="+c:"#!/server/"+g+"/provider/"+m+"?key="+c;return r()(h.a,{"data-qa-id":"directoriesMenuItem--"+l,to:d,isSelected:f===l},l,o?n.i(u.default)("All Libraries"):s)}))}var a=n(3),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(73),h=n(116);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;
return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2516)),l=n.n(o);i.defaultProps={className:l.a.leftTitle},t.a=i},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(c.a,u.a,d.a,h.a,function(e,t,i,a){var r=t.activeSelectionItems,o=t.activeSelectionType,l=r.map(function(t){return s()({},t,{model:e[t.model]})}),c=n.i(f.a)(i,a,l,o);return s()({activeSelectionItems:l,activeSelectionType:o},c)})}function a(e){return{onPlaySelectedPress:function(){e(p.a());
},onShufflePress:function(){e(p.b())},onAddToPlaylistPress:function(){e(p.c())},onMarkWatchedConfirm:function(){e(p.d())},onMarkUnwatchedConfirm:function(){e(p.e())},onEditPress:function(){e(p.f())},onRefreshPress:function(){e(p.g())},onAnalyzePress:function(){e(p.h())},onMergePress:function(){e(p.i())},onSyncPress:function(){e(p.j())},onOptimizePress:function(){e(p.k())},onDeleteConfirm:function(){e(p.l())},onDeselectAllPress:function(){e(p.m())}}}var r=n(7),s=n.n(r),o=n(15),l=n(9),c=(n.n(l),n(323)),u=n(136),d=n(58),h=n(62),p=n(479),f=n(2206),g=n(2157);
t.a=n.i(o.b)(i,a)(g.a)},function(e,t,n){"use strict";function i(e,t){return function(n){return o.a.createElement(t,r()({},e,n))}}var a=n(7),r=n.n(a),s=n(1),o=n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){return e.thumb||e.parentThumb||e.grandparentThumb}function a(e){return e.art||e.parentArt||e.grandparentArt}function r(e,t,n){if(n)switch(n){case o.a:switch(e){case"season":return t.thumb;case"episode":return t.thumb;case"album":return t.thumb;case"track":return t.thumb}break;case o.b:
switch(e){case"movie":return a(t);case"episode":return a(t)||t.thumb}}switch(e){case"movie":return t.thumb;case"show":return t.thumb;case"season":return i(t);case"episode":return t.grandparentThumb;case"artist":return t.thumb;case"album":return i(t);case"track":return i(t);case"photo":return t.thumb;case"photoalbum":return t.thumb;case"clip":return t.thumb;case"playlist":return t.composite;default:return t.thumb}}function s(e,t,i,a,s){var o=null==e?n.i(l.b)(t,i,s):e,c=null==t?n.i(l.a)(e,i,s):t,u=r(i,a,s);
return{url:u,width:o,height:c}}var o=n(48),l=n(202);t.a=s},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var i=n(378);e.exports=function(e){return Object(i(e))}},function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36));
}},,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.publishSource,i=void 0===n||n,a=t.clientOffset,r=void 0===a?null:a,s=t.getSourceClientOffset;h.default(f.default(e),"Expected sourceIds to be an array.");var o=this.getMonitor(),l=this.getRegistry();h.default(!o.isDragging(),"Cannot call beginDrag while dragging.");for(var c=0;c<e.length;c++)h.default(l.getSource(e[c]),"Expected sourceIds to be registered.");
for(var u=null,c=e.length-1;c>=0;c--)if(o.canDragSource(e[c])){u=e[c];break}if(null!==u){var d=null;r&&(h.default("function"==typeof s,"When clientOffset is provided, getSourceClientOffset must be a function."),d=s(u));var p=l.getSource(u),g=p.beginDrag(o,u);h.default(m.default(g),"Item must be an object."),l.pinSource(u);var y=l.getSourceType(u);return{type:v,itemType:y,item:g,sourceId:u,clientOffset:r,sourceClientOffset:d,isSourcePublic:i}}}function r(e){var t=this.getMonitor();if(t.isDragging())return{
type:y}}function s(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.clientOffset,i=void 0===n?null:n;h.default(f.default(e),"Expected targetIds to be an array."),e=e.slice(0);var a=this.getMonitor(),r=this.getRegistry();h.default(a.isDragging(),"Cannot call hover while not dragging."),h.default(!a.didDrop(),"Cannot call hover after drop.");for(var s=0;s<e.length;s++){var o=e[s];h.default(e.lastIndexOf(o)===s,"Expected targetIds to be unique in the passed array.");var l=r.getTarget(o);
h.default(l,"Expected targetIds to be registered.")}for(var c=a.getItemType(),s=e.length-1;s>=0;s--){var o=e[s],d=r.getTargetType(o);u.default(d,c)||e.splice(s,1)}for(var s=0;s<e.length;s++){var o=e[s],l=r.getTarget(o);l.hover(a,o)}return{type:b,targetIds:e,clientOffset:i}}function o(){var e=this,t=this.getMonitor(),n=this.getRegistry();h.default(t.isDragging(),"Cannot call drop while not dragging."),h.default(!t.didDrop(),"Cannot call drop twice during one drag operation.");var i=t.getTargetIds().filter(t.canDropOnTarget,t);
i.reverse(),i.forEach(function(i,a){var r=n.getTarget(i),s=r.drop(t,i);h.default("undefined"==typeof s||m.default(s),"Drop result must either be an object or undefined."),"undefined"==typeof s&&(s=0===a?{}:t.getDropResult()),e.store.dispatch({type:S,dropResult:s})})}function l(){var e=this.getMonitor(),t=this.getRegistry();h.default(e.isDragging(),"Cannot call endDrag while not dragging.");var n=e.getSourceId(),i=t.getSource(n,!0);return i.endDrag(e,n),t.unpinSource(),{type:w}}t.__esModule=!0,t.beginDrag=a,
t.publishDragSource=r,t.hover=s,t.drop=o,t.endDrag=l;var c=n(927),u=i(c),d=n(87),h=i(d),p=n(306),f=i(p),g=n(578),m=i(g),v="dnd-core/BEGIN_DRAG";t.BEGIN_DRAG=v;var y="dnd-core/PUBLISH_DRAG_SOURCE";t.PUBLISH_DRAG_SOURCE=y;var b="dnd-core/HOVER";t.HOVER=b;var S="dnd-core/DROP";t.DROP=S;var w="dnd-core/END_DRAG";t.END_DRAG=w},function(e,t,n){"use strict";function i(e){return{type:o,sourceId:e}}function a(e){return{type:l,targetId:e}}function r(e){return{type:c,sourceId:e}}function s(e){return{type:u,
targetId:e}}t.__esModule=!0,t.addSource=i,t.addTarget=a,t.removeSource=r,t.removeTarget=s;var o="dnd-core/ADD_SOURCE";t.ADD_SOURCE=o;var l="dnd-core/ADD_TARGET";t.ADD_TARGET=l;var c="dnd-core/REMOVE_SOURCE";t.REMOVE_SOURCE=c;var u="dnd-core/REMOVE_TARGET";t.REMOVE_TARGET=u},function(e,t,n){function i(e,t){for(var n=e.length;n--;)if(a(e[n][0],t))return n;return-1}var a=n(2353);e.exports=i},function(e,t,n){function i(e,t){var n=e.__data__;return a(t)?n["string"==typeof t?"string":"hash"]:n.map}var a=n(2332);
e.exports=i},function(e,t,n){function i(e,t){var n=r(e,t);return a(n)?n:void 0}var a=n(2315),r=n(2325);e.exports=i},function(e,t,n){var i=n(392),a=i(Object,"create");e.exports=a},function(e,t,n){var i=n(2323),a="object"==typeof self&&self&&self.Object===Object&&self,r=i||a||Function("return this")();e.exports=r},,,function(e,t,n){function i(e,t){for(var n=e.length;n--;)if(a(e[n][0],t))return n;return-1}var a=n(402);e.exports=i},function(e,t,n){function i(e,t){return s(r(e,t,a),e+"")}var a=n(966),r=n(2981),s=n(2984);
e.exports=i},function(e,t,n){function i(e,t){var n=e.__data__;return a(t)?n["string"==typeof t?"string":"hash"]:n.map}var a=n(2965);e.exports=i},function(e,t,n){function i(e,t){var n=r(e,t);return a(n)?n:void 0}var a=n(2945),r=n(2957);e.exports=i},function(e,t,n){var i=n(400),a=i(Object,"create");e.exports=a},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t){function n(e){
return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";function i(e,t){}t.__esModule=!0,t.default=i,e.exports=t.default},,,,,,,,,,function(e,t,n){"use strict";var i=n(111),a=i.a.extend({interface:["publish","subscribe","unsubscribe","registerPlayer","unregisterPlayer","getDeepLink"]});t.a=new a},function(e,t,n){"use strict";var i=n(111),a=new i.a({interface:["init","enable","disable","set","capture"]});t.a=a},function(e,t,n){"use strict";var i=n(111),a=new i.a({props:["shortcuts"]
});t.a=a},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(34),s=n(27),o=r.a.extend({getStorage:function(){},get:function(e){var t=this;return this._catchStorageError(function(n){var i=window.PLEXWEB,a=i&&e in i?i[e]:n.getItem(e);if(null==a)throw new Error(e+" is not in "+t.name);return a})},set:function(e,t){var n=this;return this._catchStorageError(function(i){if(!e)throw new Error("Unable to set value in "+n.name+" without a key");if(null==t)throw new Error("Unable to set null or undefined value for "+e+" in "+n.name+". Use the remove function.");
return i.setItem(e,t)})},remove:function(e){return this._catchStorageError(function(t){return t.removeItem(e)})},clear:function(){return this._catchStorageError(function(e){return e.clear()})},_catchStorageError:function(e){var t=a.a.Deferred();try{t.resolve(e(this.getStorage()))}catch(e){s.a.warn(e.message),t.reject(e)}return t.promise()}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(14),l=n(39),c=n(718),u=n(716),d=n(717),h=n(1143),p={playbackDuration:0,modelDefaults:function(){
var e=a.a.omit(a.a.result(this.model,"defaults"),["playQueueItem","metadataItem","playQueue","transcodeServer","state","stopped","paused","playing","buffering","error","volume","shuffled","repeatAll","repeatItem","slideshowState","slideshowPlaying","slideshowPaused"]),t=this.model.get("playQueue"),n=!!this.previousItem,i=!!this.nextItem&&!this.currentItem.get("isAdvertisement");return this.webRadioUsage&&i&&(i=this.webRadioUsage.get("canSkipNext")),a.a.extend(e,{playQueueItem:this.currentItem,metadataItem:this.currentItem.get("metadataItem"),
type:this.type,canRepeat:!0,canSkipPrevious:n,canSkipNext:i,canShuffle:!t.get("hasUpNext"),shuffled:t.get("shuffled")})},modelOverrides:function(){var e={};this.webRadioUsage&&!this.webRadioUsage.get("canSkipNext")&&(e.canSkipNext=!1);var t=this.model.get("playQueue");t&&t.get("isRadio")&&(t.get("allowSeek")||(e.canSeek=!1),t.get("allowRepeat")||(e.canRepeat=!1,e.showPlayQueue=!1),t.get("allowShuffle")||(e.canShuffle=!1,e.showPlayQueue=!1),t.get("allowSkipPrevious")||(e.canSkipPrevious=!1,e.showPlayQueue=!1));
var n=this.currentItem.get("advertisement");return n&&(e.canSkipPrevious=!1,e.canSkipNext=!1,e.canSeek=!1,e.showPlayQueue=!1),this.currentItem.server.get("transcoderLyrics")||(e.showLyrics=!1),e},initialize:function(e){this.stoppedSessions={},this.stop=a.a.wrap(this.stop,a.a.bind(function(e){return!this.model||this.model.get("stopped")?s.a.Deferred().resolve().promise():e.apply(this,[].slice.call(arguments,1))},this)),this.seekBackward=this.seek.bind(this,-1e4,0,0),this.seekForward=this.seek.bind(this,3e4,0,3e3),
this.timeline=this.timeline.bind(this)},request:function(e){return this.pendingRequests||(this.pendingRequests=[]),this.pendingRequests.push(e),e.always(a.a.bind(function(){var t=a.a.indexOf(this.pendingRequests,e);this.pendingRequests.splice(t,1)},this)),e},waitForRequests:function(){return s.a.when.apply(s.a,this.pendingRequests)},reset:function(e){this.currentItem&&(this.timeline({state:l.a.states.STOPPED,continuing:!0}),this.stopTimeline(),this.stopSession({continuing:!0})),this.currentItem=e,
this.previousItem=this.getPreviousItem(e),this.nextItem=this.getNextItem(e),this.setRadioPolicy();var t=a.a.extend(a.a.result(this,"modelDefaults"),this.modelOverrides());return this.model.set(t),e},getItemAtOffset:function(e,t,n){if(t||(t=this.model.get("playQueueItem")),!t||!t.get("ratingKey"))return null;n||(n={});var i=this.model.get("playQueue").get("collection"),a=i.indexOf(i.get(t.id)),r=a+e,s=n.loop&&i.length>1||this.model.get("repeatAll");return r>=0&&r<i.length?i.at(r):s?(r=(r+i.length)%i.length,
i.at(r)):null},getPreviousItem:function(e,t){return this.getItemAtOffset(-1,e,t)},getNextItem:function(e,t){return this.getItemAtOffset(1,e,t)},mirror:function(){},play:function(){},pause:function(){},playPause:function(){this.model.get("state")===l.a.states.PAUSED?this.play():this.pause()},setPosition:function(e,t){},canSeek:function(e){return!!this.model.get("canSeek")&&(e!==this.model.get("position")&&e<=this.model.get("duration")&&e>=0)},seek:function(e,t,n,i){var a=this.model.get("position")+e,r=0+(t>=0?t:0),s=this.model.get("duration")-(n>=0?n:0);
a=Math.max(r,Math.min(a,s)),this.setPosition(a,i)},setVolume:function(e){},decreaseVolume:function(e){var t=this.model.get("volume");e=e||10,this.setVolume(Math.round(Math.max(t-e,0)))},increaseVolume:function(e){var t=this.model.get("volume");e=e||10,this.setVolume(Math.round(Math.min(t+e,100)))},skipPrevious:function(){return!!this.model.get("canSkipPrevious")&&(!!this.previousItem&&this.reset(this.previousItem))},skipNext:function(e){if(!e||!e.organic){if(!this.model.get("canSkipNext"))return!1;
this.webRadioUsage&&!this.currentItem.get("advertisement")&&this.webRadioUsage.registerSkip()}if(!this.nextItem)return!1;var t=this.model.get("playQueue");if(t&&t.get("isRadio")){var n=this.nextItem,i=this.getNextItem(n),a=i&&this.getNextItem(i);i&&a||this.refreshPlayQueue()}return this.reset(this.nextItem)},skipTo:function(e){var t=this.model.get("playQueueItem");if(t&&t.get("key")===e)return!1;var n=this.model.get("playQueue"),i=n.get("collection"),a=i.findWhere({key:e});return this.reset(a)},toggleShuffle:function(){
var e=this.model.get("playQueue");this.model.get("canShuffle")&&e.toggleShuffle()},nextRepeat:function(){var e=this.model.get("playQueue");if(this.model.get("canRepeat")){var t=!this.model.get("repeatAll")&&!this.model.get("repeatItem"),n=this.model.get("repeatAll")&&!this.model.get("repeatItem");e.setRepeatAll(t).done(a.a.bind(function(){this.model.set({repeatAll:t,repeatItem:n})},this))}},removeItem:function(e){return this.model.get("playQueue").removeItem(e)},moveItem:function(e,t){return this.model.get("playQueue").moveItem(e,t);
},refreshPlayQueue:function(){var e=this.model.get("playQueue");e.fetch()},stop:function(e){this._fadeInterval&&clearInterval(this._fadeInterval),e&&e.silent||this.model.set("state",l.a.states.STOPPED);var t=this.model.get("metadataItem"),n=t.server.get("playQueueManager");if(n){var i=this.model.get("playQueue"),a=n.getFor(t);a&&i&&a===i&&n.remove(i.get("mediaType"))}this.stopListening(),this.webRadioUsage&&(this.stopListening(this.webRadioUsage),this.webRadioUsage.stop())},hardStop:function(){this.stop({
async:!1,timeout:2e3})},fadeOut:function(){this._fadeInterval&&clearInterval(this._fadeInterval),this._fadeInterval=setInterval(a.a.bind(function(){var e=this.model.get("volume");e<=0?this.stop():this.decreaseVolume(5)},this),50)},timeline:function(e){var t=this;e||(e={});var i=this.model;if(a.a.defaults(e,i.attributes),this.companion||!e.metadataItem)return s.a.Deferred().resolve().promise();var r=i.get("metadataItem");return this.request(n.i(c.a)(e)).done(function(e){var n=t.model.get("metadataItem");
r&&n&&r.get("key")!==n.get("key")||i.get("state")!==l.a.states.STOPPED&&e.terminationCode&&i.set({state:l.a.states.ERROR,terminationCode:e.terminationCode,errorMessage:e.terminationText})})},startTimeline:function(){this.companion||this.serverTimelineInterval||(this.serverTimelineInterval=setInterval(this.timeline,c.a.DELAY))},stopTimeline:function(){this.serverTimelineInterval=clearInterval(this.serverTimelineInterval),this.trackPlaybackEvent()},updatePlayQueue:function(){var e=this.model.get("playQueue"),t=this.model.get("playQueueItem");
return e.get("playQueueSelectedItemID")!==t.get("playQueueItemID")?e.fetch():s.a.Deferred().resolve().promise()},ping:function(){return this.companion?s.a.Deferred().resolve().promise():this.request(n.i(u.a)(this.model.get("transcodeServer"),this.transcodeSessionID))},startPing:function(){var e=this.model.get("directPlay"),t=!this.companion&&this.type!==l.a.types.PHOTO;!t||e||this.pingInterval||(this.pingInterval=setInterval(a.a.bind(this.ping,this),u.a.DELAY))},stopPing:function(){this.pingInterval=clearInterval(this.pingInterval);
},stopSession:function(e){var t=this.transcodeSessionID,i=t||a.a.uniqueId("no-session-"),r=e&&e.xhrOptions||{};if(this.stoppedSessions.hasOwnProperty(i))return this.stoppedSessions[i];this.subcontroller&&this.subcontroller.stop(e);var o;return o=t&&this.type!==l.a.types.PHOTO&&!this.model.get("directPlay")?this.request(n.i(d.a)(this.model.get("transcodeServer"),t,r)):s.a.Deferred().resolve().promise(),this.stoppedSessions[i]=o,o},startPlaybackTracking:function(){this.companion||this.playbackInterval||(this.playbackInterval=setInterval(a.a.bind(function(){
this.playbackDuration++},this),1e3))},stopPlaybackTracking:function(){this.playbackInterval=clearInterval(this.playbackInterval)},trackPlaybackEvent:function(){this.companion||(n.i(o.a)("metrics").incrementPlaybackCount(),this.playbackDuration=0)},setRadioPolicy:function(){var e=this.model.get("playQueue");if(this.webRadioUsage){if(this.webRadioUsage.get("playQueue")===e)return;this.stopListening(this.webRadioUsage),this.webRadioUsage.stop(),this.webRadioUsage=null}if(this.webRadioAdvertisementTimeout&&(this.webRadioAdvertisementTimeout=clearTimeout(this.webRadioAdvertisementTimeout)),
e&&e.get("isRadio")){var t=a.a.extend(a.a.pick(e.attributes,h.a.playQueueAttributes),{playQueue:e});this.webRadioUsage=new h.a(t),this.listenTo(this.webRadioUsage,"change",function(e){var t=e.changedAttributes();t&&this.model.set(t)});var n=this.currentItem;n.get("advertisement")&&n.get("allowSkipAfter")&&(this.webRadioAdvertisementTimeout=setTimeout(a.a.bind(function(){this.model.set("canSkipNext",!!this.nextItem)},this),1e3*n.get("allowSkipAfter")))}},previousChapter:function(){var e=Math.max(this.model.get("lastSeekPosition"),this.model.get("position")),t=this.getPreviousChapterTime(e-5e3);
void 0!==t&&this.setPosition(t)},nextChapter:function(){var e=Math.max(this.model.get("lastSeekPosition"),this.model.get("position")),t=this.getNextChapterTime(e);void 0!==t&&this.setPosition(t)},getPreviousChapterTime:function(e){var t=this.model.get("metadataItem"),n=t.get("chapters");if(n&&n.length){for(var i=n.length-1;i>=0;i--){var a=n.at(i),r=a.get("startTimeOffset");if(r<e)return r}return 0}},getNextChapterTime:function(e){var t=this.model.get("metadataItem"),n=t.get("chapters");if(n&&n.length)for(var i=0;i<n.length;i++){
var a=n.at(i),r=a.get("startTimeOffset");if(r>e)return r}},stepBackward:function(){var e=this.model.get("metadataItem"),t=e.get("chapters");t&&t.length?this.previousChapter():this.seek(-6e5,0,0)},stepForward:function(){var e=this.model.get("metadataItem"),t=e.get("chapters");t&&t.length?this.nextChapter():this.seek(6e5,0,3e3)}};t.a=p},function(e,t,n){"use strict";var i=n(93),a=n.n(i),r=n(2),s=n.n(r),o=n(33),l=n(81),c=n(57),u=n(18),d=u.a.extend({name:"AbstractStorageModel",responseType:c.a.json,save:function(e,t){
var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=this.attributes,r=void 0;if(null==e||s.a.isObject(e)?(r=e,i=t):(r={})[e]=t,i=s.a.extend({validate:!0},i),r&&!i.wait){if(!this.set(r,i))return!1}else if(!this._validate(r,i))return!1;r&&i.wait&&(this.attributes=s.a.extend({},a,r));var o=l.a.getInstance().excludeDefaults,c=this.toJSON({syncedOnly:!0,excludeDefaults:o!==!1}),u=this._serialize(c),d=l.a.set(this._getStorageKey(),u);return d.done(function(){n.attributes=a,n.trigger("sync",n,a,i);
}),d.fail(function(e){n.trigger("error",n,e,i)}),r&&i.wait&&(this.attributes=a),d},destroy:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.wait||this.trigger("destroy",this,this.collection,t);var n=l.a.remove(this._getStorageKey());return n.done(function(n){t.wait&&e.trigger("destroy",e,e.collection,t),e.trigger("sync",e,n,t)}),n.fail(function(n){e.trigger("error",e,n,t)}),n},sync:function(){this._logError("does not support syncing to a server")},_getStorageKey:function(){
var e=s.a.result(this,"storageKey");if(!e)throw new Error(this.name+" requires a `storageKey` property");return e},_fetch:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=l.a.get(this._getStorageKey());return n.done(function(n){n&&e.set(e.parse(n)),e.trigger("sync",e,n,t)}),n.fail(function(n){e.trigger("error",e,n,t)}),n},_serialize:function(e){var t="";try{t=a()(e)}catch(e){this._logError("serialization error: "+e.message)}return t},_warnUnsupportedOptions:function(e){
e.parse&&this._logError("does not support the `parse` option. The response from storage is always parsed."),e.success&&this._logError("does not support a `success` callback. Use the returned promise."),e.error&&this._logError("does not support an `error` callback. Use the returned promise.")},_logError:function(e){var t=void 0;try{t=this._getStorageKey()}catch(e){t="no storageKey"}n.i(o.a)(!1,this.name+" ("+t+") "+e)}});t.a=d},function(e,t,n){"use strict";function i(e,t){if(s.a.get("shouldCreateFlexModels")){
var n;e.prototype.sessionRelations=r()({},e.prototype.sessionRelations,(n={},n.desktop=t,n))}return e}var a=n(7),r=n.n(a),s=n(59);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(22),s=n(633),o=r.a.extend({name:"FirstCharacterCollection",context:["server","section"],model:s.a,url:function e(){var t=a.a.result(this.section,"url")+"/firstCharacter",n=this.getUrlParams(),e=n?t+"?"+n:t;return e},getUrlParams:function(){var e={},t=[],n=this.section.get("currentType");n&&(e.type=n.id);var i=this.section.get("currentFilters");
return a.a.each(i,function(t){t.values.length&&(e[t.key]=t.values.join(","))}),a.a.each(e,function(n,i){"unviewedLeafCount"===i?t.push(i+">="+e[i]):t.push(i+"="+e[i])}),t.join("&")}});t.a=o},function(e,t,n){"use strict";var i=n(22),a=n(209),r=i.a.extend({name:"SectionCollection",context:["server"],model:a.a,url:"/library/sections"});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(16),o=n(18),l=["all","recentlyAdded","recentlyViewed","recentlyViewedShows","onDeck","newest","folder"],c=o.a.extend({
name:"SectionSubsetModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",sessionAttrs:{selected:s.a.boolean},syncedAttrs:{key:s.a.string,title:s.a.string,secondary:s.a.boolean},derivedAttrs:{primary:function(){return!this.get("secondary")&&a.a.contains(l,this.get("key"))}},defaults:{selected:!1},augmentResponse:function(e){return"all"===e.key&&(e.title=n.i(r.default)("All")),e}},{whitelistedPrimaryKeySubsets:l});t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(20),s=n(22),o=n(426),l=s.a.extend({
name:"SortCollection",context:["server","section","typeID"],model:o.a,url:function(){var e=a.a.result(this.section,"url"),t=this.typeID||this.section.get("currentType").id,n=t?{type:t}:{};return r.join([e,"/sorts"],n)}});t.a=l},function(e,t,n){"use strict";var i=n(16),a=n(18),r={ASCENDING:"asc",DESCENDING:"desc"},s=a.a.extend({name:"SortModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",sessionAttrs:{selected:i.a.boolean,direction:i.a.string},syncedAttrs:{key:i.a.string,
descKey:i.a.string,title:i.a.string,isDefault:i.a.boolean,defaultDirection:i.a.string},defaults:{selected:!1},augmentResponse:function(e){return e.defaultDirection||(e.defaultDirection=e.default||r.ASCENDING),e.isDefault=!!e.default,e.direction||(e.direction=e.defaultDirection),e},reverseSortDirection:function(){var e=this.get("direction")||this.get("defaultDirection");e=e&&e!==r.ASCENDING?r.ASCENDING:r.DESCENDING,this.set("direction",e)}},{directions:r});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(20),l=n(176),c=n(16),u=n(18),d=n(1130),h=u.a.extend({
name:"PlaylistModel",context:["server","containerKey"],idAttribute:"ratingKey",rootPropertyName:"Playlist",urlRoot:"/playlists",saveUrl:function(){return"/library/metadata/"+this.id},sessionAttrs:{isPlaylist:c.a.boolean,isLibraryItem:c.a.boolean},syncedAttrs:{ratingKey:c.a.string,key:c.a.string,guid:c.a.string,type:c.a.string,playlistType:c.a.string,title:c.a.string,titleSort:c.a.string,composite:c.a.string,summary:c.a.string,smart:c.a.boolean,allowSync:c.a.boolean,duration:c.a.integer,durationInSeconds:c.a.integer,
leafCount:c.a.integer,addedAt:c.a.integer,updatedAt:c.a.integer},sessionRelations:{children:{relationClass:d.a,attrs:function(e){var t={};return"audio"===e.playlistType&&(t.includeRelated=1),{containerKey:o.join(["/playlists",e.ratingKey,"items"],t)}},options:function(){return{playlist:this}}}},defaults:{isPlaylist:!0,isLibraryItem:!0},findItem:function(e){return this.get("children").getCollection().findWhere({playlistItemID:e})},moveItem:function(e,t){if(void 0!==e){var n=t?{after:t}:{},i=o.join([a.a.result(this,"url"),"/items/",e,"/move"],n),r=a.a.extend(this.server.getXHROptions(i),{
type:"PUT"}),l=s.a.ajax(r),c=this.get("children").getCollection(),u=this.findItem(e);c.remove(u);var d=this.findItem(t),h=d?c.indexOf(d)+1:0;return c.add(u,{at:h}),l}},removeItem:function(e){var t=this;if(void 0!==e){var n=o.join([a.a.result(this,"url"),"/items/",e]),i=a.a.extend(this.server.getXHROptions(n),{type:"DELETE"}),r=s.a.ajax(i);r.then(function(e){t.set(t.parse(e))});var l=this.get("children").getCollection(),c=this.findItem(e);return l.remove(c),r}},addContent:function(e,t){var n=this,i=this.isNew()?"POST":"PUT",r=[a.a.result(this,"url")],c={};
this.isNew()?(c.type=this.get("playlistType"),c.title=this.get("title"),c.smart=this.get("smart")?1:0):r.push("/items"),e.get("playQueueID")?c.playQueueID=e.get("playQueueID"):c.uri=l.a.uri(e,t);var u=o.join(r,c),d=a.a.extend(e.server.getXHROptions(u),{type:i}),h=s.a.ajax(d);return h.then(function(e){n.set(n.parse(e))}),h.promise()},isLibraryItem:function(e,t){return!0},isPlexMusicItem:function(){return!1}});t.a=h},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(33),s={fetch:function(){return n.i(r.a)(!1,"A model or collection with a controlled populate promise cannot be fetched directly"),
this.populatePromise},isPopulating:function(){return!!this.populatePromise&&"pending"===this.populatePromise.state()},_resetPopulate:function(){return this.isPopulating()||(this._populateDeferred=a.a.Deferred(),this.populatePromise=this._populateDeferred.promise()),this.populatePromise},_resolvePopulate:function(){return"resolved"===this.populatePromise.state()?this.populatePromise:("rejected"===this.populatePromise.state()&&this._resetPopulate(),this._populateDeferred.resolveWith(this,[this]),this.populatePromise);
},_rejectPopulate:function(){return"rejected"===this.populatePromise.state()?this.populatePromise:("resolved"===this.populatePromise.state()&&this._resetPopulate(),this._populateDeferred.rejectWith(this,[this]),this.populatePromise)}};t.a=s},function(e,t,n){"use strict";var i=n(18),a=n(16),r=n(49),s=n(251),o=n(252),l=n(629),c=n(83),u=n(39),d=i.a.extend({name:"PlayerModel",sessionAttrs:{playQueueItem:a.a.instanceOf(s.a),metadataItem:a.a.instanceOf(r.a),media:a.a.object,part:a.a.object,url:a.a.string,
subtitlesUrl:a.a.string,playQueue:a.a.instanceOf(o.a,l.a),transcodeServer:a.a.instanceOf(c.a),friendlyName:a.a.string,mediaIndex:a.a.integer,partIndex:a.a.integer,partCount:a.a.integer,qualityIndex:a.a.integer,videoStreamID:a.a.integer,audioStreamID:a.a.integer,subtitleStreamID:a.a.integer,type:a.a.oneOf(u.a.types.VIDEO,u.a.types.MUSIC,u.a.types.PHOTO),state:a.a.oneOf(u.a.states.STOPPED,u.a.states.PAUSED,u.a.states.PLAYING,u.a.states.BUFFERING,u.a.states.ERROR),bufferingMessage:a.a.string,errorMessage:a.a.string,
terminationCode:a.a.integer,ready:a.a.boolean,loaded:a.a.boolean,ended:a.a.boolean,finished:a.a.boolean,embedHtml:a.a.string,duration:a.a.integer,position:a.a.float,lastSeekPosition:a.a.integer,offset:a.a.integer,volume:a.a.integer,startBuffer:a.a.integer,endBuffer:a.a.float,percentBuffered:a.a.integer,shuffled:a.a.boolean,repeatAll:a.a.boolean,repeatItem:a.a.boolean,directPlay:a.a.boolean,videoDimensions:a.a.object,playbackSessionID:a.a.string,transcodeSessionID:a.a.string,softSubtitlesFailed:a.a.boolean,
forceWebkitVideoFullscreen:a.a.boolean,canPlayPause:a.a.boolean,canStop:a.a.boolean,canSeek:a.a.boolean,canSetVolume:a.a.boolean,canSetVideoStream:a.a.boolean,canSetAudioStream:a.a.boolean,canSetSubtitleStream:a.a.boolean,canSetQuality:a.a.boolean,canShuffle:a.a.boolean,canRepeat:a.a.boolean,canLyrics:a.a.boolean,canSkipPrevious:a.a.boolean,canSkipNext:a.a.boolean,showSeekBar:a.a.boolean,showAudioStream:a.a.boolean,showSubtitleStream:a.a.boolean,showQuality:a.a.boolean,showPlayQueue:a.a.boolean,showShuffle:a.a.boolean,
showRepeat:a.a.boolean,showLyrics:a.a.boolean,showMinimize:a.a.boolean,showMaximize:a.a.boolean,showEnterFullscreen:a.a.boolean,showExitFullscreen:a.a.boolean},defaults:function(){return{playQueueItem:null,metadataItem:null,media:null,part:null,url:null,subtitlesUrl:null,playQueue:null,transcodeServer:null,mediaIndex:-1,partIndex:-1,partCount:1,qualityIndex:null,videoStreamID:null,audioStreamID:null,subtitleStreamID:null,type:null,state:u.a.states.STOPPED,bufferingMessage:null,errorMessage:null,ready:!1,
loaded:!1,ended:!1,finished:!1,embedHtml:null,duration:0,position:0,lastSeekPosition:null,offset:0,volume:100,startBuffer:0,endBuffer:0,percentBuffered:0,shuffled:!1,repeatAll:!1,repeatItem:!1,directPlay:!1,videoDimensions:null,playbackSessionID:null,transcodeSessionID:null,softSubtitlesFailed:!1,canPlayPause:!1,canStop:!1,canSeek:!1,canSetVolume:!1,canSetVideoStream:!1,canSetAudioStream:!1,canSetSubtitleStream:!1,canSetQuality:!1,canShuffle:!1,canRepeat:!1,canSkipPrevious:!1,canSkipNext:!1,canLyrics:!1,
showSeekBar:!1,showAudioStream:!1,showSubtitleStream:!1,showQuality:!1,showPlayQueue:!1,showShuffle:!1,showRepeat:!1,showMinimize:!1,showMaximize:!1,showEnterFullscreen:!1,showExitFullscreen:!1,showLyrics:!1,forceWebkitVideoFullscreen:!1}},derivedAttrs:{stopped:function(){return this.get("state")===u.a.states.STOPPED},paused:function(){return this.get("state")===u.a.states.PAUSED},playing:function(){return this.get("state")===u.a.states.PLAYING},buffering:function(){return this.get("state")===u.a.states.BUFFERING;
},error:function(){return this.get("state")===u.a.states.ERROR},positionPercentage:function e(){var t=this.get("duration"),n=this.get("position"),e=t?Math.min(Math.max(n/t*100,0),100):0;return e}},initialize:function(){this.on("change:state",this.onStateChange)},onStateChange:function(e,t){t!==u.a.states.STOPPED&&e.set("ended",!1)}});t.a=d},function(e,t,n){"use strict";var i=n(36),a=n(75),r=n(251),s=a.a.extend({model:r.a,windowSize:{audio:13,video:8},initialize:function(e,t){if(e)throw new Error("Models cannot be passed directly to an UpNextCollection.");
this.collection=this.parent.get("playQueue").get("collection"),this.listenTo(this.collection,"reset sync",this._filter),this.listenTo(this.parent,"change:playQueueItem",this._filter),this.listenTo(this.parent,"change:repeatAll change:repeatItem",this._filter),this._filter()},_filter:function(){var e=this.parent.get("playQueueItem").get("metadataItem"),t=this.collection.findWhere({ratingKey:e.get("ratingKey")}),n=this.collection.indexOf(t),a=i.a.getChildMediaType(e.get("type")).element,r=this.windowSize[a],s=this.collection.reject(function(e){
return e.get("advertisement")}).slice(n+1,n+r);if(this.parent.get("repeatAll")){var o=Math.max(r-s.length,0),l=this.collection.slice(0,Math.min(n,o));s=s.concat(l)}this.set(s)}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(22),s=n(147),o=n(59),l=n(465),c=function(e,t){return!e.get("relay")&&t.get("relay")?e:!t.get("relay")&&e.get("relay")?t:!e.get("isLoopback")&&t.get("isLoopback")?t:!t.get("isLoopback")&&e.get("isLoopback")?e:!e.get("isPrivate")&&t.get("isPrivate")?t:!t.get("isPrivate")&&e.get("isPrivate")?e:!e.get("isHttps")&&t.get("isHttps")?t:!t.get("isHttps")&&e.get("isHttps")?e:e;
},u=r.a.extend({name:"ConnectionCollection",context:["server"],model:s.a,getBestConnection:function(){var e=o.a.get("allowHttpsMediaServerConnections"),t=!this.server||this.server.get("isCloudBased")||e,n=this.filter(function(e){return e.get("isConnected")&&(t||!e.get("isHttps"))});if(n.length)return a.a.reduce(n,c)},hasBetterConnectionCandidates:function(){var e=this.server&&this.server.get("activeConnection");return this.some(function(t){var n=t.get("isUntested")||t.get("isPending"),i=!e||t!==e&&c(t,e)===t;
return n&&i})},hasOnlyFailedConnections:function(){return this.every(function(e){return e.get("isFailed")})},hasFailedEveryDirectConnection:function(){return this.where({relay:!1}).every(function(e){return e.get("isFailed")})},hasMultiplePrivateV4Subnets:function(){var e=void 0;return this.some(function(t){var n=t.get("address");if(t.get("isPrivate")&&l.a.isValidV4Address(n)){var i=l.a.getV4Subnet(n);return e||(e=i),e!==i}})}});t.a=u},function(e,t,n){"use strict";var i=n(22),a=n(648),r=i.a.extend({
name:"MediaGrabOperationCollection",context:["server"],model:a.b,comparator:function(e){var t=e.get("mediaItem");if(t){var n=t.beginsAt,i=t.startOffsetSeconds||0;return n-i}}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(181),s=n(16),o=n(277),l=o.a.extend({name:"SyncItemModel",context:["server","device"],urlRoot:function(){if(this.device)return"/devices/"+this.device.get("clientIdentifier")+"/sync_items"},syncedAttrs:a.a.extend({},o.a.prototype.syncedAttrs,{version:{type:s.a.integer,
save:!0},metadataType:{type:s.a.string,save:!0},rootTitle:{type:s.a.string,save:!0},machineIdentifier:{type:s.a.string,save:!0},Server:s.a.object}),defaults:function(){return{Location:{},Device:{},Server:{}}},augmentResponse:function(e){return"photoAlbum"===e.metadataType&&(e.metadataType="photoalbum"),e},sync:function(e,t,n){var i=r.a.addVersionHeaderForDevice(this.device,n);return o.a.prototype.sync.call(this,e,t,i)},getSaveParams:function(e,t){var n=o.a.prototype.getSaveParams.apply(this,arguments),i=n.Item;
return a.a.each(i,function(e,t){""===e&&delete i[t]}),{SyncItem:i}}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(55),o=s.a.extend({urlRoot:"/api/home/users",whitelistedAttrs:["id","uuid","admin","protected","restricted","guest","title","username","email","thumb"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return t.User&&(t=t.User),r.a.parseInteger(t,"id"),r.a.parseBoolean(t,["admin","protected","restricted","guest"]),t},parse:function(e){var t=this.convert(e);
return t=a.a.pick(t,this.whitelistedAttrs)},getSaveParams:function(e,t){if(a.a.isEmpty(e)){var n={};return this.get("restricted")?n.title=this.get("title"):this.isNew()&&(n.invitedEmail=this.get("username")),n}return s.a.prototype.getSaveParams.apply(this,arguments)}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(16),s=n(18),o=n(1189),l={ACTIVE:"Active",INACTIVE:"Inactive",CANCELED:"Canceled"},c={NONE:"",LIFETIME:"lifetime",YEARLY:"yearly",MONTHLY:"monthly",LITE:"lite",COMPED:"comped",
PRO:"pro"},u=s.a.extend({name:"UserSubscriptionModel",syncedAttrs:{active:r.a.boolean,status:r.a.oneOf(l.ACTIVE,l.INACTIVE,l.CANCELED),plan:r.a.oneOf(c.NONE,c.LIFETIME,c.YEARLY,c.MONTHLY,c.LITE,c.COMPED,c.PRO)},syncedRelations:{features:{relationClass:o.a}},augmentResponse:function(e){var t=e.features;return t&&t.feature?a.a.extend({},e,{features:t.feature}):e}},{statuses:l,plans:c});t.a=u},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){
return r});var i="RESET_PRIMARY_SERVER",a="CHANGE_PRIMARY_SERVER",r="CONFIRM_RELAY_CONNECTION"},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(e){return e?e.desktop.libraries:void 0})}function a(){return n.i(r.createSelector)(o.a,i(),function(e,t){return t?t.map(function(t){return e[t]}):[]})}var r=n(9),s=(n.n(r),n(63)),o=n(666);t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(9),s=(n.n(r),n(1204)),o=n.i(r.createSelector)(s.a,function(e){return a.a.find(e,function(e){
return e.isFullOwnedServer})});t.a=o},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(173)),r=n(174),s=n.i(a.a)(n.i(i.createSelector)(r.a,function(e){return e.entitlements.reduce(function(e,t){return e[t.id]=!0,e},{})}),function(e){return e});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(34),s=n(8),o=n(27),l=n(52),c=r.a.extend({mixins:l.a,maxCycles:3,maxSize:50,isListening:!1,initialize:function(){this._cache={},this.size=0,this.cycles=[],this.cycle()},startListening:function(){
this.isListening||(this.isListening=!0,this.listenTo(s.a,{"cycle:cache":this.cycle,"clearWhere:cache":this.clearWhere,"clearAll:cache":this.clearAll,"clearCycles:cache":this.clearCycles}))},get:function(e){var t=this._cache[e];return t&&t._cacheCycle&&this.setItemCycle(t,e,a.a.first(this.cycles)),t},store:function(e,t){t||(t=this.getItemCacheKey(e)),this.remove(e),t&&(this.startListening(),e._cacheKey=t,this._cache[t]=e,this.size++,e.persistInCache||this.setItemCycle(e,t,a.a.first(this.cycles)))},
getItemCacheKey:function(e){return a.a.result(e,"cacheKey")},setItemCycle:function(e,t,n){var i=e._cacheCycle;i&&i.hasOwnProperty(t)&&delete i[t],e._cacheCycle=n,n[t]=e},cycle:function(){this.size>this.maxSize&&(o.a.warn("Cache overflow, size: "+this.size),a.a.each(this.cycles.slice(1),this.removeCycle,this)),this.cycles.unshift({}),this.cycles.length>Math.max(this.maxCycles,1)&&this.removeCycle(a.a.last(this.cycles))},remove:function(e){if(e&&e._cacheKey){var t=e._cacheKey;this._cache.hasOwnProperty(t)&&(delete this._cache[t],
this.size--),e._cacheCycle&&(e._cacheCycle.hasOwnProperty(t)&&delete e._cacheCycle[t],delete e._cacheCycle),delete e._cacheKey}},removeCycle:function(e){a.a.each(a.a.values(e),this.remove,this);var t=a.a.indexOf(this.cycles,e);this.cycles.splice(t,1)},clearWhere:function(e){var t=a.a.where(a.a.values(this._cache),e);a.a.each(t,this.remove,this)},clearAll:function(){a.a.each(a.a.values(this._cache),this.remove,this),this.cycles.length=0,this.cycle(),this.stopListening(),this.isListening=!1},clearCycles:function(){
for(var e=this.cycles;e.length;)this.removeCycle(e[e.length-1]);this.cycle()}});t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(440),s=r.a.extend({maxCycles:3,maxSize:20,get:function(e){var t=r.a.prototype.get.apply(this,arguments);return t&&t.every(function(e){return!(!e.cache||!e.cache.isListening)&&(e.cache.store(e),!0)}),t},getItemCacheKey:function(e){var t=a.a.result(e,"url");return e.server&&(t=e.server.getScopedKey(t)),t}});t.a=s},function(e,t,n){"use strict";n.d(t,"a",function(){
return i}),n.d(t,"b",function(){return a});var i="error",a="success"},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"e",function(){return a}),n.d(t,"b",function(){return r}),n.d(t,"d",function(){return s}),n.d(t,"c",function(){return o});var i="https://forums.plex.tv",a="https://status.plex.tv",r="https://plex.tv/subscription/about",s="https://plex.tv/gifts",o="https://plex.tv/subscription/new"},function(e,t,n){"use strict";function i(e){return e.toLowerCase()}function a(e,t){
n.i(r.a)("[MediaElement] Creating element. type:%s allowRecycle:%s",e,t),e=i(e);var o=!a.preventRecycle&&t;if(o&&s[e])return n.i(r.a)("[MediaElement] Found existing element to use."),s[e];var l=document.createElement(e);return o&&(s[e]=l),l}var r=n(27),s={};t.a=a},function(e,t,n){"use strict";function i(e,t){if(null==e||null==t)return!1;var n=r()().unix();return n>=e&&n<=t}var a=n(43),r=n.n(a);t.a=i},function(e,t,n){var i=n(720).default,a=n(84);e.exports=a(i)},function(e,t,n){var i=n(735).default,a=n(84);
e.exports=a(i)},function(e,t,n){var i=n(462).default,a=n(84);e.exports=a(i)},function(e,t,n){"use strict";function i(e,t){if(n.i(a.a)(null!=t,"No `minVersion` supplied to `isVersionOrNewer`. Have you misspelled a constant?"),!e)return!0;for(var i=t.split("."),r=e.split("."),s=0,o=i.length;s<o;s++)if(s<r.length){var l=parseInt(i[s],10),c=parseInt(r[s],10);if(l<c)return!0;if(l>c)return!1}return!0}var a=n(33);t.a=i},function(e,t,n){"use strict";function i(e,t){if(e===t)return 0;for(var n=e.split("."),i=t.split("."),a=0;a<n.length;a++){
if(!i[a])return 1;var r=parseInt(n[a],10),s=parseInt(i[a],10);if(r>s)return 1;if(r<s)return-1}return 0}t.a=i},function(e,t,n){"use strict";function i(e,t,i){if(e){var a=n.i(s.a)(e,{streamType:t.id});r.a.each(a,function(e){e.selected=e.id===i})}}var a=n(2),r=n.n(a),s=n(128);t.a=i},function(e,t,n){"use strict";function i(e,t,n){t<6e4||e.get("isLibraryItem")&&1!==e.get("extraType")&&(t>.9*n?e.set({viewOffset:0,viewCount:1}):e.set("viewOffset",Math.round(t)))}t.a=i},function(e,t,n){"use strict";function i(e){
return e=parseInt(e,10),e?e<2?n.i(a.default)("Mono"):e<3?n.i(a.default)("Stereo"):(e-1).toString()+".1":""}Object.defineProperty(t,"__esModule",{value:!0});var a=n(4);t.default=i},function(e,t,n){"use strict";function i(e){return e?"dca"===e?"DTS":e.toUpperCase():""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function i(e){var t=e.bitrate||e.maxVideoBitrate,i=e.videoResolution;if(!t&&!i)return n.i(a.default)("Unknown");var l=[];if(t){var c=t<1e3||t%1e3===0?0:1;
l.push(n.i(s.default)(t,c))}if(i&&(!t||t>=1e3)){var u=r.a.getResolutionFromSize(i);l.push(n.i(o.default)(u))}return l.join(" ")}Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),r=n(95),s=n(330),o=n(267);t.default=i},function(e,t,n){"use strict";function i(e){if(e=parseInt(e,10),r.a.isNaN(e))return"";var t=e<10?"0":"";return t+e}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){var i=r.a.pick(t,"type","controller","media","offset","media","autoplay","useMiniPlayer","isSwitchingPlayers","inline","playQueue","isFromCompanion","background"),a=t.playQueue;
if(e=a?a.get("selectedItem"):e,i.model=e,i.autoplay=i.autoplay!==!1,e&&"track"===e.get("type")){var l=e.get("metadataItem")||e,c=t.enableTrackOffsets?l.get("viewOffset"):null;r.a.isNumber(c)&&(i.offset=c)}return i.offset&&(i.offset=parseInt(i.offset,10)||0),i.type||(i.controller?i.type=i.controller.type:a?i.type=s.a.getTypeByElement(a.get("mediaType")):i.type=s.a.getTypeByElement(n.i(o.a)(e))),i}var a=n(2),r=n.n(a),s=n(39),o=n(1250);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(27),s={
ORIGINAL:-1,qualities:{},getQualityByIndex:function(e){if(e<0)return{index:this.ORIGINAL};var t={index:e};return a.a.each(this.qualities,function(n,i){t[i]=a.a.result(this.qualities,i)[e]},this),t},getQualityCount:function(){var e=a.a.first(a.a.keys(this.qualities));return a.a.result(this.qualities,e).length},getQualityAttribute:function(e){var t,n=e.get("isLibraryItem"),i=e.get("isExtra")&&!/^file:\/\//.test(e.get("guid"));return t=n&&!i?e.server.hasLocalConnection()?"localQuality":"remoteQuality":"channelQuality",
"video"!==this.type?this.type+"!"+t:t},getSyncQualityAttribute:function(){return"syncQuality!"+this.type},getCurrentQuality:function(e,t){var n=this.getQualityAttribute(e),i=t.get(n);return i>=this.getQualityCount()&&(r.a.warn("Quality index "+i+" is out of bounds"),i=t.defaults[n],t.save(n,i)),a.a.extend(this.getQualityByIndex(i),{attribute:n})},getAvailableQualities:function(e){e||(e={});var t=e.lowestQualityIndex,n=e.highestQualityIndex,i=e.comparator,a=[];n===this.ORIGINAL&&(n=void 0);for(var r=0,s=this.getQualityCount();r<s;r++)if(!(t&&r<t)){
if(n&&r>n)return a;if(i&&i.call(this,r))return a;a.push(this.getQualityByIndex(r))}return a},getResolutionFromSize:function(e){var t=e.split("x"),n=parseInt(t[1],10);return n>2560?"8k":n>1100?"4k":n>720?"1080":n>576?"720":n>480?"576":n>360?"480":"sd"},getHeightFromResolution:function(e){switch(e){case"8k":return 5120;case"4k":return 2560;case"1080":return 1080;case"720":return 720;case"576":return 576;case"480":return 480;case"sd":return 360;default:return 360}},getNearestIndex:function(e,t){if(!t)return this.ORIGINAL;
var n=e.indexOf(t);if(n<0){n=0;for(var i=0,a=e.length;i<a;i++){var r=e[i];if(r>t)break;n=i}}return n}};t.a=s},function(e,t,n){"use strict";function i(e){return e>=2e3}function a(e){return i(e.transcodeDecisionCode)?e.transcodeDecisionText:i(e.generalDecisionCode)?e.generalDecisionText:i(e.mdeDecisionCode)?e.mdeDecisionText:e.errorMessage}t.b=i,t.a=a},function(e,t,n){"use strict";function i(e){return e=r.a.isArray(e)?e:r.a.toArray(arguments),o.a.when.apply(o.a,r.a.map(e,l.a))}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(112);
t.a=i},function(e,t,n){"use strict";function i(e,t){var i=t.serverEntityID;return n.i(c.a)(e,u.f,i)}function a(e,t){var i=t.providerEntityID;return n.i(c.a)(e,u.e,i)}function r(e,t){var i=t.libraryEntityID;return n.i(c.a)(e,u.g,i)}function s(e,t){var i=t.metadataListEntityID;return n.i(c.a)(e,u.d,i)}function o(e,t){var i=t.metadataItemEntityID;return n.i(c.a)(e,u.b,i)}function l(e,t){var i=t.mediaSubscriptionEntityID;return n.i(c.a)(e,u.a,i)}var c=n(335),u=n(67);t.a=i,t.b=a,t.f=r,t.e=s,t.d=o,t.c=l;
},function(e,t,n){"use strict";function i(e,t){if(!e)return"";if(e.length>t){for(var n=e.substring(0,t-3);/\S/.test(n.charAt(n.length-1))===!1&&n.length>1;)n=n.slice(0,-1);return n+"..."}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function i(e,t,n){if(!e)return"";if(e.length>t){n=n||Math.floor((t-3)/2);var i=t-3-n;return e.substr(0,n)+"..."+e.substr(e.length-i)}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){
"use strict";var i=n(4),a=n(215),r=["id","typeString"],s=n.i(a.a)(r,[{id:1,typeString:"trailer",title:function(){return n.i(i.default)("Trailer")}},{id:2,typeString:"deletedScene",title:function(){return n.i(i.default)("Deleted Scene")}},{id:3,typeString:"interview",title:function(){return n.i(i.default)("Interview")}},{id:4,typeString:"musicVideo",title:function(){return n.i(i.default)("Music Video")}},{id:5,typeString:"behindTheScenes",title:function(){return n.i(i.default)("Behind the Scenes");
}},{id:6,typeString:"scene",title:function(){return n.i(i.default)("Scene")}},{id:7,typeString:"liveMusicVideo",title:function(){return n.i(i.default)("Live Music Video")}},{id:8,typeString:"lyricMusicVideo",title:function(){return n.i(i.default)("Lyric Music Video")}},{id:9,typeString:"concert",title:function(){return n.i(i.default)("Concert")}},{id:10,typeString:"featurette",title:function(){return n.i(i.default)("Featurette")}},{id:11,typeString:"short",title:function(){return n.i(i.default)("Short");
}},{id:12,typeString:"other",title:function(){return n.i(i.default)("Other")}}]);t.a=s},function(e,t,n){"use strict";function i(e){var t=l.exec(e);if(null!=t)return{octets:s.a.map(s.a.rest(t),function(e){return parseInt(e,10)})}}function a(e){if(c.test(e)){var t=e.split("::"),n=t[0].match(u),i={parts:[]};if(null!=n){if(n.length>8)return;i.parts=s.a.map(n,function(e){return parseInt(e,16)})}if(t.length>1){var a=t[1].match(u),r=s.a.map(a,function(e){return parseInt(e,16)}),o=8-i.parts.length-r.length;
if(o<0||8===o)return;s.a.times(o,function(){i.parts.push(0)}),i.parts=i.parts.concat(r)}return i}}var r=n(2),s=n.n(r),o=/^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/,l=/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/,c=/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/i,u=/[a-f0-9]{1,4}/gi,d={
isValidPort:function(e){return o.test(e)},isValidAddress:function(e){return this.isValidV4Address(e)||this.isValidV6Address(e)},isLoopbackAddress:function(e){return"localhost"===e||this.isLoopbackV4Address(e)||this.isLoopbackV6Address(e)},isPrivateAddress:function(e){return this.isPrivateV4Address(e)||this.isPrivateV6Address(e)},isPlexDirectAddress:function(e){return/plex\.direct$/.test(e)},isValidV4Address:function(e){var t=i(e);return!(!t||!s.a.all(t.octets,function(e){return e>=0&&e<=255}))},isLoopbackV4Address:function(e){
var t=i(e);return!(!t||127!==t.octets[0]&&!s.a.all(t.octets,function(e){return 0===e}))},isPrivateV4Address:function(e){var t=i(e);if(t){if(10===t.octets[0])return!0;if(172===t.octets[0]&&t.octets[1]>=16&&t.octets[1]<=31)return!0;if(192===t.octets[0]&&168===t.octets[1])return!0}return!1},isValidV6Address:function(e){var t=a(e);return!(!t||!s.a.all(t.parts,function(e){return e>=0&&e<=65535}))},isLoopbackV6Address:function(e){var t=a(e);if(t){var n=s.a.all(s.a.take(t.parts,7),function(e){return 0===e;
});return n&&1===s.a.last(t.parts)}return!1},isPrivateV6Address:function(e){var t=a(e);return!!(t&&t.parts[0]>=64512&&t.parts[0]<=65023)},getV4Subnet:function(e){return d.isValidV4Address(e)?e.split(".").slice(0,-1).join("."):""}};t.a=d},function(e,t,n){"use strict";var i=n(2623),a=n.n(i),r=n(10),s=r.a.ItemView.extend({className:"circle-progress",template:a.a,size:30,lineWidth:5,strokeColor:"#cc7b19",hasSize:!1,ui:{svg:".circle-progress-bar",svgCircle:".circle-progress-bar circle"},bindings:{".circle-progress-text":{
modelAttribute:"text"}},modelEvents:{"change:progress":"onProgressChange"},initialize:function(e){this.size=e.size||this.size,this.lineWidth=e.lineWidth||this.lineWidth,this.strokeColor=e.strokeColor||this.strokeColor,this.size&&(this.$el.width(this.size),this.$el.height(this.size))},drawProgressBar:function(){var e=this.size,t=e/2,n=t-this.lineWidth,i=Math.PI*(2*n);this.hasSize||(this.ui.svg.attr("width",e),this.ui.svg.attr("height",e),this.ui.svgCircle.attr("r",n),this.ui.svgCircle.attr("cx",t),
this.ui.svgCircle.attr("cy",t),this.ui.svgCircle.attr("stroke-dasharray",i),this.ui.svgCircle.css("stroke-width",this.lineWidth),this.ui.svgCircle.css("stroke",this.strokeColor),this.hasSize=!0);var a=this.model.get("progress"),r=(100-a)/100*i;this.ui.svgCircle.css("stroke-dashoffset",r)},onRender:function(){this.drawProgressBar()},onProgressChange:function(){this.drawProgressBar()}});t.a=s},function(e,t,n){"use strict";function i(e){return w.a.createElement("img",e)}function a(e){var t=e.src,n=e.style,i=e.width,a=e.height,r=e.backgroundSize,s=e.backgroundPosition,o=g()(e,["src","style","width","height","backgroundSize","backgroundPosition"]),l=p()({
backgroundImage:"url("+t+")",backgroundSize:r,backgroundPosition:s,width:i,height:a},n);return w.a.createElement("div",p()({style:l},o))}function r(e){var t=e.component,n=e.transitionProps,i=e.isLoaded,a=e.style,r=e.src,s=e.prevSrc,o=g()(e,["component","transitionProps","isLoaded","style","src","prevSrc"]),l=t;return w.a.createElement(E.a,n,i&&w.a.createElement(l,p()({style:k(2,a)},o,{src:r,key:r})),!i&&s&&w.a.createElement(l,p()({style:k(1,a)},o,{src:s,key:s})))}var s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(7),p=n.n(h),f=n(17),g=n.n(f),m=n(2),v=n.n(m),y=n(5),b=n.n(y),S=n(1),w=n.n(S),M=n(20),I=n(263),C=n(61),D=n(1282),T=n(677),x=n(25),P=n(302),E=n(218),A=new T.a,L="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
a.defaultProps={backgroundSize:"cover",backgroundPosition:"center"};var k=function(e,t){return p()({position:"absolute",zIndex:e},t)},N=function(e){function t(n,i){o()(this,t);var a=c()(this,e.call(this,n,i));return a.preloadImage=function(e){if(!a.props.allowImagePreloading)return b.a.Deferred().resolve(e).promise();var t=b.a.Deferred(),n=new window.Image,i=e.url,r=e.isPlaceholder;return n.onload=function(){n.onload=n.onabort=n.onerror=null,r?t.notify(e):t.resolve(e)},n.onabort=n.onerror=function(){
n.onload=n.onabort=n.onerror=null,t.reject(e)},n.src=i,t.promise()},a.onLoad=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url;a.setState({isLoaded:!0,src:t}),a.props.onLoad(a.state.url,t)},a.onError=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=e.isCanceled,i=void 0!==n&&n;i||(a.setState({isLoaded:!0,src:L}),a.props.onError(a.state.url,t))},a.state={isLoaded:!1,url:a.getImageUrl(n),src:L,prevSrc:L},a}return d()(t,e),t.prototype.componentDidMount=function(){
this.loadImage(this.props,this.state.url)},t.prototype.componentWillReceiveProps=function(e){var t=this.getImageUrl(e),n=this.state.url;if(n!==t){var i=this.state.src;this.setState({isLoaded:!1,url:t,prevSrc:i}),this.loadImage(e,t)}},t.prototype.shouldComponentUpdate=function(e,t){return n.i(x.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this.abortImage()},t.prototype.getImageUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;if(e.src)return e.src;if(e.url){
var t=n.i(I.a)(),i=p()({width:Math.round(e.width*t),height:Math.round(e.height*t)},e.allowServerFilters?e.filters:{});e.minSize&&(i.minSize=1),e.format&&(i.format=e.format),e.quality&&(i.quality=e.quality);var a=v.a.result(e,"url"),r=a.indexOf("?"),s=a;return r>-1?(s=M.join(a.substring(0,r),i),s+=s.indexOf("?")===-1?"?":"&",s+=a.substring(r+1)):s=M.join(s,i),s}},t.prototype.getImageProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.exposeUrl,n=e.backgroundSize,i=e.backgroundPosition,a=e.width,r=e.height,s=e.style,o=e.allowServerFilters,l=e.filters,c=e.className,u=this.state,d=u.src,h=u.url,f=o?s:p()({},s);
if(!o&&l){var g=[];v.a.isNumber(l.blur)&&g.push("blur("+l.blur+"px)"),v.a.isNumber(l.saturation)&&g.push("saturate("+l.saturation+"%)"),v.a.isNumber(l.opacity)&&g.push("opacity("+l.opacity+"%)"),g.length&&(f.filter=g.join(" "))}return{"data-image-url":t?h:void 0,src:d,style:f,className:c,backgroundSize:n,backgroundPosition:i,width:a,height:r}},t.prototype.loadImage=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments[1];if(this.abortImage(),!t)return void this.setState({
isLoaded:!0,src:L});var i=e.src?this.preloadImage({url:t}):this.loadBlob({url:t});this._cancelable=n.i(D.a)(i),this._cancelable.promise.then(this.onLoad,this.onError,this.onLoad)},t.prototype.loadBlob=function(e){var t=this,n=e.url;if(!this.props.allowImageBlobs)return this.preloadImage({url:n});var i=b.a.Deferred(),a=A.getBlobUrl(n);if(a)return i.resolve({url:a}),i.promise();var r=A.getPlaceholder(n);r&&i.notify({url:r,isPlaceholder:!0});var s=new window.XMLHttpRequest;return s.open("GET",n,!0),
s.responseType="arraybuffer",this._xhr=s,s.onreadystatechange=function(){if(4===s.readyState)if(s.onreadystatechange=null,t._xhr=null,200===s.status){var e=new window.Blob([s.response],{type:"image/jpeg"}),a=window.URL.createObjectURL(e);A.store({url:n,blobUrl:a}),i.resolve({url:a})}else i.reject({url:n})},s.send(),i.then(this.preloadImage,this.onError,this.preloadImage),i.promise()},t.prototype.abortImage=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.abort(),this._xhr=null),
this._cancelable&&this._cancelable.cancel()},t.prototype.render=function(){var e=this.props,t=e.background,n=e.transition,s=e.transitionProps,o=this.state,l=o.isLoaded,c=o.prevSrc,u=t?a:i,d=this.getImageProps();return n?w.a.createElement(r,p()({component:u,isLoaded:l,prevSrc:c,transitionProps:s},d)):w.a.createElement(u,p()({},d,{src:l?d.src:c}))},t}(S.Component);N.defaultProps={exposeUrl:!1,transition:!1,background:!1,minSize:!1,transitionProps:p()({},P.a,{style:{position:"relative"}}),filters:{},
allowServerFilters:!0,allowImageBlobs:C.a.hasBlob&&C.a.hasObjectUrl,allowImagePreloading:!0,onLoad:function(){},onError:function(){}},t.a=N},function(e,t,n){"use strict";var i=n(11),a=n.n(i),r=n(13),s=n.n(r),o=n(12),l=n.n(o),c=n(1),u=n.n(c),d=n(46),h=n.n(d),p=n(983),f=n.n(p),g=n(25),m=function(e){function t(n,i){a()(this,t);var r=s()(this,e.call(this,n,i));return r.removePortal=function(){var e=r.props.onPortalRef,t=r._portal;t&&(h.a.unmountComponentAtNode(t),document.body.removeChild(t)),r._portal=null,
r._portalRef=null,e&&e(null),r._closeTimeoutID=clearTimeout(r._closeTimeoutID)},r._portal=null,r._portalRef=null,r._closeTimeoutID=null,r}return l()(t,e),t.prototype.componentDidMount=function(){this.props.isOpen&&this.renderPortal(this.props)},t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype.componentDidUpdate=function(e){this.props.isOpen?(this._closeTimeoutID=clearTimeout(this._closeTimeoutID),this.renderPortal(this.props)):this._portal&&(this.props.closeTimeout&&this.renderPortal(this.props),
this._closeTimeoutID||(this._closeTimeoutID=setTimeout(this.removePortal,this.props.closeTimeout)))},t.prototype.componentWillUnmount=function(){this.removePortal()},t.prototype._setAttrs=function(e,t){this._setClassName(e,t.className),this._setStyle(e,t.style)},t.prototype._setClassName=function(e,t){null!=t&&(e.className=t)},t.prototype._setStyle=function(e,t){t&&f.a.setValueForStyles(e,t)},t.prototype.renderPortal=function(e){var t=this.props.onPortalRef,n=this._portal||document.createElement("div");
this._setAttrs(n,e),this._portal||document.body.appendChild(n);var i=u.a.Children.only(e.children);this._portal=n;var a=h.a.unstable_renderSubtreeIntoContainer(this,i,n);this._portalRef!==a&&(this._portalRef=a,t&&(t(null),t(this._portalRef)))},t.prototype.render=function(){return null},t}(c.Component);m.defaultProps={isOpen:!0,closeTimeout:0},t.a=m},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(7),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(2),f=n.n(p),g=n(1),m=(n.n(g),
n(28)),v=n.n(m),y=n(274),b=n(748),S=(n(471),n(1313)),w=function(e){function t(i,a){l()(this,t);var r=u()(this,e.call(this,i,a));return r.state=r._getListState(i),r._keyPool=n.i(S.a)("cell"),r._shouldRequestPage=!1,r}return h()(t,e),t.prototype.componentWillMount=function(){this.props.onListUpdate&&this.props.onListUpdate(this.state)},t.prototype.componentDidMount=function(){this._checkForPageRequest()},t.prototype.componentWillReceiveProps=function(e){var t=this._getListState(e);n.i(y.a)(this.state,t)||this.setState(t);
},t.prototype.shouldComponentUpdate=function(e,t){var n=this.props,i=this.state;return e.items!==n.items||e.size!==n.size||(e.viewportWidth!==n.viewportWidth||e.viewportHeight!==n.viewportHeight||(e.listTop!==n.listTop||e.listLeft!==n.listLeft||(e.isScrolling!==n.isScrolling||(e.skipRenderCells!==n.skipRenderCells||(e.layout!==n.layout||(t.visibleStartIndex!==i.visibleStartIndex||(t.visibleEndIndex!==i.visibleEndIndex||(t.partiallyVisibleStartIndex!==i.partiallyVisibleStartIndex||(t.partiallyVisibleEndIndex!==i.partiallyVisibleEndIndex||(t.renderStartIndex!==i.renderStartIndex||t.renderEndIndex!==i.renderEndIndex))))))))));
},t.prototype.componentWillUpdate=function(e,t){this.props.onListUpdate&&t!==this.state&&this.props.onListUpdate(t)},t.prototype.componentDidUpdate=function(){this._checkForPageRequest()},t.prototype._getListState=function(e){var t=this._getListStyle(e),n=e.layout.getRangesForPosition(e.scrollTop,e.scrollLeft,e.size);return{listStyle:t,visibleStartIndex:n.visibleStartIndex,visibleEndIndex:n.visibleEndIndex,partiallyVisibleStartIndex:n.partiallyVisibleStartIndex,partiallyVisibleEndIndex:n.partiallyVisibleEndIndex,
renderStartIndex:n.renderStartIndex,renderEndIndex:n.renderEndIndex}},t.prototype._getListStyle=function(e){var t=e.items,n=e.size,i=e.layout,a=e.viewportWidth,r=e.viewportHeight,s=e.listTop,o=e.listLeft,l={viewportWidth:a,viewportHeight:r,listTop:s,listLeft:o};return i.getListStyle(l,n,t)},t.prototype._checkForPageRequest=function(){var e=this.state;this._shouldRequestPage&&(this._shouldRequestPage=!1,this.props.onPageRequest({startIndex:e.renderStartIndex,endIndex:e.renderEndIndex}))},t.prototype.renderCells=function(){
var e=this.props,t=e.keyPropName,n=e.items,i=e.itemsOffset,a=e.size,r=e.layout,o=e.cellRenderer,l=e.isScrolling,c=e.onPageRequest,u=this.state,d=u.renderStartIndex,h=u.renderEndIndex,p=u.partiallyVisibleStartIndex,g=u.partiallyVisibleEndIndex,m=a>n.length&&h===n.length-1,v=this._keyPool.getKeys(d,h,n,i,t),y=[];return f.a.each(v,function(e,i){var c=e.index,u=e.item,d=c>=p&&c<=g,h=r.getPositionForIndex(c,a,n);null===u&&(m=!0);var v={key:i,keyPropName:t,isVisible:d,isScrolling:l,cellIndex:c,cellX:h.cellX,
cellY:h.cellY,cellWidth:h.cellWidth,cellHeight:h.cellHeight};f.a.isString(u)?v[t]=u:v=s()({},u,v),y.push(o(v))}),this._shouldRequestPage=!!c&&(m&&!l),y},t.prototype.render=function(){var e=this._getListStyle(this.props);return a()("div",{className:v()(this.props.className,this.props.isScrolling&&b.a),style:e},void 0,!this.props.skipRenderCells&&this.renderCells())},t}(g.Component);w.defaultProps={keyPropName:"entityID",items:[],itemsOffset:0,viewportWidth:0,viewportHeight:0,listTop:0,listLeft:0,isScrolling:!1,
skipRenderCells:!1},t.a=w},function(e,t,n){"use strict";function i(){function e(e,t){var n=e.listTop+":"+e.listLeft+":"+e.viewportWidth+":"+e.viewportHeight+":"+t;if(n===V)return H;O=e.listTop,R=e.listLeft;var i=e.viewportWidth-P-k,a=e.viewportHeight-T-A;m===r?i-=R:a-=O,j=N({innerViewportWidth:i,innerViewportHeight:a,innerHorizontalPadding:M,innerVerticalPadding:C}),z=_({cellWidth:j,innerViewportWidth:i,innerViewportHeight:a,innerHorizontalPadding:M,innerVerticalPadding:C}),U=v||Math.floor((a+C)/(z+C)),
F=y||Math.floor((i+M)/(j+M)),B=F*U;var s=m===r?F*(j+M)-M:Math.ceil(t/U)*(j+M)-M,o=m===r?Math.ceil(t/F)*(z+C)-C:U*(z+C)-C;return W={},V=n,H={width:s+P+k,height:o+T+A}}function t(e){var t=e;if(W[t])return W[t];var n=c(e),i=l(e),a={cellX:n*(j+M)+R+k,cellY:i*(z+C)+O+T,cellWidth:j,cellHeight:z};return W[t]=a,a}function i(e,t,i){var s=m===r?F:U,o=m===r?(e-O)/(z+C):(t-R)/(j+M),l=B+2*s+S*s*2,c=Math.ceil(o)*s,u=c+B-1,d=Math.floor(o)*s,h=c+B+s-1,p=d-s*S,f=n.i(a.a)(p,i)+l-1;return f>=i&&(p=i-l),{visibleStartIndex:n.i(a.a)(c,i),
visibleEndIndex:n.i(a.a)(u,i),partiallyVisibleStartIndex:n.i(a.a)(d,i),partiallyVisibleEndIndex:n.i(a.a)(h,i),renderStartIndex:n.i(a.a)(p,i),renderEndIndex:n.i(a.a)(f,i)}}function o(e,t,i,o){var l=m===i,c=m===r&&1===F||m===s&&1===U;if(l&&c)return n.i(a.a)(e+t,o);var f=void 0,g=void 0,v=void 0;i===r&&(f=l?F*t:t,g=d(e,o),v=p(e,o)),i===s&&(f=l?U*t:t,g=u(e,o),v=h(e,o));var y=e+f;return g||v?Math.max(Math.min(y,v),g):e}function l(e){return m===r?Math.floor(e/F):e%U}function c(e){return m===r?e%F:Math.floor(e/U);
}function u(e,t){var n=l(e);return m===r?n*F:n}function d(e,t){var n=c(e);return m===r?n:n*U}function h(e,t){if(m===r){var i=u(e,t);return n.i(a.a)(i+(F-1),t)}var s=t-1,o=l(e),d=c(s),h=(d+1)*U-(U-o),p=void 0;return p=h<t?h:s-t%U-(U-1-o)}function p(e,t){if(m===r){var i=t-1,s=c(e),o=l(i),u=(o+1)*F-(F-s),h=void 0;return h=u<t?u:i-t%F-(F-1-s)}var p=d(e,t);return n.i(a.a)(p+(U-1),t)}var f=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},g=f.direction,m=void 0===g?r:g,v=f.rows,y=f.columns,b=f.overscan,S=void 0===b?0:b,w=f.innerHorizontalPadding,M=void 0===w?0:w,I=f.innerVerticalPadding,C=void 0===I?0:I,D=f.outerPaddingTop,T=void 0===D?0:D,x=f.outerPaddingRight,P=void 0===x?0:x,E=f.outerPaddingBottom,A=void 0===E?0:E,L=f.outerPaddingLeft,k=void 0===L?0:L,N=f.getCellWidth,_=f.getCellHeight,O=void 0,R=void 0,j=void 0,z=void 0,U=void 0,F=void 0,B=void 0,V=void 0,H=void 0,W=void 0;
return{options:f,getListStyle:e,getRelativeIndex:o,getPositionForIndex:t,getRangesForPosition:i}}var a=(n(33),n(1315));n.d(t,"c",function(){return r}),n.d(t,"b",function(){return s}),t.a=i;var r="vertical",s="horizontal"},function(e,t,n){"use strict";var i=n(1);n.n(i),i.PropTypes.shape({getListStyle:i.PropTypes.func.isRequired,getPositionForIndex:i.PropTypes.func.isRequired,getRangesForPosition:i.PropTypes.func.isRequired})},function(e,t,n){"use strict";var i=n(1);n.n(i),i.PropTypes.shape({start:i.PropTypes.number.isRequired,
end:i.PropTypes.number.isRequired,size:i.PropTypes.number.isRequired})},function(e,t,n){"use strict";var i=n(32),a={capabilities:{embed:!0,redirect:!0},video:{protocols:{hls:{mimeType:"application/x-mpegURL"}},directPlay:{generic:{video:{maxWidth:1920,maxHeight:1280,maxFrameRate:60}},mp4:{mimeType:'video/mp4; codecs="avc1.42E01E"',video:{codecs:{h264:{}}},audio:{codecs:{aac:{}}}},mkv:{mimeType:"video/webm",video:{codecs:{vp8:{}}},audio:{codecs:{vorbis:{}}}},ogg:{mimeType:"video/ogg"},mpegts:{protocol:"hls"
},flv:{}},directStream:{video:{codecs:{h264:{}},maxWidth:1920,maxHeight:1280,maxBitDepth:8},audio:{codecs:{aac:{}},maxBitrate:192,maxChannels:2}}},music:{directPlay:{generic:{audio:{maxBitrate:350}},mp4:{mimeType:'audio/mp4; codecs="mp4a.40.5"',audio:{codecs:{aac:{}}}},mp3:{mimeType:'audio/mpeg; codecs="mp3"',audio:{codecs:{mp3:{}}}},ogg:{mimeType:'audio/ogg; codecs="vorbis"',audio:{codecs:{vorbis:{}}}},wav:{mimeType:"audio/wav",audio:{codecs:{pcm:{}}}}},directStream:{audio:{codecs:{mp3:{}},maxBitrate:320,
maxChannels:2}}}};"ie"===i.a.id&&"9.0"===i.a.version&&(a.video.directPlay.mp4.optimizedForStreaming=!0),t.a=a},function(e,t,n){"use strict";var i=n(175),a=n(75),r=n(1437),s=a.a.extend({model:r.a,url:"/playlists?type="+i.a.LOCAL,parse:function(e){return this.convert(e,"Playlist")}});t.a=s},function(e,t,n){"use strict";var i=n(18),a=n(16),r=i.a.extend({name:"EPGLanguageModel",context:["server"],rootPropertyName:"Language",idAttribute:"code",syncedAttrs:{code:a.a.string,title:a.a.string}});t.a=r},function(e,t,n){
"use strict";var i=n(16),a=n(57),r=n(38),s=n(18),o=n(1470),l=s.a.extend({name:"SearchModel",context:["server","provider"],idAttribute:"providerEntityID",url:function(){return this.get("key")},sessionAttrs:{providerEntityID:i.a.string,key:i.a.string,isSearchPending:i.a.boolean,isSearchPopulated:i.a.boolean,searchError:i.a.object},syncedRelations:{hubs:{relationClass:o.a,rootPropertyName:"Hub"}},defaults:{isSearchPending:!0,isSearchPopulated:!1},augmentResponseText:function(e,t){return t===a.a.xml?r.a.replaceMetadataXMLElementNames(e):e;
},augmentResponse:function(e){return e.Hub=e.Hub.filter(function(e){return"0"!==e.size}),e}});t.a=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),a=n(31);n.d(t,"resetEPGSettings",function(){return r}),n.d(t,"fetchEPGCountries",function(){return s}),n.d(t,"fetchEPGLanguages",function(){return o}),n.d(t,"selectEPGCountry",function(){return l}),n.d(t,"selectEPGLanguage",function(){return c}),n.d(t,"selectEPGRegion",function(){return u}),n.d(t,"setEPGPostalCode",function(){
return d}),n.d(t,"fetchEPGLineups",function(){return h});var r=n.i(i.a)(a._79),s=n.i(i.a)(a._80),o=n.i(i.a)(a._81),l=n.i(i.a)(a._82),c=n.i(i.a)(a._83),u=n.i(i.a)(a._84),d=n.i(i.a)(a._85),h=n.i(i.a)(a._86)},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.get("playQueueItem");if(i){var a=i.get("metadataItem"),l=r.a.first(a.get("Media")),c=r.a.first(l&&l.Part),u=s.a.states.PLAYING;e.get("videoPaused")&&e.get("slideshowPaused")&&(u=s.a.states.PAUSED);
var d={playQueueItem:i,metadataItem:a,media:l,part:c,position:Math.floor(e.get("videoPosition")||0),duration:Math.floor(e.get("duration")||0),state:t.state||u,continuing:t.continuing};n.i(o.a)(d).done(function(){var t=e.get("playQueue");t&&t.fetch()})}}var a=n(2),r=n.n(a),s=n(39),o=n(718);t.a=i},function(e,t,n){"use strict";var i=n(53),a=n(31);n.d(t,"n",function(){return r}),n.d(t,"q",function(){return s}),n.d(t,"m",function(){return o}),n.d(t,"o",function(){return l}),n.d(t,"p",function(){return c;
}),n.d(t,"s",function(){return u}),n.d(t,"r",function(){return d}),n.d(t,"a",function(){return h}),n.d(t,"c",function(){return p}),n.d(t,"f",function(){return f}),n.d(t,"g",function(){return g}),n.d(t,"h",function(){return m}),n.d(t,"j",function(){return v}),n.d(t,"k",function(){return y}),n.d(t,"i",function(){return b}),n.d(t,"l",function(){return S}),n.d(t,"b",function(){return w}),n.d(t,"d",function(){return M}),n.d(t,"e",function(){return I});var r=n.i(i.a)(a._107),s=n.i(i.a)(a._108),o=n.i(i.a)(a._109),l=n.i(i.a)(a._110),c=n.i(i.a)(a._111),u=n.i(i.a)(a._112),d=n.i(i.a)(a._113),h=n.i(i.a)(a._114),p=n.i(i.a)(a._115),f=(n.i(i.a)(a._116),
n.i(i.a)(a._117)),g=n.i(i.a)(a._118),m=n.i(i.a)(a._119),v=n.i(i.a)(a._120),y=n.i(i.a)(a._121),b=n.i(i.a)(a._122),S=n.i(i.a)(a._123),w=n.i(i.a)(a._114,function(){return{shuffle:!0}}),M=n.i(i.a)(a._116,function(){return{watched:!0}}),I=n.i(i.a)(a._116,function(){return{watched:!1}})},function(e,t,n){"use strict";var i=n(53),a=n(31);n.d(t,"a",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return l}),n.d(t,"e",function(){return c});var r=n.i(i.a)(a._87),s=n.i(i.a)(a._88),o=n.i(i.a)(a._89),l=n.i(i.a)(a._90),c=n.i(i.a)(a._91);
},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(r.a)(),function(e){if(e&&!e.isExtra&&"photo"!==e.type)return"track"===e.type?e.skipParent?e.grandparentKey:e.parentKey:e.key})}var a=n(9),r=(n.n(a),n(29));t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(r.a)(),s.a,function(e,t){return!!e&&n.i(o.a)(t,e.ratingKey)})}var a=n(9),r=(n.n(a),n(29)),s=n(1567),o=n(2207);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(s.a)(),function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type&&r.a.getChildMediaType(e.type),n=t&&t.element;return n})}var a=n(9),r=(n.n(a),n(36)),s=n(29);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){var n=t.listType;return n},n.i(r.a)(),function(e,t){return!t||e&&"mixed"!==e?e:t.extraType?"extra":t.type})}var a=n(9),r=(n.n(a),n(29));t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(r.a)(),function(e){if(!e||!e.Media)return{};
var t=e.entityID,i=e.type,a=e.thumb,r=e.Media,o=r[0],l="clip"===i,c=o&&o.Part&&o.Part[0],u=c&&c.key,d=l||!u?a:u,h=c&&c.orientation,p=h&&n.i(s.a)(h);return{entityID:t,imageWidth:o&&(p?o.height:o.width),imageHeight:o&&(p?o.width:o.height),url:d,isVideo:l}})}var a=n(9),r=(n.n(a),n(29)),s=n(722);t.a=i},function(e,t,n){"use strict";var i=n(2700),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(128),d=n(88),h=n(21),p=c.a.ItemView.extend({tagName:"span",className:"dropdown",template:a.a,modelEvents:{
"change:Media":"render","change:streams":"render"},events:{"click .dropdown-menu a":"onStreamClick"},initialize:function(e){this.streamType=d.a.get(e.type),this.disabled=e.disabled,this.media=e.media},serializeData:function(){var e=this.model.server.get("multiuser"),t=this.model.server.get("shared"),i=n.i(u.a)(this.media,{streamType:this.streamType.id}),a=n.i(u.a)(this.media,{streamType:this.streamType.id,selected:!0}),r=s.a.first(a);return{showDropdown:!this.disabled&&i.length>1&&(!t||e),type:this.streamType.typeString,
streams:i,selectedStream:r}},onRender:function(){this.$el.attr("id",this.streamType.typeString+"-dropdown")},onStreamClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("id");h.a.execute("selectStream",{item:this.model,streamType:this.streamType,streamID:n})}});t.a=p},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(4),c=o.a.Layout.extend({events:{"click .edit-lock-addon":"onLockClick","keyup .lockable-field:not(.selectized)":"onLockableFieldChange",
"change .lockable-field:not(.selectized)":"onLockableFieldChange"},ui:{form:".edit-metadata-form"},serializeData:function(){var e=this.model.get("lockedFields"),t={};e&&e.each(function(e){t[e.get("name")]=e.get("locked")});var i=this.model.toJSON(),a=this.model.get("mixedFields"),r={originallyAvailableAt:n.i(l.default)("YYYY-MM-DD")};return a&&a.forEach(function(e){r[e]=n.i(l.default)("MIXED")}),{item:i,locked:t,placeholders:r,canReparent:this.canReparent,canEditSimilarArtists:this.canEditSimilarArtists,
disableIndices:!this.canReparent}},flushChanges:function(){},getLockedFieldsArray:function(){var e=this.ui.form,t=this.model.get("lockedFields").reduce(function(e,t){return e[t.get("name")]=t.get("locked"),e},{});return e.find(".edit-lock-addon").each(function(e,n){var i=s()(n),a=i.data("field");i.hasClass("locked")?t[a]=!0:a in t&&(t[a]=!1)}),a.a.map(t,function(e,t){return{name:t,locked:e}})},onLockClick:function(e){e.preventDefault();var t=s()(e.currentTarget);t.hasClass("disabled")||s()(e.currentTarget).toggleClass("locked");
},onLockableFieldChange:function(e){var t=e instanceof s.a?e:s()(e.currentTarget);if(!e.force){var n=t.data("original-value");if(void 0===n&&(n=t.attr("value")||t.val()),t.data("original-value",n),t.val()===n)return}t.siblings(".edit-lock-addon").addClass("locked")}});t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(47),s=n(10),o=n(8),l=n(334),c=n(739),u=n(220),d=n(1302),h=n(1035),p=(n.n(h),d.a.extend({mixins:u.a,paginated:!0,scrollPosition:0,scrollDirection:"down",mergeDelay:5e3,viewsByModel:{},
initialize:function(e){d.a.prototype.initialize.apply(this,arguments),a.a.bindAll(this,"onResize","onScroll"),this.listModel=e.listModel,this.mediaActions=e.mediaActions,u.a.initialize.apply(this,arguments),null!=e.paginated&&(this.paginated=e.paginated),this.channelName=e.channelName||"content",this.initializingScrollPosition=!0,this.merge=a.a.throttle(a.a.bind(this.merge,this),this.mergeDelay),this.listModel.scrollPosition&&(this.restoringScrollPosition=!0,this.scrollPosition=this.listModel.scrollPosition),
this.listenTo(this.collection,"reset",this.onCollectionReset),this.listenTo(this.collection,"add",this.onCollectionAdd),this.listenTo(this.collection,"remove",this.onCollectionRemove),o.a.trigger(this.channelName+".subscribe:resize",this.onResize),o.a.trigger(this.channelName+".subscribe:scroll",this.onScroll),o.a.trigger("start:scrollListener")},getLockIndexes:function(){var e,t=this.getVisibleBounds(),n=this.getLockBounds(),i=this.getIndexBounds(),r=a.a.range(t.from,t.to+1),s=a.a.range(t.to+1,n.to+1),o=a.a.range(t.from-1,n.from-1,-1);
return"down"===this.scrollDirection?(o.reverse(),e=r.concat(s,o)):(r.reverse(),o.reverse(),e=r.concat(o,s)),a.a.filter(e,function(e){return e>=i.from&&e<=i.to},this)},getVisibleBounds:function(){if(this.itemHeight&&this.itemsPerRow&&this.itemsPerPage){var e=Math.floor(this.scrollPosition/this.itemHeight)*this.itemsPerRow;return e>this.getTotalSize()&&(this.scrollPosition=0,e=0),{from:e,to:e+this.itemsPerPage-1+2*this.itemsPerRow}}return{from:0,to:0}},getLockBounds:function(){var e=this.getPageSize(),t=this.getVisibleBounds();
return{from:t.from-e,to:t.to+e}},prepareCells:function(e){var t=this.getIndexBounds();this.pool.filter(function(e){return t.from<=e.id&&t.to>=e.id},this);var n=a.a.reject(e,this.getModelForId,this);if(n.length&&this.paginated){if(this.listModel.populatePromise&&"pending"===this.listModel.populatePromise.state())return void this.listModel.populatePromise.done(a.a.bind(this.prepareCells,this,e));var i=l.a.roundByPage({start:a.a.min(n),last:a.a.max(n)},2*this.getPageSize()),r=this.listModel.populateRange(i);
this.trigger("change:loading",!0,{prepend:"up"===this.scrollDirection}),r.always(a.a.bind(function(){this.trigger("change:loading",!1)},this))}},moveCell:function(e){if(e.updatedCSS||(e.view.$el.css({position:"absolute"}),e.updatedCSS=!0),this.itemWidth&&this.itemsPerRow){var t=e.id%this.itemsPerRow,n=Math.floor(e.id/this.itemsPerRow);e.view.$el.translate(t*this.itemWidth,n*this.itemHeight),e.movedToIndex=e.id}},moveElement:function(){},createCellView:function(e){var t=s.a.getOption(this,"itemViewOptions");
a.a.isFunction(t)&&(t=t.call(this,e)),t=a.a.clone(t),t.model=this.getModelForId(e.id),t.mediaActions=this.mediaActions,e.el&&(t.el=e.el);var n=s.a.getOption(this,"itemView");n._ensureElementExtension||(n._ensureElementExtension=n.extend({_ensureElement:function(){var e=this.el?a.a.result(this,"el"):r.a.$("<"+a.a.result(this,"tagName")+">");this.setElement(e,!1);var t=a.a.extend({},a.a.result(this,"attributes"));this.id&&(t.id=a.a.result(this,"id")),this.className&&(t.class=a.a.result(this,"className")),
this.$el.attr(t)}}));var i=new n._ensureElementExtension(t);return e.el||(this.$el.append(i.$el),e.el=i.el),this.forwardItemViewEvents(i),i.remove=function(){return this.stopListening(),this.$el.unbind(),this.$el.empty(),this},i},getPageSize:function(){return this.itemsPerPage||1},clearAllReusedCells:function(){this.pool.each(function(e){var t=e.filledWithIndex===e.id,n=e.filledWithIndex===-1;t||n||(this.clearCell(e),e.filledWithIndex=-1)},this)},getTotalSize:function(){return this.listModel.getTotalSize();
},fillCell:function(e){var t=this.getModelForId(e.id);return!(!t||t!==e.view.model||e.view.isClosed)||(this.clearCell(e),!!t&&(e.view=this.createCellView(e),e.view.render(),this.indexViewByModel(e.view),!0))},clearCell:function(e){var t=e.view;t.model&&delete this.viewsByModel[t.model.cid],t.isClosed||t.close()},getIndexBounds:function(){return{from:0,to:this.getTotalSize()-1}},getModelForId:function(e){var t=this.listModel.get("populatedRange"),n=e-t.start;if(!(n<0))return this.collection.at(n)},
getViewForModel:function(e){return this.viewsByModel[e.cid]},indexViewByModel:function(e){this.viewsByModel[e.model.cid]=e},render:function(){this.updateHeight(),this.restoringScrollPosition||(d.a.prototype.render.apply(this,arguments),this.clearAllReusedCells())},updateHeight:function(){this.recalculateHeight&&(this.recalculateHeight=!1,this.listHeight=Math.ceil(this.getIndexBounds().to/this.itemsPerRow)*this.itemHeight-this.itemMarginBottom,this.$el.css("height",this.listHeight),this.initScrolling());
},itemViewOptions:function(){var e,t,n=this.listModel.section;if(n){var i=n.get("currentType"),r=this.listModel.getSort();if(e=i&&i.get("typeString"),r){var s=r.split(":");s.length&&(t=a.a.first(s))}}else e="clip";return{type:e,sort:t}},measureItem:function(){var e=this.createCellView({id:this.listModel.get("populatedRange").start});e.model||(this.remeasureItem=!0),e.render(),e.$el.css("visibility","hidden");var t=e.$el.appendTo(this.$el);a.a.defer(a.a.bind(function(){this.itemWidth=t.outerWidth(!0),
this.itemHeight=t.outerHeight(!0),this.itemMarginRight=parseInt(t.css("margin-right"),10),this.itemMarginBottom=parseInt(t.css("margin-bottom"),10),e.close(),e.$el.remove(),this.measureContainer(),this.render()},this))},measureContainer:function(){var e=parseInt(this.$el.css("margin-top"),10),t=parseInt(this.$el.css("margin-bottom"),10);this.containerWidth=this.$el.width(),this.containerHeight=this.containerSize.height-e-t,this.itemsPerRow=Math.floor(this.containerWidth/this.itemWidth),this.itemsPerColumn=Math.floor((this.containerHeight+this.itemMarginBottom)/this.itemHeight),
this.itemsPerPage=this.itemsPerRow*this.itemsPerColumn,this.itemsPadding=this.itemsPerRow*Math.max(this.itemsPerColumn,2),this.itemsPerPageWithPadding=2*this.itemsPadding+this.itemsPerPage,this.itemHeight&&(this.recalculateHeight=!0)},scrollToIndex:function(e){var t=Math.floor(e/this.itemsPerRow),n=t*this.itemHeight;this.restrictScrollDirection=!0,o.a.trigger("update:scrollPosition",n)},merge:function(){if(!this.isClosed){var e=this.listModel.get("populatedRange"),t=e.start,n=e.end>this.itemsPerPageWithPadding?e.end:this.itemsPerPageWithPadding;
if(n){if(t>0)return this.scrollDirection="up",void this.listModel.populateRange({start:0,size:t});this.listModel.set({currentPageStart:t,currentPageSize:n});var i=this.listModel.fetch();i.done(a.a.bind(function(){this.listModel.scrollPosition=this.scrollPosition,this.onCollectionReset()},this))}}},initScrolling:function(){this.initializingScrollPosition&&(this.restrictScrollDirection=!0,this.initializingScrollPosition=!1,this.restoringScrollPosition=!1,this.listModel.scrollPosition?o.a.trigger("update:scrollPosition",this.listModel.scrollPosition):this.containerScrollPosition.scrollTop>0&&o.a.trigger("update:scrollPosition",0));
},onDeselectAll:function(e){a.a.each(e,function(e){this.pool.each(function(t){t.view.model===e&&t.view.deselect()},this)},this)},onClose:function(){d.a.prototype.onClose.apply(this,arguments),u.a.onClose.apply(this,arguments),o.a.trigger("stop:scrollListener"),o.a.trigger(this.channelName+".unsubscribe:resize",this.onResize),o.a.trigger(this.channelName+".unsubscribe:scroll",this.onScroll),this.listModel.scrollPosition=this.scrollPosition},onCollectionReset:function(e,t){this.isRefreshing||(c.a.cancel(this.cid),
this.pool.each(function(e){e.id=e.filledWithIndex=this.collection.indexOf(e.view.model)},this),this.pool.reindex(),t&&t.previousModels&&a.a.each(t.previousModels,this.onCollectionRemove,this),this.initializingScrollPosition=!0,this.measureItem(),this.render(),this.getTotalSize()||this.trigger("change:loading",!1))},onCollectionAdd:function(e){this.remeasureItem&&(this.remeasureItem=!1,this.measureItem(e))},onCollectionRemove:function(e){var t=this.pool.findByModel(e),n=t&&t.view||{model:e,deselect:function(){}
};this.triggerMethod("item:removed",n)},onResize:function(e){this.containerSize=e,this.measureItem(),this.scrollDirection=this.containerWidth>this.$el.width()?"up":"down",this.render()},onScroll:function(e){this.containerScrollPosition=e,this.restoringScrollPosition||(this.itemWidth||this.measureItem(),0!==this.containerScrollPosition.scrollTop&&this.containerScrollPosition.scrollTop<this.scrollPosition?this.scrollDirection="up":this.scrollDirection="down",this.restrictScrollDirection&&(this.scrollDirection="down",
this.restrictScrollDirection=!1),this.scrollPosition=this.containerScrollPosition.scrollTop,this.render())}}));t.a=p},function(e,t,n){"use strict";var i=n(2746),a=n.n(i),r=n(2),s=n.n(r),o=n(137),l=n(54),c=o.a.extend({className:"striped-list-item media-list-item media-details-list-item",template:a.a,ui:s.a.extend({poster:".media-poster"},o.a.prototype.ui),initialize:function(e){o.a.prototype.initialize.apply(this,arguments),this.model&&this.createImageView()},createImageView:function(){var e=this.type;
"episode"===e&&(e="show"),this.image=new l.a({model:this.model,type:e,getUrl:this.getPosterUrl,height:150})},bindings:s.a.extend({},o.a.prototype.bindings,{".media-count-badge":{modelAttribute:"Media",formatter:function(e){return e&&e.length||0},autohide:function(e){return!/^(clip|userPlaylistItem)$/.test(this.model.get("type"))&&e>1}},".unwatched-count-badge":{modelAttribute:"unviewedLeafCount",autohide:function(e){return!(this.shared&&!this.multiuser)&&(!/^(artist|album)$/.test(this.model.get("type"))&&!!e);
}},".media-tagline":{modelAttribute:"tagline",autohide:!0},".media-summary":{modelAttribute:"summary",autohide:!0}})});t.a=c},function(e,t,n){"use strict";var i=n(220),a=n(40),r=a.a.extend({mixins:[i.a],onAddChild:function(e){this.forwardItemViewEvents(e)}});t.a=r},function(e,t,n){"use strict";var i=n(2786),a=n.n(i),r=n(2),s=n.n(r),o=n(138),l=n(20),c=o.a.extend({name:"downloadVersionModal",template:a.a,serializeData:function(){var e=this.model,t=s.a.map(this.model.get("Media"),function(t,n){var i=s.a.clone(t);
i.downloadUrl=e.getDownloadUrl(n);var a=e.getFilepath(n);return a&&(i.downloadName=l.getLastSegment(a)),i});return{defaultLinkTarget:"_self",mediaItems:t}},onClick:function(){}});t.a=c},function(e,t,n){"use strict";var i=n(2794),a=n.n(i),r=n(5),s=n.n(r),o=n(21),l=n(138),c=l.a.extend({name:"playVersionModal",template:a.a,serializeData:function(){return{mediaItems:this.model.get("Media")}},onClick:function(e){e.preventDefault();var t=s()(e.currentTarget).data("value"),n=this.model.get("Media")[t];o.a.execute("playMedia",{
item:this.model,media:n}),this.promise.resolve(n),this.hide()}});t.a=c},function(e,t,n){"use strict";var i=n(2795),a=n.n(i),r=n(14),s=n(50),o=s.a.extend({name:"plexPassModal",template:a.a,serializeData:function(){var e=r.a("appModel"),t=e.get("user").server;return{plexPassUrl:t.get("plexPassUrl"),friendlyName:this.model.get("friendlyName"),isClaimed:this.model.get("isClaimed")}}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(813),s=r.a.extend({className:"player mini-player",isMini:!0,
regions:{controls:".mini-player-controls"},shortcutListeners:function(){var e=r.a.prototype.shortcutListeners.apply(this,arguments);return a.a.omit(e,"shortcut:stop")}});t.a=s},function(e,t,n){"use strict";var i=n(2851),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(125),c=n(4),u=n(54),d=n(158),h=n(1579),p=n(1575),f=n(814),g=n(356),m=n(1626),v=n(791),y=n(1632),b=o.a.Layout.extend({template:a.a,muted:!1,mutedVolume:0,ui:{poster:".media-poster",previousBtn:".previous-btn",nextBtn:".next-btn",volumeBtn:".volume-btn",
shuffleBtn:".shuffle-btn",repeatBtn:".repeat-btn",scrubPreview:".mini-player-scrub-preview",scrubPreviewText:".mini-player-scrub-preview>.tooltip-inner",dropdown:"#player-actions-dropdown"},regions:{rating:".rating-container",dropdown:"#player-actions-dropdown",seekBar:".seek-bar-container",volume:".player-volume-slider-container",playQueue:".player-play-queue-container",lyrics:".player-lyrics-container"},modelEvents:{"change:metadataItem":"onMetadataItemChange","change:volume":"onVolumeChange","change:canSkipNextMessage":"onCanSkipNextMessageChange",
"change:canShuffle":"onCanShuffleChange","change:shuffled":"onShuffledChange","change:canRepeat":"onCanRepeatChange","change:repeatAll change:repeatItem":"onRepeatChange"},events:{"click .volume-btn":"onVolumeClick"},triggers:{"click .play-btn":{event:"play",preventDefault:!0},"click .pause-btn":{event:"pause",preventDefault:!0},"click .previous-btn":{event:"previous",preventDefault:!0},"click .next-btn":{event:"next",preventDefault:!0},"click .shuffle-btn":{event:"toggleShuffle",preventDefault:!0
},"click .repeat-btn":{event:"nextRepeat",preventDefault:!0},"click .maximize-btn":{event:"maximize",preventDefault:!0},"click .stop-btn":{event:"stop",preventDefault:!0},"click .media-poster-container":{event:"navigate:item",preventDefault:!0},"click .grandparent-title":{event:"navigate:grandparent",preventDefault:!0},"click .item-title":{event:"navigate:item",preventDefault:!0}},onlyAfterRender:["onVolumeChange","onCanShuffleChange","onShuffledChange","onCanRepeatChange","onRepeatChange"],initialize:function(e){
var t=e.upNextCollection;this.playQueueDropdown=new v.a({model:this.model,collection:t}),this.lyricsDropdown=new y.a({model:this.model}),this.setupPosterImage(),this.seekBarView=new f.a({model:this.model}),this.volumeSlider=new g.a({className:"player-volume-slider player-slider",value:this.model.get("volume")}),this.listenTo(this.seekBarView,"change:value",this.onSeekBarValueChange),this.listenTo(this.seekBarView,"hover",this.onSeekBarHover),this.listenTo(this.volumeSlider,"change:value",this.onVolumeSliderValueChange),
this.listenTo(this.playQueueDropdown,{"itemview:skip":this.onSkip,"itemview:remove":this.onRemove,move:this.onMove})},getPosterUrl:function(e){return e=e||this.model.get("parentThumb")||this.model.get("grandparentThumb"),e||(this.model.parent?e=this.model.parent.get("thumb"):this.model.channel&&(e=this.model.channel.get("thumb"))),e},setupPosterImage:function(){var e=this.model.get("metadataItem");this.posterImage=new u.a({model:e,type:e.get("type"),getUrl:this.getPosterUrl,height:80,exposeUrl:!0
}),this.listenTo(this.posterImage,"load",this.onPosterLoad)},updatePosterTitle:function(e){var t=e.get("parentTitle")||e.get("title");this.ui.poster.attr({"data-image-title":t,"data-title":e.get("title"),"data-parent-title":e.get("parentTitle"),"data-grandparent-title":e.get("originalTitle")||e.get("grandparentTitle")})},updateVolumeBtn:function(e){var t=this.ui.volumeBtn;e>50?(this.muted=!1,t.addClass("high"),t.removeClass("low mute")):e<=50&&e>0?(this.muted=!1,t.addClass("low"),t.removeClass("high mute")):(this.muted=!0,
t.addClass("mute"),t.removeClass("high low"))},updateShuffleBtn:function(){var e=this.model.get("canShuffle"),t=this.model.get("shuffled");this.ui.shuffleBtn.toggleClass("disabled",!e),this.ui.shuffleBtn.toggleClass("selected",!!t)},updateRepeatBtn:function(){var e=this.model.get("canRepeat"),t=this.model.get("repeatAll"),n=this.model.get("repeatItem"),i=this.ui.repeatBtn;i.toggleClass("disabled",!e),n&&!t?(i.addClass("one"),i.addClass("selected")):t&&!n?(i.removeClass("one"),i.addClass("selected")):(i.removeClass("one"),
i.removeClass("selected"))},updateAncillaryBtns:function(){var e=this.ui.shuffleBtn.parent(),t=this.model.get("showShuffle")||this.model.get("showRepeat")||this.model.get("showLyrics");s()(e).toggleClass("hidden",!t)},updateRatingView:function(e){var t="track"===e.get("type");if(this.$(this.rating.el).toggleClass("hidden",!t),t){var n,i=e.get("isLibraryItem"),a=this.model.get("playQueueItem"),r=this.model.get("playQueue"),s=r&&r.get("isRadio"),o=a.get("advertisement");o?n=p.a:s?n=h.a:i&&(n=d.a),n&&this.rating.show(new n({
model:e}))}},updateMoreActionsDropdown:function(){var e=this.model.get("metadataItem"),t=this.model.get("playQueue");return t&&t.get("isRadio")?void this.ui.dropdown.addClass("hidden"):(this.ui.dropdown.removeClass("hidden"),void this.dropdown.append(new m.a({model:e,playQueue:t})))},updateControlTooltips:function(){var e=this.model.get("playQueueItem"),t=e.get("advertisement")?n.i(c.default)("Your mix will resume shortly."):this.model.get("canSkipNextMessage");this.ui.nextBtn.attr({title:t,"data-original-title":t
}),this.$el.tooltip({selector:".next-btn",container:"body",placement:"top"})},updatePosterImages:function(e){this.posterImage.src=null,this.posterImage.setModel(e),this.posterImage.render()},bindings:{".grandparent-title":{modelAttribute:"metadataItem",autohide:!0,formatter:function(e,t){var n=this.model.get("playQueue");t.toggleClass("clickable",!n.get("isRadio"));var i=e.get("originalTitle")||e.get("grandparentTitle");return i?i:e.channel?e.channel.get("title"):void 0}},".item-title":{modelAttribute:"metadataItem",
autohide:!0,formatter:function(e,t){var n=this.model.get("playQueue");return t.toggleClass("clickable",!n.get("isRadio")),e.get("title")}},".previous-btn":{modelAttribute:"canSkipPrevious",manual:!0,formatter:function(e,t){t.toggleClass("disabled",!e)}},".play-btn":{modelAttribute:"paused",modelListeners:["paused","canPlayPause"],manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.model.get("canPlayPause")),e}},".pause-btn":{modelAttribute:"paused",modelListeners:["paused","canPlayPause"],
manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.model.get("canPlayPause")),!e}},".stop-btn":{modelAttribute:"canStop",manual:!0,autohide:!0},".next-btn":{modelAttribute:"canSkipNext",manual:!0,formatter:function(e,t){t.toggleClass("disabled",!e)}},".shuffle-btn":{modelAttribute:"showShuffle",manual:!0,autohide:!0},".repeat-btn":{modelAttribute:"showRepeat",manual:!0,autohide:!0},".ancillary-btns":{modelAttribute:"showShuffle",modelListeners:["showShuffle","showRepeat","showLyrics"],
manual:!0,formatter:function(e,t){var n=this.model.get("showRepeat"),i=this.model.get("showLyrics"),a=e||n||i;return t.toggleClass("hidden",!a),null}},".seek-bar-container":{modelAttribute:"showSeekBar",manual:!0,autohide:!0},".mini-controls-numeric-progress":{modelAttribute:"showSeekBar",manual:!0,autohide:!0},".player-position":{modelAttribute:"position",modelListeners:["position","duration"],formatter:function(e){var t=this.model.get("duration");return!!t&&n.i(l.a)(e)}},".separator":{modelAttribute:"duration",
formatter:function(e){return!!e&&"/"}},".player-duration":{modelAttribute:"duration",formatter:function(e){return!!e&&n.i(l.a)(e)}},".volume-btn":{modelAttribute:"canSetVolume",manual:!0,autohide:!0,formatter:function(e,t){return this.$el.toggleClass("show-volume",e),e}},".maximize-btn":{modelAttribute:"showMaximize",manual:!0,autohide:!0},".minimize-btn":{modelAttribute:"showMinimize",manual:!0,autohide:!0},".media-poster-container":{modelAttribute:"playQueue",manual:!0,formatter:function(e,t){t.toggleClass("clickable",!e.get("isRadio"));
}}},onRender:function(){var e=this.model.get("metadataItem");this.updatePosterTitle(e),this.updateRatingView(e),this.posterImage.setElement(this.ui.poster),this.updateControlTooltips(),this.updateMoreActionsDropdown(),this.seekBar.append(this.seekBarView),this.volume.show(this.volumeSlider),this.playQueue.show(this.playQueueDropdown),this.lyrics.show(this.lyricsDropdown),this.updateAncillaryBtns(),this.updateShuffleBtn(),this.updateRepeatBtn(),this.updateVolumeBtn(this.model.get("volume"))},onClose:function(){
this.posterImage.close()},onMetadataItemChange:function(e,t){this.updatePosterImages(t),this.updatePosterTitle(t),this.updateRatingView(t),this.updateControlTooltips(),this.updateMoreActionsDropdown()},onCanSkipNextMessageChange:function(){this.updateControlTooltips()},onVolumeChange:function(e,t){this.volumeSlider.displayValue(t),this.updateVolumeBtn(t)},onCanShuffleChange:function(e,t){this.updateShuffleBtn()},onShuffledChange:function(e,t){this.updateShuffleBtn()},onCanRepeatChange:function(e,t){
this.updateRepeatBtn()},onRepeatChange:function(e,t){this.updateRepeatBtn()},onPosterLoad:function(e){this.trigger("load:poster",e)},onSeekBarValueChange:function(e){this.trigger("change:position",e)},onSeekBarHover:function(e){this.ui.scrubPreview.toggleClass("in",!!e),e&&(this.ui.scrubPreviewText.text(n.i(l.a)(e.time)),this.ui.scrubPreview.css("left",e.position-this.ui.scrubPreview.outerWidth()/2+"px"))},onVolumeSliderValueChange:function(e){this.trigger("change:volume",e)},onVolumeClick:function(e){
e.preventDefault(),this.muted?(this.mutedVolume>0?this.trigger("change:volume",this.mutedVolume):this.trigger("change:volume",100),this.muted=!1,this.mutedVolume=0):(this.muted=!0,this.mutedVolume=this.model.get("volume"),this.trigger("change:volume",0))},onSkip:function(e,t){this.trigger("skip",t)},onRemove:function(e,t){this.trigger("remove",t)},onMove:function(e,t){this.trigger("move",e,t)}});t.a=b},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.circleClassName,a=e.iconClassName,s=e.title,l=c()(e,["className","circleClassName","iconClassName","title"]);
return d.a.createElement(p.a,r()({className:t,"aria-label":n.i(h.default)("Record {1}",s)},l),o()("div",{className:i},void 0,o()("span",{className:a})))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(4),p=n(26),f=n(2389),g=n.n(f);i.defaultProps={className:g.a.recordButton,circleClassName:g.a.recordCircle,iconClassName:g.a.recordIcon},t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(28),f=n.n(p),g=n(219),m=n(2392),v=n.n(m),y=function(e){
function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onChange=function(e){var t=e.target.checked,n=t?a.props.checkedValue:a.props.uncheckedValue;a.props.value!==n&&a.props.onChange(n)},a.setRef=function(e){a._checkbox=e},a._checkbox=null,a}return u()(t,e),t.prototype.componentDidMount=function(){this.setIndeterminate()},t.prototype.componentDidUpdate=function(){this.setIndeterminate()},t.prototype.setIndeterminate=function(){if(this._checkbox){var e=this.props,t=e.value,n=e.uncheckedValue,i=e.checkedValue;
this._checkbox.indeterminate=t!==n&&t!==i}},t.prototype.render=function(){var e=this.props,t=e.className,n=e.inputClassName,i=e.errorClassName,r=e.disabledClassName,s=e.isDisabled,o=e.size,l=e.checkboxText,c=e.name,u=e.value,d=e.checkedValue,p=e.hasError;return a()("label",{className:f()(t,v.a[o],s&&r,p&&i),htmlFor:c},void 0,h.a.createElement("input",{ref:this.setRef,id:c,type:"checkbox",disabled:s,className:n,checked:u===d,onChange:this.onChange}),l)},t}(d.Component);y.defaultProps={className:v.a.label,
inputClassName:v.a.input,errorClassName:v.a.hasError,disabledClassName:v.a.isDisabled,isDisabled:!1,size:g.LARGE,uncheckedValue:!1,checkedValue:!0,value:!1,hasError:!1},t.a=y},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(function(e){var t,n=e.label,i=e.value;return t={},t[i]=n,t})}function a(e){var t=e.id,n=e.type,a=e.label,r=e.summary,o=e.value,f=e.initialValueModifier,g=e.enumValues,m={name:t,helpText:r,initialValue:f(o)};
if(Array.isArray(g))return l.a.createElement(u.a,s()({labelText:a},m,{values:i(g)}));switch(n){case c.a.TEXT:return l.a.createElement(d.a,s()({labelText:a},m));case c.a.BOOL:return l.a.createElement(p.a,s()({checkboxText:a},m));case c.a.INT:return l.a.createElement(h.a,s()({labelText:a},m));default:return null}}var r=n(7),s=n.n(r),o=n(1),l=n.n(o),c=n(649),u=n(820),d=n(499),h=n(1849),p=n(819);a.defaultProps={initialValueModifier:function(e){return e}},t.a=a},function(e,t,n){"use strict";function i(e){
var t=e.name,n=e.labelText,i=e.helpText,a=e.focusOnMount,s=e.showErrors,l=e.errors,u=c()(e,["name","labelText","helpText","focusOnMount","showErrors","errors"]),h=l[0];return o()(p.a,{},void 0,o()(f.a,{hasError:s,name:t},void 0,n,s&&h&&" \u2014 "+h),d.a.createElement(m.a,r()({name:t,focusOnMount:a,hasError:s},u)),i&&o()(g.a,{},void 0,i))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(162),p=n(192),f=n(90),g=n(361),m=n(161);t.a=n.i(h.a)(i)},function(e,t,n){"use strict";function i(){
return r()("div",{className:l.a.separator})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2407)),l=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){return o.a.createElement(l.a,r()({className:u.a.toolbarMenu},e))}var a=n(7),r=n.n(a),s=n(1),o=n.n(s),l=n(73),c=n(2419),u=n.n(c);t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(25),y=n(272),b=n(1856),S=n(1855),w=function(e){function t(n,i){u()(this,t);
var a=h()(this,e.call(this,n,i));return a.onMouseEnter=function(e){a.props.showOnHover&&(a._isHovered=!0,a.setState({isOpen:!0}))},a.onMouseLeave=function(e){a.props.showOnHover&&(a._isHovered=!1,a.setState({isOpen:a._isFocused}))},a.onFocus=function(e){a.props.showOnFocus&&(a._isFocused=!0,a.setState({isOpen:!0}))},a.onBlur=function(e){a.props.showOnFocus&&(a._isFocused=!1,a.setState({isOpen:a._isHovered}))},a.onPress=function(e){a.props.hideOnPress&&(a._isHovered=!1,a._isFocused=!1,a.setState({
isOpen:!1}))},a.state={isOpen:!1},a._isHovered=!1,a._isFocused=!1,a}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.children,i=e.component,r=e.tooltip,o=e.tooltipClassName,c=e.tooltipAttachment,u=e.tooltipTarget,d=e.tooltipOptions,h=e.onMouseEnter,p=e.onMouseLeave,f=e.onFocus,g=e.onBlur,v=e.onPress,b=l()(e,["children","component","tooltip","tooltipClassName","tooltipAttachment","tooltipTarget","tooltipOptions","onMouseEnter","onMouseLeave","onFocus","onBlur","onPress"]),w=this.state.isOpen;
return m.a.createElement(i,a()({ref:"target",onMouseEnter:n.i(y.a)(this.onMouseEnter,h),onMouseLeave:n.i(y.a)(this.onMouseLeave,p),onFocus:n.i(y.a)(this.onFocus,f),onBlur:n.i(y.a)(this.onBlur,g),onPress:n.i(y.a)(this.onPress,v)},b),s()(S.a,{className:o,attachment:c,options:d,target:u||this.refs.target,isOpen:!!r&&w},void 0,r),t)},t}(g.Component);w.defaultProps={component:b.a,showOnHover:!0,showOnFocus:!0,hideOnPress:!0},t.a=w},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.model,i=e.size,a=void 0;
switch(n){case"HDHomeRun CONNECT":a=h.a;break;case"HDHomeRun EXPAND":a=f.a;break;case"HDHomeRun EXTEND":a=m.a;break;case"HDHomeRun PRIME":a=y.a}return r()(u.a,{className:l()(t,S.a[i]),src:a,background:!0})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(28)),l=n.n(o),c=n(23),u=n(467),d=n(3129),h=n.n(d),p=n(3130),f=n.n(p),g=n(3131),m=n.n(g),v=n(3132),y=n.n(v),b=n(2423),S=n.n(b);i.defaultProps={className:S.a.image,size:c.d.SMALL},t.a=i},function(e,t,n){"use strict";function i(e){return r.a.createElement("div",e,n.i(s.default)("Powered by {1}","Gracenote\xae"));
}var a=n(1),r=n.n(a),s=n(4),o=n(2428),l=n.n(o);i.defaultProps={className:l.a.attribution},t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(15)),p=n(4),f=n(23),g=n(77),m=n(51),v=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onPreviousStepPress=function(){i.props.dvrSetupPreviousStep({dvrID:i.props.dvrID
})},a=n,l()(i,a)}return u()(t,e),t.prototype.render=function(){return a()(m.a,{kind:f.c.DEFAULT,size:f.d.MEDIUM,onPress:this.onPreviousStepPress},void 0,n.i(p.default)("Previous"))},t}(d.Component);t.a=n.i(h.b)(null,{dvrSetupPreviousStep:g.dvrSetupPreviousStep})(v)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(4),f=n(1289),g=n(23),m=n(25),v=(n(471),n(48),n(30)),y=n(26),b=n(363),S=n(2442),w=n.n(S),M=function(e){function t(n,i){
s()(this,t);var a=l()(this,e.call(this,n,i));return a.onListUpdate=function(e){var t=e.visibleStartIndex,n=e.visibleEndIndex,i=e.renderEndIndex,r=e.listStyle,s=a.props.onListReady,o=a._isReady?void 0:s;a._isReady=!0,a._visibleStartIndex=t,a._visibleEndIndex=n,a._pageSize=a._visibleEndIndex-a._visibleStartIndex;var l=t>0,c=i>n;a.setState({showActions:l||c,enablePrevious:l,enableNext:c,listHeight:r.height},o)},a.onListScrollIndexChange=function(e){a.setState({scrollIndex:e})},a.onPreviousPress=function(e){
a.setState({scrollIndex:a._visibleStartIndex-a._pageSize-1})},a.onNextPress=function(e){a.setState({scrollIndex:a._visibleEndIndex+1})},a.state={showActions:!1,enablePrevious:!1,enableNext:!1,listHeight:"auto",scrollIndex:0},a._isReady=!1,a}return u()(t,e),t.prototype.componentDidMount=function(){this.props.more&&!this.props.totalSize&&this.props.onPageRequest({startIndex:0,endIndex:this.props.size}),this.props.size||this.props.totalSize||(this._isReady=!0,this.props.onListReady&&this.props.onListReady());
},t.prototype.shouldComponentUpdate=function(e,t){return n.i(m.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.hubIdentifier,i=e.title,r=e.hubLink,s=e.listType,o=e.listContext,l=e.size,c=e.more,u=e.random,d=e.totalSize,m=e.keyPropName,S=e.itemsOffset,M=e.items,I=e.layout,C=e.cellRenderer,D=e.onPageRequest,T=this.state,x=T.showActions,P=T.enablePrevious,E=T.enableNext,A=T.listHeight;if(!l&&!d)return null;var L=n.i(f.a)(i),k=c?l+1:l,N={visibility:"auto"===A?"hidden":"inherit"},_={height:A,
overflow:"hidden"};return a()("div",{className:w.a.hubContainer,style:N,"data-qa-id":"hub--"+t},void 0,a()("div",{className:w.a.hubHeader},void 0,a()("div",{className:w.a.hubTitle},void 0,r?a()(y.a,{className:w.a.hubLink,to:r},void 0,L):L),x&&a()("div",{className:w.a.hubActions},void 0,a()(y.a,{className:w.a.hubScrollButton,"data-qa-id":"hubPreviousButton",isDisabled:!P,onPress:this.onPreviousPress},void 0,a()(v.a,{name:"plex-icon-hub-prev-560","aria-label":n.i(p.default)("Previous Page")})),a()(y.a,{
className:w.a.hubScrollButton,"data-qa-id":"hubNextButton",isDisabled:!E,onPress:this.onNextPress},void 0,a()(v.a,{name:"plex-icon-hub-next-560","aria-label":n.i(p.default)("Next Page")})))),a()("div",{style:_},void 0,h.a.createElement(b.a,{ref:"list",ignoreHeight:!0,keyPropName:m,items:M,itemsOffset:S,listType:s,listContext:o,scrollDirection:g.a.HORIZONTAL,scrollIndex:this.state.scrollIndex,size:u?l:d||k,layout:I,cellRenderer:C,onListUpdate:this.onListUpdate,onListScrollIndexChange:this.onListScrollIndexChange,
onPageRequest:D})))},t}(d.Component);t.a=M},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(function(e,t){var n=t.listContext;return n},function(e,t){var n=t.cellWidth;return n},n.i(d.a)(),n.i(h.a)(),n.i(p.a)(),n.i(f.a)(),g.a,function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],r=arguments[4],s=arguments[5],o=arguments[6],l=n.i(u.a)(t,null,a,i,e);return{isContinueWatching:e===c.b,metadataKey:i.key,type:a,selectionType:r,activeSelectionType:o.activeSelectionType,
isSelected:s,imageWidth:l.width,imageHeight:l.height,imageUrl:l.url}})}function a(e,t){var i=t.metadataListEntityID;return{onSelectItem:function(t){e(n.i(m.selectMetadataListItem)(s()({metadataListEntityID:i},t)))},onDeselectItem:function(t){e(n.i(m.deselectMetadataListItem)(s()({metadataListEntityID:i},t)))}}}var r=n(7),s=n.n(r),o=n(15),l=n(9),c=(n.n(l),n(48)),u=n(377),d=n(29),h=n(484),p=n(483),f=n(482),g=n(136),m=n(133),v=n(1895);t.a=n.i(o.b)(i,a)(v.a)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.type,i=o.a.get(n),a=i&&i.typeString;switch(a){case"show":case"playlist":case"season":return r()(l.a,{className:t,name:"plex-icon-dvr-series-560"});default:return r()(l.a,{className:t,name:"plex-icon-dvr-single-560"})}}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(36)),l=n(30);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.imageWidth,n=e.imageHeight,i=e.activeSelectionType,a=e.isSelected,s={width:t,height:n};return r()("div",{className:l()(u.a.placeholder,a&&u.a.isSelected,!!i&&!a&&u.a.isOtherItemSelected),
style:s})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(28)),l=n.n(o),c=n(2466),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.component,i=e.isSecondary,a=e.isSplitLeft,s=e.isSplitRight,l=o()(e,["className","component","isSecondary","isSplitLeft","isSplitRight"]);return c.a.createElement(n,r()({className:d()(t,p.a.title,i&&p.a.isSecondary,a&&p.a.isSplitLeft,s&&p.a.isSplitRight)},l))}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(28),d=n.n(u),h=n(2467),p=n.n(h);
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.imageWidth,n=e.imageHeight,i=e.imageUrl,a=o()(e,["imageWidth","imageHeight","imageUrl"]);return c.a.createElement(u.a,r()({className:p.a.card,component:d.a,width:t,height:n,url:i},a))}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(362),d=n(1934),h=n(2469),p=n.n(h);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.grandparentTitle;return r()(o.a,{className:t,title:n})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(369));
t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{parentTitle:i.parentTitle,parentRoute:n.i(c.a)(e,t,i.parentKey)}})}var a=n(15),r=n(9),s=(n.n(r),n(58)),o=n(62),l=n(29),c=n(86),u=n(1940);t.a=n.i(a.b)(i)(u.a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{
addedAt:e.addedAt}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1950);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.duration;return i?r()("span",{className:t},void 0,n.i(o.a)(i)):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(177)),l=n(2473),c=n.n(l);i.defaultProps={className:c.a.duration},t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{leafCount:e.leafCount
}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(845);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.title,a=e.index,s=e.route,o=e.parentTitle,d=e.parentIndex,h=e.parentRoute,p=e.originallyAvailableAt;return r()("span",{className:t},void 0,r()(c.a,{tabIndex:n,title:i,index:a,route:s,parentTitle:o,parentIndex:d,parentRoute:h,originallyAvailableAt:p}),i&&u,i&&r()(l.a,{tabIndex:n,title:i,route:s}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(108)),l=n(296),c=n(853),u=r()(o.a,{});
t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{skipChildren:e.skipChildren,childCount:e.childCount,leafCount:e.leafCount}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1967);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e,t){return n.i(s.createSelector)(n.i(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.userRating/2;return{value:t
}})}function a(e,t){return{onRatingChange:function(i){e(n.i(l.rateMetadataItem)({metadataItemEntityID:t.metadataItemEntityID,rating:0===i?-1:2*i}))}}}var r=n(15),s=n(9),o=(n.n(s),n(29)),l=n(113),c=n(1976);t.a=n.i(r.b)(i,a)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.children,n=o()(e,["children"]);return c.a.createElement("div",r()({className:d.a.pageHeaderCenter},n),t)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(2480),d=n.n(u);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(17),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(25),m=n(359),v=function(e){
function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.hasMenu,n=e.title,i=s()(e,["hasMenu","title"]);return t?f.a.createElement(m.a,i,n):a()("span",{},void 0,n)},t}(p.Component);t.a=v},function(e,t,n){"use strict";function i(e){var t=e.className,n=o()(e,["className"]);return c.a.createElement(u.a,r()({className:t},n))}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(108),d=n(2484),h=n.n(d);
i.defaultProps={className:h.a.pageHeaderSeparator},t.a=i},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(p.a,f.a,n.i(g.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=l.a.pick(n,"librarySectionKey","Producer","Director","Writer","studio");return s()({server:e,provider:t},i)})}function a(e){return u.a.createElement(m.a,e)}var r=n(7),s=n.n(r),o=n(2),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(9),p=(n.n(h),n(58)),f=n(62),g=n(29),m=n(2042);t.a=n.i(d.b)(i)(a);
},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.labelClassName,a=e.contentClassName,s=e.label;return r()("div",{className:n},void 0,r()("div",{className:i},void 0,s),r()("div",{className:a},void 0,t))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2514)),l=n.n(o);i.defaultProps={className:l.a.groupItem,labelClassName:l.a.label},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.posterWidth;return r()("div",{className:t,style:{paddingLeft:i+60
}},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2519)),l=n.n(o);i.defaultProps={className:l.a.content},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2520)),l=n.n(o);i.defaultProps={className:l.a.innerContent},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataItemEntityID,s=e.metadataKey,o=e.type,l=e.posterType,h=e.pageHeight,p=e.posterWidth,g=e.posterTop,m=e.posterUrl,v=l||o,y=p,b=n.i(u.a)(y,v,c.a);
return b>h-f&&(b=h-f,y=n.i(u.b)(b,v,c.a)),r()("div",{style:{position:"fixed",top:g}},void 0,r()(d.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a,metadataKey:s,type:o,imageWidth:y,imageHeight:b,imageUrl:m,showLink:!1,showEdit:!1,showMore:!1}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(109)),l=n.n(o),c=n(48),u=n(202),d=n(367),h=parseInt(l.a.pagePadding,10),p=40,f=2*h+p;t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n);
}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2521)),l=n.n(o);i.defaultProps={className:l.a.primaryTitle},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2523)),l=n.n(o);i.defaultProps={className:l.a.secondaryTitle},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()(o.a,{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(816)),l=n(2524),c=n.n(l);
i.defaultProps={className:c.a.summary,children:""},t.a=i},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(c.a,u.a,n.i(d.a)(),function(e,t,n){return{server:e,provider:t,librarySectionKey:n.librarySectionKey,roles:n.Role}})}function a(e){return s.a.createElement(h.a,e)}var r=n(1),s=n.n(r),o=n(15),l=n(9),c=(n.n(l),n(58)),u=n(62),d=n(29),h=n(2048);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){return e.ui.prePlayPage},function(e){
var t=e.relatedHubs,n=e.isRelatedHubsPending;return{relatedHubEntityIDs:t,showSpinner:!t.length&&n}})}var a=n(15),r=n(9),s=(n.n(r),n(2049));t.a=n.i(a.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.posterTop,n=e.pageHeight,i=t+n-2*h-f*p;return r()(d.a,{style:{position:"fixed",top:i}})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(109)),l=n.n(o),c=n(2209),u=n.n(c),d=n(504),h=parseInt(l.a.pagePadding,10),p=parseInt(u.a.defaultFontSize,10),f=parseFloat(u.a.lineHeightComputed,10);t.a=i},function(e,t,n){
"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(25),f=n(23),g=n(51),m=n(508),v=n(230),y=n(2529),b=n.n(y),S=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onRecordPress=function(e){a.setState({isSubscribeModalOpen:!0})},a.onSubscribeModalClose=function(){a.setState({isSubscribeModalOpen:!1})},a.state={isSubscribeModalOpen:n.isSubscribeModalOpen},a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){
return n.i(p.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.metadataItemEntityID,r=e.type,s=e.isSubscribed,o=e.subscriptionType,l=e.grandparentSubscriptionType,c=this.state.isSubscribeModalOpen;return a()(g.a,{className:b.a.recordButton,size:f.d.SMALL,onPress:this.onRecordPress},void 0,a()(m.a,{className:s?b.a.recordingIcon:b.a.recordIcon,type:l||o||r}),s?n.i(h.default)("Recording Scheduled"):n.i(h.default)("Record"),a()(v.a,{serverEntityID:t,metadataItemEntityID:i,
isOpen:c,subscriptionType:r,onModalClose:this.onSubscribeModalClose}))},t}(d.Component);S.defaultProps={isSubscribeModalOpen:!1},t.a=S},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.mediaItem,a=i&&i.videoResolution,s=!1,u=void 0;if(a){var d=parseInt(a,10);s=!0,u=d>=720||4===d||8===d}return t||s?r()(l.a,{},void 0,t,s&&r()(c.a,{label:n.i(o.default)("Video")},void 0,u?n.i(o.default)("HD"):n.i(o.default)("SD"))):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(867),c=n(524);t.a=i;
},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.server,i=e.provider,a=e.librarySectionKey,s=e.contentRating,d=e.genres,f=!!s,g=!(!d||!d.length);return r()(o.a,{},void 0,r()(l.a,{},void 0,t),r()(c.a,{},void 0,f&&r()(u.a,{server:n,provider:i,librarySectionKey:a,contentRating:s}),f&&g&&p,g&&r()(h.a,{server:n,provider:i,librarySectionKey:a,tags:d,limit:2})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(80),n(79),n(2046)),l=n(374),c=n(2045),u=n(2040),d=n(2041),h=n(868),p=r()(d.a,{});t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.children,n=e.className,i=e.onPress;return o()(d.a,{className:u()(f.a.sectionWrapper,n),component:"div",onPress:i},void 0,t)}function a(e){var t=e.children,n=e.className;return o()("div",{className:u()(f.a.sectionWrapper,n)},void 0,t)}function r(e){var t=e.errorMessage,n=e.children,r=e.className,s=e.onErrorDismiss,l=e.onPress,c=l?i:a;return o()(c,{className:r,onPress:l},void 0,t&&o()(h.a,{errorMessage:t,onErrorDismiss:s}),o()("div",{className:f.a.section},void 0,n));
}var s=n(3),o=n.n(s),l=n(1),c=(n.n(l),n(28)),u=n.n(c),d=n(26),h=n(193),p=n(2555),f=n.n(p);t.a=r},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className;return r()("div",{className:n},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2556)),l=n.n(o);i.defaultProps={className:l.a.actionLinks},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2557)),l=n.n(o);i.defaultProps={
className:l.a.sectionDetails},t.a=i},function(e,t,n){"use strict";function i(e){return r()(o.a,{className:c.a.page},void 0,r()("div",{className:c.a.content},void 0,e.children))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(194)),l=n(2558),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(e){return r()("h2",{className:l.a.header},void 0,e.children)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2559)),l=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.children;return r()("div",{role:"navigation"
},void 0,r()("div",{className:l.a.sidebarListHeader,role:"header"},void 0,t),n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2586)),l=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.selectedKey,n=e.isPlexCloudVisible,i=e.isWebhooksVisible,a=e.myPlexUrl,s=e.username;return r()(p.a,{selectedKey:t,isPlexCloudVisible:n,isWebhooksVisible:i,myPlexUrl:a,username:s})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(15)),l=n(9),c=(n.n(l),n(672)),u=n(174),d=n(439),h=n(676),p=n(2188),f=n.i(l.createSelector)(c.a,u.a,d.a,h.a,function(e,t,n,i){
return{isPlexCloudVisible:!!n.cpms,isWebhooksVisible:!!i.webhooks,myPlexUrl:e,username:t.username}});t.a=n.i(o.b)(f)(i)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(7),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=(n.n(p),n(14)),g=n(23),m=n(25),v=n(117),y=n(2194),b="plexpass",S=function(e){function t(){var i,a,r;l()(this,t);for(var o=arguments.length,c=Array(o),d=0;d<o;d++)c[d]=arguments[d];return i=a=u()(this,e.call.apply(e,[this].concat(c))),a.onModalClose=function(){
var e=n.i(f.a)("metrics");e.trackClick(s()({},a.props.metricsProperties,{page:b,action:"skip"})),a.props.onModalClose()},r=i,u()(a,r)}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(m.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.isOpen,n=e.metricsProperties;return a()(v.a,{size:g.d.LARGE,isOpen:t,metricsPage:b,metricsProperties:n,onModalClose:this.onModalClose},void 0,a()(y.a,{metricsPage:b,metricsProperties:n,onModalClose:this.onModalClose}))},t}(p.Component);
t.a=S},function(e,t,n){"use strict";function i(e){var t=function(t){function i(e,n){u()(this,i);var a=h()(this,t.call(this,e,n));return a.onKeyDown=function(e){var t=a.state.pressedModifierKeys;S[e.which]&&t.indexOf(e.which)===-1&&a.setState({pressedModifierKeys:t.concat(e.which)})},a.onKeyUp=function(e){var t=a.state.pressedModifierKeys,n=t.indexOf(e.which);n>-1&&a.setState({pressedModifierKeys:t.slice(0,n).concat(t.slice(n+1))})},a.onMouseDown=function(e){a._isMouseDown=!0},a.onMouseUp=function(e){
a._isMouseDown=!1},a.onFocusChange=function(e){a.state.pressedModifierKeys.length&&a.setState({pressedModifierKeys:[]}),a._isMouseDown=!1},a.onMouseEnter=function(e){var t=a.props,n=t.selectionType,i=t.activeSelectionType;a._isMouseDown&&i&&i===n&&a.onSelectPress(e)},a.onSelectPress=function(e){var t=a.props,n=t.selectionID,i=t.selectionType,r=t.isSelected,s=t.onSelectItem;r||s({id:n,type:i,isRangeSelect:e.shiftKey})},a.onDeselectPress=function(e){var t=a.props,n=t.selectionID,i=t.isSelected,r=t.onDeselectItem;
i&&r({id:n})},a.state={pressedModifierKeys:[]},a}return f()(i,t),i.prototype.componentDidMount=function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mousedown",this.onMouseDown),document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("dragstart",this.onFocusChange),document.addEventListener("contextmenu",this.onFocusChange),window.addEventListener("blur",this.onFocusChange)},i.prototype.shouldComponentUpdate=function(e,t){
return n.i(y.a)(this,e,t)},i.prototype.componentWillUnmount=function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mousedown",this.onMouseDown),document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("dragstart",this.onFocusChange),document.removeEventListener("contextmenu",this.onFocusChange),window.removeEventListener("blur",this.onFocusChange)},i.prototype.render=function(){var t=this.props,n=t.selectionType,i=t.activeSelectionType,a=t.isSelected,r=l()(t,["selectionType","activeSelectionType","isSelected"]),o=this.state.pressedModifierKeys,c=!!i;
return m.a.createElement(e,s()({hasActiveSelection:c,isSelected:a,isOtherItemSelected:c&&!a,isConflictingTypeSelected:c&&i!==n,isModifierKeyPressed:o.length>0,onMouseEnter:this.onMouseEnter,onSelectPress:this.onSelectPress,onDeselectPress:this.onDeselectPress},r))},i}(g.Component);return t.displayName="Selectable("+n.i(b.a)(e)+")",t.WrappedComponent=e,t.defaultProps={disableSelection:!1},t}var a,r=n(7),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(350),y=n(25),b=n(273),S=(a={},
a[v.c]=!0,a[v.d]=!0,a[v.e]=!0,a[v.f]=!0,a[v.g]=!0,a);t.a=i},function(e,t,n){"use strict";function i(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;t===c.b&&i<0&&i++;var o=e+t+i+a;if(p.hasOwnProperty(o))return p[o];var f=n.i(u.c)(e,t),g=parseInt(l.a.posterTitleHeight,10),m=parseInt(l.a.posterTitlePadding,10),v=void 0,y=void 0,b=void 0,S=void 0;t===c.b?(v=2,y=300,b=1,S=4,m*=2):(v="mixed"===e?a+3:a,y=f>1?180:120,b=2,S=11);
var w=v*g+m,M=n.i(s.a)({direction:s.b,rows:1,overscan:4,innerHorizontalPadding:30,innerVerticalPadding:30,outerPaddingTop:10,outerPaddingRight:5,outerPaddingBottom:5,outerPaddingLeft:5,getCellWidth:function(e){return n.i(d.a)(r()({},e,{minCellWidth:y,minColumns:b,maxColumns:S,columnAdjustment:i,aspectRatio:f}))},getCellHeight:function(e){return n.i(h.a)(r()({},e,{aspectRatio:f,titleHeight:w}))}});return M.cellOptions={minCellWidth:y,minColumns:b,maxColumns:S,columnAdjustment:i,aspectRatio:f,titleHeight:w
},p[o]=M,M}var a=n(7),r=n.n(a),s=n(470),o=n(109),l=n.n(o),c=n(48),u=n(202),d=n(891),h=n(890);t.a=i;var p={}},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:40,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,i=n.i(a.a)({direction:a.c,columns:1,overscan:t,getCellWidth:function(e){return e.innerViewportWidth},getCellHeight:function(){return e}});return i}var a=n(470);t.a=i},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");
},function(e,t){e.exports={}},function(e,t){e.exports=!0},function(e,t,n){var i=n(303),a=n(2242),r=n(548),s=n(554)("IE_PROTO"),o=function(){},l="prototype",c=function(){var e,t=n(903)("iframe"),i=r.length,a=">";for(t.style.display="none",n(2234).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object</script"+a),e.close(),c=e.F;i--;)delete c[l][r[i]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(o[l]=i(e),n=new o,o[l]=null,
n[s]=e):n=c(),void 0===t?n:a(n,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var i=n(237).f,a=n(205),r=n(239)("toStringTag");e.exports=function(e,t,n){e&&!a(e=n?e:e.prototype,r)&&i(e,r,{configurable:!0,value:t})}},function(e,t,n){var i=n(555)("keys"),a=n(382);e.exports=function(e){return i[e]||(i[e]=a(e))}},function(e,t,n){var i=n(121),a="__core-js_shared__",r=i[a]||(i[a]={});e.exports=function(e){return r[e]||(r[e]={})}},function(e,t){e.exports="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";
},function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t,n){var i=n(236);e.exports=function(e,t){if(!i(e))return e;var n,a;if(t&&"function"==typeof(n=e.toString)&&!i(a=n.call(e)))return a;if("function"==typeof(n=e.valueOf)&&!i(a=n.call(e)))return a;if(!t&&"function"==typeof(n=e.toString)&&!i(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var i=n(121),a=n(99),r=n(550),s=n(560),o=n(237).f;e.exports=function(e){
var t=a.Symbol||(a.Symbol=r?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:s.f(e)})}},function(e,t,n){t.f=n(239)},,,,,,,,,function(e,t,n){"use strict";function i(e){return Boolean(e&&"function"==typeof e.dispose)}t.__esModule=!0,t.default=i,e.exports=t.default},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new a;++t<n;)this.add(e[t])}var a=n(2304),r=n(2346),s=n(2347);i.prototype.add=i.prototype.push=r,i.prototype.has=s,e.exports=i},function(e,t,n){var i=n(394),a=i.Symbol;
e.exports=a},function(e,t,n){function i(e,t){var n=null==e?0:e.length;return!!n&&a(e,t,0)>-1}var a=n(2311);e.exports=i},function(e,t){function n(e,t,n){for(var i=-1,a=null==e?0:e.length;++i<a;)if(n(t,e[i]))return!0;return!1}e.exports=n},function(e,t){function n(e,t){for(var n=-1,i=null==e?0:e.length,a=Array(i);++n<i;)a[n]=t(e[n],n,e);return a}e.exports=n},function(e,t,n){function i(e,t){return s(r(e,t,a),e+"")}var a=n(932),r=n(2345),s=n(2348);e.exports=i},function(e,t){function n(e,t){return e.has(t);
}e.exports=n},function(e,t,n){function i(e){return r(e)&&a(e)}var a=n(2356),r=n(579);e.exports=i},function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t){function n(e,t,n){"use strict";function i(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function a(r){var s,o,l;if(r.nodeType==y.DOCUMENT_NODE){var c,u;for(o=r.firstChild,c=0,
u=r.childNodes.length;c<u;c+=1)if(r.childNodes[c].nodeType!==y.COMMENT_NODE){o=r.childNodes[c];break}return n?s=a(o):(s={},l=i(o),s[l]=a(o)),s}if(r.nodeType==y.ELEMENT_NODE){var d=0,h=r.childNodes;s=new Object;for(var p=0;p<h.length;p++)if(o=h.item(p),l=i(o),d++,null==s[l])s[l]=a(o);else{if(null!=s[l]&&!(s[l]instanceof Array)){var f=s[l];s[l]=[],s[l].push(f)}for(var g=0;null!=s[l][g];)g++;s[l][g]=a(o)}for(var m=0;m<r.attributes.length;m++){var v=r.attributes.item(m);d++;for(var b=v.value,S=0,w=e.length;S<w;S++){
var M=e[S];M.test.call(this,v.value)&&(b=M.converter.call(this,v.value))}s[t+v.name]=b}if(null!=s["#text"]){var I=s["#text"];"string"==typeof I?(I=I.replace(/[\r\n]/g,""),s["#text"]=I,1==d&&(s=I)):delete s["#text"]}return s}return r.nodeType==y.TEXT_NODE||r.nodeType==y.CDATA_SECTION_NODE?r.nodeValue:r.nodeType==y.COMMENT_NODE?null:void 0}function r(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"):e;
}function s(e){var t="";return null!=e.__cdata&&(t+="<![CDATA["+e.__cdata+"]]>"),null!=e.__text&&(t+=v?r(e.__text):e.__text),t}function o(e){var t="";return e instanceof Object?t+=s(e):null!=e&&(t+=v?r(e):e),t}function l(e,t){return e.indexOf(t,e.length-t.length)!==-1}function c(e,t){return!!(l(t.toString(),"_asArray")||0==t.toString().indexOf("_")||e[t]instanceof Function)}function u(e){var t=0;if(e instanceof Object)for(var n in e)c(e,n)||t++;return t}function d(e){var t=[];if(e instanceof Object)for(var n in e){
var i=n.toString(),a=i.charAt(0);n.indexOf("__")==-1&&("_"===a||a===a.toLowerCase()&&a!==a.toUpperCase())&&t.push(n)}return t}function h(e,t,n){var i="";if(0==e.length)i+=p(e,t,n,!0);else for(var a=0;a<e.length;a++)i+=p(e[a],t,d(e[a]),!1),i+=g(e[a]),i+=f(e[a],t);return i}function p(e,t,n,i){var a="<"+(null!=e&&null!=e.__prefix?e.__prefix+":":"")+t;if(null!=n)for(var s=0;s<n.length;s++){var o=n[s],l=r(e[o]);a+=" "+o.substr(1)+"='"+l+"'"}return a+=i?"/>":">"}function f(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">";
}function g(e){var t="",n=u(e);if(n>0)for(var i in e)if(!c(e,i)){var a=e[i],r=d(a);if(null==a||void 0==a)t+=p(a,i,r,!0);else if(a instanceof Object)if(a instanceof Array)t+=h(a,i,r);else{var s=u(a);s>0||null!=a.__text||null!=a.__cdata?(t+=p(a,i,r,!1),t+=g(a),t+=f(a,i)):t+=p(a,i,r,!0)}else t+=p(a,i,r,!1),t+=o(a),t+=f(a,i)}return t+=o(e)}null!==t&&void 0!==t||(t="_"),null!==n&&void 0!==n||(n=!1);var m="1.0.11",v=!1,y={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(e){
var t;if(window.DOMParser){var n=new window.DOMParser;t=n.parseFromString(e,"text/xml")}else 0==e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},this.xml2json=function(e){return a(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return this.xml2json(t)},this.getVersion=function(){return m},this.escapeMode=function(e){v=e},this.json2xml_str=function(e){return g(e)}}e.exports=n},function(e,t,n){"use strict";
function i(e,t){this.helpers=e||{},this.partials=t||{},a(this)}function a(e){e.registerHelper("helperMissing",function(e){if(2!==arguments.length)throw new o("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var i=n.inverse||function(){},a=n.fn;return h(t)&&(t=t.call(this)),t===!0?a(this):t===!1||null==t?i(this):d(t)?t.length>0?e.helpers.each(t,n):i(this):a(t)}),e.registerHelper("each",function(e,t){var n,i=t.fn,a=t.inverse,r=0,s="";if(h(e)&&(e=e.call(this)),t.data&&(n=m(t.data)),
e&&"object"==typeof e)if(d(e))for(var o=e.length;r<o;r++)n&&(n.index=r,n.first=0===r,n.last=r===e.length-1),s+=i(e[r],{data:n});else for(var l in e)e.hasOwnProperty(l)&&(n&&(n.key=l,n.index=r,n.first=0===r),s+=i(e[l],{data:n}),r++);return 0===r&&(s=a(this)),s}),e.registerHelper("if",function(e,t){return h(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||s.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash
})}),e.registerHelper("with",function(e,t){if(h(e)&&(e=e.call(this)),!s.isEmpty(e))return t.fn(e)}),e.registerHelper("log",function(t,n){var i=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;e.log(i,t)})}function r(e,t){g.log(e,t)}var s=n(583),o=n(582).default,l="1.3.0";t.VERSION=l;var c=4;t.COMPILER_REVISION=c;var u={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};t.REVISION_CHANGES=u;var d=s.isArray,h=s.isFunction,p=s.toString,f="[object Object]";t.HandlebarsEnvironment=i,
i.prototype={constructor:i,logger:g,log:r,registerHelper:function(e,t,n){if(p.call(e)===f){if(n||t)throw new o("Arg not supported with multiple helpers");s.extend(this.helpers,e)}else n&&(t.not=n),this.helpers[e]=t},registerPartial:function(e,t){p.call(e)===f?s.extend(this.partials,e):this.partials[e]=t}};var g={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(g.level<=e){var n=g.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t);
}}};t.logger=g,t.log=r;var m=function(e){var t={};return s.extend(t,e),t};t.createFrame=m},function(e,t,n){"use strict";function i(e,t){var n;t&&t.firstLine&&(n=t.firstLine,e+=" - "+n+":"+t.firstColumn);for(var i=Error.prototype.constructor.call(this,e),r=0;r<a.length;r++)this[a[r]]=i[a[r]];n&&(this.lineNumber=n,this.column=t.firstColumn)}var a=["description","fileName","lineNumber","message","name","number","stack"];i.prototype=new Error,t.default=i},function(e,t,n){"use strict";function i(e){return l[e]||"&amp;";
}function a(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function r(e){return e instanceof o?e.toString():e||0===e?(e=""+e,u.test(e)?e.replace(c,i):e):""}function s(e){return!e&&0!==e||!(!p(e)||0!==e.length)}var o=n(943).default,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/[&<>"'`]/g,u=/[&<>"'`]/;t.extend=a;var d=Object.prototype.toString;t.toString=d;var h=function(e){return"function"==typeof e};h(/x/)&&(h=function(e){return"function"==typeof e&&"[object Function]"===d.call(e);
});var h;t.isFunction=h;var p=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===d.call(e)};t.isArray=p,t.escapeExpression=r,t.isEmpty=s},function(e,t,n){"use strict";t.__esModule=!0;var i="__NATIVE_FILE__";t.FILE=i;var a="__NATIVE_URL__";t.URL=a;var r="__NATIVE_TEXT__";t.TEXT=r},function(e,t,n){var i=n(307),a=i.Symbol;e.exports=a},function(e,t,n){function i(e){return null==e?void 0===e?l:o:c&&c in Object(e)?r(e):s(e)}var a=n(585),r=n(2956),s=n(2980),o="[object Null]",l="[object Undefined]",c=a?a.toStringTag:void 0;
e.exports=i},function(e,t,n){function i(e){return null!=e&&r(e.length)&&!a(e)}var a=n(970),r=n(971);e.exports=i},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var a=n(2999);t.DragDropContext=i(a);var r=n(3e3);t.DragLayer=i(r);var s=n(3001);t.DragSource=i(s);var o=n(3002);t.DropTarget=i(o)},function(e,t,n){"use strict";function i(e,t){if(e===t)return!0;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty,r=0;r<n.length;r++){
if(!a.call(t,n[r])||e[n[r]]!==t[n[r]])return!1;var s=e[n[r]],o=t[n[r]];if(s!==o)return!1}return!0}t.__esModule=!0,t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}t.a=i},,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){function i(){f===p&&(f=p.slice())}function r(){return h}function l(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");
var t=!0;return i(),f.push(e),function(){if(t){t=!1,i();var n=f.indexOf(e);f.splice(n,1)}}}function c(e){if(!(0,s.default)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(g)throw new Error("Reducers may not dispatch actions.");try{g=!0,h=d(h,e)}finally{g=!1}for(var t=p=f,n=0;n<t.length;n++)t[n]();return e}function u(e){
if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");d=e,c({type:o.INIT})}if("function"==typeof t&&"undefined"==typeof n&&(n=t,t=void 0),"undefined"!=typeof n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(a)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var d=e,h=t,p=[],f=p,g=!1;return c({type:o.INIT}),{dispatch:c,subscribe:l,getState:r,replaceReducer:u}}t.__esModule=!0,t.ActionTypes=void 0,
t.default=a;var r=n(1019),s=i(r),o=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var a=n(610),r=i(a),s=n(3095),o=i(s),l=n(3094),c=i(l),u=n(3093),d=i(u),h=n(1016),p=i(h),f=n(1017);i(f);t.createStore=r.default,t.combineReducers=o.default,t.bindActionCreators=c.default,t.applyMiddleware=d.default,t.compose=p.default},,,,,function(e,t){
!function(){for(var e=0,t=["ms","moz","webkit","o"],n=0;n<t.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[t[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[n]+"CancelAnimationFrame"]||window[t[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t,n){var i=(new Date).getTime(),a=Math.max(0,16-(i-e)),r=window.setTimeout(function(){t(i+a)},a);return e=i+a,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){
clearTimeout(e)})}()},function(e,t,n){(function(i){var a,r,a,s,a,o,l;!function(i,s){a=s,!(r="function"==typeof a?a.call(t,n,t,e):a)}(this,function(){var e=function(e,t){this.items=e,this.settings=t||{diacritics:!0}};e.prototype.tokenize=function(e){if(e=a(String(e||"").toLowerCase()),!e||!e.length)return[];var t,n,i,s,l=[],c=e.split(/ +/);for(t=0,n=c.length;t<n;t++){if(i=r(c[t]),this.settings.diacritics)for(s in o)o.hasOwnProperty(s)&&(i=i.replace(new RegExp(s,"g"),o[s]));l.push({string:c[t],regex:new RegExp(i,"i")
})}return l},e.prototype.iterator=function(e,t){var n;n=s(e)?Array.prototype.forEach||function(e){for(var t=0,n=this.length;t<n;t++)e(this[t],t,this)}:function(e){for(var t in this)this.hasOwnProperty(t)&&e(this[t],t,this)},n.apply(e,[t])},e.prototype.getScoreFunction=function(e,t){var n,i,a,r;n=this,e=n.prepareSearch(e,t),a=e.tokens,i=e.options.fields,r=a.length;var s=function(e,t){var n,i;return e?(e=String(e||""),i=e.search(t.regex),i===-1?0:(n=t.string.length/e.length,0===i&&(n+=.5),n)):0},o=function(){
var e=i.length;return e?1===e?function(e,t){return s(t[i[0]],e)}:function(t,n){for(var a=0,r=0;a<e;a++)r+=s(n[i[a]],t);return r/e}:function(){return 0}}();return r?1===r?function(e){return o(a[0],e)}:"and"===e.options.conjunction?function(e){for(var t,n=0,i=0;n<r;n++){if(t=o(a[n],e),t<=0)return 0;i+=t}return i/r}:function(e){for(var t=0,n=0;t<r;t++)n+=o(a[t],e);return n/r}:function(){return 0}},e.prototype.getSortFunction=function(e,n){var i,a,r,s,o,l,c,u,d,h,p;if(r=this,e=r.prepareSearch(e,n),p=!e.query&&n.sort_empty||n.sort,
d=function(e,t){return"$score"===e?t.score:r.items[t.id][e]},o=[],p)for(i=0,a=p.length;i<a;i++)(e.query||"$score"!==p[i].field)&&o.push(p[i]);if(e.query){for(h=!0,i=0,a=o.length;i<a;i++)if("$score"===o[i].field){h=!1;break}h&&o.unshift({field:"$score",direction:"desc"})}else for(i=0,a=o.length;i<a;i++)if("$score"===o[i].field){o.splice(i,1);break}for(u=[],i=0,a=o.length;i<a;i++)u.push("desc"===o[i].direction?-1:1);return l=o.length,l?1===l?(s=o[0].field,c=u[0],function(e,n){return c*t(d(s,e),d(s,n));
}):function(e,n){var i,a,r;for(i=0;i<l;i++)if(r=o[i].field,a=u[i]*t(d(r,e),d(r,n)))return a;return 0}:null},e.prototype.prepareSearch=function(e,t){if("object"==typeof e)return e;t=n({},t);var i=t.fields,a=t.sort,r=t.sort_empty;return i&&!s(i)&&(t.fields=[i]),a&&!s(a)&&(t.sort=[a]),r&&!s(r)&&(t.sort_empty=[r]),{options:t,query:String(e||"").toLowerCase(),tokens:this.tokenize(e),total:0,items:[]}},e.prototype.search=function(e,t){var n,i,a,r,s=this;return i=this.prepareSearch(e,t),t=i.options,e=i.query,
r=t.score||s.getScoreFunction(i),e.length?s.iterator(s.items,function(e,a){n=r(e),(t.filter===!1||n>0)&&i.items.push({score:n,id:a})}):s.iterator(s.items,function(e,t){i.items.push({score:1,id:t})}),a=s.getSortFunction(i,t),a&&i.items.sort(a),i.total=i.items.length,"number"==typeof t.limit&&(i.items=i.items.slice(0,t.limit)),i};var t=function(e,t){return"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=l(String(e||"")),t=l(String(t||"")),e>t?1:t>e?-1:0)},n=function(e,t){var n,i,a,r;for(n=1,
i=arguments.length;n<i;n++)if(r=arguments[n])for(a in r)r.hasOwnProperty(a)&&(e[a]=r[a]);return e},a=function(e){return(e+"").replace(/^\s+|\s+$|/g,"")},r=function(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},s=Array.isArray||i&&i.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o={a:"[a\xc0\xc1\xc2\xc3\xc4\xc5\xe0\xe1\xe2\xe3\xe4\xe5\u0100\u0101\u0105\u0104]",c:"[c\xc7\xe7\u0107\u0106\u010d\u010c]",d:"[d\u0111\u0110\u010f\u010e]",e:"[e\xc8\xc9\xca\xcb\xe8\xe9\xea\xeb\u011b\u011a\u0112\u0113\u0119\u0118]",
i:"[i\xcc\xcd\xce\xcf\xec\xed\xee\xef\u012a\u012b]",l:"[l\u0142\u0141]",n:"[n\xd1\xf1\u0148\u0147\u0144\u0143]",o:"[o\xd2\xd3\xd4\xd5\xd5\xd6\xd8\xf2\xf3\xf4\xf5\xf6\xf8\u014c\u014d]",r:"[r\u0159\u0158]",s:"[s\u0160\u0161\u015b\u015a]",t:"[t\u0165\u0164]",u:"[u\xd9\xda\xdb\xdc\xf9\xfa\xfb\xfc\u016f\u016e\u016a\u016b]",y:"[y\u0178\xff\xfd\xdd]",z:"[z\u017d\u017e\u017c\u017b\u017a\u0179]"},l=function(){var e,t,n,i,a="",r={};for(n in o)if(o.hasOwnProperty(n))for(i=o[n].substring(2,o[n].length-1),a+=i,
e=0,t=i.length;e<t;e++)r[i.charAt(e)]=n;var s=new RegExp("["+a+"]","g");return function(e){return e.replace(s,function(e){return r[e]}).toLowerCase()}}();return e}),function(i,r){a=r,!(s="function"==typeof a?a.call(t,n,t,e):a)}(this,function(){var e={};e.mixin=function(e){e.plugins={},e.prototype.initializePlugins=function(e){var n,i,a,r=this,s=[];if(r.plugins={names:[],settings:{},requested:{},loaded:{}},t.isArray(e))for(n=0,i=e.length;n<i;n++)"string"==typeof e[n]?s.push(e[n]):(r.plugins.settings[e[n].name]=e[n].options,
s.push(e[n].name));else if(e)for(a in e)e.hasOwnProperty(a)&&(r.plugins.settings[a]=e[a],s.push(a));for(;s.length;)r.require(s.shift())},e.prototype.loadPlugin=function(t){var n=this,i=n.plugins,a=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');i.requested[t]=!0,i.loaded[t]=a.fn.apply(n,[n.plugins.settings[t]||{}]),i.names.push(t)},e.prototype.require=function(e){var t=this,n=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){if(n.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');
t.loadPlugin(e)}return n.loaded[e]},e.define=function(t,n){e.plugins[t]={name:t,fn:n}}};var t={isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}};return e}),function(i,c){o=[n(5),r,s],a=c,l="function"==typeof a?a.apply(t,o):a,!(void 0!==l&&(e.exports=l))}(this,function(e,t,n){"use strict";var i=function(e,t){if("string"!=typeof t||t.length){var n="string"==typeof t?new RegExp(t,"i"):t,i=function(e){var t=0;if(3===e.nodeType){var a=e.data.search(n);if(a>=0&&e.data.length>0){
var r=e.data.match(n),s=document.createElement("span");s.className="highlight";var o=e.splitText(a),l=(o.splitText(r[0].length),o.cloneNode(!0));s.appendChild(l),o.parentNode.replaceChild(s,o),t=1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName))for(var c=0;c<e.childNodes.length;++c)c+=i(e.childNodes[c]);return t};return e.each(function(){i(this)})}},a=function(){};a.prototype={on:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t);
},off:function(e,t){var n=arguments.length;return 0===n?delete this._events:1===n?delete this._events[e]:(this._events=this._events||{},void(e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(t),1)))},trigger:function(e){if(this._events=this._events||{},e in this._events!=!1)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}},a.mixin=function(e){for(var t=["on","off","trigger"],n=0;n<t.length;n++)e.prototype[t[n]]=a.prototype[t[n]];
};var r=/Mac/.test(navigator.userAgent),s=65,o=13,l=27,c=37,u=38,d=80,h=39,p=40,f=78,g=8,m=46,v=16,y=r?91:17,b=r?18:17,S=9,w=1,M=2,I=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("form").validity,C=function(e){return"undefined"!=typeof e},D=function(e){return"undefined"==typeof e||null===e?null:"boolean"==typeof e?e?"1":"0":e+""},T=function(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},x=function(e){return(e+"").replace(/\$/g,"$$$$");
},P={};P.before=function(e,t,n){var i=e[t];e[t]=function(){return n.apply(e,arguments),i.apply(e,arguments)}},P.after=function(e,t,n){var i=e[t];e[t]=function(){var t=i.apply(e,arguments);return n.apply(e,arguments),t}};var E=function(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}},A=function(e,t){var n;return function(){var i=this,a=arguments;window.clearTimeout(n),n=window.setTimeout(function(){e.apply(i,a)},t)}},L=function(e,t,n){var i,a=e.trigger,r={};e.trigger=function(){var n=arguments[0];
return t.indexOf(n)===-1?a.apply(e,arguments):void(r[n]=arguments)},n.apply(e,[]),e.trigger=a;for(i in r)r.hasOwnProperty(i)&&a.apply(e,r[i])},k=function(e,t,n,i){e.on(t,n,function(t){for(var n=t.target;n&&n.parentNode!==e[0];)n=n.parentNode;return t.currentTarget=n,i.apply(this,[t])})},N=function(e){var t={};if("selectionStart"in e)t.start=e.selectionStart,t.length=e.selectionEnd-t.start;else if(document.selection){e.focus();var n=document.selection.createRange(),i=document.selection.createRange().text.length;
n.moveStart("character",-e.value.length),t.start=n.text.length-i,t.length=i}return t},_=function(e,t,n){var i,a,r={};if(n)for(i=0,a=n.length;i<a;i++)r[n[i]]=e.css(n[i]);else r=e.css();t.css(r)},O=function(t,n){if(!t)return 0;var i=e("<test>").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(t).appendTo("body");_(n,i,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var a=i.width();return i.remove(),a},R=function(e){var t=null,n=function(n,i){
var a,r,s,o,l,c,u,d;n=n||window.event||{},i=i||{},n.metaKey||n.altKey||(i.force||e.data("grow")!==!1)&&(a=e.val(),n.type&&"keydown"===n.type.toLowerCase()&&(r=n.keyCode,s=r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||32===r,r===m||r===g?(d=N(e[0]),d.length?a=a.substring(0,d.start)+a.substring(d.start+d.length):r===g&&d.start?a=a.substring(0,d.start-1)+a.substring(d.start+1):r===m&&"undefined"!=typeof d.start&&(a=a.substring(0,d.start)+a.substring(d.start+1))):s&&(c=n.shiftKey,u=String.fromCharCode(n.keyCode),
u=c?u.toUpperCase():u.toLowerCase(),a+=u)),o=e.attr("placeholder"),!a&&o&&(a=o),l=O(a,e)+4,l!==t&&(t=l,e.width(l),e.triggerHandler("resize")))};e.on("keydown keyup update blur",n),n()},j=function(n,i){var a,r,s,o,l=this;o=n[0],o.selectize=l;var c=window.getComputedStyle&&window.getComputedStyle(o,null);if(s=c?c.getPropertyValue("direction"):o.currentStyle&&o.currentStyle.direction,s=s||n.parents("[dir]:first").attr("dir")||"",e.extend(l,{order:0,settings:i,$input:n,tabIndex:n.attr("tabindex")||"",
tagType:"select"===o.tagName.toLowerCase()?w:M,rtl:/rtl/i.test(s),eventNS:".selectize"+ ++j.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:n.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},
onSearchChange:null===i.loadThrottle?l.onSearchChange:A(l.onSearchChange,i.loadThrottle)}),l.sifter=new t(this.options,{diacritics:i.diacritics}),l.settings.options){for(a=0,r=l.settings.options.length;a<r;a++)l.registerOption(l.settings.options[a]);delete l.settings.options}if(l.settings.optgroups){for(a=0,r=l.settings.optgroups.length;a<r;a++)l.registerOptionGroup(l.settings.optgroups[a]);delete l.settings.optgroups}l.settings.mode=l.settings.mode||(1===l.settings.maxItems?"single":"multi"),"boolean"!=typeof l.settings.hideSelected&&(l.settings.hideSelected="multi"===l.settings.mode),
l.initializePlugins(l.settings.plugins),l.setupCallbacks(),l.setupTemplates(),l.setup()};return a.mixin(j),n.mixin(j),e.extend(j.prototype,{setup:function(){var t,n,i,a,s,o,l,c,u,d=this,h=d.settings,p=d.eventNS,f=e(window),g=e(document),m=d.$input;if(l=d.settings.mode,c=m.attr("class")||"",t=e("<div>").addClass(h.wrapperClass).addClass(c).addClass(l),n=e("<div>").addClass(h.inputClass).addClass("items").appendTo(t),i=e('<input type="text" autocomplete="off" />').appendTo(n).attr("tabindex",m.is(":disabled")?"-1":d.tabIndex),
o=e(h.dropdownParent||t),a=e("<div>").addClass(h.dropdownClass).addClass(l).hide().appendTo(o),s=e("<div>").addClass(h.dropdownContentClass).appendTo(a),d.settings.copyClassesToDropdown&&a.addClass(c),t.css({width:m[0].style.width}),d.plugins.names.length&&(u="plugin-"+d.plugins.names.join(" plugin-"),t.addClass(u),a.addClass(u)),(null===h.maxItems||h.maxItems>1)&&d.tagType===w&&m.attr("multiple","multiple"),d.settings.placeholder&&i.attr("placeholder",h.placeholder),!d.settings.splitOn&&d.settings.delimiter){
var S=d.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");d.settings.splitOn=new RegExp("\\s*"+S+"+\\s*")}m.attr("autocorrect")&&i.attr("autocorrect",m.attr("autocorrect")),m.attr("autocapitalize")&&i.attr("autocapitalize",m.attr("autocapitalize")),d.$wrapper=t,d.$control=n,d.$control_input=i,d.$dropdown=a,d.$dropdown_content=s,a.on("mouseenter","[data-selectable]",function(){return d.onOptionHover.apply(d,arguments)}),a.on("mousedown click","[data-selectable]",function(){return d.onOptionSelect.apply(d,arguments);
}),k(n,"mousedown","*:not(input)",function(){return d.onItemSelect.apply(d,arguments)}),d.settings.manualInputWidth||R(i),n.on({mousedown:function(){return d.onMouseDown.apply(d,arguments)},click:function(){return d.onClick.apply(d,arguments)}}),i.on({mousedown:function(e){e.stopPropagation()},keydown:function(){return d.onKeyDown.apply(d,arguments)},keyup:function(){return d.onKeyUp.apply(d,arguments)},keypress:function(){return d.onKeyPress.apply(d,arguments)},resize:function(){d.positionDropdown.apply(d,[]);
},blur:function(){return d.onBlur.apply(d,arguments)},focus:function(){return d.ignoreBlur=!1,d.onFocus.apply(d,arguments)},paste:function(){return d.onPaste.apply(d,arguments)}}),m.parents().last().find('label[for="'+m.attr("id")+'"]').on("click",function(){d.onClick.apply(d,arguments)}),g.on("keydown"+p,function(e){d.isCmdDown=e[r?"metaKey":"ctrlKey"],d.isCtrlDown=e[r?"altKey":"ctrlKey"],d.isShiftDown=e.shiftKey}),g.on("keyup"+p,function(e){e.keyCode===b&&(d.isCtrlDown=!1),e.keyCode===v&&(d.isShiftDown=!1),
e.keyCode===y&&(d.isCmdDown=!1)}),g.on("mousedown"+p,function(e){if(d.isFocused){if(e.target===d.$dropdown[0]||e.target.parentNode===d.$dropdown[0])return!1;d.$control.has(e.target).length||e.target===d.$control[0]||d.blur(e.target)}}),f.on(["scroll"+p,"resize"+p].join(" "),function(){d.isOpen&&d.positionDropdown.apply(d,arguments)}),f.on("mousemove"+p,function(){d.ignoreHover=!1}),this.revertSettings={$children:m.children().detach(),tabindex:m.attr("tabindex")},m.attr("tabindex",-1).hide().after(d.$wrapper),
e.isArray(h.items)&&(d.setValue(h.items),delete h.items),I&&m.on("invalid"+p,function(e){e.preventDefault(),d.isInvalid=!0,d.refreshState()}),d.updateOriginalInput(),d.refreshItems(),d.refreshState(),d.updatePlaceholder(),d.isSetup=!0,m.is(":disabled")&&d.disable(),d.on("change",this.onChange),m.data("selectize",d),m.addClass("selectized"),d.trigger("initialize"),h.preload===!0&&d.onSearchChange("")},setupTemplates:function(){var t=this,n=t.settings.labelField,i=t.settings.optgroupLabelField,a={optgroup:function(e){
return'<div class="optgroup">'+e.html+"</div>"},optgroup_header:function(e,t){return'<div class="optgroup-header">'+t(e[i])+"</div>"},option:function(e,t){return'<div class="option">'+t(e[n])+"</div>"},item:function(e,t){return'<div class="item">'+t(e[n])+"</div>"},option_create:function(e,t){return'<div class="create">Add <strong>'+t(e.input)+"</strong>&hellip;</div>"}};t.settings.render=e.extend({},a,t.settings.render)},setupCallbacks:function(){var e,t,n={initialize:"onInitialize",change:"onChange",
item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(e in n)n.hasOwnProperty(e)&&(t=this.settings[n[e]],t&&this.on(e,t))},onClick:function(e){var t=this;t.isFocused||(t.focus(),
e.preventDefault())},onMouseDown:function(t){var n=this,i=t.isDefaultPrevented();e(t.target);if(n.isFocused){if(t.target!==n.$control_input[0])return"single"===n.settings.mode&&t.target!==n.$control[0]?n.isOpen?n.close():n.open():i||n.setActiveItem(null),!1}else i||window.setTimeout(function(){n.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(t){var n=this;n.isFull()||n.isInputHidden||n.isLocked?t.preventDefault():n.settings.splitOn&&setTimeout(function(){for(var t=e.trim(n.$control_input.val()||"").split(n.settings.splitOn),i=0,a=t.length;i<a;i++)n.createItem(t[i]);
},0)},onKeyPress:function(e){if(this.isLocked)return e&&e.preventDefault();var t=String.fromCharCode(e.keyCode||e.which);return this.settings.create&&"multi"===this.settings.mode&&t===this.settings.delimiter?(this.createItem(),e.preventDefault(),!1):void 0},onKeyDown:function(e){var t=(e.target===this.$control_input[0],this);if(t.isLocked)return void(e.keyCode!==S&&e.preventDefault());switch(e.keyCode){case s:if(t.isCmdDown)return void t.selectAll();break;case l:return void(t.isOpen&&(e.preventDefault(),
e.stopPropagation(),t.close()));case f:if(!e.ctrlKey||e.altKey)break;case p:if(!t.isOpen&&t.hasOptions)t.open();else if(t.$activeOption){t.ignoreHover=!0;var n=t.getAdjacentOption(t.$activeOption,1);n.length&&t.setActiveOption(n,!0,!0)}return void e.preventDefault();case d:if(!e.ctrlKey||e.altKey)break;case u:if(t.$activeOption){t.ignoreHover=!0;var i=t.getAdjacentOption(t.$activeOption,-1);i.length&&t.setActiveOption(i,!0,!0)}return void e.preventDefault();case o:return void(t.isOpen&&t.$activeOption&&(t.onOptionSelect({
currentTarget:t.$activeOption}),e.preventDefault()));case c:return void t.advanceSelection(-1,e);case h:return void t.advanceSelection(1,e);case S:return void(t.settings.selectOnTab&&t.isOpen&&t.$activeOption?(t.onOptionSelect({currentTarget:t.$activeOption}),t.settings.allowCreateEmpty&&1===t.settings.maxItems||t.isFull()||e.preventDefault()):t.settings.create&&t.createItem()&&e.preventDefault());case g:return void t.deleteSelection(e,!0);case m:return void t.deleteSelection(e)}return!t.isFull()&&!t.isInputHidden||(r?e.metaKey:e.ctrlKey)?void 0:void e.preventDefault();
},onKeyUp:function(e){var t=this;if(t.isLocked)return e&&e.preventDefault();var n=t.$control_input.val()||"";t.lastValue!==n&&(t.lastValue=n,t.onSearchChange(n),t.refreshOptions(),t.trigger("type",n))},onSearchChange:function(e){var t=this,n=t.settings.load;n&&(t.loadedSearches.hasOwnProperty(e)||(t.loadedSearches[e]=!0,t.load(function(i){n.apply(t,[e,i])})))},onFocus:function(e){var t=this,n=t.isFocused;return t.isDisabled?(t.blur(),e&&e.preventDefault(),!1):void(t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.onSearchChange(""),
n||t.trigger("focus"),t.$activeItems.length||(t.showInput(),t.setActiveItem(null),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState()))},onBlur:function(e,t){var n=this;if(n.isFocused&&(n.isFocused=!1,!n.ignoreFocus))return n.ignoreBlur||document.activeElement!==n.$dropdown_content[0]?void setTimeout(function(){var e=function(){n.close(),n.setTextboxValue(""),n.setActiveItem(null),n.setActiveOption(null),n.setCaret(n.items.length),n.refreshState(),(t||document.body).focus(),n.ignoreFocus=!1,
n.trigger("blur")};n.ignoreFocus=!0,n.settings.selectOnBlur&&n.$activeOption&&1===n.$activeOption.not(".create").length?(n.addItem(n.$activeOption.not(".create").data("value")),e()):n.settings.create&&n.settings.createOnBlur?n.createItem(null,!1,e):e()}):(n.ignoreBlur=!0,void n.onFocus(e))},onOptionHover:function(e){this.ignoreHover||this.setActiveOption(e.currentTarget,!1)},onOptionSelect:function(t){var n,i,a=this;t.preventDefault&&(t.preventDefault(),t.stopPropagation()),i=e(t.currentTarget),i.hasClass("create")?a.createItem(null,function(){
a.settings.closeAfterSelect&&a.close()}):(n=i.attr("data-value"),"undefined"!=typeof n&&(a.lastQuery=null,a.setTextboxValue(""),a.addItem(n),a.settings.closeAfterSelect?a.close():!a.settings.hideSelected&&t.type&&/mouse/.test(t.type)&&a.setActiveOption(a.getOption(n))))},onItemSelect:function(e){var t=this;t.isLocked||"multi"===t.settings.mode&&(e.preventDefault(),t.setActiveItem(e.currentTarget,e))},load:function(e){var t=this,n=t.$wrapper.addClass(t.settings.loadingClass);t.loading++,e.apply(t,[function(e){
t.loading=Math.max(t.loading-1,0),e&&e.length&&(t.addOption(e),t.refreshOptions(t.isFocused&&!t.isInputHidden)),t.loading||n.removeClass(t.settings.loadingClass),t.trigger("load",e)}])},setTextboxValue:function(e){var t=this.$control_input,n=t.val()!==e;n&&(t.val(e).triggerHandler("update"),this.lastValue=e)},getValue:function(){return this.tagType===w&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(e,t){var n=t?[]:["change"];L(this,n,function(){
this.clear(t),this.addItems(e,t)})},setActiveItem:function(t,n){var i,a,r,s,o,l,c,u,d=this;if("single"!==d.settings.mode){if(t=e(t),!t.length)return e(d.$activeItems).removeClass("active"),d.$activeItems=[],void(d.isFocused&&d.showInput());if(i=n&&n.type.toLowerCase(),"mousedown"===i&&d.isShiftDown&&d.$activeItems.length){for(u=d.$control.children(".active:last"),s=Array.prototype.indexOf.apply(d.$control[0].childNodes,[u[0]]),o=Array.prototype.indexOf.apply(d.$control[0].childNodes,[t[0]]),s>o&&(c=s,
s=o,o=c),a=s;a<=o;a++)l=d.$control[0].childNodes[a],d.$activeItems.indexOf(l)===-1&&(e(l).addClass("active"),d.$activeItems.push(l));n.preventDefault()}else"mousedown"===i&&d.isCtrlDown||"keydown"===i&&this.isShiftDown?t.hasClass("active")?(r=d.$activeItems.indexOf(t[0]),d.$activeItems.splice(r,1),t.removeClass("active")):d.$activeItems.push(t.addClass("active")[0]):(e(d.$activeItems).removeClass("active"),d.$activeItems=[t.addClass("active")[0]]);d.hideInput(),this.isFocused||d.focus()}},setActiveOption:function(t,n,i){
var a,r,s,o,l,c=this;c.$activeOption&&c.$activeOption.removeClass("active"),c.$activeOption=null,t=e(t),t.length&&(c.$activeOption=t.addClass("active"),!n&&C(n)||(a=c.$dropdown_content.height(),r=c.$activeOption.outerHeight(!0),n=c.$dropdown_content.scrollTop()||0,s=c.$activeOption.offset().top-c.$dropdown_content.offset().top+n,o=s,l=s-a+r,s+r>a+n?c.$dropdown_content.stop().animate({scrollTop:l},i?c.settings.scrollDuration:0):s<n&&c.$dropdown_content.stop().animate({scrollTop:o},i?c.settings.scrollDuration:0)));
},selectAll:function(){var e=this;"single"!==e.settings.mode&&(e.$activeItems=Array.prototype.slice.apply(e.$control.children(":not(input)").addClass("active")),e.$activeItems.length&&(e.hideInput(),e.close()),e.focus())},hideInput:function(){this.setTextboxValue(""),this.$control_input.css({opacity:0}),this.settings.manualInputWidth||this.$control_input.css({position:"absolute",left:this.rtl?1e4:-1e4}),this.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1}),this.settings.manualInputWidth||this.$control_input.css({
position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var e=this;e.isDisabled||(e.ignoreFocus=!0,e.$control_input[0].focus(),window.setTimeout(function(){e.ignoreFocus=!1,e.onFocus()},0))},blur:function(e){this.$control_input[0].blur(),this.onBlur(null,e)},getScoreFunction:function(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())},getSearchOptions:function(){var e=this.settings,t=e.sortField;return"string"==typeof t&&(t=[{field:t}]),{fields:e.searchField,conjunction:e.searchConjunction,
sort:t}},search:function(t){var n,i,a,r=this,s=r.settings,o=this.getSearchOptions();if(s.score&&(a=r.settings.score.apply(this,[t]),"function"!=typeof a))throw new Error('Selectize "score" setting must be a function that returns a function');if(t!==r.lastQuery?(r.lastQuery=t,i=r.sifter.search(t,e.extend(o,{score:a})),r.currentResults=i):i=e.extend(!0,{},r.currentResults),s.hideSelected)for(n=i.items.length-1;n>=0;n--)r.items.indexOf(D(i.items[n].id))!==-1&&i.items.splice(n,1);return i},refreshOptions:function(t){
var n,a,r,s,o,l,c,u,d,h,p,f,g,m,v,y;"undefined"==typeof t&&(t=!0);var b=this,S=e.trim(b.$control_input.val()),w=b.search(S),M=b.$dropdown_content,I=b.$activeOption&&D(b.$activeOption.attr("data-value"));for(s=w.items.length,"number"==typeof b.settings.maxOptions&&(s=Math.min(s,b.settings.maxOptions)),o={},l=[],n=0;n<s;n++)for(c=b.options[w.items[n].id],u=b.render("option",c),d=c[b.settings.optgroupField]||"",h=e.isArray(d)?d:[d],a=0,r=h&&h.length;a<r;a++)d=h[a],b.optgroups.hasOwnProperty(d)||(d=""),
o.hasOwnProperty(d)||(o[d]=[],l.push(d)),o[d].push(u);for(this.settings.lockOptgroupOrder&&l.sort(function(e,t){var n=b.optgroups[e].$order||0,i=b.optgroups[t].$order||0;return n-i}),p=[],n=0,s=l.length;n<s;n++)d=l[n],b.optgroups.hasOwnProperty(d)&&o[d].length?(f=b.render("optgroup_header",b.optgroups[d])||"",f+=o[d].join(""),p.push(b.render("optgroup",e.extend({},b.optgroups[d],{html:f})))):p.push(o[d].join(""));if(M.html(p.join("")),b.settings.highlight&&w.query.length&&w.tokens.length)for(n=0,
s=w.tokens.length;n<s;n++)i(M,w.tokens[n].regex);if(!b.settings.hideSelected)for(n=0,s=b.items.length;n<s;n++)b.getOption(b.items[n]).addClass("selected");g=b.canCreate(S),g&&(M.prepend(b.render("option_create",{input:S})),y=e(M[0].childNodes[0])),b.hasOptions=w.items.length>0||g,b.hasOptions?(w.items.length>0?(v=I&&b.getOption(I),v&&v.length?m=v:"single"===b.settings.mode&&b.items.length&&(m=b.getOption(b.items[0])),m&&m.length||(m=y&&!b.settings.addPrecedence?b.getAdjacentOption(y,1):M.find("[data-selectable]:first"))):m=y,
b.setActiveOption(m),t&&!b.isOpen&&b.open()):(b.setActiveOption(null),t&&b.isOpen&&b.close())},addOption:function(t){var n,i,a,r=this;if(e.isArray(t))for(n=0,i=t.length;n<i;n++)r.addOption(t[n]);else(a=r.registerOption(t))&&(r.userOptions[a]=!0,r.lastQuery=null,r.trigger("option_add",a,t))},registerOption:function(e){var t=D(e[this.settings.valueField]);return!(!t||this.options.hasOwnProperty(t))&&(e.$order=e.$order||++this.order,this.options[t]=e,t)},registerOptionGroup:function(e){var t=D(e[this.settings.optgroupValueField]);
return!!t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)},addOptionGroup:function(e,t){t[this.settings.optgroupValueField]=e,(e=this.registerOptionGroup(t))&&this.trigger("optgroup_add",e,t)},removeOptionGroup:function(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.renderCache={},this.trigger("optgroup_remove",e))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(t,n){var i,a,r,s,o,l,c,u=this;if(t=D(t),
r=D(n[u.settings.valueField]),null!==t&&u.options.hasOwnProperty(t)){if("string"!=typeof r)throw new Error("Value must be set in option data");c=u.options[t].$order,r!==t&&(delete u.options[t],s=u.items.indexOf(t),s!==-1&&u.items.splice(s,1,r)),n.$order=n.$order||c,u.options[r]=n,o=u.renderCache.item,l=u.renderCache.option,o&&(delete o[t],delete o[r]),l&&(delete l[t],delete l[r]),u.items.indexOf(r)!==-1&&(i=u.getItem(t),a=e(u.render("item",n)),i.hasClass("active")&&a.addClass("active"),i.replaceWith(a)),
u.lastQuery=null,u.isOpen&&u.refreshOptions(!1)}},removeOption:function(e,t){var n=this;e=D(e);var i=n.renderCache.item,a=n.renderCache.option;i&&delete i[e],a&&delete a[e],delete n.userOptions[e],delete n.options[e],n.lastQuery=null,n.trigger("option_remove",e),n.removeItem(e,t)},clearOptions:function(){var e=this;e.loadedSearches={},e.userOptions={},e.renderCache={},e.options=e.sifter.items={},e.lastQuery=null,e.trigger("option_clear"),e.clear()},getOption:function(e){return this.getElementWithValue(e,this.$dropdown_content.find("[data-selectable]"));
},getAdjacentOption:function(t,n){var i=this.$dropdown.find("[data-selectable]"),a=i.index(t)+n;return a>=0&&a<i.length?i.eq(a):e()},getElementWithValue:function(t,n){if(t=D(t),"undefined"!=typeof t&&null!==t)for(var i=0,a=n.length;i<a;i++)if(n[i].getAttribute("data-value")===t)return e(n[i]);return e()},getItem:function(e){return this.getElementWithValue(e,this.$control.children())},addItems:function(t,n){for(var i=e.isArray(t)?t:[t],a=0,r=i.length;a<r;a++)this.isPending=a<r-1,this.addItem(i[a],n);
},addItem:function(t,n){var i=n?[]:["change"];L(this,i,function(){var i,a,r,s,o,l=this,c=l.settings.mode;return t=D(t),l.items.indexOf(t)!==-1?void("single"===c&&l.close()):void(l.options.hasOwnProperty(t)&&("single"===c&&l.clear(n),"multi"===c&&l.isFull()||(i=e(l.render("item",l.options[t])),o=l.isFull(),l.items.splice(l.caretPos,0,t),l.insertAtCaret(i),(!l.isPending||!o&&l.isFull())&&l.refreshState(),l.isSetup&&(r=l.$dropdown_content.find("[data-selectable]"),l.isPending||(a=l.getOption(t),s=l.getAdjacentOption(a,1).attr("data-value"),
l.refreshOptions(l.isFocused&&"single"!==c),s&&l.setActiveOption(l.getOption(s))),!r.length||l.isFull()?l.close():l.positionDropdown(),l.updatePlaceholder(),l.trigger("item_add",t,i),l.updateOriginalInput({silent:n})))))})},removeItem:function(e,t){var n,i,a,r=this;n="object"==typeof e?e:r.getItem(e),e=D(n.attr("data-value")),i=r.items.indexOf(e),i!==-1&&(n.remove(),n.hasClass("active")&&(a=r.$activeItems.indexOf(n[0]),r.$activeItems.splice(a,1)),r.items.splice(i,1),r.lastQuery=null,!r.settings.persist&&r.userOptions.hasOwnProperty(e)&&r.removeOption(e,t),
i<r.caretPos&&r.setCaret(r.caretPos-1),r.refreshState(),r.updatePlaceholder(),r.updateOriginalInput({silent:t}),r.positionDropdown(),r.trigger("item_remove",e,n))},createItem:function(t,n){var i=this,a=i.caretPos;t=t||e.trim(i.$control_input.val()||"");var r=arguments[arguments.length-1];if("function"!=typeof r&&(r=function(){}),"boolean"!=typeof n&&(n=!0),!i.canCreate(t))return r(),!1;i.lock();var s="function"==typeof i.settings.create?this.settings.create:function(e){var t={};return t[i.settings.labelField]=e,
t[i.settings.valueField]=e,t},o=E(function(e){if(i.unlock(),!e||"object"!=typeof e)return r();var t=D(e[i.settings.valueField]);return"string"!=typeof t?r():(i.setTextboxValue(""),i.addOption(e),i.setCaret(a),i.addItem(t),i.refreshOptions(n&&"single"!==i.settings.mode),void r(e))}),l=s.apply(this,[t,o]);return"undefined"!=typeof l&&o(l),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){var e,t=this;
t.isRequired&&(t.items.length&&(t.isInvalid=!1),t.$control_input.prop("required",e)),t.refreshClasses()},refreshClasses:function(){var t=this,n=t.isFull(),i=t.isLocked;t.$wrapper.toggleClass("rtl",t.rtl),t.$control.toggleClass("focus",t.isFocused).toggleClass("disabled",t.isDisabled).toggleClass("required",t.isRequired).toggleClass("invalid",t.isInvalid).toggleClass("locked",i).toggleClass("full",n).toggleClass("not-full",!n).toggleClass("input-active",t.isFocused&&!t.isInputHidden).toggleClass("dropdown-active",t.isOpen).toggleClass("has-options",!e.isEmptyObject(t.options)).toggleClass("has-items",t.items.length>0),
t.$control_input.data("grow",!n&&!i)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(e){var t,n,i,a,r=this;if(e=e||{},r.tagType===w){for(i=[],t=0,n=r.items.length;t<n;t++)a=r.options[r.items[t]][r.settings.labelField]||"",i.push('<option value="'+T(r.items[t])+'" selected="selected">'+T(a)+"</option>");i.length||this.$input.attr("multiple")||i.push('<option value="" selected="selected"></option>'),r.$input.html(i.join(""));
}else r.$input.val(r.getValue()),r.$input.attr("value",r.$input.val());r.isSetup&&(e.silent||r.trigger("change",r.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var e=this.$control_input;this.items.length?e.removeAttr("placeholder"):e.attr("placeholder",this.settings.placeholder),e.triggerHandler("update",{force:!0})}},open:function(){var e=this;e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.focus(),e.isOpen=!0,e.refreshState(),e.$dropdown.css({visibility:"hidden",
display:"block"}),e.positionDropdown(),e.$dropdown.css({visibility:"visible"}),e.trigger("dropdown_open",e.$dropdown))},close:function(){var e=this,t=e.isOpen;"single"===e.settings.mode&&e.items.length&&e.hideInput(),e.isOpen=!1,e.$dropdown.hide(),e.setActiveOption(null),e.refreshState(),t&&e.trigger("dropdown_close",e.$dropdown)},positionDropdown:function(){var e=this.$control,t="body"===this.settings.dropdownParent?e.offset():e.position();t.top+=e.outerHeight(!0),this.$dropdown.css({width:e.outerWidth(),
top:t.top,left:t.left})},clear:function(e){var t=this;t.items.length&&(t.$control.children(":not(input)").remove(),t.items=[],t.lastQuery=null,t.setCaret(0),t.setActiveItem(null),t.updatePlaceholder(),t.updateOriginalInput({silent:e}),t.refreshState(),t.showInput(),t.trigger("clear"))},insertAtCaret:function(t){var n=Math.min(this.caretPos,this.items.length);0===n?this.$control.prepend(t):e(this.$control[0].childNodes[n]).before(t),this.setCaret(n+1)},deleteSelection:function(t,n){var i,a,r,s,o,l,c,u,d,h=this;
if(r=n||void 0===n&&t&&t.keyCode===g?-1:1,s=N(h.$control_input[0]),h.$activeOption&&!h.settings.hideSelected&&(c=h.getAdjacentOption(h.$activeOption,-1).attr("data-value")),o=[],h.$activeItems.length){for(d=h.$control.children(".active:"+(r>0?"last":"first")),l=h.$control.children(":not(input)").index(d),r>0&&l++,i=0,a=h.$activeItems.length;i<a;i++)o.push(e(h.$activeItems[i]).attr("data-value"));t&&(t.preventDefault(),t.stopPropagation())}else(h.isFocused||"single"===h.settings.mode)&&h.items.length&&(r<0&&0===s.start&&0===s.length?o.push(h.items[h.caretPos-1]):r>0&&s.start===h.$control_input.val().length&&o.push(h.items[h.caretPos]));
if(!o.length||"function"==typeof h.settings.onDelete&&h.settings.onDelete.apply(h,[o])===!1)return!1;for("undefined"!=typeof l&&h.setCaret(l);o.length;)h.removeItem(o.pop());return h.showInput(),h.positionDropdown(),h.refreshOptions(!0),c&&(u=h.getOption(c),u.length&&h.setActiveOption(u)),!0},advanceSelection:function(e,t){var n,i,a,r,s,o,l=this;0!==e&&(l.rtl&&(e*=-1),n=e>0?"last":"first",i=N(l.$control_input[0]),l.isFocused&&!l.isInputHidden?(r=l.$control_input.val().length,s=e<0?0===i.start&&0===i.length:i.start===r,
s&&!r&&l.advanceCaret(e,t)):(o=l.$control.children(".active:"+n),o.length&&(a=l.$control.children(":not(input)").index(o),l.setActiveItem(null),l.setCaret(e>0?a+1:a))))},advanceCaret:function(e,t){var n,i,a=this;0!==e&&(n=e>0?"next":"prev",a.isShiftDown?(i=a.$control_input[n](),i.length&&(a.hideInput(),a.setActiveItem(i),t&&t.preventDefault())):a.setCaret(a.caretPos+e))},setCaret:function(t){var n=this;if(t="single"===n.settings.mode?n.items.length:Math.max(0,Math.min(n.items.length,t)),!n.isPending){
var i,a,r,s;for(r=n.$control.children(":not(input)"),i=0,a=r.length;i<a;i++)s=e(r[i]).detach(),i<t?n.$control_input.before(s):n.$control.append(s)}n.caretPos=t},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var e=this;e.$input.prop("disabled",!0),e.$control_input.prop("disabled",!0).prop("tabindex",-1),e.isDisabled=!0,e.lock()},enable:function(){var e=this;e.$input.prop("disabled",!1),e.$control_input.prop("disabled",!1).prop("tabindex",e.tabIndex),
e.isDisabled=!1,e.unlock()},destroy:function(){var t=this,n=t.eventNS,i=t.revertSettings;t.trigger("destroy"),t.off(),t.$wrapper.remove(),t.$dropdown.remove(),t.$input.html("").append(i.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:i.tabindex}).show(),t.$control_input.removeData("grow"),t.$input.removeData("selectize"),e(window).off(n),e(document).off(n),e(document.body).off(n),delete t.$input[0].selectize},render:function(e,t){var n,i,a="",r=!1,s=this,o=/^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;
return"option"!==e&&"item"!==e||(n=D(t[s.settings.valueField]),r=!!n),r&&(C(s.renderCache[e])||(s.renderCache[e]={}),s.renderCache[e].hasOwnProperty(n))?s.renderCache[e][n]:(a=s.settings.render[e].apply(this,[t,T]),"option"!==e&&"option_create"!==e||(a=a.replace(o,"<$1 data-selectable")),"optgroup"===e&&(i=t[s.settings.optgroupValueField]||"",a=a.replace(o,'<$1 data-group="'+x(T(i))+'"')),"option"!==e&&"item"!==e||(a=a.replace(o,'<$1 data-value="'+x(T(n||""))+'"')),r&&(s.renderCache[e][n]=a),a)},
clearCache:function(e){var t=this;"undefined"==typeof e?t.renderCache={}:delete t.renderCache[e]},canCreate:function(e){var t=this;if(!t.settings.create)return!1;var n=t.settings.createFilter;return(e.length||t.settings.allowCreateEmpty)&&("function"!=typeof n||n.apply(t,[e]))&&("string"!=typeof n||new RegExp(n).test(e))&&(!(n instanceof RegExp)||n.test(e))}}),j.count=0,j.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,selectOnBlur:!1,
createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,allowCreateEmpty:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",manualInputWidth:!1,dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,
wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},e.fn.selectize=function(t){var n=e.fn.selectize.defaults,i=e.extend({},n,t),a=i.dataAttr,r=i.labelField,s=i.valueField,o=i.optgroupField,l=i.optgroupLabelField,c=i.optgroupValueField,u=function(t,n){var o,l,c,u,d=t.attr(a);if(d)for(n.options=JSON.parse(d),o=0,l=n.options.length;o<l;o++)n.items.push(n.options[o][s]);else{
var h=e.trim(t.val()||"");if(!i.allowEmptyOption&&!h.length)return;for(c=h.split(i.delimiter),o=0,l=c.length;o<l;o++)u={},u[r]=c[o],u[s]=c[o],n.options.push(u);n.items=c}},d=function(t,n){var u,d,h,p,f=n.options,g={},m=function(e){var t=a&&e.attr(a);return"string"==typeof t&&t.length?JSON.parse(t):null},v=function(t,a){t=e(t);var l=D(t.attr("value"));if(l||i.allowEmptyOption)if(g.hasOwnProperty(l)){if(a){var c=g[l][o];c?e.isArray(c)?c.push(a):g[l][o]=[c,a]:g[l][o]=a}}else{var u=m(t)||{};u[r]=u[r]||t.text(),
u[s]=u[s]||l,u[o]=u[o]||a,g[l]=u,f.push(u),t.is(":selected")&&n.items.push(l)}},y=function(t){var i,a,r,s,o;for(t=e(t),r=t.attr("label"),r&&(s=m(t)||{},s[l]=r,s[c]=r,n.optgroups.push(s)),o=e("option",t),i=0,a=o.length;i<a;i++)v(o[i],r)};for(n.maxItems=t.attr("multiple")?null:1,p=t.children(),u=0,d=p.length;u<d;u++)h=p[u].tagName.toLowerCase(),"optgroup"===h?y(p[u]):"option"===h&&v(p[u])};return this.each(function(){if(!this.selectize){var a,r=e(this),s=this.tagName.toLowerCase(),o=r.attr("placeholder")||r.attr("data-placeholder");
o||i.allowEmptyOption||(o=r.children('option[value=""]').text());var l={placeholder:o,options:[],optgroups:[],items:[]};"select"===s?d(r,l):u(r,l),a=new j(r,e.extend(!0,{},n,l,t))}})},e.fn.selectize.defaults=j.defaults,e.fn.selectize.support={validity:I},j.define("remove_button",function(t){if("single"!==this.settings.mode){t=e.extend({label:"&times;",title:"Remove",className:"remove",append:!0},t);var n=this,i='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+T(t.title)+'">'+t.label+"</a>",a=function(e,t){
var n=e.search(/(<\/[^>]+>\s*)$/);return e.substring(0,n)+t+e.substring(n)};this.setup=function(){var r=n.setup;return function(){if(t.append){var s=n.settings.render.item;n.settings.render.item=function(e){return a(s.apply(this,arguments),i)}}r.apply(this,arguments),this.$control.on("click","."+t.className,function(t){if(t.preventDefault(),!n.isLocked){var i=e(t.currentTarget).parent();n.setActiveItem(i),n.deleteSelection()&&n.setCaret(n.items.length)}})}}()}}),j.define("restore_on_backspace",function(e){
var t=this;e.text=e.text||function(e){return e[this.settings.labelField]},this.onKeyDown=function(){var n=t.onKeyDown;return function(t){var i,a;return t.keyCode===g&&""===this.$control_input.val()&&!this.$activeItems.length&&(i=this.caretPos-1,i>=0&&i<this.items.length)?(a=this.options[this.items[i]],this.deleteSelection(t,!0)&&(this.setTextboxValue(e.text.apply(this,[a])),this.refreshOptions(!0)),void t.preventDefault()):n.apply(this,arguments)}}()}),j.define("restore_on_focus",function(e){var t=this;
e.text=e.text||function(e){return e[this.settings.labelField]};var n=t.onFocus;this.onFocus=function(t){return function(t){var i=this.caretPos-1;if(i>=0&&i<this.items.length){var a=this.options[this.items[i]],r=e.text.call(this,a);this.removeItem(a[this.settings.valueField]),this.setTextboxValue(r),this.refreshOptions(!0)}return n.apply(this,arguments)}}()}),j})}).call(t,n(5))},function(e,t,n){"use strict";var i=n(111),a=new i.a({interface:["load","stop","canPause"]});t.a=a},function(e,t,n){"use strict";
var i=n(2),a=n.n(i),r=n(4),s=n(34),o=n(39),l=n(128),c=n(326),u=n(444),d=n(88),h=n(27),p=n(618),f=s.a.extend({readyEvent:"loadedmetadata",wrapped:["play","pause","setVolume","setPosition","resume","stop"],initialize:function(e){a.a.bindAll(this,"onReady","onWaiting","onStalled","onPlaying","onProgress","onTime","onPause","onVolume","onEnded","onError"),this.type=e,this.backlog=new c.a,this.backlog.wrapAll(this.wrapped,function(){return!!this.mediaElement},this)},setMediaSrc:function(e,t){h.a.info("[Player] setting src attribute",e),
this.mediaElement.setAttribute("src",e)},removeMediaSrc:function(){h.a.info("[Player] removing src attribute"),this.mediaElement.setAttribute("src","")},addMediaListeners:function(){var e=this.mediaElement;e.addEventListener(this.readyEvent,this.onReady),e.addEventListener("waiting",this.onWaiting),e.addEventListener("stalled",this.onStalled),e.addEventListener("playing",this.onPlaying),e.addEventListener("progress",this.onProgress),e.addEventListener("timeupdate",this.onTime),e.addEventListener("pause",this.onPause),
e.addEventListener("volumechange",this.onVolume),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError)},removeMediaListeners:function(){var e=this.mediaElement;e.removeEventListener(this.readyEvent,this.onReady),e.removeEventListener("waiting",this.onWaiting),e.removeEventListener("stalled",this.onStalled),e.removeEventListener("playing",this.onPlaying),e.removeEventListener("progress",this.onProgress),e.removeEventListener("timeupdate",this.onTime),e.removeEventListener("pause",this.onPause),
e.removeEventListener("volumechange",this.onVolume),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError)},load:function(e){var t=e.model,n=t.get("url"),i=e.mediaElement||this.createManagedMediaElement();this.backlog.clear(),this.model=t,this.mediaElement=i,this.autoplay=e.autoplay,this.offset=t.get("position"),this.lastOffset=null;var a=!t.get("directPlay")&&"http"===e.protocol;this.useSeekStreamSwitch=a||e.useOffsetHLS,this.useOffset=e.useOffsetHLS||e.useOffsetHTTP,
this.useOffset&&this.model.set("offset",this.offset),i.stream_restart=!1,i.autoplay=this.autoplay,this.addMediaListeners(),h.a.group("[Player] Load"),h.a.info("URL:",n),h.a.info("Autoplay:",this.autoplay),h.a.info("Offset:",this.offset),h.a.groupEnd(),"dash"===e.protocol?(p.a.load(n,i),this.usingDashPlayer=!0):(this.setMediaSrc(n,e.mimeType),i.load())},play:function(){this.mediaElement.play()},pause:function(){this.mediaElement.pause(),this.mediaElement.autoplay=!1},setVolume:function(e){this.mediaElement.volume=e/100;
},setPosition:function(e){this.mediaElement.readyState>0&&(this.mediaElement.currentTime=e/1e3)},resume:function(){h.a.info("[Player] Resuming at "+this.offset),this.setPosition(this.offset),this.offset=0},stop:function(){h.a.info("[Player] Stopping playback. DashPlayer:",!!this.usingDashPlayer),this.removeMediaListeners(),this.model.set("ready",!1),this.usingDashPlayer&&(this.usingDashPlayer=!1,p.a.stop()),this.removeMediaSrc(),this.removeManagedMediaElement(),this.mediaElement=null},preferElementDuration:function(){
if(!a.a.isFinite(this.mediaElement.duration))return!1;if(this.model.get("type")!==o.a.types.PHOTO){var e=a.a.first(n.i(l.a)(this.model.get("media"),{streamType:d.a.get("audio").id,selected:!0}));if(e&&"vbr"===e.bitrateMode)return!1}return!0},getErrorMessage:function(e){return n.i(r.default)("There was a problem playing this item.")},beforeStreamSwitch:function(){this.mediaElement&&(this.mediaElement.stream_restart=!0)},createManagedMediaElement:function(){h.a.info("[Player] Creating media element");
var e=o.a.getElementByType(this.type),t="audio"===e,i=n.i(u.a)(e,t);return i.style.cssText="position:absolute;width:1px;height:1px;",i.managed=!0,i.parentNode||document.body.appendChild(i),i},removeManagedMediaElement:function(){h.a.info("[Player] Removing media element");var e=this.mediaElement;e&&e.managed&&(e.managed=!1,e.parentNode&&e.parentNode.removeChild(e))},onReady:function(){var e=this.model;if(!e.get("ready")){h.a.info("[Player] Playback is ready");var t=this.mediaElement,n={ready:!0,loaded:!0
};if(e.get("type")===o.a.types.VIDEO&&(n.videoDimensions={width:t.videoWidth,height:t.videoHeight}),this.preferElementDuration()){var i=1e3*t.duration;this.useOffset&&(i+=this.offset),n.duration=Math.round(i)}e.set(n);var a=e.get("volume");null!=a&&this.setVolume(a),this.backlog.process()}},onWaiting:function(){this.model.set("state",o.a.states.BUFFERING)},onStalled:function(){},onPlaying:function(){this.model.set("state",o.a.states.PLAYING)},onProgress:function(){for(var e=this.mediaElement.buffered,t=null,n=null,i=0,a=e.length;i<a;i++){
var r=Math.round(1e3*e.start(i)),s=Math.round(1e3*e.end(i));this.useOffset&&(r+=this.offset,s+=this.offset),(null===t||t>r)&&(t=r),(null===n||n<s)&&(n=s)}this.model.set({startBuffer:t,endBuffer:n})},onTime:function(){var e=this.mediaElement,t=this.offset&&!this.useSeekStreamSwitch,n=e.stream_restart;if(t||n)return void(t&&this.resume());var i=1e3*e.currentTime;this.useOffset&&(i+=this.offset);var a=this.lastOffset&&Math.abs(i-this.lastOffset)<100;if(!(e.paused||a&&this.model.get("buffering"))){var r=this.model;
this.lastOffset=i,r.get("buffering")&&r.set("state",o.a.states.PLAYING),r.set("position",Math.round(i))}},onPause:function(){var e=this.model.get("partIndex")+1<this.model.get("partCount");this.mediaElement.ended&&e||(this.mediaElement.resume_pending||this.mediaElement.stream_restart||this.usingDashPlayer&&p.a.canPause(this.mediaElement)?this.model.set("state",o.a.states.BUFFERING):this.model.set("state",o.a.states.PAUSED))},onVolume:function(){this.model.set("volume",Math.round(100*this.mediaElement.volume));
},onEnded:function(){this.model.set("ended",!0)},onError:function(e){var t=e.target.error,n=t&&t.code;n&&h.a.warn("[Player] Media element error code: "+n),this.model.set({state:o.a.states.ERROR,errorMessage:this.getErrorMessage(n)})}});t.a=f},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(4),l=n(177),c=n(34),u=n(714),d=n(715),h=n(707),p=n(710),f=n(1236),g=n(39),m=n(339),v=n(326),y=n(459),b=n(1255),S=n(27),w=n(8),M=n(88),I=n(95),C=n(314),D=n(21),T=n(52),x=n(419),P=n(619),E=c.a.extend({
mixins:[T.a,x.a],playerProfileAdapter:C.a,resetStreamDebounce:200,handleSetPositionDebounce:0,errorSkipTime:2e3,wrapped:["play","pause","playPause","setVolume","setRepeat","setPosition","seekForward","seekBackward","setSubtitleStreamID"],modelDefaults:function(){var e=x.a.modelDefaults.apply(this,arguments);return a.a.extend(e,{state:g.a.states.BUFFERING})},initialize:function(e){e||(e={}),x.a.initialize.apply(this,arguments),a.a.bindAll(this,"onDecisionSuccess","onDecisionError"),this.subcontrollersByType={},
this.profile=this.playerProfileAdapter.prop(this.type),this.backlog=new v.a,this.backlog.wrapAll(this.wrapped,function(){return!!this.subcontroller},this),this.useBufferDetection()&&(this.bufferingDetector=new b.a,this.bufferingDetector.on("warn",this.onBufferingDetectorWarn,this),this.bufferingDetector.on("buffering",this.onBufferingDetected)),this.resetStreamDebounce&&(this.resetStream=a.a.debounce(this.resetStream,this.resetStreamDebounce)),this.handleSetPositionDebounce&&(this.handleSetPosition=a.a.debounce(this.handleSetPosition,this.handleSetPositionDebounce)),
this.listenTo(w.a,{"companion:play":this.play,"companion:stop":this.stop,"companion:pause":this.pause,"companion:skipNext":this.skipNext,"companion:skipPrevious":this.skipPrevious,"companion:setPosition":this.setPosition,"companion:skipTo":this.skipTo,"companion:setVolume":this.setVolume,"companion:setRepeat":this.setRepeat,"companion:stepForward":this.seekForward,"companion:stepBack":this.seekBackward,"companion:setSubtitleStreamID":this.setSubtitleStreamID})},load:function(e){this.originalOptions=e,
this.model=e.model,this.autoplay=e.autoplay,this.postplay=e.postplay;var t=this.model.get("playQueue"),n=this.model.get("playQueueItem");return this.reset(n),m.a.registerPlayer(this),this.listenTo(this.model,{"change:state":this.onStateChange,"change:repeatAll change:repeatItem":this.onRepeatChange,"change:qualityIndex":this.onQualityIndexChange,"change:audioStreamID":this.onAudioStreamIDChange,"change:subtitleStreamID":this.onSubtitleStreamIDChange,"change:ended":this.onEndedChange,"change:softSubtitlesFailed":this.onSoftSubtitlesFailedChange
}),t&&(this.listenTo(t.get("collection"),"add remove reset sync",this.onPlayQueueChange),this.listenTo(t,"change:hasUpNext change:shuffled",this.onPlayQueueChange)),this.getPlayerDecision(n.get("metadataItem"),e)},reset:function(e){return this.bufferingDetector&&this.bufferingDetector.stop(),x.a.reset.apply(this,arguments)},populateItem:function(e,t){var n=a.a.extend({},t,{reset:!0,scope:"player"});if(e.get("isLibraryItem")&&(n.data={checkFiles:"1",includeChapters:"1"}),e.server.get("cloud")){var i=e.get("key");
n.url=e.server.swizzleNodeUrl(i)}return e.populate(n)},loadMediaElement:function(e){this.subcontroller=this.getSubcontrollerByType(this.playerType),this.backlog.process();var t,n=this.profile&&this.profile.protocols,i=this.protocol;i&&n&&n[i]&&(t=n[i].mimeType),this.subcontroller.load(a.a.extend({},this.originalOptions,{model:this.model,protocol:i,autoplay:this.autoplay,mimeType:t,useOffsetHLS:e.useOffsetHLS,useOffsetHTTP:e.useOffsetHTTP,canDirectPlay:e.canDirectPlay})),this.bufferingDetector&&(this.bufferingDetector.setModel(this.model),
this.bufferingDetector.start())},setSubcontrollerByType:function(e,t){this.subcontrollersByType[e]=t},getSubcontrollerByType:function(e){var t=this.subcontrollersByType[e];return t?new t(this.type):new P.a(this.type)},embed:function(e){var t=this.model.get("metadataItem"),i=s.a.ajax(t.server.getXHROptions(e.key));i.done(a.a.bind(function(e){this.model.set("embedHtml",e)},this)),i.fail(a.a.bind(function(e){this.model.set({state:g.a.states.ERROR,errorMessage:n.i(o.default)("There was a problem embedding this video.")
})},this))},redirect:function(e){var t=this.model.get("metadataItem"),n=t.get("url");if(!n&&e){var i=e.key.match(/\/webkit\?url=([^&]+)/);i&&(n=decodeURIComponent(i[1]))}window.open(n),a.a.defer(a.a.bind(function(){this.model.set("finished",!0)},this))},play:function(){this.model.get("state")!==g.a.states.PLAYING&&this.subcontroller.play()},pause:function(){this.model.get("state")!==g.a.states.PAUSED&&this.subcontroller.pause()},setPosition:function(e,t){t||(t={}),this.canSeek(e)&&(this.model.set({
finished:!1,position:e,lastSeekPosition:e}),this.model.trigger("seeking",this.model),this.bufferingDetector&&this.bufferingDetector.seek(e),this.subcontroller.useSeekStreamSwitch?(this.resetStreamDebounce&&this.pause(),this.switchStreams(t)):(this.handleSetPositionDebounce&&this.pause(),this.handleSetPosition(e,t)))},handleSetPosition:function(e,t){this.canHandleDebounce()&&(this.subcontroller.setPosition(e),t.autoplay&&this.play())},canHandleDebounce:function(){var e=this.model&&this.model.get("state");
return void 0!==e&&e!==g.a.states.STOPPED},setVolume:function(e){this.model.set("volume",e),this.subcontroller.setVolume(e)},setRepeat:function(e){this.model.set({repeatAll:2===e,repeatItem:1===e})},setSubtitleStreamID:function(e){var t=D.a.execute("selectStream",{item:this.model.get("metadataItem"),media:this.model.get("media"),part:this.model.get("part"),streamType:M.a.get("subtitles"),streamID:e});t.done(a.a.bind(function(){this.model.set("subtitleStreamID",e)},this))},restartCurrent:function(){
this.getPlayerDecision(this.model.get("metadataItem"),this.originalOptions)},skipPrevious:function(e){var t=x.a.skipPrevious.apply(this,arguments);return t&&this.switchStreams({autoplay:!e||e.autoplay!==!1}),t},skipNext:function(e){var t=x.a.skipNext.apply(this,arguments);return t&&this.switchStreams({autoplay:!e||e.autoplay!==!1}),t},skipNextOrFinish:function(){this.model.get("canSkipNext")?this.skipNext():this.model.set("finished",!0)},skipTo:function(e,t){var n=x.a.skipTo.apply(this,arguments);
return n&&this.switchStreams({autoplay:!t||t.autoplay!==!1}),n},switchStreams:function(e){e||(e={}),null==e.autoplay&&(e.autoplay=!this.model.get("paused")),this.subcontroller&&this.subcontroller.beforeStreamSwitch&&this.subcontroller.beforeStreamSwitch(),this.originalOptions.media=this.model.get("media"),this.originalOptions.part=this.model.get("part"),this.originalOptions.offset=this.model.get("position"),this.pause(),this.resetStream(e)},resetStream:function(e){if(e||(e={}),!e.cancel&&this.canHandleDebounce()){
var t=this.stopSession();t.done(a.a.bind(function(){this.autoplay=e.autoplay!==!1,this.getPlayerDecision(this.model.get("metadataItem"),this.originalOptions)},this))}},stop:function(e,t){return n.i(S.a)("[PlayerController] Stopping playback"),this._controllerStopped=!0,x.a.stop.apply(this,arguments),this.bufferingDetector&&(this.bufferingDetector.off("warn",this.onBufferingDetectorWarn),this.bufferingDetector.stop()),m.a.unregisterPlayer(this),e&&e.isSwitchingPlayers||w.a.trigger("hide:player",t),
this.resetStream({cancel:!0}),this.stopSession(e)},setSkipStates:function(e){this.previousItem=this.getPreviousItem(),this.nextItem=this.getNextItem(),this.model.set(a.a.extend({},e,{canSkipPrevious:!!this.previousItem,canSkipNext:!!this.nextItem},this.modelOverrides()))},shouldSkipOnError:function(){return!1},skipOnError:function(){if(this.shouldSkipOnError()){this.abortSkipOnError(),S.a.warn("[PlayerController] Item failed to play, automatically skipping to the next item in",n.i(l.a)(this.errorSkipTime));
var e=a.a.bind(function(){this.model.get("error")&&this.skipNextOrFinish()},this);this._skipOnErrorTimeout=setTimeout(e,this.errorSkipTime)}},abortSkipOnError:function(){clearTimeout(this._skipOnErrorTimeout)},useBufferDetection:function(){return!0},getErrorMessage:function(e){return n.i(y.a)(e)||n.i(o.default)("There was a problem playing this item.")},getMaxVideoBitrateQualityIndex:function(e){var t=e.transcoderQualityOptions.maxVideoBitrate;if(t)return t?I.a.getNearestIndexToBitrate(t):void 0},
onDecisionSuccess:function(e){var t=this.model,i=t.get("metadataItem"),r=t.get("playQueueItem"),s=r.get("lyricsStreams"),o=t.get("state"),l=0;if(o!==g.a.states.STOPPED&&o!==g.a.states.ERROR&&!this._controllerStopped){e.part&&e.part.duration?l=e.part.duration:i.get("duration")&&(l=i.get("duration")),this.playbackSessionID=e.playbackSessionID,this.transcodeSessionID=e.transcodeSessionID,this.playerType=e.playerType,this.protocol=e.protocol;var c=e.media,m=e.part,v=n.i(u.a)(c),y=n.i(d.a)(c);this.model.set(a.a.extend({
media:c,part:m,url:e.url,subtitlesUrl:e.subtitlesUrl,transcodeServer:e.transcodeServer,mediaIndex:c?n.i(h.a)(i,c.id):0,partIndex:m?n.i(p.a)(c,m.key):0,partCount:n.i(f.a)(e.media),audioStreamID:v?v.id:0,subtitleStreamID:y?y.id:0,state:this.autoplay?g.a.states.BUFFERING:g.a.states.PAUSED,position:e.offset,duration:l,directPlay:e.canDirectPlay,playbackSessionID:e.playbackSessionID,transcodeSessionID:e.transcodeSessionID,softSubtitlesFailed:!1,canLyrics:s&&s.length>0},this.modelOverrides())),this.loadMediaElement(e),
this.startTimeline()}},onDecisionError:function(e){var t=this.model,i=t.get("state");if(this.playbackSessionID=e.playbackSessionID,i!==g.a.states.STOPPED&&i!==g.a.states.ERROR&&!this._controllerStopped){var a=this.playerProfileAdapter.prop("capabilities");if(e.embed&&a.embed)return void this.embed(e.part);if(e.redirect&&a.redirect)return void this.redirect(e.part);if(e.canDirectPlay&&n.i(y.b)(e.mdeDecisionCode)&&!n.i(y.b)(e.transcodeDecisionCode))return S.a.warn("[PlayerController] Forcing transcode;",e.mdeDecisionText),
this.originalOptions.decisionOverrides||(this.originalOptions.decisionOverrides={}),this.originalOptions.decisionOverrides.allowDirectPlay=!1,void this.getPlayerDecision(this.model.get("metadataItem"),this.originalOptions);var r=this.getErrorMessage(e);S.a.warn("[PlayerController] Decision error",r),t.set({state:g.a.states.ERROR,errorMessage:r})}},onQualityIndexChange:function(e,t){var n=e.previous("qualityIndex");null!=t&&null!=n&&this.switchStreams()},onAudioStreamIDChange:function(e,t){var n=e.previous("audioStreamID");
null!=t&&null!=n&&this.switchStreams()},onSubtitleStreamIDChange:function(e,t){var n=e.previous("subtitleStreamID");null!=t&&null!=n&&this.switchStreams()},onPlayQueueChange:function(){var e=this.model.get("playQueue");e&&this.model.set({canShuffle:!e.get("hasUpNext"),shuffled:e.get("shuffled")}),this.setSkipStates()},onRepeatChange:function(e,t){this.setSkipStates()},onStateChange:function(e,t){var i=this.timeline();n.i(S.a)("[PlayerController] State change",t),t===g.a.states.PLAYING&&i.done(a.a.bind(this.updatePlayQueue,this)),
t===g.a.states.STOPPED||t===g.a.states.ERROR?this.stopTimeline():this.startTimeline(),t===g.a.states.PAUSED?this.startPing():this.stopPing(),t===g.a.states.PLAYING?this.startPlaybackTracking():this.stopPlaybackTracking(),t===g.a.states.ERROR?this.skipOnError():this.abortSkipOnError()},onEndedChange:function(e,t){if(t){var n=e.get("partIndex"),i=e.get("partCount");if(++n>=i)this.model.get("repeatItem")?this.restartCurrent():this.nextItem&&!this.postplay?this.skipNext():(!this.nextItem&&this.postplay?this.stop():this.pause(),
this.model.set("finished",!0));else{var a=e.get("media");this.model.set({part:a.Part[n],position:0}),this.switchStreams({autoplay:!0})}}},onSoftSubtitlesFailedChange:function(e,t){!t||e.get("stopped")||e.get("error")||(w.a.trigger("show:alert",{type:"error",message:n.i(o.default)("Unable to play subtitles without converting video")}),S.a.warn("[Player] Soft subs have failed, switching to burned subtitles"),this.switchStreams())},onBufferingDetected:function(){this.model.set("state",g.a.states.BUFFERING);
},onBufferingDetectorWarn:function(e){var t,i=this.bufferingDetector.reasons,a=e.reason,r=this.bufferingDetector.recommendations,s=e.recommendation,l=this.type===g.a.types.VIDEO?n.i(o.default)("video"):n.i(o.default)("track");t=a===i.TRANSCODER?s===r.ORIGINAL_QUALITY?n.i(o.default)("The server is not powerful enough to convert this {1} for smooth playback. Try playing at the original quality.",l):n.i(o.default)("The server is not powerful enough to convert this {1} for smooth playback.",l):a===i.NETWORK?s===r.LOWER_QUALITY?n.i(o.default)("Your connection to the server is not fast enough to stream this {1}. Check your network or try a lower quality.",l):n.i(o.default)("Your connection to the server is not fast enough to stream this {1}. Check your network.",l):n.i(o.default)("We are having trouble playing this {1}. Please check your playback setup.",l),
this.model.set("bufferingMessage",t)}});t.a=E},function(e,t,n){"use strict";var i=n(624),a=i.a.extend({supportsRetry:function(e){return e.get("isCloud")}});t.a=a},function(e,t,n){"use strict";var i=n(52),a=n(624),r=a.a.extend({mixins:[i.a],initialize:function(e){var t=e.appModel;a.a.prototype.initialize.apply(this,arguments),this.appModel=t,this.listenTo(this.appModel,"change:primaryServer",this.onPrimaryServerChange)},supportsRetry:function(e){var t=this.appModel.get("primaryServer");return!!t&&t.id===e.id;
},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");n&&this.stop(n),t&&t.get("isUnavailable")&&this.start(t)}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(8),o=n(34),l=n(61),c=n(261),u=n(27),d=n(52),h=o.a.extend({mixins:[d.a],initialize:function(e){this.name=e.name||"ServerEventManager",this.appModel=e.appModel,this.servers=this.appModel.get("servers"),this.isValidServer=e.isValidServer,this.supportsLongPolling=e.supportsLongPolling,this.showTimelineStatus=e.showTimelineStatus,
this.ServerEventConnection=e.ServerEventConnection,this.connections={},this._serverRetryManager=new e.ServerRetryManager({appModel:this.appModel,callback:this.retryServerConnections.bind(this),logFormat:"[Connections] Retrying server events connection for %s in %s seconds"})},start:function(){this.listenTo(this.servers,{"change:isResolved":this.onServerResolvedChange,"change:isRejected":this.onServerRejectedChange,remove:this.onServerRemove,reset:this.onServersReset}),this.showTimelineStatus&&this.listenTo(s.a,"timeline",this.onTimeline);
},stop:function(){this.stopListening(),this._serverRetryManager.stopAll(),this.connections={}},connect:function(e){var t=e.server,i=this.connections[t.id];i||(i=new this.ServerEventConnection({server:t}),this.connections[t.id]=i,this.listenTo(i,{open:this.onOpen,close:this.onClose,error:this.onClose}));var a=i.open(),r=i.socket?i.socket.url:i.pollUrl;return n.i(u.a)("["+this.name+"] Opening server event connection to "+t.get("debugName")+" at "+r),a},disconnectAll:function(){var e=this;a.a.each(this.connections,function(t){
e.disconnect({connection:t})})},disconnect:function(e){var t=e.connection;if(t||(t=this.connections[e.server.id]),t){var i=t.socket?t.socket.url:t.pollUrl,a=t.server;n.i(u.a)("["+this.name+"] Closing server event connection to "+a.get("debugName")+" at "+i),this.stopListening(t),this._serverRetryManager.stop(t.server),t.close(),delete this.connections[t.server.id]}},retryServerConnections:function(e){this.isValidServer(e)&&e.get("isResolved")&&this.connect({server:e})},onServerResolvedChange:function(e,t){
var n=this.connections[e.id];this.isValidServer(e)&&t&&!n&&(l.a.hasWebSocket||this.supportsLongPolling?this.connect({server:e}):e.trigger("socket:websocket",{error:!0}))},onServerRejectedChange:function(e,t){t&&this.disconnect({server:e})},onServerRemove:function(e){var t=this.connections[e.id];if(t&&(this.disconnect({connection:t}),e.get("isMerged")&&t)){var n=this.servers.get(e.id);this.connect({server:n})}},onServersReset:function(e,t){var n=this,i=t.previousModels;a.a.each(i,function(t){e.contains(t)||n.disconnect({
server:t})})},onTimeline:function(e){var t=void 0;switch(e.state){case c.a.CREATED:t="Created {1} in {2} on {3}";break;case c.a.MATCHING:t="Matching {1} in {2} on {3}";break;case c.a.DOWNLOADING_METADATA:t="Downloading metadata for {1} in {2} on {3}";break;case c.a.LOADING_METADATA:t="Loading metadata for {1} in {2} on {3}";break;case c.a.PROCESSED:t="Finished processing {1} in {2} on {3}";break;case c.a.ANALYZING:t="Analyzing {1} in {2} on {3}";break;case c.a.DELETED:t="Deleted {1} in {2} on {3}";
}if(t&&e.sectionID>0){var i=e.title||n.i(r.default)("an item"),a=e.section?e.section.get("title"):"section "+e.sectionID;s.a.trigger("show:status",e.server,n.i(r.default)(t,i,a,e.server.get("friendlyName")))}},onOpen:function(e){var t=this.connections[e.id],n=t.socket?t.socket.url:t.pollUrl;u.a.info("["+this.name+"] Opened server event connection to "+e.get("debugName")+" at "+n),this._serverRetryManager.stop(e)},onClose:function(e){u.a.warn("["+this.name+"] Unexpectedly closed server event connection to "+e.get("debugName")),
this._serverRetryManager.start(e)}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(34),s=n(27),o=r.a.extend({maximumDelay:30,initialize:function(e){var t=e.callback,n=e.logFormat;this._serversBeingRetried={},this.callback=t,this.logFormat=n},start:function(e){this._serversBeingRetried[e.id]||this.supportsRetry(e)&&(this._serversBeingRetried[e.id]={server:e,attempt:1},this._scheduleRetry(e))},stop:function(e){var t=this._serversBeingRetried[e.id];t&&(clearTimeout(t.timeout),delete this._serversBeingRetried[e.id]);
},stopAll:function(){var e=this;a.a.each(this._serversBeingRetried,function(t,n){clearTimeout(t.timeout),delete e._serversBeingRetried[n]})},supportsRetry:function(e){return!0},_scheduleRetry:function(e){var t=this,i=this._serversBeingRetried[e.id],a=Math.min(this.maximumDelay,i.attempt);n.i(s.a)(this.logFormat,e.get("debugName"),a),i.timeout=setTimeout(function(){t.callback(e),i.attempt++,t._scheduleRetry(e)},1e3*a)}});t.a=o},function(e,t,n){"use strict";function i(e,t,n){var i=f.a.writeXml({Response:{
_code:t,_status:n}});return{commandID:e,body:i,responseCode:t}}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(14),c=n(34),u=n(8),d=n(39),h=n(36),p=n(339),f=n(743),g=n(21),m=n(27),v=n(646),y=n(49),b=n(82),S=n(252),w=c.a.extend({initialize:function(){r.a.bindAll(this,"onSignal"),this.handlers={"/player/timeline/subscribe":[this.startTimeline],"/player/timeline/unsubscribe":[this.stopTimeline],"/player/mirror/details":[this.onMirrorDetails],"/player/playback/playMedia":[this.onPlayMedia],"/player/playback/pause":[this.onPlaybackAction,"pause"],
"/player/playback/play":[this.onPlaybackAction,"play"],"/player/playback/stop":[this.onPlaybackAction,"stop"],"/player/playback/skipNext":[this.onPlaybackAction,"skipNext"],"/player/playback/skipPrevious":[this.onPlaybackAction,"skipPrevious"],"/player/playback/stepForward":[this.onPlaybackAction,"stepForward"],"/player/playback/stepBack":[this.onPlaybackAction,"stepBack"],"/player/playback/skipTo":[this.onSkipTo],"/player/playback/seekTo":[this.onSeekTo],"/player/playback/refreshPlayQueue":[this.onRefreshPlayQueue],
"/player/playback/setParameters":[this.onSetParameters],"/player/playback/setStreams":[this.onSetStreams],"/player/navigation/moveLeft":[this.onKey,"moveLeft"],"/player/navigation/moveRight":[this.onKey,"moveRight"],"/player/navigation/moveUp":[this.onKey,"moveUp"],"/player/navigation/moveDown":[this.onKey,"moveDown"],"/player/navigation/select":[this.onKey,"select"],"/player/navigation/back":[this.onKey,"back"],"/player/navigation/home":[this.onNavigateHome],"/player/application/setText":[this.onSetText]
}},startTimeline:function(){var e=l.a("appModel");e.has("primaryPlayer")&&e.set("primaryPlayer",null),p.a.start()},stopTimeline:function(){p.a.stop();var e=l.a("appModel");e.has("transientServer")&&e.unset("transientServer")},onSignal:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=o.a.Deferred();this._signalInputActivity();var a=this.handlers[e.path];if(a){e.supportsTimeline!==!1&&this.startTimeline();var s=a[0],l=r.a.rest(a,1);l.push(e.query,t);var c=s.apply(this,l)||o.a.Deferred().resolve().promise();
c.done(function(t){var a=i(e.commandID,200,"OK");n.resolve({controllerResponse:a,deferredAction:t})}),c.fail(function(){var a=i(e.commandID,400,"Bad Request"),r=void 0;(t&&"/player/mirror/details"===e.path||"/player/playback/playMedia"===e.path)&&(r={}),n.resolve({controllerResponse:a,deferredAction:r})})}else m.a.warn("[Companion] controller manager found no handler for",e.path);return n.promise()},_signalInputActivity:function(){var e=l.a("appModel"),t=e.get("inputActivity");t&&t.notice()},_buildTransientServer:function(e){
var t=l.a("appModel"),n=new v.a({accessToken:r.a.first(e.token),machineIdentifier:"transient-"+e.machineIdentifier[0],originalMachineIdentifier:e.machineIdentifier[0]});n.addConnection({scheme:e.protocol[0],address:r.a.first(e.address),port:r.a.first(e.port),sources:[{id:"companion"}]});var i=n.populate();return i.done(function(e){t.set("transientServer",e)}),i.fail(function(){t.unset("transientServer")}),i},_populatePlayItem:function(e,t){var n=this,i=o.a.Deferred(),a=t.containerKey;a=a&&a[0]?decodeURIComponent(a[0]):null;
var r=t.key[0]?decodeURIComponent(t.key[0]):null,s=new y.a({key:r},{server:e});return s.populate().done(function(){var t=void 0,r=e.get("playQueueManager"),o=h.a.getChildMediaType(s.get("type")).element,l=S.a.prototype.getIdFromKey(a);null!==l?t=r.populateQueue(l,o):!function(){var n=new b.default({containerKey:a},{server:e});t=n.populate(),t=t.then(function(){var e=r.createForType(o,{onServer:!1});return e.addContent(n.get("metadataItems"))})}(),t.done(function(){i.resolve(s)}).fail(function(){i.reject(n);
})}).fail(function(){i.reject(n)}),i.promise()},_shouldReplaceRoute:function(){return/\/server\/transient-/.test(window.location.hash)},onMirrorDetails:function(e,t){var n=this;if(!p.a.isPlaybackActive()){var i={server:null,key:decodeURIComponent(e.key[0]).replace("children","")},a=g.a.execute("remoteUnlock");return a=a.then(function(){return n._buildTransientServer(e)}),a=a.then(function(e){i.server=e;var t=new y.a({key:i.key},{server:e});return t.fetch()}),a=a.then(function(e){return"season"===e.get("type")&&(i.key=e.get("parentKey")),
o.a.Deferred().resolve().promise()}),a=a.then(function(){var e={serverID:i.server.id,key:i.key,replace:n._shouldReplaceRoute()};return t?o.a.Deferred().resolve({route:{name:"details",options:e}}).promise():void u.a.trigger("navigate","details",e)})}},onPlayMedia:function(e,t){function n(t){return g.a.execute("playMedia",{item:t,siblings:t.get("type")===d.a.types.PHOTO,offset:r.a.first(e.offset),isFromCompanion:!0,replace:a})}var i=this,a=this._shouldReplaceRoute(),s=g.a.execute("remoteUnlock");return s=s.then(function(){
return i._buildTransientServer(e)}),s=s.then(function(t){return i._populatePlayItem(t,e)}),s=s.then(function(e){return t?{route:{name:"noop"},command:function(){return n(e)}}:n(e)})},onPlaybackAction:function(e){u.a.trigger("companion:"+e)},onSeekTo:function(e){var t=parseInt(e.offset[0],10);u.a.trigger("companion:setPosition",t)},onRefreshPlayQueue:function(e){var t=l.a("appModel"),n=t.get("transientServer"),i=o.a.Deferred().reject().promise();if(!n)return i;var a=n.get("playQueueManager"),r=a.get(e.playQueueID[0]);
return r?r.fetch():i},onSetParameters:function(e){var t=r.a.first(e.volume),n=r.a.first(e.repeat);null!=t&&u.a.trigger("companion:setVolume",parseInt(t,10)),null!=n&&u.a.trigger("companion:setRepeat",parseInt(n,10))},onSetStreams:function(e){var t=r.a.first(e.subtitleStreamID);null!=t&&u.a.trigger("companion:setSubtitleStreamID",parseInt(t,10))},onSkipTo:function(e){var t=decodeURIComponent(e.key[0]);u.a.trigger("companion:skipTo",t)},onKey:function(e){u.a.trigger("companion:"+e),u.a.trigger("companion:key",e);
},onNavigateHome:function(){var e=g.a.execute("remoteUnlock");return e.done(function(){u.a.trigger("navigate:refresh:dashboard")}),e},onSetText:function(e){u.a.trigger("companion:setText",r.a.first(e.text)||"")}});t.a=new w},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(112),l=n(55),c=l.a.extend({fetch:function(){return this.storage.fetch().then(a.a.bind(function(){var e=this._readFromStorage();return e?(this.set(e),this):s.a.Deferred().reject()},this))},save:function(e){return n.i(o.a)(this.storage.fetch()).then(a.a.bind(function(){
return e&&this.set(e),this._saveToStorage(this.toJSON())},this))},destroy:function(){return n.i(o.a)(this.storage.fetch()).then(a.a.bind(function(){return this.storage.unset(a.a.result(this,"storageKey")),this.storage.save()},this))},_readFromStorage:function(){return this.storage.get(a.a.result(this,"storageKey"))},_saveToStorage:function(e){return this.storage.save(a.a.result(this,"storageKey"),e)}});t.a=c},function(e,t,n){"use strict";var i=n(20),a=n(210),r=n(16),s=n(18),o=n(1104),l=s.a.extend({
mixins:[a.a],name:"ChannelListModel",context:["server"],idAttribute:"key",collectionName:"channels",url:function e(){var t=this.get("key"),e=t?t:i.join(["/channels",this.get("subset")]);return this.getPaginatedUrl(e)},sessionAttrs:{key:r.a.string,subset:r.a.oneOf("all","recentlyViewed"),currentPageStart:r.a.integer,currentPageSize:r.a.integer,populatedRange:r.a.object},syncedAttrs:{totalSize:r.a.integer,viewGroup:r.a.string,title1:r.a.string,title2:r.a.string},syncedRelations:{channels:{relationClass:o.a,
rootPropertyName:"Directory",setOptions:function(e){return{remove:e.remove,at:e.at}}}},defaults:function(){return{subset:"all",populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()}});t.a=l},function(e,t,n){"use strict";var i=n(38),a=n(16),r=n(57),s=n(18),o=n(82),l=s.a.extend({name:"ChannelModel",context:["server","channel"],idAttribute:"key",url:function(){return this.id?this.id:this.identifierUrl(this.get("identifier"))},identifierUrl:function(e){return"/:/plugins/"+e+"/root";
},syncedAttrs:{key:a.a.string,identifier:a.a.string,type:a.a.string,name:a.a.string,title1:a.a.string,title2:a.a.string,message:a.a.string,summary:a.a.string,thumb:a.a.string,art:a.a.string,prefsKey:a.a.string,searchKey:a.a.string,installed:a.a.boolean,noCache:a.a.boolean,allowSync:a.a.boolean,hasPrefs:a.a.boolean,hasStoreServices:a.a.boolean,share:a.a.boolean,lastAccessedAt:a.a.integer},syncedRelations:{metadataList:{relationClass:o.default,attrs:function(e){return{containerKey:e.key?e.key:this.identifierUrl(e.identifier)
}},options:function(e){return{channel:this,skipCache:!0}}}},derivedAttrs:{title:function(){return this.get("name")||this.get("title2")||this.get("title1")}},augmentResponseText:function(e,t){return t===r.a.xml?i.a.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){if(this.has("key")&&(e.key=this.get("key")),"none"===e.key&&delete e.key,e.key){var t=e.key.match(/^\/(\w+)\//);t&&(e.type=t[1])}e.title&&(e.name=e.title);for(var n=i.a.parseArray(e.Metadata),a=n.length-1;a>=0;a--){var r=n[a];
if(r.settings||r.search){var s=r.settings?"prefsKey":"searchKey";e[s]=r.key,n.splice(a,1)}}return e.Metadata=n,e.metadataList=e,e}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(55),l=n(1243),c=n(1245),u=n(1240),d=n(250),h=o.a.extend({defaults:{selectedItem:null,mediaType:null,collection:null,owned:!0,lastAddedItem:null,hasUserAdditions:!1},url:"",initialize:function(e){this.set({mediaType:e.mediaType,collection:new d.a([],{type:e.mediaType,server:e.server})})},fetch:function(){
return s.a.Deferred().resolve().promise()},queueContent:function(e,t,i){i||(i={});var r=s.a.Deferred().resolve().promise(),o=e.get("isPlayQueueItem")?e.get("metadataItem"):e;return this.isItemQueueable(o)&&(o.get("children")&&a.a.result(o.get("children"),"url")&&(r=r.then(function(){return o.get("children").populate()})),r=r.done(a.a.bind(function(){this.set({lastAddedItem:o,hasUpNext:!0,hasUserAdditions:this.get("collection").length>0,shuffled:!!i.shuffled});var e=this.get("collection").indexOf(t);
e===-1&&(e=0);var r=i.next?{at:e+1}:{},s=n.i(l.a)(o);if(s){var d=s.filter(c.a);i.shuffle&&(d=a()(d).shuffle());var h=a.a.map(d,a.a.bind(u.a,this));this.get("collection").add(h,r)}else this.get("collection").add(u.a.apply(this,[o]),r);this.get("collection").trigger("reset",this.get("collection"))},this))),r},addContent:function(e,t){return this.queueContent(e,this.get("selectedItem"),t).then(a.a.bind(this._setSelectedItem,this,t))},_setSelectedItem:function(e){var t=null;e&&e.firstItemKey?t=this.get("collection").find(function(t){
return t.get("key")===e.firstItemKey}):this.get("collection").length&&(t=this.get("collection").at(0)),this.set("selectedItem",t)},removeItem:function(e){return e.get("playQueueItemID")===this.get("selectedItem").get("playQueueItemID")?s.a.Deferred().resolve().promise():(this.set("hasUserAdditions",!0),this.get("collection").remove(e),this.get("collection").trigger("reset",this.get("collection")),s.a.Deferred().resolve().promise())},moveItem:function(e,t){if(e===this.get("selectedItem").get("playQueueItemID"))return s.a.Deferred().resolve().promise();
var n=this.get("collection"),i=n.findWhere({playQueueItemID:e});n.remove(i);var a=t||this.get("selectedItem").get("playQueueItemID"),r=n.findWhere({playQueueItemID:a}),o=n.indexOf(r)+1;return this.set("hasUserAdditions",!0),n.add(i,{at:o}),n.trigger("reset",n),s.a.Deferred().resolve().promise()},isItemQueueable:function(e){if(e.get("currentSubset")&&"photo"!==e.viewGroup)return!1;if("photoalbum"===e.get("type")&&!e.get("isLibraryItem"))return!1;var t=["track","episode","movie","photo","clip","userPlaylistItem","photoalbum","album","season"],i=a()(t).contains(e.get("type")),r=n.i(l.a)(e),s=r&&r.any(c.a);
return i||s},toggleShuffle:function(){return s.a.Deferred().resolve().promise()},setRepeatAll:function(e){return s.a.Deferred().resolve().promise()},yieldOwnership:function(e){e=e||{};var t,i=this.get("lastAddedItem");return t=i.server.get("synced")||e.absoluteUrl?a.a.result(n.i(l.a)(i),"url"):this.get("selectedItem").get("key"),s.a.Deferred().resolve(t).promise()},takeOwnership:function(){return s.a.Deferred().resolve().promise()},supports:function(e){return!(e&&(e.unwatched||e.remoteRefresh))}});
t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(34),s=n(52),o=n(36),l=n(629),c=n(252),u=r.a.extend({mixins:s.a,initialize:function(e){this.server=e.server,this._queues={audio:null,photo:null,video:null},this.canCreateOnLocal=l.a.prototype.isItemQueueable,this.doesLocalSupport=l.a.prototype.supports},_playQueueTypeFor:function(e){if(e.get("isUserPlaylist"))return"video";if(e.get("isPlaylist"))return e.get("playlistType");if(e.get("isMetadataList"))return o.a.getChildMediaType(e.get("firstItemType")).element;
var t=e&&e.server.getSectionForItem(e),n=t&&"photo"===t.get("type")?"photo":e.get("type");return o.a.getChildMediaType(n).element},createFor:function(e,t){t=t||e;var n=this._playQueueTypeFor(t),i=null;return this.canCreateOnServer(e)?i=new c.a({mediaType:n},{server:this.server}):this.canCreateOnLocal(e)&&(i=new l.a({mediaType:n},{server:this.server})),this._queues[n]=i,this.trigger("change change:playQueue:"+n,i),i},getForType:function(e){return this._queues[e]},createForType:function(e,t){var n=null;
return n=t.onServer?new c.a({mediaType:e},{server:this.server}):new l.a({mediaType:e}),this._queues[e]=n,this.trigger("change change:playQueue:"+e,n),n},getFor:function(e){var t=e.get("type");if(!t||"channelDirectory"===t)return null;var n=this._playQueueTypeFor(e),i=this._queues[n];return i&&i.isItemQueueable(e)?i:null},get:function(e){return a.a.findWhere(this._queues,{id:e})},populateQueue:function(e,t){var n=new c.a({playQueueID:e,mediaType:t},{server:this.server});return this._queues[t]=n,n.populate();
},remove:function(e){var t=this._queues[e];t&&(this._queues[e]=null,this.trigger("change remove:playQueue:"+e,t))},removeAll:function(){a.a.each(a.a.keys(this._queues),this.remove,this)},canCreateOnServer:function(e){return this.server.supports("playQueues")&&this.server.get("isFullServer")&&c.a.prototype.isItemQueueable(e)},doesServerSupport:function(e){return this.server.supports("playQueues")&&c.a.prototype.supports(e)},canCreateFor:function(e,t){return this.canCreateOnServer(e)&&this.doesServerSupport(t)||this.canCreateOnLocal(e)&&this.doesLocalSupport(t);
}});t.a=u},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(1101),s=r.a.extend({initialize:function(e){this.playQueue=e.playQueue,this.includeSelectedItem=e.includeSelectedItem,this.addFilter(a.a.bind(this.filterUpNext,this)),this.listenForUpNextChanges()},listenForUpNextChanges:function(){var e=a.a.debounce(this.onPlayQueueChange),t=["change:playQueueSelectedItemID","change:playQueueLastAddedItemID"];this.listenTo(this.playQueue,t.join(" "),e),this.listenTo(this.playQueue.get("collection"),"change:queueIndex",e);
},filterUpNext:function(e){var t=this.superset.indexOf(e),n=this.playQueue.getUpNextRange(),i=n.start,a=n.end;return this.includeSelectedItem||(i+=1),t>=i&&t<=a},onPlayQueueChange:function(){this.refilter()}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(20),s=n(22),o=n(318),l=s.a.extend({name:"FilterCollection",context:["server","section","includeAdvanced"],model:o.a,comparator:"filterType",includeAdvanced:!0,url:function(){var e=a.a.result(this.section,"url"),t=this.section.get("currentType"),n={
includeAdvanced:this.includeAdvanced?1:0};return t&&(n.type=t.id),r.join([e,"/filters"],n)},findUnwatchedFilter:function(){return this.get("unwatched")||this.get("unwatchedLeaves")}});t.a=l},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"FirstCharacterModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:i.a.string,title:i.a.string,size:i.a.integer},urlRoot:function(){return"/library/sections/"+this.section.id+"/firstCharacter"}});
t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"MediaTypeModel",context:["server","section"],sessionAttrs:{id:i.a.integer,typeString:i.a.string,title:i.a.string,plural:i.a.string,element:i.a.string,child:i.a.integer,grandchild:i.a.integer,parent:i.a.integer,grandparent:i.a.integer,selected:i.a.boolean},defaults:{selected:!1}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(1119),r=i.a.extend({name:"MetadataTypeCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){
"use strict";var i=n(38),a=n(67),r=n(65),s=n(16),o=n(57),l=n(18),c=n(82),u=l.a.extend({name:"HubModel",context:["server","section","metadataItem","allowSync"],entityType:a.c,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(r.a)(this.entityType,e.hubIdentifier,this.server.entityID(),this.section&&this.section.entityID(),this.metadataItem&&this.metadataItem.entityID())},idAttribute:"hubIdentifier",rootPropertyName:"Hub",url:function(){return this.get("key")||this.get("hubKey");
},sessionAttrs:{isMetadataListPending:s.a.boolean,isMetadataListPopulated:s.a.boolean,metadataListError:s.a.object},syncedAttrs:{key:s.a.string,hubKey:s.a.string,hubIdentifier:s.a.string,title:s.a.string,summary:s.a.string,thumb:s.a.string,type:s.a.string,size:s.a.integer,totalSize:s.a.integer,more:s.a.boolean,random:s.a.boolean,browse:s.a.boolean},syncedRelations:{metadataList:{relationClass:c.default}},defaults:{isMetadataListPending:!0,isMetadataListPopulated:!1,metadataListError:null},initialize:function(){
this.listenTo(this.get("metadataList"),"change:populatedRange",this.onPopulatedRangeChange)},augmentResponseText:function(e,t){return t===o.a.xml?i.a.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){var t=i.a.parseInteger(e.size)||0;return e.metadataList={listIdentifier:e.hubIdentifier,containerKey:e.key||e.hubKey,Metadata:e.Metadata,size:t},e},onPopulatedRangeChange:function(e,t){var n=t.size,i=e.get("totalSize"),a={size:n};null!=i&&(a.more=i>n),this.set(a)}});t.a=u},function(e,t,n){
"use strict";var i=n(22),a=n(1127),r=i.a.extend({name:"OverlayCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(181),s=n(20),o=n(210),l=n(16),c=n(18),u=n(1128),d=c.a.extend({mixins:[o.a],name:"PlaylistListModel",context:["server","section"],idAttribute:"key",collectionName:"playlists",url:function(){return this.getPaginatedUrl(a.a.result(this,"containerKey"))},containerKey:function(){var e=this.section.get("currentType"),t=this.section.get("currentSort"),n={
type:15};return t?n.sort=t.id+":"+(t.get("direction")||"asc"):n.sort="titleSort:asc",e&&(n.playlistType=e),this.section.get("onlyDumb")&&(n.smart=0),s.join("/playlists/all",n)},sessionAttrs:{isPlaylistList:l.a.boolean,currentPageStart:l.a.integer,currentPageSize:l.a.integer,populatedRange:l.a.object},syncedAttrs:{totalSize:l.a.integer},syncedRelations:{playlists:{relationClass:u.a,rootPropertyName:"Playlist",options:function(e){return{containerKey:a.a.result(this,"containerKey")}},setOptions:function(e){
return{remove:e.remove,at:e.at}}}},defaults:function(){return{isPlaylistList:!0,populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},sync:function(e,t,n){var i=r.a.addVersionHeader(2,n);return c.a.prototype.sync.call(this,e,t,i)}});t.a=d},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"TagModel",context:["server","section"],idAttribute:"tag",syncedAttrs:{id:i.a.integer,tag:{type:i.a.string,save:!0},tagType:i.a.integer,librarySectionID:i.a.string,
librarySectionKey:i.a.string,librarySectionType:i.a.integer,filter:i.a.string,role:i.a.string,thumb:i.a.string,count:i.a.integer}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(55),l=n(253),c=o.a.extend({whitelistedAttrs:["friendlyName","label","capabilities"],defaults:{protocolCapabilities:["playback","timeline","mirror","playqueues"]},initialize:function(){this.set("nowPlaying",new l.a([],{server:this.server}))},parse:function(e){var t=a.a.pick(e,this.whitelistedAttrs);
return t.friendlyName=s()("<div/>").html(t.friendlyName).text(),t.protocol=e.receiverType,t.volume=e.volume.level,t.muted=e.volume.muted,t}});t.a=c},function(e,t,n){"use strict";var i=n(81),a=n(740),r=n(317),s=n(626),o=2592e5,l=r.a.extend({storageKey:"resumePlayQueue",serialize:function(e){return r.a.prototype.serialize.call(this,a.a.augmentDictionary(e,{ttl:o}))},_getStorage:function(){return i.a}}),c=s.a.extend({initialize:function(e,t){s.a.prototype.initialize.apply(this,arguments),this.user=t.user,
this.storage=new l},storageKey:function(){return this.user.id},toJSON:function(){var e=s.a.prototype.toJSON.apply(this,arguments);return a.a.augmentObj(e,o,!0)}});t.a=c},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(2),s=n.n(r),o=n(20),l=n(248),c=n(16),u=n(18),d=n(253),h=u.a.extend({name:"PlexPlayerModel",context:["server"],idAttribute:"machineIdentifier",rootPropertyName:"Server",sessionAttrs:{nowPlaying:c.a.instanceOf(d.a).isRequired},syncedAttrs:{machineIdentifier:c.a.string,name:c.a.string,
address:c.a.string,port:c.a.string,deviceClass:c.a.string,version:c.a.string,product:c.a.string,protocol:c.a.string,protocolVersion:c.a.string,protocolCapabilities:c.a.list},derivedAttrs:{friendlyName:function(){return this.get("name")}},defaults:function(){return{nowPlaying:new d.a([],{server:this.server})}},url:function(){return"http://"+this.get("address")+":"+this.get("port")+"/"},getXHROptions:function(e,t){return a()({url:this.resolveUrl(e),dataType:"text",headers:this.getHeaders()},t)},resolveUrl:function(e){
return/^\w+:\/\//.test(e)?e:o.join([s.a.result(this,"url"),e])},getHeaders:function(){var e=l.a.getInstance(),t=s.a.clone(e);return t}});t.a=h},function(e,t,n){"use strict";function i(e,t,n){return void 0===n?t:r.a.isObject(t)?t:n}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";var i=n(22),a=n(171),r=i.a.extend({name:"ProviderFeatureCollection",context:["server","provider"],model:a.b});t.a=r},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(16),s=n(18),o=s.a.extend({name:"CloudDriveUpdateStatusModel",
context:["server"],url:"/services/clouddrive/updatestatus",syncedAttrs:{updating:r.a.boolean},fetchAndNotUpdating:function(){var e=this;return this.fetch().then(function(){return e.get("updating")?a.a.Deferred().rejectWith(e,[e]).promise():e})}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(16),s=n(83),o=n(14),l=s.a.prototype,c=s.a.extend({name:"TransientServerModel",cache:null,persistInCache:!1,sessionAttrs:a.a.extend({},s.a.prototype.sessionAttrs,{isTransient:r.a.boolean,originalMachineIdentifier:r.a.string
}),defaults:function e(){var e=s.a.prototype.defaults.apply(this,arguments);return a.a.extend({},e,{friendlyName:"Transient Server",isTransient:!0})},initialize:function(e){var t=e.originalMachineIdentifier,i=n.i(o.a)("appModel"),r=i.get("servers").get(t);r&&a.a.extend(e,r.pick("publicAddressMatches","version")),s.a.prototype.initialize.apply(this,arguments)},addConnection:function(){var e=l.addConnection.apply(this,arguments),t=e.getIpAddressFromPlexDirectAddress();return t&&e.set("address",t),this.testConnection(e),
e},updateCacheKey:function(){},onConnectionTestError:function(e,t){e.get("isAborted")||(e.get("isHttps")&&this.addConnection({scheme:"http",address:e.getIpAddressFromPlexDirectAddress(),port:e.get("port")}),this.get("connections").hasOnlyFailedConnections()&&this._reject())}});t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(16),s=n(18),o=n(1167),l=s.a.extend({name:"StoredServerModel",idAttribute:"machineIdentifier",syncedAttrs:{machineIdentifier:r.a.string,friendlyName:r.a.string,accessToken:r.a.string,
sourceTitle:r.a.string,home:r.a.boolean,synced:r.a.boolean,serverClass:r.a.string,isShared:r.a.boolean,version:r.a.string,publicAddressMatches:r.a.boolean},syncedRelations:{connections:{relationClass:o.a}},copyFromServer:function(e){var t={};a.a.each(this.syncedAttrs,function(n,i){t[i]=e.get(i)}),this.set(t)}});t.a=l},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(49),s=n(432);n.d(t,"a",function(){return o});var o={INACTIVE:"inactive",SCHEDULED:"scheduled",IN_PROGRESS:"inprogress",COMPLETE:"complete",
CANCELLED:"cancelled",ERROR:"error"},l=a.a.extend({name:"MediaGrabOperationModel",context:["server"],rootPropertyName:"MediaGrabOperation",syncedAttrs:{mediaSubscriptionID:i.a.string,mediaIndex:i.a.integer,channelTitle:i.a.string,status:i.a.string,error:i.a.string,linkedKey:i.a.string},syncedRelations:{metadataItem:{relationClass:r.a,rootPropertyName:"Metadata"},conflicts:function(){return{relationClass:s.a,deferred:!0}}},derivedAttrs:{mediaItem:function(){var e=this.get("mediaIndex"),t=this.get("metadataItem"),n=t.get("Media")||[];
return n[e]},beginsAt:function(){var e=this.get("mediaItem");return e&&e.beginsAt},endsAt:function(){var e=this.get("mediaItem");return e&&e.endsAt}},augmentResponse:function(e){var t=e;return t[this.rootPropertyName]&&(t=t[this.rootPropertyName]),t.Conflicts&&(t.conflicts=t.Conflicts.MediaGrabOperation,delete t.Conflicts),t}});t.b=l},function(e,t,n){"use strict";function i(e,t){switch(e){case l.INT:case l.ENUM:return a.a.parseInteger(t);case l.BOOL:return a.a.parseBoolean(t);default:return t}}var a=n(38),r=n(16),s=n(18);
n.d(t,"a",function(){return l});var o="|",l={INT:"int",TEXT:"text",BOOL:"bool"},c=s.a.extend({name:"MediaSettingModel",context:["server"],idAttribute:"id",rootPropertyName:"Setting",syncedAttrs:{id:r.a.string,advanced:r.a.boolean,default:r.a.oneOfType(r.a.integer,r.a.string,r.a.boolean),hidden:r.a.boolean,group:r.a.string,label:r.a.string,summary:r.a.string,type:r.a.oneOf(l.INT,l.TEXT,l.BOOL,l.ENUM),value:r.a.oneOfType(r.a.integer,r.a.string,r.a.boolean),enumValues:r.a.array},augmentResponse:function(e){
return e.default=i(e.type,e.default),e.value=i(e.type,e.value),e.enumValues&&(e.enumValues=e.enumValues.split(o).map(function(t){var n=t.split(":"),a=n[0],r=n[1],s=void 0===r?a:r;return{label:decodeURIComponent(s),value:i(e.type,a)}})),e},parseAndSetValue:function(e){this.set("value",i(this.get("type"),e))}});t.b=c},function(e,t,n){"use strict";var i=n(38),a=n(57),r=n(22),s=n(320),o=r.a.extend({name:"MediaSubscriptionCollection",context:["server"],model:s.a,url:"/media/subscriptions",augmentResponseText:function(e,t){
return t===a.a.xml?i.a.replaceMetadataXMLElementNames(e):e}});t.a=o},function(e,t,n){"use strict";var i=n(38),a=n(57),r=n(22),s=n(320),o=r.a.extend({name:"MediaSubscriptionTemplateCollection",context:["server"],url:"/media/subscriptions/template",model:s.a,augmentResponseText:function(e,t){return t===a.a.xml?i.a.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){return e.SubscriptionTemplate}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(44),l=n(55),c=n(1184),u=l.a.extend({
whitelistedAttrs:["id","home","protected","restricted","title","username","email","thumb","recommendationsPlaylistId","allowSync","allowCameraUpload","allowChannels","filterMovies","filterTelevision","filterMusic","filterPhotos"],saveAttrs:["allowSync","allowCameraUpload","allowChannels","filterMovies","filterTelevision","filterMusic","filterPhotos"],filterAttrs:["filterMovies","filterTelevision","filterMusic","filterPhotos"],urlRoot:function(){return this.get("home")?"/api/users":"/api/friends"},
convert:function(e){var t=a.a.isObject(e)?e:o.a.parseXML(e);return t.User&&(t=t.User),o.a.parseInteger(t,"id"),o.a.parseBoolean(t,["home","protected","restricted","allowSync","allowCameraUpload","allowChannels"]),o.a.parseQueryString(t,["filterMovies","filterTelevision","filterMusic","filterPhotos"],"|"),o.a.parseArray(t,"Server"),t},parse:function(e){var t=this.convert(e);return this.parseServers(t),t=a.a.pick(t,this.whitelistedAttrs)},parseServers:function(e){var t=this.get("serverShares"),n=e.Server;
t?t.set(n,{parse:!0}):(t=new c.a(n,{server:this.server,parent:this,populated:!0,parse:!0}),this.set("serverShares",t))},cloneDeep:function(){var e=this.toJSON();e.Server=e.serverShares.toJSON(),e.serverShares=null;var t={server:this.server,section:this.section,channel:this.channel,parent:this.parent,parse:!0,skipCache:!0};return new this.constructor(s.a.extend(!0,{},e),t)||null},getSaveParams:function(e,t){var n=this;if(a.a.isEmpty(e)){var i=this.pick(this.saveAttrs);return a.a.map(i,function(e,t,i){
a.a.isBoolean(e)?i[t]=e?"1":"0":a.a.contains(n.filterAttrs,t)&&(i[t]=n.stringifyFilter(e))},this),i}return l.a.prototype.getSaveParams.apply(this,arguments)},stringifyFilter:function(e){var t=a.a.map(a.a.keys(e),function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])});return t.join("|")}});t.a=u},function(e,t,n){"use strict";var i=n(75),a=n(434),r=i.a.extend({model:a.a,url:"/api/home/users",parse:function(e){return this.convert(e,"User")}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(1188),r=i.a.extend({
name:"UserEntitlementCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(20),s=n(67),o=n(65),l=n(16),c=n(49),u=c.a.prototype,d=c.a.extend({name:"UserPlaylistItemModel",entityType:s.h,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(o.a)(this.entityType,e.id,this.server.entityID())},context:["server","section","channel","identifier","mediaTagPrefix","mediaTagVersion","containerKey","userPlaylistKey"],idAttribute:"id",
cache:null,url:function(){return r.join(["/pms/playlists/",this.userPlaylistKey,"items",this.id])},sessionAttrs:a.a.extend({},u.sessionAttrs,{isUserPlaylistItem:l.a.boolean}),syncedAttrs:a.a.extend({},u.syncedAttrs,{id:l.a.integer,sourceTitle:l.a.string,recommender:l.a.string,message:l.a.string}),defaults:a.a.extend({},u.defaults,{isUserPlaylistItem:!0}),augmentResponse:function(e,t){var n=u.augmentResponse.apply(this,arguments);if(n.type="userPlaylistItem",n.ratingKey=n.url,n.thumb){var i=/\?(\d+)$/.exec(n.thumb);
i&&(n.addedAt=i[1])}return n}});t.a=d},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(38),o=n(20),l=n(210),c=n(16),u=n(57),d=n(18),h=n(1191),p={WATCH_LATER:"queue",RECOMMENDED:"recommendations"},f={ALL:"all",UNWATCHED:"unwatched",WATCHED:"watched"},g=d.a.extend({mixins:[l.a],name:"UserPlaylistModel",context:["server"],idAttribute:"key",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(a.a.result(this,"containerKey"))},containerKey:function(){return o.join(["/pms/playlists",this.get("key"),this.get("subset")]);
},sessionAttrs:{isUserPlaylist:c.a.boolean,key:c.a.oneOf(p.WATCH_LATER,p.RECOMMENDED).isRequired,subset:c.a.oneOf(f.ALL,f.UNWATCHED,f.WATCHED).isRequired,currentPageStart:c.a.integer,currentPageSize:c.a.integer,populatedRange:c.a.object},syncedAttrs:{totalSize:c.a.integer,identifier:c.a.string,mediaTagPrefix:c.a.string,mediaTagVersion:c.a.string,viewGroup:c.a.string,title:c.a.string},syncedRelations:{metadataItems:{relationClass:h.a,rootPropertyName:"Metadata",options:function(e){return{identifier:e.identifier,
mediaTagPrefix:e.mediaTagPrefix,mediaTagVersion:e.mediaTagVersion,containerKey:a.a.result(this,"containerKey"),userPlaylistKey:e.key}},setOptions:function(e){return{remove:e.remove,at:e.at}}}},derivedAttrs:{label:function(){var e=this.get("key");return e===p.WATCH_LATER?n.i(r.default)("Watch Later"):e===p.RECOMMENDED?n.i(r.default)("Recommended"):void 0},helpRoute:function(){var e=this.get("key");if(e===p.WATCH_LATER)return"#!/playlist/"+e+"/help"},playlistRoute:function(){return"#!/playlist/"+this.get("key");
}},defaults:function(){return{isUserPlaylist:!0,subset:f.ALL,populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},augmentResponseText:function(e,t){return t===u.a.xml?s.a.replaceMetadataXMLElementNames(e):e},filterWatched:function(){var e=this.get("metadataItems"),t=e.filter(function(e){return!!e.get("viewCount")});return e.clone(t)},filterUnwatched:function(){var e=this.get("metadataItems"),t=e.filter(function(e){return!e.get("viewCount")});return e.clone(t);
}},{keys:p,subsets:f});t.a=g},function(e,t,n){"use strict";var i=n(22),a=n(1192),r=i.a.extend({name:"UserProviderCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(1193),r=i.a.extend({name:"UserRoleCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(53),a=n(436);n.d(t,"b",function(){return r}),n.d(t,"a",function(){return s});var r=n.i(i.a)(a.a),s=n.i(i.a)(a.b)},function(e,t,n){"use strict";function i(e){var t=e.key,i=e.getModel,r=n.i(a.a)(t),s="is"+r+"Pending",o="is"+r+"Populated",l=t?t+"Error":"error";
return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.count,r=i(e,n),c=t?r.get(t):r,u=(r.sessionAttrs,r.get(s));r.set(s,!0),c.repopulateRange(a).done(function(){var e;r.set((e={},e[s]=!1,e[o]=!0,e[l]=null,e))}).fail(function(e,t){var n;return t.aborting?void r.set(s,u):void r.set((n={},n[s]=!1,n[l]=t,n))})}}var a=(n(33),n(214));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,n="/library/metadata/"+e.get("ratingKey")+"/analyze",i=t.getXHROptions(n,{
type:"PUT"}),a=e.get("mediaState"),o=s.a;e.set("mediaState",o);var l=r.a.ajax(i).fail(function(t){e.get("mediaState")===o&&e.set("mediaState",a)});return l.promise()}var a=n(5),r=n.n(a),s=n(1212);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,n="/library/metadata/"+e.get("ratingKey")+"/refresh",i=t.getXHROptions(n,{type:"PUT"}),a=e.get("metadataState"),o=s.d;e.set("metadataState",o);var l=r.a.ajax(i).fail(function(t){e.get("metadataState")===o&&e.set("metadataState",a)});return l.promise();
}var a=n(5),r=n.n(a),s=n(679);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=e.server,i=r.a.result(e,"url"),a=n.getXHROptions(l.join([i,"move"],{after:t}),{type:"PUT"});return o.a.ajax(a).promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(20);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(9),s=(n.n(r),n.i(r.createSelectorCreator)(r.defaultMemoize,a.a.isEqual));t.a=s},function(e,t,n){"use strict";function i(e){return/^\w+:\/\//.test(e)}function a(e){var t=o.a.findWhere(e.connections,{
isPrivate:!0});return t?t.port:"32400"}function r(){return n.i(l.createSelector)(function(e,t){var n=t.url;return n},n.i(u.a)(),d.a,function(e,t,n){if(e&&t&&t.activeConnection){var r=!!n&&!t.isFullServer,s=r?n:t;if(s&&s.activeConnection){var o=s.machineIdentifier===t.machineIdentifier,l=o?"http://127.0.0.1:"+a(t)+"/":t.activeConnection.uri,u=i(e)?e:c.join([l,e],{"X-Plex-Token":t.accessToken}),d=c.join([s.activeConnection.uri,"/photo/:/transcode"],{url:u,"X-Plex-Token":s.accessToken});return d}}});
}var s=n(2),o=n.n(s),l=n(9),c=(n.n(l),n(20)),u=n(63),d=n(1202);t.a=r},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(150)),r=n.i(i.createSelector)(a.a,function(e){return e.libraries});t.a=r},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){var n=t.hubEntityID;return n},r.a,function(e,t){return t[e]})}var a=n(9),r=(n.n(a),n(668));t.a=i},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(150)),r=n.i(i.createSelector)(a.a,function(e){return e.hubs});t.a=r},function(e,t,n){
"use strict";var i=n(9),a=(n.n(i),n(150)),r=n.i(i.createSelector)(a.a,function(e){return e.metadataLists});t.a=r},function(e,t,n){"use strict";function i(e){return n.i(o.createSelector)(c.a,n.i(u.a)(),function(t,n){return n?n.reduce(function(n,i){var a=t[i];return a&&s.a.findWhere(a.features,{type:e})&&n.push(i),n},[]):[]})}function a(e){return n.i(l.a)(i(e),function(e){return e})}var r=n(2),s=n.n(r),o=n(9),l=(n.n(o),n(173)),c=n(324),u=n(671);t.a=a},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(r.a)(),function(e){
return e?e.desktop.providers:void 0})}var a=n(9),r=(n.n(a),n(63));t.a=i},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(1207)),r=n.i(i.createSelector)(a.a,function(e){return e.myPlexScheme+"://"+e.myPlexUrl});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(9),s=(n.n(r),n(258)),o=n.i(r.createSelector)(s.a,function(e){return a.a.where(e,{isOutOfDate:!0})});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(9),s=(n.n(r),n(257)),o=n.i(r.createSelector)(s.a,function(e){return e?a.a.pick(e.desktop,["personalCloudServerProviders","isPersonalCloudServerProvidersPending","isPersonalCloudServerProvidersPopulated","personalCloudServerProvidersError"]):{};
});t.a=o},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(150)),r=n.i(i.createSelector)(a.a,function(e){return e.mediaSubscriptions});t.a=r},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(173)),r=n(1208),s=n.i(a.a)(n.i(i.createSelector)(r.a,function(e){return(e.features||[]).reduce(function(e,t){return e[t.id]=!0,e},{})}),function(e){return e});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(61),s=n(440),o=s.a.extend({maxCycles:3,maxSize:50,imageParamsRegex:/&?(width|height|minSize)=([^&]+)/g,
initialize:function(){s.a.prototype.initialize.apply(this,arguments),this._infoMemo={}},store:function(e,t){if(t||(t=this.getItemCacheKey(e)),t){var n=e.url,i=this.getImageInfo(n),r={url:n,blobUrl:e.blobUrl,size:i.size},s=this.get(t);if(s){if(!s.images.hasOwnProperty(n)){var o=s.sizes;s.images[n]=r;var l=a.a.sortedIndex(o,r,"size");o.splice(l,0,r)}}else s={images:{},sizes:[r]},s.images[n]=r,this.startListening(),s._cacheKey=t,this._cache[t]=s,this.size++,e.persistInCache||this.setItemCycle(s,t,a.a.first(this.cycles));
}},getItemCacheKey:function(e){var t=this.getImageInfo(e.url);return t.key},getImageInfo:function(e){if(this._infoMemo.hasOwnProperty(e))return this._infoMemo[e];var t={width:0,height:0,minSize:0},n=e.replace(this.imageParamsRegex,function(e,n,i){return t[n]=parseInt(i,10),""}),i={key:n,size:t.width*t.height+t.minSize};return this._infoMemo[e]=i,i},removeImageInfo:function(e){this._infoMemo.hasOwnProperty(e)&&delete this._infoMemo[e]},getBlobUrl:function(e){var t=this.getImageInfo(e),n=this.get(t.key);
if(n){var i=n.images[e];if(i)return i.blobUrl}},getPlaceholder:function(e){var t=this.getImageInfo(e),n=this.get(t.key);if(n){if(n.images[e])return;var i=a.a.last(n.sizes);return i.blobUrl}},remove:function(e,t){s.a.prototype.remove.apply(this,arguments),a.a.each(e.sizes,function(e){this.removeImageInfo(e.url),r.a.hasObjectUrl&&window.URL.revokeObjectURL(e.blobUrl)},this)}});t.a=o},function(e,t,n){"use strict";var i={DISABLED:0,ENABLED:1,VERBOSE:2};i.settings=[{value:i.DISABLED,title:"Disabled"},{
value:i.ENABLED,title:"Enabled"},{value:i.VERBOSE,title:"Verbose"}],t.a=i},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"a",function(){return a}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return s});var i="queued",a="matching",r="processing",s="loading"},function(e,t,n){"use strict";var i={TINY:50,SMALL:75,NORMAL:100,LARGE:125,HUGE:200};i.settings=[{value:i.TINY,title:"Tiny"},{value:i.SMALL,title:"Small"},{value:i.NORMAL,title:"Normal"},{value:i.LARGE,title:"Large"
},{value:i.HUGE,title:"Huge"}],t.a=i},function(e,t,n){"use strict";function i(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i.timeFormat,g=void 0===r?"h:mma":r;if(null==e)return"";var m=n.i(h.default)(e,g),v=void 0;return v=n.i(o.a)(e)?n.i(a.default)("Yesterday"):n.i(l.a)(e)?n.i(c.a)(e)?n.i(a.default)("Tonight"):n.i(a.default)("Today"):n.i(u.a)(e)?n.i(a.default)("Tomorrow"):n.i(d.a)(e)?n.i(p.a)(e):n.i(a.default)("{dayOfWeekAbbreviated}, {monthAbbreviated} {dayNumber}",{dayOfWeekAbbreviated:n.i(p.a)(e,{
abbreviate:!0}),monthAbbreviated:n.i(f.a)(e,{abbreviate:!0}),dayNumber:s.a.unix(e).date()}),t?n.i(a.default)("{1} at {2} on {3}",v,m,t):n.i(a.default)("{1} at {2}",v,m)}var a=n(4),r=n(43),s=n.n(r),o=n(327),l=n(262),c=n(692),u=n(691),d=n(690),h=n(213),p=n(682),f=n(686);t.a=i},function(e,t,n){"use strict";function i(e){var t=[n.i(c.default)("Sunday"),n.i(c.default)("Monday"),n.i(c.default)("Tuesday"),n.i(c.default)("Wednesday"),n.i(c.default)("Thursday"),n.i(c.default)("Friday"),n.i(c.default)("Saturday")],i=t[e];
return n.i(l.a)(i,"Unknown day of the week"),i}function a(e){var t=[n.i(c.default)("Sun"),n.i(c.default)("Mon"),n.i(c.default)("Tue"),n.i(c.default)("Wed"),n.i(c.default)("Thu"),n.i(c.default)("Fri"),n.i(c.default)("Sat")],i=t[e];return n.i(l.a)(i,"Unknown day of the week"),i}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.abbreviate,r=void 0!==n&&n;if(!e)return"";var s=o.a.unix(e).day();return r?a(s):i(s)}var s=n(43),o=n.n(s),l=n(33),c=n(4);t.a=r},function(e,t,n){
"use strict";function i(e){if(null==e)return"";var t=r.a.duration(e),i=365*t.years(),a=30*t.months(),o=i+a+t.days();return 1!==o?n.i(s.default)("{1} days",o):n.i(s.default)("{1} day",o)}var a=n(43),r=n.n(a),s=n(4);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=r.a.duration(e),i=t.days(),a=t.hours(),o=1!==i;return i&&a?o?n.i(s.default)("{1} days {2} hr",i,a):n.i(s.default)("{1} day {2} hr",i,a):i?o?n.i(s.default)("{1} days",i):n.i(s.default)("{1} day",i):n.i(s.default)("{1} hr",a);
}var a=n(43),r=n.n(a),s=n(4);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=r.a.duration(e),i=24*t.days()*60,a=60*t.hours(),o=t.minutes()+a+i,l=t.seconds();return o?n.i(s.default)("{1} min",o):l>0?n.i(s.default)("{1} sec",l):""}var a=n(43),r=n.n(a),s=n(4);t.a=i},function(e,t,n){"use strict";function i(e){var t=[n.i(c.default)("January"),n.i(c.default)("February"),n.i(c.default)("March"),n.i(c.default)("April"),n.i(c.default)("May"),n.i(c.default)("June"),n.i(c.default)("July"),n.i(c.default)("August"),n.i(c.default)("September"),n.i(c.default)("October"),n.i(c.default)("November"),n.i(c.default)("December")],i=t[e];
return n.i(l.a)(i,"Unknown month"),i}function a(e){var t=[n.i(c.default)("Jan"),n.i(c.default)("Feb"),n.i(c.default)("Mar"),n.i(c.default)("Apr"),n.i(c.default)("May"),n.i(c.default)("Jun"),n.i(c.default)("Jul"),n.i(c.default)("Aug"),n.i(c.default)("Sep"),n.i(c.default)("Oct"),n.i(c.default)("Nov"),n.i(c.default)("Dec")],i=t[e];return n.i(l.a)(i,"Unknown month"),i}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.abbreviate,r=void 0!==n&&n;if(!e)return"";var s=o.a.unix(e).month();
return r?a(s):i(s)}var s=n(43),o=n.n(s),l=n(33),c=n(4);t.a=r},function(e,t,n){"use strict";function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.includeMinuteZero,a=void 0===i||i,s=n.timeFormat,o=void 0===s?"h:mma":s,l=r.a.unix(e),c=r.a.unix(t),u=l.format("a")===c.format("a"),d=l.minutes(),h=c.minutes(),p=o,f=o;a||0!==d||(p=p.replace("h:mm","h")),u&&(p=p.replace("a","")),a||0!==h||(f=f.replace("h:mm","h"));var g=l.format(p),m=c.format(f);return g+"-"+m}var a=n(43),r=n.n(a);
t.a=i},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return!1;var n=o()();return r()(t).forEach(function(e){n.add(t[e],e)}),n.unix()<=e}var a=n(66),r=n.n(a),s=n(43),o=n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return!1;var n=o()();return r()(t).forEach(function(e){n.add(t[e],e)}),n.unix()>=e}var a=n(66),r=n.n(a),s=n(43),o=n.n(s);t.a=i},function(e,t,n){
"use strict";function i(e){if(null==e)return!1;var t=r.a.unix(e);return r()().isSame(t,"week")}var a=n(43),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return!1;var t=r.a.unix(e);return r()().add(1,"day").isSame(t,"day")}var a=n(43),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e||!n.i(a.a)(e))return!1;var t=parseInt(n.i(r.default)(e,"HH"),10);return t>16}var a=n(262),r=n(213);t.a=i},function(e,t,n){"use strict";var i,a=n(2),r=n.n(a),s=n(3106),o=n.n(s),l=n(3107),c=n.n(l),u=n(3108),d=n.n(u),h=n(3109),p=n.n(h),f=n(3110),g=n.n(f),m=n(3111),v=n.n(m),y=n(3112),b=n.n(y),S=n(3113),w=n.n(S),M=n(3114),I=n.n(M),C=n(3115),D=n.n(C),T=n(3116),x=n.n(T),P=n(3117),E=n.n(P),A=n(3118),L=n.n(A),k=n(3119),N=n.n(k),_=n(3120),O=n.n(_),R=n(3121),j=n.n(R),z=n(3122),U=n.n(z),F=n(3123),B=n.n(F),V=n(3124),H=n.n(V),W=n(3125),Q=n.n(W),Y=n(3126),G=n.n(Y),K=n(3127),q=n.n(K),Z=n(3128),X=n.n(Z),J=(i={},
i[o.a]=/android/i,i[c.a]=/plex.*atv|tvos/i,i[d.a]=/chrome/i,i[p.a]=/cloudsync/i,i[v.a]=/dlna/i,i[b.a]=/edge/i,i[w.a]=/firefox/i,i[I.a]=/google.*tv/i,i[D.a]=/internet.*explorer|explorer.*windows/i,i[x.a]=/ios/i,i[E.a]=/linux/i,i[L.a]=/opera/i,i[N.a]=/macosx/i,i[O.a]=/konvergo|plex.*home.*theater|plex.*media.*center/i,i[j.a]=/plex.*media.*server/i,i[U.a]=/roku/i,i[B.a]=/safari/i,i[H.a]=/samsung/i,i[Q.a]=/wii.*u/i,i[G.a]=/windows/i,i[q.a]=/windows.*phone|wince/i,i[X.a]=/xbox|mystery.*5/i,i),$=r.a.pairs(J),ee={},te={
getIcon:function(e){var t=g.a;return e?ee.hasOwnProperty(e)?ee[e]:(r.a.every($,function(n){var i=n[1].test(e);return i&&(t=n[0],ee[e]=t),!i}),t):t}};t.a=te},function(e,t,n){"use strict";function i(e,t,n){var i=l.a.extend(!0,{},e),a=r()(i);return a.forEach(function(e){var t=i[e],a=t&&t[0],r=a.type===c.a,s=n.type===c.a;a&&r!==s||delete i[e]}),i[t]=[n],i}var a=n(66),r=n.n(a),s=n(2),o=(n.n(s),n(5)),l=n.n(o),c=(n(33),n(180),n(178));t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{
value:!0}),n.d(t,"EQUAL",function(){return i}),n.d(t,"NOT_EQUAL",function(){return a}),n.d(t,"GREATER_THAN_OR_EQUAL",function(){return r}),n.d(t,"LESS_THAN_OR_EQUAL",function(){return s});var i="=",a="!=",r=">=",s="<="},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return a});var i="&",a=","},function(e,t,n){"use strict";function i(e,t){if(!e)return!1;var n=!!r.a.find(e,function(e){var n=e.value;return r.a.isArray(n)?n.indexOf(t)>-1:n===t});return n}var a=n(2),r=n.n(a);
t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=o.a.extend(!0,{},e),a=i[t];if(!a)return i;if(null==n)return delete i[t],i;for(var s=a.length;s-- >0;){var l=a[s],c=l.value;if(n===c)a.splice(s,1);else if(r.a.isArray(c)){var u=c.indexOf(n);u>-1&&(c.splice(u,1),1===c.length?l.value=c[0]:c.length||a.splice(s,1))}}return a.length||delete i[t],i}var a=n(2),r=n.n(a),s=n(5),o=n.n(s);n(33),n(180);t.a=i},function(e,t,n){"use strict";function i(e){if(!o.a.isEmpty(e)){if(e===u)return d;var t=r()(e).reduce(function(t,n){
var i=e[n],a=i.map(function(e){var t=e.value,i=e.operator,a=void 0===i?l.EQUAL:i,r=o.a.isArray(t)?t.join(c.a):t;return encodeURIComponent(n)+a+encodeURIComponent(r)});return t.concat(a)},[]);return u=e,d=t.join(c.b)}}var a=n(66),r=n.n(a),s=n(2),o=n.n(s),l=n(695),c=n(696);t.a=i;var u=void 0,d=void 0},function(e,t,n){"use strict";function i(e,t){return e?r.a.reduce(t,function(t,n,i){return e[i]!==n&&(t[i]=n),t},{}):t}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){var i=n(152).default,a=n(84);e.exports=a(i);
},function(e,t,n){var i=n(330).default,a=n(84);e.exports=a(i)},function(e,t,n){var i=n(267).default,a=n(84);e.exports=a(i)},function(e,t,n){var i=n(463).default,a=n(84);e.exports=a(i)},function(e,t,n){"use strict";function i(e){return!(!e||!e.status)&&(401===e.status||422===e.status)}t.a=i},function(e,t,n){"use strict";function i(e){return a.a[e]||""}var a=n(328);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=e.get("Media"),i=r.a.indexOf(n,r.a.findWhere(n,{id:t}));return i}var a=n(2),r=n.n(a);
t.a=i},function(e,t,n){"use strict";function i(e){var t=[];return r.a.isArray(e)||(e=[e]),r.a.each(e,function(e){var n=e.Part;n&&r.a.each(n,function(e){e.exists!==!1&&e.accessible!==!1||t.push(e)})}),t}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=void 0;if(e.Part.length>1)for(var i=0,a=0,s=e.Part.length;a<s&&(n=e.Part[a],n.duration)&&(i+=n.duration,!(i>t));a++);else n=r.a.first(e.Part);return n}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){
var n=e.Part,i=r.a.indexOf(n,r.a.findWhere(n,{key:t}));return i}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){return e>t?50:e<=0||t<=0?0:Math.round(e/t*100)}t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=n;if(e.Part.length>1)for(var a=0,r=e.Part.length;a<r;a++){var s=e.Part[a];if(!s.duration)break;if(t.key===s.key)break;i-=s.duration}return i}t.a=i},function(e,t,n){"use strict";function i(e,t,i){var o=n.i(a.a)(e,t);if(i=n.i(r.a)(o,i)){var l=n.i(s.a)(e,o,t);return"/library/parts/"+o.id+"/indexes/"+i+"/"+l;
}}var a=n(709),r=n(1237),s=n(712);t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a.get("audio").id,i=n.i(o.a)(e,{streamType:t,selected:!0});return r.a.first(i)}var a=n(2),r=n.n(a),s=n(88),o=n(128);t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a.get("subtitles").id,i=n.i(o.a)(e,{streamType:t,selected:!0}),a=r.a.first(i);if(a&&a.id>0)return a}var a=n(2),r=n.n(a),s=n(88),o=n(128);t.a=i},function(e,t,n){"use strict";function i(e,t){if(!t)return r.a.Deferred().resolve().promise();
n.i(s.a)("[playMedia] ping transcoder");var i=e.supports("universalTranscoder")?"/video/:/transcode/universal/ping?session="+t:"/video/:/transcode/segmented/ping?session="+t;return r.a.ajax(e.getXHROptions(i))}var a=n(5),r=n.n(a),s=n(27);i.DELAY=3e4,t.a=i},function(e,t,n){"use strict";function i(e,t,i){if(!t)return o.a.Deferred().resolve().promise();n.i(l.a)("[playMedia] stop transcoder");var a=e.supports("universalTranscoder")?"/video/:/transcode/universal/stop?session="+t:"/video/:/transcode/segmented/stop?session="+t;
return i=r.a.extend(e.getXHROptions(a),i),o.a.ajax(i)}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(27);t.a=i},function(e,t,n){"use strict";function i(e,t){var i=e.playQueueItem,a=e.metadataItem,s=e.media,p=e.part,f=a.get("ratingKey"),g=a.get("type"),m=o.a.Deferred().resolve({}).promise();if(!f)return m;var v={hasMDE:1,ratingKey:f,key:a.get("key"),state:e.state};if(e.continuing&&(v.continuing="1"),i.get("playQueueItemID")&&(v.playQueueItemID=i.get("playQueueItemID")),!("photo"===g||s&&p))return m;if("photo"!==g){
var y=a.get("viewOffset")||0,b=s.duration;if(r.a.isNumber(e.position)&&(y=e.position,y=n.i(d.a)(s,p,y)),b||r.a.isNumber(e.duration)&&(b=e.duration,s.duration=b),!b)return m;y>b&&(y=b),v.time=y,v.duration=b,n.i(h.a)(a,y,b)}var S="[Timeline] "+v.state;null!=v.time&&(S+=", "+v.time+"/"+v.duration),n.i(u.a)(S);var w=c.join("/:/timeline",v);t=r.a.extend(a.server.getXHROptions(w),t),e.playbackSessionID&&(t.headers["X-Plex-Session-Identifier"]=e.playbackSessionID);var M=o.a.ajax(t).promise();return M=M.then(function(e){
if(!e)return{};var t=l.a.parseXML(e);return t.terminationCode&&(t.terminationCode=l.a.parseInteger(t.terminationCode)),t.generalDecisionCode&&(t.generalDecisionCode=l.a.parseInteger(t.generalDecisionCode)),t.mdeDecisionCode&&(t.mdeDecisionCode=l.a.parseInteger(t.mdeDecisionCode)),t.transcodeDecisionCode&&(t.transcodeDecisionCode=l.a.parseInteger(t.transcodeDecisionCode)),t})}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(38),c=n(20),u=n(27),d=n(1235),h=n(452);i.DELAY=1e4,t.a=i},function(e,t,n){"use strict";
function i(e){var t=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,t)).toFixed(2)+" "+a[t]}var a=["B","KB","MB","GB","TB"];t.a=i},function(e,t,n){"use strict";function i(e){if(!e)return n.i(a.default)("None");var t=e.language||n.i(a.default)("Unknown"),i=r.a.get(e.streamType),l=i&&i.typeString,c=e.codec,u=[];return"subtitles"===l&&c?(u.push(c.toUpperCase()),e.key&&u.push(n.i(a.default)("External")),e.forced&&u.push(n.i(a.default)("Forced"))):"audio"===l&&c&&(u.push(n.i(s.default)(c)),
e.channels&&u.push(n.i(o.default)(e.channels))),u.length?t+" ("+u.join(" ")+")":t}Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),r=n(88),s=n(454),o=n(453);t.default=i},function(e,t,n){"use strict";var i={movie:"plex-icon-movies-560",show:"plex-icon-shows-560",season:"plex-icon-shows-560",episode:"plex-icon-shows-560",artist:"plex-icon-artist-560",album:"plex-icon-music-560",track:"plex-icon-music-560",photo:"plex-icon-photos-560",photoalbum:"plex-icon-photos-560",clip:"plex-icon-clips-560",
userPlaylistItem:"plex-icon-clips-560"};t.a=i},function(e,t,n){"use strict";function i(e){return e>=5&&e<9}t.a=i},function(e,t,n){"use strict";function i(e,t){if(e=parseInt(e,10),t=t||1,r.a.isNaN(e))return"";if(0===e)return"0 Bytes";var n=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,n)).toFixed(t)+" "+s[n]}var a=n(2),r=n.n(a),s=["Bytes","KB","MB","GB","TB"];t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item||e.items[0];if(n.i(d.a)(e))return r.a.Deferred().resolve(n.i(o.a)(t,e)).promise();
var i=r.a.Deferred();return e.notify=i.notify,n.i(c.a)(t,e).then(function(i){return e.itemDecision=i,n.i(l.a)(t,e)}).done(i.resolve).fail(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0;e.silent||(n.i(u.a)(),t="Unable to queue or get next item to play. code: "+e.status,s.a.warn("[PlayMedia]",t)),i.reject(t)}),i.promise()}var a=n(5),r=n.n(a),s=n(27),o=n(457),l=n(1252),c=n(1249),u=n(725),d=n(1254);t.a=i},function(e,t,n){"use strict";function i(e){r.a.trigger("show:alert",{
type:"error",message:e||n.i(a.default)("Sorry, there was a problem playing this item.")})}var a=n(4),r=n(8);t.a=i},function(e,t,n){"use strict";function i(){return o?r.now():Date.now()-l}var a=n(27);t.a=i;var r=window.performance,s=!!r,o=s&&!!r.now,l=void 0;o||(a.a.warn("`performance.now` is not available; a `Date.now()` fallback will be used instead."),l=s&&r.timing&&r.timing.navigationStart?r.timing.navigationStart:Date.now())},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;
return"ps3"===e.platformID}var a=n(32);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;return"ps4"===e.platformID}var a=n(32);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;return"safari"===e.id}var a=n(32);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;return"viziomtk"===e.platformID}var a=n(32);t.a=i;
},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;return"viziosigma"===e.platformID}var a=n(32);t.a=i},function(e,t,n){"use strict";function i(e){function t(){i<0||e().done(function(){s.resolve.apply(s,arguments)}).fail(function(){i-=1,i<0?s.reject.apply(s,arguments):setTimeout(t,a)})}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Math.floor(Math.max(n.times||0,0)),a=Math.floor(Math.max(n.delay||0,0));n.cancel&&n.cancel.always(function(){
i=-1});var s=r.a.Deferred();return t(),s.promise()}var a=n(5),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){return e?e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}):""}t.a=i},function(e,t,n){"use strict";function i(e){return n.i(r.default)(n.i(a.a)(e).join("_"))}var a=n(1294),r=n(336);t.a=i},function(e,t,n){"use strict";function i(e){return e&&r.a.parseBoolean(e)?n.i(a.default)("Yes"):n.i(a.default)("No")}Object.defineProperty(t,"__esModule",{
value:!0});var a=n(4),r=n(38);t.default=i},function(e,t,n){"use strict";function i(e){if(e&&e.length){var t=e.length;return 1===t?e[0]:2===t?n.i(a.default)("{1} and {2}",e[0],e[1]):3===t?n.i(a.default)("{1}, {2}, and {3}",e[0],e[1],e[2]):n.i(a.default)("{1}, {2}, and {3} others",e[0],e[1],e.length-2)}}var a=n(4);t.a=i},function(e,t,n){"use strict";function i(e,t){return n.i(a.default)(n.i(r.getLastSegment)(e||""),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(463),r=n(20);t.default=i;
},function(e,t,n){"use strict";function i(e){r.a.flushDebouncedSave(),a.a.set("main.webMode",e)}var a=n(81),r=n(94);t.a=i},function(e,t,n){"use strict";function i(e,t){p=setTimeout(function(){p=null,a(),o.a.times(t,r),h.length&&i(e,t)},e)}function a(){var e=(new Date).getTime();h=o.a.filter(h,function(t){return t.expire>e})}function r(){for(var e=0;e<h.length;e++){var t=h[e],n=!1;try{n=t.fn.call(t.thisArg,t.arg)}catch(e){l.a.error(e.name+": "+e.message),n=!0}if(n){h.splice(e,1);break}}}var s=n(2),o=n.n(s),l=n(27),c=n(14),u=n(616),d=(n.n(u),
{defaultWait:10,defaultBatchSize:2,timeout:3e4,enqueue:function(e,t,n,a,r){var s={fn:e,thisArg:t,cancelToken:n,expire:(new Date).getTime()+this.timeout,arg:r};if(void 0===a?h.push(s):h.splice(a,0,s),!p){var o=c.b("experience")?c.a("experience").taskThrottle:{},l=o.wait||this.defaultWait,u=o.batchSize||this.defaultBatchSize;i(l,u)}},cancel:function(e){h=o.a.filter(h,function(t){return t.cancelToken!==e})},throttleWithRAF:function(e,t){var n=function n(){n.rafID&&window.cancelAnimationFrame(n.rafID),
n.rafID=window.requestAnimationFrame(function(){delete n.rafID,e.call(t)})};return n}}),h=[],p=null;t.a=d},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r={augmentDictionary:function(e,t){return t=t||{},a.a.reduce(e,function(e,n,i){var s=(new Date).getTime(),o=a.a.isFunction(t.ttl)?t.ttl(i,n):t.ttl,l=a.a.isFunction(t.refresh)?t.refresh(i,n):t.refresh,c=a.a.isObject(n)?r.augmentObj(n,o,l,s):null;return c&&(e[i]=c),e},{})},augmentObj:function(e,t,n,i){var a=e._ttl;if(i=i||(new Date).getTime(),a){
if(n)a.expireAt=i+t;else if(a.expireAt<=i)return null}else a={expireAt:i+t};return e._ttl=a,e}};t.a=r},function(e,t,n){"use strict";var i=n(4),a=n(215),r=["key"],s=n.i(a.a)(r,[{key:"all",title:function(){return n.i(i.default)("All")}},{key:"unwatched",title:function(){return n.i(i.default)("Unwatched")}},{key:"newest",title:function(){return n.i(i.default)("Recently Released")}},{key:"recentlyAdded",title:function(){return n.i(i.default)("Recently Added")}},{key:"recentlyViewed",title:function(){
return n.i(i.default)("Recently Viewed")}},{key:"recentlyViewedShows",title:function(){return n.i(i.default)("Recently Viewed Shows")}},{key:"onDeck",title:function(){return n.i(i.default)("On Deck")}},{key:"folder",title:function(){return n.i(i.default)("By Folder")}}]);t.a=s},function(e,t,n){"use strict";function i(e,t){var n=e.match(/(^[^#]+)?/),i=n[1];return i=i||"",""+i+t}t.a=i},function(e,t,n){"use strict";var i=n(580),a=n.n(i),r=new a.a(!1,"_",!0),s={writeXml:function(e){return'<?xml version="1.0"?>'+r.json2xml_str(e);
}};t.a=s},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(66),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=(n.n(p),n(46)),g=n.n(f),m=n(33),v=n(27),y=n(444),b=n(39),S=function(e){function t(n,i){l()(this,t);var a=u()(this,e.call(this,n,i));return a.onTick=function(){a._ticks++,a.props.onTick(a._ticks)},a.onLoadedMetadata=function(){var e=a._mediaEl,t=e.duration,n=e.videoWidth,i=e.videoHeight;a.props.onStart({duration:Math.round(1e3*t),videoWidth:n,videoHeight:i})},a.onTimeUpdate=function(){
a._lastPosition=a._currentPosition,a._currentPosition=1e3*a._mediaEl.currentTime,a.props.onPositionChange(a._currentPosition);var e=a._lastPosition&&Math.abs(a._currentPosition-a._lastPosition)<100;a._mediaEl.paused||e||a.props.onMediaStateChange(b.a.mediaStates.READY)},a.onProgress=function(){var e=a._mediaEl.buffered;if(e.length){var t=1e3*e.start(0),n=1e3*e.end(e.length-1);a.props.onBufferChange({start:t,end:n})}},a.onEnded=function(){a.props.onEnd()},a.onError=function(e){var t=e.target.error.code;
t&&v.a.warn("[Player] Media element error code: "+t),a.props.onMediaStateChange(b.a.mediaStates.ERROR,{code:t})},a.onWaiting=function(){a.props.onMediaStateChange(b.a.mediaStates.BUFFERING)},a.onPlaying=function(){a.props.onMediaStateChange(b.a.mediaStates.READY)},a._mediaListeners={loadedmetadata:a.onLoadedMetadata,timeupdate:a.onTimeUpdate,progress:a.onProgress,ended:a.onEnded,error:a.onError,waiting:a.onWaiting,playing:a.onPlaying},a}return h()(t,e),t.prototype.componentDidMount=function(){var e=this;
this._mediaEl=n.i(y.a)(this.props.type,this.props.allowRecycleElement),this.props.onElementChange?this.props.onElementChange(this._mediaEl):this._mediaEl.src=this.props.src,this._node=g.a.findDOMNode(this),this._node.appendChild(this._mediaEl),this._mediaEl.className=this.props.className,this._mediaEl.volume=Math.max(0,Math.min(this.props.volume/100,1)),s()(this._mediaListeners).forEach(function(t){e._mediaEl.addEventListener(t,e._mediaListeners[t])}),this._mediaEl.currentTime=this.props.position/1e3,
this.props.isReadyToPlay&&!this.props.paused&&this.props.src&&this._mediaEl.play(),this._ticks=0,this._tickTimer=setInterval(this.onTick,1e3)},t.prototype.componentWillReceiveProps=function(e){this._mediaEl.src&&e.paused!==this.props.paused&&!this._mediaEl.ended&&(e.paused?this._mediaEl.pause():this._mediaEl.play()),e.volume!==this.props.volume&&(this._mediaEl.volume=Math.max(0,Math.min(e.volume/100,1))),e.className!==this.props.className&&(this._mediaEl.className=e.className);var t=e.position!==this._currentPosition;
if(t){var i=this._mediaEl.ended;this._mediaEl.currentTime=e.position/1e3,!e.paused&&i&&this._mediaEl.play()}var a=e.isReadyToPlay&&!this.props.isReadyToPlay;a&&!e.paused&&this._mediaEl.play(),n.i(m.a)(e.src===this.props.src,"Use a new `key` when changing `src`")},t.prototype.componentWillUnmount=function(){var e=this;this._node.removeChild(this._mediaEl),this._mediaEl.src="",s()(this._mediaListeners).forEach(function(t){e._mediaEl.removeEventListener(t,e._mediaListeners[t])}),clearInterval(this._tickTimer);
},t.prototype.render=function(){return a()("div",{className:this.props.containerClassName})},t}(p.Component);S.defaultProps={type:b.a.elements.VIDEO,position:0,volume:100,allowRecycleElement:!1,isReadyToPlay:!0,onMediaStateChange:function(){},onBufferChange:function(){},onStart:function(){},onEnd:function(){},onTick:function(){}},t.a=S},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(46),f=n.n(p),g=n(3104),m=n.n(g),v=n(32),y=n(25),b=n(468),S=function(e){
function t(n,i){s()(this,t);var r=l()(this,e.call(this,n,i));return r.onPortalRef=function(e){if(!e)return void r._destroy();var t="ie"===v.a.id?{gpu:!1}:{};r._tether=new m.a(a()({element:f.a.findDOMNode(e).parentNode,target:f.a.findDOMNode(r.props.target),optimizations:t},r.props.options))},r._tether=null,r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this._destroy()},t.prototype._destroy=function(){this._tether&&(this._tether.destroy(),
this._tether=null)},t.prototype.render=function(){return h.a.createElement(b.a,a()({},this.props,{onPortalRef:this.onPortalRef}))},t}(d.Component);S.defaultProps={options:{skipMoveElement:!0,attachment:"top left",targetAttachment:"bottom left",constraints:[{to:"window",attachment:"together",pin:!0}]}},t.a=S},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(17),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(2),f=n.n(p),g=n(1),m=n.n(g),v=n(4),y=n(274),b=function(e){function t(){
return l()(this,t),u()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){var i=this.props,a=i.args,r=s()(i,["args"]),o=e.args,l=s()(e,["args"]),c=!n.i(y.a)(r,l),u=!n.i(y.a)(this.state,t),d=f.a.difference(a,o).length>0;return c||u||d},t.prototype.render=function(){var e=this.props,t=e.text,n=e.args,i=s()(e,["text","args"]);return m.a.createElement("span",a()({},i,{dangerouslySetInnerHTML:{__html:v.default.apply(void 0,[t].concat(n,[{escape:!0}]))}}))},t}(g.Component);
t.a=b},function(e,t,n){"use strict";function i(e,t,n){var i=0;return r.a.Children.map(e,function(e){if(r.a.isValidElement(e)){var a=i;return i++,t.call(n,e,a)}return e})}var a=n(1),r=n.n(a);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="isScrolling"},function(e,t,n){"use strict";var i=n(1),a=(n.n(i),i.PropTypes.shape({subscribe:i.PropTypes.func.isRequired,dispatch:i.PropTypes.func.isRequired,getState:i.PropTypes.func.isRequired}));t.a=a},function(e,t,n){"use strict";var i={
PLAY:"PLAY",PAUSE:"PAUSE",SEEK:"SEEK",STOP:"STOP",PREVIOUS:"PREVIOUS",NEXT:"NEXT",SKIPTO:"SKIPTO",SHOWDETAILS:"SHOWDETAILS",REFRESHPLAYQUEUE:"REFRESHPLAYQUEUE",SETSTREAM:"SETSTREAM",SETQUALITY:"SETQUALITY"};t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(14),s=n(4),o=n(34),l=n(8),c=n(451),u=n(39),d=n(88),h=n(52),p=n(419),f=n(21),g=n(42),m=o.a.extend({mixins:[h.a,p.a],companion:!0,modelDefaults:function(){var e=p.a.modelDefaults.apply(this,arguments),t=this.type===u.a.types.VIDEO,n=this.type===u.a.types.MUSIC,i=this.type===u.a.types.PHOTO;
return a.a.extend(e,{state:u.a.states.BUFFERING,showMinimize:!0,showMaximize:t,showSeekBar:!i,showRepeat:n,showShuffle:n})},modelOverrides:function(){var e=p.a.modelOverrides.apply(this,arguments),t=this.model.get("metadataItem"),n=t.get("type")===u.a.types.PHOTO;return(n||this.model.get("playQueue").get("collection").length<2)&&(e.showPlayQueue=!1),e},initialize:function(e){p.a.initialize.apply(this,arguments),a.a.bindAll(this,"skipPrevious","skipNext"),this.type=e.type,this.manager=e.manager,this.player=this.manager.player;
},getServerConnection:function(e,t){t||(t={});var n=e.get("activeConnection");return n&&n.get("isLoopback")&&(n=e.get("connections").find(function(e){return e.get("isConnected")&&!e.get("isLoopback")})),n?{protocol:n.get("scheme")||"http",address:n.getAddressFromUri(),port:n.get("port")}:void(t.isRequired&&this.showLoopbackWarning(e))},showLoopbackWarning:function(e){var t=r.a("appModel"),i=t.get("user");if(!i.get("signedIn")||"ok"!==e.get("myPlexSigninState")){var a;a=i.get("signedIn")?n.i(s.default)("This server is unavailable to the player. Please sign this server in to your Plex account and try again."):n.i(s.default)("This server is unavailable to the player. Please sign in to your Plex account and try again.");
var o=new g.a({title:n.i(s.default)("Unable to Cast"),message:a,confirmLabel:n.i(s.default)("OK"),cancelLabel:n.i(s.default)("Ignore")});o.promise.done(function(){l.a.trigger("hide:player"),i.get("signedIn")?l.a.trigger("navigate","serverSettings",{serverID:e.id}):l.a.trigger("navigate","login",{silent:!0})}),l.a.trigger("show:modal",o)}},getTransientToken:function(e){return f.a.execute("getTransientToken",{server:e})},reset:function(e){var t={loop:"photo"===this.type};return this.currentItem=e,this.previousItem=this.getPreviousItem(e,t),
this.nextItem=this.getNextItem(e,t),this.model.set(a.a.extend(a.a.result(this,"modelDefaults"),this.modelOverrides())),e},stop:function(e,t){p.a.stop.apply(this,arguments);var n=r.a("appModel"),i=this.model.get("playQueue");i&&!n.get("primaryPlayer")&&i.takeOwnership(),this.manager.resetActiveController(this.type),l.a.trigger("hide:player",t)},setStream:function(e,t){},setRepeat:function(e){},refreshRemotePlayQueue:function(){},onFinishedChange:function(e,t){t&&(this.manager.resetActiveController(this.type),
l.a.trigger("hide:player"))},onMetadataItemChange:function(){var e,t,n=this.model.get("metadataItem"),i=this.model.get("mediaIndex"),r=this.model.get("partIndex"),s=n.get("Media");if(e=i>1&&s.length>i?s[i]:a.a.first(s)){var o=e.Part;t=r>1&&o.length>r?o[r]:a.a.first(o)}this.model.set({media:e,part:t})},onAudioStreamIDChange:function(e,t){var i=e.previous("audioStreamID");if(null!=t&&null!=i){if(this.isTimelineChange){var a=d.a.get("audio");return void n.i(c.a)(e.get("media"),a,t)}this.setStream("audio",t);
}},onSubtitleStreamIDChange:function(e,t){var i=e.previous("subtitleStreamID");if(null!=t&&null!=i){if(this.isTimelineChange){var a=d.a.get("subtitles");return void n.i(c.a)(e.get("media"),a,t)}this.setStream("subtitles",t)}},onPlayQueueChange:function(){this.previousItem=this.getPreviousItem(),this.nextItem=this.getNextItem();var e=a.a.pick(a.a.result(this,"modelDefaults"),["showPlayQueue","canSkipPrevious","canSkipNext","canShuffle","shuffled"]);this.model.set(a.a.extend(e,this.modelOverrides())),
this.refreshRemotePlayQueue()},onRepeatChange:function(e){if(!this.isTimelineChange){var t=0;e.get("repeatAll")&&!e.get("repeatItem")?t=2:e.get("repeatItem")&&!e.get("repeatAll")&&(t=1),this.setRepeat(t)}}});t.a=m},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(14),s=n(34),o=n(39),l=n(36),c=n(21),u=n(52),d=n(27),h=n(339),p=n(147),f=n(83),g=n(49),m=n(82),v=n(252),y=s.a.extend({mixins:[u.a],types:[o.a.types.VIDEO,o.a.types.MUSIC,o.a.types.PHOTO],initialize:function(){var e=r.a("appModel");this.items={},
this.containers={},this.activeControllerTypes={},this.listenTo(e,"change:primaryPlayer",this.onPrimaryPlayerChange)},start:function(e){this.player&&this.stop(),d.a.info("Casting to "+e.get("friendlyName")),this.player=e,e&&this.listenTo(e.get("nowPlaying"),"add",this.onNowPlayingAdd)},stop:function(){if(this.player){n.i(d.a)("Stopped casting to "+this.player.get("friendlyName"));var e=this.player.get("nowPlaying");e.clear(),this.stopListening(e),this.player=null}this.items={},this.containers={},this.activeControllerTypes={};
},resetActiveController:function(e){this.activeControllerTypes[e]=!1},createController:function(e,t){return t.isPassive||(this.activeControllerTypes[e]=!0),new this.controller({type:e,manager:this})},updateNowPlaying:function(e){var t=e.type,n=e.key,i=e.state===o.a.states.STOPPED||e.state===o.a.states.ERROR,r=this.items[t],s=this.containers[t];if(r){if(n===r.get("key")&&!i)return;this.removeFromNowPlaying(r,e)}n&&!i&&this.addToNowPlaying(a.a.extend({},e,{previousItem:r,previousContainer:s}))},addToNowPlaying:function(e){
var t=e.type,n=e.machineIdentifier,i=e.key,r=e.containerKey,s=e.previousContainer;"node"===n&&(n="myPlex");var l=new f.a({machineIdentifier:n},{onlyIfCached:!0});if(!a.a.isEmpty(l)){if("myPlex"===n){var c=l.parent.get("primaryServer");i=c?c.resolveUrl(i):l.resolveUrl(i,{connection:new p.a({scheme:"https",address:"node.plexapp.com",port:"32443"})})}var u=new g.a({key:i},{server:l,skipCache:!0}),d=u.populate();this.items[t]=u;var h;if(s&&s.key===r)h=s.playQueue;else{var y=u.server.get("playQueueManager"),b=o.a.getElementByType(t),S=v.a.prototype.getIdFromKey(r);
if(null!==S)h=y.getForType(b),h&&h.get("playQueueID")===S||(h=y.createForType(b,{onServer:!0}),h.set("playQueueID",S),d=d.then(function(){return h.fetch({reset:!0})}));else{var w;r&&(w=new m.default({containerKey:r},{server:l,skipCache:!0}),d=d.then(function(){return w.populate()})),d=d.then(function(){h=y.createForType(b,{onServer:!1});var e=w?w.get("metadataItems"):u;return h.addContent(e)})}d.done(function(){var e=h.get("collection").findWhere({key:i});h.set("selectedItem",e)})}this.containers[t]={
key:r,playQueue:h},d.done(a.a.bind(function(){u.set("key",i);var e=this.player.get("nowPlaying");e.add(u)},this)),d.fail(a.a.bind(function(){this.removeFromNowPlaying(u,e)},this))}},removeFromNowPlaying:function(e,t){this.items[t.type]=null,this.containers[t.type]=null;var n=this.player.get("nowPlaying");n.remove(e)},onPrimaryPlayerChange:function(e,t){if(t){h.a.stop(!0);var n=r.a("appModel");n.has("transientServer")&&n.unset("transientServer")}t&&t.get("protocol")===this.protocol?this.start(t):this.stop();
},onNowPlayingAdd:function(e){var t=e.get("type");if(t){var n=l.a.getChildMediaType(t),i=o.a.getTypeByElement(n.element);this.activeControllerTypes[i]||c.a.execute("playMedia",{item:e,useMiniPlayer:!0,isFromCompanion:!0})}}});t.a=y},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r={triggerAutoselect:function(e){this.trigger("autoselect",{shiftKey:e.shiftKey})},stopTrackingSelecting:function(e,t){return this.isTrackingSelecting?(e.preventDefault(),void(this.isTrackingSelecting=!1)):void(t&&t.call(this,e));
},onMouseEnter:function(e){this.parentMediaActions&&this.parentMediaActions.get("selecting")&&this.triggerAutoselect(e)},onMouseLeave:function(e){this.stopTrackingSelecting(e)},onMouseDown:function(e){if(this.parentMediaActions&&this.parentMediaActions.shouldStartTrackingSelecting(e)){var t=a.a.bind(function(){this.ignoreOnClick=!0},this);this.listenToOnce(this.parentMediaActions,"change:selectedItems",t),this.isTrackingSelecting=!0,this.trigger("select",{multiSelect:e.shiftKey}),this.stopListening(this.parentMediaActions,"change:selectedItems",t);
}},onClick:function(e){this.ignoreOnClick&&(this.ignoreOnClick=!1,e.preventDefault())}};t.a=r},function(e,t,n){"use strict";var i=n(14),a={handleCollectUsageData:function(e){var t=n.i(i.a)("appModel");this._appModel=t,this._adapter=e,this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.onPrimaryServerChange(t,t.get("primaryServer"))},_toggleAdapter:function(e){var t=this._adapter;e===!0?t.enable():e===!1&&t.disable()},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");
n&&(this.stopListening(n),this.stopListening(n.get("desktop").get("settings")));var i=void 0;if(t){var a=t.get("desktop").get("settings"),r=a.get("collectUsageData");i=r?r.get("value"):i,this.listenTo(a,"add change",this.onSettingsModelChange)}this._toggleAdapter(i)},onSettingsModelChange:function(e,t,n){if("collectUsageData"===e.id){var i=this._appModel.get("primaryServer");i&&i.id===e.server.id&&this._toggleAdapter(e.get("value"))}}};t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r={collectionEvents:{
"update reset sort":"onTracksUpdate"},markDiscNumbers:function(){if(this.collection.server.supports("premiumMusic")){var e=this.collection.reduce(function(e,t,n){var i=t.get("parentIndex");return i!==e.lastDiscNumber&&(e.markers[n]=i,e.lastDiscNumber=i,e.count+=1),e},{markers:{},lastDiscNumber:null,count:0});return this.discMarkers=e.markers,e.count}},onRender:function(){var e=this.markDiscNumbers();1!==e&&a.a.each(this.discMarkers,a.a.bind(function(e,t){this.$("li:eq("+t+") .disc-number").removeClass("hidden");
},this))},onTracksUpdate:function(){this.render()}};t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(1435),r=i.a.extend({name:"FilePathCollection",context:["server"],model:a.a,url:"/services/browse"});t.a=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(22),a=n(1436),r=i.a.extend({name:"MatchResultCollection",context:["server"],model:a.a,url:function(){return"/library/metadata/"+this.parent.id+"/matches"}});t.default=r},function(e,t,n){"use strict";var i=n(175),a=n(75),r=n(1438),s=a.a.extend({
model:r.a,url:"/playQueues?type="+i.a.LOCAL,parse:function(e){return this.convert(e,"PlayQueue")}});t.a=s},function(e,t,n){"use strict";function i(e,t,n){var i=/!$/.test(n),a=/\.id$/.test(n);if(i||a)return e[n]=t,e;var r=n.match(/^(.+)\.(.+)/);return r&&(e.type=l.a.get(r[1]).id,n=r[2]),e[n+".query"]=t,e}var a=n(2),r=n.n(a),s=n(38),o=n(20),l=n(36),c=n(57),u=n(22),d=n(1453),h=u.a.extend({name:"MetadataAutocompleteResultCollection",context:["server","section","multiMetadataItem","query"],model:d.a,url:function(){
var e={type:l.a.get(this.multiMetadataItem.get("type")).id,limit:10};return e=r.a.reduce(this.query,i,e),o.join([this.multiMetadataItem.sectionUrl(),"autocomplete"],e)},augmentResponseText:function(e,t){return t===c.a.xml?s.a.replaceMetadataXMLElementNames(e):e}});t.a=h},function(e,t,n){"use strict";var i=n(185),a=n(65),r=n(151),s=n(49),o=s.a.extend({name:"SyncMetadataModel",entityType:i.SYNC_METADATA_ITEM,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;
return n.i(a.a)(this.entityType,e.ratingKey,this.syncItemId,this.server.entityID())},context:["server","device","syncItemId"],cache:new r.a,cacheKey:function(){var e=s.a.prototype.cacheKey.apply(this,arguments);return e+"!"+this.syncItemId}});t.a=o},function(e,t,n){"use strict";var i=n(22),a=n(342),r=i.a.extend({name:"MediaGrabberDeviceCollection",context:["server"],model:a.c,url:"/media/grabbers/devices"});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(763),r=i.a.extend({name:"DVRCollection",
context:["server"],model:a.a,url:"/livetv/dvrs"});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(16),r=n(254),s=n(761),o=i.a.extend({name:"DVRModel",context:["server"],rootPropertyName:"Dvr",idAttribute:"key",sessionAttrs:{isSaving:a.a.boolean,saveError:a.a.object},syncedAttrs:{key:a.a.integer,epgIdentifier:a.a.string,language:a.a.string,lineup:a.a.string,lineupTitle:a.a.string,uuid:a.a.string},syncedRelations:{devices:{relationClass:s.a,rootPropertyName:"Device"},prefs:{relationClass:r.a,rootPropertyName:"Setting",
deferred:!0,save:!0}},defaults:{isSaving:!1,saveError:null}});t.a=o},function(e,t,n){"use strict";var i=n(18),a=n(16),r=i.a.extend({name:"EPGCountryModel",context:["server"],idAttribute:"code",rootPropertyName:"Country",syncedAttrs:{key:a.a.string,type:a.a.string,title:a.a.string,code:a.a.string,example:a.a.string,flavor:a.a.integer,language:a.a.string,languageTitle:a.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(16),r=i.a.extend({name:"EPGCountryRegionModel",context:["server"],
idAttribute:"key",rootPropertyName:"Region",syncedAttrs:{key:a.a.string,type:a.a.string,title:a.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(1469),r=i.a.extend({name:"ChannelMappingCollection",context:["server"],model:a.a,comparator:function(e){return parseFloat(e.get("deviceIdentifier"))}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(476),r=i.a.extend({name:"SearchCollection",context:["server","provider"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(312),s=n.n(r),o=s.a.extend({
constructor:function(e,t,n,i){this.exclusiveAgents=t,this.agentIdentifier=n,s.a.call(this,e,i),this.filterBy(a.a.bind(this.filterExclusiveAgent,this))},filterExclusiveAgent:function(e){var t=e.get("identifier"),n=this.exclusiveAgents;if(!n)return!0;var i=this.agentIdentifier,a=n.indexOf(i)!==-1,r=n.indexOf(t)!==-1,s=a?t===i:!r;return s}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(43),s=n.n(r),o=n(38),l=n(16),c=n(57),u=n(18),d=n(432),h=u.a.extend({name:"CalendarModel",context:["server"],
url:"/media/subscriptions/scheduled",sessionAttrs:{visibleDays:l.a.integer,time:l.a.integer},syncedRelations:{scheduled:{relationClass:d.a,rootPropertyName:"MediaGrabOperation"}},derivedAttrs:{startTime:function(){var e=this.get("visibleDays"),t=s.a.unix(this.get("time")),n=t.startOf("day");return e>1?n.subtract(1,"day").unix():n.unix()},endTime:function(){var e=this.get("visibleDays"),t=s.a.unix(this.get("time")),n=t.endOf("day");return e>1?n.add(e-2,"days").unix():n.unix()},daysOfWeek:function(){
var e=s.a.unix(this.get("startTime")),t=s.a.unix(this.get("endTime")),n=t.diff(e,"days");return a.a.times(Math.min(n+1,7),function(t){return e.clone().add(t,"days").unix()})},days:function(){var e=s.a.unix(this.get("startTime")),t=s.a.unix(this.get("endTime")),n=t.diff(e,"days");return a.a.times(n+1,function(t){return e.clone().add(t,"days").unix()})},firstEvent:function(){return this.get("scheduled").first()},lastEvent:function(){return this.get("scheduled").last()},hasPastEvents:function(){var e=this.get("firstEvent");
return!!e&&s.a.unix(e.get("beginsAt")).isBefore(s.a.unix(this.get("startTime")))},hasFutureEvents:function(){var e=this.get("lastEvent");return!!e&&s.a.unix(e.get("beginsAt")).isAfter(s.a.unix(this.get("endTime")))}},defaults:function(){return{visibleDays:7,time:s()().unix()}},augmentResponseText:function(e,t){var n=t===c.a.xml?o.a.replaceMetadataXMLElementNames(e):e;return n}});t.a=h},function(e,t,n){"use strict";function i(e){var t=e.server,i=e.libraryID,a=e.options,o=void 0===a?{}:a,l=o.force?{
force:1}:void 0,c=n.i(s.join)(["/library/sections",i,"refresh"],l),u=t.getXHROptions(c,{type:o.cancel?"DELETE":"GET"});return r.a.ajax(u).promise()}var a=n(5),r=n.n(a),s=n(20);t.a=i},function(e,t,n){"use strict";var i=n(53),a=n(31);n.d(t,"a",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"e",function(){return o}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return c}),n.d(t,"f",function(){return u});var r=n.i(i.a)(a._155),s=n.i(i.a)(a._156),o=n.i(i.a)(a._157),l=n.i(i.a)(a._158),c=n.i(i.a)(a._159),u=n.i(i.a)(a._160);
},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),a=n(31);n.d(t,"initMediaSubscriptionModal",function(){return r}),n.d(t,"clearMediaSubscriptionModal",function(){return s}),n.d(t,"fetchMediaSubscription",function(){return o}),n.d(t,"saveMediaSubscription",function(){return l}),n.d(t,"changeMediaSubscriptionTemplateMode",function(){return c}),n.d(t,"clearMediaSubscriptionModalError",function(){return u}),n.d(t,"moveMediaSubscriptionModal",function(){return d;
}),n.d(t,"deleteMediaSubscriptionModal",function(){return h});var r=n.i(i.a)(a.a),s=n.i(i.a)(a.b),o=n.i(i.a)(a.c),l=n.i(i.a)(a.d),c=n.i(i.a)(a.e),u=n.i(i.a)(a.f),d=n.i(i.a)(a.g),h=n.i(i.a)(a.h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),a=n(31);n.d(t,"initPrePlayPage",function(){return r}),n.d(t,"initPrePlayDescendantList",function(){return s}),n.d(t,"clearPrePlayPage",function(){return o}),n.d(t,"fetchPrePlayMetadataItem",function(){return l}),n.d(t,"fetchPrePlayRelatedHubs",function(){
return c});var r=n.i(i.a)(a._92),s=n.i(i.a)(a._93),o=n.i(i.a)(a._94),l=n.i(i.a)(a._95),c=n.i(i.a)(a._96)},function(e,t,n){"use strict";var i=n(53),a=n(31);n.d(t,"a",function(){return r}),n.d(t,"c",function(){return s}),n.d(t,"b",function(){return o});var r=n.i(i.a)(a._141),s=n.i(i.a)(a._142),o=n.i(i.a)(a._143)},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(r.a)(),function(e){return e.some(function(e){return e.refreshing})})}var a=n(9),r=(n.n(a),n(437));t.a=i},function(e,t,n){
"use strict";function i(){return n.i(s.createSelector)(function(e,t){var n=t.activeSort;return n},n.i(o.a)(),function(e,t){if(t){var n=e&&r.a.first(e.split(":")),i=r.a.find(t.sorts,function(t){return e?t.key===n||t.descKey===e:t.isDefault});return i||(i=r.a.first(t.sorts)),i}})}var a=n(2),r=n.n(a),s=n(9),o=(n.n(s),n(347));t.a=i},function(e,t,n){"use strict";function i(e){return e.ui.libraryPage.metadataTypes}t.a=i},function(e,t,n){"use strict";function i(){return n.i(o.createSelector)(u.a,n.i(d.a)(),function(e,t){
var n=t?t.channels:e.selectedDevice.channels,i=t?t.channelMappings:e.channelMappings,a=s.a.pluck(n,"identifier"),r=s.a.pluck(i,"deviceIdentifier"),o=a.concat(r),c=s.a.uniq(o).sort(l.a);return c.map(function(e){var t=s.a.findWhere(n,{identifier:e}),a=s.a.findWhere(i,{deviceIdentifier:e}),r=!!t&&t.drm,o=!(!t||r||!a||!a.enabled);return{name:t?t.name:"",deviceIdentifier:e,enabled:o,drm:r,isChannelMissing:!t,lineupIdentifier:a&&a.lineupIdentifier?a.lineupIdentifier:""}})})}function a(){return n.i(c.a)(i(),function(e){
return e})}var r=n(2),s=n.n(r),o=n(9),l=(n.n(o),n(450)),c=n(173),u=n(96),d=n(280);t.a=a},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e,t){var n=t.deviceID;return n},n.i(l.a)(),c.a,function(e,t,n){var i=n.selectedDevice&&n.selectedDevice.key;return r.a.find(t,function(t){return t.type===o.a.PROVIDER_DEVICE_CHANNELSCAN&&parseInt(t.Context.deviceID,10)===(e||i)})})}var a=n(2),r=n.n(a),s=n(9),o=(n.n(s),n(107)),l=n(184),c=n(96);t.a=i},function(e,t,n){"use strict";function i(){
return n.i(s.createSelector)(function(e,t){var n=t.dvrID;return n},n.i(l.a)(),c.a,function(e,t,n){return e?r.a.find(t,function(t){return t.type===o.a.PROVIDER_EPG_LOAD&&parseInt(t.Context.dvrID,10)===e}):r.a.find(t,{uuid:n.epgDownloadActivityID})})}var a=n(2),r=n.n(a),s=n(9),o=(n.n(s),n(107)),l=n(184),c=n(96);t.a=i},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(173)),r=n(96),s=n.i(i.createSelector)(r.a,function(e){return e.lineupChannels.reduce(function(e,t){var n=t.identifier+" "+t.callSign;
return t.title&&(n+=" ("+t.title+")"),e[t.identifier]=n,e},{})}),o=n.i(a.a)(s,function(e){return e});t.a=o},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(n.i(o.a)(),n.i(l.a)(),function(e,t){if(e&&t)return r.a.findWhere(e.Channel,{id:t.channelID})})}var a=n(2),r=n.n(a),s=n(9),o=(n.n(s),n(29)),l=n(281);t.a=i},function(e,t,n){"use strict";function i(e){return n.i(l.createSelector)(n.i(u.a)(),function(t){return o.a.find(t,{type:e})})}function a(){return i(c.a.GENERAL_BUNDLE_CLEAN);
}function r(){return i(c.a.LIBRARY_DELETE)}var s=n(2),o=n.n(s),l=n(9),c=(n.n(l),n(107)),u=n(184);t.a=a,t.b=r},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){var n=t.providerEntityID;return n},function(e,t){var n=t.listType;return n},function(e,t){var n=t.listContext;return n},o.a,function(e,t,i,a){var o=n.i(s.a)(t,i,{providerEntityID:e,keys:i===r.c?a[t]:null});return o})}var a=n(9),r=(n.n(a),n(48)),s=n(894),o=n(1568);t.a=i},function(e,t,n){"use strict";var i={
PRODUCTION:"9AC194DC",QA:"4289C4E0",CUSTOM:"custom"};i.settings=[{value:i.PRODUCTION,title:"Production"},{value:i.QA,title:"QA"},{value:i.CUSTOM,title:"Custom"}],t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(10),s=n(46),o=n.n(s),l=n(33),c=n(2367),u=n.n(c),d=r.a.Layout.extend({className:"react-page-container",initialize:function(){this.$el.addClass(u.a.wrapper)},mountReact:function(){n.i(l.a)(!1,"`mountReact` must be implemented by a subclass of `AbstractReactPageView`")},unmountReact:function(){
this.isRendered&&a.a.each(this.ui,function(e,t){o.a.unmountComponentAtNode(e[0])})},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});t.a=d},function(e,t,n){"use strict";var i=n(2643),a=n.n(i),r=n(10),s=r.a.ItemView.extend({className:"loading",template:a.a,initialize:function(e){e&&e.inline&&this.$el.addClass("loading-inline")}});t.a=s},function(e,t,n){"use strict";var i=n(2627),a=n.n(i),r=n(2368),s=n.n(r),o=n(786),l=o.a.extend({
template:a.a,ui:{page:".page-container"},serializeData:function(){return{styles:s.a}}});t.a=l},function(e,t,n){"use strict";var i=n(2646),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(8),d=n(738),h=n(332),p=n(14),f=n(21),g=n(1583),m=c.a.Layout.extend({className:"sign-in-container container",template:a.a,ui:{form:"#user-account-form"},regions:{form:"#user-account-form"},events:{"submit form":"onSubmit","click .why-sign-in-btn":"onWhySignInClick","click .back-to-sign-in-btn":"onBackToSignInClick",
"click .skip-btn":"onSkipClick","click .tv-mode-btn":"onTVModeClick"},initialize:function(e){e||(e={}),this.isFirstRun=!!e.isFirstRun,this.showWhySignIn=!1},serializeData:function(){return{showSkip:this.isFirstRun,showWhySignIn:this.showWhySignIn,showTVMode:n.i(h.a)()}},signIn:function(e){return this.form.currentView.validateAll(this.ui.form[0],["username","password"],e)?f.a.execute("signIn",e).done(function(){p.a("metrics").trackEvent({event:"client:signin",interaction:!0,properties:{mode:"password",
firstRun:this.isFirstRun}})}.bind(this)):l.a.Deferred().reject().promise()},signUp:function(e){return this.form.currentView.validateAll(this.ui.form[0],null,e)?f.a.execute("signUp",e).done(function(){p.a("metrics").trackEvent({event:"client:signup",interaction:!0,properties:{firstRun:this.isFirstRun}})}.bind(this)):l.a.Deferred().reject().promise()},onRender:function(){this.form.show(new g.a({isFirstRun:this.isFirstRun,showRememberMe:!0}))},onSubmit:function(e){e.preventDefault();var t=e.currentTarget,n=this.form.currentView.ui.submitBtn;
if(!n.hasClass("active")){n.addClass("active");var i={username:t.username.value,email:t.email.value,password:t.password.value,confirm:t.confirm.value,remember:t.remember.checked},a=this.form.currentView.$el.hasClass("sign-in-form")?this.signIn(i):this.signUp(i);a.done(function(){u.a.trigger("navigate:refresh")}),a.fail(s.a.bind(function(){n.removeClass("active")},this))}},onWhySignInClick:function(e){e.preventDefault(),p.a("metrics").trackClick({page:"signIn",action:"whatsThis",firstRun:this.isFirstRun
}),this.showWhySignIn=!0,this.render()},onBackToSignInClick:function(e){e.preventDefault(),this.showWhySignIn=!1,this.render()},onSkipClick:function(e){e.preventDefault(),p.a("metrics").trackClick({page:"signIn",action:"skip",firstRun:this.isFirstRun}),this.trigger("skipSignIn")},onTVModeClick:function(e){e.preventDefault(),n.i(d.a)("tv")}});t.a=m},function(e,t,n){"use strict";var i=n(2658),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(221),c=o.a.ItemView.extend({mixins:[l.a],className:"alert transition-in",
template:a.a,alertDuration:2e3,transitionDuration:500,events:{mouseenter:"onMouseEnter",mouseleave:"onMouseLeave","click .close-btn":"onCloseClick"},initialState:"transitionIn",states:{transitionIn:{nextState:"visible",onEnter:function(){this.$el.triggerReflow(),this.$el.removeClass("transition-in"),this.startTransition()}},visible:{nextState:"transitionOut",onEnter:function(){this.transitionOutTimeout=setTimeout(this.enterNextState,this.alertDuration)}},transitionOut:{onEnter:function(){this.$el.addClass("transition-out"),
this.startTransition()}}},initialize:function(e){this.bindAllWhenRendered(["enterNextState"]),s.a.isString(e)&&(e={message:e}),this.type=e.type,this.message=e.message,this.type&&this.$el.addClass("has-"+this.type)},serializeData:function(){return{type:this.type,message:this.message}},startTransition:function(){setTimeout(this.enterNextState,this.transitionDuration)},onRender:function(){s.a.defer(this.enterNextState)},onStateMachineComplete:function(){this.close()},onMouseEnter:function(e){clearTimeout(this.transitionOutTimeout);
},onMouseLeave:function(e){"visible"===this.currentState&&(clearTimeout(this.transitionOutTimeout),this.transitionOutTimeout=setTimeout(this.enterNextState,this.alertDuration/2))},onCloseClick:function(e){e.preventDefault(),"visible"===this.currentState&&(clearTimeout(this.transitionOutTimeout),this.enterNextState())}});t.a=c},function(e,t,n){"use strict";var i=n(2688),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(311),d=n.n(u),h=n(8),p=n(40),f=n(1695),g=n(1625),m=n(160),v=c.a.CompositeView.extend({
id:"player-play-queue-dropdown",tagName:"span",className:"dropup",itemView:f.a,emptyView:g.a,itemViewContainer:"ol",template:a.a,modelEvents:{"change:showPlayQueue":"onShowPlayQueueChange"},events:{"click .save-btn":"onSaveClick","mousewheel .play-queue-list":"onPlayQueueMouseWheel"},serializeData:function(){var e=this.model.get("playQueue"),t=e.get("isRadio"),n=e.server&&e.server.supports("playlists"),i=e.supports({playlists:!0});return{canEdit:this.model.get("showPlayQueue"),canPlaylist:!t&&i&&n
}},appendHtml:function(e,t,n){return p.a.prototype.sortedAppendHtml.apply(this,[e,t,n+1])},onRender:function(){if(this.$el.parent().toggleClass("hidden",!this.model.get("showPlayQueue")),this.model.get("showPlayQueue")){var e=function(e){var t=l()(e.item).data("play-queue-id"),n=l()(e.item).prev(".play-queue-list-item").data("play-queue-id");this.trigger("move",t,n)},t=this.$el.children(".dropdown-menu")[0];this.sortable=new d.a(t,{draggable:".play-queue-list-item",animation:200,onUpdate:s.a.bind(e,this)
})}},onShowPlayQueueChange:function(){this.render()},onSaveClick:function(){h.a.trigger("show:modal",new m.a({model:this.model.get("playQueue")}))},onPlayQueueMouseWheel:function(e){e.stopPropagation()}});t.a=v},function(e,t,n){"use strict";var i=n(2693),a=n.n(i),r=n(10),s=n(14),o=n(1628),l=r.a.Layout.extend({id:"primary-player-dropdown",tagName:"li",className:"nav-dropdown dropdown",template:a.a,regions:{list:".dropdown-menu"},events:{"click .dropdown-toggle":"onDropdownToggleClick"},initialize:function(e){
e||(e={});var t=s.a("appModel");this.showNowPlaying=e.showNowPlaying,this.players=t.get("players"),this.listenTo(t,{"change:primaryPlayer":this.onPrimaryPlayerChange,"change:isCastApiAvailable":this.render,"change:isCastDeviceAvailable":this.render}),this.listenTo(this.players,"update reset",this.render),this.setup()},setup:function(){var e=s.a("appModel"),t=e.get("primaryPlayer");if(t){var n=t.get("nowPlaying");this.listenTo(n,"update reset",this.render)}},serializeData:function(){var e=s.a("appModel");
return{isActive:!!e.get("primaryPlayer")}},onRender:function(){this.list.append(new o.a({showNowPlaying:this.showNowPlaying}),this.$el)},onPrimaryPlayerChange:function(e,t){var n=s.a("appModel"),i=n.previous("primaryPlayer");i&&this.stopListening(i.get("nowPlaying")),this.setup(),this.render()},onDropdownToggleClick:function(e){this.players.fetch()}});t.a=l},function(e,t,n){"use strict";var i=n(2696),a=n.n(i),r=n(10),s=r.a.ItemView.extend({id:"section-dropdown",tagName:"span",className:"dropdown",
template:a.a,modelEvents:{"change:title":"render"},serializeData:function(){var e=this.model.server.supports("playlists");return{showDropdown:this.collection.length>1||e,showPlaylists:e,sections:this.collection.toJSON(),serverID:this.model.server.id,currentSectionTitle:this.options.title||this.model.get("title"),currentSectionKey:this.options.key||this.model.get("key")}}});t.a=s},function(e,t,n){"use strict";function i(e){return D.a.reduce(e,function(e,t){return e[t]=!0,e},{})}var a=n(2702),r=n.n(a),s=n(2704),o=n.n(s),l=n(2707),c=n.n(l),u=n(2711),d=n.n(u),h=n(2713),p=n.n(h),f=n(2714),g=n.n(f),m=n(2716),v=n.n(m),y=n(2718),b=n.n(y),S=n(2720),w=n.n(S),M=n(2715),I=n.n(M),C=n(2),D=n.n(C),T=n(5),x=n.n(T),P=n(4),E=n(36),A=n(487),L=n(1638),k=n(158),N={
movie:d.a,show:b.a,season:v.a,episode:c.a,artist:o.a,album:r.a,track:w.a,photoalbum:p.a,photo:g.a,playlist:I.a},_=A.a.extend({regions:{ratingRegion:".rating-region"},ui:D.a.extend({selectizeInputs:".selectize input[type=text]"},A.a.prototype.ui),initialize:function(e){var t=this.model.get("type");this.template=N[t]||N.movie;var n=E.a.get(t);this.canSelectize=this.model.server.supports("batchEdit")&&n,this.canReparent=this.model.server.supports("batchEdit")},serializeData:function(){var e=A.a.prototype.serializeData.apply(this,arguments);
return e.supportsLinkedYears=this.model.server.supports("linkedYearMetadata"),e},flushChanges:function(){var e=this.ui.form,t=e.find(".selectize input[tabindex=-1]"),n=i(D.a.pluck(t,"name")),a=i(D.a.pluck(e.find("[type=number]"),"name")),r=D()(e.serializeArray()).reject(function(e){return n[e.name]},this),s=D.a.reduce(r,function(e,t){if(a[t.name]){var n=x.a.trim(t.value);if(n)return e[t.name]=parseFloat(n,10),e;if(!this.model.get(t.name))return e}return e[t.name]=t.value,e},{},this);D.a.each(t,function(e){
var t=x()(e),n=t.data("updateAttr"),i=t.data("altUpdateAttr"),a=t.data("isText"),r=e.selectize.getValue();if(i)if(a)s[n]=r,s[i]=null;else{var o=e.selectize.options[r];if(o){var l=o[t.data("autocompleteAttr")];s[n]=l,s[i]=r}}else s[n]=r});var o=this.model.get("lockedFields");o&&o.set(this.getLockedFieldsArray(),{parse:!0}),this.model.set(s)},markInvalid:function(e){this.$(".form-group").removeClass("has-error"),D()(e).each(function(e){var t=this.$('.form-group[data-attr="'+e+'"]');t.addClass("has-error"),
t.find(".control-error").text(n.i(P.default)("Required"))},this)},onRender:function(){if(this.$(".rating-region").length>0&&this.ratingRegion.show(new k.a({model:this.model,passive:!0})),this.canSelectize){var e=this;this.ui.selectizeInputs.each(function(t,i){n.i(L.a)(e,i)})}}});t.a=_},function(e,t,n){"use strict";var i=n(2712),a=n.n(i),r=n(2719),s=n.n(r),o=n(2708),l=n.n(o),c=n(2705),u=n.n(c),d=n(2703),h=n.n(d),p=n(2721),f=n.n(p),g=n(2),m=n.n(g),v=n(5),y=n.n(v),b=n(209),S=n(487),w=n(1639),M=n(617),I=(n.n(M),
S.a.extend({templatesByType:{movie:a.a,show:s.a,episode:l.a,artist:u.a,album:h.a,track:f.a},ui:m.a.extend({tagInputs:".tag-input-hidden"},S.a.prototype.ui),events:m.a.extend({"change .lockable-field":"onLockableFieldChange"},S.a.prototype.events),initialize:function(e){this.template=this.templatesByType[this.model.get("type")]||this.templatesByType.movie,this.canAutocomplete=this.model.server.supports("batchEdit"),this.canEditSimilarArtists=this.model.server.supports("editSimilarArtists"),this.getSection();
},getSection:function(){var e=this.model.section;if(!e){var t=this.model.get("librarySectionID");e=new b.a({key:t},{server:this.model.server})}this.section=e},flushChanges:function(){var e=this.ui.form,t=m.a.reduce(e.serializeArray(),function(e,t){return e[t.name]=t.value,e},{}),n=m.a.reduce(this.ui.tagInputs,function(e,t){var n=t.selectize,i=y()(t).data("name"),a=y()(t).data("attr");return e[a]=m.a.map(n.items,function(e){var t=n.options[e];return{tag:t.tag,id:t.id}}),this.model["original.tag."+i]=m.a.toArray(n.options),
e},{},this);m.a.each(n,function(e,t){this.model.get(t).set(e,{parse:!0})},this),this.model.get("lockedFields").set(this.getLockedFieldsArray(),{parse:!0}),this.model.set(t)},onRender:function(){var e=this;this.ui.tagInputs.each(function(t,i){n.i(w.a)(e,i)})}}));t.a=I},function(e,t,n){"use strict";var i=n(2732),a=n.n(i),r=n(47),s=n(10),o=n(4),l=n(211),c=n(221),u=n(466),d=s.a.Layout.extend({mixins:[c.a],className:"conversion-status",template:a.a,regions:{progressBarRegion:".progress-bar-region"},initialize:function(e){
this.initialState=e.initialState,this.initialErrorMessage=e.initialErrorMessage,this.generator=e.generator,this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,this.progressModel=new r.a.Model({progress:0,remaining:0,speed:0})},states:{pending:{onEnter:function(){this.$el.addClass("pending")},onExit:function(){this.$el.removeClass("pending")}},converting:{onEnter:function(){this.$el.addClass("converting")},onExit:function(){this.$el.removeClass("converting")}},processed:{onEnter:function(){
this.$el.addClass("processed")},onExit:function(){this.$el.removeClass("processed")}},disabled:{onEnter:function(){this.$el.addClass("disabled")},onExit:function(){this.$el.removeClass("disabled")}},error:{onEnter:function(){this.$el.addClass("error")},onExit:function(){this.$el.removeClass("error")}}},bindingsModel:"progressModel",bindings:{".conversion-status-converting-label":{model:"pausedSetting",modelAttribute:"value",formatter:function(e){return e?n.i(o.default)("Paused"):n.i(o.default)("Converting");
}},".conversion-status-pending-label":{model:"pausedSetting",modelAttribute:"value",formatter:function(e){return e?n.i(o.default)("Paused"):n.i(o.default)("Waiting")}},".conversion-status-converting-speed":{modelAttribute:"speed",autohide:!0,formatter:function(e){if(e){var t=Math.round(10*e)/10;return t>10&&(t=Math.round(t)),"("+t+"x)"}}},".conversion-status-converting-percentage":{modelAttribute:"progress",formatter:function(e){return Math.round(e)+"%"}},".conversion-status-converting-progress-separator":{
modelAttribute:"remaining",manual:!0,autohide:function(e){return e&&this.progressModel.get("speed")}},".conversion-status-converting-remaining":{modelAttribute:"remaining",autohide:!0,formatter:function(e){if(this.progressModel.get("speed"))return n.i(l.a)(e)}}},serializeData:function(){return{initialErrorMessage:this.initialErrorMessage}},findTranscodeJob:function(){return this.transcodeJob=this.transcodeJobs.find(function(e){var t=this.model.get("ratingKey"),n=this.generator?this.generator.id:this.model.get("generatorID"),i=this.model.get("syncItemId"),a=t&&t===e.get("ratingKey"),r=n&&n===e.get("generatorID"),s=i&&i===e.get("syncItemId");
return a&&(r||s)},this),this.transcodeJob&&(this.stopListening(this.transcodeJobs),this.enterState("converting"),this.progressModel.set({progress:this.transcodeJob.get("progress"),speed:this.transcodeJob.get("speed"),remaining:this.transcodeJob.get("remaining")}),this.listenTo(this.transcodeJob,{remove:this.onTranscodeJobRemove,"change:progress":this.onTranscodeProgressChange,"change:speed":this.onTranscodeSpeedChange,"change:remaining":this.onTranscodeRemainingChange})),this.transcodeJob},onRender:function(){
this.enterState(this.initialState||"pending"),this.findTranscodeJob()||this.listenTo(this.transcodeJobs,"reset add",this.findTranscodeJob),this.progressBarRegion.append(new u.a({model:this.progressModel,size:30,lineWidth:3}))},onTranscodeJobRemove:function(e){this.enterState("pending")},onTranscodeProgressChange:function(e,t){this.progressModel.set("progress",t)},onTranscodeSpeedChange:function(e,t){this.progressModel.set("speed",t)},onTranscodeRemainingChange:function(e,t){this.progressModel.set("remaining",t);
}});t.a=d},function(e,t,n){"use strict";var i=n(10),a=n(36),r=n(54),s=i.a.ItemView.extend({ui:{poster:".media-poster"},bindings:{".media-title":{modelAttribute:"title"}},initialize:function(e){this.type=this.model.get("type");var t=a.a.get(this.type).element,n=this.posterWidth[t]||40,i="movie"===this.type?"art":"thumb",s="movie"===this.type?"art":this.type;this.image=new r.a({model:this.model,type:s,getUrl:this.getPosterUrl,width:n,modelAttribute:i})},getPosterUrl:function(e){return e=e||this.model.get("parentThumb")||this.model.get("grandparentThumb"),
e||(this.model.parent?e=this.model.parent.get("thumb"):this.model.channel&&(e=this.model.channel.get("thumb"))),e},onRender:function(){this.image.setElement(this.ui.poster)}});t.a=s},function(e,t,n){"use strict";var i=n(40),a=n(1687),r=i.a.extend({tagName:"ul",className:"tile-list media-tile-list extra-tile-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(488),a=n(489),r=i.a.extend({tagName:"ul",className:"list virtual-list media-list media-details-list",itemView:a.a});t.a=r},function(e,t,n){
"use strict";var i=n(488),a=n(137),r=i.a.extend({tagName:"ul",className:"list virtual-list media-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(488),a=n(284),r=i.a.extend({tagName:"ul",className:"tile-list virtual-list media-tile-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(40),a=n(1718),r=i.a.extend({tagName:"ul",className:"list side-bar-list",itemView:a.a,initialize:function(e){var t=this.collection.section;e.disabled?this.$el.addClass("disabled"):t&&(this.listenTo(t,"change:currentType",this.onCurrentTypeChange),
t.get("pseudo")||this.collection.populate({reset:!0,scope:"page"}))},onCurrentTypeChange:function(e,t){this.collection.section.set("currentSort",null,{silent:!0}),e.get("pseudo")||this.collection.fetch({reset:!0,scope:"page"})}});t.a=r},function(e,t,n){"use strict";var i=n(2771),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(4),h=n(8),p=n(270),f=n(190),g=c.a.ItemView.extend({className:"friend-server-status-container",template:a.a,events:{"click .server-share-edit-btn":"onEditClick"},
initialize:function(){var e=u.a("appModel");this.collection=this.model.get("serverShares"),this.servers=e.get("servers"),this.attachedServers=[],this.collection.each(this.addServerShare,this),this.listenTo(this.collection,{add:this.onServerShareAdd,remove:this.onServerShareRemove,"change:numLibraries":this.render}),this.listenTo(this.servers,"add",this.onServerAdd)},serializeData:function(){var e=u.a("appModel"),t={owned:this.getLibrariesData({owned:!0}),shared:this.getLibrariesData({owned:!1}),canEdit:!e.get("user").get("restricted")
};return t.owned.numLibraries||t.shared.numLibraries||(t.showEmptyMessage=!0),t},getLibrariesData:function(e){var t={friendLabel:this.model.get("restricted")?n.i(d.default)("user"):n.i(d.default)("friend"),status:this.getServerStatus(e),hasActiveShare:!!this.collection.findWhere({pending:!1,owned:e.owned})};return t.numLibraries=this.collection.getLibraryCount({pending:!t.hasActiveShare,owned:e.owned}),t.libraryLabel=n.i(p.a)(n.i(d.default)("library"),t.numLibraries,n.i(d.default)("libraries")),t;
},getServerStatus:function(e){for(var t,n=0,i=this.collection.length;n<i;n++){var a=this.collection.at(n);if(a.get("owned")===e.owned){var r=this.servers.get(a.get("machineIdentifier")),s=r&&r.get("connected");if(s===!1)return"unavailable";s&&(t="available")}}return t},addServerShare:function(e){var t=this.servers.get(e.get("machineIdentifier"));t&&this.attachServer(t)},removeServerShare:function(e){var t=this.servers.get(e.get("machineIdentifier"));t&&!e.get("owned")&&this.detachServer(t)},attachServer:function(e){
this.attachedServers.push(e),this.listenTo(e,"change:connected",this.render)},detachServer:function(e){var t=s.a.indexOf(this.attachedServers,e);t>-1&&this.attachedServers.splice(t,1),this.stopListening(e)},onServerShareAdd:function(e){this.addServerShare(e),this.render()},onServerShareRemove:function(e){this.removeServerShare(e),this.render()},onServerAdd:function(e){this.collection.findWhere({machineIdentifier:e.id})&&(this.attachServer(e),this.render())},onEditClick:function(e){e.preventDefault();
var t=l()(e.currentTarget);if(!t.isDisabled()){var n,i=t.hasClass("owned"),a=this.collection.findWhere({owned:i});a&&(n=a.get("machineIdentifier")),h.a.trigger("show:modal",new f.a({model:this.model,defaultPaneType:i?"ownedServer":"sharedServer",defaultPaneID:n}))}}});t.a=g},function(e,t,n){"use strict";var i=n(2773),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(14),c=n(4),u=n(8),d=n(21),h=n(129),p=n(803),f=n(190),g=n(289),m=o.a.Layout.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:a.a,
ui:{poster:".card-poster"},regions:{details:".card-details"},events:{"click .pin-btn":"onPINClick","click .edit-btn":"onEditClick","click .delete-btn":"onDeleteClick"},initialize:function(e){var t=l.a("appModel"),n=t.get("user"),i=n.get("desktop").get("friends"),a=i.get(this.model.id);this.isAdmin=e.isAdmin,this.isSignedInUser=this.model.id===n.id,this.image=new h.a({model:this.model,type:"friend",width:80}),a?this.friend=a:this.listenTo(i,"add",this.onFriendAdd)},serializeData:function(){return{
isSignedInUser:this.isSignedInUser}},canEditPIN:function(){var e=this.isSignedInUser&&!this.model.get("restricted"),t=this.isAdmin&&this.model.get("restricted")&&!this.model.get("guest");return e||t},showStatusView:function(){this.friend&&this.details.append(new p.a({model:this.friend}))},bindings:{".username":{modelAttribute:"title"},".admin-icon":{modelAttribute:"admin",autohide:!0,manual:!0},".user-type":{modelAttribute:"restricted",autohide:!0,formatter:function(e){return this.model.get("guest")?n.i(c.default)("Guest User"):e?n.i(c.default)("Managed User"):void 0;
}},".pin-protected-btn":{modelAttribute:"protected",manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.canEditPIN()),e}},".pin-unprotected-btn":{modelAttribute:"protected",manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.canEditPIN()),!e}},".edit-btn":{modelAttribute:"admin",manual:!0,autohide:!0,formatter:function(e){var t=l.a("appModel"),n=t.get("user"),i=this.isAdmin||!n.get("restricted")&&!this.model.get("restricted");return i&&!this.isSignedInUser;
}},".delete-btn":{modelAttribute:"admin",manual:!0,autohide:!0,formatter:function(e){return this.isAdmin&&!this.isSignedInUser&&!this.model.get("guest")}}},onRender:function(){this.image.setElement(this.ui.poster),this.showStatusView()},onClose:function(){this.image.close()},onFriendAdd:function(e){e.id===this.model.id&&(this.friend=e,this.showStatusView())},onPINClick:function(e){e.preventDefault(),s()(e.currentTarget).isDisabled()||u.a.trigger("show:modal",new g.a({model:this.model,isEditing:!0
}))},onEditClick:function(e){e.preventDefault(),u.a.trigger("show:modal",new f.a({type:"home",homeUser:this.model,isAdmin:this.isAdmin}))},onDeleteClick:function(e){e.preventDefault(),d.a.execute("removeHomeUser",{homeUser:this.model})}});t.a=m},function(e,t,n){"use strict";var i=n(40),a=n(1733),r=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a,sorted:!0});t.a=r},function(e,t,n){"use strict";var i=n(942),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(4),u=n(8),d=n(794),h=n(50),p=n(275),f={
playlist:["general"]},g=h.a.extend({mixins:[p.a],name:"editPlaylistModal",className:"edit-metadata-modal modal modal-lg fade",template:a.a,panes:{general:{constructor:d.a}},panesModel:"tempModel",events:s.a.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit","submit .edit-metadata-form":"onFormSubmit"},h.a.prototype.events),ui:{saveBtn:".save-btn",message:".form-message",navPane:".modal-nav-pane",loadingIndicator:".modal-body-pane .loading-inline"},regions:{paneRegion:".pane-region"
},onlyAfterRender:["saveChanges","showPane","showNav"],initialize:function(e){h.a.prototype.initialize.apply(this,arguments);var t,i,a,r=e.mediaActions;if(r?(a=r.getActionTargets(),t=a[0]):(t=e.model,a=[t]),this.model=t,this.tempModel=t.clone(),!i){var o=l.a.Deferred();o.resolve(),i=o.promise()}i=i.done(s.a.bind(function(){this.tempModel.set(t.attributes),1===a.length&&this.tempModel.set("key",a[0].get("key")),this.showNav(),this.showPane(e.selectedPane||"general"),this.listenTo(u.a,"shortcut:save",this.saveChanges);
},this)),i.fail(s.a.bind(function(){this.ui.message.text(n.i(c.default)("There was an error editing this item")),this.ui.loadingIndicator.addClass("hidden")},this))},serializeData:function(){var e=f[this.model.get("type")]||f.movie,t=s.a.reduce(e,function(e,t){return e[t]=!0,e},{}),i=s.a.escape(n.i(c.default)("Edit {1}",this.model.get("title"))),a={item:this.model.toJSON(),panes:t,selectedPane:this.selectedPane,paneTitle:i};return a},paneConstructorArg:function(){return{type:this.selectedPane}},showNav:function(){
this.ui.navPane.removeClass("hidden")},saveChanges:function(){var e=this.ui.saveBtn,t=this.ui.message;if(!e.isDisabled()){t.text(""),this.paneRegion.currentView.flushChanges();var i=s.a.reduce(this.model.changedAttributes(this.tempModel.attributes),function(e,t,n){return e[n]=t,e},{});e.addClass("active");var a=[];s.a.isEmpty(i)||a.push(this.model.save(i));var r=l.a.when.apply(l.a,a);r.done(s.a.bind(function(){this.hide()},this)),r.fail(function(){t.text(n.i(c.default)("Your changes could not be saved."));
}),r.always(function(){e.removeClass("active")})}},onPaneShow:function(e,t){this.listenTo(t,"focusSubmit",function(){this.ui.saveBtn.focus()})},onPaneHide:function(e,t){t.flushChanges(),this.stopListening(t)},onFormSubmit:function(e){e.preventDefault(),this.saveChanges()}});t.a=g},function(e,t,n){"use strict";var i=n(2788),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(4),u=n(50),d=n(1623),h=n(275),p=n(1810),f=n(1811),g=u.a.extend({mixins:[h.a],name:"fixIncorrectMatch",className:"fix-incorrect-match-modal modal modal-lg fade",
template:a.a,panes:{form:{constructor:p.a},results:{constructor:f.a}},ui:{searchBtn:".search-btn"},regions:{paneRegion:".pane-region",autoMatchDropdownRegion:".auto-match-dropdown-region"},events:s.a.extend({"click .auto-match-agent":"hide","click .match-result":"hide","click .search-options-btn":"onSearchOptionsClick","click .cancel-btn":"onCancelClick","click .search-btn":"onSearchClick","submit #fix-incorrect-match-form":"onSearchSubmit"},u.a.prototype.events),onlyAfterRender:["showPane","updateSearchBtn"],
initialize:function(){u.a.prototype.initialize.apply(this,arguments),p.a.prototype.setupAgents.apply(this),f.a.prototype.setupResults.apply(this),this.showPane("results")},serializeData:function(){var e={location:this.model.getLocation(),showNavigation:!this.model.isPlexMusicItem()};return e},updateSearchBtn:function(e){this.ui.searchBtn.toggleClass("disabled","form"!==e)},fetchResults:function(e){var t=s.a.reduce(e.serializeArray(),function(e,t){return e[t.name]=t.value,e},{manual:1});this.model.results.fetch({
reset:!0,data:t,processData:!0,timeout:0})},bindings:{".modal-title-text":{modelAttribute:"guid",formatter:function(e){return/com\.plexapp\.agents\.none\:\/\//.test(e)?n.i(c.default)("Match"):n.i(c.default)("Fix Incorrect Match")}}},onRender:function(){u.a.prototype.onRender.apply(this,arguments),this.autoMatchDropdownRegion.show(new d.a({model:this.model,collection:this.model.agentsProxy}))},onPaneShow:function(e){this.updateSearchBtn(e)},onSearchOptionsClick:function(e){e.preventDefault(),this.showPane("form");
},onCancelClick:function(e){e.preventDefault(),"results"!==this.selectedPane?this.showPane("results"):this.hide()},onSearchClick:function(e){e.preventDefault();var t=l()(e.currentTarget);if(!t.isDisabled()){var n=t.closest("form");this.fetchResults(n),this.showPane("results")}},onSearchSubmit:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.find("search-btn");n.isDisabled()||(this.fetchResults(t),this.showPane("results"))}});t.a=g},function(e,t,n){"use strict";function i(e){return l.a.reduce(e,function(e,t,n){
var i=a(t);if(0===n)return e.concat(i);var r=i.length>1;return e.concat({plain:!0,split:r,s:"or"},i)},[])}function a(e){var t=e.match(/(.+) (.+)/);if(t)return a(t[1]).concat({plain:!0,s:"then"}).concat(a(t[2]));var n=e.match(/(.+)\+(\S+)/);if(n)return a(n[1]).concat({plain:!0,s:"+"}).concat(a(n[2]));var i=l.a.reduce([[/command/,"\u2318"],[/up/,"\u2191"],[/down/,"\u2193"],[/left/,"\u2190"],[/right/,"\u2192"]],function(e,t){return e.replace(t[0],t[1])},e);return[{s:i}]}var r=n(2791),s=n.n(r),o=n(2),l=n.n(o),c=n(50),u=c.a.extend({
name:"keyboardShortcutsModal",className:"keyboard-shortcuts-modal modal fade",template:s.a,orderedGroups:[{group:"navigation",label:"Navigation"},{group:"actions",label:"Actions"},{group:"player",label:"Player"}],initialize:function(e){c.a.prototype.initialize.apply(this,arguments),this.shortcuts=e.shortcuts},serializeData:function(){var e={};l.a.each(this.shortcuts,function(t){var n=t.group;e[n]||(e[n]=[]),e[n].push(this.humanizeShortcut(t))},this);var t=l.a.map(this.orderedGroups,function(t){var n=l.a.clone(t);
return n.shortcuts=e[t.group],n},this);return{groups:t}},humanizeShortcut:function(e){return e=l.a.clone(e),e.keys=i(e.keys),e}});t.a=u},function(e,t,n){"use strict";var i=n(2807),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(39),c=n(36),u=o.a.ItemView.extend({className:"convert-policy-container",template:a.a,ui:{policyUnwatchedInput:"#convert-policy-unwatched",policyScopeInput:"#convert-policy-scope",policyValueInput:"#convert-policy-value",policyWarning:".convert-warning"},events:{"change input[name=policyUnwatched]":"onPolicyUnwatchedChange",
"change input[name=policyScope]":"onPolicyScopeChange","keyup input[name=policyValue]":"onPolicyValueChange","change input[name=policyValue]":"onPolicyValueChange"},initialize:function(e){this.type=c.a.get(this.model.get("metadataType")||"movie"),this.childElement=c.a.getChildMediaType(this.type.typeString).element,this.model.setPolicyDefaultsFor(this.childElement)},serializeData:function(){var e={isSync:this.options.isSync,isCloudSync:this.options.isCloudSync,isDirectory:this.model.get("isDirectory"),
policy:this.model.get("policy").toJSON()};return e.showLimitWarning=this.model.shouldShowPolicyWarning(this.childElement,e.policy.value),e.showUnwatched=e.isDirectory&&this.childElement===l.a.elements.VIDEO,e},updatePolicyValue:function(){var e=this.model.get("policy"),t=Math.abs(parseInt(this.ui.policyValueInput.val(),10));this.ui.policyValueInput.val(s.a.isNaN(t)?"":t),s.a.isNaN(t)&&(t=0),e.set("value","all"===e.scope?null:t);var n=this.model.shouldShowPolicyWarning(this.childElement,t);this.ui.policyWarning.toggleClass("hidden",!n);
},onPolicyUnwatchedChange:function(e){var t=this.model.get("policy");t.set("unwatched",this.ui.policyUnwatchedInput.prop("checked"))},onPolicyScopeChange:function(e){var t=this.model.get("policy"),n=this.ui.policyScopeInput.prop("checked")?this.ui.policyScopeInput.val():"all";t.set("scope",n),this.updatePolicyValue()},onPolicyValueChange:function(e){this.updatePolicyValue()}});t.a=u},function(e,t,n){"use strict";var i=n(2816),a=n.n(i),r=n(221),s=n(50),o=n(1763),l=n(1764),c=n(1761),u=s.a.extend({mixins:[r.a],
name:"syncModal",className:"convert-modal modal fade",template:a.a,regions:{bodyRegion:".modal-body-region"},initialize:function(e){s.a.prototype.initialize.apply(this,arguments),this.device=this.model?this.model.device:e.device},initialState:"form",states:{form:{nextState:"success",onEnter:function(){this.bodyRegion.show(new o.a({model:this.model,item:this.options.item,items:this.options.items,device:this.device})),this.listenForStateRequests()}},success:{onEnter:function(){this.model?this.hide():(this.bodyRegion.show(new l.a({
server:this.options.item.server,device:this.device})),this.listenForStateRequests())}},error:{onEnter:function(){this.bodyRegion.show(new c.a),this.listenForStateRequests()}}},listenForStateRequests:function(){this.bodyRegion&&this.bodyRegion.currentView&&this.listenTo(this.bodyRegion.currentView,{"request:state":this.enterState,"request:nextState":this.enterNextState})},onRender:function(){s.a.prototype.onRender.apply(this,arguments),this.enterNextState()},onStateMachineComplete:function(){this.hide();
}});t.a=u},function(e,t,n){"use strict";var i=n(2830),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(8),c=n(50),u=c.a.extend({name:"homeWarningModal",template:a.a,events:s.a.extend({"click .server-settings-btn":"onServerSettingsClick"},c.a.prototype.events),initialize:function(e){c.a.prototype.initialize.apply(this,arguments),this.type=e.type},serializeData:function(){var e;return e="pin"===this.type?n.i(o.default)("You've added a PIN restriction"):n.i(o.default)("You've joined a Plex Home"),{intro:e}},onServerSettingsClick:function(e){
e.preventDefault(),this.hide(),l.a.trigger("navigate","serverSettings")}});t.a=u},function(e,t,n){"use strict";var i=n(2834),a=n.n(i),r=n(10),s=n(14),o=n(129),l=r.a.ItemView.extend({tagName:"li",className:"user-select-list-item",template:a.a,ui:{container:".user-select-container",poster:".user-poster"},events:{"click a":"onClick"},initialize:function(e){this.disabled=e.disabled,this.posterImage=new o.a({model:this.model,type:"friend",width:80});var t=s.a("appModel"),n=t.get("primaryServer");n&&n.supports("imageFilters")&&(this.backgroundImage=new o.a({
model:this.model,type:"friend",width:120,background:!0,filters:{blur:20,opacity:50,background:"000000"}}),this.backgroundImage.placeholderClass=!1)},serializeData:function(){return{disabled:this.disabled}},bindings:{".username":{modelAttribute:"title"},".protected-icon":{modelAttribute:"protected",autohide:!0,manual:!0},".admin-icon":{modelAttribute:"admin",autohide:!0,manual:!0}},onRender:function(){this.posterImage.setElement(this.ui.poster),this.backgroundImage&&this.backgroundImage.setElement(this.ui.container);
},onClose:function(){this.posterImage.close(),this.backgroundImage&&this.backgroundImage.close()},onClick:function(e){e.preventDefault(),this.trigger("selectUser",this.model)}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(47),l=n(10),c=n(14),u=n(81),d=n(8),h=n(39),p=n(332),f=n(127),g=n(249),m=n(21),v=n(429),y=n(2906),b=(n.n(y),l.a.Layout.extend({events:{fullscreenchange:"onFullscreenChange",webkitfullscreenchange:"onFullscreenChange",mousewheel:"onMouseWheel"},shortcutListeners:function(){
return{"shortcut:playPause":this.getListenerFor("playPause"),"shortcut:seekBackward":this.getListenerFor("seekBackward"),"shortcut:seekForward":this.getListenerFor("seekForward"),"shortcut:stepBackward":this.getListenerFor("stepBackward"),"shortcut:stepForward":this.getListenerFor("stepForward"),"shortcut:decreaseVolume":this.getListenerFor("decreaseVolume"),"shortcut:increaseVolume":this.getListenerFor("increaseVolume"),"shortcut:skipPrevious":this.getListenerFor("skipPrevious"),"shortcut:skipNext":this.getListenerFor("skipNext"),
"shortcut:toggleFullScreen":this.getListenerFor("toggleFullScreen"),"shortcut:stop":this.getListenerFor("stop")}},initialize:function(e){var t=e.playerModelClass||v.a;if(this.controller=e.controller,this.isNew=!e.controller,this.type=e.type,this.media=e.media,this.offset=e.offset,this.autoplay=e.autoplay,this.$el.addClass(this.type),this.isNew){var i=n.i(c.a)("appModel"),r=i.get("settings"),o=i.get("primaryPlayer");this.controller=g.a.getInstance(this.type),!this.model&&this.playQueue&&(this.model=this.playQueue.get("selectedItem")),
this.playQueue=e.playQueue,this.metadataItem=this.model.get("metadataItem"),this.playerModel=new t({playQueueItem:this.model,metadataItem:this.metadataItem,playQueue:this.playQueue,volume:this.volumeSettingsKey?r.get(this.volumeSettingsKey):r.defaults.volume,friendlyName:o?o.get("friendlyName"):null})}else this.model=this.controller.model.get("playQueueItem"),this.metadataItem=this.model.get("metadataItem"),this.playQueue=this.controller.model.get("playQueue"),this.playerModel=this.controller.model;
this.throttledPersistPlayQueue=a.a.throttle(a.a.bind(this.persistPlayQueue,this),1e3),this.$document=s()(document),this.$document.on("MSFullscreenChange",a.a.bind(this.onFullscreenChange,this)),this.$document.on("mozfullscreenchange",a.a.bind(this.onFullscreenChange,this))},addListeners:function(){var e=n.i(c.a)("appModel");this.listenTo(o.a.history,"route",this.onRouteChange),this.listenTo(e,"change:primaryPlayer",this.onPrimaryPlayerChange),this.listenTo(this.playerModel,{"change:playQueueItem":this.onPlayerPlayQueueItemChange,
"change:state":this.onPlayerStateChange,"change:volume":this.onPlayerVolumeChange,"change:finished":this.onPlayerFinishedChange,"change:position":this.onPlayerPositionChange}),this.controlsView&&this.listenTo(this.controlsView,{play:this.getListenerFor("play"),pause:this.getListenerFor("pause"),"change:position":this.getListenerFor("setPosition"),"change:volume":this.getListenerFor("setVolume"),enterFullscreen:this.enterFullscreen,exitFullscreen:this.exitFullscreen,previous:this.getListenerFor("skipPrevious"),
next:this.getListenerFor("skipNext"),skip:this.getListenerFor("skipTo"),remove:this.getListenerFor("removeItem"),move:this.getListenerFor("moveItem"),minimize:this.getListenerFor("minimize"),maximize:this.getListenerFor("maximize"),toggleShuffle:this.getListenerFor("toggleShuffle"),nextRepeat:this.getListenerFor("nextRepeat"),stop:this.getListenerFor("stop"),"navigate:grandparent":this.getListenerFor("navigateToGrandparent"),"navigate:item":this.getListenerFor("navigateToItem")}),this.listenTo(d.a,a.a.result(this,"shortcutListeners"));
},startPlayback:function(e){return e||(e={}),this.controller.load({model:this.playerModel,autoplay:e.autoplay,silent:this.isNowPlaying(),offset:e.offset})},continuePlayback:function(){},updatePageTitle:function(){var e=this.playerModel.get("state");if(e===h.a.states.STOPPED)return void(document.title="Plex");var t,i=this.playerModel.get("metadataItem"),a=i.get("type");if("episode"===a){var r=n.i(f.a)({seasonIndex:i.get("parentIndex"),episodeIndex:i.get("index"),date:i.get("originallyAvailableAt"),
noLeadingZero:!0,separator:" \xb7 "});t=i.get("grandparentTitle")+" - "+r}else if("track"===a){var s=i.get("originalTitle")||i.get("grandparentTitle");t=s?s+" - "+i.get("title"):i.get("title")}else t=i.get("title");e===h.a.states.PLAYING||e===h.a.states.BUFFERING?document.title="\u25b6 "+t:document.title=t},getListenerFor:function(e){return a.a.isFunction(this[e])?this[e]:a.a.bind(this.controller[e],this.controller)},minimize:function(){this.isSwitchingPlayers=!0,m.a.execute("playMedia",{item:this.model,
controller:this.controller,useMiniPlayer:!0,isSwitchingPlayers:!0})},maximize:function(){this.isSwitchingPlayers=!0,m.a.execute("playMedia",{item:this.model,controller:this.controller,isSwitchingPlayers:!0})},enterFullscreen:function(){if(n.i(p.a)())u.a.set("main.fullscreen",!0);else{var e=this.el.requestFullScreen||this.el.webkitRequestFullScreen||this.el.mozRequestFullScreen||this.el.msRequestFullscreen;e.call(this.el)}},exitFullscreen:function(){if(n.i(p.a)())u.a.set("main.fullscreen",!1);else{
var e=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen;e.call(document)}},toggleFullScreen:function(){this.playerModel.get("showEnterFullscreen")?this.enterFullscreen():this.exitFullscreen()},stop:function(){this.controller.stop({},this)},navigateToGrandparent:function(){var e=this.getNavigationGrandparentKey();this.navigateToLibraryItem(e)||this.navigateToChannelItem()},navigateToItem:function(){var e=this.getNavigationKey();this.navigateToLibraryItem(e)||this.navigateToChannelItem(e);
},navigateToLibraryItem:function(e){return!(!e||!this.metadataItem.get("isLibraryItem"))&&(d.a.trigger("navigate","details",{serverID:this.model.server.id,key:e}),!0)},navigateToChannelItem:function(e){var t=this.model.channel;return!!t&&(d.a.trigger("navigate","channel",{serverID:this.model.server.id,channelID:t.id?t.id:t.get("identifier"),key:e}),!0)},getNavigationGrandparentKey:function(){var e=this.metadataItem.get("grandparentKey");if(e)return e;var t=this.metadataItem.get("parentKey");return t;
},getNavigationKey:function(){return this.metadataItem.get("key")},isNowPlaying:function(){var e=n.i(c.a)("appModel"),t=e.get("primaryPlayer");if(!t)return!1;var i=t.get("nowPlaying");return!!i.get(this.metadataItem.id)},canAutoplay:function(e){return e!==h.a.states.PAUSED},persistPlayQueue:function(){var e=this.playerModel;if(e&&this.playQueue.get("playQueueID")){var t=e.get("state");return t===h.a.states.STOPPED?void m.a.execute("persistPlayQueue",null):void m.a.execute("persistPlayQueue",{playQueue:this.playQueue,
position:e.get("position"),autoplay:!1})}},onRender:function(){this.isNew?this.startPlayback({autoplay:this.canAutoplay()&&this.autoplay,offset:this.offset}):this.continuePlayback()},onClose:function(){if(this.$document.off("MSFullscreenChange"),this.$document.off("mozfullscreenchange"),!this.isSwitchingPlayers&&(this.controller.stop(),!this.controller.model)){var e=this.metadataItem.server.get("playQueueManager"),t=e.getFor(this.metadataItem);t===this.playQueue&&e.remove(t.get("mediaType"))}},onRouteChange:function(){
this.isMini||d.a.trigger("hide:player",this)},onPrimaryPlayerChange:function(e,t){var n=this.playerModel.get("state"),i=this.playerModel.get("position"),a=this.controller.mediaElement;this.playerModel.set("ready",!1),this.playerModel.set("friendlyName",t?t.get("friendlyName"):null),this.controller.stop({isSwitchingPlayers:!0}),this.controller=g.a.getInstance(this.type),this.stopListening(),this.addListeners(),this.startPlayback({offset:i,autoplay:this.canAutoplay(n),mediaElement:a})},onPlayerPlayQueueItemChange:function(e,t){
this.playQueue.set("selectedItem",t),this.model=this.playQueue.get("selectedItem"),this.metadataItem=this.model.get("metadataItem"),this.updatePageTitle()},onPlayerStateChange:function(e,t){this.updatePageTitle(),this.persistPlayQueue()},onPlayerVolumeChange:function(e,t){if(this.volumeSettingsKey){var i=n.i(c.a)("appModel").get("settings");i.save(this.volumeSettingsKey,t)}},onPlayerFinishedChange:function(e,t){if(t){var n=h.a.getElementByType(this.type);this.model.server.get("playQueueManager").remove(n),
d.a.trigger("hide:player",this)}},onPlayerPositionChange:function(e,t){this.throttledPersistPlayQueue()},onFullscreenChange:function(){var e=!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement);this.playerModel.set("showEnterFullscreen",!e),this.playerModel.set("showExitFullscreen",e)},onMouseWheel:function(e){e.deltaY>0?d.a.trigger("shortcut:increaseVolume"):e.deltaY<0&&d.a.trigger("shortcut:decreaseVolume")}}));t.a=b},function(e,t,n){
"use strict";var i=n(2852),a=n.n(i),r=n(2),s=n.n(r),o=n(356),l=o.a.extend({className:function(){var e=this.model.get("canSeek");return"player-seek-bar player-slider"+(e?"":" disabled")},template:a.a,ui:{thumb:".player-slider-thumb",track:".player-slider-track",progress:".player-slider-progress",buffer:".player-slider-buffer"},modelEvents:{"change:position":"onPositionChange","change:startBuffer":"onBufferChange","change:endBuffer":"onBufferChange","change:canSeek":"onCanSeekChange"},events:s.a.extend({
mouseenter:"onMouseMove",mousemove:"onMouseMove",mouseleave:"onMouseLeave"},o.a.prototype.events),normalizeValue:function(e){var t=this.model.get("duration");return e=t?e/t*100:0,e=Math.min(Math.max(e,0),100)},getValueForPosition:function(e){var t=this.model.get("duration"),n=this.ui.track,i=e-n.offset().left,a=i/n.width();return a=Math.min(Math.max(a,0),1),a*=t,Math.round(a)},setValue:function(e){this.model.get("canSeek")&&o.a.prototype.setValue.apply(this,arguments)},displayValue:function(e){e=this.normalizeValue(e),
this.dragging&&(e>=100||!this.model.get("canSeek"))||o.a.prototype.displayValue.call(this,e)},onRender:function(){this.displayValue(this.model.get("position"))},onPositionChange:function(e,t){this.displayValue(t)},onBufferChange:function(e,t){var n=this.model.get("endBuffer"),i=this.normalizeValue(n);this.ui.buffer.css("width",i+"%")},onCanSeekChange:function(e,t){this.$el.toggleClass("disabled",!t)},onMouseMove:function(e){var t=e.pageX,n=this.getValueForPosition(t);this.trigger("hover",{position:t,
time:n})},onMouseLeave:function(e){this.trigger("hover",!1)}});t.a=l},function(e,t,n){"use strict";var i=n(2874),a=n.n(i),r=n(10),s=n(14),o=n(8),l=n(805),c=n(1728),u=r.a.Layout.extend({className:"friends-container col-sm-8 col-md-9",template:a.a,ui:{inviteListHeader:".invite-list-header",friendListHeader:".friend-list-header",pendingListHeader:".pending-list-header"},regions:{inviteList:".invite-list-container",friendList:".friend-list-container",pendingList:".pending-list-container"},initialize:function(){
var e=s.a("appModel"),t=e.get("user");return t.get("restricted")?void o.a.trigger("navigate","users",{subset:"home"}):(this.collection=t.get("desktop").get("friends").filterByUnrestricted(),this.invites=t.get("desktop").get("invites").filterByFriends(),this.sentInvites=t.get("desktop").get("sentInvites").filterByFriends(),void this.addListeners())},addListeners:function(){this.listenTo(this.invites,"reset add remove",this.onInvitesChange),this.listenTo(this.sentInvites,"reset add remove",this.onInvitesChange);
},updateHeaders:function(){var e=!!this.invites.length,t=!!this.sentInvites.length,n=e||t;this.ui.friendListHeader.toggleClass("hidden",!n),this.ui.inviteListHeader.toggleClass("hidden",!e),this.ui.pendingListHeader.toggleClass("hidden",!t),this.ui.friendListHeader.toggleClass("top",!e),this.ui.inviteListHeader.toggleClass("top",e)},onRender:function(){this.friendList.show(new c.a({collection:this.collection})),this.inviteList.show(new l.a({collection:this.invites})),this.pendingList.show(new l.a({
collection:this.sentInvites})),this.updateHeaders()},onClose:function(){this.collection.destroy&&this.collection.destroy(),this.invites.destroy(),this.sentInvites.destroy()},onInvitesChange:function(){this.updateHeaders()}});t.a=u},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(4),f=n(23),g=n(25),m=n(130),v=n(359),y=n(2374),b=n.n(y),S=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onLineHeightRef=function(e){
e&&a.setState({lineHeight:e.clientHeight})},a.onMeasure=function(e){var t=e.height;a.setState({expandedHeight:t})},a.onTogglePress=function(){a.setState({isCollapsed:!a.state.isCollapsed,allowTransition:!0})},a.state={isCollapsed:!0,allowTransition:!1,lineHeight:0,expandedHeight:0},a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.className,i=e.children,r=e.maxLines,s=this.state,o=s.isCollapsed,l=s.allowTransition,c=s.expandedHeight,u=s.lineHeight,d=u*r,g=c>d,y={
overflow:"hidden",maxHeight:o?d:c};return a()("div",{className:t},void 0,!u&&h.a.createElement("div",{className:b.a.lineHeightMeasure,ref:this.onLineHeightRef}),a()("div",{className:l&&b.a.contentTransition,style:y},void 0,a()(m.a,{ignoreWidth:!0,ignorePosition:!0,onMeasure:this.onMeasure},void 0,i)),g&&a()(v.a,{className:b.a.readMore,arrowClassName:b.a.readMoreArrow,direction:o?f.f.DOWN:f.f.UP,isSelected:!1,onPress:this.onTogglePress},void 0,o?n.i(p.default)("Read More"):n.i(p.default)("Read Less")));
},t}(d.Component);S.defaultProps={maxLines:3},t.a=S},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=o()(e,["className","children"]);return r()("div",{className:t,style:i},void 0,n)}var a=n(3),r=n.n(a),s=n(17),o=n.n(s),l=n(1);n.n(l);i.defaultProps={flexGrow:1,flexShrink:0},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=o()(e,["className","children"]);return r()("div",{className:u()(h.a.grid,t),style:i},void 0,n)}var a=n(3),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=(n.n(l),
n(28)),u=n.n(c),d=n(2378),h=n.n(d);i.defaultProps={flexDirection:"row",justifyContent:"space-between",alignItems:"center",alignContent:"center"},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.labelText,n=e.checkboxText,i=e.helpText,a=e.showErrors,s=e.errors,l=c()(e,["labelText","checkboxText","helpText","showErrors","errors"]),u=s[0];return o()(p.a,{},void 0,t&&o()(f.a,{},void 0,t),d.a.createElement(m.a,r()({},l,{hasError:a,checkboxText:o()("span",{},void 0,n,a&&u&&" \u2014 "+u)})),i&&o()(g.a,{},void 0,i));
}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(162),p=n(192),f=n(90),g=n(361),m=n(497);i.defaultProps={showErrors:!1,errors:[]},t.a=n.i(h.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.name,n=e.labelText,i=e.helpText,a=e.showErrors,s=e.errors,l=c()(e,["name","labelText","helpText","showErrors","errors"]),u=s[0];return o()(p.a,{},void 0,o()(f.a,{name:t,hasError:a},void 0,n,a&&u&&" \u2014 "+u),d.a.createElement(m.a,r()({name:t,hasError:a},l)),i&&o()(g.a,{},void 0,i));
}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(162),p=n(192),f=n(90),g=n(361),m=n(227);t.a=n.i(h.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.transitionProps,n=o()(e,["transitionProps"]);return c.a.createElement(d.a,r()({style:f,background:!0,minSize:!0,transition:!0,transitionProps:r()({className:p.a.imageContainer},u.a,t)},n))}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(302),d=n(217),h=n(2402),p=n.n(h),f={width:"100%",height:"100%"};t.a=i},function(e,t,n){
"use strict";var i=n(11),a=n.n(i),r=n(13),s=n.n(r),o=n(12),l=n.n(o),c=n(2),u=n.n(c),d=n(1),h=n.n(d),p=n(14),f=n(25),g=n(272),m=function(e){function t(){var i,r,o;a()(this,t);for(var l=arguments.length,c=Array(l),d=0;d<l;d++)c[d]=arguments[d];return i=r=s()(this,e.call.apply(e,[this].concat(c))),r.onPress=function(e){n.i(p.a)("metrics").trackClick(u.a.omit(r.props,"children"))},o=i,s()(r,o)}return l()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){
var e=h.a.Children.only(this.props.children);return h.a.cloneElement(e,{onPress:n.i(g.a)(this.onPress,e.props.onPress)})},t}(d.Component);t.a=m},function(e,t,n){"use strict";function i(e){var t=e.children,n=o()(e,["children"]);return c.a.createElement(u.a,n,r()(d.a,{className:p.a.modalScroller,innerClassName:p.a.innerModalBody},void 0,t))}var a=n(3),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(91),d=n(71),h=n(2413),p=n.n(h);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.iconClassName,n=e.messageClassName,i=e.kind,a=e.message,s=o()(e,["iconClassName","messageClassName","kind","message"]);
return c.a.createElement(f.a,s,r()(p.a,{name:"plex-icon-alert-560",className:d()(m.a[i],t)}),r()("div",{className:n},void 0,a))}var a=n(3),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(28),d=n.n(u),h=n(23),p=n(30),f=n(823),g=n(2414),m=n.n(g);i.defaultProps={iconClassName:m.a.icon,messageClassName:m.a.message,kind:h.c.DEFAULT},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.uri,i=n.replace(/^https?\:\/\//,"");return r()("div",{className:t},void 0,i)}var a=n(3),r=n.n(a),s=n(1);
n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(n.i(c.a)(),n.i(u.a)(),function(e,t){return{machineIdentifier:e.machineIdentifier,isRefreshing:!!t}})}function a(e){return s.a.createElement(d.a,e)}var r=n(1),s=n.n(r),o=n(15),l=n(9),c=(n.n(l),n(63)),u=n(349),d=n(1876);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(n.i(p.a)(),function(e){return{isRefreshing:!!e}})}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),
n(15)),h=n(9),p=(n.n(h),n(349)),f=n(85),g=n(183),m=15e3,v=18e5,y={fetchProviders:f.fetchProviders,repopulatePage:g.b},b=function(e){function t(){var n,i,a;r()(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=o()(this,e.call.apply(e,[this].concat(l))),i._repopulateProgramGuide=function(){i.props.isRefreshing&&i.props.fetchProviders({serverEntityID:i.props.serverEntityID}),i.props.repopulatePage(),i._setRepopulateTimeout()},a=n,o()(i,a)}return c()(t,e),t.prototype.componentWillMount=function(){
this._setRepopulateTimeout()},t.prototype.componentWillReceiveProps=function(e){e.isRefreshing!==this.props.isRefreshing&&this._setRepopulateTimeout()},t.prototype.componentWillUnmount=function(){this._clearRepopulateTimeout()},t.prototype._setRepopulateTimeout=function(){this._clearRepopulateTimeout();var e=m;this.props.isRefreshing||(e=Math.ceil(Date.now()/v)*v-Date.now()),this._repopulateTimeoutID=setTimeout(this._repopulateProgramGuide,e)},t.prototype._clearRepopulateTimeout=function(){this._repopulateTimeoutID&&clearTimeout(this._repopulateTimeoutID);
},t.prototype.render=function(){return null},t}(u.Component);t.a=n.i(d.b)(i,y)(b)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(7),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=(n.n(p),n(14)),g=n(25),m=n(117),v=n(1877),y=n(2429),b=n.n(y),S="dvrSetup",w=function(e){function t(){var i,a,r;l()(this,t);for(var o=arguments.length,c=Array(o),d=0;d<o;d++)c[d]=arguments[d];return i=a=u()(this,e.call.apply(e,[this].concat(c))),a.onModalClose=function(){var e=n.i(f.a)("metrics");
e.trackClick(s()({},a.props.metricsProperties,{page:S,action:"dismiss"})),a.props.onModalClose()},r=i,u()(a,r)}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.dvrID,i=e.isOpen,r=e.metricsProperties;return a()(m.a,{className:b.a.modal,isOpen:i,metricsPage:S,metricsProperties:r,onModalClose:this.onModalClose},void 0,a()(v.a,{serverEntityID:t,dvrID:n,onModalClose:this.onModalClose}))},t}(p.Component);
t.a=w},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(15)),p=n(4),f=n(23),g=n(77),m=n(51),v=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onNextStepPress=function(){i.props.dvrSetupNextStep({dvrID:i.props.dvrID})},a=n,l()(i,a)}return u()(t,e),t.prototype.render=function(){return a()(m.a,{kind:f.c.PRIMARY,
size:f.d.MEDIUM,isDisabled:this.props.isDisabled,onPress:this.onNextStepPress},void 0,n.i(p.default)("Continue"))},t}(d.Component);v.defaultProps={isDisabled:!1},t.a=n.i(h.b)(null,{dvrSetupNextStep:g.dvrSetupNextStep})(v)},function(e,t,n){"use strict";function i(e){var t=e.isScanning,i=e.isCancelling,a=e.kind,s=e.onScanDeviceChannelsPress,u=e.onCancelScanDeviceChannelsPress;return r()(c.a,{kind:a,size:l.d.MEDIUM,isSpinning:i,onPress:t?u:s},void 0,t?n.i(o.default)("Stop scanning"):n.i(o.default)("Scan channels"));
}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(23),c=n(97);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(26),f=n(360),g=n(503),m=n(825),v=n(2432),y=n.n(v),b=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onSelectDevicePress=function(){i.props.onSelectDevicePress(i.props.deviceID)},a=n,l()(i,a);
}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,i=e.model,r=e.uri,s=e.channelCount,o=e.isSelectable,l=e.isSelected,c=e.includeUri,u=e.includeChannelCount,d=void 0;return d=1===s?n.i(h.default)("1 channel"):s>1?n.i(h.default)("{1} channels",s):n.i(h.default)("No channels"),a()("div",{className:t},void 0,o&&a()(p.a,{onPress:this.onSelectDevicePress},void 0,a()("div",{className:y.a.deviceImageContainer},void 0,a()(g.a,{model:i}),l&&a()(f.a,{className:y.a.selectButton,component:"div",
title:i,isSelected:!0,isDisabled:!0}))),!o&&a()(g.a,{model:i}),a()("div",{className:y.a.details},void 0,a()("div",{className:y.a.model},void 0,i),c&&a()(m.a,{className:y.a.uri,uri:r}),u&&a()("div",{className:y.a.channelCount},void 0,d)))},t}(d.Component);b.defaultProps={includeUri:!1,includeChannelCount:!1,isSelectable:!1},t.a=b},function(e,t,n){"use strict";function i(e){var t=p()(e).sort(y.a);return t.reduce(function(t,n){var i;return t.push((i={},i[n]=e[n],i)),t},[{"":n.i(v.default)("Select Channel")
}])}var a=n(3),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(66),p=n.n(h),f=n(1),g=(n.n(f),n(28)),m=n.n(g),v=n(4),y=n(450),b=n(23),S=n(290),w=n(162),M=n(497),I=n(227),C=n(2439),D=n.n(C),T=function(e){function t(n,i){o()(this,t);var a=c()(this,e.call(this,n,i));return a.onSelectPress=function(e){a.setState({showSelectOptions:!0})},a.onEnabledChange=function(e){a.setState({enabled:e},function(){a.props.onChange({enabled:e,lineupIdentifier:a.state.lineupIdentifier})})},a.onLineupChannelChange=function(e){
a.setState({lineupIdentifier:e},function(){a.props.onChange({enabled:a.state.enabled,lineupIdentifier:e})})},a.state={enabled:n.initialValue.enabled,lineupIdentifier:n.initialValue.lineupIdentifier,showSelectOptions:!1},a}return d()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.state,n=t.enabled,i=t.lineupIdentifier,a=e.value,r=a.enabled,s=a.lineupIdentifier;n===r&&i===s||this.setState(this.props.value)},t.prototype.shouldComponentUpdate=function(e,t){return t.enabled!==this.state.enabled||(t.lineupIdentifier!==this.state.lineupIdentifier||(t.showSelectOptions!==this.state.showSelectOptions||(e.deviceIdentifier!==this.props.deviceIdentifier||(e.channelName!==this.props.channelName||(e.initialValue.enabled!==this.props.initialValue.enabled||(e.initialValue.lineupIdentifier!==this.props.initialValue.lineupIdentifier||(e.value.enabled!==this.props.value.enabled||(e.value.lineupIdentifier!==this.props.value.lineupIdentifier||e.lineupChannels!==this.props.lineupChannels))))))));
},t.prototype.render=function(){var e,t=this.props,a=t.deviceIdentifier,s=t.channelName,o=t.drm,l=t.isChannelMissing,c=t.lineupChannels,u=this.state,d=u.enabled,h=u.lineupIdentifier;return l?null:r()("div",{className:D.a.channelMapping},void 0,r()("div",{className:D.a.deviceInfo},void 0,r()("div",{className:D.a.channelEnabled},void 0,!o&&r()(M.a,{name:a+"Check",value:d,onChange:this.onEnabledChange})),r()("label",{className:m()(D.a.deviceIdentifier,!d&&D.a.mappingDisabled),htmlFor:a+"Check"},void 0,a),r()("div",{
className:m()(D.a.channelName,!d&&D.a.mappingDisabled)},void 0,s)),o?r()("div",{className:D.a.drmChannel},void 0,r()(S.a,{className:D.a.drmChannelBadge},void 0,n.i(v.default)("Protected"))):r()("div",{className:D.a.epgChannel},void 0,r()(I.a,{name:a+"Select",value:h,values:this.state.showSelectOptions?i(c):[(e={},e[h]=c[h],e)],size:b.d.SMALL,isDisabled:!d,onMouseDown:this.onSelectPress,onTouchStart:this.onSelectPress,onChange:this.onLineupChannelChange})))},t}(f.Component);f.PropTypes.shape({enabled:f.PropTypes.bool.isRequired,
lineupIdentifier:f.PropTypes.string});t.a=n.i(w.a)(T)},function(e,t,n){"use strict";function i(e){var t=e.allChannelMappingsEnabled,i=e.allChannelMappingsDisabled,a=e.onAllChannelMappingsEnabledChange,s=null;return t?s=!0:i&&(s=!1),r()("div",{className:u.a.container},void 0,r()("div",{className:u.a.deviceChannels},void 0,r()(l.a,{name:"toggleAll",value:s,onChange:a}),r()("div",{className:u.a.deviceChannelsPadding}),r()("div",{},void 0,n.i(o.default)("Device Channels"))),r()("div",{className:u.a.guideChannels
},void 0,n.i(o.default)("Guide Channels")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(497),c=n(2441),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){var t=function(t){function n(e,i){c()(this,n);var a=d()(this,t.call(this,e,i));return a.onFormStateChange=function(e){var t=!0,n=!0;o()(e).forEach(function(i){e[i].value.enabled?n=!1:t=!1}),a.setState({formState:e,allChannelMappingsEnabled:t,allChannelMappingsDisabled:n})},a.onAllChannelMappingsEnabledChange=function(e){a.setState(function(t){
var n={};return o()(t.formState).forEach(function(i){var a=t.formState[i].value;a.enable===e?n[i]=t.formState[i]:n[i]=r()({},t.formState[i],{value:{enabled:e,lineupIdentifier:a.lineupIdentifier}})}),{formState:n,allChannelMappingsEnabled:e,allChannelMappingsDisabled:!e}})},a.state={formState:{},allChannelMappingsEnabled:!1,allChannelMappingsDisabled:!1},a}return p()(n,t),n.prototype.render=function(){var t=this.state,n=t.allChannelMappingsEnabled,i=t.allChannelMappingsDisabled;return g.a.createElement(e,r()({
formState:this.state.formState,allChannelMappingsEnabled:n,allChannelMappingsDisabled:i,onFormStateChange:this.onFormStateChange,onAllChannelMappingsEnabledChange:this.onAllChannelMappingsEnabledChange},this.props))},n}(f.Component);return t.displayName="DeviceChannelMappingsForm("+n.i(m.a)(e)+")",t.WrappedComponent=e,t}var a=n(7),r=n.n(a),s=n(66),o=n.n(s),l=n(11),c=n.n(l),u=n(13),d=n.n(u),h=n(12),p=n.n(h),f=n(1),g=n.n(f),m=n(273);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),
n(25)),p=n(1893),f={visibility:"hidden"},g={visibility:"visible"},m=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onListReady=function(){++a._readyCount===a._initialCount&&a.setState({isReady:!0})},a.state={isReady:!1},a._readyCount=0,a}return u()(t,e),t.prototype.componentWillMount=function(){this._initialCount=this.props.hubEntityIDs.length},t.prototype.componentWillReceiveProps=function(e){var t=e.hubEntityIDs.length,n=this.props.hubEntityIDs.length;this.state.isReady||t===n||(this._initialCount=t,
this._readyCount===t&&this.setState({isReady:!0}))},t.prototype.shouldComponentUpdate=function(e,t){return n.i(h.a)(this,e,t)},t.prototype.render=function(){var e=this,t=this.props,n=t.className,i=t.serverEntityID,r=t.providerEntityID,s=t.hubEntityIDs,o=t.columnAdjustment,l=this.state.isReady;return a()("div",{className:n,style:l?g:f},void 0,s.map(function(t){return a()(p.a,{serverEntityID:i,providerEntityID:r,hubEntityID:t,columnAdjustment:o,onListReady:e.onListReady},t)}))},t}(d.Component);t.a=m;
},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.metadataItemEntityID,a=e.onRecordingModify,s=e.onModalClose,l=c()(e,["isOpen","metricsProperties","metadataItemEntityID","onRecordingModify","onModalClose"]);return o()(h.a,{isOpen:t,metricsPage:"dvrAiringDetails",metricsProperties:n,onModalClose:s},void 0,d.a.createElement(p.a,r()({metadataItemEntityID:i,onRecordingModify:a,onModalClose:s},l)))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(117),p=n(1916);
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.name,n=e.labelText,i=c()(e,["name","labelText"]);return o()("div",{},void 0,o()(f.a,{name:t},void 0,n),d.a.createElement(g.a,r()({name:t,size:h.d.SMALL},i)))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(23),p=n(162),f=n(90),g=n(227);t.a=n.i(p.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.type,i=e.width,a=e.height;return r()(c.a,{className:l()(t,d.a.placeholderIcon),type:n,width:i,height:a
})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(28)),l=n.n(o),c=n(1930),u=n(2464),d=n.n(u);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(2468)),p=n.n(h),f=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.state={progress:n.progress},a}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){this.setState({progress:e.progress})},t.prototype.render=function(){var e=this.props.className,t=this.state.progress;
return a()("div",{className:e},void 0,a()("div",{className:p.a.progressTrack}),a()("div",{style:{transform:"translate3d(-"+(100-t)+"%, 0, 0)"},className:p.a.progressBar}))},t}(d.Component);f.defaultProps={progress:p.a.progress},t.a=f},function(e,t,n){"use strict";function i(e){var t=e.beginsAt,i=e.endsAt,a=e.channel,r=e.showChannel,s=e.showFullTime,o=e.timeFormat;if(!t)return n.i(p.default)("No upcoming airings");if(n.i(m.a)(t,i))return n.i(b.a)(i-Date.now()/1e3);if(n.i(f.a)(t)&&n.i(g.a)(t,{minutes:60
})){var l=n.i(S.a)(1e3*t-Date.now());return n.i(p.default)("Starts in {duration}",{duration:l})}var c=s?v.a:y.a;return c(t,r&&a,{timeFormat:o})}var a=n(3),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=(n.n(h),n(4)),f=n(688),g=n(689),m=n(445),v=n(681),y=n(1213),b=n(211),S=n(177),w=n(25),M=n(108),I=n(2471),C=n.n(I),D=function(e){function t(n,i){o()(this,t);var a=c()(this,e.call(this,n,i));return a.tick=function(){a.setState(a.getState(a.props)),a.setTickTimeout()},a.state=a.getState(n),
a}return d()(t,e),t.prototype.componentWillMount=function(){this.setTickTimeout()},t.prototype.componentWillReceiveProps=function(e,t){this.setState(this.getState(e))},t.prototype.shouldComponentUpdate=function(e,t){return n.i(w.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this.tickTimeout&&clearTimeout(this.tickTimeout)},t.prototype.getState=function(e){return{title:i(e)}},t.prototype.setTickTimeout=function(){this.tickTimeout=setTimeout(this.tick,6e4-Date.now()%6e4)},t.prototype.render=function(){
var e=this.props,t=e.className,i=e.beginsAt,a=e.endsAt,s=e.channel,o=e.showChannel,l=this.state.title,c=o&&!!s&&n.i(m.a)(i,a);return r()("span",{className:t},void 0,c?r()("span",{},void 0,n.i(p.default)("Now on {1}",s),r()(M.a,{className:C.a.separator}),l):l)},t}(h.Component);D.defaultProps={showFullTime:!1,showChannel:!1},t.a=D},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){return e.experienceSettings.timeFormat},n.i(s.a)(),n.i(o.a)(),function(e,t,n){return{beginsAt:t&&t.beginsAt,
endsAt:t&&t.endsAt,channel:n&&n.tag,timeFormat:e}})}var a=n(15),r=n(9),s=(n.n(r),n(281)),o=n(782),l=n(840);t.a=n.i(a.b)(i)(l.a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{skipChildren:e.skipChildren,childCount:e.childCount,leafCount:e.leafCount}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1943);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e,t){return n.i(r.createSelector)(n.i(s.a)(),function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{rating:e.rating,ratingImage:e.ratingImage,audienceRating:e.audienceRating,audienceRatingImage:e.audienceRatingImage}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1948);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e,t){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration;return{duration:t}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(515);t.a=n.i(a.b)(i)(o.a);
},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.leafCount,a=void 0;return null!=i&&(a=1===i?n.i(o.default)("{1} episode",i):n.i(o.default)("{1} episodes",i)),r()("span",{className:t},void 0,a)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(2474),c=n.n(l);i.defaultProps={className:c.a.episodeCount},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.index;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";
function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{leafCount:e.leafCount}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1956);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e,t){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{lastViewedAt:e.lastViewedAt}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1957);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){
"use strict";function i(e){var t=e.className,i=e.duration,a=e.viewOffset,s=void 0;if(i&&a){var l=(i-a)/1e3;l&&(s=n.i(o.a)(l))}return r()("span",{className:t},void 0,s)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(211));t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{duration:e.duration,viewOffset:e.viewOffset}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(849);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){
"use strict";function i(e,t){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration;return{duration:t}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1961);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e,t){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.originallyAvailableAt;return{originallyAvailableAt:t}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1964);
t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.tabIndex,a=e.title,s=e.index,c=e.route,p=e.parentTitle,f=e.parentIndex,g=e.parentRoute,m=e.originallyAvailableAt,v=n.i(o.a)({seasonIndex:f,noLeadingZero:!0}),y=n.i(l.a)({episodeIndex:s,date:m,noLeadingZero:!0});return c&&g?r()("span",{className:t},void 0,s>0&&r()(u.a,{tabIndex:i,title:p,to:g},void 0,v),s>0&&h,r()(u.a,{tabIndex:i,title:a,to:c},void 0,y)):r()("span",{className:t},void 0,s>0&&r()("span",{},void 0,v),s>0&&d,r()("span",{},void 0,y));
}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(1238)),l=n(265),c=n(108),u=n(26),d=r()(c.a,{separator:"\xb7"}),h=r()(c.a,{separator:"\xb7"});t.a=i},function(e,t,n){"use strict";function i(e,t){var n=Math.abs(Date.now()-1e3*e),i=1e3,a=60*i,r=60*a,s=24*r;return n<r?setTimeout(t,a):n<s?setTimeout(t,r):void 0}var a=n(3),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=(n.n(h),n(126)),f=function(e){function t(a,r){o()(this,t);var s=c()(this,e.call(this,a,r));g.call(s);var l=s.props.timestamp,u=n.i(p.a)(l);
return s.state={title:u},s.timeoutID=i(l,s.trackTime),s}return d()(t,e),t.prototype.componentWillUnmount=function(){this.timeoutID&&(this.timeoutID=clearTimeout(this.timeoutID))},t.prototype.render=function(){var e=this.props.className,t=this.state.title;return r()("span",{className:e},void 0,t)},t}(h.Component),g=function(){var e=this;this.trackTime=function(){var t=e.props.timestamp,a=n.i(p.a)(t);e.setState({title:a}),e.timeoutID=i(t,e.trackTime)}};t.a=f},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.year;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";function i(e,t){return!!g.a.find(e,function(e){return t[e]})}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(11),c=n.n(l),u=n(13),d=n.n(u),h=n(12),p=n.n(h),f=n(2),g=n.n(f),m=n(1),v=n.n(m),y=n(4),b=n(25),S=n(1912),w=n(858),M=n(859),I=n(857),C=n(860),D=n(372),T=["showOptimize"],x=function(e){function t(n,i){c()(this,t);var a=d()(this,e.call(this,n,i));return a.onPlayAllPress=function(e){
a.props.playMetadataList(a._getActionPayload())},a.onShufflePress=function(e){a.props.shuffleMetadataList(a._getActionPayload())},a.onAddToPlaylistPress=function(e){a.props.addMetadataListToPlaylist(a._getActionPayload())},a.onSyncPress=function(e){a.props.syncMetadataList(a._getActionPayload())},a.onActionsPress=function(e){a.setState({isActionsMenuOpen:!a.state.isActionsMenuOpen})},a.onActionsMenuClose=function(){a.setState({isActionsMenuOpen:!1})},a.state={isActionsMenuOpen:!1},a}return p()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return n.i(b.a)(this,e,t)},t.prototype._getActionPayload=function(){return{metadataListEntityID:this.props.metadataListEntityID}},t.prototype.render=function(){var e=this.props,t=e.showPlayAll,a=e.showShuffle,s=e.showAddToPlaylist,l=e.showSync,c=this.state.isActionsMenuOpen,u=i(T,this.props);return o()("div",{},void 0,t&&o()(w.a,{playLabel:n.i(y.default)("Play All"),onPress:this.onPlayAllPress}),a&&o()(M.a,{onPress:this.onShufflePress}),s&&o()(I.a,{
onPress:this.onAddToPlaylistPress}),l&&o()(C.a,{onPress:this.onSyncPress}),u&&v.a.createElement(D.a,{ref:"moreButton",icon:"plex-icon-toolbar-more-560",label:n.i(y.default)("More..."),isMenuOpen:c,onPress:this.onActionsPress}),v.a.createElement(S.a,r()({target:this.refs.moreButton,isOpen:c,onMenuClose:this.onActionsMenuClose},this.props,{showPlayAll:!1,showShuffle:!1,showAddToPlaylist:!1,showSync:!1})))},t}(m.Component);t.a=x},function(e,t,n){"use strict";function i(e){return c.a.createElement(h.a,r()({
tooltip:n.i(u.default)("Add to Playlist")},e),o()(d.a,{name:"plex-icon-toolbar-add-to-playlist-560","aria-label":n.i(u.default)("Add to Playlist")}))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(30),h=n(228);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.playLabel,i=void 0===t?n.i(h.default)("Play"):t,a=c()(e,["playLabel"]);return d.a.createElement(f.a,r()({tooltip:i},a),o()(p.a,{name:"plex-icon-toolbar-play-560","aria-label":i}))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(4),p=n(30),f=n(228);
t.a=i},function(e,t,n){"use strict";function i(e){return c.a.createElement(h.a,r()({tooltip:n.i(u.default)("Shuffle")},e),o()(d.a,{name:"plex-icon-toolbar-shuffle-560","aria-label":n.i(u.default)("Shuffle")}))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(30),h=n(228);t.a=i},function(e,t,n){"use strict";function i(e){return c.a.createElement(h.a,r()({tooltip:n.i(u.default)("Sync")},e),o()(d.a,{name:"plex-icon-toolbar-sync-560","aria-label":n.i(u.default)("Sync")}))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(30),h=n(228);
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className;return r()("div",{className:t})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2481)),l=n.n(o);i.defaultProps={className:l.a.pageHeaderDivider},t.a=i},function(e,t,n){"use strict";function i(){return n.i(u.createSelector)(function(e,t){var n=t.directoryKey;return n},n.i(d.a)(),function(e,t){var n=!1,i=void 0;return e?i=s.a.find(t,function(t){return t.hubKey===e?(n=!0,!0):t.key===e}):(i=s.a.first(t),n=!(!i||!i.hubKey)),{isHubKey:n,selectedDirectory:i
}})}function a(e){return l.a.createElement(h.a,e)}var r=n(2),s=n.n(r),o=n(1),l=n.n(o),c=n(15),u=n(9),d=(n.n(u),n(255)),h=n(1983);t.a=n.i(c.b)(i)(a)},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(2),h=n.n(d),p=n(1),f=n.n(p),g=n(15),m=n(9),v=(n.n(m),n(258)),y=n(673),b=n(325),S=n(76),w=n(134),M=n(2006),I=n.i(m.createSelector)(v.a,function(e){return!!h.a.findWhere(e,{isDownForMaintenance:!0})}),C=n.i(m.createSelector)(v.a,function(e){return!!h.a.findWhere(e,{
hasFailedResources:!0})}),D=n.i(m.createStructuredSelector)({outOfDateServers:y.a,isDownForMaintenance:I,hasFailedResources:C,hasPlexPass:function(e){return e.user.hasPlexPass},isUserRestricted:function(e){return!!e.user.restricted},canProvisionPersonalCloudServer:b.a}),T={onDownloadServer:S.d,showProvisionPersonalCloudServerModal:w.a},x=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(o))),
i.onLinkPersonalCloudServerPress=function(e){i.props.showProvisionPersonalCloudServerModal({open:!0})},a=n,l()(i,a)}return u()(t,e),t.prototype.render=function(){return f.a.createElement(M.a,a()({},this.props,{onLinkPersonalCloudServerPress:this.onLinkPersonalCloudServerPress}))},t}(p.Component);t.a=n.i(g.b)(D,T)(x)},function(e,t,n){"use strict";function i(){return r()(u.a,{title:n.i(o.default)("You must be lost"),description:n.i(o.default)("We can't find the page you're looking for")},void 0,r()(c.a,{
to:"#",kind:l.c.PRIMARY},void 0,n.i(o.default)("Go Home")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(23),c=n(26),u=n(118);t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(28),y=n.n(v),b=n(25),S=n(359),w=n(2499),M=n.n(w),I=function(e){function t(){return u()(this,t),h()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(b.a)(this,e,t);
},t.prototype.render=function(){var e=this.props,t=e.title,n=e.isSelected,i=l()(e,["title","isSelected"]);return m.a.createElement(S.a,a()({className:M.a.menuButton,isSelected:n},i),s()("span",{className:y()(M.a.menuButtonLabel,n&&M.a.isSelected)},void 0,t))},t}(g.Component);I.defaultProps={isSelected:!1},t.a=I},function(e,t,n){"use strict";function i(e){switch(e){case h.a:return g.a;case h.b:return m.a;default:return f.a}}function a(e){var t=e.children,a=e.serverEntityID,r=e.providerEntityID,o=e.metadataListEntityID,l=e.listTitle,d=e.listType,h=e.listContext,f=e.listStyle,g=e.activeSort,m=e.selectedSort,S=e.metadataItemEntityIDs,M=e.totalSize,I=e.populatedRange,C=e.firstItemType,D=e.isPending,T=e.isPopulated,x=e.error,P=e.columnAdjustment,E=e.hasHeader,A=e.hasGutter,L=e.onPageRequest,k=e.onListScrollIndexChange,N=e.onListUpdate,_=e.onMeasure,O=e.scrollIndex,R=M||S.length;
if(T&&R){var j=d||C,z=i(f);return s()(z,{className:c()(w.a.metadataListPageContent,E&&w.a.hasHeader),scrollerClassName:c()(w.a.metadataListScroller,A&&w.a.hasGutter),serverEntityID:a,providerEntityID:r,metadataListEntityID:o,listType:j,listContext:h,activeSort:g,selectedSort:m,scrollIndex:O,scrollPositionStorageKey:"MetadataListPageContent",keyPropName:"metadataItemEntityID",items:S,itemsOffset:I.start,size:R,columnAdjustment:P,onPageRequest:L,onListScrollIndexChange:k,onListUpdate:N,onMeasure:_},void 0,t);
}return D?s()(v.a,{},void 0,s()(y.a,{},void 0,s()(p.a,{label:l?n.i(u.default)("Loading {1}",l):n.i(u.default)("Loading list")}))):x?s()(v.a,{},void 0,s()(b.a,{title:l?n.i(u.default)("There was an unexpected error loading {1}",l):n.i(u.default)("There was an unexpected error loading this list")})):s()(v.a,{},void 0,s()(y.a,{title:n.i(u.default)("Nothing to see here"),description:l?n.i(u.default)("There are no items in {1}",l):n.i(u.default)("There are no items in this list")}))}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),
n(28)),c=n.n(l),u=n(4),d=(n(472),n(48)),h=n(203),p=n(41),f=n(1908),g=n(1900),m=n(1899),v=n(231),y=n(164),b=n(199),S=n(2506),w=n.n(S);a.defaultProps={listContext:d.c,listStyle:h.c},t.a=a},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className;return r()("div",{className:n},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2513)),l=n.n(o);i.defaultProps={className:l.a.group},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,i=e.provider,a=e.librarySectionKey,s=e.tags,c=e.limit;
return s&&s.length?r()("span",{},void 0,s.map(function(e,u){if(!(u>=c)){var d={filters:e.filter,filterLabel:e.tag};return r()("span",{},u,r()(l.a,{to:n.i(o.a)(t,i,a,d)},void 0,e.tag),u+1<c&&u+1<s.length&&", ")}})):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(80),n(79),n(165)),l=n(26);i.defaultProps={limit:1/0},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.beginsAt,a=e.endsAt,s=e.channel,u=e.timeFormat;if(!i||!a)return null;var d=Date.now()/1e3,h=void 0;return h=a<d?n.i(o.default)("Aired"):i<=d&&a>=d?n.i(o.default)("Airing"):n.i(o.default)("Airs"),
r()(c.a,{label:h},void 0,r()(l.a,{beginsAt:i,endsAt:a,channel:s,showFullTime:!0,showChannel:!0,timeFormat:u}),t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(840),c=n(524);t.a=i},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e){return e.experienceSettings.timeFormat},n.i(o.a)(),n.i(l.a)(),function(e,t,n){return{beginsAt:t&&t.beginsAt,endsAt:t&&t.endsAt,channel:n&&n.tag,timeFormat:e}})}var a=n(1),r=(n.n(a),n(15)),s=n(9),o=(n.n(s),n(281)),l=n(782),c=n(869);t.a=n.i(r.b)(i)(c.a);
},function(e,t,n){"use strict";function i(){return n.i(S.createSelector)(function(e,t){var n=t.linkedKey;return n},D.a,function(e,t){var i={isLibraryProvider:!0,identifer:I.a.LIBRARY_PROVIDER_IDENTIFIER};return n.i(E.a)(t,i,e)})}function a(){return n.i(S.createSelector)(function(e,t){var n=t.serverEntityID;return n},function(e,t){var n=t.mediaSubscriptionID;return n},function(e,t){var n=t.status;return n},function(e){return e.experienceSettings.timeFormat},i(),n.i(T.a)(),n.i(x.a)(),function(e,t,i,a,r,s,o){
var l=n.i(w.a)(M.a,t,e),c=i===C.a.COMPLETE,u=i===C.a.ERROR,d=m.a.pick(s,"type","title","grandparentTitle","index","parentIndex","originallyAvailableAt");return f()({mediaSubscriptionEntityID:l,prePlayRoute:r,isRecording:!!o,recordingProgress:o&&o.progress,isComplete:c,hasError:u,hasSubscription:!!t,showPlay:c&&!!r,timeFormat:a},d)})}var r=n(17),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(7),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=n.n(v),b=n(15),S=n(9),w=(n.n(S),n(65)),M=n(67),I=n(72),C=n(648),D=n(58),T=n(29),x=n(1565),P=n(279),E=n(86),A=function(e){
function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onPlayPress=function(e){i.props.playRecording({serverEntityID:i.props.serverEntityID,linkedKey:i.props.linkedKey})},a=n,u()(i,a)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.component,n=(e.mediaSubscriptionID,e.status,e.linkedKey,s()(e,["component","mediaSubscriptionID","status","linkedKey"]));return y.a.createElement(t,f()({},n,{
onPlayPress:this.onPlayPress}))},t}(v.Component);t.a=n.i(b.b)(a,{playRecording:P.playRecording})(A)},function(e,t,n){"use strict";function i(e){var t=e.subscriptionCount;return r()(l.a,{icon:"plex-icon-calendar-560",title:n.i(o.default)("You have no recordings scheduled"),description:1===t?n.i(o.default)("There are no upcoming airings of the item in your list"):n.i(o.default)("There are no upcoming airings of the {1} items in your list",t)})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(164);t.a=i;
},function(e,t,n){"use strict";function i(e){var t=e.error,n=e.onPress;return r()(u.a,{className:h.a.errorButton,component:c.a,tooltip:t,tooltipClassName:h.a.errorTooltip,tooltipAttachment:o.e.MIDDLE_RIGHT,onPress:n},void 0,r()(l.a,{name:"plex-icon-alert-560","aria-label":t}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(23)),l=n(30),c=n(26),u=n(502),d=n(2541),h=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){var t=c.a.unix(e);return n.i(d.default)("{month} {dayNumber}",{month:n.i(h.a)(e),dayNumber:t.date()
})}function a(e){var t=c.a.unix(e);return n.i(d.default)("{month} {dayNumber}, {year}",{month:n.i(h.a)(e),dayNumber:t.date(),year:t.year()})}function r(e){var t=e.startTime,n=e.endTime,r=c.a.unix(t),s=c.a.unix(n),l=r.isSame(s,"day")?a(t):i(t)+" \u2013 "+a(n);return o()("span",{className:f.a.title},void 0,l)}var s=n(3),o=n.n(s),l=n(43),c=n.n(l),u=n(1),d=(n.n(u),n(4)),h=n(686),p=n(2544),f=n.n(p);t.a=r},function(e,t,n){"use strict";function i(){return n.i(p.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar.scheduled;
},n.i(f.a)(),function(e,t){return o.a.find(e,function(e){return c.a.unix(e.beginsAt).isAfter()&&e.mediaSubscriptionID===t.key})})}function a(){return n.i(p.createSelector)(function(e){return e.experienceSettings.timeFormat},n.i(f.a)(),i(),function(e,t,n){var i=o.a.pick(t.target,"title","grandparentTitle","type","year","index","parentIndex","originallyAvailableAt","thumb","grandparentThumb");return n&&(i.beginsAt=n.beginsAt,i.endsAt=n.endsAt),i.timeFormat=e,i})}function r(e){return d.a.createElement(g.a,e);
}var s=n(2),o=n.n(s),l=n(43),c=n.n(l),u=n(1),d=n.n(u),h=n(15),p=n(9),f=(n.n(p),n(1206)),g=n(2088);t.a=n.i(h.b)(a)(r)},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.className,a=e.closedNode,s=e.errorMessage,o=e.isOpen,f=e.onErrorDismiss,m=e.onTogglePress;return r()(d.a,{className:l()(o?g.a.isOpen:g.a.isClosed,i),errorMessage:s,onErrorDismiss:f,onPress:o?null:m},void 0,r()(h.a,{},void 0,o&&r()(p.a,{kind:u.PRIMARY,onPress:m},void 0,n.i(c.default)("Cancel")),!o&&r()(p.a,{kind:u.PRIMARY
},void 0,n.i(c.default)("Edit"))),o?t:a)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(28)),l=n.n(o),c=n(4),u=n(132),d=n(537),h=n(538),p=n(26),f=n(2554),g=n.n(f);t.a=i},function(e,t,n){"use strict";function i(e){return r.a.createElement(c.a,e)}var a=n(1),r=n.n(a),s=n(15),o=n(85),l=n(1205),c=n(2107),u={restartPersonalCloudServer:o.restartPersonalCloudServer};t.a=n.i(s.b)(l.a,u)(i)},function(e,t,n){"use strict";function i(e){return r()("div",{className:c.a.spinnerContainer},void 0,u)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(41)),l=n(2560),c=n.n(l),u=r()(o.a,{});t.a=i},function(e,t,n){"use strict";function i(){return n.i(u.createSelector)(n.i(d.a)(),function(e){var t=e.metadataItem;return{metadataItemEntityID:t,isMetadataItem:!!t}})}function a(e){var t=e.component,n=s()(e,["component"]);return l.a.createElement(t,n)}var r=n(17),s=n.n(r),o=n(1),l=n.n(o),c=n(15),u=n(9),d=(n.n(u),n(223));t.a=n.i(c.b)(i)(a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),n.i(c.a)(),function(e,t){
var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],a=i||n.tagItem;return{server:e,provider:t,reasonID:n.reasonID,reason:n.reason,reasonTitle:n.reasonTitle,originalTitle:a.originalTitle,filter:a.filter,librarySectionID:a.librarySectionID,librarySectionKey:a.librarySectionKey,librarySectionType:a.librarySectionType}})}var a=n(15),r=n(9),s=(n.n(r),n(58)),o=n(62),l=n(223),c=n(29),u=n(2150);t.a=n.i(a.b)(i)(u.a)},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(p.a,f.a,n.i(g.a)(),function(e,t){
var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=l.a.pick(n.tagItem,"id","tag","tagType","librarySectionType","librarySectionKey");return s()({server:e,provider:t,reasonID:n.reasonID},i)})}function a(e){return u.a.createElement(m.a,e)}var r=n(7),s=n.n(r),o=n(2),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(9),p=(n.n(h),n(58)),f=n(62),g=n(223),m=n(2153);t.a=n.i(d.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.icon,a=e.title,s=e.showSpinner,l=c()(e,["className","children","icon","title","showSpinner"]);
return d.a.createElement(f.a,r()({className:t},l),o()("div",{className:m.a.container},void 0,o()("div",{className:m.a.icon},void 0,s?o()(p.a,{className:m.a.spinner}):o()(h.a,{name:i})),o()("div",{className:m.a.title},void 0,a),n&&o()("div",{className:m.a.children},void 0,n)))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(30),p=n(41),f=n(26),g=n(2585),m=n.n(g);i.defaultProps={className:m.a.sidebarLink},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;
return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2587)),l=n.n(o);i.defaultProps={className:l.a.sidebarListItem},t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(28)),p=n.n(h),f=n(4),g=n(25),m=n(30),v=n(2592),y=n.n(v),b=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.className,i=e.isConnected,r=e.isUnavailable,s=e.isSecure,o=e.isRelayed;return o?a()(m.a,{className:p()(t,y.a.warningIcon),name:"plex-icon-alert-round-560","aria-label":n.i(f.default)("Indirect")}):r?a()(m.a,{className:p()(t,y.a.alertIcon),name:"plex-icon-alert-560","aria-label":n.i(f.default)("Unavailable")}):s&&i?a()(m.a,{className:p()(t,y.a.secureIcon),name:"plex-icon-lock-560","aria-label":n.i(f.default)("Secure")}):null},t}(d.Component);t.a=b},function(e,t,n){"use strict";
var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(28),y=n.n(v),b=n(25),S=n(115),w=n(936),M=n.n(w),I=function(e){function t(){return u()(this,t),h()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(b.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.machineIdentifier,i=e.title,r=e.details,o=e.to,c=e.children,u=l()(e,["className","machineIdentifier","title","details","to","children"]);
return m.a.createElement(S.a,a()({className:y()(t,M.a.serverMenuItem),"data-qa-id":"serverMenuItem--"+n,to:o},u),s()("div",{className:M.a.serverMenuItemContainer},void 0,s()("div",{className:M.a.serverMenuTitle},void 0,s()("div",{className:M.a.serverMenuFriendlyName},void 0,i),s()("div",{className:M.a.serverMenuDetails},void 0,r)),s()("div",{className:M.a.serverMenuIconContainer},void 0,c)))},t}(g.Component);t.a=I},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(17),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(26),m=n(30),v=n(2593),y=n.n(v),b=function(e){
function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.icon,n=e.title,i=s()(e,["icon","title"]);return f.a.createElement(g.a,i,a()(m.a,{name:t,label:n}))},t}(p.Component);b.defaultProps={className:y.a.sidebarIconButton},t.a=b},function(e,t,n){"use strict";function i(e){var t=e.img,n=e.title,i=e.description;return r()("div",{className:l.a.feature},void 0,r()("div",{className:l.a.featurePadding},void 0,r()("img",{className:l.a.featureImage,
src:t}),r()("div",{className:l.a.featureContainer},void 0,r()("div",{className:l.a.featureTitle},void 0,n),r()("div",{className:l.a.featureDescription},void 0,i))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2600)),l=n.n(o);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="RECORDING_PRIORITY_SUBSCRIPTION"},function(e,t,n){"use strict";function i(e){if(!e)return n.i(d.default)("Username is required")}function a(e){if(!e)return n.i(d.default)("Email address is required")}function r(e){
if(!e)return n.i(d.default)("Password is required")}function s(e){if(!e)return n.i(d.default)("Password confirmation is required")}function o(e){if(!e)return n.i(d.default)("Current password is required")}function l(e){if(e&&e.length<8)return n.i(d.default)("Password must be at least 8 characters")}function c(e,t){if(e!==t.password.value)return n.i(d.default)("Passwords must match")}function u(e){if(!e)return"URL is required"}var d=n(4);t.b=i,t.c=a,t.d=r,t.f=s,t.h=o,t.e=l,t.g=c,t.a=u},function(e,t,n){
"use strict";function i(e){var t=e.cellWidth,n=e.aspectRatio,i=e.titleHeight,a=void 0===i?0:i;return Math.floor(t/n+a)}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.innerViewportWidth,n=e.innerHorizontalPadding,i=void 0===n?0:n,a=e.minCellWidth,r=e.minColumns,s=void 0===r?0:r,o=e.maxColumns,l=void 0===o?1/0:o,c=e.columnAdjustment,u=void 0===c?0:c,d=Math.floor((t+i)/(a+i)),h=void 0;return h=d<s?s:d>l?l:d,h=Math.max(h+u,1),Math.max(Math.floor((t+i)/h)-i,0)}t.a=i},function(e,t,n){"use strict";
function i(e,t,n){return e[n]&&e[n][t]?e[n][t]:e[t]||d}function a(e,t,n){return e?r.a.EPG_IDENTIFIER.test(n.identifier)?i(u,e,t):i(c,e,t):d}var r=n(72),s=n(48),o=n(203);t.a=a;var l,c={movie:[o.c,o.a,o.b],show:[o.c,o.a,o.b],season:[o.c,o.a],episode:[o.c,o.a,o.b],artist:[o.c,o.a,o.b],album:[o.c,o.a,o.b],track:[o.a],photo:[o.c,o.a],photoalbum:[o.c,o.a],clip:[o.c,o.a]},u=(l={},l[s.a]={episode:[o.d]},l.movie=[o.c],l.show=[o.c],l.episode=[o.c],l),d=[o.c]},function(e,t,n){"use strict";function i(e){return!!e.provider.protocols.stream;
}function a(e){return!!e.provider.protocols.stream}function r(e){var t=e.server.isFullServer;return!(!t||!e.isFirstItemLibraryItem)}function s(e){var t=e.server.isFullServer&&e.server.allowSync;return!!(t&&e.isFirstItemLibraryItem&&e.allowSync)}function o(e){var t=e.server.isFullOwnedServer&&e.server.transcoderVideo;return!(!t||!e.isFirstItemLibraryItem)}function l(e){var t=e.listType||e.firstItemType||"mixed",i=p[t];n.i(d.a)(u.a.isArray(i),"getMetadataListActionProps: Invalid type, "+t+", provided");
var a=i.reduce(function(i,a){var r=h[a];return n.i(d.a)(u.a.isFunction(r),"getMetadataListActionProps: Invalid action, "+a+", for "+t),u.a.has(e,a)?i[a]=e[a]:i[a]=r(e),i},{});return a}var c=n(2),u=n.n(c),d=n(33);t.a=l;var h={showPlayAll:i,showShuffle:a,showAddToPlaylist:r,showSync:s,showOptimize:o},p={mixed:[],movie:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],show:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],season:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],
episode:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],artist:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],album:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],track:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],photoalbum:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],photo:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],clip:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"]
}},function(e,t,n){"use strict";function i(e){return te[e]}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.keys;if(a&&a.length){var r=i(e);return r.reduce(function(e,t){return a.indexOf(t.key)!==-1&&e.push(t),e},[])}switch(t){case x.a:switch(e){case"season":return[A,z,G,F];case"episode":return[Q,A,F];case"album":return[A,z,F];case"track":return[R,B]}}switch(e){case"movie":return[A,z,V,W];case"show":return[A,z,Y,K];case"season":return[A,L];case"episode":return[A,k,W];
case"artist":return[A];case"album":return[A,N,z];case"track":return[A,_,j,H];case"photo":return[A];case"photoalbum":return[A];case"clip":return[A]}return[]}var r=n(4),s=n(370),o=n(513),l=n(294),c=n(1970),u=n(1947),d=n(371),h=n(843),p=n(519),f=n(844),g=n(851),m=n(1963),v=n(1960),y=n(518),b=n(516),S=n(1975),w=n(1978),M=n(514),I=n(848),C=n(852),D=n(1966),T=n(1945),x=n(48);t.b=i,t.a=a;var P={flex:"2 1 350px"},E={flex:"0 1 200px"},A={key:"title",ascKey:"titleSort",descKey:"titleSort:desc",title:function(e){
switch(e){case"movie":return n.i(r.default)("Movie Title");case"show":return n.i(r.default)("Show Title");case"season":return n.i(r.default)("Season");case"episode":return n.i(r.default)("Episode Title");case"artist":return n.i(r.default)("Artist Title");case"album":return n.i(r.default)("Album Title");case"track":return n.i(r.default)("Track Title");default:return n.i(r.default)("Title")}},component:s.a,style:P},L={key:"seasonShow",ascKey:"show.titleSort,index",descKey:"show.titleSort:desc,index",
title:function(){return n.i(r.default)("Show")},component:o.a,style:P},k={key:"episodeShow",ascKey:"show.titleSort,season.index,episode.index",descKey:"show.titleSort:desc,season.index,episode.index",title:function(){return n.i(r.default)("Show")},component:l.a,style:P},N={key:"albumArtist",ascKey:"artist.titleSort,album.year",descKey:"artist.titleSort:desc,album.year",title:function(){return n.i(r.default)("Album Artist")},component:o.a,style:P},_={key:"trackAlbumArtist",ascKey:"artist.titleSort,album.titleSort,track.index",
descKey:"artist.titleSort:desc,album.titleSort,track.index",title:function(){return n.i(r.default)("Album Artist")},component:l.a,style:P},O={key:"trackArtist",title:function(){return n.i(r.default)("Artist")},ascKey:"track.originalTitle,album.titleSort,track.index",descKey:"track.originalTitle:desc,album.titleSort,track.index",component:c.a,style:P},R={key:"combinedTitleTrackArtist",ascKey:"titleSort",descKey:"titleSort:desc",title:function(){return n.i(r.default)("Track Title")},component:u.a,style:P
},j={key:"trackAlbum",ascKey:"album.titleSort,track.index",descKey:"album.titleSort:desc,track.index",title:function(){return n.i(r.default)("Album")},component:o.a,style:P},z={key:"year",ascKey:"year",descKey:"year:desc",title:function(){return n.i(r.default)("Year")},component:d.a,style:{flex:"0 1 150px"}},U={key:"criticRating",ascKey:"rating",descKey:"rating:desc",title:function(){return n.i(r.default)("Critic Rating")},component:h.a,style:{flex:"0 0 150px"}},F={key:"userRating",ascKey:"userRating",
descKey:"userRating:desc",title:function(){return n.i(r.default)("Rating")},component:p.a,style:{flex:"0 0 115px"}},B={key:"miniUserRating",ascKey:"userRating",descKey:"userRating:desc",title:function(){return n.i(r.default)("Rating")},component:p.a,style:{flex:"0 0 75px",padding:0}},V={key:"duration",ascKey:"duration",descKey:"duration:desc",title:function(){return n.i(r.default)("Duration")},component:f.a,style:{flex:"0 1 150px"}},H={key:"playerDuration",ascKey:"duration",descKey:"duration:desc",
title:function(){return n.i(r.default)("Duration")},component:g.a,style:{flex:"0 1 150px"}},W={key:"progress",ascKey:"viewOffset",descKey:"viewOffset:desc",title:function(){return n.i(r.default)("Progress")},component:m.a,style:{flex:"0 1 150px"}},Q={key:"miniProgress",ascKey:"viewOffset",descKey:"viewOffset:desc",title:function(){return n.i(r.default)("Progress")},component:v.a,style:{flex:"0 0 25px",paddingLeft:"10px",paddingRight:0}},Y={key:"seasonCount",ascKey:"childCount",descKey:"childCount:desc",
title:function(){return n.i(r.default)("Seasons")},component:y.a,style:{flex:"0 1 150px"}},G={key:"seasonCount",ascKey:"childCount",descKey:"childCount:desc",title:function(){return n.i(r.default)("Episodes")},component:b.a,style:{flex:"0 1 150px"}},K={key:"unwatchedCount",ascKey:"unviewedLeafCount",descKey:"unviewedLeafCount:desc",title:function(){return n.i(r.default)("Unwatched")},component:S.a,style:{flex:"0 1 150px"}},q={key:"playCount",ascKey:"viewCount",descKey:"viewCount:desc",title:function(){
return n.i(r.default)("Plays")},component:w.a,style:{flex:"0 1 150px"}},Z={key:"dateAdded",ascKey:"addedAt",descKey:"addedAt:desc",title:function(){return n.i(r.default)("Date Added")},component:M.a,style:E},X={key:"dateViewed",ascKey:"lastViewedAt",descKey:"lastViewedAt:desc",title:function(){return n.i(r.default)("Date Viewed")},component:I.a,style:E},J={key:"releaseDate",ascKey:"originallyAvailableAt",descKey:"originallyAvailableAt:desc",title:function(e){switch(e){case"movie":return n.i(r.default)("Release Date");
case"show":return n.i(r.default)("Air Date");case"episode":return n.i(r.default)("Air Date");case"album":return n.i(r.default)("Release Date");default:return n.i(r.default)("Release Date")}},component:C.a,style:E},$={key:"resolution",ascKey:"mediaHeight",descKey:"mediaHeight:desc",title:function(){return n.i(r.default)("Resolution")},component:D.a,style:{flex:"0 1 150px"}},ee={key:"bitrate",ascKey:"mediaBitrate",descKey:"mediaBitrate:desc",title:function(){return n.i(r.default)("Bitrate")},component:T.a,
style:{flex:"0 1 150px"}},te={movie:[A,z,U,F,V,W,q,Z,X,J,$,ee],show:[A,z,U,F,Y,K,Z,X,J],season:[A,L,F,Z],episode:[A,k,z,U,F,V,W,q,Z,X,J,$,ee],artist:[A,F,Z],album:[A,N,z,U,F,Z,J],track:[A,_,O,j,z,F,H,W,q,Z,ee]}},function(e,t,n){"use strict";n(748);n.d(t,"a",function(){return i}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return r}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return o}),n.d(t,"f",function(){return l});var i="isActive",a="isFocused",r="isDisabled",s="isDragging",o="isDraggingBefore",l="isDraggingAfter";
},function(e,t,n){"use strict";function i(e,t,n){var i=n.key,s=n.title,o=n.type,l=encodeURIComponent(e),c=encodeURIComponent(t),u=t===r.a.LIBRARY_PROVIDER_IDENTIFIER?"server/"+l:"server/"+l+"/provider/"+c;return a.join(["#!",u,"list"],{key:i,type:o,title:s})}var a=n(20),r=n(72);t.a=i},function(e,t,n){"use strict";function i(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="details",s=i.key;switch(i.type){case"photoalbum":case"show":case"episode":case"movie":case"album":case"artist":
r="details",s=i.key;break;case"track":case"photo":r="details",s=i.parentKey;break;case"playlist":r="playlist",s=i.ratingKey}if("photo"===i.type)if(i.parentKey)r="details",s=i.parentKey;else{if(!i.librarySectionID)return null;r="section",s=i.librarySectionID}return n.i(a.a)(e,t,s,null,r)}var a=n(86);t.a=i},function(e,t,n){"use strict";var i=n(34),a="undefined"!=typeof window,r=i.a.extend({tests:[{id:"ee",name:"EE",predicate:function(e){return/^Netbox-/.test(e.userAgent)}},{id:"metrological",name:"Metrological",
predicate:function(e){return/WPE$/.test(e.userAgent)}},{id:"sony",name:"Sony",predicate:function(e){return/playstation|sony/i.test(e.userAgent)}},{id:"nintendo",name:"Nintendo",predicate:function(e){return/nintendo/i.test(e.userAgent)}},{id:"tivo",name:"TiVo",predicate:function(e){return/TiVo/.test(e.userAgent)}},{id:"lg",name:"LG",predicate:function(e){var t=e.userAgent;return/netcast/i.test(t)||/web[o0]s/i.test(t)&&/smarttv/i.test(t)}},{id:"samsung",name:"Samsung",predicate:function(e){return/Samsung|Tizen/i.test(e.userAgent);
}},{id:"panasonic",name:"Panasonic",predicate:function(e){return/viera/i.test(e.userAgent)}},{id:"philips",name:"Philips",predicate:function(e){return/philips/i.test(e.userAgent)}},{id:"toshiba",name:"Toshiba",predicate:function(e){return/toshiba/i.test(e.userAgent)}},{id:"vizio",name:"Vizio",predicate:function(e){var t=/vizio/i.test(e.userAgent),n=/opera/i.test(e.userAgent),i=a&&window.iMTK_JSP;return t||i&&n}},{id:"swisscom",name:"Swisscom",predicate:function(e){return/swisscom/i.test(e.userAgent);
}},{id:"humax",name:"Humax",predicate:function(e){return/humax/i.test(e.userAgent)}},{id:"amazon",name:"Amazon",predicate:function(e){return/-AFT\w-/.test(e.userAgent)}},{id:"generic",name:"Generic Device",predicate:function(e){var t=e.userAgent;return/smarttv/i.test(t)||/large screen/i.test(t)||/hbbtv/i.test(t)}}],id:"unknown",name:"Unknown Manufacturer",constructor:function(e){var t="",n="";e?(t=e.userAgent,n=e.platform):null!=window.navigator&&(t=window.navigator.userAgent,n=window.navigator.platform),
this.detect({userAgent:t,platform:n})},detect:function(e){var t=this.runTests(this.tests,e);t&&(this.id=t.id,this.name=t.name)},runTests:function(e,t){for(var n=0,i=e.length;n<i;n++){var a=e[n];if(a.predicate(t))return a}},toJSON:function(){var e={};for(var t in this)this.hasOwnProperty(t)&&this[t]&&(e[t]=this[t]);return e}});t.a=new r},function(e,t,n){e.exports={default:n(2223),__esModule:!0}},function(e,t,n){e.exports={default:n(2228),__esModule:!0}},function(e,t){var n={}.toString;e.exports=function(e){
return n.call(e).slice(8,-1)}},function(e,t,n){var i=n(2230);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,a){return e.call(t,n,i,a)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var i=n(236),a=n(121).document,r=i(a)&&i(a.createElement);e.exports=function(e){return r?a.createElement(e):{}}},function(e,t,n){e.exports=!n(234)&&!n(204)(function(){
return 7!=Object.defineProperty(n(903)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(901);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n){"use strict";var i=n(550),a=n(120),r=n(912),s=n(235),o=n(205),l=n(549),c=n(2237),u=n(553),d=n(909),h=n(239)("iterator"),p=!([].keys&&"next"in[].keys()),f="@@iterator",g="keys",m="values",v=function(){return this};e.exports=function(e,t,n,y,b,S,w){c(n,t,y);var M,I,C,D=function(e){
if(!p&&e in E)return E[e];switch(e){case g:return function(){return new n(this,e)};case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},T=t+" Iterator",x=b==m,P=!1,E=e.prototype,A=E[h]||E[f]||b&&E[b],L=A||D(b),k=b?x?D("entries"):L:void 0,N="Array"==t?E.entries||A:A;if(N&&(C=d(N.call(new e)),C!==Object.prototype&&(u(C,T,!0),i||o(C,h)||s(C,h,v))),x&&A&&A.name!==m&&(P=!0,L=function(){return A.call(this)}),i&&!w||!p&&!P&&E[h]||s(E,h,L),l[t]=L,l[T]=v,b)if(M={values:x?L:D(m),
keys:S?L:D(g),entries:k},w)for(I in M)I in E||r(E,I,M[I]);else a(a.P+a.F*(p||P),t,M);return M}},function(e,t,n){var i=n(379),a=n(380),r=n(206),s=n(558),o=n(205),l=n(904),c=Object.getOwnPropertyDescriptor;t.f=n(234)?c:function(e,t){if(e=r(e),t=s(t,!0),l)try{return c(e,t)}catch(e){}if(o(e,t))return a(!i.f.call(e,t),e[t])}},function(e,t,n){var i=n(910),a=n(548).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,a)}},function(e,t,n){var i=n(205),a=n(381),r=n(554)("IE_PROTO"),s=Object.prototype;
e.exports=Object.getPrototypeOf||function(e){return e=a(e),i(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){var i=n(205),a=n(206),r=n(2232)(!1),s=n(554)("IE_PROTO");e.exports=function(e,t){var n,o=a(e),l=0,c=[];for(n in o)n!=s&&i(o,n)&&c.push(n);for(;t.length>l;)i(o,n=t[l++])&&(~r(c,n)||c.push(n));return c}},function(e,t,n){var i=n(120),a=n(99),r=n(204);e.exports=function(e,t){var n=(a.Object||{})[e]||Object[e],s={};
s[e]=t(n),i(i.S+i.F*r(function(){n(1)}),"Object",s)}},function(e,t,n){e.exports=n(235)},function(e,t,n){var i=n(120),a=n(378),r=n(204),s=n(556),o="["+s+"]",l="\u200b\x85",c=RegExp("^"+o+o+"*"),u=RegExp(o+o+"*$"),d=function(e,t,n){var a={},o=r(function(){return!!s[e]()||l[e]()!=l}),c=a[e]=o?t(h):s[e];n&&(a[n]=c),i(i.P+i.F*o,"String",a)},h=d.trim=function(e,t){return e=String(a(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(u,"")),e};e.exports=d},function(e,t,n){"use strict";var i=n(121),a=n(205),r=n(234),s=n(120),o=n(912),l=n(2240).KEY,c=n(204),u=n(555),d=n(553),h=n(382),p=n(239),f=n(560),g=n(559),m=n(2239),v=n(2233),y=n(2235),b=n(303),S=n(206),w=n(558),M=n(380),I=n(551),C=n(2243),D=n(907),T=n(237),x=n(238),P=D.f,E=T.f,A=C.f,L=i.Symbol,k=i.JSON,N=k&&k.stringify,_="prototype",O=p("_hidden"),R=p("toPrimitive"),j={}.propertyIsEnumerable,z=u("symbol-registry"),U=u("symbols"),F=u("op-symbols"),B=Object[_],V="function"==typeof L,H=i.QObject,W=!H||!H[_]||!H[_].findChild,Q=r&&c(function(){
return 7!=I(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=P(B,t);i&&delete B[t],E(e,t,n),i&&e!==B&&E(B,t,i)}:E,Y=function(e){var t=U[e]=I(L[_]);return t._k=e,t},G=V&&"symbol"==typeof L.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof L},K=function(e,t,n){return e===B&&K(F,t,n),b(e),t=w(t,!0),b(n),a(U,t)?(n.enumerable?(a(e,O)&&e[O][t]&&(e[O][t]=!1),n=I(n,{enumerable:M(0,!1)})):(a(e,O)||E(e,O,M(1,{})),e[O][t]=!0),Q(e,t,n)):E(e,t,n);
},q=function(e,t){b(e);for(var n,i=v(t=S(t)),a=0,r=i.length;r>a;)K(e,n=i[a++],t[n]);return e},Z=function(e,t){return void 0===t?I(e):q(I(e),t)},X=function(e){var t=j.call(this,e=w(e,!0));return!(this===B&&a(U,e)&&!a(F,e))&&(!(t||!a(this,e)||!a(U,e)||a(this,O)&&this[O][e])||t)},J=function(e,t){if(e=S(e),t=w(t,!0),e!==B||!a(U,t)||a(F,t)){var n=P(e,t);return!n||!a(U,t)||a(e,O)&&e[O][t]||(n.enumerable=!0),n}},$=function(e){for(var t,n=A(S(e)),i=[],r=0;n.length>r;)a(U,t=n[r++])||t==O||t==l||i.push(t);return i;
},ee=function(e){for(var t,n=e===B,i=A(n?F:S(e)),r=[],s=0;i.length>s;)!a(U,t=i[s++])||n&&!a(B,t)||r.push(U[t]);return r};V||(L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(F,n),a(this,O)&&a(this[O],e)&&(this[O][e]=!1),Q(this,e,M(1,n))};return r&&W&&Q(B,e,{configurable:!0,set:t}),Y(e)},o(L[_],"toString",function(){return this._k}),D.f=J,T.f=K,n(908).f=C.f=$,n(379).f=X,n(552).f=ee,r&&!n(550)&&o(B,"propertyIsEnumerable",X,!0),
f.f=function(e){return Y(p(e))}),s(s.G+s.W+s.F*!V,{Symbol:L});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)p(te[ne++]);for(var te=x(p.store),ne=0;te.length>ne;)g(te[ne++]);s(s.S+s.F*!V,"Symbol",{for:function(e){return a(z,e+="")?z[e]:z[e]=L(e)},keyFor:function(e){if(G(e))return m(z,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){W=!0},useSimple:function(){W=!1}}),s(s.S+s.F*!V,"Object",{
create:Z,defineProperty:K,defineProperties:q,getOwnPropertyDescriptor:J,getOwnPropertyNames:$,getOwnPropertySymbols:ee}),k&&s(s.S+s.F*(!V||c(function(){var e=L();return"[null]"!=N([e])||"{}"!=N({a:e})||"{}"!=N(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!G(e)){for(var t,n,i=[e],a=1;arguments.length>a;)i.push(arguments[a++]);return t=i[1],"function"==typeof t&&(n=t),!n&&y(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!G(t))return t}),i[1]=t,N.apply(k,i)}}}),L[_][R]||n(235)(L[_],R,L[_].valueOf),
d(L,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)},,,,,,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){return e&&e.constructor===Symbol?"symbol":typeof e}function s(e){h.default("function"==typeof e.canDrag,"Expected canDrag to be a function."),h.default("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),h.default("function"==typeof e.endDrag,"Expected endDrag to be a function.");
}function o(e){h.default("function"==typeof e.canDrop,"Expected canDrop to be a function."),h.default("function"==typeof e.hover,"Expected hover to be a function."),h.default("function"==typeof e.drop,"Expected beginDrag to be a function.")}function l(e,t){return t&&f.default(e)?void e.forEach(function(e){return l(e,!1)}):void h.default("string"==typeof e||"symbol"===("undefined"==typeof e?"undefined":r(e)),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.");
}function c(e){var t=m.default().toString();switch(e){case S.SOURCE:return"S"+t;case S.TARGET:return"T"+t;default:h.default(!1,"Unknown role: "+e)}}function u(e){switch(e[0]){case"S":return S.SOURCE;case"T":return S.TARGET;default:h.default(!1,"Cannot parse handler ID: "+e)}}t.__esModule=!0;var d=n(87),h=i(d),p=n(306),f=i(p),g=n(2300),m=i(g),v=n(389),y=n(1036),b=i(y),S={SOURCE:"SOURCE",TARGET:"TARGET"},w=function(){function e(t){a(this,e),this.store=t,this.types={},this.handlers={},this.pinnedSourceId=null,
this.pinnedSource=null}return e.prototype.addSource=function(e,t){l(e),s(t);var n=this.addHandler(S.SOURCE,e,t);return this.store.dispatch(v.addSource(n)),n},e.prototype.addTarget=function(e,t){l(e,!0),o(t);var n=this.addHandler(S.TARGET,e,t);return this.store.dispatch(v.addTarget(n)),n},e.prototype.addHandler=function(e,t,n){var i=c(e);return this.types[i]=t,this.handlers[i]=n,i},e.prototype.containsHandler=function(e){var t=this;return Object.keys(this.handlers).some(function(n){return t.handlers[n]===e;
})},e.prototype.getSource=function(e,t){h.default(this.isSourceId(e),"Expected a valid source ID.");var n=t&&e===this.pinnedSourceId,i=n?this.pinnedSource:this.handlers[e];return i},e.prototype.getTarget=function(e){return h.default(this.isTargetId(e),"Expected a valid target ID."),this.handlers[e]},e.prototype.getSourceType=function(e){return h.default(this.isSourceId(e),"Expected a valid source ID."),this.types[e]},e.prototype.getTargetType=function(e){return h.default(this.isTargetId(e),"Expected a valid target ID."),
this.types[e]},e.prototype.isSourceId=function(e){var t=u(e);return t===S.SOURCE},e.prototype.isTargetId=function(e){var t=u(e);return t===S.TARGET},e.prototype.removeSource=function(e){var t=this;h.default(this.getSource(e),"Expected an existing source."),this.store.dispatch(v.removeSource(e)),b.default(function(){delete t.handlers[e],delete t.types[e]})},e.prototype.removeTarget=function(e){var t=this;h.default(this.getTarget(e),"Expected an existing target."),this.store.dispatch(v.removeTarget(e)),
b.default(function(){delete t.handlers[e],delete t.types[e]})},e.prototype.pinSource=function(e){var t=this.getSource(e);h.default(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t},e.prototype.unpinSource=function(){h.default(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null},e}();t.default=w,e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){switch(void 0===e&&(e=h),
t.type){case u.HOVER:break;case d.ADD_SOURCE:case d.ADD_TARGET:case d.REMOVE_TARGET:case d.REMOVE_SOURCE:return h;case u.BEGIN_DRAG:case u.PUBLISH_DRAG_SOURCE:case u.END_DRAG:case u.DROP:default:return p}var i=t.targetIds,a=n.targetIds,r=o.default(i,a),s=!1;if(0===r.length){for(var l=0;l<i.length;l++)if(i[l]!==a[l]){s=!0;break}}else s=!0;if(!s)return h;var c=a[a.length-1],f=i[i.length-1];return c!==f&&(c&&r.push(c),f&&r.push(f)),r}function r(e,t){return e!==h&&(e===p||"undefined"==typeof t||c.default(t,e).length>0);
}t.__esModule=!0,t.default=a,t.areDirty=r;var s=n(2359),o=i(s),l=n(2354),c=i(l),u=n(388),d=n(389),h=[],p=[]},function(e,t,n){"use strict";function i(e,t){return e===t||e&&t&&e.x===t.x&&e.y===t.y}function a(e,t){switch(void 0===e&&(e=c),t.type){case l.BEGIN_DRAG:return{initialSourceClientOffset:t.sourceClientOffset,initialClientOffset:t.clientOffset,clientOffset:t.clientOffset};case l.HOVER:return i(e.clientOffset,t.clientOffset)?e:o({},e,{clientOffset:t.clientOffset});case l.END_DRAG:case l.DROP:
return c;default:return e}}function r(e){var t=e.clientOffset,n=e.initialClientOffset,i=e.initialSourceClientOffset;return t&&n&&i?{x:t.x+i.x-n.x,y:t.y+i.y-n.y}:null}function s(e){var t=e.clientOffset,n=e.initialClientOffset;return t&&n?{x:t.x-n.x,y:t.y-n.y}:null}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.default=a,t.getSourceClientOffset=r,t.getDifferenceFromInitialOffset=s;
var l=n(388),c={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return s.default(e)?e.some(function(e){return e===t}):e===t}t.__esModule=!0,t.default=a;var r=n(306),s=i(r);e.exports=t.default},function(e,t,n){function i(e,t,n,i){var d=-1,h=r,p=!0,f=e.length,g=[],m=t.length;if(!f)return g;n&&(t=o(t,l(n))),i?(h=s,p=!1):t.length>=u&&(h=c,p=!1,t=new a(t));e:for(;++d<f;){var v=e[d],y=null==n?v:n(v);
if(v=i||0!==v?v:0,p&&y===y){for(var b=m;b--;)if(t[b]===y)continue e;g.push(v)}else h(t,y,i)||g.push(v)}return g}var a=n(570),r=n(572),s=n(573),o=n(574),l=n(930),c=n(576),u=200;e.exports=i},function(e,t,n){function i(e){return null==e?void 0===e?l:o:c&&c in Object(e)?r(e):s(e)}var a=n(571),r=n(2324),s=n(2344),o="[object Null]",l="[object Undefined]",c=a?a.toStringTag:void 0;e.exports=i},function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},function(e,t){function n(e){var t=-1,n=Array(e.size);
return e.forEach(function(e){n[++t]=e}),n}e.exports=n},function(e,t){function n(e){return e}e.exports=n},function(e,t,n){function i(e){if(!r(e))return!1;var t=a(e);return t==o||t==l||t==s||t==c}var a=n(929),r=n(578),s="[object AsyncFunction]",o="[object Function]",l="[object GeneratorFunction]",c="[object Proxy]";e.exports=i},function(e,t){function n(){}e.exports=n},function(e,t){e.exports={innerEmptyPage:"InnerEmptyPage-innerEmptyPage-2xO3S EmptyPage-emptyPage-GRG_y resetFont-resetFont-ekCtc",innerEmptyPageContent:"InnerEmptyPage-innerEmptyPageContent-3zmSj EmptyPage-content-ERJeW"
}},function(e,t){e.exports={serverMenuItem:"ServerMenuItem-serverMenuItem-1ZOYZ",disabledServerMenuItem:"ServerMenuItem-disabledServerMenuItem-3l-Es",selectedServerMenuItem:"ServerMenuItem-selectedServerMenuItem-1gb4W",serverMenuItemContainer:"ServerMenuItem-serverMenuItemContainer-20Xfn",serverMenuTitle:"ServerMenuItem-serverMenuTitle-3et6g",serverMenuFriendlyName:"ServerMenuItem-serverMenuFriendlyName-1pcJ5 truncate-truncate-2Z4gk",serverMenuDetails:"ServerMenuItem-serverMenuDetails-13Cxo truncate-truncate-2Z4gk",
serverMenuIconContainer:"ServerMenuItem-serverMenuIconContainer-3T2si",serverMenuIcon:"ServerMenuItem-serverMenuIcon-37xX5",selectedIcon:"ServerMenuItem-selectedIcon-1-Lh3",secureIcon:"ServerMenuItem-secureIcon-2B94D"}},,,,,,function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <li><a class="btn-gray change-pane-btn general-btn" data-pane="general" href="#"> <i class="modal-nav-icon glyphicon align-center"></i> '+v(i(n(0)).call(e,"General",{
hash:{},data:t}))+" </a></li> "}function l(e,t){var a="";return a+=' <li><a class="btn-gray change-pane-btn tags-btn" data-pane="tags" href="#"> <i class="modal-nav-icon glyphicon tags"></i> '+v(i(n(0)).call(e,"Tags",{hash:{},data:t}))+" </a></li> "}function c(e,t){var a="";return a+=' <li><a class="btn-gray change-pane-btn sharing-btn" data-pane="sharing" href="#"> <i class="modal-nav-icon glyphicon parents"></i> '+v(i(n(0)).call(e,"Sharing",{hash:{},data:t}))+" </a></li> "}function u(e,t){var a="";
return a+=' <li><a class="btn-gray change-pane-btn poster-btn" data-pane="poster" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+v(i(n(0)).call(e,"Poster",{hash:{},data:t}))+" </a></li> "}function d(e,t){var a="";return a+=' <li><a class="btn-gray change-pane-btn banner-btn" data-pane="banner" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+v(i(n(0)).call(e,"Banner",{hash:{},data:t}))+" </a></li> "}function h(e,t){var a="";return a+=' <li><a class="btn-gray change-pane-btn art-btn" data-pane="art" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+v(i(n(0)).call(e,"Background",{
hash:{},data:t}))+" </a></li> "}function p(e,t){var a="";return a+=' <li><a class="btn-gray change-pane-btn info-btn" data-pane="info" href="#"> <i class="modal-nav-icon glyphicon circle-info"></i> '+v(i(n(0)).call(e,"Info",{hash:{},data:t}))+" </a></li> "}function f(e,t){var a="";return a+=' <li><a class="btn-gray change-pane-btn advanced-btn" data-pane="advanced" href="#"> <i class="modal-nav-icon glyphicon cogwheel"></i> '+v(i(n(0)).call(e,"Advanced",{hash:{},data:t}))+" </a></li> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var g,m="",v=this.escapeExpression,y="function",b=this;return m+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon pencil"></i> '+v((g=t&&t.paneTitle,typeof g===y?g.apply(t):g))+'</h4> </div> <div class="modal-body modal-body-scroll modal-body-with-panes"> <div class="modal-nav-pane dark-scrollbar hidden"> <ul class="list modal-nav-list"> ',
g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.general),{hash:{},inverse:b.noop,fn:b.program(1,o,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.tags),{hash:{},inverse:b.noop,fn:b.program(3,l,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.sharing),{hash:{},inverse:b.noop,fn:b.program(5,c,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.poster),{hash:{},inverse:b.noop,fn:b.program(7,u,s),
data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.banner),{hash:{},inverse:b.noop,fn:b.program(9,d,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.art),{hash:{},inverse:b.noop,fn:b.program(11,h,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.info),{hash:{},inverse:b.noop,fn:b.program(13,p,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.advanced),{hash:{},
inverse:b.noop,fn:b.program(15,f,s),data:s}),(g||0===g)&&(m+=g),m+=' </ul> </div> <div class="modal-body-pane pane-region dark-scrollbar"> <div class="loading loading-inline"></div> </div> </div> <div class="modal-footer"> <span class="form-message"></span> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+v(i(n(0)).call(t,"Cancel",{hash:{},data:s}))+'</button> <button type="button" class="save-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+v(i(n(0)).call(t,"Save Changes",{
hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){"use strict";function i(e){this.string=e}i.prototype.toString=function(){return""+this.string},t.default=i},function(e,t){!function(n){if("object"==typeof t&&"undefined"!=typeof e)e.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var i;i="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,i.Hls=n()}}(function(){return function e(t,n,i){function a(s,o){
if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!o&&l)return l(s,!0);if(r)return r(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return a(n?n:e)},u,u.exports,e,t,n,i)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s<i.length;s++)a(i[s]);return a}({1:[function(e,t,n){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0;
}function a(e){return"function"==typeof e}function r(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!r(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,n,i,r,l,c;if(this._events||(this._events={}),
"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(n=this._events[e],o(n))return!1;if(a(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:r=Array.prototype.slice.call(arguments,1),n.apply(this,r)}else if(s(n))for(r=Array.prototype.slice.call(arguments,1),
c=n.slice(),i=c.length,l=0;l<i;l++)c[l].apply(this,r);return!0},i.prototype.addListener=function(e,t){var n;if(!a(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,a(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(n=o(this._maxListeners)?i.defaultMaxListeners:this._maxListeners,
n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!a(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,
this.on(e,n),this},i.prototype.removeListener=function(e,t){var n,i,r,o;if(!a(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],r=n.length,i=-1,n===t||a(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(n)){for(o=r;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){i=o;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),
this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],a(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);
return delete this._events[e],this},i.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?a(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(a(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],2:[function(e,t,n){var i=arguments[3],a=arguments[4],r=arguments[5],s=JSON.stringify;t.exports=function(e,t){function n(e){m[e]=!0;for(var t in a[e][1]){
var i=a[e][1][t];m[i]||n(i)}}for(var o,l=Object.keys(r),c=0,u=l.length;c<u;c++){var d=l[c],h=r[d].exports;if(h===e||h&&h.default===e){o=d;break}}if(!o){o=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var p={},c=0,u=l.length;c<u;c++){var d=l[c];p[d]=d}a[o]=[Function(["require","module","exports"],"("+e+")(self)"),p]}var f=Math.floor(Math.pow(16,8)*Math.random()).toString(16),g={};g[o]=o,a[f]=[Function(["require"],"var f = require("+s(o)+");(f.default ? f.default : f)(self);"),g];var m={};
n(f);var v="("+i+")({"+Object.keys(m).map(function(e){return s(e)+":["+a[e][0]+","+s(a[e][1])+"]"}).join(",")+"},{},["+s(f)+"])",y=window.URL||window.webkitURL||window.mozURL||window.msURL,b=new Blob([v],{type:"text/javascript"});if(t&&t.bare)return b;var S=y.createObjectURL(b),w=new Worker(S);return w.objectURL=S,w}},{}],3:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{
value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),c=i(l),u=e(25),d=i(u),h=e(28),p=i(h),f=e(24),g=e(43),m=e(8),v=i(m),y=function(e){function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,c.default.FRAG_LOADING,c.default.FRAG_LOADED,c.default.FRAG_BUFFERED,c.default.ERROR));
return n.lastLoadedFragLevel=0,n._autoLevelCapping=-1,n._nextAutoLevel=-1,n.hls=e,n.onCheck=n.abandonRulesCheck.bind(n),n}return s(t,e),o(t,[{key:"destroy",value:function(){this.clearTimer(),d.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(e){var t=e.frag;if("main"===t.type){if(this.timer||(this.timer=setInterval(this.onCheck,100)),!this.bwEstimator){var n=this.hls,i=e.frag.level,a=n.levels[i].details.live,r=n.config,s=void 0,o=void 0;a?(s=r.abrEwmaFastLive,o=r.abrEwmaSlowLive):(s=r.abrEwmaFastVoD,
o=r.abrEwmaSlowVoD),this.bwEstimator=new v.default(n,o,s,r.abrEwmaDefaultEstimate)}this.fragCurrent=t}}},{key:"abandonRulesCheck",value:function(){var e=this.hls,t=e.media,n=this.fragCurrent,i=n.loader;if(!i||i.stats&&i.stats.aborted)return g.logger.warn("frag loader destroy or aborted, disarm abandonRules"),void this.clearTimer();var a=i.stats;if(t&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&n.autoLevel&&n.level){var r=performance.now()-a.trequest,s=Math.abs(t.playbackRate);if(r>500*n.duration/s){
var o=e.levels,l=Math.max(1,a.bw?a.bw/8:1e3*a.loaded/r),u=a.total?a.total:Math.max(a.loaded,Math.round(n.duration*o[n.level].bitrate/8)),d=t.currentTime,h=(u-a.loaded)/l,f=(p.default.bufferInfo(t,d,e.config.maxBufferHole).end-d)/s;if(f<2*n.duration/s&&h>f){var m=void 0,v=void 0;for(v=n.level-1;v>=0&&(m=n.duration*o[v].bitrate/(6.4*l),!(m<f));v--);m<h&&(v=Math.max(0,v),g.logger.warn("loading too slow, abort fragment loading and switch to level "+v+":fragLoadedDelay["+v+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+m.toFixed(1)+"<"+h.toFixed(1)+":"+f.toFixed(1)),
e.nextLoadLevel=v,this.bwEstimator.sample(r,a.loaded),i.abort(),this.clearTimer(),e.trigger(c.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:a}))}}}}},{key:"onFragLoaded",value:function(e){var t=e.frag;if("main"===t.type&&(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,e.frag.bitrateTest)){var n=e.stats;n.tparsed=n.tbuffered=n.tload,this.onFragBuffered(e)}}},{key:"onFragBuffered",value:function(e){var t=e.stats,n=e.frag;if(t.aborted!==!0&&1===n.loadCounter&&"main"===n.type&&(!n.bitrateTest||t.tload===t.tbuffered)){
var i=t.tbuffered-t.trequest;g.logger.log("latency/loading/parsing/append/kbps:"+Math.round(t.tfirst-t.trequest)+"/"+Math.round(t.tload-t.tfirst)+"/"+Math.round(t.tparsed-t.tload)+"/"+Math.round(t.tbuffered-t.tparsed)+"/"+Math.round(8*t.loaded/(t.tbuffered-t.trequest))),this.bwEstimator.sample(i,t.loaded),n.bitrateTest?this.bitrateTestDelay=i/1e3:this.bitrateTestDelay=0}}},{key:"onError",value:function(e){switch(e.details){case f.ErrorDetails.FRAG_LOAD_ERROR:case f.ErrorDetails.FRAG_LOAD_TIMEOUT:
this.clearTimer()}}},{key:"clearTimer",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"findBestLevel",value:function(e,t,n,i,a,r,s,o,l){for(var c=a;c>=i;c--){var u=l[c],d=u.details,h=d?d.totalduration/d.fragments.length:t,p=!!d&&d.live,f=void 0;f=c<=e?s*n:o*n;var m=l[c].bitrate,v=m*h/f;if(g.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+c+"/"+Math.round(f)+"/"+m+"/"+h+"/"+r+"/"+v),f>m&&(!v||p||v<r))return c}return-1}},{key:"autoLevelCapping",
get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping=e}},{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator,n=this.hls,i=n.levels,a=n.config.minAutoBitrate;if(!(e===-1||t&&t.canEstimate()))return Math.min(e,this.maxAutoLevel);var r=this.nextABRAutoLevel;if(e!==-1&&(r=Math.min(e,r)),void 0!==a)for(;i[r].bitrate<a;)r++;return r},set:function(e){this._nextAutoLevel=e}},{key:"minAutoLevel",get:function(){for(var e=this.hls,t=e.levels,n=e.config.minAutoBitrate,i=0;i<t.length;i++)if(t[i].bitrate>n)return i;
return 0}},{key:"maxAutoLevel",get:function(){var e,t=this.hls.levels,n=this._autoLevelCapping;return e=n===-1&&t&&t.length?t.length-1:n}},{key:"nextABRAutoLevel",get:function(){var e=this.hls,t=this.maxAutoLevel,n=e.levels,i=e.config,a=this.minAutoLevel,r=e.media,s=this.lastLoadedFragLevel,o=this.fragCurrent?this.fragCurrent.duration:0,l=r?r.currentTime:0,c=r&&0!==r.playbackRate?Math.abs(r.playbackRate):1,u=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,d=(p.default.bufferInfo(r,l,i.maxBufferHole).end-l)/c,h=this.findBestLevel(s,o,u,a,t,d,i.abrBandWidthFactor,i.abrBandWidthUpFactor,n);
if(h>=0)return h;g.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var f=i.maxStarvationDelay,m=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(0===d){var y=this.bitrateTestDelay;y&&(f=i.maxLoadingDelay-y,g.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*f)+" ms"),m=v=1)}return h=this.findBestLevel(s,o,u,a,t,d+f,m,v,n),Math.max(h,0)}}]),t}(d.default);n.default=y},{24:24,25:25,
26:26,28:28,43:43,8:8}],4:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(39),c=i(l),u=e(28),d=i(u),h=e(20),p=i(h),f=e(26),g=i(f),m=e(25),v=i(m),y=e(29),b=i(y),S=e(45),w=i(S),M=e(24),I=e(43),C={
STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR"},D=function(e){function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,g.default.MEDIA_ATTACHED,g.default.MEDIA_DETACHING,g.default.AUDIO_TRACKS_UPDATED,g.default.AUDIO_TRACK_SWITCH,g.default.AUDIO_TRACK_LOADED,g.default.KEY_LOADED,g.default.FRAG_LOADED,g.default.FRAG_PARSING_INIT_SEGMENT,g.default.FRAG_PARSING_DATA,g.default.FRAG_PARSED,g.default.ERROR,g.default.BUFFER_CREATED,g.default.BUFFER_APPENDED,g.default.BUFFER_FLUSHED));
return n.config=e.config,n.audioCodecSwap=!1,n.ticks=0,n.ontick=n.tick.bind(n),n}return s(t,e),o(t,[{key:"destroy",value:function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),v.default.prototype.destroy.call(this),this.state=C.STOPPED}},{key:"startLoad",value:function(e){if(this.tracks){var t=this.media,n=this.lastCurrentTime;this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.fragLoadError=0,t&&n?(I.logger.log("configure startPosition @"+n),this.state=C.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:e,
this.state=C.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=C.STOPPED}},{key:"stopLoad",value:function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=C.STOPPED}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){
var e,t,n,i=this.hls,a=i.config;switch(this.state){case C.ERROR:case C.PAUSED:break;case C.STARTING:this.state=C.WAITING_TRACK,this.loadedmetadata=!1;break;case C.IDLE:if(!this.media&&(this.startFragRequested||!a.startFragPrefetch))break;e=this.loadedmetadata?this.media.currentTime:this.nextLoadPosition;var r=this.mediaBuffer?this.mediaBuffer:this.media,s=d.default.bufferInfo(r,e,a.maxBufferHole),o=s.len,l=s.end,u=this.fragPrevious,h=a.maxMaxBufferLength;if(o<h&&this.trackId<this.tracks.length){if(n=this.tracks[this.trackId].details,
"undefined"==typeof n){this.state=C.WAITING_TRACK;break}if(!n.live&&u&&u.sn===n.endSN&&(!this.media.seeking||this.media.duration-l<u.duration/2)){this.hls.trigger(g.default.BUFFER_EOS,{type:"audio"}),this.state=C.ENDED;break}var p=n.fragments,f=p.length,m=p[0].start,v=p[f-1].start+p[f-1].duration,y=void 0;if(l<m?y=p[0]:!function(){var e=void 0,t=a.maxFragLookUpTolerance;l<v?(l>v-t&&(t=0),e=c.default.search(p,function(e){return e.start+e.duration-t<=l?1:e.start-t>l?-1:0})):e=p[f-1],e&&(y=e,m=e.start,
u&&y.level===u.level&&y.sn===u.sn&&(y.sn<n.endSN?(y=p[y.sn+1-n.startSN],I.logger.log("SN just loaded, load next one: "+y.sn)):y=null))}(),y)if(null!=y.decryptdata.uri&&null==y.decryptdata.key)I.logger.log("Loading key for "+y.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+this.trackId),this.state=C.KEY_LOADING,i.trigger(g.default.KEY_LOADING,{frag:y});else{if(I.logger.log("Loading "+y.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+this.trackId+", currentTime:"+e+",bufferEnd:"+l.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,
y.loadCounter){y.loadCounter++;var b=a.fragLoadingLoopThreshold;if(y.loadCounter>b&&Math.abs(this.fragLoadIdx-y.loadIdx)<b)return void i.trigger(g.default.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:y})}else y.loadCounter=1;y.loadIdx=this.fragLoadIdx,this.fragCurrent=y,this.startFragRequested=!0,i.trigger(g.default.FRAG_LOADING,{frag:y}),this.state=C.FRAG_LOADING}}break;case C.WAITING_TRACK:t=this.tracks[this.trackId],t&&t.details&&(this.state=C.IDLE);
break;case C.FRAG_LOADING_WAITING_RETRY:var S=performance.now(),w=this.retryDate;r=this.media;var D=r&&r.seeking;(!w||S>=w||D)&&(I.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=C.IDLE);break;case C.STOPPED:case C.FRAG_LOADING:case C.PARSING:case C.PARSED:case C.ENDED:}}},{key:"onMediaAttached",value:function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),
t.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)}},{key:"onMediaDetaching",value:function(){var e=this.media;e&&e.ended&&(I.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.tracks;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.loadCounter=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),
this.onvseeking=this.onvseeked=this.onvended=null),this.media=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){this.state===C.ENDED&&(this.state=C.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.tick()}},{key:"onMediaEnded",value:function(){this.startPosition=this.lastCurrentTime=0}},{key:"onAudioTracksUpdated",value:function(e){I.logger.log("audio tracks updated"),
this.tracks=e.audioTracks}},{key:"onAudioTrackSwitch",value:function(e){var t=!!e.url;this.trackId=e.id,this.state=C.IDLE,this.fragCurrent=null,this.state=C.PAUSED,t?this.timer||(this.timer=setInterval(this.ontick,100)):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),this.tick()}},{key:"onAudioTrackLoaded",value:function(e){var t=e.details,n=e.id,i=this.tracks[n],a=t.totalduration;if(I.logger.log("track "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+a),
t.PTSKnown=!1,i.details=t,!this.startFragRequested){if(this.startPosition===-1){var r=t.startTimeOffset;isNaN(r)?this.startPosition=0:(I.logger.log("start time offset found in playlist, adjust startPosition to "+r),this.startPosition=r)}this.nextLoadPosition=this.startPosition}this.state===C.WAITING_TRACK&&(this.state=C.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===C.KEY_LOADING&&(this.state=C.IDLE,this.tick())}},{key:"onFragLoaded",value:function(e){var t=this.fragCurrent;if(this.state===C.FRAG_LOADING&&t&&"audio"===e.frag.type&&e.frag.level===t.level&&e.frag.sn===t.sn){
this.state=C.PARSING,this.stats=e.stats;var n=this.tracks[this.trackId],i=n.details,a=i.totalduration,r=t.start,s=t.level,o=t.sn,l=this.config.defaultAudioCodec||n.audioCodec;this.pendingAppending=0,this.demuxer||(this.demuxer=new p.default(this.hls,"audio")),I.logger.log("Demuxing "+o+" of ["+i.startSN+" ,"+i.endSN+"],track "+s);var c=i.PTSKnown||!i.live;this.demuxer.push(e.payload,l,null,r,t.cc,s,o,a,t.decryptdata,c)}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(e){var t=this.fragCurrent;
if(t&&"audio"===e.id&&e.sn===t.sn&&e.level===t.level&&this.state===C.PARSING){var n=e.tracks,i=void 0;if(i=n.audio){i.levelCodec="mp4a.40.2",i.id=e.id,this.hls.trigger(g.default.BUFFER_CODECS,n),I.logger.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var a=i.initSegment;a&&(this.pendingAppending++,this.hls.trigger(g.default.BUFFER_APPENDING,{type:"audio",data:a,parent:"audio",content:"initSegment"})),this.tick()}}}},{key:"onFragParsingData",
value:function(e){var t=this,n=this.fragCurrent;if(n&&"audio"===e.id&&e.sn===n.sn&&e.level===n.level&&this.state===C.PARSING){var i=this.tracks[this.trackId],a=this.fragCurrent;I.logger.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),b.default.updateFragPTSDTS(i.details,a.sn,e.startPTS,e.endPTS),[e.data1,e.data2].forEach(function(n){n&&(t.pendingAppending++,t.hls.trigger(g.default.BUFFER_APPENDING,{type:e.type,
data:n,parent:"audio",content:"data"}))}),this.nextLoadPosition=e.endPTS,this.tick()}}},{key:"onFragParsed",value:function(e){var t=this.fragCurrent;t&&"audio"===e.id&&e.sn===t.sn&&e.level===t.level&&this.state===C.PARSING&&(this.stats.tparsed=performance.now(),this.state=C.PARSED,this._checkAppendedParsed())}},{key:"onBufferCreated",value:function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0)}},{key:"onBufferAppended",value:function(e){if("audio"===e.parent)switch(this.state){
case C.PARSING:case C.PARSED:this.pendingAppending--,this._checkAppendedParsed()}}},{key:"_checkAppendedParsed",value:function(){if(this.state===C.PARSED&&0===this.pendingAppending){var e=this.fragCurrent,t=this.stats;if(e){this.fragPrevious=e,t.tbuffered=performance.now(),this.hls.trigger(g.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var n=this.mediaBuffer?this.mediaBuffer:this.media;I.logger.log("audio buffered : "+w.default.toString(n.buffered)),this.state=C.IDLE}this.tick()}}},{key:"onError",
value:function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){case M.ErrorDetails.FRAG_LOAD_ERROR:case M.ErrorDetails.FRAG_LOAD_TIMEOUT:if(!e.fatal){var n=this.fragLoadError;n?n++:n=1;var i=this.config;if(n<=i.fragLoadingMaxRetry){this.fragLoadError=n,t.loadCounter=0;var a=Math.min(Math.pow(2,n-1)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);I.logger.warn("audioStreamController: frag loading failed, retry in "+a+" ms"),this.retryDate=performance.now()+a,this.state=C.FRAG_LOADING_WAITING_RETRY;
}else I.logger.error("audioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.hls.trigger(g.default.ERROR,e),this.state=C.ERROR}break;case M.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case M.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case M.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case M.ErrorDetails.KEY_LOAD_ERROR:case M.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==C.ERROR&&(this.state=e.fatal?C.ERROR:C.IDLE,I.logger.warn("audioStreamController: "+e.details+" while loading frag,switch to "+this.state+" state ..."));
}}},{key:"onBufferFlushed",value:function(){this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=C.IDLE,this.fragPrevious=null,this.tick()}}]),t}(v.default);n.default=D},{20:20,24:24,25:25,26:26,28:28,29:29,39:39,43:43,45:45}],5:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,
i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),c=i(l),u=e(25),d=i(u),h=e(43),p=function(e){function t(e){return a(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,c.default.MANIFEST_LOADING,c.default.MANIFEST_LOADED,c.default.AUDIO_TRACK_LOADED))}return s(t,e),o(t,[{key:"destroy",value:function(){d.default.prototype.destroy.call(this)}},{key:"onManifestLoading",value:function(){
this.tracks=[],this.trackId=-1}},{key:"onManifestLoaded",value:function(e){var t=this,n=e.audioTracks||[],i=!1;this.tracks=n,this.hls.trigger(c.default.AUDIO_TRACKS_UPDATED,{audioTracks:n});var a=0;n.forEach(function(e){return e.default?(t.audioTrack=a,void(i=!0)):void a++}),i===!1&&n.length&&(h.logger.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)}},{key:"onAudioTrackLoaded",value:function(e){e.id<this.tracks.length&&(h.logger.log("audioTrack "+e.id+" loaded"),
this.tracks[e.id].details=e.details,e.details.live&&!this.timer&&(this.timer=setInterval(this.ontick,1e3*e.details.targetduration)),!e.details.live&&this.timer&&(clearInterval(this.timer),this.timer=null))}},{key:"setAudioTrackInternal",value:function(e){if(e>=0&&e<this.tracks.length){this.timer&&(clearInterval(this.timer),this.timer=null),this.trackId=e,h.logger.log("switching to audioTrack "+e);var t=this.tracks[e],n=t.type,i=t.url;this.hls.trigger(c.default.AUDIO_TRACK_SWITCH,{id:e,type:n,url:i
});var a=t.details;!i||void 0!==a&&a.live!==!0||(h.logger.log("(re)loading playlist for audioTrack "+e),this.hls.trigger(c.default.AUDIO_TRACK_LOADING,{url:i,id:e}))}}},{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.trackId===e&&void 0!==this.tracks[e].details||this.setAudioTrackInternal(e)}}]),t}(d.default);n.default=p},{25:25,26:26,43:43}],6:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e
}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0
}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),c=i(l),u=e(25),d=i(u),h=e(43),p=e(24),f=function(e){function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,c.default.MEDIA_ATTACHING,c.default.MEDIA_DETACHING,c.default.MANIFEST_PARSED,c.default.BUFFER_RESET,c.default.BUFFER_APPENDING,c.default.BUFFER_CODECS,c.default.BUFFER_EOS,c.default.BUFFER_FLUSHING,c.default.LEVEL_UPDATED));
return n._msDuration=null,n._levelDuration=null,n.onsbue=n.onSBUpdateEnd.bind(n),n.onsbe=n.onSBUpdateError.bind(n),n.pendingTracks={},n}return s(t,e),o(t,[{key:"destroy",value:function(){d.default.prototype.destroy.call(this)}},{key:"onManifestParsed",value:function(e){var t=e.audio,n=e.video,i=0;e.altAudio&&(t||n)&&(i=(t?1:0)+(n?1:0),h.logger.log(i+" sourceBuffer(s) expected")),this.sourceBufferNb=i}},{key:"onMediaAttaching",value:function(e){var t=this.media=e.media;if(t){var n=this.mediaSource=new MediaSource;
this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),n.addEventListener("sourceopen",this.onmso),n.addEventListener("sourceended",this.onmse),n.addEventListener("sourceclose",this.onmsc),t.src=URL.createObjectURL(n)}}},{key:"onMediaDetaching",value:function(){h.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){h.logger.warn("onMediaDetaching:"+e.message+" while calling endOfStream");
}e.removeEventListener("sourceopen",this.onmso),e.removeEventListener("sourceended",this.onmse),e.removeEventListener("sourceclose",this.onmsc),this.media&&(this.media.removeAttribute("src"),this.media.load()),this.mediaSource=null,this.media=null,this.pendingTracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(c.default.MEDIA_DETACHED)}},{key:"onMediaSourceOpen",value:function(){h.logger.log("media source opened"),
this.hls.trigger(c.default.MEDIA_ATTACHED,{media:this.media});var e=this.mediaSource;e&&e.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()}},{key:"checkPendingTracks",value:function(){var e=this.pendingTracks,t=Object.keys(e).length;t&&(this.sourceBufferNb<=t||0===this.sourceBufferNb)&&(this.createSourceBuffers(e),this.pendingTracks={},this.doAppending())}},{key:"onMediaSourceClose",value:function(){h.logger.log("media source closed")}},{key:"onMediaSourceEnded",value:function(){
h.logger.log("media source ended")}},{key:"onSBUpdateEnd",value:function(){this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1,this.hls.trigger(c.default.BUFFER_APPENDED,{parent:this.parent}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()}},{key:"onSBUpdateError",value:function(e){h.logger.error("sourceBuffer error:"+e),this.hls.trigger(c.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})}},{
key:"onBufferReset",value:function(){var e=this.sourceBuffer;for(var t in e){var n=e[t];try{this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this.onsbue),n.removeEventListener("error",this.onsbe)}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}},{key:"onBufferCodecs",value:function(e){if(0===Object.keys(this.sourceBuffer).length){for(var t in e)this.pendingTracks[t]=e[t];var n=this.mediaSource;n&&"open"===n.readyState&&this.checkPendingTracks();
}}},{key:"createSourceBuffers",value:function(e){var t=this.sourceBuffer,n=this.mediaSource;for(var i in e)if(!t[i]){var a=e[i],r=a.levelCodec||a.codec,s=a.container+";codecs="+r;h.logger.log("creating sourceBuffer("+s+")");try{var o=t[i]=n.addSourceBuffer(s);o.addEventListener("updateend",this.onsbue),o.addEventListener("error",this.onsbe),a.buffer=o}catch(e){h.logger.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(c.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_ADD_CODEC_ERROR,
fatal:!1,err:e,mimeType:s})}}this.hls.trigger(c.default.BUFFER_CREATED,{tracks:e})}},{key:"onBufferAppending",value:function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())}},{key:"onBufferAppendFail",value:function(e){h.logger.error("sourceBuffer error:"+e.event),this.hls.trigger(c.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1,frag:this.fragCurrent})}},{key:"onBufferEos",value:function(e){var t=this.sourceBuffer,n=e.type;
for(var i in t)n&&i!==n||t[i].ended||(t[i].ended=!0,h.logger.log(i+" sourceBuffer now EOS"));this.checkEos()}},{key:"checkEos",value:function(){var e=this.sourceBuffer,t=this.mediaSource;if(!t||"open"!==t.readyState)return void(this._needsEos=!1);for(var n in e){if(!e[n].ended)return;if(e[n].updating)return void(this._needsEos=!0)}h.logger.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment"),t.endOfStream(),this._needsEos=!1}},{key:"onBufferFlushing",value:function(e){
this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}),this.flushBufferCounter=0,this.doFlush()}},{key:"onLevelUpdated",value:function(e){var t=e.details;0!==t.fragments.length&&(this._levelDuration=t.totalduration+t.fragments[0].start,this.updateMediaElementDuration())}},{key:"updateMediaElementDuration",value:function(){var e=this.media,t=this.mediaSource,n=this.sourceBuffer,i=this._levelDuration;if(null!==i&&e&&t&&n&&0!==e.readyState&&"open"===t.readyState){for(var a in n)if(n[a].updating)return;
null===this._msDuration&&(this._msDuration=t.duration),i>this._msDuration&&i>e.duration&&(h.logger.log("Updating mediasource duration to "+i.toFixed(3)),this._msDuration=t.duration=i)}}},{key:"doFlush",value:function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,n=this.sourceBuffer;for(var i in n)t+=n[i].buffered.length;
this.appended=t,this.hls.trigger(c.default.BUFFER_FLUSHED)}}},{key:"doAppending",value:function(){var e=this.hls,t=this.sourceBuffer,n=this.segments;if(Object.keys(t).length){if(this.media.error)return this.segments=[],void h.logger.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(n&&n.length){var i=n.shift();try{var a=i.type;t[a]?(t[a].ended=!1,this.parent=i.parent,t[a].appendBuffer(i.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd();
}catch(t){h.logger.error("error while trying to append buffer:"+t.message),n.unshift(i);var r={type:p.ErrorTypes.MEDIA_ERROR};if(22===t.code)return this.segments=[],r.details=p.ErrorDetails.BUFFER_FULL_ERROR,void e.trigger(c.default.ERROR,r);if(this.appendError?this.appendError++:this.appendError=1,r.details=p.ErrorDetails.BUFFER_APPEND_ERROR,r.frag=this.fragCurrent,this.appendError>e.config.appendErrorMaxRetry)return h.logger.log("fail "+e.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),
n=[],r.fatal=!0,void e.trigger(c.default.ERROR,r);r.fatal=!1,e.trigger(c.default.ERROR,r)}}}}},{key:"flushBuffer",value:function(e,t,n){var i,a,r,s,o,l,c=this.sourceBuffer;if(Object.keys(c).length){if(h.logger.log("flushBuffer,pos/start/end: "+this.media.currentTime+"/"+e+"/"+t),this.flushBufferCounter<this.appended){for(var u in c)if(!n||u===n){if(i=c[u],i.ended=!1,i.updating)return h.logger.warn("cannot flush, sb updating in progress"),!1;for(a=0;a<i.buffered.length;a++)if(r=i.buffered.start(a),
s=i.buffered.end(a),navigator.userAgent.toLowerCase().indexOf("firefox")!==-1&&t===Number.POSITIVE_INFINITY?(o=e,l=t):(o=Math.max(r,e),l=Math.min(s,t)),Math.min(l,s)-o>.5)return this.flushBufferCounter++,h.logger.log("flush "+u+" ["+o+","+l+"], of ["+r+","+s+"], pos:"+this.media.currentTime),i.remove(o,l),!1}}else h.logger.warn("abort flushing too many retries");h.logger.log("buffer flushed")}return!0}}]),t}(d.default);n.default=f},{24:24,25:25,26:26,43:43}],7:[function(e,t,n){"use strict";function i(e){
return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,
writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),c=i(l),u=e(25),d=i(u),h=function(e){function t(e){return a(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,c.default.FPS_DROP_LEVEL_CAPPING,c.default.MEDIA_ATTACHING,c.default.MANIFEST_PARSED));
}return s(t,e),o(t,[{key:"destroy",value:function(){this.hls.config.capLevelToPlayerSize&&(this.media=this.restrictedLevels=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer)))}},{key:"onFpsDropLevelCapping",value:function(e){this.restrictedLevels||(this.restrictedLevels=[]),this.isLevelRestricted(e.droppedLevel)||this.restrictedLevels.push(e.droppedLevel)}},{key:"onMediaAttaching",value:function(e){this.media=e.media instanceof HTMLVideoElement?e.media:null;
}},{key:"onManifestParsed",value:function(e){this.hls.config.capLevelToPlayerSize&&(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.levels=e.levels,this.hls.firstLevel=this.getMaxLevel(e.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}},{key:"detectPlayerSize",value:function(){if(this.media){var e=this.levels?this.levels.length:0;e&&(this.hls.autoLevelCapping=this.getMaxLevel(e-1),this.hls.autoLevelCapping>this.autoLevelCapping&&this.hls.streamController.nextLevelSwitch(),
this.autoLevelCapping=this.hls.autoLevelCapping)}}},{key:"getMaxLevel",value:function(e){var t=0,n=void 0,i=void 0,a=this.mediaWidth,r=this.mediaHeight,s=0,o=0;for(n=0;n<=e&&(i=this.levels[n],!this.isLevelRestricted(n))&&(t=n,s=i.width,o=i.height,!(a<=s||r<=o));n++);return t}},{key:"isLevelRestricted",value:function(e){return!(!this.restrictedLevels||this.restrictedLevels.indexOf(e)===-1)}},{key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e}},{key:"mediaWidth",
get:function(){var e=void 0;return this.media&&(e=this.media.width||this.media.clientWidth||this.media.offsetWidth,e*=this.contentScaleFactor),e}},{key:"mediaHeight",get:function(){var e=void 0;return this.media&&(e=this.media.height||this.media.clientHeight||this.media.offsetHeight,e*=this.contentScaleFactor),e}}]),t}(d.default);n.default=h},{25:25,26:26}],8:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");
}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(42),o=i(s),l=function(){function e(t,n,i,r){a(this,e),this.hls=t,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new o.default(n),this.fast_=new o.default(i)}return r(e,[{
key:"sample",value:function(e,t){e=Math.max(e,this.minDelayMs_);var n=8e3*t/e,i=e/1e3;this.fast_.sample(i,n),this.slow_.sample(i,n)}},{key:"canEstimate",value:function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_}},{key:"getEstimate",value:function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}},{key:"destroy",value:function(){}}]),e}();n.default=l},{42:42}],9:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{
default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0
}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),c=i(l),u=e(25),d=i(u),h=e(43),p=function(e){function t(e){return a(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,c.default.MEDIA_ATTACHING));
}return s(t,e),o(t,[{key:"destroy",value:function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1}},{key:"onMediaAttaching",value:function(e){this.hls.config.capLevelOnFPSDrop&&(this.video=e.media instanceof HTMLVideoElement?e.media:null,"function"==typeof this.video.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),this.hls.config.fpsDroppedMonitoringPeriod))}},{key:"checkFPS",
value:function(e,t,n){var i=performance.now();if(t){if(this.lastTime){var a=i-this.lastTime,r=n-this.lastDroppedFrames,s=t-this.lastDecodedFrames,o=1e3*r/a;if(this.hls.trigger(c.default.FPS_DROP,{currentDropped:r,currentDecoded:s,totalDroppedFrames:n}),o>0&&r>this.hls.config.fpsDroppedMonitoringThreshold*s){var l=this.hls.currentLevel;h.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(this.hls.autoLevelCapping===-1||this.hls.autoLevelCapping>=l)&&(l-=1,this.hls.trigger(c.default.FPS_DROP_LEVEL_CAPPING,{
level:l,droppedLevel:this.hls.currentLevel}),this.hls.autoLevelCapping=l,this.hls.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}},{key:"checkFPSInterval",value:function(){if(this.video)if(this.isVideoPlaybackQualityAvailable){var e=this.video.getVideoPlaybackQuality();this.checkFPS(this.video,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(this.video,this.video.webkitDecodedFrameCount,this.video.webkitDroppedFrameCount)}}]),t}(d.default);
n.default=p},{25:25,26:26,43:43}],10:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),c=i(l),u=e(25),d=i(u),h=e(43),p=e(24),f=e(28),g=i(f),m=function(e){
function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,c.default.MANIFEST_LOADED,c.default.LEVEL_LOADED,c.default.ERROR));return n.ontick=n.tick.bind(n),n._manualLevel=n._autoLevelCapping=-1,n}return s(t,e),o(t,[{key:"destroy",value:function(){this.timer&&(clearTimeout(this.timer),this.timer=null),this._manualLevel=-1}},{key:"startLoad",value:function(){this.canload=!0,this.timer&&this.tick()}},{key:"stopLoad",value:function(){this.canload=!1}},{key:"onManifestLoaded",
value:function(e){var t,n,i=[],a=[],r={},s=!1,o=!1,l=this.hls;if(e.levels.forEach(function(e){e.videoCodec&&(s=!0),(e.audioCodec||e.attrs&&e.attrs.AUDIO)&&(o=!0);var t=r[e.bitrate];void 0===t?(r[e.bitrate]=i.length,e.url=[e.url],e.urlId=0,i.push(e)):i[t].url.push(e.url)}),s&&o?i.forEach(function(e){e.videoCodec&&a.push(e)}):a=i,a=a.filter(function(e){var t=function(e){return MediaSource.isTypeSupported("audio/mp4;codecs="+e)},n=function(e){return MediaSource.isTypeSupported("video/mp4;codecs="+e);
},i=e.audioCodec,a=e.videoCodec;return(!i||t(i))&&(!a||n(a))}),a.length){for(t=a[0].bitrate,a.sort(function(e,t){return e.bitrate-t.bitrate}),this._levels=a,n=0;n<a.length;n++)if(a[n].bitrate===t){this._firstLevel=n,h.logger.log("manifest loaded,"+a.length+" level(s) found, first bitrate:"+t);break}l.trigger(c.default.MANIFEST_PARSED,{levels:this._levels,firstLevel:this._firstLevel,stats:e.stats,audio:o,video:s,altAudio:e.audioTracks.length>0})}else l.trigger(c.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,
details:p.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:l.url,reason:"no level with compatible codecs found in manifest"})}},{key:"setLevelInternal",value:function(e){var t=this._levels;if(e>=0&&e<t.length){this.timer&&(clearTimeout(this.timer),this.timer=null),this._level!==e&&(h.logger.log("switching to level "+e),this._level=e),this.hls.trigger(c.default.LEVEL_SWITCH,{level:e});var n=t[e],i=n.details;if(!i||i.live===!0){var a=n.urlId;this.hls.trigger(c.default.LEVEL_LOADING,{url:n.url[a],
level:e,id:a})}}else this.hls.trigger(c.default.ERROR,{type:p.ErrorTypes.OTHER_ERROR,details:p.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})}},{key:"onError",value:function(e){if(!e.fatal){var t=e.details,n=this.hls,i=void 0,a=void 0,r=!1;switch(t){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:i=e.frag.level;break;case p.ErrorDetails.LEVEL_LOAD_ERROR:
case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:i=e.context.level,r=!0}if(void 0!==i)if(a=this._levels[i],a.urlId<a.url.length-1)a.urlId++,a.details=void 0,h.logger.warn("level controller,"+t+" for level "+i+": switching to redundant stream id "+a.urlId);else{var s=this._manualLevel===-1&&i;if(s)h.logger.warn("level controller,"+t+": emergency switch-down for next fragment"),n.abrController.nextAutoLevel=0;else if(a&&a.details&&a.details.live)h.logger.warn("level controller,"+t+" on live stream, discard"),
r&&(this._level=void 0);else if(t===p.ErrorDetails.LEVEL_LOAD_ERROR||t===p.ErrorDetails.LEVEL_LOAD_TIMEOUT){var o=this.hls,l=o.media,u=l&&g.default.isBuffered(l,l.currentTime)&&g.default.isBuffered(l,l.currentTime+.5);if(u){var d=o.config.levelLoadingRetryDelay;h.logger.warn("level controller,"+t+", but media buffered, retry in "+d+"ms"),this.timer=setTimeout(this.ontick,d)}else h.logger.error("cannot recover "+t+" error"),this._level=void 0,this.timer&&(clearTimeout(this.timer),this.timer=null),
e.fatal=!0,o.trigger(c.default.ERROR,e)}}}}},{key:"onLevelLoaded",value:function(e){if(e.level===this._level){var t=e.details;if(t.live){var n=1e3*(t.averagetargetduration?t.averagetargetduration:t.targetduration),i=this._levels[e.level],a=i.details;a&&t.endSN===a.endSN&&(n/=2,h.logger.log("same live playlist, reload twice faster")),n-=performance.now()-e.stats.trequest,n=Math.max(1e3,Math.round(n)),h.logger.log("live playlist, reload in "+n+" ms"),this.timer=setTimeout(this.ontick,n)}else this.timer=null;
}}},{key:"tick",value:function(){var e=this._level;if(void 0!==e&&this.canload){var t=this._levels[e],n=t.urlId;this.hls.trigger(c.default.LEVEL_LOADING,{url:t.url[n],level:e,id:n})}}},{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this._level},set:function(e){var t=this._levels;t&&t.length>e&&(this._level===e&&void 0!==t[e].details||this.setLevelInternal(e))}},{key:"manualLevel",get:function(){return this._manualLevel},set:function(e){this._manualLevel=e,void 0===this._startLevel&&(this._startLevel=e),
e!==-1&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return this._manualLevel!==-1?this._manualLevel:this.hls.abrController.nextAutoLevel},set:function(e){this.level=e,this._manualLevel===-1&&(this.hls.abrController.nextAutoLevel=e);
}}]),t}(d.default);n.default=m},{24:24,25:25,26:26,28:28,43:43}],11:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(39),c=i(l),u=e(28),d=i(u),h=e(20),p=i(h),f=e(26),g=i(f),m=e(25),v=i(m),y=e(29),b=i(y),S=e(45),w=i(S),M=e(24),I=e(43),C={
STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_LEVEL:"WAITING_LEVEL",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR"},D=function(e){function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,g.default.MEDIA_ATTACHED,g.default.MEDIA_DETACHING,g.default.MANIFEST_LOADING,g.default.MANIFEST_PARSED,g.default.LEVEL_LOADED,g.default.KEY_LOADED,g.default.FRAG_LOADED,g.default.FRAG_LOAD_EMERGENCY_ABORTED,g.default.FRAG_PARSING_INIT_SEGMENT,g.default.FRAG_PARSING_DATA,g.default.FRAG_PARSED,g.default.ERROR,g.default.AUDIO_TRACK_SWITCH,g.default.BUFFER_CREATED,g.default.BUFFER_APPENDED,g.default.BUFFER_FLUSHED));
return n.config=e.config,n.audioCodecSwap=!1,n.ticks=0,n.ontick=n.tick.bind(n),n}return s(t,e),o(t,[{key:"destroy",value:function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),v.default.prototype.destroy.call(this),this.state=C.STOPPED}},{key:"startLoad",value:function(e){if(this.levels){var t=this.media,n=this.lastCurrentTime,i=this.hls;if(this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.level=-1,this.fragLoadError=0,t&&n>0?(I.logger.log("configure startPosition @"+n.toFixed(3)),
this.lastPaused||(I.logger.log("resuming video"),t.play())):this.lastCurrentTime=this.startPosition?this.startPosition:e,!this.startFragRequested){var a=i.startLevel;a===-1&&(a=0,this.bitrateTest=!0),this.level=i.nextLoadLevel=a,this.loadedmetadata=!1}this.state=C.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else I.logger.warn("cannot start loading as manifest not parsed yet"),this.state=C.STOPPED}},{key:"stopLoad",value:function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),
this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=C.STOPPED}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){switch(this.state){case C.ERROR:break;case C.BUFFER_FLUSHING:this.fragLoadError=0;break;case C.IDLE:if(!this._doTickIdle())return;break;case C.WAITING_LEVEL:var e=this.levels[this.level];e&&e.details&&(this.state=C.IDLE);
break;case C.FRAG_LOADING_WAITING_RETRY:var t=performance.now(),n=this.retryDate;(!n||t>=n||this.media&&this.media.seeking)&&(I.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=C.IDLE);break;case C.ERROR:case C.PAUSED:case C.STOPPED:case C.FRAG_LOADING:case C.PARSING:case C.PARSED:case C.ENDED:}this._checkBuffer(),this._checkFragmentChanged()}},{key:"_doTickIdle",value:function(){var e=this.hls,t=e.config,n=this.media;if(void 0!==this.levelLastLoaded&&!n&&(this.startFragRequested||!t.startFragPrefetch))return!0;
var i=void 0;i=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var a=e.nextLoadLevel,r=this.levels[a],s=r.bitrate,o=void 0;o=s?Math.max(8*t.maxBufferSize/s,t.maxBufferLength):t.maxBufferLength,o=Math.min(o,t.maxMaxBufferLength);var l=d.default.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,i,t.maxBufferHole),c=l.len;if(c>=o)return!0;I.logger.trace("buffer length of "+c.toFixed(3)+" is below max of "+o.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=a;var u=r.details;
if("undefined"==typeof u||u.live&&this.levelLastLoaded!==a)return this.state=C.WAITING_LEVEL,!0;var h=this.fragPrevious;if(!u.live&&h&&h.sn===u.endSN&&(!n.seeking&&l.len||n.duration-l.end<=h.duration/2)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(g.default.BUFFER_EOS,p),this.state=C.ENDED,!0}return this._fetchPayloadOrEos({pos:i,bufferInfo:l,levelDetails:u})}},{key:"_fetchPayloadOrEos",value:function(e){var t=e.pos,n=e.bufferInfo,i=e.levelDetails,a=this.fragPrevious,r=this.level,s=i.fragments,o=s.length;
if(0===o)return!1;var l=s[0].start,c=s[o-1].start+s[o-1].duration,u=n.end,d=void 0;if(i.live){var h=this.config.initialLiveManifestSize;if(o<h)return I.logger.warn("Can not start playback of a level, reason: not enough fragments "+o+" < "+h),!1;if(d=this._ensureFragmentAtLivePoint({levelDetails:i,bufferEnd:u,start:l,end:c,fragPrevious:a,fragments:s,fragLen:o}),null===d)return!1}else u<l&&(d=s[0]);return d||(d=this._findFragment({start:l,fragPrevious:a,fragLen:o,fragments:s,bufferEnd:u,end:c,levelDetails:i
})),!d||this._loadFragmentOrKey({frag:d,level:r,levelDetails:i,pos:t,bufferEnd:u})}},{key:"_ensureFragmentAtLivePoint",value:function(e){var t=e.levelDetails,n=e.bufferEnd,i=e.start,a=e.end,r=e.fragPrevious,s=e.fragments,o=e.fragLen,l=this.hls.config,c=this.media,u=void 0,d=void 0!==l.liveMaxLatencyDuration?l.liveMaxLatencyDuration:l.liveMaxLatencyDurationCount*t.targetduration;if(n<Math.max(i,a-d)){var h=this.liveSyncPosition=this.computeLivePosition(i,t);I.logger.log("buffer end: "+n.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+h.toFixed(3)),
n=h,c&&c.readyState&&c.duration>h&&(c.currentTime=h)}if(t.PTSKnown&&n>a&&c&&c.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(r){var p=r.sn+1;p>=t.startSN&&p<=t.endSN&&(u=s[p-t.startSN],I.logger.log("live playlist, switching playlist, load frag with next SN: "+u.sn))}u||(u=s[Math.min(o-1,Math.round(o/2))],I.logger.log("live playlist, switching playlist, unknown, load middle frag : "+u.sn))}return u}},{key:"_findFragment",value:function(e){var t=e.start,n=e.fragPrevious,i=e.fragLen,a=e.fragments,r=e.bufferEnd,s=e.end,o=e.levelDetails,l=this.hls.config,u=void 0,d=void 0,h=l.maxFragLookUpTolerance;
if(r<s?(r>s-h&&(h=0),d=c.default.search(a,function(e){return e.start+e.duration-h<=r?1:e.start-h>r&&e.start?-1:0})):d=a[i-1],d&&(u=d,t=d.start,n&&u.level===n.level&&u.sn===n.sn))if(u.sn<o.endSN){var p=n.deltaPTS,f=u.sn-o.startSN;p&&p>l.maxBufferHole&&n.dropped&&f?(u=a[f-1],I.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),n.loadCounter--):(u=a[f+1],I.logger.log("SN just loaded, load next one: "+u.sn));
}else u=null;return u}},{key:"_loadFragmentOrKey",value:function(e){var t=e.frag,n=e.level,i=e.levelDetails,a=e.pos,r=e.bufferEnd,s=this.hls,o=s.config;if(null==t.decryptdata.uri||null!=t.decryptdata.key){if(I.logger.log("Loading "+t.sn+" of ["+i.startSN+" ,"+i.endSN+"],level "+n+", currentTime:"+a.toFixed(3)+",bufferEnd:"+r.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,t.loadCounter){t.loadCounter++;var l=o.fragLoadingLoopThreshold;if(t.loadCounter>l&&Math.abs(this.fragLoadIdx-t.loadIdx)<l)return s.trigger(g.default.ERROR,{
type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:t}),!1}else t.loadCounter=1;return t.loadIdx=this.fragLoadIdx,this.fragCurrent=t,this.startFragRequested=!0,t.autoLevel=s.autoLevelEnabled,t.bitrateTest=this.bitrateTest,s.trigger(g.default.FRAG_LOADING,{frag:t}),this.state=C.FRAG_LOADING,!0}I.logger.log("Loading key for "+t.sn+" of ["+i.startSN+" ,"+i.endSN+"],level "+n),this.state=C.KEY_LOADING,s.trigger(g.default.KEY_LOADING,{frag:t})}},{key:"getBufferRange",
value:function(e){var t,n,i=this.bufferRange;if(i)for(t=i.length-1;t>=0;t--)if(n=i[t],e>=n.start&&e<=n.end)return n;return null}},{key:"followingBufferRange",value:function(e){return e?this.getBufferRange(e.end+.5):null}},{key:"_checkFragmentChanged",value:function(){var e,t,n=this.media;if(n&&n.readyState&&n.seeking===!1&&(t=n.currentTime,t>n.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=t),d.default.isBuffered(n,t)?e=this.getBufferRange(t):d.default.isBuffered(n,t+.1)&&(e=this.getBufferRange(t+.1)),
e)){var i=e.frag;i!==this.fragPlaying&&(this.fragPlaying=i,this.hls.trigger(g.default.FRAG_CHANGED,{frag:i}))}}},{key:"immediateLevelSwitch",value:function(){if(I.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e=this.media,t=void 0;e?(t=e.paused,e.pause()):t=!0,this.previouslyPaused=t}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=C.BUFFER_FLUSHING,this.hls.trigger(g.default.BUFFER_FLUSHING,{
startOffset:0,endOffset:Number.POSITIVE_INFINITY})}},{key:"immediateLevelSwitchEnd",value:function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,d.default.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())}},{key:"nextLevelSwitch",value:function(){var e=this.media;if(e&&e.readyState){var t=void 0,n=void 0,i=void 0;if(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,n=this.getBufferRange(e.currentTime),n&&n.start>1&&(this.state=C.BUFFER_FLUSHING,
this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:n.start-1})),e.paused)t=0;else{var a=this.hls.nextLoadLevel,r=this.levels[a],s=this.fragLastKbps;t=s&&this.fragCurrent?this.fragCurrent.duration*r.bitrate/(1e3*s)+1:0}if(i=this.getBufferRange(e.currentTime+t),i&&(i=this.followingBufferRange(i))){var o=this.fragCurrent;o&&o.loader&&o.loader.abort(),this.fragCurrent=null,this.state=C.BUFFER_FLUSHING,this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:i.start,endOffset:Number.POSITIVE_INFINITY
})}}}},{key:"onMediaAttached",value:function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition)}},{key:"onMediaDetaching",value:function(){var e=this.media;e&&e.ended&&(I.logger.log("MSE detaching and video ended, reset startPosition"),
this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.loadCounter=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){var e=this.media,t=e?e.currentTime:void 0,n=this.config;
if(I.logger.log("media seeking to "+t.toFixed(3)),this.state===C.FRAG_LOADING){var i=d.default.bufferInfo(e,t,this.config.maxBufferHole),a=this.fragCurrent;if(0===i.len&&a){var r=n.maxFragLookUpTolerance,s=a.start-r,o=a.start+a.duration+r;t<s||t>o?(a.loader&&(I.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),a.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=C.IDLE):I.logger.log("seeking outside of buffer but within currently loaded fragment range");
}}else this.state===C.ENDED&&(this.state=C.IDLE);e&&(this.lastCurrentTime=t),this.state!==C.FRAG_LOADING&&void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*n.fragLoadingLoopThreshold),this.tick()}},{key:"onMediaSeeked",value:function(){I.logger.log("media seeked to "+this.media.currentTime.toFixed(3)),this.tick()}},{key:"onMediaEnded",value:function(){I.logger.log("media ended"),this.startPosition=this.lastCurrentTime=0}},{key:"onManifestLoading",value:function(){I.logger.log("trigger BUFFER_RESET"),
this.hls.trigger(g.default.BUFFER_RESET),this.bufferRange=[],this.stalled=!1,this.startPosition=this.lastCurrentTime=0}},{key:"onManifestParsed",value:function(e){var t,n=!1,i=!1;e.levels.forEach(function(e){t=e.audioCodec,t&&(t.indexOf("mp4a.40.2")!==-1&&(n=!0),t.indexOf("mp4a.40.5")!==-1&&(i=!0))}),this.audioCodecSwitch=n&&i,this.audioCodecSwitch&&I.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startLevelLoaded=!1,this.startFragRequested=!1;
var a=this.config;a.autoStartLoad&&this.hls.startLoad(a.startPosition)}},{key:"onLevelLoaded",value:function(e){var t=e.details,n=e.level,i=this.levels[n],a=t.totalduration,r=0;if(I.logger.log("level "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+a),this.levelLastLoaded=n,t.live){var s=i.details;s&&t.fragments.length>0?(b.default.mergeDetails(s,t),r=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(r,s),t.PTSKnown?I.logger.log("live playlist sliding:"+r.toFixed(3)):I.logger.log("live playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,
I.logger.log("live playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(i.details=t,this.hls.trigger(g.default.LEVEL_UPDATED,{details:t,level:n}),this.startFragRequested===!1){if(this.startPosition===-1||this.lastCurrentTime===-1){var o=t.startTimeOffset;isNaN(o)?t.live?(this.startPosition=this.computeLivePosition(r,t),I.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(o<0&&(I.logger.log("negative start time offset "+o+", count from end of last fragment"),
o=r+a+o),I.logger.log("start time offset found in playlist, adjust startPosition to "+o),this.startPosition=o)}this.nextLoadPosition=this.startPosition}this.state===C.WAITING_LEVEL&&(this.state=C.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===C.KEY_LOADING&&(this.state=C.IDLE,this.tick())}},{key:"onFragLoaded",value:function(e){var t=this.fragCurrent,n=e.frag;if(this.state===C.FRAG_LOADING&&t&&"main"===n.type&&n.level===t.level&&n.sn===t.sn){var i=e.stats,a=this.levels[t.level],r=a.details;
if(I.logger.log("Loaded  "+t.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+t.level),this.bitrateTest=!1,n.bitrateTest===!0&&this.hls.nextLoadLevel)this.state=C.IDLE,this.startFragRequested=!1,i.tparsed=i.tbuffered=performance.now(),this.hls.trigger(g.default.FRAG_BUFFERED,{stats:i,frag:t,id:"main"}),this.tick();else{this.state=C.PARSING,this.stats=i;var s=r.totalduration,o=isNaN(t.startDTS)?t.start:t.startDTS,l=t.level,c=t.sn,u=this.config.defaultAudioCodec||a.audioCodec;this.audioCodecSwap&&(I.logger.log("swapping playlist audio codec"),
void 0===u&&(u=this.lastAudioCodec),u&&(u=u.indexOf("mp4a.40.5")!==-1?"mp4a.40.2":"mp4a.40.5")),this.pendingAppending=0,I.logger.log("Parsing "+c+" of ["+r.startSN+" ,"+r.endSN+"],level "+l+", cc "+t.cc);var d=this.demuxer;d||(d=this.demuxer=new p.default(this.hls,"main"));var h=r.PTSKnown||!r.live;d.push(e.payload,u,a.videoCodec,o,t.cc,l,c,s,t.decryptdata,h)}}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(e){var t=this.fragCurrent;if(t&&"main"===e.id&&e.sn===t.sn&&e.level===t.level&&this.state===C.PARSING){
var n,i,a=e.tracks;if(a.audio&&this.altAudio&&delete a.audio,i=a.audio){var r=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();r&&this.audioCodecSwap&&(I.logger.log("swapping playlist audio codec"),r=r.indexOf("mp4a.40.5")!==-1?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==i.metadata.channelCount&&s.indexOf("firefox")===-1&&(r="mp4a.40.5"),s.indexOf("android")!==-1&&(r="mp4a.40.2",I.logger.log("Android: force audio codec to"+r)),i.levelCodec=r,i.id=e.id}if(i=a.video,i&&(i.levelCodec=this.levels[this.level].videoCodec,
i.id=e.id),e.unique){var o={codec:"",levelCodec:""};for(n in e.tracks)i=a[n],o.container=i.container,o.codec&&(o.codec+=",",o.levelCodec+=","),i.codec&&(o.codec+=i.codec),i.levelCodec&&(o.levelCodec+=i.levelCodec);a={audiovideo:o}}this.hls.trigger(g.default.BUFFER_CODECS,a);for(n in a){i=a[n],I.logger.log("main track:"+n+",container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var l=i.initSegment;l&&(this.pendingAppending++,this.hls.trigger(g.default.BUFFER_APPENDING,{type:n,
data:l,parent:"main",content:"initSegment"}))}this.tick()}}},{key:"onFragParsingData",value:function(e){var t=this,n=this.fragCurrent;if(n&&"main"===e.id&&e.sn===n.sn&&e.level===n.level&&("audio"!==e.type||!this.altAudio)&&this.state===C.PARSING){var i=this.levels[this.level],a=this.fragCurrent;I.logger.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"+(e.dropped||0));var r=b.default.updateFragPTSDTS(i.details,a.sn,e.startPTS,e.endPTS,e.startDTS,e.endDTS),s=this.hls;
s.trigger(g.default.LEVEL_PTS_UPDATED,{details:i.details,level:this.level,drift:r}),"video"===e.type&&(a.dropped=e.dropped),[e.data1,e.data2].forEach(function(n){n&&(t.pendingAppending++,s.trigger(g.default.BUFFER_APPENDING,{type:e.type,data:n,parent:"main",content:"data"}))}),this.nextLoadPosition=e.endPTS,this.bufferRange.push({type:e.type,start:e.startPTS,end:e.endPTS,frag:a}),this.tick()}}},{key:"onFragParsed",value:function(e){var t=this.fragCurrent;t&&"main"===e.id&&e.sn===t.sn&&e.level===t.level&&this.state===C.PARSING&&(this.stats.tparsed=performance.now(),
this.state=C.PARSED,this._checkAppendedParsed())}},{key:"onAudioTrackSwitch",value:function(e){var t=!!e.url;if(t)this.videoBuffer&&this.mediaBuffer!==this.videoBuffer&&(I.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=this.videoBuffer);else if(this.mediaBuffer!==this.media){I.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var n=this.fragCurrent;n.loader&&(I.logger.log("switching to main audio track, cancel main fragment load"),
n.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=C.IDLE}this.altAudio=t}},{key:"onBufferCreated",value:function(e){var t=e.tracks,n=void 0,i=void 0,a=!1;for(var r in t){var s=t[r];"main"===s.id?(i=r,n=s,"video"===r&&(this.videoBuffer=t[r].buffer)):a=!0}a&&n?(I.logger.log("alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}},{key:"onBufferAppended",
value:function(e){if("main"===e.parent)switch(this.state){case C.PARSING:case C.PARSED:this.pendingAppending--,this._checkAppendedParsed()}}},{key:"_checkAppendedParsed",value:function(){if(this.state===C.PARSED&&0===this.pendingAppending){var e=this.fragCurrent,t=this.stats;if(e){this.fragPrevious=e,t.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*t.total/(t.tbuffered-t.tfirst)),this.hls.trigger(g.default.FRAG_BUFFERED,{stats:t,frag:e,id:"main"});var n=this.mediaBuffer?this.mediaBuffer:this.media;
I.logger.log("main buffered : "+w.default.toString(n.buffered)),this.state=C.IDLE}this.tick()}}},{key:"onError",value:function(e){var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var n=this.media,i=n&&d.default.isBuffered(n,n.currentTime)&&d.default.isBuffered(n,n.currentTime+.5);switch(e.details){case M.ErrorDetails.FRAG_LOAD_ERROR:case M.ErrorDetails.FRAG_LOAD_TIMEOUT:case M.ErrorDetails.KEY_LOAD_ERROR:case M.ErrorDetails.KEY_LOAD_TIMEOUT:if(!e.fatal){var a=this.fragLoadError;a?a++:a=1;var r=this.config;
if(a<=r.fragLoadingMaxRetry||i||t.autoLevel&&t.level){this.fragLoadError=a,t.loadCounter=0;var s=Math.min(Math.pow(2,a-1)*r.fragLoadingRetryDelay,r.fragLoadingMaxRetryTimeout);I.logger.warn("mediaController: frag loading failed, retry in "+s+" ms"),this.retryDate=performance.now()+s,this.state=C.FRAG_LOADING_WAITING_RETRY}else I.logger.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.hls.trigger(g.default.ERROR,e),this.state=C.ERROR}break;case M.ErrorDetails.FRAG_LOOP_LOADING_ERROR:
e.fatal||(i?(this._reduceMaxBufferLength(t.duration),this.state=C.IDLE):t.autoLevel&&0!==t.level||(e.fatal=!0,this.hls.trigger(g.default.ERROR,e),this.state=C.ERROR));break;case M.ErrorDetails.LEVEL_LOAD_ERROR:case M.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==C.ERROR&&(e.fatal?(this.state=C.ERROR,I.logger.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):this.state===C.WAITING_LEVEL&&(this.state=C.IDLE));break;case M.ErrorDetails.BUFFER_FULL_ERROR:this.state!==C.PARSING&&this.state!==C.PARSED||(i?(this._reduceMaxBufferLength(t.duration),
this.state=C.IDLE):(I.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.state=C.PAUSED,this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY})))}}}},{key:"_reduceMaxBufferLength",value:function(e){var t=this.config;t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,I.logger.warn("reduce max buffer length to "+t.maxMaxBufferLength+"s and switch to IDLE state"),this.fragLoadIdx+=2*t.fragLoadingLoopThreshold);
}},{key:"_checkBuffer",value:function(){var e=this.media;if(e&&e.readyState){var t=e.currentTime,n=e.buffered;if(!this.loadedmetadata&&n.length){this.loadedmetadata=!0;var i=this.startPosition,a=d.default.isBuffered(e,i);t===i&&a||(I.logger.log("target start position:"+i),a||(i=n.start(0),I.logger.log("target start position not buffered, seek to buffered.start(0) "+i)),I.logger.log("adjust currentTime from "+t+" to "+i),e.currentTime=i)}else if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{
var r=d.default.bufferInfo(e,t,0),s=!(e.paused||e.ended||0===e.buffered.length),o=.5,l=t>e.playbackRate*this.lastCurrentTime,c=this.config;if(this.stalled&&l&&(this.stalled=!1,I.logger.log("playback not stuck anymore @"+t)),s&&r.len<=o&&(l?(o=0,this.seekHoleNudgeDuration=0):this.stalled?this.seekHoleNudgeDuration+=c.seekHoleNudgeDuration:(this.seekHoleNudgeDuration=0,I.logger.log("playback seems stuck @"+t),this.hls.trigger(g.default.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_STALLED_ERROR,
fatal:!1}),this.stalled=!0),r.len<=o)){var u=r.nextStart,h=u-t;if(u&&h<c.maxSeekHole&&h>0){I.logger.log("adjust currentTime from "+e.currentTime+" to next buffered @ "+u+" + nudge "+this.seekHoleNudgeDuration);var p=u+this.seekHoleNudgeDuration-e.currentTime;e.currentTime=u+this.seekHoleNudgeDuration,this.hls.trigger(g.default.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,hole:p})}}}}}},{key:"onFragLoadEmergencyAborted",value:function(){this.state=C.IDLE,
this.loadedmetadata||(this.startFragRequested=!1),this.tick()}},{key:"onBufferFlushed",value:function(){var e=this.mediaBuffer?this.mediaBuffer:this.media,t=this.bufferRange,n=[],i=void 0,a=void 0;for(a=0;a<t.length;a++)i=t[a],d.default.isBuffered(e,(i.start+i.end)/2)&&n.push(i);this.bufferRange=n,this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=C.IDLE,this.fragPrevious=null}},{key:"swapAudioCodec",value:function(){this.audioCodecSwap=!this.audioCodecSwap}},{key:"computeLivePosition",
value:function(e,t){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-n)}},{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,I.logger.log("engine state transition from "+t+" to "+e),this.hls.trigger(g.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferRange(e.currentTime);
if(t)return t.frag.level}return-1}},{key:"nextBufferRange",get:function(){var e=this.media;return e?this.followingBufferRange(this.getBufferRange(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferRange;return e?e.frag.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}]),t}(v.default);n.default=D},{20:20,24:24,25:25,26:26,28:28,29:29,39:39,43:43,45:45}],12:[function(e,t,n){"use strict";function i(e){
return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,
writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),c=i(l),u=e(25),d=i(u),h=e(40),p=i(h),f=function(e){function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,c.default.MEDIA_ATTACHING,c.default.MEDIA_DETACHING,c.default.FRAG_PARSING_USERDATA,c.default.MANIFEST_LOADING,c.default.FRAG_LOADED,c.default.LEVEL_SWITCH));
if(n.hls=e,n.config=e.config,n.enabled=!0,n.Cues=e.config.cueHandler,n.config.enableCEA708Captions){var i=n,s={newCue:function(e,t,n){if(!i.textTrack1){var a=i.getExistingTrack("1");if(a){i.textTrack1=a,i.clearCurrentCues(i.textTrack1);var r=new window.Event("addtrack");r.track=i.textTrack1,i.media.dispatchEvent(r)}else i.textTrack1=i.createTextTrack("captions","English","en"),i.textTrack1.textTrack1=!0}i.Cues.newCue(i.textTrack1,e,t,n)}},o={newCue:function(e,t,n){if(!i.textTrack2){var a=i.getExistingTrack("2");
if(a){i.textTrack2=a,i.clearCurrentCues(i.textTrack2);var r=new window.Event("addtrack");r.track=i.textTrack2,i.media.dispatchEvent(r)}else i.textTrack2=i.createTextTrack("captions","Spanish","es"),i.textTrack2.textTrack2=!0}i.Cues.newCue(i.textTrack2,e,t,n)}};n.cea608Parser=new p.default(0,s,o)}return n}return s(t,e),o(t,[{key:"clearCurrentCues",value:function(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}},{key:"getExistingTrack",value:function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){
var i=t.textTracks[n],a="textTrack"+e;if(i[a]===!0)return i}return null}},{key:"createTextTrack",value:function(e,t,n){if(this.media)return this.media.addTextTrack(e,t,n)}},{key:"destroy",value:function(){d.default.prototype.destroy.call(this)}},{key:"onMediaAttaching",value:function(e){this.media=e.media}},{key:"onMediaDetaching",value:function(){}},{key:"onManifestLoading",value:function(){this.lastPts=Number.NEGATIVE_INFINITY}},{key:"onLevelSwitch",value:function(){"NONE"===this.hls.currentLevel.closedCaptions?this.enabled=!1:this.enabled=!0;
}},{key:"onFragLoaded",value:function(e){if("main"===e.frag.type){var t=e.frag.start;t<=this.lastPts&&(this.clearCurrentCues(this.textTrack1),this.clearCurrentCues(this.textTrack2)),this.lastPts=t}}},{key:"onFragParsingUserdata",value:function(e){if(this.enabled&&this.config.enableCEA708Captions)for(var t=0;t<e.samples.length;t++){var n=this.extractCea608Data(e.samples[t].bytes);this.cea608Parser.addData(e.samples[t].pts,n)}}},{key:"extractCea608Data",value:function(e){for(var t,n,i,a,r,s=31&e[0],o=2,l=[],c=0;c<s;c++)t=e[o++],
n=127&e[o++],i=127&e[o++],a=0!==(4&t),r=3&t,0===n&&0===i||a&&0===r&&(l.push(n),l.push(i));return l}}]),t}(d.default);n.default=f},{25:25,26:26,40:40}],13:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i);
}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){i(this,e),this._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],this._precompute();var n,a,r,s,o,l=this._tables[0][4],c=this._tables[1],u=t.length,d=1;if(4!==u&&6!==u&&8!==u)throw new Error("Invalid aes key size="+u);for(s=t.slice(0),o=[],this._key=[s,o],n=u;n<4*u+28;n++)r=s[n-1],(n%u===0||8===u&&n%u===4)&&(r=l[r>>>24]<<24^l[r>>16&255]<<16^l[r>>8&255]<<8^l[255&r],n%u===0&&(r=r<<8^r>>>24^d<<24,d=d<<1^283*(d>>7))),
s[n]=s[n-u]^r;for(a=0;n;a++,n--)r=s[3&a?n:n-4],n<=4||a<4?o[a]=r:o[a]=c[0][l[r>>>24]]^c[1][l[r>>16&255]]^c[2][l[r>>8&255]]^c[3][l[255&r]]}return a(e,[{key:"_precompute",value:function(){var e,t,n,i,a,r,s,o,l,c=this._tables[0],u=this._tables[1],d=c[4],h=u[4],p=[],f=[];for(e=0;e<256;e++)f[(p[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!d[t];t^=i||1,n=f[n]||1)for(s=n^n<<1^n<<2^n<<3^n<<4,s=s>>8^255&s^99,d[t]=s,h[s]=t,r=p[a=p[i=p[t]]],l=16843009*r^65537*a^257*i^16843008*t,o=257*p[s]^16843008*s,e=0;e<4;e++)c[e][t]=o=o<<24^o>>>8,
u[e][s]=l=l<<24^l>>>8;for(e=0;e<5;e++)c[e]=c[e].slice(0),u[e]=u[e].slice(0)}},{key:"decrypt",value:function(e,t,n,i,a,r){var s,o,l,c,u=this._key[1],d=e^u[0],h=i^u[1],p=n^u[2],f=t^u[3],g=u.length/4-2,m=4,v=this._tables[1],y=v[0],b=v[1],S=v[2],w=v[3],M=v[4];for(c=0;c<g;c++)s=y[d>>>24]^b[h>>16&255]^S[p>>8&255]^w[255&f]^u[m],o=y[h>>>24]^b[p>>16&255]^S[f>>8&255]^w[255&d]^u[m+1],l=y[p>>>24]^b[f>>16&255]^S[d>>8&255]^w[255&h]^u[m+2],f=y[f>>>24]^b[d>>16&255]^S[h>>8&255]^w[255&p]^u[m+3],m+=4,d=s,h=o,p=l;for(c=0;c<4;c++)a[(3&-c)+r]=M[d>>>24]<<24^M[h>>16&255]<<16^M[p>>8&255]<<8^M[255&f]^u[m++],
s=d,d=h,h=p,p=f,f=s}}]),e}();n.default=r},{}],14:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),
i&&e(t,i),t}}(),s=e(13),o=i(s),l=function(){function e(t,n){a(this,e),this.key=t,this.iv=n}return r(e,[{key:"ntoh",value:function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}},{key:"doDecrypt",value:function(e,t,n){var i,a,r,s,l,c,u,d,h,p=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),f=new o.default(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),m=new Int32Array(g.buffer);for(i=~~n[0],a=~~n[1],r=~~n[2],s=~~n[3],h=0;h<p.length;h+=4)l=~~this.ntoh(p[h]),c=~~this.ntoh(p[h+1]),
u=~~this.ntoh(p[h+2]),d=~~this.ntoh(p[h+3]),f.decrypt(l,c,u,d,m,h),m[h]=this.ntoh(m[h]^i),m[h+1]=this.ntoh(m[h+1]^a),m[h+2]=this.ntoh(m[h+2]^r),m[h+3]=this.ntoh(m[h+3]^s),i=l,a=c,r=u,s=d;return g}},{key:"localDecrypt",value:function(e,t,n,i){var a=this.doDecrypt(e,t,n);i.set(a,e.byteOffset)}},{key:"decrypt",value:function(e){var t=32e3,n=new Int32Array(e),i=new Uint8Array(e.byteLength),a=0,r=this.key,s=this.iv;for(this.localDecrypt(n.subarray(a,a+t),r,s,i),a=t;a<n.length;a+=t)s=new Uint32Array([this.ntoh(n[a-4]),this.ntoh(n[a-3]),this.ntoh(n[a-2]),this.ntoh(n[a-1])]),
this.localDecrypt(n.subarray(a,a+t),r,s,i);return i}}]),e}();n.default=l},{13:13}],15:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){
return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(14),o=i(s),l=e(24),c=e(43),u=function(){function e(t){a(this,e),this.hls=t;try{var n=window?window.crypto:crypto;this.subtle=n.subtle||n.webkitSubtle,this.disableWebCrypto=!this.subtle}catch(e){this.disableWebCrypto=!0}}return r(e,[{key:"destroy",value:function(){}},{key:"decrypt",value:function(e,t,n,i){this.disableWebCrypto&&this.hls.config.enableSoftwareAES?this.decryptBySoftware(e,t,n,i):this.decryptByWebCrypto(e,t,n,i)}},{key:"decryptByWebCrypto",
value:function(e,t,n,i){var a=this;c.logger.log("decrypting by WebCrypto API"),this.subtle.importKey("raw",t,{name:"AES-CBC",length:128},!1,["decrypt"]).then(function(r){a.subtle.decrypt({name:"AES-CBC",iv:n.buffer},r,e).then(i).catch(function(r){a.onWebCryptoError(r,e,t,n,i)})}).catch(function(r){a.onWebCryptoError(r,e,t,n,i)})}},{key:"decryptBySoftware",value:function(e,t,n,i){c.logger.log("decrypting by JavaScript Implementation");var a=new DataView(t.buffer),r=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]);
a=new DataView(n.buffer);var s=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]),l=new o.default(r,s);i(l.decrypt(e).buffer)}},{key:"onWebCryptoError",value:function(e,t,n,i,a){this.hls.config.enableSoftwareAES?(c.logger.log("disabling to use WebCrypto API"),this.disableWebCrypto=!0,this.decryptBySoftware(t,n,i,a)):(c.logger.error("decrypting error : "+e.message),this.hls.trigger(Event.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,
reason:e.message}))}}]),e}();n.default=u},{14:14,24:24,43:43}],16:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),
i&&e(t,i),t}}(),s=e(17),o=i(s),l=e(43),c=e(22),u=i(c),d=function(){function e(t,n,i,r){a(this,e),this.observer=t,this.id=n,this.remuxerClass=i,this.config=r,this.remuxer=new this.remuxerClass(t,n,r),this.insertDiscontinuity()}return r(e,[{key:"insertDiscontinuity",value:function(){this._aacTrack={container:"audio/adts",type:"audio",id:-1,sequenceNumber:0,samples:[],len:0}}},{key:"push",value:function(e,t,n,i,a,r,s,c,d){var h,p,f,g,m,v,y,b,S,w,M=new u.default(e),I=90*M.timeStamp,C=!1;for(a!==this.lastCC?(l.logger.log(this.id+" discontinuity detected"),
this.lastCC=a,this.insertDiscontinuity(),this.remuxer.switchLevel(),this.remuxer.insertDiscontinuity()):r!==this.lastLevel?(l.logger.log("audio track switch detected"),this.lastLevel=r,this.remuxer.switchLevel(),this.insertDiscontinuity()):s===this.lastSN+1&&(C=!0),h=this._aacTrack,this.lastSN=s,this.lastLevel=r,v=M.length,S=e.length;v<S-1&&(255!==e[v]||240!==(240&e[v+1]));v++);for(h.audiosamplerate||(p=o.default.getAudioConfig(this.observer,e,v,t),h.config=p.config,h.audiosamplerate=p.samplerate,
h.channelCount=p.channelCount,h.codec=p.codec,h.duration=c,l.logger.log("parsed codec:"+h.codec+",rate:"+p.samplerate+",nb channel:"+p.channelCount)),m=0,g=9216e4/h.audiosamplerate;v+5<S&&(y=1&e[v+1]?7:9,f=(3&e[v+3])<<11|e[v+4]<<3|(224&e[v+5])>>>5,f-=y,f>0&&v+y+f<=S);)for(b=I+m*g,w={unit:e.subarray(v+y,v+y+f),pts:b,dts:b},h.samples.push(w),h.len+=f,v+=f+y,m++;v<S-1&&(255!==e[v]||240!==(240&e[v+1]));v++);this.remuxer.remux(r,s,this._aacTrack,{samples:[]},{samples:[{pts:I,dts:I,unit:M.payload}]},{samples:[]
},i,C,d)}},{key:"destroy",value:function(){}}],[{key:"probe",value:function(e){var t,n,i=new u.default(e);if(i.hasTimeStamp)for(t=i.length,n=e.length;t<n-1;t++)if(255===e[t]&&240===(240&e[t+1]))return!0;return!1}}]),e}();n.default=d},{17:17,22:22,43:43}],17:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(43),s=e(24),o=function(){function e(){i(this,e)}return a(e,null,[{key:"getAudioConfig",value:function(e,t,n,i){var a,o,l,c,u,d=navigator.userAgent.toLowerCase(),h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return a=((192&t[n+2])>>>6)+1,o=(60&t[n+2])>>>2,o>h.length-1?void e.trigger(Event.ERROR,{
type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+o}):(c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,r.logger.log("manifest codec:"+i+",ADTS data:type:"+a+",sampleingIndex:"+o+"["+h[o]+"Hz],channelConfig:"+c),/firefox|OPR/i.test(d)?o>=6?(a=5,u=new Array(4),l=o-3):(a=2,u=new Array(2),l=o):d.indexOf("android")!==-1?(a=2,u=new Array(2),l=o):(a=5,u=new Array(4),i&&(i.indexOf("mp4a.40.29")!==-1||i.indexOf("mp4a.40.5")!==-1)||!i&&o>=6?l=o-3:((i&&i.indexOf("mp4a.40.2")!==-1&&o>=6&&1===c||!i&&1===c)&&(a=2,
u=new Array(2)),l=o)),u[0]=a<<3,u[0]|=(14&o)>>1,u[1]|=(1&o)<<7,u[1]|=c<<3,5===a&&(u[1]|=(14&l)>>1,u[2]=(1&l)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:h[o],channelCount:c,codec:"mp4a.40."+a})}}]),e}();n.default=o},{24:24,43:43}],18:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){
var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(26),o=i(s),l=e(24),c=e(16),u=i(c),d=e(23),h=i(d),p=e(36),f=i(p),g=e(37),m=i(g),v=function(){function e(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;a(this,e),this.hls=t,this.id=n,this.config=this.hls.config||r,this.typeSupported=i}return r(e,[{key:"destroy",value:function(){var e=this.demuxer;
e&&e.destroy()}},{key:"push",value:function(e,t,n,i,a,r,s,c,d){var p=this.demuxer;if(!p){var g=this.hls,v=this.id;if(h.default.probe(e))p=this.typeSupported.mp2t===!0?new h.default(g,v,m.default,this.config):new h.default(g,v,f.default,this.config);else{if(!u.default.probe(e))return void g.trigger(o.default.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,id:v,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});p=new u.default(g,v,f.default,this.config)}this.demuxer=p;
}p.push(e,t,n,i,a,r,s,c,d)}}]),e}();n.default=v},{16:16,23:23,24:24,26:26,36:36,37:37}],19:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=e(18),r=i(a),s=e(26),o=i(s),l=e(43),c=e(1),u=i(c),d=function(e){var t=new u.default;t.trigger=function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];t.emit.apply(t,[e,e].concat(i))},t.off=function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];
t.removeListener.apply(t,[e].concat(i))};var n=function(t,n){e.postMessage({event:t,data:n})};e.addEventListener("message",function(i){var a=i.data;switch(a.cmd){case"init":var s=JSON.parse(a.config);e.demuxer=new r.default(t,a.id,a.typeSupported,s);try{(0,l.enableLogs)(s.debug)}catch(e){console.warn("demuxerWorker: unable to enable logs")}n("init",null);break;case"demux":e.demuxer.push(new Uint8Array(a.data),a.audioCodec,a.videoCodec,a.timeOffset,a.cc,a.level,a.sn,a.duration,a.accurateTimeOffset);
}}),t.on(o.default.FRAG_PARSING_INIT_SEGMENT,n),t.on(o.default.FRAG_PARSED,n),t.on(o.default.ERROR,n),t.on(o.default.FRAG_PARSING_METADATA,n),t.on(o.default.FRAG_PARSING_USERDATA,n),t.on(o.default.FRAG_PARSING_DATA,function(t,n){var i=n.data1.buffer,a=n.data2.buffer;delete n.data1,delete n.data2,e.postMessage({event:t,data:n,data1:i,data2:a},[i,a])})};n.default=d},{1:1,18:18,26:26,43:43}],20:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");
}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(26),o=i(s),l=e(18),c=i(l),u=e(19),d=i(u),h=e(43),p=e(15),f=i(p),g=e(24),m=function(){function t(n,i){a(this,t),this.hls=n,this.id=i;var r={mp4:MediaSource.isTypeSupported("video/mp4"),mp2t:n.config.enableMP2TPassThrough&&MediaSource.isTypeSupported("video/mp2t")
};if(n.config.enableWorker&&"undefined"!=typeof Worker){h.logger.log("demuxing in webworker");var s=void 0;try{var l=e(2);s=this.w=l(d.default),this.onwmsg=this.onWorkerMessage.bind(this),s.addEventListener("message",this.onwmsg),s.onerror=function(e){n.trigger(o.default.ERROR,{type:g.ErrorTypes.OTHER_ERROR,details:g.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:e.message+" ("+e.filename+":"+e.lineno+")"}})},s.postMessage({cmd:"init",typeSupported:r,id:i,config:JSON.stringify(n.config)
})}catch(e){h.logger.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),s&&URL.revokeObjectURL(s.objectURL),this.demuxer=new c.default(n,i,r)}}else this.demuxer=new c.default(n,i,r);this.demuxInitialized=!0}return r(t,[{key:"destroy",value:function(){var e=this.w;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var n=this.decrypter;n&&(n.destroy(),this.decrypter=null)}},{key:"pushDecrypted",
value:function(e,t,n,i,a,r,s,o,l){var c=this.w;if(c)c.postMessage({cmd:"demux",data:e,audioCodec:t,videoCodec:n,timeOffset:i,cc:a,level:r,sn:s,duration:o,accurateTimeOffset:l},[e]);else{var u=this.demuxer;u&&u.push(new Uint8Array(e),t,n,i,a,r,s,o,l)}}},{key:"push",value:function(e,t,n,i,a,r,s,o,l,c){if(e.byteLength>0&&null!=l&&null!=l.key&&"AES-128"===l.method){null==this.decrypter&&(this.decrypter=new f.default(this.hls));var u=this;this.decrypter.decrypt(e,l.key,l.iv,function(e){u.pushDecrypted(e,t,n,i,a,r,s,o,c);
})}else this.pushDecrypted(e,t,n,i,a,r,s,o,c)}},{key:"onWorkerMessage",value:function(e){var t=e.data,n=this.hls;switch(t.event){case"init":URL.revokeObjectURL(this.w.objectURL);break;case o.default.FRAG_PARSING_DATA:t.data.data1=new Uint8Array(t.data1),t.data.data2=new Uint8Array(t.data2);default:n.trigger(t.event,t.data)}}}]),t}();n.default=m},{15:15,18:18,19:19,2:2,24:24,26:26,43:43}],21:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");
}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(43),s=function(){function e(t){i(this,e),this.data=t,this.bytesAvailable=this.data.byteLength,this.word=0,this.bitsAvailable=0}return a(e,[{key:"loadWord",value:function(){var e=this.data.byteLength-this.bytesAvailable,t=new Uint8Array(4),n=Math.min(4,this.bytesAvailable);
if(0===n)throw new Error("no bytes available");t.set(this.data.subarray(e,e+n)),this.word=new DataView(t.buffer).getUint32(0),this.bitsAvailable=8*n,this.bytesAvailable-=n}},{key:"skipBits",value:function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}},{key:"readBits",value:function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&r.logger.error("Cannot read more than 32 bits at a time"),
this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}},{key:"skipLZ",value:function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!==(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){
var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}},{key:"skipScalingList",value:function(e){var t,n,i=8,a=8;for(t=0;t<e;t++)0!==a&&(n=this.readEG(),a=(i+n+256)%256),i=0===a?i:a;
}},{key:"readSPS",value:function(){var e,t,n,i,a,r,s,o,l,c=0,u=0,d=0,h=0,p=1;if(this.readUByte(),e=this.readUByte(),t=this.readBits(5),this.skipBits(3),n=this.readUByte(),this.skipUEG(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var f=this.readUEG();if(3===f&&this.skipBits(1),this.skipUEG(),this.skipUEG(),this.skipBits(1),this.readBoolean())for(o=3!==f?8:12,l=0;l<o;l++)this.readBoolean()&&(l<6?this.skipScalingList(16):this.skipScalingList(64))}this.skipUEG();var g=this.readUEG();
if(0===g)this.readUEG();else if(1===g)for(this.skipBits(1),this.skipEG(),this.skipEG(),i=this.readUEG(),l=0;l<i;l++)this.skipEG();if(this.skipUEG(),this.skipBits(1),a=this.readUEG(),r=this.readUEG(),s=this.readBits(1),0===s&&this.skipBits(1),this.skipBits(1),this.readBoolean()&&(c=this.readUEG(),u=this.readUEG(),d=this.readUEG(),h=this.readUEG()),this.readBoolean()&&this.readBoolean()){var m=void 0,v=this.readUByte();switch(v){case 1:m=[1,1];break;case 2:m=[12,11];break;case 3:m=[10,11];break;case 4:
m=[16,11];break;case 5:m=[40,33];break;case 6:m=[24,11];break;case 7:m=[20,11];break;case 8:m=[32,11];break;case 9:m=[80,33];break;case 10:m=[18,11];break;case 11:m=[15,11];break;case 12:m=[64,33];break;case 13:m=[160,99];break;case 14:m=[4,3];break;case 15:m=[3,2];break;case 16:m=[2,1];break;case 255:m=[this.readUByte()<<8|this.readUByte(),this.readUByte()<<8|this.readUByte()]}m&&(p=m[0]/m[1])}return{width:Math.ceil((16*(a+1)-2*c-2*u)*p),height:(2-s)*(r+1)*16-(s?2:4)*(d+h)}}},{key:"readSliceType",
value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}}]),e}();n.default=s},{43:43}],22:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),
i&&e(t,i),t}}(),r=e(43),s=function(){function e(t){i(this,e),this._hasTimeStamp=!1;for(var n,a,s,o,l,c,u,d,h=0;;)if(u=this.readUTF(t,h,3),h+=3,"ID3"===u)h+=3,n=127&t[h++],a=127&t[h++],s=127&t[h++],o=127&t[h++],l=(n<<21)+(a<<14)+(s<<7)+o,c=h+l,this._parseID3Frames(t,h,c),h=c;else{if("3DI"!==u)return h-=3,d=h,void(d&&(this.hasTimeStamp||r.logger.warn("ID3 tag found, but no timestamp"),this._length=d,this._payload=t.subarray(0,d)));h+=7,r.logger.log("3DI footer found, end: "+h)}}return a(e,[{key:"readUTF",
value:function(e,t,n){var i="",a=t,r=t+n;do i+=String.fromCharCode(e[a++]);while(a<r);return i}},{key:"_parseID3Frames",value:function(e,t,n){for(var i,a,s,o,l;t+8<=n;)switch(i=this.readUTF(e,t,4),t+=4,a=e[t++]<<24+e[t++]<<16+e[t++]<<8+e[t++],o=e[t++]<<8+e[t++],s=t,i){case"PRIV":if("com.apple.streaming.transportStreamTimestamp"===this.readUTF(e,t,44)){t+=44,t+=4;var c=1&e[t++];this._hasTimeStamp=!0,l=((e[t++]<<23)+(e[t++]<<15)+(e[t++]<<7)+e[t++])/45,c&&(l+=47721858.84),l=Math.round(l),r.logger.trace("ID3 timestamp found: "+l),
this._timeStamp=l}}}},{key:"hasTimeStamp",get:function(){return this._hasTimeStamp}},{key:"timeStamp",get:function(){return this._timeStamp}},{key:"length",get:function(){return this._length}},{key:"payload",get:function(){return this._payload}}]),e}();n.default=s},{43:43}],23:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});
var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(17),o=i(s),l=e(26),c=i(l),u=e(21),d=i(u),h=e(43),p=e(24),f=function(){function e(t,n,i,r){a(this,e),this.observer=t,this.id=n,this.remuxerClass=i,this.config=r,this.lastCC=0,this.remuxer=new this.remuxerClass(t,n,r)}return r(e,[{key:"switchLevel",value:function(){
this.pmtParsed=!1,this._pmtId=-1,this._avcTrack={container:"video/mp2t",type:"video",id:-1,sequenceNumber:0,samples:[],len:0,dropped:0},this._aacTrack={container:"video/mp2t",type:"audio",id:-1,sequenceNumber:0,samples:[],len:0},this._id3Track={type:"id3",id:-1,sequenceNumber:0,samples:[],len:0},this._txtTrack={type:"text",id:-1,sequenceNumber:0,samples:[],len:0},this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.remuxer.switchLevel()}},{key:"insertDiscontinuity",value:function(){
this.switchLevel(),this.remuxer.insertDiscontinuity()}},{key:"push",value:function(e,t,n,i,a,r,s,o,l){var u,d,f,g,m,v,y=e.length,b=this.remuxer.passthrough,S=!1;this.audioCodec=t,this.videoCodec=n,this._duration=o,this.contiguous=!1,this.accurateTimeOffset=l,a!==this.lastCC&&(h.logger.log("discontinuity detected"),this.insertDiscontinuity(),this.lastCC=a),r!==this.lastLevel?(h.logger.log("level switch detected"),this.switchLevel(),this.lastLevel=r):s===this.lastSN+1&&(this.contiguous=!0),this.lastSN=s;
var w=this.pmtParsed,M=this._avcTrack,I=this._aacTrack,C=this._id3Track,D=M.id,T=I.id,x=C.id,P=this._pmtId,E=M.pesData,A=I.pesData,L=C.pesData,k=this._parsePAT,N=this._parsePMT,_=this._parsePES,O=this._parseAVCPES.bind(this),R=this._parseAACPES.bind(this),j=this._parseID3PES.bind(this);for(y-=y%188,u=0;u<y;u+=188)if(71===e[u]){if(d=!!(64&e[u+1]),f=((31&e[u+1])<<8)+e[u+2],g=(48&e[u+3])>>4,g>1){if(m=u+5+e[u+4],m===u+188)continue}else m=u+4;switch(f){case D:if(d){if(E&&(v=_(E))&&(O(v,!1),b&&M.codec&&(T===-1||I.codec)))return void this.remux(r,s,e,i);
E={data:[],size:0}}E&&(E.data.push(e.subarray(m,u+188)),E.size+=u+188-m);break;case T:if(d){if(A&&(v=_(A))&&(R(v),b&&I.codec&&(D===-1||M.codec)))return void this.remux(r,s,e,i);A={data:[],size:0}}A&&(A.data.push(e.subarray(m,u+188)),A.size+=u+188-m);break;case x:d&&(L&&(v=_(L))&&j(v),L={data:[],size:0}),L&&(L.data.push(e.subarray(m,u+188)),L.size+=u+188-m);break;case 0:d&&(m+=e[m]+1),P=this._pmtId=k(e,m);break;case P:d&&(m+=e[m]+1);var z=N(e,m);D=z.avc,D>0&&(M.id=D),T=z.aac,T>0&&(I.id=T),x=z.id3,
x>0&&(C.id=x),S&&!w&&(h.logger.log("reparse from beginning"),S=!1,u=-188),w=this.pmtParsed=!0;break;case 17:case 8191:break;default:S=!0}}else this.observer.trigger(c.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,id:this.id,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});E&&(v=_(E))?(O(v,!0),M.pesData=null):M.pesData=E,A&&(v=_(A))?(R(v),I.pesData=null):(A&&A.size&&h.logger.log("last AAC PES packet truncated,might overlap between fragments"),I.pesData=A),
L&&(v=_(L))?(j(v),C.pesData=null):C.pesData=L,this.remux(r,s,null,i)}},{key:"remux",value:function(e,t,n,i){var a=this._avcTrack,r=a.samples,s=r.reduce(function(e,t){var n=t.units.units.reduce(function(e,t){return{len:e.len+t.data.length,nbNalu:e.nbNalu+1}},{len:0,nbNalu:0});return t.length=n.len,{len:e.len+n.len,nbNalu:e.nbNalu+n.nbNalu}},{len:0,nbNalu:0});a.len=s.len,a.nbNalu=s.nbNalu,this.remuxer.remux(e,t,this._aacTrack,this._avcTrack,this._id3Track,this._txtTrack,i,this.contiguous,this.accurateTimeOffset,n);
}},{key:"destroy",value:function(){this.switchLevel(),this._initPTS=this._initDTS=void 0,this._duration=0}},{key:"_parsePAT",value:function(e,t){return(31&e[t+10])<<8|e[t+11]}},{key:"_parsePMT",value:function(e,t){var n,i,a,r,s={aac:-1,avc:-1,id3:-1};for(n=(15&e[t+1])<<8|e[t+2],i=t+3+n-4,a=(15&e[t+10])<<8|e[t+11],t+=12+a;t<i;){switch(r=(31&e[t+1])<<8|e[t+2],e[t]){case 15:s.aac===-1&&(s.aac=r);break;case 21:s.id3===-1&&(s.id3=r);break;case 27:s.avc===-1&&(s.avc=r);break;case 36:h.logger.warn("HEVC stream type found, not supported for now");
break;default:h.logger.log("unkown stream type:"+e[t])}t+=((15&e[t+3])<<8|e[t+4])+5}return s}},{key:"_parsePES",value:function(e){var t,n,i,a,r,s,o,l,c,u=0,d=e.data;if(!e||0===e.size)return null;for(;d[0].length<19&&d.length>1;){var h=new Uint8Array(d[0].length+d[1].length);h.set(d[0]),h.set(d[1],d[0].length),d[0]=h,d.splice(1,1)}if(t=d[0],i=(t[0]<<16)+(t[1]<<8)+t[2],1===i){if(a=(t[4]<<8)+t[5],a&&a>e.size-6)return null;for(n=t[7],192&n&&(o=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,
o>4294967295&&(o-=8589934592),64&n?(l=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,l>4294967295&&(l-=8589934592)):l=o),r=t[8],c=r+9,e.size-=c,s=new Uint8Array(e.size);d.length;){t=d.shift();var p=t.byteLength;if(c){if(c>p){c-=p;continue}t=t.subarray(c),p-=c,c=0}s.set(t,u),u+=p}return a&&(a-=r+3),{data:s,pts:o,dts:l,len:a}}return null}},{key:"pushAccesUnit",value:function(e,t){e.units.units.length&&(!this.config.forceKeyFrameOnDiscontinuity||e.key===!0||t.sps&&(t.samples.length||this.contiguous)?t.samples.push(e):t.dropped++),
e.debug.length&&h.logger.log(e.pts+"/"+e.dts+":"+e.debug+","+e.units.length)}},{key:"_parseAVCPES",value:function(e,t){var n,i,a,r=this,s=this._avcTrack,o=this._parseAVCNALu(e.data),l=!1,c=this.avcSample;e.data=null,o.forEach(function(t){switch(t.type){case 1:i=!0,l&&c&&(c.debug+="NDR ");break;case 5:i=!0,c||(c=r.avcSample=r._createAVCSample(!0,e.pts,e.dts,"")),l&&(c.debug+="IDR "),c.key=!0;break;case 6:i=!0,l&&c&&(c.debug+="SEI "),n=new d.default(r.discardEPB(t.data)),n.readUByte();for(var o=0,u=0,h=!1,p=0;!h&&n.bytesAvailable>1;){
o=0;do p=n.readUByte(),o+=p;while(255===p);u=0;do p=n.readUByte(),u+=p;while(255===p);if(4===o&&0!==n.bytesAvailable){h=!0;var f=n.readUByte();if(181===f){var g=n.readUShort();if(49===g){var m=n.readUInt();if(1195456820===m){var v=n.readUByte();if(3===v){var y=n.readUByte(),b=n.readUByte(),S=31&y,w=[y,b];for(a=0;a<S;a++)w.push(n.readUByte()),w.push(n.readUByte()),w.push(n.readUByte());r._insertSampleInOrder(r._txtTrack.samples,{type:3,pts:e.pts,bytes:w})}}}}}else if(u<n.bytesAvailable)for(a=0;a<u;a++)n.readUByte();
}break;case 7:if(i=!0,l&&c&&(c.debug+="SPS "),!s.sps){n=new d.default(t.data);var M=n.readSPS();s.width=M.width,s.height=M.height,s.sps=[t.data],s.duration=r._duration;var I=t.data.subarray(1,4),C="avc1.";for(a=0;a<3;a++){var D=I[a].toString(16);D.length<2&&(D="0"+D),C+=D}s.codec=C}break;case 8:i=!0,l&&c&&(c.debug+="PPS "),s.pps||(s.pps=[t.data]);break;case 9:i=!1,c&&r.pushAccesUnit(c,s),c=r.avcSample=r._createAVCSample(!1,e.pts,e.dts,l?"AUD ":"");break;case 12:i=!1;break;default:i=!1,c&&(c.debug+="unknown NAL "+t.type+" ");
}if(c&&i){var T=c.units;T.units.push(t)}}),t&&c&&(this.pushAccesUnit(c,s),this.avcSample=null)}},{key:"_createAVCSample",value:function(e,t,n,i){return{key:e,pts:t,dts:n,units:{units:[],length:0},debug:i}}},{key:"_insertSampleInOrder",value:function(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var i=n-1;i>=0;i--)if(t.pts<e[i].pts){e.splice(i,0,t);break}}else e.push(t)}},{key:"_getLastNalUnit",value:function(){var e=this.avcSample,t=void 0;if(!e||0===e.units.units.length){var n=this._avcTrack,i=n.samples;
e=i[i.length-1]}if(e){var a=e.units.units;t=a[a.length-1]}return t}},{key:"_parseAVCNALu",value:function(e){for(var t,n,i,a,r,s=0,o=e.byteLength,l=this._avcTrack,c=l.naluState||0,u=c,d=[],h=-1;s<o;)switch(t=e[s++],c){case 0:0===t&&(c=1);break;case 1:c=0===t?2:0;break;case 2:case 3:if(0===t)c=3;else if(1===t){if(h>=0)i={data:e.subarray(h,s-c-1),type:r},d.push(i);else{var p=this._getLastNalUnit();if(p&&(u&&s<=4-u&&p.state&&(p.data=p.data.subarray(0,p.data.byteLength-u)),n=s-c-1,n>0)){var f=new Uint8Array(p.data.byteLength+n);
f.set(p.data,0),f.set(e.subarray(0,n),p.data.byteLength),p.data=f}}s<o?(a=31&e[s],h=s,r=a,c=0):c=-1}else c=0;break;case-1:h=0,r=31&t,c=0}if(h>=0&&c>=0&&(i={data:e.subarray(h,o),type:r,state:c},d.push(i)),0===d.length){var g=this._getLastNalUnit();if(g){var m=new Uint8Array(g.data.byteLength+e.byteLength);m.set(g.data,0),m.set(e,g.data.byteLength),g.data=m}}return l.naluState=c,d}},{key:"discardEPB",value:function(e){for(var t,n,i=e.byteLength,a=[],r=1;r<i-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(a.push(r+2),
r+=2):r++;if(0===a.length)return e;t=i-a.length,n=new Uint8Array(t);var s=0;for(r=0;r<t;s++,r++)s===a[0]&&(s++,a.shift()),n[r]=e[s];return n}},{key:"_parseAACPES",value:function(e){var t,n,i,a,r,s,l,u,d,f=this._aacTrack,g=e.data,m=e.pts,v=0,y=this.aacOverFlow,b=this.aacLastPTS;if(y){var S=new Uint8Array(y.byteLength+g.byteLength);S.set(y,0),S.set(g,y.byteLength),g=S}for(r=v,u=g.length;r<u-1&&(255!==g[r]||240!==(240&g[r+1]));r++);if(r){var w,M;if(r<u-1?(w="AAC PES did not start with ADTS header,offset:"+r,
M=!1):(w="no ADTS header found in AAC PES",M=!0),h.logger.warn("parsing error:"+w),this.observer.trigger(c.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,id:this.id,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:M,reason:w}),M)return}if(f.audiosamplerate||(t=o.default.getAudioConfig(this.observer,g,r,this.audioCodec),f.config=t.config,f.audiosamplerate=t.samplerate,f.channelCount=t.channelCount,f.codec=t.codec,f.duration=this._duration,h.logger.log("parsed codec:"+f.codec+",rate:"+t.samplerate+",nb channel:"+t.channelCount)),
a=0,i=9216e4/f.audiosamplerate,y&&b){var I=b+i;Math.abs(I-m)>1&&(h.logger.log("AAC: align PTS for overlapping frames by "+Math.round((I-m)/90)),m=I)}for(;r+5<u&&(s=1&g[r+1]?7:9,n=(3&g[r+3])<<11|g[r+4]<<3|(224&g[r+5])>>>5,n-=s,n>0&&r+s+n<=u);)for(l=m+a*i,d={unit:g.subarray(r+s,r+s+n),pts:l,dts:l},f.samples.push(d),f.len+=n,r+=n+s,a++;r<u-1&&(255!==g[r]||240!==(240&g[r+1]));r++);y=r<u?g.subarray(r,u):null,this.aacOverFlow=y,this.aacLastPTS=l}},{key:"_parseID3PES",value:function(e){this._id3Track.samples.push(e);
}}],[{key:"probe",value:function(e){return e.length>=564&&71===e[0]&&71===e[188]&&71===e[376]}}]),e}();n.default=f},{17:17,21:21,24:24,26:26,43:43}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",OTHER_ERROR:"otherError"},n.ErrorDetails={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",
LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",
BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",INTERNAL_EXCEPTION:"internalException"}},{}],25:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){
return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e(43),l=e(24),c=e(26),u=i(c),d=function(){function e(t){a(this,e),this.hls=t,this.onEvent=this.onEvent.bind(this);for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];
this.handledEvents=i,this.useGenericHandler=!0,this.registerListeners()}return s(e,[{key:"destroy",value:function(){this.unregisterListeners()}},{key:"isEventHandler",value:function(){return"object"===r(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent}},{key:"registerListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){if("hlsEventGeneric"===e)throw new Error("Forbidden event name: "+e);this.hls.on(e,this.onEvent)}.bind(this))}},{
key:"unregisterListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){this.hls.off(e,this.onEvent)}.bind(this))}},{key:"onEvent",value:function(e,t){this.onEventGeneric(e,t)}},{key:"onEventGeneric",value:function(e,t){var n=function(e,t){var n="on"+e.replace("hls","");if("function"!=typeof this[n])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+n+")");return this[n].bind(this,t)};try{n.call(this,e,t).call()}catch(t){
o.logger.error("internal error happened while processing "+e+":"+t.message),this.hls.trigger(u.default.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}}}]),e}();n.default=d},{24:24,26:26,43:43}],26:[function(e,t,n){"use strict";t.exports={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",
BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",LEVEL_SWITCH:"hlsLevelSwitch",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCH:"hlsAudioTrackSwitch",
AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",
FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},{}],27:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,
i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){i(this,e)}return a(e,null,[{key:"getSilentFrame",value:function(e){return 1===e?new Uint8Array([0,200,0,128,35,128]):2===e?new Uint8Array([33,0,73,144,2,25,0,35,128]):3===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]):4===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]):5===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]):6===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]):null;
}}]),e}();n.default=r},{}],28:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){i(this,e)}return a(e,null,[{
key:"isBuffered",value:function(e,t){if(e)for(var n=e.buffered,i=0;i<n.length;i++)if(t>=n.start(i)&&t<=n.end(i))return!0;return!1}},{key:"bufferInfo",value:function(e,t,n){if(e){var i,a=e.buffered,r=[];for(i=0;i<a.length;i++)r.push({start:a.start(i),end:a.end(i)});return this.bufferedInfo(r,t,n)}return{len:0,start:0,end:0,nextStart:void 0}}},{key:"bufferedInfo",value:function(e,t,n){var i,a,r,s,o,l=[];for(e.sort(function(e,t){var n=e.start-t.start;return n?n:t.end-e.end}),o=0;o<e.length;o++){var c=l.length;
if(c){var u=l[c-1].end;e[o].start-u<n?e[o].end>u&&(l[c-1].end=e[o].end):l.push(e[o])}else l.push(e[o])}for(o=0,i=0,a=r=t;o<l.length;o++){var d=l[o].start,h=l[o].end;if(t+n>=d&&t<h)a=d,r=h,i=r-t;else if(t+n<d){s=d;break}}return{len:i,start:a,end:r,nextStart:s}}}]),e}();n.default=r},{}],29:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){
var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(43),s=function(){function e(){i(this,e)}return a(e,null,[{key:"mergeDetails",value:function(t,n){var i,a=Math.max(t.startSN,n.startSN)-n.startSN,s=Math.min(t.endSN,n.endSN)-n.startSN,o=n.startSN-t.startSN,l=t.fragments,c=n.fragments,u=0;if(s<a)return void(n.PTSKnown=!1);for(var d=a;d<=s;d++){var h=l[o+d],p=c[d];
p&&h&&(u=h.cc-p.cc,isNaN(h.startPTS)||(p.start=p.startPTS=h.startPTS,p.endPTS=h.endPTS,p.duration=h.duration,i=p))}if(u)for(r.logger.log("discontinuity sliding from playlist, take drift into account"),d=0;d<c.length;d++)c[d].cc+=u;if(i)e.updateFragPTSDTS(n,i.sn,i.startPTS,i.endPTS,i.startDTS,i.endDTS);else if(o>=0&&o<l.length){var f=l[o].start;for(d=0;d<c.length;d++)c[d].start+=f}n.PTSKnown=t.PTSKnown}},{key:"updateFragPTSDTS",value:function(t,n,i,a,r,s){var o,l,c,u;if(n<t.startSN||n>t.endSN)return 0;
if(o=n-t.startSN,l=t.fragments,c=l[o],!isNaN(c.startPTS)){var d=Math.abs(c.startPTS-i);isNaN(c.deltaPTS)?c.deltaPTS=d:c.deltaPTS=Math.max(d,c.deltaPTS),i=Math.min(i,c.startPTS),a=Math.max(a,c.endPTS),r=Math.min(r,c.startDTS),s=Math.max(s,c.endDTS)}var h=i-c.start;for(c.start=c.startPTS=i,c.endPTS=a,c.startDTS=r,c.endDTS=s,c.duration=a-i,u=o;u>0;u--)e.updatePTS(l,u,u-1);for(u=o;u<l.length-1;u++)e.updatePTS(l,u,u+1);return t.PTSKnown=!0,h}},{key:"updatePTS",value:function(e,t,n){var i=e[t],a=e[n],s=a.startPTS;
isNaN(s)?n>t?a.start=i.start+i.duration:a.start=i.start-a.duration:n>t?(i.duration=s-i.start,i.duration<0&&r.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(a.duration=i.start-s,a.duration<0&&r.logger.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!"))}}]),e}();n.default=s},{43:43}],30:[function(e,t,n){"use strict";
function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(26),o=i(s),l=e(24),c=e(34),u=i(c),d=e(32),h=i(d),p=e(3),f=i(p),g=e(6),m=i(g),v=e(7),y=i(v),b=e(4),S=i(b),w=e(11),M=i(w),I=e(10),C=i(I),D=e(12),T=i(D),x=e(9),P=i(x),E=e(5),A=i(E),L=e(43),k=e(47),N=i(k),_=e(1),O=i(_),R=e(33),j=i(R),z=e(41),U=i(z),F=function(){
function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e);var n=e.DefaultConfig;if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var i in n)i in t||(t[i]=n[i]);if(void 0!==t.liveMaxLatencyDurationCount&&t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');
if(void 0!==t.liveMaxLatencyDuration&&(t.liveMaxLatencyDuration<=t.liveSyncDuration||void 0===t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');(0,L.enableLogs)(t.debug),this.config=t;var r=this.observer=new O.default;r.trigger=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r.emit.apply(r,[e,e].concat(n))},r.off=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];
r.removeListener.apply(r,[e].concat(n))},this.on=r.on.bind(r),this.off=r.off.bind(r),this.trigger=r.trigger.bind(r),this.playlistLoader=new u.default(this),this.fragmentLoader=new h.default(this),this.levelController=new C.default(this),this.abrController=new t.abrController(this),this.bufferController=new t.bufferController(this),this.capLevelController=new t.capLevelController(this),this.fpsController=new t.fpsController(this),this.streamController=new t.streamController(this),this.audioStreamController=new t.audioStreamController(this),
this.timelineController=new t.timelineController(this),this.audioTrackController=new A.default(this),this.keyLoader=new j.default(this)}return r(e,null,[{key:"isSupported",value:function(){return window.MediaSource=window.MediaSource||window.WebKitMediaSource,window.MediaSource&&"function"==typeof window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"version",get:function(){return"0.6.9"}},{key:"Events",get:function(){return o.default;
}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return e.defaultConfig||(e.defaultConfig={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,maxSeekHole:2,seekHoleNudgeDuration:.01,stalledInBufferedNudgeThreshold:10,maxFragLookUpTolerance:.2,liveSyncDurationCount:3,
liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,fragLoadingLoopThreshold:3,
startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:N.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,fetchSetup:void 0,abrController:f.default,bufferController:m.default,capLevelController:y.default,fpsController:P.default,streamController:M.default,audioStreamController:S.default,timelineController:T.default,cueHandler:U.default,enableCEA708Captions:!0,enableMP2TPassThrough:!1,stretchShortVideoTrack:!1,forceKeyFrameOnDiscontinuity:!0,
abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0}),e.defaultConfig},set:function(t){e.defaultConfig=t}}]),r(e,[{key:"destroy",value:function(){L.logger.log("destroy"),this.trigger(o.default.DESTROYING),this.detachMedia(),this.playlistLoader.destroy(),this.fragmentLoader.destroy(),this.levelController.destroy(),this.abrController.destroy(),this.bufferController.destroy(),
this.capLevelController.destroy(),this.fpsController.destroy(),this.streamController.destroy(),this.audioStreamController.destroy(),this.timelineController.destroy(),this.audioTrackController.destroy(),this.keyLoader.destroy(),this.url=null,this.observer.removeAllListeners()}},{key:"attachMedia",value:function(e){L.logger.log("attachMedia"),this.media=e,this.trigger(o.default.MEDIA_ATTACHING,{media:e})}},{key:"detachMedia",value:function(){L.logger.log("detachMedia"),this.trigger(o.default.MEDIA_DETACHING),
this.media=null}},{key:"loadSource",value:function(e){L.logger.log("loadSource:"+e),this.url=e,this.trigger(o.default.MANIFEST_LOADING,{url:e})}},{key:"startLoad",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;L.logger.log("startLoad"),this.levelController.startLoad(),this.streamController.startLoad(e),this.audioStreamController.startLoad(e)}},{key:"stopLoad",value:function(){L.logger.log("stopLoad"),this.levelController.stopLoad(),this.streamController.stopLoad(),
this.audioStreamController.stopLoad()}},{key:"swapAudioCodec",value:function(){L.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}},{key:"recoverMediaError",value:function(){L.logger.log("recoverMediaError");var e=this.media;this.detachMedia(),this.attachMedia(e)}},{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){L.logger.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch();
}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){L.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){L.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",
get:function(){return this.levelController.firstLevel},set:function(e){L.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){L.logger.log("set startLevel:"+e),this.levelController.startLevel=e}},{key:"autoLevelCapping",get:function(){return this.abrController.autoLevelCapping},set:function(e){L.logger.log("set autoLevelCapping:"+e),this.abrController.autoLevelCapping=e}},{key:"autoLevelEnabled",
get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"audioTracks",get:function(){return this.audioTrackController.audioTracks}},{key:"audioTrack",get:function(){return this.audioTrackController.audioTrack},set:function(e){this.audioTrackController.audioTrack=e}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}}]),e}();n.default=F},{1:1,10:10,11:11,12:12,24:24,26:26,3:3,32:32,
33:33,34:34,4:4,41:41,43:43,47:47,5:5,6:6,7:7,9:9}],31:[function(e,t,n){"use strict";t.exports=e(30).default},{30:30}],32:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),c=i(l),u=e(25),d=i(u),h=e(24),p=e(43),f=function(e){
function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,c.default.FRAG_LOADING));return n.loaders={},n}return s(t,e),o(t,[{key:"destroy",value:function(){var e=this.loaders;for(var t in e){var n=e[t];n&&n.destroy()}this.loaders={},d.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(e){var t=e.frag,n=t.type,i=this.loaders[n],a=this.hls.config;t.loaded=0,i&&(p.logger.warn("abort previous fragment loader for type:"+n),i.abort()),i=this.loaders[n]=t.loader="undefined"!=typeof a.fLoader?new a.fLoader(a):new a.loader(a);
var r=void 0,s=void 0,o=void 0;r={url:t.url,frag:t,responseType:"arraybuffer",progressData:!1};var l=t.byteRangeStartOffset,c=t.byteRangeEndOffset;isNaN(l)||isNaN(c)||(r.rangeStart=l,r.rangeEnd=c),s={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout},o={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},i.load(r,s,o)}},{key:"loadsuccess",value:function(e,t,n){
var i=e.data,a=n.frag;a.loader=void 0,this.loaders[a.type]=void 0,this.hls.trigger(c.default.FRAG_LOADED,{payload:i,frag:a,stats:t})}},{key:"loaderror",value:function(e,t){var n=t.loader;n&&n.abort(),this.loaders[t.type]=void 0,this.hls.trigger(c.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e})}},{key:"loadtimeout",value:function(e,t){var n=t.loader;n&&n.abort(),this.loaders[t.type]=void 0,this.hls.trigger(c.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,
details:h.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag})}},{key:"loadprogress",value:function(e,t,n){var i=t.frag;i.loaded=e.loaded,this.hls.trigger(c.default.FRAG_LOAD_PROGRESS,{frag:i,stats:e})}}]),t}(d.default);n.default=f},{24:24,25:25,26:26,43:43}],33:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,
i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),c=i(l),u=e(25),d=i(u),h=e(24),p=e(43),f=function(e){function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,c.default.KEY_LOADING));return n.loaders={},n.decryptkey=null,n.decrypturl=null,n}return s(t,e),o(t,[{key:"destroy",value:function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},
d.default.prototype.destroy.call(this)}},{key:"onKeyLoading",value:function(e){var t=e.frag,n=t.type,i=this.loaders[n],a=t.decryptdata,r=a.uri;if(r!==this.decrypturl||null===this.decryptkey){var s=this.hls.config;i&&(p.logger.warn("abort previous key loader for type:"+n),i.abort()),t.loader=this.loaders[n]=new s.loader(s),this.decrypturl=r,this.decryptkey=null;var o=void 0,l=void 0,u=void 0;o={url:r,frag:t,responseType:"arraybuffer"},l={timeout:s.fragLoadingTimeOut,maxRetry:s.fragLoadingMaxRetry,
retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout},u={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},t.loader.load(o,l,u)}else this.decryptkey&&(a.key=this.decryptkey,this.hls.trigger(c.default.KEY_LOADED,{frag:t}))}},{key:"loadsuccess",value:function(e,t,n){var i=n.frag;this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=void 0,this.loaders[i.type]=void 0,this.hls.trigger(c.default.KEY_LOADED,{
frag:i})}},{key:"loaderror",value:function(e,t){var n=t.frag,i=n.loader;i&&i.abort(),this.loaders[t.type]=void 0,this.hls.trigger(c.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})}},{key:"loadtimeout",value:function(e,t){var n=t.frag,i=n.loader;i&&i.abort(),this.loaders[t.type]=void 0,this.hls.trigger(c.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})}}]),t}(d.default);n.default=f;
},{24:24,25:25,26:26,43:43}],34:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),c=i(l),u=e(25),d=i(u),h=e(24),p=e(46),f=i(p),g=e(38),m=i(g),v=e(43),y=function(e){
function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,c.default.MANIFEST_LOADING,c.default.LEVEL_LOADING,c.default.AUDIO_TRACK_LOADING));return n.loaders={},n}return s(t,e),o(t,[{key:"destroy",value:function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},d.default.prototype.destroy.call(this)}},{key:"onManifestLoading",value:function(e){this.load(e.url,{type:"manifest"})}},{key:"onLevelLoading",value:function(e){this.load(e.url,{
type:"level",level:e.level,id:e.id})}},{key:"onAudioTrackLoading",value:function(e){this.load(e.url,{type:"audioTrack",id:e.id})}},{key:"load",value:function(e,t){var n=this.loaders[t.type];if(n){var i=n.context;if(i&&i.url===e)return void v.logger.trace("playlist request ongoing");v.logger.warn("abort previous loader for type:"+t.type),n.abort()}var a=this.hls.config,r=void 0,s=void 0,o=void 0,l=void 0;"manifest"===t.type?(r=a.manifestLoadingMaxRetry,s=a.manifestLoadingTimeOut,o=a.manifestLoadingRetryDelay,
l=a.manifestLoadingMaxRetryTimeOut):(r=a.levelLoadingMaxRetry,s=a.levelLoadingTimeOut,o=a.levelLoadingRetryDelay,l=a.levelLoadingMaxRetryTimeOut,v.logger.log("loading playlist for level "+t.level)),n=this.loaders[t.type]=t.loader="undefined"!=typeof a.pLoader?new a.pLoader(a):new a.loader(a),t.url=e,t.responseType="";var c=void 0,u=void 0;c={timeout:s,maxRetry:r,retryDelay:o,maxRetryDelay:l},u={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)
},n.load(t,c,u)}},{key:"resolve",value:function(e,t){return f.default.buildAbsoluteURL(t,e)}},{key:"parseMasterPlaylist",value:function(e,t){for(var n=[],i=void 0,a=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g;null!=(i=a.exec(e));){var r={},s=r.attrs=new m.default(i[1]);r.url=this.resolve(i[2],t);var o=s.decimalResolution("RESOLUTION");o&&(r.width=o.width,r.height=o.height),r.bitrate=s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),r.name=s.NAME;var l=s.CODECS;if(l){l=l.split(/[ ,]+/);
for(var c=0;c<l.length;c++){var u=l[c];u.indexOf("avc1")!==-1?r.videoCodec=this.avc1toavcoti(u):r.audioCodec=u}}n.push(r)}return n}},{key:"parseMasterPlaylistMedia",value:function(e,t,n){for(var i=void 0,a=[],r=/#EXT-X-MEDIA:(.*)/g;null!=(i=r.exec(e));){var s={},o=new m.default(i[1]);o.TYPE===n&&(s.groupId=o["GROUP-ID"],s.name=o.NAME,s.type=n,s.default="YES"===o.DEFAULT,s.autoselect="YES"===o.AUTOSELECT,s.forced="YES"===o.FORCED,o.URI&&(s.url=this.resolve(o.URI,t)),s.lang=o.LANGUAGE,s.name||(s.name=s.lang),
a.push(s))}return a}},{key:"createInitializationVector",value:function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t}},{key:"fragmentDecryptdataFromLevelkey",value:function(e,t){var n=e;return e&&e.method&&e.uri&&!e.iv&&(n=this.cloneObj(e),n.iv=this.createInitializationVector(t)),n}},{key:"avc1toavcoti",value:function(e){var t,n=e.split(".");return n.length>2?(t=n.shift()+".",t+=parseInt(n.shift()).toString(16),t+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):t=e,
t}},{key:"cloneObj",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"parseLevelPlaylist",value:function(e,t,n,i){var a,r,s,o=0,l=0,c={type:null,version:null,url:t,fragments:[],live:!0,startSN:0},u={method:null,key:null,iv:null,uri:null},d=0,h=null,p=null,f=null,g=null,y=null,b=null,S=[];for(s=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE):(\d+))|(?:#EXT-X-(TARGETDURATION):(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT(INF):(\d+(?:\.\d+)?)(?:,(.*))?)|(?:(?!#)()(\S.+))|(?:#EXT-X-(BYTERANGE):(\d+(?:@\d+(?:\.\d+)?)?)|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.+))|(?:#EXT-X-(VERSION):(\d+))|(?:(#)(.*):(.*))|(?:(#)(.*)))(?:.*)\r?\n?/g;null!==(r=s.exec(e));)switch(r.shift(),
r=r.filter(function(e){return void 0!==e}),r[0]){case"PLAYLIST-TYPE":c.type=r[1].toUpperCase();break;case"MEDIA-SEQUENCE":o=c.startSN=parseInt(r[1]);break;case"TARGETDURATION":c.targetduration=parseFloat(r[1]);break;case"VERSION":c.version=parseInt(r[1]);break;case"EXTM3U":break;case"ENDLIST":c.live=!1;break;case"DIS":d++,S.push(r);break;case"BYTERANGE":var w=r[1].split("@");b=1===w.length?y:parseInt(w[1]),y=parseInt(w[0])+b;break;case"INF":f=parseFloat(r[1]),g=r[2]?r[2]:null,S.push(r);break;case"":
if(!isNaN(f)){var M=o++;a=this.fragmentDecryptdataFromLevelkey(u,M);var I=r[1]?this.resolve(r[1],t):null;p={url:I,type:i,duration:f,title:g,start:l,sn:M,level:n,cc:d,decryptdata:a,programDateTime:h,tagList:S},null!==b&&(p.byteRangeStartOffset=b,p.byteRangeEndOffset=y),c.fragments.push(p),l+=f,f=null,g=null,b=null,h=null,S=[]}break;case"KEY":var C=r[1],D=new m.default(C),T=D.enumeratedString("METHOD"),x=D.URI,P=D.hexadecimalInteger("IV");T&&(u={method:null,key:null,iv:null,uri:null},x&&"AES-128"===T&&(u.method=T,
u.uri=this.resolve(x,t),u.key=null,u.iv=P));break;case"START":var E=r[1],A=new m.default(E),L=A.decimalFloatingPoint("TIME-OFFSET");isNaN(L)||(c.startTimeOffset=L);break;case"PROGRAM-DATE-TIME":h=new Date(Date.parse(r[1])),S.push(r);break;case"#":r.shift(),S.push(r);break;default:v.logger.warn("line parsed but not handled: "+r)}return p&&!p.url&&(c.fragments.pop(),l-=p.duration),c.totalduration=l,c.averagetargetduration=l/c.fragments.length,c.endSN=o-1,c}},{key:"loadsuccess",value:function(e,t,n){
var i=e.data,a=e.url,r=n.type,s=n.id,o=n.level,l=this.hls;if(this.loaders[r]=void 0,void 0!==a&&0!==a.indexOf("data:")||(a=n.url),t.tload=performance.now(),0===i.indexOf("#EXTM3U"))if(i.indexOf("#EXTINF:")>0){var u="audioTrack"!==r,d=this.parseLevelPlaylist(i,a,(u?o:s)||0,u?"main":"audio");"manifest"===r&&l.trigger(c.default.MANIFEST_LOADED,{levels:[{url:a,details:d}],audioTracks:[],url:a,stats:t}),t.tparsed=performance.now(),u?l.trigger(c.default.LEVEL_LOADED,{details:d,level:o||0,id:s||0,stats:t
}):l.trigger(c.default.AUDIO_TRACK_LOADED,{details:d,id:s,stats:t})}else{var p=this.parseMasterPlaylist(i,a);if(p.length){var f=this.parseMasterPlaylistMedia(i,a,"AUDIO");if(f.length){var g=!1;f.forEach(function(e){e.url||(g=!0)}),g===!1&&p[0].audioCodec&&!p[0].attrs.AUDIO&&(v.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main"}))}l.trigger(c.default.MANIFEST_LOADED,{levels:p,audioTracks:f,url:a,stats:t})}else l.trigger(c.default.ERROR,{
type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:a,reason:"no level found in manifest"})}else l.trigger(c.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:a,reason:"no EXTM3U delimiter"})}},{key:"loaderror",value:function(e,t){var n,i,a=t.loader;switch(t.type){case"manifest":n=h.ErrorDetails.MANIFEST_LOAD_ERROR,i=!0;break;case"level":n=h.ErrorDetails.LEVEL_LOAD_ERROR,i=!1;break;case"audioTrack":n=h.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,
i=!1}a&&(a.abort(),this.loaders[t.type]=void 0),this.hls.trigger(c.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:n,fatal:i,url:a.url,loader:a,response:e,context:t})}},{key:"loadtimeout",value:function(e,t){var n,i,a=t.loader;switch(t.type){case"manifest":n=h.ErrorDetails.MANIFEST_LOAD_TIMEOUT,i=!0;break;case"level":n=h.ErrorDetails.LEVEL_LOAD_TIMEOUT,i=!1;break;case"audioTrack":n=h.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT,i=!1}a&&(a.abort(),this.loaders[t.type]=void 0),this.hls.trigger(c.default.ERROR,{
type:h.ErrorTypes.NETWORK_ERROR,details:n,fatal:i,url:a.url,loader:a,context:t})}}]),t}(d.default);n.default=y},{24:24,25:25,26:26,38:38,43:43,46:46}],35:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i);
}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){i(this,e)}return a(e,null,[{key:"init",value:function(){e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var t;for(t in e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);
var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:n,audio:i};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),r=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=r,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),
e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,s,l,s,o),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,a))}},{key:"box",value:function(e){for(var t,n=Array.prototype.slice.call(arguments,1),i=8,a=n.length,r=a;a--;)i+=n[a].byteLength;for(t=new Uint8Array(i),t[0]=i>>24&255,t[1]=i>>16&255,t[2]=i>>8&255,t[3]=255&i,t.set(e,4),a=0,i=8;a<r;a++)t.set(n[a],i),
i+=n[a].byteLength;return t}},{key:"hdlr",value:function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}},{key:"mdhd",value:function(t,n){return n*=t,e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24,n>>16&255,n>>8&255,255&n,85,196,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]));
}},{key:"minf",value:function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))}},{key:"moof",value:function(t,n,i){return e.box(e.types.moof,e.mfhd(t),e.traf(i,n))}},{key:"moov",value:function(t){for(var n=t.length,i=[];n--;)i[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(i).concat(e.mvex(t)))}},{key:"mvex",value:function(t){for(var n=t.length,i=[];n--;)i[n]=e.trex(t[n]);
return e.box.apply(null,[e.types.mvex].concat(i))}},{key:"mvhd",value:function(t,n){n*=t;var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,i)}},{key:"sdtp",value:function(t){var n,i,a=t.samples||[],r=new Uint8Array(4+a.length);for(i=0;i<a.length;i++)n=a[i].flags,
r[i+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return e.box(e.types.sdtp,r)}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))}},{key:"avc1",value:function(t){var n,i,a,r=[],s=[];for(n=0;n<t.sps.length;n++)i=t.sps[n],a=i.byteLength,r.push(a>>>8&255),r.push(255&a),r=r.concat(Array.prototype.slice.call(i));for(n=0;n<t.pps.length;n++)i=t.pps[n],a=i.byteLength,s.push(a>>>8&255),
s.push(255&a),s=s.concat(Array.prototype.slice.call(i));var o=e.box(e.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|t.sps.length].concat(r).concat([t.pps.length]).concat(s))),l=t.width,c=t.height;return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,c>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])));
}},{key:"esds",value:function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}},{key:"mp4a",value:function(t){var n=t.audiosamplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))}},{key:"stsd",value:function(t){return"audio"===t.type?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.avc1(t));
}},{key:"tkhd",value:function(t){var n=t.id,i=t.duration*t.timescale,a=t.width,r=t.height;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,r>>8&255,255&r,0,0]))}},{key:"traf",value:function(t,n){var i=e.sdtp(t),a=t.id;return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n])),e.trun(t,i.length+16+16+8+16+8+8),i);
}},{key:"trak",value:function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"trex",value:function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trun",value:function(t,n){var i,a,r,s,o,l,c=t.samples||[],u=c.length,d=12+16*u,h=new Uint8Array(d);for(n+=8+d,h.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),i=0;i<u;i++)a=c[i],
r=a.duration,s=a.size,o=a.flags,l=a.cts,h.set([r>>>24&255,r>>>16&255,r>>>8&255,255&r,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return e.box(e.types.trun,h)}},{key:"initSegment",value:function(t){e.types||e.init();var n,i=e.moov(t);return n=new Uint8Array(e.FTYP.byteLength+i.byteLength),n.set(e.FTYP),n.set(i,e.FTYP.byteLength),
n}}]),e}();n.default=r},{}],36:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(27),o=i(s),l=e(26),c=i(l),u=e(43),d=e(35),h=i(d),p=e(24);
e(44);var f=function(){function e(t,n,i){a(this,e),this.observer=t,this.id=n,this.config=i,this.ISGenerated=!1,this.PES2MP4SCALEFACTOR=4,this.PES_TIMESCALE=9e4,this.MP4_TIMESCALE=this.PES_TIMESCALE/this.PES2MP4SCALEFACTOR}return r(e,[{key:"destroy",value:function(){}},{key:"insertDiscontinuity",value:function(){this._initPTS=this._initDTS=void 0}},{key:"switchLevel",value:function(){this.ISGenerated=!1}},{key:"remux",value:function(e,t,n,i,a,r,s,o,l){if(this.level=e,this.sn=t,this.ISGenerated||this.generateIS(n,i,s),
this.ISGenerated)if(n.samples.length){var u=this.remuxAudio(n,s,o,l);if(i.samples.length){var d=void 0;u&&(d=u.endPTS-u.startPTS),this.remuxVideo(i,s,o,d)}}else{var h=void 0;i.samples.length&&(h=this.remuxVideo(i,s,o)),h&&n.codec&&this.remuxEmptyAudio(n,s,o,h)}a.samples.length&&this.remuxID3(a,s),r.samples.length&&this.remuxText(r,s),this.observer.trigger(c.default.FRAG_PARSED,{id:this.id,level:this.level,sn:this.sn})}},{key:"generateIS",value:function(e,t,n){var i,a,r=this.observer,s=e.samples,o=t.samples,l=this.PES_TIMESCALE,d={},f={
id:this.id,level:this.level,sn:this.sn,tracks:d,unique:!1},g=void 0===this._initPTS;g&&(i=a=1/0),e.config&&s.length&&(e.timescale=e.audiosamplerate,e.timescale*e.duration>Math.pow(2,32)&&!function(){var t=function e(t,n){return n?e(n,t%n):t};e.timescale=e.audiosamplerate/t(e.audiosamplerate,1024)}(),u.logger.log("audio mp4 timescale :"+e.timescale),d.audio={container:"audio/mp4",codec:e.codec,initSegment:h.default.initSegment([e]),metadata:{channelCount:e.channelCount}},g&&(i=a=s[0].pts-l*n)),t.sps&&t.pps&&o.length&&(t.timescale=this.MP4_TIMESCALE,
d.video={container:"video/mp4",codec:t.codec,initSegment:h.default.initSegment([t]),metadata:{width:t.width,height:t.height}},g&&(i=Math.min(i,o[0].pts-l*n),a=Math.min(a,o[0].dts-l*n))),Object.keys(d).length?(r.trigger(c.default.FRAG_PARSING_INIT_SEGMENT,f),this.ISGenerated=!0,g&&(this._initPTS=i,this._initDTS=a)):r.trigger(c.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,id:this.id,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})}},{key:"remuxVideo",value:function(e,t,n,i){
var a,r,s,o,l,d,p,f,g=8,m=this.PES_TIMESCALE,v=this.PES2MP4SCALEFACTOR,y=e.samples,b=[],S=y.reduce(function(e,t){return Math.max(Math.min(e,t.pts-t.dts),-18e3)},0);if(S<0){u.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(S/90)+" ms to overcome this issue");for(var w=0;w<y.length;w++)y[w].dts+=S}var M=void 0;M=n?this.nextAvcDts:t*m;var I=y[0];l=Math.max(this._PTSNormalize(I.dts-this._initDTS,M),0),o=Math.max(this._PTSNormalize(I.pts-this._initDTS,M),0);var C=Math.round((l-M)/90);
n&&C&&(C>1?u.logger.log("AVC:"+C+" ms hole between fragments detected,filling it"):C<-1&&u.logger.log("AVC:"+-C+" ms overlapping between fragments detected"),l=M,y[0].dts=l+this._initDTS,o=Math.max(o-C,M),y[0].pts=o+this._initDTS,u.logger.log("Video/PTS/DTS adjusted: "+Math.round(o/90)+"/"+Math.round(l/90)+",delta:"+C+" ms")),d=l,I=y[y.length-1],f=Math.max(this._PTSNormalize(I.dts-this._initDTS,M),0),p=Math.max(this._PTSNormalize(I.pts-this._initDTS,M),0),p=Math.max(p,f);var D=navigator.vendor,T=navigator.userAgent,x=D&&D.indexOf("Apple")>-1&&T&&!T.match("CriOS");
x&&(a=Math.round((f-l)/(v*(y.length-1))));for(var P=0;P<y.length;P++){var E=y[P];x?E.dts=l+P*v*a:(E.dts=Math.max(this._PTSNormalize(E.dts-this._initDTS,M),l),E.dts=Math.round(E.dts/v)*v),E.pts=Math.max(this._PTSNormalize(E.pts-this._initDTS,M),E.dts),E.pts=Math.round(E.pts/v)*v}r=new Uint8Array(e.len+4*e.nbNalu+8);var A=new DataView(r.buffer);A.setUint32(0,r.byteLength),r.set(h.default.types.mdat,4);for(var L=0;L<y.length;L++){for(var k=y[L],N=0,_=void 0;k.units.units.length;){var O=k.units.units.shift();
A.setUint32(g,O.data.byteLength),g+=4,r.set(O.data,g),g+=O.data.byteLength,N+=4+O.data.byteLength}if(x)_=Math.max(0,a*Math.round((k.pts-k.dts)/(v*a)));else{if(L<y.length-1)a=y[L+1].dts-k.dts;else{var R=this.config,j=k.dts-y[L>0?L-1:L].dts;if(R.stretchShortVideoTrack){var z=R.maxBufferHole,U=R.maxSeekHole,F=Math.floor(Math.min(z,U)*m),B=(i?o+i*m:this.nextAacPts)-k.pts;B>F?(a=B-j,a<0&&(a=j),u.logger.log("It is approximately "+B/90+" ms to the next segment; using duration "+a/90+" ms for the last video frame.")):a=j;
}else a=j}a/=v,_=Math.round((k.pts-k.dts)/v)}b.push({size:N,duration:a,cts:_,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:k.key?2:1,isNonSync:k.key?0:1}})}this.nextAvcDts=f+a*v;var V=e.dropped;if(e.len=0,e.nbNalu=0,e.dropped=0,b.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var H=b[0].flags;H.dependsOn=2,H.isNonSync=0}e.samples=b,s=h.default.moof(e.sequenceNumber++,l/v,e),e.samples=[];var W={id:this.id,level:this.level,sn:this.sn,data1:s,data2:r,startPTS:o/m,
endPTS:(p+v*a)/m,startDTS:l/m,endDTS:this.nextAvcDts/m,type:"video",nb:b.length,dropped:V};return this.observer.trigger(c.default.FRAG_PARSING_DATA,W),W}},{key:"remuxAudio",value:function(e,t,n,i){var a,r,s,l,d,p,f,g,m,v,y,b,S,w,M,I,C=this.PES_TIMESCALE,D=e.timescale,T=C/D,x=1024*e.timescale/e.audiosamplerate,P=x*T,E=8,A=[],L=[];if(e.samples.sort(function(e,t){return e.pts-t.pts}),L=e.samples,I=this.nextAacPts,n|=L.length&&I&&(Math.abs(t-I/C)<.1||Math.abs(L[0].pts-I)<20*P),n||(I=t*C),i)for(var k=0,N=I;k<L.length;){
var _=L[k],O=this._PTSNormalize(_.pts-this._initDTS,I),R=O-N;if(R<=-P)u.logger.warn("Dropping 1 audio frame @ "+Math.round(N/90)/1e3+"s due to "+Math.round(Math.abs(R/90))+" ms overlap."),L.splice(k,1),e.len-=_.unit.length;else if(R>=P){var j=Math.round(R/P);u.logger.warn("Injecting "+j+" audio frame @ "+Math.round(N/90)/1e3+"s due to "+Math.round(R/90)+" ms gap.");for(var z=0;z<j;z++)M=N+this._initDTS,M=Math.max(M,this._initDTS),w=o.default.getSilentFrame(e.channelCount),w||(u.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),
w=_.unit.slice(0)),L.splice(k,0,{unit:w,pts:M,dts:M}),e.len+=w.length,N+=P,k+=1;_.pts=_.dts=N+this._initDTS,N+=P,k+=1}else Math.abs(R)>.1*P,N+=P,0===k?_.pts=_.dts=this._initDTS+I:_.pts=_.dts=L[k-1].pts+P,k+=1}for(;L.length;){if(r=L.shift(),l=r.unit,v=r.pts-this._initDTS,y=r.dts-this._initDTS,void 0!==m)b=this._PTSNormalize(v,m),S=this._PTSNormalize(y,m),s.duration=Math.round((S-m)/T);else{b=this._PTSNormalize(v,I),S=this._PTSNormalize(y,I);var U=Math.round(1e3*(b-I)/C),F=0;if(n&&U){if(U>0)F=Math.round((b-I)/P),
u.logger.log(U+" ms hole between AAC samples detected,filling it"),F>0&&(w=o.default.getSilentFrame(e.channelCount),w||(w=l.slice(0)),e.len+=F*w.length);else if(U<-12){u.logger.log(-U+" ms overlapping between AAC samples detected, drop frame"),e.len-=l.byteLength;continue}b=S=I}if(f=Math.max(0,b),g=Math.max(0,S),!(e.len>0))return;d=new Uint8Array(e.len+8),a=new DataView(d.buffer),a.setUint32(0,d.byteLength),d.set(h.default.types.mdat,4);for(var B=0;B<F;B++)M=b-(F-B)*P,w=o.default.getSilentFrame(e.channelCount),
w||(u.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),w=l.slice(0)),d.set(w,E),E+=w.byteLength,s={size:w.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},A.push(s)}d.set(l,E),E+=l.byteLength,s={size:l.byteLength,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},A.push(s),m=S}var V=0,H=A.length;if(H>=2&&(V=A[H-2].duration,s.duration=V),H){this.nextAacPts=b+T*V,
e.len=0,e.samples=A,p=h.default.moof(e.sequenceNumber++,g/T,e),e.samples=[];var W={id:this.id,level:this.level,sn:this.sn,data1:p,data2:d,startPTS:f/C,endPTS:this.nextAacPts/C,startDTS:g/C,endDTS:(S+T*V)/C,type:"audio",nb:H};return this.observer.trigger(c.default.FRAG_PARSING_DATA,W),W}return null}},{key:"remuxEmptyAudio",value:function(e,t,n,i){var a=this.PES_TIMESCALE,r=e.timescale?e.timescale:e.audiosamplerate,s=a/r,l=this.nextAacPts,c=(void 0!==l?l:i.startDTS*a)+this._initDTS,d=i.endDTS*a+this._initDTS,h=1024,p=s*h,f=Math.ceil((d-c)/p),g=o.default.getSilentFrame(e.channelCount);
if(u.logger.warn("remux empty Audio"),!g)return void u.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var m=[],v=0;v<f;v++){var y=c+v*p;m.push({unit:g.slice(0),pts:y,dts:y}),e.len+=g.length}e.samples=m,this.remuxAudio(e,t,n)}},{key:"remuxID3",value:function(e,t){var n,i=e.samples.length;if(i){for(var a=0;a<i;a++)n=e.samples[a],n.pts=(n.pts-this._initPTS)/this.PES_TIMESCALE,n.dts=(n.dts-this._initDTS)/this.PES_TIMESCALE;this.observer.trigger(c.default.FRAG_PARSING_METADATA,{
id:this.id,level:this.level,sn:this.sn,samples:e.samples})}e.samples=[],t=t}},{key:"remuxText",value:function(e,t){e.samples.sort(function(e,t){return e.pts-t.pts});var n,i=e.samples.length;if(i){for(var a=0;a<i;a++)n=e.samples[a],n.pts=(n.pts-this._initPTS)/this.PES_TIMESCALE;this.observer.trigger(c.default.FRAG_PARSING_USERDATA,{id:this.id,level:this.level,sn:this.sn,samples:e.samples})}e.samples=[],t=t}},{key:"_PTSNormalize",value:function(e,t){var n;if(void 0===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;
return e}},{key:"passthrough",get:function(){return!1}}]),e}();n.default=f},{24:24,26:26,27:27,35:35,43:43,44:44}],37:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i);
}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(26),o=i(s),l=function(){function e(t,n){a(this,e),this.observer=t,this.id=n,this.ISGenerated=!1}return r(e,[{key:"destroy",value:function(){}},{key:"insertDiscontinuity",value:function(){}},{key:"switchLevel",value:function(){this.ISGenerated=!1}},{key:"remux",value:function(e,t,n,i,a,r){var s=this.observer;if(!this.ISGenerated){var l={},c={id:this.id,tracks:l,unique:!0},u=t,d=u.codec;d&&(c.tracks.video={container:u.container,
codec:d,metadata:{width:u.width,height:u.height}}),u=e,d=u.codec,d&&(c.tracks.audio={container:u.container,codec:d,metadata:{channelCount:u.channelCount}}),this.ISGenerated=!0,s.trigger(o.default.FRAG_PARSING_INIT_SEGMENT,c)}s.trigger(o.default.FRAG_PARSING_DATA,{id:this.id,data1:r,startPTS:a,startDTS:a,type:"audiovideo",nb:1,dropped:0})}},{key:"passthrough",get:function(){return!0}}]),e}();n.default=l},{26:26}],38:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");
}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){i(this,e),"string"==typeof t&&(t=e.parseAttrList(t));for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n])}return a(e,[{key:"decimalInteger",value:function(e){var t=parseInt(this[e],10);
return t>Number.MAX_SAFE_INTEGER?1/0:t}},{key:"hexadecimalInteger",value:function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),i=0;i<t.length/2;i++)n[i]=parseInt(t.slice(2*i,2*i+2),16);return n}return null}},{key:"hexadecimalIntegerAsNumber",value:function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}},{key:"decimalFloatingPoint",value:function(e){return parseFloat(this[e])}},{key:"enumeratedString",value:function(e){
return this[e]}},{key:"decimalResolution",value:function(e){var t=/^(\d+)x(\d+)$/.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}}],[{key:"parseAttrList",value:function(e){for(var t,n=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,i={};null!==(t=n.exec(e));){var a=t[2],r='"';0===a.indexOf(r)&&a.lastIndexOf(r)===a.length-1&&(a=a.slice(1,-1)),i[t[1]]=a}return i}}]),e}();n.default=r},{}],39:[function(e,t,n){"use strict";var i={search:function(e,t){for(var n=0,i=e.length-1,a=null,r=null;n<=i;){
a=(n+i)/2|0,r=e[a];var s=t(r);if(s>0)n=a+1;else{if(!(s<0))return r;i=a-1}}return null}};t.exports=i},{}],40:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),
i&&e(t,i),t}}(),r={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,
178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},s=function(e){var t=e;return r.hasOwnProperty(e)&&(t=r[e]),String.fromCharCode(t)},o=15,l=32,c={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},u={17:2,18:4,21:6,22:8,23:10,19:13,20:15},d={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},h={25:2,26:4,29:6,30:8,31:10,
27:13,28:15},p=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],f={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var n=this.verboseFilter[e];this.verboseLevel>=n&&console.log(this.time+" ["+e+"] "+t)}},g=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},m=function(){function e(t,n,a,r,s){i(this,e),this.foreground=t||"white",this.underline=n||!1,this.italics=a||!1,
this.background=r||"black",this.flash=s||!1}return a(e,[{key:"reset",value:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}},{key:"setStyles",value:function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var i=t[n];e.hasOwnProperty(i)&&(this[i]=e[i])}}},{key:"isDefault",value:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}},{key:"equals",
value:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}},{key:"copy",value:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}},{key:"toString",value:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}
}]),e}(),v=function(){function e(t,n,a,r,s,o){i(this,e),this.uchar=t||" ",this.penState=new m(n,a,r,s,o)}return a(e,[{key:"reset",value:function(){this.uchar=" ",this.penState.reset()}},{key:"setChar",value:function(e,t){this.uchar=e,this.penState.copy(t)}},{key:"setPenState",value:function(e){this.penState.copy(e)}},{key:"equals",value:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}},{key:"copy",value:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)}},{key:"isEmpty",
value:function(){return" "===this.uchar&&this.penState.isDefault()}}]),e}(),y=function(){function e(){i(this,e),this.chars=[];for(var t=0;t<l;t++)this.chars.push(new v);this.pos=0,this.currPenState=new m}return a(e,[{key:"equals",value:function(e){for(var t=!0,n=0;n<l;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t}},{key:"copy",value:function(e){for(var t=0;t<l;t++)this.chars[t].copy(e.chars[t])}},{key:"isEmpty",value:function(){for(var e=!0,t=0;t<l;t++)if(!this.chars[t].isEmpty()){
e=!1;break}return e}},{key:"setCursor",value:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(f.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>l&&(f.log("ERROR","Too large cursor position "+this.pos),this.pos=l)}},{key:"moveCursor",value:function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}},{key:"backSpace",value:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState);
}},{key:"insertChar",value:function(e){e>=144&&this.backSpace();var t=s(e);return this.pos>=l?void f.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),void this.moveCursor(1))}},{key:"clearFromPos",value:function(e){var t;for(t=e;t<l;t++)this.chars[t].reset()}},{key:"clear",value:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}},{key:"clearToEndOfRow",value:function(){this.clearFromPos(this.pos);
}},{key:"getTextString",value:function(){for(var e=[],t=!0,n=0;n<l;n++){var i=this.chars[n].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")}},{key:"setPenStyles",value:function(e){this.currPenState.setStyles(e);var t=this.chars[this.pos];t.setPenState(this.currPenState)}}]),e}(),b=function(){function e(){i(this,e),this.rows=[];for(var t=0;t<o;t++)this.rows.push(new y);this.currRow=o-1,this.nrRollUpRows=null,this.reset()}return a(e,[{key:"reset",value:function(){for(var e=0;e<o;e++)this.rows[e].clear();
this.currRow=o-1}},{key:"equals",value:function(e){for(var t=!0,n=0;n<o;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}},{key:"copy",value:function(e){for(var t=0;t<o;t++)this.rows[t].copy(e.rows[t])}},{key:"isEmpty",value:function(){for(var e=!0,t=0;t<o;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}},{key:"backSpace",value:function(){var e=this.rows[this.currRow];e.backSpace()}},{key:"clearToEndOfRow",value:function(){var e=this.rows[this.currRow];e.clearToEndOfRow()}},{key:"insertChar",
value:function(e){var t=this.rows[this.currRow];t.insertChar(e)}},{key:"setPen",value:function(e){var t=this.rows[this.currRow];t.setPenStyles(e)}},{key:"moveCursor",value:function(e){var t=this.rows[this.currRow];t.moveCursor(e)}},{key:"setCursor",value:function(e){f.log("INFO","setCursor: "+e);var t=this.rows[this.currRow];t.setCursor(e)}},{key:"setPAC",value:function(e,t){f.log("INFO","pacData = "+JSON.stringify(e));var n=e.row-1;if(this.nrRollUpRows&&n<this.nrRollUpRows-1&&(n=this.nrRollUpRows-1),
this.currRow!==n){for(var i=0;i<o;i++)this.rows[i].clear();var a=this.currRow+1-this.nrRollUpRows,r=t.rows[a].cueStartTime;if(r&&r<f.time)for(i=0;i<this.nrRollUpRows;i++)this.rows[n-this.nrRollUpRows+i+1].copy(t.rows[a+i])}this.currRow=n;var s=this.rows[this.currRow];if(null!==e.indent){var l=e.indent,c=Math.max(l-1,0);s.setCursor(e.indent),e.color=s.chars[c].penState.foreground}var u={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(u)}},{key:"setBkgData",
value:function(e){f.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}},{key:"setRollUpRows",value:function(e){this.nrRollUpRows=e}},{key:"rollUp",value:function(){if(null===this.nrRollUpRows)return void f.log("DEBUG","roll_up but nrRollUpRows not set yet");f.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),f.log("INFO","Rolling up")}},{key:"getDisplayText",
value:function(e){e=e||!1;for(var t=[],n="",i=-1,a=0;a<o;a++){var r=this.rows[a].getTextString();r&&(i=a+1,e?t.push("Row "+i+": '"+r+"'"):t.push(r.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n}},{key:"getTextAndFormat",value:function(){return this.rows}}]),e}(),S=function(){function e(t,n){i(this,e),this.chNr=t,this.outputFilter=n,this.mode=null,this.verbose=0,this.displayedMemory=new b,this.nonDisplayedMemory=new b,this.lastOutputScreen=new b,this.currRollUpRow=this.displayedMemory.rows[o-1],
this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return a(e,[{key:"reset",value:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null}},{key:"getHandler",value:function(){return this.outputFilter}},{key:"setHandler",value:function(e){this.outputFilter=e}},{key:"setPAC",
value:function(e){this.writeScreen.setPAC(e,this.lastOutputScreen)}},{key:"setBkgData",value:function(e){this.writeScreen.setBkgData(e)}},{key:"setMode",value:function(e){e!==this.mode&&(this.mode=e,f.log("INFO","MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset(),this.lastOutputScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e);
}},{key:"insertChars",value:function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";f.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(f.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}},{key:"ccRCL",value:function(){f.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}},{key:"ccBS",value:function(){
f.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}},{key:"ccAOF",value:function(){}},{key:"ccAON",value:function(){}},{key:"ccDER",value:function(){f.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}},{key:"ccRU",value:function(e){f.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e);
}},{key:"ccFON",value:function(){f.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})}},{key:"ccRDC",value:function(){f.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}},{key:"ccTR",value:function(){f.log("INFO","TR"),this.setMode("MODE_TEXT")}},{key:"ccRTD",value:function(){f.log("INFO","RTD"),this.setMode("MODE_TEXT")}},{key:"ccEDM",value:function(){f.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()}},{key:"ccCR",
value:function(){f.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()}},{key:"ccENM",value:function(){f.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}},{key:"ccEOC",value:function(){if(f.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,f.log("TEXT","DISP: "+this.displayedMemory.getDisplayText());
}this.outputDataUpdate()}},{key:"ccTO",value:function(e){f.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}},{key:"ccMIDROW",value:function(e){var t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=i[n]}f.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}},{key:"outputDataUpdate",value:function(){var e=f.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),
null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))}},{key:"cueSplitAtTime",value:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),
this.cueStartTime=e))}}]),e}(),w=function(){function e(t,n,a){i(this,e),this.field=t||1,this.outputs=[n,a],this.channels=[new S(1,n),new S(2,a)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return a(e,[{key:"getHandler",value:function(e){return this.channels[e].getHandler()}},{key:"setHandler",value:function(e,t){this.channels[e].setHandler(t)}},{key:"addData",value:function(e,t){
var n,i,a,r=!1;this.lastTime=e,f.setTime(e);for(var s=0;s<t.length;s+=2)if(i=127&t[s],a=127&t[s+1],0!==i||0!==a){if(f.log("DATA","["+g([t[s],t[s+1]])+"] -> ("+g([i,a])+")"),n=this.parseCmd(i,a),n||(n=this.parseMidrow(i,a)),n||(n=this.parsePAC(i,a)),n||(n=this.parseBackgroundAttributes(i,a)),!n&&(r=this.parseChars(i,a)))if(this.currChNr&&this.currChNr>=0){var o=this.channels[this.currChNr-1];o.insertChars(r)}else f.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:r?this.dataCounters.char+=2:(this.dataCounters.other+=2,
f.log("WARNING","Couldn't parse cleaned data "+g([i,a])+" orig: "+g([t[s],t[s+1]])))}else this.dataCounters.padding+=2}},{key:"parseCmd",value:function(e,t){var n=null,i=(20===e||28===e)&&32<=t&&t<=47,a=(23===e||31===e)&&33<=t&&t<=35;if(!i&&!a)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,f.log("DEBUG","Repeated command ("+g([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var r=this.channels[n-1];return 20===e||28===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),
this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0}},{key:"parseMidrow",value:function(e,t){var n=null;if((17===e||25===e)&&32<=t&&t<=47){if(n=17===e?1:2,n!==this.currChNr)return f.log("ERROR","Mismatch channel in midrow parsing"),!1;var i=this.channels[n-1];return i.ccMIDROW(t),f.log("DEBUG","MIDROW ("+g([e,t])+")"),!0}return!1}},{key:"parsePAC",value:function(e,t){var n=null,i=null,a=(17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127,r=(16===e||24===e)&&64<=t&&t<=95;if(!a&&!r)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,
this.lastCmdB=null,!0;n=e<=23?1:2,i=64<=t&&t<=95?1===n?c[e]:d[e]:1===n?u[e]:h[e];var s=this.interpretPAC(i,t),o=this.channels[n-1];return o.setPAC(s),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0}},{key:"interpretPAC",value:function(e,t){var n=t,i={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,i.underline=1===(1&n),n<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((n-16)/2),
i}},{key:"parseChars",value:function(e,t){var n=null,i=null,a=null;if(e>=25?(n=2,a=e-8):(n=1,a=e),17<=a&&a<=19){var r=t;r=17===a?t+80:18===a?t+112:t+144,f.log("INFO","Special char '"+s(r)+"' in channel "+n),i=[r]}else 32<=e&&e<=127&&(i=0===t?[e]:[e,t]);if(i){var o=g(i);f.log("DEBUG","Char codes =  "+o.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i}},{key:"parseBackgroundAttributes",value:function(e,t){var n,i,a,r,s=(16===e||24===e)&&32<=t&&t<=47,o=(23===e||31===e)&&45<=t&&t<=47;return!(!s&&!o)&&(n={},
16===e||24===e?(i=Math.floor((t-32)/2),n.background=p[i],t%2===1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),a=e<24?1:2,r=this.channels[a-1],r.setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)}},{key:"reset",value:function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null}},{key:"cueSplitAtTime",value:function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e);
}}]),e}();n.default=w},{}],41:[function(e,t,n){"use strict";var i={newCue:function(e,t,n,i){for(var a,r,s,o,l,c=window.VTTCue||window.TextTrackCue,u=0;u<i.rows.length;u++)if(a=i.rows[u],s=!0,o=0,l="",!a.isEmpty()){for(var d=0;d<a.chars.length;d++)a.chars[d].uchar.match(/\s/)&&s?o++:(l+=a.chars[d].uchar,s=!1);a.cueStartTime=t,r=new c(t,n,l.trim()),o>=16?o--:o++,navigator.userAgent.match(/Firefox\//)?r.line=u+1:r.line=u>7?u-2:u+1,r.align="left",r.position=Math.max(0,Math.min(100,100*(o/32)+(navigator.userAgent.match(/Firefox\//)?50:0))),
e.addCue(r)}}};t.exports=i},{}],42:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){i(this,e),this.alpha_=t?Math.exp(Math.log(.5)/t):0,
this.estimate_=0,this.totalWeight_=0}return a(e,[{key:"sample",value:function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}},{key:"getTotalWeight",value:function(){return this.totalWeight_}},{key:"getEstimate",value:function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_}}]),e}();n.default=r},{}],43:[function(e,t,n){"use strict";function i(){}function a(e,t){return t="["+e+"] > "+t}
function r(e){var t=self.console[e];return t?function(){for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];i[0]&&(i[0]=a(e,i[0])),t.apply(self.console,i)}:i}function s(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];n.forEach(function(t){c[t]=e[t]?e[t].bind(e):r(t)})}Object.defineProperty(n,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e;
},l={trace:i,debug:i,log:i,warn:i,info:i,error:i},c=l;n.enableLogs=function(e){if(e===!0||"object"===("undefined"==typeof e?"undefined":o(e))){s(e,"debug","log","info","warn","error");try{c.log()}catch(e){c=l}}else c=l},n.logger=c},{}],44:[function(e,t,n){"use strict";"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(e,t){var n=new Uint8Array(this);void 0===t&&(t=n.length);for(var i=new ArrayBuffer(t-e),a=new Uint8Array(i),r=0;r<a.length;r++)a[r]=n[r+e];
return i})},{}],45:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){i(this,e)}return a(e,null,[{key:"toString",
value:function(e){for(var t="",n=e.length,i=0;i<n;i++)t+="["+e.start(i).toFixed(3)+","+e.end(i).toFixed(3)+"]";return t}}]),e}();n.default=r},{}],46:[function(e,t,n){"use strict";var i={buildAbsoluteURL:function(e,t){if(t=t.trim(),/^[a-z]+:/i.test(t))return t;var n=null,a=null,r=/^([^#]*)(.*)$/.exec(t);r&&(a=r[2],t=r[1]);var s=/^([^\?]*)(.*)$/.exec(t);s&&(n=s[2],t=s[1]);var o=/^([^#]*)(.*)$/.exec(e);o&&(e=o[1]);var l=/^([^\?]*)(.*)$/.exec(e);l&&(e=l[1]);var c=/^(([a-z]+:)?\/\/[a-z0-9\.\-_~]+(:[0-9]+)?)?(\/.*)$/i.exec(e);
if(!c)throw new Error("Error trying to parse base URL.");var u=c[2]||"",d=c[1]||"",h=c[4],p=null;return p=/^\/\//.test(t)?u+"//"+i.buildAbsolutePath("",t.substring(2)):/^\//.test(t)?d+"/"+i.buildAbsolutePath("",t.substring(1)):i.buildAbsolutePath(d+h,t),n&&(p+=n),a&&(p+=a),p},buildAbsolutePath:function(e,t){for(var n,i,a=t,r="",s=e.replace(/[^\/]*$/,a.replace(/(\/|^)(?:\.?\/+)+/g,"$1")),o=0;i=s.indexOf("/../",o),i>-1;o=i+n)n=/^\/(?:\.\.\/)*/.exec(s.slice(i))[0].length,r=(r+s.substring(o,i)).replace(new RegExp("(?:\\/+[^\\/]*){0,"+(n-1)/3+"}$"),"/");
return r+s.substr(o)}};t.exports=i},{}],47:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(43),s=function(){function e(t){i(this,e),
t&&t.xhrSetup&&(this.xhrSetup=t.xhrSetup)}return a(e,[{key:"destroy",value:function(){this.abort(),this.loader=null}},{key:"abort",value:function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null}},{key:"load",value:function(e,t,n){this.context=e,this.config=t,this.callbacks=n,this.stats={trequest:performance.now(),retry:0},this.retryDelay=t.retryDelay,
this.loadInternal()}},{key:"loadInternal",value:function(){var e,t=this.context;e="undefined"!=typeof XDomainRequest?this.loader=new XDomainRequest:this.loader=new XMLHttpRequest,e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.open("GET",t.url,!0),t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.responseType=t.responseType;var n=this.stats;n.tfirst=0,n.loaded=0,this.xhrSetup&&this.xhrSetup(e,t.url),this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),
e.send()}},{key:"readystatechange",value:function(e){var t=e.currentTarget,n=t.readyState,i=this.stats,a=this.context,s=this.config;if(!i.aborted&&(window.clearTimeout(this.requestTimeout),n>=2&&(0===i.tfirst&&(i.tfirst=Math.max(performance.now(),i.trequest),this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),s.timeout-(i.tfirst-i.trequest))),4===n))){var o=t.status;if(o>=200&&o<300){i.tload=Math.max(i.tfirst,performance.now());var l=void 0,c=void 0;"arraybuffer"===a.responseType?(l=t.response,
c=l.byteLength):(l=t.responseText,c=l.length),i.loaded=i.total=c;var u={url:t.responseURL,data:l};this.callbacks.onSuccess(u,i,a)}else i.retry>=s.maxRetry||o>=400&&o<499?(r.logger.error(o+" while loading "+a.url),this.callbacks.onError({code:o,text:t.statusText},a)):(r.logger.warn(o+" while loading "+a.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),
i.retry++)}}},{key:"loadtimeout",value:function(){r.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context)}},{key:"loadprogress",value:function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total);var n=this.callbacks.onProgress;n&&n(t,this.context,null)}}]),e}();n.default=s},{43:43}]},{},[31])(31)})},function(e,t,n){(function(n){var i={},a="undefined"!=typeof e&&e.exports&&"undefined"!=typeof n?n:this||i;(a._gsQueue||(a._gsQueue=[])).push(function(){
"use strict";a._gsDefine("easing.Back",["easing.Ease"],function(e){var t,n,i,r=a.GreenSockGlobals||a,s=r.com.greensock,o=2*Math.PI,l=Math.PI/2,c=s._class,u=function(t,n){var i=c("easing."+t,function(){},!0),a=i.prototype=new e;return a.constructor=i,a.getRatio=n,i},d=e.register||function(){},h=function(e,t,n,i,a){var r=c("easing."+e,{easeOut:new t,easeIn:new n,easeInOut:new i},!0);return d(r,e),r},p=function(e,t,n){this.t=e,this.v=t,n&&(this.next=n,n.prev=this,this.c=n.v-t,this.gap=n.t-e)},f=function(t,n){
var i=c("easing."+t,function(e){this._p1=e||0===e?e:1.70158,this._p2=1.525*this._p1},!0),a=i.prototype=new e;return a.constructor=i,a.getRatio=n,a.config=function(e){return new i(e)},i},g=h("Back",f("BackOut",function(e){return(e-=1)*e*((this._p1+1)*e+this._p1)+1}),f("BackIn",function(e){return e*e*((this._p1+1)*e-this._p1)}),f("BackInOut",function(e){return(e*=2)<1?.5*e*e*((this._p2+1)*e-this._p2):.5*((e-=2)*e*((this._p2+1)*e+this._p2)+2)})),m=c("easing.SlowMo",function(e,t,n){t=t||0===t?t:.7,null==e?e=.7:e>1&&(e=1),
this._p=1!==e?t:0,this._p1=(1-e)/2,this._p2=e,this._p3=this._p1+this._p2,this._calcEnd=n===!0},!0),v=m.prototype=new e;return v.constructor=m,v.getRatio=function(e){var t=e+(.5-e)*this._p;return e<this._p1?this._calcEnd?1-(e=1-e/this._p1)*e:t-(e=1-e/this._p1)*e*e*e*t:e>this._p3?this._calcEnd?1-(e=(e-this._p3)/this._p1)*e:t+(e-t)*(e=(e-this._p3)/this._p1)*e*e*e:this._calcEnd?1:t},m.ease=new m(.7,.7),v.config=m.config=function(e,t,n){return new m(e,t,n)},t=c("easing.SteppedEase",function(e){e=e||1,
this._p1=1/e,this._p2=e+1},!0),v=t.prototype=new e,v.constructor=t,v.getRatio=function(e){return e<0?e=0:e>=1&&(e=.999999999),(this._p2*e>>0)*this._p1},v.config=t.config=function(e){return new t(e)},n=c("easing.RoughEase",function(t){t=t||{};for(var n,i,a,r,s,o,l=t.taper||"none",c=[],u=0,d=0|(t.points||20),h=d,f=t.randomize!==!1,g=t.clamp===!0,m=t.template instanceof e?t.template:null,v="number"==typeof t.strength?.4*t.strength:.4;--h>-1;)n=f?Math.random():1/d*h,i=m?m.getRatio(n):n,"none"===l?a=v:"out"===l?(r=1-n,
a=r*r*v):"in"===l?a=n*n*v:n<.5?(r=2*n,a=r*r*.5*v):(r=2*(1-n),a=r*r*.5*v),f?i+=Math.random()*a-.5*a:h%2?i+=.5*a:i-=.5*a,g&&(i>1?i=1:i<0&&(i=0)),c[u++]={x:n,y:i};for(c.sort(function(e,t){return e.x-t.x}),o=new p(1,1,null),h=d;--h>-1;)s=c[h],o=new p(s.x,s.y,o);this._prev=new p(0,0,0!==o.t?o:o.next)},!0),v=n.prototype=new e,v.constructor=n,v.getRatio=function(e){var t=this._prev;if(e>t.t){for(;t.next&&e>=t.t;)t=t.next;t=t.prev}else for(;t.prev&&e<=t.t;)t=t.prev;return this._prev=t,t.v+(e-t.t)/t.gap*t.c;
},v.config=function(e){return new n(e)},n.ease=new n,h("Bounce",u("BounceOut",function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}),u("BounceIn",function(e){return(e=1-e)<1/2.75?1-7.5625*e*e:e<2/2.75?1-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?1-(7.5625*(e-=2.25/2.75)*e+.9375):1-(7.5625*(e-=2.625/2.75)*e+.984375)}),u("BounceInOut",function(e){var t=e<.5;return e=t?1-2*e:2*e-1,e<1/2.75?e*=7.5625*e:e=e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,
t?.5*(1-e):.5*e+.5})),h("Circ",u("CircOut",function(e){return Math.sqrt(1-(e-=1)*e)}),u("CircIn",function(e){return-(Math.sqrt(1-e*e)-1)}),u("CircInOut",function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)})),i=function(t,n,i){var a=c("easing."+t,function(e,t){this._p1=e>=1?e:1,this._p2=(t||i)/(e<1?e:1),this._p3=this._p2/o*(Math.asin(1/this._p1)||0),this._p2=o/this._p2},!0),r=a.prototype=new e;return r.constructor=a,r.getRatio=n,r.config=function(e,t){return new a(e,t);
},a},h("Elastic",i("ElasticOut",function(e){return this._p1*Math.pow(2,-10*e)*Math.sin((e-this._p3)*this._p2)+1},.3),i("ElasticIn",function(e){return-(this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2))},.3),i("ElasticInOut",function(e){return(e*=2)<1?-.5*(this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(e-=1))*Math.sin((e-this._p3)*this._p2)*.5+1},.45)),h("Expo",u("ExpoOut",function(e){return 1-Math.pow(2,-10*e)}),u("ExpoIn",function(e){return Math.pow(2,10*(e-1))-.001;
}),u("ExpoInOut",function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))})),h("Sine",u("SineOut",function(e){return Math.sin(e*l)}),u("SineIn",function(e){return-Math.cos(e*l)+1}),u("SineInOut",function(e){return-.5*(Math.cos(Math.PI*e)-1)})),c("easing.EaseLookup",{find:function(t){return e.map[t]}},!0),d(r.SlowMo,"SlowMo","ease,"),d(n,"RoughEase","ease,"),d(t,"SteppedEase","ease,"),g},!0)}),a._gsDefine&&a._gsQueue.pop()(),t.Power1=Power1,t.Power2=Power2,t.Power3=Power3}).call(t,n(144));
},function(e,t,n){(function(i){var a,r,s={};/*!
 * VERSION: 1.18.1
 * DATE: 2015-12-11
 * UPDATES AND DOCS AT: http://greensock.com
 *
 * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
 * This work is subject to the terms at http://greensock.com/standard-license or for
 * Club GreenSock members, the software agreement that was issued with your membership.
 *
 * @author: Jack Doyle, jack@greensock.com
 */
!function(i,s){"use strict";var o=i.GreenSockGlobals=i.GreenSockGlobals||i;if(!o.TweenLite){var l,c,u,d,h,p=function(e){var t,n=e.split("."),i=o;for(t=0;t<n.length;t++)i[n[t]]=i=i[n[t]]||{};return i},f=p("com.greensock"),g=1e-10,m=function(e){var t,n=[],i=e.length;for(t=0;t!==i;n.push(e[t++]));return n},v=function(){},y=function(){var e=Object.prototype.toString,t=e.call([]);return function(n){return null!=n&&(n instanceof Array||"object"==typeof n&&!!n.push&&e.call(n)===t)}}(),b={},S=function(i,l,c,u){
this.sc=b[i]?b[i].sc:[],b[i]=this,this.gsClass=null,this.func=c;var d=[];this.check=function(h){for(var f,g,m,v,y,w=l.length,M=w;--w>-1;)(f=b[l[w]]||new S(l[w],[])).gsClass?(d[w]=f.gsClass,M--):h&&f.sc.push(this);if(0===M&&c)for(g=("com.greensock."+i).split("."),m=g.pop(),v=p(g.join("."))[m]=this.gsClass=c.apply(c,d),u&&(o[m]=v,y="undefined"!=typeof e&&e.exports,!y&&n(3142)?(a=[],r=function(){return v}.apply(t,a),!(void 0!==r&&(e.exports=r))):i===s&&y&&(e.exports=v)),w=0;w<this.sc.length;w++)this.sc[w].check();
},this.check(!0)},w=i._gsDefine=function(e,t,n,i){return new S(e,t,n,i)},M=f._class=function(e,t,n){return t=t||function(){},w(e,[],function(){return t},n),t};w.globals=o;var I=[0,0,1,1],C=[],D=M("easing.Ease",function(e,t,n,i){this._func=e,this._type=n||0,this._power=i||0,this._params=t?I.concat(t):I},!0),T=D.map={},x=D.register=function(e,t,n,i){for(var a,r,s,o,l=t.split(","),c=l.length,u=(n||"easeIn,easeOut,easeInOut").split(",");--c>-1;)for(r=l[c],a=i?M("easing."+r,null,!0):f.easing[r]||{},s=u.length;--s>-1;)o=u[s],
T[r+"."+o]=T[o+r]=a[o]=e.getRatio?e:e[o]||new e};for(u=D.prototype,u._calcEnd=!1,u.getRatio=function(e){if(this._func)return this._params[0]=e,this._func.apply(null,this._params);var t=this._type,n=this._power,i=1===t?1-e:2===t?e:e<.5?2*e:2*(1-e);return 1===n?i*=i:2===n?i*=i*i:3===n?i*=i*i*i:4===n&&(i*=i*i*i*i),1===t?1-i:2===t?i:e<.5?i/2:1-i/2},l=["Linear","Quad","Cubic","Quart","Quint,Strong"],c=l.length;--c>-1;)u=l[c]+",Power"+c,x(new D(null,null,1,c),u,"easeOut",!0),x(new D(null,null,2,c),u,"easeIn"+(0===c?",easeNone":"")),
x(new D(null,null,3,c),u,"easeInOut");T.linear=f.easing.Linear.easeIn,T.swing=f.easing.Quad.easeInOut;var P=M("events.EventDispatcher",function(e){this._listeners={},this._eventTarget=e||this});u=P.prototype,u.addEventListener=function(e,t,n,i,a){a=a||0;var r,s,o=this._listeners[e],l=0;for(null==o&&(this._listeners[e]=o=[]),s=o.length;--s>-1;)r=o[s],r.c===t&&r.s===n?o.splice(s,1):0===l&&r.pr<a&&(l=s+1);o.splice(l,0,{c:t,s:n,up:i,pr:a}),this!==d||h||d.wake()},u.removeEventListener=function(e,t){var n,i=this._listeners[e];
if(i)for(n=i.length;--n>-1;)if(i[n].c===t)return void i.splice(n,1)},u.dispatchEvent=function(e){var t,n,i,a=this._listeners[e];if(a)for(t=a.length,n=this._eventTarget;--t>-1;)i=a[t],i&&(i.up?i.c.call(i.s||n,{type:e,target:n}):i.c.call(i.s||n))};var E=i.requestAnimationFrame,A=i.cancelAnimationFrame,L=Date.now||function(){return(new Date).getTime()},k=L();for(l=["ms","moz","webkit","o"],c=l.length;--c>-1&&!E;)E=i[l[c]+"RequestAnimationFrame"],A=i[l[c]+"CancelAnimationFrame"]||i[l[c]+"CancelRequestAnimationFrame"];
M("Ticker",function(e,t){var n,i,a,r,s,o=this,l=L(),c=!(t===!1||!E)&&"auto",u=500,p=33,f="tick",m=function(e){var t,c,d=L()-k;d>u&&(l+=d-p),k+=d,o.time=(k-l)/1e3,t=o.time-s,(!n||t>0||e===!0)&&(o.frame++,s+=t+(t>=r?.004:r-t),c=!0),e!==!0&&(a=i(m)),c&&o.dispatchEvent(f)};P.call(o),o.time=o.frame=0,o.tick=function(){m(!0)},o.lagSmoothing=function(e,t){u=e||1/g,p=Math.min(t,u,0)},o.sleep=function(){null!=a&&(c&&A?A(a):clearTimeout(a),i=v,a=null,o===d&&(h=!1))},o.wake=function(e){null!==a?o.sleep():e?l+=-k+(k=L()):o.frame>10&&(k=L()-u+5),
i=0===n?v:c&&E?E:function(e){return setTimeout(e,1e3*(s-o.time)+1|0)},o===d&&(h=!0),m(2)},o.fps=function(e){return arguments.length?(n=e,r=1/(n||60),s=this.time+r,void o.wake()):n},o.useRAF=function(e){return arguments.length?(o.sleep(),c=e,void o.fps(n)):c},o.fps(e),setTimeout(function(){"auto"===c&&o.frame<5&&"hidden"!==document.visibilityState&&o.useRAF(!1)},1500)}),u=f.Ticker.prototype=new f.events.EventDispatcher,u.constructor=f.Ticker;var N=M("core.Animation",function(e,t){if(this.vars=t=t||{},
this._duration=this._totalDuration=e||0,this._delay=Number(t.delay)||0,this._timeScale=1,this._active=t.immediateRender===!0,this.data=t.data,this._reversed=t.reversed===!0,J){h||d.wake();var n=this.vars.useFrames?X:J;n.add(this,n._time),this.vars.paused&&this.paused(!0)}});d=N.ticker=new f.Ticker,u=N.prototype,u._dirty=u._gc=u._initted=u._paused=!1,u._totalTime=u._time=0,u._rawPrevTime=-1,u._next=u._last=u._onUpdate=u._timeline=u.timeline=null,u._paused=!1;var _=function(){h&&L()-k>2e3&&d.wake(),
setTimeout(_,2e3)};_(),u.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},u.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},u.resume=function(e,t){return null!=e&&this.seek(e,t),this.paused(!1)},u.seek=function(e,t){return this.totalTime(Number(e),t!==!1)},u.restart=function(e,t){return this.reversed(!1).paused(!1).totalTime(e?-this._delay:0,t!==!1,!0)},u.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1);
},u.render=function(e,t,n){},u.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},u.isActive=function(){var e,t=this._timeline,n=this._startTime;return!t||!this._gc&&!this._paused&&t.isActive()&&(e=t.rawTime())>=n&&e<n+this.totalDuration()/this._timeScale},u._enabled=function(e,t){return h||d.wake(),this._gc=!e,this._active=this.isActive(),t!==!0&&(e&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!e&&this.timeline&&this._timeline._remove(this,!0)),
!1},u._kill=function(e,t){return this._enabled(!1,!1)},u.kill=function(e,t){return this._kill(e,t),this},u._uncache=function(e){for(var t=e?this:this.timeline;t;)t._dirty=!0,t=t.timeline;return this},u._swapSelfInParams=function(e){for(var t=e.length,n=e.concat();--t>-1;)"{self}"===e[t]&&(n[t]=this);return n},u._callback=function(e){var t=this.vars;t[e].apply(t[e+"Scope"]||t.callbackScope||this,t[e+"Params"]||C)},u.eventCallback=function(e,t,n,i){if("on"===(e||"").substr(0,2)){var a=this.vars;if(1===arguments.length)return a[e];
null==t?delete a[e]:(a[e]=t,a[e+"Params"]=y(n)&&n.join("").indexOf("{self}")!==-1?this._swapSelfInParams(n):n,a[e+"Scope"]=i),"onUpdate"===e&&(this._onUpdate=t)}return this},u.delay=function(e){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+e-this._delay),this._delay=e,this):this._delay},u.duration=function(e){return arguments.length?(this._duration=this._totalDuration=e,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==e&&this.totalTime(this._totalTime*(e/this._duration),!0),
this):(this._dirty=!1,this._duration)},u.totalDuration=function(e){return this._dirty=!1,arguments.length?this.duration(e):this._totalDuration},u.time=function(e,t){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(e>this._duration?this._duration:e,t)):this._time},u.totalTime=function(e,t,n){if(h||d.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(e<0&&!n&&(e+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var i=this._totalDuration,a=this._timeline;
if(e>i&&!n&&(e=i),this._startTime=(this._paused?this._pauseTime:a._time)-(this._reversed?i-e:e)/this._timeScale,a._dirty||this._uncache(!1),a._timeline)for(;a._timeline;)a._timeline._time!==(a._startTime+a._totalTime)/a._timeScale&&a.totalTime(a._totalTime,!0),a=a._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===e&&0!==this._duration||(U.length&&ee(),this.render(e,t,!1),U.length&&ee())}return this},u.progress=u.totalProgress=function(e,t){var n=this.duration();return arguments.length?this.totalTime(n*e,t):n?this._time/n:this.ratio;
},u.startTime=function(e){return arguments.length?(e!==this._startTime&&(this._startTime=e,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,e-this._delay)),this):this._startTime},u.endTime=function(e){return this._startTime+(0!=e?this.totalDuration():this.duration())/this._timeScale},u.timeScale=function(e){if(!arguments.length)return this._timeScale;if(e=e||g,this._timeline&&this._timeline.smoothChildTiming){var t=this._pauseTime,n=t||0===t?t:this._timeline.totalTime();this._startTime=n-(n-this._startTime)*this._timeScale/e;
}return this._timeScale=e,this._uncache(!1)},u.reversed=function(e){return arguments.length?(e!=this._reversed&&(this._reversed=e,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},u.paused=function(e){if(!arguments.length)return this._paused;var t,n,i=this._timeline;return e!=this._paused&&i&&(h||e||d.wake(),t=i.rawTime(),n=t-this._pauseTime,!e&&i.smoothChildTiming&&(this._startTime+=n,this._uncache(!1)),
this._pauseTime=e?t:null,this._paused=e,this._active=this.isActive(),!e&&0!==n&&this._initted&&this.duration()&&(t=i.smoothChildTiming?this._totalTime:(t-this._startTime)/this._timeScale,this.render(t,t===this._totalTime,!0))),this._gc&&!e&&this._enabled(!0,!1),this};var O=M("core.SimpleTimeline",function(e){N.call(this,0,e),this.autoRemoveChildren=this.smoothChildTiming=!0});u=O.prototype=new N,u.constructor=O,u.kill()._gc=!1,u._first=u._last=u._recent=null,u._sortChildren=!1,u.add=u.insert=function(e,t,n,i){
var a,r;if(e._startTime=Number(t||0)+e._delay,e._paused&&this!==e._timeline&&(e._pauseTime=e._startTime+(this.rawTime()-e._startTime)/e._timeScale),e.timeline&&e.timeline._remove(e,!0),e.timeline=e._timeline=this,e._gc&&e._enabled(!0,!0),a=this._last,this._sortChildren)for(r=e._startTime;a&&a._startTime>r;)a=a._prev;return a?(e._next=a._next,a._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=a,this._recent=e,this._timeline&&this._uncache(!0),this},u._remove=function(e,t){
return e.timeline===this&&(t||e._enabled(!1,!0),e._prev?e._prev._next=e._next:this._first===e&&(this._first=e._next),e._next?e._next._prev=e._prev:this._last===e&&(this._last=e._prev),e._next=e._prev=e.timeline=null,e===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},u.render=function(e,t,n){var i,a=this._first;for(this._totalTime=this._time=this._rawPrevTime=e;a;)i=a._next,(a._active||e>=a._startTime&&!a._paused)&&(a._reversed?a.render((a._dirty?a.totalDuration():a._totalDuration)-(e-a._startTime)*a._timeScale,t,n):a.render((e-a._startTime)*a._timeScale,t,n)),
a=i},u.rawTime=function(){return h||d.wake(),this._totalTime};var R=M("TweenLite",function(e,t,n){if(N.call(this,t,n),this.render=R.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:R.selector(e)||e;var a,r,s,o=e.jquery||e.length&&e!==i&&e[0]&&(e[0]===i||e[0].nodeType&&e[0].style&&!e.nodeType),l=this.vars.overwrite;if(this._overwrite=l=null==l?Z[R.defaultOverwrite]:"number"==typeof l?l>>0:Z[l],(o||e instanceof Array||e.push&&y(e))&&"number"!=typeof e[0])for(this._targets=s=m(e),
this._propLookup=[],this._siblings=[],a=0;a<s.length;a++)r=s[a],r?"string"!=typeof r?r.length&&r!==i&&r[0]&&(r[0]===i||r[0].nodeType&&r[0].style&&!r.nodeType)?(s.splice(a--,1),this._targets=s=s.concat(m(r))):(this._siblings[a]=te(r,this,!1),1===l&&this._siblings[a].length>1&&ie(r,this,null,1,this._siblings[a])):(r=s[a--]=R.selector(r),"string"==typeof r&&s.splice(a+1,1)):s.splice(a--,1);else this._propLookup={},this._siblings=te(e,this,!1),1===l&&this._siblings.length>1&&ie(e,this,null,1,this._siblings);
(this.vars.immediateRender||0===t&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-g,this.render(-this._delay))},!0),j=function(e){return e&&e.length&&e!==i&&e[0]&&(e[0]===i||e[0].nodeType&&e[0].style&&!e.nodeType)},z=function(e,t){var n,i={};for(n in e)q[n]||n in t&&"transform"!==n&&"x"!==n&&"y"!==n&&"width"!==n&&"height"!==n&&"className"!==n&&"border"!==n||!(!Y[n]||Y[n]&&Y[n]._autoCSS)||(i[n]=e[n],delete e[n]);e.css=i};u=R.prototype=new N,u.constructor=R,u.kill()._gc=!1,u.ratio=0,
u._firstPT=u._targets=u._overwrittenProps=u._startAt=null,u._notifyPluginsOfEnabled=u._lazy=!1,R.version="1.18.1",R.defaultEase=u._ease=new D(null,null,1,1),R.defaultOverwrite="auto",R.ticker=d,R.autoSleep=120,R.lagSmoothing=function(e,t){d.lagSmoothing(e,t)},R.selector=i.$||i.jQuery||function(e){var t=i.$||i.jQuery;return t?(R.selector=t,t(e)):"undefined"==typeof document?e:document.querySelectorAll?document.querySelectorAll(e):document.getElementById("#"===e.charAt(0)?e.substr(1):e)};var U=[],F={},B=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,V=function(e){
for(var t,n=this._firstPT,i=1e-6;n;)t=n.blob?e?this.join(""):this.start:n.c*e+n.s,n.r?t=Math.round(t):t<i&&t>-i&&(t=0),n.f?n.fp?n.t[n.p](n.fp,t):n.t[n.p](t):n.t[n.p]=t,n=n._next},H=function(e,t,n,i){var a,r,s,o,l,c,u,d=[e,t],h=0,p="",f=0;for(d.start=e,n&&(n(d),e=d[0],t=d[1]),d.length=0,a=e.match(B)||[],r=t.match(B)||[],i&&(i._next=null,i.blob=1,d._firstPT=i),l=r.length,o=0;o<l;o++)u=r[o],c=t.substr(h,t.indexOf(u,h)-h),p+=c||!o?c:",",h+=c.length,f?f=(f+1)%5:"rgba("===c.substr(-5)&&(f=1),u===a[o]||a.length<=o?p+=u:(p&&(d.push(p),
p=""),s=parseFloat(a[o]),d.push(s),d._firstPT={_next:d._firstPT,t:d,p:d.length-1,s:s,c:("="===u.charAt(1)?parseInt(u.charAt(0)+"1",10)*parseFloat(u.substr(2)):parseFloat(u)-s)||0,f:0,r:f&&f<4}),h+=u.length;return p+=t.substr(h),p&&d.push(p),d.setRatio=V,d},W=function(e,t,n,i,a,r,s,o){var l,c,u="get"===n?e[t]:n,d=typeof e[t],h="string"==typeof i&&"="===i.charAt(1),p={t:e,p:t,s:u,f:"function"===d,pg:0,n:a||t,r:r,pr:0,c:h?parseInt(i.charAt(0)+"1",10)*parseFloat(i.substr(2)):parseFloat(i)-u||0};if("number"!==d&&("function"===d&&"get"===n&&(c=t.indexOf("set")||"function"!=typeof e["get"+t.substr(3)]?t:"get"+t.substr(3),
p.s=u=s?e[c](s):e[c]()),"string"==typeof u&&(s||isNaN(u))?(p.fp=s,l=H(u,i,o||R.defaultStringFilter,p),p={t:l,p:"setRatio",s:0,c:1,f:2,pg:0,n:a||t,pr:0}):h||(p.s=parseFloat(u),p.c=parseFloat(i)-p.s||0)),p.c)return(p._next=this._firstPT)&&(p._next._prev=p),this._firstPT=p,p},Q=R._internals={isArray:y,isSelector:j,lazyTweens:U,blobDif:H},Y=R._plugins={},G=Q.tweenLookup={},K=0,q=Q.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,
onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1},Z={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},X=N._rootFramesTimeline=new O,J=N._rootTimeline=new O,$=30,ee=Q.lazyRender=function(){
var e,t=U.length;for(F={};--t>-1;)e=U[t],e&&e._lazy!==!1&&(e.render(e._lazy[0],e._lazy[1],!0),e._lazy=!1);U.length=0};J._startTime=d.time,X._startTime=d.frame,J._active=X._active=!0,setTimeout(ee,1),N._updateRoot=R.render=function(){var e,t,n;if(U.length&&ee(),J.render((d.time-J._startTime)*J._timeScale,!1,!1),X.render((d.frame-X._startTime)*X._timeScale,!1,!1),U.length&&ee(),d.frame>=$){$=d.frame+(parseInt(R.autoSleep,10)||120);for(n in G){for(t=G[n].tweens,e=t.length;--e>-1;)t[e]._gc&&t.splice(e,1);
0===t.length&&delete G[n]}if(n=J._first,(!n||n._paused)&&R.autoSleep&&!X._first&&1===d._listeners.tick.length){for(;n&&n._paused;)n=n._next;n||d.sleep()}}},d.addEventListener("tick",N._updateRoot);var te=function(e,t,n){var i,a,r=e._gsTweenID;if(G[r||(e._gsTweenID=r="t"+K++)]||(G[r]={target:e,tweens:[]}),t&&(i=G[r].tweens,i[a=i.length]=t,n))for(;--a>-1;)i[a]===t&&i.splice(a,1);return G[r].tweens},ne=function(e,t,n,i){var a,r,s=e.vars.onOverwrite;return s&&(a=s(e,t,n,i)),s=R.onOverwrite,s&&(r=s(e,t,n,i)),
a!==!1&&r!==!1},ie=function(e,t,n,i,a){var r,s,o,l;if(1===i||i>=4){for(l=a.length,r=0;r<l;r++)if((o=a[r])!==t)o._gc||o._kill(null,e,t)&&(s=!0);else if(5===i)break;return s}var c,u=t._startTime+g,d=[],h=0,p=0===t._duration;for(r=a.length;--r>-1;)(o=a[r])===t||o._gc||o._paused||(o._timeline!==t._timeline?(c=c||ae(t,0,p),0===ae(o,c,p)&&(d[h++]=o)):o._startTime<=u&&o._startTime+o.totalDuration()/o._timeScale>u&&((p||!o._initted)&&u-o._startTime<=2e-10||(d[h++]=o)));for(r=h;--r>-1;)if(o=d[r],2===i&&o._kill(n,e,t)&&(s=!0),
2!==i||!o._firstPT&&o._initted){if(2!==i&&!ne(o,t))continue;o._enabled(!1,!1)&&(s=!0)}return s},ae=function(e,t,n){for(var i=e._timeline,a=i._timeScale,r=e._startTime;i._timeline;){if(r+=i._startTime,a*=i._timeScale,i._paused)return-100;i=i._timeline}return r/=a,r>t?r-t:n&&r===t||!e._initted&&r-t<2*g?g:(r+=e.totalDuration()/e._timeScale/a)>t+g?0:r-t-g};u._init=function(){var e,t,n,i,a,r=this.vars,s=this._overwrittenProps,o=this._duration,l=!!r.immediateRender,c=r.ease;if(r.startAt){this._startAt&&(this._startAt.render(-1,!0),
this._startAt.kill()),a={};for(i in r.startAt)a[i]=r.startAt[i];if(a.overwrite=!1,a.immediateRender=!0,a.lazy=l&&r.lazy!==!1,a.startAt=a.delay=null,this._startAt=R.to(this.target,0,a),l)if(this._time>0)this._startAt=null;else if(0!==o)return}else if(r.runBackwards&&0!==o)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(l=!1),n={};for(i in r)q[i]&&"autoCSS"!==i||(n[i]=r[i]);if(n.overwrite=0,n.data="isFromStart",n.lazy=l&&r.lazy!==!1,n.immediateRender=l,
this._startAt=R.to(this.target,0,n),l){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=c=c?c instanceof D?c:"function"==typeof c?new D(c,r.easeParams):T[c]||R.defaultEase:R.defaultEase,r.easeParams instanceof Array&&c.config&&(this._ease=c.config.apply(c,r.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(e=this._targets.length;--e>-1;)this._initProps(this._targets[e],this._propLookup[e]={},this._siblings[e],s?s[e]:null)&&(t=!0);else t=this._initProps(this.target,this._propLookup,this._siblings,s);
if(t&&R._onPluginEvent("_onInitAllProps",this),s&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),r.runBackwards)for(n=this._firstPT;n;)n.s+=n.c,n.c=-n.c,n=n._next;this._onUpdate=r.onUpdate,this._initted=!0},u._initProps=function(e,t,n,a){var r,s,o,l,c,u;if(null==e)return!1;F[e._gsTweenID]&&ee(),this.vars.css||e.style&&e!==i&&e.nodeType&&Y.css&&this.vars.autoCSS!==!1&&z(this.vars,e);for(r in this.vars)if(u=this.vars[r],q[r])u&&(u instanceof Array||u.push&&y(u))&&u.join("").indexOf("{self}")!==-1&&(this.vars[r]=u=this._swapSelfInParams(u,this));else if(Y[r]&&(l=new Y[r])._onInitTween(e,this.vars[r],this)){
for(this._firstPT=c={_next:this._firstPT,t:l,p:"setRatio",s:0,c:1,f:1,n:r,pg:1,pr:l._priority},s=l._overwriteProps.length;--s>-1;)t[l._overwriteProps[s]]=this._firstPT;(l._priority||l._onInitAllProps)&&(o=!0),(l._onDisable||l._onEnable)&&(this._notifyPluginsOfEnabled=!0),c._next&&(c._next._prev=c)}else t[r]=W.call(this,e,r,"get",u,r,0,null,this.vars.stringFilter);return a&&this._kill(a,e)?this._initProps(e,t,n,a):this._overwrite>1&&this._firstPT&&n.length>1&&ie(e,this,t,this._overwrite,n)?(this._kill(t,e),
this._initProps(e,t,n,a)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(F[e._gsTweenID]=!0),o)},u.render=function(e,t,n){var i,a,r,s,o=this._time,l=this._duration,c=this._rawPrevTime;if(e>=l-1e-7)this._totalTime=this._time=l,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(i=!0,a="onComplete",n=n||this._timeline.autoRemoveChildren),0===l&&(this._initted||!this.vars.lazy||n)&&(this._startTime===this._timeline._duration&&(e=0),(c<0||e<=0&&e>=-1e-7||c===g&&"isPause"!==this.data)&&c!==e&&(n=!0,
c>g&&(a="onReverseComplete")),this._rawPrevTime=s=!t||e||c===e?e:g);else if(e<1e-7)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==o||0===l&&c>0)&&(a="onReverseComplete",i=this._reversed),e<0&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||n)&&(c>=0&&(c!==g||"isPause"!==this.data)&&(n=!0),this._rawPrevTime=s=!t||e||c===e?e:g)),this._initted||(n=!0);else if(this._totalTime=this._time=e,this._easeType){var u=e/l,d=this._easeType,h=this._easePower;(1===d||3===d&&u>=.5)&&(u=1-u),
3===d&&(u*=2),1===h?u*=u:2===h?u*=u*u:3===h?u*=u*u*u:4===h&&(u*=u*u*u*u),1===d?this.ratio=1-u:2===d?this.ratio=u:e/l<.5?this.ratio=u/2:this.ratio=1-u/2}else this.ratio=this._ease.getRatio(e/l);if(this._time!==o||n){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!n&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=o,this._rawPrevTime=c,U.push(this),void(this._lazy=[e,t]);this._time&&!i?this.ratio=this._ease.getRatio(this._time/l):i&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1));
}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&e>=0&&(this._active=!0),0===o&&(this._startAt&&(e>=0?this._startAt.render(e,t,n):a||(a="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==l||t||this._callback("onStart"))),r=this._firstPT;r;)r.f?r.t[r.p](r.c*this.ratio+r.s):r.t[r.p]=r.c*this.ratio+r.s,r=r._next;this._onUpdate&&(e<0&&this._startAt&&e!==-1e-4&&this._startAt.render(e,t,n),t||(this._time!==o||i)&&this._callback("onUpdate")),a&&(this._gc&&!n||(e<0&&this._startAt&&!this._onUpdate&&e!==-1e-4&&this._startAt.render(e,t,n),
i&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[a]&&this._callback(a),0===l&&this._rawPrevTime===g&&s!==g&&(this._rawPrevTime=0)))}},u._kill=function(e,t,n){if("all"===e&&(e=null),null==e&&(null==t||t===this.target))return this._lazy=!1,this._enabled(!1,!1);t="string"!=typeof t?t||this._targets||this.target:R.selector(t)||t;var i,a,r,s,o,l,c,u,d,h=n&&this._time&&n._startTime===this._startTime&&this._timeline===n._timeline;if((y(t)||j(t))&&"number"!=typeof t[0])for(i=t.length;--i>-1;)this._kill(e,t[i],n)&&(l=!0);else{
if(this._targets){for(i=this._targets.length;--i>-1;)if(t===this._targets[i]){o=this._propLookup[i]||{},this._overwrittenProps=this._overwrittenProps||[],a=this._overwrittenProps[i]=e?this._overwrittenProps[i]||{}:"all";break}}else{if(t!==this.target)return!1;o=this._propLookup,a=this._overwrittenProps=e?this._overwrittenProps||{}:"all"}if(o){if(c=e||o,u=e!==a&&"all"!==a&&e!==o&&("object"!=typeof e||!e._tempKill),n&&(R.onOverwrite||this.vars.onOverwrite)){for(r in c)o[r]&&(d||(d=[]),d.push(r));if((d||!e)&&!ne(this,n,t,d))return!1;
}for(r in c)(s=o[r])&&(h&&(s.f?s.t[s.p](s.s):s.t[s.p]=s.s,l=!0),s.pg&&s.t._kill(c)&&(l=!0),s.pg&&0!==s.t._overwriteProps.length||(s._prev?s._prev._next=s._next:s===this._firstPT&&(this._firstPT=s._next),s._next&&(s._next._prev=s._prev),s._next=s._prev=null),delete o[r]),u&&(a[r]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},u.invalidate=function(){return this._notifyPluginsOfEnabled&&R._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,
this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],N.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-g,this.render(-this._delay)),this},u._enabled=function(e,t){if(h||d.wake(),e&&this._gc){var n,i=this._targets;if(i)for(n=i.length;--n>-1;)this._siblings[n]=te(i[n],this,!0);else this._siblings=te(this.target,this,!0)}return N.prototype._enabled.call(this,e,t),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&R._onPluginEvent(e?"_onEnable":"_onDisable",this);
},R.to=function(e,t,n){return new R(e,t,n)},R.from=function(e,t,n){return n.runBackwards=!0,n.immediateRender=0!=n.immediateRender,new R(e,t,n)},R.fromTo=function(e,t,n,i){return i.startAt=n,i.immediateRender=0!=i.immediateRender&&0!=n.immediateRender,new R(e,t,i)},R.delayedCall=function(e,t,n,i,a){return new R(t,0,{delay:e,onComplete:t,onCompleteParams:n,callbackScope:i,onReverseComplete:t,onReverseCompleteParams:n,immediateRender:!1,lazy:!1,useFrames:a,overwrite:0})},R.set=function(e,t){return new R(e,0,t);
},R.getTweensOf=function(e,t){if(null==e)return[];e="string"!=typeof e?e:R.selector(e)||e;var n,i,a,r;if((y(e)||j(e))&&"number"!=typeof e[0]){for(n=e.length,i=[];--n>-1;)i=i.concat(R.getTweensOf(e[n],t));for(n=i.length;--n>-1;)for(r=i[n],a=n;--a>-1;)r===i[a]&&i.splice(n,1)}else for(i=te(e).concat(),n=i.length;--n>-1;)(i[n]._gc||t&&!i[n].isActive())&&i.splice(n,1);return i},R.killTweensOf=R.killDelayedCallsTo=function(e,t,n){"object"==typeof t&&(n=t,t=!1);for(var i=R.getTweensOf(e,t),a=i.length;--a>-1;)i[a]._kill(n,e);
};var re=M("plugins.TweenPlugin",function(e,t){this._overwriteProps=(e||"").split(","),this._propName=this._overwriteProps[0],this._priority=t||0,this._super=re.prototype},!0);if(u=re.prototype,re.version="1.18.0",re.API=2,u._firstPT=null,u._addTween=W,u.setRatio=V,u._kill=function(e){var t,n=this._overwriteProps,i=this._firstPT;if(null!=e[this._propName])this._overwriteProps=[];else for(t=n.length;--t>-1;)null!=e[n[t]]&&n.splice(t,1);for(;i;)null!=e[i.n]&&(i._next&&(i._next._prev=i._prev),i._prev?(i._prev._next=i._next,
i._prev=null):this._firstPT===i&&(this._firstPT=i._next)),i=i._next;return!1},u._roundProps=function(e,t){for(var n=this._firstPT;n;)(e[this._propName]||null!=n.n&&e[n.n.split(this._propName+"_").join("")])&&(n.r=t),n=n._next},R._onPluginEvent=function(e,t){var n,i,a,r,s,o=t._firstPT;if("_onInitAllProps"===e){for(;o;){for(s=o._next,i=a;i&&i.pr>o.pr;)i=i._next;(o._prev=i?i._prev:r)?o._prev._next=o:a=o,(o._next=i)?i._prev=o:r=o,o=s}o=t._firstPT=a}for(;o;)o.pg&&"function"==typeof o.t[e]&&o.t[e]()&&(n=!0),
o=o._next;return n},re.activate=function(e){for(var t=e.length;--t>-1;)e[t].API===re.API&&(Y[(new e[t])._propName]=e[t]);return!0},w.plugin=function(e){if(!(e&&e.propName&&e.init&&e.API))throw"illegal plugin definition.";var t,n=e.propName,i=e.priority||0,a=e.overwriteProps,r={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},s=M("plugins."+n.charAt(0).toUpperCase()+n.substr(1)+"Plugin",function(){re.call(this,n,i),this._overwriteProps=a||[]},e.global===!0),o=s.prototype=new re(n);
o.constructor=s,s.API=e.API;for(t in r)"function"==typeof e[t]&&(o[r[t]]=e[t]);return s.version=e.version,re.activate([s]),s},l=i._gsQueue){for(c=0;c<l.length;c++)l[c]();for(u in b)b[u].func||i.console.log("GSAP encountered missing dependency: com.greensock."+u)}h=!1}}("undefined"!=typeof e&&e.exports&&"undefined"!=typeof i?i:this||s,"TweenLite"),e.exports=TweenLite}).call(t,n(144))},function(e,t,n){"use strict";var i=n(2914),a=i.a.Symbol;t.a=a},function(e,t,n){var i=n(2919),a=n(2918);e.exports={
stringify:i,parse:a}},function(e,t){var n={};n.hexTable=new Array(256);for(var i=0;i<256;++i)n.hexTable[i]="%"+((i<16?"0":"")+i.toString(16)).toUpperCase();t.arrayToObject=function(e,t){for(var n=t.plainObjects?Object.create(null):{},i=0,a=e.length;i<a;++i)"undefined"!=typeof e[i]&&(n[i]=e[i]);return n},t.merge=function(e,n,i){if(!n)return e;if("object"!=typeof n)return Array.isArray(e)?e.push(n):"object"==typeof e?e[n]=!0:e=[e,n],e;if("object"!=typeof e)return e=[e].concat(n);Array.isArray(e)&&!Array.isArray(n)&&(e=t.arrayToObject(e,i));
for(var a=Object.keys(n),r=0,s=a.length;r<s;++r){var o=a[r],l=n[o];Object.prototype.hasOwnProperty.call(e,o)?e[o]=t.merge(e[o],l,i):e[o]=l}return e},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;"string"!=typeof e&&(e=""+e);for(var t="",i=0,a=e.length;i<a;++i){var r=e.charCodeAt(i);45===r||46===r||95===r||126===r||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122?t+=e[i]:r<128?t+=n.hexTable[r]:r<2048?t+=n.hexTable[192|r>>6]+n.hexTable[128|63&r]:r<55296||r>=57344?t+=n.hexTable[224|r>>12]+n.hexTable[128|r>>6&63]+n.hexTable[128|63&r]:(++i,
r=65536+((1023&r)<<10|1023&e.charCodeAt(i)),t+=n.hexTable[240|r>>18]+n.hexTable[128|r>>12&63]+n.hexTable[128|r>>6&63]+n.hexTable[128|63&r])}return t},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;n=n||[];var i=n.indexOf(e);if(i!==-1)return n[i];if(n.push(e),Array.isArray(e)){for(var a=[],r=0,s=e.length;r<s;++r)"undefined"!=typeof e[r]&&a.push(e[r]);return a}var o=Object.keys(e);for(r=0,s=o.length;r<s;++r){var l=o[r];e[l]=t.compact(e[l],n)}return e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e);
},t.isBuffer=function(e){return null!==e&&"undefined"!=typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,n){"use strict";var i=n(2921),a=window.Raven,r=new i;r.noConflict=function(){return window.Raven=a,r},r.afterLoad(),e.exports=r},function(e,t,n){"use strict";function i(e){return void 0===e}function a(e){return"function"==typeof e}function r(e){return"[object String]"===m.toString.call(e)}function s(e){return"object"==typeof e&&null!==e}function o(e){
for(var t in e)return!1;return!0}function l(e){return s(e)&&"[object Error]"===m.toString.call(e)||e instanceof Error}function c(e,t){var n,a;if(i(e.length))for(n in e)h(e,n)&&t.call(null,n,e[n]);else if(a=e.length)for(n=0;n<a;n++)t.call(null,n,e[n])}function u(e,t){return t?(c(t,function(t,n){e[t]=n}),e):e}function d(e,t){return!t||e.length<=t?e:e.substr(0,t)+"\u2026"}function h(e,t){return m.hasOwnProperty.call(e,t)}function p(e){for(var t,n=[],i=0,a=e.length;i<a;i++)t=e[i],r(t)?n.push(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):t&&t.source&&n.push(t.source);
return new RegExp(n.join("|"),"i")}function f(e){var t=[];return c(e,function(e,n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.join("&")}function g(){var e=window.crypto||window.msCrypto;if(!i(e)&&e.getRandomValues){var t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;var n=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){
var t=16*Math.random()|0,n="x"===e?t:3&t|8;return n.toString(16)})}var m=Object.prototype;e.exports={isUndefined:i,isFunction:a,isString:r,isObject:s,isEmptyObject:o,isError:l,each:c,objectMerge:u,truncate:d,hasKey:h,joinRegExp:p,urlencode:f,uuid4:g}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(2994),r=i(a),s=r.default(function(){return/firefox/i.test(navigator.userAgent)});t.isFirefox=s;var o=r.default(function(){return Boolean(window.safari);
});t.isSafari=o},function(e,t,n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}function r(e){return new o.default(e)}t.__esModule=!0,t.default=r;var s=n(2925),o=a(s),l=n(2929),c=a(l),u=n(584),d=i(u);t.NativeTypes=d,t.getEmptyImage=c.default},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];
this.set(i[0],i[1])}}var a=n(2973),r=n(2974),s=n(2975),o=n(2976),l=n(2977);i.prototype.clear=a,i.prototype.delete=r,i.prototype.get=s,i.prototype.has=o,i.prototype.set=l,e.exports=i},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new a;++t<n;)this.add(e[t])}var a=n(954),r=n(2982),s=n(2983);i.prototype.add=i.prototype.push=r,i.prototype.has=s,e.exports=i},function(e,t){function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);
case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}e.exports=n},function(e,t,n){function i(e,t){var n=null==e?0:e.length;return!!n&&a(e,t,0)>-1}var a=n(2942);e.exports=i},function(e,t){function n(e,t,n){for(var i=-1,a=null==e?0:e.length;++i<a;)if(n(t,e[i]))return!0;return!1}e.exports=n},function(e,t,n){function i(e,t,n){"__proto__"==t&&a?a(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var a=n(962);e.exports=i},function(e,t){function n(e){return function(t){return e(t)}}e.exports=n;
},function(e,t){function n(e,t){return e.has(t)}e.exports=n},function(e,t,n){var i=n(400),a=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=a},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(144))},function(e,t){function n(e,t){return t=null==t?i:t,!!t&&("number"==typeof e||a.test(e))&&e>-1&&e%1==0&&e<t}var i=9007199254740991,a=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t){function n(e){var t=-1,n=Array(e.size);
return e.forEach(function(e){n[++t]=e}),n}e.exports=n},function(e,t){function n(e){return e}e.exports=n},function(e,t,n){var i=n(2943),a=n(404),r=Object.prototype,s=r.hasOwnProperty,o=r.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return a(e)&&s.call(e,"callee")&&!o.call(e,"callee")};e.exports=l},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){function i(e){return r(e)&&a(e)}var a=n(587),r=n(404);e.exports=i},function(e,t,n){function i(e){if(!r(e))return!1;
var t=a(e);return t==o||t==l||t==s||t==c}var a=n(586),r=n(403),s="[object AsyncFunction]",o="[object Function]",l="[object GeneratorFunction]",c="[object Proxy]";e.exports=i},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=9007199254740991;e.exports=n},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return t===e||null!==t&&null!==e&&s.default(t,e)}t.__esModule=!0,t.default=a;var r=n(589),s=i(r);e.exports=t.default},function(e,t,n){
"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=e.DecoratedComponent,n=e.createHandler,i=e.createMonitor,s=e.createConnector,h=e.registerHandler,f=e.containerDisplayName,m=e.getType,v=e.collect,b=e.options,S=b.arePropsEqual,w=void 0===S?g.default:S,M=t.displayName||t.name||"Component";
return function(e){function g(t,r){a(this,g),e.call(this,t,r),this.handleChange=this.handleChange.bind(this),this.handleChildRef=this.handleChildRef.bind(this),y.default("object"==typeof this.context.dragDropManager,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://gaearon.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",M,M),this.manager=this.context.dragDropManager,
this.handlerMonitor=i(this.manager),this.handlerConnector=s(this.manager.getBackend()),this.handler=n(this.handlerMonitor),this.disposable=new d.SerialDisposable,this.receiveProps(t),this.state=this.getCurrentState(),this.dispose()}return r(g,e),g.prototype.getHandlerId=function(){return this.handlerId},g.prototype.getDecoratedComponentInstance=function(){return this.decoratedComponentInstance},g.prototype.shouldComponentUpdate=function(e,t){return!w(e,this.props)||!p.default(t,this.state)},l(g,null,[{
key:"DecoratedComponent",value:t,enumerable:!0},{key:"displayName",value:f+"("+M+")",enumerable:!0},{key:"contextTypes",value:{dragDropManager:c.PropTypes.object.isRequired},enumerable:!0}]),g.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0,this.disposable=new d.SerialDisposable,this.currentType=null,this.receiveProps(this.props),this.handleChange()},g.prototype.componentWillReceiveProps=function(e){w(e,this.props)||(this.receiveProps(e),this.handleChange())},g.prototype.componentWillUnmount=function(){
this.dispose(),this.isCurrentlyMounted=!1},g.prototype.receiveProps=function(e){this.handler.receiveProps(e),this.receiveType(m(e))},g.prototype.receiveType=function(e){if(e!==this.currentType){this.currentType=e;var t=h(e,this.handler,this.manager),n=t.handlerId,i=t.unregister;this.handlerId=n,this.handlerMonitor.receiveHandlerId(n),this.handlerConnector.receiveHandlerId(n);var a=this.manager.getMonitor(),r=a.subscribeToStateChange(this.handleChange,{handlerIds:[n]});this.disposable.setDisposable(new d.CompositeDisposable(new d.Disposable(r),new d.Disposable(i)));
}},g.prototype.handleChange=function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();p.default(e,this.state)||this.setState(e)}},g.prototype.dispose=function(){this.disposable.dispose(),this.handlerConnector.receiveHandlerId(null)},g.prototype.handleChildRef=function(e){this.decoratedComponentInstance=e,this.handler.receiveComponent(e)},g.prototype.getCurrentState=function(){var e=v(this.handlerConnector.hooks,this.handlerMonitor);return e},g.prototype.render=function(){return u.default.createElement(t,o({},this.props,this.state,{
ref:this.handleChildRef}))},g}(c.Component)}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();t.default=s;var c=n(1),u=i(c),d=n(2289),h=n(589),p=i(h),f=n(975),g=i(f),m=n(245),v=(i(m),
n(87)),y=i(v);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return"string"==typeof e||"symbol"==typeof e||t&&s.default(e)&&e.every(function(e){return a(e,!1)})}t.__esModule=!0,t.default=a;var r=n(3019),s=i(r);e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;
for(var a=Object.prototype.hasOwnProperty,r=0;r<n.length;r++){if(!a.call(t,n[r]))return!1;var s=e[n[r]],o=t[n[r]];if(s!==o||"object"==typeof s||"object"==typeof o)return!1}return!0}t.__esModule=!0,t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors. "+("You can either wrap "+t+" into a <div>, or turn it into a ")+"drag source or a drop target itself.");
}}function r(e){return function(){var t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],n=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(!c.isValidElement(t)){var i=t;return void e(i,n)}var r=t;a(r);var s=n?function(t){return e(t,n)}:e;return l.default(r,s)}}function s(e){var t={};return Object.keys(e).forEach(function(n){var i=e[n],a=r(i);t[n]=function(){return a}}),t}t.__esModule=!0,t.default=s;var o=n(3011),l=i(o),c=n(1);e.exports=t.default},function(e,t,n){var i=n(3018),a=i.Symbol;
e.exports=a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,
enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function o(e){var t,o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=l.getDisplayName,v=void 0===u?function(e){return"ConnectAdvanced("+e+")"}:u,y=l.methodName,b=void 0===y?"connectAdvanced":y,S=l.renderCountProp,w=void 0===S?void 0:S,M=l.shouldHandleStateChanges,I=void 0===M||M,C=l.storeKey,D=void 0===C?"store":C,T=l.withRef,x=void 0!==T&&T,P=s(l,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),E=D+"Subscription",A=m++,L=(t={},
t[D]=f.a,t[E]=h.PropTypes.instanceOf(p.a),t),k=(o={},o[E]=h.PropTypes.instanceOf(p.a),o);return function(t){d()("function"==typeof t,"You must pass a component to the function returned by connect. Instead received "+t);var s=t.displayName||t.name||"Component",o=v(s),l=g({},P,{getDisplayName:v,methodName:b,renderCountProp:w,shouldHandleStateChanges:I,storeKey:D,withRef:x,displayName:o,wrappedComponentName:s,WrappedComponent:t}),u=function(s){function c(e,t){i(this,c);var n=a(this,s.call(this,e,t));
return n.version=A,n.state={},n.renderCount=0,n.store=n.props[D]||n.context[D],n.parentSub=e[E]||t[E],n.setWrappedInstance=n.setWrappedInstance.bind(n),d()(n.store,'Could not find "'+D+'" in either the context or '+('props of "'+o+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "'+D+'" as a prop to "'+o+'".')),n.getState=n.store.getState.bind(n.store),n.initSelector(),n.initSubscription(),n}return r(c,s),c.prototype.getChildContext=function(){var e;return e={},e[E]=this.subscription,
e},c.prototype.componentDidMount=function(){I&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},c.prototype.componentWillReceiveProps=function(e){this.selector.run(e)},c.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},c.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.store=null,this.parentSub=null,this.selector.run=function(){};
},c.prototype.getWrappedInstance=function(){return d()(x,"To access the wrapped instance, you need to specify "+("{ withRef: true } in the options argument of the "+b+"() call.")),this.wrappedInstance},c.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},c.prototype.initSelector=function(){var t=this.store.dispatch,n=this.getState,i=e(t,l),a=this.selector={shouldComponentUpdate:!0,props:i(n(),this.props),run:function(e){try{var t=i(n(),e);(a.error||t!==a.props)&&(a.shouldComponentUpdate=!0,
a.props=t,a.error=null)}catch(e){a.shouldComponentUpdate=!0,a.error=e}}}},c.prototype.initSubscription=function(){var e=this;I&&!function(){var t=e.subscription=new p.a(e.store,e.parentSub),n={};t.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=function(){this.componentDidUpdate=void 0,t.notifyNestedSubs()},this.setState(n)):t.notifyNestedSubs()}.bind(e)}()},c.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed();
},c.prototype.addExtraProps=function(e){if(!x&&!w)return e;var t=g({},e);return x&&(t.ref=this.setWrappedInstance),w&&(t[w]=this.renderCount++),t},c.prototype.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return n.i(h.createElement)(t,this.addExtraProps(e.props))},c}(h.Component);return u.WrappedComponent=t,u.displayName=o,u.childContextTypes=k,u.contextTypes=L,u.propTypes=L,c()(u,t)}}var l=n(2904),c=n.n(l),u=n(87),d=n.n(u),h=n(1),p=(n.n(h),n(3028)),f=n(980);
t.a=o;var g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},m=0},function(e,t,n){"use strict";function i(e){return function(t,n){function i(){return a}var a=e(t,n);return i.dependsOnOwnProps=!1,i}}function a(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function r(e,t){return function(t,n){var i=(n.displayName,function(e,t){
return i.dependsOnOwnProps?i.mapToProps(e,t):i.mapToProps(e)});return i.dependsOnOwnProps=a(e),i.mapToProps=function(t,n){i.mapToProps=e;var r=i(t,n);return"function"==typeof r&&(i.mapToProps=r,i.dependsOnOwnProps=a(r),r=i(t,n)),r},i}}n(981);t.b=i,t.a=r},function(e,t,n){"use strict";var i=n(1);n.n(i);t.a=i.PropTypes.shape({subscribe:i.PropTypes.func.isRequired,dispatch:i.PropTypes.func.isRequired,getState:i.PropTypes.func.isRequired})},function(e,t,n){"use strict";n(2916),n(590)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){
"use strict";function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){if(0===t.length)return arguments.length<=0?void 0:arguments[0];var e=t[t.length-1],n=t.slice(0,-1);return n.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}t.__esModule=!0,t.default=i},function(e,t,n){"use strict";function i(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}t.__esModule=!0,t.default=i},function(e,t,n){
var i=n(3102),a=i.Symbol;e.exports=a},function(e,t,n){function i(e){if(!s(e)||a(e)!=o)return!1;var t=r(e);if(null===t)return!0;var n=d.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==h}var a=n(3096),r=n(3098),s=n(3103),o="[object Object]",l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=u.call(Object);e.exports=i},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NCAwLTI4MC0xMjYtMjgwLTI4MCAwLTE1NCAxMjYtMjgwIDI4MC0yODAgMTU0IDAgMjgwIDEyNiAyODAgMjgwIDAgMTU0LTEyNiAyODAtMjgwIDI4MG0wLTU0Ny44NjdjLTE0Ny40NjYgMC0yNjcuODY2IDEyMC40LTI2Ny44NjYgMjY3Ljg2NiAwIDE0Ny40NjcgMTIwLjQgMjY3Ljg2NyAyNjcuODY2IDI2Ny44NjcgMTQ3LjQ2NiAwIDI2Ny44NjYtMTIwLjQgMjY3Ljg2Ni0yNjcuODY3LS45MzMtMTQ3LjQ2Ni0xMjAuNC0yNjcuODY2LTI2Ny44NjYtMjY3Ljg2Nm0xMzQuNCAzODcuMzMzbC0yNjkuNzM0IDBjLTMuNzMzIDAtNi41MzMtMi44LTYuNTMzLTYuNTMzbDAtMjI0LjkzNGMwLTMuNzMzIDIuOC02LjUzMyA2LjUzMy02LjUzM2wyNjkuNzM0IDBjMy43MzQgMCA2LjUzNCAyLjggNi41MzQgNi41MzNsMCAyMjQuOTM0YzAgMy43MzMtMi44IDYuNTMzLTYuNTM0IDYuNTMzbS0yNjMuMi03OS4zOTNsMCA2Ni4zMjcgMjU3LjYgMCAwLTMyLjMxN2MtLjkzMy4zNS0xLjg2Ny41ODMtMi44LjU4My0xLjg2NiAwLTIuOC0uOTMzLTMuNzM0LTEuODY2bC01My4yLTQ1LjczNC02MS42IDQxLjA2Ny04MC4yNjYtODUuODY3LTU2IDU3LjgwN20yNTcuNiAyMi43MTlsMC0xNjguMjU4LTI1Ny42IDAgMCAxMjguNTE0IDU2LjkzNC01OC41MTQgODEuMiA4Ny43MzMgNjAuNjY2LTQwLjEzMyA1OC44IDUwLjY1OG0tMTEzLjg2Ni02OS4zMjZjLTIxLjQ2NyAwLTM4LjI2Ny0xNi44LTM4LjI2Ny0zOC4yNjYgMC0yMS40NjYgMTYuOC0zOC4yNjYgMzguMjY3LTM4LjI2NiAyMS40NjYgMCAzOC4yNjYgMTYuOCAzOC4yNjYgMzguMjY2IDAgMjAuNTM0LTE3LjczNCAzOC4yNjYtMzguMjY2IDM4LjI2Nm0wLTY0LjRjLTE0IDAtMjYuMTM0IDExLjItMjYuMTM0IDI2LjEzNCAwIDE0IDExLjIgMjYuMTM0IDI2LjEzNCAyNi4xMzQgMTQgMCAyNi4xMzMtMTEuMiAyNi4xMzMtMjYuMTM0LS45MzMtMTQuOTM0LTEyLjEzMy0yNi4xMzQtMjYuMTMzLTI2LjEzNCIvPgo8L3N2Zz4K";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NCAwLTI4MC0xMjYtMjgwLTI4MCAwLTE1NCAxMjYtMjgwIDI4MC0yODAgMTU0IDAgMjgwIDEyNiAyODAgMjgwIDAgMTU0LTEyNiAyODAtMjgwIDI4MG0wLTU0Ny44NjZjLTE0Ny40NjYgMC0yNjcuODY2IDEyMC40LTI2Ny44NjYgMjY3Ljg2NiAwIDE0Ny40NjYgMTIwLjQgMjY3Ljg2NyAyNjcuODY2IDI2Ny44NjcgMTQ3LjQ2NiAwIDI2Ny44NjYtMTIwLjQwMSAyNjcuODY2LTI2Ny44NjcgMC0xNDcuNDY2LTEyMC40LTI2Ny44NjYtMjY3Ljg2Ni0yNjcuODY2bS0zLjczNCAyMjQuOTMzYzEuMTY3LTEuMTY3IDIuOC0xLjg2NyA0LjY2OC0xLjg2NyAyLjk1MSAwIDUuMzE5IDEuNzUgNi4xODEgNC4zMjdsNjguNDg0IDQ5LjgwN2MyLjggMS44NjYgMy43MzQgNS42LjkzNCA4LjQgMCAxLjg2Ni0xLjg2NiAyLjc5OS0zLjczNCAyLjhsLjAwMSAwLS4wMDEgMGMtLjkzMyAwLTIuNzk5LS4wMDEtMy43MzMtLjkzNGwtNjEuNTk5LTQ0LjcyMyAwIDE0Ni40NTdjLS45MzMgMi44LTMuNzMzIDUuNi02LjUzMyA1LjYtMy43MzQgMC02LjUzNC0yLjgtNi41MzQtNi41MzRsMC0xNDUuNjc2LTYyLjUzNCA0My45NDNjLTIuOCAxLjg2Ny02LjUzMyAxLjg2Ny04LjQtLjkzMy0xLjg2Ni0yLjgtMS44NjYtNi41MzQuOTM0LTguNGw3MS44NjYtNTIuMjY3bS01My4xOTkgMTEwLjEzNGwtMzcuMzMzIDBjLTI4LjkzNCAwLTUyLjI2Ny0yMy4zMzQtNTIuMjY3LTUyLjI2NyAwLTI4LjkzMyAyMy4zMzQtNTIuMjY2IDUyLjI2Ny01Mi4yNjZsNi41MzMgMCAwLTguNGMwLTQ0LjggMzYuNC04MS4yIDgxLjItODEuMiAzOS4yIDAgNzIuOCAyOCA3OS4zMzQgNjUuMzMzIDQuNjY2LS45MzMgOC40LS45MzMgMTMuMDY2LS45MzMgMzUuNDY3IDAgNjQuNCAyOC45MzMgNjQuNCA2NC40IDAgMTcuNzMzLTcuNDY2IDM1LjQ2Ni0yMS40NjYgNDcuNi0xMC4yNjcgMTEuMi0yNS4yIDE3LjczMy0zOS4yIDE3LjczM2wtLjAwMS0uMDAxLTI5Ljg2NiAwYy0zLjczNCAwLTYuNTM0LTIuOC02LjUzNC02LjUzNCAwLTMuNzMzIDIuOC02LjUzMyA2LjUzNC02LjUzM2wyOS44NjYgMGMxMS4yIDAgMjIuNC00LjY2NyAyOS44NjYtMTMuMDY3IDExLjItMTAuMjY2IDE3LjczNC0yNC4yNjYgMTcuNzM0LTM5LjIgMC0yOC45MzMtMjMuMzM0LTUyLjI2Ni01Mi4yNjYtNTIuMjY2LTUuNiAwLTExLjIuOTM0LTE1Ljg2NyAyLjgtMS44NjYuOTM0LTMuNzMzIDAtNS42LS45MzQtMS44NjYtLjkzMy0yLjgtMi44LTIuOC00LjY2Ni0zLjczMy0zNS40NjYtMzIuNjY2LTYxLjYtNjguMTMzLTYxLjYtMzcuMzM0IDAtNjguMTM0IDMwLjgtNjguMTM0IDY4LjEzNCAwIDQuNjY2IDAgOS4zMzMuOTM0IDEzLjA2NiAwIDEuODY2IDAgMy43MzQtLjkzNCA1LjYtLjkzNCAxLjg2Ni0yLjggMS44NjYtNC42NjYgMS44NjZsLTE0IDBjLTIyLjQwMS4wMDEtNDAuMTM0IDE3LjczNC00MC4xMzQgNDAuMTM0IDAgMjIuNCAxNy43MzMgNDAuMTMzIDQwLjEzNCA0MC4xMzRsMzcuMzMzIDBjMy43MzQgMCA2LjUzNCAyLjggNi41MzQgNi41MzMgMCAzLjczNC0yLjggNi41MzQtNi41MzQgNi41MzQiLz4KPC9zdmc+Cg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NCAwLTI4MC0xMjYtMjgwLTI4MCAwLTE1NCAxMjYtMjgwIDI4MC0yODAgMTU0IDAgMjgwIDEyNiAyODAgMjgwIDAgMTU0LTEyNiAyODAtMjgwIDI4MG0wLTU0Ny44NjZjLTE0Ny40NjYgMC0yNjcuODY2IDEyMC40LTI2Ny44NjYgMjY3Ljg2NiAwIDE0Ny40NjYgMTIwLjQgMjY3Ljg2NyAyNjcuODY2IDI2Ny44NjcgMTQ3LjQ2NiAwIDI2Ny44NjYtMTIwLjQwMSAyNjcuODY2LTI2Ny44NjcgMC0xNDcuNDY2LTEyMC40LTI2Ny44NjYtMjY3Ljg2Ni0yNjcuODY2bTg2LjgwMSA0MTAuNjY2bC0xNzMuNjAxIDBjLTMuNzM0IDAtNi41MzQtMi44LTYuNTM0LTYuNTM0bDAtMjczLjQ2NmMwLTMuNzM0IDIuOC02LjUzNCA2LjUzNC02LjUzNGwxNzQuNTM0IDBjMy43MzMgMCA2LjUzMyAyLjggNi41MzMgNi41MzRsMCAyNzMuNDY2Yy0uOTMzIDMuNzM0LTMuNzMzIDYuNTM0LTcuNDY2IDYuNTM0bS0xNjguMDAxLTEyLjEzNGwxNjEuNDY2IDAgMC0yNjEuMzM0LTE2MS40NjYgMCAwIDI2MS4zMzRtOTYuMTM0LTM0LjUzMmMwIDguMjQ3LTYuNjg3IDE0LjkzMy0xNC45MzQgMTQuOTMzLTguMjQ3IDAtMTQuOTM0LTYuNjg2LTE0LjkzNC0xNC45MzMgMC04LjI0OCA2LjY4Ny0xNC45MzQgMTQuOTM0LTE0LjkzNCA4LjI0NyAwIDE0LjkzNCA2LjY4NiAxNC45MzQgMTQuOTM0bTQ3LjYtMjhsLTEyNS4wNjcgMGMtMy43MzMgMC02LjUzMy0yLjgtNi41MzMtNi41MzRsMC0xNTYuOGMwLTMuNzM0IDIuOC02LjUzNCA2LjUzMy02LjUzNGwxMjQuMTM0IDBjMy43MzMgMCA2LjUzMyAyLjggNi41MzMgNi41MzRsMCAxNTcuNzM0YzAgMi43OTktMi44IDUuNTk5LTUuNiA1LjZtLTExOC41MzQtMTIuMTM0bDExMiAwIDAtMTQ1LjYtMTEyIDAgMCAxNDUuNiIvPgo8L3N2Zz4K";
},,function(e,t,n){"use strict";var i=n(10),a=n(1407),r=n(1403),s=(n(1406),new i.a.Application);s.addInitializer(function(){return n.i(a.a)().then(function(){return n.i(r.a)()})}),t.a=s},,function(e,t){},,,function(e,t,n){(function(e){+function(e){"use strict";var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,i=n.is("input")?"val":"html",a=n.data();e+="Text",a.resetText||n.data("resetText",n[i]()),
n[i](a[e]||this.options[e]),setTimeout(function(){"loadingText"==e?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var t=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===t.prop("type")&&e.find(".active").removeClass("active")}this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var i=e(this),a=i.data("bs.button"),r="object"==typeof n&&n;
a||i.data("bs.button",a=new t(this,r)),"toggle"==n?a.toggle():n&&a.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle"),t.preventDefault()})}(e)}).call(t,n(5))},function(e,t,n){(function(e){+function(e){"use strict";function t(){e(i).remove(),e(a).each(function(t){var i=n(e(this));i.hasClass("open")&&(i.trigger(t=e.Event("hide.bs.dropdown")),
t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown"))})}function n(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}var i=".dropdown-backdrop",a="[data-toggle=dropdown]",r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(i){var a=e(this);if(!a.is(".disabled, :disabled")){var r=n(a),s=r.hasClass("open");if(t(),!s){if("ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click",t),
r.trigger(i=e.Event("show.bs.dropdown")),i.isDefaultPrevented())return;r.toggleClass("open").trigger("shown.bs.dropdown"),a.focus()}return!1}},r.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled")){var r=n(i),s=r.hasClass("open");if(!s||s&&27==t.keyCode)return 27==t.which&&r.find(a).focus(),i.click();var o=e("[role=menu] li:not(.divider):visible a",r);if(o.length){var l=o.index(o.filter(":focus"));38==t.keyCode&&l>0&&l--,
40==t.keyCode&&l<o.length-1&&l++,~l||(l=0),o.eq(l).focus()}}}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("dropdown");i||n.data("dropdown",i=new r(this)),"string"==typeof t&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.bs.dropdown.data-api",t).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",a,r.prototype.toggle).on("keydown.bs.dropdown.data-api",a+", [role=menu]",r.prototype.keydown);
}(e)}).call(t,n(5))},function(e,t,n){(function(e){+function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,i=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,
this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var i=e.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),i&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var a=e.Event("shown.bs.modal",{relatedTarget:t});i?n.$element.find(".modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(a);
}).emulateTransitionEnd(300):n.$element.focus().trigger(a)}))},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal());
},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){
e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&n;if(this.$backdrop=e('<div class="modal-backdrop '+n+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this));
},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,i){return this.each(function(){var a=e(this),r=a.data("bs.modal"),s=e.extend({},t.DEFAULTS,a.data(),"object"==typeof n&&n);
r||a.data("bs.modal",r=new t(this,s)),"string"==typeof n?r[n](i):s.show&&r.show(i)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),i=n.attr("href"),a=e(n.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),r=a.data("modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},a.data(),n.data());t.preventDefault(),a.modal(r,this).one("hide",function(){n.is(":visible")&&n.focus();
})}),e(document).on("show.bs.modal",".modal",function(){e(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){e(document.body).removeClass("modal-open")})}(e)}).call(t,n(5))},function(e,t,n){(function(e){+function(e){"use strict";var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,i){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i);for(var a=this.options.trigger.split(" "),r=a.length;r--;){var s=a[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var o="hover"==s?"mouseenter":"focus",l="hover"==s?"mouseleave":"blur";this.$element.on(o+"."+this.type,this.options.selector,e.proxy(this.enter,this)),
this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){
n[e]!=i&&(t[e]=i)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show()},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);
return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(t),t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(i);
r&&(i=i.replace(a,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(i),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var s=this.getPosition(),o=n[0].offsetWidth,l=n[0].offsetHeight;if(r){var c=this.$element.parent(),u=i,d=document.documentElement.scrollTop||document.body.scrollTop,h="body"==this.options.container?window.innerWidth:c.outerWidth(),p="body"==this.options.container?window.innerHeight:c.outerHeight(),f="body"==this.options.container?0:c.offset().left;
i="bottom"==i&&s.top+s.height+l-d>p?"top":"top"==i&&s.top-d-l<0?"bottom":"right"==i&&s.right+o>h?"left":"left"==i&&s.left-o<f?"right":i,n.removeClass(u).addClass(i)}var g=this.getCalculatedOffset(i,s,o,l);this.applyPlacement(g,i),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,i=this.tip(),a=i[0].offsetWidth,r=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),o=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(o)&&(o=0),e.top=e.top+s,e.left=e.left+o,
i.offset(e).addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;if("top"==t&&c!=r&&(n=!0,e.top=e.top+r-c),/bottom|top/.test(t)){var u=0;e.left<0&&(u=e.left*-2,e.left=0,i.offset(e),l=i[0].offsetWidth,c=i[0].offsetHeight),this.replaceArrow(u-a+l,l,"left")}else this.replaceArrow(c-r,c,"top");n&&i.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),
e.removeClass("fade in top bottom left right")},t.prototype.hide=function(){function t(){"in"!=n.hoverState&&i.detach()}var n=this,i=this.tip(),a=e.Event("hide.bs."+this.type);if(this.$element.trigger(a),!a.isDefaultPrevented())return i.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i.one(e.support.transition.end,t).emulateTransitionEnd(150):t(),this.$element.trigger("hidden.bs."+this.type),this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","");
},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,i){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-i,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-i/2,left:t.left-n}:{top:t.top+t.height/2-i/2,
left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){
this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var i=e(this),a=i.data("bs.tooltip"),r="object"==typeof n&&n;
a||i.data("bs.tooltip",a=new t(this,r)),"string"==typeof n&&a[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(e)}).call(t,n(5))},function(e,t,n){(function(e){+function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){
var n=!1,i=this;e(this).one(e.support.transition.end,function(){n=!0});var a=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(a,t),this},e(function(){e.support.transition=t()})}(e)}).call(t,n(5))},function(e,t,n){(function(e){/*!
 * jQuery scrollintoview() plugin and :scrollable selector filter
 *
 * Version 1.8 (14 Jul 2011)
 * Requires jQuery 1.4 or newer
 *
 * Copyright (c) 2011 Robert Koritnik
 * Licensed under the terms of the MIT license
 * http://www.opensource.org/licenses/mit-license.php
 */
!function(e){var t={vertical:{x:!1,y:!0},horizontal:{x:!0,y:!1},both:{x:!0,y:!0},x:{x:!0,y:!1},y:{x:!1,y:!0}},n={duration:"fast",direction:"both"},i=/^(?:html)$/i,a=function(t,n){n=n||(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(t,null):t.currentStyle);var i=!(!document.defaultView||!document.defaultView.getComputedStyle),a={top:parseFloat(i?n.borderTopWidth:e.css(t,"borderTopWidth"))||0,left:parseFloat(i?n.borderLeftWidth:e.css(t,"borderLeftWidth"))||0,
bottom:parseFloat(i?n.borderBottomWidth:e.css(t,"borderBottomWidth"))||0,right:parseFloat(i?n.borderRightWidth:e.css(t,"borderRightWidth"))||0};return{top:a.top,left:a.left,bottom:a.bottom,right:a.right,vertical:a.top+a.bottom,horizontal:a.left+a.right}},r=function(t){var n=e(window),r=i.test(t[0].nodeName);return{border:r?{top:0,left:0,bottom:0,right:0}:a(t[0]),scroll:{top:(r?n:t).scrollTop(),left:(r?n:t).scrollLeft()},scrollbar:{right:r?0:t.innerWidth()-t[0].clientWidth,bottom:r?0:t.innerHeight()-t[0].clientHeight
},rect:function(){var e=t[0].getBoundingClientRect();return{top:r?0:e.top,left:r?0:e.left,bottom:r?t[0].clientHeight:e.bottom,right:r?t[0].clientWidth:e.right}}()}};e.fn.extend({scrollIntoView:function(a){a=e.extend({},n,a),a.direction=t["string"==typeof a.direction&&a.direction.toLowerCase()]||t.both;var s="";a.direction.x===!0&&(s="horizontal"),a.direction.y===!0&&(s=s?"both":"vertical");var o=this.eq(0),l=o.closest(":scrollable("+s+")");if(l.length>0){l=l.eq(0);var c={e:r(o),s:r(l)};if(a.center){
var u=(c.s.rect.bottom-c.s.rect.top-(c.e.rect.bottom-c.e.rect.top))/2,d=(c.s.rect.right-c.s.rect.left-(c.e.rect.right-c.e.rect.left))/2;a.direction.y&&(c.e.rect.top-=u,c.e.rect.bottom+=u),a.direction.x&&(c.e.rect.left-=d,c.e.rect.right+=d)}var h={top:c.e.rect.top-(c.s.rect.top+c.s.border.top),bottom:c.s.rect.bottom-c.s.border.bottom-c.s.scrollbar.bottom-c.e.rect.bottom,left:c.e.rect.left-(c.s.rect.left+c.s.border.left),right:c.s.rect.right-c.s.border.right-c.s.scrollbar.right-c.e.rect.right},p={};
a.direction.y===!0&&(h.top<0?p.scrollTop=c.s.scroll.top+h.top:h.top>0&&h.bottom<0&&(p.scrollTop=c.s.scroll.top+Math.min(h.top,-h.bottom))),a.direction.x===!0&&(h.left<0?p.scrollLeft=c.s.scroll.left+h.left:h.left>0&&h.right<0&&(p.scrollLeft=c.s.scroll.left+Math.min(h.left,-h.right))),e.isEmptyObject(p)?e.isFunction(a.complete)&&a.complete.call(l[0]):(i.test(l[0].nodeName)&&(l=e("html,body")),l.animate(p,a.duration).eq(0).queue(function(t){e.isFunction(a.complete)&&a.complete.call(l[0]),t()}))}return this;
}});var s={auto:!0,scroll:!0,visible:!1,hidden:!1};e.extend(e.expr[":"],{scrollable:function(e,n,a,r){var o=t["string"==typeof a[3]&&a[3].toLowerCase()]||t.both,l=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e,null):e.currentStyle,c={x:s[l.overflowX.toLowerCase()]||!1,y:s[l.overflowY.toLowerCase()]||!1,isRoot:i.test(e.nodeName)};if(!c.x&&!c.y&&!c.isRoot)return!1;var u={height:{scroll:e.scrollHeight,client:e.clientHeight},width:{scroll:e.scrollWidth,
client:e.clientWidth},scrollableX:function(){return(c.x||c.isRoot)&&this.width.scroll>this.width.client},scrollableY:function(){return(c.y||c.isRoot)&&this.height.scroll>this.height.client}};return o.y&&u.scrollableY()||o.x&&u.scrollableX()}})}(e)}).call(t,n(5))},function(e,t,n){var i,a;i=[n(5),n(2905)],a=function(e,t){"use strict";e.fn.translate=function(e,n){var i=t.csstransforms3d?"translate3d("+e+"px, "+n+"px, 0)":"translate("+e+"px, "+n+"px)";if(1===this.length){var a=this[0].style;"webkitTransform"in a?a.webkitTransform=i:"OTransform"in a?a.OTransform=i:a.transform=i;
}else this.css("transform",i)}}.apply(t,i),!(void 0!==a&&(e.exports=a))},function(e,t,n){"use strict";function i(){if(l.length)throw l.shift()}function a(e){var t;t=o.length?o.pop():new r,t.task=e,s(t)}function r(){this.task=null}var s=n(1037),o=[],l=[],c=s.makeRequestCallFromTimer(i);e.exports=a,r.prototype.call=function(){try{this.task.call()}catch(e){a.onerror?a.onerror(e):(l.push(e),c())}finally{this.task=null,o[o.length]=this}}},function(e,t,n){"use strict";(function(t){function n(e){o.length||(s(),
l=!0),o[o.length]=e}function i(){for(;c<o.length;){var e=c;if(c+=1,o[e].call(),c>u){for(var t=0,n=o.length-c;t<n;t++)o[t]=o[t+c];o.length-=c,c=0}}o.length=0,c=0,l=!1}function a(e){var t=1,n=new h(e),i=document.createTextNode("");return n.observe(i,{characterData:!0}),function(){t=-t,i.data=t}}function r(e){return function(){function t(){clearTimeout(n),clearInterval(i),e()}var n=setTimeout(t,0),i=setInterval(t,50)}}e.exports=n;var s,o=[],l=!1,c=0,u=1024,d="undefined"!=typeof t?t:self,h=d.MutationObserver||d.WebKitMutationObserver;
s="function"==typeof h?a(i):r(i),n.requestFlush=s,n.makeRequestCallFromTimer=r}).call(t,n(144))},function(e,t,n){"use strict";function i(e){return e&&!e.get("isCloud")&&"iOS"!==e.get("platform")&&e.supports("companionProxy")}function a(e){return e&&e.get("isPrivate")&&e.get("isConnected")&&!e.get("isPossiblyCrossNetworkProtected")}function r(e){e.forEach(function(e){e.resolve()}),e.length=0}function s(e){e.forEach(function(e){e.reject()}),e.length=0}var o=n(5),l=n.n(o),c=n(2),u=n.n(c),d=n(14),h=n(34),p=n(743),f=n(38),g=n(27),m=n(52),v=n(59),y=h.a.extend({
mixins:[m.a],name:"MediaServerCompanionProxy",commandID:0,initialize:function(){u.a.bindAll(this,"_checkPollRequestStatus","_pickProxyServer","_poll","_sendResponse","_unregisterPlayer","_isEligibleForProxy","_isLocallyOwned","onPollSuccess","onPollError"),this._debounceUnregisterPlayer=u.a.debounce(this._unregisterPlayer,2e3),this._debouncePickProxyServer=u.a.debounce(this._pickProxyServer,2e3),this._deepLinkDeferred=l.a.Deferred().resolve(),this._playerRegistrationDeferreds=[],this._playerUnregistrationDeferreds=[],
this._pollErrorCountByServerID={}},getDeepLink:function(){return this._deepLinkDeferred.promise()},publish:function(e){var t=this;if(this.proxyServer){if(this.timelineInflight)return void(this._pendingTimeline=e);this.timelineInflight=!0;var n=p.a.writeXml(e),i=u.a.result(this.proxyServer,"url"),a=this.proxyServer.getXHROptions(i+"player/proxy/timeline?commandID="+this.commandID);a.data="timeline="+encodeURIComponent(n),a.method="POST",a.contentType="application/x-www-form-urlencoded",l.a.ajax(a).always(function(){
t.timelineInflight=!1;var e=t._pendingTimeline;e&&(delete t._pendingTimeline,t.publish(e))})}},subscribe:function(e){this.started||(this.callback=e,this.started=!0,this.servers=n.i(d.a)("appModel").get("servers"),this.listenTo(this.servers,"change:connected",this._debouncePickProxyServer),this._debouncePickProxyServer())},unsubscribe:function(){if(this.started){var e=this.proxyServer;this.started=!1,this.stopListening(this.servers,"change:connected",this._debouncePickProxyServer),this.callback=null,
this.proxyServer=null,e&&this._debounceUnregisterPlayer(e),this._clearPollRequestStatusCheck(),this.pollRequest&&(this.pollRequest.abort(),this.pollRequest=null)}},unregisterPlayer:function(e,t){this.cloudServer=e,this.clientID=t;var n=l.a.Deferred();return this._playerUnregistrationDeferreds.push(n),n.promise()},registerPlayer:function(e,t){this.cloudServer=e,this.clientID=t;var n=l.a.Deferred();return this._playerRegistrationDeferreds.push(n),n.promise()},_pickProxyServer:function(){this.started&&(this.proxyServer&&this._isEligibleForProxy(this.proxyServer)||(this.proxyServer=this.servers.find(this._isLocallyOwned)||this.servers.find(this._isEligibleForProxy),
this.proxyServer?(this._registerServer(),g.a.info("[Companion] Found proxy",this.proxyServer.get("friendlyName")),this._poll()):g.a.warn("[Companion] No proxy found")))},_registerServer:function(){var e=this;if(this.proxyServer&&this.cloudServer&&this.clientID){var t=this.cloudServer.getXHROptions("devices/"+this.clientID,{method:"POST",headers:{"X-Plex-Provides":v.a.get("allowCloudPubSub")?"client,player,pubsub-player":"client,player"},data:{_method:"PUT",proxiedBy:this.proxyServer.id}});l.a.ajax(t).done(function(){
r(e._playerRegistrationDeferreds)}).fail(function(){s(e._playerRegistrationDeferreds)})}},_unregisterPlayer:function(e){var t=this;if(e&&this.cloudServer&&this.clientID){var n=this.cloudServer.getXHROptions("/devices/"+this.clientID,{method:"POST",headers:{"X-Plex-Provides":"client"},data:{_method:"PUT"}});l.a.ajax(n).done(function(){r(t._playerUnregistrationDeferreds)}).fail(function(){s(t._playerUnregistrationDeferreds)})}},_poll:function(){if(this.started){var e=this.proxyServer;if(!e)return void g.a.info("[Companion] No proxy server available to long poll");
if(this._isPollRequestPending())return void g.a.info("[Companion] Long poll already open");this._clearPollRequestStatusCheck(),this._checkPollRequestStatusLater();var t=e.getXHROptions("/player/proxy/poll",{data:{deviceClass:"pc",protocolVersion:"1",protocolCapabilities:"timeline,playback,navigation,mirror,playqueues",timeout:1}});g.a.info("[Companion] Opening long poll to %s at %s",e.get("friendlyName"),t.url),this.pollRequest=l.a.ajax(t).done(this.onPollSuccess).fail(this.onPollError)}},_repoll:function(){
this._clearPollRequestStatusCheck(),this._poll()},_isPollRequestPending:function(){return!!this.pollRequest&&"pending"===this.pollRequest.state()},_checkPollRequestStatus:function(){this._isPollRequestPending()&&(g.a.info("[Companion] Poll connection established successfully"),this._resetPollErrorCount(this.proxyServer))},_checkPollRequestStatusLater:function(){this._pollRequestStatusCheckTimeout=setTimeout(this._checkPollRequestStatus,5e3)},_clearPollRequestStatusCheck:function(){this._pollRequestStatusCheckTimeout=clearTimeout(this._pollRequestStatusCheckTimeout);
},_processCommand:function(e){var t=this;if(this.started){var n={path:e.path,commandID:e.commandID,supportsTimeline:!0,query:{key:[e.queryKey],offset:[e.queryOffset],containerKey:[e.queryContainerKey],playQueueID:[e.queryPlayqueueid],type:[e.queryType],volume:[e.queryVolume],repeat:[e.queryRepeat],subtitleStreamID:[e.querySubtitleStreamID],token:[e.queryToken],machineIdentifier:[e.queryMachineIdentifier],protocol:[e.queryProtocol],address:[e.queryAddress],port:[e.queryPort],text:[e.queryText],field:[e.queryField]
}},i="resolved"!==this._deepLinkDeferred.state();this.callback(n,i).always(function(e){i&&e&&e.deferredAction&&t._deepLinkDeferred.resolve(e.deferredAction),t._sendResponse(e.controllerResponse)})}},_sendResponse:function(e){if(this.proxyServer){var t=parseInt(e.commandID,10);this.commandID<t&&(this.commandID=t);var n=this.proxyServer.getXHROptions("/player/proxy/response",{method:"POST",contentType:"application/x-www-form-urlencoded",data:{commandID:e.commandID,response:encodeURIComponent(e.body)
}});l.a.ajax(n)}},_incrementPollErrorCount:function(e){var t=e.get("machineIdentifier");t in this._pollErrorCountByServerID||(this._pollErrorCountByServerID[t]=0),this._pollErrorCountByServerID[t]++,g.a.info("[Companion] Server %s has had %s poll errors",e.get("debugName"),this._pollErrorCountByServerID[t])},_resetPollErrorCount:function(e){var t=e.get("machineIdentifier");this._pollErrorCountByServerID[t]=0},_exceedsPollErrorCount:function(e){return this._pollErrorCountByServerID[e.get("machineIdentifier")]>=3;
},_isEligibleForProxy:function(e){return i(e)&&a(e.get("activeConnection"))&&!this._exceedsPollErrorCount(e)},_isLocallyOwned:function(e){return this._isEligibleForProxy(e)&&!e.get("isShared")},onPollSuccess:function(e){var t=this,n=e&&f.a.parseXML(e),i=n&&n.Command;if(!e)return void this._repoll();if(n?i||g.a.warn("[Companion] Poll succeeded without a Command response",n):g.a.warn("[Companion] Poll succeeded without a parseable response",e),!i)return void this.onPollError();this._resetPollErrorCount(this.proxyServer),
this._repoll();var a=u.a.isArray(i)?i:[i];a.forEach(function(e){try{g.a.info("[Companion] Received %s from %s",e.path,e.deviceName),t._processCommand(e)}catch(t){g.a.warn("[Companion] encountered %s while processing %s",t.message,e)}},this)},onPollError:function(){var e=this;arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.started){var t=this.proxyServer,n=t.get("isConnected"),i=t.get("debugName"),a=function(){g.a.warn("[Companion] Poll failed to %s; attempting to pick new proxy",i),
e._pickProxyServer()};return this.proxyServer=null,this._clearPollRequestStatusCheck(),this._incrementPollErrorCount(t),this._exceedsPollErrorCount(t)?(g.a.warn("[Companion] Poll failed to %s; is no longer an eligible proxy",i),void a()):void(n?(g.a.warn("[Companion] Poll failed to %s; testing all connections",i),t.testAllConnections().done(function(){g.a.info("[Companion] Poll failed to %s; server is available",i)}).fail(function(){g.a.warn("[Companion] Poll failed to %s; unable to reconnect",i);
}).always(a)):a())}}});t.a=y},function(e,t,n){"use strict";n(27)},function(e,t,n){"use strict";var i=n(93),a=n.n(i),r=n(5),s=n.n(r),o={url:"https://metrics.plex.tv/collect/event",trackEvent:function(e){var t=a()(e);window.navigator.sendBeacon?window.navigator.sendBeacon(this.url,t):s.a.ajax({type:"POST",url:this.url,contentType:"application/json",data:t})}};t.a=o},function(e,t,n){"use strict";var i=n(950),a=n.n(i);a.a.debug=!1;var r={},s={},o={userTitle:"username",userID:"id"},l=!1,c={init:function(e){
a.a.config(e)},enable:function(){l||(l=!0,a.a.install())},disable:function(){l&&(l=!1,a.a.uninstall())},set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var n=e[t];"release"===t?a.a.setRelease(n):o[t]?(s[o[t]]=n,a.a.setUserContext(s)):(r[t]=n,a.a.setTagsContext(r))}},capture:function(e,t){a.a.captureException(e,t)}};t.a=c},function(e,t,n){"use strict";var i=["enable","disable","set","start","trackClick","trackEvent","trackView","incrementPlaybackCount"];
t.a=i},function(e,t,n){"use strict";var i=["trackEvent"];t.a=i},function(e,t,n){"use strict";var i=n(2362),a=n.n(i),r=n(34),s=r.a.extend({load:function(e,t){this.dashPlayer&&this.stop(),this.dashPlayer=new a.a.BasicPlayer({url:e,mediaElement:t}),this.dashPlayer.init()},stop:function(){var e=this.dashPlayer;this.dashPlayer=null;try{e.destroy()}catch(e){}},canPause:function(e){return e.autopause_pending||e.autopaused}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(39),s=n(268),o=n(271),l=n(620),c=l.a.extend({
type:r.a.types.MUSIC,modelDefaults:function(){var e=l.a.prototype.modelDefaults.apply(this,arguments);return a.a.extend(e,{canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:!0,showSeekBar:!0,showShuffle:!0,showRepeat:!0,showLyrics:!0,showPlayQueue:!0})},getPlayerDecision:function(e,t){this.backlog.clear();var n=this.getPlayerDecisionPromise(e,t);return n.done(this.onDecisionSuccess),n.fail(this.onDecisionError),n},getPlayerDecisionPromise:function(e,t){return s.a.getPlayerDecision(a.a.extend({type:this.type,
profile:this.profile,playbackSessionID:this.playbackSessionID,item:e,offset:t.offset,fallbackServer:t.fallbackServer,transcoder:o.a},t.decisionOverrides))},shouldSkipOnError:function(){return!0}});t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(8),l=n(339),c=n(34),u=n(61),d=n(39),h=n(52),p=n(419),f=c.a.extend({mixins:[h.a,p.a],type:d.a.types.PHOTO,slideshowDelay:5e3,skipTransition:!1,modelDefaults:function(){var e=p.a.modelDefaults.apply(this,arguments),t=a.a.first(e.metadataItem.get("Media")),n=t&&a.a.first(t.Part);
return a.a.extend(e,{media:t,part:n,ready:!0,canPlayPause:!0,canStop:!0,showEnterFullscreen:u.a.hasFullscreen})},initialize:function(e){p.a.initialize.apply(this,arguments),this.loop=!(!e||!e.loop),a.a.bindAll(this,"skipPrevious","skipNext"),this.listenTo(o.a,{"companion:pause":this.pause,"companion:play":this.play,"companion:stop":this.stop,"companion:skipNext":this.skipNext,"companion:skipPrevious":this.skipPrevious,"companion:skipTo":this.skipTo})},load:function(e){return this.model=e.model,e.autoplay?this.play():this.pause(),
this.reset(this.model.get("playQueueItem")),this.listenTo(this.model,{"change:state":this.onStateChange,"change:loaded":this.onLoadedChange,"change:error":this.onErrorChange}),l.a.registerPlayer(this),s.a.Deferred().resolve().promise()},reset:function(e){this.currentItem&&this.timeline({state:d.a.states.STOPPED,continuing:!0});var t={loop:this.loop};return this.currentItem=e,this.previousItem=this.getPreviousItem(e,t),this.nextItem=this.getNextItem(e,t),this.model.set(a.a.result(this,"modelDefaults")),
this.timeline().done(a.a.bind(this.updatePlayQueue,this)),e},play:function(){this.model.set({state:d.a.states.PLAYING,slideshowState:d.a.slideshowStates.PLAYING}),this.model.get("loaded")&&(this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay)),this.model.get("errorMessage")&&(this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay/2)),this.startPlaybackTracking()},pause:function(){this.model.set({state:d.a.states.PAUSED,slideshowState:d.a.slideshowStates.PAUSED}),this.slideshowTimeout=clearTimeout(this.slideshowTimeout),
this.stopPlaybackTracking()},skipPrevious:function(e){return e||(e={}),this.skipTransition=!!e.manual,this.previousItem&&(this.slideshowTimeout=clearTimeout(this.slideshowTimeout)),this.model.set("state",d.a.states.BUFFERING),p.a.skipPrevious.apply(this,arguments)},skipNext:function(e){return e||(e={}),this.skipTransition=!!e.manual,this.nextItem&&(this.slideshowTimeout=clearTimeout(this.slideshowTimeout)),this.model.set("state",d.a.states.BUFFERING),p.a.skipNext.apply(this,arguments)},stop:function(e,t){
p.a.stop.apply(this,arguments),this.slideshowTimeout=clearTimeout(this.slideshowTimeout),this.stopPlaybackTracking(),this.trackPlaybackEvent(),l.a.unregisterPlayer(this),o.a.trigger("hide:player",t)},onStateChange:function(e,t){this.timeline().done(a.a.bind(this.updatePlayQueue,this))},onLoadedChange:function(e,t){t&&(this.model.get("slideshowState")===d.a.slideshowStates.PLAYING?(clearTimeout(this.slideshowTimeout),this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay),this.model.set("state",d.a.states.PLAYING)):this.model.set("state",d.a.states.PAUSED));
},onErrorChange:function(e,t){t&&this.model.get("slideshowState")===d.a.slideshowStates.PLAYING&&(clearTimeout(this.slideshowTimeout),this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay/2))}});t.a=f},function(e,t,n){"use strict";var i=n(418),a=i.a.extend({name:"BasicVolatileStorage",initialize:function(){var e={};this.api={getItem:function(t){return e[t]},setItem:function(t,n){e[t]=n},removeItem:function(t){delete e[t]},clear:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t];
}}},getStorage:function(){return this.api}});t.a=a},function(e,t,n){"use strict";var i=n(418);try{"string"==typeof window.localStorage.getItem&&delete window.localStorage.getItem,"string"==typeof window.localStorage.setItem&&delete window.localStorage.setItem,"string"==typeof window.localStorage.removeItem&&delete window.localStorage.removeItem,"string"==typeof window.localStorage.clear&&delete window.localStorage.clear}catch(e){}var a=i.a.extend({name:"PersistentWebStorage",getStorage:function(){
return window.localStorage}});t.a=a},function(e,t,n){"use strict";var i=n(418),a=i.a.extend({name:"VolatileWebStorage",getStorage:function(){return window.sessionStorage}});t.a=a},function(e,t,n){"use strict";function i(e){return 401===e.status||403===e.status||406===e.status}function a(e){var t=e.server,n=e.connection;return!S.a.get("testPrivateConnectionsWhenPublicAddressDoesNotMatch")&&!t.get("isCloud")&&!t.get("isTransient")&&!t.get("publicAddressMatches")&&n.get("isPrivate")}function r(e,t){
var n=t.server,i=n.get("debugName");return b.a.warn("[Connections] Aborting connection test for %s at %s because secure connections are disallowed",i,e),c(e,t)}function s(e,t){var n=t.server,i=n.get("debugName");return b.a.warn("[Connections] Aborting connection test for %s at %s because location does not match",i,e),c(e,t)}function o(e,t){var n=t.server,i=n.get("debugName");return b.a.warn("[Connections] Aborting connection test for %s at %s due to mixed content prevention",i,e),c(e,t)}function l(e,t){
var n=t.server,i=n.get("debugName");return b.a.warn("[Connections] Aborting connection test for %s at %s due to reject direct connection debug setting",i,e),c(e,t)}function c(e,t){var n=t.connection,i=m.a.Deferred();return f.a.defer(function(){n.set({currentTest:null,testState:w.a.testStates.UNAVAILABLE}),i.reject(n)}),i.promise()}function u(e){e.url="fail"+e.url}function d(e,t){function a(t){n.i(b.a)("[Connections] %s connected at %s",c,e),o.set({currentTest:null,testState:w.a.testStates.CONNECTED,
serverAttrs:t}),l.resolve(o)}function r(t){var a={currentTest:null};if(t.aborting)n.i(b.a)("[Connections] Aborted pending connection test for %s at %s",c,e),a.testState=w.a.testStates.ABORTED;else{var r=i(t)?w.a.testStates.UNAUTHORIZED:w.a.testStates.UNAVAILABLE;b.a.warn("[Connections] %s is %s at %s (Status %s)",c,r,e,t.status),a.testState=r}o.set(a),l.reject(o,t)}var s=t.server,o=t.connection,l=m.a.Deferred(),c=s.get("debugName");n.i(b.a)("[Connections] Testing connection for %s at %s",c,e);var d=s.getXHROptions(e);
d.timeout=s.connectionTestTimeout,S.a.get("emulateCNP")&&!S.a.get("proxied")&&o.get("isPrivate")&&u(d);var h=S.a.get("emulateBrokenHTTPS");if(h){var p=o.get("isHttps")&&!s.get("isCloudBased"),f="private"!==h||o.get("isPrivate");p&&f&&u(d)}var g=m.a.ajax(d);return o.set({currentTest:g,testState:w.a.testStates.PENDING}),g.done(function(t,n,i){if(s.get("isCloud"))return void a();var o=s.parse(t),l=!!o.machineIdentifier;s.get("isTransient")&&o.machineIdentifier===s.get("originalMachineIdentifier")&&(o.machineIdentifier=s.get("machineIdentifier")),
!l||s.id&&o.machineIdentifier!==s.id?(b.a.warn("[Connections] %s has an unexpected machine identifier at %s",c,e),r(i)):a(o)}),g.fail(r),l.promise()}function h(e){var t=e.server,i=e.connection,c=t.resolveUrl(e.url||"/",{connection:i}),u=n.i(v.a)("appModel").get("settings");return S.a.get("allowHttpsMediaServerConnections")||!i.get("isHttps")||t.get("isCloudBased")?S.a.get("allowMixedContent")||!y.a.isHostedHttps||i.get("isHttps")?a(e)?s(c,e):t.get("isCloud")||i.get("relay")||!u.get("rejectDirectConnections")&&!S.a.get("rejectDirectConnections")?d(c,e):l(c,e):o(c,e):r(c,e);
}var p=n(2),f=n.n(p),g=n(5),m=n.n(g),v=n(14),y=n(61),b=n(27),S=n(59),w=n(147);t.a=h},function(e,t,n){"use strict";var i=n(1060);n.d(t,"a",function(){return i.a});var a=n(1058);n.d(t,"b",function(){return a.a});var r=n(1059);n.d(t,"c",function(){return r.a});var s=n(1064);n.d(t,"d",function(){return s.a});var o=n(1065);n.d(t,"e",function(){return o.a});var l=n(1063);n.d(t,"f",function(){return l.a});var c=n(1066);n.d(t,"g",function(){return c.a});var u=n(1062);n.d(t,"h",function(){return u.a});var d=n(1061);
n.d(t,"i",function(){return d.a});var h=n(1054);n.d(t,"j",function(){return h.a});var p=n(1055);n.d(t,"k",function(){return p.a});var f=n(1052);n.d(t,"l",function(){return f.a});var g=n(1053);n.d(t,"m",function(){return g.a});var m=n(1057);n.d(t,"n",function(){return m.a});var v=n(1056);n.d(t,"o",function(){return v.a})},function(e,t,n){"use strict";function i(e){var t,i=e.item,a=e.media,s=i.server;if(a){var u="/library/metadata/"+i.id+"/media/"+a.id,d=r.a.extend(s.getXHROptions(u),{type:"DELETE"
});t=o.a.ajax(d),t.done(function(){var t=e.item.get("Media");t.splice(r.a.indexOf(t,a),1),i.trigger("change:Media",i,i.get("Media"))})}else t=i.destroy({wait:!0});return t.fail(function(e){var t=403===e.status?n.i(l.default)("Ensure that media deletion is enabled for library content in your server settings."):n.i(l.default)("There was a problem deleting this item.");c.a.trigger("show:alert",{type:"error",message:t})}),t}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8);t.a=i},function(e,t,n){"use strict";
function i(e){var t=u.a.execute("deleteFile",e);return t.done(function(){var t=e.item,n=a(t.get("parentKey"),e);if(!n)return void r(e);var i=n.get("children").getCollection();if(i.length)return void s(n.get("key"),e);n.trigger("destroy",n,n.collection);var o=a(t.get("grandparentKey"),e);if(!o)return void r(e);var l=o.get("children").getCollection();l.length?s(o.get("key"),e):r(e)}),t}function a(e,t){if(!e)return!1;var n=new d.a({key:e},{server:t.item.server,onlyIfCached:!0});return!l.a.isEmpty(n)&&n;
}function r(e){if(!e.skipRedirect){var t=e.item;t.section?c.a.trigger("navigate","section",{serverID:t.server.id,sectionID:t.section.id,replace:!0}):c.a.trigger("navigate:back")}}function s(e,t){if(!t.skipRedirect){var n=t.item;c.a.trigger("navigate","details",{serverID:n.server.id,key:e,replace:!0})}}var o=n(2),l=n.n(o),c=n(8),u=n(21),d=n(49);t.a=i},function(e,t,n){"use strict";function i(e){var t=o.a.Deferred(),i=e.item,a=i.server,s=e.media||r.a.first(i.get("Media")),h=e.part||s&&r.a.first(s.Part),p=e.streamType,f=e.streamID;
if(!s||!h)return t.reject().promise();var g={};g[p.key]=f,!e.media&&a.supports("allPartsStreamSelection")&&(g.allParts=1);var m=d.join(["/library/parts/",h.id],g),v=r.a.extend(a.getXHROptions(m),{type:"PUT"}),y=o.a.ajax(v);return y.done(function(){n.i(u.a)(s,p,f),i.trigger("change:streams"),t.resolve()}),y.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem selecting the stream for this item.")}),t.reject(e)}),t.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(451),d=n(20);
t.a=i},function(e,t,n){"use strict";function i(e){var t,i,s=e.watched;e.item?(t=e.item,i=[t]):e.items&&(i=e.items,t=i[0]);var l=o.a.map(i,function(e){var t=s?"scrobble":"unscrobble",n={identifier:e.get("identifier")||"com.plexapp.plugins.library"};e.server.get("isCloudSyncServer")?(n.key=e.get("key"),n.ratingKey=e.get("ratingKey")):n.key=e.get("ratingKey");var i=p.join(["/:/",t],n),o=c.a.ajax(e.server.getXHROptions(i));return o.done(function(){r(e,s),a(e,s)}),o}),h=c.a.when.apply(c.a,l);return h.fail(function(){
var e;e=s?n.i(u.default)("There was a problem marking this item as watched."):n.i(u.default)("There was a problem marking this item as unwatched."),d.a.trigger("show:alert",{type:"error",message:e})}),h}function a(e,t){var n=h.a.get(e.get("type"));if(n&&"directory"===n.element){e.set({unviewedLeafCount:t?0:e.get("leafCount"),viewedLeafCount:t?e.get("leafCount"):0});var i=e.get("children")||e.get("items");i&&i.getCollection().each(function(e){a(e,t)})}else e.set({viewOffset:0,viewCount:t?1:0})}function r(e,t){
var n,i=h.a.get(e.get("type")),a=e.parent;if(a&&a.get("isMetadataList")&&(a=a.parent),a&&(n=h.a.get(a.get("type"))),n&&n.id===i.parent){var s,o="directory"===i.element;t?s=o?e.get("unviewedLeafCount"):1:(s=o?e.get("viewedLeafCount"):1,s*=-1),a.set({unviewedLeafCount:a.get("unviewedLeafCount")-s,viewedLeafCount:a.get("viewedLeafCount")+s}),r(a,t)}}var s=n(2),o=n.n(s),l=n(5),c=n.n(l),u=n(4),d=n(8),h=n(36),p=n(20);t.a=i},function(e,t,n){"use strict";function i(e,t){var i=t.playQueue;if(!i.get("playQueueID")||!i.server)return c.a.Deferred().reject().promise();
var a=h.a.getTypeByElement(i.get("mediaType"));if("music"!==a)return c.a.Deferred().reject().promise();var r=o.a.pick(t,"position","autoplay","inline");return r=o.a.extend(r,{serverID:i.server.id,playQueueID:i.get("playQueueID"),mediaType:a}),n.i(d.a)(e.fetch()).then(o.a.bind(e.save,e,r))}function a(e){return e.destroy()}function r(e){var t=u.a("appModel"),n=t.get("user"),r=new p.a({},{user:n});return e?i(r,e):a(r)}var s=n(2),o=n.n(s),l=n(5),c=n.n(l),u=n(14),d=n(112),h=n(39),p=n(641);t.a=r},function(e,t,n){
"use strict";var i=n(5),a=n.n(i),r=n(14),s=n(39),o=n(21),l=n(641),c=function(e){var t=r.a("appModel"),n=new l.a({},{user:e}),i=n.fetch().then(function(){return t.get("servers").populateServer(n.get("serverID"))}).then(function(e){return e.get("playQueueManager").populateQueue(n.get("playQueueID"),s.a.getElementByType(n.get("mediaType")))}).then(function(e){return a.a.when(e,n.get("position"),n.get("autoplay"),n.get("mediaType"),n.get("inline"))}).then(function(e,t,n,i,a){return"music"!==i?o.a.execute("persistPlayQueue",null):o.a.execute("playMedia",{
type:i,item:e,playQueue:e,offset:t,autoplay:n,inline:a})}).fail(function(){o.a.execute("persistPlayQueue",null)});return i};t.a=c},function(e,t,n){"use strict";function i(e){return n.i(a.a)("serverConnectionTestManager").abortConnectionTest(e)}var a=n(14);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,i=e.connection;if(t.id)return o.a.Deferred().resolve(t.id).promise();var a=t.resolveUrl("/identity",{connection:i}),s=r.a.extend(t.getXHROptions(a),{timeout:t.connectionTestTimeout
});n.i(c.a)("[Identity] Requesting the machine identifier of "+t.get("debugName")+" at "+a);var u=o.a.ajax(s).promise();return u=u.then(function(e){var i=o.a.Deferred(),a=l.a.parseXML(e),r=a&&a.machineIdentifier;return r?(n.i(c.a)("[Identity] Machine identifier found for "+t.get("debugName")+": "+r),!t.collection||t.collection.get(r)?i.resolve(r):(t.collection.populateServer({isCloud:!0}).done(function(e){e.get("resources").populate().always(function(){i.resolve(r)})}),t.collection.findServer({isCloud:!0
}).done(function(e){e.populate().fail(function(){i.resolve(r)})}).fail(function(){i.resolve(r)}))):i.reject(),i.promise()}),u.fail(function(){c.a.warn("[Identity] Machine identifier not found for "+t.get("debugName")+" at "+a)}),u}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(38),c=n(27);t.a=i},function(e,t,n){"use strict";function i(e){return n.i(a.a)("serverConnectionTestManager").queueConnectionTest(e)}var a=n(14);t.a=i},function(e,t,n){"use strict";function i(e){var t=r.a.Deferred().resolve().promise(),i=r.a.Deferred().reject().promise(),a=o.a.getActiveUser();
if(!a)return i;var l=a.get("pin"),c=a.get("authToken");if(!l&&!e.pin)return t;var u=n.i(s.a)("appModel").get("user"),d=u.hashPIN(e.pin,c);return l===d?t:i}var a=n(5),r=n.n(a),s=n(14),o=n(94);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.homeUser,n=s.a("appModel"),i=n.get("user"),a=t.get("uuid")||i.get("uuid"),l={pin:e.pin},c=o.join(["/api/v2/home/users/",a,"/switch"],l),u=t.server.getXHROptions(c,{type:"POST",xhrFields:{withCredentials:!1}});return r.a.ajax(u).promise()}var a=n(5),r=n.n(a),s=n(14),o=n(20);
t.a=i},function(e,t,n){"use strict";function i(){var e=n.i(a.a)("appModel"),t=e.get("user"),i=t.server,c=t.clearAccessToken();return c.fail(function(){l.a.warn("Failed to clear the access token and user storage")}).always(function(){e.set("history",[]),o.a.abortAll(),t.signOut(),t.uninitialize(),t.initialize(),r.a.trigger("clearAll:cache"),i.cache.store(i)}),n.i(s.a)(c)}var a=n(14),r=n(8),s=n(112),o=n(154),l=n(27);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.i(l.a)("appModel").get("user"),i=void 0;
i=e.username&&e.password?t.server.getXHROptions("/api/v2/users/signin",{type:"POST",data:{login:e.username,password:e.password}}):t.server.getXHROptions("/api/v2/user?X-Plex-Token="+e.accessToken);var a=o.a.ajax(i).promise();return a=a.then(function(n){return e.remember?c.a.restorePrevious():c.a.register(u.a.getInstance()),t.signIn(n)}),a.fail(function(t){var i=void 0;if(!e.silent){var a=t.responseText&&p.a.parseXML(t.responseText),s=a&&a.error,o=r.a.isArray(s)?r.a.first(s):s;i=o?r.a.isObject(o)?n.i(f.a)(o):o:n.i(d.default)("There was a problem signing in to Plex."),
h.a.trigger("show:alert",{type:"error",message:i})}}),a}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(14),c=n(81),u=n(315),d=n(4),h=n(8),p=n(38),f=n(264);t.a=i},function(e,t,n){"use strict";function i(){var e=s.a.execute("resetUser");return e=e.then(function(){return o.a.restoreDefaults(),o.a.save()}),e=e.then(function(){r.a.trigger("reset:servers")})}var a=n(5),r=(n.n(a),n(8)),s=n(21),o=n(94);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.i(r.a)("appModel").get("user"),i=t.get("signedIn"),s=t.id!==e.homeUser.id,c=e.allowGuestLock,u=s||c,d=i?o.a.execute("authenticateWithServer",e):o.a.execute("authenticateWithHash",e);
return i&&u?d=d.then(function(t){return a(t,e)}):d.done(function(){t.set("lockState",l.a.lockStates.UNLOCKED)}),d}function a(e,t){var i=n.i(r.a)("appModel").get("user"),a=o.a.execute("resetUser");return a=a.then(function(){return i.activateStoredUser(t.homeUser.id),s.a.trigger("reset:servers"),i.signIn(e,{lockState:l.a.lockStates.UNLOCKED})})}var r=n(14),s=n(8),o=n(21),l=n(172);t.a=i},function(e,t,n){"use strict";function i(){var e=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma","Location"],t=o.a.ajaxSettings.xhr;
return o.a.ajaxSettings.xhr=function(){var n=t(),i=n.getAllResponseHeaders;return n.getAllResponseHeaders=function(){var t=i.apply(n);if(t)return t;var a=[];return r.a.each(e,function(e){var t=n.getResponseHeader(e);t&&a.push(e+": "+t)}),a.join("\n")},n},o.a.ajaxPrefilter(l.a),o.a.ajaxPrefilter(function(e,t,n){if(e.crossDomain&&!e.skipCorsWithRedirect)return"cors_with_redirect"}),o.a.ajaxTransport("cors_with_redirect",c.a),u.a.startListening(),o.a.Deferred().resolve().promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(1301),c=n(1300),u=n(154);
t.a=i},function(e,t,n){"use strict";function i(e){return c.a.isString(e)&&e.trim().length>0}function a(e){var t=n.i(f.a)();return n.i(h.a)("[appModelInitializer] Generating new clientID [%s]",t),e.set("clientID",t),d.a.set("clientID",t)}function r(e){var t=void 0,r=e.get("clientID");return i(r)?t=d.a.set("clientID",r):(t=d.a.get("clientID"),t=t.then(function(t){return i(t)?void e.set("clientID",t):(h.a.error("[appModelInitializer] Invalid clientID found in storage [%s]",r),a(e))},function(){return n.i(h.a)("[appModelInitializer] Failed to read clientID from storage"),
a(e)})),t}function s(e){var t=d.a.get("skipSignIn");return t.always(function(t){e.set("skipSignIn","1"===t)}),t}function o(){var e=n.i(u.a)("appModel"),t=r(e),i=s(e);return n.i(p.a)(t,i)}var l=n(2),c=n.n(l),u=n(14),d=n(81),h=n(27),p=n(460),f=n(338);t.a=o},function(e,t,n){"use strict";function i(e){return e.get("isCloud")}function a(){var e=new c.a({name:"CloudServerEventManager",appModel:n.i(o.a)("appModel"),isValidServer:i,supportsLongPolling:!0,showTimelineStatus:!1,ServerEventConnection:l.a,ServerRetryManager:u.a
});return e.start(),s.a.Deferred().resolve().promise()}var r=n(5),s=n.n(r),o=n(14),l=n(1284),c=n(623),u=n(621);t.a=a},function(e,t,n){"use strict";function i(){var e=n.i(c.a)("appModel").get("settings");if(e.get("companion")){var t=n.i(c.a)("appModel"),i=t.get("cloudServer"),a=t.get("clientID");i.get("authorized")&&a&&a!==f&&(f=a,u.a.info('[Companion] Registering player with plex.tv, clientID="%s"',a),d.a.registerPlayer(i,a).done(function(){u.a.info('[Companion] Registered player with plex.tv, clientID="%s"',a);
}).fail(function(e){e||(e={}),f=null,u.a.warn('[Companion] Couldn\'t register player with plex.tv, status="%s", response="%s"',e.status,e.responseText&&e.responseText.substr(0,100))}))}}function a(){var e=n.i(c.a)("appModel"),t=e.get("cloudServer"),i=e.get("clientID");if(t.get("authorized")&&i)return u.a.info('[Companion] Unregistering player with plex.tv, clientID="%s"',i),d.a.unregisterPlayer(t,i).done(function(){return u.a.info('[Companion] Unregistered player with plex.tv, clientID="%s"',i)}).fail(function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u.a.warn('[Companion] Couldn\'t unregister player with plex.tv, status="%s", response="%s"',e.status,e.responseText&&e.responseText.substr(0,100))})}function r(){var e=n.i(c.a)("appModel").get("settings"),t=e.get("companion");if(g!==t)return g=t,t?(p.a.subscribe(),l.a.when(d.a.subscribe(h.a.onSignal))):(p.a.unsubscribe(),l.a.when(d.a.unsubscribe(),a()))}function s(){var e=n.i(c.a)("appModel"),t=e.get("cloudServer");e.on("change:clientID",i),
t.on("change:authorized",i);var a=n.i(c.a)("appModel").get("settings"),s=r();return a.on("change:companion",r),a.get("companion")?s.then(function(){return d.a.getDeepLink()}):s}var o=n(5),l=n.n(o),c=n(14),u=n(27),d=n(415),h=n(625),p=n(1086);t.a=s;var f=null,g=null},function(e,t,n){"use strict";function i(){o.a.init("https://67349abf654648e18514f1fbcb1603c8@sentry.io/34246");var e={lifecycle:"started",release:"02cb40971387d747b951ce04a79f14a0acc54d3c",version:s.a.prop("X-Plex-Version")};return s.a.props.forEach(function(t){
var n=s.a.prop(t);n&&(e[t]=n)}),o.a.set(e),o.a.enable(),r.a.Deferred().resolve().promise()}var a=n(5),r=n.n(a),s=n(248),o=n(416);n(1039);t.a=i},function(e,t,n){"use strict";function i(){var e=n.i(a.a)("appModel").get("user"),t=n.i(a.a)("metrics"),i=void 0;return i="bundled",t.set({userId:e.id,deviceIdentifier:s.a.prop("X-Plex-Client-Identifier"),context:{device:{product:s.a.prop("X-Plex-Product"),version:s.a.prop("X-Plex-Version"),platform:s.a.prop("X-Plex-Platform"),platformVersion:s.a.prop("X-Plex-Platform-Version"),
device:s.a.prop("X-Plex-Device"),deviceName:s.a.prop("X-Plex-Device-Name"),model:s.a.prop("X-Plex-Model"),screenResolution:s.a.prop("X-Plex-Device-Screen-Resolution"),layout:"desktop",environment:i}}}),n.i(r.a)(t.start())}var a=n(14),r=n(112),s=n(248);t.a=i},function(e,t,n){"use strict";function i(){var e=h.a.get("connections");return e=e.then(function(e){if(e)try{var t=function(){var t=JSON.parse(e),n=t.users;if(!n)return{v:void 0};var i=[];return n.forEach(function(e){var n=e.entitlements,a=e.servers,r={
id:e.id,authToken:e.accessToken,title:e.title,pin:e.pin,home:e.home,hasAllEntitlements:!!e.entitlements&&e.entitlements.hasOwnProperty("all"),lastPrimaryServerID:t.lastPrimaryServerID,entitlements:[],servers:[]};n&&c.a.each(n,function(e,t){e&&r.entitlements.push({id:t})}),a&&a.forEach(function(e){var t=e.connections,n=e.sources,i=!(!t||!t.length),a=!(!n||!n.length);if(e.machineIdentifier&&i&&a){var s={machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName,sourceTitle:e.shared?e.friendlyName:void 0,
accessToken:e.accessToken,synced:e.synced,isShared:e.shared,connections:[]};t.forEach(function(e){var t={uri:e.uri,scheme:e.scheme,address:e.address,port:e.port,sources:[]};c.a.contains(n,"myPlex")?t.sources.push({id:"myPlex"}):t.sources.push({id:"internal"}),s.connections.push(t)}),r.servers.push(s)}}),i.push(r)}),{v:h.a.set("users",o()({users:i}))}}();if("object"===("undefined"==typeof t?"undefined":r()(t)))return t.v}catch(e){n.i(u.a)(!1,"Unable to migrate stored connections: "+e.message)}}),e=e.then(function(){
return h.a.remove("connections")}),n.i(d.a)(e)}var a=n(119),r=n.n(a),s=n(93),o=n.n(s),l=n(2),c=n.n(l),u=n(33),d=n(112),h=n(81);t.a=i},function(e,t,n){"use strict";function i(){n.i(f.a)("[Servers] Resetting...");var e=n.i(g.a)("appModel"),t=e.get("servers");n.i(g.a)("serverManager").stop(),n.i(g.a)("primaryServerManager").stop(),n.i(g.a)("manualServerManager").stop(),n.i(g.a)("serverConnectionManager").stop(),n.i(g.a)("serverConnectionTestManager").reset(),t.uninitialize(),t.reset(),t.initialize(),
a()}function a(){n.i(f.a)("[Servers] Initializing..."),r(),s(),o(),l(),c(),n.i(g.a)("serverManager").start(),n.i(g.a)("primaryServerManager").start(),n.i(g.a)("manualServerManager").start(),n.i(g.a)("serverConnectionManager").start(),n.i(f.a)("[Servers] Finished initialization")}function r(){var e=n.i(g.a)("appModel"),t=e.get("servers"),i=e.get("cloudServer"),a=e.get("settings");i.addConnection({scheme:a.get("myPlexScheme")||m.a.get("myPlexScheme"),address:a.get("myPlexUrl")||m.a.get("myPlexUrl")
}),t.add(i)}function s(e){var t=n.i(g.a)("appModel"),i=t.get("servers"),a=v.a.getActiveServers();a&&a.each(function(e){if(e.get("connections").length)try{var n=new y.a(e.toJSON(),{parent:t});i.add(n)}catch(e){f.a.warn(e)}})}function o(){var e=n.i(g.a)("appModel"),t=e.get("servers"),i=m.a.get("primaryServer");if(i){var a=new y.a({machineIdentifier:i.machineIdentifier,friendlyName:i.name,isShared:i.shared,superToken:i.superToken,accessToken:i.accessToken,sourceTitle:i.sourceTitle},{parent:e});a.addConnection({
scheme:i.scheme,address:i.address,port:i.port}),t.add(a)}}function l(){var e=n.i(g.a)("appModel"),t=e.get("servers"),i=new y.a({isBundled:!0},{parent:e});i.addConnection({scheme:window.location.protocol.replace(":",""),address:window.location.hostname,port:window.location.port,isBundled:!0}),t.add(i)}function c(){if(m.a.get("allowLoopbackDiscovery")){var e=n.i(g.a)("appModel"),t=e.get("servers"),i=new y.a({},{parent:e});i.addConnection({scheme:"http",address:"127.0.0.1",port:"32400"}),t.add(i)}}function u(){
return a(),p.a.on("reset:servers",i),h.a.Deferred().resolve().promise()}var d=n(5),h=n.n(d),p=n(8),f=n(27),g=n(14),m=n(59),v=n(94),y=n(83);t.a=u},function(e,t,n){"use strict";function i(){var e=n.i(s.a)("appModel").get("settings"),t=r.a.Deferred();return r.a.when(e.populate(),l.a.populate()).always(function(){var n=e.get("language");o.a.load(n).always(function(){t.resolve()})}),t.promise()}var a=n(5),r=n.n(a),s=n(14),o=n(313),l=n(94);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.a)();
}var a=n(1073);t.a=i},function(e,t,n){"use strict";function i(){var e=r.a.Deferred(),t=o.a.get("myPlexAccessToken");return t.done(function(e){var t=n.i(s.a)("appModel").get("user"),i=l.a.get("users"),a=i.findWhere({authToken:e});a&&t.activateStoredUser(a.id)}),t.always(function(){e.resolve()}),e.promise()}var a=n(5),r=n.n(a),s=n(14),o=n(81),l=n(94);t.a=i},function(e,t,n){"use strict";var i=n(14),a=n(27),r=n(34),s=n(8),o=n(52),l=(n(33),n(94)),c=n(59),u=n(172),d=r.a.extend({mixins:o.a,collectionNames:[],
flexCollectionNames:[],initialize:function(e){this.user=e},start:function(){var e=this,t=this.user;this.previousUserID=t.id;var r={change:this.onUserChange},s=["isSignedIn","isLocked","isUnlocked","hasInvalidToken"];s.forEach(function(n){var i=t.get(n),a=n.charAt(0).toUpperCase()+n.slice(1),s=e["on"+a+"Change"];r["change:"+n]=s,i&&s.call(e,t,i)}),this.listenTo(t,r);var o=n.i(i.a)("appModel").get("settings"),l=c.a.get("proxied")||o.get("autoLogin")||t.get("isUnlocked");n.i(a.a)("[UserManager] autoLogin",l),
l||this._lockIfInHome()},handleInvalidToken:function(){},_lockIfInHome:function(){var e=l.a.getActiveUser();e&&e.get("home")&&this.user.set("lockState",u.a.lockStates.LOCKED)},onHasInvalidTokenChange:function(e,t){t&&this.handleInvalidToken()},onIsUnlockedChange:function(e,t){},onUserChange:function(e){if(this.user.get("isSignedIn")){var t=l.a.getActiveUser();if(t)t.copyFromUser(e);else{var n=l.a.get("users");n.add(e.toJSON(),{parse:!0})}l.a.debouncedSave()}},onIsSignedInChange:function(e,t){if(this.stopListening(e,"change:hasInvalidToken",this.onHasInvalidTokenChange),
!t)return void(e.get("hasInvalidToken")&&this.handleInvalidToken());t&&e.get("isLocked")&&(this.previousUserID=e.id);var n={reset:!0};this.collectionNames.forEach(function(t){return e.get(t).populate(n)}),this.flexCollectionNames.forEach(function(t){return e.get("desktop").get(t).populate(n)})},onIsLockedChange:function(e,t){t&&(this.previousUserID=e.id,this.listenTo(e,"change:isUnlocked",this.onNextIsUnlockedChange))},onNextIsUnlockedChange:function(e,t){var n=this;t&&(this.stopListening(e,"change:isUnlocked",this.onNextIsUnlockedChange),
setTimeout(function(){var e=n.previousUserID,t=e&&e===n.user.id?"navigate:refresh":"navigate:refresh:dashboard";s.a.trigger(t)},0))}});t.a=d},function(e,t,n){"use strict";var i=n(34),a=n(52),r=i.a.extend({mixins:a.a,start:function(){}});t.a=r},function(e,t,n){"use strict";var i=n(66),a=n.n(i),r=n(34),s=n(8),o=n(52),l=n(83),c=n(1166),u="manualServer",d=r.a.extend({mixins:[o.a],initialize:function(e){this.appModel=e.appModel,this.servers=this.appModel.get("servers")},start:function(){this.listenTo(c.a,"change",this.onManualConnectionChange),
this.initManualServer()},stop:function(){this.stopListening()},initManualServer:function(){function e(e){var t=c.a.get("ip"+e),n=c.a.get("port"+e);t&&n&&this.addManualConnection(t,n,e)}e.call(this,1),e.call(this,2)},removeManualConnection:function(e,t,n){var i=this.appModel.get("primaryServer"),a=u+n,r=this.servers.find(function(e){return e.hasSource(a)});if(r){r.removeSource("internal"),r.removeSource(a);var o=r.get("connections").findWhere({isConnected:!0});o||r!==i||s.a.trigger("navigate","dashboard",{
replace:!0})}},addManualConnection:function(e,t,n){var i=u+n,a={scheme:"http",address:e,port:t.toString(),sources:{id:i}},r=new l.a({friendlyName:e});r.addConnection(a),this.servers.add(r)},onManualConnectionChange:function(e){var t=a()(e.changed)[0],n=t.slice(-1),i="ip"+n,r="port"+n,s=e.previous(i),o=e.previous(r),l=e.get(i),c=e.get(r);s&&o&&this.removeManualConnection(s,o,n),l&&c&&this.addManualConnection(l,c,n)}});t.a=d},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(5),s=n.n(r),o=n(1297),l=n(14),c=n(34),u=n(59),d=n(52),h=n(1172),p=c.a.extend({
mixins:d.a,initialize:function(){this.defaults={},this.enable()},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},set:function(e){this.defaults=a()({},this.defaults,e)},incrementPlaybackCount:function(){var e="playbackCount";h.a.save(e,h.a.get(e)+1)},trackView:function(e,t){this.trackEvent(a()({event:"client:view",interaction:!0,properties:e},t))},trackClick:function(e,t){this.trackEvent(a()({event:"client:click",interaction:!0,properties:e},t))},trackEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.i(l.a)("metricsReporter");
if(this.enabled){var i=h.a.get("sessionId"),a=s.a.extend(!0,{properties:{sessionId:i}},this.defaults,e);return t.trackEvent(a),a}},start:function(){var e=this,t=n.i(l.a)("appModel").get("user");this.listenTo(t,"change:id",this.onUserIDChange);var i=h.a.populate();return i.done(function(){e.stopSession()}).always(function(){e.startSession()}),i},startSession:function(){var e=Date.now();this.interval||(this.interval=setInterval(function(){h.a.save("heartbeatTime",Date.now())},u.a.get("heartbeatInterval"))),
h.a.save({sessionId:n.i(o.a)(),startTime:e,heartbeatTime:e,playbackCount:0}),this.trackEvent({event:"client:start",interaction:!0})},stopSession:function(){var e=h.a.get("heartbeatTime"),t=h.a.get("playbackCount"),n=h.a.get("startTime"),i=Math.round((e-n)/1e3);this.trackEvent({event:"client:shutdown",interaction:!1,properties:{sessionLength:i,playbackCount:t}})},onUserIDChange:function(e,t){this.set({userId:t})}});t.a=p},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(34),s=n(52),o=n(27),l=n(14),c=n(94),u=n(659),d=n(1199),h=r.a.extend({
mixins:[s.a],initialize:function(e){this.appModel=e.appModel,this.servers=this.appModel.get("servers")},start:function(e){this.stop(),this.listenTo(this.appModel,{"change:primaryServer":this.onPrimaryServerChange,"change:primaryServer.change:isPrimaryEligible":this.onPrimaryServerEligibleChange,"change:primaryServer.change:isOutOfDate":this.onPrimaryServerOutOfDateChange,"change:isWaitingForServers":this.onWaitingForServersChange,"change:primaryServer.change:isRelayed":this.onPrimaryServerIsRelayedChange
}),this.listenTo(this.servers,{"update reset":this.onServersUpdate}),this._setPrimaryServer()},stop:function(){this.stopListening(),this._primaryServerPromise=null},fetchPrimaryRelations:function(e){},_setPrimaryServer:function(){var e=this;if(this._primaryServerPromise)return this._primaryServerPromise;var t=n.i(l.a)("appStore");t.dispatch(n.i(u.b)());var i=this._waitForPrimaryServer();return this._primaryServerPromise=i,i.done(function(a){if(i===e._primaryServerPromise){if(e._primaryServerPromise=null,
e.appModel.get("primaryServer"))return;var r=!a.get("version")&&!a.get("isRejected");a.get("isOutOfDate")||r?(n.i(o.a)("[Primary Server] The server, %s, is waiting for a version",a.get("debugName")),e._setPrimaryServer()):t.dispatch(n.i(u.a)(a.id))}}).fail(function(){i===e._primaryServerPromise&&(e._primaryServerPromise=null,e.appModel.set("isWaitingForPrimaryServer",!1))}),i},_waitForPrimaryServer:function(){var e=this,t=this.appModel.get("user"),i=t.get("lastPrimaryServerID"),r=void 0;return i?(n.i(o.a)("[Primary Server] Waiting for the last primary server, %s, to connect",i),
r=this.servers.populateServer({machineIdentifier:i,isPrimaryEligible:!0,isOutOfDate:!1})):r=a.a.Deferred().reject().promise(),r=r.then(null,function(){return n.i(o.a)("[Primary Server] Waiting for any owned server to connect"),e.servers.populateServer({isFullOwnedServer:!0,isPrimaryEligible:!0,isOutOfDate:!1})}),r=r.then(null,function(){return n.i(o.a)("[Primary Server] Waiting for any eligible server to connect"),e.servers.populateServer({isPrimaryEligible:!0,isOutOfDate:!1})}),r=r.then(null,function(){
return n.i(o.a)("[Primary Server] Waiting for any eligible server"),e.servers.findServer({isPrimaryEligible:!0,isOutOfDate:!1})})},onPrimaryServerChange:function(e,t){c.a.flushDebouncedSave();var i=e.previous("primaryServer");if(i&&this.stopListening(i),t){o.a.info("[Primary Server] %s is now the primary server",t.get("debugName"));var a=e.get("user");if(a.set("lastPrimaryServerID",t.id),t.get("isConnected")?this.fetchPrimaryRelations(t):this.listenTo(t,"change:isConnected",this.onPrimaryServerConnectedChange),
t.get("isRelayed")){var r=n.i(l.a)("appStore");r.dispatch(n.i(d.a)({machineIdentifier:t.id,serverName:t.get("friendlyName")}))}}else e.get("isWaitingForPrimaryServer")?n.i(o.a)("[Primary Server] Waiting to set the primary server"):o.a.warn("[Primary Server] No primary server found")},onPrimaryServerEligibleChange:function(e,t){var i=this.appModel.get("user");t||(n.i(o.a)("[Primary Server] The previous primary server, %s, is unauthorized",e.get("debugName")),i.unset("lastPrimaryServerID"),this._setPrimaryServer());
},onPrimaryServerOutOfDateChange:function(e,t){var i=this.appModel.get("user");t&&(n.i(o.a)("[Primary Server] The previous primary server, %s, is out of date",e.get("debugName")),i.unset("lastPrimaryServerID"),this._setPrimaryServer())},onPrimaryServerConnectedChange:function(e,t){t&&this.fetchPrimaryRelations(e)},onWaitingForServersChange:function(e,t){if(t){var n=e.get("primaryServer"),i=!n||!this.servers.get(n.id),a=e.get("isWaitingForPrimaryServer");i&&!a&&this._setPrimaryServer()}},onPrimaryServerIsRelayedChange:function(e,t){
if(t){var i=n.i(l.a)("appStore");i.dispatch(n.i(d.a)({machineIdentifier:e.id,serverName:e.get("friendlyName")}))}},onServersUpdate:function(){var e=this.appModel.get("user"),t=this.appModel.get("primaryServer");if(t){var i=t&&!this.servers.get(t.id);i&&(n.i(o.a)("[Primary Server] The previous primary server, %s, was removed",t.get("debugName")),e.unset("lastPrimaryServerID"),this._setPrimaryServer())}else this._setPrimaryServer()}});t.a=h},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(8),u=n(34),d=n(621),h=n(622),p=n(52),f=n(27),g=n(94),m=n(83),v=u.a.extend({
mixins:[p.a],browserConnectionChangeDelay:2e3,initialize:function(e){s.a.bindAll(this,"onBrowserConnectionChange"),this.appModel=e.appModel,this.servers=this.appModel.get("servers");var t={callback:this.retryServerConnections.bind(this),logFormat:"[Connections] Retrying connection tests for %s in %s seconds"};this._cloudServerRetryManager=new d.a(t),this._primaryServerRetryManager=new h.a(a()({},t,{appModel:this.appModel}))},start:function(){this.stop();var e=l()(window);e.on("online",this.onBrowserConnectionChange),
e.on("offline",this.onBrowserConnectionChange),this.listenTo(c.a,{"test:servers":this.onTestAllServers,"test:server":this.onTestServer}),this.listenTo(this.servers,{add:this.onServerAdd,remove:this.onServerRemove,reset:this.onServersReset,"error:connection":this.onServerConnectionError,"change:connections.add":this.onServerConnectionAdd,"change:connections.remove":this.onServerConnectionRemove,"change:connections.reset":this.onServerConnectionsReset,"change:connections.change:isConnected":this.onServerConnectionConnectedChange,
"change:connections.change:sources.change":this.onServerConnectionSourcesChange,"change:accessToken":this.onServerAccessTokenChange,"change:isConnected":this.onServerConnectedChange,"change:isUnavailable":this.onServerUnavailableChange,"change:publicAddressMatches":this.onServerPublicAddressMatchesChange}),this.servers.invoke("testOnlyUntestedConnections")},stop:function(){this.stopListening(),this._cloudServerRetryManager.stopAll(),this._primaryServerRetryManager.stopAll();var e=l()(window);e.off("online",this.onBrowserConnectionChange),
e.off("offline",this.onBrowserConnectionChange)},retryServerConnections:function(e){e.testAllConnections()},_startFailedServerRetries:function(e){e.get("isCloud")?this._cloudServerRetryManager.start(e):this._primaryServerRetryManager.start(e)},_stopFailedServerRetries:function(e){e.get("isCloud")?this._cloudServerRetryManager.stop(e):this._primaryServerRetryManager.stop(e)},_removeConnection:function(e){var t=e.server,i=g.a.getActiveServers();if(n.i(f.a)("[Connections] Removed connection %s from %s",e.id,t.get("debugName")),
t.abortConnectionTest(e),i){var a=i.get(t.id),r=a&&a.get("connections");r&&r.get(e.id)&&(r.remove(e.id),r.length||i.remove(t.id),g.a.debouncedSave())}},onBrowserConnectionChange:function(e){var t=this;n.i(f.a)("[Connections] Browser online status changed to",window.navigator.onLine),clearTimeout(this.browserConnectionChangeTimeout),this.browserConnectionChangeTimeout=setTimeout(function(){t.servers.invoke("testAllConnections")},this.browserConnectionChangeDelay)},onTestAllServers:function(){this.servers.invoke("testAllConnections");
},onTestServer:function(e){e.testAllConnections()},onServerAdd:function(e){e.testOnlyUntestedConnections()},onServerRemove:function(e){var t=g.a.getActiveServers(),n=void 0;if(e.abortAllConnectionTests(),this._stopFailedServerRetries(e),t)if(e.get("isMerged")){var i=e.previous("machineIdentifier");i&&(n=t.get(i),n&&(n.set("machineIdentifier",e.id),g.a.debouncedSave()))}else n=t.get(e.id),n&&(t.remove(e.id),g.a.debouncedSave())},onServersReset:function(e,t){var n=this,i=t.previousModels;s.a.each(i,function(t){
e.contains(t)||(t.abortAllConnectionTests(),n._stopFailedServerRetries(t))})},onServerConnectionError:function(e){if(f.a.warn("[Connections] Possible connection error for %s, retrying connection tests",e.get("debugName")),e.get("isCloud")){var t=this.appModel.get("user");t.signInWithStoredToken()}else e.testAllConnections()},onServerConnectionAdd:function(e){var t=e.server;n.i(f.a)("[Connections] Added connection %s for %s",e.id,t.get("debugName")),e.get("relay")&&!t.get("connections").hasFailedEveryDirectConnection()||t.testConnection(e);
},onServerConnectionRemove:function(e){this._removeConnection(e)},onServerConnectionsReset:function(e,t){var n=this,i=t.previousModels;s.a.each(i,function(t){e.contains(t)||n._removeConnection(t)})},onServerConnectionConnectedChange:function(e,t){var n=e.server,i=e.get("isBundled"),a=e.get("isFallback"),r=t&&!i&&!a,o=g.a.getActiveServers();if(n.id&&!n.get("isCloud")&&r&&o){var l=o.get(n.id);if(l)l.copyFromServer(n);else{var c=s.a.omit(n.toJSON(),"connections");l=o.add(c,{merge:!0,parse:!0})}l.get("connections").add(e.toJSON(),{
merge:!0,parse:!0}),g.a.debouncedSave()}},onServerConnectionSourcesChange:function(e,t){var n=e.server,i=g.a.getActiveServers(),a=i&&i.get(n.id);if(a){var r=a.get("connections"),s=r.get(e.id);if(s){var o=s.get("sources");o.set(t.toJSON()),g.a.debouncedSave()}}},onServerAccessTokenChange:function(e,t){e.get("isCloud")||(n.i(f.a)("[Connections] Access token for %s changed to %s",e.get("debugName"),t),e.get("isUnauthorized")&&e.set("connectionTestResult",m.a.connectionTestResults.PENDING),e.testAllConnections());
},onServerConnectedChange:function(e,t){t&&this._stopFailedServerRetries(e)},onServerUnavailableChange:function(e,t){t&&this._startFailedServerRetries(e)},onServerPublicAddressMatchesChange:function(e,t){void 0!==t&&e.testAllConnections()}});t.a=v},function(e,t,n){"use strict";function i(e,t,n){return function(i){return i.server===e&&i.connection.id===t.id&&i.url===n}}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(14),c=n(27),u=n(34),d=n(154),h=n(59),p=u.a.extend({initialize:function(e){this.appModel=e.appModel,
this.queued=[],this.executing=[],this.maximumConcurrent=h.a.get("maximumConcurrentConnectionTests"),this.throttledStartProcessing=r.a.throttle(this._startProcessing.bind(this),50,{leading:!1})},queueConnectionTest:function(e){var t=e.server,n=e.connection,i=e.url,a=this._queuedOrExecuting(t,n,i);if(a)return a.deferred.promise();var r=o.a.Deferred();return this.queued.push({server:t,connection:n,url:i,deferred:r}),this._sortQueue(),this.throttledStartProcessing(),r.promise()},abortConnectionTest:function(e){
var t=e.server,n=e.connection,i=e.url;return this._abortCurrentTest(t,n,i),this._removeQueuedOrExecuting(t,n,i),o.a.Deferred().resolve().promise()},reset:function(){this.queued.length=0,this.executing.length=0},_sortQueue:function(){var e=this,t=this.appModel.get("user").get("lastPrimaryServerID");this.queued.sort(function(n,i){var a=n.server,r=i.server,s=n.connection,o=i.connection,l=e._isManualConnection(s),c=e._isManualConnection(o),u=e._isMatchingLocation(a,s),d=e._isMatchingLocation(r,o);return a.id===t&&r.id!==t?-1:r.id===t&&a.id!==t?1:a.get("isCloud")&&!r.get("isCloud")?-1:r.get("isCloud")&&!a.get("isCloud")?1:!s.get("relay")&&o.get("relay")?-1:!o.get("relay")&&s.get("relay")?1:!s.get("isConnected")&&o.get("isConnected")?-1:!o.get("isConnected")&&s.get("isConnected")?1:!a.get("isShared")&&r.get("isShared")?-1:!r.get("isShared")&&a.get("isShared")?1:a.get("isFullServer")&&!r.get("isFullServer")?-1:r.get("isFullServer")&&!a.get("isFullServer")?1:!a.get("isCloudSyncServer")&&r.get("isCloudSyncServer")?-1:!r.get("isCloudSyncServer")&&a.get("isCloudSyncServer")?1:l&&!c?-1:c&&!l?1:s.get("isBundled")&&!o.get("isBundled")?-1:o.get("isBundled")&&!s.get("isBundled")?1:u&&!d?-1:d&&!u?1:0;
})},_startProcessing:function(){r.a.times(this.maximumConcurrent-this.executing.length,this._process.bind(this))},_process:function(){var e=this;if(!(this.executing.length>=this.maximumConcurrent)&&this.queued.length){var t=this.queued.shift(),i=t.server,a=t.connection,r=t.url;this._abortCurrentTest(i,a,r);var s=n.i(l.a)("testServerConnection"),o=s({server:i,connection:a,url:r});this.executing.push(t),o.done(function(e,n){t.deferred.resolve(e,n)}),o.fail(function(e,n){t.deferred.reject(e,n)}),o.always(function(){
var n=e.executing.indexOf(t);e.executing.splice(n,1),e._process()})}},_abortCurrentTest:function(e,t,i){var a=t.get("currentTest"),r=e.resolveUrl(i||"/",{connection:t});a&&"pending"===a.state()&&(n.i(c.a)("[Connections] Aborting pending connection test for %s at %s",e.get("debugName"),r),d.a.abort(a.rid),a.abort())},_isManualConnection:function(e){return e.get("sources").some(function(e){return 0===e.id.indexOf("manualServer")})},_isMatchingLocation:function(e,t){var n=e.get("publicAddressMatches"),i=t.get("isPrivate");
return n&&i||!n&&!i},_queuedOrExecuting:function(e,t,n){var a=i(e,t,n);return r.a.find(this.executing,a)||r.a.find(this.queued,a)},_removeQueuedOrExecuting:function(e,t,n){var a=i(e,t,n),s=r.a.findIndex(this.executing,a),o=r.a.findIndex(this.queued,a);s>=0&&this.executing.splice(s,1),o>=0&&this.queued.splice(o,1)}});t.a=p},function(e,t,n){"use strict";var i=n(66),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),c=n(34),u=n(8),d=n(27),h=n(52),p=n(83),f=n(647),g=n(94),m=a()(f.a.prototype.syncedAttrs),v=c.a.extend({
mixins:[h.a],initialize:function(e){this.appModel=e.appModel,this.servers=this.appModel.get("servers")},start:function(){var e=this;this.stop(),this.listenTo(this.servers,{"change:promiseState":this.onServerPromiseStateChange,remove:this.onServerRemove,"update reset":this.onServersUpdateReset,"change:resources.add":this.onResourceAdd,"change:resources.remove":this.onResourceRemove,"change:resources.update":this.onResourcesUpdate,"change:resources.reset":this.onResourcesReset,"change:resources.change:presence":this.onResourcesPresenceChange
}),m.forEach(function(t){e.listenTo(e.servers,"change:"+t,e.onStoredServerAttributeChange.bind(e,t))}),this.listenTo(u.a,"discover:servers",this.onDiscoverServers),this._setAuthorized(),this._checkFoundAllServers()},stop:function(){this.stopListening()},_checkFoundAllServers:function(){this.servers.shouldWaitForInitialServers()?this._waitForServers():this.servers.shouldWaitForResources()?this._waitForServers():this.servers.shouldWaitForPendingServers()?this._waitForServers():this._foundAllServers();
},_waitForServers:function(){this.servers.waitForServers(),this.appModel.set("isWaitingForServers",!0)},_foundAllServers:function(){this.servers.foundAllServers(),this.appModel.set("isWaitingForServers",!1)},_fetchResources:function(e){var t=this;if(e.get("isRejected"))return s.a.Deferred().reject().promise();if(!e.get("isResolved"))return n.i(d.a)("[Servers] Finding resources through unresolved cloud server %o, resolving",e.get("debugName")),e.populate().then(function(){return t._fetchResources(e);
});n.i(d.a)("[Servers] Finding resources through %s",e.get("debugName")),this._waitForServers();var i=e.get("resources"),a=i.fetch().done(function(){n.i(d.a)("[Servers] Found %s resources through %s",i.length,e.get("debugName")),e.set({hasFailedResources:!1,isDownForMaintenance:!1})}).fail(function(t,n){d.a.warn("[Servers] Failed to request resources through %s",e.get("debugName")),e.set({hasFailedResources:!0,isDownForMaintenance:503===n.status})}).always(function(){t._checkFoundAllServers()});return a;
},_convertResourceToServer:function(e){n.i(d.a)("[Servers] %s was found through %s",e.get("name"),e.server.get("debugName"));var t="Plex Media Server"===e.get("product"),i=new p.a({machineIdentifier:e.id,friendlyName:e.get("name"),version:t?e.get("productVersion"):void 0,isShared:!e.get("owned"),accessToken:e.get("accessToken"),sourceTitle:e.get("sourceTitle"),publicAddressMatches:e.get("publicAddressMatches"),httpsRequired:e.get("httpsRequired"),platform:e.get("platform"),platformVersion:e.get("platformVersion"),
presence:e.get("presence"),home:e.get("home"),synced:e.get("synced"),serverClass:t?void 0:p.a.serverClasses.SECONDARY,createdAt:e.get("createdAt"),lastSeenAt:e.get("lastSeenAt")},{parent:this.appModel});return e.get("connections").each(function(t){var n=[{id:e.server.id}],a=l.a.extend(t.toJSON(),{sources:n});i.addConnection(a)}),i},_removeResource:function(e){n.i(d.a)("[Servers] %s was removed as a resource from %s",e.get("name"),e.server.id);var t=this.servers.get(e.id);t&&t.removeSource(e.server.id);
},_pruneStaleSources:function(e){for(var t=e.get("resources"),n=this.servers.length-1;n>=0;){var i=this.servers.at(n),a=t.get(i.id);if(a)for(var r=i.get("connections"),s=r.length-1;s>=0;){var o=r.at(s),l=o.get("sources");if(l.get(e.id)){var c=a.get("connections");c.get(o.id)||o.get("sources").remove(e.id)}s--}else i.removeSource(e.id);n--}},_setAuthorized:function(){var e=!!this.servers.findWhere({isConnected:!0,isCloud:!1}),t=!!this.servers.findWhere({isResolved:!0,isCloud:!0});this.appModel.set("authorized",e||t);
},onServerPromiseStateChange:function(e,t){if(t===p.a.promiseStates.RESOLVED){var n=e.get("resources");n&&this._fetchResources(e)}this._setAuthorized(),this._checkFoundAllServers()},onStoredServerAttributeChange:function(e,t,n){var i=g.a.getActiveServers(),a=i&&i.get(t.id);a&&null!=n&&a.get(e)!==n&&(a.set(e,n),g.a.debouncedSave())},onServerRemove:function(e){d.a.warn("[Servers] %s was removed",e.get("debugName")),e.cache.remove(e),u.a.trigger("clearWhere:cache",{server:e})},onServersUpdateReset:function(){
this._setAuthorized(),this._checkFoundAllServers()},onDiscoverServers:function(){var e=this.appModel.get("cloudServer");this._fetchResources(e)},onResourceAdd:function(e){if(l.a.contains(e.get("provides"),"server")){var t=this._convertResourceToServer(e);this.servers.add(t)}},onResourceRemove:function(e){this._removeResource(e)},onResourcesUpdate:function(e){this._pruneStaleSources(e.server),this._checkFoundAllServers()},onResourcesReset:function(e,t){var n=this,i=t.previousModels;l.a.each(i,function(t){
e.contains(t)||n._removeResource(t)}),this._checkFoundAllServers()},onResourcesPresenceChange:function(e){var t=this.servers.get(e.id);t&&t.set("presence",e.get("presence"))}});t.a=v},function(e,t,n){"use strict";var i=n(8),a=n(625),r={subscribe:function(){i.a.on("cloudServer:processRemoteControlCommand",this.onCloudServerCommand,this)},unsubscribe:function(){i.a.off("cloudServer:processRemoteControlCommand",this.onCloudServerCommand,this)},onCloudServerCommand:function(e){var t=e.Command,n={supportsTimeline:!1,
path:t.path,commandID:t.commandID,query:{key:[t.queryKey],offset:[t.queryOffset],containerKey:[t.queryContainerKey],playQueueID:[t.queryPlayqueueid],type:[t.queryType],volume:[t.queryVolume],repeat:[t.queryRepeat],subtitleStreamID:[t.querySubtitleStreamID],token:[t.queryToken],machineIdentifier:[t.queryMachineIdentifier],protocol:[t.queryProtocol],address:[t.queryAddress],port:[t.queryPort],text:[t.queryText],field:[t.queryField]}};a.a.onSignal(n)}};t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(145),s={
bindings:a.a.extend({".artist-title":{modelAttribute:"parentTitle"},".album-title":{modelAttribute:"title"}},a.a.pick(r.a.defaultBindings,[".item-year",".item-genre"]))};t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(145),s={bindings:a.a.pick(r.a.defaultBindings,[".item-title",".item-genre"])};t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(145),s={bindings:a.a.pick(r.a.defaultBindings,[".item-title",".item-year",".item-duration",".item-tagline",".item-genre",".item-director",".item-writer",".item-cast",".item-content-rating",".content-rating-flag-container",".studio-flag-container"])
};t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(145),s=n(127),o={bindings:a.a.extend({".show-title":{modelAttribute:"grandparentTitle"},".episode-title":{modelAttribute:"title"},".episode-index":{modelAttribute:"index",formatter:function(e){return n.i(s.a)({seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "})}}},a.a.pick(r.a.defaultBindings,[".item-year",".item-progress",".item-duration",".item-unwatched-label",".item-unavailable-btn",".item-available-at",".item-director",".item-writer",".item-cast",".item-content-rating",".media-count-badge",".content-rating-flag-container"]))
};t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(145),s={bindings:a.a.pick(r.a.defaultBindings,[".item-title",".item-year",".item-progress",".item-duration",".item-unwatched-label",".item-unavailable-btn",".item-tagline",".item-genre",".item-director",".item-writer",".item-cast",".item-content-rating",".media-count-badge",".content-rating-flag-container",".studio-flag-container"])};t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(145),s={bindings:a.a.pick(r.a.defaultBindings,[".item-title",".item-year",".item-duration",".item-genre",".item-content-rating",".details-unwatched-count-badge",".content-rating-flag-container",".studio-flag-container"])
};t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(337),l=n(8),c={},u={languages:{en:"en.json","en-GB":"en-GB.json",af:"af.json",my:"my.json",ca:"ca.json",cs:"cs.json",sr:"sr.json",da:"da.json",de:"de.json",et:"et.json",es:"es.json","es-419":"es-419.json",el:"el.json",fr:"fr.json","fr-CA":"fr-CA.json",hr:"hr.json",is:"is.json",it:"it.json",lt:"lt.json",hu:"hu.json",nl:"nl.json",no:"no.json",pl:"pl.json",pt:"pt.json","pt-BR":"pt-BR.json",ru:"ru.json",ro:"ro.json",sk:"sk.json",
sl:"sl.json",fi:"fi.json",sv:"sv.json",vi:"vi.json",tr:"tr.json",uk:"uk.json",bg:"bg.json",zh:"zh.json","zh-TW":"zh-TW.json",ja:"ja.json",ko:"ko.json",th:"th.json",fa:"fa.json",ar:"ar.json",he:"he.json"},loadingPromise:null,loadingLanguage:null,getLanguages:function(){return this.languages},getTranslation:function(e){if(this.translations[this.language])return this.translations[this.language][e]},load:function(e){if(this.loadingLanguage&&this.loadingLanguage===e)return this.loadingPromise;var t,n=this.getLanguages();
return t=a.a.has(n,e)?a.a.has(this.translations,e)?s.a.Deferred().resolve().promise():s.a.ajax({dataType:"json",url:this.basePath+n[e]}):s.a.Deferred().reject().promise(),this.loadingLanguage=e,this.loadingPromise=t,t.done(a.a.bind(this.onLoadSuccess,this,t)),t.fail(a.a.bind(this.onLoadError,this,t)),t},t:function(e){if(!e)return"";var t,i,r=1,s=arguments.length;a.a.isObject(arguments[s-1])&&(i=arguments[s-1],s-=1);var l=this.getTranslation(e)||e;if(i&&i.escape&&(l=a.a.escape(l)),a.a.isObject(arguments[1])){
var u=arguments[1];return l=l.replace(/\{([a-z0-9]+?)\}/gi,function(e,t){return u.hasOwnProperty(t)?u[t]:e})}for(;r<s;)t=c[r],t||(t=new RegExp(n.i(o.a)("{"+r+"}"),"g"),c[r]=t),l=l.replace(t,arguments[r]),r++;return l},onLoadSuccess:function(e,t){var n=this.loadingLanguage;e===this.loadingPromise&&(this.loadingPromise=null,this.loadingLanguage=null,this.language=n,t&&(this.translations[n]=t),l.a.trigger("change:language",n))},onLoadError:function(e){e===this.loadingPromise&&(this.loadingPromise=null,
this.loadingLanguage=null)}};t.a=u},function(e,t,n){"use strict";var i={exclusiveBoolAttr:function(e){var t=this;this.listenTo(this,"change:"+e,function(n,i){i&&t.each(function(t){t.set(e,t===n&&i)})})}};t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(47),s=n(127),o={ui:{background:".post-play-background",previousPoster:".item-previous .media-poster",nextPoster:".item-next .media-poster",nextTitle:".next-title",nextSubtitle:".next-subtitle",nextIndex:".next-index",countdown:".countdown"
},createCountdown:function(e){this.totalSeconds=e,this.secondsLeft=this.totalSeconds,this.progressModel=new r.a.Model({text:this.secondsLeft}),this.updateCountdown()},serializeData:function(){var e=this.nextMetadataItem.get("title"),t=this.nextMetadataItem.get("grandparentTitle"),n={previous:{title:this.previousMetadataItem.get("title")||this.previousMetadataItem.get("grandparentTitle"),subtitle:this.episodeIndexFor(this.previousMetadataItem)||this.previousMetadataItem.get("year")},next:{title:t||e,
summary:this.nextMetadataItem.get("summary")}};return t?(n.next.subtitle=e,n.next.index=this.episodeIndexFor(this.nextMetadataItem)):n.next.subtitle=this.nextMetadataItem.get("year"),n},episodeIndexFor:function(e){var t="";return"episode"===e.get("type")&&(t=n.i(s.a)({seasonIndex:e.get("parentIndex"),episodeIndex:e.get("index"),date:e.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "})),t},updateCountdown:function(){var e=(new Date).getTime(),t=e-(this.startTime||e);this.startTime=e,
this.secondsLeft-=t/1e3,this.secondsLeft>0?(this.progressModel.set("progress",100*(this.secondsLeft/this.totalSeconds)),this.progressModel.set("text",Math.ceil(this.secondsLeft)),this.countdownAnimator=window.requestAnimationFrame(a.a.bind(this.updateCountdown,this))):this.trigger("next")},onClose:function(){window.cancelAnimationFrame(this.countdownAnimator)}};t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r={bindToModel:function(){this.bindings&&a.a.each(a.a.keys(this.bindings),function(e){
var t,n=this.bindings[e];if(t=n.model?this[n.model]:this[this.bindingsModel]||this.model){var i=n.modelListeners||[n.modelAttribute];a.a.each(i,function(i){var r={obj:t,name:"change:"+i,callback:a.a.bind(this.renderBinding,this,e,n,t)};this._bindingListeners||(this._bindingListeners=[]),this._bindingListeners.push(r),this.listenTo(r.obj,r.name,r.callback)},this),this.renderBinding(e,n,t)}},this)},unbindFromModel:function(){this.bindings&&(a.a.each(this._bindingListeners,function(e){this.stopListening(e.obj,e.name,e.callback);
},this),this._bindingListeners=null)},renderBinding:function(e,t,n){var i=this.$(e),r=t.formatter,s=!!t.isHtml,o=t.autohide,l=t.hiddenClass||"hidden",c=n.get(t.modelAttribute);if(r&&(c=r.call(this,c,i)),o){var u=a.a.isFunction(o)?o.call(this,c):c;i.toggleClass(l,!u)}t.manual||(!s&&a.a.isString(c)&&(c=a.a.escape(c)),i.html(c))}};t.a=r},function(e,t,n){"use strict";var i=n(317),a=n(1103),r=i.a.extend({defaults:a.a});t.a=r},function(e,t,n){"use strict";var i=n(8),a=n(33),r=n(16),s=n(18),o=n(1158),l=n(83),c=n(1149),u=n(646),d=n(172),h=s.a.extend({
name:"AppModel",isStateTreeRoot:!0,sessionAttrs:{clientID:r.a.string,authorized:r.a.boolean.isRequired,skipSignIn:r.a.boolean.isRequired,isWaitingForServers:r.a.boolean.isRequired,isWaitingForPrimaryServer:r.a.boolean.isRequired,history:r.a.array.isRequired,forwardHistory:r.a.array.isRequired},sessionRelations:{servers:{relationClass:o.a},cloudServer:{relationClass:l.a,deferred:!0},primaryServer:{relationClass:l.a,deferred:!0},transientServer:{relationClass:u.a,deferred:!0},user:{relationClass:d.a,
deferred:!0}},defaults:function(){var e=new c.a({machineIdentifier:"myPlex"},{parent:this});return{authorized:!1,skipSignIn:!1,isWaitingForServers:!1,isWaitingForPrimaryServer:!1,history:[],forwardHistory:[],cloudServer:e,user:new d.a({},{server:e,parent:this})}},constructor:function(){this._pendingEntities=[],this.listenTo(i.a,"change:entity",this.onEntityChange),s.a.prototype.constructor.apply(this,arguments)},initialize:function(){this._pendingEntities.forEach(this._addEntity.bind(this))},_addEntity:function(e){
var t=e.type,i=e.id,r=e.model,s=this.get("entities");n.i(a.a)(s,"Use `createEntitiesModelClass` to create an `entities` session relation in a platform's app model"),s.get(t).add({id:i,model:r},{merge:!0})},onEntityChange:function(e){this.has("entities")?this._addEntity(e):this._pendingEntities.push(e)}});t.a=h},function(e,t,n){"use strict";var i=n(22),a=n(1100),r=i.a.extend({name:"EntityCollection",model:a.a,toState:function(){var e=this.reduce(this.reduceState,{possibleEntityContainers:[]});return Object.defineProperty(e,"possibleEntityContainers",{
enumerable:!1}),e},reduceState:function(e,t){return e.possibleEntityContainers.push(t.id),e[t.id]=t.getState(),e}});t.a=r},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(16),s=n(18),o=s.a.extend({name:"EntityModel",sessionAttrs:{id:r.a.string.isRequired},sessionRelations:{model:{relationClass:s.a,deferred:!0}},toState:function(){var e=this.get("model"),t=a()({entityID:this.id},e.state);return Object.defineProperty(t,"possibleEntityContainers",{value:e.state.possibleEntityContainers,enumerable:!1
}),t},shouldUpdateRelationState:function(){return!0}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(47),s=n(34),o=n(52),l=s.a.extend({mixins:[o.a],defaultFilterName:"__default",whitelistedEvents:["add","remove","reset","sort","destroy","sync","request","error"],blacklistedMethods:["_onModelEvent","_prepareModel","_removeReference","_reset","add","initialize","sync","remove","reset","set","push","pop","unshift","shift","sort","parse","fetch","create","model","off","on","listenTo","listenToOnce","bind","trigger","once","stopListening"],
constructor:function(e,t){this.superset=e,this._collection=new r.a.Collection(e.toArray()),this._proxyCollection(this._collection),this.resetFilters(),this.listenTo(e,{add:this.onSupersetAdd,remove:this.onSupersetRemove,reset:this.onSupersetReset}),this.initialize(t)},_proxyCollection:function(e){this.models=e.models,this._proxyCollectionMethods(e),this._proxyCollectionLength(e),this._proxyCollectionEvents(e)},_proxyCollectionMethods:function(e){var t={};a.a.each(a.a.functions(r.a.Collection.prototype),function(n){
a.a.contains(this.blacklistedMethods,n)||(t[n]=function(){return e[n].apply(e,arguments)})},this),a.a.extend(this,t)},_proxyCollectionLength:function(e){var t=function(){this.length=e.length};this.listenTo(e,"all",t),t.call(this)},_proxyCollectionEvents:function(e){var t=function(t){var n=a.a.toArray(arguments),i="change"===t||"change:"===t.slice(0,7);"reset"===t&&(this.models=e.models),a.a.contains(this.whitelistedEvents,t)?(a.a.contains(["add","remove","destroy"],t)?n[2]=this:a.a.contains(["reset","sort"],t)&&(n[1]=this),
this.trigger.apply(this,n)):i&&this.contains(n[1])&&this.trigger.apply(this,n)};this.listenTo(e,"all",t)},addFilter:function(e,t){return t||(t=e,e=this.defaultFilterName),a.a.has(this._filters,e)&&this._invalidateCacheForFilter(e),this._filters[e]=this._createFilter(t),this._execFilters(),this.trigger("filtered:add",e),this},removeFilter:function(e){return e||(e=this.defaultFilterName),delete this._filters[e],this._invalidateCacheForFilter(e),this._execFilters(),this.trigger("filtered:remove",e),
this},resetFilters:function(){return this._filters={},this._invalidateCache(),this._execFilters(),this.trigger("filtered:reset"),this},getFilters:function(){return a.a.keys(this._filters)},hasFilter:function(e){return a.a.contains(this.getFilters(),e)},refilter:function(e){return a.a.isObject(e)&&e.cid?this.onSupersetAdd(e):(this._invalidateCache(),this._execFilters()),this},destroy:function(){return this.stopListening(),this.superset=null,this._collection.reset([]),this.length=0,this.trigger("filtered:destroy"),
this},_createFilter:function(e,t){if(a.a.isFunction(e))return e;throw new Error("Unsupported filter type")},_execFilters:function(e){e||(e={});var t=[];this.superset&&(t=this.superset.filter(a.a.bind(this._execFiltersOnModel,this))),e.reset?this._collection.reset(t):this._collection.set(t),this.length=this._collection.length},_execFiltersOnModel:function(e){this._filterResultCache[e.cid]||(this._filterResultCache[e.cid]={});var t=this._filterResultCache[e.cid];for(var n in this._filters)if(a.a.has(this._filters,n)&&(a.a.has(t,n)||(t[n]=this._filters[n](e)),
!t[n]))return!1;return!0},_invalidateCache:function(){this._filterResultCache={}},_invalidateCacheForFilter:function(e){for(var t in this._filterResultCache)a.a.has(this._filterResultCache,t)&&delete this._filterResultCache[t][e]},onSupersetAdd:function(e){if(this._filterResultCache[e.cid]={},this._execFiltersOnModel(e)){if(!this._collection.get(e.cid)){for(var t=this.superset.indexOf(e),n=0,i=t-1;i>=0;i-=1)if(this.contains(this.superset.at(i))){n=this.indexOf(this.superset.at(i))+1;break}this._collection.add(e,{
at:n})}}else this._collection.get(e.cid)&&this._collection.remove(e);this.length=this._collection.length},onSupersetRemove:function(e){this.contains(e)&&this._collection.remove(e),this.length=this._collection.length},onSupersetReset:function(){this._execFilters({reset:!0})}});t.a=l},function(e,t,n){"use strict";var i=n(75),a=i.a.extend({pageSize:10,pages:function(){return Math.max(Math.ceil(this.length/this.pageSize),1)},page:function(e,t){t||(t={});var n,i=0;return n=t.reverse?this.length-e*this.pageSize:e*this.pageSize-this.pageSize,
n<0&&(i=n,n=0),this.models.slice(n,n+this.pageSize+i)}});t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(1231),s=n(259),o=n(678),l=n(16);n.d(t,"a",function(){return u});var c={allowHttpFallback:{type:l.a.string,defaultValue:s.a.NEVER},companion:{type:l.a.boolean,defaultValue:!0},language:{type:l.a.string,defaultValue:n.i(r.a)()},autoLogin:{type:l.a.boolean,defaultValue:!1},extrasPrefixCount:{type:l.a.integer,defaultValue:0},debugLevel:{type:l.a.integer,defaultValue:o.a.DISABLED}},u=(a.a.mapObject(c,function(e){
return e.type}),a.a.mapObject(c,function(e){return e.defaultValue}))},function(e,t,n){"use strict";var i=n(8),a=n(22),r=n(628),s=a.a.extend({name:"ChannelCollection",context:["server","channel"],model:r.a,url:function(){return this.containerKey},initialize:function(){this.listenTo(i.a,"clear:channels",this.reset)},sortByTitle:function(e){return e.get("title").toLowerCase()},sortByLastAccess:function(e){return-e.get("lastAccessedAt")},filterByType:function(e){var t=this.filter(function(t){return t.get("type")===e;
});return this.clone(t)}});t.a=s},function(e,t,n){"use strict";var i=n(93),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(47),u=n(14),d=n(8),h=n(1107),p=n(1106),f=/(auth_token=|accessToken=|X-Plex-Token=)(\"?\w+\"?)/g,g=/(email=)(\"?[^&]+\"?)/g,m=/(password=)([^&]+)/,v=/(address=|host=|uri=)(\"?[^&]+\"?)/g,y=function(e){return e=e.replace(f,"$1TOKEN"),e.replace(m,"$1PASSWORD")},b=function(e){return e&&e.hasOwnProperty("X-Plex-Token")&&(e["X-Plex-Token"]="TOKEN"),e&&e.hasOwnProperty("Authorization")&&(e.Authorization="BASIC AUTHORIZATION"),
e},S=function(e){if(e)return e=e.replace(f,'$1"TOKEN"'),e=e.replace(g,'$1"EMAIL"'),e=e.replace(v,'$1"IP ADRRESS"')},w=c.a.Collection.extend({model:p.a,initialize:function(e,t){s.a.bindAll(this,"onAjaxComplete","onAppModelRegistered"),this.parent=t.parent,h.a.parent=t.parent,n.i(u.e)("appModel").done(this.onAppModelRegistered)},reconfigure:function(){var e=n.i(u.a)("appModel"),t=e.get("settings");t.get("debugLevel")?this.start():this.stop()},start:function(){this.enabled||(this.enabled=!0,this.reset(),
this.listenTo(d.a,"log:message",this.onLogMessage),c.a.history.on("route",this.onRoute,this),l()(document).on("ajaxComplete",this.onAjaxComplete))},stop:function(){this.enabled&&(this.enabled=!1,this.reset(),this.stopListening(d.a),c.a.history.off("route",this.onRoute,this),l()(document).off("ajaxComplete",this.onAjaxComplete))},destroy:function(){this.stop(),this.stopListening()},add:function(){this.length>200&&this.shift(),c.a.Collection.prototype.add.apply(this,arguments)},toJSON:function(){var e=c.a.Collection.prototype.toJSON.apply(this,arguments);
return e.unshift(s.a.extend({type:"info"},h.a.toJSON())),e},toJSONString:function(){return a()(this.toJSON(),null,2)},onAppModelRegistered:function(e){var t=e.get("settings");this.listenTo(t,"change:debugLevel",this.reconfigure),this.reconfigure()},onLogMessage:function(e){this.add(e)},onRoute:function(e,t,n){var i={type:"navigation",route:t,args:n,fragment:window.location.hash};this.add(i)},onAjaxComplete:function(e,t,i){var a=n.i(u.a)("appModel").get("settings"),r={type:"ajax",url:y(i.url),status:t.status
};s.a.isEmpty(i.headers)||(r.headers=b(i.headers)),s.a.isEmpty(i.data)||(r.params=i.data),200===t.status?2===a.get("debugLevel")?r.response=S(t.responseText):r.responseLength=t.responseText?t.responseText.length:0:(r.statusText=t.statusText,r.response=S(t.responseText)),this.add(r)}});t.a=w},function(e,t,n){"use strict";var i=n(47),a=i.a.Model.extend({initialize:function(e,t){this.set("time",new Date)}});t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(47),s=n(32),o=r.a.Model.extend({initialize:function(e,t){
this.set("host",window.location.host),this.set("userAgent",window.navigator.userAgent),this.set("browser",s.a)},toJSON:function(){var e=this.parent.get("primaryServer"),t=this.parent.get("user"),n=t.get("features");return this.set("version","2.13.0"),e&&(e.get("activeConnection")&&this.set("primaryServerUrl",e.url()),this.set("primaryServerAuthToken",!!e.get("accessToken")),this.set("primaryServerVersion",e.get("versionFull"))),this.set("username",t.get("username")),this.set("cloudUrl",t.server.get("connections")),
this.set("cloudAccessToken",!!t.server.get("accessToken")),n&&this.set("userFeatures",a.a.keys(n).join(", ")),r.a.Model.prototype.toJSON.apply(this,arguments)}});t.a=new o},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(16),s=n(18),o=n(250),l=s.a.extend({name:"LocalPlayQueueModel2",context:["server"],sessionAttrs:{type:r.a.string,firstIndex:r.a.integer,lastIndex:r.a.integer,playQueueSelectedItemOffset:r.a.integer,playQueueTotalCount:r.a.integer},sessionRelations:{items:{relationClass:o.a,deferred:!0
}},initialize:function(e,t){this.originalPlayQueue=t.originalPlayQueue;var n=this.originalPlayQueue.get("collection"),i=n.indexOf(this.originalPlayQueue.get("selectedItem"));this.set({items:n,firstIndex:0,lastIndex:n.length,playQueueSelectedItemOffset:i,playQueueTotalCount:n.length})},fetch:function(){return a.a.Deferred().resolve(this).promise()}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(631),s=r.a.extend({initialize:function(e){this.playQueue=e.playQueue,this.addFilter(a.a.bind(this.filterAfterUpNext,this)),
this.listenForUpNextChanges()},filterAfterUpNext:function(e){var t=this.superset.indexOf(e),n=this.playQueue.getUpNextRange();return t>n.end}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(38),s=n(16),o=n(18),l=n(57),c=n(250),u=o.a.extend({name:"PlayQueueModel2",context:["server"],urlRoot:"/playQueues",hasResponseOnSave:!0,idAttribute:"playQueueID",sessionAttrs:{type:s.a.string},syncedAttrs:{playQueueID:s.a.string,uri:s.a.string,shuffle:s.a.boolean,includeRelated:s.a.boolean,playQueueSelectedItemOffset:s.a.integer,
playQueueSelectedItemID:s.a.integer,playQueueSelectedMetadataItemID:s.a.string,playQueueShuffled:s.a.boolean,playQueueSourceURI:s.a.string,playQueueTotalCount:s.a.integer},derivedAttrs:{firstIndex:function(){var e=this.get("items"),t=this.get("playQueueSelectedItemID"),n=a.a.findIndex(e.models,function(e){return e.get("playQueueItemID")===t});return this.get("playQueueSelectedItemOffset")-n},lastIndex:function(){return this.get("firstIndex")+this.get("items").length-1}},syncedRelations:{items:{relationClass:c.a,
rootPropertyName:"Metadata"}},augmentResponseText:function(e,t){return t===l.a.xml?r.a.replaceMetadataXMLElementNames(e):e}});t.a=u},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(20),l=n(176),c=n(181),u=n(55),d=n(253),h=n(44),p=u.a.extend({idAttribute:"ratingKey",whitelistedAttrs:["guid","addedAt","composite","duration","key","leafCount","playlistType","ratingKey","smart","summary","title","type","allowSync"],defaults:function(){return{children:new d.a([],{server:this.server,
parent:this,url:function(){var e,t="/playlists/"+this.parent.id+"/items";return"audio"===this.parent.get("playlistType")&&(e={includeRelated:1}),o.join(t,e)}})}},urlRoot:"/playlists",saveUrl:function(){return"/library/metadata/"+this.id},cacheKey:function(e){if(e.key)return this.server&&this.server.getScopedKey(e.key)},initialize:function(){this.listenToOnce(this.get("children"),"add",function(e){this.set("art",e.get("art"))})},sync:function(e,t,n){var i=c.a.addVersionHeader(2,n);return u.a.prototype.sync.call(this,e,t,i);
},parse:function(e){var t=this.convert(e);return t.Playlist&&(t=t.Playlist),h.a.parseInteger(t,["duration","leafCount","addedAt"]),h.a.parseBoolean(t,["smart","allowSync"]),t.isPlaylist=!0,t},findItem:function(e){return this.get("children").findWhere({playlistItemID:e})},moveItem:function(e,t){var n=t?{after:t}:{},i=o.join([a.a.result(this,"url"),"/items/",e,"/move"],n),r=a.a.extend(this.server.getXHROptions(i),{type:"PUT"}),l=s.a.ajax(r),c=this.get("children"),u=this.findItem(e);c.remove(u);var d=this.findItem(t),h=d?c.indexOf(d)+1:0;
return c.add(u,{at:h}),l},removeItem:function(e){e=e.toString();var t=o.join([a.a.result(this,"url"),"/items/",e]),n=a.a.extend(this.server.getXHROptions(t),{type:"DELETE"}),i=s.a.ajax(n);i.then(a.a.bind(function(e){this.set(this.parse(e))},this));var r=this.get("children"),l=this.findItem(e);return r.remove(l),i},addContent:function(e,t){var n=this.isNew()?"POST":"PUT",i=[a.a.result(this,"url")],r={};this.isNew()?(r.type=this.get("playlistType"),r.title=this.get("title"),r.smart=this.get("smart")?1:0):i.push("/items"),
e.get("playQueueID")?r.playQueueID=e.get("playQueueID"):r.uri=l.a.uri(e,t);var c=o.join(i,r),u=a.a.extend(e.server.getXHROptions(c),{type:n}),d=s.a.ajax(u);return d.then(a.a.bind(function(e){this.set(this.parse(e))},this)),d.promise()},isLibraryItem:function(){return!0},isPlexMusicItem:function(){return!1}});t.a=p},function(e,t,n){"use strict";var i=n(55),a=n(425),r=n(638),s=i.a.extend({name:"PlaylistsSectionModel",defaults:function(){return{pseudo:!0,currentType:0,sorts:new a.a([],{section:this,
server:this.server}),items:new r.a({},{section:this,server:this.server})}},url:function(){return"/playlists"}});t.a=s},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"FilterOptionModel",context:["server","section","type","standalone"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:i.a.string,type:i.a.string,title:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(22),s=n(1115),o=r.a.extend({name:"LinearFilterCollection",context:["server","section"],
model:s.a,url:function(){return a.a.result(this.section,"url")},filterBySecondary:function(){var e=this.filter(function(e){return e.get("secondary")});return this.clone(e)}});t.a=o},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(319),s=a.a.extend({name:"LinearFilterModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{secondary:i.a.boolean,key:i.a.string,title:i.a.string},syncedRelations:{options:{relationClass:r.a}},defaults:{secondary:!1}});t.a=s},function(e,t,n){
"use strict";var i=n(22),a=n(1117),r=i.a.extend({name:"LocationCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"LocationModel",context:["server","section"],rootPropertyName:"Location",syncedAttrs:{id:i.a.integer,path:{type:i.a.string,save:!0}}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(634),r=i.a.extend({name:"MediaTypeCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(632),s=n(425),o=a.a.extend({
name:"MetadataTypeModel",context:["server"],idAttribute:"type",rootPropertyName:"Type",syncedAttrs:{type:i.a.integer,key:i.a.string,title:i.a.string},syncedRelations:{filters:{relationClass:r.a,rootPropertyName:"Filter"},sorts:{relationClass:s.a,rootPropertyName:"Sort"}}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(22),s=n(424),o=r.a.extend({name:"SectionSubsetCollection",context:["server","section"],model:s.a,url:function(){return a.a.result(this.section,"url")},filterPrimaries:function(){
var e=this.filter(function(e){return e.get("primary")});return this.clone(e)}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(112),l=n(741),c=n(36),u=n(424),d=n(55),h=d.a.extend({initialize:function(e,t){this.storage=t.storage,this.section=t.section,this.type=t.type,this.filters=t.filters,this.sortKey=t.sortKey,this.sortDirection=t.sortDirection,this.subset=t.subset,this.debouncedStorageSave=a.a.debounce(a.a.bind(this.storage.save,this.storage),300)},_fetch:function(e){
e=e||{};var t=n.i(o.a)(this.storage.fetch());return t=t.done(a.a.bind(function(){this.type&&this.storage.set("typeID",this.type),this.sortKey&&this.sortDirection&&this.storage.set({sortKey:this.sortKey,sortDirection:this.sortDirection}),this.subset&&this.storage.set("subset",this.subset),this.filters&&this.filters.length&&this.storage.set("filters",this.filters)},this)),t=t.then(a.a.bind(function(){return this.fetchSort().then(a.a.bind(function(e){e&&e.set("direction",this.storage.get("sortDirection")||e.get("defaultDirection"));
},this))},this)),t=t.done(a.a.bind(this.storage.save,this.storage)),t.then(a.a.constant(this))},fetchSort:function(){if(!this.section.server.get("isFullServer"))return s.a.Deferred().reject().promise();var e=this.section.get("sorts");e.typeID=this.storage.get("typeID");var t=e.fetch();return e.typeID=null,t=t.then(a.a.bind(function(){var t,n=this.storage.get("sortKey");return n&&(t=e.findWhere({key:n})),this.sort=t||e.findWhere({isDefault:!0}),this.sort},this))},getType:function(){var e=this.storage.get("typeID")||c.a.get(this.section.get("type")).id,t=this.section.get("types");
return t.get(e)},getSubsetModel:function(){var e,t=this.storage.get("subset");t&&(e=l.a.get(t)),e||(this.storage.set("subset","all"),e=l.a.get("all"));var n=new u.a(e,{server:this.section.server,section:this.section});return n},getSort:function(){return this.sort&&this.sort.set("selected",!0),this.sort},getFilters:function(){return this.storage.get("filters")||[]},refreshAttributes:function(){var e=this.section.get("currentType");e&&this.storage.set("typeID",e.get("id"));var t=this.section.get("currentSubset");
t&&this.storage.set("subset",t.get("key"));var n=this.section.get("currentSort");n&&(this.storage.set("sortKey",n.get("key")),this.storage.set("sortDirection",n.get("direction")||n.get("defaultDirection")));var i=this.section.get("currentFilters");this.storage.set("filters",i)},getSectionAttrs:function(){return{currentType:this.getType(),currentSubset:this.getSubsetModel(),currentSort:this.getSort(),currentFilters:this.getFilters()}},addListeners:function(){this.listenTo(this.section,{"change:currentType":this.onValueChange,
"change:currentSort":this.onValueChange,"change:currentSubset":this.onValueChange,"change:currentFilters":this.onValueChange}),this.listenTo(this.section.get("sorts"),"change:direction",this.onValueChange)},removeListeners:function(){this.stopListening(this.section),this.stopListening(this.section.get("sorts"))},onValueChange:function(){this.refreshAttributes(),this.debouncedStorageSave()}});t.a=h},function(e,t,n){"use strict";var i=n(740),a=n(317),r=n(626),s=7776e6,o=a.a.extend({storageKey:"sectionViewState",
serialize:function(e){return a.a.prototype.serialize.call(this,i.a.augmentDictionary(e,{ttl:s}))}}),l=r.a.extend({initialize:function(e,t){r.a.prototype.initialize.apply(this,arguments),this.section=t.section,this.storage=new o},storageKey:function(){return this.section.getScopedKey("attrs")},toJSON:function(){var e=r.a.prototype.toJSON.apply(this,arguments);return i.a.augmentObj(e,s,!0)}});t.a=l},function(e,t,n){"use strict";var i=n(22),a=n(1124),r=i.a.extend({name:"ChapterCollection",context:["server","section"],
model:a.a,modelId:function(e){return e.id+"_"+e.index}});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"ChapterModel",context:["server","section"],syncedAttrs:{id:i.a.integer,tag:i.a.string,index:i.a.integer,startTimeOffset:i.a.integer,endTimeOffset:i.a.integer,thumb:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(1126),r=i.a.extend({name:"ConcertCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({
name:"ConcertModel",context:["server","section"],syncedAttrs:{id:i.a.integer,at:i.a.integer,tag:i.a.string,venue:i.a.string,city:i.a.string,country:i.a.string,url:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"OverlayModel",context:["server","section"],syncedAttrs:{key:i.a.string,marginTop:i.a.integer,marginRight:i.a.integer,marginBottom:i.a.integer,marginLeft:i.a.integer,width:i.a.integer,height:i.a.integer,alignHorizontal:i.a.string,alignVertical:i.a.string,
relative:i.a.string,imageScaling:i.a.string,marginScaling:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(427),r=i.a.extend({name:"PlaylistCollection",context:["server","containerKey"],model:a.a,url:function(){return this.containerKey}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(1131),r=i.a.extend({name:"PlaylistItemCollection",context:["server","playlist"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(38),a=n(210),r=n(16),s=n(57),o=n(18),l=n(1129),c=o.a.extend({
mixins:[a.a],name:"PlaylistItemListModel",context:["server","playlist"],idAttribute:"key",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(this.get("containerKey"))},sessionAttrs:{containerKey:r.a.string,currentPageStart:r.a.integer,currentPageSize:r.a.integer,populatedRange:r.a.object},syncedAttrs:{totalSize:r.a.integer},syncedRelations:{metadataItems:{relationClass:l.a,rootPropertyName:"Metadata",setOptions:function(e){return{remove:e.remove,at:e.at}}}},defaults:function(){
return{populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},augmentResponseText:function(e,t){return t===s.a.xml?i.a.replaceMetadataXMLElementNames(e):e}});t.a=c},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(49),s=a.a.extend({name:"PlaylistItemModel",context:["server","playlist"],idAttribute:"playlistItemID",syncedAttrs:{playlistItemID:i.a.integer,key:i.a.string,type:i.a.string},syncedRelations:{metadataItem:{relationClass:r.a,deferred:!0}},augmentResponse:function(e){
return{playlistItemID:e.playlistItemID,key:e.key,type:e.type,metadataItem:e}}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(20),s=n(36),o=n(82),l={unviewedLeafCount:">="},c=o.default.extend({name:"SectionMetadataListModel",context:["server","section","identifier","mediaTagPrefix","mediaTagVersion","allowSync"],url:function e(){var t=[],n=void 0,i=void 0,s=this.section.get("currentFolderKey");if(s)t.push(s);else if(t.push(a.a.result(this.section,"url")),n=this.section.get("currentSubset").id,
this.section.get("allowAdvancedFilters"))"recentlyAdded"!==n&&"newest"!==n||(n="all"),t.push(n),i=this.getParams();else{var o=this.section.get("currentFilters");o.length?t=[o[0].values[0]]:t.push(n)}var e=r.join(t,i);return e=this.replaceSpecialFilterOperators(e),this.set("containerKey",e),this.server.get("isFullServer")?this.getPaginatedUrl(e):e},getParams:function(){var e=this.getFilterParams(),t=this.getMediaTypeID(),n=this.getSort();return t&&t!==s.a.get("photo").id&&(e.type=t),n&&(e.sort=n),
this.section.get("refreshing")&&this.server.supports("timelineState")&&(e.timelineState=1),e},getFilterParams:function(){var e=this.section.get("currentFilters"),t={};return a.a.each(e,function(e){e.values.length&&(t[e.key]=e.values.map(decodeURIComponent).join(","))}),t},getMediaTypeID:function(){var e=this.section.get("currentSubset").id,t=this.section.get("currentType").id||s.a.get(this.section.get("type")).id;return/^(onDeck|recentlyAdded|recentlyViewed|newest)$/.test(e)?t===s.a.get("show").id||t===s.a.get("season").id?t=s.a.get("episode").id:t!==s.a.get("artist").id&&t!==s.a.get("track").id||(t=s.a.get("album").id):/^recentlyViewedShows$/.test(e)&&(t=s.a.get("show").id),
t},getSort:function(){var e=this.section.get("currentSort"),t=this.section.get("currentSubset").id;return"recentlyAdded"===t?"addedAt:desc":"newest"===t?"originallyAvailableAt:desc":e?e.id+":"+e.get("direction"):void 0},replaceSpecialFilterOperators:function(e){return a.a.each(l,function(t,n){e=e.replace(n+"=",n+t)}),e}});t.a=c},function(e,t,n){"use strict";var i=n(22),a=n(639),r=i.a.extend({name:"TagCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";function i(e){
var t=0;if(!e)return t;for(var n=0,i=e.length;n<i;n++){var a=e[n],r=a.Part;if(r)for(var s=0,o=r.length;s<o;s++){var l=r[s],c=l.Stream;c&&(t+=c.length)}}return t}function a(e){var t=0;if(!e)return t;for(var n=0,i=e.length;n<i;n++){var a=e[n],r=a.Part;if(r)for(var s=0,o=r.length;s<o;s++){var l=r[s];null!=l.exists&&null!=l.accessible&&t++}}return t}function r(e,t,r){if(c.hasOwnProperty(e))return r;if(u.hasOwnProperty(e)&&r&&r.length){if(!t||r.length>t.length)return r;if(r.length===t.length){var s=t&&t[0],d=r&&r[0];
if(!s&&d)return r;if(!d&&s)return t;var h=o()(s).length,p=o()(d).length;if(p>h)return r}}if("Media"===e){if(r&&!t)return r;var f=i(r),g=i(t);if(f>g)return r;if(f===g){var m=a(r),v=a(t);if(m>=v)return r}}return n.i(l.a)(e,t,r)}var s=n(66),o=n.n(s),l=n(643);t.a=r;var c={subscriptionID:!0,grandparentSubscriptionID:!0,subscriptionType:!0,grandparentSubscriptionType:!0},u={Director:!0,Producer:!0,Writer:!0,Genre:!0,Mood:!0,Country:!0,Label:!0,Role:!0,Location:!0}},function(e,t,n){"use strict";var i=n(22),a=n(1136),r=i.a.extend({
name:"LyricsLineCollection",context:["server","section"],model:a.a,eachSpan:function(e){this.each(function(t){t.get("spans").each(e)})}});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(1137),s=a.a.extend({name:"LyricsLineModel",context:["server","section"],syncedAttrs:{startOffset:i.a.integer,endOffset:i.a.integer},syncedRelations:{spans:{relationClass:r.a,rootPropertyName:"Span"}},defaults:{startOffset:-1,endOffset:-1}});t.a=s},function(e,t,n){"use strict";var i=n(22),a=n(1138),r=i.a.extend({
name:"LyricsSpanCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=-1,s=-1,o=a.a.extend({name:"LyricsSpanModel",context:["server","section"],sessionAttrs:{active:i.a.boolean},syncedAttrs:{startOffset:i.a.integer,endOffset:i.a.integer,text:i.a.string},defaults:{startOffset:r,endOffset:s},isPositionWithin:function(e){var t=this.get("startOffset"),n=this.get("endOffset");if(t===r)return!1;var i=e>=t,a=e<=n||n===s;return i&&a}});t.a=o},function(e,t,n){
"use strict";var i=n(22),a=n(1094),r=n(1140),s=i.a.extend({mixins:[a.a],name:"LyricsStreamCollection",context:["server","section"],model:r.a,initialize:function(){this.exclusiveBoolAttr("selected")}});t.a=s},function(e,t,n){"use strict";var i=n(20),a=n(16),r=n(18),s=n(1135),o=r.a.extend({name:"LyricsStreamModel",context:["server","section"],rootPropertyName:"Lyrics",url:function(){return i.join(this.get("key"),{format:"xml"})},sessionAttrs:{follow:a.a.boolean},syncedAttrs:{id:a.a.integer,key:a.a.string,
streamType:a.a.integer,index:a.a.integer,title:a.a.string,selected:a.a.boolean,codec:a.a.string,provider:a.a.string,format:a.a.string,minLines:a.a.integer,timed:a.a.boolean},syncedRelations:{lines:{relationClass:s.a,rootPropertyName:"Line"}},defaults:{follow:!0,selected:!1}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(16),s=n(429),o=n(39),l=s.a.extend({name:"PhotoPlayerModel",sessionAttrs:a.a.extend({},s.a.prototype.sessionAttrs,{slideshowState:r.a.oneOf(o.a.slideshowStates.PLAYING,o.a.slideshowStates.PAUSED)
}),defaults:function(){return a.a.extend({},s.a.prototype.defaults.apply(this),{slideshowState:o.a.slideshowStates.PAUSED,slideshowPaused:!0,slideshowPlaying:!1})},derivedAttrs:a.a.extend({},s.a.prototype.derivedAttrs,{slideshowPaused:function(){return this.get("slideshowState")===o.a.slideshowStates.PAUSED},slideshowPlaying:function(){return this.get("slideshowState")===o.a.slideshowStates.PLAYING}})});t.a=l},function(e,t,n){"use strict";var i=n(14),a=n(22),r=n(642),s=a.a.extend({name:"PlexPlayerCollection",
context:["server"],model:r.a,url:"/clients",augmentResponse:function(e){var t=n.i(i.a)("appModel"),a=t.get("clientID"),r=parseInt(e.size,10);return 1===r&&e.Server.machineIdentifier===a?(delete e.Server,e.size="0"):r>1&&(e.Server=e.Server.filter(function(e){return e.machineIdentifier!==a}),e.size=e.Server.length.toString()),e}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(55),o=36e5,l=s.a.extend({defaults:function(){return{canSkipNext:!0,stationSkipsPerHour:1/0,skips:[]}},initialize:function(){
var e=[this.get("stationSkipsPerHour"),0];e=a.a.reject(e,function(e){return e===1/0}),this.maxLength=Math.max.apply(Math,e)},updateTimeout:function(e){this.timeout&&(this.timeout=clearTimeout(this.timeout));var t=this.get("stationSkipsPerHour");if(t!==1/0){var i=e-o,s=a.a.filter(this.get("skips"),function(e){return e>=i}),l=s.length>=t?o-(e-a.a.last(s)):null,c=!l,u=c?"":n.i(r.default)("You can skip {1} songs an hour per mix.",this.get("stationSkipsPerHour"));this.set({canSkipNext:c,canSkipNextMessage:u
}),l>0&&(this.timeout=setTimeout(a.a.bind(function(){this.updateTimeout((new Date).getTime())},this),l))}},registerSkip:function(){var e=(new Date).getTime(),t=this.get("skips");t.unshift(e),t.length>this.maxLength&&(t.length=this.maxLength),this.updateTimeout(e)},stop:function(){this.timeout&&clearTimeout(this.timeout)}},{playQueueAttributes:["stationSkipsPerHour"]});t.a=l},function(e,t,n){"use strict";var i=n(4),a=n(72),r=a.b.extend({name:"LegacyChannelProviderModel",defaults:function(){return{
identifier:a.a.CHANNEL_PROVIDER_IDENTIFIER,title:n.i(i.default)("Channel"),types:["video","audio","photo"],protocols:["stream"]}}});t.a=r},function(e,t,n){"use strict";var i=n(4),a=n(72),r=n(644),s=n(171),o=a.b.extend({name:"LegacyLibraryProviderModel",defaults:function(){var e=this.server,t=e.get("isFullServer"),o=e.get("isFullOwnedServer"),l=[{type:s.a.CONTENT,key:"/library/sections"},{type:s.a.MATCH,key:"/library/matches"},{type:s.a.METADATA,key:"/library/metadata"}];return t&&l.push({type:s.a.SEARCH,
key:"/hubs/search"},{type:s.a.PLAY_QUEUE,key:"/playQueues"},{type:s.a.RATE,key:"/:/rate"},{type:s.a.TIMELINE,key:"/:/timeline",scrobbleKey:"/:/scrobble",unscrobbleKey:"/:/unscrobble"}),o&&l.push({type:s.a.MANAGE}),{identifier:a.a.LIBRARY_PROVIDER_IDENTIFIER,title:n.i(i.default)("Library"),types:["video","audio","photo"],protocols:o?["stream","download"]:["stream"],features:new r.a(l,{parse:!0,server:e})}}});t.a=o},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(22),s=n(72),o=n(1145),l=n(1144),c=r.a.extend({
name:"ProviderCollection",context:["server"],model:s.b,url:"/media/providers",fetch:function(){var e=this.server;return e.get("mediaProviders")?r.a.prototype.fetch.apply(this,arguments):(e.get("isCloud")||this.get(s.a.LIBRARY_PROVIDER_IDENTIFIER)||this.add(new o.a({},{server:e})),this.get(s.a.CHANNEL_PROVIDER_IDENTIFIER)||this.add(new l.a({},{server:e})),a.a.Deferred().resolve(this,""))}});t.a=c},function(e,t,n){"use strict";var i=n(22),a=n(1148),r=i.a.extend({name:"ProviderDirectoryCollection",context:["server","provider"],
model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"ProviderDirectoryModel",context:["server","provider"],syncedAttrs:{key:i.a.string,hubKey:i.a.string,title:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(20),a=n(27),r=n(14),s=n(21),o=n(16),l=n(421),c=n(59),u=n(83),d=n(431),h=n(147),p=n(630),f=n(1152),g=n(1283),m=u.a.connectionTestResults,v=u.a.promiseStates,y=u.a.extend({name:"CloudServerModel",connectionTestUrl:"/pms/:/ip",sessionAttrs:{connectionTestResult:o.a.oneOf(m.PENDING,m.CONNECTED,m.UNAVAILABLE,m.UNAUTHORIZED).isRequired,
promiseState:o.a.oneOf(v.PENDING,v.RESOLVED,v.REJECTED).isRequired,playQueueManager:o.a.instanceOf(p.a).isRequired,isShared:o.a.boolean.isRequired,isBundled:o.a.boolean.isRequired,isCloud:o.a.boolean.isRequired,isMerged:o.a.boolean.isRequired,isDownForMaintenance:o.a.boolean.isRequired,hasFailedResources:o.a.boolean.isRequired,accessToken:o.a.string,baseUrl:o.a.string.isRequired,plexPassUrl:o.a.string.isRequired,accountUrl:o.a.string.isRequired,cloudSyncUrl:o.a.string.isRequired,appsUrl:o.a.string.isRequired,
helpUrl:o.a.string.isRequired},sessionRelations:{activeConnection:{relationClass:h.a,deferred:!0},connections:{relationClass:d.a,options:function(){return{server:this}}},resources:{relationClass:f.a,options:function(){return{server:this}}}},defaults:function(){var e=c.a.get("myPlexScheme")+"://"+c.a.get("myPlexUrl");return{connectionTestResult:m.PENDING,promiseState:v.PENDING,playQueueManager:new p.a({server:this}),isShared:!1,isBundled:!1,isCloud:!0,isMerged:!1,isDownForMaintenance:!1,hasFailedResources:!1,
friendlyName:"plex.tv",baseUrl:e,plexPassUrl:i.join([e,"/subscription/about"]),accountUrl:i.join([e,"/users/edit"]),cloudSyncUrl:i.join([e,"/cloudsync/providers"]),appsUrl:i.join([e,"/downloads"]),helpUrl:"http://support.plex.tv/hc/en-us"}},swizzleNodeUrl:function(e){var t=this.parent.get("primaryServer"),n=t&&t.get("isConnected")&&t.get("isFullServer")&&t.get("allowChannelAccess");return n?t.swizzleUrl(e):this.swizzleUrl(e,{connection:new h.a({scheme:"https",address:"node.plexapp.com",port:"32443"
})})},testAllConnections:function(){var e=this,t=this.get("connections");n.i(a.a)("[Connections] Testing all %s connection(s) for %s",t.length,this.get("debugName"));var i=t.map(function(t){return e.testConnection(t)});return n.i(g.a)(i)},testConnection:function(e){var t={server:this,connection:e,url:this.connectionTestUrl},n=s.a.execute("testServerConnection",t).done(this.onConnectionTestSuccess.bind(this)).fail(this.onConnectionTestError.bind(this));return n},abortConnectionTest:function(e){var t={
server:this,connection:e,url:this.connectionTestUrl};s.a.execute("abortServerConnectionTest",t)},deauthenticate:function(){this.get("resources").clear(),this._reject({connectionTestResult:this.get("connectionTestResult"),accessToken:null})},onConnectionTestSuccess:function(e){var t=this.get("connections").getBestConnection();a.a.info("[Connections] Active connection to %s is %s",this.get("debugName"),t.id),this.startCapturingChangeEvents(),this.set({isDownForMaintenance:!1,connectionTestResult:m.CONNECTED,
activeConnection:t}),this.releaseCapturedChangeEvents()},onConnectionTestError:function(e,t){e.get("isAborted")||this.get("connections").hasOnlyFailedConnections()&&this._reject({isDownForMaintenance:503===t.status})}});n.i(l.a)(y,function(){return{relationClass:n.i(r.a)("CloudServerFlexModel"),options:{server:this}}}),t.a=y},function(e,t,n){"use strict";var i=n(22),a=n(1151),r=i.a.extend({name:"ConnectionSourceCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({
name:"ConnectionSourceModel",context:["server"],sessionAttrs:{id:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(20),a=n(59),r=n(22),s=n(1153),o=r.a.extend({model:s.a,context:["server"],url:function(){var e={};return a.a.get("allowHttpsMediaServerConnections")&&(e.includeHttps=1),a.a.get("allowMediaServerRelayConnections")&&(e.includeRelay=1),i.join("/api/resources",e)}});t.a=o},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(431),s=a.a.extend({name:"ResourceModel",context:["server"],
idAttribute:"clientIdentifier",rootPropertyName:"Device",urlRoot:"/api/resources",syncedAttrs:{clientIdentifier:i.a.string,name:i.a.string,sourceTitle:i.a.string,accessToken:i.a.string,product:i.a.string,productVersion:i.a.string,platform:i.a.string,platformVersion:i.a.string,device:i.a.string,provides:i.a.list,owned:i.a.boolean,home:i.a.boolean,synced:i.a.boolean,presence:i.a.boolean,publicAddressMatches:i.a.boolean,httpsRequired:i.a.boolean,createdAt:i.a.integer,lastSeenAt:i.a.integer,ownerId:i.a.integer
},syncedRelations:{connections:{relationClass:r.a,rootPropertyName:"Connection"}}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(55),o=s.a.extend({idAttribute:"key",whitelistedAttrs:["key","name","defaultAudioLanguage","autoSelectAudio","defaultSubtitleLanguage","subtitleMode"],url:function(){return this.get("key")},convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return t.Account&&(t=t.Account),r.a.parseBoolean(t,"autoSelectAudio"),t},parse:function(e){var t=this.convert(e);
return t=a.a.pick(t,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(1102),s=n(1156),o=r.a.extend({model:s.a,url:"/servers",pageSize:20,limit:1e3,initialize:function(){this.startTime=new Date,this.listenTo(this.server,"socket:setting",this.onSettingChange),this.listenTo(this.server,"socket:timeline",this.onTimeline),this.listenTo(this.server,"socket:status",this.onStatus),this.listenTo(this.server,"socket:playing",this.onPlaying),this.listenTo(this.server,"socket:websocket",this.onWebSocket);
},add:function(e){this.length+1>this.limit&&this.remove(this.at(0)),r.a.prototype.add.apply(this,arguments)},onSettingChange:function(e){e.label&&this.add(a.a.extend({_type:"setting"},e),{parse:!0})},onTimeline:function(e){1===e.state||e.sectionID<0||this.add(a.a.extend({_type:"timeline"},e),{parse:!0})},onStatus:function(e){"ProgressNotification"!==e._elementType&&this.add(a.a.extend({_type:"status"},e),{parse:!0})},onPlaying:function(e){this.add(a.a.extend({_type:"playing"},e),{parse:!0})},onWebSocket:function(e){
this.add(a.a.extend({_type:"websocket"},e),{parse:!0})}});t.a=o},function(e,t,n){"use strict";var i=n(55),a=0,r=i.a.extend({idAttribute:"id",parse:function(e){var t=e;return t.time=new Date,t.id="evt"+a++,"preference"===t._type&&(t.value=String(t.value)),t}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(55),o=s.a.extend({url:"/myplex/account",whitelistedAttrs:["username","mappingState","mappingError","mappingErrorMessage","signInState","publicAddress","publicPort","privateAddress","privatePort","subscriptionActive","subscriptionState"],
defaults:{signedIn:!1,remoteAccessState:"",mappingState:"",mappingError:"",mappingErrorMessage:"",signInState:"",publicAddress:"",publicPort:"",privateAddress:"",privatePort:""},isNew:function(){return!this.get("signedIn")},convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return a.a.defaults(t,a.a.result(this,"defaults")),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs),"ok"===t.signInState?t.signedIn=!0:(t.signedIn=!1,t.username=""),t.signedIn&&"mapped"===t.mappingState&&!t.mappingError?t.remoteAccessState="ok":t.signedIn&&!t.mappingError||(t.remoteAccessState="unreachable"),
t},isWaiting:function(){var e=this.get("remoteAccessState");return"connecting"===e||"disconnecting"===e}});t.a=o},function(e,t,n){"use strict";function i(e){if(!e.length)return"(none)";var t=r.a.map(e,function(e){return e.get("debugName")});return t.join(", ")}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(27),c=n(428),u=n(22),d=n(83),h=u.a.extend({mixins:[c.a],name:"ServerCollection",model:d.a,initialize:function(){this._resetPopulate()},comparator:function(e){var t=e.get("isFullOwnedServer"),n=e.get("isShared"),i=e.get("friendlyName")||"",a=t?"0":"1";
return a+=n?"1":"0",a+=i.toLowerCase()},shouldWaitForInitialServers:function(){var e=this.filter(function(e){var t=!e.id||!!e.get("resources");return t&&e.isPopulating()});return!!e.length&&(n.i(l.a)("[Servers] Waiting for initial servers =",i(e)),!0)},shouldWaitForResources:function(){var e=this.reduce(function(e,t){var n=t.get("isResolved"),i=t.get("resources"),a=i&&i.isPopulating();return n&&a&&e.push(t),e},[]);return!!e.length&&(n.i(l.a)("[Servers] Waiting for additional resources from",i(e)),
!0)},shouldWaitForPendingServers:function(){if(this.findWhere({isConnected:!0}))return!1;var e=this.filter(function(e){return e.isPopulating()});return!!e.length&&(n.i(l.a)("[Servers] Waiting for pending servers =",i(e)),!0)},waitForServers:function(){this._resetPopulate()},foundAllServers:function(){var e=this.where({isConnected:!0}),t=i(e);n.i(l.a)("[Servers] Found all servers =",t),e.length?this._resolvePopulate():this._rejectPopulate()},populateAnyServer:function(){function e(e){var t=d.indexOf(e);
t>-1&&(d.splice(t,1),this.hasOnlyRejectedServers(d)&&u.reject())}function t(e,t){var n=r.a.contains(d,e);n&&t&&u.resolve(e)}function a(e,t){var n=r.a.contains(d,e);n&&t&&this.hasOnlyRejectedServers(d)&&u.reject()}var s=this,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.models,u=o.a.Deferred(),d=c.slice(0),h=r.a.find(d,function(e){return e.get("isCloud")?e.get("isResolved"):e.get("isConnected")});return h?(n.i(l.a)("[Servers] Populate any server chose %s where servers = %s",h.get("debugName"),i(d)),
u.resolve(h).promise()):this.hasOnlyRejectedServers(d)?u.reject().promise():(this.on({remove:e,"change:isResolved":t,"change:isRejected":a},this),u.always(function(){s.off("change:isResolved",t,s),s.off("change:isRejected",a,s)}),u.promise())},populateServer:function(e){return this.findServer(e,!0).then(function(e){return e.get("isConnected")&&!e.get("isCloud")?o.a.Deferred().resolve(e):e.populate()})},findServer:function(e,t){function n(){var e=this,i=this.filterServers(a,t);i?(d=i,i.done(function(e){
d===i&&l.resolve(e)}),i.fail(function(){d===i&&(s||!e.isPopulating()?l.reject():e.populate().always(n.bind(e)))})):this.isPopulating()||l.reject()}var i=this,a=r.a.isString(e)?{machineIdentifier:e}:e,s=r.a.has(a,"machineIdentifier"),l=o.a.Deferred(),c=r.a.map(r.a.keys(a),function(e){return"change:"+e}),u="add "+c.join(" "),d=void 0;return n.call(this),this.on(u,n,this),this.populate().always(function(){d||l.reject()}),l.always(function(){i.off(u,n,i)}),l.promise()},filterServers:function(e,t){var n=this.where(e);
if(n.length)return t?this.populateAnyServer(n):o.a.Deferred().resolve(n[0]).promise()},hasOnlyRejectedServers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.models;return r.a.every(e,function(e){return e.get("isRejected")})},hasLoopbackServer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.models;return!!r.a.find(e,function(e){var t=e.get("activeConnection");return!!t&&t.get("isLoopback")})}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(55),o=s.a.extend({
idAttribute:"id",url:"/:/prefs",defaults:{type:"string",summary:"",label:"",group:""},whitelistedAttrs:["id","label","default","summary","value","type","group","advanced","option","hidden","enumValues","values"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return"bool"===t.type?r.a.parseBoolean(t,"value"):"int"!==t.type&&"enum"!==t.type||r.a.parseInteger(t,"value"),r.a.parseBoolean(t,["advanced","hidden"]),t},parse:function(e){var t=this.convert(e);if(t=a.a.pick(t,this.whitelistedAttrs),
t.enumValues&&!a.a.isArray(t.enumValues)&&(t.enumValues=a.a.map(t.enumValues.split("|"),function(e){var n=e.indexOf(":"),i=n>0?e.slice(n+1):e,a=n>0?e.slice(0,n):e;return"int"===t.type&&(a=parseInt(a,10)),{label:i,value:a}})),"enum"===t.type&&t.values&&!a.a.isArray(t.values)){var n=0;t.enumValues=a.a.map(t.values.split("|"),function(e){return{label:e,value:n++}})}return t},getSaveParams:function(e,t){if(a.a.has(e,"FriendlyName")&&this.server.set("friendlyName",e.FriendlyName),a.a.has(e,"allowMediaDeletion")&&this.server.set("allowMediaDeletion","1"===String(e.allowMediaDeletion)),
a.a.isEmpty(e)){var n={};return n[this.get("id")]=this.get("value"),n}return"value"in e&&(e[this.get("id")]=e.value,delete e.value),e}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(44),l=n(55),c=l.a.extend({url:"/updater/status",whitelistedAttrs:["status","canInstall","downloadURL","state","progress","version","error","added","fixed"],defaults:{state:"none",progress:0,version:"",error:"",added:"",fixed:"",shouldInstall:!1},fetch:function(){return this.server.supports("updater")?l.a.prototype.fetch.apply(this,arguments):s.a.Deferred().reject().promise();
},convert:function(e){var t=a.a.isObject(e)?e:o.a.parseXML(e);return o.a.parseBoolean(t,"canInstall"),o.a.parseInteger(t,"status"),t.Release&&o.a.parseInteger(t.Release,"progress"),t},parse:function(e,t){var n=this.convert(e);return n=a.a.extend(n,n.Release),n=a.a.pick(n,this.whitelistedAttrs),0!==n.status&&(n.state="error"),n}});t.a=c},function(e,t,n){"use strict";var i=n(253),a=n(1162),r=i.a.extend({name:"SessionCollection",model:a.a,url:"/status/sessions"});t.a=r},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(67),s=n(65),o=n(151),l=n(16),c=n(49),u=c.a.extend({
name:"SessionModel",entityType:r.i,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(s.a)(this.entityType,e.sessionKey,this.server.entityID())},idAttribute:"sessionKey",cache:new o.a,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.sessionKey)},syncedAttrs:a()({},c.a.prototype.syncedAttrs,{sessionKey:l.a.string,Player:l.a.object,User:l.a.object,TranscodeSession:l.a.object,delegated:l.a.boolean}),defaults:a()({},c.a.prototype.defaults,{
delegated:!1})});t.a=u},function(e,t,n){"use strict";var i=n(75),a=n(1164),r=i.a.extend({model:a.a,url:"/sync/transcodeQueue",parse:function(e){return this.convert(e,"TranscodeJob")}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(55),o=s.a.extend({idAttribute:"syncItemId",whitelistedAttrs:["syncItemId","syncItemTitle","key","type","progress","speed","remaining","size","title","thumb"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return r.a.parseInteger(t,"syncItemId"),
r.a.parseFloat(t,["progress","speed"]),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(55),o=s.a.extend({idAttribute:"key",whitelistedAttrs:["key","progress","throttled","speed","duration","videoDecision","audioDecision","protocol","container","videoCodec","audioCodec","audioChannels","width","height","transcodeHwDecoding","transcodeHwEncoding"],url:function(){return"/transcode/sessions/"+this.id;
},convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return t.TranscodeSession&&(t=t.TranscodeSession),r.a.parseBoolean(t,"throttled"),r.a.parseInteger(t,["duration","audioChannels"]),t.progress=parseFloat(t.progress),t.speed=parseFloat(t.speed),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(317),a=i.a.extend({storageKey:"manualServers",defaults:{port1:"32400",port2:"32400"}});t.a=new a},function(e,t,n){
"use strict";var i=n(22),a=n(1168),r=i.a.extend({name:"StoredConnectionCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(1169),s=a.a.extend({name:"StoredConnectionModel",idAttribute:"uri",syncedAttrs:{uri:i.a.string,scheme:i.a.string,address:i.a.string,port:i.a.string,relay:i.a.boolean},syncedRelations:{sources:{relationClass:r.a}}});t.a=s},function(e,t,n){"use strict";var i=n(22),a=n(1170),r=i.a.extend({name:"StoredConnectionSourceCollection",model:a.a});t.a=r},function(e,t,n){
"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"StoredConnectionSourceModel",syncedAttrs:{id:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(647),r=i.a.extend({name:"StoredServerCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(420),a=n(16),r=i.a.extend({name:"SessionStatsModel",storageKey:"sessionstats",syncedAttrs:{heartbeatTime:a.a.integer,playbackCount:a.a.integer,sessionId:a.a.string,startTime:a.a.integer},defaults:{playbackCount:0}});t.a=new r},function(e,t,n){
"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"MediaSubscriptionTargetModel",context:["server"],syncedAttrs:{guid:i.a.string,grandparentGuid:i.a.string,title:i.a.string,type:i.a.string,grandparentTitle:i.a.string,index:i.a.integer,parentIndex:i.a.integer,year:i.a.string,grandparentYear:i.a.integer,originallyAvailableAt:i.a.string,thumb:i.a.string,parentThumb:i.a.string,grandparentThumb:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(433),r=i.a.extend({name:"SyncItemCollection",
context:["server","device"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(181),a=n(16),r=n(18),s=n(1174),o="active",l="snoozed",c="dead",u={ACTIVE:o,SNOOZED:l,DEAD:c},d=r.a.extend({name:"SyncListModel",context:["server","device"],url:function(){return this.device?"/devices/"+this.device.get("clientIdentifier")+"/sync_items":"/servers/"+this.server.id+"/sync_lists"},syncedAttrs:{status:a.a.oneOf(o,l,c),clientIdentifier:a.a.string,version:a.a.integer,itemsCompleteCount:a.a.integer,totalSize:a.a.integer
},syncedRelations:{syncItems:{relationClass:s.a,rootPropertyName:"SyncItems"}},derivedAttrs:{isActive:function(){return this.get("status")===o}},augmentResponse:function(e){return e.SyncItems&&(e.SyncItems=e.SyncItems.SyncItem),e},sync:function(e,t,n){var a=i.a.addVersionHeaderForDevice(this.get("device"),n);return r.a.prototype.sync.call(this,e,t,a)},getCollection:function(){return this.get("syncItems")},resetToServer:function(e){var t=this.getCollection(),n=t.filter(function(t){var n=t.get("Server");
return n&&n.machineIdentifier===e});t.reset(t.clone(n).models)}},{statuses:u});t.a=d},function(e,t,n){"use strict";var i=n(22),a=n(1177),r=i.a.extend({name:"AnnouncementCollection",model:a.a,context:["server"],url:"api/announcements"});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"AnnouncementModel",context:["server"],rootPropertyName:"Announcement",syncedAttrs:{id:i.a.integer,title:i.a.string,content:i.a.string,imageUrl:i.a.string,style:i.a.string,url:i.a.string,expireAt:i.a.string,
notifyAt:i.a.string,read:{type:i.a.boolean,save:!0}},markAsRead:function(){this.get("read")||this.save("read",!0)}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(22),s=n(1179),o=r.a.extend({name:"DeviceCollection",context:["server"],model:s.a,url:"/devices.xml",filterSyncDevices:function(e){var t=!(!e||!e.channel),n=!!e&&e.server.get("isShared"),i=!!e&&e.get("isPlaylist"),r=this.filter(function(e){var a=e.get("syncList"),r=a&&a.get("version")>=2,s=(t||n)&&e.get("isCloudSync"),o=i&&!r;
return e.supports("sync-target")&&!s&&!o}),s=a.a.sortBy(r,function(e){return!e.get("isCloudSync")});return this.clone(s)},filterByProducts:function(e){var t=this.filter(function(t){return a.a.contains(e,t.get("product"))});return this.clone(t)},products:function e(){var e=this.map(function(e){return e.get("product")});return a.a.uniq(e)}});t.a=o},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(1175),s=a.a.extend({name:"DeviceModel",context:["server"],rootPropertyName:"Device",url:function(){
return"/devices/"+this.id+".xml"},syncedAttrs:{id:i.a.string,clientIdentifier:i.a.string,name:i.a.string,product:i.a.string,productVersion:i.a.string,platform:i.a.string,platformVersion:i.a.string,device:i.a.string,model:i.a.string,provides:i.a.list,screenResolution:i.a.string,screenDensity:i.a.string,lastSeenAt:i.a.integer},syncedRelations:{syncList:{relationClass:r.a,rootPropertyName:"SyncList",deferred:!0,options:function(){return{device:this}}}},derivedAttrs:{isCloudSync:function(){return"cloudsync"===this.get("platform");
},isPersonalCloudServer:function(){return"Cloud"===this.get("platform")}},supports:function(e){return this.get("provides").indexOf(e)!==-1}});t.a=s},function(e,t,n){"use strict";var i=n(312),a=n.n(i),r=n(75),s=n(652),o=r.a.extend({model:s.a,url:"/api/users",parse:function(e){return this.convert(e,"User")},filterByHome:function(){var e=new a.a(this);return e.filterBy(function(e){return e.get("home")}),e},filterByUnrestricted:function(){var e=new a.a(this);return e.filterBy(function(e){return!e.get("restricted");
}),e},filterByServerShares:function(e){var t=new a.a(this);return t.filterBy(function(t){var n=t.get("serverShares");return!!n.findWhere({machineIdentifier:e})}),t}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(55),o=s.a.extend({url:"/api/home",whitelistedAttrs:["id","guestUserID","guestEnabled","name"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return r.a.parseInteger(t,"id"),r.a.parseBoolean(t,["guestEnabled"]),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs);
},getSaveParams:function(e,t){return a.a.isEmpty(e)?{guestEnabled:this.get("guestEnabled")?"1":"0"}:s.a.prototype.getSaveParams.apply(this,arguments)}});t.a=o},function(e,t,n){"use strict";var i=n(312),a=n.n(i),r=n(75),s=n(1183),o=r.a.extend({model:s.a,url:function(){return"/api/invites/"+this.subset},initialize:function(e,t){t||(t={}),this.subset=t.subset||"requests"},parse:function(e){return this.convert(e,"Invite")},filterByHome:function(){var e=new a.a(this);return e.filterBy(function(e){return e.get("home");
}),e},filterByFriends:function(){var e=new a.a(this);return e.filterBy(function(e){return!e.get("home")}),e}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(20),o=n(55),l=o.a.extend({whitelistedAttrs:["id","friend","server","home","friendlyName","username","email","thumb","createdAt","Server"],urlRoot:"/api/invites/requests",url:function e(){var t=this,e=void 0;return this.isNew()?e=a.a.result(this,"urlRoot"):!function(){var n=t.pick("friend","server","home");a.a.each(a.a.keys(n),function(e){
n[e]=n[e]?"1":"0"}),e=t.collection?a.a.result(t.collection,"url"):a.a.result(t,"urlRoot"),e=e.replace(/([^\/])$/,"$1/")+encodeURIComponent(t.get("id")),e=s.join(e,n)}(),e},convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);r.a.parseInteger(t,"createdAt"),r.a.parseBoolean(t,["friend","server","home"]),r.a.parseArray(t,"Server");var n=t.Server;return a.a.each(n,function(e){r.a.parseInteger(e,"numLibraries")}),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs);
}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(75),s=n(1185),o=r.a.extend({model:s.a,filterByOwned:function(e){var t=this.filter(function(e){return e.get("owned")});return this.clone(t)},filterByShared:function(e){var t=this.filter(function(e){return!e.get("owned")&&!e.get("pending")});return this.clone(t)},getLibraryCount:function(e){var t=this.where(e);return a.a.reduce(t,function(e,t){return e+=t.get("numLibraries")},0)},getOwnedLibraryCount:function(){return this.getLibraryCount({
owned:!0})},getSharedLibraryCount:function(){return this.getLibraryCount({owned:!1})},getActiveCount:function(){return this.reduce(function(e,t){return t.isActive()&&e++,e},0)}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(55),o=s.a.extend({whitelistedAttrs:["id","serverId","machineIdentifier","name","owned","admin","pending","lastSeenAt","invitedAt","acceptedAt","allLibraries","numLibraries","allowSync","allowCameraUpload","allowChannels","Section"],urlRoot:function(){return"/api/servers/"+this.get("machineIdentifier")+"/shared_servers";
},isActive:function(){return!(!this.get("numLibraries")&&!this.get("allLibraries"))},convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);t.SharedServer&&(t=t.SharedServer),r.a.parseInteger(t,["id","serverId","lastSeenAt","invitedAt","acceptedAt","numLibraries"]),r.a.parseBoolean(t,["owned","admin","pending","allLibraries","allowSync","allowCameraUpload","allowChannels"]),r.a.parseArray(t,"Section");var n=t.Section;return a.a.each(n,function(e){r.a.parseInteger(e,"id"),r.a.parseBoolean(e,"shared");
}),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs),!t.numLibraries&&t.Section.length&&(t.numLibraries=a.a.where(t.Section,{shared:!0}).length),t}});t.a=o},function(e,t,n){"use strict";var i=n(75),a=n(1187),r=i.a.extend({model:a.a,url:"/pms/social/networks",parse:function(e){return this.convert(e,"Directory")}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(55),o=s.a.extend({idAttribute:"key",whitelistedAttrs:["key","title","linked","maxLength"],
convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return r.a.parseBoolean(t,["linked","maxLength"]),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"UserEntitlementModel",syncedAttrs:{id:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(1190),r=i.a.extend({name:"UserFeatureCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({
name:"UserFeatureModel",syncedAttrs:{id:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(655),r=i.a.extend({name:"UserPlaylistItemCollection",context:["server","identifier","mediaTagPrefix","mediaTagVersion","containerKey","userPlaylistKey"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"UserProviderModel",syncedAttrs:{id:i.a.string,territory:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"UserRoleModel",
syncedAttrs:{id:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(1195),r=i.a.extend({name:"StoredUserCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(16),s=n(18),o=n(1171),l=n(435),c=n(658),u=n(654),d=n(657),h=s.a.extend({name:"StoredUserModel",additionalRelations:["servers"],syncedAttrs:{id:r.a.integer,authToken:r.a.string,username:r.a.string,email:r.a.string,title:r.a.string,thumb:r.a.string,pin:r.a.string,home:r.a.boolean,restricted:r.a.boolean,
guest:r.a.boolean,hasAllEntitlements:r.a.boolean,lastPrimaryServerID:r.a.string},syncedRelations:{subscription:{relationClass:l.a},roles:{relationClass:c.a},entitlements:{relationClass:u.a},providers:{relationClass:d.a},servers:{relationClass:o.a}},copyFromUser:function(e){var t=this,n={};a.a.each(this.syncedAttrs,function(t,i){n[i]=e.get(i)}),a.a.each(this.syncedRelations,function(n,i){if(!a.a.contains(t.additionalRelations,i)){var r=t.get(i),s=e.get(i);if(s){var o=s.toJSON();r.set(r.parse(o))}}
}),this.set(n)},clearSensitiveAttributes:function(){this.unset("authToken"),this.unset("pin"),this.get("servers").reset()}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(14),s=n(123),o=n(8),l=n(59),c=s.a.extend({initialize:function(){this.viewFor=this.viewFor.bind(this)},viewFor:function(e,t){var n=this.viewsByType[e];if(n)return new n(t);throw new Error("No view defined for "+e)},login:function(){var e=this,t=n.i(r.a)("appModel"),i=t.get("servers"),a=i.findWhere({cloud:!0});o.a.trigger("show:loading"),
a.populate().done(function(){o.a.trigger("navigate","dashboard")}).fail(function(){var t=a.get("available");if(t!==!0&&t!==!1)return void e.listenToOnce(a,"change:available",e.login);var n=t?e.viewFor("signIn"):e.viewFor("unavailable",{model:a});o.a.trigger("show:view",n)})},error:function(){o.a.trigger("show:view",this.viewFor("notFound",{type:"404"}))},unauthorized:function(e){var t=this,n=a.a.some(this.getUnauthorizedHandlers(),function(n){return n.call(t,e)});n||o.a.trigger("show:view",this.viewFor("notFound",{
type:"media"}))},getUnauthorizedHandlers:function(){return[this.handleLockState,this.handleAuthorized,this.handlePrimaryServer,this.handleServer,this.handleChannelError]},handleLockState:function(e){var t=n.i(r.a)("appModel");return t.get("user").get("isLocked")},handleAuthorized:function(e){var t=n.i(r.a)("appModel"),i=t.get("servers").findWhere({authorized:!0}),a=!i&&!t.get("skipSignIn");return a&&this.populateServersThenRecover(),a},handlePrimaryServer:function(e){var t=e.server,n=e.options;return!(t||!n.primaryServer)&&(o.a.trigger("show:view",this.viewFor("serverRequired")),
!0)},handleServer:function(e){var t=e.server,i=e.options,a=this.viewFor,s=n.i(r.a)("appModel"),l=s.get("cloudServer"),c=void 0,u=void 0;return!(!i.serverID&&!i.primaryServer)&&(t?t.get("available")?t.get("authorized")||"resolved"!==l.populatePromise.state()?t.get("authorized")||(c=this.populateServersThenRecover()):u=a("unauthorized"):u=a("unavailable",{model:t}):u=a("notFound",{type:"server"}),u&&o.a.trigger("show:view",u),!(!u&&!c))},handleChannelError:function(e){var t=e.options,n=!!t.channelID;
return n&&o.a.trigger("show:view",this.viewFor("channelError")),n},populateServersThenRecover:function(){var e=n.i(r.a)("appModel"),t=e.get("skipSignIn"),i=e.get("servers"),a=i.findWhere({cloud:!0}),s=this.viewFor;return i.populate().done(function(){var e=i.filter(function(e){return e.get("hasManualConnection")})[0];a.get("authorized")?o.a.trigger("navigate:refresh"):e?e.get("authorized")?o.a.trigger("navigate","dashboard"):o.a.trigger("show:view",s("unavailable",{model:e})):t?o.a.trigger("show:view",s("serverRequired")):o.a.trigger("navigate","login",{
silent:!0})}).fail(function(){l.a.get("requiresSignIn")?o.a.trigger("show:view",s("unavailable",{model:a})):o.a.trigger("show:view",s("serverRequired"))})}});t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(47),s=n(14),o=n(8),l=n(124),c=l.a.extend({initialize:function(){l.a.prototype.initialize.apply(this,arguments),this.listenTo(o.a,{"navigate:back":this.onNavigateBack,"navigate:forward":this.onNavigateForward,"navigate:refresh":this.onNavigateRefresh,"navigate:refresh:dashboard":this.onNavigateRefreshDashboard
})},onNavigateBack:function(){var e=s.a("appModel"),t=e.get("history"),n=e.get("forwardHistory");return t.length<2?this.navigate("",{trigger:!0}):(n.unshift(t.pop()),void this.navigate(a.a.last(t),{trigger:!0}))},onNavigateForward:function(){var e=s.a("appModel"),t=e.get("forwardHistory");t.length&&this.navigate(t[0],{trigger:!0})},onNavigateRefresh:function(){r.a.history.loadUrl(r.a.history.getFragment())}});t.a=c},function(e,t,n){"use strict";function i(e){var t=e.key,i=e.getModel,r=e.pages,s=void 0===r?1:r,o=e.reloadThreshold,l=void 0===o?4:o,c=n.i(a.a)(t),u="is"+c+"Pending",d="is"+c+"Populated",h=t?t+"Error":"error";
return function(e,n){var a=n.startIndex,r=n.endIndex,o=r-a,c=i(e,n),p=t?c.get(t):c,f=(c.sessionAttrs,c.get(u));c.set(u,!0),p.populateRange({start:a,end:a+o*s+1,reloadThreshold:o*l}).done(function(){var e;c.set((e={},e[u]=!1,e[d]=!0,e[h]=null,e))}).fail(function(e,t){var n;return t.aborting?void c.set(u,f):void c.set((n={},n[u]=!1,n[h]=t,n))})}}var a=(n(33),n(214));t.a=i},function(e,t,n){"use strict";var i=n(53),a=n(436);n.d(t,"a",function(){return r});var r=n.i(i.a)(a.c)},function(e,t,n){"use strict";
function i(e,t){function n(){u===c&&(u=c.slice())}function i(){return t.getState()}function a(e){var t=!0;return n(),u.push(e),function(){if(t){t=!1,n();var i=u.indexOf(e);u.splice(i,1)}}}function r(e){var n=e.payload,i=e.type,a=i&&d[i];if(Array.isArray(a))for(var s=0,o=a.length;s<o;s++)a[s](t,n,r);else a&&a(t,n,r);return e}function s(e){d=o(e)}function o(e){for(var t={},n=0,i=e.length;n<i;n++){var a=e[n];for(var r in a){var s=t[r],o=a[r];s?Array.isArray(s)?s.push(o):t[r]=[s,o]:t[r]=o}}return t}function l(){
for(var e=c=u,t=0,n=e.length;t<n;t++)e[t]()}var c=[],u=c,d=void 0;return s(e),t.on("statechange",l),{dispatch:r,subscribe:a,getState:i,replaceActionHandlers:s}}n(180),n(33),n(18);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){var n=t.libraryEntityID;return n},r.a,function(e,t){return t[e]})}var a=n(9),r=(n.n(a),n(666));t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(9),s=(n.n(r),n(258)),o=n.i(r.createSelector)(s.a,function(e){return a.a.find(e,function(e){
var t=e.activeConnection;return!!e.isFullServer&&(!(!e.isConnected||t.isPossiblyCrossNetworkProtected)&&!!t.isPrivate)})});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(9),s=(n.n(r),n(257)),o=n.i(r.createSelector)(s.a,function(e){return e?a.a.pick(e.desktop,["personalCloudServerStatus","isPersonalCloudServerStatusPending","isPersonalCloudServerStatusPopulated","personalCloudServerStatusError"]):{}});t.a=o},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(258)),r=n.i(i.createSelector)(a.a,function(e){
return e.filter(function(e){return e.isPersonalCloudServer})});t.a=r},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(257)),r=n.i(i.createSelector)(a.a,function(e){if(!e)return{isCloudServerConnected:!1};var t=e.desktop;return{isCloudServerConnected:e.isConnected,isPersonalCloudServerRestarting:t.isPersonalCloudServerRestarting,personalCloudServerRestartError:t.personalCloudServerRestartError}});t.a=r},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){var n=t.mediaSubscriptionEntityID;
return n},r.a,function(e,t){return t[e]})}var a=n(9),r=(n.n(a),n(675));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.settings||{},n=t.myPlexScheme,i=t.myPlexUrl;return n=n||"https",i=i||"plex.tv",{myPlexScheme:n,myPlexUrl:i}}t.a=i},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(174)),r=n.i(i.createSelector)(a.a,function(e){return e.subscription||{}});t.a=r},function(e,t,n){"use strict";function i(e){for(var t=r()(null),n=0,i=e.length;n<i;n++)t[e[n]]=!0;return t}var a=n(899),r=n.n(a),s=n(2),o=n.n(s),l=n(34),c=l.a.extend({
initialize:function(){this.pool=[],this.index={}},lockOrCreate:function(e,t,n){var a=i(e);o.a.each(e,function(e){if(!this.find(e)){var i=o.a.find(this.pool,function(e){return!a[e.id]},this);i||(i={},this.pool.push(i),i.view=t.call(n,i)),this.index[i.id]=void 0,this.index[e]=i,i.id=e}},this)},each:function(e,t){o.a.each(this.pool,e,t)},filter:function(e,t){var n=o.a.partition(this.pool,e,t),i=n[0],a=n[1];o.a.each(a,function(e){e.view.close(),e.view.$el.remove()}),this.pool=i},find:function(e){var t=this.index[e];
return t&&t.id===e?t:void 0},findByModel:function(e){return o.a.find(this.pool,function(t){return t.view.model===e})},close:function(){o.a.each(this.pool,function(e){e.view.close()}),this.pool=[],this.index={}},reindex:function(){var e=this.index={};o.a.each(this.pool,function(t){e[t.id]=t})}});t.a=c},function(e,t,n){"use strict";function i(e){var t=e.get("metadataList").getCollection(),n=t.length,i=e.get("viewGroup");if("Pictures"===i)return s.tileList;if("List"===i)return s.list;if(t.findWhere({
type:"photo"}))return s.tileList;var a=r.a.compact(t.pluck("summary")),o=r.a.uniq(t.pluck("thumb")),l=t.reduce(function(e,t){var n=t.get("title");return n?e+n.length:e},0),c=l/n;return o.length>n/2&&c<30?s.tileList:a.length>n/2?s.detailsList:s.list}var a=n(2),r=n.n(a),s={tileList:"media-tile-list",detailsList:"media-details-list",list:"media-list"},o={types:s,getListType:i};t.a=o},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return s}),n.d(t,"c",function(){return o;
});var i="playPause,stop,skipPrevious,skipNext,seekTo,stepBack,stepForward,subtitleStream",a=i+",volume",r="playPause,stop,skipPrevious,skipNext,seekTo,repeat",s=r+",volume",o="playPause,stop,skipPrevious,skipNext"},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="analyzing"},function(e,t,n){"use strict";function i(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.timeFormat,p=void 0===a?"h:mma":a;if(null==e)return"";var f=r.a.unix(e);if(n.i(o.a)(e))return n.i(s.default)("Yesterday");
var g=f.minutes();0===g&&(p=p.replace("h:mm","h"));var m=n.i(h.default)(e,p),v=void 0;return v=n.i(l.a)(e)?n.i(c.a)(e)?n.i(s.default)("Tonight"):n.i(s.default)("Today"):n.i(u.a)(e)?n.i(s.default)("Tomorrow"):n.i(d.a)(e)?n.i(h.default)(e,"dddd"):n.i(h.default)(e,"MMM D"),t?n.i(s.default)("{1} at {2} on {3}",v,m,t):n.i(s.default)("{1} at {2}",v,m)}var a=n(43),r=n.n(a),s=n(4),o=n(327),l=n(262),c=n(692),u=n(691),d=n(690),h=n(213);t.a=i},function(e,t,n){"use strict";var i=n(43);n.n(i)},function(e,t,n){
"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit;return e?("past"===n?e=Math.min(e,r()().unix()):"future"===n&&(e=Math.max(e,r()().add(1,"second").unix())),r.a.unix(e).fromNow()):""}var a=n(43),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=l[e]||r.a.last(l);return{times:e+1,remindAfter:o()().add(t,"days").unix()}}var a=n(2),r=n.n(a),s=n(43),o=n.n(s),l=[7,30,60,90,180];t.a=i;
},function(e,t,n){"use strict";var i=(n(152),n(683),n(684),n(177),n(212),n(685),n(211),n(125));n.d(t,"a",function(){return i.a});n(126),n(213),n(1214)},function(e,t,n){"use strict";function i(e,t,n){var i=o.a.extend(!0,{},e),a=i[t];if(a&&n.type!==l.a){var s=r.a.findWhere(a,{value:n.value});s||a.push(n)}else i[t]=[n];return i}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=(n(33),n(180),n(178));t.a=i},function(e,t,n){"use strict";function i(e){if(!e)return{};var t=decodeURIComponent(e).match(p);if(!t)return{};
var i=t.reduce(function(e,t){var i=t.match(f),a=i[1],s=i[2],o=i[3],d=r.a.uniq(o.split(l.a));return 1===d.length&&(d=d[0]),n.i(u.a)(e,a,{value:d,type:g[a]?c.a:c.b,operator:s})},{});return i}var a=n(2),r=n.n(a),s=n(337),o=n(695),l=n(696),c=n(178),u=n(1218);t.a=i;var d=r.a.values(o).map(s.a).join("|"),h="([^&!=<>]+)(["+d+"]+)([^&!=<>]+)",p=new RegExp(h,"g"),f=new RegExp(h),g={unwatched:!0,unwatchedLeaves:!0,duplicate:!0}},function(e,t){function n(e){return e.join(", ")}e.exports=n},function(e,t,n){var i=n(213).default,a=n(84);
e.exports=a(i)},function(e,t,n){var i=n(453).default,a=n(84);e.exports=a(i)},function(e,t,n){var i=n(454).default,a=n(84);e.exports=a(i)},function(e,t,n){var i=n(336).default,a=n(84);e.exports=a(i)},function(e,t,n){var i=n(737).default,a=n(84);e.exports=a(i)},function(e,t,n){var i=n(20).getLastSegment,a=n(84);e.exports=a(i)},function(e,t,n){"use strict";var i=n(5),a=n.n(i);a.a.fn.isDisabled=function(){return this.hasClass("disabled")||this.hasClass("active")||this.hasClass("hidden")}},function(e,t,n){
"use strict";var i=n(5),a=n.n(i);a.a.fn.selectText=function(){var e,t=this[0];if(document.body.createTextRange)e=document.body.createTextRange(),e.moveToElementText(t),e.select();else if(window.getSelection){var n=window.getSelection();e=document.createRange(),e.selectNodeContents(t),n.removeAllRanges(),n.addRange(e)}}},function(e,t,n){"use strict";var i=n(5),a=n.n(i);a.a.fn.triggerReflow=function(){var e=this[0];return e&&e.offsetHeight,this}},function(e,t,n){"use strict";function i(e){e=e||[];for(var t=0,n=e.length;t<n;t++){
var s=e[t];if("xx"!==s&&"xn"!==s){if(a.a[s])return s;var o=s.match(r),l=o&&i([o[1]]);if(l)return l}}}var a=n(328);t.a=i;var r=/(^[^-]+)\-/},function(e,t,n){"use strict";function i(){var e=window.PLEXWEB_INLINE&&window.PLEXWEB_INLINE.acceptLanguage,t=window.navigator,i=void 0;return e?i=n.i(r.a)(e):t.languages?i=t.languages:t.language?i=[t.language]:t.userLanguage&&(i=[t.userLanguage]),n.i(a.a)(i)||"en"}var a=n(1230),r=n(1232);t.a=i},function(e,t,n){"use strict";function i(e){return e&&e.match(/[a-zA-Z\-]{2,10}/g)||[];
}t.a=i},function(e,t,n){"use strict";var i=n(93),a=n.n(i),r=n(34),s=n(8),o=n(52),l=n(61),c=r.a.extend({mixins:o.a,name:"AbstractReporter",enabled:!1,destroyed:!1,_suspended:!1,initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.enabled!==!1&&this.enable()},hasSupport:function(){return!0},enable:function(){this.enabled||this.destroyed||!this.hasSupport()||(this.enabled=!0,this.listenTo(s.a,{"log:message":this.onLog,"log:group":this.onLog,"log:groupCollapsed":this.onLog,
"log:groupEnd":this.onLog}),this.onEnabled())},disable:function(){this.enabled&&(this.enabled=!1,this.stopListening(),this.onDisabled())},destroy:function(){this.destroyed||(this.disable(),this.destroyed=!0,this.onDestroyed())},_suspend:function(){this._suspended||(this._suspended=!0,this.onSuspended())},_resume:function(){this._suspended&&(this._suspended=!1,this.onResumed())},onLog:function(e){if(this._suspended)return void(l.a.hasConsole&&window.console.warn("[Logging] Ignored log reentrancy:",a()(e)));
switch(this._suspend(),e.type){case"log:message":this.onLogMessage(e);break;case"log:group":this.onLogGroup(e);break;case"log:groupCollapsed":this.onLogGroupCollapsed(e);break;case"log:groupEnd":this.onLogGroupEnd(e)}this._resume()},onLogMessage:function(){},onLogGroup:function(){},onLogGroupCollapsed:function(){this.onLogGroup.apply(this,arguments)},onLogGroupEnd:function(){},onEnabled:function(){},onDisabled:function(){},onResumed:function(){},onSuspended:function(){},onDestroyed:function(){}});
t.a=c},function(e,t,n){"use strict";var i,a=n(1233),r=n(61),s=n(27),o=(i={},i[s.a.LEVEL_LOG]={method:"log",color:"black"},i[s.a.LEVEL_DEBUG]={method:"debug",color:"#d500ff"},i[s.a.LEVEL_INFO]={method:"info",color:"blue"},i[s.a.LEVEL_WARN]={method:"warn",color:"#ff6600"},i[s.a.LEVEL_ERROR]={method:"error",color:"red"},i),l=a.a.extend({name:"ConsoleReporter",hasSupport:function(){return r.a.hasConsole},onLogMessage:function(e){var t=e.message,n=o[e.level],i=window.console[n&&n.method]||window.console.log;
n&&n.color?i.call(window.console,"%c"+t,"color: "+n.color+";"):i.call(window.console,t)},onLogGroup:function(e){var t=window.console.group||window.console.log;t.call(window.console,e.message)},onLogGroupCollapsed:function(e){var t=window.console.groupCollapsed||window.console.log;t.call(window.console,e.message)},onLogGroupEnd:function(){window.console.groupEnd&&window.console.groupEnd()}});t.a=l},function(e,t,n){"use strict";function i(e,t,n){var i=n;if(e.Part.length>1)for(var a=0,r=e.Part.length;a<r;a++){
var s=e.Part[a];if(!s.duration)break;if(t.key===s.key)break;i+=s.duration}return i}t.a=i},function(e,t,n){"use strict";function i(e){return e?e.Part.length:0}t.a=i},function(e,t,n){"use strict";function i(e,t){if(e.indexes){var n=e.indexes.split(",");if(n.length)return r.a.indexOf(n,t)>-1?t:n[0]}}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.seasonPrefix||"S{1}",i=e.seasonIndex;return i>1e3?i:(e.noLeadingZero||(i=n.i(r.a)(i)),n.i(a.default)(t,i))}var a=n(4),r=n(456);
t.a=i},function(e,t,n){"use strict";function i(e){var t=e?r.a.first(e.get("Media")):null;return!(!t||t.container)}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){o+=1;var t=r.a.extend({},e.attributes,{playQueueItemID:o}),n=new s.a(t,{server:e.server,parent:e.parent,parse:!0});return n}var a=n(2),r=n.n(a),s=n(251),o=0;t.a=i},function(e,t,n){"use strict";function i(e){if(!e)return"";var t=e.indexOf("/");return t!==-1?e.substr(t+1):e}t.a=i},function(e,t,n){"use strict";function i(e){
return e=parseInt(e,10),(e/10).toFixed(1)}t.a=i},function(e,t,n){"use strict";function i(e){return e instanceof a.a.Collection?e:e.getCollection?e.getCollection():e.has("childrenKey")?e.get("children").getCollection():void 0}var a=n(47);t.a=i},function(e,t,n){"use strict";var i=n(453);n.d(t,"c",function(){return i.default});var a=(n(454),n(330),n(719));n.d(t,"a",function(){return a.a});var r=n(267);n.d(t,"b",function(){return r.default});var s=(n(720),n(1242));n.d(t,"d",function(){return s.a});n(455);
},function(e,t,n){"use strict";function i(e){var t=e.get("type"),n="channelDirectory"===t,i=n||t&&"directory"===a.a.get(t).element||e.get("isFolder"),r=void 0===e.length;return r&&!i}var a=n(36);t.a=i},function(e,t,n){"use strict";function i(e,t){var i=t.itemDecision,a=r.a.pick(t,"shuffle","unwatched","continuous","items","excludeSeedItem"),o="movie"===e.get("type")&&!e.get("viewOffset");if(o&&t.supportsContinuous){var l=n.i(s.a)("appModel").get("settings");a.extrasPrefixCount=l.get("extrasPrefixCount");
}return i.toPlay&&(a.firstItemKey=i.toPlay.get("key")),a}var a=n(2),r=n.n(a),s=n(14);t.a=i},function(e,t,n){"use strict";function i(e,t){var i=r.a.Deferred(),a=e.server.get("playQueueManager"),o=a.getFor(t.itemDecision.toPlay||t.itemDecision.toAdd),l=n.i(s.a)(e,t);return l.model=o.get("selectedItem"),l.playQueue=o,i.resolve(l).promise()}var a=n(5),r=n.n(a),s=n(457);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=t.itemDecision,i=e.server.get("playQueueManager"),a=i.getFor(n.toPlay||n.toAdd);
return a&&a.get("hasUserAdditions")?t.confirmClearPlayQueue():r.a.Deferred().resolve().promise()}var a=n(5),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=r.a.Deferred();if(t.siblings&&e.collection){var i=e.playlist||e.collection,a=e.get("metadataItem")||e;return n.resolve({toPlay:a,toAdd:i}).promise()}var o=e.get("type"),l="show"===o&&!e.get("isSection"),c="season"===o;return t.unwatched&&(l||c)?!function(){var i=l?e:new s.a({key:e.get("parentKey")},{server:e.server}),a=i.fetch({
data:{includeOnDeck:"1"}});a.then(function(){var a=i.get("onDeck"),r=a&&l,s=a&&c&&a.get("parentRatingKey")===e.id;r||s?(t.offset=a.get("viewOffset"),n.resolve({toPlay:a,toAdd:e})):c?e.get("children").populate().then(function(){var t=e.get("children").get("metadataItems"),i=function(e){return!e.get("viewCount")},a=t.findWhere(i);n.resolve({toPlay:a,toAdd:e})}):n.resolve({toAdd:e})}),a.fail(n.reject)}():n.resolve({toAdd:e}),n.promise()}var a=n(5),r=n.n(a),s=n(49);t.a=i},function(e,t,n){"use strict";
function i(e){return e.get("isUserPlaylist")?"video":e.get("isPlaylist")?e.get("playlistType"):e.section?a.a.getChildMediaType(e.section.get("type")).element:e.get("isMetadataList")?a.a.getChildMediaType(e.get("firstItemType")).element:a.a.getChildMediaType(e.get("type")).element}var a=n(36);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=e.get("selectedItem"),i="track"===n.get("type");if(!i)return s.a.Deferred().resolve(e).promise();var a=n.server,r=n.get("librarySectionID")||n.section&&n.section.get("key");
return a.get("sections").populate().then(function(e){var t=e.findWhere({key:r});return t&&t.get("settings").populate()}).then(function(e){var n=e&&e.findWhere({id:"enableTrackOffsets"});t.enableTrackOffsets=n&&n.get("value")}).then(function(){return e})}function a(e,t){if(t.playQueue)return i(t.playQueue,t);var a=t.itemDecision,r=e.server.get("playQueueManager").createFor(a.toAdd,a.toPlay);if(!r){var u="Couldn't create play queue";return o.a.warn("[PlayMedia]",u),n.i(l.a)(),s.a.Deferred().reject(u).promise();
}var d=r.addContent(a.toAdd,n.i(c.a)(e,t)).then(function(){if(r.get("collection").length)return i(r,t);var e=r.get("message");return s.a.Deferred().reject("Couldn't queue item; empty play queue. "+e).promise()});return d.fail(function(e){o.a.warn("[PlayMedia]",e),n.i(l.a)()}),d}var r=n(5),s=n.n(r),o=n(27),l=n(725),c=n(1246);t.a=a},function(e,t,n){"use strict";function i(e,t){return n.i(u.a)(e,t)?t.isFromCompanion?n.i(d.a)(e,t):(l.a.warn("[PlayMedia] Ignoring playback command for currently playing item"),
o.a.Deferred().reject({silent:!0}).promise()):n.i(h.a)(e,t).then(function(){t.notify(r.a.extend({loading:!0},n.i(p.a)(e,t)))},function(){return o.a.Deferred().reject({silent:!0}).promise()}).then(function(){return n.i(f.a)(e,t)}).then(function(i){return t.playQueue=i,n.i(p.a)(e,t)}).done(function(){c.a.execute("persistPlayQueue",null)})}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(27),c=n(21),u=n(1253),d=n(1247),h=n(1248),p=n(457),f=n(1251);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=t.itemDecision,i=e.server.get("playQueueManager"),a=i.getFor(n.toPlay||n.toAdd);
return a&&a.get("selectedItem")&&a.get("selectedItem").get("key")===e.get("key")}t.a=i},function(e,t,n){"use strict";function i(e){return e.controller}t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(34),l=n(95),c=n(1256),u=n(27),d=n(52),h=n(1165),p=o.a.extend({mixins:d.a,warningThreshold:2e3,networkReasonThreshold:3e3,startDelay:1e4,syncDelay:500,resyncDelay:1e4,reasons:{TRANSCODER:"transcoder",NETWORK:"network",UNKNOWN:"unknown"},recommendations:{LOWER_QUALITY:"lowerQuality",
ORIGINAL_QUALITY:"originalQuality",NONE:"none"},initialize:function(e){a.a.bindAll(this,"onSyncCheck"),e||(e={}),this.warningThreshold=e.warningThreshold||this.warningThreshold,this.startDelay=e.startDelay||this.startDelay,this.syncDelay=e.syncDelay||this.syncDelay,this.resyncDelay=e.resyncDelay||this.resyncDelay,this._clock=new c.a,this.setModel(e.model)},setModel:function(e){this.model=e},start:function(){this._hasWarned=!1,this._startedAt=this._clock.now(),this._clock.setPosition(this.model.get("position")),
this.listenTo(this.model,{"change:state":this.onStateChange,"change:position":this.onPositionChange})},stop:function(){this._cancelSyncCheck(),this.stopListening(),this._startedAt=null,this._resyncedAt=null},seek:function(e){this._startedAt=this._clock.now(),this._cancelSyncCheck(),this._clock.pause()},determineReason:function(){var e=s.a.Deferred(),t=this.determineReasonFromBuffer(),n=this.fetchTranscodeSession();return n.done(a.a.bind(function(n){var i=this.determineReasonFromTranscode(n);i===this.reasons.UNKNOWN&&(i=t),
e.resolve(i)},this)),n.fail(a.a.bind(function(){e.resolve(t)},this)),e.promise()},determineReasonFromTranscode:function(e){return!e.get("throttled")&&e.get("speed")<1?this.reasons.TRANSCODER:this.reasons.UNKNOWN},determineReasonFromBuffer:function(){var e=this.model.get("position"),t=this.model.get("endBuffer");return t&&t-e<this.networkReasonThreshold?this.reasons.NETWORK:this.reasons.UNKNOWN},fetchTranscodeSession:function(){if(this.model.get("directPlay"))return s.a.Deferred().reject().promise();
var e=this.model.get("transcodeSessionID"),t=this.model.get("transcodeServer"),n=new h.a({key:e},{server:t});return n.fetch()},determineRecommendation:function(e){var t,n=this.model.get("qualityIndex");if(e===this.reasons.TRANSCODER)n>=0&&(t=this.recommendations.ORIGINAL_QUALITY);else if(e===this.reasons.NETWORK){var i=this.model.get("transcodeServer"),r=this.model.get("media"),s=l.a.getAvailableQualitiesFor(r,i);if(s.length&&this.model.get("canSetQuality")){var o=a.a.reduce(s,function(e,t){return e&&e.index<t.index?e:t;
});(n<0||n>o.index)&&(t=this.recommendations.LOWER_QUALITY)}}return t?t:this.recommendations.NONE},_scheduleSyncCheck:function(){this._syncChecker||(this._syncChecker=setTimeout(this.onSyncCheck,this.syncDelay))},_cancelSyncCheck:function(){this._syncChecker=clearTimeout(this._syncChecker)},_shouldPlayClock:function(){return this.model.get("playing")||this.model.get("buffering")},onStateChange:function(e,t){this._shouldPlayClock()||(this._cancelSyncCheck(),this._clock.pause(),this._clock.setPosition(e.get("position")));
},onPositionChange:function(e,t){this._shouldPlayClock()&&(this._clock.play(),this._scheduleSyncCheck())},onSyncCheck:function(){var e=this._clock,t=e.now(),n=e.getPosition(),i=this.model.get("position"),r=n-i;this._startedAt+this.startDelay>t?e.setPosition(i):r>this.warningThreshold?(e.setPosition(i),this.model.get("buffering")||this.trigger("buffering"),this._hasWarned||(this._hasWarned=!0,this.determineReason().done(a.a.bind(function(e){u.a.warn("Player: Excessive buffering detected; "+e),this.trigger("warn",{
reason:e,recommendation:this.determineRecommendation(e)})},this)))):this._resyncedAt?t-this._resyncedAt>this.resyncDelay&&(this._resyncedAt=null,e.setPosition(i)):this._resyncedAt=t,this._syncChecker=null,this._scheduleSyncCheck()}});t.a=p},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(34),s=r.a.extend({_position:0,_timestamp:null,now:function(){return a.a.now()},play:function(){null==this._timestamp&&(this._timestamp=this.now())},pause:function(){this._position=this.getPosition(),this._timestamp=null;
},getPosition:function(){return null!=this._timestamp?this.now()-this._timestamp+this._position:this._position},setPosition:function(e){this._position=e,null!=this._timestamp&&(this._timestamp=this.now())}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(458),s=a.a.extend({},r.a,{type:"music",qualities:{bitrate:[96,128,192,320]},getNearestIndexToBitrate:function(e){return this.getNearestIndex(this.qualities.bitrate,e)}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(458),o=a.a.extend({},s.a,{
type:"photo",qualities:{photoResolution:["720x480","1280x720","1920x1080","3840x2160"],photoQuality:[24,49,74,99],title:function(){return[n.i(r.default)("Low"),n.i(r.default)("Medium"),n.i(r.default)("High"),n.i(r.default)("Highest")]}},getNearestIndexToQuality:function(e){return this.getNearestIndex(this.qualities.photoQuality,e)}});t.a=o},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;
return"edge"===e.id}var a=n(32);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;return"ie"===e.id}var a=n(32);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;return"konvergo"===e.id}var a=n(32);t.a=i},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;
return"windowskonvergo"===e.platformID}var a=n(32);t.a=i},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";n(32),n(727),n(728)},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";n(898)},function(e,t,n){"use strict";n(898)},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";n(32),n(730),n(731)},function(e,t,n){"use strict";
n(32)},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";n(32)},function(e,t,n){"use strict";function i(e){var t=r.a.Deferred();return e.then(t.resolve,t.reject,t.notify),{promise:t.promise(),cancel:function(){t.reject({isCanceled:!0})}}}var a=n(5),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){if(!e.length)return o.a.Deferred().reject().promise();var t=o.a.Deferred(),n=e.length;return r.a.each(e,function(e){e.done(function(){n--,t.resolveWith(this,arguments)}).fail(function(){
n--,0===n&&t.reject()})}),t.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(14),l=n(8),c=n(34),u=n(61),d=n(154),h=n(44),p=n(52),f=n(147),g=c.a.extend({lastModified:null,eTag:null,mixins:p.a,url:function e(){var t=o.a("appModel"),n=t.get("user"),i="/sub/"+this.requestType+"/"+n.id+"/"+t.get("clientID"),a=new f.a({scheme:"websockets"===this.requestType?"wss":"https",address:"pubsub.plex.tv"}),e=this.server.resolveUrl(i,{connection:a,
appendToken:!0});return e},initialize:function(e){a.a.bindAll(this,"onSocketOpen","onSocketClose","onSocketError","onSocketMessage","onPollSuccess","onPollError"),this.server=e.server},open:function(){return(this.socket||this.pollRequest)&&this.close(),u.a.hasWebSocket?(this._deferred=s.a.Deferred(),this.requestType="websockets",this.socket=new window.WebSocket(a.a.result(this,"url")),this.socket.onopen=this.onSocketOpen,this.socket.onclose=this.onSocketClose,this.socket.onerror=this.onSocketError,
this.socket.onmessage=this.onSocketMessage,this._deferred.promise()):this.poll()},close:function(){this.pollRequest&&(d.a.abort(this.pollRequest.rid),this.pollRequest=null),this._deferred&&"pending"===this._deferred.state()&&this._deferred.reject(),this.socket&&(this.socket.onopen=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close(),this.socket=null)},poll:function(){this.requestType="longpolling",this.pollUrl=a.a.result(this,"url");var e=this.server.getXHROptions(this.pollUrl);
return e.headers["If-Modified-Since"]=this.lastModified?this.lastModified:"Thu, 01 Jan 1970 00:00:00 GMT",this.eTag&&(e.headers["If-None-Match"]=this.eTag),this.pollRequest=s.a.ajax(e).done(this.onPollSuccess).fail(this.onPollError),this.pollRequest.promise()},handleResponse:function(e){if(e){var t=h.a.parseXML(e);if(a.a.isObject(t)){var n=t.command;l.a.trigger("cloudServer:"+n,t)}}},onSocketOpen:function(e){this.trigger("open",this.server,e),this._deferred.resolve(this.server,e)},onSocketClose:function(e){
this.close(),this.trigger("close",this.server,e),this._deferred.reject(this.server,e)},onSocketError:function(e){this.close(),this.trigger("error",this.server,e),this._deferred.reject(this.server,e)},onSocketMessage:function(e){this.handleResponse(e.data)},onPollSuccess:function(e,t,n){this.trigger("open",this.server,e),this.lastModified=n.getResponseHeader("Last-Modified"),this.eTag=n.getResponseHeader("ETag"),this.handleResponse(e),this.poll()},onPollError:function(e){this.pollRequest.aborting||this.trigger("error",this.server,e);
}});t.a=g},function(e,t,n){"use strict";function i(e){var t={};for(var n in e){var i=e[n];t[i]={relationClass:r.a}}return a.a.extend({name:"EntitiesModel",sessionRelations:t})}var a=n(18),r=n(1099);t.a=i},function(e,t,n){"use strict";function i(e,t){return n.i(d.a)(e)?a(e,t):u.a.isArray(e)?r(e,t):e===t}function a(e,t){for(var n=e.possibleEntityContainers,a=n?n.length:0,r=0;r<a;r++){var s=n[r],o=e[s];if(i(o,t))return!0}return!1}function r(e,t){for(var n=0,a=e.length;n<a;n++){var r=e[n];if(i(r,t))return!0;
}return!1}function s(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=null!=t.budget?t.budget:p,r=n.i(h.a)(),s=e.entities,o=l()(s),c=o.length,u={};++f<c;){var d=o[f],m=s[d],v=l()(m),y=v.length;for(g+1>=y&&f+1>=c&&(f=-1);++g<y;){var b=v[g];if(i(e,b)||(u[d]||(u[d]=[]),u[d].push(b)),n.i(h.a)()-r>=a)return f--,u}g=-1}return f=-1,u}var o=n(66),l=n.n(o),c=n(2),u=n.n(c),d=n(180),h=n(726);t.a=s;var p=1e3/60,f=-1,g=-1},function(e,t,n){"use strict"},function(e,t,n){"use strict"},function(e,t,n){
"use strict";function i(e){var t=e.toUpperCase(),n=t.match(/(\d{4})S/);if(n){var i=n[1];t=t.replace(i+"S",i+"s")}return t}t.a=i},function(e,t,n){"use strict"},function(e,t,n){"use strict"},function(e,t,n){"use strict";function i(e){for(var t="",n=0,i=e.length;n<i;n++){var a=e.charAt(n),r=a.toUpperCase();t+=0===n?r:a===r?" "+r:a}return t}t.a=i},function(e,t,n){"use strict";var i=(n(337),n(270),n(338),n(1296),n(734),n(735));n.d(t,"b",function(){return i.default});var a=n(1292);n.d(t,"c",function(){
return a.a});var r=(n(1287),n(1288),n(733),n(336));n.d(t,"a",function(){return r.default});n(214),n(1290),n(1291),n(462),n(737),n(463)},function(e,t,n){"use strict";function i(e){return e?e.match(/^[^A-Z]+|[A-Z]+(?![^A-Z])|[A-Z][^A-Z]+/g)||[]:[]}t.a=i},function(e,t,n){"use strict";function i(e){return e?r()("<p>"+e+"<p>").text():""}var a=n(5),r=n.n(a);t.a=i},function(e,t,n){"use strict";var i=n(93),a=(n.n(i),n(2));n.n(a)},function(e,t,n){"use strict";function i(){return a.replace(r,s)}var a="00000000-0000-4000-8000-000000000000",r=/0/g,s=function(){
return(0|16*Math.random()).toString(16)};t.a=i},function(e,t,n){"use strict";function i(e){function t(t){var i=r.a.escape(n.i(s.default)(t.tag,e.maxLen));if(!c||!t.id)return i;var a=["#!/server/"+encodeURIComponent(l.server.id),"/section/"+encodeURIComponent(l.id),"/filter","/"+encodeURIComponent(u.id),"/"+encodeURIComponent(e.key),"/"+encodeURIComponent(t.id),"/"+encodeURIComponent(t.tag)];return'<a class="pivot-link" href="'+a.join("")+'">'+i+"</a>"}var i=r.a.reject(e.tags,function(e){return!e.tag;
}),a=e.model,l=a.section,c=l&&l.get("allowAdvancedFilters"),u=o.a.get(a.get("type")),d=e.separator||", ",h="";if(i&&i.length){var p=e.maxTags||i.length;p>i.length&&(p=i.length);for(var f=0;f<p;f++)h+=t(i[f]),f+1<p&&(h+=d)}return h}var a=n(2),r=n.n(a),s=n(462),o=n(36);t.a=i},function(e,t,n){"use strict";function i(e,t){var i=n.i(r.a)(t);if(!i)return e;var a=e.indexOf("?"),s=e.length;return e+=a>-1?a<s-1?"&":"":"?",e+i}function a(e,t){var n=t.type,a=t.filters,r=t.sort,o=s.join(e),l={};return n&&(l.type=n),
r&&(l.sort=r),s.join(i(o,a),l)}var r=n(699),s=n(20);t.a=a},function(e,t,n){"use strict";function i(e,t,n){e.dataTypes.shift();var i,a=r.a.extend({},t,{skipCorsWithRedirect:!0,complete:null,error:null,success:null});return{send:function(e,s){a.error=function(e,t,i){r.a.extend(n,e),s(e.status,t,{alreadyConverted:e.responseText},e.getAllResponseHeaders())},a.success=function(e,l,c){r.a.extend(n,c);var u=c.getResponseHeader("Location");200===c.status&&u&&t&&!t.skipCorsLocationRequest?(a.url=u,i=o.a.ajax(a)):s(c.status,l,{
alreadyConverted:c.responseText},c.getAllResponseHeaders())},i=o.a.ajax(a)},abort:function(){i&&i.abort()}}}var a=n(2),r=n.n(a),s=n(5),o=n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.type,n=e.contentType,i=e.headers,a=e.allowHeadersInUrl,p=e.allowBlacklistedMethodHeaders;if(a&&(!l[t]||p)){var f={},g=!1;if(r.a.each(i,function(e,t){c[t]||(d.test(t)?(g=!0,f[t]=e,delete i[t]):o.a.warn('Did not move header "%s" to query string. This can result in an unnecessary OPTIONS preflight request.',t));
}),g){var m=e.url.match(h),v=m||[null,e.url,null],y=v[1],b=v[2],S=b?b.split("&"):[],w=r.a.partition(S,function(e){return d.test(e)}),M=w[0],I=w[1],C=e.data;"GET"===t&&C&&(I.push(r.a.isString(C)?C:s.stringifyParams(C)),delete e.data),M.forEach(function(e){var t=e.match(d);t&&delete f[t[1]]});var D=s.stringifyParams(f);D&&M.push(D),e.url=y+"?"+I.concat(M).join("&")}n&&!u.test(n)&&o.a.warn('Sending %s request with Content-Type "%s". This can result in an unnecessary OPTIONS preflight request.',t,n)}
}var a=n(2),r=n.n(a),s=n(20),o=n(27);t.a=i;var l={PUT:!0,DELETE:!0},c={Accept:!0,"Accept-Language":!0,"Content-Language":!0,"Content-Type":!0},u=/^(text\/plain|multipart\/form-data|application\/x-www-form-urlencoded)/,d=/(^X\-Plex\-[^=]+)/i,h=/(^[^\?]+)\?(.+$)/},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(10),s=n(739),o=n(1209),l=r.a.View.extend({constructor:function(){r.a.View.prototype.constructor.apply(this,arguments)},initialize:function(){r.a.View.prototype.initialize.apply(this,arguments),
this.pool=new o.a(this)},render:function(){this.isRendered||this.triggerMethod("before:render",this),this.isRendered=!0;var e=this.getLockIndexes();this.pool.lockOrCreate(e,this.createCellView,this),this.scheduleFilling(e),this.prepareCells(e),this.pool.each(this.moveCell,this),this.moveElement(),this.clearVisibleReusedCells()},createCellView:function(e){var t=r.a.getOption(this,"itemView"),n=r.a.getOption(this,"itemViewOptions");a.a.isFunction(n)&&(n=n.call(this,e));var i=new t(n);return i._parentView=this,
i.render(),this.$el.append(i.$el),i},scheduleFilling:function(e){s.a.cancel(this.cid),a.a.each(e,function(e){var t=this.pool.find(e);t.filledWithIndex!==t.id&&s.a.enqueue(function(){var e=this.fillCell(t);return e&&(t.filledWithIndex=t.id),e},this,this.cid)},this)},prepareCells:function(){this.pool.each(this.prepareCell,this)},clearVisibleReusedCells:function(){var e=this.getVisibleBounds();this.pool.each(function(t){var n=t.filledWithIndex===t.id,i=t.filledWithIndex===-1,a=t.id>=e.from&&t.id<=e.to;
!a||n||i||(this.clearCell(t),t.filledWithIndex=-1)},this)},_getImmediateChildren:function(){return a.a.pluck(this.pool.pool,"view")},onClose:function(){s.a.cancel(this.cid),this.pool.close()}});t.a=l},function(e,t,n){"use strict";var i=n(2624),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),c=n(10),u=n(2907),d=n.n(u),h=n(27),p=n(39),f=n(680),g=0,m=f.a.NORMAL,v=3,y=3e3,b=c.a.ItemView.extend({className:"video-subtitles-renderer",template:a.a,initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
n.i(h.a)("[Subtitles] Initializing"),l.a.bindAll(this,"loadSubtitles","renderSubtitles","resizeSubtitles","getPosition","setClockState","onSubtitleFailure"),d.a.debugMode=!1,this.delay=e.delay||g,this.subtitleSize=e.subtitleSize||m,this.rendererOptions=l.a.defaults(e.rendererOptions||{},{enableSvg:!1,preciseOutlines:!1}),this.listenTo(this.model,{"change:state":this.onPlayerStateChange,"change:position":this.onPlayerPositionChange,"change:showFullScreen":this.onShowFullScreenChange}),this.debouncedResize=l.a.debounce(this.resizeSubtitles,200),
this.errorCount=0},loadSubtitles:function(){var e=this;this.loadTimeout&&(this.loadTimeout=clearTimeout(this.loadTimeout));var t=this.model.get("subtitlesUrl");this.positionAtTimeOfRequest=this.model.get("position"),n.i(h.a)("[Subtitles] loading subtitles. position: %s url: %s",this.positionAtTimeOfRequest,t),this.abortStream();var i=this.xhr=new window.XMLHttpRequest,a=new d.a.parser.XhrStream(this.xhr),r=new d.a.parser.StreamParser(a);i.onreadystatechange=function(t){4===t.currentTarget.readyState&&(t.currentTarget.status>=200&&t.currentTarget.status<300?e.errorCount=0:e.onSubtitleFailure());
},i.open("GET",t,!0),i.send(),r.minimalASS.then(this.renderSubtitles,this.onSubtitleFailure)},renderSubtitles:function(e){n.i(h.a)("[Subtitles] Starting to render subtitles"),this.destroySubtitles(),this.clock=new d.a.renderers.AutoClock(this.getPosition,1e3),this.renderer=new d.a.renderers.WebRenderer(e,this.clock,this.el,this.rendererOptions),this.setSubtitleSize(),this.resizeSubtitles(),this.setClockState(),s()(window).on("resize",this.debouncedResize)},destroySubtitles:function(){this.loadTimeout&&(this.loadTimeout=clearTimeout(this.loadTimeout)),
this.clock&&(this.clock.disable(),this.clock=null),this.renderer&&(this.renderer.disable(),this.renderer=null)},abortStream:function(){this.xhr&&(n.i(h.a)("[Subtitles] Aborting existing xhr."),this.xhr.onreadystatechange=null,this.xhr.abort(),this.xhr=null)},setSubtitleSize:function(){var e=this.renderer._ass._properties,t=this.subtitleSize/100;e._resolutionX/=t,e._resolutionY/=t},resizeSubtitles:function(){n.i(h.a)("[Subtitles] Resizing subtitles"),this.renderer.resize(this.$el.width(),this.$el.height());
},getPosition:function(){var e=this.model.get("position"),t=this.model.get("offset")||0,n=(e-t+this.delay)/1e3,i=n%1e3;if(i){var a=this.clock.currentTime,r=Math.floor(a);if(r===n)return a}return n},setClockState:function(){var e=this.clock;if(e){var t=p.a.states,i=this.model.get("state");switch(i){case t.BUFFERING:case t.PAUSED:n.i(h.a)("[Subtitles] Clock State: paused"),e.pause();break;case t.PLAYING:n.i(h.a)("[Subtitles] Clock State: playing"),e.play();break;case t.STOPPED:case t.ERROR:n.i(h.a)("[Subtitles] Clock State: disabled"),
e.disable()}}},shouldResetStream:function(e){var t=e.get("position"),n=e.previous("position"),i=this.positionAtTimeOfRequest,a=t-n,r=e.get("state")===p.a.states.PLAYING;if(r&&this._resetLater)return this._resetLater=!1,!0;var s=!1;return(!this.xhr||a>0&&a>1e4||t<i)&&(s=!0),r||(s=!1,this._resetLater=!0),s},onPlayerStateChange:function(e,t){this.setClockState()},onPlayerPositionChange:function(e,t){this.shouldResetStream(e)&&this.loadSubtitles()},onShowFullScreenChange:function(e,t){this.resizeSubtitles();
},onSubtitleFailure:function(){if(!this.model.get("stopped")&&!this.isClosed){var e=this.xhr.readyState,t=this.xhr.status;0!==t&&this.errorCount++,h.a.error("[Subtitles] Request failed. statusCode:%s state:%s errorCount:%s %s",t,e,this.errorCount,this.xhr.errorString||""),this.errorCount>v?this.model.set("softSubtitlesFailed",!0):this.loadTimeout=setTimeout(this.loadSubtitles,y)}},onClose:function(){n.i(h.a)("[Subtitles] Closing"),s()(window).off("resize",this.debouncedResize),this.destroySubtitles(),
this.abortStream()}});t.a=b},function(e,t,n){"use strict";var i=n(2625),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(105),d=c.a.ItemView.extend({className:"video-image-overlay",template:a.a,initialize:function(e){this.videoAspectRatio=e.videoAspectRatio,this.overscan=e.overscan,this.throttledSetStyles=s.a.throttle(this.whenRendered(this.setStyles),100),this.image=new u.a({model:this.model,modelAttribute:"key",width:this.model.get("width"),height:this.model.get("height"),background:!0}),this.setStyles(),
"video"===this.model.get("relative")&&l()(window).on("resize",this.throttledSetStyles)},setStyles:function(){if("video"===this.model.get("relative")&&!this.videoAspectRatio)return void this.$el.addClass("hidden");var e=this.model.get("alignHorizontal"),t=this.model.get("alignVertical"),n=this.model.get("width"),i=this.model.get("height"),a=0,r=0,s=this.getOffset(),o={position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto",backgroundSize:n+"px "+i+"px",backgroundRepeat:"no-repeat",width:n,
height:i};"center"===e?(o.left="50%",a="-50%"):"left"===e?o.left=s.x:"right"===e&&(o.right=s.x),"middle"===t?(o.top="50%",r="-50%"):"top"===t?o.top=s.y:"bottom"===t&&(o.bottom=s.y),o.transform="translate("+a+", "+r+")",o.marginTop=this.model.get("marginTop")||0,o.marginRight=this.model.get("marginRight")||0,o.marginBottom=this.model.get("marginBottom")||0,o.marginLeft=this.model.get("marginLeft")||0,this.$el.css(o),this.$el.removeClass("hidden")},getOffset:function(){var e={x:0,y:0};if("video"===this.model.get("relative")){
var t=l()(window).width(),n=l()(window).height(),i=t/n;if(this.videoAspectRatio>i){var a=t/this.videoAspectRatio;e.y=(n-a)/2}else{var r=n*this.videoAspectRatio;e.x=(t-r)/2}}return this.overscan&&(e.x+=this.overscan.x,e.y+=this.overscan.y),e},onRender:function(){this.image.setElement(this.$el)},onClose:function(){l()(window).off("resize",this.throttledSetStyles),this.image.close()}});t.a=d},function(e,t,n){"use strict";var i=n(2626),a=n.n(i),r=n(10),s=n(637),o=n(1304),l=r.a.CompositeView.extend({className:"video-image-overlays-container",
template:a.a,itemView:o.a,itemViewContainer:".video-player-image-overlays",itemViewOptions:function(){return{videoAspectRatio:this.getVideoAspectRatio(),overscan:this.overscan}},modelEvents:{"change:media":"onMediaChange","change:videoDimensions":"onVideoDimensionsChange"},overscan:null,initialize:function(e){e||(e={}),this.overscan=e.overscan||this.overscan,this.collection=new s.a,this.populateCollection()},populateCollection:function(){var e=this.model.get("metadataItem"),t=e&&e.get("overlays");
t?this.collection.reset(t.models):this.collection.reset()},getVideoAspectRatio:function(){var e=this.model.get("videoDimensions");if(e)return e.width/e.height},onMediaChange:function(e,t){this.populateCollection()},onVideoDimensionsChange:function(e,t){var n=this.getVideoAspectRatio();n&&this.children.each(function(e){var t=e.model;"video"===t.get("relative")&&(e.videoAspectRatio=n,e.setStyles())})}});t.a=l},function(e,t,n){"use strict";var i=n(4),a=n(216),r=a.a.extend({serializeData:function(){return{
title:n.i(i.default)("This channel is not responding.")}}});t.a=r},function(e,t,n){"use strict";var i=n(216),a=i.a.extend({initialize:function(e){this.title=e.title,this.subtitle=e.subtitle,this.message=e.message},serializeData:function(){return{title:this.title,subtitle:this.subtitle,message:this.message}}});t.a=a},function(e,t,n){"use strict";var i=n(4),a=n(216),r=a.a.extend({initialize:function(e){this.type=e.type||"404"},serializeData:function(){var e,t;return"404"===this.type?(e=n.i(i.default)("You must be lost."),
t=n.i(i.default)("This page doesn't exist.")):"server"===this.type?(e=n.i(i.default)("Media server not found."),t=n.i(i.default)("The server you're trying to access doesn't seem to exist.")):(e=n.i(i.default)("Media not found."),t=n.i(i.default)("The media you're trying to access doesn't seem to exist.")),{title:e,subtitle:t}}});t.a=r},function(e,t,n){"use strict";var i=n(216),a=i.a.extend({});t.a=a},function(e,t,n){"use strict";var i=n(4),a=n(216),r=a.a.extend({serializeData:function(){return{title:n.i(i.default)("No soup for you!"),
subtitle:n.i(i.default)("The server you're trying to access doesn't want to let you in. Make sure you're signed in as a user with access to this server.")}}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(8),o=n(216),l=o.a.extend({modelEvents:{"change:isResolved":"onResolvedChange"},serializeData:function(){var e,t,i=this.model,s=i.get("friendlyName");return i.get("cloud")?i.get("isDownForMaintenance")?(e=n.i(r.default)("Plex is down for maintenance."),t=n.i(r.default)("Don't worry, it'll be back soon.")):(e=n.i(r.default)("Plex is not reachable."),
t=n.i(r.default)("Make sure your server has an internet connection and any firewalls or other programs are set to allow access.")):(e=n.i(r.default)("Server unavailable."),t=s?n.i(r.default)("We couldn't reach \"{1}\". Make sure it's online and try again.",a.a.escape(s)):n.i(r.default)("We couldn't reach this server. Make sure it's online and try again.")),{title:e,subtitle:t}},onResolvedChange:function(e,t){t&&s.a.trigger("navigate:refresh")}});t.a=l},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(944),f=n.n(p),g=n(27),m=n(33),v=n(39),y=n(744),b=function(e){
function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onElementChange=function(e){r._hls.on(f.a.Events.MEDIA_ATTACHED,r.onMediaAttached),r._hls.on(f.a.Events.MANIFEST_PARSED,r.onManifestParsed),r._hls.on(f.a.Events.ERROR,r.onError),r._hls.attachMedia(e)},r.onMediaAttached=function(){r._hls.loadSource(r.props.src)},r.onManifestParsed=function(){r.setState({isReadyToPlay:!0})},r.onError=function(e,t){if(t.fatal){var n=t.type===f.a.ErrorTypes.NETWORK_ERROR,i=t.type===f.a.ErrorTypes.MEDIA_ERROR,a=!n&&!i;
r._failCount+=1,r._failCount>3||a?r.onMediaStateChange(v.a.mediaStates.ERROR):n?(g.a.warn("[Player] HLS Network Error - attempting recovery"),r._hls.startLoad()):i&&(g.a.warn("[Player] HLS Media Error - attempting recovery"),r._failCount>1&&r._hls.swapAudioCodec(),r._hls.recoverMediaError())}},r.onMediaStateChange=function(e){e===v.a.mediaStates.READY&&(r._failCount=0),r.props.onMediaStateChange(e)},n.i(m.a)(f.a.isSupported(),"Attempted to use HLSMedia without hls.js support"),r.state={isReadyToPlay:!1
},r}return u()(t,e),t.prototype.componentWillMount=function(){this._hls=new f.a,this._failCount=0},t.prototype.componentWillUnmount=function(){this._hls.destroy(),this._hls=null},t.prototype.render=function(){return h.a.createElement(y.a,a()({isReadyToPlay:this.state.isReadyToPlay,onElementChange:this.onElementChange},this.props,{onMediaStateChange:this.onMediaStateChange}))},t}(d.Component);t.a=b},function(e,t,n){"use strict";function i(){function e(){var e=void 0;return i.length?e=i.shift():(e=n+o,
o++),e}function t(e){delete a[e]}var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=[],a={},s={},o=0;return{getKeys:function(n,o,l){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=arguments[4];r.a.each(a,function(e,t){var a=e.item;if(null===a)i.push(t);else{var d=r.a.isString(a)?a:a[u],h=l.indexOf(a)+c;(h<n||h>o)&&(i.push(t),delete s[d])}});for(var d=n;d<=o;d++){var h=l[d-c]||null,p=h&&(r.a.isString(h)?h:h[u]),f=h&&s[p];f||(f=e(),h&&(s[p]=f)),a[f]={index:d,item:h}}
return i.forEach(t),i.length=0,r.a.extend({},a)}}}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.activeConnection,i=!1,r=void 0;e.isConnected&&t?r=e.isCloudSyncServer?n.i(a.default)("Cloud"):e.isOutOfDate?n.i(a.default)("Needs Update"):t.relay?n.i(a.default)("Indirect"):t.isPrivate?n.i(a.default)("Nearby"):n.i(a.default)("Remote"):e.isRelayed?r=n.i(a.default)("Indirect"):e.isUnavailable?r=n.i(a.default)("Unavailable"):(i=!0,r=n.i(a.default)("Connecting"));var s=e.sourceTitle?r+" ("+e.sourceTitle+")":r;
return{isConnecting:i,status:r,statusWithSource:s}}var a=n(4);t.a=i},function(e,t,n){"use strict";function i(e,t){return Math.max(Math.min(e,t-1),0)}t.a=i},function(e,t,n){"use strict";var i={},a={getPageKey:function(){return window.location.hash},get:function(e){return i[e]},set:function(e,t){i[e]=t},remove:function(e){delete i[e]},clear:function(){i={}}};t.a=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"UP",function(){return i}),n.d(t,"RIGHT",function(){
return a}),n.d(t,"DOWN",function(){return r}),n.d(t,"LEFT",function(){return s}),n.d(t,"all",function(){return o});var i="up",a="right",r="down",s="left",o=[i,a,r,s]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"NONE",function(){return i}),n.d(t,"VERTICAL",function(){return a}),n.d(t,"HORIZONTAL",function(){return r}),n.d(t,"OMNI",function(){return s}),n.d(t,"all",function(){return o});var i="none",a="vertical",r="horizontal",s="omni",o=[i,a,r,s]},function(e,t,n){
"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"TOP_LEFT",function(){return i}),n.d(t,"TOP_CENTER",function(){return a}),n.d(t,"TOP_RIGHT",function(){return r}),n.d(t,"BOTTOM_LEFT",function(){return s}),n.d(t,"BOTTOM_CENTER",function(){return o}),n.d(t,"BOTTOM_RIGHT",function(){return l}),n.d(t,"MIDDLE_LEFT",function(){return c}),n.d(t,"MIDDLE_RIGHT",function(){return u}),n.d(t,"all",function(){return d});var i="topLeft",a="topCenter",r="topRight",s="bottomLeft",o="bottomCenter",l="bottomRight",c="middleLeft",u="middleRight",d=[i,a,r,s,o,l,c,u];
},function(e,t,n){"use strict";var i=n(8),a=n(34),r=n(808),s=a.a.extend({shortcuts:[{keys:["?"],fn:"help",group:"navigation",label:"Open Keyboard Shortcuts"},{keys:["esc"],fn:"escape",group:"navigation",label:"Close Modal or Close Player"},{keys:["`"],fn:"sidebar",group:"navigation",label:"Toggle Sidebar"},{keys:["g d"],fn:"dashboard",group:"navigation",label:"Navigate to Dashboard"},{keys:["g s"],fn:"settings",group:"navigation",label:"Navigate to Settings"},{keys:["g a"],fn:"activity",group:"navigation",
label:"Navigate to Activity"},{keys:["g w"],fn:"watchLater",group:"navigation",label:"Navigate to Watch Later"},{keys:["g r"],fn:"recommendations",group:"navigation",label:"Navigate to Recommended"},{keys:["g u"],fn:"users",group:"navigation",label:"Navigate to Users"},{keys:["/"],fn:"search",group:"actions",label:"Focus Search"},{keys:["p"],fn:"play",group:"actions",label:"Open Player"},{keys:["e"],fn:"edit",group:"actions",label:"Edit Library or Edit Item"},{keys:["#","del"],fn:"remove",group:"actions",
label:"Delete Library or Delete Item"},{keys:["shift+s"],fn:"save",group:"actions",label:"Save Changes"},{keys:["r"],fn:"refresh",group:"actions",label:"Update Library or Refresh Item"},{keys:["a"],fn:"analyze",group:"actions",label:"Analyze Library or Analyze Item"},{keys:["w"],fn:"markWatched",group:"actions",label:"Mark as Watched"},{keys:["u"],fn:"markUnwatched",group:"actions",label:"Mark as Unwatched"},{keys:["s"],fn:"sync",group:"actions",label:"Sync"},{keys:["i"],fn:"info",group:"actions",
label:"Info"},{keys:["space","play","pause","play_pause"],fn:"playPause",group:"player",label:"Play or Pause"},{keys:["\\"],fn:"toggleFullScreen",group:"player",label:"Toggle FullScreen"},{keys:["down"],fn:"decreaseVolume",group:"player",label:"Decrease Volume"},{keys:["up"],fn:"increaseVolume",group:"player",label:"Increase Volume"},{keys:[",","shift+left"],fn:"seekBackward",group:"player",label:"Seek Backward (10 seconds)"},{keys:[".","shift+right"],fn:"seekForward",group:"player",label:"Seek Forward (30 seconds)"
},{keys:["[","alt+left"],fn:"stepBackward",group:"player",label:"Step Backward (10 minutes)"},{keys:["]","alt+right"],fn:"stepForward",group:"player",label:"Step Forward (10 minutes)"},{keys:["left","step_backward"],fn:"skipPrevious",group:"player",label:"Skip to Previous Item"},{keys:["right","step_forward"],fn:"skipNext",group:"player",label:"Skip to Next Item"}],triggerShortcut:function(e){var t="shortcut:"+e;if(i.a.hasListener(t))return i.a.trigger(t),!1},help:function(e){i.a.trigger("show:modal",new r.a({
shortcuts:this.shortcuts}))},escape:function(e){i.a.hasListener("shortcut:escape")?i.a.trigger("shortcut:escape"):i.a.hasListener("shortcut:stop")&&i.a.trigger("shortcut:stop")},sidebar:function(e){i.a.trigger("shortcut:sidebar")},dashboard:function(e){i.a.trigger("navigate","dashboard")},settings:function(e){i.a.trigger("navigate","settings")},activity:function(e){i.a.trigger("navigate","activity")},watchLater:function(e){i.a.trigger("navigate","userPlaylist",{key:"queue"})},recommendations:function(e){
i.a.trigger("navigate","userPlaylist",{key:"recommendations"})},users:function(e){i.a.trigger("navigate","users")},search:function(e){return this.triggerShortcut("search")},edit:function(e){return this.triggerShortcut("edit")},play:function(e){return this.triggerShortcut("play")},remove:function(e){return this.triggerShortcut("delete")},save:function(e){return this.triggerShortcut("save")},refresh:function(e){return this.triggerShortcut("refresh")},analyze:function(e){return this.triggerShortcut("analyze");
},markWatched:function(e){return this.triggerShortcut("markWatched")},markUnwatched:function(e){return this.triggerShortcut("markUnwatched")},sync:function(e){return this.triggerShortcut("sync")},info:function(e){return this.triggerShortcut("info")},playPause:function(e){return this.triggerShortcut("playPause")},toggleFullScreen:function(e){return this.triggerShortcut("toggleFullScreen")},decreaseVolume:function(e){return this.triggerShortcut("decreaseVolume")},increaseVolume:function(e){return this.triggerShortcut("increaseVolume");
},seekBackward:function(e){return this.triggerShortcut("seekBackward")},seekForward:function(e){return this.triggerShortcut("seekForward")},stepBackward:function(e){return this.triggerShortcut("stepBackward")},stepForward:function(e){return this.triggerShortcut("stepForward")},skipPrevious:function(e){return this.triggerShortcut("skipPrevious")},skipNext:function(e){return this.triggerShortcut("skipNext")}});t.a=s},function(e,t,n){"use strict";var i=n(14),a=n(34),r=n(1093),s=a.a.extend({mixins:r.a,
constructor:function(){this.basePath="translations/",this.translations={},n.i(i.e)("appModel").done(this.onAppModelRegistered.bind(this))},onAppModelRegistered:function(e){var t=e.get("settings");t.on("change:language",function(e,t){this.load(t)},this)}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(950),s=n.n(r),o=n(1041),l=a.a.extend({},o.a,{init:function(e){s.a.config(e,{shouldSendCallback:function(e){return/(main|vendors)[\w\d\.]*\.js/.test(e.culprit)}})}});t.a=l},function(e,t,n){
"use strict";var i=n(416),a=n(1322),r=n(618),s=n(1044),o=n(39),l=n(249),c=n(1333),u=n(1327),d=n(1046),h={registerAll:function(){i.a.register(a.a),r.a.register(new s.a);var e=new c.a,t=new u.a;l.a.register({protocol:"plex",type:"*",create:function(t,n){return e.createController(t,n)}}),l.a.register({protocol:"cast",type:"*",create:function(e,n){return t.createController(e,n)}}),l.a.register({protocol:"local",type:o.a.types.PHOTO,create:function(e){return new d.a({type:e})}})}};t.a=h},function(e,t,n){
"use strict";var i=n(14),a=n(1323),r=n(81),s=n(315),o=n(1048),l=n(1049),c=n(248),u=n(1325),d=n(417),h=n(1320),p=n(314),f=n(473),g=n(39),m=n(249),v=n(1331),y=n(1330),b=n(1334),S=n(415),w=n(1038),M={registerAll:function(){var e=u.a.init();e.done(function(e){return c.a.register(e)});var t=new o.a;return r.a.register(t),s.a.register(new l.a),d.a.register(new h.a),p.a.register(f.a),m.a.register({protocol:"local",type:g.a.types.VIDEO,create:function(e){return new v.a({type:e})}}),m.a.register({protocol:"local",
type:g.a.types.MUSIC,create:function(e){return new y.a({type:e})}}),i.c("companionPlayerProfile",b.a),S.a.register(new w.a),a.a.registerAll(),e}};t.a=M},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(14),s=n(32),o={init:function(){var e=n.i(r.a)("appModel"),t=window.innerWidth+"x"+window.innerHeight,i=window.screen.width+"x"+window.screen.height,o={"X-Plex-Product":"Plex Web","X-Plex-Version":"2.13.0","X-Plex-Client-Identifier":e.get("clientID"),"X-Plex-Platform":s.a.name,"X-Plex-Platform-Version":s.a.version,
"X-Plex-Device":s.a.platform,"X-Plex-Device-Name":"Plex Web ("+s.a.name+")","X-Plex-Device-Screen-Resolution":t+","+i};return e.on("change:clientID",function(e,t){o["X-Plex-Client-Identifier"]=t}),a.a.Deferred().resolve(o).promise()}};t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(14),l=n(39),c=n(95),u=n(452),d=n(460),h=n(465),p=n(750),f=n(751),g=f.a.extend({modelDefaults:function(){var e=f.a.prototype.modelDefaults.apply(this,arguments),t=this.model.get("playQueue");return a.a.extend(e,{
canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:this.type!==l.a.types.PHOTO,canSetAudioStream:!0,canSetSubtitleStream:!0,canSetQuality:!0,showPlayQueue:t.supports({remoteRefresh:!0})})},load:function(e){this.model=e.model,this.mediaElement=e.mediaElement||document.createElement(this.type),this.reset(this.model.get("playQueueItem")),this.listenTo(this.manager,{timeline:this.onTimeline,progress:this.onProgress,error:this.onError,volume:this.onVolumeUpdate}),this.listenTo(this.model,{"change:metadataItem":this.onMetadataItemChange,
"change:mediaIndex":this.onMetadataItemChange,"change:partIndex":this.onMetadataItemChange,"change:qualityIndex":this.onQualityIndexChange,"change:audioStreamID":this.onAudioStreamIDChange,"change:subtitleStreamID":this.onSubtitleStreamIDChange,"change:finished":this.onFinishedChange});var t=this.model.get("playQueue");if(this.listenTo(t.get("collection"),"reset",this.onPlayQueueChange),e.silent)return this.manager.updatePlayer(),s.a.Deferred().resolve().promise();var i=this.model.get("metadataItem"),r=i.server,l=n.i(o.a)("appModel"),u=l.get("settings"),h=l.get("primaryServer"),p=e.offset/1e3||0,f=c.a.getCurrentQuality(i,u),g=l.get("user"),m={
offset:p,directPlay:u.get("directPlay"),directStream:u.get("directStream"),bitrate:f.bitrate,subtitleSize:u.get("subtitleSize"),audioBoost:u.get("audioBoost"),server:this.getServerInfo(r,{isRequired:!0}),user:{username:g.get("username")}};if(!m.server)return s.a.Deferred().reject().promise();var v=[];v.push(this.getTransientTokenFor(r,m.server)),h&&r.id!==h.id&&(m.primaryServer=this.getServerInfo(h),m.primaryServer&&v.push(this.getTransientTokenFor(h,m.primaryServer)));var y=s.a.Deferred().resolve().promise();
return y=t.yieldOwnership({absoluteUrl:!0}).then(function(e){m.containerKey=e}),y=y.then(function(){return n.i(d.a)(v)}),y.done(a.a.bind(function(){var e=new chrome.cast.media.MediaInfo(i.get("key"),this.type);e.customData=m;var t=new chrome.cast.media.LoadRequest(e);t.currentTime=p,t.autoplay=!0,this.manager.loadMedia(t)},this)),y},mirror:function(e){var t=e.item,i=t.server,r=n.i(o.a)("appModel"),l=r.get("primaryServer"),c=r.get("user"),u={server:this.getServerInfo(i,{isRequired:!0}),user:{username:c.get("username")
}};if(!u.server)return s.a.Deferred().reject().promise();var h=[];h.push(this.getTransientTokenFor(i,u.server)),l&&i.id!==l.id&&(u.primaryServer=this.getServerInfo(l),u.primaryServer&&h.push(this.getTransientTokenFor(l,u.primaryServer)));var f=n.i(d.a)(h);return f.done(a.a.bind(function(){var e=new chrome.cast.media.MediaInfo(t.get("key"),this.type);e.customData=u;var n={type:p.a.SHOWDETAILS};n.media=e,this.manager.sendCustomMessage(n)},this)),f},getServerInfo:function(e,t){var n=this.getServerConnection(e,t);
if(n){var i=a.a.extend({machineIdentifier:e.get("originalMachineIdentifier")||e.get("machineIdentifier"),transcoderVideo:e.get("transcoderVideo")||!1,transcoderVideoRemuxOnly:e.get("transcoderVideoRemuxOnly")||!1,transcoderAudio:e.get("transcoderAudio")||!1,version:e.get("shortVersion"),myPlexSubscription:e.get("myPlexSubscription"),isVerifiedHostname:"https"===n.protocol&&!h.a.isValidAddress(n.address)},n);return i}},getTransientTokenFor:function(e,t){var n=this.getTransientToken(e).then(function(e){
t.accessToken=e});return n},play:function(){this.model.set("state",l.a.states.PLAYING),this.manager.sendCustomMessage({type:p.a.PLAY})},pause:function(){this.model.set("state",l.a.states.PAUSED),this.manager.sendCustomMessage({type:p.a.PAUSE})},setPosition:function(e){if(this.canSeek(e)){this.model.set({state:l.a.states.BUFFERING,position:e});var t=e/1e3;this.manager.startSeek(t),this.sendPositionRequest(t)}},sendPositionRequest:a.a.debounce(function(e){this.manager.sendCustomMessage({type:p.a.SEEK,
currentTime:e})},500),setVolume:function(e){this.model.set("volume",e),this.sendVolumeRequest(e/100)},sendVolumeRequest:a.a.debounce(function(e){this.manager.sendSessionCommand("setReceiverVolumeLevel",e),e||this.manager.sendSessionCommand("setReceiverMuted",!0)},200),skipPrevious:function(){this.manager.sendCustomMessage({type:p.a.PREVIOUS})},skipNext:function(){this.manager.sendCustomMessage({type:p.a.NEXT})},skipTo:function(e){this.manager.sendCustomMessage({type:p.a.SKIPTO,key:e})},stop:function(e){
f.a.prototype.stop.apply(this,arguments),this.manager.sendCustomMessage({type:p.a.STOP})},refreshRemotePlayQueue:function(){this.manager.sendCustomMessage({type:p.a.REFRESHPLAYQUEUE})},setStream:function(e,t){this.manager.sendCustomMessage({type:p.a.SETSTREAM,stream:{type:e,id:t}})},setQualityIndex:function(){var e=this.model.get("metadataItem"),t=n.i(o.a)("appModel").get("settings"),i=c.a.getCurrentQuality(e,t);this.manager.sendCustomMessage({type:p.a.SETQUALITY,bitrate:i.bitrate})},onTimeline:function(e){
var t=this.model.get("playQueue"),i=this.model.get("playQueueItem");if(e.containerKey){var r=e.containerKey.split("?")[0],s=a.a.result(t,"url");if(s&&s!==r)return}if(e.key&&e.key!==i.get("key")){var u=t.get("collection");if(i=u.findWhere({key:e.key}),!i)return;this.reset(i)}var d=null;if(e.transcodeServerID){var h=n.i(o.a)("appModel"),p=h.get("servers");d=p.get(e.transcodeServerID)}var f=c.a.getNearestIndexToBitrate(e.bitrate),g=a.a.isNumber(e.audioStreamID)?e.audioStreamID:null,m=a.a.isNumber(e.subtitleStreamID)?e.subtitleStreamID:null;
this.isTimelineChange=!0,this.model.set({mediaIndex:e.mediaIndex,partIndex:e.partIndex,qualityIndex:f,audioStreamID:g,subtitleStreamID:m,transcodeServer:d,state:e.state,ready:!0,loaded:"photo"!==this.type,finished:e.state===l.a.states.STOPPED,errorMessage:e.errorMessage,duration:Math.round(1e3*e.duration),volume:Math.round(e.volume)}),this.model.hasAttr("slideshowState")&&this.model.set("slideshowState",l.a.getSlideshowStateByState(e.state)),this.isTimelineChange=!1,this.onProgress(e.position)},onProgress:function(e){
var t=this.model.get("metadataItem"),i=this.model.get("duration"),a=Math.round(1e3*e);n.i(u.a)(t,a,i),this.model.set("position",a)},onError:function(e){this.model.set({state:l.a.states.ERROR,errorMessage:e})},onQualityIndexChange:function(e,t){var n=e.previous("qualityIndex");null==t||null==n||this.isTimelineChange||this.setQualityIndex()},onVolumeUpdate:function(e){this.model.set("volume",Math.round(e))}});t.a=g},function(e,t,n){"use strict";var i=n(93),a=n.n(i),r=n(2),s=n.n(r),o=n(14),l=n(4),c=n(8),u=n(32),d=n(326),h=n(39),p=n(785),f=n(750),g=n(27),m=n(752),v=n(640),y=n(1326),b=m.a.extend({
protocol:"cast",namespace:"urn:x-cast:plex",progressDelay:100,controller:y.a,sessionWrapped:["loadMedia","sendSessionCommand","sendCustomMessage"],mediaSessionWrapped:["sendMediaCommand","startSeek"],appID:function(){var e=n.i(o.a)("appModel").get("settings"),t=e.get("chromecastAppID"),i=e.get("chromecastCustomAppID");return t===p.a.CUSTOM&&i?i:t||p.a.PRODUCTION},initialize:function(){if("chrome"===u.a.id){s.a.bindAll(this,"onApiAvailable","onApiLoadSuccess","onApiLoadError","onReceiverAvailable","onSessionAvailable","onSessionError","onSessionUpdate","onMediaSessionDiscovered","onMediaSessionError","onMediaSessionUpdate"),
m.a.prototype.initialize.apply(this,arguments),this.sessionBacklog=new d.a,this.sessionBacklog.wrapAll(this.sessionWrapped,function(){return!!this.session},this),this.mediaSessionBacklog=new d.a,this.mediaSessionBacklog.wrapAll(this.mediaSessionWrapped,function(){return!!this.mediaSession},this),this.listenTo(c.a,"cast:launch",this.onLaunch),window.__onGCastApiAvailable=this.onApiAvailable;var e=document.createElement("script");e.src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js",document.head.appendChild(e);
}},load:function(){var e=n.i(o.a)("appModel").get("settings");e.populate({reset:!0}).always(s.a.bind(function(){var e=s.a.result(this,"appID"),t=new chrome.cast.SessionRequest(e),n=new chrome.cast.ApiConfig(t,this.onSessionAvailable,this.onReceiverAvailable);chrome.cast.initialize(n,this.onApiLoadSuccess,this.onApiLoadError)},this))},stop:function(){this.session&&this.session.stop(null,this.onSessionStopError),m.a.prototype.stop.apply(this,arguments)},loadMedia:function(e){n.i(g.a)("[Cast] Load media command"),
this.session.loadMedia(e,this.onMediaSessionDiscovered,this.onMediaSessionError)},sendSessionCommand:function(e,t){n.i(g.a)("[Cast] Sending session command: "+e),this.session[e](t,null,this.onMessageError)},sendMediaCommand:function(e,t){n.i(g.a)("[Cast] Sending media command: "+e),this.mediaSession[e](t,null,this.onMessageError)},sendCustomMessage:function(e){n.i(g.a)("[Cast] Sending custom message: "+e.type),e.type===f.a.SEEK&&(this.seeking=!1),this.session.sendMessage(this.namespace,e,null,this.onMessageError);
},startSeek:function(e){this.seeking=!0,this.mediaSession.playerState=chrome.cast.media.PlayerState.BUFFERING,this.mediaSession.currentTime=e},error:function(){var e=n.i(o.a)("appModel");c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem connecting to this player.")}),e.set("primaryPlayer",null)},updatePlayer:function(){clearInterval(this.progressInterval);var e=this.mediaSession.media,t=this.mediaSession.customData;if(e&&t){var n=s.a.extend({machineIdentifier:t.server.machineIdentifier,
state:h.a.getStateByCastState(this.mediaSession.playerState),duration:e.duration,position:this.mediaSession.currentTime,volume:this.getVolumeLevel(this.session.receiver.volume)},s.a.omit(t,["server","primaryServer","user"]));n.state===h.a.states.PLAYING&&"photo"!==e.contentType&&(this.progressInterval=setInterval(s.a.bind(this.onProgress,this),this.progressDelay)),this.mediaSession.idleReason===chrome.cast.media.IdleReason.ERROR&&(n.state=h.a.states.ERROR,n.errorMessage=t.errorMessage),this.trigger("timeline",n),
this.updateNowPlaying(n)}},updateVolumeState:function(){this.session&&this.trigger("volume",this.getVolumeLevel(this.session.receiver.volume))},getVolumeLevel:function(e){return e.muted?0:100*e.level},resetSession:function(){this.session&&(this.session.removeUpdateListener(this.onSessionUpdate),this.session=null),this.sessionBacklog.clear()},resetMediaSession:function(){this.mediaSession&&(this.mediaSession.removeUpdateListener(this.onMediaSessionUpdate),this.mediaSession=null),clearInterval(this.progressInterval),
this.mediaSessionBacklog.clear()},onApiAvailable:function(e,t){e?this.load():g.a.warn("[Cast] "+t)},onApiLoadSuccess:function(){var e=n.i(o.a)("appModel");n.i(g.a)("[Cast] Loaded the cast api"),e.set("isCastApiAvailable",!0)},onApiLoadError:function(e){var t=n.i(o.a)("appModel");g.a.error("[Cast] Unable to load the cast api: "+a()(e)),t.set("isCastApiAvailable",!1)},onReceiverAvailable:function(e){var t=n.i(o.a)("appModel");e===chrome.cast.ReceiverAvailability.AVAILABLE?(n.i(g.a)("[Cast] Receivers are available"),
t.set("isCastDeviceAvailable",!0)):(g.a.warn("[Cast] No receivers are available"),t.set("isCastDeviceAvailable",!1))},onLaunch:function(){this.sessionBacklog.clear(),this.mediaSessionBacklog.clear(),chrome.cast.requestSession(this.onSessionAvailable,this.onSessionError)},onSessionAvailable:function(e){n.i(g.a)("[Cast] Session: "+a()(e));var t=n.i(o.a)("appModel");this.session=e,t.set("primaryPlayer",new v.a(e.receiver,{parse:!0})),e.addUpdateListener(this.onSessionUpdate),e.addMediaListener(this.onMediaSessionDiscovered),
e.media.length&&(n.i(g.a)("[Cast] Found existing media sessions."),this.onMediaSessionDiscovered(e.media[0])),this.sessionBacklog.process()},onSessionError:function(e){"cancel"!==e.code&&g.a.error("[Cast] Unable to launch new session: "+a()(e))},onSessionUpdate:function(e){if(e)return void this.updateVolumeState();n.i(g.a)("[Cast] Session ended"),this.resetSession(),this.resetMediaSession();var t=n.i(o.a)("appModel");t.set("primaryPlayer",null)},onSessionStopError:function(e){g.a.error("[Cast] Unable to stop session: "+a()(e));
},onMediaSessionDiscovered:function(e){return n.i(g.a)("[Cast] Media session discovered: "+a()(e)),e.playerState===h.a.castStates.STOPPED?void this.resetMediaSession():(this.mediaSession=e,e.addUpdateListener(this.onMediaSessionUpdate),this.updatePlayer(),void this.mediaSessionBacklog.process())},onMediaSessionError:function(e){g.a.error("[Cast] Media session error: "+a()(e)),this.resetMediaSession(),e.details&&e.details.customData&&this.trigger("error",e.details.customData.errorMessage)},onMediaSessionUpdate:function(e){
return this.seeking?void(this.mediaSession.playerState=chrome.cast.media.PlayerState.BUFFERING):void this.updatePlayer()},onMessageError:function(e){g.a.warn("[Cast] Message error: "+a()(e))},onProgress:function(){this.trigger("progress",this.mediaSession.getEstimatedTime())}});t.a=b},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(2363),s=n.n(r),o=n(4),l=n(34),c=n(39),u=n(326),d=n(27);s.a.key="fv2ELs9q2gEZxE9uuiAGfhbE9Qhc4DyhZjt1j0GaxUI=";var h=l.a.extend({wrapped:["play","pause","playPause","getState","setVolume","setPosition","resume","stop"],
initialize:function(e){a.a.bindAll(this,"onReady","onPlay","onTime","onBuffer","onPause","onVolume","onComplete","onError"),this.type=e,this.backlog=new u.a,this.backlog.wrapAll(this.wrapped,function(){return!!this.video},this)},load:function(e){this.model=e.model,this.offset=this.model.get("position"),this.backlog.clear(),a.a.defer(a.a.bind(function(){var t=s()("flash-video-placeholder"),i=this.model.get("url");return a.a.isFunction(t.setup)?(d.a.group("Flash Player"),n.i(d.a)("URL: "+i),n.i(d.a)("Autoplay: true"),
n.i(d.a)("Offset: "+this.offset),d.a.groupEnd(),this.model.set("ready",!0),void(this.video=t.setup({file:i,skin:"swf/jwplayer/plex.xml",flashplayer:"swf/jwplayer/jwplayer.swf",stretching:"uniform",width:"100%",height:"100%",volume:100,mute:!1,autostart:e.autoplay,analytics:{enabled:!1},events:{onReady:this.onReady,onPlay:this.onPlay,onTime:this.onTime,onBuffer:this.onBuffer,onPause:this.onPause,onVolume:this.onVolume,onComplete:this.onComplete,onError:this.onError}}))):void this.model.set({state:c.a.states.ERROR,
errorMessage:n.i(o.default)("Your browser does not support video streaming.")})},this))},play:function(){this.video.play(!0)},pause:function(){this.video.pause(!0)},setVolume:function(e){this.video.setVolume(e)},setPosition:function(e){this.video.seek(e/1e3)},resume:function(){n.i(d.a)("resuming at "+this.offset);var e=this.offset;this.offset=null,this.setPosition(e)},stop:function(){this.model.get("loaded")&&this.video.remove(),this.video=null},onReady:function(){this.model.set("loaded",!0),this.setVolume(this.model.get("volume")),
this.backlog.process()},onPlay:function(e){this.model.set("state",c.a.states.PLAYING)},onTime:function(e){return this.offset?void this.resume():(this.model.set("duration",Math.round(1e3*e.duration)),void this.model.set("position",Math.round(1e3*e.position)))},onBuffer:function(){this.model.set("state",c.a.states.BUFFERING)},onPause:function(){this.model.set("state",c.a.states.PAUSED)},onVolume:function(e){this.model.set("volume",e.volume)},onComplete:function(){this.model.set("ended",!0)},onError:function(e){
this.model.set({state:c.a.states.ERROR,errorMessage:e.message})}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(32),s=n(27),o=n(619),l=o.a.extend({load:function(e){o.a.prototype.load.apply(this,arguments),r.a.mobile&&this.model.set("ready",!0)},resume:function(){n.i(s.a)("resuming at "+this.offset);var e=this.offset;this.offset=0,this.autoplay&&(this.mediaElement.resume_pending=!0,this.pause()),this.resumePositionTimeout=setTimeout(a.a.bind(function(){this.setPosition(e)},this),1e3),
this.autoplay&&(this.resumePlayTimeout=setTimeout(a.a.bind(function(){this.mediaElement.resume_pending=!1,this.play()},this),1500))},stop:function(){o.a.prototype.stop.apply(this,arguments),this.resumePositionTimeout=clearTimeout(this.resumePositionTimeout),this.resumePlayTimeout=clearTimeout(this.resumePlayTimeout)},onReady:function(){o.a.prototype.onReady.apply(this,arguments);var e=this.model.get("showEnterFullscreen")||this.model.get("showExitFullscreen");!e&&this.mediaElement.webkitSupportsFullscreen&&this.model.set({
showEnterFullscreen:!0,forceWebkitVideoFullscreen:!0})}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(14),s=n(32),o=n(39),l=n(268),c=n(266),u=n(271),d=n(1045),h=d.a.extend({type:o.a.types.MUSIC,modelDefaults:function(){var e=d.a.prototype.modelDefaults.apply(this,arguments);return a.a.extend(e,{canPlayPause:!0,canStop:!0,canSetVolume:!s.a.mobile,showSeekBar:!0,showShuffle:!0,showRepeat:!0,showLyrics:!0,showPlayQueue:!0})},getPlayerDecision:function(e,t){this.errorTimeout&&(this.errorTimeout=clearTimeout(this.errorTimeout)),
this.backlog.clear();var n=this.getPlayerDecisionPromise(e,t);return n.done(this.onDecisionSuccess),n.fail(this.onDecisionError),n},getPlayerDecisionPromise:function(e,t){t=t||{};var n=r.a("appModel");return l.a.getPlayerDecision(a.a.extend({type:this.type,profile:this.profile,playbackSessionID:this.playbackSessionID,item:e,offset:t.offset,fallbackServer:n.get("primaryServer"),transcoder:u.a,profileExtra:function(e){if(e.transcodeServer.supports("replaceTranscodeTarget"))return c.a.canPlayType("audio",'audio/ogg; codecs="opus"')?"add-transcode-target(replace=true&type=musicProfile&context=streaming&protocol=http&container=ogg&audioCodec=opus)":c.a.canPlayType("audio",'audio/ogg; codecs="vorbis"')?"add-transcode-target(replace=true&type=musicProfile&context=streaming&protocol=http&container=ogg&audioCodec=vorbis)":void 0;
}},t.decisionOverrides))}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(2364),s=n.n(r),o=n(14),l=n(4),c=n(61),u=n(32),d=n(39),h=n(449),p=n(95),f=n(268),g=n(266),m=n(260),v=n(271),y=n(620),b=n(1329),S=n(1328),w=n(149),M=y.a.extend({type:d.a.types.VIDEO,modelDefaults:function(){var e=y.a.prototype.modelDefaults.apply(this,arguments);return a.a.extend(e,{canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:!u.a.mobile,canSetAudioStream:!0,canSetSubtitleStream:!0,canSetQuality:!0,showSeekBar:!0,
showPlayQueue:!0,showEnterFullscreen:c.a.hasFullscreen})},modelOverrides:function(){var e=y.a.prototype.modelOverrides.apply(this,arguments);return this.model.get("playQueue").get("collection").length<1&&(e.showPlayQueue=!1),e},getPlayerDecision:function(e,t){this.backlog.clear();var i=this.populateItem(e);return i=i.then(a.a.bind(function(){var i=n.i(o.a)("appModel"),r=i.get("settings"),s=p.a.getCurrentQuality(e,r),l=f.a.getPlayerDecision(a.a.extend({type:this.type,profile:this.profile,playbackSessionID:this.playbackSessionID,
item:e,media:t.media,part:t.part,offset:t.offset,fallbackServer:i.get("primaryServer"),allowDirectPlay:r.get("directPlay"),allowedAC3Containers:r.get("allowAC3")?"mp4":null,subtitlesBurnLevel:this.model.get("softSubtitlesFailed")?m.a.ALWAYS:r.get("subtitlesBurnLevel"),hasFlash:this.canPlayFlash(),hasNativeHLS:this.canPlayHLS(),useOffsetHLS:!1,hasDASH:this.canPlayDASH(),hasStreamingMKV:this.canPlayStreamingMKV(),minVersionForStreamingMKV:w.a.streamingMKV,quality:s,transcoder:v.a,transcoderOptions:{
directStream:r.get("directStream")?1:0,subtitleSize:r.get("subtitleSize"),audioBoost:r.get("audioBoost")},profileExtra:function(e){var t=[];return r.get("preferAAC")&&t.push("add-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=aac)"),"safari"===u.a.id&&"osx"===u.a.platformID&&n.i(h.a)(u.a.platformVersion,"10.11")&&t.push("append-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=ac3,eac3)"),t.length?t.join("+"):null}},t.decisionOverrides));
return l.done(this.onDecisionSuccess),l.fail(this.onDecisionError),l},this),a.a.bind(function(){this.model.set({state:"error",errorMessage:n.i(l.default)("Plex Media Server is not responding.")})},this))},getSubcontrollerByType:function(e){return n.i(o.a)("metrics").trackEvent({event:"playback:init",properties:{player:e}}),"flash"===e?new S.a(this.type):new b.a(this.type)},canPlayFlash:function(){return s.a.hasFlashPlayerVersion("10")},canPlayHLS:function e(){var t=this.profile.protocols;if(!t||!t.hls)return!1;
var e=g.a.canPlayType("video",t.hls.mimeType),n="Android"===u.a.platform;return e||n},canPlayDASH:function(){var e=this.profile.directPlay;if(!e.hasOwnProperty("mp4"))return!1;var t=n.i(o.a)("appModel").get("settings"),i=g.a.canPlayType("video",e.mp4.mimeType);return t.get("dash")&&i&&c.a.hasMediaSource},canPlayStreamingMKV:function(){var e=n.i(o.a)("appModel").get("settings"),t=this.profile.directPlay,i=g.a.canPlayType("video",t.mp4.mimeType);return e.get("dash")&&"chrome"===u.a.id&&!u.a.mobile&&i;
},getErrorMessage:function(e){var t=y.a.prototype.getErrorMessage.apply(this,arguments);if(e.transcodeServer&&e.transcodeServer.get("isCloudSyncServer"))switch(e.canDirectPlayFailedCheck){case"allowDirectPlay":t+=" "+n.i(l.default)("Please allow Direct Play in Settings > Web > Player > Show Advanced.");break;case"validateProfileProperty:maxBitrate":default:t+=" "+n.i(l.default)("Please increase the Streaming Quality in Settings > Web > Player.")}return t},onDecisionSuccess:function(e){var t=this.getMaxVideoBitrateQualityIndex(e);
if(!t){var i=n.i(o.a)("appModel").get("settings"),a=p.a.getCurrentQuality(e.item,i);t=a.index}this.model.set("qualityIndex",t),y.a.prototype.onDecisionSuccess.apply(this,arguments)}});t.a=M},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(20),l=n(39),c=n(452),u=n(88),d=n(112),h=n(751),p=h.a.extend({modelDefaults:function(){var e=h.a.prototype.modelDefaults.apply(this,arguments),t=this.player.get("protocolCapabilities"),n=a.a.contains(t,"playqueues"),i=this.model.get("playQueue");
return a.a.extend(e,{canStop:!0,showPlayQueue:!!(n&&i&&i.supports({remoteRefresh:!0}))})},load:function(e){this.model=e.model,this.mediaElement=e.mediaElement||document.createElement(this.type),this.reset(this.model.get("playQueueItem")),this.listenTo(this.manager,"timeline",this.onTimeline),this.listenTo(this.model,{"change:metadataItem":this.onMetadataItemChange,"change:mediaIndex":this.onMetadataItemChange,"change:partIndex":this.onMetadataItemChange,"change:audioStreamID":this.onAudioStreamIDChange,
"change:subtitleStreamID":this.onSubtitleStreamIDChange,"change:finished":this.onFinishedChange,"change:repeatAll change:repeatItem":this.onRepeatChange});var t=this.model.get("metadataItem"),i=t.server,r=this.getServerInfo(i,{isRequired:!0});if(!r)return s.a.Deferred().reject().promise();var l=this.model.get("playQueue");if(this.listenTo(l.get("collection"),"reset",this.onPlayQueueChange),e.silent)return s.a.Deferred().resolve().promise();var c=a.a.extend({key:t.get("key"),offset:e.offset||0},r),u=s.a.Deferred().resolve().promise(),h=this.getTransientTokenFor(i,c);
return u=l.yieldOwnership().then(function(e){c.containerKey=e}),u=u.then(function(){return n.i(d.a)(h)}),u=u.then(a.a.bind(function(){var e=o.join("/player/playback/playMedia",c);return this.manager.request(this.player,e)},this))},mirror:function(e){if(a.a.contains(this.player.get("protocolCapabilities"),"mirror")){var t=e.item,i=t.server,r=this.getServerInfo(i,{isRequired:!0});if(!r)return s.a.Deferred().reject().promise();var l=a.a.extend({type:this.type,key:t.get("key")},r),c=n.i(d.a)(this.getTransientTokenFor(i,l));
return c=c.then(a.a.bind(function(){return this.manager.request(this.player,o.join("/player/mirror/details",l))},this))}},getServerInfo:function(e,t){var n=this.getServerConnection(e,t);if(n){var i=a.a.extend({machineIdentifier:e.get("originalMachineIdentifier")||e.get("machineIdentifier")},n);return"myPlex"===i.machineIdentifier&&(i.machineIdentifier="node",i.address="node.plexapp.com"),i}},getTransientTokenFor:function(e,t){var n=this.getTransientToken(e).then(function(e){t.token=e});return n},
reset:function(e){return this.hasStarted=!1,h.a.prototype.reset.apply(this,arguments)},play:function(){return this.model.set("state",l.a.states.PLAYING),this.manager.request(this.player,"/player/playback/play?type="+this.type)},pause:function(){return this.model.set("state",l.a.states.PAUSED),this.manager.request(this.player,"/player/playback/pause?type="+this.type)},setPosition:function(e){if(this.canSeek(e))return this.model.set("position",e),this.sendPositionRequest(e)},sendPositionRequest:a.a.throttle(function(e){
var t={type:this.type,offset:e},n=o.join("/player/playback/seekTo",t);return this.manager.request(this.player,n)},500),setVolume:function(e){this.model.set("volume",e),this.sendVolumeRequest(e)},sendVolumeRequest:a.a.throttle(function(e){var t={type:this.type,volume:e},n=o.join("/player/playback/setParameters",t);return this.manager.request(this.player,n)},500),setRepeat:a.a.debounce(function(e){var t={type:this.type,repeat:e},n=o.join("/player/playback/setParameters",t);return this.manager.request(this.player,n);
},50),setStream:function(e,t){var n=u.a.get(e).key;return this.manager.request(this.player,"/player/playback/setStreams?"+n+"="+t+"&type="+this.type)},refreshRemotePlayQueue:function(){var e=this.model.get("playQueue"),t=this.manager.player.get("protocolCapabilities");if(a.a.contains(t,"playqueues")){var n=e.get("playQueueID");return this.manager.request(this.player,"/player/playback/refreshPlayQueue?playQueueID="+n)}return s.a.Deferred().resolve().promise()},skipPrevious:function(){return h.a.prototype.skipPrevious.apply(this,arguments),
this.manager.request(this.player,"/player/playback/skipPrevious?type="+this.type)},skipNext:function(){return h.a.prototype.skipNext.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipNext?type="+this.type)},skipTo:function(e){return h.a.prototype.skipTo.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipTo?type="+this.type+"&key="+e)},stop:function(e){return h.a.prototype.stop.apply(this,arguments),this.manager.request(this.player,"/player/playback/stop?type="+this.type);
},removeItem:function(){var e=h.a.prototype.removeItem.apply(this,arguments);return e.then(a.a.bind(this.refreshRemotePlayQueue,this))},moveItem:function(){var e=h.a.prototype.moveItem.apply(this,arguments);return e.then(a.a.bind(this.refreshRemotePlayQueue,this))},onTimeline:function(e){if(this.type===e.type&&!e.continuing){var t=this.model.get("playQueue"),i=this.model.get("playQueueItem");if(e.key&&e.key!==i.get("key")){if(i=t.get("collection").findWhere({key:e.key}),!i)return;this.reset(i)}var r=parseInt(e.playQueueVersion,10);
r&&r>t.get("playQueueVersion")&&t.fetch(),e.state!==l.a.states.STOPPED&&(this.hasStarted=!0);var s=parseInt(e.audioStreamID,10),o=parseInt(e.subtitleStreamID,10);this.isTimelineChange=!0,this.model.set({mediaIndex:e.mediaIndex,partIndex:e.partIndex,partCount:e.partCount,audioStreamID:a.a.isNaN(s)?null:s,subtitleStreamID:a.a.isNaN(o)?null:o,state:e.state,ready:!0,loaded:"photo"!==this.type,finished:this.hasStarted&&e.state===l.a.states.STOPPED,duration:e.duration,position:e.time,volume:e.volume,shuffled:e.shuffle,
repeatAll:2===e.repeat,repeatItem:1===e.repeat,canPlayPause:e.controllable.indexOf("playPause")>-1,canStop:e.controllable.indexOf("stop")>-1,canSeek:e.controllable.indexOf("seekTo")>-1,canSetVolume:e.controllable.indexOf("volume")>-1,canSetVideoStream:e.controllable.indexOf("videoStream")>-1,canSetAudioStream:e.controllable.indexOf("audioStream")>-1,canSetSubtitleStream:e.controllable.indexOf("subtitleStream")>-1,canShuffle:e.controllable.indexOf("shuffle")>-1,canRepeat:e.controllable.indexOf("repeat")>-1,
canSkipPrevious:e.controllable.indexOf("skipPrevious")>-1,canSkipNext:e.controllable.indexOf("skipNext")>-1}),this.isTimelineChange=!1,null!=e.time&&n.i(c.a)(i.get("metadataItem"),e.time,e.duration)}}});t.a=p},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(14),l=n(4),c=n(8),u=n(44),d=n(61),h=n(20),p=n(752),f=n(1332),g=p.a.extend({protocol:"plex",controller:f.a,playerRequestedDisconnect:!1,initialize:function(){a.a.bindAll(this,"error","stop"),p.a.prototype.initialize.apply(this,arguments);
},start:function(e){p.a.prototype.start.apply(this,arguments),this.commandID=0,this.stopPolling=!1,this.poll({ignoreDisconnected:!0})},stop:function(){this.stopPolling=!0,this.pollRequest&&this.pollRequest.abort(),this.player&&!this.playerRequestedDisconnect&&this.request(this.player,"/player/timeline/unsubscribe"),this.playerRequestedDisconnect=!1,p.a.prototype.stop.apply(this,arguments)},request:function(e,t,i){i||(i={}),i.skipIncrement||this.commandID++,t=h.join(t,{commandID:this.commandID});var r=d.a.isHostedHttps?e.server:e,o=r.getXHROptions(t);
return o.headers["X-Plex-Target-Client-Identifier"]=e.id,s.a.ajax(o).fail(a.a.bind(function(e){if(!this.stopPolling){var t,i=e.responseText,a=u.a.parseXML(i);t=a&&a.status?a.status:n.i(l.default)("The player is unable to perform this action."),c.a.trigger("show:alert",{type:"error",message:t})}},this))},poll:function(e){e||(e={});var t=h.join("/player/timeline/poll",{wait:e.wait?1:0});this.pollRequest=this.request(this.player,t,{skipIncrement:!0}),this.pollRequest.done(a.a.bind(function(t,n,i){if(this.player.id===i.getResponseHeader("X-Plex-Client-Identifier")){
var a=u.a.parseXML(t);if(u.a.parseArray(a,"Timeline"),a.commandID>=this.commandID&&(this.onTimeline(a.Timeline),!e.ignoreDisconnected&&a.disconnected)){var r=o.a("appModel");return this.playerRequestedDisconnect=!0,void r.set("primaryPlayer",null)}}this.poll({wait:!0})},this)),this.pollRequest.fail(a.a.bind(function(e){this.stopPolling||this.error()},this))},error:function(){var e=o.a("appModel");c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem connecting to this player.")
}),e.set("primaryPlayer",null),e.get("players").fetch({reset:!0})},onTimeline:function(e){a.a.each(e,function(e){u.a.parseInteger(e,["time","duration","volume","repeat"]),u.a.parseBoolean(e,["shuffle","continuing"]),e.controllable?e.controllable=e.controllable.split(","):e.controllable=[],this.trigger("timeline",e),this.updateNowPlaying(e)},this)}});t.a=g},function(e,t,n){"use strict";var i=n(1211),a={video:i.a,music:i.b,photo:i.c};t.a=a},function(e,t,n){"use strict";function i(e){var t=e.channel,n=t.get("identifier"),i=n?"/system/appstore/apps/"+n:t.get("key"),a=i+"/install",s=t.server.getXHROptions(a),o=r.a.ajax(s);
return o.done(function(){t.set("installed",!0)}),o.promise()}var a=n(5),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.channel,i=t.get("identifier"),a=i?"/system/appstore/apps/"+i:t.get("key"),s=a+"/reset",d=t.server.getXHROptions(s),h=o.a.ajax(d);return h.done(function(e){var t,i=r.a.isObject(e)?e:u.a.parseXML(e);t=i.message?i.message:n.i(l.default)("This channel was successfully reset."),c.a.trigger("show:alert",{type:"success",message:t})}),h.fail(function(){c.a.trigger("show:alert",{
type:"error",message:n.i(l.default)("There was a problem resetting this channel.")})}),h.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(44);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.channel,i=t.get("identifier"),a=i?"/system/appstore/apps/"+i:t.get("key"),s=a+"/restart",d=t.server.getXHROptions(s),h=o.a.ajax(d);return h.done(function(e){var t,i=r.a.isObject(e)?e:u.a.parseXML(e);t=i.message?i.message:n.i(l.default)("This channel was successfully restarted."),c.a.trigger("show:alert",{
type:"success",message:t})}),h.fail(function(){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem restarting this channel.")})}),h.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(44);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=o.a.ajax(f);t.done(function(t){var n=r.a.isObject(t)?t:u.a.parseXML(t);a.set("installed",!1),n.message&&!e.skipConfirmation&&c.a.trigger("show:alert",{type:"success",message:n.message}),i.resolve()}),t.fail(function(e){
if(400===e.status){var t=new d.a({title:n.i(l.default)("Unable to Uninstall Channel"),message:n.i(l.default)("This channel could not be uninstalled, but you can disable it in the server settings."),confirmLabel:n.i(l.default)("OK"),cancelLabel:n.i(l.default)("Ignore")});t.promise.done(function(){c.a.trigger("navigate","serverSettings",{serverID:a.server.id,group:"channels"})}),c.a.trigger("show:modal",t)}else c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("This channel could not be uninstalled.")
});i.reject(e)})}var i=o.a.Deferred(),a=e.channel,s=a.get("identifier"),h=s?"/system/appstore/apps/"+s:a.get("key"),p=h+"/uninstall",f=a.server.getXHROptions(p);if(e.skipConfirmation)t();else{var g=new d.a({title:n.i(l.default)("Uninstall Channel"),message:n.i(l.default)("Are you sure you want to uninstall this channel?")}),m=g.promise;m.done(t),m.fail(function(){i.reject()}),c.a.trigger("show:modal",g)}return i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(44),d=n(42);t.a=i},function(e,t,n){
"use strict";function i(e){function t(e){var n=r.a.isObject(e)?e:u.a.parseXML(e);if(!n||!n.message&&!n.Directory)return void i();if(n.message)p||c.a.trigger("show:alert",{type:"success",message:n.message}),s.resolve();else{u.a.parseArray(n,"Directory");var a=n.Directory[0].key,l=o.a.ajax(h.getXHROptions(a));l.done(t),l.fail(i)}}function i(e){p||c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem checking for updates.")}),s.reject(e)}var a,s=o.a.Deferred(),d=e.channel,h=d?d.server:e.server,p=e.silent;
if(d){var f=d.get("identifier"),g=f?"/system/appstore/apps/"+f:d.get("key");a=g+"/update"}else a="/system/appstore/updates";var m=o.a.ajax(h.getXHROptions(a));return m.done(t),m.fail(i),s.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(44);t.a=i},function(e,t,n){"use strict";function i(e){var t=l.a("appModel"),i=t.get("user"),a=i.server,s={url:e.item.get("url")},h=u.join("/pms/playlists/queue/items",s),p=r.a.extend(a.getXHROptions(h),{type:"POST"}),f=o.a.ajax(p).promise();return f.done(function(){
d.a.trigger("show:alert",{type:"success",message:n.i(c.default)("{1} added to Watch Later.",e.item.get("title"))})}),f.fail(function(){d.a.trigger("show:alert",{type:"error",message:n.i(c.default)("There was a problem adding to Watch Later.")})}),f}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(14),c=n(4),u=n(20),d=n(8);t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1051);n.d(t,"testServerConnection",function(){return i.a}),n.d(t,"abortServerConnectionTest",function(){
return i.b}),n.d(t,"populateServerIdentity",function(){return i.c}),n.d(t,"signIn",function(){return i.d}),n.d(t,"signOut",function(){return i.e}),n.d(t,"resetUser",function(){return i.f}),n.d(t,"switchUser",function(){return i.g}),n.d(t,"authenticateWithServer",function(){return i.h}),n.d(t,"authenticateWithHash",function(){return i.i}),n.d(t,"selectStream",function(){return i.j}),n.d(t,"updateWatchedStatus",function(){return i.k}),n.d(t,"deleteFile",function(){return i.l}),n.d(t,"deleteItem",function(){
return i.m}),n.d(t,"resumePlayQueue",function(){return i.n}),n.d(t,"persistPlayQueue",function(){return i.o});var a=n(1365);n.d(t,"refreshMetadata",function(){return a.a});var r=n(1342);n.d(t,"analyzeItems",function(){return r.a});var s=n(1343);n.d(t,"analyzeSection",function(){return s.a});var o=n(1360);n.d(t,"markWatched",function(){return o.a});var l=n(1359);n.d(t,"markUnwatched",function(){return l.a});var c=n(1367);n.d(t,"unmatch",function(){return c.a});var u=n(1366);n.d(t,"splitApart",function(){
return u.a});var d=n(1362);n.d(t,"merge",function(){return d.a});var h=n(1352);n.d(t,"deleteItems",function(){return h.a});var p=n(1353);n.d(t,"deleteMediaItem",function(){return p.a});var f=n(1357);n.d(t,"deleteVersions",function(){return f.a});var g=n(1355);n.d(t,"deleteSection",function(){return g.a});var m=n(1356);n.d(t,"deleteSectionThumbnails",function(){return m.a});var v=n(1354);n.d(t,"deletePlaylist",function(){return v.a});var y=n(1368);n.d(t,"updateLibrary",function(){return y.a});var b=n(1363);
n.d(t,"optimize",function(){return b.a});var S=n(1346);n.d(t,"cleanBundles",function(){return S.a});var w=n(1358);n.d(t,"emptyTrash",function(){return w.a});var M=n(1361);n.d(t,"match",function(){return M.a});var I=n(1344);n.d(t,"autoMatch",function(){return I.a});var C=n(1345);n.d(t,"changeArtwork",function(){return C.a});var D=n(1364);n.d(t,"rate",function(){return D.a});var T=n(1350);n.d(t,"enableVersionGenerator",function(){return T.a});var x=n(1349);n.d(t,"disableVersionGenerator",function(){
return x.a});var P=n(1351);n.d(t,"reprocessVersionGenerator",function(){return P.a});var E=n(1348);n.d(t,"deleteVersionGenerator",function(){return E.a});var A=n(1347);n.d(t,"deleteAllVersionGenerators",function(){return A.a});var L=n(1335);n.d(t,"installChannel",function(){return L.a});var k=n(1339);n.d(t,"updateChannel",function(){return k.a});var N=n(1337);n.d(t,"restartChannel",function(){return N.a});var _=n(1336);n.d(t,"resetChannel",function(){return _.a});var O=n(1338);n.d(t,"uninstallChannel",function(){
return O.a});var R=n(1340);n.d(t,"watchLater",function(){return R.a});var j=n(1370);n.d(t,"playMedia",function(){return j.a});var z=n(1369);n.d(t,"playBackgroundMedia",function(){return z.a});var U=n(1371);n.d(t,"queueMedia",function(){return U.a});var F=n(1374);n.d(t,"connectServer",function(){return F.a});var B=n(1376);n.d(t,"reconnectServer",function(){return B.a});var V=n(1378);n.d(t,"signInServer",function(){return V.a});var H=n(1380);n.d(t,"signUpServer",function(){return H.a});var W=n(1379);
n.d(t,"signOutServer",function(){return W.a});var Q=n(1377);n.d(t,"removeServer",function(){return Q.a});var Y=n(1373);n.d(t,"checkForServerUpdates",function(){return Y.a});var G=n(1375);n.d(t,"installServerUpdates",function(){return G.a});var K=n(1381);n.d(t,"testServerImage",function(){return K.a});var q=n(1372);n.d(t,"getTransientToken",function(){return q.a});var Z=n(1382);n.d(t,"showClaimServerAlertBar",function(){return Z.a});var X=n(1397);n.d(t,"showSyncModal",function(){return X.a});var J=n(1396);
n.d(t,"showHomeWarningsModal",function(){return J.a});var $=n(1384);n.d(t,"deleteSyncItem",function(){return $.a});var ee=n(1387);n.d(t,"refreshSyncLists",function(){return ee.a});var te=n(1390);n.d(t,"removeDevice",function(){return te.a});var ne=n(1391);n.d(t,"removeFriend",function(){return ne.a});var ie=n(1383);n.d(t,"acceptInvite",function(){return ie.a});var ae=n(1388);n.d(t,"rejectInvite",function(){return ae.a});var re=n(1395);n.d(t,"shareServer",function(){return re.a});var se=n(1393);n.d(t,"removeServerShare",function(){
return se.a});var oe=n(1392);n.d(t,"removeHomeUser",function(){return oe.a});var le=n(1400);n.d(t,"validateUsername",function(){return le.a});var ce=n(1399);n.d(t,"toggleGuest",function(){return ce.a});var ue=n(1385);n.d(t,"lockUser",function(){return ue.a});var de=n(1398);n.d(t,"signUp",function(){return de.a});var he=n(1394);n.d(t,"share",function(){return he.a});var pe=n(1386);n.d(t,"recommend",function(){return pe.a});var fe=n(1389);n.d(t,"remoteUnlock",function(){return fe.a})},function(e,t,n){
"use strict";function i(e){var t=e.items;return o.a.when.apply(o.a,r.a.map(t,function(e){var t="/library/metadata/"+e.id+"/analyze",n=r.a.extend(e.server.getXHROptions(t),{type:"PUT"});return o.a.ajax(n).promise()}))}var a=n(2),r=n.n(a),s=n(5),o=n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=o.a.ajax(d);e.done(function(){i.resolve()}),e.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem analyzing the library.")}),i.reject(e);
}),e.always(function(e){h.hide()})}var i=o.a.Deferred(),a=e.section,s="/library/sections/"+a.id+"/analyze",d=r.a.extend(a.server.getXHROptions(s),{type:"PUT"}),h=new u.a({title:n.i(l.default)("Analyze Library"),message:n.i(l.default)("Analyzes all the media files in the library. The analysis captures information about the media which helps Plex decide how to optimally play back the media."),confirmLabel:n.i(l.default)("Analyze"),cancelLabel:n.i(l.default)("Cancel"),async:!0}),p=h.promise;return p.done(t),
p.fail(function(){i.reject()}),c.a.trigger("show:modal",h),i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=o.a.Deferred(),i=e.item,a=e.agent,s={agent:a.id,manual:0},h=d.join(["/library/metadata/",i.id,"/matches"],s),p=r.a.extend(i.server.getXHROptions(h)),f=o.a.ajax(p);return f.done(function(e){var a=r.a.isObject(e)?e:u.a.parseXML(e);if(a.SearchResult){var h=a.SearchResult;r.a.isArray(a.SearchResult)&&(h=a.SearchResult[0]),
s={guid:h.guid,name:h.name};var p=d.join(["/library/metadata/",i.id,"/match"],s),f=r.a.extend(i.server.getXHROptions(p),{type:"PUT"}),g=o.a.ajax(f);g.done(function(){t.resolve()}),g.fail(function(){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem matching this item.")}),t.reject()})}else c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("No matches were found using this agent.")}),t.reject()}),f.fail(function(e){c.a.trigger("show:alert",{type:"error",
message:n.i(l.default)("There was a problem searching for matches.")}),t.reject(e)}),t.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(44),d=n(20);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,n={url:e.artworkRatingKey},i=l.join(["/library/metadata/",t.id,e.artworkType],n),a=r.a.extend(t.server.getXHROptions(i),{type:"PUT"}),s=o.a.ajax(a);return s.done(function(n){t.set(c[e.artworkType],n)}),s.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(20),c={poster:"thumb",
art:"art",banner:"banner"};t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=o.a.ajax(d);e.done(function(){c.a.trigger("show:alert",{type:"success",message:n.i(l.default)("Unused bundles are being removed.")}),i.resolve()}),e.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem removing unused bundles.")}),i.reject(e)}),e.always(function(e){h.hide()})}var i=o.a.Deferred(),a=e.server,s="/library/clean/bundles",d=r.a.extend(a.getXHROptions(s),{
type:"PUT"}),h=new u.a({title:n.i(l.default)("Clean Bundles"),message:n.i(l.default)("The media server stores information about your media to disk, as well as posters, artwork, and other media resources from the internet. Running this task deletes any bundles which are no longer in use."),confirmLabel:n.i(l.default)("Clean"),cancelLabel:n.i(l.default)("Cancel"),async:!0}),p=h.promise;return p.done(t),p.fail(function(){i.reject()}),c.a.trigger("show:modal",h),i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(42);
t.a=i},function(e,t,n){"use strict";function i(e){var t=a(),i=t.promise;return i=i.then(function(){var i="/playlists/generators?type="+d.a.LOCAL,a=s.a.extend(e.server.getXHROptions(i),{type:"DELETE"}),r=l.a.ajax(a).promise();return r.fail(function(e){u.a.trigger("show:alert",{type:"error",message:n.i(c.default)("There was a problem deleting all versions.")})}),r.always(function(){t.hide()}),r.promise()})}function a(){var e=new h.a({title:n.i(c.default)("Delete All Versions"),message:n.i(c.default)("Are you sure you want to delete all versions? This cannot be undone."),
confirmLabel:n.i(c.default)("Delete"),cancelLabel:n.i(c.default)("Cancel"),async:!0,hasDanger:!0});return u.a.trigger("show:modal",e),e}var r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(4),u=n(8),d=n(175),h=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.generator,i=a(e),o=i.promise.then(function(){var e=t.destroy();return e.fail(function(e){s.a.trigger("show:alert",{type:"error",message:n.i(r.default)("Unable to stop generating these versions.")})}),e.always(function(){i.hide()}),e});return o;
}function a(e){var t=e.generator.get("title"),i=t?n.i(r.default)("Removing this item will delete all versions created by {1}. Are you sure you want to continue?",t):n.i(r.default)("Removing this item will delete all related versions. Are you sure you want to continue?"),a=new o.a({title:n.i(r.default)("Delete Versions"),message:i,confirmLabel:n.i(r.default)("Remove"),cancelLabel:n.i(r.default)("Cancel"),async:!0,hasDanger:!0});return s.a.trigger("show:modal",a),a}var r=n(4),s=n(8),o=n(42);t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.generator,i=s.a.result(t,"url")+"/"+e.ratingKey+"/disable",r=a(),o=r.promise.then(function(){var e=s.a.extend(t.server.getXHROptions(i),{type:"PUT"}),a=l.a.ajax(e).promise();return a.fail(function(e){u.a.trigger("show:alert",{type:"error",message:n.i(c.default)("There was a problem disabling this version.")})}),a.always(function(){r.hide()}),a});return o}function a(){var e=new d.a({title:n.i(c.default)("Remove Version"),message:n.i(c.default)("Are you sure you want to delete this version? You can enable it again in Optimized Versions Settings."),
confirmLabel:n.i(c.default)("Remove"),cancelLabel:n.i(c.default)("Cancel"),async:!0,hasDanger:!0});return u.a.trigger("show:modal",e),e}var r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(4),u=n(8),d=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.generator,i=r.a.result(t,"url")+"/"+e.ratingKey+"/enable",a=r.a.extend(t.server.getXHROptions(i),{type:"PUT"}),s=o.a.ajax(a).promise();return s.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem enabling this version.")
})}),s}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.generator,i=e.ratingKey,a=r.a.result(t,"url");i&&(a+="/"+i),a+="/reprocess";var s=r.a.extend(t.server.getXHROptions(a),{type:"PUT"}),u=o.a.ajax(s).promise();return u.fail(function(e){var t=i?n.i(l.default)("There was a problem processing this item."):n.i(l.default)("There was a problem processing these items.");c.a.trigger("show:alert",{type:"error",message:t})}),u}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8);
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.items,n=e.item;t||(t=[n]),n||(n=s.a.first(t));var i=n.get("Media");if(1===t.length&&i.length>1&&n.server.supports("specificMediaDeletion"))return h.a.execute("deleteMediaItem",{item:n});var r=a({item:n,items:t}),o=r.promise,c=o.then(function(){var n=s.a.map(t,function(t){return h.a.execute("deleteItem",{item:t,skipRedirect:e.skipRedirect})});return l.a.when.apply(l.a,n).always(function(){r.hide()})});return c}function a(e){var t,i,a=e.item,r=e.items,s=r.length>1,o=d.a.get(a.get("type"));
s?(t=o.plural,i=n.i(c.default)("Are you sure you want to delete {1} items from your filesystem?",r.length)):(t=o.title,i=n.i(c.default)("Are you sure you want to delete this item from your filesystem?"));var l={title:n.i(c.default)("Delete {1}",t),message:i,confirmLabel:n.i(c.default)("Delete"),cancelLabel:n.i(c.default)("Cancel"),async:!0,hasDanger:!0};(s||o.child)&&(l.requireDoubleConfirm=!0,l.doubleConfirmMessage=n.i(c.default)("Multiple files may be deleted."),l.doubleConfirmLabel=n.i(c.default)("Yes, I'm sure"));
var h=new p.a(l);return u.a.trigger("show:modal",h),h}var r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(4),u=n(8),d=n(36),h=n(21),p=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=a(e);return t=t.then(function(t){var n=r(),i=n.promise.then(function(){return u.a.execute("deleteFile",{item:e.item,media:t}).always(function(){n.hide()})});return i})}function a(e){var t=o.a.Deferred(),n=e.item,i=n.get("Media");if(e.index in i)return t.resolve(i[e.index]).promise();var a=new d.a({model:n}),r=a.promise;
return r.done(function(e){t.resolve(i[e])}),r.fail(function(){t.reject()}),c.a.trigger("show:modal",a),t.promise()}function r(){var e=new h.a({title:n.i(l.default)("Delete File"),message:n.i(l.default)("Are you sure you want to delete this file from your filesystem?"),confirmLabel:n.i(l.default)("Delete"),cancelLabel:n.i(l.default)("Cancel"),async:!0,hasDanger:!0});return c.a.trigger("show:modal",e),e}var s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(21),d=n(1751),h=n(42);t.a=i},function(e,t,n){"use strict";function i(e){
function t(){var t=e.item.destroy();t.done(function(){o.a.trigger("navigate","playlists",{serverID:a.id}),i.resolve()}),t.fail(function(e){o.a.trigger("show:alert",{type:"error",message:n.i(s.default)("There was a problem deleting the playlist.")}),i.reject(e)}),t.always(function(e){c.hide()})}var i=r.a.Deferred(),a=e.item.server,c=new l.a({title:n.i(s.default)("Delete Playlist"),message:n.i(s.default)("Are you sure you want to delete {1}? This cannot be undone.",e.item.get("title")),confirmLabel:n.i(s.default)("Delete"),
cancelLabel:n.i(s.default)("Cancel"),async:!0,hasDanger:!0}),u=c.promise;return u.done(t),u.fail(function(){i.reject()}),o.a.trigger("show:modal",c),i.promise()}var a=n(5),r=n.n(a),s=n(4),o=n(8),l=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=a.destroy({wait:!0});return e?(e.done(function(){var e=s.a("appStore");e.dispatch(c.b()),i.resolve()}),void e.fail(function(e){l.a.trigger("show:alert",{type:"error",message:n.i(o.default)("There was a problem deleting the library.")
}),i.reject(e)})):void i.resolve()}var i=r.a.Deferred(),a=e.section,d=new u.a({title:n.i(o.default)("Delete Library"),message:n.i(o.default)("Are you sure you want to delete {1}?",a.get("title")),confirmLabel:n.i(o.default)("Delete"),cancelLabel:n.i(o.default)("Cancel"),requireDoubleConfirm:!0,doubleConfirmMessage:n.i(o.default)("This cannot be undone."),doubleConfirmLabel:n.i(o.default)("Yes, I'm sure"),async:!0,hasDanger:!0}),h=d.promise;return h.done(t),h.fail(function(){i.reject()}),l.a.trigger("show:modal",d),
i.promise().always(function(){d.hide()}),i.promise()}var a=n(5),r=n.n(a),s=n(14),o=n(4),l=n(8),c=n(183),u=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=o.a.ajax(s);return e.done(function(e){c.a.trigger("show:alert",{type:"success",message:n.i(l.default)("The preview thumbnails for items in this library were deleted.")})}),e.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem deleting the preview thumbnails for items in this library.")
})}),e.always(function(e){d.hide()}),e}var i=e.section,a="/library/sections/"+i.id+"/indexes",s=r.a.extend(i.server.getXHROptions(a),{type:"DELETE"}),d=new u.a({title:n.i(l.default)("Delete Preview Thumbnails"),message:n.i(l.default)("Are you sure you want to delete the preview thumbnails for items in this library? This cannot be undone."),confirmLabel:n.i(l.default)("Delete"),cancelLabel:n.i(l.default)("Cancel"),async:!0,hasDanger:!0}),h=d.promise;return h=h.then(function(){return t()}),c.a.trigger("show:modal",d),
h}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,i=t.server,r=t.get("Media"),o=s.a.filter(r,function(e){return!!e.proxyType}),h=a({item:t,versions:o}),p=h.promise,f=p.then(function(){var e=d.join(["/library/metadata/",t.id],{proxy:1}),a=s.a.extend(i.getXHROptions(e),{type:"DELETE"}),p=l.a.ajax(a);return p.done(function(){s.a.each(o,function(e){r.splice(s.a.indexOf(r,e),1)}),t.trigger("change:Media",t,t.get("Media"))}),p.fail(function(e){
var t=403===e.status?n.i(c.default)("Ensure that media deletion is enabled for library content in your server settings."):n.i(c.default)("There was a problem deleting these versions.");u.a.trigger("show:alert",{type:"error",message:t})}),p.always(function(){h.hide()}),p.promise()});return f}function a(e){var t,i=e.item,a=e.versions,r=a.length>1;if(r)t=n.i(c.default)("Are you sure you want to delete {1} versions of {2}?",a.length,i.get("title"));else{var o=s.a.first(a);t=n.i(c.default)("Are you sure you want to delete the {1} version of {2}?",o.title,i.get("title"));
}var l=new h.a({title:r?n.i(c.default)("Delete Versions"):n.i(c.default)("Delete Version"),message:t,confirmLabel:n.i(c.default)("Delete"),cancelLabel:n.i(c.default)("Cancel"),async:!0,hasDanger:!0});return u.a.trigger("show:modal",l),l}var r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(4),u=n(8),d=n(20),h=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){r.a.each(d,function(e){var t="/library/sections/"+e+"/emptyTrash",n=r.a.extend(s.getXHROptions(t),{type:"PUT"});h.push(o.a.ajax(n))});var e=o.a.when.apply(o.a,h);
e.done(function(){c.a.trigger("show:alert",{type:"success",message:n.i(l.default)("The trash was emptied.")}),i.resolve()}),e.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem emptying the trash.")}),i.reject(e)}),e.always(function(e){f.hide()})}var i=o.a.Deferred(),a=e.section,s=a?a.server:e.server,d=[],h=[];if(a)d.push(a.id);else{var p=s.get("sections");p.each(function(e){d.push(e.id)})}var f=new u.a({title:n.i(l.default)("Empty Trash"),message:n.i(l.default)("By default the media server doesn't remove information for media right away. This helps if a drive is temporarily disconnected. When you empty the trash for a section, all information about missing media is deleted."),
confirmLabel:n.i(l.default)("Empty"),cancelLabel:n.i(l.default)("Cancel"),async:!0}),g=f.promise;return g.done(t),g.fail(function(){i.reject()}),c.a.trigger("show:modal",f),i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t,i,a;e.item?(i=e.item,a=[i]):e.items&&(a=e.items,i=a[0]);var d=r.a.extend({},e,{watched:!1}),h=i.get("type"),p=l.a.get(h),f=p&&"directory"===p.element,g=(f||a.length>1)&&!e.force,m=1===a.length,v=m&&i.get("isSection")?i.getSyncTitle():i.get("title");
if(g){var y;switch(i.get("type")){case"movie":y=m?n.i(s.default)("Are you sure you want to mark {1} as unwatched?",v):n.i(s.default)("Are you sure you want to mark these movies as unwatched?");break;case"show":case"season":case"episode":y=m?n.i(s.default)("Are you sure you want to mark all episodes of {1} as unwatched?",v):n.i(s.default)("Are you sure you want to mark these episodes as unwatched?");break;default:y=m?n.i(s.default)("Are you sure you want to mark {1} as unwatched?",v):n.i(s.default)("Are you sure you want to mark these items as unwatched?");
}var b=new u.a({title:n.i(s.default)("Mark as Unwatched"),message:y}),S=b.promise;t=S.then(function(){return c.a.execute("updateWatchedStatus",d)}),o.a.trigger("show:modal",b)}else t=c.a.execute("updateWatchedStatus",d);return t}var a=n(2),r=n.n(a),s=n(4),o=n(8),l=n(36),c=n(21),u=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t,i,a;e.item?(i=e.item,a=[i]):e.items&&(a=e.items,i=a[0]);var d=r.a.extend({},e,{watched:!0}),h=i.get("type"),p=l.a.get(h),f=p&&"directory"===p.element,g=(f||a.length>1)&&!e.force,m=1===a.length,v=m&&i.get("isSection")?i.getSyncTitle():i.get("title");
if(g){var y;switch(i.get("type")){case"movie":y=m?n.i(s.default)("Are you sure you want to mark {1} as watched?",v):n.i(s.default)("Are you sure you want to mark these movies as watched?");break;case"show":case"season":case"episode":y=m?n.i(s.default)("Are you sure you want to mark all episodes of {1} as watched?",v):n.i(s.default)("Are you sure you want to mark these episodes as watched?");break;default:y=m?n.i(s.default)("Are you sure you want to mark {1} as watched?",v):n.i(s.default)("Are you sure you want to mark these items as watched?");
}var b=new u.a({title:n.i(s.default)("Mark as Watched"),message:y}),S=b.promise;t=S.then(function(){return c.a.execute("updateWatchedStatus",d)}),o.a.trigger("show:modal",b)}else t=c.a.execute("updateWatchedStatus",d);return t}var a=n(2),r=n.n(a),s=n(4),o=n(8),l=n(36),c=n(21),u=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,n={guid:e.guid,name:e.name};"album"===t.get("type")&&e.children&&e.children.reduce(function(e,t){var n=t.get("id");return n&&(e["guid["+n+"]"]=t.get("guid")),
e},n);var i=l.join(["/library/metadata/",t.id,"/match"],n),a=r.a.extend(t.server.getXHROptions(i),{type:"PUT"});return o.a.ajax(a).promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(20);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=o.a.ajax(h);e.done(function(){i.resolve()}),e.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem merging these items.")}),i.reject(e)}),e.always(function(e){p.hide()})}var i=o.a.Deferred(),a=e.item,s=r.a.pluck(e.items,"id").join(","),d="/library/metadata/"+a.id+"/merge?ids="+s,h=r.a.extend(a.server.getXHROptions(d),{
type:"PUT"}),p=new u.a({title:n.i(l.default)("Merge"),message:n.i(l.default)("Are you sure you want to merge these items together?"),async:!0}),f=p.promise;return f.done(t),f.fail(function(){i.reject()}),c.a.trigger("show:modal",p),i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=o.a.ajax(d);e.done(function(){c.a.trigger("show:alert",{type:"success",message:n.i(l.default)("The database was optimized.")}),i.resolve();
}),e.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem optimizing this database.")}),i.reject(e)}),e.always(function(e){h.hide()})}var i=o.a.Deferred(),a=e.server,s="/library/optimize",d=r.a.extend(a.getXHROptions(s),{type:"PUT"}),h=new u.a({title:n.i(l.default)("Optimize Database"),message:n.i(l.default)("Cleans up the library database and ensures it is operating as quickly as possible. This is especially useful when you've added or removed a large amount of media from the library."),
confirmLabel:n.i(l.default)("Optimize"),cancelLabel:n.i(l.default)("Cancel"),async:!0}),p=h.promise;return p.done(t),p.fail(function(){i.reject()}),c.a.trigger("show:modal",h),i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,i=e.rating,a=t.get("userRating");if(i===-1?t.unset("userRating"):t.set("userRating",i),e.passive)return r.a.Deferred().resolve().promise();var c={key:t.get("ratingKey"),identifier:t.get("identifier"),
rating:i},u=l.join("/:/rate",c),d=r.a.ajax(t.server.getXHROptions(u));return d.fail(function(){t.set("userRating",a),o.a.trigger("show:alert",{type:"error",message:n.i(s.default)("There was a problem rating this item.")})}),d.promise()}var a=n(5),r=n.n(a),s=n(4),o=n(8),l=n(20);t.a=i},function(e,t,n){"use strict";function i(e){var t,i;return e.item?(t=e.item,i=[t]):(i=e.items,t=i[0]),o.a.when.apply(o.a,r.a.map(i,function(e){var n="/library/metadata/"+e.id+"/refresh",i=r.a.extend(t.server.getXHROptions(n),{
type:"PUT"});return o.a.ajax(i).promise()})).fail(function(e){503===e.status?c.a.trigger("show:modal",new u.a({model:t.server})):c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem refreshing.")})})}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(285);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=r.a.extend(a.server.getXHROptions(s),{type:"PUT"}),u=o.a.ajax(t);u.done(function(){var t,n=a.get("type");t="show"===n||"artist"===n||"album"===n?"Location":"Media",
a.set(t,a.get(t).slice(0,1)),e.skipNavigate||c.a.trigger("navigate:back"),i.resolve()}),u.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem splitting this item apart.")}),i.reject(e)}),u.always(function(e){d.hide()})}var i=o.a.Deferred(),a=e.item,s="/library/metadata/"+a.id+"/split",d=new u.a({title:n.i(l.default)("Split Apart"),message:n.i(l.default)("Are you sure you want to split this item apart?"),async:!0}),h=d.promise;return h.done(t),h.fail(function(){
i.reject()}),c.a.trigger("show:modal",d),i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,i="/library/metadata/"+t.id+"/unmatch",a=r.a.extend(t.server.getXHROptions(i),{type:"PUT"}),s=o.a.ajax(a);return s.fail(function(){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem unmatching this item.")})}),s.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8);t.a=i},function(e,t,n){
"use strict";function i(e){function t(){var e=o.a.ajax(v);e.done(function(){i.resolve()}),e.fail(function(e){if(503===e.status)c.a.trigger("show:modal",new d.a({model:p}));else{var t=h?n.i(l.default)("There was a problem canceling the update."):n.i(l.default)("There was a problem updating the library.");c.a.trigger("show:alert",{type:"error",message:t})}i.reject(e)})}var i=o.a.Deferred(),a=e.section,s=a?a.id:"all",h=e.cancel,p=a?a.server:e.server,f=e.params||{},g={};f.force&&(g.force=1);var m="/library/sections/"+s+"/refresh",v=r.a.extend(p.getXHROptions(m),{
data:g});if(h&&(v.type="DELETE",a&&a.set("refreshing",!1)),g.force){var y=new u.a({title:n.i(l.default)("Refresh All"),message:n.i(l.default)("Forces a download of fresh media information from the internet. This can take a long time. Any locked fields are not modified."),confirmLabel:n.i(l.default)("Refresh"),cancelLabel:n.i(l.default)("Cancel")}),b=y.promise;b.done(t),b.fail(function(){i.reject()}),c.a.trigger("show:modal",y)}else t();return i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(42),d=n(285);
t.a=i},function(e,t,n){"use strict";function i(){u&&(u.stop(),u.stopListening())}function a(e){i(),u=l.a.getInstance(e.type,{forceLocal:!0});var t=new c.a({playQueueItem:e.model,playQueue:e.playQueue,volume:e.volume}),n=u.load({model:t,autoplay:e.autoplay,offset:e.offset});return u.listenTo(s.a,"audio:fadeOut",function(t){t.exceptKey!==e.model.get("key")&&u.fadeOut()}),u.listenTo(s.a,"audio:stop",function(){u.stop()}),u.listenTo(t,"change:stopped",function(e,t){t&&i()}),n}function r(e){return e?void(d||n.i(o.a)(e).then(a)):i();
}var s=n(8),o=n(724),l=n(249),c=n(429),u=null,d=!1;s.a.on("show:player",function(){d=!0}),s.a.on("hide:player",function(){d=!1}),t.a=r},function(e,t,n){"use strict";function i(e){var t=n.i(s.a)("appModel").get("primaryPlayer");return e=r.a.extend({},e,{confirmClearPlayQueue:function(){var e=new u.a({title:n.i(o.default)("Play Now"),message:n.i(o.default)("This will clear the contents of Up Next and play the selection instead.")});return l.a.trigger("show:modal",e),e.promise},supportsContinuous:!t||r()(t.get("protocolCapabilities")).contains("playqueues")
}),n.i(c.a)(e).progress(function(e){return l.a.trigger("show:playerLoading",e)}).then(function(e){return l.a.trigger("show:player",e)}).fail(function(e){return l.a.trigger("hide:playerLoading",e)})}var a=n(2),r=n.n(a),s=n(14),o=n(4),l=n(8),c=n(724),u=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,i=t.server.get("playQueueManager").getFor(t);if(i){var a=l.a("appModel"),s=a.get("primaryPlayer");if(s){var h=s.get("protocolCapabilities");if(!r.a.contains(h,"playqueues"))return u.a.trigger("show:alert",{
type:"error",message:n.i(c.default)("The connected player doesn't support queueing.")}),o.a.Deferred().resolve().promise()}return i.queueContent(t,e)}return d.a.execute("playMedia",{item:t})}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(14),c=n(4),u=n(8),d=n(21);t.a=i},function(e,t,n){"use strict";function i(e){var t=r.a.Deferred(),n=e.server,i=n.get("accessToken");if(!n.supports("transientToken")||/^transient-/.test(i))return t.resolve(i).promise();var a={type:e.type||"delegation",scope:e.scope||"all"
},l=o.join("/security/token",a),c=r.a.ajax(n.getXHROptions(l));return c.done(function(e){var n=s.a.parseXML(e);t.resolve(n.token)}),c.fail(function(e){t.reject(e)}),t.promise()}var a=n(5),r=n.n(a),s=n(44),o=n(20);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,n={download:e.download===!1?"0":"1"},i=l.join("/updater/check",n),a=r.a.extend(t.getXHROptions(i),{type:"PUT"}),s=e.initialState||"checking",c=t.get("desktop").get("update");c.set("state",s);var u=o.a.ajax(a).promise();return u.fail(function(){
c.set("state","error")}),u}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(20);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var n=a.fetch();n.done(function(){var n=a.get("mappingState"),r=e.value&&"unknown"===n,s=!e.value&&"mapped"===n;"waiting"===n||r||s?i||(i=setInterval(t,d)):(i=clearInterval(i),a.isWaiting()&&a.set("remoteAccessState",""),u.resolve())})}var i,a=e.cloudAccount,l=a.server.get("desktop").get("settings"),c=l.get("PublishServerOnPlexOnlineKey"),u=r.a.Deferred(),d=500;if(!a.isWaiting()){
var h=e.value?"connecting":"disconnecting";a.set("remoteAccessState",h)}var p=a.previous("remoteAccessState"),f=c.save({PublishServerOnPlexOnlineKey:e.value},{timeout:0});return f.done(t),f.fail(function(t){var i;i=e.value?n.i(s.default)("There was a problem connecting your server."):n.i(s.default)("There was a problem disconnecting your server."),o.a.trigger("show:alert",{type:"error",message:i}),a.set("remoteAccessState",p),u.reject(t)}),u.promise()}var a=n(5),r=n.n(a),s=n(4),o=n(8);t.a=i},function(e,t,n){
"use strict";function i(e){function t(){var e=a.get("desktop").get("update");e.set("state","installing");var t=o.a.ajax(d).promise();return t.fail(function(){e.set("state","error")}),t}var i,a=e.server,s="/updater/apply",d=r.a.extend(a.getXHROptions(s),{type:"PUT"});a.get("activeConnection").get("isLoopback")||(i=new u.a({title:n.i(l.default)("Remote Installation"),confirmLabel:n.i(l.default)("Continue"),cancelLabel:n.i(l.default)("Cancel"),message:n.i(l.default)("The installer may display dialogs that require input. Make sure you have desktop access to the computer running Plex Media Server before continuing."),
hasDanger:!0}),c.a.trigger("show:modal",i));var h=i?i.promise:o.a.Deferred().resolve().promise();return h=h.then(function(){return t()})}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.cloudAccount,n={cloudAccount:t,value:!1},i=s.a.execute("connectServer",n);return i=i.then(function(){return n.value=!0,s.a.execute("connectServer",n)}),i=i.then(function(){if(t.get("mappingError"))return r.a.Deferred().reject().promise()})}var a=n(5),r=n.n(a),s=n(21);
t.a=i},function(e,t,n){"use strict";function i(e){var t=new f.a({machineIdentifier:e},{onlyIfCached:!0});if(!l.a.isEmpty(t))return t}function a(e){var t=e.get("desktop").get("cloudAccount"),n=t.destroy();return n.done(function(){e.set({myPlexSigninState:"none",myPlexSubscription:!1})}),n}function r(e){e.trigger("destroy",e,e.collection),e.cache.remove(e)}function s(e){function t(){var e;if(f)e=f.destroy({wait:!0});else{var t="/api/servers/"+m.id,n=l.a.extend(c.server.getXHROptions(t),{type:"DELETE"
});e=u.a.ajax(n)}if(m){if(m.get("connected")&&"ok"===m.get("myPlexSigninState")){var i=m.get("desktop").get("cloudAccount");e=e.then(function(){return i.fetch()}),e=e.then(function(){return a(m)})}m.get("connected")===!1?r(m):e.always(function(){p.a.trigger("test:server",m),m.populate().fail(function(){r(m)})})}return e.always(function(){y.hide()}),e.promise()}var s,o=d.a("appModel"),c=o.get("user"),f=e.device,m=e.server||i(f.get("clientIdentifier"));s=f?f.get("isPersonalCloudServer")?n.i(h.default)("If you remove this Plex Cloud server, all your Plex libraries, shares, and metadata will be deleted! Your media files will not be affected. This cannot be undone."):n.i(h.default)("If you remove the server, all syncs and shares associated with the server will be lost and you will need to sign the server in again to restore access to Plex."):n.i(h.default)("Are you sure you want to remove this server?");
var v={title:n.i(h.default)("Remove Server"),message:s,confirmLabel:n.i(h.default)("Remove"),cancelLabel:n.i(h.default)("Cancel"),async:!0,hasDanger:!0};f&&(v.requireDoubleConfirm=!0,v.doubleConfirmMessage=n.i(h.default)("Are you sure you want to remove this server?"),v.doubleConfirmLabel=n.i(h.default)("Yes, I'm sure"));var y=new g.a(v),b=y.promise;return b=b.then(function(){return t()}),p.a.trigger("show:modal",y),b}var o=n(2),l=n.n(o),c=n(5),u=n.n(c),d=n(14),h=n(4),p=n(8),f=n(83),g=n(42);t.a=s;
},function(e,t,n){"use strict";function i(e,t){var n=t.getXHROptions("/api/claim/token"),i=c.a.ajax(n).promise();return i=i.then(function(t){var n=f.a.parseXML(t),i=n.token,a=d.join("/myplex/claim",{token:i}),r=e.getXHROptions(a,{type:"POST"});return c.a.ajax(r).promise()})}function a(e,t,n){var i=d.join("/myplex/account",{username:e,password:t}),a=n.getXHROptions(i,{type:"PUT"});return c.a.ajax(a).promise()}function r(e){var t=e.cloudAccount,r=e.username,s=e.password,l=e.claim,d=void 0!==l&&l,g=c.a.Deferred(),m=t.server,v=n.i(u.a)("appModel"),y=v.get("user"),b=v.get("cloudServer"),S=m.get("accessToken");
m.set("accessToken",y.get("authToken"));var w=d?i(m,b):a(r,s,m);return w.done(function(e){var i=o.a.isObject(e)?e:f.a.parseXML(e);i&&"invalid"===i.signInState?(p.a.trigger("show:alert",{type:"error",message:n.i(h.default)("The username or password is incorrect.")}),g.reject()):(m.set({myPlexSigninState:"ok",myPlexUsername:y.get("email")}),t.set({signedIn:!0,username:y.get("email")}),g.resolve())}),w.fail(function(e){m.set("accessToken",S),t.get("signedIn")===!0&&t.set("signedIn",!1);var i=void 0;i=401===e.status?n.i(h.default)("The username or password is incorrect."):n.i(h.default)("There was a problem signing in to Plex."),
p.a.trigger("show:alert",{type:"error",message:i}),g.reject(e)}),g.promise()}var s=n(2),o=n.n(s),l=n(5),c=n.n(l),u=n(14),d=n(20),h=n(4),p=n(8),f=n(38);t.a=r},function(e,t,n){"use strict";function i(e){var t=e.cloudAccount,i=t.destroy({timeout:0});return i.done(function(){t.server.set({myPlexSigninState:"none",myPlexSubscription:!1})}),i.fail(function(){r.a.trigger("show:alert",{type:"error",message:n.i(a.default)("There was a problem signing the server out.")})}),i.promise()}var a=n(4),r=n(8);t.a=i;
},function(e,t,n){"use strict";function i(e){var t=o.a.Deferred(),i=e.cloudAccount;i.set("signedIn",!1),i.set({username:"",email:"",password:""});var a=i.save({username:e.username,email:e.email,password:e.password});return a.done(function(e){var a=r.a.isObject(e)?e:u.a.parseXML(e);if(a&&"invalid"===a.signInState){var s;u.a.parseArray(a,"Error"),s=a.Error.length?r.a.first(a.Error).error:n.i(l.default)("This account information is invalid."),c.a.trigger("show:alert",{type:"error",message:s}),t.reject();
}else i.set("signedIn",!0),t.resolve()}),a.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem signing up for a Plex account.")}),t.reject(e)}),t.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8),u=n(44);t.a=i},function(e,t,n){"use strict";function i(e){var t,i=e.server,a=e.connection,o=i.get("friendlyName"),l=(new Date).getTime(),c=i.resolveUrl("/web/img/blank.png?cb="+l,{connection:a}),u=r.a.Deferred();n.i(s.a)("[Servers] Testing image for %s at %s",o,c);
var d=new window.Image;return d.onload=function(){d.onload=d.onerror=d.onabort=null,t=clearTimeout(t),s.a.info("[Servers] Image test for %s at %s was successful",o,c),u.resolve(i,a)},d.onerror=d.onabort=function(){d.onload=d.onerror=d.onabort=null,t=clearTimeout(t),s.a.warn("[Servers] %s at %s unavailable",o,c),u.reject(i,a)},t=setTimeout(function(){d.onload=d.onerror=d.onabort=null,d.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.a.warn("[Servers] %s at is unavailable (Timeout)",o,c),
u.reject(i,a)},5e3),d.src=c,u.promise()}var a=n(5),r=n.n(a),s=n(27);t.a=i},function(e,t,n){"use strict";function i(e){var t=n.i(r.a)("appModel").get("settings"),i=t.get("dismissedUnclaimedServers"),l=i.indexOf(e.id)>-1,c=a.a.history.getFragment();l||/^\!\/setup/.test(c)||s.a.trigger("show:bar","alertbar",new o.a({model:e}))}var a=n(47),r=n(14),s=n(8),o=n(1597);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=i.save(null,{force:!0});i.trigger("destroy",i,s),e.done(function(){g.fetch(),
f.get("desktop").get("friends").fetch(),f.get("desktop").get("sentInvites").fetch(),i.get("server")&&h.a.trigger("discover:servers"),m.resolve()}),e.fail(function(e){h.a.trigger("show:alert",{type:"error",message:n.i(d.default)("There was a problem accepting this invite.")}),s.add(i,{at:l}),m.reject(e)})}var i=e.invite,s=i.collection,l=s.indexOf(i),p=u.a("appModel"),f=p.get("user"),g=f.get("homeUsers"),m=c.a.Deferred();o.a.extend(e,{homeUsers:g,signedInHomeUser:g.get(f.id)});var v=a(e);return v.done(function(){
r(e).always(t)}),v.fail(function(){m.reject()}),m.promise}function a(e){if(!e.invite.get("home"))return c.a.Deferred().resolve().promise();var t;t=e.homeUsers.length>1?e.signedInHomeUser.get("admin")?n.i(d.default)("You are the admin in your current home. If you leave, the remaining users will be removed and managed users will be deleted."):n.i(d.default)("Are you sure you want to join this home? You will leave your current home."):n.i(d.default)("The admin of this home will have access to your account. Other users of this home will be able to switch to your account by entering your PIN.");
var i=new p.a({title:n.i(d.default)("Join Home"),message:t,confirmLabel:n.i(d.default)("Join"),cancelLabel:n.i(d.default)("Cancel"),hasDanger:!0});return h.a.trigger("show:modal",i),i.promise}function r(e){if(e.invite.get("home")&&!e.signedInHomeUser.get("protected")){var t=new f.a({model:e.signedInHomeUser,isEditing:!0,isEditWarning:!0});return h.a.trigger("show:modal",t),t.promise}return c.a.Deferred().resolve().promise()}var s=n(2),o=n.n(s),l=n(5),c=n.n(l),u=n(14),d=n(4),h=n(8),p=n(42),f=n(289);
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.syncItem,i=e.server;if(!t.server.get("connected"))return l.a.trigger("show:alert",{type:"error",message:n.i(o.default)("Please sign in to remove sync items.")}),s.a.Deferred().reject().promise();var r=a(),u=r.promise.then(function(){var e=t.destroy();return e.fail(function(e){l.a.trigger("show:alert",{type:"error",message:n.i(o.default)("There was a problem removing this sync item.")})}),e.always(function(){r.hide()}),e});return u=u.then(function(){
return c.a.execute("refreshSyncLists",{server:i,silent:!0,skipContent:!0})})}function a(){var e=new u.a({title:n.i(o.default)("Stop Syncing"),message:n.i(o.default)("Are you sure you want to stop syncing this item? All files created by this job will be removed from the device."),confirmLabel:n.i(o.default)("Remove"),cancelLabel:n.i(o.default)("Cancel"),async:!0,hasDanger:!0});return l.a.trigger("show:modal",e),e}var r=n(5),s=n.n(r),o=n(4),l=n(8),c=n(21),u=n(42);t.a=i},function(e,t,n){"use strict";
function i(){return a().then(r).then(s)}function a(){var e=l.a.Deferred(),t=c.a("appModel"),n=t.get("user"),i=!!n.get("subscription").get("features").get("home");if(i||n.get("homeUsers").length>1){var a=n.get("homeUsers").findWhere({guest:!0}),r=n.get("homeDetails");if(a)e.resolve(a);else{var s=r.populate();s.done(function(){a=new d.a({id:r.get("guestUserID"),guest:!0},{server:n.server}),e.resolve(a)}),s.fail(function(){e.reject()})}}else e.reject();return e.promise()}function r(e){return u.a.execute("authenticateWithServer",{
homeUser:e})}function s(e){var t=l.a.Deferred(),n=c.a("appModel"),i=n.get("user"),a=i.clearAccessToken();return a.always(function(){var n=i.signIn(e);n.always(function(){t.resolve()})}),t.promise()}var o=n(5),l=n.n(o),c=n(14),u=n(21),d=n(434);t.a=i},function(e,t,n){"use strict";function i(e){var t=l.a("appModel"),i=t.get("user"),a=[],s={url:e.item.get("url"),message:e.message};o.a.each(e.playlistIDs,function(e){var t=d.join(["/pms/playlists/",e,"/items"],s),n=o.a.extend(i.server.getXHROptions(t),{
type:"POST"});a.push(r.a.ajax(n))});var h=r.a.when.apply(r.a,a);return h.fail(function(e){u.a.trigger("show:alert",{type:"error",message:n.i(c.default)("There was a problem recommending this item.")})}),h.promise()}var a=n(5),r=n.n(a),s=n(2),o=n.n(s),l=n(14),c=n(4),u=n(8),d=n(20);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,i="/sync/refreshSynclists",a=r.a.extend(t.getXHROptions(i),{type:"PUT"}),s=o.a.ajax(a);return e.skipContent||(s=s.then(function(e){var n="/sync/refreshContent",i=r.a.extend(t.getXHROptions(n),{
type:"PUT"});return o.a.ajax(i)})),s.done(function(){e.silent||c.a.trigger("show:alert",{type:"success",message:n.i(l.default)("Synced items were refreshed.")})}),s.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),c=n(8);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=n.destroy({wait:!0});return t.done(function(){if(n.get("server")){var e=s.a("appModel"),t=e.get("user");t.get("desktop").get("friends").fetch()}}),t.fail(function(){r(e)}),t.always(function(){i.hide()}),t.promise();
}var n=e.invite,i=a(e),o=i.promise;return o=o.then(function(){return t()}),l.a.trigger("show:modal",i),o}function a(e){var t,i;"requests"===e.subset?(t=n.i(o.default)("Reject Invite"),i=n.i(o.default)("Are you sure you want to reject this invite?")):(t=n.i(o.default)("Cancel Invite"),i=n.i(o.default)("Are you sure you want to cancel this invite?"));var a=new c.a({title:t,message:i,async:!0});return a}function r(e){var t;t="requests"===e.subset?n.i(o.default)("There was a problem rejecting this invite."):n.i(o.default)("There was a problem canceling this invite."),
l.a.trigger("show:alert",{type:"error",message:t})}var s=n(14),o=n(4),l=n(8),c=n(42);t.a=i},function(e,t,n){"use strict";function i(){var e=r.a.Deferred(),t=n.i(s.a)("appModel"),i=t.get("user");return i.get("isLocked")?e.reject():e.resolve(),e.promise()}var a=n(5),r=n.n(a),s=n(14);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=o.destroy({wait:!0});return e.fail(function(){r.a.trigger("show:alert",{type:"error",message:n.i(a.default)("There was a problem removing this device.")
})}),e.always(function(){l.hide()}),e.promise()}var i,o=e.device;i=o.get("isCloudSync")?n.i(a.default)("Deleting the Cloud Sync entry will stop Plex from being able to access any existing Cloud Sync content. You will need to create and upload new sync items."):n.i(a.default)("If you remove this device, you will need to sign in again on the device to restore access to Plex.");var l=new s.a({title:n.i(a.default)("Remove Device"),message:i,confirmLabel:n.i(a.default)("Remove"),cancelLabel:n.i(a.default)("Cancel"),
async:!0,hasDanger:!0}),c=l.promise;return c=c.then(function(){return t()}),r.a.trigger("show:modal",l),c}var a=n(4),r=n(8),s=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){l&&i.set("home",!1);var e=i.destroy({wait:!0});return e.done(function(){var e=r.a("appModel"),t=e.get("user"),n=i.get("serverShares");if(t.get("desktop").get("invites").fetch(),t.get("desktop").get("sentInvites").fetch(),l){var a=t.get("homeUsers");a.fetch()}n.getLibraryCount({owned:!1})&&o.a.trigger("discover:servers");
}),e.fail(function(){l&&i.set("home",!0),o.a.trigger("show:alert",{type:"error",message:n.i(s.default)("There was a problem removing this friend.")})}),e.always(function(){c.hide()}),e.promise()}var i=e.friend,l=i.get("home"),c=a(e),u=c.promise;return u=u.then(function(){return t()}),o.a.trigger("show:modal",c),u}function a(e){var t=e.friend,i=t.get("serverShares"),a=i.getLibraryCount({owned:!0}),o=i.getLibraryCount({owned:!1}),u=a+o,d=t.get("title"),h=n.i(s.default)("Are you sure you want to remove {1}?",d),p=n.i(l.a)(n.i(s.default)("library"),u,n.i(s.default)("libraries"));
if(a&&o?h+=" "+n.i(s.default)("You are sharing {1} {2} with each other.",u,p):a?h+=" "+n.i(s.default)("You are sharing {1} {2} with this friend.",a,p):o&&(h+=" "+n.i(s.default)("This friend is sharing {1} {2} with you.",o,p)),t.get("home")){var f=r.a("appModel"),g=f.get("user"),m=g.get("homeUsers"),v=m.get(g.id);h+=v.get("admin")?" "+n.i(s.default)("This friend will be removed from your home."):" "+n.i(s.default)("You will be leaving your home.")}var y=new c.a({title:n.i(s.default)("Remove Friend"),
message:h,confirmLabel:n.i(s.default)("Remove"),cancelLabel:n.i(s.default)("Cancel"),async:!0,hasDanger:!0});return y}var r=n(14),s=n(4),o=n(8),l=n(270),c=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=o.a.extend(n.server.getXHROptions(n.url()),{type:"DELETE"}),i=c.a.ajax(t);return i.done(function(){var e=d.get(n.id);e?(n.trigger("destroy",n,l),n.get("restricted")?e.trigger("destroy",e,d):e.set("home",!1)):(l.reset([n]),n.set("admin",!0),d.each(function(e){e.set("home",!1);
}));var t=s.hasHome();if(s.set("home",t),!t){var i=s.get("homeDetails");i.clear()}}),i.fail(function(){r(e)}),i.always(function(){p.hide()}),i.promise()}var n=e.homeUser,i=u.a("appModel"),s=i.get("user"),l=s.get("homeUsers"),d=s.get("desktop").get("friends"),p=a(e),f=p.promise;return f=f.then(function(){return t()}),h.a.trigger("show:modal",p),f}function a(e){var t,i,a,r=e.homeUser;e.isSignedInUser?(t=n.i(d.default)("Leave Home"),a=n.i(d.default)("Leave"),i=r.get("admin")?n.i(d.default)("You are the admin in this home. If you leave, the remaining users will be removed and managed users will be deleted."):n.i(d.default)("Are you sure you want to leave this home?")):(t=n.i(d.default)("Remove User"),
a=n.i(d.default)("Remove"),i=r.get("restricted")?n.i(d.default)("Removing a managed user from your home will delete the managed user. Watched status for this user will be lost. This cannot be undone."):n.i(d.default)("You will no longer be able to switch to this user."));var s=new p.a({title:t,message:i,confirmLabel:a,cancelLabel:n.i(d.default)("Cancel"),async:!0,hasDanger:!0});return s}function r(e){var t;t=e.isSignedInUser?n.i(d.default)("There was a problem leaving this home."):n.i(d.default)("There was a problem removing this user."),
h.a.trigger("show:alert",{type:"error",message:t})}var s=n(2),o=n.n(s),l=n(5),c=n.n(l),u=n(14),d=n(4),h=n(8),p=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=c.destroy({wait:!0});return e.done(function(){var e=a.a("appModel"),t=e.get("user");t.get("desktop").get("friends").fetch(),t.get("desktop").get("invites").fetch(),s.a.trigger("discover:servers")}),e.fail(function(){var e;e=c.get("owned")?n.i(r.default)("There was a problem removing this share."):n.i(r.default)("There was a problem leaving this server."),
s.a.trigger("show:alert",{type:"error",message:e})}),e.always(function(){u.hide()}),e.promise()}var i,l,c=e.serverShare;c.get("owned")?(i=n.i(r.default)("Stop Sharing"),l=n.i(r.default)("Are you sure you want to stop sharing with this friend?")):(i=n.i(r.default)("Leave Server"),l=n.i(r.default)("Are you sure you want to leave this server? You can rejoin at any time."));var u=new o.a({title:i,message:l,async:!0,hasDanger:!0}),d=u.promise;return d=d.then(function(){return t()}),s.a.trigger("show:modal",u),
d}var a=n(14),r=n(4),s=n(8),o=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=l.a("appModel"),i=t.get("user"),a=[],s={url:e.item.get("url"),message:e.message};o.a.each(e.networkIDs,function(e){var t=d.join(["/pms/social/networks/",e,"/share"],s),n=o.a.extend(i.server.getXHROptions(t),{type:"POST"});a.push(r.a.ajax(n))});var h=r.a.when.apply(r.a,a);return h.fail(function(e){u.a.trigger("show:alert",{type:"error",message:n.i(c.default)("There was a problem sharing this item.")})}),h.promise();
}var a=n(5),r=n.n(a),s=n(2),o=n.n(s),l=n(14),c=n(4),u=n(8),d=n(20);t.a=i},function(e,t,n){"use strict";function i(e){var t,n=e.user,i=e.serverShare,a=i.get("Section");if(!a||!a.length)return c.a.Deferred().resolve().promise();t=i.get("allLibraries")?[]:o.a.pluck(o.a.where(a,{shared:!0}),"id");var s={server_id:i.get("machineIdentifier"),shared_server:{library_section_ids:t}};n.isNew()&&(s.sharing_settings=n.getSaveParams()),i.isNew()&&(n.isNew()?s.shared_server.invited_email=n.get("username"):s.shared_server.invited_id=n.id);
var l=i.url(),u=o.a.extend(n.server.getXHROptions(l),{type:i.isNew()?"POST":"PUT",contentType:"application/json",data:r()(s)});return c.a.ajax(u).promise()}var a=n(93),r=n.n(a),s=n(2),o=n.n(s),l=n(5),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(e){var t=n.i(s.a)("appModel").get("user"),i=t.get("homeUsers"),a=i.get(t.id);if(a.get("protected")||i.length>1)return r.a.Deferred().reject().promise();var u=new l.a({model:a,isEditing:!0,isEditWarning:!0});return u.promise.always(function(e){e||o.a.trigger("show:modal",new c.a({
type:"home"}))}),o.a.trigger("show:modal",u),u.promise}var a=n(5),r=n.n(a),s=n(14),o=n(8),l=n(289),c=n(811);t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a("appModel"),i=t.get("user"),a=e.item.server;if("ok"!==a.get("myPlexSigninState")){var h=n.i(o.default)("This server needs to be connected to Plex to sync its content.");return void l.a.trigger("show:alert",{type:"error",message:h})}if(!a.get("allowSync"))return void l.a.trigger("show:modal",new c.a({model:a}));var p=i.get("desktop").get("devices"),f=p.filterSyncDevices(e.item),g=r.a.clone(e);
if(f.length){var m=new d.a({collection:f}),v=m.promise;v.done(function(e){g.device=f.get(e),l.a.trigger("show:modal",new u.a(g))}),l.a.trigger("show:modal",m)}else l.a.trigger("show:alert",{type:"error",message:n.i(o.default)("You are not signed in to any sync capable devices.")})}var a=n(2),r=n.n(a),s=n(14),o=n(4),l=n(8),c=n(493),u=n(810),d=n(1750);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.i(l.a)("appModel").get("user"),i=r.a.pick(e,"username","email","password"),a=t.server.getXHROptions("/api/v2/users",{
type:"POST",data:i}),s=o.a.ajax(a).promise();return s=s.then(function(n){return e.remember?c.a.restorePrevious():c.a.register(u.a.getInstance()),t.signIn(n,{lockState:g.a.lockStates.UNLOCKED})}),s.fail(function(e){var t=void 0;if(422===e.status){var i=e.responseText&&p.a.parseXML(e.responseText),a=i&&i.error,s=r.a.isArray(a)?r.a.first(a):a;t=s?r.a.isObject(s)?n.i(f.a)(s):s:n.i(d.default)("This account information is invalid.")}else t=n.i(d.default)("There was a problem connecting to Plex.");h.a.trigger("show:alert",{
type:"error",message:t})}),s}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(14),c=n(81),u=n(315),d=n(4),h=n(8),p=n(38),f=n(264),g=n(172);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.user,i=t.get("homeDetails"),a=t.get("homeSize");i.set("guestEnabled",e.enable);var u=i.save();return u.done(function(){t.get("homeUsers").fetch(),t.get("desktop").get("friends").fetch(),t.hasHome()||c.a.execute("showHomeWarningsModal"),e.enable||2!==a||i.clear()}),u.fail(function(t){var i=l.a.parseXML(t.responseText),a=i&&i.status;
r.a.isString(a)||(a=e.enable?n.i(s.default)("Unable to enable guest account"):n.i(s.default)("Unable to disable guest account")),o.a.trigger("show:alert",{type:"error",message:a})}),u}var a=n(2),r=n.n(a),s=n(4),o=n(8),l=n(44),c=n(21);t.a=i},function(e,t,n){"use strict";function i(e){var t=o.a.Deferred(),n="/api/users/validate?invited_email="+encodeURIComponent(e.username),i=r.a.extend(e.server.getXHROptions(n),{type:"POST"}),a=o.a.ajax(i);return a.done(function(){t.resolve()}),a.fail(function(e){
var n=e.responseText,i=l.a.parseXML(n);t.reject(e,i&&i.status)}),t.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(44);t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={allowFlash:!0,allowServerUpdates:!0,allowHttpsMediaServerConnections:!0,allowMediaServerRelayConnections:!0,allowCloudSyncServers:!0,shouldCreateFlexModels:!0,shouldCreateStateTree:!0,allowCloudPubSub:!0};t.default=i},function(e,t,n){"use strict";function i(){if(!o.a.hasReplaceState)return r.a.Deferred().resolve().promise();
var e=r.a.Deferred(),t=window.location,n=l.a.parseQueryString(t.search),i=void 0;try{i=JSON.parse(n.alerts),delete n.alerts}catch(e){}if(i){c.a.set("alerts",i);var a=""+s.join([""+t.origin+t.pathname],n)+t.hash;window.history.replaceState({},"",a)}return e.resolve().promise()}var a=n(5),r=n.n(a),s=n(20),o=n(61),l=n(38),c=n(59);t.a=i},function(e,t,n){"use strict";function i(){r.a.trigger("initialize:app");var e=n.i(o.a)();return e=e.then(l.a),e=e.then(c.a),e=e.then(u.a),e=e.then(d.a),e=e.then(h.a),
e=e.then(p.a),e=e.then(f.a),e=e.then(g.a),e=e.then(m.a),s.a.get("allowCloudPubSub")&&(e=e.then(function(){return n.i(v.a)()})),e=e.then(y.a),e=e.then(b.a),a.a.mobile&&(e=e.then(S.a)),e=e.then(M.a),e=e.then(w.a),e=e.then(I.a)}var a=n(32),r=n(8),s=n(59),o=n(1408),l=n(1416),c=n(1405),u=n(1411),d=n(1402),h=n(1068),p=n(1067),f=n(1072),g=n(1410),m=n(1412),v=n(1069),y=n(1415),b=n(1409),S=n(1414),w=n(1413),M=n(1070),I=n(1417),C=n(1033),D=(n.n(C),n(1030)),T=(n.n(D),n(1032)),x=(n.n(T),n(1029)),P=(n.n(x),n(1031));
n.n(P);t.a=i},function(e,t,n){"use strict";function i(){o.a.register(new l.a),n.i(s.d)({metricsReporter:[d.a,u.a],testServerConnection:h.a}),n.i(s.d)({UserFlexModel:g.a,ServerFlexModel:m.a,CloudServerFlexModel:v.a});var e=new f.a;return n.i(s.d)({appModel:e,appStore:n.i(p.a)(e),logs:new y.a([],{parent:e})}),n.i(s.d)({metrics:[new D.a,c.a],serverManager:new b.a({appModel:e}),primaryServerManager:new S.a({appModel:e}),manualServerManager:new w.a({appModel:e}),serverConnectionManager:new M.a({appModel:e
}),serverConnectionTestManager:new I.a({appModel:e}),serverUpdateManager:new C.a({appModel:e})}),r.a.Deferred().resolve().promise()}var a=n(5),r=n.n(a),s=n(14),o=n(313),l=n(1321),c=n(1042),u=n(1043),d=n(1040),h=n(1050),p=n(1562),f=n(1425),g=n(1510),m=n(1492),v=n(1480),y=n(1105),b=n(1422),S=n(1421),w=n(1080),M=n(1083),I=n(1084),C=n(1424),D=n(1420);t.a=i},function(e,t,n){"use strict";function i(){return s.a.registerAll(o),r.a.Deferred().resolve().promise()}var a=n(5),r=n.n(a),s=n(21),o=n(1341);t.a=i;
},function(e,t,n){"use strict";var i=n(2843),a=n.n(i),r=n(2841),s=n.n(r),o=n(2842),l=n.n(o),c=n(2840),u=n.n(c),d=n(2844),h=n.n(d),p=n(2838),f=n.n(p),g=n(2839),m=n.n(g),v=n(6),y=n.n(v);y.a.registerPartial("setting",a.a),y.a.registerPartial("lockableTagInput",s.a),y.a.registerPartial("lockableTextInput",l.a),y.a.registerPartial("lockableNumericInput",u.a),y.a.registerPartial("textInput",h.a),y.a.registerPartial("autocompleteTextInput",f.a),y.a.registerPartial("connectError",m.a)},function(e,t,n){"use strict";
function i(){return n.i(r.a)().then(function(){return a.a.registerAll()})}var a=n(1324),r=n(1404);t.a=i},function(e,t,n){"use strict";function i(){var e=n.i(a.a)();return e.done(function(){var e=new r.a;e.start()}),e}var a=n(1071),r=n(1419);t.a=i},function(e,t,n){"use strict";function i(){var e=n.i(r.a)();return e.done(function(){n.i(a.a)("serverUpdateManager").start()}),e}var a=n(14),r=n(1074);t.a=i},function(e,t,n){"use strict";function i(){var e=n.i(a.a)("appModel").get("experienceSettings"),t=n.i(s.a)();
return t=t.then(function(){return n.i(r.a)(e.populate())})}var a=n(14),r=n(112),s=n(1075);t.a=i},function(e,t,n){"use strict";function i(){var e=o.a.Deferred(),t=c.a.get("myPlexAccessToken");return t.done(function(){window.PLEXWEB&&window.PLEXWEB.myPlexAccessToken||l.a.register(c.a.getInstance())}),t.always(function(){e.resolve()}),e.promise()}function a(){var e=o.a.Deferred(),t=l.a.set("plexTestToken",1);return t.done(function(){l.a.remove("plexTestToken")}),t.fail(function(e){var t=new u.a;d.a.warn("Storage module swapped for "+t.name+' due to exception: "'+e+'"'),
c.a.register(t),l.a.register(t,{ignorePrevious:!0})}),t.always(function(){e.resolve()}),e.promise()}function r(){return i().then(a).then(h.a)}var s=n(5),o=n.n(s),l=n(81),c=n(315),u=n(1047),d=n(27),h=n(1076);t.a=r},function(e,t,n){"use strict";function i(){var e=n.i(a.a)("appModel").get("user"),t=n.i(r.a)();return t.done(function(){var t=new s.a(e);t.start();var n=new o.a;n.start()}),t}var a=n(14),r=n(1077),s=n(1423),o=n(1418);t.a=i},function(e,t,n){"use strict";function i(){function e(e){if(i||arguments[1]instanceof window.KeyboardEvent&&"esc"===arguments[2]){
var a=n.i(u.a)("appModel").get("settings");if(a.get("keyboardShortcuts"))return e.apply(t,r.a.toArray(arguments).slice(1))}}var t=d.a.getInstance(),i=!0;return h.a.on("anyModalOpen",function(){i=!1}),h.a.on("allModalsClosed",function(){i=!0}),r.a.each(t.shortcuts,function(n){c.a.bind(n.keys,r.a.wrap(t[n.fn],e))}),o.a.Deferred().resolve().promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(2917),c=n.n(l),u=n(14),d=n(417),h=n(8);t.a=i},function(e,t,n){"use strict";function i(){function e(){r.a.each(h,function(t){
document.body.removeEventListener(t,e,!0)});var n=t.src.slice(-d.a.length)===d.a;n&&t.play()}var t=n.i(c.a)("audio",!0);try{t.style.cssText="position:absolute;width:1px;height:1px;",t.setAttribute("src",d.a)}catch(e){l.a.error("An error occurred trying to initialize the audio element.")}return r.a.each(h,function(t){document.body.addEventListener(t,e,!0)}),o.a.Deferred().resolve().promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(27),c=n(444),u=n(2622),d=n.n(u);t.a=i;var h=["touchstart","mousedown","mousemove","click","keydown","keypress"];
},function(e,t,n){"use strict";function i(e){var t=!e.get("isShared")||e.supports("sharedSyncStatus");return e.get("isFullServer")&&t}function a(){var e=new c.a({name:"MediaServerEventManager",appModel:n.i(o.a)("appModel"),isValidServer:i,supportsLongPolling:!1,showTimelineStatus:!0,ServerEventConnection:l.a,ServerRetryManager:u.a});return e.start(),s.a.Deferred().resolve().promise()}var r=n(5),s=n.n(r),o=n(14),l=n(1574),c=n(623),u=n(622);t.a=a},function(e,t,n){"use strict";function i(){return new s.a,
r.a.Deferred().resolve().promise()}var a=n(5),r=n.n(a),s=n(1234);t.a=i},function(e,t,n){"use strict";function i(){return new o.a,new l.a,new c.a,new u.a,new d.a,new h.a,new p.a,new f.a,new g.a,s.a.history.start(),r.a.Deferred().resolve().promise()}var a=n(5),r=n.n(a),s=n(47),o=n(1519),l=n(1529),c=n(1521),u=n(1517),d=n(1523),h=n(1527),p=n(1515),f=n(1531),g=n(1525);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(14),s=n(34),o=n(8),l=n(52),c=n(1596),u=s.a.extend({mixins:l.a,announcementsUpdateDelay:36e5,
initialize:function(){this.user=n.i(r.a)("appModel").get("user"),a.a.bindAll(this,"updateAnnouncements","onSignedInChange")},start:function(){var e=a.a.debounce(this.onAnnouncementsChange),t=a.a.debounce(this.onSignedInChange);this.listenTo(this.user,"change:signedIn",t),this.listenTo(this.user.get("desktop"),{"change:announcements":e,"change:announcements.reset":e,"change:announcements.update":e,"change:announcements.change:read":e,"change:announcements.change:priority":e}),this.user.populate().fail(t);
},stop:function(){clearTimeout(this.announcementsUpdateTimeout),this.user.get("desktop").get("announcements").reset(),this.stopListening()},updateAnnouncements:function(){!this.user.get("restricted")&&this.user.server.get("isConnected")&&(this.user.get("desktop").get("announcements").fetch(),this.announcementsUpdateTimeout&&clearTimeout(this.announcementsUpdateTimeout),this.announcementsUpdateTimeout=setTimeout(this.updateAnnouncements,this.announcementsUpdateDelay))},onSignedInChange:function(){
this.user.get("desktop").get("announcements").reset(),this.updateAnnouncements()},onAnnouncementsChange:function(){if(this.user.get("isSignedIn")&&!this.user.get("restricted")){var e=this.user.get("desktop").get("announcements"),t=e.findWhere({style:"priority",read:!1});t&&o.a.trigger("show:bar","alertbar",new c.a({model:t}))}}});t.a=u},function(e,t,n){"use strict";var i=n(416),a=n(1079),r=n(754),s=a.a.extend({mixins:r.a,start:function(){a.a.prototype.start.apply(this,arguments),this.handleCollectUsageData(i.a);
}});t.a=s},function(e,t,n){"use strict";var i=n(1081),a=n(754),r=i.a.extend({mixins:a.a,start:function(){var e=i.a.prototype.start.apply(this,arguments);return this.handleCollectUsageData(this),e}});t.a=r},function(e,t,n){"use strict";var i=n(8),a=n(1082),r=a.a.extend({fetchPrimaryRelations:function(e){var t=this,n=e.get("isFullOwnedServer"),i=e.get("isShared")&&e.supports("sharedSettings"),a=e.get("desktop").get("settings");if(n||i){var r=a.populate();n&&r.done(function(){var n=t.appModel.get("primaryServer"),i=n&&n.id===e.id;
i&&t.handlePrimarySettings(e,a)})}if(n){var s=e.get("desktop").get("sessions");s.fetch({reset:!0})}var o=e.get("home"),l=e.get("activeConnection"),c=l.get("isPrivate")||n||o;if(c){var u=this.appModel.get("players");u.reset(),u.setContext("server",e),u.fetch()}},handlePrimarySettings:function(e,t){var n=t.get("AcceptedEULA"),a=n&&n.get("value")===!1;a&&i.a.trigger("navigate","setupBasic",{serverID:e.id})}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(8),s=n(21),o=n(1085),l=n(83),c=n(61),u=o.a.extend({
start:function(){o.a.prototype.start.call(this),this.listenTo(this.servers,"change:isClaimed",this.onClaimedChange),this.listenTo(r.a,"cloudServer:addUnclaimedServer",this.onAddClaimedServer)},onAddClaimedServer:function(e){var t=this.appModel,n=t.get("cloudServer"),i=new l.a({},{parent:t}),r=a.a.isArray(e.Device.Connection)?e.Device.Connection:[e.Device.Connection];a.a.each(r,function(e){var t=e.uri,a=e.port,r=e.address,s=e.protocol;i.addConnection({uri:t,port:a,address:r,scheme:s,sources:[{id:n.id
}]})},this),c.a.isHostedHttps&&!i.get("isSecure")?s.a.execute("showClaimServerAlertBar",i):t.get("servers").add(i)},onClaimedChange:function(e,t){var n=e.get("isFullOwnedServer")&&e.get("isConnected"),i=t===!1&&!e.previous("isClaimed");n&&i&&s.a.execute("showClaimServerAlertBar",e)}});t.a=u},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(5),s=n.n(r),o=n(8),l=n(4),c=n(21),u=n(1078),d=n(42),h=n(289),p=u.a.prototype,f=u.a.extend({collectionNames:["homeDetails","homeUsers"],flexCollectionNames:["devices","friends","invites","socialNetworks"],
handleInvalidToken:function(){var e=new d.a({title:n.i(l.default)("Invalid Credentials"),message:n.i(l.default)("Your credentials have expired. Please sign in again."),confirmLabel:n.i(l.default)("OK"),cancelLabel:n.i(l.default)("Ignore")});e.promise.done(function(){o.a.trigger("navigate","login",{silent:!0})}),o.a.trigger("show:modal",e)},onIsSignedInChange:function(e,t){if(p.onIsSignedInChange.apply(this,arguments),e.get("isFullUser")&&t){var n=e.server.getXHROptions("/api/claim/subscribe");s.a.ajax(a()({},n,{
type:"POST"}))}},onIsLockedChange:function(e,t){p.onIsLockedChange.apply(this,arguments),t&&o.a.trigger("show:modal",new h.a({isForced:!0}))},onIsUnlockedChange:function(e,t){t&&c.a.execute("resumePlayQueue",e)}});t.a=f},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(14),s=n(34),o=n(8),l=n(52),c=n(21),u=n(1598),d=s.a.extend({mixins:[l.a],bundleUpdatesDelay:36e5,initialize:function(e){this.appModel=e.appModel},start:function(){this.stop(),this.listenTo(this.appModel,{"change:primaryServer":this.onPrimaryServerChange,
"change:primaryServer.change:isConnected":this.onPrimaryServerConnectedChange})},stop:function(){this.stopListening()},isLastHistoryEntry:function(e){var t=this.appModel.get("history"),n=a.a.last(t);return!(!n||!n.indexOf("fragment"))},isLastDismissedVersion:function(e){var t=e.get("shortVersion")||"unknown",i=n.i(r.a)("appModel").get("settings");return t===i.get("serverUpdateDismissedVersion")},checkForServerUpdates:function(e){if(e.get("isConnected")&&e.get("updater")){var t=e.get("desktop").get("update");
e.supports("updater")?t.fetch().then(function(){c.a.execute("checkForServerUpdates",{server:e,download:!1})}):this.isLastDismissedVersion(t)||o.a.trigger("show:bar","alertbar",new u.a({model:t}))}},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");return n&&this.stopListening(n.get("desktop").get("update")),t&&t.get("isFullOwnedServer")?(this.listenTo(t.get("desktop").get("update"),"change:state",this.onServerUpdateStateChange),void this.checkForServerUpdates(t)):void clearTimeout(this.bundleUpdatesTimeout);
},onPrimaryServerConnectedChange:function(e,t){this.checkForServerUpdates(e)},onServerUpdateStateChange:function(e,t){this.isLastDismissedVersion(e)||this.isLastHistoryEntry("/settings/server")||/^(available|downloaded|notify)$/.test(t)&&o.a.trigger("show:bar","alertbar",new u.a({model:e}))}});t.a=d},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(185),s=n(1285),o=n(16),l=n(1098),c=n(1142),u=n(642),d=n(640),h=n(1476),p=n(1495),f=n(1497),g=n(1426),m=l.a.extend({name:"DesktopAppModel",sessionAttrs:a()({},l.a.prototype.sessionAttrs,{
isFirstRun:o.a.boolean.isRequired,isCastApiAvailable:o.a.boolean.isRequired,isCastDeviceAvailable:o.a.boolean.isRequired,primaryPlayer:o.a.instanceOf(u.a,d.a),settings:o.a.instanceOf(g.a)}),sessionRelations:a()({},l.a.prototype.sessionRelations,{entities:{relationClass:n.i(s.a)(r)},players:{relationClass:c.a},multiSelect:{relationClass:h.a},experienceSettings:{relationClass:p.a},ui:{relationClass:f.a}}),defaults:function(){var e=l.a.prototype.defaults.apply(this,arguments);return a()({},e,{isFirstRun:!1,
isCastApiAvailable:!1,isCastDeviceAvailable:!1,settings:new g.a})}});t.a=m},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(2),s=n.n(r),o=n(32),l=n(260),c=n(259),u=n(1097),d=u.a.extend({storageKey:"settingsv2",defaults:a()({},u.a.prototype.defaults,{playThemeMusic:!1,keyboardShortcuts:!0,showUnwatchedIcons:!1,showAdvancedSettings:!1,allowHttpFallback:c.a.NEVER,companion:!0,localQuality:-1,remoteQuality:8,channelQuality:-1,dash:!0,directPlay:!0,directStream:!0,preferAAC:"wiiu"===o.a.id||"edge"===o.a.id,
allowAC3:!1,subtitleSize:100,subtitlesBurnLevel:l.a.ALWAYS,audioBoost:100,"syncQuality!video":8,"syncQuality!music":2,"syncQuality!photo":2,sidebarOpen:!1,videoPlayerVolume:100,musicPlayerVolume:100,announcementsLastReadTimestamp:0,serverUpdateDismissedVersion:"",hasDismissedPremiumMusicAlert:!1,hasSkippedInstallServer:!1,viewedUnclaimedServers:[],dismissedUnclaimedServers:[],listType:"media-tile-list","listType!track":"media-list",relayConfirmed:!1,suppressLimitedPlaybackMessage:!1}),getListTypeKey:function(e){
var t="listType";return e&&(t+="!"+e.get("typeString")),t},getListType:function(e){var t,n;return e=e||{},s.a.has(e,"mediaType")&&s.a.isObject(e.mediaType)&&(n=this.getListTypeKey(e.mediaType)),t=this.get(n)||this.get(e.fallbackKey)||this.get("listType")},saveListType:function(e,t){var n=this.getListTypeKey(e);this.save(n,t),s.a.isEqual(n,"listType")||this.trigger("change:listType",this,t)},getSectionListType:function(e,t){var n;return e&&(t=t||e.get("currentType"),n=e.getScopedKey("listType")),this.getListType({
mediaType:t,fallbackKey:n})}});t.a=d},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(20),s=n(22),o=n(1428),l=s.a.extend({name:"DownloadServerCollection",context:["server"],url:function(){var e=a.a.result(this.server,"url");return r.join([e,"api/downloads/1"])},model:o.a});t.a=l},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(1429),s=a.a.extend({name:"DownloadServerModel",context:["server"],rootPropertyName:"Type",idAttribute:"name",syncedAttrs:{name:i.a.string},syncedRelations:{platforms:{
rootPropertyName:"Platform",relationClass:r.a,options:function(e){return{type:e.name}}}}});t.a=s},function(e,t,n){"use strict";var i=n(22),a=n(1430),r=i.a.extend({name:"DownloadServerPlatformCollection",context:["server","type"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(17),s=n.n(r),o=n(16),l=n(18),c=n(1431),u=l.a.extend({name:"DownloadServerPlatformModel",context:["server","type"],rootPropertyName:"Platform",idAttribute:"id",syncedAttrs:{id:o.a.string,name:o.a.string,
version:o.a.string,date:o.a.integer,requirements:o.a.string,fixed:o.a.string,added:o.a.string,info:o.a.string},syncedRelations:{releases:{rootPropertyName:"Release",relationClass:c.a}},derivedAttrs:{type:function(){return this.type}},augmentResponse:function(e){var t=e.release_date,n=e.extra_info,i=e.items_fixed,r=e.items_added,o=s()(e,["release_date","extra_info","items_fixed","items_added"]);return a()({},o,{info:n,fixed:i,added:r,date:t+"000"})}});t.a=u},function(e,t,n){"use strict";var i=n(22),a=n(1432),r=i.a.extend({
name:"DownloadServerReleaseCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"DownloadServerReleaseModel",context:["server"],modelId:function(){return this.get("build")+"-"+this.get("distro")},syncedAttrs:{label:i.a.string,build:i.a.string,distro:i.a.string,url:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(22),s=n(1434),o=r.a.extend({name:"ArtworkCollection",context:["server","artworkType"],model:s.a,url:function(){
var e=a.a.result(this.parent,"url");return e+"/"+this.artworkType+"s"}});t.a=o},function(e,t,n){"use strict";var i=n(16),a=n(18),r={POSTER:"poster",ART:"art",BANNER:"banner"},s=a.a.extend({name:"ArtworkModel",context:["server","artworkType"],idAttribute:"ratingKey",rootPropertyName:"Photo",syncedAttrs:{key:i.a.string,ratingKey:i.a.string,thumb:i.a.string,selected:i.a.boolean}},{types:r});t.a=s},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(756),s=a.a.extend({name:"FilePathModel",context:["server"],
idAttribute:"key",rootPropertyName:"Path",sessionAttrs:{isBackShortcut:i.a.boolean},sessionRelations:{children:function(){return{relationClass:r.a,options:{url:this.id}}}},syncedAttrs:{key:i.a.string,title:i.a.string,path:i.a.string,home:i.a.boolean,network:i.a.boolean}});t.a=s},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"MatchResultModel",context:["server"],idAttribute:"guid",rootPropertyName:"SearchResult",syncedAttrs:{id:i.a.integer,guid:i.a.string,name:i.a.string,parentGUID:i.a.string,
parentName:i.a.string,type:i.a.string,index:i.a.integer,score:i.a.integer,thumb:i.a.string,year:i.a.integer,matched:i.a.boolean},syncedRelations:{children:function(){return{relationClass:n(757).default,rootPropertyName:"SearchResult"}}},derivedAttrs:{normalizedScore:function(){var e=this.get("score");if(null!=e)return Math.min(Math.max(e,0),100)}}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(20),l=n(1111),c=n(1442),u=l.a.extend({defaults:function(){return{children:new c.a([],{
server:this.server,parent:this})}},findItem:function(e){return this.get("children").get(e)},addContent:function(e){var t=[a.a.result(this,"url"),"items",e.id],n=o.join(t,e.getSaveParams()),i=a.a.extend(e.server.getXHROptions(n),{type:"PUT"}),r=s.a.ajax(i);return r.then(a.a.bind(function(e){this.set(this.parse(e))},this)),r.promise()}});t.a=u},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(8),l=n(44),c=n(20),u=n(252),d=n(250),h=u.a.extend({whitelistedAttrs:["playQueueID","playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID","playQueueLastAddedItemID","playQueueShuffled","playQueueSourceURI","playQueueTotalCount","playQueueVersion","message"],
defaults:function(){return{selectedItem:null,mediaType:null,owned:!0,hasUserAdditions:!1,playQueueVersion:0}},metadataElementNames:["Directory","Video","Track","Photo","Hub"],url:function(){return"/playQueues/"+this.id},initialize:function(){this.listenTo(this,"change:message",this.onMessageChange)},convert:function(e){var t=a.a.isObject(e)?e:l.a.parseXML(e);return l.a.parseBoolean(t,"playQueueShuffled"),l.a.parseInteger(t,["playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueTotalCount","playQueueVersion"]),
l.a.parseArray(t,"Metadata"),t},parse:function(e,t){a.a.isString(e)&&(e=l.a.replaceXMLElementNames(e,this.metadataElementNames,"Metadata"));var n=this.convert(e);n.id&&(n.playQueueID=n.id);var i=a.a.pick(n,this.whitelistedAttrs);return this.set(i,{silent:!0}),this.pendingChanges=this.changed,this.parseItems(n),i},parseItems:function(e){var t=this.get("collection"),n=e.Metadata,i=!!n.length,r=a.a.pluck(n,"playQueueItemID").indexOf(e.playQueueSelectedItemID),s=e.playQueueSelectedItemOffset,o=s-r;a.a.each(n,function(t,n){
t.queueIndex=o+n,e.identifier&&(t.identifier=e.identifier),e.mediaTagPrefix&&(t.mediaTagPrefix=e.mediaTagPrefix),e.mediaTagVersion&&(t.mediaTagVersion=e.mediaTagVersion)}),t?t.set(n,{parse:i}):(t=new d.a(n,{server:this.server,parent:this,parse:i}),this.set("collection",t)),t.totalSize=e.playQueueTotalCount,t.availableRange={start:o,end:o+t.length}},moveItem:function(e,t){if(e===this.get("playQueueSelectedItemID"))return s.a.Deferred().resolve().promise();this.set("hasUserAdditions",!0);var n={after:t||-1
},i=c.join([a.a.result(this,"url"),"/items/",e,"/move"],n);return this._ajax("PUT",i)},queueContent:function(){throw new Error("Clients cannot queue background processing items.")},addContent:function(){throw new Error("Clients cannot add background processing items.")},removeItem:function(){throw new Error("Clients cannot remove background processing items directly. Generators (e.g. sync items) should be deleted.")},yieldOwnership:function(){throw new Error("Only the admin owns the background processing queue.");
},takeOwnership:function(){throw new Error("Only the admin owns the background processing queue.")},getUpNextRange:function(){var e=this.get("collection"),t=e.get(this.get("playQueueSelectedItemID")),n=e.indexOf(t),i=Math.max(n,0),a=i,r=this.get("playQueueLastAddedItemID");if(null!=r){var s=e.get(r),o=e.indexOf(s);o>i&&(a=o)}return{start:i,end:a}},_ajax:function(e,t){var n=a.a.extend(this.server.getXHROptions(t),{type:e}),i=s.a.ajax(n);return i.done(a.a.bind(function(e){this.set(this.parse(e)),a.a.isEmpty(this.pendingChanges)||(a.a.each(this.pendingChanges,function(e,t){
this.trigger("change:"+t,this,e)},this),this.trigger("change",this),this.pendingChanges=null),this.set("selectedItem",this.getCurrentItem())},this)),i.promise()},onMessageChange:function(e,t){t&&o.a.trigger("show:alert",{type:"error",message:t})}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(55),o=s.a.extend({idAttribute:"key",whitelistedAttrs:["queueItemID","generatorID","targetTagID","syncItemId","syncItemTitle","key","type","progress","speed","remaining","size","ratingKey","title","thumb"],
convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return r.a.parseInteger(t,["queueItemID","generatorID","targetTagID","syncItemId","remaining","size"]),r.a.parseFloat(t,["progress","speed"]),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(175),a=n(75),r=n(1441),s=a.a.extend({model:r.a,url:"/clients/profiles?type="+i.a.LOCAL,parse:function(e){return this.convert(e,"Profile")}});t.a=s},function(e,t,n){"use strict";
var i=n(2),a=n.n(i),r=n(44),s=n(55),o=s.a.extend({idAttribute:"title",whitelistedAttrs:["title","selected"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return r.a.parseBoolean(t,"selected"),t},parse:function(e,t){var n=this.convert(e);return n=a.a.pick(n,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(20),a=n(175),r=n(22),s=n(277),o=r.a.extend({name:"VersionGeneratorCollection",context:["server"],model:s.a,url:function(){return i.join(["playlists",this.parent.id,"items"],{
type:a.a.LOCAL})}});t.a=o},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"VersionGeneratorMediaSettingsModel",context:["server"],syncedAttrs:{videoQuality:{type:i.a.integer,save:!0},videoResolution:{type:i.a.string,save:!0},maxVideoBitrate:{type:i.a.integer,save:!0},audioBoost:{type:i.a.integer,save:!0},subtitleSize:{type:i.a.integer,save:!0},musicBitrate:{type:i.a.integer,save:!0},photoQuality:{type:i.a.integer,save:!0},photoResolution:{type:i.a.string,save:!0}}});t.a=r},function(e,t,n){
"use strict";var i=n(22),a=n(1446),r=i.a.extend({name:"VersionGeneratorMetadataCollection",context:["server","generator"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(38),s=n(20),o=n(210),l=n(16),c=n(57),u=n(18),d=n(1444),h=u.a.extend({mixins:[o.a],name:"VersionGeneratorMetadataListModel",context:["server","generator"],collectionName:"metadataItems",url:function e(){var e=s.join([a.a.result(this.generator,"url"),"items"]);return this.getPaginatedUrl(e)},sessionAttrs:{currentPageStart:l.a.integer,
currentPageSize:l.a.integer,populatedRange:l.a.object},syncedAttrs:{totalSize:l.a.integer,identifier:l.a.string,mediaTagPrefix:l.a.string,mediaTagVersion:l.a.string,viewGroup:l.a.string,title:l.a.string},syncedRelations:{metadataItems:{relationClass:d.a,rootPropertyName:"Metadata",setOptions:function(e){return{remove:e.remove,at:e.at}}}},defaults:function(){return{populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},augmentResponseText:function(e,t){return t===c.a.xml?r.a.replaceMetadataXMLElementNames(e):e;
}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(16),s=n(18),o=n(49),l=s.a.extend({name:"VersionGeneratorMetadataModel",context:["server","generator"],idAttribute:"ratingKey",syncedAttrs:a.a.extend({},o.a.prototype.syncedAttrs,{processingState:r.a.string,processingStateContext:r.a.string})});t.a=l},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"VersionGeneratorPolicyModel",context:["server"],syncedAttrs:{scope:{type:i.a.string,save:!0},value:{type:i.a.integer,
save:!0},unwatched:{type:i.a.boolean,save:!0}},defaults:{unwatched:!1}});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"VersionGeneratorStatusModel",context:["server"],syncedAttrs:{state:i.a.string,failureCode:i.a.string,failure:i.a.string,itemsCount:i.a.integer,itemsCompleteCount:i.a.integer,itemsSuccessfulCount:i.a.integer,itemsFailedCount:i.a.integer,itemsDisabledCount:i.a.integer,totalSize:i.a.integer}});t.a=r},function(e,t,n){"use strict";var i=n(175),a=n(75),r=n(1450),s=a.a.extend({
model:r.a,url:"/library/tags?type="+i.a.LOCAL,comparator:function(e){return e.get("MediaSettings").maxVideoBitrate},parse:function(e){return this.convert(e,"Tag")}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(55),o=s.a.extend({name:"VersionTargetModel",whitelistedAttrs:["id","tag","tagType","MediaSettings","Device"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return r.a.parseInteger(t,"id"),t},parse:function(e,t){var n=this.convert(e);return n=a.a.pick(n,this.whitelistedAttrs);
}});t.a=o},function(e,t,n){"use strict";var i=n(22),a=n(1452),r=i.a.extend({name:"LockedFieldCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"LockedFieldModel",context:["server","section"],idAttribute:"name",syncedAttrs:{name:{type:i.a.string,save:!0},locked:{type:i.a.boolean,save:!0}}});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"MetadataAutocompleteResultModel",context:["server","section","multiMetadataItem","query"],
idAttribute:"ratingKey",rootPropertyName:"Metadata",syncedAttrs:{elementName:i.a.string,ratingKey:i.a.string,parentRatingKey:i.a.string,grandparentRatingKey:i.a.string,type:i.a.string,title:i.a.string,parentTitle:i.a.string,grandparentTitle:i.a.string,tag:i.a.string,tagType:i.a.integer}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(176),s=n(20),o=n(36),l=n(16),c=n(18),u=n(1133),d=n(254),h=n(1451),p={album:{title:"title",parentRatingKey:"artist.id",parentTitle:"artist.title"},track:{
parentRatingKey:"album.id",parentTitle:"album.title",grandparentRatingKey:"artist.id",grandparentTitle:"artist.title"}},f=c.a.extend({name:"MultiMetadataModel",context:["server","section"],rootPropertyName:"Common",isNew:function(){return!1},url:function(){return s.join([this.sectionUrl(),"common"],this.getUrlParams())},saveUrl:function(){return s.join([this.sectionUrl(),"all"],this.getUrlParams())},sectionUrl:function(){return a.a.result(this.section,"url")},tagRelations:["Collection","Director","Producer","Writer","Genre","Mood","Country","Label","Similar","Role"],
sessionAttrs:{metadataItems:l.a.array.isRequired,originalSaveParams:l.a.object,poster:l.a.string,banner:l.a.string,art:l.a.string},syncedAttrs:{mixedFields:l.a.list.isRequired,key:{type:l.a.string,save:!0},ratingKey:{type:l.a.string,save:!0},parentRatingKey:{type:l.a.string,save:!0},grandparentRatingKey:{type:l.a.string,save:!0},title:{type:l.a.string,save:!0},titleSort:{type:l.a.string,save:!0},originalTitle:{type:l.a.string,save:!0},parentTitle:{type:l.a.string,save:!0},grandparentTitle:{type:l.a.string,
save:!0},year:{type:l.a.string,save:!0},tagline:{type:l.a.string,save:!0},summary:{type:l.a.string,save:!0},studio:{type:l.a.string,save:!0},contentRating:{type:l.a.string,save:!0},originallyAvailableAt:{type:l.a.string,save:!0},rating:{type:l.a.float,save:!0},userRating:{type:l.a.float,save:!0},index:{type:l.a.integer,save:!0},parentIndex:{type:l.a.integer,save:!0}},sessionRelations:{preferences:{relationClass:d.a}},syncedRelations:{collections:{relationClass:u.a,rootPropertyName:"Collection",save:!0
},directors:{relationClass:u.a,rootPropertyName:"Director",save:!0},producers:{relationClass:u.a,rootPropertyName:"Producer",save:!0},writers:{relationClass:u.a,rootPropertyName:"Writer",save:!0},genres:{relationClass:u.a,rootPropertyName:"Genre",save:!0},moods:{relationClass:u.a,rootPropertyName:"Mood",save:!0},countries:{relationClass:u.a,rootPropertyName:"Country",save:!0},labels:{relationClass:u.a,rootPropertyName:"Label",save:!0},similar:{relationClass:u.a,rootPropertyName:"Similar",save:!0},
roles:{relationClass:u.a,rootPropertyName:"Role",save:!0},lockedFields:{relationClass:h.a,rootPropertyName:"Field",save:!0}},derivedAttrs:{type:function(){var e=this.getSingleMetadataItem();if(e)return e.get("type")},aggregateTitle:function(){var e=this.get("metadataItems");if(e.length)return r.a.title(null,{items:this.get("metadataItems")})},isSingleMetadataItem:function(){return 1===this.get("metadataItems").length}},defaults:function(){return{metadataItems:[],mixedFields:[]}},initialize:function(e,t){
this.set("metadataItems",a.a.clone(t.metadataItems))},getSingleMetadataItem:function(){return a.a.first(this.get("metadataItems"))},getUrlParams:function(){var e=o.a.get(this.get("type")),t=a.a.map(this.get("metadataItems"),function(e){return e.get("ratingKey")});return{type:e.id,id:t.join(",")}},getSaveParams:function(){var e=this,t=c.a.prototype.getSaveParams.apply(this,arguments),n=this.get("originalSaveParams");if(!n)return t;var i={};if(a.a.each(t,function(t,r){var s=n[r];a.a.isEqual(t,s)||a.a.extend(i,e.getSaveParam(r,t,s));
}),i.isReparenting){delete i.isReparenting;var r=p[this.get("type")];a.a.each(r,function(t,n){var r=t+".value",s=e.getQueryAttrSibling(t),o=s+".value",l=a.a.has(i,r),c=a.a.has(i,o);if(l&&c&&r!==o&&delete i[o],!l&&!c){var u=e.get(n);u&&(i[r]=u)}})}return i},getSaveParam:function(e,t,n){var i;if("Field"===e)return this.getFieldSaveParams(e,t,n);if(this.tagRelations.indexOf(e)!==-1)return this.getTagSaveParams(e,t,n);var r=p[this.get("type")];{if(!r||!a.a.has(r,e))return i={},i[e+".value"]=t,i;var s=r[e];
if(t){var o;return o={isReparenting:!0},o[s+".value"]=t,o}}},getFieldSaveParams:function(e,t,n){var i=t.reduce(function(e,t){return e[t.name+".locked"]=t.locked,e},{});return i},getTagSaveParams:function(e,t,n){var i=a.a.map(t,function(e){return e.tag}),r=a.a.map(n,function(e){return e.tag}),s=a.a.without.apply(a.a,[r].concat(i)),o=e.toLowerCase(),l={};return i.forEach(function(e,t){l[o+"["+t+"].tag.tag"]=e}),s.length&&(l[o+"[].tag.tag-"]=a.a.map(s,encodeURIComponent).join(",")),l},getQueryAttr:function(e){
var t=this.get("type"),n=p[t];return n?n[e]||e:e},getQueryAttrSibling:function(e){var t=this.getQueryAttr(e).match(/(^.*\.)(.*$)/);return t?t[1]+("id"===t[2]?"title":"id"):e}});t.a=f},function(e,t,n){"use strict";var i=n(38),a=n(57),r=n(22),s=n(760),o=r.a.extend({name:"SyncMetadataCollection",context:["server","device","syncItemId"],model:s.a,url:function(){return"/sync/items/"+this.syncItemId},augmentResponseText:function(e,t){return t===a.a.xml?i.a.replaceMetadataXMLElementNames(e):e}});t.a=o},function(e,t,n){
"use strict";var i=n(450),a=n(22),r=n(1457),s=a.a.extend({name:"MediaGrabberDeviceChannelCollection",context:["server"],model:r.a,comparator:function(e,t){return n.i(i.a)(e.get("identifier"),t.get("identifier"))}});t.a=s},function(e,t,n){"use strict";var i=n(18),a=n(16),r=i.a.extend({name:"MediaGrabberDeviceChannelModel",rootPropertyName:"DeviceChannel",idAttribute:"identifier",syncedAttrs:{identifier:a.a.string,name:a.a.string,drm:a.a.boolean,hd:a.a.boolean}});t.a=r},function(e,t,n){"use strict";
var i=n(22),a=n(1459),r=i.a.extend({name:"DVRSetupErrorMessageCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(16),r=i.a.extend({name:"DVRSetupErrorMessageModel",sessionAttrs:{id:a.a.string,message:a.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(764),r=i.a.extend({name:"EPGCountryCollection",context:["server"],model:a.a,url:"/livetv/epg/countries"});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(765),r=i.a.extend({name:"EPGCountryRegionCollection",
context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(1464),r=i.a.extend({name:"EPGCountryRegionCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(16),r=n(1462),s=i.a.extend({name:"EPGLineupGroupModel",context:["server"],idAttribute:"uuid",syncedAttrs:{uuid:a.a.string},syncedRelations:{lineups:{relationClass:r.a,rootPropertyName:"Lineup"}}});t.a=s},function(e,t,n){"use strict";var i=n(18),a=n(16),r=i.a.extend({name:"EPGLineupModel",
context:["server"],idAttribute:"uuid",rootPropertyName:"Lineup",syncedAttrs:{uuid:a.a.string,type:a.a.string,title:a.a.string,lineupType:a.a.integer,location:a.a.string},defaults:{location:""}});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(16),r=n(1460),s=n(764),o=n(1468),l=n(475),c=n(1463),u=n(1461),d=n(765),h=i.a.extend({name:"EPGSettingsModel",context:["server"],sessionAttrs:{baseUrl:a.a.string,postalCode:a.a.string,isFetching:a.a.boolean,isPopulated:a.a.boolean},sessionRelations:{countries:{
relationClass:r.a},languages:{relationClass:o.a},regions:{relationClass:u.a},lineupGroup:{relationClass:c.a},selectedCountry:{relationClass:s.a,deferred:!0},selectedLanguage:{relationClass:l.a,deferred:!0},selectedRegion:{relationClass:d.a,deferred:!0}},defaults:{baseUrl:"/livetv/epg/countries",isFetching:!1,isPopulated:!1,postalCode:""}});t.a=h},function(e,t,n){"use strict";var i=n(22),a=n(1467),r=i.a.extend({name:"EPGChannelCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";
var i=n(18),a=n(16),r=i.a.extend({name:"EPGChannelModel",context:["server"],rootPropertyName:"Channel",idAttribute:"identifier",syncedAttrs:{identifier:a.a.string,callSign:a.a.string,thumb:a.a.string,title:a.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(475),r=i.a.extend({name:"EPGLanguageCollection",context:["server"],model:a.a,url:"/livetv/epg/languages"});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(16),r=i.a.extend({name:"ChannelMappingModel",context:["server"],rootPropertyName:"ChannelMapping",
idAttribute:"deviceIdentifier",syncedAttrs:{deviceIdentifier:a.a.string,lineupIdentifier:a.a.string,enabled:a.a.boolean},defaults:{enabled:!1}});t.a=r},function(e,t,n){"use strict";var i=n(22),a=n(1471),r=i.a.extend({name:"SearchHubCollection",context:["server","provider"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(1472),s=a.a.extend({name:"SearchHubModel",context:["server","provider"],idAttribute:"hubIdentifier",syncedAttrs:{hubIdentifier:i.a.string,size:i.a.integer,
type:i.a.string,title:i.a.string},syncedRelations:{results:{relationClass:r.a,rootPropertyName:"Metadata"}}});t.a=s},function(e,t,n){"use strict";var i=n(22),a=n(1473),r=i.a.extend({name:"SearchResultCollection",context:["server","provider"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(17),s=n.n(r),o=n(16),l=n(185),c=n(65),u=n(18),d=n(639),h=n(49),p=u.a.extend({name:"SearchResultModel",context:["server","provider"],entityType:l.SEARCH_RESULT,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;
return n.i(c.a)(this.entityType,e.key,this.server.entityID())},idAttribute:"key",syncedAttrs:{key:o.a.string,reasonID:o.a.integer,reason:o.a.string,reasonTitle:o.a.string},syncedRelations:{tagItem:{relationClass:d.a,deferred:!0},metadataItem:{relationClass:h.a,deferred:!0}},augmentResponse:function(e){var t,n=e.key,i=e.reason,r=e.reasonTitle,o=e.reasonID,l=s()(e,["key","reason","reasonTitle","reasonID"]),c=l.tag?"tagItem":"metadataItem";return t={key:n,reason:i,reasonTitle:r,reasonID:o},t[c]=a()({
key:n},l),t}});t.a=p},function(e,t,n){"use strict";var i=n(22),a=n(1475),r=i.a.extend({name:"MultiSelectItemCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"MultiSelectItemModel",sessionAttrs:{id:i.a.any.isRequired,type:i.a.string.isRequired},sessionRelations:{model:{relationClass:a.a,deferred:!0}}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(16),s=n(18),o=n(1474),l=s.a.extend({name:"MultiSelectModel",sessionAttrs:{activeSelectionRange:r.a.object
},sessionRelations:{activeSelectionItems:{relationClass:o.a}},derivedAttrs:{activeSelectionType:function(){var e=this.get("activeSelectionItems").first();if(e)return e.get("type")}},initialize:function(){this.listenTo(this.get("activeSelectionItems"),{remove:this.resetSelectionRange,reset:this.resetSelectionRange})},listenToCollection:function(e){this.stopListening(e),this.listenTo(e,{reset:this.onCollectionReset,remove:this.onCollectionRemove})},resetSelectionRange:function(){this.set("activeSelectionRange",null);
},onCollectionReset:function(e,t){var n=this.get("activeSelectionItems"),i=t.previousModels;a.a.each(i,function(t){e.contains(t)||n.remove(t.id)})},onCollectionRemove:function(e){var t=this.get("activeSelectionItems");t.remove(e.id)}});t.a=l},function(e,t,n){"use strict";var i=n(22),a=n(57),r=n(107),s=i.a.extend({name:"ActivityCollection",context:["server"],model:r.b,url:"/activities",responseType:function(){return this.server.supports("json")?a.a.json:a.a.xml}});t.a=s},function(e,t,n){"use strict";
var i=n(16),a=n(57),r=n(18),s=r.a.extend({name:"AgentAttributionModel",context:["server"],responseType:a.a.text,syncedAttrs:{content:i.a.string},url:function(){return"/system/agents/attribution?identifier="+this.parent.id},augmentResponse:function(e){return{content:e}}});t.a=s},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(1478),s=n(1482),o=a.a.extend({name:"AgentModel",context:["server"],idAttribute:"identifier",rootPropertyName:"Agent",sessionAttrs:{isPrimary:i.a.boolean,selected:i.a.boolean
},sessionRelations:{attribution:{relationClass:r.a}},syncedAttrs:{identifier:i.a.string,name:i.a.string,enabled:i.a.boolean,hasPrefs:i.a.boolean,order:i.a.string},syncedRelations:{languages:{relationClass:s.a,rootPropertyName:"Language"}}});t.a=o},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(1484),s=n(1487),o=a.a.extend({name:"CloudServerFlexModel",context:["server"],sessionAttrs:{isPersonalCloudServerRestarting:i.a.boolean,personalCloudServerRestartError:i.a.object,isPersonalCloudServerProvidersPending:i.a.boolean,
isPersonalCloudServerProvidersPopulated:i.a.boolean,personalCloudServerProvidersError:i.a.object,isPersonalCloudServerStatusPending:i.a.boolean,isPersonalCloudServerStatusPopulated:i.a.boolean,personalCloudServerStatusError:i.a.object},sessionRelations:{personalCloudServerProviders:{relationClass:r.a},personalCloudServerStatus:{relationClass:s.a}},defaults:{isPersonalCloudServerRestarting:!1,personalCloudServerRestartError:null,isPersonalCloudServerProvidersPending:!1,isPersonalCloudServerProvidersPopulated:!1,
personalCloudServerProvidersError:null,isPersonalCloudServerStatusPending:!1,isPersonalCloudServerStatusPopulated:!1,personalCloudServerStatusError:null}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(312),s=n.n(r),o=s.a.extend({constructor:function(e,t,n,i){this.exclusiveScanners=t,this.scannerName=n,s.a.call(this,e,i),this.filterBy(a.a.bind(this.filterExclusiveScanner,this))},filterExclusiveScanner:function(e){var t=e.get("name"),n=this.exclusiveScanners;if(!n)return!0;var i=this.scannerName,a=n.indexOf(i)!==-1,r=n.indexOf(t)!==-1,s=a?t===i:!r;
return s}});t.a=o},function(e,t,n){"use strict";var i=n(22),a=n(1483),r=i.a.extend({name:"LanguageCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(706),a=n(16),r=n(18),s=r.a.extend({name:"LanguageModel",context:["server"],idAttribute:"code",rootPropertyName:"Language",syncedAttrs:{code:a.a.string},derivedAttrs:{name:function(){return n.i(i.a)(this.get("code"))}}});t.a=s},function(e,t,n){"use strict";var i=n(22),a=n(1485),r=i.a.extend({name:"PersonalCloudServerProviderCollection",
model:a.a,context:["server"],url:"/api/v2/authentications/providers"});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(1486),s=a.a.extend({name:"PersonalCloudServerProviderModel",rootPropertyName:"provider",sessionAttrs:{isUnlinking:i.a.boolean.isRequired,unlinkError:i.a.object},syncedAttrs:{image:i.a.string.isRequired,label:i.a.string.isRequired,linked:i.a.boolean.isRequired,nickname:i.a.string.isRequired,url:i.a.string.isRequired},syncedRelations:{usage:{relationClass:r.a}},defaults:{
isUnlinking:!1}});t.a=s},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"PersonalCloudServerProviderUsageModel",syncedAttrs:{plexCloud:i.a.boolean,cloudSync:i.a.boolean,other:i.a.boolean}});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"PersonalCloudServerStatusModel",context:["server"],url:"/api/v2/cloud_server",syncedAttrs:{running:i.a.boolean,startedAt:i.a.integer,finishedAt:i.a.integer,exitCode:i.a.integer,error:i.a.string},defaults:{running:!1
}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(22),s=n(1489),o=r.a.extend({name:"ScannerCollection",context:["server","sectionTypeID"],model:s.a,url:function(){return"/system/scanners/"+this.sectionTypeID},hasExclusiveScanner:function(e){return!!a.a.intersection(this.pluck("name"),e).length}});t.a=o},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"ScannerModel",context:["server"],rootPropertyName:"Scanner",syncedAttrs:{name:i.a.string}});t.a=r},function(e,t,n){
"use strict";var i=n(22),a=n(1491),r=i.a.extend({name:"SectionOverviewCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"SectionOverviewModel",context:["server"],rootPropertyName:"Section",syncedAttrs:{id:i.a.integer,key:i.a.string,type:i.a.string,title:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(59),r=n(18),s=n(1146),o=n(423),l=n(1157),c=n(1160),u=n(148),d=n(1155),h=n(1163),p=n(1161),f=n(1477),g=r.a.extend({
name:"ServerFlexModel",context:["server"],sessionAttrs:{cloudAccount:i.a.instanceOf(l.a).isRequired,update:i.a.instanceOf(c.a),settings:i.a.instanceOf(u.a).isRequired,alerts:i.a.instanceOf(d.a).isRequired,transcodeJobs:i.a.instanceOf(h.a).isRequired,isProvidersPending:i.a.boolean.isRequired,isProvidersPopulated:i.a.boolean.isRequired,providersError:i.a.object,isLibrariesPending:i.a.boolean.isRequired,isLibrariesPopulated:i.a.boolean.isRequired,librariesError:i.a.object},sessionRelations:{providers:{
relationClass:s.a},libraries:{relationClass:o.a},sessions:{relationClass:p.a},activities:{relationClass:f.a}},defaults:function(){return{cloudAccount:new l.a({},{server:this.server}),update:a.a.get("allowServerUpdates")?new c.a({},{server:this.server}):null,settings:new u.a([],{server:this.server}),alerts:new d.a([],{server:this.server}),transcodeJobs:new h.a([],{server:this.server}),sessions:new p.a([],{server:this.server}),isProvidersPending:!0,isProvidersPopulated:!1,providersError:null,isLibrariesPending:!0,
isLibrariesPopulated:!1,librariesError:null}}});t.a=g},function(e,t,n){"use strict";var i=n(22),a=n(1494),r=i.a.extend({name:"ServerOverviewCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(1490),s=a.a.extend({name:"ServerOverviewModel",context:["server"],idAttribute:"machineIdentifier",rootPropertyName:"Server",urlRoot:"/api/servers",syncedAttrs:{machineIdentifier:i.a.string,name:i.a.string,address:i.a.string,port:i.a.string,version:i.a.string,
createdAt:i.a.integer,updatedAt:i.a.integer},syncedRelations:{sections:{relationClass:r.a,rootPropertyName:"Section"}}});t.a=s},function(e,t,n){"use strict";var i=n(16),a=n(420),r=n(23),s=n(48),o=n(203),l=a.a.extend({name:"ExperienceSettingsModel",storageKey:"experience",syncedAttrs:{columnAdjustment:i.a.integer,searchAllServers:i.a.boolean,relayReminders:i.a.object,calendarViewType:i.a.string,timeFormat:i.a.string,libraryTableColumns:i.a.object,listStyles:i.a.object},defaults:function(){var e;return{
columnAdjustment:0,searchAllServers:!1,relayReminders:{},calendarViewType:r.b.CALENDAR,timeFormat:"h:mma",libraryTableColumns:{},listStyles:(e={},e[s.c]={episode:o.a,track:o.a},e[s.a]={track:o.a},e)}}});t.a=l},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(146),s=a.a.extend({name:"DashboardPageModel",sessionAttrs:{isPagePopulated:i.a.boolean.isRequired,isHubsPending:i.a.boolean.isRequired,isHubsPopulated:i.a.boolean.isRequired,hubsError:i.a.object},sessionRelations:{hubs:{relationClass:r.default,
deferred:!0}},defaults:{isPagePopulated:!1,isHubsPending:!0,isHubsPopulated:!1,hubsError:null}});t.a=s},function(e,t,n){"use strict";var i=n(18),a=n(49),r=n(1496),s=n(1501),o=n(1498),l=n(1503),c=n(1499),u=n(1506),d=n(1500),h=n(1504),p=n(1507),f=n(1505),g=n(1502),m=i.a.extend({name:"DesktopUIModel",sessionRelations:{dashboardPage:{relationClass:r.a},metadataListPage:{relationClass:s.a},libraryPage:{relationClass:o.a},prePlayPage:{relationClass:l.a},metadataItem:{relationClass:a.a,deferred:!0},liveTVSettingsPage:{
relationClass:c.a},recordingSchedulePage:{relationClass:u.a},mediaSubscriptionModal:{relationClass:d.a},provisionPersonalCloudServerPage:{relationClass:h.a},searchPage:{relationClass:p.a},quickSearch:{relationClass:f.a},photoPlayer:{relationClass:g.a}}});t.a=m},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(82),s=n(635),o=n(422),l=n(319),c=a.a.extend({name:"LibraryPageModel",sessionAttrs:{isPagePopulated:i.a.boolean.isRequired,isMetadataTypesPending:i.a.boolean.isRequired,isMetadataTypesPopulated:i.a.boolean.isRequired,
metadataTypesError:i.a.object,isFirstCharactersPending:i.a.boolean.isRequired,isFirstCharactersPopulated:i.a.boolean.isRequired,firstCharactersError:i.a.object,selectedFilterKey:i.a.string,filterOptionQuery:i.a.string,isSelectedFilterOptionsPending:i.a.boolean.isRequired,isSelectedFilterOptionsPopulated:i.a.boolean.isRequired,selectedFilterOptionsError:i.a.object},sessionRelations:{metadataList:{relationClass:r.default,deferred:!0},metadataTypes:{relationClass:s.a,deferred:!0},firstCharacters:{relationClass:o.a,
deferred:!0},selectedFilterOptions:{relationClass:l.a,deferred:!0}},defaults:{isPagePopulated:!1,isMetadataTypesPending:!0,isMetadataTypesPopulated:!1,metadataTypesError:null,isFirstCharactersPending:!0,isFirstCharactersPopulated:!1,firstCharactersError:null,selectedFilterKey:null,filterOptionQuery:"",isSelectedFilterOptionsPending:!0,isSelectedFilterOptionsPopulated:!1,selectedFilterOptionsError:null}});t.a=c},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(762),s=n(344),o=a.a.extend({name:"LiveTVSettingsPageModel",
sessionAttrs:{isDvrsPending:i.a.boolean,isDvrsPopulated:i.a.boolean,dvrsError:i.a.object,isPagePopulated:i.a.boolean},sessionRelations:{dvrs:{relationClass:r.a,deferred:!0},dvrSetup:{relationClass:s.b,deferred:!0}},defaults:{isDvrsPending:!1,isDvrsPopulated:!1,dvrsError:null,isPagePopulated:!1}});t.a=o},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(651),s=n(320),o=a.a.extend({name:"MediaSubscriptionModalModel",sessionAttrs:{isMediaSubscriptionPending:i.a.boolean,isMediaSubscriptionPopulated:i.a.boolean,
mediaSubscriptionError:i.a.object,isMediaSubscriptionSaving:i.a.boolean,mediaSubscriptionSaveError:i.a.object,isMediaSubscriptionMoving:i.a.boolean,mediaSubscriptionMoveError:i.a.object,isMediaSubscriptionDeleting:i.a.boolean,mediaSubscriptionDeleteError:i.a.object},sessionRelations:{templates:{relationClass:r.a,deferred:!0},mediaSubscription:{relationClass:s.a,deferred:!0}},defaults:{isMediaSubscriptionPending:!0,isMediaSubscriptionPopulated:!1,mediaSubscriptionError:null,isMediaSubscriptionSaving:!1,
mediaSubscriptionSaveError:null,isMediaSubscriptionMoving:!1,mediaSubscriptionMoveError:null,isMediaSubscriptionDeleting:!1,mediaSubscriptionDeleteError:null}});t.a=o},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(82),s=a.a.extend({name:"MetadataListPageModel",sessionAttrs:{isPagePopulated:i.a.boolean.isRequired},sessionRelations:{metadataList:{relationClass:r.default,deferred:!0}},defaults:{isPagePopulated:!1}});t.a=s},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(251),s=n(83),o=n(146),l=a.a.extend({
name:"PhotoPlayerModel",sessionAttrs:{currentPlayer:i.a.string,decisions:i.a.object,currentIndex:i.a.integer,currentDecision:i.a.object,slideshowPaused:i.a.boolean,relatedVisible:i.a.boolean,videoPaused:i.a.boolean,videoPosition:i.a.float,videoQualityIndex:i.a.integer,playbackDuration:i.a.float,errorMessage:i.a.string},sessionRelations:{playQueue:{relationClass:a.a,deferred:!0},playQueueItem:{relationClass:r.a,deferred:!0},transcodeServer:{relationClass:s.a,deferred:!0},relatedHubs:{relationClass:o.default,
deferred:!0}},defaults:function(){return{decisions:{},slideshowPaused:!0,videoPaused:!1,relatedVisible:!1,playbackDuration:0}}});t.a=l},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(49),s=n(82),o=n(146),l=a.a.extend({name:"PrePlayPageModel",sessionAttrs:{isPagePopulated:i.a.boolean.isRequired,isMetadataItemPending:i.a.boolean.isRequired,isMetadataItemPopulated:i.a.boolean.isRequired,metadataItemError:i.a.object,isRelatedHubsPending:i.a.boolean.isRequired,isRelatedHubsPopulated:i.a.boolean.isRequired,
relatedHubsError:i.a.object},sessionRelations:{metadataItem:{relationClass:r.a,deferred:!0},descendantList:{relationClass:s.default,deferred:!0},relatedHubs:{relationClass:o.default,deferred:!0}},defaults:{isPagePopulated:!1,isMetadataItemPending:!0,isMetadataItemPopulated:!1,metadataItemError:null,isRelatedHubsPending:!0,isRelatedHubsPopulated:!1,relatedHubsError:null}});t.a=l},function(e,t,n){"use strict";var i=n(18),a=n(16),r=i.a.extend({name:"ProvisionPersonalCloudServerModel",sessionAttrs:{isPersonalCloudServerModalOpen:a.a.boolean,
isProvisionPersonalCloudServerPending:a.a.boolean,isProvisionPersonalCloudServerPopulated:a.a.boolean,provisionPersonalCloudServerError:a.a.object,isConnectToPersonalCloudServerPending:a.a.boolean,isConnectToPersonalCloudServerPopulated:a.a.boolean,connectToPersonalCloudServerError:a.a.object,isPersonalCloudServerDriveCachePending:a.a.boolean,isPersonalCloudServerDriveCachePopulated:a.a.boolean,personalCloudServerDriveCacheError:a.a.object},defaults:{isPersonalCloudServerModalOpen:!1,isProvisionPersonalCloudServerPending:!1,
isProvisionPersonalCloudServerPopulated:!1,provisionPersonalCloudServerError:null,isConnectToPersonalCloudServerPending:!1,isConnectToPersonalCloudServerPopulated:!1,connectToPersonalCloudServerError:null,isPersonalCloudServerDriveCachePending:!1,isPersonalCloudServerDriveCachePopulated:!1,personalCloudServerDriveCacheError:null}});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(767),s=a.a.extend({name:"QuickSearchModel",sessionAttrs:{query:i.a.string,providerIdentifier:i.a.string,sectionID:i.a.string,
selectedResultEntityID:i.a.string,channelPlaceholder:i.a.string,channelID:i.a.string,channelSearchKey:i.a.string},sessionRelations:{searches:{relationClass:r.a}},defaults:{query:"",selectedResultEntityID:null}});t.a=s},function(e,t,n){"use strict";var i=n(16),a=n(18),r=n(650),s=n(769),o=a.a.extend({name:"RecordingSchedulePageModel",sessionAttrs:{isPagePopulated:i.a.boolean,isMediaSubscriptionsPending:i.a.boolean,isMediaSubscriptionsPopulated:i.a.boolean,mediaSubscriptionsError:i.a.object,isCalendarPending:i.a.boolean,
isCalendarPopulated:i.a.boolean,calendarError:i.a.object},sessionRelations:{mediaSubscriptions:{relationClass:r.a,deferred:!0},calendar:{relationClass:s.a,deferred:!0}},defaults:{isPagePopulated:!1,isMediaSubscriptionsPending:!1,isMediaSubscriptionsPopulated:!1,mediaSubscriptionsError:null,isCalendarPending:!1,isCalendarPopulated:!1,calendarError:null}});t.a=o},function(e,t,n){"use strict";var i=n(18),a=n(767),r=i.a.extend({name:"SearchPageModel",sessionRelations:{searches:{relationClass:a.a}}});t.a=r;
},function(e,t,n){"use strict";var i=n(22),a=n(1509),r=i.a.extend({name:"SubscriptionPlanCollection",context:["server"],model:a.a,url:"/api/subscriptions/plans"});t.a=r},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"SubscriptionPlanModel",context:["server"],rootPropertyName:"plan",syncedAttrs:{id:i.a.string,name:i.a.string,price:i.a.float,formattedPrice:i.a.string,currency:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(16),s=n(18),o=n(656),l=n(1178),c=n(1180),u=n(1182),d=n(1186),h=n(1176),p=n(1508),f=n(1511),g=s.a.extend({
name:"UserFlexModel",context:["server"],sessionAttrs:{friends:r.a.instanceOf(c.a).isRequired,invites:r.a.instanceOf(u.a).isRequired,sentInvites:r.a.instanceOf(u.a).isRequired,socialNetworks:r.a.instanceOf(d.a).isRequired,isPlansPending:r.a.boolean.isRequired,isPlansPopulated:r.a.boolean.isRequired,plansError:r.a.object,isDeletingAvatar:r.a.boolean.isRequired,isUpdatingUser:r.a.boolean.isRequired,updateUserError:r.a.object,isUnwatchedWatchLaterListPending:r.a.boolean.isRequired,isUnwatchedWatchLaterListPopulated:r.a.boolean.isRequired,
unwatchedWatchLaterListError:r.a.object,isUnwatchedRecommendedListPending:r.a.boolean.isRequired,isUnwatchedRecommendedListPopulated:r.a.boolean.isRequired,unwatchedRecommendedListError:r.a.object,isWebhooksPending:r.a.boolean,isWebhooksPopulated:r.a.boolean,webhooksError:r.a.object,isUpdatingWebhooks:r.a.boolean,isRemovingWebhooks:r.a.boolean,updateWebhooksError:r.a.object},sessionRelations:{devices:{relationClass:l.a},announcements:{relationClass:h.a},plans:{relationClass:p.a},unwatchedWatchLaterList:{
relationClass:o.a,attrs:{key:o.a.keys.WATCH_LATER,subset:o.a.subsets.UNWATCHED}},unwatchedRecommendedList:{relationClass:o.a,attrs:{key:o.a.keys.RECOMMENDED,subset:o.a.subsets.UNWATCHED}},webhooks:{relationClass:f.a}},defaults:function(){var e={server:this.server,parent:this};return{devices:new l.a([],e),friends:new c.a([],e),invites:new u.a([],e),sentInvites:new u.a([],a.a.extend({subset:"requested"},e)),socialNetworks:new d.a([],e),isPlansPending:!0,isPlansPopulated:!1,plansError:null,isDeletingAvatar:!1,
isUpdatingUser:!1,updateUserError:null,isUnwatchedWatchLaterListPending:!0,isUnwatchedWatchLaterListPopulated:!1,unwatchedWatchLaterListError:null,isUnwatchedRecommendedListPending:!0,isUnwatchedRecommendedListPopulated:!1,unwatchedRecommendedListError:null,isWebhooksPending:!1,isWebhooksPopulated:!1,webhooksError:null,isUpdatingWebhooks:!1,isRemovingWebhooks:!1,updateWebhooksError:null}}});t.a=g},function(e,t,n){"use strict";var i=n(22),a=n(57),r=n(1512),s=i.a.extend({name:"WebhookCollection",context:["server"],
model:r.a,url:"/api/v2/user/webhooks",responseType:a.a.json});t.a=s},function(e,t,n){"use strict";var i=n(16),a=n(18),r=a.a.extend({name:"WebhookModel",syncedAttrs:{url:i.a.string},defaults:{url:""}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(8),c=o.a.Region.extend({resizeSubscribersCallbacks:[],scrollSubscribersCallbacks:[],sidebarDelay:200,scrollDelay:100,initialize:function(e){a.a.bindAll(this,"onResize","onScroll","onScrollEvent","onSidebarChange"),this.$el=s()(this.el),
this.channelName=e.channelName;var t={};t[this.channelName+".subscribe:resize"]=this.onResizeSubscribe,t[this.channelName+".unsubscribe:resize"]=this.onResizeUnsubscribe,t[this.channelName+".subscribe:scroll"]=this.onScrollSubscribe,t[this.channelName+".unsubscribe:scroll"]=this.onScrollUnsubscribe,this.listenTo(l.a,t)},updateSize:function(){this.size={width:this.$el.width(),height:this.$el.height(),innerWidth:this.$el.innerWidth(),innerHeight:this.$el.innerHeight(),outerWidth:this.$el.outerWidth(),
outerHeight:this.$el.outerHeight(),offset:this.$el.offset()}},updateScrollPosition:function(){this.scrollPosition={scrollHeight:this.$el[0].scrollHeight,scrollTop:this.$el[0].scrollTop}},onShow:function(){this.updateSize(),this.updateScrollPosition()},onResizeSubscribe:function(e){this.resizeSubscribersCallbacks.push(e),1===this.resizeSubscribersCallbacks.length&&(this.updateSize(),this.listenTo(l.a,{resize:this.onResize,"show:bar hide:bar":this.onSidebarChange})),e(this.size)},onResizeUnsubscribe:function(e){
this.resizeSubscribersCallbacks.splice(a.a.indexOf(this.resizeSubscribersCallbacks,e),1),0===this.resizeSubscribersCallbacks.length&&this.stopListening(l.a,"resize show:bar hide:bar")},onScrollSubscribe:function(e){this.scrollSubscribersCallbacks.push(e),1===this.scrollSubscribersCallbacks.length&&(this.updateScrollPosition(),this.$el.on("scroll",this.onScroll)),e(this.scrollPosition)},onScrollUnsubscribe:function(e){this.scrollSubscribersCallbacks.splice(a.a.indexOf(this.scrollSubscribersCallbacks,e),1),
0===this.scrollSubscribersCallbacks.length&&this.$el.off("scroll",this.onScroll)},onResize:function(){this.updateSize(),a.a.each(this.resizeSubscribersCallbacks,function(e){e(this.size)},this)},onScroll:function(){this.scrollTimeout=clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(this.onScrollEvent,this.scrollDelay)},onScrollEvent:function(){this.updateScrollPosition(),a.a.each(this.scrollSubscribersCallbacks,function(e){e(this.scrollPosition)},this)},onSidebarChange:function(e){"sidebar"===e&&a.a.delay(this.onResize,this.sidebarDelay);
}});t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(14),l=n(4),c=n(8),u=n(123),d=n(758),h=n(276),p=n(474),f=n(1590),g=n(187),m=u.a.extend({activity:function(){var e=this.populateView({primaryServer:!0});e.done(a.a.bind(function(e){var t=e.server;t.get("shared")?this.sync(t.id):c.a.trigger("show:view",new f.a({model:t,collection:t.get("desktop").get("alerts"),subset:"alerts"}))},this))},alerts:function(e){var t;t=e?{serverID:e}:{primaryServer:!0};var n=this.populateView(t);
n.done(function(e){var t=e.server;c.a.trigger("show:view",new f.a({model:t,collection:t.get("desktop").get("alerts"),subset:"alerts"}))})},sync:function(e,t){var i=this.populateView({serverID:"myPlex"});i=i.then(a.a.bind(function(t){var n;return n=e?{serverID:e}:{primaryServer:!0},this.populateView(n)},this)),i.done(function(e){var i=o.a("appModel"),a=i.get("user"),r=a.get("desktop").get("devices"),s=r.populate();s.done(function(){var n=r.filterSyncDevices(),i=t?n.get(t):null;c.a.trigger("show:view",new f.a({
model:e.server,collection:n,selectedDevice:i,subset:"sync"}))}),s.fail(function(){c.a.trigger("show:view",new g.a({title:n.i(l.default)("Sync status is unavailable.")}))})})},conversion:function(e){var t;t=e?{serverID:e}:{primaryServer:!0};var i=this.populateView(t);i.done(function(e){var t,i,a=e.server,r=new d.a([],{server:a,allowInCache:!0}),o=new h.a([],{server:a,allowInCache:!0}),u=new p.a([],{server:a,allowInCache:!0}),m=s.a.when(r.populate(),o.fetch(),a.get("desktop").get("settings").fetch(),u.populate()).then(function(){
t=r.first();var e=u.first();return t&&e?(i=e.get("children"),s.a.when(t.fetch(),i.fetch())):s.a.Deferred().reject().promise()});m.done(function(){c.a.trigger("show:view",new f.a({model:a,playQueue:t,transcodeJobs:o,generators:i,subset:"conversion"}))}),m.fail(function(){c.a.trigger("show:view",new g.a({title:n.i(l.default)("The conversion queue is unavailable.")}))})})},nowPlaying:function(e){var t;t=e?{serverID:e}:{primaryServer:!0};var n=this.populateView(t);n.done(function(e){var t=e.server;c.a.trigger("show:view",new f.a({
model:t,collection:t.get("desktop").get("sessions"),subset:"nowPlaying"}))})}});t.a=m},function(e,t,n){"use strict";var i=n(124),a=n(1514),r=i.a.extend({controller:new a.a,appRoutes:{"!/activity":"activity","!/activity/alerts(/:serverID)":"alerts","!/activity/sync(/:serverID)(/:deviceID)":"sync","!/activity/conversion(/:serverID)":"conversion","!/activity/playing(/:serverID)":"nowPlaying","!/status":"activity","!/status/alerts(/:serverID)":"alerts","!/status/sync(/:serverID)(/:deviceID)":"sync","!/status/conversion(/:serverID)":"conversion",
"!/status/playing(/:serverID)":"nowPlaying"}});t.a=r},function(e,t,n){"use strict";var i=n(4),a=n(8),r=n(123),s=n(627),o=n(1606),l=n(1607),c=n(1605),u=n(352),d=n(187),h=r.a.extend({channel:function(e,t,n){var i=this.populateView({serverID:e,channelID:t,channelKey:n});i.done(function(e){var t=e.channelItem?e.channelItem:e.channel;a.a.trigger("show:view",new o.a({model:t,listModel:t.get("metadataList")}))})},channelDetails:function(e,t,n){var i=this.populateView({serverID:e,channelID:t,channelKey:n
});i.done(function(e){var t=e.channelItem.get("metadataList").getCollection(),n=t.first();a.a.trigger("show:view",new u.a({model:n}))})},channels:function(e){var t=this.populateView({serverID:e});t.done(function(e){var t=new s.a({subset:"all"},{server:e.server}),r=t.get("channels");r.comparator=r.sortByTitle;var o=t.fetch({scope:"page"});o.done(function(){a.a.trigger("show:view",new l.a({collection:r}))}),o.fail(function(){a.a.trigger("show:view",new d.a({title:n.i(i.default)("Your channels are unavailable.")
}))})})},directory:function(e,t,r){var o=this.populateView({serverID:e});o.done(function(e){if(e.server.get("shared"))return void a.a.trigger("show:view",new d.a({title:n.i(i.default)("The channel directory is restricted from shared users.")}));var o=new s.a({key:"/system/appstore"},{server:e.server}),l=o.fetch({scope:"page"});l.done(function(){a.a.trigger("show:view",new c.a({collection:o.get("channels"),currentKey:t,currentPath:r}))}),l.fail(function(){a.a.trigger("show:view",new d.a({title:n.i(i.default)("The channel directory is unavailable.")
}))})})}});t.a=h},function(e,t,n){"use strict";var i=n(124),a=n(1516),r=i.a.extend({controller:new a.a,appRoutes:{"!/server/:serverID/channel/:channelID(/:key)":"channel","!/server/:serverID/channel/:channelID/details/:key":"channelDetails","!/server/:serverID/channels":"channels","!/server/:serverID/directory(/:key)(/:path)":"directory"}});t.a=r},function(e,t,n){"use strict";var i=n(8),a=n(20),r=n(14),s=n(21),o=n(1196),l=n(1577),c=n(1611),u=n(1610),d=n(1609),h=n(789),p=n(1581),f=n(1580),g=n(1651),m=n(187),v=n(1652),y=n(1653),b=n(1654),S=n(1655),w=o.a.extend({
viewsByType:{signIn:h.a,error:m.a,channelError:g.a,notFound:v.a,serverRequired:y.a,unauthorized:b.a,unavailable:S.a},initialize:function(){o.a.prototype.initialize.apply(this,arguments),this.listenTo(i.a,"initialize:app",this.onAppInitialize)},dashboard:function(e,t){this.populateView().done(function(){i.a.trigger("show:view",new c.a({selectedServerID:e,params:a.parseParams(t)}))})},list:function(e,t,n){var r=a.parseParams(n);this.populateView().done(function(){i.a.trigger("show:view",new u.a({selectedServerID:e,
selectedProviderID:t,params:r}))})},needsUpdate:function(e){this.populateView().done(function(){var e=r.a("appModel");e.get("servers").findWhere({isOutOfDate:!0})?i.a.trigger("show:view",new d.a):i.a.trigger("navigate","dashboard",{replace:!0})})},logout:function(){var e=this.viewFor;s.a.execute("signOut").done(function(){i.a.trigger("navigate","login",{silent:!0})}).fail(function(){i.a.trigger("show:view",e("logoutError"))})},logs:function(){i.a.trigger("show:view",new p.a({collection:r.a("logs")
}))},info:function(){i.a.trigger("show:view",new f.a)},onAppInitialize:function(){this.appView=new l.a,this.appView.render()}});t.a=w},function(e,t,n){"use strict";var i=n(47),a=n(8),r=n(1197),s=n(1518),o=r.a.extend({controller:new s.a,appRoutes:{"!/dashboard":"dashboard","!(/server/:serverID)/dashboard":"dashboard","!(/server/:serverID)(/provider/:providerID)/list":"list","!/needsUpdate":"needsUpdate","":"dashboard","!/login":"login","!/unauthorized":"unauthorized","!/logs":"logs","!/info":"info",
"*404":"error"},onNavigateRefreshDashboard:function(){var e=i.a.history.getFragment();""===e||"!/dashboard"===e?i.a.history.loadUrl(""):a.a.trigger("navigate","dashboard")}});t.a=o},function(e,t,n){"use strict";var i=n(8),a=n(20),r=n(123),s=n(1582),o=n(1809),l=n(352),c=n(1806),u=n(1805),d=r.a.extend({search:function(e,t){var n=this.populateView();n.done(function(){i.a.trigger("show:view",new s.a({selectedServerID:e,query:t}))})},section:function(e,t,n){var a=this.populateView({serverID:e,sectionID:t
});a.done(function(e){i.a.trigger("show:view",new o.a({model:e.section,subset:n}))})},sectionFolder:function(e,t,n){var a=this.populateView({serverID:e,sectionID:t});a.done(function(e){var t=e.section.get("items");t.scrollPosition=0,i.a.trigger("show:view",new o.a({model:e.section,subset:"folder",folderKey:n}))})},sectionFilter:function(e,t,n,a,r,s){var l=this.populateView({serverID:e,sectionID:t});l.done(function(e){var t=e.section.get("currentFilters");t.length=0,s||(s=r),t.push({key:a,values:r.split(","),
titles:s.split(",")}),i.a.trigger("show:view",new o.a({model:e.section,type:parseInt(n,10)}))})},sectionType:function(e,t,n,a,r){var s=this.populateView({serverID:e,sectionID:t});s.done(function(e){i.a.trigger("show:view",new o.a({model:e.section,type:n,sortKey:a,sortDirection:r}))})},details:function(e,t){var n=this.populateView({serverID:e,key:t,populateData:{includeRelatedCount:"5",includePopularLeaves:"1",includeConcerts:"1",includePreferences:"1"}});n.done(function(e){i.a.trigger("show:view",new l.a({
model:e.item}))})},provider:function(e,t,n){this.populateView().done(function(){i.a.trigger("show:view",new c.a({selectedServerID:e,selectedProviderID:t,params:a.parseParams(n)}))})},prePlay:function(e,t,n){this.populateView().done(function(){i.a.trigger("show:view",new u.a({selectedServerID:e,selectedProviderID:t,params:a.parseParams(n)}))})}});t.a=d},function(e,t,n){"use strict";var i=n(124),a=n(1520),r=i.a.extend({controller:new a.a,appRoutes:{"!/server/:serverID/search/:query":"search","!/server/:serverID/section/:sectionID(/:subset)":"section",
"!/server/:serverID/section/:sectionID/folder/:key":"sectionFolder","!/server/:serverID/section/:sectionID/filter/:type/:key/:value(/:title)":"sectionFilter","!/server/:serverID/section/:sectionID/type/:type/:sortKey/:sortDirection":"sectionType","!/server/:serverID/details/:key":"details","!/server/:serverID/provider/:providerID":"provider","!/server/:serverID/provider/:providerID/details":"prePlay"}});t.a=r},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(4),s=n(8),o=n(123),l=n(427),c=n(187),u=n(1804),d=n(352),h=o.a.extend({
playlists:function(e){var t=this.populateView({serverID:e});t.done(function(e){var t=e.server.get("playlists"),i=e.server.get("sections").populate({scope:"page"}),o=t.get("items").fetch({scope:"page"}),l=t.get("sorts").populate().then(function(e){var n=e.get("titleSort");n&&(t.set("currentSort",n),n.set("selected",!0))}),d=a.a.when(i,o,l);d.done(function(){s.a.trigger("show:view",new u.a({model:t}))}),d.fail(function(){s.a.trigger("show:view",new c.a({title:n.i(r.default)("Playlists are unavailable for this server.")
}))})})},playlist:function(e,t){var i=this.populateView({serverID:e});i.done(function(e){var i=e.server.get("sections").populate({scope:"page"}),o=new l.a({ratingKey:t},{server:e.server}),u=o.fetch({scope:"page"});u.fail(function(){s.a.trigger("show:view",new c.a({title:n.i(r.default)("Playlist not found.")}))}),a.a.when(i,u).done(function(){s.a.trigger("show:view",new d.a({model:o}))})})}});t.a=h},function(e,t,n){"use strict";var i=n(124),a=n(1522),r=i.a.extend({controller:new a.a,appRoutes:{"!/server/:serverID/playlists":"playlists",
"!/server/:serverID/playlist/:key":"playlist"}});t.a=r},function(e,t,n){"use strict";var i=n(8),a=n(20),r=n(123),s=n(1807),o=r.a.extend({schedule:function(e,t){this.populateView().done(function(){i.a.trigger("show:view",new s.a({selectedServerID:e,params:a.parseParams(t)}))})}});t.a=o},function(e,t,n){"use strict";var i=n(124),a=n(1524),r=i.a.extend({controller:new a.a,appRoutes:{"!(/server/:serverID)/schedule":"schedule"}});t.a=r},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(14),s=n(4),o=n(8),l=n(123),c=n(1154),u=n(148),d=n(1814),h=n(187),p=l.a.extend({
settings:function(){return this.webSettings()},webSettings:function(){var e=this.populateView();e.done(function(){function e(){o.a.trigger("show:view",new d.a({model:i,subset:"web"}))}var t=n.i(r.a)("appModel"),i=t.get("settings"),a=t.get("user"),s=a.get("homeUsers"),l=a.server.populate();l.done(function(){a.get("signedIn")?s.populate().always(e):e()}),l.fail(e)})},serverSettings:function(e,t){var i;i=e?{serverID:e}:{primaryServer:!0};var r=this.populateView(i);r.done(function(e){var i=e.server;if(i.get("shared"))return void o.a.trigger("show:view",new h.a({
title:n.i(s.default)("Server settings are restricted from shared users.")}));var r=i.get("desktop").get("settings"),l=new c.a({key:"/accounts/1"},{server:i}),p=i.get("desktop").get("cloudAccount"),f=new u.a([],{server:i,url:"/system/:/prefs"}),g=a.a.when(r.fetch(),l.fetch({scope:"page"}),p.fetch({scope:"page"}),f.fetch({scope:"page"}));g.done(function(){o.a.trigger("show:view",new d.a({model:i,collection:i.get("desktop").get("settings"),account:l,cloudAccount:p,channelSettings:f,subset:"server",group:t
}))}),g.fail(function(){o.a.trigger("show:view",new h.a({title:n.i(s.default)("Server settings are unavailable.")}))})})},users:function(e){var t=this.populateView({serverID:"myPlex"});t.done(function(t){var i=n.i(r.a)("appModel"),l=i.get("user"),c=l.get("homeUsers"),u=l.get("homeDetails"),p=l.get("desktop").get("friends"),f=l.get("desktop").get("invites"),g=l.get("desktop").get("sentInvites"),m=a.a.Deferred(),v=u.fetch();v.done(function(){m.resolve()}),v.fail(function(e,t){404===t.status?m.resolve():m.reject();
});var y=a.a.when(l.fetch({scope:"page"}),c.fetch({scope:"page"}),p.fetch({scope:"page"}),f.fetch({scope:"page"}),g.fetch({scope:"page"}),m.promise());y.done(function(){var t=!1;"pin"===e?(e="home",t=!0):e||(e=f.length&&!f.findWhere({home:!0})?"friends":"home"),o.a.trigger("show:view",new d.a({model:i.get("user"),subset:"users",usersSubset:e,promptPIN:t}))}),y.fail(function(){var t;t="friends"===e?n.i(s.default)("Your friends are unavailable."):n.i(s.default)("Your home is unavailable."),o.a.trigger("show:view",new h.a({
title:t}))})})},devices:function(){var e=this.populateView({serverID:"myPlex"});e.done(function(e){var t=n.i(r.a)("appModel"),i=t.get("user"),a=i.get("desktop").get("devices"),l=a.fetch({scope:"page"});l.done(function(){o.a.trigger("show:view",new d.a({model:i,collection:a,subset:"devices"}))}),l.fail(function(){o.a.trigger("show:view",new h.a({title:n.i(s.default)("Your devices are unavailable.")}))})})}});t.a=p},function(e,t,n){"use strict";var i=n(124),a=n(1526),r=i.a.extend({controller:new a.a,
appRoutes:{"!/settings":"settings","!/settings/web":"webSettings","!/settings/server(/:serverID)(/:group)":"serverSettings","!/settings/users":"users","!/settings/users(/:subset)":"users","!/settings/devices":"devices"}});t.a=r},function(e,t,n){"use strict";var i=n(8),a=n(123),r=n(1837),s=a.a.extend({setupBasic:function(e){var t;t=e?{serverID:e}:{primaryServer:!0};var n=this.populateView(t);n.done(function(e){i.a.trigger("show:view",new r.a({model:e.server,subset:"setupBasic"}))})},setupLibrary:function(){
var e=this.populateView({primaryServer:!0});e.done(function(e){i.a.trigger("show:view",new r.a({model:e.server,subset:"setupLibrary"}))})},setupChannels:function(){var e=this.populateView({primaryServer:!0});e.done(function(e){i.a.trigger("show:view",new r.a({model:e.server,subset:"setupChannels"}))})},setupComplete:function(){var e=this.populateView({primaryServer:!0});e.done(function(e){i.a.trigger("show:view",new r.a({model:e.server,subset:"setupComplete"}))})}});t.a=s},function(e,t,n){"use strict";
var i=n(124),a=n(1528),r=i.a.extend({controller:new a.a,appRoutes:{"!/setup/library":"setupLibrary","!/setup/channels":"setupChannels","!/setup/complete":"setupComplete","!/setup(/:serverID)":"setupBasic"}});t.a=r},function(e,t,n){"use strict";var i=n(14),a=n(4),r=n(8),s=n(35),o=n(123),l=n(1584),c=n(1585),u=n(1586),d=n(1608),h=n(655),p=n(656),f=n(1842),g=n(1840),m=n(352),v=n(187),y=n(1841),b=o.a.extend({account:function(){var e=this.populateView({serverID:"myPlex"});e.done(function(){n.i(s.a)(),r.a.trigger("show:view",new l.a);
})},personalCloud:function(){var e=i.a("appModel"),t=e.get("user");this.populateView({serverID:"myPlex"}).done(function(){n.i(s.a)(),r.a.trigger("show:view",new c.a({model:t}))})},webhooks:function(){var e=i.a("appModel"),t=e.get("user");this.populateView({serverID:"myPlex"}).done(function(){n.i(s.a)(),r.a.trigger("show:view",new u.a({model:t}))})},cpms:function(){this.populateView({serverID:"myPlex"}).done(function(){r.a.trigger("show:view",new d.a)})},userPlaylist:function(e,t){var s=this.populateView({
serverID:"myPlex"});s.done(function(s){var o=i.a("appModel"),l=o.get("user"),c=new p.a({key:e},{server:l.server,parent:l}),u=c.fetch({scope:"page"});u.done(function(){r.a.trigger("show:view",new f.a({model:o.get("user"),listModel:c,subset:t}))}),u.fail(function(){r.a.trigger("show:view",new v.a({title:n.i(a.default)("This playlist is unavailable.")}))})})},userPlaylistDetails:function(e,t){var s=this.populateView({serverID:"myPlex"});s.done(function(s){var o=i.a("appModel"),l=o.get("user"),c=new h.a({
id:parseInt(t,10)},{server:s.server,parent:l,containerKey:e}),u=c.fetch({scope:"page"});u.done(function(){r.a.trigger("show:view",new m.a({model:c}))}),u.fail(function(){r.a.trigger("show:view",new v.a({title:n.i(a.default)("This playlist item is unavailable.")}))})})},queueHelp:function(){var e=this.populateView({serverID:"myPlex"});e.done(function(){var e=i.a("appModel"),t=e.get("user");r.a.trigger("show:view",new y.a({queueEmail:t.get("queueEmail")}))})},announcements:function(){var e=this.populateView();
e.done(function(){var e=i.a("appModel"),t=e.get("user"),s=t.get("desktop").get("announcements"),o=s.fetch({scope:"page"});o.done(function(){r.a.trigger("show:view",new g.a({collection:s}))}),o.fail(function(){r.a.trigger("show:view",new v.a({title:n.i(a.default)("Announcements are not available.")}))})})}});t.a=b},function(e,t,n){"use strict";var i=n(124),a=n(1530),r=i.a.extend({controller:new a.a,appRoutes:{"!/account":"account","!/account/plex-cloud":"personalCloud","!/account/webhooks":"webhooks",
"!/cpms":"cpms","!/playlist/queue/help":"queueHelp","!/playlist/:key(/:subset)":"userPlaylist","!/playlist/:key/details/:itemID":"userPlaylistDetails","!/announcements":"announcements"}});t.a=r},function(e,t,n){"use strict";var i=n(1533),a=n(1541),r=n(1560),s=n(1545),o=n(1537),l=n(1540),c=n(1539),u=n(1559),d=n(1546),h=n(1552),p=n(1549),f=n(1554),g=n(1555),m=n(1550),v=n(1548),y=n(1534),b=n(1557),S=n(1551),w=n(1556),M=n(1558),I=n(1544),C=n(1542),D=n(1561),T=[i.a,a.a,r.a,s.a,o.a,l.a,c.a,u.a,d.a,h.a,p.a,f.a,g.a,m.a,v.a,y.a,b.a,S.a,w.a,M.a,I.a,C.a,D.a];
t.a=T},function(e,t,n){"use strict";var i,a=n(2),r=n.n(a),s=n(8),o=n(60),l=n(35),c=n(1286),u=n(1753),d=n(31),h=n(76),p=n.i(o.a)((i={},i[d.D]=function(e,t){s.a.trigger("show:alert",t)},i[d.E]=function(e,t){var n=t.name,i=t.settings;e.get(n).save(i)},i[d.F]=function(e,t){var n=new u.a({downloadType:t});s.a.trigger("show:modal",n)},i[d.G]=function(e){s.a.trigger("discover:servers")},i[d._164]=function(e){e.set({primaryServer:null,isWaitingForPrimaryServer:!0})},i[d._165]=function(e,t,i){var a=e.get("servers");
a.findServer(t).done(function(t){t.get("isOutOfDate")?i(n.i(h.h)({route:"needsUpdate",options:{replace:!0}})):t.get("isPrimaryEligible")?e.set({primaryServer:t,isWaitingForPrimaryServer:!1}):i(n.i(h.h)({route:"dashboard"}))}).fail(function(){i(n.i(h.h)({route:"dashboard"}))})},i[d.H]=function(e,t){var n=t.route,i=t.options;r.a.defer(function(){s.a.trigger("navigate",n,i)})},i[d.I]=function(e){var t=window.location.href.replace("https://","http://");window.location=t},i[d.J]=function(e){n.i(l.a)();
var t=n.i(c.a)(e.getState()),i=e.get("entities");r.a.each(t,function(e,t){i.get(t).remove(e)})},i));t.a=p},function(e,t,n){"use strict";function i(e,t){var i=t.serverEntityID;return n.i(p.a)(e,h.f,i)}function a(e){return e.get("ui").get("liveTVSettingsPage").get("dvrSetup")}function r(e,t){var n=a(e,t);return n.get("epgSettings")}function s(e,t,i){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=a(e,t),l=r(e,t),c=l.get(i);return c.abortPendingPopulate(),o.get("setupErrorMessages").remove("programGuideSettings"),
l.set("isFetching",!0),c.fetch(s).done(function(){l.set({isFetching:!1,isPopulated:!0})}).fail(function(){l.set({isFetching:!1,isPopulated:!1}),o.get("setupErrorMessages").add({id:"programGuideSettings",message:n.i(u.default)("Unable to fetch Program Guide settings")})})}var o,l=n(7),c=n.n(l),u=n(4),d=n(20),h=n(67),p=n(335),f=n(60),g=n(477),m=n(31),v=n.i(f.a)((o={},o[m._79]=function(e,t){var n=r(e,t);n.restoreDefaults()},o[m._80]=function(e,t,a){var r=i(e,t);s(e,t,"countries").done(function(){var e=r.get("countryCode");
e&&a(n.i(g.selectEPGCountry)(c()({},t,{countryCode:e})))})},o[m._81]=function(e,t,i){var a=r(e,t);s(e,t,"languages").done(function(){var e=a.get("selectedCountry");e&&i(n.i(g.selectEPGLanguage)(c()({},t,{languageCode:e.get("language")})))})},o[m._82]=function(e,t,i){var a=r(e,t),o=a.get("countries").get(t.countryCode);if(a.set({selectedCountry:o,postalCode:""}),a.get("regions").reset(),a.get("lineupGroup").get("lineups").reset(),o){var l=o.get("flavor"),u=d.join([a.get("baseUrl"),o.get("key")]);i(n.i(g.fetchEPGLanguages)(c()({},t,{
languageCode:o.get("language")}))),0===l?s(e,t,"regions",{url:u}):2===l&&(a.set("postalCode",o.get("example")),i(n.i(g.fetchEPGLineups)(t)))}},o[m._83]=function(e,t,n){var i=r(e,t),a=i.get("languages").get(t.languageCode);i.set("selectedLanguage",a)},o[m._84]=function(e,t,i){var a=r(e,t),s=a.get("regions").get(t.regionKey);a.set("selectedRegion",s),a.get("lineupGroup").get("lineups").reset(),s&&i(n.i(g.fetchEPGLineups)(t))},o[m._85]=function(e,t,n){var i=r(e,t),a=t.postalCode;i.set("postalCode",a),
i.get("lineupGroup").get("lineups").reset()},o[m._86]=function(e,t,n){var i=r(e,t),a=i.get("selectedCountry"),o=[i.get("baseUrl"),a.get("key")],l={};0===a.get("flavor")?o.push(i.get("selectedRegion").get("key")):l.postalCode=i.get("postalCode");var c=d.join(o,l);s(e,t,"lineupGroup",{url:c})},o));t.a=v},function(e,t,n){"use strict";function i(e,t){if(t!==e.get("currentIndex")){var i=n.i(p.a)(e,t);if(i){var a=e.get("decisions")[i.get("playQueueItemID")],r=i.get("metadataItem"),s=r.get("key"),o=n.i(u.join)([s.replace("/library/","/hubs/"),"related"]),l=new h.default([],{
server:r.server,metadataItem:r,hubKey:o,hubCount:8});e.get("playQueueItem")&&n.i(f.a)(e,{state:d.a.states.STOPPED,continuing:!0}),e.set({currentIndex:t,playQueueItem:i,relatedHubs:l,videoPosition:0,videoQualityIndex:a&&a.qualityIndex,currentDecision:a||{}}),r.get("isLibraryItem")&&(r.populate(),l.fetch()),n.i(f.a)(e)}}}function a(e){var t=e.get("playQueue");i(e,t.get("playQueueSelectedItemOffset")),e.set({playbackDuration:0})}function r(e){var t=e.get("playQueue");if(t){var i=t.get("type"),a=t.server.get("playQueueManager");
n.i(c.a)("metrics").incrementPlaybackCount(),n.i(f.a)(e,{state:d.a.states.STOPPED}),a.remove(i),e.set({playQueue:null,currentIndex:null,playQueueItem:null,currentDecision:{}})}}function s(e){var t=e.get("playQueue"),n=e.get("currentIndex")+1,a=Math.min(n,t.get("playQueueTotalCount")-1);i(e,a)}function o(e){var t=e.get("currentIndex")-1,n=Math.max(t,0);i(e,n)}function l(e,t){i(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var c=n(14),u=n(20),d=n(39),h=n(146),p=n(351),f=n(478);t.startPlayback=a,
t.endPlayback=r,t.playNextItem=s,t.playPreviousItem=o,t.playItem=l},function(e,t,n){"use strict";function i(e,t){var i=e.server,a=i.getXHROptions(r.a.result(e,"url"),{method:"POST",dataType:"json",data:c.a.stringify({urls:t},{arrayFormat:"brackets"})||"urls="});return n.i(u.a)(o.a.ajax(a),400).then(function(t){e.reset(t)},function(e){return o.a.Deferred().reject(e.status&&e.responseJSON.errors||[]).promise()})}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(948),c=n.n(l),u=n(333);t.a=i},function(e,t,n){"use strict";
var i,a=n(5),r=n.n(a),s=n(4),o=n(8),l=n(442),c=n(20),u=n(89),d=n(107),h=n(60),p=n(770),f=n(85),g=n(183),m=n(188),v=n(190),y=n(285),b=n(76),S=n(31),w=n.i(h.a)((i={},i[S._20]=function(e,t){var i=n.i(u.a)(e,t);o.a.trigger("show:modal",new v.a({defaultPaneType:"ownedServer",defaultPaneID:i.id}))},i[S._21]=function(e,t,i){var a=n.i(u.a)(e,t),r=n.i(u.f)(e,t);r.set("refreshing",!t.cancel),n.i(p.a)({server:a,libraryID:r.id,options:t}).fail(function(e){if(503===e.status)o.a.trigger("show:modal",new y.a({model:a
}));else{var r=t.cancel?n.i(s.default)("There was a problem canceling the update."):n.i(s.default)("There was a problem updating the library.");i(n.i(b.g)(r))}}).always(function(e){i(n.i(f.fetchLibraries)({serverEntityID:t.serverEntityID}))})},i[S._22]=function(e,t){var i=n.i(u.a)(e,t),a=n.i(u.f)(e,t);o.a.trigger("show:modal",new m.a({server:i,model:a}))},i[S._23]=function(e,t,i){var a=n.i(u.a)(e,t),o=n.i(u.f)(e,t),l=a.getXHROptions("/library/sections/"+o.id+"/analyze",{type:"PUT"});r.a.ajax(l).fail(function(e){
i(n.i(b.g)(n.i(s.default)("There was a problem analyzing the library.")))})},i[S._24]=function(e,t,i){var a=n.i(u.a)(e,t),o=n.i(u.f)(e,t),c=a.getXHROptions("/library/sections/"+o.id+"/emptyTrash",{type:"PUT"});r.a.ajax(c).done(function(){i(n.i(b.g)({type:l.b,message:n.i(s.default)("The trash was emptied.")}))}).fail(function(e){i(n.i(b.g)(n.i(s.default)("There was a problem emptying the trash.")))})},i[S._25]=function(e,t,i){var a=n.i(u.a)(e,t),o=n.i(u.f)(e,t);if(o.isNew())return void o.destroy();
var l=a.supports("libraryDeleteActivity"),h=c.join(o.url(),l?{async:1}:{}),p=a.getXHROptions(h,{type:"DELETE"});i(n.i(f.startSyntheticActivity)({serverEntityID:t.serverEntityID,activityType:d.a.LIBRARY_DELETE})),r.a.ajax(p).done(function(){l||i(n.i(f.finishSyntheticActivity)({serverEntityID:t.serverEntityID,activityType:d.a.LIBRARY_DELETE}))}).fail(function(e){i(n.i(f.finishSyntheticActivity)({serverEntityID:t.serverEntityID,activityType:d.a.LIBRARY_DELETE})),i(n.i(b.g)(n.i(s.default)("There was a problem deleting the library.")));
})},i[S.y]=function(e,t,i){t.activity.type===d.a.LIBRARY_DELETE&&i(n.i(g.b)())},i));t.a=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),a=n.n(i),r=n(53),s=n(31);n.d(t,"shareLibrary",function(){return o}),n.d(t,"startLibraryRefresh",function(){return l}),n.d(t,"editLibrary",function(){return c}),n.d(t,"analyzeLibrary",function(){return u}),n.d(t,"emptyTrashLibrary",function(){return d}),n.d(t,"deleteLibrary",function(){return h}),n.d(t,"startLibraryForceRefresh",function(){
return p}),n.d(t,"cancelLibraryRefresh",function(){return f});var o=n.i(r.a)(s._20),l=n.i(r.a)(s._21),c=n.i(r.a)(s._22),u=n.i(r.a)(s._23),d=n.i(r.a)(s._24),h=n.i(r.a)(s._25),p=n.i(r.a)(s._21,function(e){return a()({},e,{force:!0})}),f=n.i(r.a)(s._21,function(e){return a()({},e,{cancel:!0})})},function(e,t,n){"use strict";var i,a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(4),c=n(8),u=n(89),d=n(21),h=n(60),p=n(662),f=n(661),g=n(492),m=n(160),v=n(49),y=n(225),b=n(285),S=n(807),w=n(189),M=n(491),I=n(288),C=n(287),D=n(286),T=n(76),x=n(183),P=n(31),E=n.i(h.a)((i={},
i[P._28]=function(e,t){var i=n.i(u.d)(e,t),a=new m.a({model:i,title:i.get("title")});c.a.trigger("show:modal",a)},i[P._29]=function(e,t,i){var a=n.i(u.d)(e,t);n.i(f.a)(a).fail(function(e){i(n.i(T.g)(n.i(l.default)("There was a problem analyzing this item.")))})},i[P._32]=function(e,t){var i=n.i(u.d)(e,t),a=new M.a({model:i});c.a.trigger("show:modal",a)},i[P._30]=function(e,t){var i=t.metadataItemEntityID,a=o()(t,["metadataItemEntityID"]),s=n.i(u.d)(e,{metadataItemEntityID:i});d.a.execute("deleteItems",r()({
item:s},a))},i[P._31]=function(e,t){var i=n.i(u.d)(e,t);d.a.execute("deleteVersions",{item:i})},i[P._33]=function(e,t){var i=n.i(u.d)(e,t),a=new y.a({model:i});c.a.trigger("show:modal",a)},i[P._34]=function(e,t){var i=n.i(u.d)(e,t),a=new S.a({model:i});c.a.trigger("show:modal",a)},i[P._35]=function(e,t){var i=n.i(u.d)(e,t),a=new D.a({model:i});c.a.trigger("show:modal",a)},i[P._37]=function(e,t,i){var a=n.i(u.d)(e,t);d.a.execute("markWatched",{item:a}).done(function(){i(n.i(x.b)())})},i[P._36]=function(e,t,i){
var a=n.i(u.d)(e,t);d.a.execute("markUnwatched",{item:a}).done(function(){i(n.i(x.b)())})},i[P._38]=function(e,t){var i=n.i(u.d)(e,t),a=new w.a({item:i});c.a.trigger("show:modal",a)},i[P._39]=function(e,t){var i=t.metadataItemEntityID,a=o()(t,["metadataItemEntityID"]),s=n.i(u.d)(e,{metadataItemEntityID:i}),l=s.get("type"),c={};"show"!==l&&"season"!==l||(c.unwatched=!0),"episode"===l&&(c.continuous=!0),"track"!==l&&"photo"!==l||(c.siblings=!0),d.a.execute("playMedia",r()({item:s},c,a))},i[P._40]=function(e,t){
var i=n.i(u.d)(e,t),a=new g.a({model:i});c.a.trigger("show:modal",a)},i[P._41]=function(e,t){var i=n.i(u.d)(e,t),a=new v.a({key:i.get("primaryExtraKey"),type:"clip"},{server:i.server,section:i.section});d.a.execute("playMedia",{item:a})},i[P._42]=function(e,t){var i=n.i(u.d)(e,t),a=i.get("related"),r=a.findWhere({browse:!1});r.set("type","track"),d.a.execute("playMedia",{item:r})},i[P._43]=function(e,t){var i=t.metadataItemEntityID,a=o()(t,["metadataItemEntityID"]),s=n.i(u.d)(e,{metadataItemEntityID:i
});d.a.execute("queueMedia",r()({item:s},a))},i[P._44]=function(e,t){var i=t.metadataItemEntityID,a=o()(t,["metadataItemEntityID"]),s=n.i(u.d)(e,{metadataItemEntityID:i});d.a.execute("rate",r()({item:s},a))},i[P._45]=function(e,t){var i=n.i(u.d)(e,t),a=new C.a({model:i});c.a.trigger("show:modal",a)},i[P._46]=function(e,t,i){var a=n.i(u.d)(e,t);n.i(p.a)(a).fail(function(e){503===e.status?c.a.trigger("show:modal",new b.a({model:a.server})):i(n.i(T.g)(n.i(l.default)("There was a problem refreshing this item.")));
})},i[P._47]=function(e,t){var i=n.i(u.d)(e,t),a=new I.a({model:i});c.a.trigger("show:modal",a)},i[P._48]=function(e,t,i){var a=n.i(u.d)(e,t);d.a.execute("splitApart",{item:a,skipNavigate:!0}).done(function(){i(n.i(x.b)())})},i[P._49]=function(e,t){var i=n.i(u.d)(e,t);d.a.execute("showSyncModal",{item:i})},i[P._50]=function(e,t){var i=n.i(u.d)(e,t);d.a.execute("unmatch",{item:i})},i[P._51]=function(e,t){var i=n.i(u.d)(e,t);d.a.execute("watchLater",{item:i})},i[P._52]=function(e,t){var i=t.metadataItemEntityID,a=t.name,r=t.value,s=t.save,o=n.i(u.d)(e,{
metadataItemEntityID:i});s?o.save(a,r):o.set(a,r)},i));t.a=E},function(e,t,n){"use strict";var i,a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(8),c=n(89),u=n(21),d=n(60),h=n(1198),p=n(660),f=n(160),g=n(189),m=n(479),v=n(31),y=n.i(d.a)((i={},i[v._97]=n.i(h.a)({getModel:c.e}),i[v._98]=n.i(p.a)({getModel:c.e}),i[v._99]=function(e,t){var i=t.metadataListEntityID,a=o()(t,["metadataListEntityID"]),s=n.i(c.e)(e,{metadataListEntityID:i});u.a.execute("playMedia",r()({item:s},a))},i[v._100]=function(e,t){var i=n.i(c.e)(e,t),a=new f.a({
model:i,title:i.get("title")});l.a.trigger("show:modal",a)},i[v._101]=function(e,t){var i=n.i(c.e)(e,t);u.a.execute("showSyncModal",{item:i})},i[v._102]=function(e,t){var i=n.i(c.e)(e,t),a=new g.a({item:i});l.a.trigger("show:modal",a)},i[v._103]=function(e,t,i){var a=t.id,r=t.type,s=t.isRangeSelect,o=n.i(c.e)(e,t),l=n.i(c.d)(e,{metadataItemEntityID:a}),u=o.getCollection();l&&i(n.i(m.n)({type:r,model:l,collection:u,isRangeSelect:s}))},i[v._104]=function(e,t,i){var a=n.i(c.d)(e,{metadataItemEntityID:t.id
});a&&i(n.i(m.o)([a.id]))},i[v._105]=function(e,t,i){var a=n.i(c.e)(e,t),r=a.getCollection();i(n.i(m.p)(r))},i[v._106]=function(e,t){var i=n.i(c.e)(e,t);i.abortPendingPopulate(),i.resetPopulatePromise(null),i.restoreDefaults({listIdentifier:i.get("listIdentifier"),containerKey:i.get("containerKey"),containerTitle:i.get("containerTitle")})},i));t.a=y},function(e,t,n){"use strict";var i,a=n(7),r=n.n(a),s=n(2),o=n.n(s),l=n(5),c=n.n(l),u=n(4),d=n(8),h=n(334),p=n(21),f=n(60),g=n(662),m=n(661),v=n(160),y=n(225),b=n(189),S=n(76),w=n(479),M=n(183),I=n(31),C=n.i(f.a)((i={},
i[I._107]=function(e,t,i){var a=t.type,r=t.model,s=t.collection,o=t.isRangeSelect,l=void 0!==o&&o,c=e.get("multiSelect"),u=c.get("activeSelectionType"),d=c.get("activeSelectionRange");if(!u||u===a){if(c.listenToCollection(s),!l||!d||d.collection!==s)return c.set("activeSelectionRange",{collection:s,startModel:r}),void i(n.i(w.q)([{id:r.id,type:a,model:r}]));var h=d.startModel,p=d.endModel,f=s.indexOf(h),g=s.indexOf(r);if(p){var m=s.indexOf(p);i(n.i(w.r)({collection:s,range:{start:f,end:m}}))}c.set("activeSelectionRange",{
collection:s,startModel:h,endModel:r}),i(n.i(w.s)({type:a,collection:s,range:{start:f,end:g}}))}},i[I._108]=function(e,t){var n=e.get("multiSelect"),i=n.get("activeSelectionItems");i.add(t)},i[I._109]=function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems");n.reset()},i[I._110]=function(e,t){var n=e.get("multiSelect"),i=n.get("activeSelectionItems");i.remove(t)},i[I._111]=function(e,t,i){var a=e.get("multiSelect"),r=a.get("activeSelectionItems"),s=[];a.stopListening(t),t.each(function(e){
r.get(e.id)&&s.push(e.id)}),s.length&&i(n.i(w.o)(s))},i[I._112]=function(e,t,i){var a=t.type,r=t.collection,s=t.range,o=e.get("multiSelect"),l=o.get("activeSelectionItems"),c=[];h.a.each(s,function(e){var t=r.at(e);t&&!l.get(t.id)&&c.push({id:t.id,type:a,model:t})}),c.length&&i(n.i(w.q)(c))},i[I._113]=function(e,t,i){var a=t.collection,r=t.range,s=e.get("multiSelect"),o=s.get("activeSelectionItems"),l=[];h.a.each(r,function(e){var t=a.at(e);t&&o.get(t.id)&&l.push(t.id)}),l.length&&i(n.i(w.o)(l))},
i[I._114]=function(e,t){var n=e.get("multiSelect"),i=n.get("activeSelectionItems").pluck("model");p.a.execute("playMedia",r()({items:i},t))},i[I._115]=function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),i=new v.a({model:o.a.first(n),items:n});d.a.trigger("show:modal",i)},i[I._116]=function(e,t,i){var a=e.get("multiSelect"),s=a.get("activeSelectionItems").pluck("model"),o=c.a.Deferred().resolve().promise();s.forEach(function(e){o=o.then(function(){return p.a.execute("updateWatchedStatus",r()({
item:e},t))})}),o.fail(function(){var e=t.watched?n.i(u.default)("There was an unexpected error marking an item watched."):n.i(u.default)("There was an unexpected error marking an item unwatched.");i(n.i(S.g)(e))}),o.always(function(){i(n.i(M.b)())})},i[I._117]=function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),i=new y.a({items:n});d.a.trigger("show:modal",i)},i[I._118]=function(e,t,i){var a=e.get("multiSelect"),r=a.get("activeSelectionItems").pluck("model"),s=c.a.Deferred().resolve().promise();
r.forEach(function(e){s=s.then(function(){return n.i(g.a)(e)})}),s.fail(function(){i(n.i(S.g)(n.i(u.default)("There was an unexpected error refreshing an item.")))})},i[I._119]=function(e,t,i){var a=e.get("multiSelect"),r=a.get("activeSelectionItems").pluck("model"),s=c.a.Deferred().resolve().promise();r.forEach(function(e){s=s.then(function(){return n.i(m.a)(e)})}),s.fail(function(){i(n.i(S.g)(n.i(u.default)("There was an unexpected error analyzing an item.")))})},i[I._120]=function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model");
p.a.execute("showSyncModal",{item:o.a.first(n),items:n})},i[I._121]=function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),i=new b.a({item:o.a.first(n),items:n});d.a.trigger("show:modal",i)},i[I._122]=function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),i=n[0],a=n.slice(1);p.a.execute("merge",{item:i,items:a})},i[I._123]=function(e,t,i){var a=e.get("multiSelect"),r=a.get("activeSelectionItems").pluck("model"),s=c.a.Deferred().resolve().promise();
r.forEach(function(e){s=s.then(function(){return e.destroy({wait:!0})})}),s.fail(function(e){var t=403===e.status?n.i(u.default)("Ensure that media deletion is enabled for library content in your server settings."):n.i(u.default)("There was an unexpected error deleting an item.");i(n.i(S.g)(t))})},i));t.a=C},function(e,t,n){"use strict";var i,a=n(60),r=n(31),s=n(14),o=n(351),l=n(478),c=n.i(a.a)((i={},i[r._152]=function(e){var t=n.i(o.b)(e,"photo"),i=t.get("slideshowPaused");t.set("slideshowPaused",!i),
n.i(l.a)(t),n.i(s.b)("screenSaverManager")&&n.i(s.a)("screenSaverManager").toggle(!i)},i[r._153]=function(e){var t=n.i(o.b)(e,"photo");t.set("relatedVisible",!t.get("relatedVisible"))},i[r._154]=function(e){var t=n.i(o.b)(e,"photo"),i=!t.get("slideshowPaused")||!t.get("videoPaused");if(i){var a=t.get("playbackDuration")+1;t.set({playbackDuration:a})}},i));t.a=c},function(e,t,n){"use strict";var i=n(53),a=n(31);n.d(t,"b",function(){return r}),n.d(t,"c",function(){return s}),n.d(t,"a",function(){return o;
});var r=n.i(i.a)(a._152),s=n.i(i.a)(a._153),o=n.i(i.a)(a._154)},function(e,t,n){"use strict";function i(e,t){var i={audio:n.i(o.default)("Unable to load music"),photo:n.i(o.default)("Unable to load photos"),video:n.i(o.default)("Unable to load videos")};e.set({errorMessage:i[t]})}var a,r=n(2),s=n.n(r),o=n(4),l=n(8),c=n(1110),u=n(14),d=n(1108),h=n(67),p=n(335),f=n(60),g=n(351),m=n(1535),v=n(31),y={local:m,cast:m,plex:m},b=n.i(f.a)((a={},a[v._155]=function(e,t,a){var r=t.serverEntityID,s=t.playerType,o=n.i(g.b)(e,s),l=n.i(p.a)(e,h.f,r),u=e.get("primaryPlayer"),f=u?u.get("protocol"):"local";
o.set({currentPlayer:f});var m=l.get("playQueueManager"),v=m.getForType(s),b=v&&v.id,S=b?new c.a({playQueueID:b,type:s},{server:l}):new d.a({type:s},{originalPlayQueue:v,server:l});S.populate().done(function(){o.set({playQueue:S}),y[f].startPlayback(o)}).fail(function(){return i(o,s)})},a[v._156]=function(e,t){var i=n.i(g.b)(e,t),a=y[i.get("currentPlayer")];a.endPlayback(i)},a[v._158]=function(e,t){var i=n.i(g.b)(e,t),a=y[i.get("currentPlayer")];a.playNextItem(i)},a[v._159]=function(e,t){var i=n.i(g.b)(e,t),a=y[i.get("currentPlayer")];
a.playPreviousItem(i)},a[v._160]=function(e,t){var i=t.playerType,a=t.index,r=n.i(g.b)(e,i),s=y[r.get("currentPlayer")];s.playItem(r,a)},a[v._157]=function(e,t){s.a.defer(function(){return l.a.trigger("hide:player")}),n.i(u.b)("screenSaverManager")&&n.i(u.a)("screenSaverManager").toggle(!0)},a));t.a=b},function(e,t,n){"use strict";function i(e,t){var i=n.i(p.a)(e,t);return i.get("desktop")}var a,r=n(7),s=n.n(r),o=n(5),l=n.n(o),c=n(43),u=n.n(c),d=n(4),h=n(8),p=n(89),f=n(442),g=n(259),m=n(1216),v=n(112),y=n(333),b=n(20),S=n(35),w=n(60),M=n(102),I=n(321),C=n(107),D=n(770),T=n(1748),x=n(188),P=n(190),E=n(1746),A=n(76),L=n(85),k=n(31),N=n.i(w.a)((a={},
a[k.i]=function(e,t){var i=n.i(p.a)(e,t);h.a.trigger("test:server",i)},a[k._163]=function(e,t,n){var i=t.machineIdentifier,a=t.serverName,r=e.get("experienceSettings"),s=r.get("relayReminders"),o=s[i]||{},l=o.remindAfter;if(!l||!u.a.unix(l).isAfter(u()())){var c=new T.a({serverName:a});h.a.trigger("show:modal",c),n(L.setRelayReminder(i))}},a[k.j]=function(e,t){var i=e.get("experienceSettings"),a=i.get("relayReminders"),r=a[t]||{};a[t]=n.i(m.a)(r.times),i.save("relayReminders",s()({},a))},a[k.k]=n.i(M.a)({
key:"providers",getModel:i}),a[k.l]=n.i(I.a)({key:"providers",getModel:i}),a[k.m]=n.i(M.a)({key:"libraries",getModel:i}),a[k.n]=n.i(I.a)({key:"libraries",getModel:i}),a[k.o]=function(e,t){var i=n.i(p.a)(e,t),a=t.options,r=void 0===a?{}:a,o=new x.a(s()({server:i,redirect:!0},r));h.a.trigger("show:modal",o)},a[k.p]=function(e,t,a){var r=n.i(p.a)(e,t);if(t.cancel){var s=i(e,t),o=s.get("libraries");o.each(function(e){return e.set("refreshing",!1)})}n.i(D.a)({server:r,libraryID:"all",options:t}).fail(function(){
var e=t.cancel?n.i(d.default)("There was a problem canceling the update."):n.i(d.default)("There was a problem updating libraries.");a(n.i(A.g)(e))}).always(function(){a(L.fetchLibraries({serverEntityID:t.serverEntityID}))})},a[k.q]=function(e,t){var i=n.i(p.a)(e,t);h.a.trigger("show:modal",new P.a({defaultPaneType:"ownedServer",defaultPaneID:i.id}))},a[k.r]=function(e,t,i){var a=n.i(p.a)(e,t),r=new E.a({server:a}),s=r.promise.then(function(){var t=a.get("publicAddressMatches")?g.a.SAME_NETWORK:g.a.ALWAYS,n=e.get("settings");
return n.save("allowHttpFallback",t)});s.done(function(){i(L.testServer({serverEntityID:t.serverEntityID}))}),h.a.trigger("show:modal",r)},a[k.s]=function(e,t,i){var a=n.i(p.a)(e,t),r=a.getXHROptions("/library/optimize",{type:"PUT"});l.a.ajax(r).done(function(){i(n.i(A.g)({type:f.b,message:n.i(d.default)("The database was optimized.")}))}).fail(function(e){i(n.i(A.g)(n.i(d.default)("There was a problem optimizing the database.")))})},a[k.t]=function(e,t,i){var a=n.i(p.a)(e,t),r=a.supports("cleanBundlesActivity"),s=b.join("/library/clean/bundles",r?{
async:1}:{}),o=a.getXHROptions(s,{type:"PUT"});i(L.startSyntheticActivity({serverEntityID:t.serverEntityID,activityType:C.a.GENERAL_BUNDLE_CLEAN})),l.a.ajax(o).done(function(){r||i(L.finishSyntheticActivity({serverEntityID:t.serverEntityID,activityType:C.a.GENERAL_BUNDLE_CLEAN}))}).fail(function(e){i(L.finishSyntheticActivity({serverEntityID:t.serverEntityID,activityType:C.a.GENERAL_BUNDLE_CLEAN})),i(n.i(A.g)(n.i(d.default)("There was a problem removing unused bundles.")))})},a[k.u]=function(e,t,a){
var r=n.i(p.a)(e,t),s=i(e,t),o=s.get("libraries"),c=t.libraryID,u=c?[c]:o.map(function(e){return e.id}),h=u.map(function(e){var t=r.getXHROptions("/library/sections/"+e+"/emptyTrash",{type:"PUT"});return l.a.ajax(t)});l.a.when.apply(l.a,h).done(function(){a(n.i(A.g)({type:f.b,message:n.i(d.default)("The trash was emptied.")}))}).fail(function(e){a(n.i(A.g)(n.i(d.default)("There was a problem emptying the trash.")))})},a[k.v]=function(e,t,i){var a=n.i(p.a)(e,t),r=e.get("cloudServer");if(a){if(r.get("isResolved")){
var s=r.getXHROptions("/api/servers/"+a.id,{type:"DELETE"});l.a.ajax(s)}var o=r.get("resources"),c=o.get(a.id);if(c&&c.trigger("destroy",c,c.collection),a.get("isFullOwnedServer")&&a.get("isConnected")){var u=a.get("desktop").get("cloudAccount");u.destroy().done(function(){a.set({myPlexSigninState:"none",myPlexSubscription:!1})}).always(function(){i(L.testServer({serverEntityID:t.serverEntityID})),a.populate().fail(function(){a.trigger("destroy",a,a.collection),i(n.i(A.h)({route:"dashboard"}))})});
}else a.trigger("destroy",a,a.collection),i(n.i(A.h)({route:"dashboard"}))}},a[k.w]=function(e,t,n){var a=i(e,t),r=t.activity,s=a.get("activities");s.add([r],{parse:!0}),r.synthetic||n(L.finishSyntheticActivity({serverEntityID:t.serverEntityID,activityType:r.type}))},a[k.x]=function(e,t){var n=i(e,t),a=n.get("activities");a.add([t.activity],{parse:!0,merge:!0})},a[k.y]=function(e,t){var n=i(e,t),a=n.get("activities");a.remove(t.activity.uuid)},a[k.z]=function(e,t,i){n.i(S.a)(function(){i(L.startActivity({
serverEntityID:t.serverEntityID,activity:{type:t.activityType,synthetic:!0,uuid:t.activityType+"-"+Date.now()}}))})},a[k.A]=function(e,t){var n=i(e,t),a=n.get("activities"),r=a.findWhere({type:t.activityType,synthetic:!0});r&&a.remove(r)},a[k.B]=function(e,t){var a=n.i(p.a)(e,t),r=i(e,t),s=r.get("activities");a.get("isFullOwnedServer")&&s.fetch()},a[k.C]=function(e){var t=e.get("cloudServer"),i=t.get("desktop");i.set("isPersonalCloudServerRestarting",!0);var a=t.populate().then(function(){return n.i(v.a)(l.a.ajax(t.getXHROptions("/api/v2/cloud_server",{
method:"DELETE"})))}).then(function(){return l.a.ajax(t.getXHROptions("/api/v2/cloud_server",{method:"POST"}))});n.i(y.a)(a,1e3).fail(function(e){i.set("personalCloudServerRestartError",e)}).always(function(){i.set("isPersonalCloudServerRestarting",!1)})},a));t.a=N},function(e,t,n){"use strict";function i(e){return e.get("ui").get("dashboardPage")}var a,r=n(89),s=n(146),o=n(102),l=n(321),c=n(60),u=n(133),d=n(31),h=n.i(c.a)((a={},a[d._137]=function(e,t){var a=i(e),o=a.get("hubs"),l=n.i(r.a)(e,t),c=t.hubKey;
if(o&&o.server===l&&o.hubKey===c)return void a.set("isPagePopulated",!0);var u=new s.default([],{server:l,hubKey:c,count:12,includeEmpty:!0,excludes:["playlists"]});u.reset(),u.abortPendingPopulate(),u.resetPopulatePromise(null),a.restoreDefaults({isPagePopulated:!0,hubs:u})},a[d._138]=function(e){var t=i(e);t.set("isPagePopulated",!1)},a[d._139]=n.i(o.a)({key:"hubs",getModel:i}),a[d._140]=n.i(l.a)({key:"hubs",getModel:i}),a[d._26]=function(e,t,a){var r=i(e),s=r.get("hubs");s&&s.each(function(e){
var t=e.get("metadataList");!e.get("random")&&t.get("containerKey")&&a(n.i(u.repopulateMetadataListRange)({metadataListEntityID:t.entityID(),count:s.count}))})},a));t.a=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),a=n(31);n.d(t,"initDashboardPage",function(){return r}),n.d(t,"clearDashboardPage",function(){return s}),n.d(t,"fetchHubs",function(){return o}),n.d(t,"populateHubs",function(){return l});var r=n.i(i.a)(a._137),s=n.i(i.a)(a._138),o=n.i(i.a)(a._139),l=n.i(i.a)(a._140);
},function(e,t,n){"use strict";function i(e){return e.get("ui").get("liveTVSettingsPage").get("dvrSetup")}function a(e){return e.get("ui").get("liveTVSettingsPage").get("dvrs")}function r(e,t){var n=a(e);return n.get(t.dvrID)}function s(e,t){var n=i(e),a=n.get("selectedDevice");return a?a:t.dvrID&&t.deviceID?r(e,t).get("devices").get(t.deviceID):t.deviceID?n.get("devices").get(t.deviceID):void 0}function o(e,t){if(t.dvrID&&t.deviceID){var n=s(e,t);return n.get("channelMappings")}var a=i(e);return a.get("channelMappings");
}function l(e,t){var a=i(e),r=n.i(M.a)(e,t),l=s(e,t),c=l.get("channels"),u=t.data,h=[],f={};p()(u).forEach(function(e){var t=u[e],n=t.enabled,i=t.lineupIdentifier,a=c.get(e),r=!(!a||!a.get("drm"));n&&i&&!r&&h.push(e),i&&(f["channelMapping["+e+"]"]=i)});var m=b.join(["/media/grabbers/devices",t.deviceID,"channelmap"],d()({channelsEnabled:h.toString()},f));a.set("isChannelMappingsSaving",!0);var v=r.getXHROptions(m,{type:"PUT"}),y=g.a.ajax(v);return y.done(function(){a.set({isChannelMappingsSaving:!1,
channelMappingsSaveError:null});var n=o(e,t);c.forEach(function(e){var t=e.id,i=h.indexOf(t)!==-1,a=f["channelMapping["+t+"]"];a?n.add([{deviceIdentifier:t,enabled:i,lineupIdentifier:a}],{parse:!0,merge:!0}):n.remove(t)})}),y.fail(function(e){a.set({isChannelMappingsSaving:!1,channelMappingsSaveError:e})}),y}var c,u=n(7),d=n.n(u),h=n(66),p=n.n(h),f=n(5),g=n.n(f),m=n(4),v=n(179),y=n(38),b=n(20),S=n(60),w=n(102),M=n(89),I=n(107),C=n(344),D=n(85),T=n(77),x=n(31),P=n.i(S.a)((c={},c[x._53]=function(e){
var t=i(e);t.restoreDefaults()},c[x._54]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e),a={};switch(n.get("step")){case C.a.DEVICE:a.step=C.a.DEVICE_CHANNELS;break;case C.a.DEVICE_CHANNELS:t.dvrID?(a.selectedLineupUUID=r(e,t).get("lineup"),a.step=C.a.CHANNEL_MAPPING):a.step=C.a.EPG;break;case C.a.EPG:n.get("selectedLineupUUID")?a.step=C.a.CHANNEL_MAPPING:a.step=C.a.EPG_MAPPING;break;case C.a.EPG_MAPPING:a.step=C.a.CHANNEL_MAPPING;break;case C.a.CHANNEL_MAPPING:
a.step=C.a.EPG_DOWNLOAD}n.get("setupErrorMessages").reset(),n.set(a)},c[x._55]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e),a=void 0;switch(n.get("step")){case C.a.DEVICE_CHANNELS:a=C.a.DEVICE;break;case C.a.EPG:a=C.a.DEVICE_CHANNELS;break;case C.a.CHANNEL_MAPPING:a=t.dvrID?C.a.DEVICE_CHANNELS:C.a.EPG}n.get("setupErrorMessages").reset(),n.set("step",a)},c[x._56]=function(e,t,a){var r=i(e),s=r.get("devices");r.set("isDevicesPending",!0),s.fetch().done(function(){
r.set({isDevicesPending:!1,isDevicesPopulated:!0,devicesError:null});var e=s.filter(function(e){return!e.get("parentID")});1!==e.length||e[0].get("parentID")||a(n.i(T.selectDevice)({serverEntityID:t.serverEntityID,deviceID:e[0].id}))}).fail(function(e,t){r.set({isDevicesPending:!1,devicesError:t})})},c[x._57]=function(e,t,a){var r=n.i(M.a)(e,t),s=i(e),o="/media/grabbers/devices/discover",l=r.getXHROptions(o,{type:"POST"});g.a.ajax(l).done(function(e){var i=s.get("devices"),r=i.add(e,{parse:!0,merge:!0
}),o=r.filter(function(e){return!e.get("parentID")});s.get("setupErrorMessages").remove("discoverDevices"),1!==o.length||r[0].get("parentID")||a(n.i(T.selectDevice)({serverEntityID:t.serverEntityID,deviceID:o[0].id}))}).fail(function(e){s.get("setupErrorMessages").add({id:"discoverDevices",message:n.i(v.a)(e,n.i(m.default)("There was a problem discovering devices"))})})},c[x._58]=function(e,t,a){var r=n.i(M.a)(e,t),s=i(e),o=b.join(["/media/grabbers","tv.plex.grabbers.hdhomerun","devices"],{uri:t.uri
}),l=r.getXHROptions(o,{type:"POST"});s.set("addDevicePending",!0),g.a.ajax(l).done(function(e,i){var a=s.get("devices"),r=a.add(e,{parse:!0});if(0===r.length){var o=y.a.parseXML(e),l=o&&o.message||n.i(m.default)("No device found at {1}",t.uri);s.get("setupErrorMessages").add({id:"addDevice",message:l}),s.set("addDevicePending",!1)}else s.get("setupErrorMessages").remove("addDevice"),s.set({addDevicePending:!1,selectedDevice:1===r.length?r[0]:s.get("selectedDevice")})}).fail(function(e){s.get("setupErrorMessages").add({
id:"addDevice",message:n.i(v.a)(e,n.i(m.default)("There was a problem adding the device: {1}",t.uri))}),s.set("addDevicePending",!1)})},c[x._59]=function(e,t){var n=i(e),a=n.get("devices");n.set("selectedDevice",a.get(t.deviceID))},c[x._60]=function(e,t){var n=i(e),a=n.get("selectedDevice");a.set("selectedSource",t.source)},c[x._61]=function(e,t){var a=i(e),r=s(e,t);r.fetch().fail(function(e){a.get("setupErrorMessages").add({id:"fetchDeviceDetails",message:n.i(v.a)(e,n.i(m.default)("There was a problem getting the details for your device"))
})})},c[x._62]=function(e,t){var a=i(e),r=s(e,t),o=b.join(["/media/grabbers/devices",r.get("key"),"channels"]);r.set("isChannelsPending",!0),r.get("channels").fetch({url:o}).done(function(){r.set({isChannelsPending:!1,isChannelsPopulated:!0,channelsError:null})}).fail(function(e){r.set({isChannelsPending:!1,isChannelsPopulated:!0,channelsError:null}),a.get("setupErrorMessages").add({id:"fetchDeviceDetails",message:n.i(v.a)(e,n.i(m.default)("There was a problem getting the channels for your device"))
})})},c[x._63]=function(e,t,a){var r=i(e),o=n.i(M.a)(e,t),l=s(e,t),c=l.get("selectedSource")||l.get("source"),u=b.join(["/media/grabbers/devices",l.get("key"),"scan"],{source:c}),d=o.getXHROptions(u,{type:"POST"});g.a.ajax(d).done(function(e,t,n){var i=n.getResponseHeader("X-Plex-Activity");i&&l.get("channels").reset()}).fail(function(e){r.get("setupErrorMessages").add({id:"scanDeviceChannels",message:n.i(v.a)(e,n.i(m.default)("There was a problem scanning channels"))})})},c[x._64]=function(e,t,a){
var r=i(e),s=n.i(M.a)(e,t),o=t.deviceID;if(!o)throw new Error("A device ID is required to cancel a channel scan.");var l=b.join(["/media/grabbers/devices",o,"scan"]),c=s.getXHROptions(l,{type:"DELETE"});g.a.ajax(c).fail(function(e){r.get("setupErrorMessages").add({id:"cancelScanDeviceChannels",message:n.i(v.a)(e,n.i(m.default)("There was a problem canceling the current channel scan"))})})},c[x._65]=function(e,t,a){var r=n.i(M.a)(e,t),s=i(e),o=s.get("selectedDevice"),l=s.get("epgSettings").get("lineupGroup"),c=b.join("/livetv/epg/lineup",{
device:o.get("uuid"),lineupGroup:l.get("uuid")}),u=r.getXHROptions(c);g.a.ajax(u).done(function(e,t,n){var i=n.getResponseHeader("X-Plex-Activity");s.set("epgLineupActivityID",i)}).fail(function(e){s.get("setupErrorMessages").add({id:"findBestEPGLineup",message:n.i(v.a)(e,n.i(m.default)("There was a problem mapping channels"))})})},c[x._66]=function(e,t){var n=i(e);n.set("selectedLineupUUID",t.lineupUUID)},c[x._77]=n.i(w.a)({key:"lineupChannels",getModel:i}),c[x._78]=function(e,t){var n=i(e,t),a=n.get("channelMappings");
n.set("isChannelMappingsPending",!0),a.fetch(t.options).done(function(){t.forceEnabled&&a.each(function(e){e.set("enabled",e.has("lineupIdentifier"))}),n.set({isChannelMappingsPending:!1,isChannelMappingsPopulated:!0,channelMappingsError:null})}).fail(function(e,t){n.set({isChannelMappingsPending:!1,channelMappingsError:t})})},c[x._67]=function(e,t){var n=i(e,t);n.set({channelMappingsError:null,lineupChannelsError:null})},c[x._68]=function(e,t,i){l(e,t).done(function(){i(n.i(T.fetchDeviceDetails)(t));
})},c[x._69]=function(e){var t=i(e);t.set("channelMappingsSaveError",null)},c[x._70]=function(e,t,r){var s=i(e);s.set("isSavingDVR",!0);var o=a(e,t);l(e,t).then(function(){var i=n.i(M.a)(e,t),a=s.get("selectedDevice"),r=s.get("selectedLineupUUID"),o=s.get("epgSettings").get("selectedLanguage");s.get("setupErrorMessages").remove("saveDVR");var l=b.join("/livetv/dvrs",{device:a.get("uuid"),lineup:r,language:o.get("code")}),c=i.getXHROptions(l,{type:"POST"});return g.a.ajax(c)}).done(function(e,i,a){
var l=a.getResponseHeader("X-Plex-Activity"),c=o.add(e,{parse:!0})[0];s.get("setupErrorMessages").remove("saveDVR"),s.set({epgDownloadActivityID:l,selectedDVR:c,isSavingDVR:!1}),r(n.i(T.dvrSetupNextStep)({serverEntityID:t.serverEntityID})),r(n.i(D.fetchProviders)({serverEntityID:t.serverEntityID}))}).fail(function(e){s.get("setupErrorMessages").add({id:"saveDVR",message:n.i(v.a)(e,n.i(m.default)("There was a problem saving your DVR. Please try again."))}),s.set("isSavingDVR",!1)})},c[x._71]=function(e,t,a){
var s=i(e);s.set("isSavingDVR",!0);var o=s.get("selectedDevice"),c=r(e,t);l(e,t).then(function(){var i=n.i(M.a)(e,t),a=b.join(["/livetv/dvrs",c.id,"devices",o.id]),r=i.getXHROptions(a,{type:"PUT"});return g.a.ajax(r)}).done(function(e,i,r){var l=r.getResponseHeader("X-Plex-Activity");c.get("devices").add([o]),s.set({epgDownloadActivityID:l,selectedDVR:c,isSavingDVR:!1}),a(n.i(T.dvrSetupNextStep)({serverEntityID:t.serverEntityID})),a(n.i(D.fetchProviders)({serverEntityID:t.serverEntityID}))}).fail(function(e){
s.get("setupErrorMessages").add({id:"addDVRDevice",message:n.i(v.a)(e,n.i(m.default)("There was a problem adding a new device to your DVR. Please try again."))}),s.set("isSavingDVR",!1)})},c[x._72]=function(e,t,i){var a=n.i(M.a)(e,t),s=r(e,t),o=t.deviceID,l=b.join(["/livetv/dvrs",s.id,"devices",o]),c=a.getXHROptions(l,{type:"DELETE"});g.a.ajax(c).done(function(e,t,n){s.get("devices").remove(o)})},c[x._73]=function(e,t){var i=n.i(M.a)(e,t),a=r(e,t),s=t.prefs,o=b.join(["/livetv/dvrs",t.dvrID,"prefs"],s);
a.set("isSaving",!0);var l=i.getXHROptions(o,{type:"PUT"}),c=g.a.ajax(l);c.done(function(){var e=a.get("prefs");p()(s).forEach(function(t){e.get(t).set("value",s[t])}),a.set({isSaving:!1,saveError:null})}),c.fail(function(e){a.set({isSaving:!1,saveError:e})})},c[x._74]=function(e,t){var n=r(e,t);n.set("saveError",null)},c[x._75]=function(e,t){var i=n.i(M.a)(e,t),a=s(e,t),r=t.prefs,o=b.join(["/media/grabbers/devices",t.deviceID,"prefs"],r);a.set("isSaving",!0);var l=i.getXHROptions(o,{type:"PUT"}),c=g.a.ajax(l);
c.done(function(){var e=a.get("prefs");p()(r).forEach(function(t){e.get(t).set("value",r[t])}),a.set({isSaving:!1,saveError:null})}),c.fail(function(e){a.set({isSaving:!1,saveError:e})})},c[x._76]=function(e,t){var n=s(e,t);n.set("saveError",null)},c[x.y]=function(e,t,a){var r=i(e);if(r){var s=r.get("selectedDevice"),o=t.activity;s&&o.type===I.a.PROVIDER_DEVICE_CHANNELSCAN&&parseInt(o.Context.deviceID,10)===s.id?a(n.i(T.fetchDeviceChannels)(t)):o.uuid===r.get("epgLineupActivityID")?(r.set({selectedLineupUUID:o.Response.lineup,
epgLineupActivityID:""}),a(n.i(T.dvrSetupNextStep)({serverEntityID:t.serverEntityID}))):o.uuid===r.get("epgDownloadActivityID")&&r.set("epgDownloadActivityID","")}},c));t.a=P},function(e,t,n){"use strict";function i(e){return e.get("ui").get("libraryPage")}var a,r=n(7),s=n.n(r),o=n(2),l=n.n(o),c=n(20),u=n(1299),d=n(89),h=n(82),p=n(635),f=n(422),g=n(319),m=n(60),v=n(102),y=n(321),b=n(278),S=n(133),w=n(31),M=n.i(m.a)((a={},a[w._124]=function(e,t){var a=i(e),r=a.get("metadataList"),s=a.get("metadataTypes"),o=n.i(d.a)(e,t),l=t.libraryKey,g=t.activeType,m=t.activeFilters,v=t.activeSort,y={
type:g,filters:m,sort:v},b="/"===l.charAt(0),S=b?l:"/library/sections/"+l,w=c.join(S,{includeDetails:1,includeAdvanced:1}),M=n.i(u.a)([S,"all"],y),I=n.i(u.a)([S,"firstCharacter"],y);if(r&&r.server===o&&r.get("containerKey")===M)return void a.set("isPagePopulated",!0);var C=new h.default({containerKey:M},{server:o}),D=new f.a([],{server:o,url:I}),T={isPagePopulated:!0,metadataList:C,firstCharacters:D};s&&s.url===w?(T.metadataTypes=s,T.isMetadataTypesPending=a.get("isMetadataTypesPending"),T.isMetadataTypesPopulated=a.get("isMetadataTypesPopulated"),
T.metadataTypesError=a.get("metadataTypesError")):T.metadataTypes=new p.a([],{server:o,url:w}),a.restoreDefaults(T)},a[w._125]=function(e){var t=i(e);t.set("isPagePopulated",!1)},a[w._126]=n.i(v.a)({key:"metadataTypes",getModel:i}),a[w._127]=n.i(y.a)({key:"metadataTypes",actionSuffix:"libraryMetadataTypes",getModel:i}),a[w._128]=n.i(v.a)({key:"firstCharacters",getModel:i}),a[w._129]=n.i(y.a)({key:"firstCharacters",actionSuffix:"libraryFirstCharacters",getModel:i}),a[w._26]=function(e,t,a){var r=i(e),s=r.get("metadataList");
s&&(a(n.i(S.repopulateMetadataListRange)({metadataListEntityID:s.entityID()})),a(n.i(b.fetchLibraryFirstCharacters)()))},a[w._130]=function(e,t){var a=i(e),r=a.get("selectedFilterOptions"),s=n.i(d.a)(e,t),o=t.key,l={selectedFilterKey:o};r&&r.url===o||(l.selectedFilterOptions=new g.a([],{server:s,url:o}),l.isSelectedFilterOptionsPending=!0,l.isSelectedFilterOptionsPopulated=!1,l.selectedFilterOptionsError=null),a.set(l)},a[w._131]=function(e){var t=i(e);t.set({selectedFilterKey:null,filterOptionQuery:""
})},a[w._132]=n.i(v.a)({key:"selectedFilterOptions",getModel:i}),a[w._133]=n.i(y.a)({key:"selectedFilterOptions",actionSuffix:"libraryFilterOptions",getModel:i}),a[w._134]=function(e,t){var n=i(e);n.set("filterOptionQuery",t)},a[w._135]=function(e,t){var n,i=t.type,a=t.activeTableColumns,r=t.key,o=l.a.findIndex(a,function(e){return e.key===r});if(o===-1){var c=e.get("experienceSettings"),u=c.get("libraryTableColumns"),d=a.map(function(e){return e.key}).concat(r);c.save("libraryTableColumns",s()({},u,(n={},
n[i]=d,n)))}},a[w._136]=function(e,t){var n,i=t.type,a=t.activeTableColumns,r=t.key;if(!(a.length<=1)){var o=l.a.findIndex(a,function(e){return e.key===r});if(o!==-1){var c=e.get("experienceSettings"),u=c.get("libraryTableColumns"),d=a.slice(0,o).concat(a.slice(o+1)).map(function(e){return e.key});c.save("libraryTableColumns",s()({},u,(n={},n[i]=d,n)))}}},a));t.a=M},function(e,t,n){"use strict";function i(e){return e.get("ui").get("liveTVSettingsPage")}var a,r=n(5),s=n.n(r),o=n(4),l=n(20),c=n(762),u=n(344),d=n(60),h=n(102),p=n(89),f=n(76),g=n(31),m=n.i(d.a)((a={},
a[g._89]=n.i(h.a)({key:"dvrs",getModel:i}),a[g._87]=function(e,t){var a=i(e),r=a.get("dvrSetup"),s=a.get("dvr"),o=n.i(p.a)(e,t),l={isPagePopulated:!0};s&&s.server===o||(l.dvrs=new c.a([],{server:o})),r&&r.server===o?r.restoreDefaults():l.dvrSetup=new u.b({},{server:o}),a.set(l)},a[g._88]=function(e){var t=i(e);t.set("isPagePopulated",!1)},a[g._90]=function(e,t,a){var r=i(e,t),s=r.get("dvrs"),l=s.get(t.dvrID);l&&l.destroy().fail(function(){return a(n.i(f.g)(n.i(o.default)("There was a problem removing your DVR")));
})},a[g._91]=function(e,t,i){var a=n.i(p.a)(e,t),r=l.join(["/livetv/dvrs",t.dvrID,"reloadGuide"]),o=a.getXHROptions(r,{type:"POST"});s.a.ajax(o)},a));t.a=m},function(e,t,n){"use strict";function i(e){return e.get("ui").get("mediaSubscriptionModal")}var a,r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(20),u=n(36),d=n(461),h=n(663),p=n(60),f=n(102),g=n(651),m=n(320),v=n(772),y=n(31),b=n.i(p.a)((a={},a[y.a]=function(e,t,a){var r=i(e);r.set("isMediaSubscriptionPending",!0);var s={};if(t.showConflicts&&(s.options={
data:{includeGrabs:1}}),t.mediaSubscriptionEntityID)return r.set({mediaSubscription:n.i(d.c)(e,t)}),void a(v.fetchMediaSubscription(s));var o=n.i(d.a)(e,t),u=n.i(d.d)(e,t),h=u.get("grandparentSubscriptionID")||u.get("subscriptionID");if(h)return r.set({mediaSubscription:new m.a({key:h},{server:o})}),void a(v.fetchMediaSubscription(s));var p=c.join("/media/subscriptions/template",{guid:u.get("guid")}),f=o.getXHROptions(p),y=l.a.ajax(f);y.done(function(e){var t=new g.a(e,{parse:!0,server:o}),n=t.findWhere({
selected:!0});r.set({isMediaSubscriptionPending:!1,isMediaSubscriptionPopulated:!0,mediaSubscriptionError:null,templates:t,mediaSubscription:n})}).fail(function(e){r.set({isMediaSubscriptionPending:!1,mediaSubscriptionError:e})})},a[y.b]=function(e){var t=i(e);t.restoreDefaults()},a[y.c]=n.i(f.a)({key:"mediaSubscription",getModel:i}),a[y.d]=function(e,t){var a=i(e),r=n.i(d.a)(e,t),o=a.get("mediaSubscription"),h=t.targetLibrarySectionID,p=t.targetSectionLocationID,f=void 0===p?null:p,g=t.prefs;a.set({
isMediaSubscriptionSaving:!0,mediaSubscriptionSaveError:null});var m=o.get("key"),v=o.getSaveParams(),y=l.a.extend(!0,{},v,{includeGrabs:1,targetLibrarySectionID:h,targetSectionLocationID:f,prefs:g}),b=c.join(s.a.result(o,"url"),y);if(!m){var S=u.a.get(o.get("target").get("type"));b=b+"&"+o.get("parameters")+"&type="+S.id}var w=r.getXHROptions(b,{type:m?"PUT":"POST"}),M=l.a.ajax(w);M.done(function(i){if(o.set(o.parse(i)),a.set({templates:void 0,isMediaSubscriptionSaving:!1}),t.metadataItemEntityID){
var r=n.i(d.d)(e,t);if(r){var s,l=o.get("target").get("type"),c=u.a.typeHasChildMedia(l),h=c?"grandparentSubscriptionID":"subscriptionID",p=c?"grandparentSubscriptionType":"subscriptionType";r.set((s={},s[h]=o.id,s[p]=l,s))}}}).fail(function(e){a.set({isMediaSubscriptionSaving:!1,mediaSubscriptionSaveError:e})})},a[y.e]=function(e,t){var n=i(e),a=n.get("templates"),r=t.modeIndex;n.set("mediaSubscription",a.at(r))},a[y.f]=function(e,t){var n=i(e);n.set({mediaSubscriptionSaveError:null,mediaSubscriptionError:null,
mediaSubscriptionMoveError:null,mediaSubscriptionDeleteError:null})},a[y.g]=function(e,t){var a=i(e),r=a.get("mediaSubscription");a.set({isMediaSubscriptionMoving:!0,mediaSubscriptionMoveError:null});var s=n.i(h.a)(r);s.done(function(){a.set({isMediaSubscriptionMoving:!1})}).fail(function(e){a.set({isMediaSubscriptionMoving:!1,mediaSubscriptionMoveError:e})})},a[y.h]=function(e,t,a){var r=i(e),s=r.get("mediaSubscription");r.set({isMediaSubscriptionDeleting:!0,mediaSubscriptionDeleteError:null}),s.destroy({
wait:!0}).done(function(){if(r.set({isMediaSubscriptionDeleting:!1}),t.metadataItemEntityID){var i=n.i(d.d)(e,t),a=s.get("key");i.get("subscriptionID")===a?(i.unset("subscriptionID"),i.unset("subscriptionType")):i.get("grandparentSubscriptionID")===a&&(i.unset("grandparentSubscriptionID"),i.unset("grandparentSubscriptionType"))}}).fail(function(e){r.set({isMediaSubscriptionDeleting:!1,mediaSubscriptionDeleteError:e})})},a));t.a=b},function(e,t,n){"use strict";function i(e){return e.get("ui").get("metadataListPage");
}var a,r=n(89),s=n(82),o=n(60),l=n(133),c=n(31),u=n.i(o.a)((a={},a[c._161]=function(e,t){var a=i(e),o=a.get("metadataList"),l=n.i(r.a)(e,t),c=t.key,u=t.title;if(o&&o.server===l&&o.get("containerKey")===c)return void a.set("isPagePopulated",!0);var d=new s.default({containerKey:c,containerTitle:u},{server:l});a.restoreDefaults({isPagePopulated:!0,metadataList:d})},a[c._162]=function(e){var t=i(e);t.set("isPagePopulated",!1)},a[c._26]=function(e,t,a){var r=i(e),s=r.get("metadataList");s&&a(n.i(l.repopulateMetadataListRange)({
metadataListEntityID:s.entityID()}))},a));t.a=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),a=n(31);n.d(t,"initMetadataListPage",function(){return r}),n.d(t,"clearMetadataListPage",function(){return s});var r=n.i(i.a)(a._161),s=n.i(i.a)(a._162)},function(e,t,n){"use strict";function i(e){return e.get("ui").get("prePlayPage")}var a,r=n(20),s=n(89),o=n(49),l=n(82),c=n(146),u=n(60),d=n(102),h=n(31),p=n.i(u.a)((a={},a[h._92]=function(e,t){var a=i(e),l=a.get("metadataItem"),u=n.i(s.a)(e,t),d=t.metadataKey;
if(l&&l.server===u&&l.get("key")===d)return void a.set("isPagePopulated",!0);var h=new o.a({key:d},{server:u}),p=r.join([d.replace("/metadata","/hubs/metadata"),"related"]),f=new c.default([],{server:u,metadataItem:h,hubKey:p,count:12});f.reset(),f.abortPendingPopulate(),f.resetPopulatePromise(null),a.restoreDefaults({isPagePopulated:!0,metadataItem:h,relatedHubs:f})},a[h._93]=function(e,t){var a=i(e),o=a.get("metadataItem"),c=a.get("descendantList"),u=n.i(s.a)(e,t);if(o.has("childrenKey")){var d=o.get("key"),h=o.get("skipChildren"),p=r.join([d,h?"grandchildren":"children"]);
if(!c||c.server!==u||c.get("containerKey")!==p){var f=new l.default({containerKey:p},{server:u});a.set({descendantList:f})}}},a[h._94]=function(e){var t=i(e);t.set("isPagePopulated",!1)},a[h._95]=n.i(d.a)({key:"metadataItem",getModel:i}),a[h._96]=n.i(d.a)({key:"relatedHubs",getModel:i}),a));t.a=p},function(e,t,n){"use strict";var i,a=n(5),r=n.n(a),s=n(732),o=n(333),l=n(60),c=n(102),u=n(645),d=n(76),h=n(85),p=n(134),f=n(31),g={isFullOwnedServer:!0,isPersonalCloudServer:!0},m=n.i(l.a)((i={},i[f._13]=function(e,t,n){
var i=e.get("ui").get("provisionPersonalCloudServerPage");i.set("isPersonalCloudServerModalOpen",!!t.open)},i[f._14]=function(e,t,i){var a=e.get("ui").get("provisionPersonalCloudServerPage");a.set("isProvisionPersonalCloudServerPending",!0);var s=e.get("cloudServer"),l=t.url,c=s.populate().then(function(){return r.a.ajax(s.getXHROptions(l,{type:"POST"}))});n.i(o.a)(c,2e3).done(function(){a.set("isProvisionPersonalCloudServerPopulated",!0)}).fail(function(e){a.set("provisionPersonalCloudServerError",e);
}).always(function(){a.set("isProvisionPersonalCloudServerPending",!1)})},i[f._15]=function(e,t,i){function a(){var t=e.get("servers").findWhere(g);return t?t.get("isResolved")||i(n.i(h.testServer)({serverEntityID:t.entityID()})):i(n.i(d.e)()),e.get("servers").populateServer(g)}var r=e.get("ui").get("provisionPersonalCloudServerPage");r.set("isConnectToPersonalCloudServerPending",!0);var l=n.i(s.a)(a,{times:10,delay:2e3});n.i(o.a)(l,2e3).done(function(){r.set("isConnectToPersonalCloudServerPopulated",!0);
}).fail(function(){r.set("connectToPersonalCloudServerError",{})}).always(function(){r.set("isConnectToPersonalCloudServerPending",!1)})},i[f._16]=function(e){var t=e.get("ui").get("provisionPersonalCloudServerPage");t.set("isPersonalCloudServerDriveCachePending",!0);var i=e.get("servers").findWhere(g),a=new u.a({},{server:i}),r=n.i(s.a)(function(){return a.fetchAndNotUpdating()},{times:30,delay:2e3});n.i(o.a)(r,2e3).done(function(){t.set("isPersonalCloudServerDriveCachePopulated",!0)}).fail(function(e){
t.set("personalCloudServerDriveCacheError",e)}).always(function(){t.set("isPersonalCloudServerDriveCachePending",!1)})},i[f._17]=n.i(c.a)({key:"personalCloudServerProviders",getModel:function(e){return e.get("cloudServer").get("desktop")}}),i[f._19]=n.i(c.a)({key:"personalCloudServerStatus",getModel:function(e){return e.get("cloudServer").get("desktop")}}),i[f._18]=function(e,t,i){var a=e.get("cloudServer"),s=a.get("desktop").get("personalCloudServerProviders").findWhere(t);s.set("isUnlinking",!0);
var l=a.populate().then(function(){return r.a.ajax(a.getXHROptions(t.url,{type:"DELETE"}))});n.i(o.a)(l,1e3).done(function(){s.set("unlinkError",null)}).fail(function(e){s.set("unlinkError",e)}).always(function(){i(n.i(d.e)()),i(n.i(p.e)({options:{data:{type:"plex_cloud"}}})),s.set("isUnlinking",!1)})},i));t.a=m},function(e,t,n){"use strict";function i(e){return e.get("ui").get("quickSearch")}function a(e){return e.reduce(function(e,t){var n=t.get("hubs").pluck("results");return e.concat(n.reduce(function(e,t){
return e.concat(t.map(function(e){return e.entityID()}))},[]))},[])}var r,s=n(8),o=n(20),l=n(89),c=n(340),u=n(171),d=n(476),h=n(60),p=n(165),f=n(897),g=n(135),m=n(113),v=n(31),y=n.i(h.a)((r={},r[v.U]=function(e,t,a){var r=n.i(l.a)(e,t),s=i(e),o=s.get("searches"),c=t.providerEntityIDs,h=t.providerIdentifier;o.reset(c.reduce(function(t,i){var a=n.i(l.b)(e,{providerEntityID:i}),s=a.get("identifier"),o=a.get("isLibraryProvider"),c=a.get("features").get(u.a.SEARCH);if(c&&(o||s===h)){var p=h===s?"unshift":"push";
t[p](new d.a({providerEntityID:i,key:c.get("key")},{server:r,provider:a}))}return t},[])),s.get("query")&&a(g.fetchQuickSearch())},r[v.V]=function(e){var t=i(e),n=t.get("searches");t.set({query:"",selectedResultEntityID:null}),n.each(function(e){e.restoreDefaults({providerEntityID:e.get("providerEntityID"),key:e.get("key")})})},r[v.W]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e),a=n.get("searches"),r=t.query,s=void 0===r?n.get("query"):r,o=t.limit;a.each(function(e){
var t=e.server;t.supports("quickSearch")&&t.get("isConnected")&&(e.abortPendingPopulate(),e.set("isSearchPending",!0),e.fetch({data:{sectionId:n.get("sectionID"),query:s,limit:o}}).done(function(){e.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(t){e.set({isSearchPending:!1,searchError:t})}))})},r[v.X]=function(e,t,n){var a=i(e);""===t.trim()?n(g.resetQuickSearch()):(a.get("query").length>1&&t.length<2&&n(g.resetQuickSearch()),a.set("query",t))},r[v.Y]=function(e,t){
var n=i(e),a=t.providerIdentifier,r=void 0===a?n.get("providerIdentifier"):a,s=t.sectionID,o=void 0===s?n.get("sectionID"):s,l=t.channelPlaceholder,c=void 0===l?n.get("channelPlaceholder"):l,u=t.channelID,d=void 0===u?n.get("channelID"):u,h=t.channelSearchKey,p=void 0===h?n.get("channelSearchKey"):h;n.set({providerIdentifier:r,sectionID:o,channelPlaceholder:c,channelID:d,channelSearchKey:p})},r[v.Z]=function(e,t){var n=i(e),r=t.searchResultEntityID,s=t.offset;if(r)return void n.set("selectedResultEntityID",r);
var o=a(n.get("searches")),l=o.indexOf(n.get("selectedResultEntityID")),c=o.length-1,u=-1,d=s>0?u:c,h=l+s,p=h<u||h>c,f=p?d:h,g=f===-1?null:o[f];n.set("selectedResultEntityID",g)},r[v._0]=function(e,t,a){var r=i(e),u=t.serverEntityID,d=null!=t.searchResultEntityID?t.searchResultEntityID:r.get("selectedResultEntityID"),h=n.i(l.c)(e,{searchResultEntityID:d}),m=n.i(l.a)(e,t),v=m.id;if(!h){var y=r.pick("query","channelID","channelSearchKey"),b=y.query,S=y.channelID,w=y.channelSearchKey;return null!=S&&null!=w?s.a.trigger("navigate","channel",{
serverID:v,channelID:S,key:o.join(w,{query:b})}):s.a.trigger("navigate","search",{serverID:v,query:b}),void a(g.resetQuickSearch({serverEntityID:u}))}var M=h.pick("tagItem","metadataItem"),I=M.tagItem,C=M.metadataItem;if(I){var D=c.a.get(I.get("tagType")),T=D.typeString,x=h.provider.get("isLibraryProvider")?h.get("reasonID"):I.get("librarySectionKey"),P=n.i(p.a)(m.attributes,h.provider.attributes,x,{filters:I.has("filter")?I.get("filter"):T+"="+I.get("id"),filterLabel:I.get("tag")});return window.location.hash=P,
void a(g.resetQuickSearch({serverEntityID:u}))}var E=n.i(f.a)(m.attributes,h.provider.attributes,C.attributes);return E?(window.location.hash=E,void a(g.resetQuickSearch())):void a(g.playQuickSearchItem({searchResultEntityID:d}))},r[v._1]=function(e,t,a){var r=i(e),s=t.serverEntityID,o=t.shuffle,c=void 0!==o&&o,u=null!=t.searchResultEntityID?t.searchResultEntityID:r.get("selectedResultEntityID"),d=n.i(l.c)(e,{searchResultEntityID:u});return d?void(d.get("metadataItem")&&(a(n.i(m.playMetadataItem)({
metadataItemEntityID:d.get("metadataItem").entityID(),shuffle:c})),a(g.resetQuickSearch({serverEntityID:s})))):void a(g.navigateQuickSearchResult(t.searchResultEntityID))},r));t.a=y},function(e,t,n){"use strict";function i(e){return e.get("ui").get("recordingSchedulePage")}function a(e){return i(e).get("calendar")}var r,s=n(43),o=n.n(s),l=n(60),c=n(102),u=n(663),d=n(461),h=n(49),p=n(650),f=n(769),g=n(107),m=n(113),v=n(279),y=n(31),b=n.i(l.a)((r={},r[y.K]=function(e,t){var a=i(e),r=a.get("mediaSubscriptions"),s=a.get("calendar"),o=n.i(d.a)(e,t),l={
isPagePopulated:!0,isCalendarPending:!1,isCalendarPopulated:!1,calendarError:null};r&&r.server===o||(l.mediaSubscriptions=new p.a([],{server:o})),s&&s.server===o?s.restoreDefaults():l.calendar=new f.a({},{server:o}),a.set(l)},r[y.L]=function(e){var t=i(e);t.set("isPagePopulated",!1)},r[y.M]=n.i(c.a)({key:"mediaSubscriptions",getModel:i}),r[y.N]=function(e,t){var a=i(e),r=a.get("mediaSubscriptions"),s=n.i(d.c)(e,t),o=s&&r.indexOf(s),l=t.moveIndex;if(o!==l&&o!==l-1){var c=l>o?l-1:l;r.remove(s),r.add(s,{
at:c});var h=c>0?r.at(c-1).id:void 0;n.i(u.a)(s,h).fail(function(){r.remove(s),r.add(s,{at:o})})}},r[y.O]=function(e,t,n){var i=a(e,t);i.set("visibleDays",t.visibleDays)},r[y.P]=function(e,t,n){var i=a(e,t);i.set("time",o()().unix())},r[y.Q]=function(e,t,n){var i=a(e,t),r=i.get("visibleDays"),s=o.a.unix(i.get("time")).subtract(r,"days").unix();i.set("time",s)},r[y.R]=function(e,t,n){var i=a(e,t),r=i.get("visibleDays"),s=o.a.unix(i.get("time")).add(r,"days").unix();i.set("time",s)},r[y.S]=n.i(c.a)({
key:"calendar",getModel:i}),r[y.T]=function(e,t,i){var a=t.serverEntityID,r=t.linkedKey,s=n.i(d.a)(e,t),o=new h.a({key:r},{server:s});o.populate().done(function(){i(n.i(m.playMetadataItem)({serverEntityID:a,metadataItemEntityID:o.entityID()}))})},r[y.y]=function(e,t,a){var r=t.activity;if(r.type===g.a.PROVIDER_SUBSCRIPTION_PROCESS){var s=i(e),o=n.i(d.a)(e,t);if(s.get("isPagePopulated")){var l=s.get("calendar"),c=s.get("mediaSubscriptions");l&&l.server===o&&a(n.i(v.fetchCalendar)()),c&&c.server===o&&a(n.i(v.fetchMediaSubscriptions)());
}}},r));t.a=b},function(e,t,n){"use strict";function i(e){return e.get("ui").get("searchPage")}var a,r=n(66),s=n.n(r),o=n(89),l=n(171),c=n(476),u=n(60),d=n(85),h=n(31),p=n.i(u.a)((a={},a[h._141]=function(e,t,i){t.forEach(function(e){i(n.i(d.populateProviders)({serverEntityID:e}))})},a[h._142]=function(e,t,a){var r=i(e),u=r.get("searches"),d=t.availableProviders,h=t.query,p=t.limit;s()(d).forEach(function(t){var i=d[t],a=n.i(o.a)(e,{serverEntityID:i.serverEntityID}),r=n.i(o.b)(e,{providerEntityID:t
}),s=r.get("features").get(l.a.SEARCH);s&&!u.get(t)&&u.add(new c.a({providerEntityID:t,key:s.get("key")},{server:a,provider:r}))}),u.each(function(e){e.populatePromise||(e.set("isSearchPending",!0),e.fetch({data:{query:h,limit:p}}).done(function(){e.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(t){e.set({isSearchPending:!1,searchError:t})}))})},a[h._143]=function(e,t,n){var a=i(e);a.get("searches").each(function(e){e.abortPendingPopulate()}),a.restoreDefaults()},
a));t.a=p},function(e,t,n){"use strict";var i,a=n(89),r=n(60),s=n(102),o=n(31),l=n.i(r.a)((i={},i[o._27]=n.i(s.a)({getModel:function(e,t){var i=n.i(a.d)(e,{metadataItemEntityID:t});return e.get("ui").set("metadataItem",i),i.get("children")}}),i));t.a=l},function(e,t,n){"use strict";function i(e){return e.get("user").get("desktop")}var a,r=n(17),s=n.n(r),o=n(2),l=n.n(o),c=n(5),u=n.n(c),d=n(38),h=n(60),p=n(102),f=n(321),g=n(660),m=n(1536),v=n(31),y=n.i(h.a)((a={},a[v._2]=n.i(p.a)({key:"plans",getModel:i
}),a[v._3]=n.i(f.a)({key:"plans",getModel:i}),a[v._4]=n.i(g.a)({key:"unwatchedWatchLaterList",getModel:i}),a[v._5]=n.i(g.a)({key:"unwatchedRecommendedList",getModel:i}),a[v._7]=function(e){var t=i(e);t.set("updateUserError",null)},a[v._6]=function(e,t,n){var a=i(e),r=e.get("user"),o=t.avatar,c=s()(t,["avatar"]);if(a.set({isUpdatingUser:!0,updateUserError:null}),o){for(var h=o.split(","),p=h[0],f=h[1],g=p.substr(5),m=window.atob(f),v=[],y=0;y<m.length;y++)v.push(m.charCodeAt(y));var b=new Uint8Array(v),S=new window.Blob([b],{
type:g});c.avatar=S}var w=new window.FormData;l.a.each(c,function(e,t){w.append(t,e)});var M=r.server.getXHROptions(l.a.result(r,"url"),{type:"PUT",processData:!1,contentType:!1,data:w});u.a.ajax(M).done(function(e){t.avatar&&r.fetch();var n=l.a.reduce(t,function(e,t,n){return r.hasAttr(n)&&(e[n]=t),e},{});r.set(n),a.set({isUpdatingUser:!1,updateUserError:null})}).fail(function(e){var t=d.a.parseXML(e.responseText),n=l.a.isArray(t)?t:[t.error],i=l.a.groupBy(n,function(e){return e.field?e.field:"request";
});a.set({isUpdatingUser:!1,updateUserError:i})})},a[v._8]=n.i(p.a)({key:"webhooks",getModel:i}),a[v._9]=function(e){var t=i(e),n=t.get("webhooks");n.add({}),t.set("updateWebhooksError",null)},a[v._10]=function(e,t){var a=t.oldUrl,r=t.newUrl,s=i(e),o=s.get("webhooks"),l=o.findWhere({url:a});if(l){var c=o.map(function(e){var t=e.get("url");return t===a?r:t});s.set({isUpdatingWebhooks:!0,updateWebhooksError:null}),n.i(m.a)(o,c).always(function(){s.set("isUpdatingWebhooks",!1)}).fail(function(e){s.set("updateWebhooksError",e[0]);
})}},a[v._11]=function(e){var t=i(e);t.set("updateWebhooksError",null)},a[v._12]=function(e,t){var a=i(e),r=a.get("webhooks");if(!t){var s=r.filter(function(e){return e.get("url")!==t});return void r.reset(s)}a.set({isRemovingWebhooks:!0,updateWebhooksError:null});var o=r.map(function(e){return e.get("url")}).filter(function(e){return e!==t});n.i(m.a)(r,o).always(function(){a.set("isRemovingWebhooks",!1)}).fail(function(e){a.set("updateWebhooksError",e[0])})},a));t.a=y},function(e,t,n){"use strict";
function i(e,t,i){var a,r=n.i(M.a)(e,t),o=r.get("playQueueItemID"),l=e.get("decisions");e.set("decisions",s()({},l,(a={},a[o]=i,a))),t===e.get("currentIndex")&&e.set({videoPosition:i.position,videoQualityIndex:i.qualityIndex,currentDecision:i})}var a,r=n(7),s=n.n(r),o=n(2),l=n.n(o),c=n(4),u=n(60),d=n(31),h=n(14),p=n(716),f=n(268),g=n(717),m=n(271),v=n(95),y=n(459),b=n(338),S=n(149),w=n(473),M=n(351),I=n(1573),C=n(478),D=n(346),T=n.i(b.a)(),x=n.i(u.a)((a={},a[d._144]=function(e,t){var i=t.playerType,a=(t.playQueueItem,
n.i(M.b)(e,i)),r=a.get("videoPaused");a.set("videoPaused",!r),n.i(C.a)(a),n.i(h.b)("screenSaverManager")&&n.i(h.a)("screenSaverManager").toggle(!r)},a[d._145]=function(e,t){var a,r=t.playerType,o=t.index,l=n.i(M.b)(e,r),u=n.i(M.a)(l,o),d=u.get("playQueueItemID"),h=l.get("decisions"),p=h[d];p&&p.transcodeSessionID&&n.i(g.a)(p.transcodeServer,p.transcodeSessionID),l.set("decisions",s()({},h,(a={},a[d]={},a)));var b=u.get("metadataItem"),C=0,D=e.get("settings"),x=v.a.getCurrentQuality(b,D),P={},E=f.a.getPlayerDecision({
type:"video",profile:w.a.video,item:b,offset:C,fallbackServer:e.get("primaryServer"),allowDirectPlay:D.get("directPlay"),allowedAC3Containers:D.get("allowAC3")?"mp4":null,subtitlesBurnLevel:D.get("subtitlesBurnLevel"),hasFlash:!1,hasNativeHLS:n.i(I.a)(),useOffsetHLS:!1,hasDASH:n.i(I.b)(),hasStreamingMKV:n.i(I.c)(),minVersionForStreamingMKV:S.a.streamingMKV,quality:x,playbackSessionID:T,transcoder:m.a,transcoderOptions:{directStream:D.get("directStream")?1:0,subtitleSize:D.get("subtitleSize"),audioBoost:D.get("audioBoost")
},profileExtra:I.d});E.done(function(e){var t=C!==e.offset?C:0,n=v.a.getAvailableQualitiesFor(e.media,e.transcodeServer),i=e.part&&e.part.duration||b.get("duration");P={media:e.media,part:e.part,url:e.url,urlPosition:e.offset,offset:t,position:e.offset+t,duration:i,availableQualities:n,qualityIndex:x.index,subtitlesUrl:e.subtitlesUrl,directPlay:e.canDirectPlay,protocol:e.protocol,playbackSessionID:e.playbackSessionID,transcodeSessionID:e.transcodeSessionID,transcodeServer:e.transcodeServer}}).fail(function(e){
var t=n.i(y.a)(e)||n.i(c.default)("There was a problem playing this item.");P={error:t}}).always(function(){i(l,o,P)})},a[d._146]=function(e,t){var i=t.playerType,a=t.playQueueItem,r=n.i(M.b)(e,i),s=r.get("decisions");if(a){var o=a.playQueueItemID,c=s[o];c.transcodeSessionID&&n.i(g.a)(c.transcodeServer,c.transcodeSessionID),r.set({decisions:l.a.omit(s,o)})}},a[d._147]=function(e,t){var a=t.playerType,r=t.index,s=t.error,o=void 0===s?n.i(c.default)("There was a problem playing this item."):s,l=n.i(M.b)(e,a);
i(l,r,{error:o})},a[d._148]=function(e,t){var i=t.playerType,a=t.index,r=t.position,s=n.i(M.b)(e,i);a===s.get("currentIndex")&&s.set({videoPosition:r})},a[d._149]=function(e,t,i){var a=t.playerType,r=t.index,s=t.position,o=n.i(M.b)(e,a);r===o.get("currentIndex")&&o.set("videoPosition",s)},a[d._150]=function(e,t,i){var a=t.playerType,r=t.index,s=t.qualityIndex,o=n.i(M.b)(e,a),l=n.i(M.a)(o,r),c=l.get("metadataItem");o.set("videoQualityIndex",s);var u=v.a.getQualityAttribute(c),d=e.get("settings");d.save(u,s),
i(n.i(D.c)({playerType:a,index:r}))},a[d._151]=function(e,t){var i=t.playerType,a=t.index,r=t.tickCount,s=n.i(M.b)(e,i),o=s.get("currentDecision"),l=a===s.get("currentIndex"),c=s.get("videoPaused")||!l,u=o.directPlay,d=!(r%10),h=!(r%30);d&&l&&n.i(C.a)(s),h&&c&&!u&&n.i(p.a)(o.transcodeServer,o.transcodeSessionID)},a));t.a=x},function(e,t,n){"use strict";function i(e){var t=n.i(a.a)(r.a,e);return t}var a=n(1200),r=n(1532);t.a=i},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(function(e,t){
var n=t.activeFilters;return n},function(e,t){var n=t.selectedType;return n},function(e){return e.ui.libraryPage.selectedFilterKey},function(e){return e.ui.libraryPage.filterOptionQuery},function(e){return e.ui.libraryPage.selectedFilterOptions},function(e,t,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],l=t&&t.filters,u=o.a.findWhere(l,{key:i}),d=s;return a&&!function(){var e=a.trim().toLowerCase();d=d.filter(function(t){var n=t.title.toLowerCase();return n.indexOf(e)>-1})}(),
u&&!function(){var t=e[u.filter],i=d.reduce(function(e,i){var a=n.i(c.a)(t,i.key),s=a?e.selected:e.unselected;return s.push(r()({},i,{isSelected:a})),e},{selected:[],unselected:[]});d=i.selected.concat(i.unselected)}(),d})}var a=n(7),r=n.n(a),s=n(2),o=n.n(s),l=n(9),c=(n.n(l),n(697));t.a=i},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(function(e,t){var n=t.activeFilters;return n},function(e,t){var n=t.activeFilterLabel;return n},n.i(d.a)(),function(e,t,i){if(o.a.isEmpty(e)||!i)return n.i(c.default)("All");
var a=[],s=r()(e),l=s.reduce(function(t,n){var i=e[n];return i.forEach(function(e){var i=e.type===u.a?t.boolean:t.other;i.push(n)}),t},{boolean:[],other:[]}),d=l.boolean,h=l.other;if(1===d.length){var p=d[0],f=o.a.findWhere(i.filters,{filter:p,filterType:u.a});f&&a.push(f.title)}return 1===h.length&&t&&a.push(t),a.length?a.join(" "):n.i(c.default)("Filtered")})}var a=n(66),r=n.n(a),s=n(2),o=n.n(s),l=n(9),c=(n.n(l),n(4)),u=n(178),d=n(347);t.a=i},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(n.i(c.a)(),n.i(l.a)(),function(e,t){
return r.a.find(e,function(e){return e.type===o.a.GRABBER_GRAB&&e.Context.itemKey&&e.Context.itemKey===t.key})})}var a=n(2),r=n.n(a),s=n(9),o=(n.n(s),n(107)),l=n(29),c=n(184);t.a=i},function(e,t,n){"use strict";var i=n(9),a=(n.n(i),n(150)),r=n.i(i.createSelector)(a.a,function(e){return e.searchResults});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(9),s=(n.n(r),n(136)),o=void 0,l=n.i(r.createSelector)(s.a,function(e){var t=a.a.pluck(e.activeSelectionItems,"id");return o&&a.a.isEqual(o,t)?o:(o=t,
t)});t.a=l},function(e,t,n){"use strict";function i(e){return e.experienceSettings.libraryTableColumns}t.a=i},function(e,t,n){"use strict";function i(e){return e.experienceSettings.listStyles}t.a=i},function(e,t,n){"use strict";var i={NONE:100,SMALL:150,LARGE:200,HUGE:250};i.settings=[{value:i.NONE,title:"None"},{value:i.SMALL,title:"Small"},{value:i.LARGE,title:"Large"},{value:i.HUGE,title:"Huge"}],t.a=i},function(e,t,n){"use strict";var i={PENDING:"pending",ERROR:"error",PROCESSED:"processed",contexts:{
OK:"ok",FILE_UNAVAILABLE:"sourceFileUnavailable",METADATA_ERROR:"sourceFileMetadataError",PROFILE_ERROR:"clientProfileError",IO_ERROR:"ioError",TRANSCODER_ERROR:"transcoderError",UNKNOWN_ERROR:"unknownError",ANALYSIS_ERROR:"mediaAnalysisError",DOWNLOAD_FAILED:"downloadFailed",CANNOT_TRANSCODE:"cannotTranscode"}};t.a=i},function(e,t,n){"use strict";var i={PENDING:"pending",FAILED:"failed",COMPLETE:"complete",failureCodes:{INVALID_PATH:"invalidPath",DISK_FULL:"diskFull",DISK_UNWRITABLE:"diskUnwritable"
}};t.a=i},function(e,t,n){"use strict";function i(){var e=p.a.video.protocols;return!(!e||!e.hls)&&l.a.isSupported()}function a(){return!1}function r(){var e=p.a.video.directPlay,t=n.i(c.a)("appModel").get("settings"),i=h.a.canPlayType("video",e.mp4.mimeType);return t.get("dash")&&"chrome"===u.a.id&&!u.a.mobile&&i}function s(e){var t=n.i(c.a)("appModel").get("settings"),i=[];return t.get("preferAAC")&&i.push("add-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=aac)"),
"safari"===u.a.id&&"osx"===u.a.platformID&&n.i(d.a)(u.a.platformVersion,"10.11")&&i.push("append-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=ac3,eac3)"),i.length?i.join("+"):null}var o=n(944),l=n.n(o),c=n(14),u=n(32),d=n(449),h=n(266),p=n(473);t.a=i,t.b=a,t.c=r,t.d=s},function(e,t,n){"use strict";function i(e){switch(e.type){case x.PREFERENCE:return e.Setting;case x.TIMELINE:return e.TimelineEntry;case x.STATUS:return e.StatusNotification;case x.PROGRESS:return e.ProgressNotification;
case x.PLAYING:return e.PlaySessionStateNotification;case x.SYNC_STATE:return e.SyncStateNotification;case x.BACKGROUND_GENERATOR_STATE:return e.BackgroundGeneratorStateNotification;case x.VERSION_STATE:return e.VersionStateNotification;case x.BACKGROUND_PROCESSING_QUEUE:return e.BackgroundProcessingQueueEventNotification;case x.TRANSCODE_START:case x.TRANSCODE_UPDATE:case x.TRANSCODE_END:return e.TranscodeSession;case x.UPDATE_STATE_CHANGE:return e.AutoUpdateNotification;case x.REACHABILITY:return e.ReachabilityNotification;
case x.ACCOUNT:return e.AccountUpdateNotification;case x.ACTIVITY:return e.ActivityNotification;default:return{}}}var a,r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(4),u=n(34),d=n(8),h=n(39),p=n(181),f=n(38),g=n(52),m=n(14),v=n(85),y=n(183),b=n(49),S=n(209),w=n(147),M=n(72),I=n(760),C=n(277),D=n(758),T=n(276),x={PREFERENCE:"preference",TIMELINE:"timeline",STATUS:"status",PROGRESS:"progress",PLAYING:"playing",SYNC_STATE:"syncState",BACKGROUND_GENERATOR_STATE:"backgroundGeneratorState",VERSION_STATE:"versionState",
BACKGROUND_PROCESSING_QUEUE:"backgroundProcessingQueue",TRANSCODE_START:"transcodeSession.start",TRANSCODE_UPDATE:"transcodeSession.update",TRANSCODE_END:"transcodeSession.end",UPDATE_STATE_CHANGE:"update.statechange",REACHABILITY:"reachability",ACCOUNT:"account",ACTIVITY:"activity"},P=u.a.extend((a={mixins:g.a,url:function e(){var t=this.server.get("activeConnection"),n=t.id.replace(/^http/,"ws"),e=this.server.resolveUrl("/:/websockets/notifications",{connection:new w.a({uri:n}),appendToken:!0});
return e},initialize:function(e){s.a.bindAll(this,"onOpen","onClose","onError","onMessage"),this.server=e.server},open:function(){return this.socket&&this.close(),this._deferred=l.a.Deferred(),this.socket=new window.WebSocket(s.a.result(this,"url")),this.socket.onopen=this.onOpen,this.socket.onclose=this.onClose,this.socket.onerror=this.onError,this.socket.onmessage=this.onMessage,this._deferred.promise()},close:function(){this._deferred&&"pending"===this._deferred.state()&&this._deferred.reject(),
this.socket&&(this.socket.onopen=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close(),this.socket=null)},testConnection:function(){if(this.server.get("connected")){var e=this.server.get("desktop").get("update");e&&"installing"===e.get("state")&&this.server.set("connected",null),this.server.trigger("error:connection",this.server)}}},a[x.PREFERENCE]=function(e){e.key=e.id,e.server=this.server,this.server.trigger("socket:setting",e)},a[x.TIMELINE]=function(e){
if(!M.a.EPG_IDENTIFIER.test(e.identifier)){e.server=this.server;var t={server:this.server,onlyIfCached:!0},n=new S.a({key:e.sectionID},t);if(!s.a.isEmpty(n)){t.section=n,e.section=n;var i="/library/metadata/"+e.itemID,a=new b.a({key:i},t);if(s.a.isEmpty(a)||(e.item=a,a.set({metadataState:e.metadataState,mediaState:e.mediaState}),a.trigger("socket:timeline",e)),e.rootItemID){var r="/library/metadata/"+e.rootItemID,o=new b.a({key:r},t);s.a.isEmpty(o)||(o.fetch(),o.refreshChildren())}if(e.parentItemID){
var l="/library/metadata/"+e.parentItemID,c=new b.a({key:l},t);s.a.isEmpty(c)||(c.fetch(),c.refreshChildren())}n.trigger("socket:timeline",e)}e.server.trigger("socket:timeline",e),d.a.trigger("timeline",e)}},a[x.STATUS]=function(e){var t=e.title+(e.description?": "+e.description:"");if(d.a.trigger("show:status",this.server,t),this.server.trigger("socket:status",e),"LIBRARY_UPDATE"===e.notificationName){var n=m.a("appStore"),i=this.server.entityID();i&&(n.dispatch(v.fetchLibraries({serverEntityID:i
})),n.dispatch(y.b()))}},a[x.PROGRESS]=function(e){d.a.trigger("show:status",this.server,e.message),this.server.trigger("socket:status",e)},a[x.PLAYING]=function(e){var t=this;if(e.sessionKey&&!this.server.get("shared")){var i=this.server.get("desktop").get("sessions"),a=i.get(e.sessionKey);if(a&&a.get("key")===e.key)if(e.state===h.a.states.STOPPED){a.trigger("destroy",a,a.collection),a.cache.remove(a);var r=m.a("appStore"),o=this.server.entityID();o&&r.dispatch(y.b())}else{var l=a.get("Player");l&&(l.state=e.state,
a.trigger("change:Player",a,l)),a.set("viewOffset",e.viewOffset)}else{if(i.isPopulating())return;var u=i.fetch();u.done(function(){if(a=i.get(e.sessionKey)){var r=m.a("appModel"),o=r.get("user"),l=a.get("Player").title,u=a.get("User").title,h=a.get("grandparentTitle"),p=a.get("title");h&&(p=h+" - "+p);var f=n.i(c.default)("{1} started playing {2} on {3}.",u,p,l);u&&u!==o.get("username")&&d.a.trigger("show:status",t.server,f),t.server.trigger("socket:playing",s.a.extend(e,{username:u||n.i(c.default)("Unknown"),
title:p,player:l}))}})}}},a[x.SYNC_STATE]=function(e){var t=new I.a({key:e.key},{server:this.server,syncItemId:e.syncItemId,onlyIfCached:!0});if(!s.a.isEmpty(t)){var n=t.get("Media");n.forEach(function(n){var i=n.Part;i.forEach(function(n){n.transcodeState=e.syncFileState,n.transcodeStateContext=e.syncFileStateContext,n.syncState=e.syncState,n.syncStateContext=e.syncStateContext;var i=p.a.getSyncStateFromPart(n);p.a.waitingRegex.test(i)&&(n.key="placeholder"),t.trigger("change:Media",t,t.get("Media"));
})})}},a[x.BACKGROUND_GENERATOR_STATE]=function(e){var t={server:this.server,onlyIfCached:!0},n=new C.a({id:e.generatorID},t);s.a.isEmpty(n)||n.fetch()},a[x.VERSION_STATE]=function(e){var t={server:this.server,onlyIfCached:!0},n=new C.a({id:e.generatorID},t);if(!s.a.isEmpty(n)){var i=n.get("children").getCollection(),a=i.get(e.metadataItemID);a&&a.set({processingState:e.state,processingStateContext:e.stateContext})}},a[x.BACKGROUND_PROCESSING_QUEUE]=function(e){var t=new D.a([],{server:this.server,
allowInCache:!0,onlyIfCached:!0});if(!s.a.isEmpty(t)){var n=t.first();n&&n.fetch()}},a[x.TRANSCODE_START]=function(e){if("static"===e.context){var t=new T.a([],{server:this.server,allowInCache:!0,onlyIfCached:!0});s.a.isEmpty(t)||t.fetch()}},a[x.TRANSCODE_UPDATE]=function(e){if("static"===e.context){var t=new T.a([],{server:this.server,allowInCache:!0,onlyIfCached:!0});if(!s.a.isEmpty(t)){var n=t.get(e.key);n?n.set(n.parse(e)):t.fetch()}}},a[x.TRANSCODE_END]=function(e){this["transcodeSession.start"].apply(this,arguments);
},a[x.UPDATE_STATE_CHANGE]=function(e){var t=this.server.get("desktop").get("update"),n=s.a.pick(e,t.whitelistedAttrs);s.a.defaults(n,s.a.result(t,"defaults")),"downloading"===t.get("state")&&"available"===n.state&&(n.state="downloading"),t.set(n)},a[x.REACHABILITY]=function(e){var t=this.server.get("desktop").get("cloudAccount");t.fetch()},a[x.ACCOUNT]=function(e){if(this.server.set("myPlexSubscription",e.hasPlexPass),this.server.supports("reachability")){var t="/myplex/refreshReachability",n=s.a.extend(this.server.getXHROptions(t),{
type:"PUT"});l.a.ajax(n)}var i=m.a("appModel"),a=i.get("user");a.get("isSignedIn")&&d.a.trigger("discover:servers")},a[x.ACTIVITY]=function(e){var t=f.a.splitChildren(e),n=m.a("appStore"),i=this.server.entityID(),a=t.Activity||t;i&&("started"===t.event?n.dispatch(v.startActivity({serverEntityID:i,activity:a})):"updated"===t.event?n.dispatch(v.updateActivity({serverEntityID:i,activity:a})):"ended"===t.event&&n.dispatch(v.finishActivity({serverEntityID:i,activity:a})))},a.onOpen=function(e){this.server.trigger("socket:websocket",{
opened:!0}),this.trigger("open",this.server,e),this._deferred.resolve(this.server,e);var t=m.a("appStore"),n=this.server.entityID();n&&t.dispatch(v.eventConnectionOpen({serverEntityID:n,event:e}))},a.onClose=function(e){this.close(),this.server.trigger("socket:websocket",{closed:!0}),this.trigger("close",this.server,e),this._deferred.reject(this.server,e),this.testConnection()},a.onError=function(e){this.close(),this.server.trigger("socket:websocket",{error:!0}),this.trigger("error",this.server,e),
this._deferred.reject(this.server,e),this.testConnection()},a.onMessage=function(e){var t=this,n=void 0;try{n=JSON.parse(e.data)}catch(e){return}var a=!!n._elementType,r=a?s.a.first(n._children):n.NotificationContainer;r&&!function(){var e=a?n.type:r.type,o=t[e],l=void 0;l=a?s.a.isArray(r)?r:[r]:i(r),l.forEach(function(e){t.trigger("message",e),s.a.isFunction(o)&&o.call(t,e)})}()},a));t.a=P},function(e,t,n){"use strict";var i=n(2637),a=n.n(i),r=n(10),s=r.a.ItemView.extend({tagName:"span",template:a.a
});t.a=s},function(e,t,n){"use strict";var i=n(2638),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(8),c=n(27),u=n(105),d=o.a.ItemView.extend({className:"background-container",template:a.a,ui:{background:".background"},onlyAfterRender:["onTransitionIn","onTransitionOut","onImageLoad"],initialize:function(){s.a.bindAll(this,"onImageLoad"),this.image=new u.a({width:1280,height:720}),this.listenTo(l.a,"show:background",this.onTransitionIn),this.listenTo(l.a,"hide:background",this.onTransitionOut)},load:function(e){
if(!this.model)return void c.a.warn("A background cannot be loaded without a model, current key: "+this.currentKey);if(this.currentBackground!==e||!s.a.isEmpty(this.imageFilters)||this.image.hasFilters()){if(this.currentBackground=e,!e)return void this.ui.background.addClass("transition-out");this.image.server=this.model.server,this.image.setFilters(this.imageFilters),this.image.load(e,!0).done(this.onImageLoad)}},showBackground:function(e){this.ui.background.css("background-image","url("+e+")").removeClass("transition-out");
},onRender:function(){this.currentSrc&&this.showBackground(this.currentSrc)},onClose:function(){this.image.close()},onTransitionIn:function(e){return this.model&&this.model.id===e.model.id?void this.references++:(this.references=1,this.model=e.model,this.listenTo(this.model,"change:art",this.onArtChange),this.imageFilters=e.imageFilters||{},this.currentKey=this.model.get("key"),this.ui.background.toggleClass("dim",!!e.dim),void this.load(this.model.get("art")))},onTransitionOut:function(e){if(this.model&&this.model.id===e.id){
if(this.references>1)return void this.references--;this.image.cancel(),this.stopListening(this.model),this.model=null,this.currentBackground=null,this.currentSrc=null,this.ui.background.addClass("transition-out")}},onArtChange:function(e,t){this.load(t)},onImageLoad:function(e){this.currentBackground&&this.showBackground(e),this.currentSrc=e}});t.a=d},function(e,t,n){"use strict";var i=n(2639),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(8),h=n(39),p=n(59),f=n(787),g=n(1576),m=n(790),v=n(1599),y=n(1788),b=n(1787),S=n(1783),w=n(1782),M=n(1785),I=n(1784),C=n(1780),D=n(282),T=n(1513),x=c.a.Layout.extend({
el:"#plex",template:a.a,resizeDelay:200,ui:{content:"#content",shadow:".scroll-shadow"},customRegions:{background:{prepend:!0,global:!0},content:{selector:"#content",global:!0,scrollable:!0,channelName:"content"},status:{prepend:!0,global:!0},player:{append:!0,global:!0},miniPlayer:{append:!0,global:!0},navbar:{modifier:"show-nav-bar",prepend:!0,global:!0},sidebar:{modifier:"show-side-bar",append:!0},actionbar:{modifier:"show-action-bar",append:!0},breadcrumbbar:{modifier:"show-breadcrumb-bar",append:!0
},filterbar:{modifier:"show-filter-bar",append:!0},alphabar:{modifier:"show-alpha-bar",append:!0},alertbar:{modifier:"show-alert-bar",append:!0,global:!0}},openAlerts:{},initialize:function(){s.a.bindAll(this,"triggerResizeEvent","onResize","onScroll");var e=u.a("appModel");this.user=e.get("user"),this.modals=[],this.playerConstructors={full:{},mini:{}},this.playerConstructors.full[h.a.types.VIDEO]=y.a,this.playerConstructors.full[h.a.types.PHOTO]=M.a,this.playerConstructors.mini[h.a.types.VIDEO]=b.a,
this.playerConstructors.mini[h.a.types.MUSIC]=S.a,this.playerConstructors.mini[h.a.types.PHOTO]=I.a,s.a.each(s.a.keys(this.customRegions),function(e){var t=this.customRegions[e],n=t.selector||s.a.uniqueId("r");t.scrollable?this.addRegion(e,new T.a({el:n,channelName:t.channelName})):this.addRegion(e,n)},this),this.listenTo(e,{"change:authorized":this.onAuthorizedChange,"change:isFirstRun":this.onFirstRunChange}),this.listenTo(this.user,{"change:locked":this.onUserLockedChange}),this.listenTo(d.a,{
"show:loading":this.showLoading,"show:view":this.showView,"show:alert":this.showAlert,"show:bar":this.showBar,"hide:bar":this.hideBar,"show:modal":this.showModal,"hide:modal":this.hideModal,"show:player":this.showPlayer,"hide:player":this.hidePlayer,"show:playerLoading":this.showPlayerLoading,"hide:playerLoading":this.hidePlayerLoading,"start:scrollListener":this.onStartScrollListener,"stop:scrollListener":this.onStopScrollListener,"update:scrollPosition":this.onUpdateScrollPosition}),l()(window).on("resize",this.onResize);
},showCustomRegion:function(e,t){var n=this.customRegions[e],i=this[e];return this.user.get("locked")?(i.lockedView=t,void t.close()):void(n.append?i.append(t,this.$el):n.prepend?i.prepend(t,this.$el):i.show(t))},showLoading:function(){this.hideBar("alertbar"),this.user.get("locked")&&this.resetContentLockedRegions(),this.showCustomRegion("content",new f.a)},showView:function(e){l()(".tooltip").remove(),this.hideBackground(this.currentView,e),d.a.trigger("cycle:cache"),this.currentView=e,this.showCustomRegion("content",e),
this.ui.content.scrollTop(0)},showAlert:function(e){var t=e.message;if(!this.openAlerts[t]){var n=new m.a(e);this.openAlerts[t]=!0,this.listenToOnce(n,"close",function(){delete this.openAlerts[t]}),this.$el.append(n.render().el)}},showAlertBar:function(){var e=p.a.get("alerts");e&&e.length&&(p.a.set("alerts",null),this.showBar("alertbar",new D.a({alert:s.a.first(e)})))},showBar:function(e,t){var n=this.customRegions[e],i=n.modifier;i&&this.$el.addClass(this.customRegions[e].modifier),t&&this.showCustomRegion(e,t);
},hideBar:function(e,t){t||(t={});var n=this.customRegions[e],i=n.modifier;i&&this.$el.removeClass(i),t.preserve||(this[e].lockedView=null,this[e].close())},showModal:function(e){this.modals.push(e);var t=l()("body");e.transparent&&t.addClass("show-modal-transparent"),t.append(e.render().el)},hideModal:function(e){var t=s.a.indexOf(this.modals,e);t>-1&&this.modals.splice(t,1)[0].close(),e.transparent&&!s.a.findWhere(this.modals,{transparent:!0})&&l()("body").removeClass("show-modal-transparent")},
showPlayer:function(e){this.hideLoadingMiniPlayerView(),l()(".tooltip").remove();var t=this.player.currentView,n=this.miniPlayer.currentView,i=!!t&&t.playQueue===e.playQueue,a=!!n&&n.playQueue===e.playQueue;if(e.controller||!i&&!a){var r=u.a("appModel"),s=r.get("primaryPlayer"),o=s&&"cast"===s.get("protocol"),c=e.type===h.a.types.VIDEO,d=t&&t.type===h.a.types.VIDEO,p=n&&n.type===h.a.types.VIDEO,f=o||c||d||p;(f||e.isSwitchingPlayers)&&this.hidePlayer();var g=e.type===h.a.types.MUSIC,m=e.type===h.a.types.PHOTO&&s,v=e.useMiniPlayer||g||m,y=this.playerConstructors[v?"mini":"full"][e.type],b=new y(e);
v?(this.showCustomRegion("miniPlayer",b),this.$el.addClass("show-mini-player")):(this.showCustomRegion("player",b),e.type===h.a.types.VIDEO&&this.$el.addClass("show-video-player"))}},showPlayerLoading:function(){this.showCustomRegion("miniPlayer",new w.a)},hidePlayer:function(e){e?(this.miniPlayer.currentView===e&&(this.miniPlayer.close(),this.$el.removeClass("show-mini-player")),this.player.currentView===e&&(this.player.close(),this.$el.removeClass("show-video-player"))):(this.miniPlayer.close(),
this.$el.removeClass("show-mini-player"),this.player.close(),this.$el.removeClass("show-video-player"))},hideBackground:function(e,t){var n=t.model?t.model.get("grandparentTheme")||t.model.get("parentTheme")||t.model.get("theme")||t.model.get("key"):null;d.a.trigger("audio:fadeOut",{exceptKey:n}),e&&e.model&&d.a.trigger("hide:background",this.currentView.model)},hideLoadingMiniPlayerView:function(){this.miniPlayer.currentView instanceof w.a&&(this.miniPlayer.currentView.$el.remove(),this.miniPlayer.close());
},lockAll:function(){var e=s.a.map(s.a.keys(this.customRegions),function(e){return this[e]},this);s.a.each(e,function(e){e.close()},this)},resetContentLockedRegions:function(){s.a.each(s.a.keys(this.customRegions),function(e){var t=this.customRegions[e];if(!t.global){var n=this[e];n.lockedView&&(n.lockedView=null)}},this)},restoreAll:function(){var e=u.a("appModel");e.get("authorized")&&this.showBar("navbar",new C.a({model:e}),{prepend:!0}),this.showCustomRegion("background",this.backgroundView),
this.showCustomRegion("status",new v.a)},triggerResizeEvent:function(){d.a.trigger("resize")},onRender:function(){this.backgroundView=new g.a,this.restoreAll()},onAuthorizedChange:function(e,t){if(t){var n=u.a("appModel");this.showBar("navbar",new C.a({model:n}),{prepend:!0});var i=this.user.get("locked");i!==!1&&null!==i||this.showAlertBar()}else this.hideBar("navbar"),this.hidePlayer(),d.a.trigger("navigate:refresh")},onFirstRunChange:function(e,t){this.$el.toggleClass("show-first-run",t)},onUserLockedChange:function(e,t){
t?this.lockAll():t!==!1&&null!==t||(null===t&&(this.backgroundView=new g.a),this.restoreAll())},onResize:function(){this.resizeTimeout=clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(this.triggerResizeEvent,this.resizeDelay)},onStartScrollListener:function(){this.ui.content.on("scroll",this.onScroll)},onStopScrollListener:function(){this.ui.content.off("scroll",this.onScroll),this.ui.shadow.addClass("transition-out")},onScroll:function(){var e=this.ui.content.scrollTop();this.ui.shadow.toggleClass("transition-out",e<10);
},onUpdateScrollPosition:function(e){this.ui.content[0].scrollTop=e}});t.a=x},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(2640),s=n.n(r),o=n(10),l=o.a.ItemView.extend({template:s.a,className:"download-server-pane",serializeData:function(){var e=this.model.toJSON();return a()({shouldUseDropup:e.releases.length>4},e)}});t.a=l},function(e,t,n){"use strict";var i=n(2641),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(8),c=n(21),u=10,d=1,h=-1,p=o.a.ItemView.extend({tagName:"span",className:"rating heart-rating",
template:a.a,disabled:!0,events:{"click .like-meh-btn":"onLikeMehClick","click .dislike-btn":"onDislikeClick"},bindings:{".like-meh-btn":{modelAttribute:"userRating",formatter:function(e,t){var n=this.model.get("userRating")===u;t.toggleClass("user-rating",n)}},".like-meh-btn > i":{modelAttribute:"userRating",formatter:function(e,t){var n=this.model.get("userRating")===u;t.toggleClass("plex-icon-heart",n),t.toggleClass("plex-icon-heart-empty",!n)}},".dislike-btn":{modelAttribute:"userRating",formatter:function(e,t){
var n=this.model.get("userRating")===d;t.toggleClass("user-rating",n)}}},persistRating:function(e){return c.a.execute("rate",{item:this.model,rating:e})},onUserRatingChange:function(e,t){this.render()},onLikeMehClick:function(e){this.persistRating(this.model.get("userRating")===u?h:u)},onDislikeClick:function(){return this.model.get("userRating")===d?void this.persistRating(h):void this.persistRating(d).done(s.a.bind(function(){var e=this.model.server.get("playQueueManager"),t=e.getFor(this.model);
t.fetch().then(function(){l.a.trigger("shortcut:skipNext")})},this))}});t.a=p},function(e,t,n){"use strict";var i=n(2642),a=n.n(i),r=n(10),s=n(14),o=n(32),l=r.a.ItemView.extend({template:a.a,initialize:function(){var e=s.a("appModel");this.listenTo(e,"change:primaryServer",this.render),this.listenTo(e.get("user"),"change:signedIn",this.render)},serializeData:function(){var e=s.a("appModel"),t=e.get("user"),n=e.get("primaryServer"),i={host:window.location.host,userAgent:window.navigator.userAgent,
browser:o.a,user:t.toJSON(),hasPlexPass:t.hasPlexPass(),cloudServer:t.server.toJSON(),cloudServerUrl:t.server.url()};return n&&(i.primaryServer=n.toJSON(),i.primaryServerUrl=n.url()),i}});t.a=l},function(e,t,n){"use strict";var i=n(2644),a=n.n(i),r=n(10),s=r.a.ItemView.extend({className:"logs-container",template:a.a,ui:{textarea:"textarea"},collectionEvents:{add:"onAdd"},onlyAfterRender:["onAdd"],serializeData:function(){return{logs:this.collection.toJSONString()}},onAdd:function(e,t){this.ui.textarea.text(this.collection.toJSONString());
}});t.a=s},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(46)),o=n.n(s),l=n(15),c=n(14),u=n(67),d=n(65),h=n(114),p=n(197),f=n(198),g=n(2095),m=n(200),v=h.a.extend({mountReact:function(){var e=n.i(c.a)("appStore"),t=this.options.selectedServerID,i=this.options.query,r=n.i(d.a)(u.f,this.options.serverID);o.a.render(a()(l.a,{store:e},void 0,a()(m.a,{serverEntityID:r})),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(p.a,{machineIdentifier:this.options.selectedServerID
},void 0,a()(f.a,{},void 0,a()(g.a,{machineIdentifier:t,serverEntityID:r,query:i})))),this.ui.page[0])}});t.a=v},function(e,t,n){"use strict";var i=n(2645),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(14),c=o.a.ItemView.extend({className:"sign-in-form",template:a.a,validationFields:["username","email","password","confirm"],ui:{submitBtn:"[type=submit]",signInBtn:".sign-in-btn",signUpBtn:".sign-up-btn",username:".username-group",email:".email-group",password:".password-group",confirm:".confirm-group"},events:{
"click .sign-in-btn":"onSignInClick","click .sign-up-btn":"onSignUpClick","blur input":"onInputBlur","submit form":"onSubmit"},initialize:function(e){this.isFirstRun=e.isFirstRun,this.showRememberMe=e.showRememberMe,l.a("metrics").trackView({page:"signIn",firstRun:this.isFirstRun})},serializeData:function(){return{showRememberMe:this.showRememberMe}},validateAll:function(e,t,n){var i=!0;return t||(t=this.validationFields),s.a.each(t,s.a.bind(function(t){var a=e[t];this.validate(a,n[t],n)||(i=!1)},this)),
i},validate:function(e,t,n){var i,a=e.id;if(s.a.indexOf(this.validationFields,a)<0)return!0;var r=this.ui[a];return i="confirm"===e.id?t===e.form.password.value:!!t,r.toggleClass("has-error",!i),i},onSignInClick:function(e){e.preventDefault(),this.ui.signInBtn.addClass("selected"),this.ui.signUpBtn.removeClass("selected"),this.$el.addClass("sign-in-form"),this.$el.removeClass("sign-up-form"),l.a("metrics").trackView({page:"signIn",firstRun:this.isFirstRun})},onSignUpClick:function(e){e.preventDefault(),
this.ui.signInBtn.removeClass("selected"),this.ui.signUpBtn.addClass("selected"),this.$el.removeClass("sign-in-form"),this.$el.addClass("sign-up-form"),l.a("metrics").trackView({page:"signup",firstRun:this.isFirstRun})},onInputBlur:function(e){var t=e.target,n="checkbox"===t.type?t.checked:t.value;this.validate(t,n)}});t.a=c},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(46)),o=n.n(s),l=n(15),c=n(14),u=n(114),d=n(543),h=n(1989),p=a()(d.a,{selectedKey:"account"}),f=a()(h.a,{}),g=u.a.extend({
mountReact:function(){var e=n.i(c.a)("appStore");o.a.render(a()(l.a,{store:e},void 0,p),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,f),this.ui.page[0])}});t.a=g},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(46)),o=n.n(s),l=n(15),c=n(14),u=n(114),d=n(543),h=n(2104),p=a()(d.a,{selectedKey:"plex-cloud"}),f=a()(h.a,{}),g=u.a.extend({mountReact:function(){var e=n.i(c.a)("appStore");o.a.render(a()(l.a,{store:e},void 0,p),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e
},void 0,f),this.ui.page[0])}});t.a=g},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(46)),o=n.n(s),l=n(15),c=n(14),u=n(114),d=n(543),h=n(2110),p=a()(d.a,{selectedKey:"webhooks"}),f=a()(h.a,{}),g=u.a.extend({mountReact:function(){var e=n.i(c.a)("appStore");o.a.render(a()(l.a,{store:e},void 0,p),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,f),this.ui.page[0])}});t.a=g},function(e,t,n){"use strict";var i=n(2648),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(4),d=n(8),h=n(20),p=n(21),f=n(492),g=n(491),m=n(160),v=n(225),y=n(806),b=n(807),S=n(288),w=n(287),M=n(286),I=n(189),C=["episode","movie","clip","userPlaylistItem"],D={
preventDefault:!0,stopPropagation:!1},T=c.a.ItemView.extend({className:"action-bar",template:a.a,ui:{primaryActions:".action-bar-nav",secondaryActions:".dropdown-menu",playBtn:".play-btn",playVersionBtn:".play-version-btn",playAllBtn:".play-all-btn",playUnwatchedBtn:".play-unwatched-btn",playShuffledBtn:".play-shuffled-btn",playTrailerBtn:".play-trailer-btn",playNextBtn:".play-next-btn",addToQueueBtn:".add-to-queue-btn",addToPlaylistBtn:".add-to-playlist-btn",mergeBtn:".merge-btn",secondaryDivider:".secondary-divider",
editBtn:".edit-btn",refreshBtn:".refresh-btn",analyzeBtn:".analyze-btn",markWatchedBtn:".mark-watched-btn",markUnwatchedBtn:".mark-unwatched-btn",syncBtn:".sync-btn",convertBtn:".convert-btn",watchLaterBtn:".watch-later-btn",shareBtn:".share-btn",recommendBtn:".recommend-btn",deleteBtn:".delete-btn",deleteVersionsBtn:".delete-versions-btn",deleteFromUserPlaylistBtn:".delete-from-user-playlist-btn",infoBtn:".info-btn"},events:{"click .download-btn":"onDownloadClick"},triggers:{"click .play-btn":"play",
"click .play-version-btn":s.a.extend({event:"playVersion"},D),"click .play-all-btn":s.a.extend({event:"play"},D),"click .play-unwatched-btn":"playUnwatched","click .play-shuffled-btn":"playShuffled","click .play-trailer-btn":"playTrailer","click .edit-btn":"edit","click .refresh-btn":"refresh","click .analyze-btn":s.a.extend({event:"analyze"},D),"click .mark-watched-btn":"markWatched","click .mark-unwatched-btn":"markUnwatched","click .match-btn":s.a.extend({event:"fixMatch"},D),"click .select-btn":"select",
"click .deselect-btn":"deselect","click .fix-match-btn":s.a.extend({event:"fixMatch"},D),"click .unmatch-btn":s.a.extend({event:"unmatch"},D),"click .split-apart-btn":s.a.extend({event:"splitApart"},D),"click .merge-btn":s.a.extend({event:"merge"},D),"click .sync-btn":"sync","click .convert-btn":s.a.extend({event:"convert"},D),"click .watch-later-btn":s.a.extend({event:"watchLater"},D),"click .share-btn":s.a.extend({event:"share"},D),"click .recommend-btn":s.a.extend({event:"recommend"},D),"click .delete-btn":s.a.extend({
event:"delete"},D),"click .delete-versions-btn":s.a.extend({event:"deleteVersions"},D),"click .delete-from-user-playlist-btn":s.a.extend({event:"deleteFromUserPlaylist"},D),"click .info-btn":s.a.extend({event:"info"},D),"click .play-next-btn":s.a.extend({event:"playNext"},D),"click .add-to-queue-btn":s.a.extend({event:"addToQueue"},D),"click .add-to-playlist-btn":"addToPlaylist"},onlyAfterRender:["onPlay","onPlayUnwatched","onPlayShuffled","onPlayTrailer","onEdit","onRefresh","onAnalyze","onMarkWatched","onMarkUnwatched","onSync","onWatchLater","onShare","onRecommend","onDelete","onDeleteFromUserPlaylist","onInfo","onPlayNext","onAddToQueue","onAddToPlaylist","onMerge","updateDropdown"],
initialize:function(e){this.type=this.model.get("type"),this.mediaActions=e.mediaActions,this.listenTo(this.mediaActions,"change",s.a.throttle(this.updateDropdown,50)),this.listenTo(this.mediaActions,"change:selectedItems",this.onSelectedItemsChange),this.listenTo(d.a,{"shortcut:play":this.onPlay,"shortcut:edit":this.onEdit,"shortcut:refresh":this.onRefresh,"shortcut:analyze":this.onAnalyze,"shortcut:markWatched":this.onMarkWatched,"shortcut:markUnwatched":this.onMarkUnwatched,"shortcut:sync":this.onSync,
"shortcut:delete":this.onDelete,"shortcut:info":this.onInfo}),this.listenTo(d.a,"shortcut:play",this.onPlayUnwatched),this.listenTo(d.a,"shortcut:delete",this.onDeleteFromUserPlaylist)},serializeData:function(){var e=s.a.extend({},this.mediaActions.attributes);if(e.defaultLinkTarget="_self",e.isSingleItem=s.a.contains(C,this.type),this.mediaActions.get("showDownload")){e.downloadUrl=this.model.getDownloadUrl();var t=this.model.getFilepath();t&&(e.downloadName=h.getLastSegment(t))}return e},updateDropdown:function(){
var e=this.ui.secondaryActions.find("a:not(.hidden)"),t=e.hasClass("secondary-only"),n=e.length>2||t;if(this.$el.toggleClass("show-secondary-actions-dropdown",n),n){var i=this.ui.secondaryDivider,a=i.prevAll(":not(:has(.hidden))").length,r=i.nextAll(":not(:has(.hidden))").length;i.toggleClass("hidden",!a||!r)}},bindingsModel:"mediaActions",bindings:{".play-btn":{modelAttribute:"showPlay",manual:!0,autohide:!0},".play-version-btn":{modelAttribute:"showPlayVersion",manual:!0,autohide:!0},".play-all-btn":{
modelAttribute:"showPlayAll",manual:!0,autohide:!0},".play-unwatched-btn":{modelAttribute:"showPlayUnwatched",manual:!0,autohide:!0},".play-shuffled-btn":{modelAttribute:"showShuffle",manual:!0,autohide:!0},".play-next-btn":{modelAttribute:"showQueue",manual:!0,autohide:!0},".add-to-queue-btn":{modelAttribute:"showQueue",manual:!0,autohide:!0},".play-trailer-btn":{modelAttribute:"showPlayTrailer",manual:!0,autohide:!0},".add-to-playlist-btn":{modelAttribute:"showAddToPlaylist",manual:!0,autohide:!0
},".edit-btn":{modelAttribute:"showEdit",manual:!0,autohide:!0},".refresh-btn":{modelAttribute:"showRefresh",manual:!0,autohide:!0},".analyze-btn":{modelAttribute:"showAnalyze",manual:!0,autohide:!0},".mark-watched-btn":{modelAttribute:"showMarkWatched",manual:!0,autohide:!0},".mark-unwatched-btn":{modelAttribute:"showMarkUnwatched",manual:!0,autohide:!0},".match-btn":{modelAttribute:"showMatch",manual:!0,autohide:!0},".select-btn":{modelAttribute:"selecting",manual:!0,autohide:function(e){return!e&&this.mediaActions.get("showSelect");
}},".deselect-btn":{modelAttribute:"selecting",manual:!0,autohide:!0},".fix-match-btn":{modelAttribute:"showFixMatch",manual:!0,autohide:!0},".unmatch-btn":{modelAttribute:"showUnmatch",manual:!0,autohide:!0},".merge-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showMerge"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showMerge")&&!this.model.get("hasSelectedFolder")}},".split-apart-btn":{modelAttribute:"showSplitApart",manual:!0,autohide:!0},".sync-btn":{
modelAttribute:"showSync",manual:!0,autohide:!0},".convert-btn":{modelAttribute:"showConvert",manual:!0,autohide:!0},".download-btn":{modelAttribute:"showDownload",manual:!0,autohide:!0},".watch-later-btn":{modelAttribute:"showWatchLater",manual:!0,autohide:!0},".share-btn, .recommend-btn":{modelAttribute:"showShare",manual:!0,autohide:!0},".delete-btn":{modelAttribute:"showDelete",manual:!0,autohide:!0},".delete-versions-btn":{modelAttribute:"showDeleteVersions",manual:!0,autohide:!0},".delete-from-user-playlist-btn":{
modelAttribute:"showDeleteFromUserPlaylist",manual:!0,autohide:!0},".info-btn":{modelAttribute:"showInfo",manual:!0,autohide:!0}},onRender:function(){this.$el.tooltip({selector:".nav > li > a",container:"body",placement:"right"}),this.updateDropdown()},onPlay:function(){this.ui.playBtn.isDisabled()&&this.ui.playAllBtn.isDisabled()||p.a.execute("playMedia",{items:this.mediaActions.getActionTargets()})},onPlayVersion:function(){this.ui.playVersionBtn.isDisabled()||d.a.trigger("show:modal",new f.a({
model:this.model}))},onDownloadClick:function(e){this.model.get("Media").length>1&&(e.preventDefault(),d.a.trigger("show:modal",new g.a({model:this.model})))},onPlayUnwatched:function(){this.ui.playUnwatchedBtn.isDisabled()||p.a.execute("playMedia",{items:this.mediaActions.getActionTargets(),unwatched:!0})},onPlayShuffled:function(){this.ui.playShuffledBtn.isDisabled()||p.a.execute("playMedia",{items:this.mediaActions.getActionTargets(),shuffle:!0})},onPlayTrailer:function(){if(!this.ui.playTrailerBtn.isDisabled()){
var e=this.model.get("extras"),t=e.get("metadataItems"),n=t.findWhere({key:this.model.get("primaryExtraKey")});p.a.execute("playMedia",{items:[n]})}},onEdit:function(){this.ui.editBtn.isDisabled()||(this.model.get("isPlaylist")?d.a.trigger("show:modal",new y.a({model:this.model})):d.a.trigger("show:modal",new v.a({mediaActions:this.mediaActions})))},onRefresh:function(){this.ui.refreshBtn.isDisabled()||p.a.execute("refreshMetadata",{items:this.mediaActions.getActionTargets()})},onAnalyze:function(){
this.ui.analyzeBtn.isDisabled()||p.a.execute("analyzeItems",{items:this.mediaActions.getActionTargets()})},onMarkWatched:function(){this.ui.markWatchedBtn.isDisabled()||p.a.execute("markWatched",{items:this.mediaActions.getActionTargets()})},onMarkUnwatched:function(){this.ui.markUnwatchedBtn.isDisabled()||p.a.execute("markUnwatched",{items:this.mediaActions.getActionTargets()})},onSelect:function(){this.mediaActions.set("selecting",!0)},onDeselect:function(){this.mediaActions.set("selecting",!1);
},onFixMatch:function(){d.a.trigger("show:modal",new b.a({model:this.model}))},onUnmatch:function(){p.a.execute("unmatch",{item:this.model})},onSplitApart:function(){p.a.execute("splitApart",{item:this.model})},onSync:function(){this.ui.syncBtn.isDisabled()||p.a.execute("showSyncModal",{item:this.model,items:this.mediaActions.getActionTargets()})},onConvert:function(){d.a.trigger("show:modal",new I.a({item:this.model,items:this.mediaActions.getActionTargets()}))},onWatchLater:function(){this.ui.watchLaterBtn.isDisabled()||p.a.execute("watchLater",{
item:this.model})},onShare:function(){this.ui.shareBtn.isDisabled()||d.a.trigger("show:modal",new S.a({model:this.model}))},onRecommend:function(){this.ui.recommendBtn.isDisabled()||d.a.trigger("show:modal",new w.a({model:this.model}))},onDelete:function(){this.ui.deleteBtn.isDisabled()||(this.model.get("playlistType")?p.a.execute("deletePlaylist",{item:this.model}):p.a.execute("deleteItems",{items:this.mediaActions.getActionTargets()}))},onDeleteVersions:function(){this.ui.deleteBtn.isDisabled()||p.a.execute("deleteVersions",{
item:this.model})},onDeleteFromUserPlaylist:function(){if(!this.ui.deleteFromUserPlaylistBtn.isDisabled()){var e=this.model.destroy();e.done(s.a.bind(function(){l()(".tooltip").remove(),d.a.trigger("navigate","userPlaylist",{key:this.model.userPlaylistKey})},this))}},onInfo:function(){this.ui.infoBtn.isDisabled()||d.a.trigger("show:modal",new M.a({model:this.model}))},onPlayNext:function(){this.ui.playNextBtn.isDisabled()||p.a.execute("queueMedia",{item:this.model,next:!0})},onAddToQueue:function(){
this.ui.addToQueueBtn.isDisabled()||p.a.execute("queueMedia",{item:this.model,next:!1})},onAddToPlaylist:function(){this.ui.addToPlaylistBtn.isDisabled()||d.a.trigger("show:modal",new m.a({model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onMerge:function(){if(!this.ui.mergeBtn.isDisabled()){var e=this.mediaActions.getActionTargets(),t=s.a.first(e),n=e.slice(1);p.a.execute("merge",{item:t,items:n})}},onSelectedItemsChange:function(e,t){
var i=t&&t.length?n.i(u.default)("Play selected"):n.i(u.default)("Play All");this.ui.playBtn.attr("data-original-title",i)}});t.a=T},function(e,t,n){"use strict";var i=n(2649),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(8),c=n(1838),u=o.a.Layout.extend({className:"playlists-side-bar-container",template:a.a,regions:{sidebar:".side-bar"},triggers:{"click .options-btn":"toggleSidebar"},onlyAfterRender:["onToggleSidebar"],initialize:function(){this.listenTo(l.a,{"shortcut:sidebar":this.onToggleSidebar})},onRender:function(){
this.$el.tooltip({selector:".nav > li > a",container:"body",placement:"right"}),this.sidebar.append(new c.a({model:this.model}),this.$el)},onToggleSidebar:function(){s()(".tooltip").remove();var e=this.sidebar.currentView;e.hidden?e.open():e.hide()}});t.a=u},function(e,t,n){"use strict";var i=n(2650),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(4),h=n(8),p=n(21),f=n(1839),g=n(1743),m=n(160),v=n(225),y=n(188),b=n(189),S={preventDefault:!0,stopPropagation:!1},w=c.a.Layout.extend({className:"section-side-bar-container",
template:a.a,ui:{actionBar:".action-bar",secondaryActions:".dropdown-menu",playBtn:".play-btn",playShuffledBtn:".play-shuffled-btn",refreshBtn:".refresh-btn",analyzeBtn:".analyze-btn",markWatchedBtn:".mark-watched-btn",markUnwatchedBtn:".mark-unwatched-btn",addToCollectionBtn:".add-to-collection-btn",addToPlaylistBtn:".add-to-playlist-btn",mergeBtn:".merge-btn",syncBtn:".sync-btn",deleteBtn:".delete-btn"},regions:{sidebar:".side-bar"},triggers:{"click .options-btn":"toggleSidebar","click .play-btn":"play",
"click .play-shuffled-btn":"playShuffled","click .select-btn":"select","click .deselect-btn":"deselect","click .edit-btn":"edit","click .refresh-btn":s.a.extend({event:"refresh"},S),"click .analyze-btn":s.a.extend({event:"analyze"},S),"click .mark-watched-btn":"markWatched","click .mark-unwatched-btn":"markUnwatched","click .add-to-collection-btn":s.a.extend({event:"addToCollection"},S),"click .add-to-playlist-btn":"addToPlaylist","click .merge-btn":s.a.extend({event:"merge"},S),"click .sync-btn":"sync",
"click .convert-btn":s.a.extend({event:"convert"},S),"click .delete-btn":s.a.extend({event:"delete"},S)},initialize:function(e){this.bindAllWhenRendered("updateDropdown");var t=u.a("appModel");this.mediaActions=e.mediaActions,this.type=this.model.get("type"),this.multiuser=this.model.server.get("multiuser"),this.signedIn=t.get("user").get("signedIn"),this.listenTo(this.mediaActions,"change:selectedItems",this.onSelectedItemsChange),this.listenTo(h.a,{"shortcut:sidebar":this.onToggleSidebar,"shortcut:play":this.onPlay,
"shortcut:refresh":this.onRefresh,"shortcut:analyze":this.onAnalyze,"shortcut:markWatched":this.onMarkWatched,"shortcut:markUnwatched":this.onMarkUnwatched,"shortcut:sync":this.onSync,"shortcut:edit":this.onEdit,"shortcut:delete":this.onDelete})},updateDropdown:function(){var e=this.ui.secondaryActions.find("a:not(.hidden)"),t=e.hasClass("secondary-only"),n=e.length>2||t;this.ui.actionBar.toggleClass("show-secondary-actions-dropdown",n)},bindingsModel:"mediaActions",bindings:{".play-btn":{modelAttribute:"showPlay",
manual:!0,autohide:!0},".play-shuffled-btn":{modelAttribute:"showShuffle",manual:!0,autohide:!0},".select-btn":{modelAttribute:"selecting",modelListeners:["selecting","showSelect"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showSelect")&&!e}},".deselect-btn":{modelAttribute:"selecting",manual:!0,autohide:!0},".edit-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showEdit"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showEdit")&&!(!e||!e.length);
}},".refresh-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showRefresh"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showRefresh")&&(e&&e.length&&!this.model.get("hasSelectedFolder"))}},".analyze-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showAnalyze"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showAnalyze")&&(e&&e.length&&!this.model.get("hasSelectedFolder"))}},".mark-watched-btn":{modelAttribute:"showMarkWatched",
manual:!0,autohide:!0},".mark-unwatched-btn":{modelAttribute:"showMarkUnwatched",manual:!0,autohide:!0},".add-to-collection-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showAddToCollection"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showAddToCollection")&&(e&&e.length&&!this.model.get("hasSelectedFolder"))}},".add-to-playlist-btn":{modelAttribute:"showAddToPlaylist",manual:!0,autohide:!0},".merge-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showMerge"],
manual:!0,autohide:function(e){return!!this.mediaActions.get("showMerge")&&!this.model.get("hasSelectedFolder")}},".sync-btn":{modelAttribute:"showSync",manual:!0,autohide:!0},".convert-btn":{modelAttribute:"showConvert",manual:!0,autohide:!0},".delete-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showDelete"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showDelete")&&(e&&e.length&&!this.model.get("hasSelectedFolder"))}}},onRender:function(){var e=new f.a({
model:this.model,mediaActions:this.mediaActions});this.sidebar.append(e,this.$el),this.$el.tooltip({selector:".nav > li > a",container:"body",placement:"right"}),this.updateDropdown()},onClose:function(){this.mediaActions.stopListening(),this.mediaActions.deselectAll()},onSelectedItemsChange:function(e,t){if(t){var i=t&&t.length?n.i(d.default)("Play selected"):n.i(d.default)("Play All");this.ui.playBtn.attr("data-original-title",i),s.a.defer(this.updateDropdown)}},onToggleSidebar:function(){l()(".tooltip").remove();
var e=this.sidebar.currentView;e.hidden?e.open():e.hide()},onPlay:function(){this.ui.playBtn.isDisabled()||p.a.execute("playMedia",{items:this.mediaActions.getActionTargets()})},onPlayShuffled:function(){this.ui.playShuffledBtn.isDisabled()||p.a.execute("playMedia",{items:this.mediaActions.getActionTargets(),shuffle:!0})},onSelect:function(){this.mediaActions.set("selecting",!0)},onDeselect:function(){this.mediaActions.set("selecting",!1)},onEdit:function(){if(this.model.server.get("isFullOwnedServer")){
var e=this.mediaActions.get("selectedItems");if(e.length){if(e.length>1&&!e[0].server.supports("batchEdit"))return;h.a.trigger("show:modal",new v.a({mediaActions:this.mediaActions}))}else h.a.trigger("show:modal",new y.a({server:this.model.server,model:this.model}))}},onRefresh:function(){return this.ui.refreshBtn.isDisabled()?void p.a.execute("updateLibrary",{section:this.model}):void p.a.execute("refreshMetadata",{items:this.mediaActions.getActionTargets()})},onAnalyze:function(){return this.ui.analyzeBtn.isDisabled()?void p.a.execute("analyzeSection",{
section:this.model}):void p.a.execute("analyzeItems",{items:this.mediaActions.getActionTargets()})},onMarkWatched:function(){this.ui.markWatchedBtn.isDisabled()||p.a.execute("markWatched",{items:this.mediaActions.getActionTargets()}).then(s.a.bind(function(){this.mediaActions.updateAll()},this))},onMarkUnwatched:function(){this.ui.markUnwatchedBtn.isDisabled()||p.a.execute("markUnwatched",{items:this.mediaActions.getActionTargets()}).then(s.a.bind(function(){this.mediaActions.updateAll()},this))},
onAddToCollection:function(){this.ui.addToCollectionBtn.isDisabled()||h.a.trigger("show:modal",new g.a({items:this.mediaActions.getActionTargets()}))},onAddToPlaylist:function(e){if(!this.ui.addToPlaylistBtn.isDisabled()){var t=this.mediaActions.getActionTargets();h.a.trigger("show:modal",new m.a({model:t[0],items:t,title:this.mediaActions.getActionTargetsTitle()}))}},onMerge:function(){if(!this.ui.mergeBtn.isDisabled()){var e=this.mediaActions.getActionTargets(),t=s.a.first(e),n=e.slice(1);p.a.execute("merge",{
item:t,items:n})}},onSync:function(){if(!this.ui.syncBtn.isDisabled()){var e=this.mediaActions.getActionTargets();p.a.execute("showSyncModal",{item:e[0],items:e})}},onConvert:function(){var e=this.mediaActions.getActionTargets();h.a.trigger("show:modal",new b.a({item:e[0],items:e}))},onDelete:function(){this.ui.deleteBtn.isDisabled()||p.a.execute("deleteItems",{items:this.mediaActions.getActionTargets(),skipRedirect:!0})}});t.a=w},function(e,t,n){"use strict";var i=n(2651),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(276),c=n(1591),u=n(1595),d=n(1592),h=n(1593),p={
alerts:c.a,sync:u.a,conversion:d.a,nowPlaying:h.a},f=o.a.Layout.extend({className:"container",template:a.a,ui:{conversionBadge:".conversion-btn > .badge",nowPlayingBadge:".now-playing-btn > .badge"},regions:{container:".activity-container"},bindings:{".sync-btn":{autohide:function(){return this.model.get("sync")}},".conversion-btn":{autohide:function(){return this.model.get("backgroundProcessing")}}},initialize:function(e){this.options=e,this.subset=e.subset||"alerts";var t=new l.a([],{server:this.model,
persistInCache:!0});this.subsets={conversion:t,nowPlaying:this.model.get("desktop").get("sessions")},this.listenTo(this.subsets.conversion,"reset add remove",this.updateBadges),this.listenTo(this.subsets.nowPlaying,"reset add remove",this.updateBadges)},serializeData:function(){return{subset:this.subset}},updateBadges:function(){var e={conversion:this.subsets.conversion.length,nowPlaying:this.subsets.nowPlaying.length};s.a.each(s.a.keys(e),function(t){var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t]);
},this)},onRender:function(){var e=p[this.subset];this.container.show(new e(this.options)),this.updateBadges()}});t.a=f},function(e,t,n){"use strict";var i=n(2652),a=n.n(i),r=n(10),s=n(14),o=n(4),l=n(8),c=n(283),u=n(1657),d=r.a.Layout.extend({className:"alerts-container",template:a.a,ui:{pageCount:".page-count",previousBtn:".previous-btn",nextBtn:".next-btn"},regions:{serverDropdown:".filter-bar",list:".alert-list-container"},modelEvents:{"change:shared":"onSharedChange"},collectionEvents:{add:"onAlertAdd"
},events:{"click .previous-btn":"onPreviousClick","click .next-btn":"onNextClick"},onlyAfterRender:["onAlertAdd"],initialize:function(){var e=s.a("appModel");this.shared=this.model.get("shared"),this.page=1,this.listCollection=this.collection.clone(this.collection.page(this.page,{reverse:!0})),this.listCollection.stopListening(),e.set("primaryServer",this.model),this.listenTo(e,"change:primaryServer",this.onPrimaryServerChange)},serializeData:function(){var e=this.collection.pages();return{shared:this.shared,
page:this.page,pages:e,enablePrevious:this.page>1,enableNext:this.page<e}},updatePages:function(){var e=this.collection.pages();this.ui.pageCount.text(n.i(o.default)("{1} of {2}",this.page,e)),this.ui.previousBtn.toggleClass("disabled",this.page<2),this.ui.nextBtn.toggleClass("disabled",this.page>=e)},updateList:function(){this.listCollection.reset(this.collection.page(this.page,{reverse:!0}))},onRender:function(){this.serverDropdown.append(new c.a),this.shared||this.list.append(new u.a({collection:this.listCollection
}))},onPrimaryServerChange:function(e,t){t&&l.a.trigger("navigate","alerts",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()},onAlertAdd:function(e,t){this.shared||(this.updatePages(),this.updateList())},onPreviousClick:function(e){e.preventDefault(),this.ui.previousBtn.isDisabled()||(this.page--,this.updatePages(),this.updateList())},onNextClick:function(e){e.preventDefault(),this.ui.nextBtn.isDisabled()||(this.page++,this.updatePages(),this.updateList())}});t.a=d},function(e,t,n){
"use strict";var i=n(2653),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(14),c=n(4),u=n(8),d=n(149),h=n(631),p=n(1109),f=n(283),g=n(1666),m=n(1667),v=o.a.Layout.extend({className:"conversion-container",template:a.a,ui:{filterBar:".filter-bar",pauseBtn:".pause-btn",resumeBtn:".resume-btn",divider:".conversion-queue-divider"},regions:{filterBar:".filter-bar",upNextList:".conversion-queue-up-next-list-region",afterUpNextList:".conversion-queue-after-up-next-list-region",emptyRegion:".conversion-queue-empty-region"
},events:{"click .pause-btn":"onTogglePauseClick","click .resume-btn":"onTogglePauseClick"},initialize:function(e){var t=l.a("appModel");this.playQueue=e.playQueue,this.transcodeJobs=e.transcodeJobs,this.generators=e.generators,this.items=this.playQueue.get("collection"),this.upNextItems=new h.a(this.items,{playQueue:this.playQueue,includeSelectedItem:!0}),this.afterUpNextItems=new p.a(this.items,{playQueue:this.playQueue}),this.settings=this.model.get("desktop").get("settings"),this.pausedSetting=this.settings.get("BackgroundQueueIdlePaused"),
t.set("primaryServer",this.model),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(this.upNextItems,"reset add remove",this.onUpNextChange),this.listenTo(this.afterUpNextItems,"reset add remove",this.onAfterUpNextChange)},serializeData:function(){return{serverID:this.model.id,shouldShowList:this.model.supports("streamReady"),shouldShowDivider:!!this.afterUpNextItems.length,minServerVersion:d.a.streamReady,hasPausedSetting:!!this.pausedSetting,isPaused:this.pausedSetting&&this.pausedSetting.get("value"),
errorMessage:this.getErrorMessage()}},toggleEmptyView:function(){var e=this.upNextItems.length+this.afterUpNextItems.length>0;e?this.emptyRegion.close():this.emptyRegion.show(new m.a({model:this.model})),this.$el.toggleClass("is-empty",!e),this.ui.filterBar.toggleClass("hide-actions",!e)},getErrorMessage:function(){var e=this.generators.reduce(function(e,t){var n=t.get("status");return"failed"===n.get("state")?e+=Math.max(n.get("itemsCount"),1):n.get("itemsFailedCount")&&(e+=n.get("itemsFailedCount")),
e},0);if(e)return 1===e?n.i(c.default)("There was a problem converting 1 item."):n.i(c.default)("There were problems converting {1} items.",e)},onRender:function(){this.filterBar.append(new f.a);var e={playQueue:this.playQueue},t={playQueue:this.playQueue,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting};this.upNextList.show(new g.a(s.a.extend({},e,{collection:this.upNextItems,itemViewOptions:t,sortableOptions:{sort:!0,group:{name:"upNext",pull:!1,put:["afterUpNext"]}}}))),this.afterUpNextList.show(new g.a(s.a.extend({},e,{
collection:this.afterUpNextItems,itemViewOptions:s.a.extend({},t,{hideDragHandle:!0}),sortableOptions:{sort:!1,group:{name:"afterUpNext",pull:!0,put:!1}}}))),this.toggleEmptyView()},onClose:function(){this.upNextItems.destroy(),this.afterUpNextItems.destroy()},onPrimaryServerChange:function(e,t){t&&u.a.trigger("navigate","conversion",{serverID:t.id})},onUpNextChange:function(){this.toggleEmptyView()},onAfterUpNextChange:function(){this.ui.divider.toggleClass("hidden",!this.afterUpNextItems.length),
this.toggleEmptyView()},onTogglePauseClick:function(e){e.preventDefault();var t=this.pausedSetting.get("value");this.ui.pauseBtn.toggleClass("hidden",!t),this.ui.resumeBtn.toggleClass("hidden",t),this.pausedSetting.set("value",!t),this.settings.first().save(this.pausedSetting.id,t?0:1)}});t.a=v},function(e,t,n){"use strict";var i=n(2654),a=n.n(i),r=n(10),s=n(14),o=n(8),l=n(149),c=n(283),u=n(1659),d=r.a.Layout.extend({className:"now-playing-container",template:a.a,regions:{filterBar:".filter-bar",
list:".sessions-list-container"},modelEvents:{"change:shared":"onSharedChange"},shouldShowList:function(){return!this.shared&&!this.synced&&this.supported},initialize:function(e){var t=s.a("appModel");this.shared=this.model.get("shared"),this.synced=!this.model.get("isFullServer"),this.supported=this.model.supports("publicNowPlaying")||this.model.get("myPlexSubscription"),t.set("primaryServer",this.model),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange)},serializeData:function(){
return{shouldShowList:this.shouldShowList(),shared:this.shared,synced:this.synced,minServerVersion:l.a.publicNowPlaying}},onRender:function(){this.filterBar.append(new c.a),this.shouldShowList()&&this.list.show(new u.a({collection:this.collection}))},onPrimaryServerChange:function(e,t){t&&o.a.trigger("navigate","nowPlaying",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()}});t.a=d},function(e,t,n){"use strict";var i=n(2655),a=n.n(i),r=n(10),s=n(4),o=n(126),l=n(1662),c=r.a.Layout.extend({
className:"sync-device-items-container",template:a.a,ui:{loading:".row-loading",empty:".sync-empty-message",deviceMessage:".sync-device-message",deviceMessageText:".sync-device-message-text"},regions:{list:".sync-item-list-container"},onlyAfterRender:["updateLoading","updateEmptyMessage","updateStatusMessage","updateSyncList"],initialize:function(e){var t=this;this.server=e.server;var n=this.model.get("syncList");n?n.fetch({scope:"page"}).done(function(){t.onSyncItemsReset()}):this.onSyncItemsReset();
},updateLoading:function(){this.ui.loading.addClass("hidden")},updateEmptyMessage:function(){var e=this.syncList,t=!e||0===e.getCollection().length;this.ui.empty.toggleClass("hidden",!t)},updateStatusMessage:function(){var e=this.syncList,t=!e||e.get("isActive");if(this.ui.deviceMessage.toggleClass("hidden",t),!t){var i=this.syncList.device,a=i.get("lastSeenAt");if(!a)return;this.ui.deviceMessageText.text(n.i(s.default)("{1} was last seen {2}. Syncing will resume next time you launch Plex on this device.",i.get("name"),n.i(o.a)(a)));
}},updateSyncList:function(){var e=this.syncList;e&&this.list.show(new l.a({collection:e.getCollection(),itemViewOptions:{server:this.server}}))},onSyncItemsReset:function(){var e=this.model.get("syncList");e&&(this.syncList=e.clone(),this.syncList.resetToServer(this.server.id),this.listenTo(this.syncList,"reset update",this.onSyncItemsChange)),this.updateLoading(),this.updateEmptyMessage(),this.updateStatusMessage(),this.updateSyncList()},onSyncItemsChange:function(){this.updateEmptyMessage()}});
t.a=c},function(e,t,n){"use strict";var i=n(2656),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(4),h=n(8),p=n(61),f=n(21),g=n(283),m=n(1594),v=c.a.Layout.extend({className:"sync-container",template:a.a,transcodeJobDelay:2e3,ui:{devices:".nav a"},regions:{filterBar:".filter-bar",container:".sync-device-container"},modelEvents:{"change:shared":"onSharedChange"},events:{"click .nav a":"onDeviceClick","click .edit-btn":"onEditClick","click .refresh-btn":"onRefreshClick","click .cloud-sync-settings-btn":"onCloudSyncSettingsClick"
},initialize:function(e){var t=u.a("appModel");this.selectedDevice=e.selectedDevice,this.user=t.get("user"),this.shared=this.model.get("shared"),this.transcodeJobs=this.model.get("desktop").get("transcodeJobs"),this.allowSync=this.model.get("allowSync"),this.signedIn="ok"===this.model.get("myPlexSigninState"),t.set("primaryServer",this.model),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.collection.length&&(this.selectedDevice||(this.selectedDevice=this.collection.first()),
this.fetchTranscodeJobs())},serializeData:function(){return{shared:this.shared,hasTouchScreen:p.a.hasTouchScreen,signedIn:this.signedIn,allowSync:this.allowSync,sync:this.model.get("sync"),selectedDevice:this.selectedDevice?this.selectedDevice.toJSON():null,devices:this.collection.toJSON(),plexPassInfo:this.getPlexPassInfo()}},fetchTranscodeJobs:function(){this.transcodeJobs.fetch({reset:!0,scope:"page"}),this.transcodeJobTimeout=setTimeout(s.a.bind(this.fetchTranscodeJobs,this),this.transcodeJobDelay);
},showList:function(){this.selectedDevice?this.container.show(new m.a({model:this.selectedDevice,server:this.model})):this.container.close()},getPlexPassInfo:function(){return this.signedIn||this.shared?{url:this.user.server.get("plexPassUrl"),message:n.i(d.default)("The server needs a Plex Pass to use sync."),buttonText:n.i(d.default)("Learn More"),target:"_blank",showButton:!this.shared}:{url:"#!/settings/server",message:n.i(d.default)("The server needs to be signed in with a Plex Pass to use sync."),
buttonText:n.i(d.default)("Sign In"),target:"_self",showButton:!0}},onRender:function(){this.filterBar.append(new g.a({showSharedServers:!0})),this.allowSync&&this.showList()},onClose:function(){clearTimeout(this.transcodeJobTimeout)},onPrimaryServerChange:function(e,t){t&&h.a.trigger("navigate","sync",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()},onDeviceClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("id");this.ui.devices.removeClass("selected"),
t.addClass("selected"),this.selectedDevice=this.collection.get(n),this.showList()},onEditClick:function(e){e.preventDefault(),l()(e.currentTarget).toggleClass("selected"),this.$el.toggleClass("force-hover")},onRefreshClick:function(e){e.preventDefault();var t=f.a.execute("refreshSyncLists",{server:this.model});this.selectedDevice&&t.always(this.whenRendered(function(){var e=this.selectedDevice.get("syncList");e.fetch({reset:!0,scope:"page"})}))},onCloudSyncSettingsClick:function(e){e.preventDefault(),
e.stopImmediatePropagation();var t=u.a("appModel"),n=t.get("user");window.open(n.server.get("cloudSyncUrl"))}});t.a=v},function(e,t,n){"use strict";var i=n(2659),a=n.n(i),r=n(2),s=n.n(r),o=n(1295),l=n(282),c=l.a.extend({className:"alert-bar notify",template:a.a,events:s.a.extend({"click .info-link":"onInfoClick"},l.a.prototype.events),initialize:function(){this.listenTo(this.model,"change:read",this.hide)},serializeData:function(){var e=this.model.get("content");return{content:n.i(o.a)(e),url:this.model.get("url")
}},onInfoClick:function(e){this.hide(),this.model.markAsRead()},onCloseClick:function(e){l.a.prototype.onCloseClick.apply(this,arguments),this.model.markAsRead()}});t.a=c},function(e,t,n){"use strict";var i=n(2660),a=n.n(i),r=n(2),s=n.n(r),o=n(14),l=n(8),c=n(61),u=n(282),d=u.a.extend({name:"ClaimServerAlertBarView",className:"claim-server-alert-bar alert-bar notify",template:a.a,events:s.a.extend({"click .claim-link":"onClaimClick","click .reload-link":"onReloadClick"},u.a.prototype.events),initialize:function(){
u.a.prototype.initialize.apply(this,arguments);var e=n.i(o.a)("appModel").get("settings"),t=e.get("viewedUnclaimedServers");this.model.id&&t.indexOf(this.model.id)===-1&&(n.i(o.a)("metrics").trackView({page:"unclaimedServer",mode:"banner"},{interaction:!1}),e.save("viewedUnclaimedServers",t.concat(this.model.id)))},serializeData:function(){return{showInsecureMessage:c.a.isHostedHttps&&!this.model.get("isSecure")}},onClaimClick:function(e){e.preventDefault(),n.i(o.a)("metrics").trackClick({action:"claim",
page:"unclaimedServer",mode:"banner"}),l.a.trigger("navigate","serverSettings",{serverID:this.model.id}),this.hide()},onReloadClick:function(e){e.preventDefault(),window.location=this.model.resolveUrl("/web",{connection:this.model.get("connections").first()}),this.hide()},onCloseClick:function(e){u.a.prototype.onCloseClick.apply(this,arguments);var t=n.i(o.a)("appModel").get("settings"),i=t.get("dismissedUnclaimedServers");this.model.id&&i.indexOf(this.model.id)===-1&&(n.i(o.a)("metrics").trackClick({
action:"dismiss",page:"unclaimedServer",mode:"banner"}),t.save("dismissedUnclaimedServers",i.concat(this.model.id)))}});t.a=d},function(e,t,n){"use strict";var i=n(2661),a=n.n(i),r=n(2),s=n.n(r),o=n(14),l=n(8),c=n(21),u=n(282),d=u.a.extend({className:"alert-bar notify",template:a.a,events:s.a.extend({"click .download-link":"onDownloadClick","click .install-link":"onInstallClick"},u.a.prototype.events),initialize:function(){this.server=this.model.server},serializeData:function(){var e=n.i(o.a)("appModel"),t=e.get("user").server;
return{state:this.model.get("state"),downloadURL:this.model.get("downloadURL")||t.get("appsUrl")}},onDownloadClick:function(e){e.preventDefault(),c.a.execute("checkForServerUpdates",{server:this.server,download:!0,initialState:"downloading"}),l.a.trigger("navigate","serverSettings",{serverID:this.server.id})},onInstallClick:function(e){e.preventDefault(),this.model.set("shouldInstall",!0),l.a.trigger("navigate","serverSettings",{serverID:this.server.id})},onCloseClick:function(e){u.a.prototype.onCloseClick.apply(this,arguments);
var t=this.model.get("shortVersion")||"unknown",i=n.i(o.a)("appModel").get("settings");i.save("serverUpdateDismissedVersion",t)}});t.a=d},function(e,t,n){"use strict";var i=n(2662),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(8),c=o.a.ItemView.extend({className:"alert alert-status transition-out",template:a.a,coolDown:!1,alertDuration:5e3,coolDownDuration:5e3,ui:{status:".status"},events:{mouseover:"onMouseOver"},onlyAfterRender:["onShowStatus"],initialize:function(e){s.a.bindAll(this,"hide"),this.listenTo(l.a,"show:status",this.onShowStatus);
},hide:function(){this.$el.addClass("transition-out")},onShowStatus:function(e,t){this.coolDown||(this.server=e,this.ui.status.text(t),this.$el.removeClass("transition-out"),this.inactivityTimeout=clearTimeout(this.inactivityTimeout),this.inactivityTimeout=setTimeout(this.hide,this.alertDuration))},onMouseOver:function(e){this.inactivityTimeout=clearTimeout(this.inactivityTimeout),this.hide(),this.coolDown=!0,setTimeout(s.a.bind(function(){this.coolDown=!1},this),this.coolDownDuration)}});t.a=c},function(e,t,n){
"use strict";var i=n(2663),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(8),c=n(261),u=n(1711),d=o.a.Layout.extend({className:"action-bar alpha-bar",template:a.a,regions:{list:".alpha-bar-list"},modelEvents:{"change:currentFilters":"onListRefresh","socket:timeline":"onTimeline"},collectionEvents:{reset:"onReset"},initialize:function(e){this.listenTo(l.a,"resize",this.onResize),this.collection.clear(),this.updateCollection(),this.debouncedUpdateCollection=s.a.debounce(this.updateCollection,2e3)},measure:function(){
this.updateContainerHeight(),this.updateLineHeight()},updateContainerHeight:function(){this.containerHeight=this.$el.height()},updateLineHeight:function(){var e=this.collection.length;if(e){var t=this.containerHeight/e;this.$el.css("line-height",t+"px")}},updateCollection:function(){this.collection.fetch({reset:!0,scope:"page"})},onRender:function(){this.list.append(new u.a({collection:this.collection}),this.$el),s.a.defer(s.a.bind(this.measure,this))},onListRefresh:function(){this.list.currentView.$el.addClass("hidden"),
this.updateCollection()},onReset:function(e){return e.length<10?(this.$el.addClass("hidden"),void l.a.trigger("hide:bar","alphabar",{preserve:!0})):(this.containerHeight&&this.updateLineHeight(),this.$el.removeClass("hidden"),this.list.currentView.$el.removeClass("hidden"),void l.a.trigger("show:bar","alphabar"))},onResize:function(){this.updateContainerHeight(),this.updateLineHeight()},onTimeline:function(e){e.state!==c.a.CREATED&&e.state!==c.a.DELETED||this.debouncedUpdateCollection()}});t.a=d},function(e,t,n){
"use strict";var i=n(2664),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(8),d=n(148),h=n(355),p=c.a.Layout.extend({className:"breadcrumb-bar",template:a.a,ui:{listSelectedIcons:"#channel-list-dropdown .dropdown-selected-icon"},events:{"click .settings-btn":"onSettingsClick","click .list-btn":"onListClick"},initialize:function(e){this.currentListType=e.currentListType,this.prefsKey=this.model.get("prefsKey"),!this.prefsKey&&this.model.channel&&(this.prefsKey=this.model.channel.get("prefsKey")),
this.shared=this.model.server.get("shared")},serializeData:function(){var e=this.model.channel||this.model,t=e?e.get("title"):this.model.get("title"),n=e?e.id:e.get("identifier"),i="#!/server/"+encodeURIComponent(this.model.server.id);i+="/channel/"+encodeURIComponent(n);var a=this.model.channel?this.model.get("title"):null;return{channelTitle:t,channelUrl:i,title:a,totalSize:this.model.get("metadataList").getCollection().length,showSettings:!!this.prefsKey&&!this.shared,listType:this.currentListType
}},onSettingsClick:function(e){e.preventDefault();var t=new d.a([],{server:this.model.server,url:this.prefsKey});t.fetch().done(s.a.bind(function(){u.a.trigger("show:modal",new h.a({model:this.model.channel||this.model,collection:t}))},this))},onListClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("type");this.trigger("change:listType",n),this.ui.listSelectedIcons.addClass("hidden"),t.find(".dropdown-selected-icon").removeClass("hidden")}});t.a=p},function(e,t,n){"use strict";
var i=n(2665),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(14),c=n(8),u=n(49),d=n(1624),h=o.a.Layout.extend({className:"details-breadcrumb-bar breadcrumb-bar",template:a.a,ui:{previousBtn:".previous-btn",nextBtn:".next-btn",listSelectedIcons:"#section-list-dropdown .dropdown-selected-icon"},regions:{currentItem:".current-item",grandparentItem:".grandparent-item",siblingsDropdown:".siblings-dropdown",parentsDropdown:".parents-dropdown"},events:{"click .playlists-btn":"onPlaylistsClick","click .section-btn":"onSectionClick",
"click .list-btn":"onListClick","click .previous-btn":"onPreviousClick","click .next-btn":"onNextClick"},onlyAfterRender:["onSiblingsPopulate","onParentsPopulate"],initialize:function(e){var t=this.model.get("parentKey");if(!t)return void this.onSiblingsPopulate(!1);var n,i={server:this.model.server,section:this.model.section},a=this.parent=new u.a({key:t},i),r=a.populate({scope:"page"});r=r.then(function(){return n=a.get("children"),n.populate({scope:"page"})}),r.done(this.onSiblingsPopulate);var s=this.model.get("grandparentKey");
if(s){var o=this.grandparent=new u.a({key:s},i),l=o.populate({scope:"page"});l=l.then(function(){var e=o.get("children");return e.populate({scope:"page"})}),l.done(this.onParentsPopulate)}},serializeData:function(){var e=this.model.server,t=this.model.section,n=t||this.model.get("playlistType");return{serverID:e.id,showSectionDropdown:n,showPlaylists:this.model.server.supports("playlists"),sections:e.get("sections").toJSON(),section:t?t.toJSON():null,item:this.model.toJSON(),parent:this.parent?this.parent.toJSON():null,
grandparent:this.grandparent?this.grandparent.toJSON():null,listType:this.getListType()}},getListTypeSettingKey:function(){var e="episodeListType",t=this.model.section||this.model.server;return t.getScopedKey(e)},getListType:function(){if("season"===this.model.get("type")){var e=n.i(l.a)("appModel").get("settings");return e.get(this.getListTypeSettingKey())||"episode-tile-list"}return null},previous:function(){this.previousSibling&&c.a.trigger("navigate","details",{serverID:this.model.server.id,key:this.previousSibling.get("key")
})},next:function(){this.nextSibling&&c.a.trigger("navigate","details",{serverID:this.model.server.id,key:this.nextSibling.get("key")})},onSiblingsPopulate:function(e){if(!e)return this.currentItem.show(new d.a({model:this.model,isLeaf:!0})),void this.currentItem.$el.removeClass("hidden");var t=e.get("metadataItems"),n=t.get(this.model.id),i=t.indexOf(n);i>0&&(this.previousSibling=t.at(i-1)),i<t.length-1&&(this.nextSibling=t.at(i+1)),this.ui.previousBtn.toggleClass("disabled",!this.previousSibling),
this.ui.nextBtn.toggleClass("disabled",!this.nextSibling),this.ui.previousBtn.removeClass("hidden"),this.ui.nextBtn.removeClass("hidden"),this.grandparent||(this.grandparentItem.show(new d.a({model:this.parent})),this.grandparentItem.$el.removeClass("hidden")),this.siblingsDropdown.show(new d.a({id:"siblings-dropdown",model:this.model,collection:t})),this.siblingsDropdown.$el.removeClass("hidden")},onParentsPopulate:function(e){this.grandparentItem.show(new d.a({model:this.grandparent})),this.grandparentItem.$el.removeClass("hidden"),
this.parentsDropdown.show(new d.a({id:"parents-dropdown",model:this.parent,collection:e.get("metadataItems")})),this.parentsDropdown.$el.removeClass("hidden")},onSectionClick:function(e){e.preventDefault();var t=s()(e.currentTarget),n=t.data("key");c.a.trigger("navigate","section",{serverID:this.model.server.id,sectionID:n})},onPlaylistsClick:function(e){e.preventDefault(),c.a.trigger("navigate","playlists",{serverID:this.model.server.id})},onListClick:function(e){e.preventDefault();var t=s()(e.currentTarget),i=t.data("type"),a=n.i(l.a)("appModel").get("settings");
a.save(this.getListTypeSettingKey(),i),this.ui.listSelectedIcons.addClass("hidden"),t.find(".dropdown-selected-icon").removeClass("hidden")},onPreviousClick:function(e){e.preventDefault(),this.previous()},onNextClick:function(e){e.preventDefault(),this.next()}});t.a=h},function(e,t,n){"use strict";var i=n(2666),a=n.n(i),r=n(10),s=n(4),o=n(8),l=n(793),c=n(1627),u=n(1747),d=r.a.Layout.extend({className:"breadcrumb-bar",template:a.a,ui:{itemsBadge:".items-badge"},regions:{sectionDropdown:".breadcrumb-dropdown",
typeDropdown:".breadcrumb-subset-dropdown"},events:{"click .import-btn":"onImportClick"},initialize:function(){this.listenTo(this.model.get("items").get("playlists"),"reset update",this.onSizeChange);var e=this.model.server.get("isFullOwnedServer"),t=this.model.server.get("sections").where({type:"artist"}).length>0;this.canImportPlaylists=e&&t},serializeData:function(){return{totalSize:this.model.get("items").get("playlists").length,canImportPlaylists:this.canImportPlaylists}},onRender:function(){
this.sectionDropdown.show(new l.a({title:n.i(s.default)("Playlists"),model:this.model,collection:this.model.server.get("sections")})),this.typeDropdown.show(new c.a({model:this.model}))},onSizeChange:function(){this.ui.itemsBadge.text(this.model.get("items").get("playlists").length)},onImportClick:function(e){this.limited||(e.preventDefault(),o.a.trigger("show:modal",new u.a({server:this.model.server})))}});t.a=d},function(e,t,n){"use strict";var i=n(2667),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),c=n(10),u=n(14),d=n(4),h=n(8),p=n(21),f=n(793),g=n(1629),m=n(1630),v=n(188),y=n(190),b=c.a.Layout.extend({
className:"breadcrumb-bar",template:a.a,ui:{listSelectedIcons:"#section-list-dropdown .dropdown-selected-icon",itemsBadge:".items-badge",updateBtn:".update-btn"},regions:{sectionDropdown:".breadcrumb-dropdown",subsetDropdown:".breadcrumb-subset-dropdown",typeDropdown:".breadcrumb-type-dropdown"},events:{"click .list-btn":"onListClick","click .edit-btn":"onEditClick","click .share-btn":"onShareClick","click .update-btn":"onUpdateClick","click .analyze-btn":"onAnalyzeClick","click .force-refresh-btn":"onForceRefreshClick",
"click .empty-trash-btn":"onEmptyTrashClick","click .delete-btn":"onDeleteClick"},onlyAfterRender:["onTotalSizeChange"],initialize:function(){var e=this.model.get("items");this.refreshing=this.model.get("refreshing"),this.updateTitle=n.i(d.default)("Update Library"),this.updateTitleAlt=n.i(d.default)("Cancel Update"),this.shared=this.model.server.get("shared"),this.synced=!this.model.server.get("isFullServer"),this.limited=!(!this.shared&&!this.synced),this.listenTo(e,"change:totalSize",this.onTotalSizeChange),
this.listenTo(this.model,"change:refreshing",this.onRefreshingChange),this.listenTo(this.model,"change:currentType",this.updateListViewDropdown)},serializeData:function(){var e=n.i(u.a)("appModel").get("settings");return{limited:this.limited,totalSize:this.model.get("items").get("totalSize"),listType:e.getSectionListType(this.model),refreshing:this.refreshing,updateTitle:this.refreshing?this.updateTitleAlt:this.updateTitle,updateTitleAlt:this.refreshing?this.updateTitle:this.updateTitleAlt}},updateListViewDropdown:function(e){
if(!l.a.isString(e)){var t=n.i(u.a)("appModel").get("settings");e=t.getSectionListType(this.model)}this.ui.listSelectedIcons.each(function(t,n){var i=s()(n),a=i.closest(".list-btn").data("type");i.toggleClass("hidden",!l.a.isEqual(e,a))})},onRender:function(){this.$el.tooltip({selector:".breadcrumb-actions > a",container:"body",placement:"bottom"}),this.sectionDropdown.show(new f.a({model:this.model,collection:this.model.server.get("sections")})),this.subsetDropdown.show(new g.a({model:this.model.get("currentSubset"),
collection:this.model.get("subsets")})),this.typeDropdown.show(new m.a({model:this.model,collection:this.model.get("types")}))},onTotalSizeChange:function(e,t){var n=null==t?0:t;this.ui.itemsBadge.toggleClass("hidden",0===n),this.ui.itemsBadge.text(n)},onEditClick:function(e){e.preventDefault(),this.limited||h.a.trigger("show:modal",new v.a({server:this.model.server,model:this.model}))},onUpdateClick:function(e){e.preventDefault(),this.limited||p.a.execute("updateLibrary",{section:this.model,cancel:this.model.get("refreshing")
})},onShareClick:function(e){e.preventDefault(),this.limited||h.a.trigger("show:modal",new y.a({defaultPaneType:"ownedServer",defaultPaneID:this.model.server.id}))},onAnalyzeClick:function(e){e.preventDefault(),this.limited||p.a.execute("analyzeSection",{section:this.model})},onForceRefreshClick:function(e){e.preventDefault(),this.limited||p.a.execute("updateLibrary",{section:this.model,params:{force:!0}})},onEmptyTrashClick:function(e){e.preventDefault(),this.limited||p.a.execute("emptyTrash",{section:this.model
})},onDeleteClick:function(e){e.preventDefault(),this.onDelete()},onListClick:function(e){e.preventDefault();var t=s()(e.currentTarget),i=t.data("type"),a=this.model.get("currentType"),r=n.i(u.a)("appModel").get("settings");r.saveListType(a,i),this.updateListViewDropdown(i)},onDelete:function(){if(!this.limited){var e=p.a.execute("deleteSection",{section:this.model});e.done(function(){h.a.trigger("navigate","dashboard")})}},onRefreshingChange:function(e,t){var n=this.ui.updateBtn,i=this.ui.updateBtn.attr("data-original-title");
if(this.ui.updateBtn.toggleClass("active",this.model.get("refreshing")),i){var a=s()(".tooltip > .tooltip-inner").html();l.a.contains([this.updateTitle,this.updateTitleAlt],a)&&s()(".tooltip > .tooltip-inner").html(n.attr("data-title-alt")),n.attr("data-original-title",n.attr("data-title-alt")),n.attr("data-title-alt",i)}}});t.a=b},function(e,t,n){"use strict";var i=n(2668),a=n.n(i),r=n(10),s=n(627),o=n(1669),l=n(1671),c=r.a.Layout.extend({className:"container",template:a.a,regions:{list:".directory-container"
},onlyAfterRender:["onUpdate"],initialize:function(e){this.currentKey=e.currentKey,this.currentPath=e.currentPath,this.currentKey||(this.currentKey=this.collection.first().get("key")),this.currentPath||(this.currentPath=this.currentKey),this.channelList=new s.a({key:this.currentPath},{server:this.collection.server}),this.channelList.fetch({scope:"page"}).always(this.onUpdate)},serializeData:function(){return{directories:this.collection.toJSON(),serverID:this.collection.server.id,currentKey:this.currentKey
}},onUpdate:function(){var e,t={collection:this.channelList.get("channels"),itemViewOptions:{currentKey:this.currentKey}};e="Store:Info"===this.channelList.get("viewGroup")?new l.a(t):new o.a(t),this.list.show(e)}});t.a=c},function(e,t,n){"use strict";var i=n(2669),a=n.n(i),r=n(10),s=n(8),o=n(14),l=n(1210),c=n(135),u=n(1601),d=n(801),h=n(799),p=n(800),f=r.a.Layout.extend({className:"channel-container",template:a.a,regions:{list:".channel-list-container"},initialize:function(e){this.listModel=e.listModel,
this.collection=this.listModel.get("metadataItems");var t=this.model.get("header"),n=this.model.get("message");(t||n)&&s.a.trigger("show:alert",{message:n||t}),this.searchKey=this.model.get("searchKey"),this.searchPlaceholder=this.model.get("title"),!this.searchKey&&this.model.channel&&(this.searchKey=this.model.channel.get("searchKey"),this.searchPlaceholder=this.model.channel.get("title"));var i=this.model.channel||this.model,a=i.id?i.id:i.get("identifier");this.searchKey&&o.a("appStore").dispatch(c.changeQuickSearchSettings({
serverEntityID:this.model.server.entityID(),channelPlaceholder:this.searchPlaceholder,channelID:a,channelSearchKey:this.searchKey})),this.listType=l.a.getListType(this.model);var r=new u.a({model:this.model,currentListType:this.listType});this.listenTo(r,"change:listType",this.onListTypeChange),s.a.trigger("show:bar","breadcrumbbar",r),s.a.trigger("show:background",{model:this.model,dim:!0})},getListConstructor:function(){switch(this.listType){case l.a.types.tileList:return d.a;case l.a.types.detailsList:
return h.a;default:return p.a}},onRender:function(){var e=this.getListConstructor();this.list.append(new e({listModel:this.listModel,collection:this.collection,paginated:!1}),this.$el)},onClose:function(){o.a("appStore").dispatch(c.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),channelPlaceholder:null,channelID:null,channelSearchKey:null})),s.a.trigger("hide:bar","breadcrumbbar")},onListTypeChange:function(e){this.listType=e,this.listModel.scrollPosition=0,this.list.currentView.scrollPosition=0,
this.render()}});t.a=f},function(e,t,n){"use strict";var i=n(2670),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(21),d=n(1673),h=c.a.Layout.extend({className:"container",template:a.a,ui:{navLinks:".nav a",checkUpdatesBtn:".check-updates-btn"},regions:{list:".channels-container"},events:{"click .nav a":"onNavClick","click .all-btn":"onAllClick","click .video-btn":"onVideoClick","click .music-btn":"onMusicClick","click .photo-btn":"onPhotoClick","click .check-updates-btn":"onCheckUpdatesClick"
},initialize:function(){this.videoCollection=this.collection.filterByType("video"),this.musicCollection=this.collection.filterByType("music"),this.photoCollection=this.collection.filterByType("photos"),this.shared=this.collection.server.get("shared")},serializeData:function(){return{serverID:this.collection.server.id,allCount:this.collection.length,videoCount:this.videoCollection.length,musicCount:this.musicCollection.length,photoCount:this.photoCollection.length,shared:this.shared}},onRender:function(){
this.list.show(new d.a({collection:this.collection}))},onNavClick:function(e){this.ui.navLinks.removeClass("selected"),l()(e.currentTarget).addClass("selected")},onAllClick:function(e){e.preventDefault(),this.list.show(new d.a({collection:this.collection}))},onVideoClick:function(e){e.preventDefault(),this.list.show(new d.a({collection:this.videoCollection}))},onMusicClick:function(e){e.preventDefault(),this.list.show(new d.a({collection:this.musicCollection}))},onPhotoClick:function(e){e.preventDefault(),
this.list.show(new d.a({collection:this.photoCollection}))},onCheckUpdatesClick:function(e){e.preventDefault();var t=this.ui.checkUpdatesBtn;if(!t.hasClass("active")){t.addClass("active");var n=u.a.execute("updateChannel",{server:this.collection.server});n.always(s.a.bind(function(){t.removeClass("active")},this))}}});t.a=h},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(46)),o=n.n(s),l=n(15),c=n(14),u=n(788),d=n(2060),h=a()(d.a,{}),p=u.a.extend({mountReact:function(){var e=n.i(c.a)("appStore");
o.a.render(a()(l.a,{store:e},void 0,h),this.ui.page[0])}});t.a=p},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(46)),o=n.n(s),l=n(15),c=n(14),u=n(114),d=n(863),h=n(200),p=a()(h.a,{}),f=a()(d.a,{}),g=u.a.extend({mountReact:function(){var e=n.i(c.a)("appStore");o.a.render(a()(l.a,{store:e},void 0,p),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,f),this.ui.page[0])}});t.a=g},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(46)),o=n.n(s),l=n(15),c=n(14),u=n(67),d=n(65),h=n(114),p=n(200),f=n(197),g=n(198),m=n(2028),v=a()(p.a,{}),y=h.a.extend({
mountReact:function(){var e=n.i(c.a)("appStore"),t=this.options.selectedServerID,i=this.options.selectedProviderID,r=this.options.params||{},s=n.i(d.a)(u.f,t),h=n.i(d.a)(u.e,i,s);o.a.render(a()(l.a,{store:e},void 0,v),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(f.a,{machineIdentifier:t},void 0,a()(g.a,{providerEntityID:h},void 0,a()(m.a,{machineIdentifier:t,serverEntityID:s,providerEntityID:h,listKey:r.key,listTitle:r.title,listType:r.type})))),this.ui.page[0])}});t.a=y},function(e,t,n){
"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(46)),o=n.n(s),l=n(15),c=n(14),u=n(185),d=n(65),h=n(114),p=n(197),f=n(198),g=n(862),m=n(200),v=a()(m.a,{}),y=h.a.extend({mountReact:function(){var e=n.i(c.a)("appStore"),t=this.options.selectedServerID,i=this.options.params||{},r=n.i(d.a)(u.SERVER,t);o.a.render(a()(l.a,{store:e},void 0,v),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(p.a,{machineIdentifier:this.options.selectedServerID},void 0,a()(f.a,{},void 0,a()(g.a,{machineIdentifier:t,
serverEntityID:r,directoryKey:i.key})))),this.ui.page[0])}});t.a=y},function(e,t,n){"use strict";var i=n(2671),a=n.n(i),r=n(1087),s=n(159),o=n(158),l=n(186),c=n(54),u=n(1704),d=s.a.extend({mixins:r.a,className:"album-details-row details-row",template:a.a,allowMirror:!0,initialize:function(){s.a.prototype.initialize.apply(this,arguments),this.ListConstructor=u.a,this.listItemViewOptions={artistTitle:this.model.get("parentTitle"),mediaActions:this.mediaActions},this.starRatingView=new o.a({model:this.model
}),this.summaryView=new l.a({model:this.model}),this.posterImage=new c.a({model:this.model,type:this.model.get("type"),width:this.posterWidth})}});t.a=d},function(e,t,n){"use strict";var i=n(2672),a=n.n(i),r=n(2),s=n.n(r),o=n(8),l=n(261),c=n(1088),u=n(159),d=n(1622),h=n(186),p=n(54),f=n(1677),g=n(1675),m=n(798),v=u.a.extend({mixins:c.a,className:"artist-details-row details-row",template:a.a,allowMirror:!0,ui:s.a.extend({concertRegion:".concert-region",popularTracksRegion:".popular-tracks-region",
extrasRegion:".extras-region",similarArtistsRegion:".similar-artists-region"},u.a.prototype.ui),regions:s.a.extend({concert:".concert-region",popularTracksList:".popular-tracks-region",extrasList:".extras-region",similarArtistsList:".similar-artists-region"},u.a.prototype.regions),modelEvents:{"socket:timeline":"onTimeline","change:popularLeaves":"showPopularTracks","change:popularLeaves.change:metadataItems.reset change:popularLeaves.change:metadataItems.update":"updatePopularTracks","change:extras.change:metadataItems.reset change:extras.change:metadataItems.update":"updateExtras",
"change:concerts":"showConcert","change:concerts.reset change:concerts.update":"updateConcerts","change:related":"showSimilarArtistsList","change:related.reset change:related.update":"showSimilarArtistsList"},initialize:function(){u.a.prototype.initialize.apply(this,arguments),this.bindAllWhenRendered("updateConcerts","showConcert","updatePopularTracks","updateExtras","updateSimilarArtists","showSimilarArtistsList"),this.ListConstructor=g.a,this.listItemViewOptions={mediaActions:this.mediaActions
},this.summaryView=new h.a({model:this.model}),this.posterImage=new p.a({model:this.model,type:this.model.get("type"),width:this.posterWidth})},showPopularTracks:function(){var e=this.model.get("popularLeaves"),t=e&&e.get("metadataItems");t&&this.popularTracksList.append(new f.a({collection:t})),this.updatePopularTracks()},updatePopularTracks:function(){var e=this.model.get("popularLeaves"),t=e&&e.get("metadataItems");this.ui.popularTracksRegion.toggleClass("hidden",!(t&&t.length))},showExtras:function(){
var e=this.model.get("extras"),t=e&&e.get("metadataItems");t&&this.extrasList.append(new m.a({collection:t})),this.updateExtras()},updateExtras:function(){var e=this.model.get("extras"),t=e&&e.get("metadataItems");this.ui.extrasRegion.toggleClass("hidden",!(t&&t.length))},updateConcerts:function(){var e=this.model.get("concerts");this.ui.concertRegion.toggleClass("hidden",!(e&&e.length))},showConcert:function(){var e=this.model.get("concerts"),t=e&&e.first();t?this.concert.append(new d.a({model:t
})):this.concert.close(),this.updateConcerts()},updateSimilarArtists:function(){this.ui.similarArtistsRegion.toggleClass("hidden",!(this.similarArtists&&this.similarArtists.get("metadataItems").length))},showSimilarArtistsList:function(){this.similarArtists&&(this.stopListening(this.similarArtists),this.similarArtists=null);var e=this.model.get("related");if(e){var t=e.get("artist.similar");t&&(this.similarArtists=t.get("metadataList"),this.similarArtistsList.append(new g.a({collection:this.similarArtists.get("metadataItems")
})),this.listenTo(this.similarArtists.get("metadataItems"),"reset update",this.updateSimilarArtists))}this.updateSimilarArtists()},onRender:function(){u.a.prototype.onRender.apply(this,arguments),this.showPopularTracks(),this.children.populate({scope:"page"}).then(this.whenRendered(function(){this.showExtras(),this.showConcert(),this.showSimilarArtistsList()}))},onTimeline:function(e){e.state===l.a.DELETED&&o.a.trigger("navigate","section",{serverID:this.model.server.id,sectionID:this.model.section.id
})}});t.a=v},function(e,t,n){"use strict";var i=n(2673),a=n.n(i),r=n(14),s=n(1089),o=n(159),l=n(158),c=n(186),u=n(486),d=n(54),h=n(341),p=o.a.extend({mixins:s.a,className:"clip-details-row details-row",template:a.a,allowMirror:!0,initialize:function(){o.a.prototype.initialize.apply(this,arguments),this.starRatingView=new l.a({model:this.model,disabled:!0}),this.summaryView=new c.a({model:this.model});var e=this.getPreferredMedia();this.audioDropdown=new u.a({type:"audio",model:this.model,media:e}),
this.subtitlesDropdown=new u.a({type:"subtitles",model:this.model,media:e}),this.posterImage=new d.a({model:this.model,type:this.model.get("type"),width:this.posterWidth});var t=this.model.server.get("isCloud"),n=r.a("appModel"),i=n.get("primaryServer");(!t||i&&!i.get("isCloudSyncServer"))&&(this.contentRatingFlag=new h.a({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new h.a({model:this.model,flag:"videoResolution",className:"media-flag",
width:100,height:20}),this.audioCodecFlag=new h.a({model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new h.a({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20}),this.studioFlag=new h.a({model:this.model,modelAttribute:"studio",className:"studio-flag",width:200,height:40}))}});t.a=p},function(e,t,n){"use strict";var i=n(2675),a=n.n(i),r=n(1090),s=n(159),o=n(158),l=n(186),c=n(486),u=n(54),d=n(341),h=s.a.extend({mixins:r.a,
className:"episode-details-row details-row",template:a.a,allowMirror:!0,initialize:function(){s.a.prototype.initialize.apply(this,arguments),this.starRatingView=new o.a({model:this.model}),this.summaryView=new l.a({model:this.model});var e=this.getPreferredMedia();this.audioDropdown=new c.a({type:"audio",model:this.model,media:e}),this.subtitlesDropdown=new c.a({type:"subtitles",model:this.model,media:e}),this.posterImage=new u.a({model:this.model,type:this.model.get("type"),width:this.posterWidth
}),this.contentRatingFlag=new d.a({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new d.a({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new d.a({model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new d.a({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20})}});t.a=h},function(e,t,n){
"use strict";var i=n(2676),a=n.n(i),r=n(2),s=n.n(r),o=n(1091),l=n(159),c=n(158),u=n(186),d=n(486),h=n(54),p=n(341),f=n(798),g=l.a.extend({mixins:o.a,className:"movie-details-row details-row",template:a.a,allowMirror:!0,ui:s.a.extend({extrasRegion:".extras-region"},l.a.prototype.ui),regions:s.a.extend({extrasList:".extras-region"},l.a.prototype.regions),initialize:function(){l.a.prototype.initialize.apply(this,arguments);var e=this.model.get("extras");this.extras=e&&e.get("metadataItems"),this.extras&&this.listenTo(this.extras,"reset add remove",this.updateExtras),
this.starRatingView=new c.a({model:this.model}),this.summaryView=new u.a({model:this.model});var t=this.getPreferredMedia();this.audioDropdown=new d.a({type:"audio",model:this.model,media:t}),this.subtitlesDropdown=new d.a({type:"subtitles",model:this.model,media:t}),this.posterImage=new h.a({model:this.model,type:this.model.get("type"),width:this.posterWidth}),this.contentRatingFlag=new p.a({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new p.a({
model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new p.a({model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new p.a({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20}),this.studioFlag=new p.a({model:this.model,modelAttribute:"studio",className:"studio-flag",width:200,height:40})},updateExtras:function(){this.ui.extrasRegion.toggleClass("hidden",!(this.extras&&this.extras.length));
},onRender:function(){l.a.prototype.onRender.apply(this,arguments),this.extras&&(this.extrasList.append(new f.a({collection:this.extras})),this.updateExtras())}});t.a=g},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(2677),s=n.n(r),o=n(10),l=n(1),c=(n.n(l),n(46)),u=n.n(c),d=n(15),h=n(14),p=n(2004),f=n(2370),g=n.n(f),m=o.a.Layout.extend({className:"photo-album-details",template:s.a,ui:{photoAlbumPage:".photo-album-page"},serializeData:function(){return{styles:g.a}},mountReact:function(){var e=h.a("appStore"),t=this.model.entityID({
key:this.model.get("key")});u.a.render(a()(d.a,{store:e},void 0,a()(p.a,{metadataItemEntityID:t})),this.ui.photoAlbumPage[0])},unmountReact:function(){this.isRendered&&u.a.unmountComponentAtNode(this.ui.photoAlbumPage[0])},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});t.a=m},function(e,t,n){"use strict";var i=n(2678),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(269),c=n(177),u=n(145),d=n(159),h=n(354),p=n(1697),f=d.a.extend({
className:"playlist-details-row details-row",template:a.a,posterWidth:200,pageSize:50,compositeOptions:{audio:{media:"art",stripRatio:l.a.ratios.landscape,posterRatio:l.a.ratios.square},photo:{media:"thumb",stripRatio:l.a.ratios.square,posterRatio:l.a.ratios.square},video:{media:"thumb",stripRatio:l.a.ratios.portrait,posterRatio:l.a.ratios.portrait}},ui:s.a.extend({sideStrip:".item-side-strip"},d.a.prototype.ui),bindings:s.a.extend(s.a.pick(u.a.defaultBindings,[".item-title",".item-summary"]),{".item-duration":{
modelAttribute:"duration",autohide:!0,formatter:function(e){return e?n.i(c.a)(e):0}},".item-count":{modelAttribute:"leafCount",formatter:function(e){return 0===e?n.i(o.default)("This playlist has no items."):1===e?n.i(o.default)("1 Item"):n.i(o.default)("{1} Items",e)}},".no-items":{modelAttribute:"leafCount",manual:!0,autohide:!0,formatter:function(e){return 0===e}},".loading-container":{model:"progress",modelAttribute:"loading",manual:!0,autohide:!0},".error-text":{model:"progress",modelAttribute:"failed",
manual:!0,autohide:!0}}),serializeData:function(){var e=this.model.get("playlistType");return{smart:this.model.get("smart"),hasComposite:"audio"===e||"photo"===e,type:e}},initialize:function(){d.a.prototype.initialize.apply(this,arguments),this.ListConstructor=p.a,this.listItemViewOptions={canEdit:!this.model.get("smart")};var e=this.compositeOptions[this.model.get("playlistType")];this.posterWidth=200,this.sideStripImage=new h.a({model:this.model,media:e.media,width:this.posterWidth,height:this.posterWidth/e.stripRatio*16,
columns:1,rows:16,unique:!0,noPlaceholder:!0}),this.posterImage=new h.a({model:this.model,width:this.posterWidth,height:this.posterWidth/e.posterRatio,noPlaceholder:!0})},onRender:function(){d.a.prototype.onRender.apply(this,arguments),this.sideStripImage.setElement(this.ui.sideStrip)},onClose:function(){return this.posterImage&&this.sideStripImage.close(),d.a.prototype.onClose.apply(this,arguments)}});t.a=f},function(e,t,n){"use strict";var i=n(2679),a=n.n(i),r=n(14),s=n(159),o=n(186),l=n(1685),c=n(1681),u=n(1683),d=s.a.extend({
className:"season-details-row details-row",template:a.a,allowMirror:!0,initialize:function(){s.a.prototype.initialize.apply(this,arguments),this.ListConstructor=this.getListConstructor(),this.summaryView=new o.a({model:this.model});var e=n.i(r.a)("appModel").get("settings");this.listenTo(e,"change:"+this.getListTypeSettingKey(),this.onListTypeChange)},getListTypeSettingKey:function(){var e="episodeListType",t=this.model.section||this.model.server;return t.getScopedKey(e)},getListConstructor:function(e){
var t=n.i(r.a)("appModel").get("settings");switch(e||(e=t.get(this.getListTypeSettingKey())),e){case"episode-details-list":return c.a;case"episode-list":return u.a;default:return l.a}},bindings:{".show-title":{modelAttribute:"parentTitle"},".season-title":{modelAttribute:"title"}},onListTypeChange:function(e,t){this.ListConstructor=this.getListConstructor(t),this.render()}});t.a=d},function(e,t,n){"use strict";var i=n(2680),a=n.n(i),r=n(1092),s=n(159),o=n(158),l=n(186),c=n(54),u=n(341),d=n(1700),h=s.a.extend({
mixins:r.a,className:"show-details-row details-row",template:a.a,allowMirror:!0,initialize:function(){s.a.prototype.initialize.apply(this,arguments),this.ListConstructor=d.a,this.starRatingView=new o.a({model:this.model}),this.summaryView=new l.a({model:this.model}),this.posterImage=new c.a({model:this.model,type:this.model.get("type"),width:this.posterWidth}),this.contentRatingFlag=new u.a({model:this.model,modelAttribute:"contentRating",className:"show-content-rating content-rating-flag",width:70,
height:30}),this.studioFlag=new u.a({model:this.model,modelAttribute:"studio",className:"show-studio studio-flag",width:200,height:40})}});t.a=h},function(e,t,n){"use strict";var i=n(2681),a=n.n(i),r=n(10),s=r.a.ItemView.extend({className:"container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2682),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(43),c=n.n(l),u=o.a.ItemView.extend({className:"concert",template:a.a,bindings:{".concert-link":{modelAttribute:"url",manual:!0,formatter:function(e,t){
t.attr("href",e)}},".concert-month":{modelAttribute:"at",formatter:function(e){return c.a.unix(e).format("MMM")}},".concert-day":{modelAttribute:"at",formatter:function(e){return c.a.unix(e).format("DD")}},".concert-name":{modelAttribute:"tag"},".concert-venue":{modelAttribute:"venue"},".concert-city":{modelAttribute:"city",modelListeners:["city","country"],formatter:function(e){var t=s.a.compact([e,this.model.get("country")]);return t.join(", ")}}}});t.a=u},function(e,t,n){"use strict";var i=n(2684),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(21),c=o.a.ItemView.extend({
id:"auto-match-dropdown",tagName:"span",className:"dropdown",template:a.a,collectionEvents:{reset:"render"},events:{"click .auto-match-agent":"onClick"},serializeData:function(){return{agents:this.collection.toJSON()}},onClick:function(e){e.preventDefault();var t=s()(e.currentTarget).data("id"),n=this.model.agents.get(t);l.a.execute("autoMatch",{item:this.model,agent:n})}});t.a=c},function(e,t,n){"use strict";var i=n(2685),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(8),c=o.a.ItemView.extend({tagName:"span",
className:"details-breadcrumb dropdown",template:a.a,events:{"click .breadcrumb-btn":"onClick"},initialize:function(e){this.listenTo(this.model,"change:title",this.render),this.isLeaf=e&&e.isLeaf||!1},serializeData:function(){var e=this.collection&&this.collection.length>1;return{id:this.id,item:this.model.toJSON(),items:e?this.collection.toJSON():null,hasDetails:this.isLeaf,showDropdown:e}},onClick:function(e){e.preventDefault();var t=s()(e.currentTarget).data("key");t&&l.a.trigger("navigate","details",{
serverID:this.model.server.id,key:t})}});t.a=c},function(e,t,n){"use strict";var i=n(2687),a=n.n(i),r=n(10),s=r.a.ItemView.extend({tagName:"li",className:"play-queue-list-item",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2691),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(4),c=n(8),u=n(20),d=n(36),h=n(21),p=n(156),f=n(160),g=n(288),m=n(286),v=n(287),y=o.a.ItemView.extend({tagName:"ul",className:"dropdown-menu",template:a.a,ui:{divider:".divider"},events:{"click .play-mix-btn":"onPlayMixClick",
"click .add-to-playlist-btn":"onAddToPlaylistClick","click .sync-btn":"onSyncClick","click .share-btn":"onShareClick","click .recommend-btn":"onRecommendClick","click .info-btn":"onInfoClick"},initialize:function(e){this.mediaType=d.a.get(this.model.get("type")),this.mediaActions=new p.a({},{item:this.model,playQueue:e.playQueue}),s()(".dropdown.open .dropdown-toggle").dropdown("toggle")},serializeData:function(){var e,t;if(this.mediaActions.get("showDownload")){e=this.model.getDownloadUrl();var n=this.model.getFilepath();
n&&(t=u.getLastSegment(n))}return{defaultLinkTarget:"_self",downloadUrl:e,downloadName:t}},bindingsModel:"mediaActions",bindings:{".play-mix-btn":{modelAttribute:"showPlayMix",manual:!0,autohide:!0,formatter:function(e,t){if(e){var i=this.model.get("related"),a=i.findWhere({browse:!1}),r=a.get("title");r&&t.text(n.i(l.default)("Queue {1}",r))}return e}},".add-to-playlist-btn":{modelAttribute:"showAddToPlaylist",manual:!0,autohide:!0},".sync-btn":{modelAttribute:"showSync",manual:!0,autohide:!0},".download-btn":{
modelAttribute:"showDownload",manual:!0,autohide:!0},".share-btn, .recommend-btn":{modelAttribute:"showShare",manual:!0,autohide:!0},".info-btn":{modelAttribute:"showInfo",manual:!0,autohide:!0}},onRender:function(){var e=this.ui.divider,t=e.prevAll(":not(:has(.hidden))").length,n=e.nextAll(":not(:has(.hidden))").length;e.toggleClass("hidden",!t||!n)},onClose:function(){this.mediaActions.stopListening()},onPlayMixClick:function(e){e.preventDefault();var t=this.model.get("related"),n=t.findWhere({
browse:!1});n.set("type","track"),h.a.execute("queueMedia",{item:n,excludeSeedItem:!0,next:!0})},onAddToPlaylistClick:function(e){return e.preventDefault(),s()(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void c.a.trigger("show:modal",new f.a({model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onSyncClick:function(e){e.preventDefault(),h.a.execute("showSyncModal",{item:this.model})},onShareClick:function(e){e.preventDefault(),
c.a.trigger("show:modal",new g.a({model:this.model}))},onRecommendClick:function(e){e.preventDefault(),c.a.trigger("show:modal",new v.a({model:this.model}))},onInfoClick:function(e){e.preventDefault(),c.a.trigger("show:modal",new m.a({model:this.model}))}});t.a=y},function(e,t,n){"use strict";var i=n(2692),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=c.a.ItemView.extend({id:"playlist-type-dropdown",tagName:"span",className:"dropdown",template:a.a,events:{"click .type-btn":"onClick"},types:[{
key:0,title:"All"},{key:"audio",title:"Music"},{key:"photo",title:"Photo"},{key:"video",title:"Video"}],initialize:function(){this.listenTo(this.model,"change:currentType",this.render)},serializeData:function(){return{currentType:s()(this.types).findWhere({key:this.model.get("currentType")}),types:this.types}},onClick:function(e){e.preventDefault();var t=l()(e.currentTarget).data("key");this.model.set("currentType",t)}});t.a=u},function(e,t,n){"use strict";var i=n(2694),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(14),c=n(8),u=n(21),d=o.a.ItemView.extend({
tagName:"ul",className:"dropdown-menu pull-right",template:a.a,events:{"click .local-player-btn":"onLocalPlayerClick","click .cast-player-btn":"onCastPlayerClick","click .plex-player-btn":"onPlexPlayerClick","click .now-playing-btn":"onNowPlayingClick"},initialize:function(e){e||(e={});var t=l.a("appModel");this.showNowPlaying=e.showNowPlaying,this.players=t.get("players"),this.listenTo(this.players,"update reset",this.render),this.listenTo(t,"change:isCastApiAvailable",this.render)},serializeData:function(){
var e=l.a("appModel"),t=e.get("isCastApiAvailable"),n=e.get("primaryPlayer");return{showNowPlaying:this.showNowPlaying,showCast:t,showPlayers:t||this.players.length,primaryPlayer:n?n.toJSON():null,nowPlaying:n?n.get("nowPlaying").toJSON():null,players:this.players.toJSON()}},onLocalPlayerClick:function(e){e.preventDefault();var t=l.a("appModel");t.set("primaryPlayer",null)},onCastPlayerClick:function(e){e.preventDefault(),c.a.trigger("cast:launch")},onPlexPlayerClick:function(e){e.preventDefault();
var t=s()(e.currentTarget).data("id"),n=this.players.get(t),i=l.a("appModel");i.set("primaryPlayer",n)},onNowPlayingClick:function(e){e.preventDefault();var t=l.a("appModel"),n=t.get("primaryPlayer"),i=n.get("nowPlaying"),a=s()(e.currentTarget).data("id"),r=i.get(a);u.a.execute("playMedia",{item:r})}});t.a=d},function(e,t,n){"use strict";var i=n(2697),a=n.n(i),r=n(10),s=r.a.ItemView.extend({id:"section-subset-dropdown",tagName:"span",className:"dropdown",template:a.a,collectionEvents:{reset:"render"
},initialize:function(){this.collection.populate({reset:!0,scope:"page"})},serializeData:function(){var e=this.collection.get(this.model.id)||this.model;return{showDropdown:this.collection.length>1,subsets:this.collection.toJSON(),currentSubset:e.toJSON(),serverID:this.model.server.id,sectionID:this.model.section.id}}});t.a=s},function(e,t,n){"use strict";var i=n(2698),a=n.n(i),r=n(10),s=n(1631),o=r.a.CompositeView.extend({id:"section-type-dropdown",tagName:"span",className:"dropdown",template:a.a,
itemView:s.a,itemViewContainer:".dropdown-menu",modelEvents:{"change:currentType":"render","change:currentSubset":"render"},serializeData:function(){return{currentType:this.model.get("currentType").toJSON()}},onRender:function(){var e=this.collection.length<2,t=this.model.get("allowAdvancedFilters"),n="all"!==this.model.get("currentSubset").id;this.$el.toggleClass("hidden",e||!t||n)}});t.a=o},function(e,t,n){"use strict";var i=n(2699),a=n.n(i),r=n(10),s=r.a.ItemView.extend({tagName:"li",template:a.a,
events:{"click a":"onClick"},onClick:function(e){e.preventDefault();var t=this.model.section,n=t.get("currentType");n.set("selected",!1),this.model.set("selected",!0),this.model.section.set("currentType",this.model)}});t.a=s},function(e,t,n){"use strict";var i=n(2629),a=n.n(i),r=n(10),s=n(1801),o=r.a.Layout.extend({template:a.a,id:"lyrics-dropdown",className:"dropup",ui:{lyricsBtn:".lyrics-btn"},regions:{lyricsRegion:".lyrics-dropdown"},events:{click:"onClick","click .lyrics-btn":"onLyricsClick",
"mousewheel .lyrics-dropdown":"onLyricsMouseWheel"},modelEvents:{"change:playQueueItem":"onPlayQueueItemChange","change:showLyrics change:canLyrics":"renderLyricsBtn"},onlyAfterRender:["renderLyrics","renderLyricsBtn"],getLyricsStreams:function(){return this.model.get("playQueueItem").get("lyricsStreams")},renderLyrics:function(){if(this.$el.hasClass("open")){var e=new s.a({model:this.model});this.lyricsRegion.show(e)}},renderLyricsBtn:function(){this.ui.lyricsBtn.toggleClass("hidden",!this.model.get("showLyrics")).toggleClass("disabled",!this.model.get("canLyrics"));
},onRender:function(){this.renderLyricsBtn()},onLyricsSelectedChange:function(e,t){t&&this.renderLyrics()},onPlayQueueItemChange:function(){this.$el.removeClass("open"),this.renderLyricsBtn()},onClick:function(e){e.wasLyricsClick||e.stopPropagation()},onLyricsClick:function(e){e.wasLyricsClick=!0,this.ui.lyricsBtn.isDisabled()||this.renderLyrics()},onLyricsMouseWheel:function(e){e.stopPropagation()}});t.a=o},function(e,t,n){"use strict";var i=n(2701),a=n.n(i),r=n(487),s=r.a.extend({template:a.a,serializeData:function(){
var e=this.model.get("preferences"),t=this.model.getSingleMetadataItem().get("preferences");return e.length?t.reduce(function(t,n){var i=e.get(n.id);return i?t.push(i.toJSON()):t.push(n.toJSON()),t},[]):t.toJSON()},flushChanges:function(){var e=this.ui.form,t=e.serializeArray(),n=this.model.getSingleMetadataItem().get("preferences"),i=this.model.get("preferences");t.forEach(function(e){var t=i.get(e.name)||n.get(e.name),a=t.clone();a.parseAndSetValue(e.value),a.get("value")!==t.get("value")&&i.add(a,{
merge:!0})})}});t.a=s},function(e,t,n){"use strict";var i=n(2706),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(61),d=n(49),h=n(1433),p=n(1679),f=c.a.Layout.extend({template:a.a,dragStatus:0,ui:{upload:".upload-artwork-container",urlInput:"input[name=url]"},regions:{list:".artwork-list-container"},events:{dragenter:"onDragEnter",dragleave:"onDragLeave",dragover:"onDragOver",drop:"onDrop",keydown:"onKeyDown","change .artwork-file-control":"onFileChange","click .upload-url-btn":"onUploadUrlClick",
"click .cancel-url-btn":"onCancelUrlClick","click .submit-url-btn":"onUrlSubmit","submit #upload-form":"onUrlSubmit","click .upload-back-btn":"onUploadBackClick","click .artwork-option":"onArtworkOptionClick"},initialize:function(e){this.type=e.type,this.metadataItem=this.model.getSingleMetadataItem(),this.changes={},this.collection=new h.a([],{server:this.model.server,section:this.model.section,parent:this.metadataItem,artworkType:this.type}),this.collection.fetch()},serializeData:function(){return{
showUpload:this.model.server.supports("artworkUpload"),showFileUpload:u.a.hasFileUpload}},flushChanges:function(){this.model.set(this.changes)},uploadFiles:function(e){if(e&&e.length){this.changes={},this.ui.upload.removeClass("show-success show-error");var t=this.collection.url(),n=s.a.extend(this.model.server.getXHROptions(t),{type:"POST",processData:!1}),i=[],a=s.a.bind(function(e){/image\//.test(e.type)&&(n.data=e,i.push(l.a.ajax(n)))},this);if(s.a.each(e,a),!i.length)return void this.ui.upload.addClass("show-error");
this.ui.upload.addClass("show-progress"),this.monitorUpload(l.a.when.apply(l.a,i))}},uploadUrl:function(e){this.changes={},this.ui.upload.removeClass("show-form"),this.ui.upload.addClass("show-progress"),this.ui.urlInput.val(""),e=this.collection.url()+"?url="+encodeURIComponent(e);var t=s.a.extend(this.model.server.getXHROptions(e),{type:"POST"});this.monitorUpload(l.a.ajax(t))},monitorUpload:function(e){e.done(s.a.bind(function(){this.isClosed||this.ui.upload.addClass("show-success");var e={server:this.model.server,
onlyIfCached:!0},t=new d.a({key:this.metadataItem.get("key")},e);s.a.isEmpty(t)||t.fetch(),this.collection.fetch()},this)),e.fail(this.whenRendered(function(){this.ui.upload.addClass("show-error")})),e.always(this.whenRendered(function(){this.ui.upload.removeClass("show-progress")}))},onRender:function(){this.list.show(new p.a({collection:this.collection,itemViewOptions:{artworkType:this.type}}))},onDragEnter:function(e){this.dragStatus++,this.ui.upload.addClass("drag-hover")},onDragLeave:function(e){
this.dragStatus--,0===this.dragStatus&&this.ui.upload.removeClass("drag-hover")},onDragOver:function(e){e.preventDefault()},onDrop:function(e){e.preventDefault(),e.stopPropagation(),this.dragStatus=0,this.ui.upload.removeClass("drag-hover"),this.uploadFiles(e.originalEvent.dataTransfer.files)},onKeyDown:function(e){27===e.which&&this.ui.upload.hasClass("show-form")&&(e.preventDefault(),this.ui.upload.removeClass("show-form"))},onFileChange:function(e){this.uploadFiles(e.target.files)},onUploadUrlClick:function(e){
e.preventDefault(),this.ui.upload.addClass("show-form"),this.ui.urlInput.focus()},onCancelUrlClick:function(e){e.preventDefault(),this.ui.upload.removeClass("show-form")},onUrlSubmit:function(e){e.preventDefault();var t=this.ui.urlInput.val();t?this.uploadUrl(t):this.ui.upload.removeClass("show-form")},onUploadBackClick:function(e){e.preventDefault(),this.ui.upload.removeClass("show-success show-error")},onArtworkOptionClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("ratingKey");
this.$(".artwork-option.selected").removeClass("selected"),t.addClass("selected"),this.changes[this.type]=n}});t.a=f},function(e,t,n){"use strict";var i=n(2709),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(75),d=n(1636),h=c.a.CompositeView.extend({template:a.a,className:"files",itemView:d.a,itemViewContainer:"ul",initialize:function(){this.collection=new u.a,this.populateParts().always(this.whenRendered(function(){this.$(".loading").addClass("hidden")}))},populateParts:function(){function e(e){
var n=e.get("Media");if(n&&n.length)return s.a.each(n,t),n}function t(e){s.a.each(e.Part,n)}function n(e){i.push(e)}var i=this.collection,a=this.model.getSingleMetadataItem();if(e(a))return l.a.Deferred().resolve();var r=a.populate().then(function(){if(!e(a)&&a.has("childrenKey")){var t=a.get("children"),n=t.get("metadataItems");if(!n.length)return t.populate().then(function(){n.each(e)});n.each(e)}});return r},flushChanges:function(){}});t.a=h},function(e,t,n){"use strict";var i=n(2710),a=n.n(i),r=n(10),s=r.a.ItemView.extend({
template:a.a,tagName:"li",className:"well",serializeData:function(){var e={file:this.model.get("file")};return e}});t.a=s},function(e,t,n){"use strict";var i=n(2717),a=n.n(i),r=n(2),s=n.n(r),o=n(14),l=n(149),c=n(795),u=c.a.extend({templatesByType:{movie:a.a,show:a.a,album:a.a,photo:a.a},serializeData:function(){var e=o.a("appModel"),t=e.get("user"),n=c.a.prototype.serializeData.apply(this,arguments);return s.a.extend(n,{showLabels:this.model.server.supports("labels"),labelsMinVersion:l.a.labels,hasContentFilterFeature:t.get("subscription").get("features").get("content_filter"),
plexPassUrl:t.server.get("plexPassUrl")}),n}});t.a=u},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(4),l=n(759),c=function(e,t){var i=s()(t),r=i.attr("name"),c=r.replace(/parentTitle$/,"parentRatingKey");c===r&&(c=null);var u,d=e.model.getQueryAttr(r),h=e.model.getQueryAttrSibling(r),p=d!==r,f=p?"title":r,g=p?"ratingKey":f,m=e.model.get("type");u=p?d.match(/(^.*)\./)[1]:"title"===f?m:null;var v=i.data("scopeToAttr"),y=i.data("scopeToParam"),b=i.data("ratingKey"),S=!b;b&&(b=b.toString());
var w=!p,M={};y&&e.listenTo(e,"reset_selectize:"+y,function(){L.loadedSearches={}});var I,C,D=e.model["original.updateValues."+r];D?(I=D.updateAttr,C=D.altUpdateAttr):(I=e.model.get(r),c&&(C=parseInt(e.model.get(c),10)),e.model["original.updateValues."+r]={updateAttr:I,altUpdateAttr:C});var T=e.model["original.general."+r];if(!T){T=[];var x={};x[f]=I,x.ratingKey=b,T=[x],e.model["original.general."+r]=T}var P=[e.model.get(c)||e.model.get(r)],E=function(){var e=L.$dropdown_content.children();L.$dropdown.toggleClass("hidden",e.length<=1);
},A=function(){a.a.defer(E)};i.data("autocompleteAttr",f),i.data("updateAttr",r),c&&i.data("altUpdateAttr",c);var L=i.selectize({options:T,items:P,plugins:["restore_on_focus"],delimiter:null,create:!0,maxItems:1,labelField:f,valueField:g,sortField:f,searchField:[f],selectOnTab:!0,hideSelected:!1,highlight:!1,openOnFocus:!0,selectOnBlur:!0,createOnBlur:!0,persist:!0,addPrecedence:!0,allowEmptyOption:!0,allowCreateEmpty:w,manualInputWidth:!0,loadingClass:"",onFocus:function(){L.preloaded||(L.preloaded=!0,
L.onSearchChange(L.$control_input.val()))},createFilter:function(e){M[f]=e;var t=a()(this.options).findWhere(M);return!t},load:function(t,n){if(!t.length)return void n();var i={};if(i[d]=t,v){var a=e.model.get(v);if(!a)return void n();i[y]=a}var r=new l.a([],{server:e.model.server,multiMetadataItem:e.model,query:i});r.fetch().done(function(e){n(e.map(function(e){return e.toJSON()})),E()})},render:{option:function(e,t){var i,a=c?e.ratingKey===String(C):e[f]===I;return i=a?'<small class="autocomplete-annotate pull-right">('+(u&&!S?n.i(o.default)("this {1}",u):n.i(o.default)("original value"))+")</small>":"",
"<div>"+t(e[f])+i+"</div>"},option_create:function(e,t){return e.input?'<div class="create">'+t(e.input)+"</div>":'<div class="create hidden"></div>'}},onDropdownClose:function(){L.$dropdown.addClass("hidden")},onDropdownOpen:function(){L.$dropdown.addClass("hidden"),A()},onType:a.a.bind(function(e){if(L.canCreate(e)){var t=s()(L.$dropdown_content[0].childNodes[0]);L.setActiveOption(t)}A(),this.onLockableFieldChange({currentTarget:L.$input,force:!0})},e),onOptionAdd:function(e,t){var n=a.a.pick(t,f,"ratingKey"),i=a.a.findWhere(T,n);
i||T.splice(T.length,0,t)},onChange:function(t){var n=this.options[t];if(n){if(p){var s=n.ratingKey===n[f];i.data("isText",s)}e.flushChanges();var o=e.model.changedAttributes();a.a.has(o,d)||a.a.has(o,h)?e.trigger("focusSubmit"):a.a.defer(function(){L.onBlur()}),e.trigger("reset_selectize:"+r),E()}}})[0].selectize;L.$dropdown.addClass("hidden")};t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(4),l=n(36),c=n(318),u=n(759),d=function(e,t){var i=s()(t),r=i.data("name"),d=i.data("query")||i.data("name"),h=i.data("attr"),p=e.model.get(h).toJSON(),f=a.a.pluck(p,"tag"),g=e.model["original.tag."+r];
g||(g=a.a.clone(p),e.model["original.tag."+r]=g);var m=a.a.difference(f,a.a.pluck(g,"tag"));if(m.length){var v=a.a.map(m,function(e){return{tag:e}});v.unshift(g.length,0),g.splice.apply(g,v)}var y=function(t){e.model["original.allTagsRequested."+r]=!0;var n=new c.a({filter:r,filterType:"string"},{server:e.model.server,section:e.section,type:l.a.get(e.model.get("type")).id}),i=n.get("options");i.populate().then(a.a.bind(function(n){e.model["original.allTagsAvailable."+r]=!0,t(n.map(function(e){return{
tag:e.attributes.title}}))},e))};i.data("original-value",i.val()),i.selectize({options:g,items:f,plugins:["remove_button"],create:!0,labelField:"tag",valueField:"tag",sortField:"tag",searchField:["tag"],highlight:!1,createFilter:function(e){var t=a()(this.options).findWhere({tag:e});return!t},onChange:function(){e.onLockableFieldChange(i)},onFocus:function(){this.onSearchChange("")},loadingClass:"",load:function(t,n){var i=!(d!==r||t.length&&e.canAutocomplete);if(i)return void(e.model["original.allTagsRequested."+r]?n():y.call(e,n));
var a=e.model["original.allTagsAvailable."+r]||0===t.length;if(a)return void n();var s={};s[d]=t;var o=new u.a([],{server:e.model.server,multiMetadataItem:e.model,query:s}),l=d===r?function(e){return e.toJSON()}:function(e){return{tag:e.get(d)}};o.fetch().done(function(e){var t=e.map(l);n(t)}).fail(function(){n()})},render:{item:function(e,t){var i=e.tag?t(e.tag):'<span class="autocomplete-annotate">('+n.i(o.default)("blank")+")</span>";return'<div class="item">'+i+"</div>"},option:function(e,t){
var i;return i=e.tag?t(e.tag):'<small class="autocomplete-annotate">('+n.i(o.default)("blank")+")</small>",'<div class="item">'+i+"</div>"}}})};t.a=d},function(e,t,n){"use strict";var i=n(2863),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(21),u=n(224),d=n(1649),h=n(1641),p=u.a.extend({template:a.a,ui:s.a.extend({sectionAgent:"#edit-section-agent",sectionScanner:"#edit-section-scanner",thumbnailsCheckbox:'input[name="enableBIFGeneration"]',agentGroup:".agent-group",scannerGroup:".scanner-group"},u.a.prototype.ui),
events:{"change #edit-section-agent":"onEditSectionAgentChange","change #edit-section-scanner":"onEditSectionScannerChange","click .delete-thumbnails-btn":"onThumbnailsDeleteClick"},regions:{sectionSettingsRegion:".section-settings-region",agentSettingsRegion:".section-agent-settings-region"},onlyAfterRender:["renderSectionAgent","renderSectionScanner","renderSectionSettings","renderSectionAgentSettings"].concat(u.a.prototype.onlyAfterRender),initialize:function(){this.populateCollections()},onRender:function(){
this.model.agents.populate(),this.model.scanners.populate()},validate:function(e){var t=[];return e.get("agent")||t.push("agent"),e.get("scanner")||t.push("scanner"),t},renderSectionSettings:function(){var e=new d.a({model:this.model,collection:this.model.settings,hideSettings:["enableAutoPhotoTags"]});this.sectionSettingsRegion.show(e)},renderSectionAgentSettings:function(){var e=new h.a({model:this.model,collection:this.model.agentSettings});this.agentSettingsRegion.show(e)},populateCollections:function(){
var e=this.populateAgents(),t=this.populateScanners(),n=this.populateSectionSettings(),i=this.populateSectionAgentSettings();return this.populateAgentsProxy(),this.populateScannersProxy(),e.then(s.a.bind(this.onAgentsPopulate,this)),t.then(s.a.bind(this.onScannersPopulate,this)),n.then(s.a.bind(this.renderSectionSettings,this)),i.then(s.a.bind(this.renderSectionAgentSettings,this)),l.a.when(e,t,n,i).then(s.a.bind(this.validate,this,this.model))},renderSectionAgent:function(){var e=this.model.agentsProxy,t=this.createMenuOptions(e.map(function(e){
return{label:e.get("name"),value:e.get("identifier")}}),this.model.get("agent"));this.ui.sectionAgent.html(t),e.length>1&&this.ui.agentGroup.removeClass("hidden")},renderSectionScanner:function(){var e=this.model.scannersProxy,t=this.createMenuOptions(e.map(function(e){return{label:e.get("name"),value:e.get("name")}}),this.model.get("scanner"));this.ui.sectionScanner.html(t),e.length>1&&this.ui.scannerGroup.removeClass("hidden")},onEditSectionAgentChange:function(e){var t=l()(e.currentTarget),n=t.val();
this.model.set("agent",n),this.agentSettingsRegion.close();var i=this.model.agents.get(n);if(i){var a=i.get("languages"),r=this.model.get("language");a.get(r)||this.model.set("language",a.first().get("code")),this.model.agentSettings=null,this.populateSectionAgentSettings().then(s.a.bind(this.renderSectionAgentSettings,this))}this.showValidationResult(this.validate(this.model))},onEditSectionScannerChange:function(e){var t=l()(e.currentTarget);this.model.set("scanner",t.val()),this.showValidationResult(this.validate(this.model));
},onAgentsPopulate:function(e){this.renderSectionAgent()},onScannersPopulate:function(e){this.renderSectionScanner()},onThumbnailsDeleteClick:function(e){e.preventDefault();var t=c.a.execute("deleteSectionThumbnails",{section:this.model});t.done(this.whenRendered(function(){this.ui.thumbnailsCheckbox.prop("checked",!1)}))}});t.a=p},function(e,t,n){"use strict";var i=n(2722),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=o.a.ItemView.extend({template:a.a,events:{"change input[name]":"onInputChange","change select[name]":"onInputChange"
},initialize:function(){this.changes={}},serializeData:function(){return{settings:this.collection.toJSON(),agentName:this.model.agents.get(this.model.get("agent")).get("name")}},onInputChange:function(e){var t=s()(e.currentTarget),n=t.is(":checkbox")?t.prop("checked"):t.val(),i=this.collection.findWhere({id:t.attr("name")});i.set("value",n)}});t.a=l},function(e,t,n){"use strict";var i=n(2723),a=n.n(i),r=n(224),s=r.a.extend({template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(2864),s=n.n(r),o=n(5),l=n.n(o),c=n(732),u=n(333),d=n(8),h=n(645),p=n(224),f=n(1646),g=n(1742),m=p.a.extend({
template:s.a,fieldNames:["Location"],regions:{pathsRegion:".paths-region"},ui:a()({},p.a.prototype.ui,{addFolderBtn:".add-folder-btn",addFolderPopulating:".add-folder-populating",addFolderError:".add-folder-error"}),events:{"click .add-folder-btn":"onAddFolderClick","change input[name=path]":"onFolderChange"},onlyAfterRender:["renderSectionLocation","updateAddFolderBtn"].concat(p.a.prototype.onlyAfterRender),initialize:function(){this.listenTo(this.model.get("locations"),{add:this.onCollectionChange,
remove:this.onCollectionChange}),this.renderSectionLocation(),this.startCheckingPersonalCloudServerDriveCacheUpdateStatus(),this.updateAddFolderBtn(),this.showValidationResult(this.validate(this.model))},serializeData:function(){return{isPersonalCloudServerDriveCachePending:this.isPersonalCloudServerDriveCachePending}},validate:function(e){var t=[];return e.get("locations").length||t.push("locations"),t},renderSectionLocation:function(){var e=new f.a({collection:this.model.get("locations")});this.pathsRegion.show(e);
},updateAddFolderBtn:function(){var e=!this.isPersonalCloudServerDriveCachePending,t=!!this.personalCloudServerDriveCacheError;this.ui.addFolderBtn.toggleClass("hidden",!e),this.ui.addFolderError.toggleClass("hidden",e||!t),this.ui.addFolderPopulating.toggleClass("hidden",e||t)},startCheckingPersonalCloudServerDriveCacheUpdateStatus:function(){var e=this;this.isPersonalCloudServerDriveCachePending=null,this.personalCloudServerDriveCacheError=null;var t=this.model.server;if(t.get("isPersonalCloudServer")){
this.isPersonalCloudServerDriveCachePending=!0,this.cancelPersonalCloudServerDriveCacheRetryDeferred=a;var i=new h.a({},{server:t}),a=l.a.Deferred(),r=n.i(c.a)(function(){return i.fetchAndNotUpdating()},{times:100,delay:2e3,cancel:a.promise()});n.i(u.a)(r,500).done(function(){e.isPersonalCloudServerDriveCachePending=!1}).fail(function(){e.personalCloudServerDriveCacheError=!0}).always(function(){e.cancelPersonalCloudServerDriveCacheRetryDeferred=null,e.updateAddFolderBtn()})}},onCollectionChange:function(){
this.showValidationResult(this.validate(this.model))},onAddFolderClick:function(e){e.preventDefault();var t=new g.a({server:this.model.server});this.listenToOnce(t,"add:folder",this.onAddFolder),d.a.trigger("show:modal",t)},onAddFolder:function(e){if(e){var t={path:e};this.model.get("locations").findWhere(t)||this.model.get("locations").add(t)}},onFolderChange:function(e){var t=l()(e.currentTarget),n=t.prop("defaultValue"),i=t.val();if(!i)return void t.val(n);var a=this.model.get("locations").findWhere({
path:n});a.set("path",i),t.prop("defaultValue",i)},onClose:function(){this.cancelPersonalCloudServerDriveCacheRetryDeferred&&this.cancelPersonalCloudServerDriveCacheRetryDeferred.resolve()}});t.a=m},function(e,t,n){"use strict";var i=n(224),a=n(2865),r=n.n(a),s=n(1647),o=n(1648),l=i.a.extend({template:r.a,regions:{options:".section-options"},onRender:function(){"photos"===this.model.sectionType.key?this.options.show(new o.a({model:this.model})):this.options.show(new s.a({model:this.model}))}});t.a=l;
},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(2866),s=n.n(r),o=n(10),l=o.a.ItemView.extend({template:s.a,className:"row",events:{"click .remove-path-btn":"onRemovePathClick"},serializeData:function(){return a()({},o.a.ItemView.prototype.serializeData.apply(this,arguments),{canEditPath:!this.model.server.get("isPersonalCloudServer")})},onRemovePathClick:function(e){e.preventDefault(),this.model.trigger("destroy",this.model,this.model.collection)}});t.a=l},function(e,t,n){"use strict";var i=n(10),a=n(1645),r=i.a.CollectionView.extend({
itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2867),a=n.n(i),r=n(5),s=n.n(r),o=n(14),l=n(8),c=n(224),u=n(493),d=c.a.extend({template:a.a,ui:{chooseLibrary:".choose-library"},events:{"click .choose-library":"onChooseLibraryClick"},modelEvents:{"change:agent":"onSectionAgentChange","change:scanner":"onSectionScannerChange"},onlyAfterRender:["updateSelectedOffering"],initialize:function(){this.hasPremiumMusic=this.model.server.hasOwnerFeature("premium_music_metadata"),this.updateSelectedOffering();
},serializeData:function(){var e=o.a("appModel"),t=e.get("user"),n={hasPremiumMusic:this.hasPremiumMusic,plexPassUrl:t.server.get("plexPassUrl"),hasLyrics:this.model.server.get("transcoderLyrics")};return n},updateSelectedOffering:function(){var e=this.model.get("agent"),t=this.model.get("scanner");this.ui.chooseLibrary.find("input").prop("checked",!1);var n=this.ui.chooseLibrary.filter('[data-agent="'+e+'"][data-scanner="'+t+'"]').find("input");n.length||(n=this.ui.chooseLibrary.not("[data-agent][data-scanner]").find("input")),
n.prop("checked",!0)},onChooseLibraryClick:function(e){var t=s()(e.currentTarget),n=t.data("agent"),i=t.data("scanner");return!n&&!i||this.hasPremiumMusic?(this.model.agentSettings=null,void this.model.set({agent:n||this.getSectionType().defaultAgent,scanner:i||this.getSectionType().defaultScanner})):void l.a.trigger("show:modal",new u.a({model:this.model.server}))},onSectionAgentChange:function(){this.updateSelectedOffering()},onSectionScannerChange:function(){this.updateSelectedOffering()}});t.a=d;
},function(e,t,n){"use strict";var i=n(10),a=n(2868),r=n.n(a),s=n(14),o=n(8),l=n(493),c=i.a.Layout.extend({template:r.a,ui:{usePremium:".use-premium-library input",useBasic:".use-basic-library input"},events:{"click .use-premium-library":"onChoosePremiumClick","click .use-basic-library":"onChooseBasicClick"},onlyAfterRender:["updateSelectedOffering"],initialize:function(){this.hasPremiumPhotos=this.model.server.hasOwnerFeature("photo_autotags"),this.updateSelectedOffering()},serializeData:function(){
var e=s.a("appModel"),t=e.get("user"),n={hasPremiumPhotos:this.hasPremiumPhotos,plexPassUrl:t.server.get("plexPassUrl")};return n},updateSelectedOffering:function(){var e=this.model.get("enableAutoPhotoTags");this.ui.usePremium.prop("disabled",!1),this.ui.useBasic.prop("disabled",!1),this.ui.usePremium.prop("checked",!!e),this.ui.useBasic.prop("checked",!e)},onChoosePremiumClick:function(e){this.hasPremiumPhotos?this.model.set("enableAutoPhotoTags",!0):o.a.trigger("show:modal",new l.a({model:this.model.server
})),this.updateSelectedOffering()},onChooseBasicClick:function(e){this.model.set("enableAutoPhotoTags",!1),this.updateSelectedOffering()}});t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(2869),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=c.a.ItemView.extend({template:s.a,events:{"change [name]":"onEditSectionSettingInputChange"},initialize:function(e){this.hideSettings=e.hideSettings},serializeData:function(){function e(e){return!a.a.contains(t,e.get("id"))}var t=this.hideSettings,n=this.model.settings.filter(e).map(function(e){
return e.toJSON()});return{settings:n,edit:!this.model.isNew()}},onEditSectionSettingInputChange:function(e){var t=l()(e.currentTarget),n=t.attr("name");if("importFromiTunes"===n)return void this.model.set(n,!0);var i=t.is(":checkbox")?t.prop("checked"):t.val(),a=this.collection.findWhere({id:n});a.set("value",i)}});t.a=u},function(e,t,n){"use strict";var i=n(2870),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(104),u=n(126),d=n(224),h=d.a.extend({template:a.a,ui:s.a.extend({sectionTypes:".wizard-block",
sectionTitle:"#edit-section-title",sectionLanguage:"#edit-section-language"},d.a.prototype.ui),modelEvents:{"change:type":"onSectionTypeChange","change:title":"onSectionTitleChange","change:language":"onSectionLanguageChange"},events:{"click .section-type":"onSectionTypeClick","keyup #edit-section-title":"onEditSectionTitleChange","change #edit-section-title":"onEditSectionTitleChange","change #edit-section-language":"onEditSectionLanguageChange"},onlyAfterRender:["renderSectionLanguage","updateSectionTypesWizardBlocks","updateSectionLanguage","updateSectionTitle"].concat(d.a.prototype.onlyAfterRender),
initialize:function(e){this.populateCollections(),this.isDefaultSection=e.isDefaultSection},serializeData:function(){var e=d.a.prototype.serializeData.apply(this,arguments);e.sectionTypes=c.a.getAll();var t=this.getSectionType();t&&(e.currentSectionKey=t.key);var i=this.model.get("updatedAt");return i&&(e.updatedAt=n.i(u.a)(i)),e.canChangeType=this.model.isNew()&&!this.isDefaultSection,e.hasType=!!this.model.get("type"),e},validate:function(e){var t=[];return e.get("type")||t.push("type"),e.get("title")||t.push("title"),
e.get("language")||t.push("language"),t},populateCollections:function(){var e=this.populateAgents(),t=this.populateScanners(),n=this.getSectionType(),i=l.a.when(n,e,t,this.model.server.get("myPlexSubscription")&&this.model.server.supports("premiumMusic"));return this.model.isNew()&&(i=i.then(s.a.bind(this.model.setAgentAndScanner,this.model))),i=i.then(e).then(s.a.bind(this.onAgentsPopulate,this)).then(s.a.bind(function(){this.showValidationResult(this.validate(this.model))},this))},renderSectionLanguage:function(){
var e=this.model.get("language"),t=this.model.agents.get(this.model.get("agent")),n=t.get("languages");if(!n.get(e)){var i=this.model.get("type"),a=c.a.get(i),r=a.defaultLanguage;this.model.set("language",r,{silent:!0}),e=r}var s=n.map(function(e){return{label:e.get("name"),value:e.id}});this.updateSectionLanguage(),this.ui.sectionLanguage.html(this.createMenuOptions(s,e))},updateSectionTypesWizardBlocks:function(){this.ui.sectionTypes.removeClass("selected"),this.ui.sectionTypes.filter('[data-key="'+this.model.get("type")+'"]').addClass("selected"),
this.$el.addClass("section-type-chosen")},updateSectionLanguage:function(){this.ui.sectionLanguage.val(this.model.get("language"))},updateSectionTitle:function(){var e=this.ui.sectionTitle.val(),t=this.model.get("title");e!==t&&this.ui.sectionTitle.val(t)},onSectionTypeClick:function(e){e.preventDefault();var t=l()(e.currentTarget);if(t.hasClass("selectable")){var n=t.data("key"),i={type:n},a=c.a.get(n);this.model.get("title")||(i.title=a.title),this.model.set(i)}},onEditSectionTitleChange:function(e){
var t=l()(e.currentTarget);this.model.set("title",t.val()),this.showValidationResult(this.validate(this.model))},onEditSectionLanguageChange:function(e){var t=l()(e.currentTarget);this.model.set("language",t.val()),this.showValidationResult(this.validate(this.model))},onSectionTypeChange:function(e,t){this.updateSectionTypesWizardBlocks();var n=c.a.get(t);if(!this.model.get("language")){var i=n.defaultLanguage;this.model.set("language",i)}var a=this.model.get("title"),r=this.model.previous("type"),s=c.a.get(r),o=s&&s.title;
a&&a!==o||this.model.set("title",n.title),this.setSectionType(n),this.model.agents=null,this.model.scanners=null,this.model.settings=null,this.populateCollections()},onSectionTitleChange:function(e,t){this.updateSectionTitle(),this.showValidationResult(this.validate(this.model))},onSectionLanguageChange:function(e,t){this.updateSectionLanguage()},onAgentsPopulate:function(e){this.renderSectionLanguage()}});t.a=h},function(e,t,n){"use strict";var i=n(244),a=n.n(i),r=n(1306),s=r.a.extend({className:"container",
template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(244),a=n.n(i),r=n(1308),s=r.a.extend({className:"container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(244),a=n.n(i),r=n(4),s=n(1309),o=s.a.extend({className:"container",template:a.a,serializeData:function(){return{title:n.i(r.default)("You don't have any media servers yet."),subtitle:n.i(r.default)("{1}Download and install{2} one and try again.",'<a href="https://plex.tv/downloads" target="_blank">',"</a>")}}});t.a=o},function(e,t,n){
"use strict";var i=n(244),a=n.n(i),r=n(1310),s=r.a.extend({className:"container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(244),a=n.n(i),r=n(1311),s=r.a.extend({className:"container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2724),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(8),c=o.a.ItemView.extend({className:"filter-bar filter-bar-fixed",template:a.a,events:{"click .clear-filters-btn":"onClearFiltersClick"},serializeData:function(){var e=this.model.get("currentFilters"),t=[];
return s.a.each(e,function(e){t.push(e.titles.join(", "))}),{titles:t.join(", ")}},onClearFiltersClick:function(e){e.preventDefault();var t=this.model.get("currentFilters");t.length=0,this.model.trigger("change:currentFilters",this.model,t),l.a.trigger("navigate","section",{serverID:this.model.server.id,sectionID:this.model.id,subset:this.model.get("subset"),trigger:!1})}});t.a=c},function(e,t,n){"use strict";var i=n(40),a=n(1658),r=i.a.extend({tagName:"ul",className:"list card-list alert-list",itemView:a.a,
reversed:!0});t.a=r},function(e,t,n){"use strict";var i=n(2725),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(4),c=o.a.ItemView.extend({tagName:"li",className:"card-collapsed striped-list-item alert-list-item",template:a.a,serializeData:function(){var e=this.model.toJSON(),t={serverID:this.model.server.id,serverName:s.a.escape(this.model.server.get("friendlyName")),itemKey:"/library/metadata/"+this.model.get("itemID"),event:e};if(e.label=s.a.escape(e.label),e.value=s.a.escape(e.value),"playing"===e._type&&(e.username=s.a.escape(e.username),
e.title=s.a.escape(e.title),e.player=s.a.escape(e.player)),"timeline"===e._type)switch(e.sectionTitle=this.model.get("section")?this.model.get("section").get("title"):"section "+this.model.get("sectionID"),e.mediaTitle=this.model.get("title")||"an item",this.model.get("state")){case 0:e.stateString=n.i(l.default)("Created");break;case 1:e.stateString=n.i(l.default)("Progress for");break;case 2:e.stateString=n.i(l.default)("Matching");break;case 3:e.stateString=n.i(l.default)("Downloading metadata for");
break;case 4:e.stateString=n.i(l.default)("Loading metadata for");break;case 5:e.stateString=n.i(l.default)("Finished processing");break;case 6:e.stateString=n.i(l.default)("Analyzing");break;case 9:e.stateString=n.i(l.default)("Deleted")}return t}});t.a=c},function(e,t,n){"use strict";var i=n(40),a=n(1661),r=n(1660),s=i.a.extend({tagName:"ul",className:"tile-list session-tile-list",itemView:a.a,emptyView:r.a});t.a=s},function(e,t,n){"use strict";var i=n(2726),a=n.n(i),r=n(10),s=r.a.ItemView.extend({
template:a.a});t.a=s},function(e,t,n){"use strict";function i(e){var t=o.a.findWhere(e,{selected:!0});return t||o.a.first(e)}var a=n(2727),r=n.n(a),s=n(2),o=n.n(s),l=n(4),c=n(693),u=n(39),d=n(713),h=n(733),p=n(336),f=n(21),g=n(137),m=n(54),v=g.a.extend({className:"poster-item session-tile-list-item",template:r.a,screenshotPreferredIndex:"hd",screenshotInterval:null,screenshotIntervalDelay:2e3,screenshotCount:0,ui:{poster:".media-poster",posterFade:".media-poster-fade",userPoster:".user-poster"},events:o.a.extend({
"click .info-btn":"onInfoClick","click .close-btn":"onInfoClick"},g.a.prototype.events),modelEvents:{"change:viewOffset":"onViewOffsetChange","change:Player":"onPlayerChange"},initialize:function(e){g.a.prototype.initialize.apply(this,arguments);var t=this.getScreenshotUrl(this.model.get("Media"));this.image=new m.a({model:this.model,modelAttribute:"ratingKey",type:"clip",getUrl:this.getPosterUrl,width:350,url:t?t:null}),this.userImage=new m.a({model:this.model,modelAttribute:"User",type:"friend",
getUrl:this.getUserPosterUrl,width:44}),this.posterFade=new m.a({model:this.model,modelAttribute:"Media",type:"clip",getUrl:o.a.bind(this.getScreenshotUrl,this),width:350});var n=this.model.get("Player");n&&n.state===u.a.states.PLAYING&&(this.screenshotInterval=setInterval(o.a.bind(this.updateScreenshot,this),this.screenshotIntervalDelay)),this.listenTo(this.model,"change:Player",this.onPlayerChange)},getPosterUrl:function(e){var t=this.model;return"photo"===t.get("type")?t.get("thumb"):t.get("art")||t.get("parentArt")||t.get("grandparentArt")||t.get("thumb");
},getUserPosterUrl:function(e){return e&&e.thumb},getScreenshotUrl:function(e){var t=o.a.first(e);if(t){var i=this.model.get("viewOffset")||0,a=this.screenshotCount*this.screenshotIntervalDelay+i+4e3;return n.i(d.a)(t,a,this.screenshotPreferredIndex)}},updateScreenshot:function(){if(this.screenshotCount++,this.posterFade){var e=this.posterFade.screenshotUrl,t=this.getScreenshotUrl(this.model.get("Media"));t&&(this.posterFade.screenshotUrl=t,this.posterFade.load(t).done(this.whenRendered(function(t){
this.posterFade.showImage(t),this.ui.posterFade.removeClass("invisible"),this.posterFadeDelay=o.a.delay(this.whenRendered(function(){if(this.image.showImage(t),this.ui.posterFade.addClass("invisible"),e){var n=this.posterFade.cache,i=this.image.getTranscodeUrl(e),a=n.get(n.getItemCacheKey({url:i}));a&&n.remove(a)}}),800)})))}},bindings:o.a.extend({},g.a.prototype.bindings,{".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=g.a.prototype.bindings[".media-subtitle-1"].formatter.apply(this,arguments),n=g.a.prototype.bindings[".media-subtitle-2"].formatter.call(this,this.model.get("index"));
return n?n+" "+t:t}},".device-icon":{modelAttribute:"Player",manual:!0,formatter:function(e,t){var n=c.a.getIcon(e.platform||e.product);t.attr("src",n)}},".session-player":{modelAttribute:"Player",formatter:function(e){return e.title}},".session-state":{modelAttribute:"Player",formatter:function(e){return n.i(h.a)(e.state)}},".session-transcode":{modelAttribute:"TranscodeSession",formatter:function(e){return e?n.i(l.default)("Transcoding"):n.i(l.default)("Direct Play")}},".session-transcode-throttled":{
modelAttribute:"TranscodeSession",autohide:!0,formatter:function(e){return e&&"1"===e.throttled?n.i(l.default)("(throttled)"):""}},".session-transcode-video-decision":{modelAttribute:"TranscodeSession",formatter:function(e,t){var a=!(!e||!e.videoCodec);if(t.parent().toggleClass("hidden",!a),a){if("copy"===e.videoDecision)return n.i(l.default)("Direct Stream");var r=i(this.model.get("Media")),s=n.i(p.default)(r.videoCodec)+(e.transcodeHwDecoding?" (hw)":""),o=n.i(p.default)(e.videoCodec)+(e.transcodeHwEncoding?" (hw)":"");
return n.i(l.default)("Transcoding {sourceCodec} to {targetCodec}",{sourceCodec:s,targetCodec:o})}return""}},".session-transcode-audio-decision":{modelAttribute:"TranscodeSession",formatter:function(e,t){var a=!(!e||!e.audioCodec);if(t.parent().toggleClass("hidden",!a),a){if("copy"===e.audioDecision)return n.i(l.default)("Direct Stream");var r=i(this.model.get("Media")),s=n.i(p.default)(r.audioCodec),o=n.i(p.default)(e.audioCodec);return n.i(l.default)("Transcoding {sourceCodec} to {targetCodec}",{
sourceCodec:s,targetCodec:o})}return""}},".session-username":{modelAttribute:"User",formatter:function(e){return e.title}}}),onRender:function(){g.a.prototype.onRender.apply(this,arguments),this.userImage.setElement(this.ui.userPoster),this.posterFade.setElement(this.ui.posterFade)},onClose:function(){g.a.prototype.onClose.call(this),clearTimeout(this.posterFadeDelay),clearInterval(this.screenshotInterval),this.posterFade&&this.posterFade.close()},onViewOffsetChange:function(e,t){this.screenshotCount=0;
},onPlayerChange:function(e,t){t&&(t.state!==u.a.states.PLAYING&&this.screenshotInterval?(this.screenshotInterval=clearInterval(this.screenshotInterval),this.screenshotCount=0):t.state!==u.a.states.PLAYING||this.screenshotInterval||(this.screenshotInterval=setInterval(o.a.bind(this.updateScreenshot,this),this.screenshotIntervalDelay)))},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),f.a.execute("playMedia",{item:this.model,offset:this.model.get("viewOffset")})},onInfoClick:function(e){
e.preventDefault(),e.stopImmediatePropagation(),this.$el.toggleClass("dim")}});t.a=v},function(e,t,n){"use strict";var i=n(40),a=n(1663),r=i.a.extend({tagName:"ul",className:"tile-list media-tile-list sync-tile-list show-context",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2728),a=n.n(i),r=n(2),s=n.n(r),o=n(47),l=n(10),c=n(4),u=n(8),d=n(181),h=n(211),p=n(21),f=n(1455),g=n(54),m=n(466),v=n(1754),y=n(810),b=l.a.Layout.extend({tagName:"li",className:"poster-item media-tile-list-item sync-tile-list-item",
template:a.a,metadataItemsDelay:5e3,ui:{poster:".media-poster",transcodeStatus:".sync-status-transcode",transcodeTimeRemaining:".media-context",statusIcons:".sync-status-icon",completeIcon:".sync-complete-icon",waitingIcon:".sync-waiting-icon",processingIcon:".sync-processing-icon",failedIcon:".sync-failed-icon",unknownIcon:".sync-unknown-icon"},regions:{transcodeProgress:".sync-status-transcode"},events:{"click a":"onClick","click .edit-btn":"onEditClick","click .delete-btn":"onDeleteClick"},onlyAfterRender:["onMetadataItemsReset","onMediaChange","onTranscodeJobsReset"],
initialize:function(e){this.server=e.server,this.model.parent=this.server,this.type=this.model.get("metadataType"),this.contentType=this.model.get("contentType");var t=this.type,n=this.contentType,i=150;"episode"===t?t="show":"clip"===t||"userPlaylistItem"===t?i=250:"directory"===t&&(t="audio"===n?"track":"photo"===n?"photo":"movie"),this.$el.addClass(t),this.image=new g.a({server:this.server,type:t,width:i}),this.progressModel=new o.a.Model({current:0});var a=this.server.get("desktop").get("transcodeJobs");
this.metadataItems=new f.a([],{server:this.server,device:this.model.device,syncItemId:this.model.id}),this.listenTo(this.metadataItems,"reset",this.onMetadataItemsReset),this.listenTo(a,"reset",this.onTranscodeJobsReset),this.metadataItems.fetch({reset:!0}),this.server.supports("syncNotifications")?this.listenTo(this.metadataItems,"change:Media",this.onMediaChange):this.metadataItemsInterval=setInterval(s.a.bind(function(){this.metadataItems.fetch({reset:!0})},this),this.metadataItemsDelay)},serializeData:function(){
return{syncItem:this.model.toJSON(),isCloudSync:this.model.device.get("isCloudSync"),isFailure:!!this.model.get("status").get("failure")}},getPosterUrl:function(e){var t=e.get("thumb");return this.hasMultipleItems?this.hasSameParents?e.get("parentThumb")||e.get("grandparentThumb")||t:this.hasSameGrandparents?e.get("grandparentThumb")||e.get("parentThumb")||t:void 0:t},updatePoster:function(e){if(this.hasPoster=!0,!e){var t=this.metadataItems.first();if(!t)return;e=this.getPosterUrl(t)}this.image.url!==e&&(this.image.src=null,
this.image.url=e,this.image.render())},analyzeParts:function(e){if(this.model.get("status").get("failure"))return"failed";var t=e.models,n=t.length;if(!n)return"unknown";for(var i="complete",a=[],r=[],o=0;o<n;o++){var l=t[o],c=l.get("Media");if(a.push(l.get("grandparentKey")),r.push(l.get("parentKey")),c.length||(i="unknown"),"failed"!==i&&"unknown"!==i)for(var u=0,h=c.length;u<h;u++)for(var p=c[u].Part,f=0,g=p.length;f<g;f++){var m=p[f],v=d.a.getSyncStateFromPart(m);d.a.failedRegex.test(v)&&(i="failed"),
d.a.processingRegex.test(v)&&(i="processing"),d.a.waitingRegex.test(v)&&"processing"!==i&&(i=m.key?"waiting":"processing")}}return this.hasMultipleItems=n>1,this.hasSameGrandparents=1===s.a.compact(s.a.uniq(a)).length,this.hasSameParents=1===s.a.compact(s.a.uniq(r)).length,this.hasPoster||this.updatePoster(),i},bindings:{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"rootTitle"}},onRender:function(){this.image.setElement(this.ui.poster),this.transcodeProgress.append(new m.a({
model:this.progressModel,size:56}))},onClose:function(){clearInterval(this.metadataItemsInterval)},onMetadataItemsReset:function(e){var t=this.analyzeParts(e);if(this.ui.statusIcons.addClass("hidden"),this.ui.transcodeStatus.hasClass("hidden"))switch(t){case"complete":this.ui.completeIcon.removeClass("hidden");break;case"waiting":this.ui.waitingIcon.removeClass("hidden");break;case"processing":this.ui.processingIcon.removeClass("hidden");break;case"failed":this.ui.failedIcon.removeClass("hidden");
break;default:this.ui.unknownIcon.removeClass("hidden")}},onMediaChange:function(e,t){this.onMetadataItemsReset(this.metadataItems)},onTranscodeJobsReset:function(e){var t=e.where({syncItemId:this.model.id});if(!t.length)return this.ui.transcodeStatus.hasClass("hidden")||(this.ui.transcodeStatus.addClass("hidden"),this.ui.waitingIcon.removeClass("hidden")),this.ui.transcodeTimeRemaining.text(""),void this.updatePoster();var i=t[0],a=i.get("progress");if(this.ui.statusIcons.addClass("hidden"),a>0){
this.ui.transcodeStatus.removeClass("hidden");var r=i.get("type"),s=n.i(h.a)(i.get("remaining"));if(this.progressModel.set("progress",a),"download"===r)this.progressModel.set("text",a.toString()+"%"),this.ui.transcodeTimeRemaining.text(n.i(c.default)("Downloading"));else if("upload"===r)this.progressModel.set("text",a.toString()+"%"),this.ui.transcodeTimeRemaining.text(n.i(c.default)("Uploading"));else{var o=i.get("speed");if(o){var l=Math.round(10*i.get("speed"))/10;l>10&&(l=Math.round(l)),this.progressModel.set("text",l.toString()+"x");
}else this.progressModel.set("text","");this.ui.transcodeTimeRemaining.text(s)}this.updatePoster(i.get("thumb"))}else this.ui.transcodeStatus.addClass("hidden"),this.ui.processingIcon.removeClass("hidden")},onClick:function(e){e.preventDefault(),u.a.trigger("show:modal",new v.a({model:this.model,collection:this.metadataItems}))},onEditClick:function(e){e.stopImmediatePropagation(),e.preventDefault(),u.a.trigger("show:modal",new y.a({model:this.model}))},onDeleteClick:function(e){e.stopImmediatePropagation(),
e.preventDefault(),p.a.execute("deleteSyncItem",{syncItem:this.model,server:this.server})}});t.a=b},function(e,t,n){"use strict";var i=n(40),a=n(1665),r=i.a.extend({tagName:"ul",className:"list sync-status-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2729),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(4),c=n(181),u=n(211),d=n(54),h=o.a.ItemView.extend({tagName:"li",className:"sync-status-list-item",template:a.a,ui:{poster:".media-poster"},initialize:function(e){this.syncItem=e.syncItem,
this.transcodeJobs=this.model.server.get("desktop").get("transcodeJobs"),this.$el.addClass(this.model.get("type")),this.image=new d.a({model:this.model,type:this.model.get("type"),getUrl:this.getPosterUrl,height:50,background:!1}),this.listenTo(this.transcodeJobs,"reset",function(e){this.model.trigger("change:Media",this.model,this.model.get("Media"))})},serializeData:function(){return{isCloudSync:this.model.device.get("isCloudSync")}},getPosterUrl:function(e){return e||this.model.get("parentThumb")||this.model.get("grandparentThumb");
},analyzeTranscodeJobs:function(){var e;if(this.transcodeJobs.each(s.a.bind(function(t){if(this.syncItem.id===t.get("syncItemId")){var n=this.model.get("thumb"),i=this.model.get("title"),a=t.get("transcodeThumb"),r=t.get("title"),s=r&&r.indexOf(i)>-1,o=!0;if(n&&a){var l=new RegExp("(.+)"+t.get("thumb")+"$");o=l.exec(n)}s&&o&&(e=t)}},this)),e&&e.get("progress")>0){var t=Math.round(10*e.get("speed"))/10,i=n.i(u.a)(e.get("remaining"))||n.i(l.default)("done"),a=Math.round(10*e.get("progress"))/10;return{
active:!0,speed:t,remaining:i,progress:a,isUploading:"upload"===e.get("type")}}return{active:!1}},analyzeParts:function(){var e="complete",t=this.model.get("Media");if(!t.length)return"unknown";for(var n=0,i=t.length;n<i;n++)for(var a=t[n].Part,r=0,s=a.length;r<s;r++){var o=a[r],l=c.a.getSyncStateFromPart(o);c.a.failedRegex.test(l)&&(e=c.a.getSyncStateContextFromPart(o)),c.a.processingRegex.test(l)&&(e="downloading"===l?"downloading":"processing"),c.a.waitingRegex.test(l)&&"processing"!==e&&(e=o.key?"waiting":"processing");
}return e},getErrorMessage:function(e){switch(e){case"sourceFileUnavailable":return n.i(l.default)("This media is inaccessible. Please check that the file exists with the correct permissions.");case"sourceFileMetadataError":return n.i(l.default)("The metadata for this media is invalid. Please reanalyze the media and try again.");case"clientProfileError":return n.i(l.default)("The client profile for the sync target is invalid.");case"ioError":return n.i(l.default)("An error occurred processing this media. Please check that the disk is not full.");
case"transcoderError":return n.i(l.default)("The transcoder was unable to process this media.");case"mediaAnalysisError":return n.i(l.default)("This media was unable to be analyzed.");case"downloadFailed":return n.i(l.default)("This media was unable to be downloaded. Please check that it is still available and try again.");case"unknownError":return n.i(l.default)("An error occurred while syncing this media.")}return n.i(l.default)("An error occurred while syncing this media.")},bindings:{".title":{
modelAttribute:"title"},".subtitle":{modelAttribute:"Media",manual:!0,formatter:function(e){var t=this.analyzeParts(),n=this.analyzeTranscodeJobs();switch(this.$(".subtitle").addClass("hidden"),t){case"complete":this.$(".complete-subtitle").removeClass("hidden");break;case"waiting":this.$(".waiting-subtitle").removeClass("hidden"),n.isUploading&&(this.$(".cloud-sync-waiting").addClass("hidden"),this.$(".cloud-sync-uploading").removeClass("hidden"),this.$(".transcode-progress").text(n.progress));break;
case"downloading":n.active?(this.$(".downloading-subtitle").removeClass("hidden"),this.$(".transcode-progress").text(n.progress)):this.$(".processing-subtitle").removeClass("hidden");break;case"processing":n.active?(this.$(".converting-subtitle").removeClass("hidden"),this.$(".transcode-progress").text(n.progress),this.$(".transcode-remaining").text(n.remaining)):this.$(".processing-subtitle").removeClass("hidden");break;case"unknown":this.$(".unknown-subtitle").removeClass("hidden");break;default:
this.$(".failed-subtitle").removeClass("hidden"),this.$(".error-message").text(this.getErrorMessage(t))}}}},onRender:function(){this.image.setElement(this.ui.poster)}});t.a=h},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(2),s=n.n(r),o=n(311),l=n.n(o),c=n(4),u=n(8),d=n(42),h=n(40),p=n(1668),f=h.a.extend({tagName:"ol",className:"list media-list playlist-items",itemView:p.a,sorted:!0,itemEvents:{sort:"onSort"},initialize:function(){s.a.bindAll(this,"onItemMove")},onRender:function(){this.sortable&&this.sortable.destroy(),
this.sortable=new l.a(this.el,s.a.extend({onAdd:this.onItemMove,onUpdate:this.onItemMove,handle:".sortable-handle",animation:200,scroll:!0,scrollSensitivity:100,scrollSpeed:2},this.options.sortableOptions))},onClose:function(){this.sortable&&this.sortable.destroy()},onSort:function(){this.render()},onItemMove:function(e){var t=a()(e.item).data("queue-item-id"),i=a()(e.item).prev().data("queue-item-id"),r=this.options.playQueue;if(i)return void r.moveItem(t,i);var o=r.get("selectedItem").get("title"),l=new d.a({
title:n.i(c.default)("Convert Immediately"),message:n.i(c.default)("Do you want to start converting this item immediately? Any conversion progress for '{1}' will be lost.",o)}),h=l.promise;h.done(function(){r.moveItem(t)}),h.fail(s.a.bind(this.render,this)),u.a.trigger("show:modal",l)}});t.a=f},function(e,t,n){"use strict";var i=n(2730),a=n.n(i),r=n(10),s=r.a.ItemView.extend({template:a.a,serializeData:function(){return{serverID:this.model.id}}});t.a=s},function(e,t,n){"use strict";var i=n(2731),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(14),c=n(4),u=n(176),d=n(331),h=n(21),p=n(433),f=n(277),g=n(54),m=n(796),v=o.a.Layout.extend({
className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:a.a,ui:{poster:".media-poster"},events:{"click .promote-btn":"onPromoteClick","click .delete-btn":"onDeleteClick"},regions:{statusRegion:".conversion-status-region"},attributes:function(){return{"data-queue-item-id":this.model.id}},initialize:function(e){this.metadataItem=e.model.get("metadataItem"),this.playQueue=e.playQueue,this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,
this.hideDragHandle=e.hideDragHandle,this.type=this.metadataItem.get("type");var t=d.a[this.type];"movie"===this.type&&(t=d.a.art);var n="episode"===this.type?"show":this.type;this.image=new g.a({model:this.metadataItem,type:n,placeholderClass:t,height:60,modelAttribute:"thumb",getUrl:this.getPosterUrl})},bindings:{".generator-title":{model:"metadataItem",modelAttribute:"title",formatter:function(e){return u.a.title(this.metadataItem)}},".generator-target":{modelAttribute:"target",formatter:function(e){
return this.model.get("syncItemId")?n.i(c.default)("Sync"):e}},".sortable-handle":{model:"playQueue",modelAttribute:"playQueueSelectedItemID",manual:!0,autohide:function(e){return this.model.get("playQueueItemID")!==e}},".promote-btn":{modelAttribute:"queueIndex",manual:!0,autohide:function(e){var t=this.playQueue.getCurrentItem();return this.hideDragHandle||e-t.get("queueIndex")>1}}},serializeData:function(){return{hideDragHandle:this.hideDragHandle}},getPosterUrl:function(e){return"episode"===this.model.get("type")?this.model.get("grandparentThumb")||this.model.get("parentThumb")||e:e;
},deleteSyncItem:function(){var e=l.a("appModel"),t=new p.a({id:this.model.get("syncItemId"),clientIdentifier:this.model.get("clientIdentifier")},{server:e.get("user").server});return h.a.execute("deleteSyncItem",{syncItem:t,server:this.model.server})},deleteGenerator:function(){var e=new f.a({id:this.model.get("generatorID")},{server:this.model.server,playlistID:this.metadataItem.get("playlistID")});return h.a.execute("disableVersionGenerator",{generator:e,ratingKey:this.metadataItem.get("ratingKey")
})},onRender:function(){this.image.setElement(this.ui.poster),this.statusRegion.show(new m.a({model:this.model,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}))},onClose:function(){this.image.close()},onCollectionSort:function(e){this.trigger("sort")},onPromoteClick:function(e){e.preventDefault();var t=this.playQueue.get("collection");this.listenToOnce(t,"sort",s.a.debounce(this.onCollectionSort));var n=this.model.get("playQueueItemID"),i=this.playQueue.get("playQueueSelectedItemID");
this.playQueue.moveItem(n,i)},onDeleteClick:function(e){e.preventDefault(),this.model.has("syncItemId")?this.deleteSyncItem():this.deleteGenerator()}});t.a=v},function(e,t,n){"use strict";var i=n(40),a=n(1670),r=i.a.extend({tagName:"ul",className:"list card-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2733),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(8),c=n(21),u=n(148),d=n(355),h=o.a.ItemView.extend({tagName:"li",className:"striped-list-item",template:a.a,events:{"click a":"onClick"
},initialize:function(e){this.currentKey=e.currentKey},serializeData:function(){return{channel:this.model.toJSON(),serverID:this.model.server.id,currentKey:this.currentKey}},bindings:{".media-title":{modelAttribute:"title"}},onClick:function(e){if(/\/updates$/.test(this.model.id))e.preventDefault(),c.a.execute("updateChannel",{server:this.model.server});else if(/\/prefs$/.test(this.model.id)){e.preventDefault();var t=new u.a([],{server:this.model.server,url:this.model.id});t.fetch().done(s.a.bind(function(){
l.a.trigger("show:modal",new d.a({model:this.model,collection:t}))},this))}}});t.a=h},function(e,t,n){"use strict";var i=n(40),a=n(1672),r=i.a.extend({tagName:"ul",className:"tile-list media-tile-list channel-directory-tile-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2734),a=n.n(i),r=n(10),s=n(4),o=n(8),l=n(54),c=n(1745),u=r.a.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item channel-directory-tile-list-item channel",template:a.a,ui:{poster:".media-poster",
subtitle:".media-subtitle-1"},events:{"click a":"onClick"},initialize:function(e){this.closeOnInstall=e.closeOnInstall,this.image=new l.a({model:this.model,type:"channel",width:150})},bindings:{".media-title":{modelAttribute:"title"},".installed-icon":{modelAttribute:"installed",manual:!0,autohide:!0,formatter:function(e,t){var i=e?n.i(s.default)("Installed"):"";return this.ui.subtitle.text(i),e}}},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onClick:function(e){
e.preventDefault(),o.a.trigger("show:modal",new c.a({model:this.model,closeOnInstall:this.closeOnInstall}))}});t.a=u},function(e,t,n){"use strict";var i=n(40),a=n(1674),r=i.a.extend({tagName:"ul",className:"tile-list media-tile-list channel-tile-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2735),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(4),c=n(8),u=n(21),d=n(148),h=n(54),p=n(355),f=o.a.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item channel",template:a.a,ui:{
poster:".media-poster"},events:{"click .settings-btn":"onSettingsClick","click .uninstall-btn":"onUninstallClick"},initialize:function(e){this.skipFirstRender=e.skipFirstRender,this.image=new h.a({model:this.model,type:"channel",width:150}),this.shared=this.model.server.get("shared")},serializeData:function(){return{item:this.model.toJSON(),serverID:this.model.server.id,shared:this.shared}},render:function(){return this.skipFirstRender?(this.skipFirstRender=!1,this):(this.visible=!0,void o.a.ItemView.prototype.render.apply(this,arguments));
},show:function(){this.visible||(this.visible=!0,this.render())},hide:function(){this.visible&&(this.image.cancel(),this.visible=!1,this.stopListening(this.model),this.$el.empty())},bindings:{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"type",autohide:!0,formatter:function(e){return"video"===e?n.i(l.default)("Video"):"music"===e?n.i(l.default)("Music"):"photos"===e?n.i(l.default)("Photo"):n.i(l.default)("Utility")}}},onRender:function(){this.image.setElement(this.ui.poster);
},onClose:function(){this.image.close()},onSettingsClick:function(e){if(e.preventDefault(),!this.$el.hasClass("active")){this.$el.addClass("active");var t=new d.a([],{server:this.model.server,url:this.model.id+"/:/prefs"}),n=t.fetch();n.done(s.a.bind(function(){c.a.trigger("show:modal",new p.a({model:this.model,collection:t}))},this)),n.always(s.a.bind(function(){this.$el.removeClass("active")},this))}},onUninstallClick:function(e){if(e.preventDefault(),!this.$el.hasClass("active")){this.$el.addClass("active");
var t=u.a.execute("uninstallChannel",{channel:this.model});t.done(s.a.bind(function(){this.model.trigger("destroy",this.model,this.model.collection)},this)),t.always(s.a.bind(function(){this.$el.removeClass("active")},this))}}});t.a=f},function(e,t,n){"use strict";var i=n(220),a=n(40),r=n(1676),s=a.a.extend({mixins:[i.a],tagName:"ul",className:"tile-list media-tile-list album-tile-list",itemView:r.a});t.a=s},function(e,t,n){"use strict";var i=n(2736),a=n.n(i),r=n(2),s=n.n(r),o=n(137),l=n(284),c=n(54),u=o.a.extend({
className:"poster-item media-tile-list-item",template:a.a,ui:l.a.prototype.ui,initialize:function(e){o.a.prototype.initialize.apply(this,arguments),this.image=new c.a({model:this.model,type:"album",width:180})},bindings:s.a.extend({},o.a.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"year"}}),onMoreClick:function(e){l.a.prototype.onMoreClick.apply(this,arguments)}});t.a=u},function(e,t,n){"use strict";var i=n(490),a=n(1678),r=i.a.extend({tagName:"ul",
className:"list media-list track-list show-context",itemView:a.a,itemViewOptions:function(){return{collection:this.collection}}});t.a=r},function(e,t,n){"use strict";var i=n(2737),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(8),d=n(125),h=n(21),p=n(49),f=n(156),g=n(353),m=c.a.ItemView.extend({tagName:"li",className:"striped-list-item",template:a.a,ui:{index:".track-index span",actions:".track-actions",dropdown:".track-actions-dropdown"},events:{"click .track-list-inner-item":"onClick","click .track-music-video-btn":"onMusicVideoClick",
"click .track-more-btn":"onMoreClick","hide.bs.dropdown .track-actions-dropdown":"onDropdownHide"},collectionEvents:{sort:"onCollectionSort"},initialize:function(e){s.a.bindAll(this,"onResize"),this.artistTitle=e.artistTitle,this.parentMediaActions=e.mediaActions,this.mediaActions=new f.a({},{item:this.model}),this.playQueueManager=this.model.server.get("playQueueManager"),this.listenTo(this.playQueueManager,"change:playQueue:audio",this.onPlayQueueChange),this.listenTo(this.playQueueManager,"remove:playQueue:audio",this.onRemovePlayQueue),
this.onPlayQueueChange(this.playQueueManager.getFor(this.model)),u.a.trigger("content.subscribe:resize",this.onResize)},serializeData:function(){return{index:this.getIndex(),selected:this.selected}},getIndex:function(){return this.collection.indexOf(this.model)+1},bindings:{".track-parent-index":{modelAttribute:"parentIndex"},".track-title":{modelAttribute:"title"},".track-subtitle-1":{modelAttribute:"originalTitle",autohide:function(e){var t=e&&this.artistTitle&&e.toLowerCase()!==this.artistTitle.toLowerCase();
return this.$el.toggleClass("show-subtitle",!!t),t}},".track-context":{modelAttribute:"duration",autohide:!0,formatter:function(e){return!!e&&n.i(d.a)(e)}},".track-music-video-btn":{model:"mediaActions",modelAttribute:"showPlayMusicVideo",manual:!0,autohide:!0}},onRender:function(){var e=this.playQueueManager.getFor(this.model);if(e){var t=e.get("selectedItem");t&&this.model.get("key")===t.get("key")&&this.$(".track-list-item").addClass("current-track")}},onClose:function(){this.dropdown&&this.dropdown.close(),
u.a.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e},onCollectionSort:function(){this.ui.index.text(this.getIndex())},onClick:function(e){e.preventDefault(),h.a.execute("playMedia",{item:this.model,siblings:!0})},onMusicVideoClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=this.model.server.getSectionForItem(this.model);if(!s.a.isEmpty(t)){var n=new p.a({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:t.get("uuid")
},{server:this.model.server,section:this.model.section});h.a.execute("playMedia",{item:n})}},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new g.a({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=l()(e.currentTarget),n=this.ui.actions.position().top,i=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(i)},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),
this.dropdown=null,this.$el.removeClass("force-hover"))},onPlayQueueSelectedItemChange:function(e,t){var n=!(!t||this.model.get("key")!==t.get("key"));this.$(".track-list-item").toggleClass("current-track",n)},onPlayQueueChange:function(e){e&&this.listenTo(e,"change:selectedItem",this.onPlayQueueSelectedItemChange)},onRemovePlayQueue:function(e){this.stopListening(e),this.$(".track-list-item").removeClass("current-track")}});t.a=m},function(e,t,n){"use strict";var i=n(40),a=n(1680),r=i.a.extend({
className:"artwork-options-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2738),a=n.n(i),r=n(10),s=n(269),o=n(331),l=n(105),c=r.a.Layout.extend({tagName:"span",template:a.a,regions:{poster:".media-poster"},initialize:function(e){var t=e.artworkType,n=150;"art"===t?n=240:"banner"===t&&(n=520),this.$el.addClass(t),this.image=new l.a({className:"media-poster-image",model:this.model,modelAttribute:"thumb",placeholderClass:o.a[t],width:n,height:s.a.getPosterHeight(t,n)})},bindings:{".artwork-option":{
modelAttribute:"selected",manual:!0,formatter:function(e,t){t.toggleClass("selected",e)}}},onRender:function(){this.poster.show(this.image)}});t.a=c},function(e,t,n){"use strict";var i=n(1693),a=n(1682),r=i.a.extend({tagName:"ul",className:"list media-list media-details-list episode-details-list show-context",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2739),a=n.n(i),r=n(2),s=n.n(r),o=n(265),l=n(489),c=n(54),u=l.a.extend({className:"striped-list-item media-list-item media-details-list-item episode-details-list-item",
template:a.a,showRating:!0,bypassShowUnwatchedIconsSetting:!0,createImageView:function(){this.image=new c.a({model:this.model,type:"episode",getUrl:this.getPosterUrl,height:110})},getPosterUrl:function(e){return e},bindings:s.a.extend({},l.a.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-index":{modelAttribute:"index",autohide:!0,formatter:function(e,t){return t.toggleClass("date",null==e),n.i(o.a)({episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0});
}}})});t.a=u},function(e,t,n){"use strict";var i=n(490),a=n(1684),r=i.a.extend({tagName:"ul",className:"list media-list episode-list show-context",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2740),a=n.n(i),r=n(2),s=n.n(r),o=n(265),l=n(137),c=l.a.extend({className:"striped-list-item media-list-item episode-list-item",template:a.a,showRating:!0,bypassShowUnwatchedIconsSetting:!0,regions:{rating:".media-rating"},bindings:s.a.extend({},l.a.prototype.bindings,{".media-title":{modelAttribute:"title"
},".media-index":{modelAttribute:"index",autohide:!0,formatter:function(e,t){return t.toggleClass("date",null==e),n.i(o.a)({episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0})}}})});t.a=c},function(e,t,n){"use strict";var i=n(220),a=n(40),r=n(1686),s=a.a.extend({mixins:[i.a],tagName:"ul",className:"tile-list media-tile-list episode-tile-list",itemView:r.a});t.a=s},function(e,t,n){"use strict";var i=n(2741),a=n.n(i),r=n(2),s=n.n(r),o=n(265),l=n(137),c=n(284),u=n(54),d=l.a.extend({
className:"poster-item media-tile-list-item episode-tile-list-item",template:a.a,ui:c.a.prototype.ui,bypassShowUnwatchedIconsSetting:!0,initialize:function(e){l.a.prototype.initialize.apply(this,arguments),this.image=new u.a({model:this.model,type:"episode",width:250})},bindings:s.a.extend({},l.a.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"index",formatter:function(e){return n.i(o.a)({episodePrefix:"Episode {1}",episodeIndex:e,date:this.model.get("originallyAvailableAt"),
noLeadingZero:!0})}},".media-count-badge":{modelAttribute:"Media",formatter:function(e){return e&&e.length||0},autohide:function(e){return e>1}}}),onMoreClick:function(e){c.a.prototype.onMoreClick.apply(this,arguments)}});t.a=d},function(e,t,n){"use strict";var i=n(2742),a=n.n(i),r=n(464),s=n(137),o=n(284),l=n(54),c=s.a.extend({className:"poster-item media-tile-list-item extra-tile-list-item",template:a.a,ui:o.a.prototype.ui,initialize:function(e){s.a.prototype.initialize.apply(this,arguments),this.image=new l.a({
model:this.model,type:"clip",width:250})},bindings:{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"extraType",formatter:function(e){if(e){var t=r.a.get(e);return t&&t.title}}}}});t.a=c},function(e,t,n){"use strict";var i=n(40),a=n(1689),r=n(755),s=i.a.extend({mixins:[r.a],tagName:"ul",itemView:a.a,className:"list"});t.a=s},function(e,t,n){"use strict";var i=n(2743),a=n.n(i),r=n(10),s=r.a.ItemView.extend({tagName:"li",template:a.a,className:"striped-list-item",initialize:function(e){
this.item=e.item}});t.a=s},function(e,t,n){"use strict";var i=n(40),a=n(1692),r=n(1691),s=i.a.extend({tagName:"ul",className:"list match-result-list",itemView:a.a,emptyView:r.a});t.a=s},function(e,t,n){"use strict";var i=n(2744),a=n.n(i),r=n(10),s=r.a.ItemView.extend({template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2745),a=n.n(i),r=n(10),s=n(21),o=n(1688),l=r.a.Layout.extend({tagName:"li",className:"striped-list-item match-result-list-item row",template:a.a,ui:{matchExtendedInfo:".match-extended-info"
},regions:{childrenRegion:".children-region"},events:{"click .match-result":"onClick"},initialize:function(e){this.item=e.item},onRender:function(){var e=this.model.get("children");if(e){var t=e.first();t&&"track"===t.get("type")&&(this.ui.matchExtendedInfo.removeClass("hidden"),this.childrenRegion.show(new o.a({collection:e})))}},onClick:function(e){e.preventDefault(),s.a.execute("match",{item:this.item,guid:this.model.id,name:this.model.get("name"),children:this.model.get("children")})}});t.a=l;
},function(e,t,n){"use strict";var i=n(220),a=n(40),r=a.a.extend({mixins:[i.a]});t.a=r},function(e,t,n){"use strict";var i=n(2748),a=n.n(i),r=n(10),s=n(711),o=r.a.ItemView.extend({className:"hidden",template:a.a,bindings:{".media-progress-pct":{modelAttribute:"viewOffset",manual:!0,formatter:function(e,t){var i=this.model,a="track"===i.get("type")?0:n.i(s.a)(e,i.get("duration"));a&&t.css("width",a+"%"),this.$el.toggleClass("hidden",!a)}}}});t.a=o},function(e,t,n){"use strict";var i=n(2689),a=n.n(i),r=n(10),s=n(1696),o=r.a.Layout.extend({
template:a.a,tagName:"li",className:"play-queue-list-item",attributes:function(){return{"data-play-queue-id":this.model.get("playQueueItemID")||this.model.get("ratingKey")}},events:{"click a":"onPlayClick","click .delete-btn":"onDeleteClick"},regions:{metadataRegion:".play-queue-metadata-region"},onRender:function(){this.metadataRegion.show(new s.a({model:this.model.get("metadataItem")}))},onPlayClick:function(e){e.preventDefault(),this.trigger("skip",this.model.get("key"))},onDeleteClick:function(e){
e.preventDefault(),e.stopImmediatePropagation(),this.trigger("remove",this.model)}});t.a=o},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(2690),s=n.n(r),o=n(127),l=n(212),c=n(797),u=c.a.extend({template:s.a,posterWidth:{video:70},bindings:a()({},c.a.prototype.bindings,{".media-primary-subtitle":{modelAttribute:"grandparentTitle",modelListeners:["grandparentTitle","duration"],formatter:function(e){var t=e;this.model.parent&&(t=t||this.model.parent.get("parentTitle"),this.model.parent.parent&&(t=this.model.parent.parent.get("title")));
var i=this.model.get("duration");return"movie"===this.type&&i&&(t=n.i(l.a)(i)),t||""}},".media-secondary-subtitle":{modelAttribute:"parentTitle",modelListeners:["parentTitle","index"],formatter:function(e){var t=e;return this.model.parent&&(t=t||this.model.parent.get("title")),"episode"===this.type&&(t=n.i(o.a)({seasonIndex:this.model.get("parentIndex"),episodeIndex:this.model.get("index"),date:this.model.get("originallyAvailableAt")})),t&&(t=" - "+t),t||""}}}),serializeData:function(){return{type:this.type
}}});t.a=u},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(2),s=n.n(r),o=n(311),l=n.n(o),c=n(40),u=n(1698),d=c.a.extend({tagName:"ol",className:"list media-list playlist-items",itemView:u.a,sorted:!0,itemEvents:{remove:"onItemRemove"},initialize:function(e){this.canEdit=!this.model.get("smart")},onRender:function(){this.sortable&&this.sortable.destroy(),this.canEdit&&(this.sortable=new l.a(this.el,{onUpdate:s.a.bind(this.onItemMove,this),draggable:".playlist-item",handle:".sortable-handle",
animation:200,scroll:!0,scrollSensitivity:100,scrollSpeed:2}))},onItemRemove:function(e,t,n){this.model.removeItem(n)},onItemMove:function(e){var t=a()(e.item).data("playlist-id"),n=a()(e.item).prev().data("playlist-id");this.model.moveItem(t,n)},onClose:function(){this.sortable&&this.sortable.destroy()}});t.a=d},function(e,t,n){"use strict";var i=n(2750),a=n.n(i),r=n(10),s=n(21),o=n(1699),l=r.a.Layout.extend({template:a.a,tagName:"li",className:"striped-list-item media-list-item playlist-item",events:{
"click .delete-btn":"onDeleteClick","click .playlist-inner-item":"onClick"},attributes:function(){return{"data-playlist-id":this.model.get("playlistItemID")}},regions:{metadataRegion:".playlist-metadata-region"},initialize:function(e){this.canEdit=e&&e.canEdit},onRender:function(){this.metadataRegion.show(new o.a({model:this.model.get("metadataItem"),canEdit:this.canEdit}))},onClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),s.a.execute("playMedia",{item:this.model,siblings:!0})},
onDeleteClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.trigger("remove",this.model.get("playlistItemID"))}});t.a=l},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(2751),s=n.n(r),o=n(8),l=n(127),c=n(152),u=n(212),d=n(125),h=n(797),p=h.a.extend({template:s.a,posterWidth:{video:103,photo:59},events:{"click .media-details":"onDetailsClick","click .media-primary-subtitle":"onGrandparentClick","click .media-secondary-subtitle":"onParentClick"},bindings:a()({},h.a.prototype.bindings,{
".media-primary-subtitle":{modelAttribute:"grandparentTitle",formatter:function(e){return"movie"!==this.type&&e?e:""}},".media-secondary-subtitle":{modelAttribute:"parentTitle",modelListeners:["parentTitle","index","year"],formatter:function(e){var t=e;return"episode"===this.type?t=n.i(l.a)({seasonPrefix:"Season {1}",episodePrefix:"Episode {1}",seasonIndex:this.model.get("parentIndex"),episodeIndex:this.model.get("index"),date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,separator:" - "
}):"movie"===this.type&&(t=this.model.get("year")),t||""}},".media-duration":{modelAttribute:"duration",formatter:function(e){return"photo"===this.type?n.i(c.default)(this.model.get("originallyAvailableAt")):"track"===this.type?n.i(d.a)(e):n.i(u.a)(e)}}}),initialize:function(e){h.a.prototype.initialize.apply(this,arguments),this.canEdit=e&&e.canEdit,"track"===this.type&&(this.playQueueManager=this.model.server.get("playQueueManager"),this.listenTo(this.playQueueManager,"change:playQueue:audio",this.onPlayQueueChange),
this.listenTo(this.playQueueManager,"remove:playQueue:audio",this.onRemovePlayQueue),this.onPlayQueueChange(this.playQueueManager.getFor(this.model)))},serializeData:function(){return{canEdit:this.canEdit,hasDetails:"track"!==this.type&&"photo"!==this.type,type:this.type}},navigateTo:function(e,t){e&&(t.preventDefault(),t.stopPropagation(),o.a.trigger("navigate","details",{serverID:this.model.server.id,key:e}))},onRender:function(){if(h.a.prototype.onRender.apply(this,arguments),"track"===this.type){
var e=this.playQueueManager.getFor(this.model);if(!e)return;var t=e.get("selectedItem");t&&this.model.get("key")===t.get("key")&&this.$el.addClass("current-track")}},onPlayQueueSelectedItemChange:function(e,t){var n=!(!t||this.model.get("key")!==t.get("key"));this.$el.toggleClass("current-track",n)},onPlayQueueChange:function(e){e&&this.listenTo(e,"change:selectedItem",this.onPlayQueueSelectedItemChange)},onRemovePlayQueue:function(e){this.stopListening(e),this.$el.removeClass("current-track")},onDetailsClick:function(e){
var t=this.model.get("type");"track"!==t&&"photo"!==t&&this.navigateTo(this.model.get("key"),e)},onParentClick:function(e){this.navigateTo(this.model.get("parentKey"),e)},onGrandparentClick:function(e){this.navigateTo(this.model.get("grandparentKey"),e)}});t.a=p},function(e,t,n){"use strict";var i=n(220),a=n(40),r=n(1701),s=a.a.extend({mixins:[i.a],tagName:"ul",className:"tile-list media-tile-list season-tile-list",itemView:r.a});t.a=s},function(e,t,n){"use strict";var i=n(2752),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(137),c=n(284),u=n(54),d=l.a.extend({
className:"poster-item media-tile-list-item",template:a.a,ui:c.a.prototype.ui,initialize:function(e){l.a.prototype.initialize.apply(this,arguments),this.image=new u.a({model:this.model,type:"season",width:150})},bindings:s.a.extend({},l.a.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"leafCount",formatter:function(e){return null==e?"":1===e?n.i(o.default)("{1} episode",e):n.i(o.default)("{1} episodes",e)}},".unwatched-count-badge":{modelAttribute:"unviewedLeafCount",
autohide:function(e){var t=this.model.server.get("shared"),n=this.model.server.get("multiuser");return!(t&&!n)&&("album"!==this.type&&!!e)}}}),onMoreClick:function(e){c.a.prototype.onMoreClick.apply(this,arguments)}});t.a=d},function(e,t,n){"use strict";var i=n(40),a=n(1703),r=i.a.extend({tagName:"ul",className:"list select-list select-playlist-list minimal-scroll",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2753),a=n.n(i),r=n(10),s=n(354),o=r.a.ItemView.extend({tagName:"li",className:"striped-list-item select-list-item",
template:a.a,ui:{poster:".playlist-poster"},initialize:function(){this.image=new s.a({model:this.model,width:40})},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(755),s=n(490),o=n(1705),l=s.a.extend({mixins:[r.a],initialize:function(){s.a.prototype.initialize.apply(this,arguments),this.listenTo(this.collection,"change:parentIndex",a.a.debounce(this.onParentIndexChange))},tagName:"ul",className:"list media-list track-list show-context",
itemView:o.a,onParentIndexChange:function(e,t){null!=e.previous("parentIndex")&&this.listModel.fetch()}});t.a=l},function(e,t,n){"use strict";var i=n(2754),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(8),d=n(125),h=n(21),p=n(753),f=n(49),g=n(156),m=n(353),v=n(225),y=c.a.ItemView.extend({mixins:[p.a],tagName:"li",template:a.a,className:"striped-list-item",ui:{actions:".track-actions",container:".track-list-inner-item",dropdown:".track-actions-dropdown"},events:{"mousenter .track-list-inner-item":"onMouseEnter",
"mouseleave .track-list-inner-item":"onMouseLeave","mousedown .track-list-inner-item":"onMouseDown","click .track-list-inner-item":"onClick","click .track-music-video-btn":"onMusicVideoClick","click .track-edit-btn":"onEditClick","click .track-more-btn":"onMoreClick","hide.bs.dropdown .track-actions-dropdown":"onDropdownHide"},onlyAfterRender:["select","deselect"],initialize:function(e){s.a.bindAll(this,"onResize"),this.artistTitle=e.artistTitle,this.parentMediaActions=e.mediaActions,this.mediaActions=new g.a({},{
item:this.model}),this.playQueueManager=this.model.server.get("playQueueManager"),this.listenTo(this.playQueueManager,"change:playQueue:audio",this.onPlayQueueChange),this.listenTo(this.playQueueManager,"remove:playQueue:audio",this.onRemovePlayQueue),this.onPlayQueueChange(this.playQueueManager.getFor(this.model)),u.a.trigger("content.subscribe:resize",this.onResize)},serializeData:function(){return this.shared=this.model.server.get("shared"),this.synced=!this.model.server.get("isFullServer"),{showEdit:!this.shared&&!this.synced,
selected:this.selected}},bindings:{".track-index span":{modelAttribute:"index",formatter:function(e){return e<1?"":e}},".track-parent-index":{modelAttribute:"parentIndex"},".track-title":{modelAttribute:"title"},".track-subtitle-1":{modelAttribute:"originalTitle",autohide:function(e){var t=e&&this.artistTitle&&e.toLowerCase()!==this.artistTitle.toLowerCase();return this.$el.toggleClass("show-subtitle",!!t),t}},".track-context":{modelAttribute:"duration",autohide:!0,formatter:function(e){return!!e&&n.i(d.a)(e);
}},".track-music-video-btn":{model:"mediaActions",modelAttribute:"showPlayMusicVideo",manual:!0,autohide:!0}},onRender:function(){var e=this.playQueueManager.getFor(this.model);if(e){var t=e.get("selectedItem");t&&this.model.get("key")===t.get("key")&&this.$(".track-list-item").addClass("current-track")}},onClose:function(){this.dropdown&&this.dropdown.close(),u.a.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e},onClick:function(e){this.stopTrackingSelecting(e,function(){
e.preventDefault(),h.a.execute("playMedia",{item:this.model,siblings:!0})})},onMusicVideoClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=this.model.server.getSectionForItem(this.model);if(!s.a.isEmpty(t)){var n=new f.a({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:t.get("uuid")},{server:this.model.server,section:this.model.section});h.a.execute("playMedia",{item:n})}},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),u.a.trigger("show:modal",new v.a({
mediaActions:this.mediaActions}))},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new m.a({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=l()(e.currentTarget),n=this.ui.actions.position().top,i=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(i)},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.$el.removeClass("force-hover"));
},onPlayQueueSelectedItemChange:function(e,t){var n=!(!t||this.model.get("key")!==t.get("key"));this.$(".track-list-item").toggleClass("current-track",n)},onPlayQueueChange:function(e){e&&this.listenTo(e,"change:selectedItem",this.onPlayQueueSelectedItemChange)},onRemovePlayQueue:function(e){this.stopListening(e),this.$(".track-list-item").removeClass("current-track")},select:function(){this.ui.container.addClass("selected")},deselect:function(){this.ui.container.removeClass("selected")}});t.a=y},function(e,t,n){
"use strict";var i=n(5),a=n.n(i),r=n(2),s=n.n(r),o=n(311),l=n.n(o),c=n(40),u=n(1708),d=n(1707),h=c.a.extend({tagName:"ol",className:"list media-list playlist-items",itemView:u.a,emptyView:d.a,sorted:!0,onRender:function(){this.sortable&&this.sortable.destroy(),this.sortable=new l.a(this.el,{onUpdate:s.a.bind(this.onItemMove,this),handle:".sortable-handle",animation:200,scroll:!0,scrollSensitivity:100,scrollSpeed:2})},onClose:function(){this.sortable&&this.sortable.destroy()},onItemMove:function(e){
var t=a()(e.item).data("generator-id"),n=a()(e.item).prev().data("generator-id");this.collection.parent.moveItem(t,n)}});t.a=h},function(e,t,n){"use strict";var i=n(2755),a=n.n(i),r=n(10),s=r.a.ItemView.extend({template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2756),a=n.n(i),r=n(10),s=n(4),o=n(8),l=n(269),c=n(1572),u=n(21),d=n(354),h=n(189),p=n(1765),f=r.a.ItemView.extend({className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:a.a,ui:{poster:".media-poster",
status:".generator-status"},events:{"click .playlist-inner-item":"onClick","click .retry-btn":"onRetryClick","click .edit-btn":"onEditClick","click .delete-btn":"onDeleteClick"},attributes:function(){return{"data-generator-id":this.model.id}},initialize:function(e){this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,this.status=this.model.get("status");var t=60;this.compositeImage=new d.a({model:this.model,width:l.a.getPosterWidth("movie",t),height:t,rows:1,columns:1}),this.listenTo(this.transcodeJobs,"reset add remove",this.onTranscodeJobsChange);
},resetState:function(){var e=["converting",c.a.PENDING,c.a.COMPLETE,c.a.FAILED];this.ui.status.removeClass(e.join(" "))},getState:function(e){return this.transcodeJobs.findWhere({generatorID:this.model.id})?"converting":e.get("itemsFailedCount")>0?c.a.FAILED:e.get("state")},bindings:{".generator-title":{modelAttribute:"title"},".generator-target":{modelAttribute:"target"},".generator-status":{model:"status",modelAttribute:"state",modelListeners:["state","itemsFailedCount"],manual:!0,formatter:function(e,t){
this.resetState(),t.addClass(this.getState(this.status))}},".generator-status-failed-message":{model:"status",modelAttribute:"itemsFailedCount",formatter:function(e){return 1===e?n.i(s.default)("1 failed item"):n.i(s.default)("{1} failed items",e)}},".retry-btn":{model:"status",modelAttribute:"state",modelListeners:["state","itemsFailedCount"],manual:!0,autohide:function(e){return this.getState(this.status)===c.a.FAILED}}},onRender:function(){this.compositeImage.setElement(this.ui.poster)},onClose:function(){
this.compositeImage.close()},onTranscodeJobsChange:function(){var e=this.getState(this.status);this.resetState(),this.ui.status.addClass(e)},onClick:function(e){e.preventDefault(),o.a.trigger("show:modal",new p.a({model:this.model,listModel:this.model.get("children"),transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}))},onRetryClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),u.a.execute("reprocessVersionGenerator",{generator:this.model})},onEditClick:function(e){e.preventDefault(),
e.stopImmediatePropagation(),o.a.trigger("show:modal",new h.a({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),u.a.execute("deleteVersionGenerator",{generator:this.model})}});t.a=f},function(e,t,n){"use strict";var i=n(40),a=n(1710),r=i.a.extend({tagName:"ul",className:"list version-generator-metadata-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2757),a=n.n(i),r=n(10),s=n(4),o=n(127),l=n(1571),c=n(21),u=n(54),d=n(796),h=r.a.Layout.extend({
tagName:"li",className:"striped-list-item version-generator-metadata-list-item",template:a.a,ui:{poster:".media-poster"},regions:{statusRegion:".conversion-status-region"},events:{"click .enable-btn":"onEnableClick","click .retry-btn":"onRetryClick"},modelEvents:{"change:processingState":"onProcessingStateChange"},initialize:function(e){this.generator=e.generator,this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,this.type=this.model.get("type"),this.image=new u.a({model:this.model,
type:"movie",height:60,modelAttribute:"episode"===this.type?"grandparentThumb":"thumb"})},bindings:{".generator-metadata-title":{modelAttribute:"title",formatter:function(e){return this.model.get("grandparentTitle")||this.model.get("parentTitle")||e}},".generator-metadata-episode-index":{modelAttribute:"index",autohide:!0,formatter:function(e){if("episode"===this.type)return n.i(o.a)({seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,
separator:" \xb7 "})}},".generator-metadata-year":{modelAttribute:"year",autohide:!0,formatter:function(e){if("movie"===this.type)return e}},".conversion-status-failed-message":{modelAttribute:"processingStateContext",formatter:function(e){return this.getErrorMessage(e)}}},getErrorMessage:function(e){var t=l.a.contexts;switch(e){case t.FILE_UNAVAILABLE:return n.i(s.default)("File unavailable");case t.METADATA_ERROR:return n.i(s.default)("Invalid metadata");case t.PROFILE_ERROR:return n.i(s.default)("Invalid profile");
case t.ANALYSIS_ERROR:return n.i(s.default)("Unable to analyze")}return n.i(s.default)("Unable to convert")},onRender:function(){this.image.setElement(this.ui.poster),this.statusRegion.show(new d.a({model:this.model,generator:this.generator,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting,initialState:this.model.get("processingState"),initialErrorMessage:this.getErrorMessage(this.model.get("processingStateContext"))}))},onClose:function(){this.image.close()},onProcessingStateChange:function(e,t){
this.statusRegion.currentView&&this.statusRegion.currentView.enterState(t)},onEnableClick:function(e){e.preventDefault(),c.a.execute("enableVersionGenerator",{generator:this.model.generator,ratingKey:this.model.id})},onRetryClick:function(e){e.preventDefault(),c.a.execute("reprocessVersionGenerator",{generator:this.model.generator,ratingKey:this.model.id})}});t.a=h},function(e,t,n){"use strict";var i=n(40),a=n(1712),r=i.a.extend({tagName:"ul",className:"list alpha-bar-list",itemView:a.a});t.a=r},function(e,t,n){
"use strict";var i=n(2758),a=n.n(i),r=n(10),s=r.a.ItemView.extend({tagName:"li",className:"alpha-bar-list-item",template:a.a,events:{"click a":"onClick"},onClick:function(e){e.preventDefault(),this.model.section.set("currentFirstCharacter",this.model)}});t.a=s},function(e,t,n){"use strict";var i=n(2759),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=o.a.ItemView.extend({className:"label-list section-current-filters-list",template:a.a,modelEvents:{"change:currentFilters":"render"},events:{"click .remove-filter-btn":"onRemoveFilterClick"
},initialize:function(e){e.disabled&&this.$el.addClass("disabled")},serializeData:function(){return{currentFilters:this.model.get("currentFilters")}},onRemoveFilterClick:function(e){e.preventDefault();var t=s()(e.currentTarget).data("key");this.trigger("removeAllFilters",t)}});t.a=l},function(e,t,n){"use strict";var i=n(40),a=n(1715),r=i.a.extend({tagName:"ul",className:"list side-bar-list",itemView:a.a,initialize:function(e){var t=this.collection.section;e.disabled?this.$el.addClass("disabled"):this.listenTo(t,"change:currentType",this.onCurrentTypeChange);
},onCurrentTypeChange:function(e,t){this.collection.fetch({reset:!0,scope:"page"})}});t.a=r},function(e,t,n){"use strict";var i=n(2760),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=o.a.ItemView.extend({tagName:"li",template:a.a,ui:{btn:"a",selectedIcon:".selected-icon"},events:{"click .boolean-btn":"onBooleanFilterClick","click .filter-btn":"onFilterClick"},onlyAfterRender:["onCurrentFiltersChange"],initialize:function(){this.listenTo(this.model.section,"change:currentFilters",this.onCurrentFiltersChange)},
serializeData:function(){return{filter:this.model.toJSON(),selected:this.isCurrentFilter()}},isCurrentFilter:function(){var e=this.model.section.get("currentFilters");return!!s.a.findWhere(e,{key:this.model.id})},onBooleanFilterClick:function(e){e.preventDefault();var t={key:this.model.id,title:this.model.get("title"),value:1};this.ui.btn.hasClass("selected")?this.trigger("removeFilter",t):this.trigger("addFilter",t)},onFilterClick:function(e){e.preventDefault(),this.trigger("showOptions",this.model);
},onCurrentFiltersChange:function(e,t){var n=this.isCurrentFilter();this.ui.btn.toggleClass("selected",n),this.ui.selectedIcon.toggleClass("hidden",!n)}});t.a=l},function(e,t,n){"use strict";var i=n(2761),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(1717),c=o.a.CompositeView.extend({classname:"filter-option-list-search-container",template:a.a,itemView:l.a,itemViewContainer:".side-bar-list",query:"",ui:{searchForm:"#filter-options-search-form",searchInput:"#filter-options-search",loading:"#filter-options-loading"
},events:{"keyup #filter-options-search":"onSearchKeyUp","submit #filter-options-search-form":"onSearchSubmit","click .filter-options-deselect-btn":"onDeselectClick"},initialize:function(){this.originalCollection=this.collection,this.listenToOnce(this.originalCollection,"reset",this.onCollectionReset),this.collection.fetch({reset:!0,scope:"page"})},serializeData:function(){return{showSearch:this.collection.length>20,query:this.query,showLoading:!this.collection.length}},search:function(){this.query=s.a.trim(this.ui.searchInput.val()),
this.query?this.rebase(this.originalCollection.search(this.query)):this.rebase(this.originalCollection)},selectExactMatch:function(){this.collection.each(function(e){var t=e.get("title");if(t&&t.toLowerCase()===this.query.toLowerCase()){var n={key:e.parent.id,title:t,value:e.id};this.trigger("addFilter",this,n)}},this)},onCollectionReset:function(e){var t=e.length>20;this.ui.searchForm.toggleClass("hidden",!t),this.ui.loading.addClass("hidden")},onSearchKeyUp:function(e){this.search()},onSearchSubmit:function(e){
e.preventDefault(),this.search(),this.query&&this.selectExactMatch()},onDeselectClick:function(e){e.preventDefault(),this.trigger("removeAllFilters",this.collection.parent.id)}});t.a=c},function(e,t,n){"use strict";var i=n(2762),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=o.a.ItemView.extend({tagName:"li",template:a.a,ui:{btn:"a",selectedIcon:".selected-icon"},events:{"click a":"onClick"},onlyAfterRender:["onCurrentFiltersChange"],initialize:function(){this.listenTo(this.model.section,"change:currentFilters",this.onCurrentFiltersChange);
},serializeData:function(){return{filterOption:this.model.toJSON(),selected:this.isCurrentFilter()}},isCurrentFilter:function(){var e=this.model.section.get("currentFilters"),t=s.a.findWhere(e,{key:this.model.parent.id});if(!t)return!1;var n=t.values,i=s.a.find(n,s.a.bind(function(e){return e===this.model.get("key")},this));return!!i},onClick:function(e){e.preventDefault();var t={key:this.model.parent.id,title:this.model.get("title"),value:this.model.id};this.ui.btn.hasClass("selected")?this.trigger("removeFilter",t):this.trigger("addFilter",t);
},onCurrentFiltersChange:function(e,t){var n=this.isCurrentFilter();this.ui.btn.toggleClass("selected",n),this.ui.selectedIcon.toggleClass("hidden",!n)}});t.a=l},function(e,t,n){"use strict";var i=n(2763),a=n.n(i),r=n(10),s=r.a.ItemView.extend({tagName:"li",template:a.a,events:{"click a":"onClick"},initialize:function(){var e=this.model.section.get("currentSort");if(!e){var t=this.model.get("isDefault");t&&(this.model.set("selected",!0),this.model.section.set("currentSort",this.model,{silent:!0}),
this.model.section.trigger("default:currentSort"))}this.listenTo(this.model.section,"change:currentSort",this.onCurrentSortChange)},bindings:{".sort-btn":{modelAttribute:"selected",manual:!0,formatter:function(e,t){t.toggleClass("selected",e)}},".desc-icon":{modelAttribute:"direction",manual:!0,formatter:function(e,t){t.toggleClass("hidden","desc"!==e)}},".asc-icon":{modelAttribute:"direction",manual:!0,formatter:function(e,t){t.toggleClass("hidden","asc"!==e)}}},onCurrentSortChange:function(e,t){
t&&this.model.id!==t.id&&this.model.set({selected:!1})},onClick:function(e){e.preventDefault();var t=this.model.section.get("currentSort");t&&t.id===this.model.id?t.reverseSortDirection():this.model.set({selected:!0}),this.model.section.set("currentSort",this.model,{silent:!0}),this.model.section.trigger("change:currentSort",this.model.section,this.model)}});t.a=s},function(e,t,n){"use strict";var i=n(10),a=n(5),r=n.n(a),s=n(1720),o=i.a.CollectionView.extend({tagName:"ul",className:"list browse-directory-list",
itemView:s.a,selectedFilePath:null,events:{"click a":"onDirectoryClick"},collectionEvents:{reset:"onReset"},startLoadingItem:function(e){this.selectedFilePath&&this.unselectItem(this.selectedFilePath),this.selectedFilePath=e;var t=this.children.findByModel(e);t&&t.select(!0)},stopLoadingItem:function(e){var t=this.children.findByModel(e);t&&t.select(!1)},unselectItem:function(e){this.selectedFilePath=null;var t=this.children.findByModel(e);t&&t.unselect()},onReset:function(){this.parentFilePath&&this.collection.add(this.parentFilePath,{
at:0})},onDirectoryClick:function(e){e.preventDefault();var t=r()(e.currentTarget),n=t.data("key"),i=this.collection.get(n)||this.parentFilePath;this.trigger("change:path",i),this.options.isRoot||(i.parent?(this.parentFilePath=i.parent.clone(),this.parentFilePath.set({title:".. [Back]",isBackShortcut:!0})):this.parentFilePath=null)}});t.a=o},function(e,t,n){"use strict";var i=n(2764),a=n.n(i),r=n(10),s=r.a.ItemView.extend({tagName:"li",className:"striped-list-item browse-directory-list-item",template:a.a,
ui:{link:"a",spinner:".loading"},serializeData:function(){return{filePath:this.model.toJSON(),isRoot:!this.model.parent}},select:function(e){this.ui.link.addClass("selected"),this.ui.spinner.toggleClass("hidden",!e)},unselect:function(){this.ui.link.removeClass("selected"),this.ui.spinner.addClass("hidden")}});t.a=s},function(e,t,n){"use strict";var i=n(40),a=n(1722),r=i.a.extend({tagName:"ul",className:"agents-nav nav nav-pills nav-pills-sm",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2765),a=n.n(i),r=n(10),s=r.a.ItemView.extend({
tagName:"li",template:a.a,bindings:{a:{modelAttribute:"selected",manual:!0,formatter:function(e){this.$el.toggleClass("active",!!e)}}}});t.a=s},function(e,t,n){"use strict";var i=n(311),a=n.n(i),r=n(40),s=n(1724),o=r.a.extend({tagName:"ul",className:"list contributor-list",itemView:s.a,events:{"change input[type=checkbox]":"save",update:"save"},save:function(){var e=[];this.$(":checked").each(function(t){e.push(this.name)}),this.trigger("save",e.join(","))},onRender:function(){this.sortable=new a.a(this.$el[0],{
draggable:".card-sortable",animation:200})},onClose:function(){this.sortable.destroy()}});t.a=o},function(e,t,n){"use strict";var i=n(2766),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(8),c=n(148),u=n(355),d=n(1744),h=o.a.ItemView.extend({tagName:"li",className:"card card-sortable",template:a.a,events:{"change input[type=checkbox]":"onEnabledChange","click .settings-btn":"onSettingsClick","click .info-btn":"onInfoClick"},initialize:function(){this.attribution=this.model.get("attribution"),this.attribution.fetch();
},bindings:{".info-btn":{model:"attribution",modelAttribute:"content",manual:!0,autohide:!0},".settings-btn":{modelAttribute:"hasPrefs",manual:!0,autohide:!0}},onEnabledChange:function(e){this.model.set("enabled",e.target.checked)},onSettingsClick:function(e){e.preventDefault();var t=new c.a([],{server:this.model.server,url:"/:/plugins/"+this.model.id+"/prefs"});t.fetch().done(s.a.bind(function(){l.a.trigger("show:modal",new u.a({model:this.model,collection:t}))},this))},onInfoClick:function(e){e.preventDefault(),
l.a.trigger("show:modal",new d.a({model:this.model}))}});t.a=h},function(e,t,n){"use strict";var i=n(40),a=n(1727),r=n(1726),s=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a,emptyView:r.a});t.a=s},function(e,t,n){"use strict";var i=n(2767),a=n.n(i),r=n(10),s=r.a.ItemView.extend({template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2768),a=n.n(i),r=n(10),s=n(693),o=n(270),l=n(126),c=n(723),u=n(21),d=r.a.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",
template:a.a,ui:{icon:".device-icon",syncInfo:".sync-info"},events:{"click .remove-device-btn":"onRemoveClick"},isMediaServer:function(){if(null==this.isServer){var e=this.model.get("product").toLowerCase();this.isServer="plex media server"===e}return this.isServer},bindings:{".device-icon":{modelAttribute:"platform",manual:!0,formatter:function(e,t){var n=s.a.getIcon(e);t.attr("src",n)}},".name":{modelAttribute:"name",autohide:!1},".version":{modelAttribute:"productVersion",autohide:!1},".product":{
modelAttribute:"product",autohide:!1},".platform":{modelAttribute:"platform",autohide:function(e){return e&&this.isMediaServer()}},".platform-version":{modelAttribute:"platformVersion",autohide:function(e){return e&&this.isMediaServer()}},".device":{modelAttribute:"device",autohide:!1},".last-seen":{modelAttribute:"lastSeenAt",autohide:!0,formatter:function(e,t){return n.i(l.a)(e)}},".sync-count":{modelAttribute:"syncList",autohide:!1,formatter:function(e){if(e){var t,i=e.get("itemsCompleteCount");
return i&&i>0&&(t=[i,n.i(o.a)("item",i)].join(" "),this.ui.syncInfo.removeClass("hidden")),t}}},".sync-size":{modelAttribute:"syncList",autohide:!1,formatter:function(e){if(e){var t,i=e.get("totalSize");return i&&i>0&&(t=["(",n.i(c.a)(i),")"].join("")),t}}}},onRemoveClick:function(e){e.preventDefault(),this.isMediaServer()?u.a.execute("removeServer",{device:this.model}):u.a.execute("removeDevice",{device:this.model})}});t.a=d},function(e,t,n){"use strict";var i=n(40),a=n(1730),r=n(1729),s=i.a.extend({
tagName:"ul",className:"list card-tile-list",itemView:a.a,emptyView:r.a,sorted:!0});t.a=s},function(e,t,n){"use strict";var i=n(2769),a=n.n(i),r=n(10),s=r.a.ItemView.extend({template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2770),a=n.n(i),r=n(10),s=n(8),o=n(21),l=n(129),c=n(803),u=n(190),d=r.a.Layout.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:a.a,ui:{poster:".card-poster"},regions:{details:".card-details"},events:{"click .edit-btn":"onEditClick","click .delete-btn":"onDeleteClick"
},initialize:function(e){this.serverShares=this.model.get("serverShares"),this.image=new l.a({model:this.model,type:"friend",width:80})},bindings:{".username":{modelAttribute:"title"}},onRender:function(){this.image.setElement(this.ui.poster),this.details.show(new c.a({model:this.model}))},onClose:function(){this.image.close()},onEditClick:function(e){e.preventDefault(),s.a.trigger("show:modal",new u.a({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),o.a.execute("removeFriend",{
friend:this.model})}});t.a=d},function(e,t,n){"use strict";var i=n(40),a=n(804),r=n(1732),s=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a,emptyView:r.a,sorted:!0,isEmpty:function(e){return!this.collection||this.collection.length<2},addChildView:function(e,t,n){this.isEmpty(this.collection)?this.showEmptyView():this._showingEmptyView?this.render():this.children.findByModel(e)||i.a.prototype.addChildView.apply(this,arguments)},showEmptyView:function(){this._showingEmptyView||this.children.each(function(e){
this.removeChildView(e)},this),i.a.prototype.showEmptyView.apply(this,arguments)}});t.a=s},function(e,t,n){"use strict";var i=n(2772),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(14),c=n(804),u=o.a.Layout.extend({template:a.a,regions:{card:".centered-home-user-container"},initialize:function(e){this.itemViewOptions=e},serializeData:function(){var e=l.a("appModel"),t=e.get("user");return{hasHomeFeature:!!t.get("subscription").get("features").get("home"),plexPassUrl:t.server.get("plexPassUrl")}},onRender:function(){
var e=l.a("appModel"),t=e.get("user"),n=t.get("homeUsers");n.length&&this.card.show(new c.a(s.a.extend({},this.itemViewOptions,{model:n.first()})))}});t.a=u},function(e,t,n){"use strict";var i=n(2774),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(4),c=n(270),u=n(126),d=n(21),h=n(129),p=o.a.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:a.a,ui:{poster:".card-poster"},events:{"click .accept-btn":"onAcceptClick","click .delete-btn":"onDeleteClick"},initialize:function(e){
this.subset=this.model.collection.subset,this.image=new h.a({model:this.model,type:"friend",width:80})},serializeData:function(){return{showAccept:"requests"===this.subset}},bindings:{".username":{modelAttribute:"friendlyName"},".user-summary":{modelAttribute:"Server",autohide:!0,formatter:function(e){if("requested"===this.subset){var t=this.model.get("createdAt");return t?n.i(l.default)("invite sent {1}",n.i(u.a)(t)):n.i(l.default)("invite sent to {1}",this.model.get("email"))}var i=this.model.get("friend"),a=this.model.get("server"),r=this.model.get("home");
if(a){var o=s.a.reduce(e,function(e,t){return e+=t.numLibraries},0),d=n.i(c.a)(n.i(l.default)("library"),o,n.i(l.default)("libraries"));return r?n.i(l.default)("wants you to join their home and share {1} {2} with you",o,d):i?n.i(l.default)("wants to be friends and share {1} {2} with you",o,d):n.i(l.default)("wants to share {1} {2} with you",o,d)}return r?n.i(l.default)("wants you to join their home"):n.i(l.default)("wants to be friends")}}},onRender:function(){this.image.setElement(this.ui.poster);
},onClose:function(){this.image.close()},onAcceptClick:function(e){e.preventDefault(),d.a.execute("acceptInvite",{invite:this.model})},onDeleteClick:function(e){e.preventDefault(),d.a.execute("rejectInvite",{invite:this.model,subset:this.subset})}});t.a=p},function(e,t,n){"use strict";var i=n(40),a=n(1735),r=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2775),a=n.n(i),r=n(10),s=n(8),o=n(21),l=n(188),c={artist:"music",movie:"film",
photo:"picture",show:"display"},u=r.a.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:a.a,events:{"click .edit-section-btn":"onEditClick","click .delete-section-btn":"onDeleteClick"},serializeData:function(){var e=this.model.server,t=this.model.toJSON();return{section:t,serverID:e.id,icon:c[t.type]}},bindings:{".section-title":{modelAttribute:"title"}},onEditClick:function(e){e.preventDefault();var t=this.model,n=new l.a({model:t,server:t.server,isDefaultSection:t.isNew()
});t.isNew()&&n.promise.always(function(){t.trigger("destroy",t,t.collection)}),s.a.trigger("show:modal",n)},onDeleteClick:function(e){e.preventDefault(),o.a.execute("deleteSection",{section:this.model})}});t.a=u},function(e,t,n){"use strict";var i=n(40),a=n(1737),r=i.a.extend({className:"list announcement-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2776),a=n.n(i),r=n(10),s=n(105),o=r.a.ItemView.extend({className:"announcement-list-item",template:a.a,ui:{thumb:".thumb",unread:".unread"
},initialize:function(){this.image=new s.a({url:this.model.get("imageUrl")})},onRender:function(){this.image.setElement(this.ui.thumb),this.model.markAsRead()},onClose:function(){this.image.close()}});t.a=o},function(e,t,n){"use strict";var i=n(40),a=n(1739),r=i.a.extend({tagName:"ul",className:"list select-list select-friends-list dark-scrollbar",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2777),a=n.n(i),r=n(10),s=n(129),o=r.a.ItemView.extend({tagName:"li",className:"striped-list-item select-list-item",
template:a.a,ui:{poster:".user-poster"},initialize:function(e){this.image=new s.a({model:this.model,type:"friend",width:80})},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()}});t.a=o},function(e,t,n){"use strict";var i=n(40),a=n(1741),r=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2778),a=n.n(i),r=n(2),s=n.n(r),o=n(21),l=n(489),c=l.a.extend({template:a.a,className:"card-tile-list-item card-2-col-item",
events:{"click .play-btn":"onPlayClick","click .mark-watched-btn":"onMarkWatchedClick","click .mark-unwatched-btn":"onMarkUnwatchedClick","click .delete-btn":"onDeleteClick"},serializeData:function(){var e=l.a.prototype.serializeData.apply(this,arguments);return e},bindings:s.a.extend({},l.a.prototype.bindings,{".media-summary":{autohide:!0,formatter:function(){return this.model.get("message")||this.model.get("summary")}},".mark-unwatched-btn":{modelAttribute:"viewCount",manual:!0,autohide:function(e){
return e>0}},".mark-watched-btn":{modelAttribute:"viewCount",manual:!0,autohide:function(e){return 0===e}}}),onPlayClick:function(e){e.preventDefault(),o.a.execute("playMedia",{item:this.model,siblings:this.canPlaySiblings()})},onMarkWatchedClick:function(e){e.preventDefault(),o.a.execute("markWatched",{item:this.model})},onMarkUnwatchedClick:function(e){e.preventDefault(),o.a.execute("markUnwatched",{item:this.model})},onDeleteClick:function(e){e.preventDefault(),this.model.destroy()}});t.a=c},function(e,t,n){
"use strict";var i=n(2779),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(8),c=n(154),u=n(756),d=n(50),h=n(1719),p=d.a.extend({name:"addFolderModal",className:"add-folder-modal modal fade",template:a.a,events:s.a.extend({"submit form":"onSubmitForm"},d.a.prototype.events),ui:{path:'input[name="path"]'},regions:{rootList:".home-directory-container",childrenList:".path-container"},initialize:function(e){d.a.prototype.initialize.apply(this,arguments),this.rootPathCollection=new u.a([],{server:e.server}),this.childrenPathCollection=new u.a([],{
server:e.server}),this.loadRootPaths()},loadRootPaths:function(){this.rootPathCollection.fetch().done(this.whenRendered(function(){var e=this.rootPathCollection.where({home:!0}),t=s.a.first(e)||this.rootPathCollection.first();this.rootList.currentView.startLoadingItem(t),this.loadChildrenPaths(t)}))},loadChildrenPaths:function(e){c.a.abortAll("addFolderModal");var t=e.get("children"),i=t.fetch({scope:"addFolderModal"});i.done(this.whenRendered(function(){this.ui.path.val(e.get("path")),this.childrenPathCollection.reset(t.models);
})),i.fail(this.whenRendered(function(){this.childrenList.currentView.unselectItem(e),l.a.trigger("show:alert",{type:"error",message:n.i(o.default)("Unable to load contents of '{1}'",e.get("path"))})})),i.always(this.whenRendered(function(){this.rootList.currentView.stopLoadingItem(e)}))},onRender:function(){d.a.prototype.onRender.apply(this,arguments);var e=new h.a({isRoot:!0,collection:this.rootPathCollection}),t=new h.a({collection:this.childrenPathCollection});this.listenTo(e,"change:path",this.onRootPathChange),
this.listenTo(t,"change:path",this.onChildrenPathChange),this.rootList.show(e),this.childrenList.show(t)},onRootPathChange:function(e){this.childrenList.currentView.parentFilePath=null,this.rootList.currentView.startLoadingItem(e),this.loadChildrenPaths(e)},onChildrenPathChange:function(e){this.childrenList.currentView.startLoadingItem(e),this.loadChildrenPaths(e)},onSubmitForm:function(e){e.preventDefault(),this.trigger("add:folder",this.ui.path.val()),this.hide()}});t.a=p},function(e,t,n){"use strict";
var i=n(2780),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(4),u=n(8),d=n(318),h=n(50),p=n(138),f=p.a.extend({name:"addToCollectionModal",className:"add-to-collection-modal select-modal modal modal-sm fade",template:a.a,ui:{addBtn:".add-btn",message:".message"},events:s.a.extend({"click .collection":"onCollectionClick","keyup .message":"onMessageKeyUp","click .add-btn":"onAddClick"},h.a.prototype.events),onlyAfterRender:["onReset"],initialize:function(e){p.a.prototype.initialize.apply(this,arguments),
this.loading=!0,this.models=e.items,this.model=s.a.first(this.models),this.collectionIDs=[],this.filter=new d.a({filter:"collection",filterType:"string",type:"filter",title:"Collection"},{server:this.model.server,section:this.model.section,standalone:!0}),this.collections=this.filter.get("options"),this.collections.fetch().always(s.a.bind(this.onReset,this))},serializeData:function(){return{loading:this.loading,collections:this.filter.get("options").toJSON()}},toggleAddButton:function(){var e=this.ui.message.val().trim();
this.ui.addBtn.toggleClass("disabled",!this.collectionIDs.length&&!e)},onReset:function(){this.loading=!1,this.render()},onCollectionClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("value");t.hasClass("selected")?this.collectionIDs.splice(s.a.indexOf(this.collectionIDs,n),1):this.collectionIDs.push(n),t.toggleClass("selected"),this.toggleAddButton()},onMessageKeyUp:function(){this.toggleAddButton()},onAddClick:function(e){e.preventDefault();var t=this.ui.addBtn;if(!t.isDisabled()){
t.addClass("active");var i=this.ui.message.val().trim(),a=[];i&&a.push(this.model.batchAdd(this.models,"collection",i)),s.a.each(this.collectionIDs,function(e){var t=this.collections.get(e);a.push(this.model.batchAdd(this.models,"collection",t.get("title")))},this);var r=l.a.when.apply(l.a,a);r.done(s.a.bind(this.hide,this)),r.fail(function(){t.removeClass("active"),u.a.trigger("show:alert",{type:"error",message:n.i(c.default)("There was a problem adding to this collection.")})})}}});t.a=f},function(e,t,n){
"use strict";var i=n(2782),a=n.n(i),r=n(50),s=n(105),o=r.a.extend({name:"agentInfoModal",className:"agent-info-modal modal fade",template:a.a,regions:{icon:".agent-icon-container"},serializeData:function(){return{agent:this.model.toJSON(),attribution:this.model.get("attribution").get("content")}},onRender:function(){r.a.prototype.onRender.apply(this,arguments),this.icon.show(new s.a({model:this.model,url:"/system/agents/attribution/image?identifier="+this.model.id,className:"agent-icon",width:100,
height:100}))}});t.a=o},function(e,t,n){"use strict";var i=n(2783),a=n.n(i),r=n(2),s=n.n(r),o=n(8),l=n(21),c=n(50),u=n(54),d=c.a.extend({name:"channelModal",className:"channel-modal modal fade",template:a.a,ui:{poster:".media-poster",installBtn:".install-btn",updateBtn:".update-btn",uninstallBtn:".uninstall-btn"},events:s.a.extend({"click .browse-btn":"onBrowseClick","click .install-btn":"onInstallClick","click .update-btn":"onUpdateClick","click .restart-btn":"onRestartClick","click .reset-btn":"onResetClick",
"click .uninstall-btn":"onUninstallClick"},c.a.prototype.events),initialize:function(e){c.a.prototype.initialize.apply(this,arguments),this.closeOnInstall=e.closeOnInstall,this.image=new u.a({model:this.model,type:"channel",width:200})},serializeData:function(){return{channel:this.model.toJSON(),serverID:this.model.server.id,agent:/com.plexapp.agents./.test(this.model.id)}},bindings:{".installed-actions-container":{modelAttribute:"installed",manual:!0,autohide:!0},".uninstalled-actions-container":{
modelAttribute:"installed",manual:!0,autohide:function(e){return!e}}},onRender:function(){c.a.prototype.onRender.apply(this,arguments),this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onBrowseClick:function(e){e.preventDefault();var t=this.model.get("key"),n=s.a.last(t.split("/"));o.a.trigger("navigate","channel",{serverID:this.model.server.id,channelID:n}),this.hide()},onInstallClick:function(e){e.preventDefault();var t=this.ui.installBtn;if(!t.hasClass("active")){t.addClass("active");
var n=l.a.execute("installChannel",{channel:this.model});n.done(s.a.bind(function(){this.closeOnInstall&&this.hide()},this)),n.always(function(){t.removeClass("active")})}},onUpdateClick:function(e){e.preventDefault();var t=this.ui.updateBtn;if(!t.hasClass("active")){t.addClass("active");var n=l.a.execute("updateChannel",{channel:this.model,skipConfirmation:!0});n.always(function(){t.removeClass("active")})}},onRestartClick:function(e){e.preventDefault(),l.a.execute("restartChannel",{channel:this.model
})},onResetClick:function(e){e.preventDefault(),l.a.execute("resetChannel",{channel:this.model})},onUninstallClick:function(e){e.preventDefault();var t=this.ui.uninstallBtn;if(!t.hasClass("active")){t.addClass("active");var n=l.a.execute("uninstallChannel",{channel:this.model,skipConfirmation:!0});n.always(function(){t.removeClass("active")})}}});t.a=d},function(e,t,n){"use strict";var i=n(2789),a=n.n(i),r=n(42),s=r.a.extend({template:a.a,initialize:function(e){r.a.prototype.initialize.apply(this,arguments),
this.server=e.server},serializeData:function(){return this.server.toJSON()}});t.a=s},function(e,t,n){"use strict";var i=n(2790),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(4),u=n(8),d=n(50),h=d.a.extend({name:"importPlaylistsModal",className:"import-playlists-modal modal fade",template:a.a,ui:{importBtn:".import-btn",sections:"#section-list",importAll:"#import-all"},events:s.a.extend({"click .import-btn":"onImportClick"},d.a.prototype.events),initialize:function(e){d.a.prototype.initialize.apply(this,arguments),
this.server=e.server,this.musicSections=e.server.get("sections").where({type:"artist"})},serializeData:function(){var e=s.a.map(this.musicSections,function(e){return e.pick("key","title")});return{showSections:e.length>1,sections:e}},onImportClick:function(e){e.preventDefault();var t=this.ui.importBtn;t.addClass("active");var i=this.ui.sections.val(),a="/playlists/import/itunes?sectionID="+i;this.ui.importAll[0].checked&&(a+="&force=1");var r=s.a.extend(this.server.getXHROptions(a),{type:"PUT"}),o=l.a.ajax(r);
o.done(s.a.bind(function(){u.a.trigger("show:alert",{type:"success",message:n.i(c.default)("Playlists have been imported.")}),this.server.get("playlists").get("items").fetch(),this.hide()},this)),o.fail(function(){u.a.trigger("show:alert",{type:"error",message:n.i(c.default)("There was a problem importing.")})})}});t.a=h},function(e,t,n){"use strict";var i=n(2797),a=n.n(i),r=n(2),s=n.n(r),o=n(14),l=n(42),c=l.a.extend({template:a.a,events:s.a.extend({"click .learn-more":"onLearnMoreClick"},l.a.prototype.events),
onRender:function(){l.a.prototype.onRender.apply(this,arguments),n.i(o.a)("metrics").trackView({page:"relayNotification",mode:"modal",action:"dismiss"},{interaction:!1})},onHide:function(e){l.a.prototype.onHide.apply(this,arguments),n.i(o.a)("metrics").trackClick({page:"relayNotification",mode:"modal",action:"dismiss"})},onLearnMoreClick:function(){n.i(o.a)("metrics").trackClick({page:"relayNotification",mode:"modal",action:"learn"})},serializeData:function(){return{serverName:this.options.serverName
}}});t.a=c},function(e,t,n){"use strict";function i(e){return e?e.split("\n"):[]}var a=n(2798),r=n.n(a),s=n(50),o=s.a.extend({name:"releaseNotesModal",template:r.a,serializeData:function(){var e=this.model.toJSON();return e.version=e.version.replace(/\-.*/gi,""),e.added=i(e.added),e.fixed=i(e.fixed),e}});t.a=o},function(e,t,n){"use strict";var i=n(2799),a=n.n(i),r=n(138),s=r.a.extend({name:"selectDeviceModal",template:a.a,serializeData:function(){return{devices:this.collection.toJSON()}}});t.a=s},function(e,t,n){
"use strict";var i=n(2800),a=n.n(i),r=n(138),s=r.a.extend({name:"SelectMediaFileModal",template:a.a,serializeData:function(){var e=this.model.get("Media");return{medias:e}}});t.a=s},function(e,t,n){"use strict";var i=n(2801),a=n.n(i),r=n(125),s=n(138),o=s.a.extend({name:"selectOffsetModal",template:a.a,initialize:function(e){s.a.prototype.initialize.apply(this,arguments),this.offset=e.offset},serializeData:function(){return{offset:this.offset,formattedOffset:n.i(r.a)(this.offset)}}});t.a=o},function(e,t,n){
"use strict";var i=n(2802),a=n.n(i),r=n(2),s=n.n(r),o=n(32),l=n(14),c=n(1427),u=n(50),d=n(275),h=n(1578),p={osx:"mac"},f=u.a.extend({mixins:[d.a],name:"serverDownloadModal",className:"server-download-modal modal modal-lg fade",template:a.a,ui:{downloadBtn:".download-btn",paneTabs:".show-pane-btn",loading:".server-download-loading"},regions:{paneRegion:".pane-region"},events:s.a.extend({"click .show-pane-btn":"onShowPaneClick","click .download-btn":"onDownloadClick"},u.a.prototype.events),panesModel:"selectedModel",
onlyAfterRender:["showPane"],initialize:function(e){var t=this;u.a.prototype.initialize.apply(this,arguments);var n=l.a("appModel");n.get("primaryServer")||this.listenTo(n,"change:primaryServer",function(e,n){n&&n.id&&t.hide()}),this.downloadType=e.downloadType;var i=new c.a([],{server:n.get("cloudServer")}),a=i.populate();a.done(function(){t.collection=i.get(t.downloadType).get("platforms"),t.paneSetup(),t.render(),t.ui.loading.addClass("hidden")}),l.a("metrics").trackView({page:"downloads",firstRun:!0
})},serializeData:function(){return{items:this.collection?this.collection.toJSON():[],selectedPane:this.selectedModel?this.selectedModel.get("id"):null}},selectListItem:function(){var e=this.selectedModel.get("id");this.ui.paneTabs.removeClass("selected"),this.ui.paneTabs.filter('[data-pane="'+e+'"]').addClass("selected")},paneSetup:function(){this.panes=this.collection.reduce(function(e,t){var n=t.get("id");return e[n]={constructor:h.a},e},{});var e=o.a.platformID,t=p[e]||e;this.selectedModel=this.collection.get(t)||this.collection.first(),
this.showPane(this.selectedModel.get("id"))},onRender:function(){u.a.prototype.onRender.apply(this,arguments),this.selectedModel&&this.selectListItem()},onShowPaneClick:function(e){e.preventDefault();var t=this.$(e.currentTarget),n=t.data("pane");this.selectedModel=this.collection.get(n),this.showPane(n),this.selectListItem()},onDownloadClick:function(e){var t=this.selectedModel.get("id");l.a("metrics").trackClick({page:"downloads",firstRun:!0,action:"download",platform:this.downloadType,os:t})}});
t.a=f},function(e,t,n){"use strict";var i=n(2804),a=n.n(i),r=n(50),s=n(1664),o=r.a.extend({name:"syncStatusModal",template:a.a,regions:{list:".sync-status-list-container"},onRender:function(){r.a.prototype.onRender.apply(this,arguments),this.list.show(new s.a({collection:this.collection,itemViewOptions:{syncItem:this.model}}))}});t.a=o},function(e,t,n){"use strict";var i=n(2805),a=n.n(i),r=n(10),s=r.a.ItemView.extend({className:"modal-body",template:a.a,events:{"click .try-again-link":"onTryAgainClick"
},serializeData:function(){return{status:this.options.status}},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","loading")}});t.a=s},function(e,t,n){"use strict";var i=n(2806),a=n.n(i),r=n(10),s=r.a.ItemView.extend({className:"convert-location-container form-group",template:a.a,events:{"change select[name=storageLocation]":"onLocationChange"},serializeData:function(){return{disableLocation:!this.model.isNew(),selectedLocationID:this.model.get("locationID"),locations:this.model.section&&this.model.section.get("locations").toJSON()
}},onLocationChange:function(e){this.model.set("locationID",parseInt(e.currentTarget.value,10))}});t.a=s},function(e,t,n){"use strict";var i=n(2808),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(95),c=o.a.ItemView.extend({className:"convert-target-container form-group",template:a.a,ui:{targetTitleInput:".convert-target-title"},events:{"change select[name=target]":"onTargetChange","keydown input[name=targetTitle]":"onTitleKeyDown","change input[name=targetTitle]":"onTitleChange","change select[name=targetProfile]":"onProfileChange",
"change select[name=targetQuality]":"onQualityChange"},initialize:function(e){this.targets=e.targets,this.profiles=e.profiles;var t=this.model.get("Device").profile;t?this.selectedProfile=this.profiles.get(t):this.selectedProfile=this.profiles.findWhere({selected:!0}),this.availableCustomQualities=l.a.getAvailableQualities().reverse();var n=this.model.get("mediaSettings").get("maxVideoBitrate");if(n){var i=l.a.getNearestIndexToBitrate(n);this.selectedCustomQuality=l.a.getQualityByIndex(i)}else this.selectedCustomQuality=s.a.first(this.availableCustomQualities);
this.model.isNew()||this.model.get("targetTagID")||this.$el.addClass("show-custom-target")},serializeData:function(){return{item:this.model.toJSON(),targets:this.targets.toJSON(),disableTarget:!this.model.isNew(),profiles:this.profiles.toJSON(),selectedProfile:this.selectedProfile.toJSON(),availableCustomQualities:this.availableCustomQualities,selectedCustomQuality:this.selectedCustomQuality}},updateDeviceProfile:function(e){var t=this.model.get("Device");t.profile=this.selectedProfile.get("title");
},updateMediaSettings:function(e){var t=this.model.get("mediaSettings");t.set({videoQuality:e.videoQuality,videoResolution:e.videoResolution,maxVideoBitrate:e.bitrate})},onTargetChange:function(e){var t=parseInt(e.currentTarget.value,10);t>-1?(this.model.unset("target"),this.model.set({targetTagID:t,Device:{}}),this.model.get("mediaSettings").restoreDefaults()):(this.model.set("target",this.ui.targetTitleInput.val()),this.model.unset("targetTagID"),this.updateDeviceProfile(this.selectedProfile),this.updateMediaSettings(this.selectedCustomQuality)),
this.$el.toggleClass("show-custom-target",t===-1)},onTitleKeyDown:function(e){190===e.which&&0===e.currentTarget.selectionStart&&e.preventDefault()},onTitleChange:function(e){this.model.set("target",e.currentTarget.value)},onProfileChange:function(e){this.selectedProfile=this.profiles.findWhere({title:e.currentTarget.value}),this.updateDeviceProfile(this.selectedProfile)},onQualityChange:function(e){var t=parseInt(e.currentTarget.value,10);this.selectedCustomQuality=l.a.getQualityByIndex(t),this.updateMediaSettings(this.selectedCustomQuality);
}});t.a=c},function(e,t,n){"use strict";var i=n(2809),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(4),c=n(44),u=n(176),d=n(209),h=n(277),p=n(809),f=n(1757),g=n(1756),m=o.a.Layout.extend({template:a.a,ui:{submitBtn:".submit-btn"},regions:{policyRegion:".policy-region",targetsRegion:".targets-region",locationRegion:".location-region"},events:{"change input[name=title]":"onTitleChange","submit #convert-form":"onSubmit"},initialize:function(e){if(this.playlist=e.playlist,this.targets=e.targets,this.profiles=e.profiles,
this.model){this.tempModel=this.model.clone();var t=this.model.get("Location").librarySectionID;if(t){var n=new d.a({key:t},{server:this.model.server,onlyIfCached:!0});s.a.isEmpty(n)||(this.tempModel.section=n)}}else{var i,a=e.item,r=e.items,o=a.has("childrenKey")?a.get("children"):a,l=a.server;if(a.get("isSection"))i=a;else{var c=l.getSectionForItem(a);s.a.isEmpty(c)||(i=c)}this.tempModel=new h.a({title:u.a.title(a,{items:r}),targetTagID:this.targets.first().id,Location:{uri:u.a.uri(o,{items:r})
}},{server:l,section:i})}},serializeData:function(){return{conversionItem:this.tempModel.toJSON(),isNew:this.tempModel.isNew(),showRemuxOnlyWarning:this.tempModel.server.get("transcoderVideoRemuxOnly")}},onRender:function(){this.policyRegion.show(new p.a({model:this.tempModel,isSync:!1,isCloudSync:!1})),this.targetsRegion.show(new f.a({model:this.tempModel,targets:this.targets,profiles:this.profiles})),this.locationRegion.show(new g.a({model:this.tempModel}))},onTitleChange:function(e){this.tempModel.set("title",e.currentTarget.value);
},onSubmit:function(e){e.preventDefault();var t=this.ui.submitBtn;if(!t.hasClass("active")){if(t.addClass("active"),!this.tempModel.get("targetTagID")&&!this.tempModel.get("target")){var i=this.tempModel.get("Device");this.tempModel.set("target",n.i(l.default)("Custom: {1}",i.profile))}var a=this.playlist.addContent(this.tempModel);a.done(this.whenRendered(function(){if(this.model){var e=s.a.omit(this.tempModel.toJSON(),"children");this.model.set(this.model.parse(e))}this.trigger("request:nextState");
})),a.fail(this.whenRendered(function(e){var t=e.responseText,n=c.a.parseXML(t),i=n&&n.status;this.trigger("request:state","error",i)}))}}});t.a=m},function(e,t,n){"use strict";var i=n(2810),a=n.n(i),r=n(10),s=r.a.ItemView.extend({className:"modal-body loading-container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2812),a=n.n(i),r=n(10),s=n(8),o=r.a.ItemView.extend({className:"modal-body",template:a.a,events:{"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),
this.triggerMethod("request:nextState"),s.a.trigger("navigate","conversion",{serverID:this.options.server.id})}});t.a=o},function(e,t,n){"use strict";var i=n(2813),a=n.n(i),r=n(10),s=r.a.ItemView.extend({className:"modal-body",template:a.a,events:{"click .try-again-link":"onTryAgainClick"},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","form")}});t.a=s},function(e,t,n){"use strict";var i=n(2814),a=n.n(i),r=n(10),s=n(14),o=n(36),l=n(95),c=n(1257),u=n(1258),d=r.a.ItemView.extend({
className:"sync-quality-container form-group",template:a.a,events:{"change select[name=videoQuality]":"onVideoQualityChange","change select[name=musicQuality]":"onMusicQualityChange","change select[name=photoQuality]":"onPhotoQualityChange"},initialize:function(e){var t=n.i(s.a)("appModel").get("settings");this.mediaSettings=this.model.get("mediaSettings"),this.mediaSettings.has("audioBoost")||this.mediaSettings.set("audioBoost",t.get("audioBoost")),this.mediaSettings.has("subtitleSize")||this.mediaSettings.set("subtitleSize",t.get("subtitleSize")),
this.initVideoQuality(),this.initMusicQuality(),this.initPhotoQuality()},initVideoQuality:function(){this.availableVideoQualities=l.a.getAvailableQualities().reverse();var e=n.i(s.a)("appModel").get("settings"),t=this.mediaSettings.get("maxVideoBitrate"),i=t?l.a.getNearestIndexToBitrate(t):e.get(l.a.getSyncQualityAttribute());this.updateVideoQuality(l.a.getQualityByIndex(i))},initMusicQuality:function(){this.availableMusicQualities=c.a.getAvailableQualities().reverse();var e=n.i(s.a)("appModel").get("settings"),t=this.mediaSettings.get("musicBitrate"),i=t?c.a.getNearestIndexToBitrate(t):e.get(c.a.getSyncQualityAttribute());
this.updateMusicQuality(c.a.getQualityByIndex(i))},initPhotoQuality:function(){this.availablePhotoQualities=u.a.getAvailableQualities().reverse();var e=n.i(s.a)("appModel").get("settings"),t=this.mediaSettings.get("photoQuality"),i=t?u.a.getNearestIndexToQuality(t):e.get(u.a.getSyncQualityAttribute());this.updatePhotoQuality(u.a.getQualityByIndex(i))},serializeData:function(){var e=this.model.get("metadataType"),t=o.a.get(e);return{typeElement:t.element,supportsOriginalQuality:this.model.server.supports("syncOriginalQuality"),
availableVideoQualities:this.availableVideoQualities,selectedVideoQuality:this.selectedVideoQuality,availableMusicQualities:this.availableMusicQualities,selectedMusicQuality:this.selectedMusicQuality,availablePhotoQualities:this.availablePhotoQualities,selectedPhotoQuality:this.selectedPhotoQuality}},updateVideoQuality:function(e){this.selectedVideoQuality=e,this.mediaSettings.set({videoQuality:e.videoQuality,videoResolution:e.videoResolution,maxVideoBitrate:e.bitrate})},updateMusicQuality:function(e){
this.selectedMusicQuality=e,this.mediaSettings.set({musicBitrate:e.bitrate})},updatePhotoQuality:function(e){this.selectedPhotoQuality=e,this.mediaSettings.set({photoQuality:e.photoQuality,photoResolution:e.photoResolution})},saveQualityIndex:function(e,t){var i=parseInt(t,10),a=n.i(s.a)("appModel").get("settings");return a.save(e.getSyncQualityAttribute(),i),e.getQualityByIndex(i)},onVideoQualityChange:function(e){var t=this.saveQualityIndex(l.a,e.currentTarget.value);this.updateVideoQuality(t)},
onMusicQualityChange:function(e){var t=this.saveQualityIndex(c.a,e.currentTarget.value);this.updateMusicQuality(t)},onPhotoQualityChange:function(e){var t=this.saveQualityIndex(u.a,e.currentTarget.value);this.updatePhotoQuality(t)}});t.a=d},function(e,t,n){"use strict";var i=n(2815),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(14),c=n(176),u=n(36),d=n(21),h=n(433),p=n(809),f=n(1762),g={video:"movie",audio:"track",photo:"photo"},m=o.a.Layout.extend({template:a.a,ui:{submitBtn:".submit-btn"},regions:{policyRegion:".policy-region",
qualityRegion:".quality-region"},events:{"change input[name=title]":"onTitleChange","submit #sync-form":"onSubmit"},initialize:function(e){var t=l.a("appModel");if(this.device=e.device,this.model)this.tempModel=this.model.clone();else{var n,i,a=e.item,r=e.items;a.get("isPlaylist")?(n=a,i=g[a.get("playlistType")]):a.get("isMetadataList")?(n=a,i=u.a.getChildMediaType(a.get("firstItemType")).typeString):(n=a.has("childrenKey")?a.get("children"):a,i=u.a.getChildMediaType(a.get("type")).typeString),this.tempModel=new h.a({
metadataType:i,title:c.a.title(a,{items:r}),rootTitle:this.getRootTitle(a),machineIdentifier:a.server.id,clientIdentifier:this.device.get("clientIdentifier"),Location:{uri:c.a.uri(n,{items:r})}},{parent:a.server,server:t.get("user").server,device:this.device})}},serializeData:function(){return{syncItem:this.tempModel.toJSON(),isNew:this.tempModel.isNew()}},getRootTitle:function(e){return e.section?e.section.get("title"):e.channel?e.channel.get("title"):e.get("title")},onRender:function(){this.policyRegion.show(new p.a({
model:this.tempModel,isSync:!0,isCloudSync:this.device.get("isCloudSync")})),this.qualityRegion.show(new f.a({model:this.tempModel}))},onTitleChange:function(e){this.tempModel.set("title",e.currentTarget.value)},onSubmit:function(e){e.preventDefault();var t=this.ui.submitBtn;if(!t.hasClass("active")){t.addClass("active");var n=this.tempModel.save();n.done(s.a.bind(function(){if(this.model){var e=this.model.get("version")||0,t=s.a.omit(this.tempModel.toJSON(),"children");t.version=e+1,this.model.set(this.model.parse(t));
}},this)),n=n.then(s.a.bind(function(){return d.a.execute("refreshSyncLists",{server:this.tempModel.parent,silent:!0})},this)),n.done(this.whenRendered(function(){this.trigger("request:nextState")})),n.fail(this.whenRendered(function(){this.trigger("request:state","error")}))}}});t.a=m},function(e,t,n){"use strict";var i=n(2817),a=n.n(i),r=n(10),s=n(8),o=r.a.ItemView.extend({className:"modal-body",template:a.a,events:{"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),
this.triggerMethod("request:nextState"),s.a.trigger("navigate","sync",{serverID:this.options.server.id,deviceID:this.options.device.id})}});t.a=o},function(e,t,n){"use strict";var i=n(2818),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(723),c=n(221),u=n(50),d=n(1709),h=u.a.extend({mixins:[c.a],name:"versionGeneratorMetadataModal",className:"version-generator-metadata-modal modal fade",template:a.a,pageSize:20,scrollThreshold:50,ui:{body:".modal-body",loading:".loading",errorMessage:".error-message"},regions:{
listRegion:".list-region"},initialize:function(e){this.status=this.model.get("status"),this.listModel=e.listModel,this.collection=this.listModel.get("metadataItems"),this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,this.handleScroll=s.a.throttle(this.whenRendered(this.onScroll),100)},states:{base:{},loading:{onEnter:function(){this.ui.loading.removeClass("hidden")},onExit:function(){this.ui.loading.addClass("hidden")}},error:{onEnter:function(){this.ui.errorMessage.removeClass("hidden");
},onExit:function(){this.ui.errorMessage.addClass("hidden")}}},bindings:{".generator-title":{modelAttribute:"title"},".generator-items-count":{model:"status",modelAttribute:"itemsCount",formatter:function(e){return 1===e?n.i(o.default)("{1} item",e):n.i(o.default)("{1} items",e)}},".generator-total-size":{model:"status",modelAttribute:"totalSize",formatter:function(e){return e?n.i(l.a)(e):n.i(o.default)("0 files")}},".generator-failure-container":{model:"status",modelAttribute:"failure",manual:!0,
autohide:function(e){return!!e}},".generator-failure-message":{model:"status",modelAttribute:"failure",formatter:function(e){return e}}},populatePage:function(){this.enterState("loading");var e=this.listModel.populateRange({start:0,end:this.listModel.get("populatedRange").end+this.pageSize});return e.done(this.whenRendered(function(){this.enterState("base")})),e.fail(this.whenRendered(function(){this.enterState("error")})),e},onRender:function(){u.a.prototype.onRender.apply(this,arguments),this.ui.body.on("scroll",this.handleScroll),
this.model.fetch(),this.populatePage(),this.listRegion.show(new d.a({collection:this.collection,itemViewOptions:{generator:this.model,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}}))},onClose:function(){this.ui.body.off("scroll",this.handleScroll),this.collection.reset()},onScroll:function(){if("error"!==this.currentState){var e=this.ui.body.prop("scrollHeight")-this.ui.body.innerHeight(),t=e-this.ui.body.scrollTop()<this.scrollThreshold;t&&this.listModel.get("populatedRange").end<this.listModel.get("totalSize")&&this.populatePage();
}}});t.a=h},function(e,t,n){"use strict";var i=n(2820),a=n.n(i),r=n(10),s=n(129),o=r.a.ItemView.extend({template:a.a,ui:{poster:".media-poster"},events:{"change input":"onInputChange","click .remove-home-btn":"onRemoveHomeClick","click .remove-friend-btn":"onRemoveFriendClick","click .disable-guest-btn":"onGuestDisableClick"},initialize:function(e){this.paneID=e.paneID,this.homeUser=e.homeUser,this.type=e.type,this.isAdmin=e.isAdmin,this.changes={},this.image=new s.a({model:this.model,type:"friend",
width:60})},serializeData:function(){var e=!this.model.isNew(),t=this.homeUser&&!this.homeUser.isNew();return{friend:this.model.toJSON(),homeUser:this.homeUser&&this.homeUser.toJSON(),canRemoveFriend:e,canRemoveHomeUser:t&&this.isAdmin,showActions:e||t}},flushChanges:function(){this.homeUser&&this.homeUser.set(this.changes)},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onInputChange:function(e){var t=e.currentTarget,n=t.value;"checkbox"===t.type&&(n=t.checked),
this.changes[t.name]=n},onRemoveHomeClick:function(e){e.preventDefault(),this.trigger("destroy:homeUser")},onRemoveFriendClick:function(e){e.preventDefault(),this.trigger("destroy:friend")},onGuestDisableClick:function(e){e.preventDefault(),this.trigger("disable:guest")}});t.a=o},function(e,t,n){"use strict";var i=n(2821),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(1768),c=o.a.Layout.extend({tagName:"ul",className:"list modal-nav-list",template:a.a,ui:{sharedHeader:".shared-list-header"},regions:{ownedServerList:".owned-servers-container",
sharedServerList:".shared-servers-container"},events:{"click .change-pane-btn":"onChangePaneClick"},onlyAfterRender:["selectItem","toggleDisabled"],initialize:function(){this.serverOverviews=this.model.get("serverOverviews"),this.sharedServerShares=this.model.get("serverShares").filterByShared(),this.listenTo(this.sharedServerShares,"reset add remove",this.updateHeaders)},setModel:function(e){this.stopListening(),this.model=e,this.initialize(),this.render()},selectItem:function(e){this.$(".change-pane-btn").removeClass("selected"),
this.$('[data-pane-id="'+e+'"]').addClass("selected")},toggleDisabled:function(e){this.$(".change-pane-btn").toggleClass("disabled",e),this.$(".modal-nav-list-header").toggleClass("disabled",e)},updateHeaders:function(){this.ui.sharedHeader.toggleClass("hidden",!this.sharedServerShares.length)},onRender:function(){this.updateHeaders(),this.ownedServerList.show(new l.a({collection:this.serverOverviews,itemViewOptions:{paneType:"ownedServer"}})),this.sharedServerList.show(new l.a({collection:this.sharedServerShares,
itemViewOptions:{paneType:"sharedServer"}}))},onChangePaneClick:function(e){e.preventDefault();var t=s()(e.currentTarget);if(!t.isDisabled()){var n=t.data("pane"),i=t.data("pane-id"),a={};"ownedServer"===n?a.serverOverview=this.model.get("serverOverviews").get(i):"sharedServer"===n&&(a.serverShare=this.model.get("serverShares").get(i)),this.trigger("change:pane",n,i,a)}}});t.a=c},function(e,t,n){"use strict";var i=n(40),a=n(1769),r=i.a.extend({className:"server-nav-list",itemView:a.a});t.a=r},function(e,t,n){
"use strict";var i=n(2822),a=n.n(i),r=n(10),s=n(14),o=r.a.ItemView.extend({tagName:"a",className:"btn-gray change-pane-btn disabled",template:a.a,initialize:function(e){this.$el.attr({href:"#","data-pane":e.paneType,"data-pane-id":this.model.id});var t=s.a("appModel"),n=t.get("servers"),i=n.get(this.model.get("machineIdentifier"));i?this.attachServer(i):this.listenTo(n,"add",this.onServerAdd)},serializeData:function(){var e;return e=this.server&&null!=this.server.get("connected")?this.server.get("connected")?"available":"unavailable":"unknown",
{server:this.model.toJSON(),status:e}},attachServer:function(e){this.server=e,this.listenTo(e,"change:connected",this.render)},onServerAdd:function(e){e.id===this.model.get("machineIdentifier")&&(this.attachServer(e),this.render())}});t.a=o},function(e,t,n){"use strict";var i=n(2823),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(126),h=n(1773),p=c.a.Layout.extend({template:a.a,ui:{details:".server-details",lastSeenRow:".server-detail-last-seen-row"},regions:{share:".share-details"},
events:{"click .server-status-btn":"onServerStatusClick"},initialize:function(e){var t=u.a("appModel");this.paneID=e.paneID,this.serverOverview=e.serverOverview,this.server=t.get("servers").get(this.serverOverview.id);var n=this.model.get("serverShares");this.serverShare=n.findWhere({machineIdentifier:this.serverOverview.id}),this.changes={}},serializeData:function(){return{server:this.serverOverview.toJSON()}},flushChanges:function(){var e=this.model.get("serverShares"),t=e.findWhere({machineIdentifier:this.serverOverview.id
}),n=this.getServerShareAttributes(this.serverOverview);t?t.set(n):e.add(n)},getServerShareAttributes:function(e){var t=e.get("sections"),n=this.$("#"+e.id+"-section-list"),i=n.find(":checked:visible"),a=[],r={machineIdentifier:e.id,owned:!0,allLibraries:!1};return i.each(function(){return"all"===this.value?(r.allLibraries=!0,!1):void a.push(parseInt(this.value,10))}),r.allLibraries?r.numLibraries=t.length:r.numLibraries=a.length,r.Section=t.map(function(e){var t=e.toJSON();return t.shared=r.allLibraries||s.a.contains(a,t.id),
t}),r},bindings:{".server-title":{model:"serverOverview",modelAttribute:"name"},".server-status-btn":{model:"server",modelAttribute:"connected",manual:!0,formatter:function(e,t){t.removeClass("unknown available unauthorized unavailable"),null==e?t.addClass("unknown"):e?t.addClass("available"):this.server.get("unauthorized")?t.addClass("unauthorized"):t.addClass("unavailable")}},".server-detail-version":{model:"server",modelAttribute:"shortVersion"},".server-detail-last-seen":{model:"serverShare",
modelAttribute:"lastSeenAt",formatter:function(e){var t=n.i(d.a)(e);return this.ui.lastSeenRow.toggleClass("hidden",!t),t}},".server-detail-address":{model:"serverOverview",modelAttribute:"address",formatter:function(e){if(e)return e;var t=this.server.get("activeConnection");return t?t.address:void 0}},".server-detail-port":{model:"serverOverview",modelAttribute:"port",formatter:function(e){if(e)return e;var t=this.server.get("activeConnection");return t?t.port:void 0}}},onRender:function(){this.share.append(new h.a({
model:this.model,serverOverview:this.serverOverview,itemViewOptions:this.itemViewOptions}))},onServerStatusClick:function(e){e.preventDefault();var t=l()(e.currentTarget);t.toggleClass("active"),this.ui.details.toggleClass("transition-out",!t.hasClass("active"))}});t.a=p},function(e,t,n){"use strict";var i=n(2824),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(104),h=n(318),p=n(617),f=(n.n(p),c.a.ItemView.extend({className:"form-horizontal",template:a.a,filters:{contentRating:{sectionTypes:["movie","show"],
presets:{movie:["G","PG","PG-13","R","NC-17","None"],show:["TV-Y","TV-Y7","TV-G","TV-PG","TV-14","TV-MA","None"]}},label:{sectionTypes:["movie","show","artist"]}},filterByType:{movie:"filterMovies",show:"filterTelevision",artist:"filterMusic"},ui:{tagInputs:".tag-input-hidden"},events:{"change input":"onInputChange"},initialize:function(e){this.paneID=e.paneID,this.type=e.type;var t=u.a("appModel"),n=t.get("user");this.hasContentFilterFeature=n.get("subscription").get("features").get("content_filter"),
this.plexPassUrl=n.server.get("plexPassUrl"),this.changes={}},serializeData:function(){return{user:this.model.toJSON(),hasContentFilterFeature:this.hasContentFilterFeature,plexPassUrl:this.plexPassUrl,moviesIcon:d.a.get("movies").sectionTypeIcon,showsIcon:d.a.get("tv").sectionTypeIcon,musicIcon:d.a.get("music").sectionTypeIcon}},loadPresets:function(){s.a.each(this.filters,function(e,t){s.a.isEmpty(e.presets)||s.a.each(e.presets,function(e,n){var i=this.getSelectizeInputByFilterName(t,n),a=s.a.map(e,function(e){
return{title:e,key:e}});i.addOption(a)},this)},this)},loadSections:function(){var e=u.a("appModel"),t=e.get("servers"),n=this.model.get("serverShares"),i=n.filter(function(e){return e.isActive()&&e.get("owned")}),a=s.a.compact(s.a.map(i,function(e){return t.get(e.get("machineIdentifier"))}));s.a.each(a,function(e){if(e.get("connected")){var t=e.get("sections");t.populate().done(s.a.bind(function(){this.loadFilters(t)},this))}},this)},loadFilters:function(e){e.each(function(e){var t=e.get("type");s.a.each(this.filters,function(n,i){
s.a.contains(n.sectionTypes,t)&&this.loadFilterOptions(e,i)},this)},this)},loadFilterOptions:function(e,t){var n=new h.a({filter:t,filterType:"string"},{server:e.server,section:e}),i=n.get("options");i.populate().done(s.a.bind(function(){var n=this.getSelectizeInputByFilterName(t,e.get("type"));n.addOption(i.toJSON())},this))},getSelectizeInputByFilterName:function(e,t){var n="#filter-"+t+"-"+e;return this.$(n)[0].selectize},resetAllPlaceholders:function(){var e=[];s.a.each(this.filters,function(t){
e=s.a.union(e,t.sectionTypes)}),s.a.each(e,function(e){var t=this.model.get(this.filterByType[e]);this.resetPlaceholders(e,{restore:s.a.isEmpty(t)})},this)},resetPlaceholders:function(e,t){t||(t={});var n=this.$("input[data-section-type="+e+"]");n.each(function(){var e=t.restore?this.placeholder:"";e?(this.selectize.settings.placeholder=e,this.selectize.updatePlaceholder()):this.selectize.$control_input.attr("placeholder","")})},flushChanges:function(){this.model.set(this.changes)},onRender:function(){
return this.hasContentFilterFeature?(this.ui.tagInputs.selectize({plugins:["remove_button"],create:!0,labelField:"title",valueField:"title",sortField:"title",searchField:["title"]}),this.resetAllPlaceholders(),this.loadSections(),void this.loadPresets()):void this.$el.addClass("no-plex-pass")},onInputChange:function(e){var t=e.currentTarget,n=l()(t),i=t.value,a=n.data("filter"),r=n.data("sectionType");if(this.hasContentFilterFeature||"allowChannels"===t.name){if(a){var o=this.changes[t.name]||this.model.get(t.name)||{};
i?o[a]=i:o.hasOwnProperty(a)&&delete o[a],this.resetPlaceholders(r,{restore:s.a.isEmpty(o)}),i=o}else"checkbox"===t.type&&(i=t.checked);this.changes[t.name]=i}}}));t.a=f},function(e,t,n){"use strict";var i=n(2825),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(104),c=o.a.ItemView.extend({tagName:"li",className:"share-section-list-item",template:a.a,initialize:function(e){this.serverShare=e.serverShare},serializeData:function(){var e={section:this.model.toJSON(),typeIcon:l.a.get(this.model.get("type")).sectionTypeIcon,
isChecked:!1};if(this.serverShare&&!this.serverShare.get("allLibraries")){var t=this.serverShare.get("Section");e.isChecked=!!s.a.findWhere(t,{id:this.model.id,shared:!0})}return e}});t.a=c},function(e,t,n){"use strict";var i=n(2826),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(1772),d=c.a.CompositeView.extend({className:"share-server-container",template:a.a,itemView:u.a,itemViewContainer:".share-section-list",ui:{list:".share-section-list"},events:{"change input[name=share-all-libraries-cb]":"onAllLibrariesChange"
},initialize:function(e){s.a.bindAll(this,"render"),this.serverOverview=e.serverOverview,this.collection=this.serverOverview.get("sections");var t=this.model.get("serverShares");this.serverShare=t.findWhere({machineIdentifier:this.serverOverview.id});var n=[];n.push(this.serverOverview.populate()),this.serverShare&&(this.itemViewOptions={serverShare:this.serverShare},this.serverShare.isNew()||n.push(this.serverShare.populate())),this.listPromise=l.a.when.apply(l.a,n),"pending"===this.listPromise.state()&&this.listPromise.always(this.render);
},serializeData:function(){var e=this.listPromise.state(),t=!this.serverShare&&this.model.isNew(),n=this.serverShare&&this.serverShare.get("allLibraries");return{server:this.serverOverview.toJSON(),isPending:"pending"===e,hasFailed:"rejected"===e,hasSections:!!this.serverOverview.get("sections").length,allLibraries:t||n}},onAllLibrariesChange:function(e){this.ui.list.toggleClass("show-libraries",!e.currentTarget.checked)}});t.a=d},function(e,t,n){"use strict";var i=n(2827),a=n.n(i),r=n(2828),s=n.n(r),o=n(2),l=n.n(o),c=n(5),u=n.n(c),d=n(10),h=n(14),p=n(4),f=n(126),g=n(104),m=d.a.ItemView.extend({
template:a.a,ui:{details:".server-details"},events:{"click .server-status-btn":"onServerStatusClick","click .leave-server-btn":"onLeaveServerClick"},initialize:function(e){this.paneID=e.paneID,this.serverShare=e.serverShare,this.serverShare.populate();var t=h.a("appModel"),n=t.get("servers"),i=n.get(this.serverShare.get("machineIdentifier"));i?this.attachServer(i):this.listenTo(n,"add",this.onServerAdd)},flushChanges:function(){},attachServer:function(e){this.server=e,this.listenTo(e,"change:connected",this.render);
},bindings:{".server-title":{model:"serverShare",modelAttribute:"name"},".server-status-btn":{model:"server",modelAttribute:"connected",manual:!0,formatter:function(e,t){t.removeClass("unknown available unauthorized unavailable"),null==e?t.addClass("unknown"):e?t.addClass("available"):this.server.get("unauthorized")?t.addClass("unauthorized"):t.addClass("unavailable")}},".server-detail-version":{model:"server",modelAttribute:"shortVersion"},".server-detail-last-seen":{model:"serverShare",modelAttribute:"lastSeenAt",
formatter:function(e){return n.i(f.a)(e)}},".server-detail-address":{model:"server",modelAttribute:"activeConnection",formatter:function(e){return e&&e.address}},".server-detail-port":{model:"server",modelAttribute:"activeConnection",formatter:function(e){return e&&e.port}},".server-restriction-allow-sync":{model:"serverShare",modelAttribute:"allowSync",manual:!0,autohide:!0},".share-section-list":{model:"serverShare",modelAttribute:"Section",isHtml:!0,formatter:function(e){var t;return e.length||"pending"!==this.serverShare.populatePromise.state()?(t="",
l.a.each(l.a.where(e,{shared:!0}),function(e){var n={section:e,typeIcon:g.a.get(e.type).sectionTypeIcon};t+=s()(n)})):t=s()({section:{title:n.i(p.default)("Loading...")},typeIcon:"hidden"}),t}}},onServerAdd:function(e){e.id===this.serverShare.get("machineIdentifier")&&(this.attachServer(e),this.unbindFromModel(),this.bindToModel())},onServerStatusClick:function(e){e.preventDefault();var t=u()(e.currentTarget);t.toggleClass("active"),this.ui.details.toggleClass("transition-out",!t.hasClass("active"));
},onLeaveServerClick:function(e){e.preventDefault(),this.trigger("destroy:serverShare",this.serverShare)}});t.a=m},function(e,t,n){"use strict";var i=n(2829),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(21),d=c.a.ItemView.extend({template:a.a,focusDelay:200,validationDelay:500,ui:{existingGroup:".existing-user-group",existingBtn:".add-existing-user-btn",restrictedGroup:".restricted-user-group",restrictedBtn:".add-restricted-user-btn"},events:{"keyup input":"onInputChange","change input":"onInputChange",
"click .add-existing-user-btn":"onAddExistingUserClick","click .add-restricted-user-btn":"onAddRestrictedUserClick"},initialize:function(e){this.paneID=e.paneID,this.type=e.type,this.homeUser=e.homeUser,this.changes={},this.validate=s.a.debounce(this.validate,500)},serializeData:function(){return{type:this.type}},flushChanges:function(){this.model.set(this.changes),this.homeUser&&this.homeUser.set(this.changes)},focusInput:function(){var e;e=this.changes.restricted?this.$("[name=title]"):this.$("[name=username]"),
e.removeClass("hidden"),e.focus()},validate:function(e){if(e){var t=u.a.execute("validateUsername",{username:e,server:this.model.server});t.done(s.a.bind(function(){this.$el.addClass("is-valid-username"),this.$el.removeClass("is-invalid-username")},this)),t.fail(s.a.bind(function(e,t){this.$el.removeClass("is-valid-username"),this.$el.addClass("is-invalid-username"),this.trigger("change:errorMessage",t)},this))}},onRender:function(){"friend"===this.type&&setTimeout(s.a.bind(this.focusInput,this),this.focusDelay);
},onInputChange:function(e){var t=e.currentTarget,n=t.name,i=t.value;i!==this.changes[n]&&(this.changes[n]=i,this.trigger("change:errorMessage",""),this.trigger("enable:submit",!!i),"username"===n&&this.validate(i))},onAddExistingUserClick:function(e){e.preventDefault();var t=l()(e.currentTarget);t.isDisabled()||(t.addClass("hidden"),this.ui.restrictedGroup.addClass("disabled"),this.ui.restrictedBtn.addClass("disabled"),this.focusInput())},onAddRestrictedUserClick:function(e){e.preventDefault();var t=l()(e.currentTarget);
t.isDisabled()||(this.changes.restricted=!0,t.addClass("hidden"),this.ui.existingGroup.addClass("disabled"),this.ui.existingBtn.addClass("disabled"),this.focusInput())}});t.a=d},function(e,t,n){"use strict";var i=n(2832),a=n.n(i),r=n(282),s=r.a.extend({className:"user-select-alert-bar",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2833),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(4),h=n(8),p=n(32),f=n(21),g=n(812),m=n(811),v=c.a.Layout.extend({className:"user-select-modal-pin-container",
template:a.a,ui:{digitContainer:".pin-digit-container",input:".pin-input",digits:".pin-digit",loading:".loading",removeBtn:".remove-btn",saveBtn:".save-btn"},regions:{userList:".user-select-list"},events:{"keydown input":"onKeyDown","input input":"onInput","keyup input":"onKeyUp","focus input":"onFocus","blur input":"onBlur","change input":"onChange","animationend .pin-input-container":"onInputsAnimationEnd","webkitAnimationEnd .pin-input-container":"onInputsAnimationEnd","oAnimationEnd .pin-input-container":"onInputsAnimationEnd",
"click .back-btn":"onBackClick","click .remove-btn":"onRemoveClick","submit #pin-form":"onSubmit","click .pin-digit":"onPINClick","keydown .save-btn":"onSaveKeyDown"},onlyAfterRender:["confirmUser"],initialize:function(e){var t=u.a("appModel");this.isForced=e.isForced,this.isEditing=e.isEditing,this.isEditWarning=e.isEditWarning,this.showBackButton=e.showBackButton,this.focusDelay=e.focusDelay,this.user=t.get("user"),this.isEditConfirmation=this.isEditing&&this.model.get("protected")&&!this.model.get("restricted");
},serializeData:function(){var e=this.isEditing&&!this.isEditConfirmation;return{isEditing:e,isEditWarning:this.isEditWarning,isEditConfirmation:this.isEditConfirmation,hasCurrentPIN:this.model.get("protected"),showBackButton:this.showBackButton}},focusInput:function(){this.ui.input.val(""),this.ui.input.focus()},getPIN:function(){return this.ui.input.val()},editPIN:function(e){if(!this.ui.saveBtn.isDisabled()){this.ui.saveBtn.addClass("disabled");var t=this.savePIN(e);t.fail(this.whenRendered(function(){
this.ui.saveBtn.removeClass("disabled"),h.a.trigger("show:alert",{type:"error",message:n.i(d.default)("This PIN could not be saved.")})}))}},removePIN:function(){if(!this.ui.removeBtn.isDisabled()){this.ui.removeBtn.addClass("disabled");var e=this.savePIN("");e.fail(this.whenRendered(function(){this.ui.removeBtn.removeClass("disabled"),h.a.trigger("show:alert",{type:"error",message:n.i(d.default)("This PIN could not be removed.")})}))}},savePIN:function(e){this.ui.loading.removeClass("hidden");var t={
pin:e};this.currentPin&&(t.currentPin=this.currentPin);var n=this.model.save(t,{wait:!0});return n.done(s.a.bind(function(){this.model.unset("pin"),this.model.unset("currentPin"),this.model.set("protected",!!e),this.model.id===this.user.id&&(e?this.user.set("pin",this.user.hashPIN(e)):this.user.unset("pin"),this.user.set("home",this.user.hasHome())),this.trigger("resolve",e),e&&this.user.get("homeUsers").length<2&&h.a.trigger("show:modal",new m.a({type:"pin"}))},this)),n.always(this.whenRendered(function(){
this.ui.loading.addClass("hidden")})),n},confirmUser:function(e){this.ui.loading.removeClass("hidden");var t=f.a.execute("switchUser",{homeUser:this.model,pin:e,allowGuestLock:!this.isEditing});t.done(s.a.bind(function(){this.isEditing?(this.isEditConfirmation=!1,this.currentPin=e,this.render()):this.trigger("resolve",e)},this)),t.fail(this.whenRendered(function(){this.ui.digitContainer.addClass("shake"),this.ui.input.val(""),this.focusInput()})),t.always(this.whenRendered(function(){this.ui.loading.addClass("hidden");
}))},renderPIN:function(){var e=this.getPIN(),t=e.length,n=this.isEditing&&!this.isEditConfirmation;this.ui.digits.each(function(i,a){var r=e[i]||"";r&&!n&&(r="&bull;"),l()(a).toggleClass("current",i===t).html(r)})},onRender:function(){this.userList.show(new g.a({model:this.model,disabled:!0})),p.a.mobile||setTimeout(s.a.bind(this.focusInput,this),this.focusDelay)},onKeyDown:function(e){var t=e.which;if(13!==t&&8!==t&&46!==t&&229!==t){var n=t>=48&&t<=57,i=t>=96&&t<=105;n||i||e.preventDefault()}},
onInput:function(e){var t=l()(e.currentTarget),n=t.val(),i=n.length,a=n.charAt(n.length-1);return/[0-9]/.test(a)?void(4===n.length&&(!this.isEditing||this.isEditConfirmation?(t.blur(),this.confirmUser(this.getPIN())):this.ui.saveBtn.focus())):void t.val(n.slice(0,i-1))},onKeyUp:function(e){this.renderPIN()},onFocus:function(e){this.renderPIN()},onBlur:function(e){this.renderPIN(),this.ui.digits.removeClass("current")},onChange:function(e){this.renderPIN()},onInputsAnimationEnd:function(e){l()(e.currentTarget).removeClass("shake");
},onBackClick:function(e){e.preventDefault(),this.trigger("change:pane","users")},onRemoveClick:function(e){e.preventDefault(),this.removePIN()},onSubmit:function(e){e.preventDefault();var t=this.getPIN();return 4!==t.length?void h.a.trigger("show:alert",{type:"error",message:n.i(d.default)("Please enter a 4 digit PIN.")}):void(this.isEditing&&!this.isEditConfirmation?this.editPIN(t):this.confirmUser(t))},onSaveKeyDown:function(e){var t=e.which;8!==t&&46!==t||(e.preventDefault(),this.ui.input.val(""),
this.focusInput())},onPINClick:function(){this.focusInput()}});t.a=v},function(e,t,n){"use strict";var i=n(40),a=n(812),r=i.a.extend({tagName:"ul",className:"tile-list user-select-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2835),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(14),c=n(21),u=n(94),d=n(172),h=n(653),p=n(1778),f=o.a.Layout.extend({className:"user-select-modal-users-container",template:a.a,ui:{loading:".loading"},regions:{body:".modal-body"},onlyAfterRender:["onUserPopulated","onHomeUsersPopulated","onError"],
initialize:function(e){var t=l.a("appModel");this.user=t.get("user"),this.homeUsers=this.user.get("homeUsers"),this.user.server.populate().done(s.a.bind(this.onUserPopulated,this)).fail(s.a.bind(this.onError,this))},showList:function(e){this.ui.loading.addClass("hidden"),this.body.show(new p.a({collection:e})),this.listenTo(this.body.currentView,"itemview:selectUser",this.onUserSelect)},selectUser:function(e){this.ui.loading.removeClass("hidden");var t=c.a.execute("switchUser",{homeUser:e,switchUser:!0,
allowGuestLock:!0});t.done(s.a.bind(function(){this.trigger("resolve")},this)),t.always(this.whenRendered(function(){this.ui.loading.addClass("hidden")}))},onUserPopulated:function(){this.homeUsers.fetch().done(s.a.bind(this.onHomeUsersPopulated,this)).fail(s.a.bind(this.onError,this))},onHomeUsersPopulated:function(e){var t=c.a.execute("lockUser");t.always(s.a.bind(function(){1===e.length&&e.first().get("protected")?this.trigger("change:pane","pin",{model:e.first(),showBackButton:!1,focusDelay:0
}):this.showList(e)},this))},onError:function(){var e=u.a.getActiveUser();if(e&&e.get("home")){var t={id:e.id,title:e.get("title"),protected:!!e.get("pin")};this.showList(new h.a([t],{server:this.user.server,parent:this.user}))}else this.user.set("lockState",d.a.lockStates.UNLOCKED),this.trigger("resolve")},onUserSelect:function(e,t){t.get("protected")?this.trigger("change:pane","pin",{model:t,showBackButton:!0,focusDelay:0}):this.selectUser(t)}});t.a=f},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(2836),s=n.n(r),o=n(2),l=n.n(o),c=n(10),u=n(1),d=(n.n(u),
n(46)),h=n.n(d),p=n(15),f=n(14),g=n(81),m=n(8),v=n(738),y=n(332),b=n(276),S=n(2132),w=n(544),M=n(2191),I=n(1781),C=n(792),D=a()(S.a,{}),T=a()(M.a,{}),x=c.a.Layout.extend({className:"nav-bar",template:s.a,sectionSearchDelay:500,ui:{backBtn:".back-btn",plexPassBtn:".plex-pass-btn",tvModeBtn:".tv-mode-btn",exitFullscreenBtn:".exit-fullscreen-btn",activityBtn:".activity-btn",activityBadge:".activity-badge",search:".nav-bar-search-container",modalContainer:".modal-container"},regions:{navDropdown:".nav-bar-right",
playerDropdown:".nav-bar-right",tvModeButton:".nav-bar-right"},events:{"click .back-btn":"onBackClick","click .tv-mode-btn":"onTVModeClick","click .exit-fullscreen-btn":"onExitFullscreenClick","click .activity-btn":"onActivityClick","click .plex-pass-btn":"onPlexPassClick"},modelEvents:{"change:history":"onHistoryChange","change:primaryServer":"onPrimaryServerChange"},onlyAfterRender:["onSignedInChange","onHistoryChange","onPrimaryServerChange","onActivityChange","onFullscreenChange"],initialize:function(){
if(l.a.bindAll(this,"onPlexPassModalClose"),this.isPlexPassModalOpen=!1,this.listenTo(this.model.get("user"),{"change:signedIn":this.onSignedInChange,"change:homeSize":this.onHomeSizeChange}),this.listenTo(m.a,"change:language",this.render),this.setupServerListeners(),n.i(y.b)()){var e=n.i(f.a)("fullscreenManager");this.unsubscribeFullscreen=e.subscribe(this.onFullscreenChange.bind(this))}},setupServerListeners:function(){this.primaryServer&&(this.stopListening(this.primaryServer),this.stopListening(this.sessions),
this.stopListening(this.transcodeJobs),this.sessions=null,this.transcodeJobs=null),this.primaryServer=this.model.get("primaryServer"),this.primaryServer&&(this.sessions=this.primaryServer.get("desktop").get("sessions"),this.transcodeJobs=new b.a([],{server:this.primaryServer,persistInCache:!0}),this.listenTo(this.sessions,"reset add remove",this.onActivityChange),this.listenTo(this.transcodeJobs,"reset add remove",this.onActivityChange))},serializeData:function(){var e=this.model.get("user");return{
plexPassUrl:e.server.get("plexPassUrl"),hasHistory:this.hasHistory(),canGoPremium:this.canGoPremium(),isKonvergo:n.i(y.a)(),isOnDashboard:this.isOnDashboard(),isFullscreen:this.isFullscreen(),showActivity:!!this.primaryServer,activityCount:this.getActivityCount()}},mountReact:function(){h.a.render(a()(p.a,{store:f.a("appStore")},void 0,D),this.ui.search[0]),h.a.render(a()(p.a,{store:f.a("appStore")},void 0,a()("div",{},void 0,a()(w.a,{metricsProperties:{context:"navBar"},isOpen:this.isPlexPassModalOpen,
onModalClose:this.onPlexPassModalClose}),T)),this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&(h.a.unmountComponentAtNode(this.ui.search[0]),h.a.unmountComponentAtNode(this.ui.modalContainer[0]))},getActivityCount:function(){var e=this.sessions?this.sessions.length:0,t=this.transcodeJobs?this.transcodeJobs.length:0;return e+t},hasHistory:function(){var e=this.model.get("history");return e.length>1},canGoPremium:function(){var e=this.model.get("user");return e.get("canGoPremium");
},showOrHidePremiumNotice:function(){this.ui.plexPassBtn.toggleClass("hidden",!this.canGoPremium())},isOnDashboard:function(){var e=window.location.hash;return""===e||"#"===e||/\/dashboard($|\?)/.test(e)},isFullscreen:function(){if(n.i(y.a)()){var e=n.i(f.a)("fullscreenManager");return e.isFullscreen()}return!1},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact(),this.playerDropdown.append(new C.a({showNowPlaying:!0})),this.navDropdown.append(new I.a({model:this.model
})),this.$el.tooltip({selector:'[data-toggle="tooltip"]',container:"body",placement:"bottom"})},onClose:function(){this.unmountReact(),this.unsubscribeFullscreen&&this.unsubscribeFullscreen()},onSignedInChange:function(e,t){this.showOrHidePremiumNotice()},onHistoryChange:function(e,t){this.ui.backBtn.toggleClass("hidden",!this.hasHistory()),n.i(y.a)()&&this.ui.tvModeBtn.toggleClass("hidden",!this.isOnDashboard()||this.isFullscreen())},onPrimaryServerChange:function(e,t){this.setupServerListeners();
var n=!!t;this.ui.activityBtn.toggleClass("hidden",!n),this.onActivityChange(),this.mountReact()},onActivityChange:function(){var e=this.getActivityCount();this.ui.activityBtn.parent("li").toggleClass("active",!!e),this.ui.activityBadge.toggleClass("hidden",!e),this.ui.activityBadge.text(e)},onBackClick:function(e){e.preventDefault(),m.a.trigger("navigate:back")},onTVModeClick:function(e){e.preventDefault(),n.i(v.a)("tv")},onExitFullscreenClick:function(e){e.preventDefault(),g.a.set("main.fullscreen",!1);
},onActivityClick:function(e){e.preventDefault(),this.transcodeJobs&&this.transcodeJobs.length?m.a.trigger("navigate","conversion"):this.sessions&&this.sessions.length?m.a.trigger("navigate","nowPlaying"):m.a.trigger("navigate","activity")},onPlexPassClick:function(e){e.preventDefault(),this.isPlexPassModalOpen=!0,this.mountReact()},onPlexPassModalClose:function(){this.isPlexPassModalOpen=!1,this.mountReact()},onHomeSizeChange:function(){this.showOrHidePremiumNotice()},onFullscreenChange:function(e){
this.ui.tvModeBtn.toggleClass("hidden",e),this.ui.exitFullscreenBtn.toggleClass("hidden",!e)}});t.a=x},function(e,t,n){"use strict";var i=n(2837),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(8),c=n(21),u=n(129),d=n(172),h=o.a.ItemView.extend({id:"nav-dropdown",tagName:"li",className:"nav-dropdown dropdown",template:a.a,ui:{poster:".dropdown-poster-toggle .media-poster",dropdownMenu:".dropdown-menu",switchUserItem:".switch-user-item",totalBadge:".total-badge",invitesBadge:".invites-badge",announcementsBadge:".announcements-badge",
announcementsItem:".announcements-item"},events:{"click .switch-user-btn":"onSwitchUserClick","click .users-btn":"onUsersClick","click .sign-in-btn":"onSignInClick","click .sign-out-btn":"onSignOutClick"},onlyAfterRender:["onSignedInChange","updateBadges"],bindings:{".username-header":{model:"user",modelAttribute:"title"}},initialize:function(){this.user=this.model.get("user"),this.invites=this.user.get("desktop").get("invites"),this.image=new u.a({model:this.user,type:"friend",width:34});var e=s.a.debounce(this.updateBadges),t=s.a.debounce(this.onSignedInChange);
this.listenTo(this.user,{"change:signedIn":t,"change:username":this.onUsernameChange,"change:home":this.onHomeChange}),this.listenTo(this.user.get("desktop"),{"change:announcements.reset":e,"change:announcements.update":e,"change:announcements.change:read":e}),this.listenTo(this.invites,"reset add remove",e)},serializeData:function(){var e=this.invites.length,t=this.getUnreadAnnouncementsCount();return{signedIn:this.user.get("signedIn"),isRestricted:this.user.get("restricted"),home:this.user.get("home"),
isFullUser:this.user.isFullUser(),invitesCount:e,unreadAnnouncementsCount:t,totalCount:e+t,appsUrl:this.user.server.get("appsUrl"),helpUrl:this.user.server.get("helpUrl"),defaultTarget:"_self"}},getUnreadAnnouncementsCount:function(){var e=this.user.get("desktop").get("announcements").where({read:!1});return e.length},updateBadges:function(){var e=this.invites.length,t=this.getUnreadAnnouncementsCount(),n=e+t;this.ui.totalBadge.toggleClass("hidden",!n),this.ui.totalBadge.text(n),this.ui.invitesBadge.toggleClass("hidden",!e),
this.ui.invitesBadge.text(e),this.ui.announcementsBadge.toggleClass("hidden",!t),this.ui.announcementsBadge.text(t)},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onSignedInChange:function(e,t){this.ui.dropdownMenu.toggleClass("signed-in",!!t),this.ui.announcementsItem.toggleClass("hidden",!!e.get("restricted"))},onUsernameChange:function(e,t){this.ui.dropdownMenu.toggleClass("full-user",!!t)},onHomeChange:function(e,t){this.ui.switchUserItem.toggleClass("hidden",!e.get("home"));
},onSwitchUserClick:function(e){e.preventDefault(),this.user.set("lockState",d.a.lockStates.LOCKED)},onUsersClick:function(e){e.preventDefault(),l.a.trigger("navigate","users")},onSignInClick:function(e){e.preventDefault(),l.a.trigger("navigate","login")},onSignOutClick:function(e){e.preventDefault(),c.a.execute("signOut").done(s.a.bind(function(){l.a.trigger("navigate:refresh:dashboard")},this))}});t.a=h},function(e,t,n){"use strict";var i=n(2845),a=n.n(i),r=n(10),s=r.a.ItemView.extend({template:a.a,
className:"player mini-player"});t.a=s},function(e,t,n){"use strict";var i=n(2846),a=n.n(i),r=n(14),s=n(430),o=n(494),l=n(495),c=o.a.extend({template:a.a,volumeSettingsKey:"musicPlayerVolume",initialize:function(e){o.a.prototype.initialize.apply(this,arguments),this.controlsView=new l.a({model:this.playerModel,upNextCollection:new s.a(null,{parent:this.playerModel})}),this.addListeners()},startPlayback:function(e){e||(e={});var t=r.a("appModel");return this.controller.load({model:this.playerModel,
offset:e.offset,autoplay:e.autoplay,fallbackServer:t.get("primaryServer"),silent:this.isNowPlaying()})},getNavigationKey:function(){var e=this.metadataItem.get("parentKey");if(e)return e},onRender:function(){this.controls.append(this.controlsView,this.$el),o.a.prototype.onRender.apply(this,arguments)}});t.a=c},function(e,t,n){"use strict";var i=n(2847),a=n.n(i),r=n(494),s=n(495),o=n(1141),l=r.a.extend({template:a.a,initialize:function(e){e||(e={}),e.playerModelClass=o.a,r.a.prototype.initialize.apply(this,arguments),
this.controlsView=new s.a({model:this.playerModel}),this.addListeners()},addListeners:function(){r.a.prototype.addListeners.apply(this,arguments),this.listenTo(this.controlsView,"load:poster",this.onPosterLoad)},getNavigationKey:function(){var e=this.metadataItem.get("parentKey");if(e)return e},onRender:function(){this.controls.append(this.controlsView,this.$el),r.a.prototype.onRender.apply(this,arguments)},onPrimaryPlayerChange:function(e,t){r.a.prototype.onPrimaryPlayerChange.apply(this,arguments),
this.maximize()},onPosterLoad:function(e){this.playerModel.set("loaded",!0)}});t.a=l},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(46)),o=n.n(s),l=n(15),c=n(14),u=n(185),d=n(65),h=n(72),p=n(788),f=n(2033),g=p.a.extend({mountReact:function(){var e=n.i(c.a)("appStore"),t=this.model.server.entityID(),i=n.i(d.a)(u.PROVIDER,h.a.LIBRARY_PROVIDER_IDENTIFIER,t);o.a.render(a()(l.a,{store:e},void 0,a()(f.a,{serverEntityID:t,providerEntityID:i})),this.ui.page[0])}});t.a=g},function(e,t,n){
"use strict";var i=n(2848),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(1095),c=n(105),u=n(54),d=n(466),h=n(616),p=(n.n(h),o.a.Layout.extend({mixins:l.a,className:"video-post-play",template:a.a,regions:{countdown:".countdown"},events:{"click .next-btn":"onNextClick","click .replay-btn":"onReplayClick",mousemove:"onMouseMove"},initialize:function(e){e||(e={}),e.countdown&&this.createCountdown(e.countdown),this.previousPlayQueueItem=this.model,this.previousMetadataItem=this.previousPlayQueueItem.get("metadataItem");
var t=this.collection.indexOf(this.previousPlayQueueItem)+1;this.nextPlayQueueItem=this.collection.at(t),this.nextMetadataItem=this.nextPlayQueueItem.get("metadataItem");var n="movie"===this.previousMetadataItem.get("type")?"art":"thumb";this.previousPoster=new u.a({model:this.previousMetadataItem,modelAttribute:n,type:this.previousMetadataItem.get("type"),height:140}),this.nextPoster=new u.a({model:this.nextMetadataItem,modelAttribute:n,type:this.nextMetadataItem.get("type"),height:190}),this.backgroundImage=new c.a({
model:this.nextMetadataItem,modelAttribute:"art",width:1280,height:720,background:!0})},onRender:function(){this.previousPoster.setElement(this.ui.previousPoster),this.nextPoster.setElement(this.ui.nextPoster),this.backgroundImage.setElement(this.ui.background),this.totalSeconds&&this.countdown.append(new d.a({model:this.progressModel,size:80}))},onNextClick:function(e){e.preventDefault(),this.trigger("next",{manual:!0})},onReplayClick:function(e){e.preventDefault(),this.trigger("replay")},onMouseMove:function(e){
this.lastX===e.clientX&&this.lastY===e.clientY||this.totalSeconds&&(this.startTime=0,this.lastX=e.clientX,this.lastY=e.clientY,window.cancelAnimationFrame(this.countdownAnimator),clearInterval(this.idleTimer),this.idleTimer=setTimeout(s.a.bind(this.updateCountdown,this),1e3))},onClose:function(){l.a.onClose.apply(this,arguments),clearInterval(this.idleTimer)}}));t.a=p},function(e,t,n){"use strict";var i=n(2849),a=n.n(i),r=n(430),s=n(494),o=n(495),l=s.a.extend({template:a.a,initialize:function(e){
s.a.prototype.initialize.apply(this,arguments),this.controlsView=new o.a({model:this.playerModel,upNextCollection:new r.a(null,{parent:this.playerModel})}),this.addListeners()},startPlayback:function(e){return e||(e={}),this.controller.load({model:this.playerModel,offset:e.offset,autoplay:e.autoplay,silent:this.isNowPlaying(),mediaElement:e.mediaElement})},continuePlayback:function(){},onRender:function(){this.controls.append(this.controlsView,this.$el),s.a.prototype.onRender.apply(this,arguments);
},onPrimaryPlayerChange:function(e,t){s.a.prototype.onPrimaryPlayerChange.apply(this,arguments),this.maximize()}});t.a=l},function(e,t,n){"use strict";var i=n(2850),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(14),u=n(4),d=n(8),h=n(61),p=n(32),f=n(154),g=n(39),m=n(464),v=n(21),y=n(813),b=n(42),S=n(1752),w=n(1791),M=n(1786),I=y.a.extend({className:"video-player dark-scrollbar buffering",template:a.a,volumeSettingsKey:"videoPlayerVolume",controlsDelay:h.a.hasTouchScreen?4e3:2e3,ui:{container:".video-container"
},regions:{controls:".video-controls-container",postPlay:".video-post-play-container"},events:s.a.extend({"click .player-close-btn":"onCloseClick",mousemove:"onMouseMove"},y.a.prototype.events),postPlayDuration:10,awakeTime:72e5,maximumDurationForAutoadvance:12e5,minimumDurationForPostPlay:3e5,initialize:function(e){this.playQueue=e.playQueue,y.a.prototype.initialize.apply(this,arguments),this.controlsView=new w.a({model:this.playerModel}),v.a.execute("playBackgroundMedia"),this.startSleepProtection(),
this.addListeners()},addListeners:function(){y.a.prototype.addListeners.apply(this,arguments),this.listenTo(this.playerModel,{"change:ready":this.onPlayerReadyChange,"change:embedHtml":this.onPlayerEmbedHtmlChange}),this.listenTo(this.controlsView,"toggleControls",this.toggleControls)},startPlayback:function(e){if(e||(e={}),this.isNowPlaying())return this.load(s.a.extend({},e,{silent:!0}));var t=l.a.Deferred(),n=this.resolveOffset(e);return n.done(this.whenRendered(function(n){this.load(s.a.extend({},e,{
offset:n,silent:!1})).done(s.a.bind(t.resolve,t)).fail(s.a.bind(t.reject,t))})),n.fail(s.a.bind(this.stop,this)).fail(s.a.bind(t.reject,t)),t.promise()},continuePlayback:function(){this.controlsView.replaceVideo(this.controller.mediaElement),this.playerModel.get("ready")&&(this.onPlayerReadyChange(this.playerModel,!0),this.onPlayerStateChange(this.playerModel,this.playerModel.get("state")))},resolveOffset:function(e){var t=l.a.Deferred(),n=e.offset||this.offset;if(s.a.isNumber(n))return t.resolve(n).promise();
var i=this.metadataItem.get("viewOffset");if(!i)return t.resolve(0).promise();var a=new S.a({offset:i}),r=a.promise;return r.done(function(e){t.resolve(e)}),r.fail(function(){t.reject()}),d.a.trigger("show:modal",a),t.promise()},load:function(e){var t=c.a("appModel");return this.controller.load({model:this.playerModel,media:this.media,offset:e.offset,autoplay:e.autoplay,postplay:!t.get("primaryPlayer"),silent:e.silent,mediaElement:e.mediaElement||this.controls.currentView.ui.video[0]})},stop:function(){
var e,t,i=l.a.Deferred().resolve().promise(),a=c.a("appModel"),r=!a.get("primaryPlayer");if(this.metadataItem&&r&&(e=this.metadataItem.server.get("playQueueManager"),t=e.getFor(this.metadataItem)),t&&t.get("hasUserAdditions")){var s=new b.a({title:n.i(u.default)("Finish Watching Queue"),message:n.i(u.default)("This will clear the contents of your play queue.")});i=s.promise,d.a.trigger("show:modal",s)}return i.then(function(){d.a.trigger("hide:player")}),i},canAutoplay:function(e){return!p.a.mobile&&(null==e||e!==g.a.states.PAUSED);
},showVideo:function(e){this.$el.toggleClass("show-html-video","html"===e),this.$el.toggleClass("show-flash-video","flash"===e),this.$el.toggleClass("show-placeholder-video",!e)},hideVideo:function(){this.$el.removeClass("show-html-video show-flash-video show-placeholder-video")},toggleControls:function(e){this.controller.model&&this.controller.model.get("ready")&&"flash"!==this.controller.playerType&&(e||(e={}),this.controlsView.visible||this.controlsView.transitionIn(),this.controlsTimeout=clearTimeout(this.controlsTimeout),
e.autohide&&(this.controlsTimeout=setTimeout(this.controlsView.transitionOut,this.controlsDelay)))},startSleepProtection:function(){clearTimeout(this.sleepTimeout),this.isDefinitelyAwake||(this.isPotentiallyAsleep?this.isDefinitelyAwake=!0:this.sleepTimeout=setTimeout(s.a.bind(this.onSleep,this),this.awakeTime))},onRender:function(){this.controls.show(this.controlsView),y.a.prototype.onRender.apply(this,arguments)},onClose:function(){y.a.prototype.onClose.apply(this,arguments),this.controlsTimeout=clearTimeout(this.controlsTimeout),
this.sleepTimeout=clearTimeout(this.sleepTimeout),this.controller.model&&!this.isContinuing&&f.a.abortAll("player")},onPlayerReadyChange:function(e,t){t?(this.showVideo(this.controller.playerType),this.controller.companion?this.toggleControls():this.toggleControls({autohide:!0})):this.hideVideo()},onPlayerStateChange:function(e,t){y.a.prototype.onPlayerStateChange.apply(this,arguments),this.controller.companion||(t===g.a.states.ERROR&&this.hideVideo(),clearTimeout(this.controlsTimeout),this.controlsTimeout=setTimeout(this.controlsView.transitionOut,this.controlsDelay)),
this.$el.toggleClass("stopped",e.get("stopped")),this.$el.toggleClass("paused",e.get("paused")),this.$el.toggleClass("playing",e.get("playing")),this.$el.toggleClass("buffering",e.get("buffering")),this.$el.toggleClass("error",e.get("error"))},onPlayerEmbedHtmlChange:function(e,t){this.ui.container.html(t)},onPlayerFinishedChange:function(e,t){if(t){var n=this.metadataItem.get("duration")<this.minimumDurationForPostPlay,i=this.metadataItem.get("extraType")===m.a.get("trailer").id;if(this.model===this.playQueue.get("collection").last())this.model.server.get("playQueueManager").remove("video"),
d.a.trigger("hide:player");else if(n||i)this.controller.skipNext();else{this.hideVideo();var a={model:this.model,collection:this.playQueue.get("collection")},r=this.metadataItem.get("duration")<this.maximumDurationForAutoadvance;(!this.isPotentiallyAsleep||this.isDefinitelyAwake||r)&&(a.countdown=this.postPlayDuration);var s=new M.a(a);this.listenTo(s,{replay:this.onPostPlayReplay,next:this.onPostPlayNext}),this.postPlay.show(s)}}},onPostPlayReplay:function(){this.startSleepProtection(),this.stopListening(this.postPlay.currentView),
this.postPlay.close(),this.controller.setPosition(0,{autoplay:!0}),this.showVideo(this.controller.playerType)},onPostPlayNext:function(e){e&&e.manual&&this.startSleepProtection(),this.stopListening(this.postPlay.currentView),this.postPlay.close(),this.controller.skipNext()},onSleep:function(){this.isPotentiallyAsleep=!0},onCloseClick:function(e){e.preventDefault(),this.stop()},onMouseMove:function(e){this.lastX===e.clientX&&this.lastY===e.clientY||(this.lastX=e.clientX,this.lastY=e.clientY,this.controller.companion||this.playerModel.get("finished")||this.toggleControls({
autohide:!0}))}});t.a=I},function(e,t,n){"use strict";var i=n(790),a=i.a.extend({className:"video-player-alert alert alert-sm transition-in",alertDuration:5e3});t.a=a},function(e,t,n){"use strict";var i=n(2854),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(713),c=n(269),u=n(125),d=n(105),h=o.a.ItemView.extend({className:"player-scrub-preview",template:a.a,areThumbnailsAvailable:null,thumbnailPreferredIndex:"sd",thumbnailWidth:240,ui:{scrubPreviewThumbnail:".player-scrub-preview-thumbnail",scrubPreviewTooltip:".player-scrub-preview-tooltip",
scrubPreviewTime:".player-scrub-preview-time"},modelEvents:{"change:metadataItem":"onMetadataItemChange"},initialize:function(){this.throttledShowThumbnail=s.a.throttle(this.whenRendered(this.showThumbnail),200),this.thumbnailImage=new d.a({model:this.model.get("metadataItem"),width:this.thumbnailWidth,height:c.a.getPosterHeight("art",this.thumbnailWidth)})},show:function(){this.$el.removeClass("hidden")},hide:function(){this.$el.addClass("hidden"),this.ui.scrubPreviewThumbnail.addClass("hidden");
},positionContainer:function(){this.$el.css("left",this.position-this.$el.width()/2+"px")},updatePreview:function(e){this.position=e.position,this.ui.scrubPreviewTime.text(n.i(u.a)(e.time)),this.positionContainer(),this.areThumbnailsAvailable!==!1&&this.throttledShowThumbnail(e.time)},showThumbnail:function(e){if(this.model.get("media")){var t=this.getScreenshotUrl(e);t?(this.areThumbnailsAvailable=!0,this.thumbnailImage.load(t).done(this.whenRendered(function(e){this.$el.hasClass("hidden")||(this.thumbnailImage.showImage(e),
this.ui.scrubPreviewThumbnail.removeClass("hidden"),this.positionContainer())}))):this.areThumbnailsAvailable=!1}},getScreenshotUrl:function(e){var t=e+6e3;return n.i(l.a)(this.model.get("media"),t,this.thumbnailPreferredIndex)},onRender:function(){this.thumbnailImage.setElement(this.ui.scrubPreviewThumbnail)},onClose:function(){this.thumbnailImage.close()},onMetadataItemChange:function(e,t){this.ui.scrubPreviewThumbnail.addClass("hidden"),this.areThumbnailsAvailable=null,this.thumbnailImage.setModel(t),
this.thumbnailImage.src=null}});t.a=h},function(e,t,n){"use strict";var i=n(2855),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(4),h=n(1261),p=n(1262),f=n(729),g=n(8),m=n(61),v=n(125),y=n(39),b=n(430),S=n(105),w=n(54),M=n(1303),I=n(1305),C=n(814),D=n(356),T=n(1793),x=n(1794),P=n(1792),E=n(1790),A=n(1789),L=n(791),k=n(288),N=n(287),_=c.a.Layout.extend({className:"video-controls transition-out",template:a.a,visible:!1,muted:!1,mutedVolume:0,ui:{video:"#html-video",poster:".media-poster",
background:".video-background",backgroundImage:".video-background-image",volumeBtn:".volume-btn",errorMessage:".video-error-message",errorSkipMessage:".video-error-skip-message",dropdowns:".player-dropdowns-container",dropups:".player-dropups-container"},regions:{subtitles:".video-subtitles-container",seekBar:".seek-bar-container",volume:".player-volume-slider-container",playQueueDropdown:"#player-play-queue-dropdown",qualityDropdown:"#player-quality-dropdown",audioDropdown:"#player-subtitles-dropdown",
subtitlesDropdown:"#player-audio-dropdown",playerDropdown:"#player-primary-player-dropdown",scrubPreview:".player-scrub-preview-container",imageOverlaysRegion:".video-image-overlays-region",alertRegion:".video-alert-region"},modelEvents:{"change:metadataItem":"onMetadataItemChange","change:subtitlesUrl":"onPlayerSubtitlesUrlChange","change:volume":"onVolumeChange","change:errorMessage":"onErrorMessageChange","change:bufferingMessage":"onBufferingMessageChange","change:showQuality":"onShowQualityChange",
"change:showAudioStream":"onShowAudioStreamChange","change:showSubtitleStream":"onShowSubtitleStreamChange","change:state":"onStateChange"},events:{"click .volume-btn":"onVolumeClick","click .enter-fullscreen-btn":"onEnterFullscreenClick","click .exit-fullscreen-btn":"onExitFullscreenClick","click .video-overlay-btn":"onOverlayClick","click .share-btn":"onShareClick","click .recommend-btn":"onRecommendClick","click .video-error-message-center":"onErrorMessageClick"},triggers:{"click .play-btn":"play",
"click .pause-btn":"pause","click .previous-btn":"previous","click .next-btn":"next","click .minimize-btn":"minimize"},onlyAfterRender:["onVolumeChange","onErrorMessageChange"],initialize:function(){s.a.bindAll(this,"onMobileVideoClose"),this.bindAllWhenRendered("transitionIn","transitionOut"),this.metadataItem=this.model.get("metadataItem"),this.upNextCollection=new b.a(null,{parent:this.model}),this.posterImage=new w.a({model:this.metadataItem,type:"movie",getUrl:this.getPosterUrl,width:100}),this.backgroundImage=new S.a({
server:this.metadataItem.server,width:1280,height:720}),this.seekBarView=new C.a({model:this.model}),this.playQueueDropdownView=new L.a({model:this.model,collection:this.upNextCollection}),this.volumeSlider=new D.a({className:"player-volume-slider player-slider",value:this.model.get("volume")}),this.showVideoElements=!0,this.listenTo(this.seekBarView,"change:value",this.onSeekBarValueChange),this.listenTo(this.seekBarView,"hover",this.onSeekBarHover),this.listenTo(this.volumeSlider,"change:value",this.onVolumeSliderValueChange),
this.listenTo(this.playQueueDropdownView,"itemview:skip",this.onSkip),this.listenTo(this.playQueueDropdownView,"itemview:remove",this.onRemove),this.listenTo(this.playQueueDropdownView,"move",this.onMove)},serializeData:function(){return{showVideoElements:this.showVideoElements}},getPosterUrl:function(e){return this.model.get("parentThumb")||this.model.get("grandparentThumb")||e},transitionIn:function(){this.visible=!0,this.$el.removeClass("transition-out")},transitionOut:function(){this.$(".dropdown.open, .dropup.open").length||(this.visible=!1,
this.$el.addClass("transition-out"),this.scrubPreview.currentView.hide())},updateDropdownVisibility:function(e,t){var n=e.currentView;n&&n.$el.toggleClass("hidden",!t)},updateVolumeBtn:function(e){var t=this.ui.volumeBtn;e>50?(this.muted=!1,t.addClass("high"),t.removeClass("low mute")):e<=50&&e>0?(this.muted=!1,t.addClass("low"),t.removeClass("high mute")):(this.muted=!0,t.addClass("mute"),t.removeClass("high low"))},replaceVideo:function(e){var t=l()(e);this.ui.video.off("webkitendfullscreen",this.onMobileVideoClose),
t.attr("id",this.ui.video.attr("id")),t.attr("class",this.ui.video.attr("class")),this.ui.video.replaceWith(t),this.ui.video=t,t.on("webkitendfullscreen",this.onMobileVideoClose)},createErrorSkipInterval:function(){this.errorSkipInterval=clearInterval(this.errorSkipInterval),this.errorSkipCounter=5,this.updateErrorSkipMessage(this.errorSkipCounter),this.errorSkipInterval=setInterval(s.a.bind(this.onErrorSkipInterval,this),1e3)},updateErrorSkipMessage:function(e){this.ui.errorSkipMessage.text(n.i(d.default)("Skipping in {1} seconds...",e));
},bindings:{".video-title":{modelAttribute:"metadataItem",autohide:!0,formatter:function(e){return e.get("title")}},".video-background-image":{modelAttribute:"metadataItem",manual:!0,formatter:function(e,t){var n=e.get("art")||e.channel&&e.channel.get("art");if(t.css("background-image","none"),t.addClass("transition-out"),!n)return this.currentArt=null,void(this.currentArtSrc=null);var i=s.a.bind(function(e){this.currentArt=n,this.currentArtSrc=e,t.css("background-image","url("+e+")"),t.removeClass("transition-out");
},this);this.currentArt===n?i(this.currentArtSrc):this.backgroundImage.load(n,!0).done(i)}},".play-btn":{modelAttribute:"paused",modelListeners:["paused","canPlayPause"],manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.model.get("canPlayPause")),e}},".pause-btn":{modelAttribute:"paused",modelListeners:["paused","canPlayPause"],manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.model.get("canPlayPause")),!e}},".previous-btn":{modelAttribute:"canSkipPrevious",
manual:!0,autohide:function(){var e=this.model.get("playQueue");return e&&e.get("collection").length>1},formatter:function(e,t){t.toggleClass("disabled",!e)}},".next-btn":{modelAttribute:"canSkipNext",manual:!0,autohide:function(){var e=this.model.get("playQueue");return e&&e.get("collection").length>1},formatter:function(e,t){t.toggleClass("disabled",!e)}},".player-position":{modelAttribute:"position",formatter:function(e){return n.i(v.a)(e)}},".player-duration":{modelAttribute:"duration",formatter:function(e){
return n.i(v.a)(e)}},".volume-btn":{modelAttribute:"canSetVolume",manual:!0,autohide:!0,formatter:function(e,t){return this.$el.toggleClass("show-volume",e),e}},".minimize-btn":{modelAttribute:"showMinimize",manual:!0,autohide:!0},".enter-fullscreen-btn":{modelAttribute:"showEnterFullscreen",manual:!0,autohide:!0},".exit-fullscreen-btn":{modelAttribute:"showExitFullscreen",manual:!0,autohide:!0},".share-btn, .recommend-btn":{modelAttribute:"metadataItem",manual:!0,autohide:function(e){var t=n.i(u.a)("appModel"),i=t.get("user"),a=s.a.contains(["clip","userPlaylistItem"],e.get("type"));
return e.get("url")&&i.get("signedIn")&&a}},".primary-player-name":{modelAttribute:"friendlyName",autohide:!0,formatter:function(e){if(e)return n.i(d.default)("Casting to {1}",e)}}},onRender:function(){this.ui.video.on("webkitendfullscreen",this.onMobileVideoClose),this.posterImage.setElement(this.ui.poster),this.seekBar.append(this.seekBarView),this.volume.show(this.volumeSlider);var e=this.model.get("playQueue");e&&e.get("collection").length>1&&this.playQueueDropdown.append(this.playQueueDropdownView,this.ui.dropups),
this.updateVolumeBtn(this.model.get("volume")),this.scrubPreview.append(new E.a({model:this.model})),this.qualityDropdown.append(new T.a({model:this.model}),this.ui.dropdowns),this.audioDropdown.append(new x.a({model:this.model,type:"audio"}),this.ui.dropdowns),this.subtitlesDropdown.append(new x.a({model:this.model,type:"subtitles"}),this.ui.dropdowns),this.playerDropdown.append(new P.a,this.ui.dropdowns),this.imageOverlaysRegion.show(new I.a({model:this.model})),this.updateDropdownVisibility(this.qualityDropdown,this.model.get("showQuality")),
this.updateDropdownVisibility(this.audioDropdown,this.model.get("showAudioStream")),this.updateDropdownVisibility(this.subtitlesDropdown,this.model.get("showSubtitleStream"))},onClose:function(){this.ui.video.off("webkitendfullscreen",this.onMobileVideoClose),this.errorSkipInterval=clearInterval(this.errorSkipInterval),this.posterImage.close(),this.backgroundImage.close()},onMetadataItemChange:function(e,t){this.errorSkipInterval=clearInterval(this.errorSkipInterval),this.posterImage.src=null,this.posterImage.setModel(t),
this.posterImage.render(),this.backgroundImage.src=null},onPlayerSubtitlesUrlChange:function(e,t){if(t){var i=n.i(u.a)("appModel").get("settings"),a=n.i(f.a)()||n.i(h.a)()||n.i(p.a)();this.subtitles.show(new M.a({model:e,subtitleSize:i.get("subtitleSize"),rendererOptions:{enableSvg:!a}}))}else this.subtitles.close()},onVolumeChange:function(e,t){this.volumeSlider.displayValue(t),this.updateVolumeBtn(t)},onErrorMessageChange:function(e,t){var i=n.i(u.a)("appModel"),a=i.has("primaryPlayer");if(this.ui.errorMessage.text(t),
this.ui.errorSkipMessage.text(""),t&&!a&&!e.get("terminationCode")){var r=e.get("playQueue").get("collection");if(r.length>1){var s=e.get("playQueueItem"),o=r.at(r.length-1);s.id!==o.id&&this.createErrorSkipInterval()}}},onErrorSkipInterval:function(){this.errorSkipCounter--,this.updateErrorSkipMessage(this.errorSkipCounter),0===this.errorSkipCounter&&(this.errorSkipInterval=clearInterval(this.errorSkipInterval),this.trigger("next"))},onBufferingMessageChange:function(e,t){t?this.alertRegion.show(new A.a({
message:t})):this.alertRegion.close()},onShowQualityChange:function(e,t){this.updateDropdownVisibility(this.qualityDropdown,t)},onShowAudioStreamChange:function(e,t){this.updateDropdownVisibility(this.audioDropdown,t)},onShowSubtitleStreamChange:function(e,t){this.updateDropdownVisibility(this.subtitlesDropdown,t)},onStateChange:function(e,t){this.showVideoElements||this.ui.background.toggleClass("hidden",t!==y.a.states.STOPPED)},onSeekBarValueChange:function(e){this.trigger("change:position",e)},
onSeekBarHover:function(e){e?(this.scrubPreview.currentView.updatePreview(e),this.scrubPreview.currentView.show()):this.scrubPreview.currentView.hide()},onVolumeSliderValueChange:function(e){this.trigger("change:volume",e)},onVolumeClick:function(e){e.preventDefault(),this.muted?(this.mutedVolume>0?this.trigger("change:volume",this.mutedVolume):this.trigger("change:volume",100),this.muted=!1,this.mutedVolume=0):(this.muted=!0,this.mutedVolume=this.model.get("volume"),this.trigger("change:volume",0));
},onEnterFullscreenClick:function(e){e.preventDefault(),this.model.get("forceWebkitVideoFullscreen")?this.ui.video[0].webkitEnterFullscreen():this.trigger("enterFullscreen")},onExitFullscreenClick:function(e){e.preventDefault(),this.trigger("exitFullscreen")},onMobileVideoClose:function(e){g.a.trigger("hide:player")},onOverlayClick:function(e){e.preventDefault();var t=this.model.get("playing"),n=t?"pause":"play";return"pause"===n&&m.a.hasTouchScreen&&!this.visible?void this.trigger("toggleControls",{
autohide:!0}):void this.trigger(n)},onShareClick:function(e){e.preventDefault(),g.a.trigger("show:modal",new k.a({model:this.metadataItem}))},onRecommendClick:function(e){e.preventDefault(),g.a.trigger("show:modal",new N.a({model:this.metadataItem}))},onErrorMessageClick:function(e){e.preventDefault(),this.errorSkipInterval?this.trigger("next"):g.a.trigger("hide:player")},onSkip:function(e,t){this.trigger("skip",t)},onRemove:function(e,t){this.trigger("remove",t)},onMove:function(e,t){this.trigger("move",e,t);
}});t.a=_},function(e,t,n){"use strict";var i=n(2856),a=n.n(i),r=n(792),s=r.a.extend({id:"player-primary-player-dropdown",tagName:"span",className:"dropdown",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2857),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(95),h=n(314),p=n(329),f=c.a.ItemView.extend({id:"player-quality-dropdown",tagName:"span",className:"dropdown hidden",template:a.a,modelEvents:{"change:transcodeServer":"render","change:qualityIndex":"render","change:media":"render"
},events:{"click .dropdown-menu a":"onQualityClick"},serializeData:function(){var e=this.model.get("transcodeServer"),t=this.model.get("media"),i=h.a.prop("video"),a=i.lowestQualityIndex,r=d.a.getAvailableQualitiesFor(t,e,{lowestQualityIndex:a});if(!r.length||!this.model.get("canSetQuality"))return void this.model.set("showQuality",!1);this.model.set("showQuality",!0);var o=this.model.get("qualityIndex"),l=s.a.findWhere(r,{index:o}),c=e.get("maxUploadBitrate"),u=n.i(p.a)(t),f=!(!u||!u.bitrate),g=!c||f&&c>u.bitrate;
return l&&(l.selected=!0),{availableQualities:r.reverse(),hasSelectedQuality:!!l,includeOriginal:g}},onQualityClick:function(e){e.preventDefault();var t=l()(e.currentTarget);if(!t.hasClass("selected")){var i=d.a.getQualityAttribute(this.model.get("metadataItem")),a=parseInt(t.data("index"),10),r=n.i(u.a)("appModel").get("settings");r.save(i,a),this.model.set("qualityIndex",a)}}});t.a=f},function(e,t,n){"use strict";var i=n(2858),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(128),h=n(451),p=n(88),f=n(21),g=c.a.ItemView.extend({
id:"player-quality-dropdown",tagName:"span",className:"dropdown hidden",template:a.a,modelEvents:{"change:media":"render"},events:{"click .dropdown-menu a":"onStreamClick"},initialize:function(e){this.streamType=p.a.get(e.type);var t=this.streamType.typeString;this.capabilityAttr="audio"===t?"canSetAudioStream":"canSetSubtitleStream",this.visibilityAttr="audio"===t?"showAudioStream":"showSubtitleStream",this.$el.attr("id",t+"-dropdown-list"),this.listenTo(this.model,"change:"+this.capabilityAttr,this.render),
this.listenTo(this.model,"change:"+this.streamType.key,this.render)},serializeData:function(){var e=this.model.get("media"),t=this.streamType.typeString;if(!e||!this.model.get(this.capabilityAttr))return this.model.set(this.visibilityAttr,!1),{type:t};this.model.get(this.visibilityAttr)&&this.$el.hasClass("hidden")&&this.$el.removeClass("hidden");var i=n.i(d.a)(e,{streamType:this.streamType.id});if(i.length<2)return this.model.set(this.visibilityAttr,!1),{type:t};this.model.set(this.visibilityAttr,!0);
var a,r=n.i(d.a)(e,{streamType:this.streamType.id,selected:!0});return r.length&&(a=r[0]),{type:t,streams:i,selectedStream:a}},onStreamClick:function(e){e.preventDefault();var t=u.a("appModel"),i=l()(e.currentTarget),a=i.data("id");if(t.has("primaryPlayer"))n.i(h.a)(this.model.get("media"),this.streamType,a),this.model.set(this.streamType.key,a);else{var r=f.a.execute("selectStream",{item:this.model.get("metadataItem"),media:this.model.get("media"),part:this.model.get("part"),streamType:this.streamType,
streamID:a});r.done(s.a.bind(function(){this.model.set(this.streamType.key,a)},this))}}});t.a=g},function(e,t,n){"use strict";var i=n(2630),a=n.n(i),r=n(10),s=r.a.ItemView.extend({initialize:function(e){this.reason=e.reason},template:a.a,className:"lyrics-error",serializeData:function(){return{reason:this.reason}}});t.a=s},function(e,t,n){"use strict";var i=n(2631),a=n.n(i),r=n(10),s=n(1799),o=r.a.CollectionView.extend({initialize:function(){this.collection=this.model.get("spans")},template:a.a,className:function(){
return["lyrics-line",0===this.model.get("spans").length?"lyrics-line-blank":""].join(" ")},itemView:s.a});t.a=o},function(e,t,n){"use strict";var i=n(2632),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(1796),c=n(1034),u=(n.n(c),o.a.CollectionView.extend({initialize:function(){this.onPositionChange=s.a.throttle(this.onPositionChange,200),this.listenTo(this.collection.parent,"change:follow",this.onFollowChange)},template:a.a,className:"lyrics-lines dropup-scrollbar",itemView:l.a,modelEvents:{"change:position":"onPositionChange"
},onlyAfterRender:["onPositionChange"],activateSpansAtPosition:function(e){if(this.collection.parent.get("timed")){var t=void 0,n=this.shouldFollow();this.collection.eachSpan(function(i){var a=i.isPositionWithin(e);a&&!i.get("active")&&(t=i),i.set("active",n&&a)}),n&&this.scrollToSpan(t)}},scrollToSpan:function(e){if(e){var t=this.children.findByModel(e.parent);t&&t.$el.scrollIntoView({center:!0})}},scrollToActive:function(){if(this.shouldFollow()){var e=void 0;this.collection.eachSpan(function(t){
t.get("active")&&(e=t)}),this.scrollToSpan(e)}},shouldFollow:function(){var e=this.collection.parent;return e.get("timed")&&e.get("follow")},onRender:function(){var e=this;this.activateSpansAtPosition(this.model.get("position")),setTimeout(function(){return e.scrollToActive()})},onPositionChange:function(e,t){this.activateSpansAtPosition(t)},onFollowChange:function(e,t){t&&this.scrollToActive()}}));t.a=u},function(e,t,n){"use strict";var i=n(2633),a=n.n(i),r=n(10),s=r.a.ItemView.extend({template:a.a,
className:"lyrics-loading"});t.a=s},function(e,t,n){"use strict";var i=n(2634),a=n.n(i),r=n(10),s=r.a.ItemView.extend({template:a.a,tagName:"span",className:function(){return["lyrics-span",this.model.get("active")?"highlight":""].join(" ")},modelEvents:{"change:active":"onActiveChange"},onActiveChange:function(e,t){this.$el.toggleClass("highlight",t)}});t.a=s},function(e,t,n){"use strict";var i=n(2635),a=n.n(i),r=n(10),s=r.a.ItemView.extend({template:a.a,tagName:"span",className:"lyrics-streams",
ui:{prevLyricsBtn:".prev-lyrics-btn",nextLyricsBtn:".next-lyrics-btn",timedBtn:".timed-btn",lyricsStreamsControls:".lyrics-controls",lyricsStreamsIndex:".lyrics-streams-index",lyricsStreamsLength:".lyrics-streams-length",lyricfindVendorLogo:".vendor-logo-lyricfind"},events:{"click .prev-lyrics-btn":"onPrevLyricsClick","click .next-lyrics-btn":"onNextLyricsClick","click .timed-btn":"onTimedClick"},modelEvents:{"change:metadataItem":"onMetadataItemChange"},collectionEvents:{"change:selected":"onSelectedChange",
"change:follow":"onFollowChange","change:timed":"onTimedChange"},onlyAfterRender:["renderControls","renderTimedBtn"],initialize:function(){this.collection&&this.listenTo(this.collection,"change:selected",this.onSelectedChange)},getSelectedLyricsIndex:function(){var e=this.collection.findWhere({selected:!0});return this.collection.indexOf(e)},renderControls:function(){var e=this.collection.findWhere({selected:!0}),t=this.collection.indexOf(e);this.ui.prevLyricsBtn.prop("disabled",0===t),this.ui.nextLyricsBtn.prop("disabled",t===this.collection.length-1),
this.ui.lyricsStreamsIndex.text(t+1),this.ui.lyricsStreamsLength.text(this.collection.length),e&&this.ui.lyricfindVendorLogo.toggleClass("hidden","com.plexapp.agents.lyricfind"!==e.get("provider")),this.renderTimedBtn()},renderTimedBtn:function(){var e=this.collection.findWhere({selected:!0}),t=e&&e.get("timed"),n=t&&e&&e.get("follow");this.ui.timedBtn.prop("disabled",!t).toggleClass("activated",!!n)},onRender:function(){this.renderControls()},onMetadataItemChange:function(){this.renderControls();
},onSelectedChange:function(e,t){t&&this.renderControls()},onFollowChange:function(){this.renderTimedBtn()},onPrevLyricsClick:function(){this.ui.prevLyricsBtn.isDisabled()||this.collection.at(this.getSelectedLyricsIndex()-1).set("selected",!0)},onNextLyricsClick:function(){this.ui.nextLyricsBtn.isDisabled()||this.collection.at(this.getSelectedLyricsIndex()+1).set("selected",!0)},onTimedChange:function(){this.renderTimedBtn()},onTimedClick:function(){if(!this.ui.timedBtn.isDisabled()){var e=this.collection.findWhere({
selected:!0});e.set("follow",!e.get("follow"))}}});t.a=s},function(e,t,n){"use strict";var i=n(2636),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(4),c=n(1800),u=n(1797),d=n(1795),h=n(1798),p=o.a.Layout.extend({template:a.a,ui:{lyricsLoading:".lyrics-loading"},regions:{streamsRegion:".lyrics-streams-region",lyricsRegion:".lyrics-region"},onlyAfterRender:["renderLyrics","renderLyricsLines","renderLyricsError","renderLyricsLoading"],getLyricsStreams:function(){return this.model.get("playQueueItem").get("lyricsStreams");
},populateLyricsStream:function(){var e=this,t=s.a.Deferred(),i=this.streamsRegion.currentView&&this.streamsRegion.currentView.collection;i&&this.stopListening(i);var a=this.getLyricsStreams();if(!a)return t.reject(n.i(l.default)("No lyrics available.")).promise();var r=a.findWhere({selected:!0})||a.first();return this.populatingLyricsStream&&this.populatingLyricsStream!==r&&this.populatingLyricsStream.abortPendingPopulate(),r.populate().always(function(){r.set("selected",!0),e.listenTo(a,"change:selected",e.onLyricsSelectedChange);
}).fail(function(){t.reject(n.i(l.default)("An error occurred loading these lyrics."))}).then(function(){return t.resolve(r)}),this.populatingLyricsStream=r,t.promise()},renderLyrics:function(){var e=this,t=this.getLyricsStreams(),n=this.streamsRegion.currentView&&this.streamsRegion.currentView.collection,i=t!==n,a=this.populateLyricsStream();"pending"===a.state()&&this.renderLyricsLoading(),a.done(function(t){e.renderLyricsLines(t)}),a.fail(function(t){e.renderLyricsError(t)}),i&&a.always(function(){
var t=e.getLyricsStreams();t?e.streamsRegion.show(new c.a({model:e.model,collection:e.getLyricsStreams()})):e.streamsRegion.close()})},renderLyricsLines:function(e){var t=new u.a({model:this.model,collection:e.get("lines")});this.lyricsRegion.show(t),t.scrollToActive()},renderLyricsError:function(e){this.lyricsRegion.show(new d.a({reason:e}))},renderLyricsLoading:function(){this.lyricsRegion.show(new h.a)},onRender:function(){this.renderLyrics()},onLyricsSelectedChange:function(e,t){t&&this.renderLyrics();
},onItemChange:function(){this.close()}});t.a=p},function(e,t,n){"use strict";var i=n(40),a=n(1803),r=i.a.extend({tagName:"ul",className:"tile-list media-tile-list playlist-tile-list",itemView:a.a,modelEvents:{"change:currentSort":"onListRefresh","change:currentType":"onListRefresh"},onListRefresh:function(){var e=this.model.get("items");e.get("playlists").reset(),e.fetch({scope:"page"})}});t.a=r},function(e,t,n){"use strict";var i=n(2859),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(4),d=n(8),h=n(177),p=n(21),f=n(354),g=n(353),m=n(806),v=c.a.ItemView.extend({
tagName:"li",className:"poster-item media-tile-list-item playlist-tile-list-item playlist",template:a.a,events:{"click .play-btn":"onPlayClick","click .edit-btn":"onEditClick","click .more-btn":"onMoreClick","hide.bs.dropdown .playlist-actions-dropdown":"onDropdownHide"},ui:{composite:".media-poster",actions:".media-poster-actions",dropdown:".media-actions-dropdown"},bindings:{".playlist-title":{modelAttribute:"title"},".playlist-duration":{modelAttribute:"duration",modelListeners:["duration","leafCount"],
formatter:function(e){return e?n.i(h.a)(e):1===this.model.get("leafCount")?n.i(u.default)("1 Item"):n.i(u.default)("{1} Items",this.model.get("leafCount"))}}},initialize:function(){s.a.bindAll(this,"onResize"),this.compositeImage=new f.a({model:this.model,width:150}),d.a.trigger("content.subscribe:resize",this.onResize)},serializeData:function(){var e="#!/server/"+encodeURIComponent(this.model.server.id);return e+="/playlist/"+this.model.get("ratingKey"),{url:e,smart:this.model.get("smart")}},onRender:function(){
this.compositeImage.setElement(this.ui.composite)},onClose:function(){this.compositeImage.close(),d.a.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),p.a.execute("playMedia",{item:this.model})},onEditClick:function(e){e.preventDefault(),d.a.trigger("show:modal",new m.a({model:this.model}))},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new g.a({
model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=l()(e.currentTarget),n=this.ui.actions.position().top,i=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(i)},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.$el.removeClass("force-hover"))}});t.a=v},function(e,t,n){"use strict";var i=n(2860),a=n.n(i),r=n(10),s=n(8),o=n(1588),l=n(1603),c=n(1802),u=r.a.Layout.extend({
className:"section-container",template:a.a,regions:{list:".playlists-container"},initialize:function(){s.a.trigger("show:bar","actionbar",new o.a({model:this.model})),s.a.trigger("show:bar","breadcrumbbar",new l.a({model:this.model}))},onRender:function(){this.list.append(new c.a({model:this.model,collection:this.model.get("items").get("playlists")}),this.$el)},onClose:function(){s.a.trigger("hide:bar","actionbar"),s.a.trigger("hide:bar","breadcrumbbar")}});t.a=u},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),
n(46)),o=n.n(s),l=n(15),c=n(14),u=n(67),d=n(65),h=n(114),p=n(200),f=n(197),g=n(198),m=n(2035),v=a()(p.a,{}),y=h.a.extend({mountReact:function(){var e=n.i(c.a)("appStore"),t=this.options.selectedServerID,i=this.options.selectedProviderID,r=this.options.params||{},s=r.key,h=r.record,p=n.i(d.a)(u.f,t),y=n.i(d.a)(u.e,i,p);o.a.render(a()(l.a,{store:e},void 0,v),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(f.a,{machineIdentifier:t},void 0,a()(g.a,{providerEntityID:y},void 0,a()(m.a,{machineIdentifier:t,
serverEntityID:p,providerEntityID:y,metadataKey:s,record:1===parseInt(h,10)})))),this.ui.page[0])}});t.a=y},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(46)),o=n.n(s),l=n(15),c=n(14),u=n(1219),d=n(67),h=n(65),p=n(114),f=n(200),g=n(197),m=n(198),v=n(862),y=a()(f.a,{}),b=p.a.extend({mountReact:function(){var e=n.i(c.a)("appStore"),t=this.options.selectedServerID,i=this.options.selectedProviderID,r=this.options.params||{},s=r.key,p=r.type,f=r.filters,b=r.filterLabel,S=r.sort,w=n.i(h.a)(d.f,t),M=n.i(h.a)(d.e,i,w);
o.a.render(a()(l.a,{store:e},void 0,y),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(g.a,{machineIdentifier:t},void 0,a()(m.a,{providerEntityID:M},void 0,a()(v.a,{machineIdentifier:t,serverEntityID:w,providerEntityID:M,directoryKey:s,activeType:p,activeFilters:n.i(u.a)(f),activeFilterLabel:b,activeSort:S})))),this.ui.page[0])}});t.a=b},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(46)),o=n.n(s),l=n(15),c=n(14),u=n(114),d=n(200),h=n(197),p=n(198),f=n(2062),g=a()(d.a,{}),m=u.a.extend({
mountReact:function(){var e=n.i(c.a)("appStore"),t=this.options.selectedServerID,i=this.options.params||{};o.a.render(a()(l.a,{store:e},void 0,g),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(h.a,{machineIdentifier:t},void 0,a()(p.a,{},void 0,a()(f.a,{machineIdentifier:t,selectedViewType:i.view})))),this.ui.page[0])}});t.a=m},function(e,t,n){"use strict";var i=n(2861),a=n.n(i),r=n(10),s=n(14),o=n(261),l=n(8),c=n(801),u=n(799),d=n(800),h=n(188),p=r.a.Layout.extend({className:"section-list-container",
template:a.a,ui:{loading:".section-loading-container",emptyMessageContainer:".empty-message"},regions:{list:"ul"},modelEvents:{"change:selecting":"onSelectingChange","change:currentType":"onCurrentTypeChange","change:currentFilters":"onListRefresh","change:currentSort":"onListRefresh","change:currentFirstCharacter":"onCurrentFirstCharacterChange","socket:timeline":"onTimeline","change:refreshing":"showEmptyMessage"},events:{"click .add-to-library-link":"onAddToLibraryLinkClick"},onlyAfterRender:["showLoading","hideLoading","showEmptyMessage"],
initialize:function(e){var t=n.i(s.a)("appModel").get("settings");this.listenTo(t,"change:listType",this.onListTypeChange),this.listModel=e.listModel,this.mediaActions=e.mediaActions,this.listenTo(this.listModel,"change:totalSize",this.showEmptyMessage),this.fetchTotalSize()},serializeData:function(){return{canEdit:this.model.server.get("isFullOwnedServer")}},fetchTotalSize:function(){var e=this.list.currentView;e&&(e.isRefreshing=!0),this.listModel.abortPendingPopulate(),this.listModel.resetPopulatePromise(null),
this.listModel.set({currentPageStart:null,currentPageSize:null}),this.listModel.getCollection().reset(),this.listModel.fetchRange({start:0,size:0,scope:"page"}).done(this.whenRendered(function(){this.list.currentView&&(this.list.currentView.isRefreshing=!1,this.list.currentView.onCollectionReset(this.listModel.get("metadataItems"))),this.showEmptyMessage()}))},showLoading:function(e){e||(e={});var t=this.list.currentView,n=t.itemsPerPage,i=this.listModel.getTotalSize();this.ui.loading.toggleClass("has-scrollbar",i>n),
this.ui.loading.toggleClass("bottom",!e.prepend),this.ui.loading.removeClass("hidden")},hideLoading:function(){this.ui.loading.addClass("hidden")},showEmptyMessage:function(){this.ui.emptyMessageContainer.removeClass("folder filter refreshing default");var e=this.listModel.getTotalSize(),t=this.list.currentView;if(!(0!==e||t&&t.isRefreshing)){var n=this.model.get("currentSubset"),i=this.model.get("currentFilters");n&&"folder"===n.id?this.ui.emptyMessageContainer.addClass("folder"):n&&"all"!==n.id?this.ui.emptyMessageContainer.addClass("filter"):i&&i.length?this.ui.emptyMessageContainer.addClass("filter"):this.model.get("refreshing")?this.ui.emptyMessageContainer.addClass("refreshing"):this.ui.emptyMessageContainer.addClass("default");
}},getListConstructor:function(){var e=n.i(s.a)("appModel").get("settings"),t=e.getSectionListType(this.model);switch(t){case"media-details-list":return u.a;case"media-list":return d.a;default:return c.a}},onRender:function(){var e=this.getListConstructor();if(e){var t=new e({listModel:this.listModel,collection:this.listModel.get("metadataItems"),paginated:this.model.server.get("isFullServer"),mediaActions:this.mediaActions});this.list.append(t,this.$el),this.listenTo(this.list.currentView,{"change:loading":this.onLoadingChange
})}},onClose:function(){this.listModel.getCollection().reset()},onSelectingChange:function(e,t){this.$el.toggleClass("hide-actions",t)},onCurrentTypeChange:function(){this.onListRefresh();var e=n.i(s.a)("appModel").get("settings"),t=e.getSectionListType(this.model),i=e.getSectionListType(this.model,this.model.previous("currentType"));t!==i&&this.render()},onListRefresh:function(){this.listModel.scrollPosition=0,this.fetchTotalSize(),this.showLoading()},onListTypeChange:function(e,t){this.list.currentView.scrollPosition=0,
this.listModel.get("populatedRange").start>0&&this.fetchTotalSize(),this.render()},onCurrentFirstCharacterChange:function(e,t){for(var n=e.get("firstCharacters"),i=0,a=0,r=n.length;a<r;a++){var s=n.at(a);if(t.id===s.id)break;i+=s.get("size")}this.list.currentView.scrollToIndex(i)},onTimeline:function(e){if(e.state===o.a.CREATED||e.state===o.a.DELETED){var t=this.model.get("currentSubset"),n=this.model.get("currentType");"folder"!==t.id&&e.type!==n.id||this.list.currentView.merge()}},onLoadingChange:function(e,t){
e?this.showLoading(t):this.hideLoading()},onAddToLibraryLinkClick:function(e){e.preventDefault(),l.a.trigger("show:modal",new h.a({server:this.model.server,model:this.model,selectedPane:"folders"}))}});t.a=p},function(e,t,n){"use strict";var i=n(2862),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(8),c=n(14),u=n(135),d=n(156),h=n(1121),p=n(1122),f=n(1589),g=n(1604),m=n(1600),v=n(1808),y=o.a.Layout.extend({className:"section-container",template:a.a,regions:{list:".section-list-container"},modelEvents:{"default:currentSort":"toggleAlphaBar",
"change:currentType":"toggleAlphaBar","change:currentSort":"toggleAlphaBar","change:currentSubset":"onCurrentSubsetChange"},initialize:function(e){c.a("appModel").get("primaryServer")===this.model.server&&c.a("appStore").dispatch(u.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),sectionID:this.model.id})),this.initViewState(e).always(s.a.bind(function(){this.model.set("currentFolderKey",e.folderKey),l.a.trigger("show:bar","actionbar",new f.a({model:this.model,mediaActions:this.mediaActions
})),l.a.trigger("show:bar","breadcrumbbar",new g.a({model:this.model})),this.toggleAlphaBar()},this))},initViewState:function(e){this.viewState=new h.a({},s.a.extend({storage:new p.a({},{section:this.model}),section:this.model,filters:this.model.get("currentFilters")},e));var t=this.model.get("currentSort");t&&t.set("selected",!1);var n=this.viewState.fetch();return n.done(s.a.bind(function(){var e=this.viewState.getSectionAttrs();this.model.set(e),this.model.get("currentType").set("selected",!0),
this.model.get("currentSubset").set("selected",!0);var t=this.model.get("currentSort");t&&t.set("selected",!0),this.viewState.addListeners()},this)),n.always(s.a.bind(function(){this.mediaActions=new d.a({},{section:this.model,showAdvanced:!0})},this)),n.always(this.whenRendered(function(){var e=new v.a({model:this.model,listModel:this.model.get("items"),mediaActions:this.mediaActions});this.list.append(e,this.$el)})),n},toggleAlphaBar:function(){this.supportsAlphaPagination()?l.a.trigger("show:bar","alphabar",new m.a({
model:this.model,collection:this.model.get("firstCharacters")})):l.a.trigger("hide:bar","alphabar")},supportsAlphaPagination:function(){if(!this.model.get("allowAdvancedFilters")||"all"!==this.model.get("currentSubset").get("key"))return!1;var e=this.model.get("currentType"),t=this.model.get("currentSort");if(!t){var n=/^(season|episode|album|track)$/;return!n.test(e.get("typeString"))}var i=t.get("key"),a=t.get("direction");return"titleSort"===i&&"asc"===a},onCurrentSubsetChange:function(e,t){var n=e.previous("currentSubset"),i=n&&n.id,a=t&&t.id;
i!==a&&(this.model.get("items").scrollPosition=0)},onClose:function(){l.a.trigger("hide:bar","actionbar"),l.a.trigger("hide:bar","breadcrumbbar"),l.a.trigger("hide:bar","alphabar"),c.a("appModel").get("primaryServer")===this.model.server&&c.a("appStore").dispatch(u.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),sectionID:null})),this.viewState.removeListeners()}});t.a=y},function(e,t,n){"use strict";function i(e){return u.a.map(e,function(e){return'<option value="'+e.value+'"'+(e.selected?" selected":"")+">"+e.label+"</option>";
}).join("\n")}function a(e,t){return e.map(function(e){return{label:e.get("name"),value:e.get("identifier"),selected:t===e.get("identifier")}})}function r(e,t){if(!e)return[];var n=e.get("languages"),i=n.map(function(e){return{label:e.get("name"),value:e.id,selected:e.id===t}});return i}var s=n(2871),o=n.n(s),l=n(10),c=n(2),u=n.n(c),d=n(343),h=n(768),p=l.a.ItemView.extend({template:o.a,ui:{agentSelect:"#match-search-agent",languageSelect:"#match-search-language"},events:{"change #match-search-agent":"onAgentSelectChange"
},onlyAfterRender:["updateAgents","updateLanguages"],initialize:function(){var e=this.model.server.getSectionForItem(this.model),t=e.get("agent"),n=this.setupAgents(t);n.then(u.a.bind(this.updateAgents,this,t)),n.then(u.a.bind(this.updateLanguages,this,t))},serializeData:function(){var e=this.model.server.getSectionForItem(this.model),t=e.get("agent"),n=this.model.agentsProxy.findWhere({identifier:t}),i={item:this.model.toJSON(),agents:a(this.model.agentsProxy,t),languages:r(n)};return i},setupAgents:function(e){
if(this.model.agentsPromise)return this.model.agentsPromise;var t=this.model.server.getSectionForItem(this.model),n=t.getSectionType(),i=new d.a([],{server:this.model.server,mediaTypeID:n.typeID}),a=n.exclusiveAgents,r=new h.a(i,a,e);return this.model.agents=i,this.model.agentsProxy=r,this.model.agentsPromise=this.model.agents.populate({reset:!0,cancelable:!0}),this.model.agentsPromise},updateAgents:function(e){this.ui.agentSelect.html(i(a(this.model.agentsProxy,e)))},updateLanguages:function(e){
var t=this.model.agentsProxy.findWhere({identifier:e});if(!e)return void this.ui.languageSelect.empty();var n=this.model.server.getSectionForItem(this.model),a=n.get("language");this.ui.languageSelect.html(i(r(t,a)))},onAgentSelectChange:function(e){this.updateLanguages(e.currentTarget.value)},onModalClose:function(){this.model.agents=null,this.model.agentsProxy=null,this.model.agentsPromise=null}});t.a=p},function(e,t,n){"use strict";var i=n(2872),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(757),c=n(1690),u=o.a.Layout.extend({
template:a.a,regions:{resultRegion:".result-region"},onlyAfterRender:["updateResults"],initialize:function(){this.setupResults();var e=this.model.section,t={manual:1},n={reset:!0,timeout:0,data:t};/com\.plexapp\.agents\.none\:\/\//.test(this.model.get("guid"))&&s.a.extend(n,{data:s.a.extend(t,{agent:e.get("agent"),language:e.get("language")}),processData:!0}),this.model.results.populate(n).then(s.a.bind(this.updateResults,this))},setupResults:function(){if(!this.model.results){var e=this.model.results||new l.default([],{
server:this.model.server,parent:this.model});this.model.results=e}},updateResults:function(){this.resultRegion.show(new c.a({collection:this.model.results,itemViewOptions:{item:this.model}}))},onModalClose:function(){this.model.results=null}});t.a=u},function(e,t,n){"use strict";var i=n(2873),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(1725),d=c.a.Layout.extend({className:"devices-container row",template:a.a,regions:{list:".device-list-container"},events:{"click .nav a":"onDeviceTypeClick"
},ui:{filters:".nav a"},deviceTypes:[{id:"all",title:"All",ids:["all"]},{id:"web",title:"Web",ids:["Web Client","Plex Web"]},{id:"pht",title:"Home Theater",ids:["Plex Home Theater","Plex for Home Theater","PlexHomeTheater","Plex Media Center"]},{id:"pmp",title:"Media Player",ids:["Plex Media Player"]},{id:"pms",title:"Server",ids:["Plex Media Server"]},{id:"android",title:"Android",ids:["Plex for Android","Android"]},{id:"ios",title:"iOS",ids:["Plex/iOS","Plex for iOS"]},{id:"samsung",title:"Samsung",
ids:["Plex for Samsung"]},{id:"google-tv",title:"Google TV",ids:["Google TV"]},{id:"windows",title:"Windows",ids:["Plex for Windows"]},{id:"apple-tv",title:"Apple TV",ids:["Plex-ATV","Plex for Apple TV"]},{id:"windows-phone",title:"Windows Phone",ids:["Plex for Windows Phone"]},{id:"plexbmc",title:"PleXBMC",ids:["PleXBMC"]},{id:"cloud-sync",title:"Cloud Sync",ids:["Cloud Sync"]},{id:"roku",title:"Roku",ids:["Plex for Roku"]},{id:"popcorn-hour",title:"Popcorn Hour",ids:["Plex for Popcorn Hour"]},{
id:"xbox",title:"Xbox",ids:["Plex for Xbox One","Plex for Xbox 360"]},{id:"other",title:"Other",ids:[]}],initialize:function(){this.products=this.collection.products(),this.addOtherIds()},serializeData:function(){return{deviceTypes:this.getFilteredDeviceTypes()}},sortDeviceTypes:function(e){var t=s.a.sortBy(e,function(e){return"all"===e.id?"":e.title.toLowerCase()});return t},getFilteredDeviceTypes:function(){var e=this.deviceTypes.filter(function(e){return"all"===e.id||s.a.intersection(this.products,e.ids).length>0;
},this);return this.sortDeviceTypes(e)},addOtherIds:function(){var e=s.a.flatten(s.a.map(this.deviceTypes,function(e){return e.ids})),t=s.a.difference(this.products,e),n=s.a.find(this.deviceTypes,function(e){return"other"===e.id});s.a.each(t,function(e){n.ids.push(e)})},onRender:function(){this.list.show(new u.a({collection:this.collection}))},onDeviceTypeClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("id"),i=this.collection;if(this.ui.filters.removeClass("selected"),t.addClass("selected"),
"all"!==n){var a=s.a.findWhere(this.deviceTypes,{id:n});i=this.collection.filterByProducts(a.ids)}this.list.show(new u.a({collection:i}))}});t.a=d},function(e,t,n){"use strict";var i=n(2875),a=n.n(i),r=n(14),s=n(815),o=n(805),l=n(1731),c=s.a.extend({template:a.a,initialize:function(){var e=r.a("appModel"),t=e.get("user");this.collection=t.get("homeUsers"),this.invites=t.get("desktop").get("invites").filterByHome(),this.sentInvites=t.get("desktop").get("sentInvites").filterByHome(),this.signedInHomeUser=this.collection.get(t.id),
this.itemViewOptions={isAdmin:!(!this.signedInHomeUser||!this.signedInHomeUser.get("admin"))},this.addListeners()},addListeners:function(){s.a.prototype.addListeners.apply(this,arguments),this.signedInHomeUser&&this.listenTo(this.signedInHomeUser,"change:admin",this.onAdminChange)},onRender:function(){this.friendList.show(new l.a({collection:this.collection,itemViewOptions:this.itemViewOptions})),this.inviteList.show(new o.a({collection:this.invites})),this.pendingList.show(new o.a({collection:this.sentInvites
})),this.updateHeaders()},onAdminChange:function(e,t){this.friendList.currentView&&(this.itemViewOptions.isAdmin=t)}});t.a=c},function(e,t,n){"use strict";var i=n(2876),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(14),c=n(8),u=n(1816),d=n(1830),h=n(1815),p=n(1812),f={web:u.a,server:d.a,users:h.a,devices:p.a},g=o.a.Layout.extend({className:"container",template:a.a,ui:{webNavItem:".web-nav-item",serverNavItem:".server-nav-item",usersNavItem:".users-nav-item",devicesNavItem:".devices-nav-item",usersBadge:".users-btn > .badge"
},regions:{container:".settings-container"},onlyAfterRender:["onSignedInChange","onPrimaryServerChange"],initialize:function(e){this.options=e,this.subset=e.subset||"web";var t=l.a("appModel"),n=t.get("user"),i=n.get("desktop").get("invites");this.subsets={users:i},this.listenTo(n,"change:signedIn",this.onSignedInChange),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(i,"reset add remove",this.onInvitesChange),this.listenTo(c.a,"change:language",this.render)},serializeData:function(){
var e=l.a("appModel"),t=e.get("user"),n=e.get("primaryServer");return{subset:this.subset,signedIn:t.get("signedIn"),hasPrimaryServer:n&&!n.get("shared")}},updateBadges:function(){var e={users:this.subsets.users.length};s.a.each(s.a.keys(e),function(t){var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t])},this)},onRender:function(){var e=f[this.subset];this.container.show(new e(this.options)),this.updateBadges()},onSignedInChange:function(e,t){this.ui.usersNavItem.toggleClass("hidden",!t),
this.ui.devicesNavItem.toggleClass("hidden",!t)},onPrimaryServerChange:function(e,t){var n=t&&!t.get("shared");this.ui.serverNavItem.toggleClass("hidden",!n)},onInvitesChange:function(){this.updateBadges()}});t.a=g},function(e,t,n){"use strict";var i=n(2877),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(4),h=n(8),p=n(27),f=n(21),g=n(1813),m=n(815),v=n(190),y=n(289),b={home:g.a,friends:m.a},S=c.a.Layout.extend({className:"users-container",template:a.a,ui:{navLinks:".nav-cards a",homeBadge:".home-card > .badge",
friendsBadge:".friends-card > .badge",leaveHomeBtn:".leave-home-btn",enableGuestBtn:".enable-guest-btn",disableGuestBtn:".disable-guest-btn",userActions:".user-actions"},regions:{container:".users-row"},events:{"click .nav-cards a":"onNavClick","click .add-user-btn":"onAddUserClick","click .leave-home-btn":"onLeaveHomeClick","click .invite-friend-btn":"onInviteFriendClick","click .enable-guest-btn":"onEnableGuestClick","click .disable-guest-btn":"onDisableGuestClick"},shouldShowUserActions:function(){
var e=!!this.user.get("subscription").get("features").get("home");return this.signedInHomeUser.get("admin")&&e},shouldShowLeaveHome:function(){return this.home.length>1&&!this.signedInHomeUser.get("restricted")},shouldShowFriends:function(){return!this.signedInHomeUser.get("restricted")},shouldShowEnableGuest:function(){return!(this.homeDetails&&this.homeDetails.get("guestEnabled"))},initialize:function(e){var t=u.a("appModel");this.subset=e.usersSubset,this.user=t.get("user"),this.home=this.user.get("homeUsers"),
this.invites=this.user.get("desktop").get("invites"),this.signedInHomeUser=this.home.get(this.user.id),this.homeDetails=this.user.get("homeDetails"),this.proxies={home:this.invites.filterByHome(),friends:this.invites.filterByFriends()},e.promptPIN&&h.a.trigger("show:modal",new y.a({model:this.signedInHomeUser,isEditing:!0,isEditWarning:!this.signedInHomeUser.get("protected")})),this.listenTo(this.signedInHomeUser,"change:admin",this.onAdminChange),this.listenTo(this.home,"reset add remove",this.onHomeChange),
this.listenTo(this.invites,"reset add remove",this.onInvitesChange),this.listenTo(this.homeDetails,"change",this.onHomeDetailsChange)},serializeData:function(){return{subset:this.subset,showUserActions:this.shouldShowUserActions(),showLeaveHome:this.shouldShowLeaveHome(),showFriends:this.shouldShowFriends(),showEnableGuest:this.shouldShowEnableGuest(),showDisableGuest:!this.shouldShowEnableGuest()}},showSubset:function(e){e&&(this.$el.removeClass("show-"+this.subset),this.subset=e),this.$el.addClass("show-"+this.subset);
var t=b[this.subset];t?this.container.append(new t):p.a.warn("Invalid subset: "+this.subset)},updateBadges:function(){var e={home:this.proxies.home.length,friends:this.proxies.friends.length};s.a.each(s.a.keys(e),function(t){var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t])},this)},toggleGuestAccount:function(e,t){e.preventDefault(),f.a.execute("toggleGuest",{user:this.user,enable:t})},onRender:function(){this.showSubset(),this.updateBadges()},onClose:function(){s.a.each(this.proxies,function(e){
e.destroy()})},onAdminChange:function(){this.ui.userActions.toggleClass("hidden",!this.shouldShowUserActions())},onHomeChange:function(){this.ui.leaveHomeBtn.toggleClass("hidden",!this.shouldShowLeaveHome())},onInvitesChange:function(){this.updateBadges()},onHomeDetailsChange:function(){this.ui.enableGuestBtn.toggleClass("hidden",!this.shouldShowEnableGuest()),this.ui.disableGuestBtn.toggleClass("hidden",this.shouldShowEnableGuest())},onNavClick:function(e){e.preventDefault();var t=l()(e.currentTarget);
t.hasClass("selected")||(this.ui.navLinks.removeClass("selected"),t.addClass("selected"),this.showSubset(s.a.last(e.currentTarget.href.split("/"))),h.a.trigger("navigate","users",{subset:this.subset,trigger:!1}))},onAddUserClick:function(e){e.preventDefault();var t=this.user.get("maxHomeSize");t&&this.home.length-1<t?h.a.trigger("show:modal",new v.a({type:"home"})):h.a.trigger("show:alert",{type:"error",message:n.i(d.default)("You have reached the {1} person home limit.",t)})},onLeaveHomeClick:function(e){
e.preventDefault(),f.a.execute("removeHomeUser",{homeUser:this.signedInHomeUser,isSignedInUser:!0})},onInviteFriendClick:function(e){e.preventDefault(),h.a.trigger("show:modal",new v.a({type:"friend"}))},onEnableGuestClick:function(e){this.toggleGuestAccount(e,!0)},onDisableGuestClick:function(e){this.toggleGuestAccount(e,!1)}});t.a=S},function(e,t,n){"use strict";var i=n(2878),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(4),h=n(8),p=n(61),f=n(706),g=n(95),m=n(678),v=n(260),y=n(259),b=n(680),S=n(332),w=n(313),M=n(59),I=n(417),C=n(785),D=n(1570),T=n(808),x=[{
value:0,title:"None"},{value:1,title:"1"},{value:2,title:"2"},{value:3,title:"3"},{value:4,title:"4"},{value:5,title:"5"}],P=c.a.ItemView.extend({className:"web-settings-container",template:a.a,ui:{chromecastCustomGroup:"#chromecast-custom-group",submitBtn:".submit-btn",message:".form-message"},events:{"click .toggle-advanced-btn":"onToggleAdvancedClick","click .settings-nav a":"onSettingsGroupClick","click .keyboard-shortcuts-btn":"onKeyboardShortcutsClick","change #chromecastAppID":"onChromecastAppIDChange",
"change input[id]":"onInputChange","input input[type=text]":"onInputChange","change select[id]":"onInputChange","submit #web-settings-form":"onSubmit"},onlyAfterRender:["saveChanges"],initialize:function(){this.changes={};var e=n.i(u.a)("appModel"),t=e.get("settings"),i=e.get("user");this.listenTo(i,"change:signedIn",this.onSignedInChange),this.listenTo(e,"change:primaryServer",this.render),this.listenTo(h.a,"shortcut:save",this.saveChanges);var a=t.get("showAdvancedSettings");this.$el.toggleClass("show-advanced",a);
},serializeData:function(){var e=[],t=[{value:"h:mma",title:n.i(d.default)("12 Hour")},{value:"HH:mm",title:n.i(d.default)("24 Hour")}],i=this.model.toJSON(),a=n.i(u.a)("appModel"),r=a.get("experienceSettings").toJSON(),o=a.get("user"),l=o.hasPlexPass(),c=o.hasHome(),h=o.isNinja();return s.a.each(s.a.keys(w.a.getLanguages()),function(t){e.push({value:t,title:n.i(f.a)(t)})}),{settings:i,experienceSettings:r,hasPlexPass:l,hasHome:c,isNinja:h,isPMPDesktop:n.i(S.a)(),showExperimentalPlayer:p.a.hasMediaSource&&M.a.get("allowFlash"),
version:"2.13.0",languages:e,debugLevels:m.a.settings,subtitlesBurnLevels:v.a.settings,chromecastAppIDs:C.a.settings,availableQualities:g.a.getAvailableQualities().reverse(),subtitleSizes:b.a.settings,audioBoostLevels:D.a.settings,httpFallbackOptions:y.a.settings,extrasPrefixCounts:x,timeFormats:t}},saveChanges:function(){var e=this.ui.submitBtn,t=this.ui.message;if(!e.isDisabled()){e.addClass("active");var i=!!this.changes.language,a=n.i(u.a)("appModel"),r=a.get("experienceSettings"),o=l.a.when(this.model.save(this.changes),this.saveAbstractSettings(r));
o.done(s.a.bind(function(){this.changes={},i||(e.addClass("disabled"),t.text(n.i(d.default)("Your changes have been saved.")))},this)),o.fail(s.a.bind(function(){t.text(n.i(d.default)("Your changes could not be saved."))},this)),o.always(s.a.bind(function(){i||e.removeClass("active")},this))}},saveAbstractSettings:function(e){var t=s.a.reduce(this.changes,function(t,n,i){return e.hasAttr(i)&&(t[i]=n),t},{});return s.a.isEmpty(t)?l.a.Deferred().resolve().promise():e.save(t)},onSignedInChange:function(e,t){
null!=t&&this.render()},onToggleAdvancedClick:function(e){e.preventDefault();var t=this.$el.hasClass("show-advanced");t&&this.$(".advanced-setting > .selected").length&&this.$(".nav a:first").click();var i=n.i(u.a)("appModel").get("settings");this.$el.toggleClass("show-advanced",!t),i.save("showAdvancedSettings",!t)},onSettingsGroupClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.attr("href");this.$(".settings-group").removeClass("active"),this.$(n).addClass("active"),this.$(".nav a").removeClass("selected"),
t.addClass("selected")},onKeyboardShortcutsClick:function(e){e.preventDefault(),h.a.trigger("show:modal",new T.a({shortcuts:I.a.prop("shortcuts")}))},onChromecastAppIDChange:function(e){var t=e.currentTarget.value===C.a.CUSTOM;this.ui.chromecastCustomGroup.toggleClass("hidden",!t)},onInputChange:function(e){var t=l()(e.currentTarget),n=e.currentTarget,i=n.value;"checkbox"===n.type&&(i=t.prop("checked")),"int"===t.data("type")&&(i=parseInt(i,10)),this.changes[n.id]=i,this.ui.submitBtn.removeClass("disabled"),
this.ui.message.text("")},onSubmit:function(e){e.preventDefault(),this.saveChanges()}});t.a=P},function(e,t,n){"use strict";var i=n(2879),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(36),d=n(343),h=n(1721),p=n(1723),f=c.a.Layout.extend({template:a.a,ui:{agentLabel:".agent-label",typeNavItems:".agent-types-nav li",agentNavItems:".agents-nav li"},regions:{agentsList:".agents-list-container",contributorsList:".contributors-list-container"},events:{"click .agent-types-nav a":"onAgentTypeClick",
"click .agents-nav a":"onAgentClick"},initialize:function(){this.bindAllWhenRendered("onAgentsReset","onContributorsReset"),this.agentTypes=[],this.agentTypes.push(u.a.get("movie")),this.agentTypes.push(u.a.get("show")),this.agentTypes.push(u.a.get("artist")),this.agentTypes.push(u.a.get("album")),this.agentTypes.push(u.a.get("photo")),this.currentType=s.a.first(this.agentTypes),this.populateAgents()},serializeData:function(){return{currentType:this.currentType,agentTypes:this.agentTypes}},populateAgents:function(){
this.agents=new d.a([],{server:this.model,mediaTypeID:this.currentType.id});var e=this.agents.populate({reset:!0,scope:"page"});e.done(s.a.bind(this.onAgentsReset,this))},selectAgent:function(e){this.currentAgent&&this.currentAgent.set("selected",!1),this.currentAgent=e,e.set("selected",!0),this.ui.agentLabel.text(e.get("name")),this.additionalAgents=new d.a([],{server:this.model,mediaTypeID:this.currentType.id,relatedAgentID:e.id}),this.contributors=new d.a([],{server:this.model,mediaTypeID:this.currentType.id,
primaryAgentID:e.id}),this.contributorsList.show(new p.a({collection:this.contributors})),this.listenTo(this.contributorsList.currentView,"save",this.onContributorsSave),this.populateContributors()},populateContributors:function(){var e=[];e.push(this.additionalAgents.populate({reset:!0,scope:"page"})),e.push(this.contributors.populate({reset:!0,scope:"page"}));var t=l.a.when.apply(l.a,e);t.done(s.a.bind(this.onContributorsReset,this))},onAgentsReset:function(){if(this.agentsList.show(new h.a({collection:this.agents
})),this.agents.length){var e=this.agents.findWhere({selected:!0})||this.agents.first();this.selectAgent(e)}},onContributorsReset:function(){var e=s.a.bind(function(e){return e.id===this.currentAgent.id?(e.set("isPrimary",!0),!0):!!this.contributors.get(e.id)},this);this.contributors.reset(this.additionalAgents.filter(e))},onAgentTypeClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("type");this.currentType=u.a.get(n),this.populateAgents(),this.ui.typeNavItems.removeClass("active"),
t.parent("li").addClass("active")},onAgentClick:function(e){e.preventDefault();var t=l()(e.target),n=t.data("identifier"),i=this.agents.get(n);this.selectAgent(i)},onContributorsSave:function(e){this.currentAgent.url="system/agents/"+this.currentAgent.id+"/config/"+this.currentType.id;var t=this.currentAgent.save({order:e});t.done(s.a.bind(function(){this.additionalAgents.fetch({silent:!0}),this.contributors.fetch({silent:!0})},this))}});t.a=f},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(191),s=r.a.extend({
prefix:"channel.",serializeData:function(){var e=r.a.prototype.serializeData.apply(this,arguments),t=this.options.channelSettings.toJSON();return a.a.each(t,function(e){e.id=this.prefix+e.id},this),e.unshift.apply(e,t),e},updateModel:function(e,t){var n=r.a.prototype.updateModel.apply(this,arguments);if(n)return n;var i=e.replace(this.prefix,""),a=this.options.channelSettings.get(i);return a?a.set("value",t):void 0}});t.a=s},function(e,t,n){"use strict";var i=n(2880),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(191),c=n(1826),u=n(1827),d=l.a.extend({
template:a.a,regions:{signIn:".sign-in-region",update:".update-region"},serializeData:function(){var e=l.a.prototype.serializeData.apply(this,arguments),t=s.a.findWhere(e,{id:"FriendlyName"});return t&&(t.placeholder=this.model.get("friendlyName")),e},bindings:{".version":{modelAttribute:"shortVersion",formatter:function(e){return n.i(o.default)("Version {1}",e)}}},onRender:function(){l.a.prototype.onRender.apply(this,arguments),this.signIn.show(new c.a({model:this.model.get("desktop").get("cloudAccount"),
collection:this.collection})),this.model.get("updater")&&this.update.show(new u.a({model:this.model.get("desktop").get("update"),collection:this.collection}))}});t.a=d},function(e,t,n){"use strict";var i=n(2881),a=n.n(i),r=n(191),s=r.a.extend({template:a.a,serializeData:function(){var e=this.model,t=e.get("diagnostics"),n=t&&t.indexOf("logs")!==-1,i=t&&t.indexOf("databases")!==-1,a=n||i;return{showDownloadLogs:n,showDownloadDatabases:i,showDownloadLogsOrDatabases:a,downloadLogsUrl:e.resolveUrl("/diagnostics/logs",{
appendToken:!0}),downloadDatabasesUrl:e.resolveUrl("/diagnostics/databases",{appendToken:!0}),defaultLinkTarget:"_self"}}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(328),o=n(191),l=o.a.extend({prefix:"account.",serializeData:function(){var e=this.options.account,t=[],i=a.a.map(s.a,function(e,t){return{value:t,label:e}});return t.push({id:this.prefix+"autoSelectAudio",label:n.i(r.default)("Automatically select audio and subtitle tracks"),summary:n.i(r.default)("Automatically select audio and subtitle tracks in your preferred language when possible."),
default:!1,value:e.get("autoSelectAudio"),type:"bool",group:"account.language",advanced:!1,hidden:!1}),t.push({id:this.prefix+"defaultAudioLanguage",label:n.i(r.default)("Prefer audio tracks in"),default:"en",value:e.get("defaultAudioLanguage"),type:"text",group:"account.language",advanced:!1,hidden:!1,enumValues:i}),t.push({id:this.prefix+"subtitleMode",label:n.i(r.default)("Subtitle mode"),default:1,value:parseInt(e.get("subtitleMode"),10),type:"int",group:"account.language",advanced:!1,hidden:!1,
enumValues:[{value:0,label:n.i(r.default)("Manually selected")},{value:1,label:n.i(r.default)("Shown with foreign audio")},{value:2,label:n.i(r.default)("Always enabled")}]}),t.push({id:this.prefix+"defaultSubtitleLanguage",label:n.i(r.default)("Prefer subtitles in"),default:"en",value:e.get("defaultSubtitleLanguage"),type:"text",group:"account.language",advanced:!1,hidden:!1,enumValues:i}),t},updateModel:function(e,t){var n=o.a.prototype.updateModel.apply(this,arguments);if(n)return n;var i=e.replace(this.prefix,""),a=this.options.account;
return a.has(i)?a.set(i,t):void 0}});t.a=l},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(2882),s=n.n(r),o=n(10),l=n(1),c=(n.n(l),n(46)),u=n.n(c),d=n(15),h=n(14),p=n(1859),f=a()(p.a,{}),g=o.a.ItemView.extend({className:"livetv-epg-settings",template:s.a,mountReact:function(){var e=n.i(h.a)("appStore");u.a.render(a()(d.a,{store:e},void 0,f),this.el)},unmountReact:function(){this.isRendered&&u.a.unmountComponentAtNode(this.el)},onBeforeRender:function(){this.unmountReact()},onRender:function(){
this.mountReact()},onClose:function(){this.unmountReact()}});t.a=g},function(e,t,n){"use strict";var i=n(10),a=n(1824),r=i.a.CollectionView.extend({tagName:"ul",className:"nav nav-cards",itemView:a.a,selectGroup:function(e){this.selectedView&&this.selectedView.deselect();var t=this.collection.get(e);t&&(this.selectedView=this.children.findByModel(t),this.selectedView.select())},showDecorator:function(e,t){var n=this.collection.get(e);if(n){var i=this.children.findByModel(n);i.showDecorator(t)}}});
t.a=r},function(e,t,n){"use strict";var i=n(2883),a=n.n(i),r=n(10),s=r.a.ItemView.extend({tagName:"li",className:"server-settings-nav-list-item",template:a.a,ui:{card:".card"},events:{"click .card":"onClick"},select:function(){this.ui.card.addClass("selected")},deselect:function(){this.ui.card.removeClass("selected")},showDecorator:function(e){this.currentStatus&&this.$el.removeClass(this.currentStatus),this.currentStatus=e,this.$el.addClass(e)},onClick:function(e){e.preventDefault(),this.ui.card.hasClass("selected")||this.trigger("change:pane",this.model.id);
}});t.a=s},function(e,t,n){"use strict";var i=n(2885),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(21),u=n(191),d=u.a.extend({className:"remote-access-container",template:a.a,ui:{manualPortMappingMode:"#ManualPortMappingMode",manualPortMappingPort:"#ManualPortMappingPort",wanTotalMaxUploadRate:"#WanTotalMaxUploadRate",uploadContainer:".remote-access-upload-container",submitBtn:".submit-btn",message:".form-message"},events:{"change .remote-access-error-container input[id]":"onErrorInputChange","click .sign-in-link":"onSignInClick",
"click .remote-access-enable-btn":"onEnableClick","click .retry-btn":"onRetryClick","click .remote-access-disable-btn":"onDisableClick","change input[name=WanTotalMaxUploadRate]":"onTotalRateChange","keyup input[name=WanTotalMaxUploadRate]":"onTotalRateChange","change select[name=WanPerStreamMaxUploadRate]":"onPerStreamRateChange","submit #remote-access-upload-form":"onUploadFormSubmit"},initialize:function(e){this.cloudAccount=e.cloudAccount,this.changes=e.changes,this.listenTo(this.cloudAccount,{
"change:signInState":this.render,"change:remoteAccessState":this.render})},serializeData:function(){var e=this.collection.get("PublishServerOnPlexOnlineKey"),t=this.collection.get("ManualPortMappingMode"),n=this.collection.get("ManualPortMappingPort"),i=this.collection.get("WanTotalMaxUploadRate"),a=this.collection.get("WanPerStreamMaxUploadRate"),r=this.cloudAccount.toJSON(),s=!e.get("value"),o=!r.signedIn,l=s||o,c={forceAdvanced:!s&&!!r.mappingError,isDisabled:s,isSignedOut:o,isUnavailable:l,canEditPort:!l&&t&&t.get("value"),
hasPrivateAddress:!(!r.privateAddress||!r.privatePort),hasPublicAddress:!(!r.publicAddress||!r.publicPort),cloudAccount:r,hasMappingSettings:!(!t||!n),hasUploadLimitSettings:!(!i||!a),mappingModeSetting:t?t.toJSON():null,mappingPortSetting:n?n.toJSON():null,uploadSettings:[]};return i&&(c.totalRateSettingID=i.id,c.totalRateSettingValue=i.get("value")/1e3),a&&c.uploadSettings.push(a.toJSON()),c},enable:function(){},enableUploadForm:function(){this.isDisabled=!1,this.ui.submitBtn.removeClass("disabled"),
this.ui.message.text("")},updateUploadSetting:function(e,t){if(e){var n=this.updateModel(e,t);n&&(this.changes[e]=t,this.enable())}},connect:function(){return c.a.execute("connectServer",{cloudAccount:this.cloudAccount,value:!0})},disconnect:function(){return c.a.execute("connectServer",{cloudAccount:this.cloudAccount,value:!1})},reconnect:function(){return c.a.execute("reconnectServer",{cloudAccount:this.cloudAccount})},saveChanges:function(){if(s.a.isEmpty(this.changes))return l.a.Deferred().resolve().promise();
var e=this.collection.first().save(this.changes);return e.done(s.a.bind(function(){this.changes={}},this)),e},onErrorInputChange:function(e){u.a.prototype.onInputChange.apply(this,arguments),this.ui.manualPortMappingPort.prop("disabled",!this.ui.manualPortMappingMode.prop("checked"))},onSignInClick:function(e){e.preventDefault(),this.trigger("change:pane","general")},onEnableClick:function(e){e.preventDefault(),this.connect()},onDisableClick:function(e){e.preventDefault(),this.disconnect()},onRetryClick:function(e){
e.preventDefault(),this.cloudAccount.set("remoteAccessState","connecting"),this.saveChanges().always(s.a.bind(this.reconnect,this))},onTotalRateChange:function(e){var t=e.currentTarget,n=parseFloat(t.value,10),i=s.a.isNaN(n)?0:Math.max(n,0);this.updateUploadSetting(t.name,1e3*i),this.enableUploadForm()},onPerStreamRateChange:function(e){var t=e.currentTarget;this.updateUploadSetting(t.name,t.value),this.enableUploadForm()},onUploadFormSubmit:function(e){e.preventDefault(),this.trigger("save");var t=this.collection.get("WanTotalMaxUploadRate").get("value"),n=!t;
this.ui.wanTotalMaxUploadRate.val(t/1e3),this.ui.uploadContainer.toggleClass("show-warning",n)}});t.a=d},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(2886),s=n.n(r),o=n(2),l=n.n(o),c=n(5),u=n.n(c),d=n(10),h=n(14),p=n(21),f=n(129),g=d.a.ItemView.extend({className:"server-account-container",template:s.a,ui:{poster:".server-account-poster",signInBtn:".server-sign-in-btn",signOutBtn:".server-sign-out-btn",claimBtn:".server-claim-btn",username:"input[name=username]",password:"input[name=password]"
},events:{"submit #server-sign-in-form":"onSubmit","click .server-claim-btn":"onClaimClick","click .server-sign-out-btn":"onSignOutClick"},modelEvents:{"change:signedIn":"updateSignInState","change:username":"updateUserImage"},initialize:function(){var e=h.a("appModel");this.user=e.get("user"),this.image=new f.a({type:"friend",width:60}),this.listenTo(this.user,"change:isSignedIn",function(){this.isSigningIn||this.render()}),this.isSigningIn=!1,this.claimServerFailed=!1},serializeData:function(){
var e=!this.claimServerFailed&&this.model.server.supports("claimServer")&&this.user.get("isSignedIn"),t=!this.model.server.get("isPersonalCloudServer");return{showClaimMessage:e,showSignOut:t}},updateSignInState:function(){this.$el.toggleClass("signed-in",this.model.get("signedIn"))},updateUserImage:function(){var e=this.model.get("username");e===this.user.get("username")||e===this.user.get("email")?this.image.setModel(this.user):(this.image.setModel(null),this.image.url=null),this.image.render();
},signInServer:function(e){var t=a()({cloudAccount:this.model},e),n=p.a.execute("signInServer",t);return n.done(l.a.bind(function(){this.model.fetch()},this)),n},signInUser:function(e){return this.user.get("isSignedIn")?u.a.Deferred().resolve().promise():p.a.execute("signIn",{username:e.username,password:e.password})},signOut:function(){return this.ui.username.val(""),this.ui.password.val(""),p.a.execute("signOutServer",{cloudAccount:this.model})},bindings:{".server-account-username":{modelAttribute:"username"
}},onRender:function(){this.image.setElement(this.ui.poster),this.updateSignInState(),this.updateUserImage()},onClose:function(){this.image.close()},onSubmit:function(e){if(e.preventDefault(),!this.ui.signInBtn.isDisabled()){this.isSigningIn=!0,this.ui.signInBtn.addClass("active");var t={username:e.target.username.value,password:e.target.password.value},n=this.signInUser(t);n=n.then(l.a.bind(function(){return this.signInServer(t)},this)),n.always(this.whenRendered(function(){this.isSigningIn=!1,this.ui.signInBtn.removeClass("active");
},this))}},onSignOutClick:function(e){if(e.preventDefault(),!this.ui.signOutBtn.isDisabled()){this.ui.signOutBtn.addClass("active");var t=this.signOut();t.done(l.a.bind(function(){this.model.fetch()},this)),t.always(this.whenRendered(function(){this.ui.signOutBtn.removeClass("active")}))}},onClaimClick:function(e){e.preventDefault(),this.ui.claimBtn.addClass("active");var t=h.a("metrics"),n=this.signInServer({claim:!0});n.done(function(){t.trackEvent({event:"client:claimServer",interaction:!0})}),
n.fail(this.whenRendered(function(){t.trackEvent({event:"client:claimServerFailure",interaction:!1}),this.claimServerFailed=!0,this.render()})),n.always(this.whenRendered(function(){this.ui.claimBtn.removeClass("active")}))}});t.a=g},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(2887),s=n.n(r),o=n(2),l=n.n(o),c=n(10),u=n(14),d=n(4),h=n(8),p=n(21),f=n(1749),g=c.a.ItemView.extend({tagName:"span",className:"check-for-updates-container",template:s.a,ui:{checkForUpdatesBtn:".check-for-updates-btn",
downloadUpdatesContainer:".downloading-updates-container",downloadProgressContainer:".downloading-progress-container",downloadProgressLabel:".downloading-progress-label",updateProgressLabel:".downloading-updates-label",updateErrorMessage:".update-error-message",installManualLink:".install-manual-link"},modelEvents:{"change:state":"onStateChange","change:progress":"onProgressChange"},events:{"click .check-for-updates-btn":"onCheckForUpdatesClick","click .available-updates-btn":"onDownloadUpdatesClick",
"click .install-updates-btn":"onInstallUpdatesClick","click .release-notes-btn":"onInfoClick"},initialize:function(){this.model.fetch().then(this.whenRendered(function(){var e=this.model.get("state");"downloaded"===e&&this.model.get("shouldInstall")?(this.model.set("shouldInstall",!1),this.installUpdates()):this.canCheckForUpdate(e)&&this.checkForUpdates({download:!1})}))},serializeData:function(){return{canCheckForUpdate:this.canCheckForUpdate(this.model.get("state"))}},checkForUpdates:function(e){
p.a.execute("checkForServerUpdates",{server:this.model.server,download:e.download,initialState:e.initialState})},installUpdates:function(){p.a.execute("installServerUpdates",{server:this.model.server})},waitForInstall:function(){this.onWaitingForInstallCheck(),this.listenTo(this.model.server,"change:isConnected",this.onServerConnectedChange)},showUpdateState:function(){var e=this.model.get("state"),t=this.model.previous("state");"installing"===t&&this.stopListening(this.model.server,"change:isConnected",this.onServerConnectedChange),
this.$el.removeClass(t);var i=e;this.model.get("canInstall")||"available"!==e||(i="notify"),this.$el.addClass(i);var a=!(!this.model.get("added")&&!this.model.get("fixed"));if(this.$el.toggleClass("has-release-notes",a),"installing"===i)this.waitForInstall();else if("error"===i||"notify"===i){var r;this.model.get("error")?(r=this.model.get("error"),this.ui.installManualLink.addClass("hidden")):this.model.get("canInstall")?(r=n.i(d.default)("Something went wrong."),this.ui.installManualLink.removeClass("hidden")):(r=n.i(d.default)("An update is available."),
this.ui.installManualLink.removeClass("hidden"));var s=u.a("appModel"),o=s.get("user").server,l=this.model.get("downloadURL")||o.get("appsUrl");this.ui.installManualLink.attr("href",l),this.ui.updateErrorMessage.text(r)}},canCheckForUpdate:function(e){return"done"===e||"error"===e||"none"===e},onRender:function(){this.showUpdateState()},onStateChange:function(e,t){this.isRendered&&(this.showUpdateState(),this.ui.checkForUpdatesBtn.toggleClass("active",!this.canCheckForUpdate(t)))},onProgressChange:function(e,t){
l.a.isNumber(t)?(this.ui.downloadUpdatesContainer.css({"background-size":t+"% 100%"}),this.ui.downloadProgressContainer.removeClass("hidden"),this.ui.downloadProgressLabel.text(t)):this.ui.downloadProgressContainer.addClass("hidden")},onServerConnectedChange:function(e,t){t?p.a.execute("checkForServerUpdates",{server:this.model.server}):this._waitingTimeoutID&&(this._waitingTimeoutID=clearTimeout(this._waitingTimeoutID))},onWaitingForInstallCheck:function(){var e=this,t=this.model.server;if(t.get("isConnected")&&"installing"===this.model.get("state")){
var n=t.getXHROptions("/updater/check",{type:"PUT"}),i=a.a.ajax(n).promise();i.always(function(){e._waitingTimeoutID=setTimeout(e.onWaitingForInstallCheck.bind(e),2e3)})}},onCheckForUpdatesClick:function(e){e.preventDefault(),this.ui.checkForUpdatesBtn.isDisabled()||(this.ui.checkForUpdatesBtn.addClass("active"),this.checkForUpdates({download:!0}))},onDownloadUpdatesClick:function(e){e.preventDefault(),this.checkForUpdates({download:!0,initialState:"downloading"})},onInstallUpdatesClick:function(e){
e.preventDefault(),this.installUpdates()},onInfoClick:function(e){e.preventDefault(),h.a.trigger("show:modal",new f.a({model:this.model}))}});t.a=g},function(e,t,n){"use strict";var i=n(2888),a=n.n(i),r=n(10),s=n(149),o=r.a.ItemView.extend({template:a.a,serializeData:function(){return{isTranscoderRequired:!this.model.get("transcoderVideo"),isUpgradeRequired:!this.model.supports("streamReady"),minServerVersion:s.a.streamReady}}});t.a=o},function(e,t,n){"use strict";var i=n(2889),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(21),u=n(221),d=n(474),h=n(276),p=n(787),f=n(1706),g=n(191),m=n(1828),v=g.a.extend({
mixins:[u.a],className:"versions-container",template:a.a,ui:{message:".versions-status-message"},regions:{listRegion:".background-processing-list-region"},events:{"click .delete-all-btn":"onDeleteAllVersionsClick"},initialize:function(e){this.pausedSetting=this.collection.get("BackgroundQueueIdlePaused"),this.playlists=new d.a([],{server:this.model,allowInCache:!0}),this.transcodeJobs=new h.a([],{server:this.model,allowInCache:!0})},initialState:"loading",states:{loading:{nextState:"list",onEnter:function(){
var e=this.model.supports("streamReady"),t=this.model.get("transcoderVideo");if(this.listRegion.show(new p.a({inline:!0})),!e||!t)return void this.enterState("error");var n=l.a.when(this.playlists.populate(),this.transcodeJobs.fetch());n=n.then(s.a.bind(function(){return this.playlist=this.playlists.first(),this.playlist?(this.generators=this.playlist.get("children"),this.generators.fetch()):l.a.Deferred().reject().promise()},this)),n.done(this.whenRendered(function(){this.enterNextState()})),n.fail(this.whenRendered(function(){
this.enterState("error")}))}},list:{onEnter:function(){this.toggleMessage(),this.listenTo(this.generators,"reset add remove",this.toggleMessage),this.listRegion.show(new f.a({collection:this.generators,itemViewOptions:{transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}}))},onExit:function(){this.stopListening(this.generators)}},error:{onEnter:function(){this.listRegion.show(new m.a({model:this.model}))}}},toggleMessage:function(){this.ui.message.toggleClass("hidden",!this.generators.length);
},onRender:function(){this.enterNextState()},onDeleteAllVersionsClick:function(e){e.preventDefault(),c.a.execute("deleteAllVersionGenerators",{server:this.model}).then(s.a.bind(function(){return this.generators.fetch()},this))}});t.a=v},function(e,t,n){"use strict";function i(e){var t=e.hasOwnProperty("isVisible");if(!t)return null;var n=e.isVisible;if(c.a.isFunction(n)){for(var i=arguments.length,a=Array(i>1?i-1:0),r=1;r<i;r++)a[r-1]=arguments[r];return n.apply(void 0,a)}return n}var a=n(66),r=n.n(a),s=n(2890),o=n.n(s),l=n(2),c=n.n(l),u=n(5),d=n.n(u),h=n(47),p=n(10),f=n(14),g=n(4),m=n(21),v=n(8),y=n(20),b=n(283),S=n(1823),w=n(1819),M=n(1820),I=n(1825),C=n(1829),D=n(1817),T=n(1818),x=n(1821),P=n(1822),E=n(191),A=n(187),L=p.a.Layout.extend({
className:"server-settings-container",template:o.a,remoteAccessDecorators:{connecting:"unknown",disconnecting:"unknown",unreachable:"error",ok:"success"},regions:{serverDropdown:".filter-bar",nav:".nav-region",pane:".pane-region"},events:{"click .toggle-advanced-btn":"onToggleAdvancedClick"},panes:{general:{constructor:w.a,group:"general",title:"General",isVisible:!0},remoteAccess:{constructor:I.a,group:"remoteAccess",title:"Remote Access",isVisible:function(e){return!e.get("isPersonalCloudServer");
}},versions:{constructor:C.a,group:"versions",title:"Optimized Versions",isVisible:function(e){return!e.get("isPersonalCloudServer")}},agents:{constructor:D.a,group:"agents",title:"Agents",isVisible:!0},library:{constructor:E.a,group:"library",title:"Library"},channels:{constructor:T.a,group:"channels",title:"Channels",isVisible:!0},network:{constructor:E.a,group:"network",title:"Network"},transcoder:{constructor:E.a,group:"transcoder",title:"Transcoder"},languages:{constructor:x.a,group:"account.language",
title:"Languages",isVisible:!0},dlna:{constructor:E.a,group:"dlna",title:"DLNA"},bonjour:{constructor:E.a,group:"bonjour",title:"Network Discovery"},butler:{constructor:E.a,group:"butler",title:"Scheduled Tasks"},extras:{constructor:E.a,group:"extras",title:"Extras"},dvr:{constructor:P.a,group:"dvr",title:"DVR (Beta)",isVisible:function(e){return!(!e.get("mediaProviders")||!e.hasOwnerFeature("dvr"))}},help:{constructor:M.a,group:"help",title:"Help",isVisible:!0}},initialize:function(e){this.defaultGroup=e.group||"general",
this.account=e.account,this.cloudAccount=e.cloudAccount,this.channelSettings=e.channelSettings,this.tempSettings=this.collection.cloneDeep(),this.tempAccount=this.account.clone(),this.tempChannelSettings=this.channelSettings.cloneDeep(),this.changes={};var t=n.i(f.a)("appModel"),i=t.get("settings"),a=i.get("showAdvancedSettings");if(this.$el.toggleClass("show-advanced",a),this.initGroups(),this.model.supports("reachability")){var r="/myplex/refreshReachability",s=c.a.extend(this.model.getXHROptions(r),{
type:"PUT"});d.a.ajax(s)}t.set("primaryServer",this.model),this.listenTo(v.a,"shortcut:save",this.saveChanges),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(this.cloudAccount,"change:remoteAccessState",this.onRemoteAccessStatusChange),this.listenTo(this.model,"change:isClaimed",this.onClaimedChange)},initGroups:function(){var e=this,t=c.a.keys(this.panes),n=c.a.unique(this.collection.filter(function(e){return e.get("group")&&!e.get("hidden")}).map(function(e){return e.get("group");
}));this.groups=new h.a.Collection,t.forEach(function(t){var a=e.panes[t],r=i(a,e.model,e.tempSettings);(r===!0||r!==!1&&c.a.contains(n,t))&&e.addGroup(t,a)}),c.a.each(n,function(e){if(!c.a.contains(t,e)){var n={constructor:E.a,group:e,title:e};this.panes[e]=n,this.addGroup(e,n)}},this)},addGroup:function(e,t){var n=c.a.omit(t,"constructor");n.id=e,this.groups.add(n)},showPane:function(e){if(this.currentPane){if(this.currentPane.isActive)return this.currentPane;this.stopListening(this.currentPane),
this.flushChanges()}var t=this.panes[e];if(!t||!this.groups.get(e)){var n=r()(this.panes)[0];e=n,t=this.panes[n]}var i=t.constructor,a=new i({model:this.model,collection:this.tempSettings,account:this.tempAccount,cloudAccount:this.cloudAccount,channelSettings:this.tempChannelSettings,group:t.group,changes:this.changes});return this.currentPane=a,this.pane.show(a),this.nav.currentView.selectGroup(e),this.listenTo(this.currentPane,{"change:pane":this.showPane,save:this.saveChanges}),v.a.trigger("navigate","serverSettings",{
serverID:this.model.id,group:e,replace:!0,trigger:!1}),a},flushChanges:function(){this.currentPane.changes&&c.a.extend(this.changes,this.currentPane.changes)},saveChanges:function(){if(this.flushChanges(),!this.currentPane.isDisabled&&!this.currentPane.isActive){this.currentPane.triggerMethod("before:save");var e=[],t=this.getPrefixedChanges("channel."),n=this.getPrefixedChanges("account.");if(!c.a.isEmpty(t)){var i=this.channelSettings.first().getSaveParams(t),a=c.a.result(this.channelSettings,"url"),r=y.join([a,"/set"],i);
e.push(d.a.ajax(this.model.getXHROptions(r)))}c.a.isEmpty(n)||e.push(this.account.save(n)),c.a.isEmpty(this.changes)||e.push(this.collection.first().save(this.changes));var s=d.a.when.apply(d.a,e);s.done(c.a.bind(function(){var e=c.a.keys(this.changes);c.a.each(e,function(e){var t=this.tempSettings.get(e),n=this.collection.get(e);n.set("value",t.get("value")),"ButlerUpdateChannel"===e&&this.onButlerUpdateChannelChange()},this),this.changes={},this.currentPane&&(this.currentPane.changes&&(this.currentPane.changes={}),
this.currentPane.triggerMethod("after:save",!0))},this)),s.fail(c.a.bind(function(){this.currentPane&&this.currentPane.triggerMethod("after:save",!1)},this))}},getPrefixedChanges:function(e){var t={};return c.a.each(this.changes,function(n,i){var a=0===i.lastIndexOf(e,0);a&&(t[i.substring(e.length)]=n,delete this.changes[i])},this),t},onRender:function(){this.serverDropdown.append(new b.a);var e=new S.a({collection:this.groups});this.listenTo(e,"itemview:change:pane",this.onNavItemChangePane),this.nav.show(e);
var t=this.remoteAccessDecorators[this.cloudAccount.get("remoteAccessState")];t&&this.nav.currentView.showDecorator("remoteAccess",t),this.model.get("isClaimed")||this.nav.currentView.showDecorator("general","warning"),this.showPane(this.defaultGroup)},onClose:function(){this.currentPane=null},onNavItemChangePane:function(e,t){this.showPane(t)},onPrimaryServerChange:function(e,t){var i=this.model.get("desktop").get("update");return"installing"===i.get("state")?void this.listenTo(this.model,"change:connected",this.onServerConnectedChange):t?void v.a.trigger("navigate","serverSettings",{
serverID:t.id}):void v.a.trigger("show:view",new A.a({title:n.i(g.default)("Server settings are unavailable because the server could not be reached.")}))},onRemoteAccessStatusChange:function(e,t){var n=this.remoteAccessDecorators[t];n&&this.nav.currentView.showDecorator("remoteAccess",n)},onServerConnectedChange:function(e,t){if(t){this.stopListening(e,"change:connected",this.onServerConnectedChange);var i=n.i(f.a)("appModel");i.set("primaryServer",e)}},onClaimedChange:function(e,t){t?this.nav.currentView.showDecorator("general",""):this.nav.currentView.showDecorator("general","warning");
},onToggleAdvancedClick:function(e){e.preventDefault();var t=this.$el.hasClass("show-advanced"),i=n.i(f.a)("appModel").get("settings");this.$el.toggleClass("show-advanced",!t),i.save("showAdvancedSettings",!t)},onButlerUpdateChannelChange:function(){var e=this.collection.get("ButlerTaskCheckForUpdates"),t=e&&e.get("value");t&&m.a.execute("checkForServerUpdates",{server:this.model,download:!1})}});t.a=L},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(2891),s=n.n(r),o=n(2),l=n.n(o),c=n(5),u=n.n(c),d=n(10),h=n(1),p=(n.n(h),
n(46)),f=n.n(p),g=n(15),m=n(14),v=n(4),y=n(8),b=n(21),S=n(544),w=d.a.ItemView.extend({className:"setup-basic-container",template:s.a,ui:{modalContainer:".modal-container",connectCheckbox:"#connect",submitBtn:".submit-btn",nextBtn:".next-btn"},collectionEvents:{reset:"render"},events:{"change input[id]":"onInputChange","submit #setup-basic-form":"onSubmit"},initialize:function(){l.a.bindAll(this,"onPlexPassModalClose"),this.collection=this.model.get("desktop").get("settings"),this.collection.populate({
reset:!0}),this.model.isVersionOrNewer("0.9.15.5")?this.changes={PublishServerOnPlexOnlineKey:1}:this.changes={FirstRun:0,PublishServerOnPlexOnlineKey:1};var e=this.model.get("superToken");e&&(this.changes.PlexOnlineToken=e);var t=m.a("appModel"),n=t.get("user").get("hasPlexPass");this.isPlexPassModalOpen=!this.model.get("isDesktop")&&!n},serializeData:function(){var e=this.model.toJSON(),t=this.collection.get("FriendlyName"),n=this.collection.get("PublishServerOnPlexOnlineKey");return{server:e,friendlyNameSetting:t?t.toJSON():null,
publishSetting:n?n.toJSON():null}},mountReact:function(){f.a.render(a()(g.a,{store:m.a("appStore")},void 0,a()(S.a,{metricsProperties:{context:"setupWizard",firstRun:!0},isOpen:this.isPlexPassModalOpen,onModalClose:this.onPlexPassModalClose})),this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&f.a.unmountComponentAtNode(this.ui.modalContainer[0])},submit:function(){var e=this.ui.submitBtn;if(!e.hasClass("active")){e.addClass("active");var t=this.save();t=t.done(l.a.bind(function(){
this.ui.nextBtn.click()},this)),t.always(function(){e.removeClass("active")})}},save:function(){var e=this,t=l.a.isEmpty(this.changes)?u.a.Deferred().resolve().promise():this.collection.first().save(this.changes),i=m.a("appModel"),a=i.get("user").get("isSignedIn");return this.model.supports("claimServer")&&!this.model.get("superToken")&&a&&(t=t.then(function(){return e.model.get("isClaimed")?u.a.Deferred().resolve().promise():b.a.execute("signInServer",{claim:!0,cloudAccount:e.model.get("desktop").get("cloudAccount")
})}),t=t.then(function(){return e.model.fetch()})),t=t.fail(function(){y.a.trigger("show:alert",{type:"error",message:n.i(v.default)("There was a problem saving these settings.")})})},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()},onInputChange:function(e){var t=e.currentTarget,n=t.value;"checkbox"===t.type&&(n=t.checked?1:0),this.changes[t.id]=n},onSubmit:function(e){e.preventDefault(),this.submit()},onPlexPassModalClose:function(){
this.isPlexPassModalOpen=!1,this.mountReact()}});t.a=w},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(2892),s=n.n(r),o=n(2),l=n.n(o),c=n(5),u=n.n(c),d=n(10),h=n(1),p=(n.n(h),n(46)),f=n.n(p),g=n(4),m=n(8),v=n(460),y=n(14),b=n(435),S=n(2192),w=n(3133),M=n.n(w),I=d.a.ItemView.extend({className:"setup-complete-container",template:s.a,ui:{modalContainer:".modal-container",submitBtn:".submit-btn",doneBtn:".done-btn"},collectionEvents:{reset:"render"},events:{"change input[id]":"onInputChange","submit #setup-complete-form":"onSubmit"
},initialize:function(){l.a.bindAll(this,"onPlexPassLiteModalClose"),this.collection=this.model.get("desktop").get("settings"),this.collection.populate({reset:!0}),this.changes={},this.isPlexPassLiteModalOpen=!1;var e=y.a("appModel"),t=e.get("user");t.get("isSignedIn")&&t.fetch().done(this.whenRendered(function(){t.get("subscription").get("plan")===b.a.plans.LITE&&(this.isPlexPassLiteModalOpen=!0,this.mountReact())}))},serializeData:function(){var e=this.collection.get("collectUsageData");return{
devicesImg:M.a,collectUsageDataSetting:e?e.toJSON():null}},mountReact:function(){f.a.render(a()(S.a,{metricsProperties:{context:"setupWizard",firstRun:!0},isOpen:this.isPlexPassLiteModalOpen,onModalClose:this.onPlexPassLiteModalClose}),this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&f.a.unmountComponentAtNode(this.ui.modalContainer[0])},submit:function(){var e=this.ui.submitBtn;if(!e.hasClass("active")){e.addClass("active");var t=this.save();t.always(this.whenRendered(function(){
this.ui.doneBtn.click(),e.removeClass("active")}))}},save:function(){l.a.has(this.changes,"collectUsageData")&&!this.changes.collectUsageData&&y.a("metrics").trackClick({action:"optOutMetrics",page:"setupWizard",pane:"complete",firstRun:!0});var e=this.collection.first().save(this.changes),t=this.model.get("sections").filter(function(e){return e.isNew()}).map(function(e){return e.save()}),i=u.a.when(e,n.i(v.a)(t));return i.fail(function(){m.a.trigger("show:alert",{type:"error",message:n.i(g.default)("There was a problem saving these settings.")
})}),i},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()},onInputChange:function(e){var t=e.currentTarget,n=t.value;"checkbox"===t.type&&(n=t.checked?1:0),this.changes[t.id]=n},onSubmit:function(e){e.preventDefault(),this.submit()},onPlexPassLiteModalClose:function(){this.isPlexPassLiteModalOpen=!1,this.mountReact()}});t.a=I},function(e,t,n){"use strict";var i=n(2893),a=n.n(i),r=n(10),s=r.a.ItemView.extend({className:"setup-error-container",
template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2894),a=n.n(i),r=n(10),s=n(3134),o=n.n(s),l=n(3135),c=n.n(l),u=n(3136),d=n.n(u),h=r.a.ItemView.extend({className:"setup-intro-container",template:a.a,events:{"click .next-btn":"onNavClick"},serializeData:function(){return{computerImg:o.a,mediaImg:c.a,playImg:d.a}},onNavClick:function(){var e=this.model.get("desktop").get("settings").get("AcceptedEULA");e.save({AcceptedEULA:!0})}});t.a=h},function(e,t,n){"use strict";var i=n(2895),a=n.n(i),r=n(5),s=n.n(r),o=n(10),l=n(8),c=n(423),u=n(1734),d=n(188),h=o.a.Layout.extend({
className:"setup-library-container",template:a.a,regions:{list:".setup-section-list-container"},events:{"click .add-section-btn":"onAddSectionClick"},metricsValue:function(){return this.collection.size()},initialize:function(e){var t=this.model,n=t.get("sections"),i=new c.a([],{server:t,url:"/services/defaultLibraries"});this.collection=n,this.model.supports("defaultSections")&&e.isFirstVisitToSubset&&s.a.when(i.populate(),n.populate()).done(function(){n.length||i.forEach(function(e){var i=t.hasOwnerFeature("photo_autotags");
"photo"===e.get("type")&&i&&e.set("enableAutoPhotoTags",!0),e.collection=n,n.add(e)})})},onRender:function(){this.list.show(new u.a({collection:this.collection}))},onAddSectionClick:function(e){e.preventDefault(),l.a.trigger("show:modal",new d.a({server:this.model}))}});t.a=h},function(e,t,n){"use strict";var i=n(2896),a=n.n(i),r=n(10),s=r.a.ItemView.extend({className:"setup-loading-container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2897),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(8),d=n(27),h=n(14),p=n(21),f=n(343),g=n(789),m=n(1836),v=n(1833),y=n(1834),b=n(1831),S=n(1835),w=n(1832),M={
setupIntro:y.a,setupSignIn:g.a,setupLoading:m.a,setupError:v.a,setupBasic:b.a,setupLibrary:S.a,setupComplete:w.a},I={setupIntro:"intro",setupError:"error",setupBasic:"name",setupLibrary:"library",setupComplete:"complete"},C=["com.plexapp.agents.imdb","com.plexapp.agents.thetvdb","com.plexapp.agents.lastfm"],D=c.a.Layout.extend({className:"container",template:a.a,maxAttempts:120,ui:{header:".setup-header"},regions:{container:".setup-container"},events:{"click .segment-btn":"onNavClick","click .next-btn":"onNavClick",
"click .done-btn":"onDoneClick"},onlyAfterRender:["onAgentsSuccess","onAgentsFail","onUpdatesComplete"],initialize:function(e){s.a.bindAll(this,"start","onAgentsSuccess","onAgentsFail","onUpdatesComplete"),this.subset=e.subset||"setupIntro",this.attempts=0,this._visitedSubsets={},d.a.info("Starting the setup wizard")},serializeData:function(){return{subset:this.subset}},renderSubset:function(){if(this.model.get("shared"))return void this.navigate("setupError");if(this.hasSkippedSignIn)return void this.navigate("setupIntro");
var e=h.a("appModel"),t=e.get("user").server;t.populate().done(this.whenRendered(function(){this.navigate("setupIntro")})).fail(this.whenRendered(function(){t.get("isConnected")?this.navigate("setupSignIn"):this.navigate("setupIntro")}))},start:function(){if(this.attempts>=this.maxAttempts)return d.a.error("Failed to start the setup wizard after "+this.attempts+" attempts"),void this.navigate("setupError");this.attempts++;var e=this.model.get("startState");if(e)n.i(d.a)("Waiting for server to start ("+e+")"),
this.model.fetch().done(s.a.delay(this.start,500));else{var t=new f.a([],{server:this.model}),i=t.fetch({scope:"page",timeout:0});i.done(this.onAgentsSuccess),i.fail(this.onAgentsFail)}},navigate:function(e){var t="setupIntro"===e,n="setupSignIn"===e,i="setupLoading"===e,a=M[e],r=I[e];this.previousSubset=this.subset,this.subset=e,r&&h.a("metrics").trackView({page:"setupWizard",pane:r,firstRun:!0});var s=!this._visitedSubsets[e];this._visitedSubsets[e]=!0;var o=new a({model:this.model,isFirstRun:!0,
isFirstVisitToSubset:s});this.container.show(o),n&&this.listenTo(o,"skipSignIn",this.onSignInSkip),this.ui.header.toggleClass("hidden",t||n),this.$el.addClass(e),this.previousSubset!==e&&this.$el.removeClass(this.previousSubset),i&&this.start()},onRender:function(){var e=h.a("appModel");e.set("isFirstRun",!0),this.renderSubset()},onClose:function(){var e=h.a("appModel");e.set("isFirstRun",!1)},onSignInSkip:function(){this.hasSkippedSignIn=!0,this.renderSubset()},onAgentsSuccess:function(e){n.i(d.a)("Looking for a core agent");
for(var t=0,i=C.length;t<i;t++){var a=C[t];if(e.get(a)){n.i(d.a)(a+" found");var r=p.a.execute("updateChannel",{server:this.model,silent:!0});return void r.always(this.onUpdatesComplete)}}d.a.error("No core agents found"),this.navigate("setupError")},onAgentsFail:function(){d.a.warn("Unable to request agents"),s.a.delay(this.start,500)},onUpdatesComplete:function(){this.navigate("setupBasic")},onNavClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("subset"),i=t.hasClass("segment-btn")&&"setupBasic"===this.subset;
i&&this.container.currentView?(e.preventDefault(),this.container.currentView.submit()):(this.navigate(n),u.a.trigger("navigate",n,{trigger:!1}))},onDoneClick:function(e){e.preventDefault(),h.a("metrics").trackClick({page:"setupWizard",action:"complete",firstRun:!0}),u.a.trigger("navigate","dashboard")}});t.a=D},function(e,t,n){"use strict";var i=n(2898),a=n.n(i),r=n(10),s=n(14),o=n(8),l=n(802),c=r.a.Layout.extend({className:"side-bar",template:a.a,ui:{sortContainer:".section-sort-container"},regions:{
sort:".section-sort-list-container"},initialize:function(){var e=n.i(s.a)("appModel").get("settings");this.hidden=!e.get("sidebarOpen"),this.hidden?this.$el.addClass("transition-out"):o.a.trigger("show:bar","sidebar")},open:function(){var e=n.i(s.a)("appModel").get("settings");this.hidden=!1,e.save("sidebarOpen",!0),this.$el.removeClass("transition-out"),o.a.trigger("show:bar","sidebar")},hide:function(){var e=n.i(s.a)("appModel").get("settings");this.hidden=!0,e.save("sidebarOpen",!1),this.$el.addClass("transition-out"),
o.a.trigger("hide:bar","sidebar")},onRender:function(){this.sort.show(new l.a({collection:this.model.get("sorts")}))},onClose:function(){o.a.trigger("hide:bar","sidebar")}});t.a=c},function(e,t,n){"use strict";var i=n(2899),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(8),c=n(14),u=n(135),d=n(1656),h=n(1713),p=n(1714),f=n(1716),g=n(802),m=o.a.Layout.extend({className:"side-bar",template:a.a,ui:{newFilterBtn:".new-filter-icon-btn",filterOptionsHeader:".filter-options-header",typeContainer:".section-type-container",
sortContainer:".section-sort-container"},regions:{currentFilters:".section-current-filters-list-container",filters:".section-filters-list-container",filterOptions:".section-filter-option-list-container",sort:".section-sort-list-container"},modelEvents:{"change:currentFilters":"onCurrentFiltersChange","change:currentType":"onCurrentTypeChange","change:title":"onSectionTitleChange"},events:{"click .new-filter-btn":"onNewFilterClick","click .hide-btn":"onHideClick"},initialize:function(e){var t=n.i(c.a)("appModel").get("settings");
this.hidden=!t.get("sidebarOpen"),this.advancedFilters=!!this.model.get("allowAdvancedFilters"),this.linearFilters=!this.advancedFilters,this.mediaActions=e.mediaActions,this.supportsQuickSearch=this.model.server.supports("quickSearch"),this.hidden?this.$el.addClass("transition-out"):l.a.trigger("show:bar","sidebar"),this.supportsQuickSearch||n.i(c.a)("appStore").dispatch(u.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),type:"section",placeholder:this.model.get("title"),query:this.getSearchValue()
})),this.listenTo(l.a,"search:section",this.onSearch)},serializeData:function(){return{showNewFilterIconBtn:this.advancedFilters&&!!this.model.get("currentFilters").length}},open:function(){var e=n.i(c.a)("appModel").get("settings");this.hidden=!1,e.save("sidebarOpen",!0),this.$el.removeClass("transition-out"),l.a.trigger("show:bar","sidebar")},hide:function(){var e=n.i(c.a)("appModel").get("settings");this.hidden=!0,e.save("sidebarOpen",!1),this.$el.addClass("transition-out"),l.a.trigger("hide:bar","sidebar");
},getSearchValue:function(){var e=this.model.get("currentFilters"),t=s.a.findWhere(e,{key:"title"});return t&&t.values.length?t.values[0]:""},addFilter:function(e,t){t||(t={});var n=this.model.get("currentFilters");this.linearFilters&&n.length&&(n.length=0);var i=s.a.findWhere(n,{key:e.key});if(i){if(s.a.indexOf(i.values,e.value)>-1)return;t.replace?(i.titles=[e.title],i.values=[e.value]):(i.titles.push(e.title),i.values.push(e.value))}else n.push({key:e.key,titles:[e.title],values:[e.value]});this.model.trigger("change:currentFilters",this.model,n);
},removeFilter:function(e){var t=this.model.get("currentFilters"),n=s.a.findWhere(t,{key:e.key});n&&(n.titles=s.a.reject(n.titles,function(t){return t===e.title}),n.values=s.a.reject(n.values,function(t){return t===e.value}),n.values.length||t.splice(s.a.indexOf(t,n),1)),this.model.trigger("change:currentFilters",this.model,t)},removeAllFilters:function(e){var t=this.model.get("currentFilters"),n=s.a.findWhere(t,{key:e});t.splice(s.a.indexOf(t,n),1),this.model.trigger("change:currentFilters",this.model,t);
},onRender:function(){var e="all"!==this.model.get("currentSubset").id,t=this.model.get("currentFilters");e&&(t.length=0);var n=new h.a({model:this.model,disabled:e}),i=new g.a({collection:this.model.get("sorts"),disabled:e});if(this.listenTo(n,"removeAllFilters",this.onRemoveAllFilters),this.listenToOnce(i,"collection:rendered",this.onSortListRender),this.currentFilters.show(n),this.sort.show(i),!e){var a=this.model.get("filters").populate({reset:!0,scope:"page"});a.done(s.a.bind(function(t){if(!this.isClosed){
var n=this.linearFilters?t.filterBySecondary():t,i=new p.a({collection:n,disabled:e});this.listenTo(i,"itemview:addFilter",this.onAddFilter),this.listenTo(i,"itemview:removeFilter",this.onRemoveFilter),this.listenTo(i,"itemview:showOptions",this.onFilterListShowOptions),this.filters.show(i)}},this))}t.length&&l.a.trigger("show:bar","filterbar",new d.a({model:this.model}))},onClose:function(){this.supportsQuickSearch||n.i(c.a)("appStore").dispatch(u.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),
type:void 0,placeholder:void 0})),l.a.trigger("hide:bar","sidebar"),l.a.trigger("hide:bar","filterbar")},onCurrentFiltersChange:function(e,t){var i=!!t.length;this.ui.newFilterBtn.toggleClass("hidden",this.linearFilters||!i),this.supportsQuickSearch||n.i(c.a)("appStore").dispatch(u.changeQuickSearchQuery({serverEntityID:this.model.server.entityID(),query:this.getSearchValue()})),i?l.a.trigger("show:bar","filterbar",new d.a({model:this.model})):l.a.trigger("hide:bar","filterbar")},onCurrentTypeChange:function(e,t){
this.$el.removeClass("show-filters show-filter-options"),this.removeAllFilters()},onSectionTitleChange:function(e,t){this.model.server.supports("quickSearch")||n.i(c.a)("appStore").dispatch(u.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),placeholder:t}))},onSearch:function(e){return e?void this.addFilter({key:"title",value:e,title:e},{replace:!0}):void this.removeAllFilters("title")},onAddFilter:function(e,t){this.addFilter(t)},onRemoveFilter:function(e,t){this.removeFilter(t);
},onRemoveAllFilters:function(e){this.removeAllFilters(e)},onFilterListShowOptions:function(e,t){var n=t.get("title");this.$el.addClass("show-filter-options"),this.$el.removeClass("show-filters"),this.ui.filterOptionsHeader.text(n);var i=new f.a({collection:t.get("options")});this.listenTo(i,"addFilter",this.onAddFilter),this.listenTo(i,"removeAllFilters",this.onRemoveAllFilters),this.listenTo(i,"itemview:addFilter",this.onAddFilter),this.listenTo(i,"itemview:removeFilter",this.onRemoveFilter),this.filterOptions.show(i);
},onSortListRender:function(e){this.ui.sortContainer.toggleClass("hidden",!e.collection.length);var t=e.collection.length;t||this.listenToOnce(e,"before:item:added",this.onSortListItemAdded)},onSortListItemAdded:function(e){this.ui.sortContainer.removeClass("hidden")},onNewFilterClick:function(e){e.preventDefault(),this.$el.addClass("show-filters")},onHideClick:function(e){e.preventDefault(),this.$el.hasClass("show-filter-options")?(this.$el.removeClass("show-filter-options"),this.$el.addClass("show-filters")):this.$el.removeClass("show-filters");
}});t.a=m},function(e,t,n){"use strict";var i=n(2900),a=n.n(i),r=n(10),s=n(1736),o=r.a.Layout.extend({className:"container",template:a.a,regions:{list:".announcements-container"},onRender:function(){this.list.show(new s.a({collection:this.collection}))}});t.a=o},function(e,t,n){"use strict";var i=n(2901),a=n.n(i),r=n(2),s=n.n(r),o=n(10),l=n(4),c=n(32),u=n(42),d=n(8),h=n(2619),p=n.n(h),f=n(2620),g=n.n(f),m=n(2621),v=n.n(m),y=o.a.ItemView.extend({className:"container queue-help-container",template:a.a,
ui:{queueEmail:".queue-email",plexitBtn:".btn-plexit"},events:{"focus .queue-email":"onQueueEmailFocus","mouseup .queue-email":"onQueueEmailMouseUp","click .btn-plexit":"onPlexitClick","mousedown .btn-plexit":"onPlexitMouseDown","mouseup .btn-plexit":"onPlexitMouseUp"},initialize:function(e){this.queueEmail=e.queueEmail,"ie"===c.a.id?(this.stepsImgSrc=p.a,this.modalText=n.i(l.default)('Right click the "Plex It!" button and choose Add to Favorites so you can save videos to Watch Later.'),this.firstStepText=n.i(l.default)("Add the button above to your favorites bar.")):(this.stepsImgSrc=g.a,
this.modalText=n.i(l.default)('Drag the "Plex it!" button to your Bookmarks Bar so you can save videos to your Watch Later.'),this.firstStepText=n.i(l.default)("Drag the button above to your bookmarks bar."));var t=["OSX","Windows","Linux"];if(s.a.indexOf(t,c.a.platform)!==-1){var i="OSX"===c.a.platform?n.i(l.default)("\u2318 C"):n.i(l.default)("Ctrl C");this.copyCommand=n.i(l.default)("{1} to copy",i)}},serializeData:function(){return{queueEmail:this.queueEmail,copyCommand:this.copyCommand,stepsImgSrc:this.stepsImgSrc,
emailImgSrc:v.a,firstStepText:this.firstStepText}},onRender:function(){this.copyCommand&&this.$el.tooltip({selector:".queue-email",placement:"top",trigger:"focus"})},onQueueEmailFocus:function(e){this.ui.queueEmail.selectText()},onQueueEmailMouseUp:function(e){return!1},onPlexitClick:function(e){e.preventDefault();var t=new u.a({title:n.i(l.default)("Plex It!"),message:this.modalText,confirmLabel:n.i(l.default)("OK"),hideCancel:!0});d.a.trigger("show:modal",t)},onPlexitMouseDown:function(){this.ui.plexitBtn.css("user-select","text");
},onPlexitMouseUp:function(){this.ui.plexitBtn.css("user-select","none")}});t.a=y},function(e,t,n){"use strict";var i=n(2902),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),c=n(10),u=n(14),d=n(4),h=n(8),p=n(1740),f=c.a.Layout.extend({className:"container",template:a.a,ui:{navLinks:".nav a",allBadge:".all-btn > .badge",unwatchedBadge:".unwatched-btn > .badge",watchedBadge:".watched-btn > .badge"},regions:{list:".user-playlist-container"},events:{"click .nav a":"onNavClick"},initialize:function(e){this.listModel=e.listModel,
this.collection=this.listModel.get("metadataItems"),this.initSubset(e),this.subsets={all:this.collection,unwatched:this.listModel.filterUnwatched(),watched:this.listModel.filterWatched()},this.listenTo(this.collection,{add:this.onCollectionChange,remove:this.onCollectionChange,"change:viewCount":this.onCollectionChange})},initSubset:function(e){var t=e.subset,i=this.listModel.get("key")+"!subset",a=n.i(u.a)("appModel").get("settings");t||(t=a.get(i)),t||(t="unwatched"),a.save(i,t),this.subset=t},
serializeData:function(){var e=this.listModel.get("key");return{label:this.listModel.get("label"),helpRoute:this.listModel.get("helpRoute"),defaultTarget:"_self",filters:[{title:n.i(d.default)("All"),key:e,subset:"all"},{title:n.i(d.default)("Unwatched"),key:e,subset:"unwatched"},{title:n.i(d.default)("Watched"),key:e,subset:"watched"}]}},updateBadges:function(){var e={all:this.subsets.all.length,unwatched:this.subsets.unwatched.length,watched:this.subsets.watched.length};s.a.each(s.a.keys(e),function(t){
var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t])},this)},onRender:function(){this.list.show(new p.a({collection:this.subsets[this.subset]})),this.ui.navLinks.filter('[href*="/'+this.subset+'"]').addClass("selected"),this.updateBadges()},onCollectionChange:function(){this.subsets.unwatched.set(this.listModel.filterUnwatched().models),this.subsets.watched.set(this.listModel.filterWatched().models),this.updateBadges()},onNavClick:function(e){e.preventDefault(),this.ui.navLinks.removeClass("selected"),
l()(e.currentTarget).addClass("selected"),this.initSubset({subset:s.a.last(e.currentTarget.href.split("/"))}),this.list.show(new p.a({collection:this.subsets[this.subset]})),h.a.trigger("navigate","userPlaylist",{key:this.listModel.get("key"),subset:this.subset,trigger:!1})}});t.a=f},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.name,i=e.width,a=e.height,s=o()(e,["className","name","width","height"]),l=n.toUpperCase().split(" "),u=l[0].charAt(0),h=l[l.length-1].charAt(0),f=l.length>1?""+u+h:n.charAt(0),g={
fontSize:Math.max(14,Math.min(Math.round(i/4),42)),lineHeight:a+"px"};return c.a.createElement("div",r()({style:g,className:d()(t,p.a.anagram)},s),f)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(28),d=n.n(u),h=n(2371),p=n.n(h);i.defaultProps={width:13,height:13},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=r()(e,["children"]);return o.a.createElement("div",n,t)}var a=n(17),r=n.n(a),s=n(1),o=n.n(s),l=n(2377),c=n.n(l);i.defaultProps={className:c.a.dragLayer},t.a=i;
},function(e,t,n){"use strict";var i=n(11),a=n.n(i),r=n(13),s=n.n(r),o=n(12),l=n.n(o),c=n(1),u=n.n(c),d=function(e){function t(){var n,i,r;a()(this,t);for(var o=arguments.length,l=Array(o),c=0;c<o;c++)l[c]=arguments[c];return n=i=s()(this,e.call.apply(e,[this].concat(l))),i.createRef=function(e){i._element=e},i.onFullscreenChange=function(){var e=!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement);i.props.onFullscreenChange(e);
},r=n,s()(i,r)}return l()(t,e),t.prototype.componentDidMount=function(){document.addEventListener("fullscreenchange",this.onFullscreenChange),document.addEventListener("webkitfullscreenchange",this.onFullscreenChange),document.addEventListener("mozfullscreenchange",this.onFullscreenChange),document.addEventListener("MSFullscreenChange",this.onFullscreenChange),this.props.isFullscreen?this.enterFullscreen():this.exitFullscreen()},t.prototype.componentWillReceiveProps=function(e){e.isFullscreen&&!this.props.isFullscreen?this.enterFullscreen():!e.isFullscreen&&this.props.isFullscreen&&this.exitFullscreen();
},t.prototype.componentWillUnmount=function(){document.removeEventListener("fullscreenchange",this.onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this.onFullscreenChange),document.removeEventListener("mozfullscreenchange",this.onFullscreenChange),document.removeEventListener("MSFullscreenChange",this.onFullscreenChange)},t.prototype.enterFullscreen=function(){var e=this._element;if(e){var t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;
t.call(e)}},t.prototype.exitFullscreen=function(){var e=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen;e.call(document)},t.prototype.render=function(){return u.a.createElement("div",{ref:this.createRef},this.props.children)},t}(c.Component);t.a=d},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(155)),p=n(218),f=n(166),g=n.n(f),m=n(2379),v=n.n(m),y=n.i(h.a)(g.a.overlaySpeed),b={
appear:v.a.enter,appearActive:v.a.enterActive,enter:v.a.enter,enterActive:v.a.enterActive,leave:v.a.leave,leaveActive:v.a.leaveActive},S=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a._noActivity=function(){a.setState({isOpen:!1})},a._seenActivity=function(){a.setState({isOpen:!0}),a._startTimer(a.props)},a.state={isOpen:!1},a}return u()(t,e),t.prototype.componentWillMount=function(){window.addEventListener("mousemove",this._seenActivity),window.addEventListener("mousedown",this._seenActivity),
window.addEventListener("keydown",this._seenActivity)},t.prototype.componentWillReceiveProps=function(e){e.idleTime!==this.props.idleTime&&this._startTimer(e)},t.prototype.componentWillUnmount=function(){window.removeEventListener("mousemove",this._seenActivity),window.removeEventListener("mousedown",this._seenActivity),window.removeEventListener("keydown",this._seenActivity),this._idleTimer=clearTimeout(this._idleTimer)},t.prototype._startTimer=function(e){this._idleTimer=clearTimeout(this._idleTimer),
e.idleTime&&(this._idleTimer=setTimeout(this._noActivity,e.idleTime))},t.prototype.render=function(){return a()(p.a,{isOpen:this.state.isOpen,transitionName:b,transitionAppearTimeout:y,transitionEnterTimeout:y,transitionLeaveTimeout:y},void 0,this.state.isOpen&&a()("div",{className:v.a.takeOver},void 0,a()("div",{className:v.a.contents},void 0,this.props.children)))},t}(d.Component);S.defaultProps={idleTime:2e3},t.a=S},function(e,t,n){"use strict";function i(e){var t=e.className,n=o()(e,["className"]);
return c.a.createElement(h.a,r()({name:"plex-icon-pp-badge-560",className:d()(f.a.plexPassIcon,t)},n))}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(28),d=n.n(u),h=n(30),p=n(2380),f=n.n(p);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return f()(x.a,{className:t,transitionName:L,transitionAppearTimeout:A,transitionEnterTimeout:A,transitionLeaveTimeout:A},void 0,n)}function a(){return f()(I.a,{name:"plex-icon-star-empty-560",className:E.a.star})}function r(){
return f()(I.a,{name:"plex-icon-star-full-560",className:E.a.star})}function s(){return f()(I.a,{name:"plex-icon-star-dot-560",className:E.a.dot})}var o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(3),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=(n.n(v),n(28)),b=n.n(y),S=n(4),w=n(25),M=n(155),I=n(30),C=n(358),D=n(166),T=n.n(D),x=n(218),P=n(2384),E=n.n(P),A=n.i(M.a)(T.a.starSpeed),L={appear:E.a.enter,appearActive:E.a.enterActive,enter:E.a.enter,enterActive:E.a.enterActive,leave:E.a.leave,leaveActive:E.a.leaveActive
},k=function(e){function t(n,i){l()(this,t);var a=u()(this,e.call(this,n,i));return a.onSliderChange=function(e){var t=e.positionValue,n=a.props.starCount,i=a._ratingFromPosition(t,n);a.setState({currentValue:i})},a.onSlideComplete=function(e){var t=e.positionValue,n=a.props.starCount,i=a._ratingFromPosition(t,n);a.props.onRatingChange(i)},a.state={currentValue:n.value},a}return h()(t,e),t.prototype.componentWillReceiveProps=function(e){this.setState({currentValue:e.value})},t.prototype.shouldComponentUpdate=function(e,t){
return n.i(w.a)(this,e,t)},t.prototype._ratingFromPosition=function(e,t){return e>0?Math.min(Math.floor(e)+1,t):0},t.prototype.render=function(){var e=this.props,t=e.starCount,o=e.className,l=this.state.currentValue,c=!this.state.currentValue,u=!this.props.onRatingChange;return f()("div",{className:b()(o,E.a.starRating,u&&E.a.isReadOnly,c&&E.a.isUnrated)},void 0,f()("div",{className:E.a.dots},void 0,m.a.range(t).map(function(e){return f()(s,{},e)})),f()(i,{className:b()(E.a.stars,E.a.emptyStars)},void 0,m.a.range(t-l).map(function(e){
return f()(a,{},e)})),f()(i,{className:E.a.stars},void 0,m.a.range(l).map(function(e){return f()(r,{},e)})),!u&&f()(C.a,{className:E.a.slider,trackClassName:E.a.track,label:n.i(S.default)("User Rating"),value:this.state.currentValue,min:0,max:t,stepSize:1,autoHideThumb:!0,onChange:this.onSliderChange,onDragComplete:this.onSlideComplete}))},t}(v.Component);k.defaultProps={starCount:5,value:0},t.a=k},function(e,t,n){"use strict";function i(e){var t=e.name,n=e.labelText,i=e.helpText,a=e.showErrors,s=e.errors,l=c()(e,["name","labelText","helpText","showErrors","errors"]),u=s[0];
return o()(p.a,{},void 0,o()(f.a,{hasError:a,name:t},void 0,n,a&&u&&" \u2014 "+u),d.a.createElement(m.a,r()({className:y.a.input,name:t,type:"number",hasError:a},l)),i&&o()(g.a,{},void 0,i))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(162),p=n(192),f=n(90),g=n(361),m=n(161),v=n(2397),y=n.n(v);t.a=n.i(h.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.labelText,n=e.name,i=e.value,a=e.showErrors,s=e.errors,l=c()(e,["labelText","name","value","showErrors","errors"]),u=""===i?null:b[p()(i).score],h=s[0];
return o()(m.a,{},void 0,o()(v.a,{hasError:a,name:n},void 0,t,u&&!a&&o()("span",{},void 0," \u2014 ",o()("span",{style:{color:u.color}},void 0,u.translateFn())),a&&" \u2014 "+h),d.a.createElement(y.a,r()({name:n,type:"password",value:i,hasError:a},l)))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(615),p=n.n(h),f=n(4),g=n(162),m=n(192),v=n(90),y=n(161),b={0:{color:"#ff5533",translateFn:function(){return n.i(f.default)("Too weak")}},1:{color:"#ee8833",translateFn:function(){
return n.i(f.default)("Very weak")}},2:{color:"#eebb00",translateFn:function(){return n.i(f.default)("Somewhat weak")}},3:{color:"#bbbb33",translateFn:function(){return n.i(f.default)("Somewhat Strong")}},4:{color:"#66bb55",translateFn:function(){return n.i(f.default)("Very Strong")}}};i.defaultProps={showErrors:!1},t.a=n.i(g.a)(i)},function(e,t,n){"use strict";function i(e){return o()("div",{className:h.a.avatar},void 0,c.a.createElement(u.a,r()({},e,{background:!0})))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(217),d=n(2400),h=n.n(d);
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=o()(e,["children","className"]);return c.a.createElement("div",r()({role:"menu",className:d()(n,p.a.menu)},i),t)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(28),d=n.n(u),h=n(2405),p=n.n(h);t.a=i},function(e,t,n){"use strict";var i=n(11),a=n.n(i),r=n(13),s=n.n(r),o=n(12),l=n.n(o),c=n(2),u=n.n(c),d=n(1),h=n.n(d),p=n(14),f=n(25),g=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments));
}return l()(t,e),t.prototype.componentDidMount=function(){n.i(p.a)("metrics").trackView(u.a.omit(this.props,"children"))},t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){return h.a.Children.only(this.props.children)},t}(d.Component);t.a=g},function(e,t,n){"use strict";function i(e){return o.a.createElement(c.a,e,u)}var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(41),c=n(823),u=r()(l.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.target,a=e.attachment,r=e.options,o=e.isOpen,c=(e.onMenuClose,
l()(e,["children","className","target","attachment","options","isOpen","onMenuClose"]));return s()(v.a,{className:M.a.tooltipPortal,target:i,options:r||T[a],isOpen:o,closeTimeout:I},void 0,s()(m.a,{isOpen:o,transitionName:C,transitionAppearTimeout:I,transitionEnterTimeout:I,transitionLeaveTimeout:I},void 0,o&&h.a.createElement("div",u()({className:f()(n,M.a.tooltip,M.a[a])},c),t)))}var a,r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(7),u=n.n(c),d=n(1),h=n.n(d),p=n(28),f=n.n(p),g=n(155),m=n(218),v=n(745),y=n(166),b=n.n(y),S=n(23),w=n(2420),M=n.n(w),I=n.i(g.a)(b.a.tooltipSpeed),C={
appear:M.a.enter,appearActive:M.a.enterActive,enter:M.a.enter,enterActive:M.a.enterActive,leave:M.a.leave,leaveActive:M.a.leaveActive},D={skipMoveElement:!0,constraints:[{to:"window",attachment:"together",pin:!0}]},T=(a={},a[S.e.TOP_LEFT]=u()({},D,{attachment:"bottom left",targetAttachment:"top left"}),a[S.e.TOP_CENTER]=u()({},D,{attachment:"bottom center",targetAttachment:"top center"}),a[S.e.TOP_RIGHT]=u()({},D,{attachment:"bottom right",targetAttachment:"top right"}),a[S.e.BOTTOM_LEFT]=u()({},D,{
attachment:"top left",targetAttachment:"bottom left"}),a[S.e.BOTTOM_CENTER]=u()({},D,{attachment:"top center",targetAttachment:"bottom center"}),a[S.e.BOTTOM_RIGHT]=u()({},D,{attachment:"top right",targetAttachment:"bottom right"}),a[S.e.MIDDLE_LEFT]=u()({},D,{attachment:"middle right",targetAttachment:"middle left"}),a[S.e.MIDDLE_RIGHT]=u()({},D,{attachment:"middle left",targetAttachment:"middle right"}),a);i.defaultProps={attachment:S.e.BOTTOM_CENTER},t.a=i},function(e,t,n){"use strict";var i=n(17),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=function(e){
function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=a()(e,["children"]);return h.a.createElement("div",n,t)},t}(d.Component);t.a=p},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(746),f=n(23),g=n(51),m=n(1866),v=n(828),y=n(2421),b=n.n(y),S={context:"settings"},w=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));
return a.onCreateDVRPress=function(){a.setState({isDVRSetupModalOpen:!0})},a.onModalClose=function(){a.setState({isDVRSetupModalOpen:!1})},a.state={isDVRSetupModalOpen:!1},a}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.isDvrsPending,r=e.hasDVRs,s=!i&&!r;return a()("div",{className:b.a.liveTVSettings},void 0,s&&a()("div",{className:b.a.info},void 0,a()(p.a,{text:"To get started recording TV, connect a tuner device to your network (here's a {1}list of supported devices{2}) and click below.",
args:['<a href="https://support.plex.tv/hc/en-us/articles/225877427-Supported-DVR-Devices-and-Antennas" target="_blank">',"</a>"]})),a()(m.a,{serverEntityID:t}),s&&a()(g.a,{kind:f.c.PRIMARY,size:f.d.LARGE,onPress:this.onCreateDVRPress},void 0,n.i(h.default)("DVR Setup")),a()(v.a,{serverEntityID:t,metricsProperties:S,isOpen:this.state.isDVRSetupModalOpen,onModalClose:this.onModalClose}))},t}(d.Component);t.a=w},function(e,t,n){"use strict";function i(){return n.i(p.createSelector)(function(e){return e.ui.liveTVSettingsPage;
},function(e){var t=e.isDvrsPending,n=e.dvrs;return{isPagePopulated:e.isPagePopulated,isDvrsPending:t,hasDVRs:!(!n||!n.length)}})}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(1),d=n.n(u),h=n(15),p=n(9),f=(n.n(p),n(35)),g=n(480),m=n(1857),v={initLiveTVSettingsPage:g.a,clearLiveTVSettingsPage:g.b},y=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.componentWillMount=function(){this._populate(this.props)},t.prototype.componentWillUnmount=function(){
this.props.clearLiveTVSettingsPage()},t.prototype._populate=function(e){n.i(f.a)(function(){e.initLiveTVSettingsPage({serverEntityID:e.serverEntityID})})},t.prototype.render=function(){return this.props.isPagePopulated?d.a.createElement(m.a,this.props):null},t}(u.Component);t.a=n.i(h.b)(i,v)(y)},function(e,t,n){"use strict";function i(){return n.i(p.createSelector)(function(e){return e.primaryServer},function(e){return{serverEntityID:e}})}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(1),d=n.n(u),h=n(15),p=n(9),f=(n.n(p),
n(1858)),g=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.render=function(){return this.props.serverEntityID?d.a.createElement(f.a,this.props):null},t}(u.Component);t.a=n.i(h.b)(i)(g)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(30),f=n(23),g=n(342),m=n(108),v=n(26),y=n(1870),b=n(1862),S=n(503),w=n(825),M=n(2422),I=n.n(M),C={context:"settings"},D=a()(p.a,{name:"plex-icon-alert-560"
}),T=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onManageChannelsPress=function(){a.setState({isManageChannelsModalOpen:!0})},a.onManageChannelsModalClose=function(){a.setState({isManageChannelsModalOpen:!1})},a.onDeviceSettingsPress=function(){a.setState({isDeviceSettingsModalOpen:!0})},a.onDeviceSettingsModalClose=function(){a.setState({isDeviceSettingsModalOpen:!1})},a.state={isManageChannelsModalOpen:!1,isDeviceSettingsModalOpen:!1},a}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.dvrID,r=e.deviceID,s=e.model,o=e.uri,l=e.tunerCount,c=e.channelCount,u=e.activeRecordingCount,d=e.channelMappings,M=e.hasPrefs,T=e.status,x=e.canRemoveDevice,P=e.onRemoveDevicePress,E=T===g.a.DEAD,A=d.filter(function(e){return e.enabled}).length,L=void 0;return L=c?1===c?n.i(h.default)("1 channel"):n.i(h.default)("{channelCount} channels",{channelCount:c}):n.i(h.default)("No channels"),a()("div",{className:I.a.device},void 0,a()(S.a,{className:I.a.deviceImage,
model:s,size:f.d.SMALL}),a()("div",{className:I.a.details},void 0,a()("div",{},void 0,a()("span",{className:I.a.model},void 0,s),M&&a()(v.a,{kind:f.c.PRIMARY,onPress:this.onDeviceSettingsPress},void 0,a()(p.a,{className:I.a.deviceSettingsIcon,name:"plex-icon-settings-560","aria-label":n.i(h.default)("Device Settings")}))),a()(w.a,{className:I.a.uri,uri:o}),E&&a()("div",{className:I.a.deviceWarning},void 0,a()("div",{className:I.a.deviceWarningIconContainer},void 0,D),n.i(h.default)("Device not found. Ensure your device is powered on and connected to your network.")),!E&&a()("div",{
className:I.a.info},void 0,a()("div",{},void 0,1===l?n.i(h.default)("1 tuner"):n.i(h.default)("{tunerCount} tuners",{tunerCount:l}),!!u&&a()("span",{},void 0,a()(m.a,{className:I.a.separator}),n.i(h.default)("{activeRecordingCount} recording now",{activeRecordingCount:u}))),a()("div",{},void 0,L,a()(m.a,{className:I.a.separator}),a()(v.a,{kind:f.c.PRIMARY,onPress:this.onManageChannelsPress},void 0,n.i(h.default)("{enabledChannelsCount} enabled",{enabledChannelsCount:A}))))),x&&a()("div",{className:I.a.removeDeviceContainer
},void 0,a()(v.a,{className:I.a.removeDevice,onPress:P},void 0,a()(p.a,{name:"plex-icon-remove-560","aria-label":n.i(h.default)("Remove Device")}))),a()(y.a,{serverEntityID:t,dvrID:i,deviceID:r,metricsProperties:C,isOpen:this.state.isManageChannelsModalOpen,onModalClose:this.onManageChannelsModalClose}),a()(b.a,{serverEntityID:t,dvrID:i,deviceID:r,metricsProperties:C,isOpen:this.state.isDeviceSettingsModalOpen,onModalClose:this.onDeviceSettingsModalClose}))},t}(d.Component);t.a=T},function(e,t,n){
"use strict";function i(){return n.i(v.createSelector)(function(e,t){var n=t.tunerCount;return n},n.i(S.a)(),n.i(w.a)(),function(e,t,n){var i=p.a.filter(n,function(e){return e.type===b.a.GRABBER_GRAB&&parseInt(e.Context.deviceID,10)===t.key});return{hasPrefs:!(!t.prefs||!t.prefs.length),channelCount:t.channels.length,activeRecordingCount:i.length}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(2),p=n.n(h),f=n(1),g=n.n(f),m=n(15),v=n(9),y=(n.n(v),n(35)),b=n(107),S=n(280),w=n(184),M=n(77),I=n(1860),C={
fetchDeviceChannels:M.fetchDeviceChannels,removeDVRDevice:M.removeDVRDevice},D=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onRemoveDevicePress=function(){var e=i.props,t=e.serverEntityID,n=e.dvrID,a=e.deviceID;i.props.removeDVRDevice({serverEntityID:t,dvrID:n,deviceID:a})},a=n,c()(i,a)}return d()(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.props,i=t.serverEntityID,a=t.dvrID,r=t.deviceID;
n.i(y.a)(function(){e.props.fetchDeviceChannels({serverEntityID:i,dvrID:a,deviceID:r})})},t.prototype.render=function(){return g.a.createElement(I.a,r()({onRemoveDevicePress:this.onRemoveDevicePress},this.props))},t}(f.Component);t.a=n.i(m.b)(i,C)(D)},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.onModalClose,a=c()(e,["isOpen","metricsProperties","onModalClose"]);return o()(h.a,{isOpen:t,metricsPage:"dvrDeviceSettings",metricsProperties:n,onModalClose:i},void 0,d.a.createElement(p.a,r()({
onModalClose:i},a)))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(117),p=n(1864);t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(179),v=n(23),y=n(91),b=n(98),S=n(71),w=n(92),M=n(78),I=n(139),C=n(193),D=n(498),T=n(51),x=n(97),P=n(503),E=n(2424),A=n.n(E),L=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidUpdate=function(e,t){
var n=e.isSaving&&!this.props.isSaving&&null==this.props.saveError;n&&this.props.onModalClose()},t.prototype.render=function(){var e=this.props,t=e.model,i=e.uri,r=e.prefs,o=e.isSaving,l=e.saveError,c=e.onSubmit,u=e.onErrorDismiss,d=e.onModalClose;return s()(I.a,{className:A.a.form,onSubmit:c},void 0,s()(y.a,{onModalClose:d},void 0,s()(b.a,{},void 0,n.i(g.default)("Device Settings")),l&&s()(C.a,{errorMessage:n.i(m.a)(l,n.i(g.default)("There was a problem saving your changes. Please try again.")),
onErrorDismiss:u}),s()(S.a,{},void 0,s()("div",{className:A.a.container},void 0,s()(P.a,{className:A.a.deviceImage,model:t,size:v.d.SMALL}),s()("div",{className:A.a.info},void 0,s()("div",{className:A.a.model},void 0,t),s()("div",{},void 0,i),s()("div",{className:A.a.settings},void 0,r.map(function(e){var t=e.id;return f.a.createElement(D.a,a()({key:t},e))}))))),s()(w.a,{},void 0,s()(M.a,{},void 0,s()(T.a,{kind:v.c.DEFAULT,size:v.d.MEDIUM,onPress:d},void 0,n.i(g.default)("Cancel")),s()(x.a,{type:"submit",
isSpinning:o,kind:v.c.PRIMARY,size:v.d.MEDIUM},void 0,n.i(g.default)("Save"))))))},t}(p.Component);t.a=L},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(function(e,t){var n=t.dvrID;return n},n.i(v.a)(),function(e,t){var n=t.key,i=t.model,a=t.uri,r=t.prefs,s=t.isSaving,o=t.saveError;return{dvrID:e,deviceID:n,model:i,uri:a,prefs:r,isSaving:s,saveError:o}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(35)),v=n(280),y=n(77),b=n(1863),S=function(e){
function t(){var i,a,r;o()(this,t);for(var s=arguments.length,l=Array(s),u=0;u<s;u++)l[u]=arguments[u];return i=a=c()(this,e.call.apply(e,[this].concat(l))),a.onSubmit=function(e){var t=a.props,i=t.serverEntityID,r=t.dvrID,s=t.deviceID;n.i(m.a)(function(){a.props.saveDeviceSettings({serverEntityID:i,dvrID:r,deviceID:s,prefs:e})})},a.onErrorDismiss=function(){var e=a.props,t=e.dvrID,n=e.deviceID;a.props.clearDeviceSettingsSaveError({dvrID:t,deviceID:n})},a.onModalClose=function(){var e=a.props,t=e.dvrID,n=e.deviceID;
a.props.clearDeviceSettingsSaveError({dvrID:t,deviceID:n}),a.props.onModalClose()},r=i,c()(a,r)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(b.a,r()({},this.props,{onSubmit:this.onSubmit,onErrorDismiss:this.onErrorDismiss,onModalClose:this.onModalClose}))},t}(h.Component);t.a=n.i(f.b)(i,{saveDeviceSettings:y.saveDeviceSettings,clearDeviceSettingsSaveError:y.clearDeviceSettingsSaveError})(S)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.isDvrsPending,a=e.dvrsError,s=e.dvrs;
return a?r()("div",{},void 0,n.i(o.default)("Unable to load DVRs")):i?r()(l.a,{label:n.i(o.default)("Loading DVRs")}):r()("div",{},void 0,s.map(function(e){return r()(c.a,{dvrID:e.key,serverEntityID:t,lineupTitle:e.lineupTitle,devices:e.devices},e.key)}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(41),c=n(1868);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.ui.liveTVSettingsPage,n=t.isDvrsPending,i=t.dvrsError,a=t.dvrs;return{isDvrsPending:n,dvrsError:i,dvrs:a}}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(1),d=n.n(u),h=n(15),p=n(35),f=n(480),g=n(1865),m={
fetchDVRs:f.c},v=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.componentWillMount=function(){this._populate(this.props)},t.prototype._populate=function(e){n.i(p.a)(function(){e.fetchDVRs({serverEntityID:e.serverEntityID})})},t.prototype.render=function(){return d.a.createElement(g.a,this.props)},t}(u.Component);t.a=n.i(h.b)(i,m)(v)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),
n(4)),p=n(23),f=n(25),g=n(30),m=n(26),v=n(108),y=n(163),b=n(1861),S=n(828),w=n(1873),M=n(2425),I=n.n(M),C={context:"settings"},D=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onRemoveDVRPress=function(){a.setState({isRemoveDVRModalOpen:!0})},a.onRemoveDVRConfirm=function(){a.setState({isRemoveDVRModalOpen:!1}),a.props.onRemoveDVR()},a.onRemoveDVRCancel=function(){a.setState({isRemoveDVRModalOpen:!1})},a.onDVRSettingsPress=function(){a.setState({isDVRSettingsModalOpen:!0
})},a.onDVRSettingsModalClose=function(){a.setState({isDVRSettingsModalOpen:!1})},a.onAddDevicePress=function(){a.setState({isAddDeviceModalOpen:!0})},a.onModalClose=function(){a.setState({isAddDeviceModalOpen:!1})},a.state={isRemoveDVRModalOpen:!1,isDVRSettingsModalOpen:!1,isAddDeviceModalOpen:!1},a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.dvrID,r=e.lineupTitle,s=e.devices,o=e.epgDownloadActivity,l=e.onReloadGuidePress,c=this.state,u=c.isRemoveDVRModalOpen,d=c.isDVRSettingsModalOpen;
return a()("div",{className:I.a.dvr},void 0,a()("div",{className:I.a.header},void 0,a()("div",{className:I.a.name},void 0,n.i(h.default)("DVR"),a()(v.a,{className:I.a.separator}),r),a()(m.a,{className:I.a.deleteLink,kind:p.c.PRIMARY,onPress:this.onRemoveDVRPress},void 0,n.i(h.default)("Delete DVR"))),a()("div",{className:I.a.actions},void 0,a()("div",{},void 0,o?a()("div",{},void 0,a()(g.a,{className:I.a.actionIcon,name:"plex-icon-reload-560"}),o.title," (",o.progress,"%)",a()(v.a,{className:I.a.separator
}),o.subtitle):a()(m.a,{kind:p.c.PRIMARY,onPress:l},void 0,a()(g.a,{className:I.a.actionIcon,name:"plex-icon-reload-560"}),n.i(h.default)("Refresh Program Guide"))),a()("div",{},void 0,a()(m.a,{kind:p.c.PRIMARY,onPress:this.onDVRSettingsPress},void 0,a()(g.a,{className:I.a.actionIcon,name:"plex-icon-settings-560","aria-label":n.i(h.default)("DVR Settings")}),n.i(h.default)("DVR Settings")))),a()("div",{className:I.a.devices},void 0,s.map(function(e){return a()(b.a,{serverEntityID:t,dvrID:i,deviceID:e.key,
canRemoveDevice:s.length>1,model:e.model,uri:e.uri,channelMappings:e.channelMappings,tunerCount:e.tuners,status:e.status},e.key)})),a()(m.a,{kind:p.c.PRIMARY,onPress:this.onAddDevicePress},void 0,a()(g.a,{className:I.a.addDeviceIcon,name:"plex-icon-add-560"}),n.i(h.default)("Add Device")),a()(y.a,{isOpen:u,metricsPage:"confirmRemoveDVR",title:n.i(h.default)("Delete DVR"),message:n.i(h.default)("Deleting your DVR will remove the Program Guide, and all scheduled recordings will be suspended. Programming you've previously recorded will remain in your library."),
confirmLabel:n.i(h.default)("Delete"),kind:p.c.DANGER,onConfirm:this.onRemoveDVRConfirm,onCancel:this.onRemoveDVRCancel}),a()(w.a,{isOpen:d,serverEntityID:t,dvrID:i,metricsProperties:C,onModalClose:this.onDVRSettingsModalClose}),a()(S.a,{isOpen:this.state.isAddDeviceModalOpen,serverEntityID:t,dvrID:i,metricsProperties:C,onModalClose:this.onModalClose}))},t}(d.Component);t.a=D},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(15),f=n(9),g=(n.n(f),
n(780)),m=n(480),v=n(1867),y=n.i(f.createStructuredSelector)({epgDownloadActivity:n.i(g.a)()}),b={removeDVR:m.d,reloadGuide:m.e},S=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onRemoveDVR=function(){i.props.removeDVR({serverEntityID:i.props.serverEntityID,dvrID:i.props.dvrID})},i.onReloadGuidePress=function(){i.props.reloadGuide({serverEntityID:i.props.serverEntityID,dvrID:i.props.dvrID
})},a=n,l()(i,a)}return u()(t,e),t.prototype.render=function(){return h.a.createElement(v.a,a()({onRemoveDVR:this.onRemoveDVR,onReloadGuidePress:this.onReloadGuidePress},this.props))},t}(d.Component);t.a=n.i(p.b)(y,b)(S)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.dvrID,i=e.deviceID,a=e.metricsProperties,s=e.isOpen,c=e.onModalClose;return r()(o.a,{metricsPage:"dvrManageChannels",metricsProperties:a,isOpen:s,onModalClose:c},void 0,r()(l.a,{serverEntityID:t,dvrID:n,deviceID:i,
onModalClose:c}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(117)),l=n(1872);t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(m.a)(),n.i(v.a)(),function(e,t){return{dvrID:e.key,deviceID:t.key}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(348)),v=n(280),y=n(77),b=n(1869),S=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),
i.onModalClose=function(){i.props.clearDVRSetup({serverEntityID:i.props.serverEntityID}),i.props.onModalClose()},a=n,c()(i,a)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(b.a,r()({},this.props,{onModalClose:this.onModalClose}))},t}(h.Component);t.a=n.i(f.b)(i,{clearDVRSetup:y.clearDVRSetup})(S)},function(e,t,n){"use strict";function i(e){var t=e.channelMappings,i=e.lineupChannels,a=e.isChannelMappingsPending,s=e.isLineupChannelsPending,h=e.isDeviceChannelsPending,I=e.channelMappingsError,x=e.lineupChannelsError,A=e.deviceChannelsError,L=e.isChannelMappingsSaving,k=e.channelMappingsSaveError,N=e.formState,_=e.allChannelMappingsEnabled,O=e.allChannelMappingsDisabled,R=e.isCancellingChannelScan,j=e.channelScanActivity,z=e.onScanDeviceChannelsPress,U=e.onCancelScanDeviceChannelsPress,F=e.onAllChannelMappingsEnabledChange,B=e.onFormStateChange,V=e.onModalClose,H=e.onSubmit,W=e.onDismissSaveErrorPress,Q=j&&!R,Y=a||s||h,G=I||x||A,K=!Q&&Y,q=j?parseInt(j.Response.channels,10):0,Z=void 0;
return Z=1===q?n.i(o.default)("1 channel found."):q>1?n.i(o.default)("{1} channels found.",q):n.i(o.default)("No channels found."),G?r()(M.a,{message:n.i(o.default)("Unable to load channel mappings"),onModalClose:V}):r()(g.a,{className:P.a.form,formState:N,onChange:B,onSubmit:H},void 0,r()(v.a,{onModalClose:V},void 0,r()(y.a,{},void 0,n.i(o.default)("Manage Channels")),K&&r()(b.a,{},void 0,r()("div",{className:P.a.centeredContainer},void 0,E)),!K&&!!k&&r()("div",{},void 0,r()(m.a,{errorMessage:n.i(l.a)(k,n.i(o.default)("There was a problem saving your changes. Please try again.")),
onErrorDismiss:W})),!K&&r()(b.a,{className:j?void 0:P.a.manageChannelsBody,scrollDirection:j?c.a.VERTICAL:c.a.NONE},void 0,r()("div",{className:P.a.scanChannelsContainer},void 0,r()("div",{className:P.a.scanChannelsMessage},void 0,j?n.i(o.default)("Scanning channels. {1}",Z):n.i(o.default)('Click "Scan Channels" to refresh this list, or create a new DVR to use a different lineup.')),r()("div",{},void 0,r()(C.a,{isScanning:!!j,isCancelling:R,onScanDeviceChannelsPress:z,onCancelScanDeviceChannelsPress:U
}))),!!j&&r()("div",{className:P.a.progressContainer},void 0,r()(u.a,{size:90,progress:j.progress})),!j&&!!t.length&&r()(d.a,{className:P.a.scroller,autoScroll:!0},void 0,r()(D.a,{allChannelMappingsEnabled:_,allChannelMappingsDisabled:O,onAllChannelMappingsEnabledChange:F}),t.map(function(e){var t=e.deviceIdentifier,n=e.name,a=e.enabled,s=e.lineupIdentifier,o=e.drm,l=e.isChannelMissing;return r()(T.a,{name:t,initialValue:{enabled:a,lineupIdentifier:s},deviceIdentifier:t,channelName:n,drm:o,isChannelMissing:l,
lineupChannels:i},t)}))),r()(S.a,{},void 0,r()(w.a,{},void 0,r()(p.a,{kind:c.c.DEFAULT,size:c.d.MEDIUM,onPress:V},void 0,n.i(o.default)("Cancel")),r()(f.a,{type:"submit",kind:c.c.PRIMARY,size:c.d.MEDIUM,isDisabled:K||!!j,isSpinning:L},void 0,n.i(o.default)("Save"))))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(179),c=n(23),u=n(226),d=n(70),h=n(41),p=n(51),f=n(97),g=n(139),m=n(193),v=n(91),y=n(98),b=n(71),S=n(92),w=n(78),M=n(824),I=n(834),C=n(830),D=n(833),T=n(832),x=n(2426),P=n.n(x),E=r()(h.a,{});
t.a=n.i(I.a)(i)},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(v.a)(),n.i(y.a)(),n.i(b.a)(),n.i(S.a)(),w.a,M.a,function(e,t,n,i,a,r){var s=e.lineup,o=a.isChannelMappingsPending,l=a.isLineupChannelsPending,c=a.channelMappingsError,u=a.lineupChannelsError,d=a.isChannelMappingsSaving,h=a.channelMappingsSaveError;return{lineupUUID:e.lineup,lineupTitle:s,channelMappings:n,lineupChannels:r,isChannelMappingsPending:o,isLineupChannelsPending:l,isDeviceChannelsPending:t.isChannelsPending,
channelMappingsError:c,lineupChannelsError:u,isChannelMappingsSaving:d,channelMappingsSaveError:h,deviceChannelsError:t.channelsError,channelScanActivity:i}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(35)),v=n(348),y=n(280),b=n(778),S=n(779),w=n(96),M=n(781),I=n(77),C=n(1871),D=function(e){function t(i,a){o()(this,t);var r=c()(this,e.call(this,i,a));return r.onScanDeviceChannelsPress=function(){var e=r.props,t=e.serverEntityID,n=e.dvrID,i=e.deviceID;
r.props.scanDeviceChannels({serverEntityID:t,dvrID:n,deviceID:i})},r.onCancelScanDeviceChannelsPress=function(){var e=r.props,t=e.serverEntityID,n=e.dvrID,i=e.deviceID;r.setState({isCancellingChannelScan:!0}),r.props.cancelScanDeviceChannels({serverEntityID:t,dvrID:n,deviceID:i})},r.onSubmit=function(e){var t=r.props,i=t.serverEntityID,a=t.dvrID,s=t.deviceID;n.i(m.a)(function(){r.props.saveChannelMap({serverEntityID:i,dvrID:a,deviceID:s,data:e})})},r.onDismissSaveErrorPress=function(){n.i(m.a)(function(){
r.props.clearChannelMappingsSaveError()})},r.state={isCancellingChannelScan:!1},r}return d()(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.props,i=t.serverEntityID,a=t.dvrID,r=t.deviceID,s=t.lineupUUID,o=t.channelScanActivity;n.i(m.a)(function(){e.props.fetchLineupChannels({serverEntityID:i,lineupUUID:s}),e.props.fetchDeviceChannels({serverEntityID:i,dvrID:a,deviceID:r})}),o&&this.setState({isCancellingChannelScan:!0})},t.prototype.componentWillReceiveProps=function(e){var t=this;
!e.channelScanActivity&&this.props.channelScanActivity&&!function(){var e=t.props,i=e.serverEntityID,a=e.dvrID,r=e.deviceID;t.setState({isCancellingChannelScan:!1}),n.i(m.a)(function(){t.props.fetchDeviceChannels({serverEntityID:i,dvrID:a,deviceID:r})})}()},t.prototype.componentDidUpdate=function(e,t){var n=e.isChannelMappingsSaving&&!this.props.isChannelMappingsSaving&&null==this.props.channelMappingsSaveError;n&&this.props.onModalClose()},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.serverEntityID,n=e.dvrID,i=e.deviceID,a=e.channelScanActivity;
a&&!this.state.isCancellingChannelScan&&this.props.cancelScanDeviceChannels({serverEntityID:t,dvrID:n,deviceID:i})},t.prototype.render=function(){return p.a.createElement(C.a,r()({},this.props,{isCancellingChannelScan:this.state.isCancellingChannelScan,onScanDeviceChannelsPress:this.onScanDeviceChannelsPress,onCancelScanDeviceChannelsPress:this.onCancelScanDeviceChannelsPress,onSubmit:this.onSubmit,onDismissSaveErrorPress:this.onDismissSaveErrorPress}))},t}(h.Component);t.a=n.i(f.b)(i,I)(D)},function(e,t,n){
"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.onModalClose,a=c()(e,["isOpen","metricsProperties","onModalClose"]);return o()(h.a,{isOpen:t,metricsPage:"dvrSettings",metricsProperties:n,onModalClose:i},void 0,d.a.createElement(p.a,r()({onModalClose:i},a)))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(117),p=n(1875);t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(179),v=n(23),y=n(91),b=n(98),S=n(71),w=n(92),M=n(78),I=n(139),C=n(193),D=n(498),T=n(51),x=n(97),P=n(2427),E=n.n(P),A=function(e){
function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidUpdate=function(e,t){var n=e.isSaving&&!this.props.isSaving&&null==this.props.saveError;n&&this.props.onModalClose()},t.prototype.render=function(){var e=this.props,t=e.prefs,i=e.isSaving,r=e.saveError,o=e.onSubmit,l=e.onErrorDismiss,c=e.onModalClose;return s()(I.a,{className:E.a.form,onSubmit:o},void 0,s()(y.a,{onModalClose:c},void 0,s()(b.a,{},void 0,n.i(g.default)("DVR Settings")),r&&s()(C.a,{
errorMessage:n.i(m.a)(r,n.i(g.default)("There was a problem saving your changes. Please try again.")),onErrorDismiss:l}),s()(S.a,{},void 0,t.map(function(e){var t=e.id;return f.a.createElement(D.a,a()({key:t},e))})),s()(w.a,{},void 0,s()(M.a,{},void 0,s()(T.a,{kind:v.c.DEFAULT,size:v.d.MEDIUM,onPress:c},void 0,n.i(g.default)("Cancel")),s()(x.a,{type:"submit",isSpinning:i,kind:v.c.PRIMARY,size:v.d.MEDIUM},void 0,n.i(g.default)("Save"))))))},t}(p.Component);t.a=A},function(e,t,n){"use strict";function i(){
return n.i(g.createSelector)(n.i(v.a)(),function(e){var t=e.prefs,n=e.isSaving,i=e.saveError;return{prefs:t,isSaving:n,saveError:i}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(35)),v=n(348),y=n(77),b=n(1874),S=function(e){function t(){var i,a,r;o()(this,t);for(var s=arguments.length,l=Array(s),u=0;u<s;u++)l[u]=arguments[u];return i=a=c()(this,e.call.apply(e,[this].concat(l))),a.onSubmit=function(e){var t=a.props,i=t.serverEntityID,r=t.dvrID;
n.i(m.a)(function(){a.props.saveDVRSettings({serverEntityID:i,dvrID:r,prefs:e})})},a.onErrorDismiss=function(){a.props.clearDVRSettingsSaveError({dvrID:a.props.dvrID})},a.onModalClose=function(){a.props.clearDVRSettingsSaveError({dvrID:a.props.dvrID}),a.props.onModalClose()},r=i,c()(a,r)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(b.a,r()({},this.props,{onSubmit:this.onSubmit,onErrorDismiss:this.onErrorDismiss,onModalClose:this.onModalClose}))},t}(h.Component);t.a=n.i(f.b)(i,{
saveDVRSettings:y.saveDVRSettings,clearDVRSettingsSaveError:y.clearDVRSettingsSaveError})(S)},function(e,t,n){"use strict";function i(e){var t=e.machineIdentifier,i=e.isRefreshing;return i?r()(u.a,{icon:"plex-icon-shows-broadcast-560",title:n.i(o.default)("We're now building your Program Guide"),description:n.i(o.default)("Hang tight while we download all the data for what's on")}):r()(u.a,{icon:"plex-icon-shows-broadcast-560",title:n.i(o.default)("The Program Guide is empty"),description:n.i(o.default)("Please verify your channel mappings and refresh the Program Guide")
},void 0,r()(c.a,{to:"#!/settings/server/"+encodeURIComponent(t)+"/dvr",kind:l.c.PRIMARY},void 0,n.i(o.default)("Go to DVR Settings")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(23),c=n(26),u=n(164);t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(v.a,function(e){return{step:e.step}})}var a=n(17),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(344)),v=n(96),y=n(77),b=n(1888),S=n(1886),w=n(1884),M=n(1892),I=n(1882),C=n(1880),D={
clearDVRSetup:y.clearDVRSetup},T=function(e){function t(){return o()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentWillUnmount=function(){this.props.clearDVRSetup()},t.prototype.render=function(){var e=this.props,t=e.step,n=r()(e,["step"]);switch(t){case m.a.DEVICE:return p.a.createElement(I.a,n);case m.a.DEVICE_CHANNELS:return p.a.createElement(C.a,n);case m.a.EPG:return p.a.createElement(b.a,n);case m.a.EPG_MAPPING:return p.a.createElement(S.a,n);case m.a.CHANNEL_MAPPING:
return p.a.createElement(M.a,n);case m.a.EPG_DOWNLOAD:return p.a.createElement(w.a,n)}},t}(h.Component);t.a=n.i(f.b)(i,D)(T)},function(e,t,n){"use strict";function i(e){var t=e.identifier,n=e.name;return r()("div",{className:l.a.channel},void 0,r()("div",{className:l.a.channelIdentifier},void 0,t),r()("div",{},void 0,n))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2433)),l=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.dvrID,a=e.selectedDevice,s=e.setupErrorMessage,l=e.isChannelsPending,w=e.sourceOptions,T=e.channelScanActivity,E=e.isCancellingChannelScan,A=e.onScanDeviceChannelsPress,L=e.onCancelScanDeviceChannelsPress,k=e.onDeviceSourceChange,N=e.onModalClose,_=a.selectedSource||a.sources[0],O=T?parseInt(T.Response.channels,10):a.channels.length,R=!(O||T||l),j=!(!O||T||l),z=!a||!a.channels.length||!!T;
return o()(b.a,{errorMessage:s,onModalClose:N},void 0,o()(v.a,{className:x.a.deviceInfoBody,scrollDirection:h.a.NONE},void 0,o()("div",{className:x.a.channelInfo},void 0,R&&o()("div",{className:x.a.channelMessage},void 0,n.i(u.default)("Make sure your device is connected to your antenna or cable and click Scan Channels.")),j&&o()("div",{className:x.a.channelMessage},void 0,o()("div",{},void 0,n.i(u.default)("We found {1} channels. If these don't look right, you can scan again.",O))),!T&&l&&o()("div",{
className:x.a.channelMessage},void 0,n.i(u.default)("Fetching device channels")),T&&o()("div",{className:x.a.channelMessage},void 0,n.i(u.default)("Scanning for channels... This make take some time.")),o()("div",{},void 0,o()(D.a,{isScanning:!!T,isCancelling:E,kind:T||O||l?h.c.DEFAULT:h.c.PRIMARY,onScanDeviceChannelsPress:A,onCancelScanDeviceChannelsPress:L}))),o()("div",{className:x.a.channelDetails},void 0,o()("div",{className:x.a.deviceDetails},void 0,c.a.createElement(I.a,r()({serverEntityID:t,
deviceID:a.key,channelCount:O,includeChannelCount:!0},a)),o()(g.a,{className:x.a.channelScanSourceSelect,name:"deviceSource",value:_,values:w,onChange:k})),o()("div",{className:x.a.deviceChannelsContainer},void 0,o()(f.a,{className:j?x.a.deviceChannels:x.a.emptyChannels,autoScroll:!0},void 0,R&&o()("div",{className:x.a.emptyChannelsContent},void 0,o()("div",{className:x.a.emptyChannelsClockContainer},void 0,o()("div",{className:x.a.emptyChannelsClockBackground}),o()(d.a,{className:x.a.emptyChannelsClockTime,
name:"plex-icon-dvr-clock-hour-560"}),o()(d.a,{className:x.a.emptyChannelsClock,name:"plex-icon-dvr-clock-separator-560"}),o()(d.a,{className:x.a.emptyChannelsClockTime,name:"plex-icon-dvr-clock-minutes-560"})),o()("div",{className:x.a.emptyMessage},void 0,n.i(u.default)("Awaiting channel scan"))),j&&a.channels.map(function(e){return c.a.createElement(C.a,r()({key:e.identifier},e))}),T&&o()("div",{className:x.a.emptyChannelsContent},void 0,o()(m.a,{size:90,progress:T.progress}),o()("div",{className:x.a.emptyMessage
},void 0,n.i(u.default)("Scanning channels"))))))),o()(S.a,{},void 0,o()(y.a,{},void 0,o()(p.a,{kind:h.c.DEFAULT,size:h.d.MEDIUM,onPress:N},void 0,n.i(u.default)("Cancel"))),o()(y.a,{},void 0,P,o()(M.a,{dvrID:i,isDisabled:z}))))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(30),h=n(23),p=n(51),f=n(70),g=n(227),m=n(226),v=n(71),y=n(78),b=n(229),S=n(292),w=n(505),M=n(829),I=n(831),C=n(1878),D=n(830),T=n(2434),x=n.n(T),P=o()(w.a,{});t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(y.a,S.a,n.i(b.a)(),function(e,t,i){
var a=e.selectedDevice,r=a.sources.reduce(function(e,t){var i,a;switch(t){case"0":e.push((i={},i[t]=n.i(m.default)("Antenna"),i));break;case"1":e.push((a={},a[t]=n.i(m.default)("Cable"),a))}return e},[]);return{selectedDevice:a,setupErrorMessage:t,isChannelsPending:a.isChannelsPending,sourceOptions:r,channelScanActivity:i}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(4)),v=n(35),y=n(96),b=n(779),S=n(222),w=n(77),M=n(1879),I={fetchDeviceDetails:w.fetchDeviceDetails,
fetchDeviceChannels:w.fetchDeviceChannels,scanDeviceChannels:w.scanDeviceChannels,cancelScanDeviceChannels:w.cancelScanDeviceChannels,selectDeviceSource:w.selectDeviceSource},C=function(e){function t(n,i){o()(this,t);var a=c()(this,e.call(this,n,i));return a.onScanDeviceChannelsPress=function(){a.props.scanDeviceChannels({serverEntityID:a.props.serverEntityID})},a.onCancelScanDeviceChannelsPress=function(){var e=a.props,t=e.serverEntityID,n=e.selectedDevice;a.props.cancelScanDeviceChannels({serverEntityID:t,
deviceID:n.key})},a.onDeviceSourceChange=function(e){a.props.selectDeviceSource({serverEntityID:a.props.serverEntityID,source:e})},a.state={isCancellingChannelScan:!1},a}return d()(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.props,i=t.serverEntityID,a=t.selectedDevice,r=t.channelScanActivity,s=a.source>-1?a.source.toString():a.sources[0];n.i(v.a)(function(){e.props.fetchDeviceDetails({serverEntityID:i}),e.props.fetchDeviceChannels({serverEntityID:i}),e.props.selectDeviceSource({
serverEntityID:i,source:s})}),r&&this.setState({isCancellingChannelScan:!0})},t.prototype.componentWillReceiveProps=function(e){!e.channelScanActivity&&this.props.channelScanActivity&&this.setState({isCancellingChannelScan:!1})},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.serverEntityID,n=e.selectedDevice,i=e.channelScanActivity;i&&!this.state.isCancellingChannelScan&&this.props.cancelScanDeviceChannels({serverEntityID:t,deviceID:n.key})},t.prototype.render=function(){return p.a.createElement(M.a,r()({
isCancellingChannelScan:this.state.isCancellingChannelScan,onScanDeviceChannelsPress:this.onScanDeviceChannelsPress,onCancelScanDeviceChannelsPress:this.onCancelScanDeviceChannelsPress,onDeviceSourceChange:this.onDeviceSourceChange},this.props))},t}(h.Component);t.a=n.i(f.b)(i,I)(C)},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(28),v=n.n(m),y=n(23),b=n(357),S=n(41),w=n(70),M=n(26),I=n(51),C=n(97),D=n(192),T=n(90),x=n(161),P=n(71),E=n(78),A=n(229),L=n(292),k=n(829),N=n(831),_=n(2435),O=n.n(_),R=s()(S.a,{}),j=function(e){
function t(n,i){l()(this,t);var a=u()(this,e.call(this,n,i));return a.onShowDeviceAddressPress=function(){a.setState({showManualAddress:!a.state.showManualAddress})},a.onDeviceAddressChange=function(e){a.setState({manualDeviceAddress:e})},a.onAddDevicePress=function(){a.props.onAddDevicePress(a.state.manualDeviceAddress)},a.state={showManualAddress:!1,manualDeviceAddress:""},a}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.selectedDevice,i=e.setupErrorMessage,r=e.addDevicePending,o=e.devices,l=e.onSelectDevicePress,c=e.onModalClose,u=this.state,d=u.showManualAddress,h=u.manualDeviceAddress,p=o.length>0;
return s()(A.a,{errorMessage:i,onModalClose:c},void 0,s()(P.a,{},void 0,p&&s()("div",{className:O.a.message},void 0,s()("div",{},void 0,n.i(g.default)("We found hardware we recognize!"))),!p&&s()("div",{className:O.a.message},void 0,s()("div",{},void 0,n.i(g.default)("Looking for compatible devices on your network..."))),s()("div",{className:O.a.manualDeviceButtonContainer},void 0,s()(M.a,{kind:y.c.PRIMARY,onPress:this.onShowDeviceAddressPress},void 0,n.i(g.default)("Don't see your device? Enter its network address manually"),s()(b.a,{
className:v()(O.a.manualAddressArrow,d&&O.a.manualAddressArrowOpen),direction:d?y.f.UP:y.f.DOWN,kind:y.c.PRIMARY}))),s()("div",{className:O.a.manualDeviceContainer},void 0,d&&s()("div",{},void 0,s()(D.a,{},void 0,s()(T.a,{},void 0,n.i(g.default)("Device Address")),s()(x.a,{type:"text",name:"manualDeviceInput",className:O.a.manualDeviceInput,value:this.state.manualDeviceAddress,placeholder:n.i(g.default)("IP address or hostname"),onChange:this.onDeviceAddressChange}),s()(C.a,{className:O.a.addDeviceButton,
kind:y.c.PRIMARY,size:y.d.LARGE,isDisabled:!h,isSpinning:r,onPress:this.onAddDevicePress},void 0,n.i(g.default)("Connect"))))),!p&&s()("div",{className:O.a.spinnerContainer},void 0,R),p&&s()("div",{className:O.a.existingDevices},void 0,s()("div",{className:O.a.deviceCount},void 0,1===o.length?n.i(g.default)("1 device found"):n.i(g.default)("{1} devices found",o.length)),s()(w.a,{className:O.a.devices,scrollDirection:y.a.HORIZONTAL},void 0,o.map(function(e){var n=t&&t.key===e.key;return f.a.createElement(N.a,a()({
key:e.key,className:O.a.device,deviceID:e.key,isSelectable:!0,isSelected:n,includeUri:!0,onSelectDevicePress:l},e))})))),s()(L.a,{},void 0,s()(E.a,{},void 0,s()(I.a,{kind:y.c.DEFAULT,size:y.d.MEDIUM,onPress:c},void 0,n.i(g.default)("Cancel"))),s()(E.a,{},void 0,s()(k.a,{isDisabled:!t}))))},t}(p.Component);t.a=j},function(e,t,n){"use strict";function i(){return n.i(v.createSelector)(S.a,w.a,C,function(e,t,n){var i=e.selectedDevice,a=e.addDevicePending;return{selectedDevice:i,setupErrorMessage:t,addDevicePending:a,
devices:n}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(2),p=n.n(h),f=n(1),g=n.n(f),m=n(15),v=n(9),y=(n.n(v),n(35)),b=n(342),S=n(96),w=n(222),M=n(77),I=n(1881),C=n.i(v.createSelector)(function(e){return e.ui.liveTVSettingsPage.dvrSetup.devices},function(e){return p.a.filter(e,function(e){return!e.parentID&&e.status===b.a.ALIVE&&e.state===b.b.ENABLED})}),D={fetchDevices:M.fetchDevices,discoverDevices:M.discoverDevices,selectDevice:M.selectDevice,addDevice:M.addDevice
},T=function(e){function t(n){o()(this,t);var i=c()(this,e.call(this,n));return i._discoverDevices=function(){i.props.discoverDevices({serverEntityID:i.props.serverEntityID}),i._discoverTimeoutID=setTimeout(i._discoverDevices,i.discoverDelay)},i.onSelectDevicePress=function(e){i.props.selectDevice({serverEntityID:i.props.serverEntityID,deviceID:e})},i.onAddDevicePress=function(e){i.props.addDevice({serverEntityID:i.props.serverEntityID,uri:e})},i._discoverTimeoutID=null,i.discoverDelay=2e3,i}return d()(t,e),
t.prototype.componentWillMount=function(){this._populate(this.props)},t.prototype.componentDidMount=function(){this._discoverTimeoutID=setTimeout(this._discoverDevices,this.discoverDelay)},t.prototype.componentWillUnmount=function(){this._discoverTimeoutID&&clearTimeout(this._discoverTimeoutID)},t.prototype._populate=function(e){n.i(y.a)(function(){e.fetchDevices({serverEntityID:e.serverEntityID})})},t.prototype.render=function(){return g.a.createElement(I.a,r()({onSelectDevicePress:this.onSelectDevicePress,
onAddDevicePress:this.onAddDevicePress},this.props))},t}(f.Component);t.a=n.i(m.b)(i,D)(T)},function(e,t,n){"use strict";function i(e){var t=e.setupErrorMessage,i=e.machineIdentifier,a=e.epgProviderIdentifier,s=e.epgDownloadActivityID,g=e.progress,v=e.message,y=e.onModalClose,b=encodeURIComponent(i),S=encodeURIComponent(a);return r()(p.a,{errorMessage:t,onModalClose:y},void 0,r()(d.a,{},void 0,r()("div",{className:m.a.message},void 0,r()("div",{},void 0,n.i(o.default)("Setup complete!")),r()("div",{},void 0,n.i(o.default)("You can now find your Program Guide and Recording Schedule in the sidebar under \"Manage\". While we're grabbing the guide data, you can start browsing; it will update automatically as we download what's on."))),s&&r()("div",{},void 0,r()("div",{
className:m.a.spinnerContainer},void 0,r()(c.a,{size:90,progress:g}),r()("div",{className:m.a.spinnerMessage},void 0,v)))),r()(h.a,{},void 0,r()(f.a,{},void 0,r()(u.a,{kind:l.c.DEFAULT,size:l.d.MEDIUM,onPress:y},void 0,n.i(o.default)("Close")),r()(u.a,{kind:l.c.PRIMARY,size:l.d.MEDIUM,to:"#!/server/"+b+"/provider/"+S,isDisabled:!a},void 0,n.i(o.default)("View Program Guide")))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(23),c=n(226),u=n(51),d=n(71),h=n(92),p=n(229),f=n(78),g=n(2436),m=n.n(g);
i.defaultProps={progress:0,message:""},t.a=i},function(e,t,n){"use strict";function i(){return n.i(c.createSelector)(function(e,t){var n=t.serverEntityID;return n},n.i(p.a)(),f.a,function(e,t,i){var a=i.selectedDVR;if(a&&t){var r=a.epgIdentifier,s=n.i(d.a)(u.e,r,e);return t.indexOf(s)>-1?r:void 0}})}function a(){return n.i(c.createSelector)(f.a,g.a,n.i(h.a)(),n.i(m.a)(),i(),function(e,t,n,i,a){var r=i||{},s=r.progress,o=r.subtitle;return{setupErrorMessage:t,machineIdentifier:n.machineIdentifier,epgProviderIdentifier:a,
epgDownloadActivityID:e.epgDownloadActivityID,progress:s,message:o}})}function r(e){return o.a.createElement(v.a,e)}var s=n(1),o=n.n(s),l=n(15),c=n(9),u=(n.n(c),n(67)),d=n(65),h=n(63),p=n(671),f=n(96),g=n(222),m=n(780),v=n(1883);t.a=n.i(l.b)(a)(r)},function(e,t,n){"use strict";function i(e){var t=e.setupErrorMessage,i=e.progress,a=e.onModalClose;return r()(p.a,{errorMessage:t,onModalClose:a},void 0,r()(d.a,{},void 0,r()("div",{className:m.a.message},void 0,r()("div",{},void 0,n.i(o.default)("We're finding the best program guide for your channels and location.")),r()("div",{},void 0,n.i(o.default)("This should only take a few moments."))),r()("div",{
className:m.a.spinnerContainer},void 0,r()(c.a,{size:90,progress:i}))),r()(f.a,{},void 0,r()(h.a,{},void 0,r()(u.a,{kind:l.c.DEFAULT,size:l.d.MEDIUM,onPress:a},void 0,n.i(o.default)("Cancel")))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(23),c=n(226),u=n(51),d=n(71),h=n(78),p=n(229),f=n(292),g=n(2437),m=n.n(g);i.defaultProps={progress:0},t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(v.a,y.a,n.i(b.a)(),function(e,t,n){var i=d.a.find(n,{uuid:e.epgLineupActivityID
}),a=i||{},r=a.progress;return{setupErrorMessage:t,progress:r}})}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(2),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(35)),v=n(96),y=n(222),b=n(184),S=n(77),w=n(1885),M={findBestEPGLineup:S.findBestEPGLineup},I=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.componentWillMount=function(){this._populate(this.props)},t.prototype._populate=function(e){n.i(m.a)(function(){e.findBestEPGLineup({
serverEntityID:e.serverEntityID})})},t.prototype.render=function(){return p.a.createElement(w.a,this.props)},t}(h.Component);t.a=n.i(f.b)(i,M)(I)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(23),f=n(41),g=n(26),m=n(51),v=n(139),y=n(192),b=n(90),S=n(227),w=n(161),M=n(71),I=n(78),C=n(229),D=n(292),T=n(505),x=n(1890),P=n(2438),E=n.n(P),A=a()(T.a,{}),L=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));
return r.onShowXMLTVEntryPress=function(){r.setState({showXMLTVEntry:!r.state.showXMLTVEntry})},r.onCountrySelect=function(e){r.props.onCountrySelect(e),r.setState({postalCode:""})},r.onLanguageSelect=function(e){r.props.onLanguageSelect(e)},r.onRegionSelect=function(e){r.props.onRegionSelect(e)},r.onXMLTVPathChange=function(e){r.setState({xmlTVPath:e},function(){r.props.onXMLTVProgramGuideChange(e,r.state.programGuideTitle)})},r.onProgramGuideTitleChange=function(e){r.setState({programGuideTitle:e
},function(){r.props.onXMLTVProgramGuideChange(r.state.xmlTVPath,e)})},r.state={showXMLTVEntry:!1,xmlTVPath:"",programGuideTitle:n.i(h.default)("My Program Guide")},r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.platform,r=e.setupErrorMessage,s=e.isFetching,o=e.selectedCountryCode,l=e.selectedLanguageCode,c=e.selectedRegionCode,u=e.countryOptions,d=e.languageOptions,T=e.regionOptions,P=e.countriesPopulated,L=e.languagesPopulated,k=e.regionsPopulated,N=e.canContinue,_=e.postalCodeExample,O=e.onSubmit,R=e.onModalClose,j=this.state,z=j.showXMLTVEntry,U=j.xmlTVPath,F=j.programGuideTitle,B=!(!P||!L),V=!(!L||!_),H=!(!L||!k),W=[{
"":n.i(h.default)("Select Country")}].concat(u),Q=[{"":n.i(h.default)("Select Language")}].concat(d),Y=[{"":n.i(h.default)("Select Region")}].concat(T),G="Windows"===i?"C:\\path\\to\\your\\xmltv_file.xml":"/path/to/your/xmltv_file.xml";return a()(v.a,{className:E.a.form,onSubmit:O},void 0,a()(C.a,{errorMessage:r,onModalClose:R},void 0,a()(M.a,{},void 0,a()("div",{className:E.a.message},void 0,a()("div",{},void 0,n.i(h.default)("To download an electronic program guide we need to know your location.")),a()(g.a,{
kind:p.c.PRIMARY,onPress:this.onShowXMLTVEntryPress},void 0,z?n.i(h.default)("Don't use XMLTV? Click here to select your location instead."):n.i(h.default)("Have an XMLTV program guide on your server? Click here to use that instead."))),z&&a()("div",{},void 0,L&&a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("Language")),a()(S.a,{name:"languageSelect",values:Q,value:l,onChange:this.onLanguageSelect})),a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("XMLTV Program Guide")),a()(w.a,{name:"xmltvPath",
placeholder:G,value:U,onChange:this.onXMLTVPathChange})),a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("Program Guide Title")),a()(w.a,{name:"programGuideTitle",value:F,onChange:this.onProgramGuideTitleChange}))),!z&&a()("div",{},void 0,P&&a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("Country")),a()(S.a,{name:"countrySelect",values:W,value:o,onChange:this.onCountrySelect})),B&&a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("Language")),a()(S.a,{name:"languageSelect",values:Q,value:l,
onChange:this.onLanguageSelect})),V&&a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("Postal Code")),a()(x.a,{serverEntityID:t,postalCodeExample:_}),s&&a()(f.a,{className:E.a.postalCodeFetchingSpinner})),H&&a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("Region")),a()(S.a,{name:"regionSelect",values:Y,value:c,onChange:this.onRegionSelect})))),a()(D.a,{},void 0,a()(I.a,{},void 0,a()(m.a,{kind:p.c.DEFAULT,size:p.d.MEDIUM,onPress:R},void 0,n.i(h.default)("Cancel"))),a()(I.a,{},void 0,A,a()(m.a,{
type:"submit",kind:p.c.PRIMARY,size:p.d.MEDIUM,isDisabled:!N||s},void 0,n.i(h.default)("Continue"))))))},t}(d.Component);t.a=L},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(v.a)(),y.a,b.a,function(e,t,n){var i=t.selectedLineupUUID,a=t.epgSettings,r=a.isFetching,s=a.selectedCountry,o=a.selectedLanguage,l=a.selectedRegion,c=a.countries,u=a.languages,d=a.regions,h=a.lineupGroup,p=e.countryCode,f=e.platform,g=s&&1===s.flavor?s.example:null,m=s?s.code:"",v=o?o.code:"",y=l?l.key:"",b=c.length>0,S=u.length>0,w=d.length>0,M=c.reduce(function(e,t){
var n;return e.push((n={},n[t.code]=t.title,n)),e},[]),I=u.reduce(function(e,t){var n;return e.push((n={},n[t.code]=t.title,n)),e},[]),C=d.reduce(function(e,t){var n;return e.push((n={},n[t.key]=t.title,n)),e},[]);return{countryCode:p,platform:f,setupErrorMessage:n,selectedLineupUUID:i,selectedCountryCode:m,selectedLanguageCode:v,selectedRegionCode:y,countriesPopulated:b,languagesPopulated:S,regionsPopulated:w,countryOptions:M,languageOptions:I,regionOptions:C,isFetching:r,postalCodeExample:g,canContinue:!(!h.lineups.length&&!i||!v)
}})}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(7),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(35)),v=n(63),y=n(96),b=n(222),S=n(1887),w=n(77),M=n(477),I=d()({dvrSetupNextStep:w.dvrSetupNextStep,selectEPGLineup:w.selectEPGLineup},M),C=function(e){function t(){var n,i,a;r()(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=o()(this,e.call.apply(e,[this].concat(l))),i.onCountrySelect=function(e){i.props.selectEPGCountry({serverEntityID:i.props.serverEntityID,
countryCode:e})},i.onLanguageSelect=function(e){i.props.selectEPGLanguage({serverEntityID:i.props.serverEntityID,languageCode:e})},i.onRegionSelect=function(e){i.props.selectEPGRegion({serverEntityID:i.props.serverEntityID,regionKey:e})},i.onSubmit=function(){i.props.dvrSetupNextStep()},i.onXMLTVProgramGuideChange=function(e,t){if(!e||!t)return void i.props.selectEPGLineup({lineupUUID:null});e=/^[a-z]\:\\|\\\\/i.test(e)?e.replace(/\\/g,"/"):e,e=0===e.indexOf("/")?e.substring(1):e;var n="lineup://tv.plex.providers.epg.xmltv/"+e+"#"+encodeURI(t);
i.props.selectEPGLineup({lineupUUID:n})},a=n,o()(i,a)}return c()(t,e),t.prototype.componentWillMount=function(){this._populate(this.props)},t.prototype._populate=function(e){n.i(m.a)(function(){var t=e.serverEntityID;e.resetEPGSettings({serverEntityID:t}),e.fetchEPGCountries({serverEntityID:t}),e.fetchEPGLanguages({serverEntityID:t}),e.selectEPGLineup({lineupUUID:null})})},t.prototype.render=function(){return p.a.createElement(S.a,d()({onCountrySelect:this.onCountrySelect,onLanguageSelect:this.onLanguageSelect,
onRegionSelect:this.onRegionSelect,onPostalCodeChange:this.onPostalCodeChange,onXMLTVProgramGuideChange:this.onXMLTVProgramGuideChange,onSubmit:this.onSubmit},this.props))},t}(h.Component);t.a=n.i(f.b)(i,I)(C)},function(e,t,n){"use strict";var i=n(11),a=n.n(i),r=n(13),s=n.n(r),o=n(12),l=n.n(o),c=n(1),u=n.n(c),d=n(46),h=n.n(d),p=n(161),f=function(e){function t(n,i){a()(this,t);var r=s()(this,e.call(this,n,i));return r.onPostalCodeChange=function(e){r.setState({postalCode:e},function(){r.props.onPostalCodeChange(e);
})},r.state={postalCode:""},r}return l()(t,e),t.prototype.componentWillReceiveProps=function(e){this.state.postalCode!==e.postalCode&&this.setState({postalCode:e.postalCode})},t.prototype.focusInput=function(e){e&&h.a.findDOMNode(e).focus()},t.prototype.render=function(){var e=this.props.postalCodeExample,t=this.state.postalCode;return u.a.createElement(p.a,{ref:this.focusInput,name:"postalCodeInput",placeholder:"e.g. "+e,value:t,onChange:this.onPostalCodeChange})},t}(c.Component);t.a=f},function(e,t,n){
"use strict";function i(e){return{postalCode:e.ui.liveTVSettingsPage.dvrSetup.epgSettings.postalCode}}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(35),m=n(477),v=n(1889),y=function(e){function t(i,a){o()(this,t);var r=c()(this,e.call(this,i,a));return r._fetchEPGLineups=function(){r.props.fetchEPGLineups({serverEntityID:r.props.serverEntityID})},r.onPostalCodeChange=function(e){r._postalCodeTimeoutID&&clearTimeout(r._postalCodeTimeoutID),n.i(g.a)(function(){
r.props.setEPGPostalCode({serverEntityID:r.props.serverEntityID,postalCode:e}),""!==e.trim()&&(r._postalCodeTimeoutID=setTimeout(r._fetchEPGLineups,200))})},r._postalCodeTimeoutID=null,r}return d()(t,e),t.prototype.componentWillUnmount=function(){this._postalCodeTimeoutID&&clearTimeout(this._postalCodeTimeoutID)},t.prototype.render=function(){return p.a.createElement(v.a,r()({onPostalCodeChange:this.onPostalCodeChange},this.props))},t}(h.Component);t.a=n.i(f.b)(i,m)(y)},function(e,t,n){"use strict";
var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(23),f=n(70),g=n(41),m=n(51),v=n(97),y=n(227),b=n(139),S=n(71),w=n(78),M=n(229),I=n(292),C=n(505),D=n(834),T=n(833),x=n(832),P=n(2440),E=n.n(P),A=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onLineupsMenuButtonPress=function(){a.setState({isLineupsMenuOpen:!a.state.isLineupMenuOpen})},a.onLineupsMenuClose=function(){a.setState({isLineupsMenuOpen:!1})},a.state={isLineupsMenuOpen:!1
},a}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.dvrID,i=e.setupErrorMessage,r=e.selectedLineupUUID,s=e.availableLineups,o=e.lineupChannels,l=e.channelMappings,c=e.isChannelMappingsPending,u=e.isLineupChannelsPending,d=e.isSavingDVR,D=e.channelMappingsErrorMessage,P=e.formState,A=e.allChannelMappingsEnabled,L=e.allChannelMappingsDisabled,k=e.onAllChannelMappingsEnabledChange,N=e.onFormStateChange,_=e.onLineupSelect,O=e.onModalClose,R=e.onSubmit,j=c||u,z=!!s.length,U=[{"":n.i(h.default)("Select Program Guide")
}].concat(s),F=r?decodeURIComponent(r.match(/#(.+?)$/)[1]):void 0;return a()(b.a,{className:E.a.form,formState:P,onChange:N,onSubmit:R},void 0,a()(M.a,{errorMessage:i,onModalClose:O},void 0,D&&a()(S.a,{className:E.a.channelMappingsBody,scrollDirection:p.a.NONE},void 0,a()("div",{className:E.a.centeredContainer},void 0,D)),!D&&a()(S.a,{className:E.a.channelMappingsBody,scrollDirection:p.a.NONE},void 0,z&&a()("div",{},void 0,a()("div",{className:E.a.programGuideLabel},void 0,n.i(h.default)("Program Guide")),a()("div",{
className:E.a.programGuideSelectContainer},void 0,a()(y.a,{name:"programGuide",values:U,value:r,onChange:_}))),!z&&a()("div",{className:E.a.programGuideTitle},void 0,F),j&&a()("div",{className:E.a.centeredContainer},void 0,a()(g.a,{label:n.i(h.default)("Loading channel mappings")})),!j&&r&&a()(f.a,{className:E.a.scroller,autoScroll:!0},void 0,a()(T.a,{allChannelMappingsEnabled:A,allChannelMappingsDisabled:L,onAllChannelMappingsEnabledChange:k}),l.map(function(e){var t=e.deviceIdentifier,n=e.name,i=e.enabled,r=e.lineupIdentifier,s=e.drm,l=e.isChannelMissing;
return a()(x.a,{name:t,initialValue:{enabled:i,lineupIdentifier:r},deviceIdentifier:t,channelName:n,drm:s,isChannelMissing:l,lineupChannels:o},t)}))),a()(I.a,{},void 0,a()(w.a,{},void 0,a()(m.a,{kind:p.c.DEFAULT,size:p.d.MEDIUM,onPress:O},void 0,n.i(h.default)("Cancel"))),a()(w.a,{},void 0,a()(C.a,{dvrID:t}),a()(v.a,{type:"submit",kind:p.c.PRIMARY,size:p.d.MEDIUM,isSpinning:d},void 0,n.i(h.default)("Continue"))))))},t}(d.Component);t.a=n.i(D.a)(A)},function(e,t,n){"use strict";function i(e,t){if(e){
var i=w.a.parseXML(e.responseText);if(i.message)return i.message}else{if(!t)return;var a=w.a.parseXML(t.responseText);if(a.message)return a.message}return n.i(b.default)("Unable to load channel mappings")}function a(){return n.i(y.createSelector)(M.a,I.a,C.a,n.i(D.a)(),function(e,t,n,a){var r=e.selectedDevice,s=e.selectedLineupUUID,o=e.isChannelMappingsPending,l=e.isLineupChannelsPending,c=e.channelMappingsError,u=e.lineupChannelsError,d=e.isSavingDVR,h=f.a.reduce(e.epgSettings.lineupGroup.lineups,function(e,t){
var n;return e.push((n={},n[t.uuid]=t.title,n)),e},[]);return{setupErrorMessage:t,selectedDevice:r,selectedLineupUUID:s,availableLineups:h,lineupChannels:n,channelMappings:a,isChannelMappingsPending:o,isLineupChannelsPending:l,isSavingDVR:d,channelMappingsErrorMessage:i(c,u)}})}var r=n(7),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(2),f=n.n(p),g=n(1),m=n.n(g),v=n(15),y=n(9),b=(n.n(y),n(4)),S=n(35),w=n(38),M=n(96),I=n(222),C=n(781),D=n(778),T=n(77),x=n(1891),P={fetchLineupChannels:T.fetchLineupChannels,
fetchChannelMap:T.fetchChannelMap,selectEPGLineup:T.selectEPGLineup,clearChannelMapError:T.clearChannelMapError,saveDVR:T.saveDVR,addDVRDevice:T.addDVRDevice},E=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onLineupSelect=function(e){var t=i.props,n=t.serverEntityID,a=t.selectedDevice;i.props.selectEPGLineup({serverEntityID:n,lineupUUID:e}),i.props.fetchLineupChannels({serverEntityID:n,
lineupUUID:e}),i.props.fetchChannelMap({serverEntityID:n,deviceUUID:a.uuid,lineupUUID:e,forceEnabled:!0})},i.onAddDeviceSubmit=function(e){var t=i.props,n=t.serverEntityID,a=t.dvrID,r=t.selectedDevice;i.props.addDVRDevice({serverEntityID:n,dvrID:a,deviceID:r.key,data:e})},i.onSaveDVRSubmit=function(e){var t=i.props,n=t.serverEntityID,a=t.selectedDevice;i.props.saveDVR({serverEntityID:n,deviceID:a.key,data:e})},a=n,u()(i,a)}return h()(t,e),t.prototype.componentWillMount=function(){this._populate(this.props);
},t.prototype.componentWillUnmount=function(){this.props.clearChannelMapError()},t.prototype._populate=function(e){var t=e.serverEntityID,i=e.selectedDevice.uuid,a=e.selectedLineupUUID;a&&n.i(S.a)(function(){e.fetchLineupChannels({serverEntityID:t,lineupUUID:a}),e.fetchChannelMap({serverEntityID:t,deviceUUID:i,lineupUUID:a,forceEnabled:!0})})},t.prototype.render=function(){var e=this.props.dvrID;return m.a.createElement(x.a,s()({onLineupSelect:this.onLineupSelect,onSubmit:e?this.onAddDeviceSubmit:this.onSaveDVRSubmit
},this.props))},t}(g.Component);t.a=n.i(v.b)(a,P)(E)},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(n.i(p.a)(),n.i(f.a)(),n.i(g.a)(),function(e,t,n){var i=l.a.pick(n,"hubIdentifier","title","type","size","more","random");return s()({machineIdentifier:e.machineIdentifier,providerIdentifier:t.identifier},i,{metadataListEntityID:n.metadataList,containerKey:n.key})})}function a(e){var t=e.title,i=e.hubIdentifier,a=e.type,r=e.containerKey,o=e.machineIdentifier,l=e.providerIdentifier,c=i.indexOf("music.video")!==-1?"musicVideo":a,d="home.continue"===i?v.b:v.c,h=void 0;
return r&&d!==v.b&&(h=n.i(m.a)(o,l,{key:r,title:t,type:c})),u.a.createElement(y.a,s()({listType:c,listContext:d,hubLink:h,component:b.a},e))}var r=n(7),s=n.n(r),o=n(2),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(9),p=(n.n(h),n(63)),f=n(103),g=n(667),m=n(896),v=n(48),y=n(364),b=n(1894);t.a=n.i(d.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.metadataItemEntityIDs,l=e.containerKey,g=e.listType,m=e.listContext,v=e.columnAdjustment,y=e.populatedRange,b=o()(e,["serverEntityID","providerEntityID","metadataListEntityID","metadataItemEntityIDs","containerKey","listType","listContext","columnAdjustment","populatedRange"]),S=n.i(u.a)(g,m,{
providerEntityID:i});return c.a.createElement(p.a,r()({},b,{containerKey:l,listType:g,listContext:m,keyPropName:"metadataItemEntityID",items:s,itemsOffset:y.start,layout:n.i(d.a)(g,m,v,S.length),cellRenderer:n.i(h.a)({serverEntityID:t,providerEntityID:i,metadataListEntityID:a,containerKey:l,listType:g,listContext:m,titleComponents:S},f.a)}))}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=(n(472),n(48),n(300)),d=n(546),h=n(376),p=n(506),f=n(507);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,i=e.serverEntityID,a=e.providerEntityID,s=e.metadataItemEntityID,l=e.searchResultEntityID,u=e.containerKey,f=(e.cellIndex,e.cellX),b=e.cellY,w=e.cellWidth,M=e.cellHeight,I=e.showScrollPlaceholder,C=e.showOffscreenPlaceholder,D=e.listType,T=e.listContext,x=e.titleComponents,P=e.isContinueWatching,E=e.metadataKey,A=e.type,L=e.selectionType,k=e.activeSelectionType,N=e.isSelected,_=e.imageWidth,O=e.imageHeight,R=e.imageUrl,j=e.onSelectItem,z=e.onDeselectItem,U=c()(e,["className","serverEntityID","providerEntityID","metadataItemEntityID","searchResultEntityID","containerKey","cellIndex","cellX","cellY","cellWidth","cellHeight","showScrollPlaceholder","showOffscreenPlaceholder","listType","listContext","titleComponents","isContinueWatching","metadataKey","type","selectionType","activeSelectionType","isSelected","imageWidth","imageHeight","imageUrl","onSelectItem","onDeselectItem"]),F=!E,B=F||I,V="mixed"===D?n.i(p.a)(A,T).concat(x):x;
return o()(g.a,{className:t,cellX:f,cellY:b,cellWidth:w,cellHeight:M},void 0,B?o()(v.a,{imageWidth:_,imageHeight:O,activeSelectionType:k,isSelected:N}):d.a.createElement(m.a,r()({serverEntityID:i,providerEntityID:a,metadataItemEntityID:s,listContext:T,containerKey:u,metadataKey:E,type:A,imageWidth:_,imageHeight:O,imageUrl:R,selectionType:L,activeSelectionType:k,isSelected:N,isOffscreen:C,onSelectItem:j,onDeselectItem:z},U)),o()("div",{className:P?S.a.continueWatchingTitleContainer:S.a.titleContainer
},void 0,F?n.i(h.default)("Loading..."):V.map(function(e,t){return o()(y.a,{serverEntityID:i,providerEntityID:a,metadataItemEntityID:s,searchResultEntityID:l,containerKey:u,component:e,isSecondary:t>0,isSplitLeft:P&&0===t,isSplitRight:P&&1===t},t)})))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(4),p=(n(48),n(300)),f=n(131),g=n(106),m=n(367),v=n(509),y=n(510),b=n(2443),S=n.n(b);t.a=n.i(f.a)(i)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(28),f=n.n(p),g=n(4),m=n(131),v=n(545),y=n(48),b=n(106),S=n(30),w=n(108),M=n(26),I=n(360),C=n(73),D=n(365),T=n(367),x=n(509),P=n(846),E=n(294),A=n(519),L=n(2444),k=n.n(L),N=a()(S.a,{
name:"plex-icon-edit-560"}),_=a()(S.a,{name:"plex-icon-more-560"}),O=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onActionsPress=function(e){a.setState({isActionsMenuOpen:!a.state.isActionsMenuOpen})},a.onActionsMenuClose=function(){a.setState({isActionsMenuOpen:!1})},a.state={isActionsMenuOpen:!1},a}return u()(t,e),t.prototype.render=function(){var e=this,t=this.props,i=t.serverEntityID,r=t.providerEntityID,s=t.metadataItemEntityID,o=t.containerKey,l=t.listContext,c=t.cellIndex,u=t.cellX,d=t.cellY,p=t.cellWidth,m=t.cellHeight,v=t.showScrollPlaceholder,S=t.showOffscreenPlaceholder,L=t.metadataKey,O=t.type,R=t.index,j=t.title,z=t.grandparentKey,U=t.summary,F=t.route,B=t.showLink,V=t.showEdit,H=t.showSelect,W=t.hasActiveSelection,Q=t.isSelected,Y=t.isOtherItemSelected,G=t.isModifierKeyPressed,K=t.imageWidth,q=t.imageHeight,Z=t.imageUrl,X=t.onEditPress,J=t.onSelectPress,$=t.onDeselectPress,ee=this.state.isActionsMenuOpen,te=l===y.c,ne=H&&(G||Y),ie=W?"-1":"0";
return a()(b.a,{className:f()(c%2?k.a.alternateItem:k.a.item,W&&k.a.hasActiveSelection,ne&&k.a.isForcingSelection,Q&&k.a.isSelected,ee&&k.a.isActionsMenuOpen),cellX:u,cellY:d,cellWidth:p,cellHeight:m},void 0,H&&a()(M.a,{className:k.a.selectCoverButton,"aria-label":Q?n.i(g.default)("Deselect {title}",{title:j}):n.i(g.default)("Select {title}",{title:j}),tabIndex:B&&!W?"-1":"0",onPress:Q?$:J}),B&&a()(M.a,{className:k.a.underlay,tabIndex:ie,to:F,"aria-label":j}),a()("div",{className:k.a.overlay},void 0,a()("div",{
className:k.a.posterContainer},void 0,v?a()(x.a,{imageWidth:K,imageHeight:q}):a()(T.a,{serverEntityID:i,providerEntityID:r,metadataItemEntityID:s,listContext:l,containerKey:o,metadataKey:L,type:O,imageWidth:K,imageHeight:q,imageUrl:Z,isOffscreen:S,showLink:!1,showSelect:!1,showEdit:!1,showMore:!1})),a()("div",{className:k.a.summaryContainer},void 0,a()("div",{},void 0,a()("div",{className:k.a.titleContainer},void 0,a()("div",{className:k.a.title},void 0,!!z&&a()("span",{},void 0,te?a()(E.a,{serverEntityID:i,
providerEntityID:r,metadataItemEntityID:s}):a()(P.a,{index:R}),a()(w.a,{className:k.a.separator})),j),a()("div",{className:k.a.rating},void 0,a()(A.a,{serverEntityID:i,providerEntityID:r,metadataItemEntityID:s}))),a()("div",{className:k.a.summary},void 0,U))),a()("div",{className:te?k.a.libraryActionsContainer:k.a.actionsContainer},void 0,H&&a()(I.a,{className:k.a.selectButton,tabIndex:ie,title:j,isSelected:Q,onPress:J}),V&&a()(M.a,{className:k.a.editButton,tabIndex:ie,"aria-label":n.i(g.default)("Edit {title}",{
title:j}),onPress:X},void 0,N),h.a.createElement(M.a,{className:k.a.moreButton,tabIndex:ie,"aria-label":n.i(g.default)("More Actions"),"aria-haspopup":!0,ref:function(t){e._moreButton=t},onPress:this.onActionsPress},_),a()(C.a,{target:this._moreButton,isOpen:ee,onMenuClose:this.onActionsMenuClose},void 0,a()(D.a,{serverEntityID:i,providerEntityID:r,metadataItemEntityID:s,showPlay:!1,showEdit:!1})))))},t}(d.Component);t.a=n.i(m.a)(n.i(v.a)(O))},function(e,t,n){"use strict";function i(){return n.i(m.createSelector)(function(e,t){
var n=t.listContext;return n},function(e,t){var n=t.cellHeight;return n},n.i(v.a)(),M.a,I.a,n.i(y.a)(),n.i(b.a)(),n.i(S.a)(),n.i(w.a)(),C.a,function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],r=arguments[4],s=arguments[5],o=arguments[6],l=arguments[7],c=arguments[8],u=arguments[9],d=n.i(A.a)(a,r,o),h=t-2*O,p=n.i(k.a)(null,h,s,i,e);return{metadataKey:i.key,grandparentKey:i.grandparentKey,type:s,index:i.index,title:i.title,summary:i.summary,selectionID:i.entityID,
selectionType:l,activeSelectionType:u.activeSelectionType,isSelected:c,route:d,showLink:!!d,showEdit:n.i(L.b)(a,r,i),showSelect:n.i(L.c)(a,r,i),imageWidth:p.width,imageHeight:p.height,imageUrl:p.url}})}function a(e,t){var i=t.serverEntityID,a=t.metadataListEntityID,r=t.metadataItemEntityID;return{onEditPress:function(){e(n.i(T.editMetadataItem)({serverEntityID:i,metadataItemEntityID:r}))},onSelectItem:function(t){e(n.i(D.selectMetadataListItem)(h()({metadataListEntityID:a,id:r},t)))},onDeselectItem:function(t){
e(n.i(D.deselectMetadataListItem)(h()({metadataListEntityID:a},t)))}}}var r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(7),h=n.n(d),p=n(1),f=n.n(p),g=n(15),m=n(9),v=(n.n(m),n(29)),y=n(484),b=n(481),S=n(483),w=n(482),M=n(58),I=n(62),C=n(136),D=n(133),T=n(113),x=n(109),P=n.n(x),E=n(301),A=n(86),L=n(233),k=n(377),N=n(1896),_=n(1898),O=parseInt(P.a.summaryCellPadding,10),R=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.render=function(){
return this.props.metadataKey?f.a.createElement(N.a,this.props):f.a.createElement(_.a,this.props)},t}(p.Component);t.a=n.i(g.b)(i,a,E.a)(R)},function(e,t,n){"use strict";function i(e){var t=e.cellIndex,i=e.cellX,a=e.cellY,s=e.cellWidth,l=e.cellHeight,d=e.imageWidth,p=e.imageHeight;return r()(c.a,{className:t%2?h.a.alternateLoadingItem:h.a.loadingItem,cellX:i,cellY:a,cellWidth:s,cellHeight:l},void 0,r()("div",{className:h.a.posterContainer},void 0,r()(u.a,{imageWidth:d,imageHeight:p})),n.i(o.default)("Loading..."));
}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(131),c=n(106),u=n(509),d=n(2445),h=n.n(d);t.a=n.i(l.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.listType,l=e.listContext,f=o()(e,["serverEntityID","providerEntityID","metadataListEntityID","listType","listContext"]);return c.a.createElement(h.a,r()({listType:s,listContext:l,layout:u.a,cellRenderer:n.i(d.a)({serverEntityID:t,providerEntityID:i,metadataListEntityID:a,listType:s,
listContext:l},p.a)},f))}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=(n(48),n(2201)),d=n(376),h=n(363),p=n(1897);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.listType,l=e.listContext,f=e.activeSort,g=e.selectedSort,m=o()(e,["serverEntityID","providerEntityID","metadataListEntityID","listType","listContext","activeSort","selectedSort"]);return c.a.createElement(h.a,r()({listType:s,listContext:l,layout:u.a,cellRenderer:n.i(d.a)({
serverEntityID:t,providerEntityID:i,metadataListEntityID:a,listType:s,listContext:l,activeSort:f,selectedSort:g},p.a)},m))}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(2202),d=(n(48),n(376)),h=n(363),p=n(1906);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.style,n=e.component,i=e.serverEntityID,a=e.providerEntityID,s=e.metadataItemEntityID,o=e.isActiveSort;return r()("div",{className:o?l.a.activeTableCell:l.a.tableCell,style:t},void 0,r()(n,{className:l.a.title,serverEntityID:i,
providerEntityID:a,metadataItemEntityID:s}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2446)),l=n.n(o);t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(116),f=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onPress=function(e){var t=i.props.isSelected?i.props.onColumnDeselect:i.props.onColumnSelect;t(i.props.columnKey);
},a=n,l()(i,a)}return u()(t,e),t.prototype.render=function(){return h.a.createElement(p.a,a()({},this.props,{onPress:this.onPress}))},t}(d.Component);t.a=f},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(4),f=n(182),g=n(30),m=n(26),v=n(73),y=n(1902),b=n(2447),S=n.n(b),w=a()(g.a,{name:"plex-icon-more-560"}),M=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onChangeColumnsPress=function(e){a.setState({
isColumnsMenuOpen:!a.state.isColumnsMenuOpen})},a.onColumnsMenuClose=function(){a.setState({isColumnsMenuOpen:!1})},a.state={isColumnsMenuOpen:!1},a}return u()(t,e),t.prototype.render=function(){var e=this,t=this.props,i=t.activeTableColumns,r=t.allTableColumns,s=t.activeType,o=t.activeFilters,l=t.activeFilterLabel,c=t.activeSort,u=t.selectedSort,d=t.onColumnSelect,b=t.onColumnDeselect,M=this.state.isColumnsMenuOpen;return a()("div",{className:S.a.tableHeader},void 0,a()("div",{className:S.a.playCell
}),i.map(function(e,t){var i=e.style,r=e.title,d=e.ascKey,h=e.descKey,v=c===d||c===h||u.key===d,y=c?c===d:u.key===d;return a()(m.a,{style:i,className:S.a.tableHeaderLink,to:n.i(f.a)({type:s,filters:o,filterLabel:l,sort:y?h:d})},t,a()("div",{className:v?S.a.activeTableHeaderCell:S.a.tableHeaderCell},void 0,a()("div",{className:S.a.tableHeaderTitle},void 0,r()),v&&y&&a()(g.a,{className:S.a.sortDirectionIcon,name:"plex-icon-sort-ascending-560","aria-label":n.i(p.default)("Ascending")}),v&&!y&&a()(g.a,{
className:S.a.sortDirectionIcon,name:"plex-icon-sort-descending-560","aria-label":n.i(p.default)("Descending")})))}),a()("div",{className:S.a.actionsCell},void 0,h.a.createElement(m.a,{ref:function(t){e._columnsButton=t},className:S.a.columnsButton,"aria-label":n.i(p.default)("Change Columns"),"aria-haspopup":!0,onPress:this.onChangeColumnsPress},w),a()(v.a,{target:this._columnsButton,isOpen:M,onMenuClose:this.onColumnsMenuClose},void 0,r.map(function(e){return a()(y.a,{columnKey:e.key,isSelected:i.indexOf(e)!==-1,
onColumnSelect:d,onColumnDeselect:b},e.key,e.title())}))))},t}(d.Component);t.a=M},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(function(e,t){var n=t.listType;return n},n.i(m.a)(),function(e,t){var i=n.i(y.b)(e);return{allTableColumns:i,activeTableColumns:t}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(784)),v=n(278),y=n(894),b=n(1903),S={selectLibraryTableColumn:v.selectLibraryTableColumn,deselectLibraryTableColumn:v.deselectLibraryTableColumn
},w=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onColumnSelect=function(e){i.props.selectLibraryTableColumn({type:i.props.listType,activeTableColumns:i.props.activeTableColumns,key:e})},i.onColumnDeselect=function(e){i.props.deselectLibraryTableColumn({type:i.props.listType,activeTableColumns:i.props.activeTableColumns,key:e})},a=n,c()(i,a)}return d()(t,e),t.prototype.render=function(){
return p.a.createElement(b.a,r()({},this.props,{onColumnSelect:this.onColumnSelect,onColumnDeselect:this.onColumnDeselect}))},t}(h.Component);t.a=n.i(f.b)(i,S)(w)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(28),f=n.n(p),g=n(4),m=n(131),v=n(545),y=n(48),b=n(106),S=n(30),w=n(26),M=n(291),I=n(360),C=n(73),D=n(365),T=n(1955),x=n(851),P=n(850),E=n(1901),A=n(2448),L=n.n(A),k=a()(S.a,{name:"plex-icon-edit-560"}),N=a()(S.a,{name:"plex-icon-more-560"
}),_=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onActionsPress=function(e){a.setState({isActionsMenuOpen:!a.state.isActionsMenuOpen})},a.onActionsMenuClose=function(){a.setState({isActionsMenuOpen:!1})},a.state={isActionsMenuOpen:!1},a}return u()(t,e),t.prototype.render=function(){var e=this,t=this.props,i=t.serverEntityID,r=t.providerEntityID,s=t.metadataItemEntityID,o=t.listContext,l=t.activeSort,c=t.selectedSort,u=t.cellIndex,d=t.cellX,p=t.cellY,m=t.cellWidth,v=t.cellHeight,S=t.activeTableColumns,A=t.title,_=t.route,O=t.showLink,R=t.showPlay,j=t.showEdit,z=t.showSelect,U=t.showPlayIndex,F=t.showPlayCellIndex,B=t.showActionsDuration,V=t.showActionsMinutesLeft,H=t.hasActiveSelection,W=t.isSelected,Q=t.isOtherItemSelected,Y=t.isModifierKeyPressed,G=t.onPlayPress,K=t.onEditPress,q=t.onSelectPress,Z=t.onDeselectPress,X=this.state.isActionsMenuOpen,J=o===y.c,$=z&&(Y||Q),ee=H?"-1":"0";
return a()(b.a,{className:f()(u%2?L.a.alternateItem:L.a.item,H&&L.a.hasActiveSelection,$&&L.a.isForcingSelection,W&&L.a.isSelected,X&&L.a.isActionsMenuOpen),cellX:d,cellY:p,cellWidth:m,cellHeight:v},void 0,z&&a()(w.a,{className:L.a.selectCoverButton,"aria-label":W?n.i(g.default)("Deselect {title}",{title:A}):n.i(g.default)("Select {title}",{title:A}),tabIndex:O&&!H?"-1":"0",onPress:W?Z:q}),O&&a()(w.a,{className:L.a.underlay,tabIndex:ee,to:_,"aria-label":A}),a()("div",{className:L.a.overlay},void 0,a()("div",{
className:L.a.playCell},void 0,U&&a()(T.a,{className:L.a.transientTitleLeft,serverEntityID:i,providerEntityID:r,metadataItemEntityID:s}),F&&a()("span",{className:L.a.transientTitleLeft},void 0,u+1),R&&a()(M.a,{className:L.a.playButton,tabIndex:ee,title:A,onPress:G})),S.map(function(e,t){var n=e.style,o=e.component,u=e.ascKey,d=e.descKey;return a()(E.a,{style:n,serverEntityID:i,providerEntityID:r,metadataItemEntityID:s,component:o,isActiveSort:l===u||l===d||!!c&&c.key===u},t)}),a()("div",{className:J?L.a.libraryActionsCell:L.a.actionsCell
},void 0,B&&a()(x.a,{className:L.a.transientTitleRight,serverEntityID:i,providerEntityID:r,metadataItemEntityID:s}),V&&a()(P.a,{className:L.a.transientTitleRight,serverEntityID:i,providerEntityID:r,metadataItemEntityID:s}),z&&a()(I.a,{className:L.a.selectButton,tabIndex:ee,title:A,isSelected:W,onPress:q}),j&&a()(w.a,{className:L.a.editButton,tabIndex:ee,"aria-label":n.i(g.default)("Edit {title}",{title:A}),onPress:K},void 0,k),h.a.createElement(w.a,{ref:function(t){e._moreButton=t},className:L.a.moreButton,
tabIndex:ee,"aria-label":n.i(g.default)("More Actions"),"aria-haspopup":!0,onPress:this.onActionsPress},N),a()(C.a,{target:this._moreButton,isOpen:X,onMenuClose:this.onActionsMenuClose},void 0,a()(D.a,{serverEntityID:i,providerEntityID:r,metadataItemEntityID:s,showPlay:!1,showEdit:!1})))))},t}(d.Component);t.a=n.i(m.a)(n.i(v.a)(_))},function(e,t,n){"use strict";function i(){return n.i(m.createSelector)(function(e,t){var n=t.listContext;return n},function(e,t){var n=t.cellWidth;return n},n.i(v.a)(),M.a,I.a,n.i(C.a)(),n.i(y.a)(),n.i(b.a)(),n.i(S.a)(),n.i(w.a)(),D.a,function(e,t){
var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],r=arguments[4],s=arguments[5],o=arguments[6],l=arguments[7],c=arguments[8],u=arguments[9],d=arguments[10],h=n.i(E.a)(a,r,l),p={activeTableColumns:s,metadataKey:i.key,type:o,title:i.title,selectionID:i.entityID,selectionType:c,activeSelectionType:d.activeSelectionType,isSelected:u,route:h,showLink:!!h,showPlay:n.i(A.a)(a,r,i),showEdit:n.i(A.b)(a,r,i),showSelect:n.i(A.c)(a,r,i)};return p})}function a(e,t){var i=t.serverEntityID,a=t.metadataListEntityID,r=t.metadataItemEntityID;
return{onPlayPress:function(){e(n.i(x.playMetadataItem)({serverEntityID:i,metadataItemEntityID:r}))},onEditPress:function(){e(n.i(x.editMetadataItem)({serverEntityID:i,metadataItemEntityID:r}))},onSelectItem:function(t){e(n.i(T.selectMetadataListItem)(h()({metadataListEntityID:a,id:r},t)))},onDeselectItem:function(t){e(n.i(T.deselectMetadataListItem)(h()({metadataListEntityID:a},t)))},onDeselectAllItems:function(){e(n.i(T.deselectAllMetadataListItems)({metadataListEntityID:a}))}}}var r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(7),h=n.n(d),p=n(1),f=n.n(p),g=n(15),m=n(9),v=(n.n(m),
n(29)),y=n(484),b=n(481),S=n(483),w=n(482),M=n(58),I=n(62),C=n(784),D=n(136),T=n(133),x=n(113),P=n(301),E=n(86),A=n(233),L=n(1907),k=n(1905),N=300,_=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onSelectItem=function(e){i._isDoubleClick()?i._doubleClick():(i._firstClickTime=Date.now(),i.props.onSelectItem(e))},i.onDeselectItem=function(e){i._isDoubleClick()?i._doubleClick():(i._firstClickTime=Date.now(),
i.props.onDeselectItem(e))},a=n,l()(i,a)}return u()(t,e),t.prototype._isDoubleClick=function(){return this._firstClickTime&&Date.now()-this._firstClickTime<N},t.prototype._doubleClick=function(){var e=this.props,t=e.selectionType,n=e.showPlay,i=e.onPlayPress,a=e.onSelectItem,r=e.onDeselectAllItems;this._firstClickTime=0,r(),a({type:t}),n&&i()},t.prototype.render=function(){return this.props.metadataKey?f.a.createElement(k.a,h()({},this.props,{onSelectItem:this.onSelectItem,onDeselectItem:this.onDeselectItem
})):f.a.createElement(L.a,this.props)},t}(p.Component);t.a=n.i(g.b)(i,a,P.a)(_)},function(e,t,n){"use strict";function i(e){var t=e.cellIndex,i=e.cellX,a=e.cellY,s=e.cellWidth,l=e.cellHeight;return r()(c.a,{className:t%2?d.a.alternateLoadingItem:d.a.loadingItem,cellX:i,cellY:a,cellWidth:s,cellHeight:l},void 0,n.i(o.default)("Loading..."))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(131),c=n(106),u=n(2449),d=n.n(u);t.a=n.i(l.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.activeSort,l=e.listType,g=e.listContext,m=e.columnAdjustment,v=o()(e,["serverEntityID","providerEntityID","metadataListEntityID","activeSort","listType","listContext","columnAdjustment"]),y=n.i(h.a)(l,g,{
activeSort:s,providerEntityID:i});return c.a.createElement(p.a,r()({listType:l,listContext:g,layout:n.i(u.a)(l,g,m,y.length),cellRenderer:n.i(d.a)({serverEntityID:t,providerEntityID:i,metadataListEntityID:a,listType:l,listContext:g,titleComponents:y},f.a)},v))}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(2197),d=(n(48),n(376)),h=n(300),p=n(363),f=n(507);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(25)),p=n(30),f=n(131),g=n(106),m=n(367),v=n(2450),y=n.n(v),b=a()(p.a,{
name:"plex-icon-clips-560"}),S=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(h.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataKey,s=e.type,o=e.title,l=e.thumb,c=e.cellX,u=e.cellY,d=e.cellWidth,h=e.cellHeight,p=e.showOffscreenPlaceholder,f="clip"===s,v="photoalbum"===s;return a()(g.a,{cellX:c,cellY:u,cellWidth:d,
cellHeight:h},void 0,a()("div",{className:y.a.photoContainer},void 0,a()("div",{className:y.a.photo},void 0,a()("div",{className:y.a.image},void 0,!p&&a()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:r,type:s,imageUrl:l,imageWidth:d,imageHeight:h,showSelect:!1}),f&&a()("div",{className:y.a.badge},void 0,b),v&&a()("div",{className:y.a.title},void 0,o)))))},t}(d.Component);t.a=n.i(f.a)(S)},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(v.a)(),n.i(m.a)(),function(e){
var t=e.machineIdentifier,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.key,a=n.type,r=n.title,s=n.thumb;return{machineIdentifier:t,metadataKey:i,type:a,title:r,thumb:s}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(29)),v=n(63),y=n(113),b=n(1909),S=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),
i.onPlayPress=function(e){i.props.playMetadataItem({serverEntityID:i.props.serverEntityID,metadataItemEntityID:i.props.metadataItemEntityID,siblings:!0})},a=n,c()(i,a)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(b.a,r()({onPlayPress:this.onPlayPress},this.props))},t}(h.Component);t.a=n.i(f.b)(i,{playMetadataItem:y.playMetadataItem})(S)},function(e,t,n){"use strict";function i(e,t){return!!l.a.find(e,function(e){return t[e]})}function a(e){var t=i(f,e),a=i(g,e),r=t&&a,o=!1;
return s()("div",{},void 0,e.showPlay&&s()(h.a,{onPress:e.onPlayPress},void 0,e.playLabel||n.i(u.default)("Play")),e.showPlayVersion&&s()(h.a,{onPress:e.onPlayVersionPress},void 0,n.i(u.default)("Play Version...")),e.showPlayAll&&s()(h.a,{onPress:e.onPlayAllPress},void 0,n.i(u.default)("Play All")),e.showShuffle&&s()(h.a,{onPress:e.onShufflePress},void 0,n.i(u.default)("Shuffle")),e.showQueue&&s()(h.a,{onPress:e.onPlayNextPress},void 0,n.i(u.default)("Play Next")),e.showQueue&&s()(h.a,{onPress:e.onAddToQueuePress
},void 0,n.i(u.default)("Add to Queue")),e.showPlayPlexMix&&s()(h.a,{onPress:e.onPlayPlexMixPress},void 0,n.i(u.default)("Play Plex Mix")),e.showPlayTrailer&&s()(h.a,{onPress:e.onPlayPrimaryExtraPress},void 0,n.i(u.default)("Play Trailer")),e.showPlayMusicVideo&&s()(h.a,{onPress:e.onPlayPrimaryExtraPress},void 0,n.i(u.default)("Play Music Video")),e.showAddToPlaylist&&s()(h.a,{onPress:e.onAddToPlaylistPress},void 0,n.i(u.default)("Add to Playlist...")),r&&m,e.showEdit&&s()(h.a,{onPress:e.onEditPress
},void 0,n.i(u.default)("Edit")),e.showMarkWatched&&s()(h.a,{onPress:e.onMarkWatchedPress},void 0,n.i(u.default)("Mark Watched")),e.showMarkUnwatched&&s()(h.a,{onPress:e.onMarkUnwatchedPress},void 0,n.i(u.default)("Mark Unwatched")),e.showRefresh&&s()(h.a,{onPress:e.onRefreshPress},void 0,n.i(u.default)("Refresh")),e.showAnalyze&&s()(h.a,{onPress:e.onAnalyzePress},void 0,n.i(u.default)("Analyze")),e.showFixMatch&&s()(h.a,{onPress:e.onFixMatchPress},void 0,n.i(u.default)("Fix Match...")),e.showMatch&&s()(h.a,{
onPress:e.onFixMatchPress},void 0,n.i(u.default)("Match...")),e.showUnmatch&&s()(h.a,{onPress:e.onUnmatchPress},void 0,n.i(u.default)("Unmatch")),e.showSplitApart&&s()(h.a,{onPress:e.onSplitApartPress},void 0,n.i(u.default)("Split Apart")),e.showSync&&s()(h.a,{onPress:e.onSyncPress},void 0,n.i(u.default)("Sync...")),e.showOptimize&&s()(h.a,{onPress:e.onOptimizePress},void 0,n.i(u.default)("Optimize...")),e.showDownload&&s()(h.a,{to:e.downloadUrl&&e.downloadUrl(),target:e.downloadUrl&&"_self",download:!o&&!!e.downloadUrl,
onPress:!e.downloadUrl&&e.onDownloadVersionPress},void 0,n.i(u.default)("Download")),e.showWatchLater&&s()(h.a,{onPress:e.onWatchLaterPress},void 0,n.i(u.default)("Watch Later")),e.showShare&&s()(h.a,{onPress:e.onSharePress},void 0,n.i(u.default)("Share...")),e.showRecommend&&s()(h.a,{onPress:e.onRecommendPress},void 0,n.i(u.default)("Recommend...")),e.showDelete&&s()(h.a,{kind:d.c.DANGER,onPress:e.onDeletePress},void 0,n.i(u.default)("Delete")),e.showDeleteVersion&&s()(h.a,{kind:d.c.DANGER,onPress:e.onDeleteVersionPress
},void 0,n.i(u.default)("Delete Version")),e.showGetInfo&&s()(h.a,{onPress:e.onGetInfoPress},void 0,n.i(u.default)("Get Info")))}var r=n(3),s=n.n(r),o=n(2),l=n.n(o),c=n(1),u=(n.n(c),n(4)),d=n(23),h=n(115),p=n(500),f=["showPlay","showPlayVersion","showPlayAll","showShuffle","showQueue","showPlayPlexMix","showPlayTrailer","showPlayMusicVideo","showAddToPlaylist"],g=["showEdit","showMarkWatched","showMarkUnwatched","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo"],m=s()(p.a,{});
t.a=a},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(17),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=(n.n(p),n(4)),g=n(25),m=n(501),v=n(115),y=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onPlayAllPress=function(e){i.props.playMetadataList(i._getActionPayload())},i.onShufflePress=function(e){i.props.shuffleMetadataList(i._getActionPayload());
},i.onAddToPlaylistPress=function(e){i.props.addMetadataListToPlaylist(i._getActionPayload())},i.onSyncPress=function(e){i.props.syncMetadataList(i._getActionPayload())},i.onOptimizePress=function(e){i.props.optimizeMetadataList(i._getActionPayload())},a=n,u()(i,a)}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype._getActionPayload=function(){return{metadataListEntityID:this.props.metadataListEntityID}},t.prototype.render=function(){var e=this.props,t=e.target,i=e.isOpen,r=e.onMenuClose,o=s()(e,["target","isOpen","onMenuClose"]);
return a()(m.a,{target:t,isOpen:i,onMenuClose:r},void 0,o.showPlayAll&&a()(v.a,{onPress:this.onPlayAllPress},void 0,n.i(f.default)("Play All")),o.showShuffle&&a()(v.a,{onPress:this.onShufflePress},void 0,n.i(f.default)("Shuffle")),o.showAddToPlaylist&&a()(v.a,{onPress:this.onAddToPlaylistPress},void 0,n.i(f.default)("Add to Playlist...")),o.showSync&&a()(v.a,{onPress:this.onSyncPress},void 0,n.i(f.default)("Sync...")),o.showOptimize&&a()(v.a,{onPress:this.onOptimizePress},void 0,n.i(f.default)("Optimize...")));
},t}(p.Component);t.a=y},function(e,t,n){"use strict";function i(e){return e===g.a?"plex-icon-toolbar-column-560":e===g.b?"plex-icon-toolbar-detail-560":"plex-icon-toolbar-grid-560"}var a=n(3),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(4),g=(n(33),n(48),n(203)),m=n(30),v=n(357),y=n(358),b=n(26),S=n(73),w=n(116),M=n(2451),I=n.n(M),C=r()(v.a,{}),D=function(e){function t(n,i){o()(this,t);var a=c()(this,e.call(this,n,i));return a.onSliderChange=function(e){var t=e.steppedValue;
a.setState({sliderValue:t}),a._clearTimeout(),a._columnAdjustmentTimeoutID=setTimeout(function(){a.props.onColumnAdjustmentChange(t*-1)},a.props.columnAdjustmentTimeout)},a.onStylesPress=function(e){a.setState({isStylesMenuOpen:!a.state.isStylesMenuOpen})},a.onStylesMenuClose=function(){a.setState({isStylesMenuOpen:!1})},a.onPosterStylePress=function(e){a.props.onListStyleChange(g.c)},a.onTableStylePress=function(e){a.props.onListStyleChange(g.a)},a.onSummaryStylePress=function(e){a.props.onListStyleChange(g.b);
},a.state={sliderValue:n.columnAdjustment*-1,isStylesMenuOpen:!1},a}return d()(t,e),t.prototype.componentWillReceiveProps=function(e){e.columnAdjustment!==this.props.columnAdjustment&&this.setState({sliderValue:e.columnAdjustment*-1})},t.prototype.componentWillUnmount=function(){this._clearTimeout()},t.prototype._clearTimeout=function(){this._columnAdjustmentTimeoutID&&clearTimeout(this._columnAdjustmentTimeoutID)},t.prototype.render=function(){var e=this,t=this.props,a=(t.listType,t.listContext,
t.selectedListStyle),s=t.allListStyles,o=this.state,l=o.sliderValue,c=o.isStylesMenuOpen;if(!s.length||1===s.length&&s[0]!==g.c)return null;var u=s.length>1;return r()("div",{className:I.a.sliderContainer},void 0,a===g.c&&r()(y.a,{className:I.a.slider,label:n.i(f.default)("Poster Size"),value:l,min:-1,max:2,stepSize:1,onChange:this.onSliderChange}),p.a.createElement(b.a,{ref:function(t){e._stylesButton=t},className:I.a.stylesButton,"aria-label":n.i(f.default)("Show List Styles"),isDisabled:!u,onPress:this.onStylesPress
},r()(m.a,{className:I.a.stylesIcon,name:i(a)}),u&&C),r()(S.a,{target:this._stylesButton,isOpen:c,onMenuClose:this.onStylesMenuClose},void 0,s.indexOf(g.c)>-1&&r()(w.a,{isSelected:a===g.c,onPress:this.onPosterStylePress},g.c,n.i(f.default)("Grid View")),s.indexOf(g.a)>-1&&r()(w.a,{isSelected:a===g.a,onPress:this.onTableStylePress},g.a,n.i(f.default)("List View")),s.indexOf(g.b)>-1&&r()(w.a,{isSelected:a===g.b,onPress:this.onSummaryStylePress},g.b,n.i(f.default)("Summary View"))))},t}(h.Component);
D.defaultProps={selectedListStyle:g.c,allListStyles:[g.c],columnAdjustmentTimeout:500},t.a=D},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.allListStyles;return!n.length||1===n.length&&n[0]!==o.c?null:r()(l.a,{className:t})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(203)),l=n(861),c=n(2452),u=n.n(c);i.defaultProps={className:u.a.divider},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.summary,a=e.error,s=e.mediaItem,l=e.hasSubscription,M=e.isComplete,C=e.hasError,D=e.isRecording,T=e.recordingProgress,x=e.timeFormat,P=e.onRecordingModify,E=e.onModalClose,A=o()(e,["serverEntityID","summary","error","mediaItem","hasSubscription","isComplete","hasError","isRecording","recordingProgress","timeFormat","onRecordingModify","onModalClose"]),L=s.beginsAt,k=s.endsAt,N=s.startOffsetSeconds,_=s.endOffsetSeconds,O=s.channelTitle,R=!(!N&&!_),j=N&&Math.round(N/60),z=_&&Math.round(_/60);
return r()(f.a,{onModalClose:E},void 0,r()(g.a,{},void 0,n.i(c.default)("Airing Details")),r()(m.a,{},void 0,r()(w.a,{serverEntityID:t,target:A},void 0,r()(b.a,{mediaItem:s},void 0,r()(S.a,{beginsAt:L,endsAt:k,channel:O,showFullTime:!0,showChannel:!0,timeFormat:x},void 0,r()("div",{},void 0,M&&r()("span",{},void 0,r()(d.a,{className:I.a.completeIcon,name:"plex-icon-selected-560"}),n.i(c.default)("Recorded successfully")),D&&r()("span",{},void 0,r()(d.a,{className:I.a.recordingIcon,name:"plex-icon-dvr-single-560"
}),n.i(c.default)("Recording"),r()(h.a,{className:I.a.separator}),n.i(c.default)("{1}% complete",T)),C&&r()("span",{},void 0,r()(d.a,{className:I.a.errorIcon,name:"plex-icon-alert-560"}),a),!M&&!D&&!C&&R&&r()("span",{},void 0,j?r()("span",{},void 0,n.i(c.default)("Recording starts {1} min early",j),!!z&&r()("span",{},void 0,r()(h.a,{className:I.a.separator}),n.i(c.default)("Ends {1} min late",z))):r()("span",{},void 0,n.i(c.default)("Recording ends {1} min late",z)))))),r()("div",{className:I.a.summary
},void 0,i))),r()(v.a,{},void 0,r()(y.a,{},void 0,l&&r()(p.a,{kind:u.c.DEFAULT,size:u.d.MEDIUM,onPress:P},void 0,n.i(c.default)("Modify Recording")),r()(p.a,{kind:u.c.PRIMARY,size:u.d.MEDIUM,onPress:E},void 0,n.i(c.default)("Close")))))}var a=n(3),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=(n.n(l),n(4)),u=n(23),d=n(30),h=n(108),p=n(51),f=n(91),g=n(98),m=n(71),v=n(92),y=n(78),b=n(535),S=n(869),w=n(366),M=n(2453),I=n.n(M);t.a=i},function(e,t,n){"use strict";function i(){return n.i(u.createSelector)(function(e){
return e.experienceSettings.timeFormat},n.i(d.a)(),function(e,t){var n=s.a.pick(t,"type","title","parentTitle","grandparentTitle","thumb","parentThumb","grandparentThumb","index","parentIndex","originallyAvailableAt","summary");return n.timeFormat=e,n})}function a(e){return l.a.createElement(h.a,e)}var r=n(2),s=n.n(r),o=n(1),l=n.n(o),c=n(15),u=n(9),d=(n.n(u),n(29)),h=n(1915);t.a=n.i(c.b)(i)(a)},function(e,t,n){"use strict";function i(e){switch(e){case"movie":return[p.a];case"show":return[p.a];case"episode":
return[f.a,g.a];case"playlist":return[p.a];default:return[p.a]}}function a(e){var t=(e.className,e.type),n=u()(e,["className","type"]),a=i(t);return l()("div",{className:y.a.container},void 0,a.map(function(e,t){return h.a.createElement(m.a,s()({key:t,component:e,isSecondary:t>0},n))}))}var r=n(7),s=n.n(r),o=n(3),l=n.n(o),c=n(17),u=n.n(c),d=n(1),h=n.n(d),p=n(370),f=n(1938),g=n(295),m=n(1919),v=n(2454),y=n.n(v);t.a=a},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(n.i(c.a)(),function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:e.type}})}function a(e){return s.a.createElement(u.a,e)}var r=n(1),s=n.n(r),o=n(15),l=n(9),c=(n.n(l),n(29)),u=n(1917);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.component,n=e.isSecondary,i=o()(e,["component","isSecondary"]);return c.a.createElement(t,r()({className:n?d.a.secondaryTitle:d.a.title},i))}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(2455),d=n.n(u);t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.prefs;return o()("div",{},void 0,t.map(function(e){var t=e.id;return c.a.createElement(u.a,r()({key:t},e))}))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(498);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.target,a=e.initialMode,s=e.modes,l=e.libraries,m=e.targetLibrarySectionID,v=e.targetSectionLocationID,y=e.selectedLibrarySectionID,b=e.prefs,S=b.onlyNewAirings,w="episode"===i.type||"show"===i.type||"playlist"===i.type;
return o()(p.a,{serverEntityID:t,target:i,useStaticHeight:w},void 0,o()(d.a,{flexWrap:"wrap"},void 0,o()(h.a,{flexBasis:230,maxWidth:230},void 0,s&&o()(f.a,{labelText:n.i(u.default)("Record"),name:"mode",initialValue:a,values:s,isDisabled:s.length<2})),o()(h.a,{flexBasis:230,maxWidth:230},void 0,S&&c.a.createElement(f.a,r()({name:S.id,labelText:S.label,initialValue:S.value,values:S.enumValues.map(function(e){var t,n=e.label,i=e.value;return t={},t[i]=n,t})},b.onlyNewAirings)))),o()(g.a,{libraries:l,
targetLibrarySectionID:m,targetSectionLocationID:v,selectedLibrarySectionID:y}))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(818),h=n(817),p=n(366),f=n(837),g=n(1924);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(179),f=n(23),g=n(91),m=n(98),v=n(71),y=n(92),b=n(78),S=n(97),w=n(51),M=n(193),I=n(366),C=n(1918),D=n(2456),T=n.n(D),x=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments));
}return u()(t,e),t.prototype.componentDidUpdate=function(e,t){var n=e.isMediaSubscriptionMoving&&!this.props.isMediaSubscriptionMoving&&null==this.props.mediaSubscriptionMoveError||e.isMediaSubscriptionDeleting&&!this.props.isMediaSubscriptionDeleting&&null==this.props.mediaSubscriptionDeleteError;n&&this.props.onModalClose()},t.prototype.render=function(){var e=this.props,t=e.isRecordingSchedule,i=e.isMediaSubscriptionDeleting,r=e.mediaSubscriptionDeleteError,s=e.isMediaSubscriptionMoving,o=e.mediaSubscriptionMoveError,l=e.serverEntityID,c=e.server,u=e.target,d=e.conflicts,D=e.onDelete,x=e.onMediaMove,P=e.onErrorDismiss,E=e.onModalClose,A=encodeURIComponent(c.machineIdentifier);
return a()(g.a,{onModalClose:E},void 0,a()(m.a,{},void 0,n.i(h.default)("Conflict Detected")),o&&a()("div",{},void 0,a()(M.a,{errorMessage:n.i(p.a)(o,n.i(h.default)("There was a problem saving your changes...")),onErrorDismiss:P})),r&&a()("div",{},void 0,a()(M.a,{errorMessage:n.i(p.a)(r,n.i(h.default)("There was a problem canceling...")),onErrorDismiss:P})),a()(v.a,{autoScroll:!0},void 0,a()(I.a,{serverEntityID:l,target:u},void 0,a()("div",{className:T.a.message},void 0,1===d.length?n.i(h.default)("Conflicts with 1 recording"):n.i(h.default)("Conflicts with {1} recordings",d.length)),a()("div",{
className:T.a.conflicts},void 0,d.map(function(e,t){var n=e.metadataItem;return a()(C.a,{metadataItemEntityID:n},t)})))),a()(y.a,{},void 0,a()(b.a,{},void 0,a()(S.a,{isSpinning:i,kind:f.c.DANGER,onPress:D},void 0,n.i(h.default)("Cancel This")),a()(S.a,{isSpinning:s,kind:f.c.PRIMARY,onPress:x},void 0,n.i(h.default)("Prefer This")),t?a()(w.a,{kind:f.c.PRIMARY,onPress:E},void 0,n.i(h.default)("Close")):a()(w.a,{kind:f.c.PRIMARY,to:"#!/server/"+A+"/schedule"},void 0,n.i(h.default)("Manage")))))},t}(d.Component);
x.defaultProps={conflicts:[]},t.a=x},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(4),y=n(179),b=n(23),S=n(91),w=n(98),M=n(71),I=n(92),C=n(78),D=n(30),T=n(26),x=n(97),P=n(139),E=n(193),A=n(1921),L=n(1920),k=n(2457),N=n.n(k),_=function(e){function t(n,i){u()(this,t);var a=h()(this,e.call(this,n,i));return a.onAdvancedPress=function(){a.setState({isAdvanced:!a.state.isAdvanced})},a.onFormChange=function(e){
if(e.targetLibrarySectionID&&(e.targetLibrarySectionID.value!==a.state.selectedLibrarySectionID&&a.setState({selectedLibrarySectionID:e.targetLibrarySectionID.value}),e.mode&&e.mode.value!==a.state.selectedMode)){var t=e.mode.value;a.setState({selectedMode:t}),a.props.onModeChange(t)}},a.state={selectedLibrarySectionID:n.targetLibrarySectionID,selectedMode:n.initialMode,isAdvanced:!1},a}return f()(t,e),t.prototype.componentDidUpdate=function(e,t){var n=e.isMediaSubscriptionSaving&&!this.props.isMediaSubscriptionSaving&&null==this.props.mediaSubscriptionSaveError||e.isMediaSubscriptionDeleting&&!this.props.isMediaSubscriptionDeleting&&null==this.props.mediaSubscriptionDeleteError;
n&&this.props.onModalClose()},t.prototype.render=function(){var e=this.props,t=e.mediaSubscriptionKey,i=e.isMediaSubscriptionSaving,r=e.mediaSubscriptionSaveError,o=e.isMediaSubscriptionDeleting,c=e.mediaSubscriptionDeleteError,u=e.prefGroups,d=e.onModalClose,h=e.onErrorDismiss,p=e.onSubmit,f=e.onDelete,g=l()(e,["mediaSubscriptionKey","isMediaSubscriptionSaving","mediaSubscriptionSaveError","isMediaSubscriptionDeleting","mediaSubscriptionDeleteError","prefGroups","onModalClose","onErrorDismiss","onSubmit","onDelete"]);
return s()(P.a,{className:this.state.isAdvanced?N.a.advancedForm:N.a.baseForm,onChange:this.onFormChange,onSubmit:p},void 0,s()(S.a,{onModalClose:d},void 0,s()(w.a,{},void 0,n.i(v.default)("Record Options")),r&&s()("div",{},void 0,s()(E.a,{errorMessage:n.i(y.a)(r,n.i(v.default)("There was a problem saving your changes. Please try again.")),onErrorDismiss:h})),c&&s()("div",{},void 0,s()(E.a,{errorMessage:n.i(y.a)(c,n.i(v.default)("There was a problem with canceling this subscription. Please Try again.")),
onErrorDismiss:h})),s()(M.a,{},void 0,s()("div",{className:N.a.baseSettings},"base",m.a.createElement(A.a,a()({selectedLibrarySectionID:this.state.selectedLibrarySectionID,prefs:u.basic},g))),s()("div",{className:N.a.advancedSettings},"advanced",m.a.createElement(L.a,a()({prefs:u.advanced},g)))),s()(I.a,{className:N.a.footer},void 0,s()(C.a,{},void 0,s()(T.a,{kind:b.c.PRIMARY,onPress:this.onAdvancedPress},void 0,s()(D.a,{className:N.a.advancedIcon,name:"plex-icon-settings-560"}),this.state.isAdvanced?n.i(v.default)("Show Basic"):n.i(v.default)("Show Advanced"))),s()(C.a,{},void 0,s()(x.a,{
isSpinning:o,kind:t?b.c.DANGER:b.c.DEFAULT,onPress:t?f:d},void 0,t?n.i(v.default)("Cancel Recording"):n.i(v.default)("Cancel")),s()(x.a,{type:"submit",isSpinning:i,kind:b.c.PRIMARY},void 0,t?n.i(v.default)("Save"):n.i(v.default)("Record"))))))},t}(g.Component);t.a=_},function(e,t,n){"use strict";function i(e,t){var n=c.a.find(e,function(e){var n=e.librarySectionID;return n===t});return n?n.locations.map(function(e){var t,n=e.id,i=e.path;return t={},t[n]=i,t}):[]}function a(e){var t=e[0];if(t){var n=c.a.keys(t),i=n[0];
return t[i]}}function r(e){var t=e.libraries,r=e.targetLibrarySectionID,s=e.targetSectionLocationID,l=e.selectedLibrarySectionID,c=i(t,l);return o()(f.a,{flexWrap:"wrap"},void 0,o()(g.a,{flexBasis:230,maxWidth:230},void 0,o()(p.a,{labelText:n.i(d.default)("Add to Library"),name:"targetLibrarySectionID",initialValue:r,size:h.d.SMALL,values:t.map(function(e,t){var n,i=e.title,a=e.librarySectionID;return n={},n[a]=i,n})})),o()(g.a,{flexBasis:230,maxWidth:230},void 0,c.length>1&&o()(p.a,{labelText:n.i(d.default)("Location"),
name:"targetSectionLocationID",size:h.d.SMALL,initialValue:null==s?a(c):s,values:c})))}var s=n(3),o=n.n(s),l=n(2),c=n.n(l),u=n(1),d=(n.n(u),n(4)),h=n(23),p=n(837),f=n(818),g=n(817);t.a=r},function(e,t,n){"use strict";function i(){return n.i(I.createSelector)(function(e,t){var n=t.subscriptionType;return n},function(e){return"playlist"===e?"show":e})}function a(){return n.i(I.createSelector)(n.i(E.a)(),i(),function(e,t){var n=T.a.getLibraryType(t);return e.filter(function(e){var t=T.a.get(e.type),i=t.id;
return i===n.id}).map(function(e){return{librarySectionID:e.key,locations:e.locations,title:e.title}})})}function r(){return n.i(I.createSelector)(n.i(P.a)(),function(e){return e.ui.mediaSubscriptionModal},z,U,i(),a(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],a=arguments[4],r=arguments[5],s=b.a.omit(t,"templates","mediaSubscription"),o=n.key,l=n.grabOperations,c=void 0===l?[]:l,u=n.prefs,d=v()(n,["key","grabOperations","prefs"]),h=void 0,p=void 0,f=void 0;
i.length>1?(p=b.a.findIndex(i,function(e){return e.selected}),h=i.map(function(e,t){var n,i=e.title;return n={},n[t]=i,n})):(p=0,h=d.title?[{0:d.title}]:null),c.length&&(f=c.reduce(function(e,t){return t.conflicts&&t.conflicts.length?e.concat(t.conflicts):e},[]));var m=b.a.groupBy(u,function(e){return e.advanced?"advanced":"basic"});return m.basic=b.a.indexBy(m.basic,"id"),g()({mediaSubscriptionKey:o,prefGroups:m,metadataType:a,libraries:r,initialMode:p,modes:h,conflicts:f,server:e},s,d)})}var s=n(3),o=n.n(s),l=n(11),c=n.n(l),u=n(13),d=n.n(u),h=n(12),p=n.n(h),f=n(7),g=n.n(f),m=n(17),v=n.n(m),y=n(2),b=n.n(y),S=n(1),w=n.n(S),M=n(15),I=n(9),C=(n.n(I),
n(4)),D=n(35),T=n(36),x=n(104),P=n(63),E=n(437),A=n(675),L=n(85),k=n(772),N=n(824),_=n(1854),O=n(1923),R=n(1922),j=n(1926),z=n.i(I.createSelector)(function(e){return e.ui.mediaSubscriptionModal.mediaSubscription},A.a,function(e,t){return t[e]}),U=n.i(I.createSelector)(function(e){return e.ui.mediaSubscriptionModal.templates},A.a,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];return e.map(function(e){return t[e]})}),F=g()({addLibrary:L.addLibrary},k),B=function(e){
function t(i,a){c()(this,t);var r=d()(this,e.call(this,i,a));return r.onSubmit=function(e){var t=r.props,i=t.serverEntityID,a=t.metadataItemEntityID,s=e.targetLibrarySectionID,o=e.targetSectionLocationID,l=(e.mode,v()(e,["targetLibrarySectionID","targetSectionLocationID","mode"]));n.i(D.a)(function(){r.props.saveMediaSubscription({serverEntityID:i,metadataItemEntityID:a,targetLibrarySectionID:s,targetSectionLocationID:o,prefs:l})})},r.onDelete=function(){n.i(D.a)(function(){r.props.deleteMediaSubscriptionModal({
metadataItemEntityID:r.props.metadataItemEntityID})})},r.onModeChange=function(e){n.i(D.a)(function(){r.props.changeMediaSubscriptionTemplateMode({modeIndex:e})})},r.onMediaMove=function(){n.i(D.a)(function(){r.props.moveMediaSubscriptionModal()})},r.onErrorDismiss=function(){r.props.clearMediaSubscriptionModalError()},r.onCreatePress=function(){var e=r.props,t=e.metadataType,n=e.serverEntityID,i=T.a.getLibraryType(t),a=i.typeString,s=x.a.get(a);r.props.onModalClose(),r.props.addLibrary({serverEntityID:n,
options:{redirect:!1,seedAttrs:{type:s.typeString,title:s.title,language:s.defaultLanguage}}})},r.state={showConflicts:i.showConflicts},r}return p()(t,e),t.prototype.componentDidMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){var t=this.state.showConflicts;this.props.isMediaSubscriptionSaving&&!e.isMediaSubscriptionSaving&&e.conflicts&&e.conflicts.length&&(t=!0),t!==this.state.showConflicts&&this.setState({showConflicts:t});var n=this.props.metadataItemEntityID!==e.metadataItemEntityID,i=this.props.mediaSubscriptionEntityID!==e.mediaSubscriptionEntityID;
(n||i)&&this._populate(e)},t.prototype.componentWillUnmount=function(){this.props.clearMediaSubscriptionModal()},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.serverEntityID,i=e.mediaSubscriptionEntityID,a=e.metadataItemEntityID,r=e.showConflicts;n.i(D.a)(function(){e.initMediaSubscriptionModal({serverEntityID:t,mediaSubscriptionEntityID:i,metadataItemEntityID:a,showConflicts:r})})},t.prototype.render=function(){return this.props.mediaSubscriptionError?o()(N.a,{
message:n.i(C.default)("There was an unexpected error"),onModalClose:this.props.onModalClose}):this.props.isMediaSubscriptionPending||!this.props.isMediaSubscriptionPopulated?o()(_.a,{onModalClose:this.props.onModalClose}):this.props.libraries.length?this.state.showConflicts?w.a.createElement(R.a,g()({},this.props,{onDelete:this.onDelete,onMediaMove:this.onMediaMove,onErrorDismiss:this.onErrorDismiss})):w.a.createElement(O.a,g()({},this.props,{onModeChange:this.onModeChange,onSubmit:this.onSubmit,
onDelete:this.onDelete,onErrorDismiss:this.onErrorDismiss})):w.a.createElement(j.a,g()({},this.props,{onCreatePress:this.onCreatePress,onErrorDismiss:this.onErrorDismiss,onDelete:this.onDelete}))},t}(S.Component);B.defaultProps={showConflicts:!1},t.a=n.i(M.b)(r,F)(B)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(179),f=n(23),g=n(36),m=n(104),v=n(30),y=n(51),b=n(97),S=n(26),w=n(91),M=n(98),I=n(71),C=n(92),D=n(78),T=n(193),x=n(366),P=n(2458),E=n.n(P),A=function(e){
function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentDidUpdate=function(e,t){var n=e.isMediaSubscriptionDeleting&&!this.props.isMediaSubscriptionDeleting&&null==this.props.mediaSubscriptionDeleteError;n&&this.props.onModalClose()},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.mediaSubscriptionKey,r=e.target,s=e.metadataType,o=e.isMediaSubscriptionDeleting,l=e.mediaSubscriptionDeleteError,c=e.onCreatePress,u=e.onModalClose,d=e.onErrorDismiss,P=e.onDelete,A=g.a.getLibraryType(s),L=A.typeString,k=m.a.get(L),N=k.title;
return a()(w.a,{onModalClose:u},void 0,a()(M.a,{},void 0,n.i(h.default)("Record Options")),l&&a()(T.a,{errorMessage:n.i(p.a)(l,n.i(h.default)("There was a problem with canceling this subscription. Please Try again.")),onErrorDismiss:d}),a()(I.a,{},void 0,a()(x.a,{serverEntityID:t,target:r},void 0,a()("div",{className:E.a.errorMessage},void 0,n.i(h.default)("{1} Library Required",N)),a()("p",{},void 0,i?n.i(h.default)("This recording cannot be scheduled because you don\u2019t yet have a library for {1}. Please create a library or cancel the recording.",N):n.i(h.default)("This recording cannot be scheduled because you don\u2019t yet have a library for {1}. Please try recording again after you have created your library.",N)),a()(S.a,{
kind:f.c.PRIMARY,onPress:c},void 0,a()(v.a,{name:"plex-icon-add-560",className:E.a.addIcon})," ",n.i(h.default)("Create Library")))),a()(C.a,{},void 0,a()(D.a,{},void 0,i&&a()(b.a,{isSpinning:o,kind:f.c.DANGER,onPress:P},void 0,n.i(h.default)("Cancel Recording")),a()(y.a,{onPress:u},void 0,n.i(h.default)("Cancel")))))},t}(d.Component);t.a=A},function(e,t,n){"use strict";function i(e){var t=e.component,n=e.isSecondary,i=o()(e,["component","isSecondary"]);return c.a.createElement(t,r()({className:n?d.a.secondaryTitle:d.a.title
},i))}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(2460),d=n.n(u);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(28)),p=n.n(h),f=n(25),g=n(26),m=n(496),v=n(508),y=n(230),b=n(1929),S=n(2461),w=n.n(S),M=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onRecordPress=function(e){a.setState({isSubscribeModalOpen:!0})},a.onSubscribeModalClose=function(){a.setState({isSubscribeModalOpen:!1
})},a.state={isSubscribeModalOpen:!1},a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.serverEntityID,i=e.metadataItemEntityID,r=e.route,s=e.type,o=e.title,l=e.subscriptionType,c=e.grandparentSubscriptionType,u=e.isSubscribed,d=e.showLink,h=e.beginsAt,f=e.endsAt,S=this.state.isSubscribeModalOpen;return a()("div",{className:p()(t,w.a.overlay)},void 0,a()("div",{className:w.a.background}),u&&a()("div",{
className:w.a.subscriptionBadge},void 0,a()(v.a,{type:c||l})),d&&a()(g.a,{className:w.a.link,to:r}),a()(b.a,{className:w.a.progress,beginsAt:h,endsAt:f}),a()(m.a,{className:d?w.a.recordButton:w.a.recordCoverButton,circleClassName:w.a.recordCircle,iconClassName:w.a.recordIcon,tabIndex:"-1",title:o,onPress:this.onRecordPress}),a()(y.a,{serverEntityID:n,metadataItemEntityID:i,isOpen:S,subscriptionType:s,onModalClose:this.onSubscribeModalClose}))},t}(d.Component);t.a=M},function(e,t,n){"use strict";function i(e){
var t=e.beginsAt,i=e.endsAt,a=n.i(p.a)(t,i);if(a){var r=i-t,s=Date.now()/1e3-t;return s/r*100}}var a=n(3),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=(n.n(h),n(445)),f=n(25),g=n(839),m=function(e){function t(n,i){o()(this,t);var a=c()(this,e.call(this,n,i));return a.tick=function(){a.setState(a.getState(a.props)),a.setTickTimeout()},a.state=a.getState(n),a}return d()(t,e),t.prototype.componentWillMount=function(){this.setTickTimeout()},t.prototype.componentWillReceiveProps=function(e,t){
this.setState(this.getState(e))},t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this.tickTimeout&&clearTimeout(this.tickTimeout)},t.prototype.getState=function(e){return{progress:i(e)}},t.prototype.setTickTimeout=function(){this.tickTimeout=setTimeout(this.tick,6e4-Date.now()%6e4)},t.prototype.render=function(){var e=this.props.className,t=this.state.progress;return t?r()(g.a,{className:e,progress:t}):null},t}(h.Component);t.a=m;
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.type,i=e.width,a=e.height,s=l.a[n];if(!s)return null;var c={fontSize:Math.max(14,Math.min(Math.round(i/4),42)),lineHeight:a+"px"};return r()(o.a,{name:s,className:t,style:c})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(30)),l=n(721);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.type,s=e.selectionType,l=e.activeSelectionType,u=e.isSelected,h=e.isOffscreen,m=e.visibleFace,y=e.imageWidth,b=e.imageHeight,S=e.imageUrl,w=e.imageTransitionProps,M=e.onImageLoad,I=e.onImageError,C=e.onSelectItem,D=e.onDeselectItem,T=c()(e,["serverEntityID","providerEntityID","metadataItemEntityID","type","selectionType","activeSelectionType","isSelected","isOffscreen","visibleFace","imageWidth","imageHeight","imageUrl","imageTransitionProps","onImageLoad","onImageError","onSelectItem","onDeselectItem"]);
return o()("div",{className:p()(v.a.face,v.a[m],u&&v.a.isSelected)},void 0,o()(f.a,{serverEntityID:t,type:a,isOffscreen:h,url:S,width:y,height:b,transitionProps:w,onLoad:M,onError:I}),d.a.createElement(g.a,r()({serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,type:a,selectionID:i,selectionType:s,activeSelectionType:l,isSelected:u,onSelectItem:C,onDeselectItem:D},T)))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(28),p=n.n(h),f=n(368),g=n(1933),m=n(2463),v=n.n(m);
t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(28),f=n.n(p),g=n(4),m=n(23),v=n(30),y=n(41),b=n(26),S=n(73),w=n(502),M=n(291),I=n(360),C=n(365),D=n(839),T=n(2465),x=n.n(T),P=a()(v.a,{name:"plex-icon-edit-560"}),E=a()(v.a,{name:"plex-icon-more-560"}),A=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onActionsPress=function(e){a.setState({isActionsMenuOpen:!a.state.isActionsMenuOpen})},a.onActionsMenuClose=function(){
a.setState({isActionsMenuOpen:!1})},a.state={isActionsMenuOpen:!1},a}return u()(t,e),t.prototype.render=function(){var e=this,t=this.props,i=t.className,r=t.serverEntityID,s=t.providerEntityID,o=t.metadataItemEntityID,l=t.route,c=t.title,u=t.viewCount,d=t.viewOffset,p=t.viewPercent,T=t.unviewedLeafCount,A=t.mediaCount,L=t.isLibraryVideo,k=t.isLibraryVideoDirectory,N=t.isMultiVersion,_=t.isMatching,O=t.isProcessing,R=t.isAnalyzing,j=t.isRefreshing,z=t.isTrash,U=t.showLink,F=t.showPlay,B=t.showEdit,V=t.showSelect,H=t.showMore,W=t.hasActiveSelection,Q=t.isSelected,Y=t.isOtherItemSelected,G=t.isConflictingTypeSelected,K=t.isModifierKeyPressed,q=t.onMouseEnter,Z=t.onPlayPress,X=t.onEditPress,J=t.onSelectPress,$=t.onDeselectPress,ee=this.state.isActionsMenuOpen,te=V&&(K||Y);
return a()("div",{className:f()(i,x.a.overlay,W&&x.a.hasActiveSelection,Q&&x.a.isSelected,Y&&x.a.isOtherItemSelected,G&&x.a.isConflictingTypeSelected,V&&K&&x.a.isModifierKeyPressed,j&&x.a.isRefreshing,z&&x.a.isTrash,ee&&x.a.isActionsMenuOpen),onMouseEnter:q},void 0,a()("div",{className:x.a.background}),L&&!u&&!d&&a()("div",{className:x.a.unwatchedTagContainer},void 0,a()("div",{className:x.a.unwatchedTag})),k&&!!T&&a()("div",{className:f()(x.a.unwatchedBadge)},void 0,T),N&&a()("div",{className:f()(x.a.versionBadge)
},void 0,a()(v.a,{name:"plex-icon-files-560",className:x.a.versionBadgeIcon}),A),!!p&&a()(D.a,{className:x.a.progress,progress:p}),j&&a()("div",{className:x.a.refreshingSpinnerContainer},void 0,a()(y.a,{className:x.a.refreshingSpinner})),_&&a()("div",{className:f()(x.a.refreshingCircle)},void 0,a()(v.a,{name:"plex-icon-search-560","aria-label":n.i(g.default)("Matching")})),O&&a()("div",{className:f()(x.a.refreshingCircle)},void 0,a()(v.a,{name:"plex-icon-tagging-560","aria-label":n.i(g.default)("Downloading Metadata")
})),R&&a()("div",{className:f()(x.a.refreshingCircle)},void 0,a()(v.a,{name:"plex-icon-analyzing-560","aria-label":n.i(g.default)("Analyzing")})),z&&a()("div",{className:f()(x.a.trashCircle)},void 0,a()(v.a,{name:"plex-icon-trash-560","aria-label":n.i(g.default)("In Trash")})),U&&a()(b.a,{className:x.a.link,to:l}),te&&!G&&a()(b.a,{className:x.a.selectCoverButton,onPress:J}),te&&G&&a()(w.a,{className:x.a.selectCoverButton,component:b.a,tooltip:n.i(g.default)("A different type is selected"),tooltipAttachment:m.e.TOP_CENTER,
tooltipTarget:this.refs.selectButton,showOnFocus:!1,hideOnPress:!1}),F&&a()(M.a,{className:U?x.a.playButton:x.a.playCoverButton,circleClassName:x.a.playCircle,tabIndex:"-1",title:c,"data-qa-id":"metadataPosterPlayButton",onPress:Z}),B&&a()(b.a,{className:x.a.editButton,tabIndex:"-1","aria-label":n.i(g.default)("Edit {title}",{title:c}),"data-qa-id":"metadataPosterEditButton",onPress:X},void 0,P),H&&h.a.createElement(b.a,{ref:function(t){e._moreButton=t},className:x.a.moreButton,tabIndex:"-1","aria-label":n.i(g.default)("More Actions"),
"aria-haspopup":!0,"data-qa-id":"metadataPosterMoreButton",onPress:this.onActionsPress},E,a()(S.a,{target:this._moreButton,isOpen:ee,onMenuClose:this.onActionsMenuClose},void 0,a()(C.a,{serverEntityID:r,providerEntityID:s,metadataItemEntityID:o,showPlay:!1,showEdit:!1}))),V&&a()(I.a,{className:x.a.selectButton,circleClassName:x.a.selectCircle,tabIndex:"-1",title:c,isSelected:Q,isDisabled:G,onPress:J}),Q&&a()(b.a,{className:x.a.deselectCoverButton,onPress:$}))},t}(d.Component);t.a=A},function(e,t,n){
"use strict";function i(){return n.i(c.createSelector)(function(e,t){var n=t.type;return n},n.i(h.a)(),p.a,f.a,n.i(g.a)(),n.i(m.a)(),function(e,t,i,a,r,s){var o=t.title,l=t.duration,c=t.viewCount,h=t.viewOffset,p=t.unviewedLeafCount,f=t.metadataState,g=t.mediaState,m=t.deletedAt,v=t.subscriptionID,y=t.subscriptionType,b=t.grandparentSubscriptionID,M=t.grandparentSubscriptionType,I=t.downloadUrl,C=t.isLibraryItem,D=t.isExtra,T=t.Media,x=n.i(S.a)(i,a,r),P=u.a.get(e),E=u.a.getChildMediaType(e),A=T.length,L=null!=v||null!=b,k=C&&!D&&"video"===P.element,N=C&&!D&&"directory"===P.element&&"video"===E.element,_=k&&A>1,O=f===d.a,R=f===d.b||f===d.c,j=!O&&!R&&!!g,z=O||R||j,U=!z&&!!m,F=h&&h/l*100;
return{server:i,provider:a,route:x,title:o,viewCount:c,viewOffset:h,viewPercent:F,unviewedLeafCount:p,mediaCount:A,subscriptionType:y,grandparentSubscriptionType:M,downloadUrl:I,isSubscribed:L,isLibraryVideo:k,isLibraryVideoDirectory:N,isMultiVersion:_,isMatching:O,isProcessing:R,isAnalyzing:j,isRefreshing:z,isTrash:U,showLink:!!x,showPlay:n.i(w.a)(i,a,t),showEdit:n.i(w.b)(i,a,t),showSelect:n.i(w.c)(i,a,t),showMore:!0,beginsAt:s&&s.beginsAt,endsAt:s&&s.endsAt}})}function a(e,t){var i={serverEntityID:t.serverEntityID,
metadataItemEntityID:t.metadataItemEntityID};return{onPlayPress:function(){e(n.i(v.playMetadataItem)(i))},onEditPress:function(){e(n.i(v.editMetadataItem)(i))}}}function r(e){return e.provider.protocols.livetv?o.a.createElement(I.a,e):e.showSelect?o.a.createElement(C,e):o.a.createElement(M.a,e)}var s=n(1),o=n.n(s),l=n(15),c=n(9),u=(n.n(c),n(36)),d=n(679),h=n(29),p=n(58),f=n(62),g=n(481),m=n(281),v=n(113),y=n(545),b=n(301),S=(n(79),n(86)),w=n(233),M=n(1932),I=n(1928),C=n.i(y.a)(M.a);t.a=n.i(l.b)(i,a,b.a)(r);
},function(e,t,n){"use strict";function i(e){switch(e){case"artist":return"track";default:return e}}function a(e){var t=e.serverEntityID,n=e.isOffscreen,a=e.tagType,r=e.librarySectionType,o=e.title,p=e.url,f=e.width,g=e.height,m=e.transitionProps,v=e.onLoad,y=e.onError;if(n)return null;if(p)return s()(h.a,{serverEntityID:t,url:p,width:f,height:g,transitionProps:m,backgroundPosition:"center center",onLoad:v,onError:y});var b=c.a.get(a);if(b&&b.isPerson)return s()(u.a,{name:o,width:f,height:g});var S=l.a.get(r),w=S&&S.typeString,M=i(w);
return s()(d.a,{type:M,width:f,height:g})}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),n(104)),c=n(340),u=n(1843),d=n(838),h=n(821);t.a=a},function(e,t,n){"use strict";function i(e){var t=e.rating,n=e.ratingImage,i=e.audienceRating,a=e.audienceRatingImage;return t?g.test(n)?"imdb":m.test(n)||i&&m.test(a)?"rt":"other":"unrated"}function a(e){var t=e.rating;return c()("div",{className:f.a.rating,title:n.i(h.default)("IMDb Rating")},void 0,c()("div",{className:f.a.imdb}),t.toFixed(1))}function r(e){var t=e.rating,i=e.ratingImage,a=e.audienceRating,r=e.audienceRatingImage,s=i&&i.substr(i.lastIndexOf(".")+1),o=a&&r&&r.substr(r.lastIndexOf(".")+1),l={
certified:n.i(h.default)("Certified Fresh"),ripe:n.i(h.default)("Fresh"),rotten:n.i(h.default)("Rotten"),spilled:n.i(h.default)("Audience Rating"),upright:n.i(h.default)("Audience Rating")};return c()("div",{className:f.a.rt},void 0,s&&c()("div",{className:f.a.rating},void 0,c()("div",{className:f.a[s],title:l[s]}),Math.round(10*t)+"%"),o&&c()("div",{className:f.a.rating},void 0,c()("div",{className:f.a[o],title:l[o]}),Math.round(10*a)+"%"))}function s(e){var t=e.rating;return c()("div",{className:f.a.rating
},void 0,c()("div",{className:f.a.other,title:n.i(h.default)("Rating")}),Math.round(10*t)+"%")}function o(e){var t=i(e),n=v[t];return n?c()("div",{className:f.a.container},void 0,d.a.createElement(n,e)):null}var l=n(3),c=n.n(l),u=n(1),d=n.n(u),h=n(4),p=n(2470),f=n.n(p),g=/^imdb\:\/\//,m=/^rottentomatoes\:\/\//,v={imdb:a,rt:r,other:s};t.a=o},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.tabIndex,a=e.server,s=e.provider,c=e.librarySectionKey,u=e.tag,d=e.filter;if(!u)return null;var h={
filters:d,filterLabel:u},p=n.i(o.a)(a,s,c,h);return p&&d?r()(l.a,{className:t,tabIndex:i,title:u,to:p},void 0,u):r()("span",{className:t,title:u},void 0,u)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(165)),l=(n(80),n(79),n(26));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.role;return r()("span",{className:t,title:n},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
return{grandparentTitle:e.grandparentTitle}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(512);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.grandparentTitle,a=e.grandparentRoute;return r()(o.a,{className:t,tabIndex:n,title:i,route:a})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(296));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.parentTitle,a=e.parentRoute;return r()(o.a,{className:t,tabIndex:n,title:i,route:a})}
var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(296));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.addedAt;return r()(o.a,{className:t,timestamp:n})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(854));t.a=i},function(e,t,n){"use strict";function i(e,t){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.addedAt;return{addedAt:t}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1941);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";
function i(e){var t=e.className,i=e.skipChildren,a=e.childCount,s=e.leafCount;if(i)return r()(l.a,{className:t,leafCount:s});var c=void 0;return null!=a&&(c=1===a?n.i(o.default)("{1} album",a):n.i(o.default)("{1} albums",a)),r()("span",{className:t},void 0,c)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(1971);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.bitrate;return r()("span",{className:t},void 0,n.i(o.default)(i))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(330));t.a=i;
},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.Media&&e.Media[0];return{bitrate:t&&t.bitrate}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1944);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.title,i=e.originalTitle;return r()("span",{className:t},void 0,n,!!i&&r()("span",{className:c.a.trackArtist},void 0,!!n&&u,i))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(108)),l=n(2472),c=n.n(l),u=r()(o.a,{});t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{title:e.title,originalTitle:e.originalTitle}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1946);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.rating,i=e.ratingImage,a=e.audienceRating,s=e.audienceRatingImage;return n?r()("span",{className:t},void 0,r()(o.a,{
rating:n,ratingImage:i,audienceRating:a,audienceRatingImage:s})):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(1935));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.date;return i?r()("span",{className:t},void 0,n.i(o.default)(i)):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(152));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.addedAt;return n?r()(o.a,{className:t,date:1e3*n}):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(1949));t.a=i},function(e,t,n){"use strict";
function i(e){var t=e.className,i=e.index,a=e.originallyAvailableAt,s=n.i(o.a)({episodePrefix:"Episode {1}",episodeIndex:i,date:a,noLeadingZero:!0});return r()("span",{className:t},void 0,s)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(265));t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{index:e.index,originallyAvailableAt:e.originallyAvailableAt}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1951);
t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.extraType,i=o.a.get(n);return r()("span",{className:t},void 0,i?i.title:"")}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(464));t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{extraType:e.extraType}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1953);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(){
return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{index:e.index}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(846);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.leafCount,a=void 0;return null!=i&&(a=1===i?n.i(o.default)("{1} item",i):n.i(o.default)("{1} items",i)),r()("span",{className:t},void 0,a)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4));t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.lastViewedAt;return r()(o.a,{className:t,timestamp:n})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(854));t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{title:i.title,route:n.i(c.a)(e,t,i.key)}})}var a=n(15),r=n(9),s=(n.n(r),n(58)),o=n(62),l=n(29),c=n(86),u=n(296);t.a=n.i(a.b)(i)(u.a)},function(e,t,n){"use strict";function i(e){var t=(e.className,e.duration,
e.viewOffset),n=e.viewCount;return n||t?t?r()("div",{className:l.a.partiallyWatchedCircle}):null:r()("div",{className:l.a.unwatchedCircle})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2475)),l=n.n(o);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{duration:e.duration,viewOffset:e.viewOffset,viewCount:e.viewCount}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1959);t.a=n.i(a.b)(i)(o.a);
},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.duration;return i?r()("span",{className:t},void 0,n.i(o.a)(i)):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(125));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.duration,i=e.viewOffset,a=e.viewCount;return a||i?r()(o.a,{className:t,duration:n,viewOffset:i}):r()("div",{className:c.a.unwatchedCircle})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(849)),l=n(2476),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(){
return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{duration:e.duration,viewOffset:e.viewOffset,viewCount:e.viewCount}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1962);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.originallyAvailableAt;return r()("span",{className:t},void 0,n.i(o.default)(i,"MMM D, YYYY"))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(152));t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,i=e.videoResolution;return r()("span",{className:t},void 0,n.i(o.default)(i))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(267));t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.Media&&e.Media[0];return{videoResolution:t&&t.videoResolution}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1965);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.skipChildren,a=e.childCount,s=e.leafCount;
if(i)return r()(l.a,{className:t,leafCount:s});var c=void 0;return null!=a&&(c=1===a?n.i(o.default)("{1} season",a):n.i(o.default)("{1} seasons",a)),r()("span",{className:t},void 0,c)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(845);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{title:i.title,index:i.index,route:n.i(c.a)(e,t,i.key),parentTitle:i.parentTitle,parentIndex:i.parentIndex,
parentRoute:n.i(c.a)(e,t,i.parentKey),originallyAvailableAt:i.originallyAvailableAt}})}var a=n(15),r=n(9),s=(n.n(r),n(58)),o=n(62),l=n(29),c=n(86),u=n(853);t.a=n.i(a.b)(i)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.originalTitle;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{
originalTitle:e.originalTitle}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1969);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.leafCount,a=void 0;return null!=i&&(a=1===i?n.i(o.default)("{1} track",i):n.i(o.default)("{1} tracks",i)),r()("span",{className:t},void 0,a)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.parentTitle,a=e.parentRoute,s=e.grandparentTitle,o=e.grandparentRoute;
return r()("span",{className:t},void 0,r()(l.a,{tabIndex:n,title:s,route:o}),c,r()(l.a,{tabIndex:n,title:i,route:a}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(108)),l=n(296),c=r()(o.a,{});t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{parentTitle:i.parentTitle,parentRoute:n.i(c.a)(e,t,i.parentKey),grandparentTitle:i.grandparentTitle,grandparentRoute:n.i(c.a)(e,t,i.grandparentKey)
}})}var a=n(15),r=n(9),s=(n.n(r),n(58)),o=n(62),l=n(29),c=n(86),u=n(1972);t.a=n.i(a.b)(i)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.unviewedLeafCount,a=void 0;return i>0&&(a=n.i(o.default)("{numEpisodes} unwatched",{numEpisodes:i})),r()("span",{className:t},void 0,a)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4));t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
return{unviewedLeafCount:e.unviewedLeafCount}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1974);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.value,i=e.onRatingChange;return r()("span",{className:t},void 0,r()(o.a,{value:n,onRatingChange:i}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(1848));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.viewCount;return r()("span",{className:t},void 0,n>0?n:null)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){
"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{viewCount:e.viewCount}})}var a=n(15),r=n(9),s=(n.n(r),n(29)),o=n(1977);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){return c.a.createElement(h.a,r()({tooltip:n.i(u.default)("Edit")},e),o()(d.a,{name:"plex-icon-toolbar-edit-560","aria-label":n.i(u.default)("Edit")}))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(30),h=n(228);
t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(25),v=n(501),y=n(115),b=n(163),S=n(372),w=function(e){function t(n,i){l()(this,t);var a=u()(this,e.call(this,n,i));return a.onMenuButtonPress=function(e){a.setState({isMenuOpen:!a.state.isMenuOpen})},a.onMenuClose=function(){a.setState({isMenuOpen:!1})},a.onMarkWatchedPress=function(e){a.setState({isMarkWatchedModalOpen:!0})},a.onMarkUnwatchedPress=function(e){
a.setState({isMarkUnwatchedModalOpen:!0})},a.onMarkWatchedConfirm=function(){a.setState({isMarkWatchedModalOpen:!1}),a.props.onMarkWatchedConfirm()},a.onMarkWatchedCancel=function(){a.setState({isMarkWatchedModalOpen:!1})},a.onMarkUnwatchedConfirm=function(){a.setState({isMarkUnwatchedModalOpen:!1}),a.props.onMarkUnwatchedConfirm()},a.onMarkUnwatchedCancel=function(){a.setState({isMarkUnwatchedModalOpen:!1})},a.state={isMenuOpen:!1,isMarkWatchedModalOpen:!1,isMarkUnwatchedModalOpen:!1},a}return h()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return n.i(m.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.numSelectedItems,i=e.showMarkWatched,r=e.showMarkUnwatched,o=this.state,l=o.isMenuOpen,c=o.isMarkWatchedModalOpen,u=o.isMarkUnwatchedModalOpen;return f.a.createElement(S.a,a()({ref:"watchedButton",icon:"plex-icon-toolbar-watched-toggle-560",label:n.i(g.default)("Toggle Watched..."),isMenuOpen:l,onPress:this.onMenuButtonPress},this.props),s()(v.a,{target:this.refs.watchedButton,
isOpen:l,onMenuClose:this.onMenuClose},void 0,i&&s()(y.a,{onPress:this.onMarkWatchedPress},void 0,n.i(g.default)("Mark Watched")),r&&s()(y.a,{onPress:this.onMarkUnwatchedPress},void 0,n.i(g.default)("Mark Unwatched"))),s()(b.a,{isOpen:c,metricsPage:"confirmMarkWatched",title:n.i(g.default)("Mark Watched"),message:1===t?n.i(g.default)("Are you sure you want to mark this item as watched?"):n.i(g.default)("Are you sure you want to mark these {1} items as watched?",t),onConfirm:this.onMarkWatchedConfirm,
onCancel:this.onMarkWatchedCancel}),s()(b.a,{isOpen:u,metricsPage:"confirmMarkUnwatched",title:n.i(g.default)("Mark Unwatched"),message:1===t?n.i(g.default)("Are you sure you want to mark this item as unwatched?"):n.i(g.default)("Are you sure you want to mark these {1} items as unwatched?",t),onConfirm:this.onMarkUnwatchedConfirm,onCancel:this.onMarkUnwatchedCancel}))},t}(p.Component);t.a=w},function(e,t,n){"use strict";function i(e){var t=e.children,n=o()(e,["children"]);return c.a.createElement(u.a,r()({
className:h.a.page},n),t)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(70),d=n(2477),h=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.machineIdentifier,a=e.isWaitingForPrimaryServer,s=e.primaryServerEntityID,l=c()(e,["children","machineIdentifier","isWaitingForPrimaryServer","primaryServerEntityID"]),u=n.i(f.a)(p.f,i),m=!u||u===s;return s&&m?d.a.createElement(y.a,o()({serverEntityID:s},l),t):a||!m?r()(v.a,{},void 0,r()(g.a,{label:n.i(h.default)("Connecting")
})):b}var a=n(3),r=n.n(a),s=n(7),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(4),p=n(67),f=n(65),g=n(41),m=n(863),v=n(140),y=n(1986),b=r()(m.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.isHubKey,a=e.selectedDirectory,s=e.activeType,o=e.activeFilters,d=e.activeFilterLabel,h=e.activeSort;return a&&i?r()(l.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:a}):a?r()(c.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:a,activeType:s,
activeFilters:o,activeFilterLabel:d,activeSort:h}):u}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(864)),l=n(1993),c=n(2011),u=r()(o.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.hasProvider,a=e.showSpinner,s=e.showError,l=o()(e,["children","hasProvider","showSpinner","showError"]);if(a)return r()(h.a,{},void 0,r()(d.a,{label:n.i(u.default)("Loading libraries")}));if(s)return r()(p.a,{title:n.i(u.default)("There was an unexpected error loading libraries")});if(!i)return g;var f=c.a.Children.only(t);
return c.a.cloneElement(f,l)}var a=n(3),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(41),h=n(140),p=n(297),f=n(864),g=r()(f.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.friendlyName,a=e.isConnected,s=e.isUnavailable,l=e.isUnauthorized,g=e.isFullServer,m=e.isFullOwnedServer,v=e.hasHttpsConnections,y=e.requiresFullServer,b=e.requiresFullOwnedServer,S=o()(e,["children","friendlyName","isConnected","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","hasHttpsConnections","requiresFullServer","requiresFullOwnedServer"]);
if(a){if(y&&!g||b&&!m)return r()(f.a,{title:n.i(u.default)("You're not supposed to be here"),description:i?n.i(u.default)('This page is restricted from the server "{1}"',i):n.i(u.default)("This page is restricted from this server")});var w=c.a.Children.only(t);return c.a.cloneElement(w,S)}if(s){var M=void 0;return d.a.isHostedHttps&&!v&&(M=n.i(u.default)('Tip: If "Secure connections" in your server\'s network settings is disabled, select "Preferred" to use the secure web app')),r()(f.a,{title:i?n.i(u.default)('The server "{1}" is unavailable',i):n.i(u.default)("This server is unavailable"),
description:n.i(u.default)("Plex will automatically try to reconnect to this server"),footer:M})}if(l)return r()(f.a,{title:n.i(u.default)("No soup for you!"),description:n.i(u.default)("You do not have access to this server")});var I=i?n.i(u.default)("Connecting to {1}",i):n.i(u.default)("Connecting");return r()(p.a,{},void 0,r()(h.a,{label:I}))}var a=n(3),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(61),h=n(41),p=n(140),f=n(118);t.a=i},function(e,t,n){"use strict";function i(){return n.i(u.createSelector)(n.i(d.a)(),function(e){
var t=s.a.pick(e,"friendlyName","isConnected","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","hasHttpsConnections");return t})}function a(e){return l.a.createElement(h.a,e)}var r=n(2),s=n.n(r),o=n(1),l=n.n(o),c=n(15),u=n(9),d=(n.n(u),n(63)),h=n(1985);t.a=n.i(c.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.closedNode,a=e.title,s=e.isOpen,l=e.updateUserError,v=e.isUpdatingUser,b=e.onSubmit,S=e.onErrorDismiss,w=e.onTogglePress,M=s&&l?n.i(u.a)(o.a.first(l.request)):null;
return r()(f.a,{isOpen:s,errorMessage:M,closedNode:r()(g.a,{className:y.a.sectionDetails},void 0,r()(p.a,{className:y.a.label},void 0,a),i),onErrorDismiss:S,onTogglePress:w},void 0,r()(h.a,{onSubmit:b},void 0,t,r()("div",{className:y.a.submitButton},void 0,r()(m.a,{type:"submit",isSpinning:v,kind:d.PRIMARY},void 0,n.i(c.default)("Save Changes")))))}var a=n(3),r=n.n(a),s=n(2),o=n.n(s),l=n(1),c=(n.n(l),n(4)),u=n(264),d=n(132),h=n(139),p=n(90),f=n(876),g=n(539),m=n(97),v=n(2485),y=n.n(v);t.a=i},function(e,t,n){
"use strict";var i=n(3),a=n.n(i),r=n(17),s=n.n(r),o=n(7),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=n.n(v),b=n(4),S=n(328),w=n(264),M=n(889),I=n(90),C=n(819),D=n(499),T=n(1850),x=n(820),P=n(540),E=n(541),A=n(118),L=n(1851),k=n(1847),N=n(1987),_=n(1991),O=a()("span",{},void 0," \u2014 ",a()(k.a,{})),R=function(e){function t(n,i){u()(this,t);var a=h()(this,e.call(this,n,i));return a.onFormSubmit=function(e){a.props.updateUser(e)},a.onErrorDismiss=function(e){
e.preventDefault(),a.props.clearUpdateUserError()},a.createToggleHandler=function(e){return function(t){var n;t.preventDefault();var i=a.state.AccountFormSections,r=i[e];a.props.updateUserError&&a.props.clearUpdateUserError(),a.setState({AccountFormSections:l()({},m.a.mapObject(i,function(){return!1}),(n={},n[e]=!r,n))})}},a.getAccountFormSectionProps=function(e,t){return{title:e,onTogglePress:a.createToggleHandler(t),isOpen:a.state.AccountFormSections[t],onSubmit:a.onFormSubmit,onErrorDismiss:a.onErrorDismiss,
isUpdatingUser:a.props.isUpdatingUser,updateUserError:a.props.updateUserError}},a.state={AccountFormSections:{isUsernameOpen:!1,isEmailOpen:!1,isPasswordOpen:!1,isLocaleOpen:!1,isPhotoOpen:!1,isNewsletterOpen:!1}},a}return f()(t,e),t.prototype.componentWillReceiveProps=function(e){if(this.props.isUpdatingUser&&!e.isUpdatingUser&&!e.updateUserError){var t=this.state.AccountFormSections;this.setState({AccountFormSections:m.a.mapObject(t,function(){return!1})})}},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.user,r=s()(e,["serverEntityID","user"]),o=m.a.mapObject(r.updateUserError,function(e){
return e.map(function(e){return n.i(w.a)(e)})}),c=n.i(b.default)("System Default"),u=m.a.map(S.a,function(e,t){var n;return n={},n[t]=e,n});return i.restricted?a()(A.a,{title:n.i(b.default)("You're not supposed to be here"),description:n.i(b.default)("Managed users are restricted from account settings")}):a()(P.a,{},void 0,a()(E.a,{},void 0,n.i(b.default)("Account"),i.hasPlexPass&&O),y.a.createElement(N.a,l()({},this.getAccountFormSectionProps(n.i(b.default)("Photo"),"isPhotoOpen"),{closedNode:a()(L.a,{
serverEntityID:t,url:this.props.user.thumb,width:80,height:80})}),a()(I.a,{},void 0,n.i(b.default)("Photo")),a()(_.a,{serverEntityID:t,name:"avatar",width:180,height:180,isDeletingAvatar:this.props.isDeletingAvatar,initialValue:this.props.user.thumb,url:this.props.user.thumb})),y.a.createElement(N.a,l()({},this.getAccountFormSectionProps(n.i(b.default)("Language"),"isLocaleOpen"),{closedNode:S.a[i.locale]||c}),a()(x.a,{labelText:n.i(b.default)("Language"),helpText:n.i(b.default)("This sets the default language for Plex applications that do not provide their own language setting."),
name:"locale",initialValue:i.locale,values:[{"":c}].concat(u)})),y.a.createElement(N.a,l()({},this.getAccountFormSectionProps(n.i(b.default)("Username"),"isUsernameOpen"),{closedNode:i.username}),a()(D.a,{labelText:n.i(b.default)("Username"),helpText:n.i(b.default)("Your username will be visible to friends with whom you have shared your server."),name:"username",initialValue:i.username,errors:o.username,validations:[M.b]}),a()(C.a,{name:"emailOnlyAuth",checkboxText:n.i(b.default)("Allow username to be used when signing in"),
helpText:n.i(b.default)("Your email address will be required to sign in when username sign-in is not allowed."),initialValue:i.emailOnlyAuth,checkedValue:!1,uncheckedValue:!0})),y.a.createElement(N.a,l()({},this.getAccountFormSectionProps(n.i(b.default)("Email Address"),"isEmailOpen"),{closedNode:i.email}),a()(D.a,{labelText:n.i(b.default)("Email Address"),name:"email",initialValue:i.email,errors:o.email,validations:[M.c]}),a()(D.a,{labelText:n.i(b.default)("Password"),type:"password",name:"currentPassword",
initialValue:"",validations:[M.d]})),y.a.createElement(N.a,l()({},this.getAccountFormSectionProps(n.i(b.default)("Password"),"isPasswordOpen"),{closedNode:"**********"}),a()(T.a,{labelText:n.i(b.default)("New Password"),name:"password",initialValue:"",errors:o.password,validations:[M.d,M.e]}),a()(D.a,{labelText:n.i(b.default)("Confirm New Password"),type:"password",name:"passwordConfirmation",initialValue:"",validations:[M.f,M.g]}),a()(D.a,{labelText:n.i(b.default)("Current Password"),type:"password",
name:"currentPassword",initialValue:"",validations:[M.h]}),a()(C.a,{checkboxText:n.i(b.default)("Sign out connected devices after password change"),name:"resetDevices",initialValue:!1})),y.a.createElement(N.a,l()({},this.getAccountFormSectionProps(n.i(b.default)("Plex News"),"isNewsletterOpen"),{closedNode:i.mailingListActive?n.i(b.default)("You are currently subscribed"):n.i(b.default)("You are not subscribed")}),a()(C.a,{name:"mailingListActive",initialValue:i.mailingListActive,labelText:n.i(b.default)("Plex News"),
checkboxText:n.i(b.default)("Subscribe to our amazing, but infrequent email newsletter")})))},t}(v.Component);t.a=R},function(e,t,n){"use strict";function i(e){return o.a.createElement(p.a,e)}var a=n(2),r=n.n(a),s=n(1),o=n.n(s),l=n(15),c=n(9),u=(n.n(c),n(174)),d=n(257),h=n(345),p=n(1988),f=n.i(c.createSelector)(u.a,d.a,function(e,t){var n=e.desktop;return{serverEntityID:t.entityID,user:r.a.pick(e,"username","email","emailOnlyAuth","thumb","locked","locale","hasPlexPass","mailingListActive","restricted"),
isUpdatingUser:n.isUpdatingUser,updateUserError:n.updateUserError}}),g={updateUser:h.i,clearUpdateUserError:h.j};t.a=n.i(l.b)(f,g)(i)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(7),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(20),m=n(4),v=n(263),y=n(25),b=n(30),S=n(358),w=n(51),M=n(162),I=n(2486),C=n.n(I),D=a()(b.a,{name:"plex-icon-avatar-crop-min-560"}),T=a()(b.a,{name:"plex-icon-avatar-crop-max-560"}),x=function(e){function t(n,i){l()(this,t);var a=u()(this,e.call(this,n,i));
return a.onMouseDown=function(e){e.preventDefault(),a.startAvatarDrag(e.clientX,e.clientY)},a.onTouchStart=function(e){e.preventDefault();var t=e.touches.item(0);t&&a.startAvatarDrag(t.clientX,t.clientY,!0)},a.onTouchMove=function(e){var t=e.touches.item(0);t&&a.dragAvatar(t.clientX,t.clientY)},a.onMouseMove=function(e){a.dragAvatar(e.clientX,e.clientY)},a.onMouseUp=function(){a.stopAvatarDrag()},a.onTouchEnd=function(){a.stopAvatarDrag()},a.onFileDrop=function(e){e.preventDefault(),a.setState({isOverDropTarget:!1
}),a.dropTargetEnteredCounter=0;var t=void 0;if(e.dataTransfer&&e.dataTransfer.files.length?t=e.dataTransfer.files[0]:e.target.files&&e.target.files.length&&(t=e.target.files[0]),t){var n=new window.FileReader;n.onload=function(e){return a.loadImage(e.target.result)},n.readAsDataURL(t)}},a.onDragEnter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;e.preventDefault(),a.dropTargetEnteredCounter++,a.setOverDropTargetState()},a.onDragLeave=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;
e.preventDefault(),a.dropTargetEnteredCounter--,a.setOverDropTargetState()},a.onSliderChange=function(e){var t=e.steppedValue;a.setState(function(e){var n=e.offsetX,i=e.offsetY,r=a.initialWidth*t,o=a.initialHeight*t,l=(a.imageWidth-r)/2,c=(a.imageHeight-o)/2,u=a.props.width-r,d=a.props.height-o,h=Math.max(u,Math.min(n+l,0)),p=Math.max(d,Math.min(i+c,0));return s()({},e,{scale:t,offsetX:h,offsetY:p})},function(){return a.props.onChange(a.getImageDataUrl())})},a.state={drag:!1,dragX:0,dragY:0,minScale:.1,
maxScale:1,scale:.1,offsetX:0,offsetY:0,isOverDropTarget:!1},a.dropTargetEnteredCounter=0,a}return h()(t,e),t.prototype.componentDidMount=function(){window.addEventListener("dragover",this.onWindowDragOver),window.addEventListener("drop",this.onWindowDrop),this.paint(),this.loadImage(this.props.url)},t.prototype.componentWillReceiveProps=function(e){this.props.url!==e.url&&this.loadImage(e.url)},t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.componentDidUpdate=function(){
this.paint()},t.prototype.componentWillUnmount=function(){window.removeEventListener("dragover",this.onWindowDragOver),window.removeEventListener("drop",this.onWindowDrop),this.stopListeningForDrag()},t.prototype.listenForDrag=function(e){e?(document.addEventListener("touchmove",this.onTouchMove),document.addEventListener("touchcancel",this.onTouchEnd),document.addEventListener("touchend",this.onTouchEnd)):(document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp));
},t.prototype.stopListeningForDrag=function(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("touchcancel",this.onTouchEnd),document.removeEventListener("touchend",this.onTouchEnd)},t.prototype.startAvatarDrag=function(e,t,n){this.listenForDrag(n),this.setState({drag:!0,dragX:e,dragY:t})},t.prototype.dragAvatar=function(e,t){var n=this;this.state.drag&&this.setState(function(i){
var a=i.offsetX,r=i.offsetY,o=i.dragX,l=i.dragY,c=n.props.width-n.imageWidth,u=n.props.height-n.imageHeight,d=Math.max(c,Math.min(a+(e-o),0)),h=Math.max(u,Math.min(r+(t-l),0));return s()({},i,{dragX:e,dragY:t,offsetX:d,offsetY:h})})},t.prototype.stopAvatarDrag=function(){var e=this;this.stopListeningForDrag(),this.setState({drag:!1},function(){return e.props.onChange(e.getImageDataUrl())})},t.prototype.loadImage=function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props,a=new window.Image;
a.onload=function(){return t.onImageLoad(a)},/^https?:\/\//.test(e)&&a.setAttribute("crossOrigin","anonymous");var r=e;if(0!==e.indexOf("data:")){var s=n.i(v.a)(),o={width:Math.round(i.width*s),height:Math.round(i.height*s),minSize:1},l=e.indexOf("?");l>-1?(r=g.join(e.substring(0,l),o),r+=r.indexOf("?")===-1?"?":"&",r+=e.substring(l+1)):r=g.join(r,o)}a.src=r},t.prototype.paint=function(){var e=this.props,t=e.width,n=e.height,i=this.refs.canvas.getContext("2d");i.clearRect(0,0,t,n),this.image&&this.drawImage(i);
var a=document.createElement("canvas"),r=a.getContext("2d");a.width=t,a.height=n,r.fillStyle="rgba(0,0,0,0.6)",r.fillRect(0,0,a.width,a.height),r.globalCompositeOperation="destination-out",r.arc(t/2,n/2,t/2,0,2*Math.PI),r.fill(),i.drawImage(a,0,0)},t.prototype.drawImage=function(e){this.imageWidth=this.initialWidth*this.state.scale,this.imageHeight=this.initialHeight*this.state.scale,e.drawImage(this.image,this.state.offsetX,this.state.offsetY,this.imageWidth,this.imageHeight)},t.prototype.getImageDataUrl=function(){
var e=document.createElement("canvas"),t=e.getContext("2d");return e.height=this.props.height,e.width=this.props.width,this.drawImage(t),e.toDataURL()},t.prototype.setOverDropTargetState=function(){this.state.isOverDropTarget||0===this.dropTargetEnteredCounter||this.setState({isOverDropTarget:!0}),this.state.isOverDropTarget&&0===this.dropTargetEnteredCounter&&this.setState({isOverDropTarget:!1})},t.prototype.onImageLoad=function(e){var t=this;this.image=e,this.initialWidth=Math.max(this.props.width,e.width),
this.initialHeight=Math.max(this.props.height,e.height);var n=e.width>e.height?e.height:e.width,i=n>this.props.width?this.props.width/n:1,a=n<=this.props.width?2:1;this.setState({drag:!1,dragX:0,dragY:0,minScale:i,maxScale:a,scale:i,offsetX:0,offsetY:0},function(){return t.props.onChange(t.getImageDataUrl())})},t.prototype.onWindowDrop=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;e.preventDefault()},t.prototype.onWindowDragOver=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;
e.preventDefault()},t.prototype.onDragStart=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;e.dataTransfer.effectAllowed="copyMove"},t.prototype.onDragOver=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;e.dataTransfer.dropEffect="copy"},t.prototype.render=function(){var e=this.state.isOverDropTarget;return a()("div",{className:C.a.avatarContainer,onDrop:this.onFileDrop,onDragOver:this.onDragOver,onDragStart:this.onDragStart,
onDragLeave:this.onDragLeave,onDragEnter:this.onDragEnter},void 0,a()("div",{className:C.a.avatarPane},void 0,f.a.createElement("canvas",{className:e?C.a.isOverDropTarget:"",ref:"canvas",width:this.props.width,height:this.props.height,onTouchStart:this.onTouchStart,onMouseDown:this.onMouseDown}),a()("div",{className:C.a.sliderContainer},void 0,a()("span",{className:C.a.sliderEnd},void 0,D),a()("span",{className:C.a.sliderWrapper},void 0,a()(S.a,{className:C.a.slider,min:this.state.minScale,max:this.state.maxScale,
step:.1,value:this.state.scale,onChange:this.onSliderChange})),a()("span",{className:C.a.sliderEnd},void 0,T))),a()("div",{className:C.a.avatarTextPane},void 0,a()("p",{},void 0,a()(w.a,{component:"label",className:C.a.avatarActionButtons},void 0,n.i(m.default)("Choose Photo"),a()("input",{style:{display:"none"},type:"file",onChange:this.onFileDrop,accept:"image/*"}))),a()("p",{className:C.a.help},void 0,n.i(m.default)("You can scale your photo using the slider below, and adjust the crop by dragging it within the circle."))));
},t}(p.Component);x.defaultProps={height:200,width:200,onChange:function(){}},t.a=n.i(M.a)(x)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(e){return{url:e}})}var a=n(15),r=n(9),s=(n.n(r),n(665)),o=n(1990);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.providerIdentifier,a=e.isProgramGuide,s=e.selectedDirectory,m=e.activeSelectionType,y=e.hubEntityIDs,b=e.isHubsPending,S=e.hubsError,w=e.isEmpty;
return r()(l.a,{scrollDirection:o.a.NONE},void 0,m?r()(u.a,{serverEntityID:t,providerEntityID:n}):r()(g.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:s}),r()(c.a,{innerClassName:v.a.dashboardPageContent},void 0,w?r()(f.a,{serverEntityID:t,providerEntityID:n,providerIdentifier:i,isPending:b,error:S}):r()(d.a,{serverEntityID:t,providerEntityID:n,hubEntityIDs:y}),a&&!w&&r()(h.a,{className:v.a.attribution})),a&&r()(p.a,{serverEntityID:t,providerEntityID:n}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(23)),l=n(194),c=n(231),u=n(375),d=n(835),h=n(504),p=n(827),f=n(1998),g=n(1995),m=n(2487),v=n.n(m);t.a=i},function(e,t,n){"use strict";function i(){return n.i(p.createSelector)(n.i(m.a)(),function(e){return e.ui.dashboardPage},w,y.a,function(e,t,n,i){return{isPagePopulated:t.isPagePopulated,providerIdentifier:e.identifier,isProgramGuide:g.a.EPG_IDENTIFIER.test(e.identifier),hubEntityIDs:t.hubs||[],isHubsPending:t.isHubsPending,hubsError:t.hubsError,isEmpty:n,activeSelectionType:i.activeSelectionType
}})}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(1),d=n.n(u),h=n(15),p=n(9),f=(n.n(p),n(35)),g=n(72),m=n(103),v=n(668),y=n(136),b=n(1547),S=n(1992),w=n.i(p.createSelector)(v.a,function(e){return e.ui.dashboardPage.hubs},function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.length;n-- >0;){var i=t[n],a=e[i];if(a.size||a.totalSize)return!1}return!0}),M=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.componentWillMount=function(){
this._populate()},t.prototype.componentWillReceiveProps=function(e){var t=e.selectedDirectory;t!==this.props.selectedDirectory&&this._populate(e)},t.prototype.componentWillUnmount=function(){this.props.clearDashboardPage()},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;n.i(f.a)(function(){e.initDashboardPage({serverEntityID:e.serverEntityID,hubKey:e.selectedDirectory.hubKey}),e.fetchHubs({options:{onlyTransient:!0}})})},t.prototype.render=function(){
return this.props.isPagePopulated?d.a.createElement(S.a,this.props):null},t}(u.Component);t.a=n.i(h.b)(i,b)(M)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(4),f=n(25),g=n(23),m=n(41),v=n(293),y=n(195),b=n(196),S=n(520),w=n(232),M=n(522),I=n(521),C=n(373),D=n(2488),T=n.n(D),x=a()(M.a,{}),P=a()(w.a,{},void 0,a()(v.a,{})),E=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onDirectoriesMenuButtonPress=function(e){
a.setState({isDirectoriesMenuOpen:!a.state.isDirectoriesMenuOpen})},a.onDirectoriesMenuClose=function(){a.setState({isDirectoriesMenuOpen:!1})},a.state={isDirectoriesMenuOpen:!1},a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.machineIdentifier,i=e.providerIdentifier,r=e.isLibraryProvider,s=e.directories,o=e.selectedDirectory,l=e.isEPGRefreshing,c=e.epgActivityProgress,u=e.epgActivityTitle;return a()(y.a,{},void 0,a()(b.a,{},void 0,r&&a()("span",{},void 0,n.i(p.default)("Discover"),x),h.a.createElement(I.a,{
ref:"directoriesMenuButton","data-qa-id":"directoriesMenuButton",hasMenu:s.length>1,title:o.isHomeDirectory?n.i(p.default)("All Libraries"):o.title,onPress:this.onDirectoriesMenuButtonPress}),a()(C.a,{target:this.refs.directoriesMenuButton,isOpen:this.state.isDirectoriesMenuOpen,machineIdentifier:t,providerIdentifier:i,isLibraryProvider:r,directories:s,selectedDirectory:o,onMenuClose:this.onDirectoriesMenuClose})),l&&a()(S.a,{},void 0,u," (",c,"%)",a()(m.a,{className:T.a.refreshingSpinner,size:g.d.SMALL
})),P)},t}(d.Component);t.a=E},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(n.i(c.a)(),n.i(u.a)(),n.i(d.a)(),n.i(h.a)(),function(e,t,n,i){var a={machineIdentifier:e.machineIdentifier,providerIdentifier:t.identifier,isLibraryProvider:t.isLibraryProvider,directories:n};return i&&(a.isEPGRefreshing=!0,a.epgActivityProgress=i.progress,a.epgActivityTitle=i.title),a})}function a(e){return s.a.createElement(p.a,e)}var r=n(1),s=n.n(r),o=n(15),l=n(9),c=(n.n(l),n(63)),u=n(103),d=n(255),h=n(349),p=n(1994);
t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.friendlyName,i=e.isFullServer,a=e.isFullOwnedServer,s=e.isPending,d=e.isPersonalCloudServer,g=e.error,m=e.hasLibraries,v=e.onAddLibraryPress;return s?r()(h.a,{},void 0,r()(c.a,{label:n.i(o.default)("Loading dashboard")})):g&&i?r()(p.a,{title:n.i(o.default)("There was an unexpected error loading the dashboard")},void 0,d&&f):g&&!i?r()(h.a,{title:n.i(o.default)('The server "{1}" does not support the dashboard',t),description:n.i(o.default)("Browse libraries using the sidebar")
}):m&&a?r()(h.a,{title:n.i(o.default)("The dashboard is empty"),description:n.i(o.default)("Browse and manage your libraries using the sidebar"),footer:n.i(o.default)('Tip: The "Include in dashboard" advanced setting for each library allows content to be displayed here')}):!m&&a?r()(h.a,{title:n.i(o.default)("The dashboard is empty"),description:n.i(o.default)("Add libraries with your media to make the most of Plex Media Server")},void 0,r()(u.a,{kind:l.c.PRIMARY,size:l.d.LARGE,onPress:v},void 0,n.i(o.default)("Add Library"))):r()(h.a,{
title:n.i(o.default)("The dashboard is empty"),description:n.i(o.default)("Browse libraries using the sidebar")})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(23),c=n(41),u=n(51),d=n(877),h=n(164),p=n(199),f=r()(d.a,{});t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(m.a)(),function(e){return{friendlyName:e.friendlyName,isFullServer:e.isFullServer,isFullOwnedServer:e.isFullOwnedServer,isPersonalCloudServer:e.isPersonalCloudServer,hasLibraries:!!e.desktop.libraries.length
}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(63)),v=n(85),y=n(1996),b=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onAddLibraryPress=function(e){i.props.addLibrary({serverEntityID:i.props.serverEntityID})},a=n,c()(i,a)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(y.a,r()({onAddLibraryPress:this.onAddLibraryPress
},this.props))},t}(h.Component);t.a=n.i(f.b)(i,{addLibrary:v.addLibrary})(b)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.providerIdentifier,a=e.isPending,s=e.error;return o.a.EPG_IDENTIFIER.test(i)?r()(c.a,{serverEntityID:t,providerEntityID:n,isPending:a,error:s}):r()(l.a,{serverEntityID:t,providerEntityID:n,isPending:a,error:s})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(72)),l=n(1997),c=n(1999);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.isPending,s=e.error;
return a?r()(c.a,{},void 0,r()(l.a,{label:n.i(o.default)("Loading guide")})):s?r()(u.a,{title:n.i(o.default)("There was an unexpected error loading the Program Guide")}):r()(d.a,{serverEntityID:t,providerEntityID:i})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(41),c=n(164),u=n(199),d=n(826);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.summary;return r()("div",{},void 0,r()("div",{className:c.a.title},void 0,t),n&&r()("div",{className:c.a.summary},void 0,r()(o.a,{},void 0,n)));
}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(816)),l=n(2489),c=n.n(l);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(7),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(469),v=n(130),y=n(2198),b=n(2199),S=n(41),w=n(70),M=n(199),I=n(1910),C=n(2e3),D=n(2490),T=n.n(D),x=function(e){function t(n,i){l()(this,t);var a=u()(this,e.call(this,n,i));a.onHeaderMeasure=function(e){var t=e.height;a.setState({isHeaderMeasured:!0,headerHeight:t})},a.onScrollPositionChange=function(e){
var t=e.scrollTop;a.setState({scrollTop:t})},a.renderCell=function(e){return f.a.createElement(I.a,s()({serverEntityID:a.props.serverEntityID,providerEntityID:a.props.providerEntityID},e))};var r=n.aspectRatios,o=n.columns,c=n.margin,d=n.cellMargin,h=null;return r&&r.length&&(h=a.createLayout(r,o,c,d)),a.state={isHeaderMeasured:!1,headerHeight:null,scrollTop:0,layout:h},a}return h()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=e.aspectRatios,n=e.columns,i=e.margin,a=e.cellMargin;t===this.props.aspectRatios&&n===this.props.columns||this.setState({
layout:this.createLayout(t,n,i,a)})},t.prototype.createLayout=function(e,t,i,a){var r=n.i(b.a)({aspectRatios:e,columns:t});return n.i(y.a)({columns:t,rows:r,margin:i,cellMargin:a})},t.prototype.render=function(){var e=this.props,t=e.metadataItems,i=e.width,r=e.height,s=e.summary,o=e.title,l=e.serverEntityID,c=e.itemsError,u=e.itemsIsPopulated,d=this.state,h=d.isHeaderMeasured,p=d.headerHeight,f=d.layout,y=d.scrollTop,b=f&&u&&h;return c?a()(M.a,{title:n.i(g.default)("There was an unexpected error loading the photo album")
}):a()(w.a,{className:T.a.scroller,scrollTop:y,onScrollPositionChange:this.onScrollPositionChange},void 0,a()(v.a,{onMeasure:this.onHeaderMeasure},void 0,a()(C.a,{title:o,summary:s})),b?a()("div",{className:T.a.body},void 0,a()(m.a,{className:T.a.album,serverEntityID:l,items:t,keyPropName:"metadataItemEntityID",size:t.length,cellRenderer:this.renderCell,viewportWidth:i,viewportHeight:r,scrollTop:y-p,layout:f})):a()("div",{className:T.a.spinner},void 0,a()(S.a,{label:n.i(g.default)("Loading photos")
})))},t}(p.Component);x.defaultProps={columns:1,margin:35,cellMargin:5},t.a=x},function(e,t,n){"use strict";function i(){var e=n.i(m.a)(),t=n.i(p.createSelector)(e,y.a,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return t[e.children]}),i=n.i(p.createSelector)(t,v.a,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],i=e.metadataItems;return i?i.map(function(e){var i=t[e],a=i.Media[0];if(!(a&&a.Part[0]&&a.width&&a.height))return 1;
var r=a.width,s=a.height,o=a.Part,l=o[0].orientation;return n.i(f.a)(l)?s/r:r/s}):[]});return n.i(p.createSelector)(e,t,i,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],i=t.metadataItems,a=t.isPopulated,r=t.error,s=e.title,o=e.summary;return{title:s,summary:o,metadataItems:i,aspectRatios:n,itemsError:r,itemsIsPopulated:a}})}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(1),d=n.n(u),h=n(15),p=n(9),f=(n.n(p),
n(722)),g=n(35),m=n(29),v=n(323),y=n(669),b=n(183),S=n(2003),w=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){var t=e.metadataItemEntityID;t&&t!==this.props.metadataItemEntityID&&this._populate(e)},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;n.i(g.a)(function(){e.viewItemDetails(e.metadataItemEntityID);
})},t.prototype.render=function(){return d.a.createElement(S.a,this.props)},t}(u.Component);t.a=n.i(h.b)(i,{viewItemDetails:b.a})(w)},function(e,t,n){"use strict";function i(e){return o()(u.a,{className:p.a.container},void 0,function(t){var n=t.isMeasured,i=t.width,a=t.height;if(!n)return null;var s=Math.ceil(i/f);return c.a.createElement(d.a,r()({columns:s,width:i,height:a},e))})}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(130),d=n(2001),h=n(2491),p=n.n(h),f=400;t.a=i},function(e,t,n){
"use strict";function i(e){return r()(c.a,{machineIdentifier:e.machineIdentifier},void 0,r()(u.a,{},void 0,o.a.createElement(l.a,e)))}var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(2002),c=n(197),u=n(198);t.a=i},function(e,t,n){"use strict";function i(e){return c.a.createElement(f.a,r()({title:n.i(u.default)("Plex is down for maintenance"),description:n.i(u.default)("Don't worry, it will be back soon")},e),o()(p.a,{to:d.e,target:"_blank",kind:h.c.PRIMARY},void 0,"status.plex.tv"))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(443),h=n(23),p=n(26),f=n(118);
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.outOfDateServers,i=e.isDownForMaintenance,a=e.hasFailedResources,s=e.hasPlexPass,c=e.isUserRestricted,u=e.canProvisionPersonalCloudServer,g=e.onDownloadServer,m=e.onLinkPersonalCloudServerPress;return t.length?r()(d.a,{outOfDateServers:t}):i?p:a?f:c?r()(l.a,{title:n.i(o.default)("No shared libraries"),description:n.i(o.default)("A user in your home needs to share a library with you")}):r()(h.a,{hasPlexPass:s,canProvisionPersonalCloudServer:u,
onDownloadServer:g,onLinkPersonalCloudServerPress:m})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(118),c=n(297),u=n(2005),d=n(2009),h=n(2008),p=r()(u.a,{}),f=r()(c.a,{});t.a=i},function(e,t,n){"use strict";function i(e){return o.a.createElement(l.a,r()({iconClassName:u.a.icon,icon:"plex-icon-alert-560"},e))}var a=n(7),r=n.n(a),s=n(1),o=n.n(s),l=n(164),c=n(2494),u=n.n(c);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(23),f=n(25),g=n(70),m=n(26),v=n(51),y=n(544),b=n(2495),S=n.n(b),w=n(3105),M=n.n(w),I={
context:"serverDownload",firstRun:!0},C=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onDownloadPress=function(e){a.setState({isDownloadStep:!1}),a.props.onDownloadServer(e.currentTarget.dataset.type)},a.onPlexPassModalClose=function(){a.setState({isPlexPassModalOpen:!1})},a.state={isDownloadStep:!0,isPlexPassModalOpen:!n.hasPlexPass},a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){var e=this.state,t=e.isDownloadStep,i=e.isPlexPassModalOpen,r=this.props,s=r.canProvisionPersonalCloudServer,o=r.onLinkPersonalCloudServerPress,l=void 0;
return l=t?s?n.i(h.default)("To get started streaming your media everywhere, set up Plex Cloud or download and install Plex Media Server on the computer or device where you keep your media."):n.i(h.default)("To get started streaming your media everywhere, download and install Plex Media Server on the computer or device where you keep your media."):n.i(h.default)("Excellent. Check your download location for Plex Media Server and install it. Once it's running, check back here and we'll get you set up."),
a()(g.a,{className:S.a.emptyPage},void 0,a()("div",{className:S.a.content},void 0,a()("img",{className:S.a.pmsLogo,src:M.a}),a()("div",{className:S.a.title},void 0,t?n.i(h.default)("Get your Plex Media Server"):n.i(h.default)("Install your new server")),a()("div",{className:S.a.description},void 0,l),t&&s&&a()(v.a,{className:S.a.button,kind:p.c.PRIMARY,size:p.d.LARGE,onPress:o},void 0,n.i(h.default)("Set up Plex Cloud")),t&&a()(v.a,{className:S.a.button,kind:p.c.PRIMARY,size:p.d.LARGE,"data-type":"computer",
onPress:this.onDownloadPress},void 0,n.i(h.default)("Download Plex Media Server")),!t&&a()("div",{className:S.a.downloadMessage},void 0,n.i(h.default)("Need to download different server?")),!t&&a()(m.a,{kind:p.c.PRIMARY,"data-type":"computer",onPress:this.onDownloadPress},void 0,n.i(h.default)("Download for Computer Platforms")),a()(m.a,{kind:p.c.PRIMARY,"data-type":"nas",onPress:this.onDownloadPress},void 0,n.i(h.default)("Download for NAS Platforms"))),a()(y.a,{metricsProperties:I,isOpen:i,onModalClose:this.onPlexPassModalClose
}))},t}(d.Component);t.a=C},function(e,t,n){"use strict";function i(e){var t=e.outOfDateServers,i="/web/index.html#!/settings/server",a="/web/index.html";return r()(d.a,{title:n.i(o.default)("Update your Plex Media Server"),description:n.i(o.default)("This version of the web app requires Plex Media Server {1} or higher. Use one of the links below to open an available server directly.","0.9.16.0")},void 0,r()("div",{},void 0,t.map(function(e){var t=e.activeConnection,s=e.isShared;return t?r()(u.a,{
className:p.a.updateLink,to:l.join([t.uri,s?a:i]),target:"_self",kind:c.c.PRIMARY,size:c.d.LARGE},e.machineIdentifier,e.friendlyName):r()("span",{className:p.a.updateDisabledLink},e.machineIdentifier,n.i(o.default)("{1} (Unavailable)",e.friendlyName))})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(20),c=n(23),u=n(26),d=n(118),h=n(2496),p=n.n(h);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(23),f=n(48),g=n(203),m=n(41),v=n(194),y=n(140),b=n(297),S=n(364),w=n(375),M=n(1904),I=n(504),C=n(827),D=n(2014),T=n(2017),x=n(2012),P=n(2497),E=n.n(P),A=function(e){
function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));L.call(a);var r=n.listHeight,o=n.scrollIndex,c=n.viewportHeight;return a.state={listHeight:r,scrollIndex:o,viewportHeight:c},a}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataListEntityID,s=e.providerIdentifier,o=e.isProgramGuide,l=e.selectedDirectory,c=e.showLibrarySpinner,u=e.showLibraryError,d=e.selectedSort,f=e.listTitle,P=e.listType,A=e.listContext,L=e.listStyle,k=e.activeSelectionType,N=e.activeType,_=e.activeFilters,O=e.activeFilterLabel,R=e.activeSort,j=e.isLibraryRefreshing,z=this.state,U=z.listHeight,F=z.scrollIndex,B=z.viewportHeight,V=/titleSort/i.test(d.key),H=Math.max(U,1),W=V&&B/H<=.25,Q=L===g.a;
return c?a()(y.a,{},void 0,a()(m.a,{label:n.i(h.default)("Loading library")})):u?a()(b.a,{title:n.i(h.default)("There was an unexpected error loading this library")}):a()(v.a,{scrollDirection:p.a.NONE},void 0,k?a()(w.a,{serverEntityID:t,providerEntityID:i}):a()(D.a,{serverEntityID:t,providerEntityID:i,metadataListEntityID:r,listType:P,listContext:A,listStyle:L,selectedDirectory:l,activeType:N,activeFilters:_,activeFilterLabel:O,activeSort:R,showSortsMenu:!Q}),Q&&a()(M.a,{providerEntityID:i,listType:P,
listContext:A,activeType:N,activeFilters:_,activeFilterLabel:O,activeSort:R,selectedSort:d}),a()(S.a,{component:x.a,serverEntityID:t,providerEntityID:i,metadataListEntityID:r,providerIdentifier:s,hasHeader:Q,hasGutter:W,scrollIndex:F,listTitle:f,listType:P,listContext:A,listStyle:L,activeType:N,activeFilters:_,activeSort:R,selectedSort:d,initialSize:50,shouldResetOnUnmount:!0,onListScrollIndexChange:this.onListScrollIndexChange,onListUpdate:this.onListUpdate,onMeasure:this.onMeasure,isLibraryRefreshing:j
},void 0,o&&a()(I.a,{className:E.a.attribution})),W&&a()(T.a,{activeSort:R,viewportHeight:B,onJumpBarItemPress:this.onJumpBarItemPress}),o&&a()(C.a,{serverEntityID:t,providerEntityID:i}))},t}(d.Component),L=function(){var e=this;this.onListScrollIndexChange=function(t){e.setState({scrollIndex:t})},this.onListUpdate=function(t){var n=t.listStyle.height;e.setState({listHeight:n})},this.onMeasure=function(t){var n=t.height;e.setState({viewportHeight:n})},this.onJumpBarItemPress=function(t){e.setState({
scrollIndex:t})}};A.defaultProps={listContext:f.c,scrollIndex:0,listHeight:0,viewportHeight:0},t.a=A},function(e,t,n){"use strict";function i(){return n.i(p.createSelector)(function(e){return e.ui.libraryPage},n.i(m.a)(),n.i(y.a)(),n.i(b.a)(),S.a,v.a,n.i(w.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments[4],s=arguments[5],o=arguments[6],l=e.isPagePopulated,c=e.metadataList,u=e.isMetadataTypesPending,d=e.isMetadataTypesPopulated,h=e.metadataTypesError,p=i.type&&f.a.get(i.type),m=p?p.typeString:void 0,v=n.i(D.a)(r,C.c,m,t);
return{isPagePopulated:l,metadataListEntityID:c,providerIdentifier:t.identifier,isProgramGuide:g.a.EPG_IDENTIFIER.test(t.identifier),showLibrarySpinner:!d&&!h,showLibraryError:!u&&!!h,listTitle:i.title,listType:m,listStyle:v,selectedSort:a,activeSelectionType:s.activeSelectionType,isLibraryRefreshing:o}})}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(1),d=n.n(u),h=n(15),p=n(9),f=(n.n(p),n(36)),g=n(72),m=n(103),v=n(136),y=n(347),b=n(776),S=n(1569),w=n(775),M=n(35),I=n(278),C=n(48),D=n(2203),T=n(2010),x=function(e){
function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){var t=e.selectedDirectory,n=t&&t.key,i=this.props.selectedDirectory&&this.props.selectedDirectory.key;n&&n!==i&&this._populate(e)},t.prototype.componentWillUnmount=function(){this.props.clearLibraryPage()},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;
e.selectedDirectory&&n.i(M.a)(function(){e.initLibraryPage({serverEntityID:e.serverEntityID,libraryKey:e.selectedDirectory.key,activeType:e.activeType,activeFilters:e.activeFilters,activeSort:e.activeSort}),e.populateLibraryMetadataTypes(),e.populateLibraryFirstCharacters()})},t.prototype.render=function(){return this.props.isPagePopulated?d.a.createElement(T.a,this.props):null},t}(u.Component);t.a=n.i(h.b)(i,I)(x)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.providerIdentifier,a=e.metadataItemEntityIDs,s=e.totalSize,d=e.isPending,h=e.isPopulated,p=e.error,f=e.activeType,g=e.activeFilters,m=e.activeSort,v=e.listType,y=e.isLibraryRefreshing,b=s||a.length;
return d||h&&b?o.a.createElement(c.a,e):r()(l.a,{},void 0,r()(u.a,{serverEntityID:t,providerEntityID:n,providerIdentifier:i,error:p,activeType:f,activeFilters:g,activeSort:m,listType:v,isLibraryRefreshing:y}))}var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(231),c=n(866),u=n(2018);t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(4),y=n(25),b=(n(80),n(79),n(48),n(203),n(893)),S=n(290),w=n(856),M=n(293),I=n(1914),C=n(195),D=n(196),T=n(232),x=n(373),P=n(865),E=n(2024),A=n(2026),L=n(2025),k=n(2498),N=n.n(k),_=function(e){
function t(n,i){u()(this,t);var a=h()(this,e.call(this,n,i));return a.onDirectoriesMenuButtonPress=function(e){a.setState({isDirectoriesMenuOpen:!a.state.isDirectoriesMenuOpen})},a.onDirectoriesMenuClose=function(){a.setState({isDirectoriesMenuOpen:!1})},a.onFiltersMenuButtonPress=function(e){a.setState({isFiltersMenuOpen:!a.state.isFiltersMenuOpen})},a.onFiltersMenuClose=function(){a.setState({isFiltersMenuOpen:!1})},a.onTypesMenuButtonPress=function(e){a.setState({isTypesMenuOpen:!a.state.isTypesMenuOpen
})},a.onTypesMenuClose=function(){a.setState({isTypesMenuOpen:!1})},a.onSortsMenuButtonPress=function(e){a.setState({isSortsMenuOpen:!a.state.isSortsMenuOpen})},a.onSortsMenuClose=function(){a.setState({isSortsMenuOpen:!1})},a.state={isDirectoriesMenuOpen:!1,isFiltersMenuOpen:!1,isTypesMenuOpen:!1,isSortsMenuOpen:!1},a}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.listType,r=e.listContext,o=e.listStyle,c=e.server,u=e.provider,d=e.directories,h=e.selectedDirectory,p=e.activeType,f=e.activeFilters,g=e.activeFilterLabel,y=e.activeSort,k=e.metadataTypes,_=e.selectedType,O=e.selectedFilterTitle,R=e.selectedSort,j=e.metadataItems,z=e.totalSize,U=e.showSortsMenu,F=e.allListStyles,B=l()(e,["serverEntityID","listType","listContext","listStyle","server","provider","directories","selectedDirectory","activeType","activeFilters","activeFilterLabel","activeSort","metadataTypes","selectedType","selectedFilterTitle","selectedSort","metadataItems","totalSize","showSortsMenu","allListStyles"]),V=!u.isLibraryProvider&&d.length>1,H=!!_&&_.filters.length>0,W=!!_&&k.length>1,Q=!!(U&&R&&_.sorts.length>1),Y=n.i(b.a)(this.props);
return s()(C.a,{},void 0,s()(D.a,{},void 0,V&&m.a.createElement(P.a,{ref:"directoriesMenuButton",title:h.title,isSelected:!0,onPress:this.onDirectoriesMenuButtonPress}),V&&s()(x.a,{target:this.refs.directoriesMenuButton,isOpen:this.state.isDirectoriesMenuOpen,machineIdentifier:c.machineIdentifier,providerIdentifier:u.identifier,isLibraryProvider:u.isLibraryProvider,directories:d,selectedDirectory:h,onMenuClose:this.onDirectoriesMenuClose}),H&&m.a.createElement(P.a,{ref:"filtersMenuButton",title:O,
onPress:this.onFiltersMenuButtonPress}),H&&s()(E.a,{serverEntityID:t,target:this.refs.filtersMenuButton,isOpen:this.state.isFiltersMenuOpen,activeType:p,activeFilters:f,activeFilterLabel:g,activeSort:y,selectedType:_,onMenuClose:this.onFiltersMenuClose}),W&&m.a.createElement(P.a,{ref:"typesMenuButton",title:_.title,onPress:this.onTypesMenuButtonPress}),W&&s()(A.a,{target:this.refs.typesMenuButton,isOpen:this.state.isTypesMenuOpen,types:k,selectedType:_,onMenuClose:this.onTypesMenuClose}),Q&&m.a.createElement(P.a,{
ref:"sortsMenuButton",title:n.i(v.default)("By {1}",R.title),onPress:this.onSortsMenuButtonPress}),Q&&s()(L.a,{target:this.refs.sortsMenuButton,isOpen:this.state.isSortsMenuOpen,activeType:p,activeFilters:f,activeFilterLabel:g,activeSort:y,sorts:_.sorts,selectedSort:R,onMenuClose:this.onSortsMenuClose}),s()(S.a,{className:N.a.badge},void 0,z||j.length)),s()(T.a,{},void 0,m.a.createElement(w.a,a()({server:c},B,Y)),s()(I.a,{allListStyles:F}),s()(M.a,{listType:i,listContext:r,selectedListStyle:o,allListStyles:F
})))},t}(g.Component);_.defaultProps={showSortsMenu:!0},t.a=_},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(function(e,t){var n=t.listType;return n},function(e,t){var n=t.listStyle;return n},m.a,p.a,n.i(f.a)(),v.a,n.i(g.a)(),n.i(y.a)(),n.i(b.a)(),n.i(S.a)(),function(e,t,i,a,r,o,c,u,d,h){var p=l.a.pick(c,"metadataItems","totalSize","allowSync","isFirstItemLibraryItem"),f=n.i(C.a)(e,I.c,a);return s()({server:i,provider:a,directories:r,metadataTypes:o,selectedType:u,selectedFilterTitle:d,
selectedSort:h,listType:e,listStyle:t,allListStyles:f},p)})}function a(e){return u.a.createElement(D.a,e)}var r=n(7),s=n.n(r),o=n(2),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(9),p=(n.n(h),n(62)),f=n(255),g=n(322),m=n(58),v=n(777),y=n(347),b=n(1564),S=n(776),w=n(133),M=n(278),I=n(48),C=n(892),D=n(2013),T=s()({},M,w);t.a=n.i(d.b)(i,T)(a)},function(e,t,n){"use strict";function i(e,t){var n=[h.a.first(e),h.a.last(e)],i=h.a.sortBy(e,"size").slice().reverse();return h.a.first(h.a.union(n,i),t)}function a(e){
var t=e.firstCharacters,n=e.viewportHeight,a=e.onJumpBarItemPress,r={height:n+"px"},o=Math.floor(n/y),c=h.a.sortBy(i(t,o),"position");return l()("div",{className:m.a.jumpBar,style:r},void 0,c.map(function(e,t){return u.a.createElement(v.a,s()({key:t},e,{onPress:a}))}))}var r=n(7),s=n.n(r),o=n(3),l=n.n(o),c=n(1),u=n.n(c),d=n(2),h=n.n(d),p=n(109),f=n.n(p),g=n(2500),m=n.n(g),v=n(2016),y=parseInt(f.a.jumpBarCharacterHeight,10);t.a=a},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),
n(25)),p=n(26),f=n(2501),g=n.n(f),m=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onPress=function(e){i.props.onPress(i.props.scrollIndex)},a=n,l()(i,a)}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(h.a)(this,e,t)},t.prototype.render=function(){return a()(p.a,{className:g.a.character,onPress:this.onPress},void 0,this.props.title)},t}(d.Component);
t.a=m},function(e,t,n){"use strict";function i(e){var t=0;return e.map(function(e,n){var i=s()({},e,{position:n,scrollIndex:t});return t+=e.size,i})}function a(){return n.i(l.createSelector)(function(e,t){var n=t.activeSort;return n},function(e){return e.ui.libraryPage.firstCharacters},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=/titleSort:desc/i.test(e)?t.slice().reverse():t;return{firstCharacters:i(n)}})}var r=n(7),s=n.n(r),o=n(15),l=n(9),c=(n.n(l),n(2015));t.a=n.i(o.b)(a)(c.a);
},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.providerIdentifier,s=e.error,l=e.activeType,y=e.activeFilters,b=e.activeSort,S=e.listType,w=e.isLibraryRefreshing,M=h.a[S];return s?r()(m.a,{title:n.i(c.default)("There was an unexpected error loading this library")}):o.a.isEmpty(y)?u.a.EPG_IDENTIFIER.test(a)?r()(v.a,{serverEntityID:t,providerEntityID:i}):w?r()(g.a,{icon:M,title:n.i(c.default)("Libraries are currently being updated"),description:n.i(c.default)("Hang tight while we look for your content")
}):r()(g.a,{icon:M,title:n.i(c.default)("There are no items in this library")}):r()(g.a,{icon:M,title:n.i(c.default)("The active filter has no matches"),description:n.i(c.default)("Use the menu above to change the active filter")},void 0,r()(f.a,{to:n.i(p.a)({type:l,sort:b}),kind:d.c.PRIMARY},void 0,n.i(c.default)("Clear filter")))}var a=n(3),r=n.n(a),s=n(2),o=n.n(s),l=n(1),c=(n.n(l),n(4)),u=n(72),d=n(23),h=n(721),p=n(182),f=n(26),g=n(164),m=n(199),v=n(826);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.activeType,i=e.activeFilters,a=e.activeFilterLabel,s=e.activeSort,p=e.filter,f=e.title,g=i[p],m=n.i(l.a)(g,"1");return r()(h.a,{to:n.i(d.a)({type:t,filters:m?n.i(u.a)(i,p):n.i(c.a)(i,p,{value:"1",type:o.a}),filterLabel:a,sort:s}),isSelected:m},void 0,f)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(178)),l=n(697),c=n(694),u=n(698),d=n(182),h=n(116);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(23),f=n(25),g=n(30),m=n(41),v=n(115),y=n(2502),b=n.n(y),S=function(e){
function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onPress=function(e){i.props.onFilterSelect(i.props.filterKey)},a=n,l()(i,a)}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.activeFilters,i=e.filter,r=e.title,s=e.showSpinner,o=!s&&!!t[i];return a()(v.a,{className:o?b.a.isSelected:void 0,onPress:this.onPress
},void 0,a()("div",{className:b.a.menuItemContainer},void 0,a()("div",{className:b.a.menuLabel},void 0,r),s&&a()(m.a,{className:b.a.spinner,size:p.d.SMALL}),!s&&o&&a()("div",{className:b.a.selectedIcon},void 0,a()(g.a,{name:"plex-icon-selected-560","aria-label":n.i(h.default)("Selected")}))))},t}(d.Component);t.a=S},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.activeType,a=e.activeFilters,s=e.activeSort,g=e.selectedFilter,y=e.filterOptions,w=e.filterOptionQuery,M=e.showError,I=e.showSearchInput,C=e.onFilterDeselect,D=e.onSearch;
if(!g)return null;var T=g.filter;return r()("div",{className:t},void 0,r()("div",{className:b.a.header},void 0,r()("div",{className:b.a.headerTitle},void 0,r()(f.a,{onPress:C},void 0,r()(p.a,{className:b.a.backIcon,name:"plex-icon-hub-prev-560","aria-label":n.i(o.default)("Back")})),r()("span",{className:b.a.filterText},void 0,g.title)),I&&r()(v.a,{className:b.a.searchInput,name:"filterOptionQuery",placeholder:n.i(o.default)("Filter {1}",g.title),value:w,onChange:D})),S,r()(h.a,{className:I?b.a.filterOptionsWithSearchScroller:b.a.filterOptionsScroller,
autoScroll:!0},void 0,M&&r()("div",{className:b.a.emptyText},void 0,n.i(o.default)("Unable to load options")),!M&&!y.length&&r()("div",{className:b.a.emptyText},void 0,n.i(o.default)("No options")),y.map(function(e){var t=e.key,o=e.title,h=e.isSelected;return r()(m.a,{className:b.a.filterOptionMenuItem,to:n.i(d.a)({type:i,filters:h?n.i(u.a)(a,T,t):n.i(c.a)(a,T,{value:t,type:l.b}),filterLabel:h?void 0:o,sort:s}),isSelected:h},t,o)})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(178),c=n(694),u=n(698),d=n(182),h=n(70),p=n(30),f=n(26),g=n(500),m=n(116),v=n(161),y=n(2503),b=n.n(y),S=r()(g.a,{});
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.activeType,a=e.activeFilters,s=e.activeFilterLabel,l=e.activeSort,c=e.filters,m=e.selectedFilter,b=e.showSpinner,M=e.onFilterSelect,I=o.a.groupBy(c,function(e){var t=e.filterType;return t===h.a?t:h.b}),C=I[h.a],D=I[h.b];return r()(f.a,{className:u()(t,S.a.filtersScroller),autoScroll:!0},void 0,r()(g.a,{to:n.i(p.a)({type:i,sort:l}),isSelected:o.a.isEmpty(a)},"all",n.i(d.default)("All")),!!C&&C.map(function(e){return r()(v.a,{activeType:i,
activeFilters:a,activeFilterLabel:s,activeSort:l,filter:e.filter,title:e.title},e.filter)}),!!D&&w,!!D&&D.map(function(e){var t=!(!m||m.filter!==e.filter);return r()(y.a,{activeType:i,activeFilters:a,activeSort:l,filter:e.filter,filterKey:e.key,title:e.title,showSpinner:b&&t,onFilterSelect:M},e.filter)}))}var a=n(3),r=n.n(a),s=n(2),o=n.n(s),l=n(1),c=(n.n(l),n(28)),u=n.n(c),d=n(4),h=n(178),p=n(182),f=n(70),g=n(116),m=n(500),v=n(2019),y=n(2020),b=n(2504),S=n.n(b),w=r()(m.a,{});t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.target,i=e.isOpen,a=e.activeType,s=e.activeFilters,o=e.activeFilterLabel,u=e.activeSort,f=e.filters,v=e.selectedFilter,y=e.filterOptions,b=e.filterOptionQuery,S=e.showSpinner,w=e.showError,M=e.showSearchInput,I=e.onFilterSelect,C=e.onFilterDeselect,D=e.onSearch,T=e.onMenuClose,x=v&&!S;return r()(d.a,{className:g.a.filtersMenu,target:t,isOpen:i,scrollerProps:m,onMenuClose:n.i(c.a)(C,T)},void 0,r()("div",{className:l()(g.a.panesContainer,x&&g.a.showFilterOptions)},void 0,r()(h.a,{
className:g.a.filtersPane,activeType:a,activeFilters:s,activeFilterLabel:o,activeSort:u,filters:f,selectedFilter:v,showSpinner:S,onFilterSelect:I}),r()(p.a,{className:g.a.filterOptionsPane,activeType:a,activeFilters:s,activeSort:u,selectedFilter:v,filterOptions:y,filterOptionQuery:b,showError:w,showSearchInput:M,onFilterDeselect:C,onSearch:D})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(28)),l=n.n(o),c=n(272),u=n(23),d=n(73),h=n(2022),p=n(2021),f=n(2505),g=n.n(f),m={scrollDirection:u.a.NONE};t.a=i},function(e,t,n){
"use strict";function i(){return n.i(v.createSelector)(function(e,t){var n=t.activeFilters;return n},function(e,t){var n=t.selectedType;return n},function(e){return e.ui.libraryPage},n.i(y.a)(),function(e,t,n,i){var a=n.selectedFilterKey,r=n.filterOptionQuery,s=n.selectedFilterOptions,o=void 0===s?[]:s,l=n.isSelectedFilterOptionsPopulated,c=n.selectedFilterOptionsError,u=t&&t.filters,d=a&&p.a.findWhere(u,{key:a});return{filters:u,selectedFilter:d,filterOptions:i,filterOptionQuery:r,showSpinner:!l&&!c,
showError:!!c,showSearchInput:o.length>12}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(2),p=n.n(h),f=n(1),g=n.n(f),m=n(15),v=n(9),y=(n.n(v),n(1563)),b=n(278),S=n(2023),w=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onFilterSelect=function(e){i.props.selectLibraryFilter({serverEntityID:i.props.serverEntityID,key:e}),i.props.fetchLibraryFilterOptions();
},i.onFilterDeselect=function(){i.props.deselectLibraryFilter()},i.onSearch=function(e){i.props.searchLibraryFilterOptions(e)},a=n,c()(i,a)}return d()(t,e),t.prototype.render=function(){return g.a.createElement(S.a,r()({onFilterSelect:this.onFilterSelect,onFilterDeselect:this.onFilterDeselect,onSearch:this.onSearch},this.props))},t}(f.Component);t.a=n.i(m.b)(i,b)(w)},function(e,t,n){"use strict";function i(e){var t=e.activeType,i=e.activeFilters,a=e.activeFilterLabel,s=e.activeSort,l=e.sorts,d=e.selectedSort,g=o()(e,["activeType","activeFilters","activeFilterLabel","activeSort","sorts","selectedSort"]);
return c.a.createElement(p.a,g,l.map(function(e){var o=e.key,l=e.descKey,c=e.defaultDirection,p=e.title,g=d.key===o,y=c;g&&(y=s?s===l?m:v:c===m?v:m);var b=y===v;return r()(f.a,{to:n.i(h.a)({type:t,filters:i,filterLabel:a,sort:b?l:o}),isSelected:g,selectedIconName:b?"plex-icon-sort-ascending-560":"plex-icon-sort-descending-560",selectedIconAriaLabel:b?n.i(u.default)("Ascending"):n.i(u.default)("Descending")},o,p)}))}var a=n(3),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(426),h=n(182),p=n(73),f=n(116),g=d.a.directions,m=g.ASCENDING,v=g.DESCENDING;
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.types,i=e.selectedType,a=o()(e,["types","selectedType"]);return c.a.createElement(d.a,a,t.map(function(e){var t=e.type,a=e.title;return r()(h.a,{to:n.i(u.a)({type:t}),isSelected:i.type===t},t,a)}))}var a=n(3),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(182),d=n(73),h=n(116);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,a=e.listTitle,s=e.activeSelectionType;return o()(d.a,{
scrollDirection:u.a.NONE},void 0,s?o()(p.a,{serverEntityID:t,providerEntityID:n}):o()(f.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listTitle:a}),c.a.createElement(h.a,r()({component:g.a,initialSize:50,shouldResetOnUnmount:!0},e)))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(23),d=n(194),h=n(364),p=n(375),f=n(2030),g=n(866);t.a=i},function(e,t,n){"use strict";var i=n(11),a=n.n(i),r=n(13),s=n.n(r),o=n(12),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(9),p=(n.n(h),n(136)),f=n(35),g=n(1553),m=n(2027),v=n.i(h.createSelector)(function(e){
return e.ui.metadataListPage},p.a,function(e,t){return{isPagePopulated:e.isPagePopulated,metadataListEntityID:e.metadataList,activeSelectionType:t.activeSelectionType}}),y=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){var t=e.listKey;t!==this.props.listKey&&this._populate(e)},t.prototype.componentWillUnmount=function(){this.props.clearMetadataListPage();
},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;e.listKey&&n.i(f.a)(function(){e.initMetadataListPage({serverEntityID:e.serverEntityID,key:e.listKey,title:e.listTitle})})},t.prototype.render=function(){return this.props.isPagePopulated?u.a.createElement(m.a,this.props):null},t}(c.Component);t.a=n.i(d.b)(function(e){return v(e)},g)(y)},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(4),y=n(25),b=n(893),S=n(856),w=n(293),M=n(195),I=n(196),C=n(232),D=n(521),T=n(861),x=n(290),P=n(373),E=n(2507),A=n.n(E),L=s()(w.a,{}),k=function(e){
function t(n,i){u()(this,t);var a=h()(this,e.call(this,n,i));return a.onDirectoriesMenuButtonPress=function(e){a.setState({isDirectoriesMenuOpen:!a.state.isDirectoriesMenuOpen})},a.onDirectoriesMenuClose=function(){a.setState({isDirectoriesMenuOpen:!1})},a.state={isDirectoriesMenuOpen:!1},a}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.listTitle,i=e.metadataItems,r=e.totalSize,o=e.server,c=e.provider,u=e.directories,d=e.selectedDirectory,h=l()(e,["listTitle","metadataItems","totalSize","server","provider","directories","selectedDirectory"]),p=n.i(b.a)(this.props);
return s()(M.a,{},void 0,s()(I.a,{},void 0,m.a.createElement(D.a,{ref:"directoriesMenuButton",className:A.a.menuButton,hasMenu:u.length>1,title:d.isHomeDirectory?n.i(v.default)("All Libraries"):d.title,onPress:this.onDirectoriesMenuButtonPress}),s()(P.a,{target:this.refs.directoriesMenuButton,isOpen:this.state.isDirectoriesMenuOpen,machineIdentifier:o.machineIdentifier,providerIdentifier:c.identifier,isLibraryProvider:c.isLibraryProvider,directories:u,selectedDirectory:d,onMenuClose:this.onDirectoriesMenuClose
}),s()("div",{className:A.a.title},void 0,t),s()(x.a,{className:A.a.badge},void 0,r||i.length)),s()(C.a,{},void 0,m.a.createElement(S.a,a()({server:o,provider:c},h,p)),s()(T.a,{className:A.a.divider}),L))},t}(g.Component);t.a=k},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(g.a,m.a,n.i(f.a)(),n.i(v.a)(),function(e,t,i,a){var r=l.a.pick(i,"metadataItems","totalSize","allowSync","firstItemType","isFirstItemLibraryItem"),o=l.a.find(a,function(e){if(!e.key)return!1;var t=new RegExp("^"+n.i(p.a)(e.key)+"\\b");
return i.containerKey.match(t)}),c=o||l.a.first(a);return s()({},r,{server:e,provider:t,directories:a,selectedDirectory:c})})}function a(e){return u.a.createElement(b.a,e)}var r=n(7),s=n.n(r),o=n(2),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(9),p=(n.n(h),n(337)),f=n(322),g=n(58),m=n(62),v=n(255),y=n(133),b=n(2029);t.a=n.i(d.b)(i,y)(a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(8),f=n(30),g=n(26),m=n(41),v=n(1846),y=n(2126),b=n(2111),S=n(2128),w=n(2130),M=n(2508),I=n.n(M),C=function(e){
function t(){var n,i,r;s()(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(c))),i.onPreviousPress=function(){i.props.onPlayPreviousItem()},i.onNextPress=function(){i.props.onPlayNextItem()},i.onClosePress=function(){i.props.onPlayerClose()},i.onPlayPausePress=function(){i.props.onVideoSlidePress()},i.onQualityIndexChange=function(e){i.props.onVideoQualityIndexChange(i.props.currentIndex,e)},i.renderSlide=function(e,t,n){
var r=i.props.items[e-i.props.firstIndex],s=e===i.props.currentIndex,o=r&&"photo"!==r.type?w.a:S.a;return a()(o,{serverEntityID:i.props.serverEntityID,index:e,playQueueItem:r,metadataItemEntityID:r&&r.metadataItem,isCurrent:s,maximumWidth:t,maximumHeight:n,onEnd:i.props.onVideoEnded})},r=n,l()(i,r)}return u()(t,e),t.prototype.componentDidMount=function(){p.a.on("shortcut:skipPrevious",this.onPreviousPress),p.a.on("shortcut:skipNext",this.onNextPress),p.a.on("shortcut:escape",this.onClosePress),p.a.on("shortcut:playPause",this.onPlayPausePress);
},t.prototype.componentWillUnmount=function(){p.a.off("shortcut:skipPrevious",this.onPreviousPress),p.a.off("shortcut:skipNext",this.onNextPress),p.a.off("shortcut:escape",this.onClosePress),p.a.off("shortcut:playPause",this.onPlayPausePress)},t.prototype.render=function(){var e=this.props,t=e.items,i=e.currentIndex,r=e.currentItem,s=e.size,o=e.showFooter,l=e.canSkipPrevious,c=e.canSkipNext,u=e.availableVideoQualities,d=e.videoQualityIndex,p=e.isEditing,S=e.videoPaused,w=e.renderFooter,M=e.errorMessage,C=e.onVideoSlidePress,D=e.onPlayNextItem,T=e.onPlayPreviousItem,x=e.onPlayerClose,P=r&&"clip"===r.type,E=u&&u.length>1,A=P&&E;
return a()("div",{className:I.a.carousel},void 0,a()(v.a,{idleTime:p?0:2e3},void 0,a()("div",{className:I.a.header},void 0,A&&a()(y.a,{className:I.a.headerButton,qualities:u,qualityIndex:d,onQualityIndexChange:this.onQualityIndexChange}),a()(g.a,{onPress:x},void 0,a()(f.a,{className:I.a.headerButton,name:"plex-icon-remove-560","aria-label":n.i(h.default)("Close")}))),r&&a()("div",{className:I.a.contents},void 0,a()(g.a,{className:I.a.navigationButton,isDisabled:!l,onPress:T},void 0,a()(f.a,{name:"plex-icon-hub-prev-560",
"aria-label":n.i(h.default)("Previous Photo")})),a()("div",{className:I.a.action},void 0,"clip"===this.props.currentItem.type&&a()(g.a,{className:I.a.playPauseButton,onPress:C},void 0,S&&a()(f.a,{name:"plex-icon-play-560","aria-label":n.i(h.default)("Play Video")}))),a()(g.a,{className:I.a.navigationButton,isDisabled:!c,onPress:D},void 0,a()(f.a,{name:"plex-icon-hub-next-560","aria-label":n.i(h.default)("Next Photo")}))),o&&w()),M&&a()("div",{className:I.a.contents},void 0,a()("span",{},void 0,M)),!t&&!M&&a()("div",{
className:I.a.contents},void 0,a()(m.a,{label:n.i(h.default)("Loading photos")})),t&&!M&&a()(b.a,{items:t,currentIndex:i,size:s,renderSlide:this.renderSlide}))},t}(d.Component);t.a=C},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(1845)),p=n(468),f=n(2120),g=n(2114),m=n(2119),v=n(2123),y=n(2031),b=n(2509),S=n.n(b),w=function(e){function t(n,i){s()(this,t);var r=l()(this,e.call(this,n,i));return r.onPhotoStripTogglePress=function(e){
r.setState({isPhotoStripOpen:!r.state.isPhotoStripOpen})},r.onPhotoInformationTogglePress=function(e){r.props.toggleRelated()},r.onEditTogglePress=function(e){r.setState({isEditing:!r.state.isEditing})},r.onFullscreenTogglePress=function(e){r.setState({isFullscreen:!r.state.isFullscreen})},r.onFullscreenChange=function(e){r.setState({isFullscreen:e})},r.onVideoEnded=function(){r.props.slideshowPaused||r.props.onPlayNextItem()},r.onVideoPlayPauseToggle=function(){r.props.videoPaused&&r._stopSlideshow(),
r.props.toggleVideoPlayPause()},r.renderFooter=function(){var e=r.props,t=e.serverEntityID,n=e.providerEntityID,i=e.currentIndex,s=e.currentItem,o=e.relatedVisible,l=e.slideshowPaused,c=e.size,u=e.videoPosition,d=e.videoDuration,h=e.toggleSlideshow,p=r.state,f=p.isPhotoStripOpen,m=p.isFullscreen,v=p.isEditing;if(s)return a()(g.a,{metadataItemEntityID:s.metadataItem,serverEntityID:t,providerEntityID:n,index:i,size:c,videoPosition:u,videoDuration:d,isPhotoStripOpen:f,isPhotoInformationOpen:o,isPaused:l,
isFullscreen:m,isEditing:v,onPlayPausePress:h,onPhotoStripTogglePress:r.onPhotoStripTogglePress,onPhotoInformationTogglePress:r.onPhotoInformationTogglePress,onFullscreenTogglePress:r.onFullscreenTogglePress,onEditTogglePress:r.onEditTogglePress,onVideoPositionChange:r.onVideoPositionChange})},r.state={isPhotoStripOpen:!1,isFullscreen:!1,isEditing:!1},r}return u()(t,e),t.prototype.componentDidMount=function(){this.props.slideshowPaused||this._startSlideshow(this.props),this._playerTimer=setInterval(this.props.onSlideshowTick,1e3);
},t.prototype.componentWillReceiveProps=function(e){!e.slideshowPaused&&this.props.slideshowPaused?this.props.onPlayNextItem():e.slideshowPaused&&!this.props.slideshowPaused&&this._stopSlideshow(),e.currentIndex!==this.props.currentIndex&&(this._stopSlideshow(),e.slideshowPaused||"photo"!==e.currentItem.type&&!e.videoPaused||this._startSlideshow()),!e.videoPaused||this.props.videoPaused||this.props.slideshowPaused||this._stopSlideshow()},t.prototype.componentWillUnmount=function(){this._stopSlideshow(),
this._playerTimer=clearTimeout(this._playerTimer)},t.prototype._startSlideshow=function(){this._stopSlideshow(),this._slideshowTimer=setTimeout(this.props.onPlayNextItem,5e3)},t.prototype._stopSlideshow=function(){this._slideshowTimer&&(this._slideshowTimer=clearTimeout(this._slideshowTimer))},t.prototype.render=function(){var e=this.state,t=e.isPhotoStripOpen,n=e.isFullscreen,i=e.isEditing,r=this.props,s=r.serverEntityID,o=r.providerEntityID,l=r.items,c=r.relatedHubEntityIDs,u=r.currentIndex,d=r.currentItem,g=r.size,b=r.firstIndex,w=r.availableVideoQualities,M=r.videoPaused,I=r.videoQualityIndex,C=r.canSkipPrevious,D=r.canSkipNext,T=r.relatedVisible,x=r.errorMessage,P=r.onPlayNextItem,E=r.onPlayPreviousItem,A=r.onPlayItem,L=r.onVideoQualityIndexChange,k=r.onPlayerClose,N=t||T;
return a()(p.a,{},void 0,a()(h.a,{isFullscreen:n,onFullscreenChange:this.onFullscreenChange},void 0,a()("div",{className:S.a.lightbox},void 0,d&&a()(v.a,{serverEntityID:s,metadataItemEntityID:d.metadataItem}),a()("div",{className:S.a.player},void 0,a()("div",{className:S.a.content},void 0,a()("div",{className:S.a.main},void 0,a()(y.a,{serverEntityID:s,items:l,currentItem:d,currentIndex:u,availableVideoQualities:w,firstIndex:b,size:g,videoPaused:M,videoQualityIndex:I,isEditing:i,showFooter:!N,canSkipNext:D,
canSkipPrevious:C,errorMessage:x,renderFooter:this.renderFooter,onVideoEnded:this.onVideoEnded,onVideoSlidePress:this.onVideoPlayPauseToggle,onPlayNextItem:P,onPlayPreviousItem:E,onVideoQualityIndexChange:L,onPlayerClose:k}),t&&d&&a()(f.a,{className:S.a.mainFooter,serverEntityID:s,items:l,firstIndex:b,currentIndex:u,size:g,onPhotoPress:A})),T&&d&&a()(m.a,{className:S.a.aside,serverEntityID:s,providerEntityID:o,metadataItemEntityID:d.metadataItem,hubEntityIDs:c})),N&&this.renderFooter()))))},t}(d.Component);
w.defaultProps={canSkipNext:!1,canSkipPrevious:!1},t.a=w},function(e,t,n){"use strict";function i(){return n.i(v.createSelector)(function(e){return e.ui.photoPlayer},function(e){if(!e.playQueue)return{errorMessage:e.errorMessage};var t=p.a.pick(e.playQueue,["playQueueID","items","firstIndex"]),n=p.a.pick(e,["currentPlayer","currentIndex","slideshowPaused","relatedVisible","videoPaused","videoPosition","videoQualityIndex"]),i=p.a.pick(e.currentDecision,["availableQualities","duration"]),a=e.playQueue.playQueueTotalCount,r=n.currentIndex<a-1,s=n.currentIndex>t.firstIndex;
return d()({},t,n,{canSkipNext:r,canSkipPrevious:s,size:a,currentItem:e.playQueueItem,relatedHubEntityIDs:e.relatedHubs,availableVideoQualities:i.availableQualities,videoDuration:i.duration})})}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(7),d=n.n(u),h=n(2),p=n.n(h),f=n(1),g=n.n(f),m=n(15),v=n(9),y=(n.n(v),n(27)),b=n(35),S=n(771),w=n(1543),M=n(346),I=n(2032),C={startPlayback:S.a,endPlayback:S.b,playNextItem:S.c,playPreviousItem:S.d,onSlideshowTick:function(){return n.i(w.a)()},onPlayerClose:function(){
return n.i(S.e)("photo")},onPlayItem:function(e){return n.i(S.f)({playerType:"photo",index:e})},onVideoQualityIndexChange:function(e,t){return n.i(M.a)({playerType:"photo",index:e,qualityIndex:t})},toggleVideoPlayPause:function(){return n.i(M.b)({playerType:"photo"})},toggleSlideshow:w.b,toggleRelated:w.c},D=function(e){function t(){var i,a,s;r()(this,t);for(var l=arguments.length,c=Array(l),u=0;u<l;u++)c[u]=arguments[u];return i=a=o()(this,e.call.apply(e,[this].concat(c))),a.onPlayNextItem=function(){
n.i(b.a)(function(){a.props.playNextItem("photo")})},a.onPlayPreviousItem=function(){n.i(b.a)(function(){a.props.playPreviousItem("photo")})},s=i,o()(a,s)}return c()(t,e),t.prototype.componentWillMount=function(){this.props.startPlayback({serverEntityID:this.props.serverEntityID,playerType:"photo"})},t.prototype.componentWillReceiveProps=function(e){this.props.items&&!e.items&&(y.a.warn("[Player] Play queue removed - closing player"),this.props.onPlayerClose())},t.prototype.componentWillUnmount=function(){
this.props.endPlayback("photo")},t.prototype.render=function(){return g.a.createElement(I.a,d()({key:this.props.playQueueID},this.props,{onPlayNextItem:this.onPlayNextItem,onPlayPreviousItem:this.onPlayPreviousItem}))},t}(f.Component);t.a=n.i(m.b)(i,C)(D)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataItemEntityID,s=e.metadataListEntityID,m=e.providerIdentifier,v=e.type,y=e.showSpinner,b=e.showError,S=e.activeSelectionType,w=e.columnAdjustment,M=e.record;
return y?r()(d.a,{},void 0,r()(c.a,{label:n.i(o.default)("Loading details")})):b?r()(h.a,{title:n.i(o.default)("There was an unexpected error loading this item")}):r()(u.a,{scrollDirection:l.a.NONE},void 0,S?r()(p.a,{serverEntityID:t,providerEntityID:i}):r()(f.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a}),r()(g.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a,metadataListEntityID:s,providerIdentifier:m,type:v,columnAdjustment:w,record:M}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(4)),l=n(23),c=n(41),u=n(194),d=n(140),h=n(297),p=n(375),f=n(2038),g=n(2036);t.a=i},function(e,t,n){"use strict";function i(){return n.i(f.createSelector)(function(e){return e.ui.prePlayPage.metadataItem},g.a,function(e,t){var n=t[e];return n?n.type:void 0})}function a(){return n.i(f.createSelector)(function(e){return e.ui.prePlayPage},n.i(m.a)(),i(),v.a,y.a,function(e,t,n,i,a){var r=e.isPagePopulated,s=e.metadataItem,o=e.descendantList,l=e.isMetadataItemPending,c=e.isMetadataItemPopulated,u=e.metadataItemError;
return{isPagePopulated:r,metadataItemEntityID:s,metadataListEntityID:o,providerIdentifier:t.identifier,type:n,showSpinner:!c&&!u,showError:!l&&!!u,activeSelectionType:i.activeSelectionType,columnAdjustment:a.columnAdjustment}})}var r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(15),f=n(9),g=(n.n(f),n(323)),m=n(103),v=n(136),y=n(157),b=n(35),S=n(773),w=n(2034),M=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentWillMount=function(){
this._populate()},t.prototype.componentWillReceiveProps=function(e){var t=e.metadataKey;t!==this.props.metadataKey&&this._populate(e)},t.prototype.componentWillUnmount=function(){this.props.clearPrePlayPage()},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;e.metadataKey&&n.i(b.a)(function(){e.initPrePlayPage({serverEntityID:e.serverEntityID,metadataKey:e.metadataKey}),e.fetchPrePlayMetadataItem({options:{data:{checkFiles:1,includeExtras:1,
includeOnDeck:1}}}),e.fetchPrePlayRelatedHubs()})},t.prototype.render=function(){return this.props.isPagePopulated?h.a.createElement(w.a,this.props):null},t}(d.Component);t.a=n.i(p.b)(a,S)(M)},function(e,t,n){"use strict";function i(e,t){var n=t*-1+1,i=n/30+x,a=e*i;return Math.max(Math.min(a,E+30*n),P)}function a(e,t){var n=f.a.LIBRARY_PROVIDER_IDENTIFIER!==t,i=n?k:L;return i[e]||{}}var r=n(3),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=(n.n(p),n(72)),g=n(109),m=n.n(g),v=n(25),y=n(130),b=n(231),S=n(2052),w=n(2051),M=n(2053),I=n(2050),C=n(2039),D=n(2510),T=n.n(D),x=.15,P=150,E=230,A=parseInt(m.a.pagePadding,10),L={},k={
movie:{connector:S.a,component:w.a},show:{connector:S.a,component:M.a},episode:{connector:S.a,component:I.a}},N=s()(b.a,{},void 0,s()(C.a,{})),_=function(e){function t(n,i){l()(this,t);var a=u()(this,e.call(this,n,i));return a.onScrollPositionChange=function(e){var t=e.scrollTop;a.setState({scrollTop:t})},a.onContentMeasure=function(e){var t=e.width,n=e.height,i=e.y;a.setState({isMeasured:!0,pageWidth:t,pageHeight:n,pageY:i})},a.state={scrollTop:0,isMeasured:!1,pageWidth:0,pageHeight:0,pageY:0},a;
}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,r=e.metadataItemEntityID,o=e.metadataListEntityID,l=e.providerIdentifier,c=e.type,u=e.columnAdjustment,d=e.record,h=this.state,p=h.scrollTop,f=h.isMeasured,g=h.pageWidth,m=h.pageHeight,v=h.pageY,S=a(c,l),w=S.connector,M=S.component;return w?s()(y.a,{className:T.a.prePlayPageContentContainer,onMeasure:this.onContentMeasure
},void 0,s()(b.a,{className:T.a.prePlayPageContent,scrollTop:p,onScrollPositionChange:this.onScrollPositionChange},void 0,f&&s()(w,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r,metadataListEntityID:o,component:M,pageHeight:m,posterWidth:i(g,u),posterTop:v+A,scrollTop:p,record:d}))):N},t}(p.Component);t.a=_},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(25),f=(n(80),n(79),n(26)),g=n(293),m=n(195),v=n(196),y=n(232),b=n(373),S=n(865),w=n(2511),M=n.n(w),I=a()(y.a,{},void 0,a()(g.a,{})),C=function(e){
function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onDirectoriesMenuButtonPress=function(e){a.setState({isDirectoriesMenuOpen:!a.state.isDirectoriesMenuOpen})},a.onDirectoriesMenuClose=function(){a.setState({isDirectoriesMenuOpen:!1})},a.state={isDirectoriesMenuOpen:!1},a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.server,n=e.provider,i=e.directories,r=e.selectedDirectory,s=e.breadcrumbTitle,o=e.breadcrumbRoute,l=!n.isLibraryProvider&&i.length>1;
return a()(m.a,{},void 0,a()(v.a,{},void 0,l&&h.a.createElement(S.a,{ref:"directoriesMenuButton",title:r.title,onPress:this.onDirectoriesMenuButtonPress}),l&&a()(b.a,{target:this.refs.directoriesMenuButton,isOpen:this.state.isDirectoriesMenuOpen,machineIdentifier:t.machineIdentifier,providerIdentifier:n.identifier,isLibraryProvider:n.isLibraryProvider,directories:i,selectedDirectory:r,onMenuClose:this.onDirectoriesMenuClose}),a()(f.a,{className:M.a.breadcrumbLink,to:o},void 0,s)),I)},t}(d.Component);
t.a=C},function(e,t,n){"use strict";function i(){return n.i(u.createSelector)(d.a,h.a,n.i(p.a)(),n.i(f.a)(),function(e,t,i,a){var r=a.librarySectionID,o=new RegExp("/"+r+"$"),l=s.a.find(i,function(e){return!!e.key&&o.test(e.key)}),c=a.key,u=a.parentKey,d=a.grandparentKey,h=a.title,p=a.parentTitle,f=a.grandparentTitle,m=f||p||h,v=n.i(g.a)(e,t,d||u||c);return{server:e,provider:t,directories:i,selectedDirectory:l||s.a.first(i),breadcrumbTitle:m,breadcrumbRoute:v}})}function a(e){return l.a.createElement(m.a,e);
}var r=n(2),s=n.n(r),o=n(1),l=n.n(o),c=n(15),u=n(9),d=(n.n(u),n(58)),h=n(62),p=n(255),f=n(29),g=n(86),m=n(2037);t.a=n.i(c.b)(i)(a)},function(e,t,n){"use strict";function i(){return r()(u.a,{title:n.i(o.default)("You must be lost"),description:n.i(o.default)("This item does not have a page of its own")},void 0,r()(c.a,{to:"#",kind:l.c.PRIMARY},void 0,n.i(o.default)("Go Home")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(23),c=n(26),u=n(2007);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,i=e.provider,a=e.librarySectionKey,s=e.contentRating,u={
filters:"contentRating="+encodeURIComponent(s),filterLabel:s};return r()(c.a,{to:n.i(l.a)(t,i,a,u)},void 0,n.i(o.a)(s))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(1241)),l=(n(80),n(79),n(165)),c=n(26);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.separator;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2512)),l=n.n(o);i.defaultProps={className:l.a.separator,separator:"\xb7"},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.server,a=e.provider,s=e.librarySectionKey,d=e.Producer,h=e.Director,p=e.Writer,f=e.studio;
return t||d.length||h.length||p.length||f?r()(l.a,{},void 0,t,!!d.length&&r()(c.a,{label:n.i(o.default)("Created by")},void 0,r()(u.a,{server:i,provider:a,librarySectionKey:s,tags:d})),!!h.length&&r()(c.a,{label:n.i(o.default)("Directed by")},void 0,r()(u.a,{server:i,provider:a,librarySectionKey:s,tags:h})),!!p.length&&r()(c.a,{label:n.i(o.default)("Written by")},void 0,r()(u.a,{server:i,provider:a,librarySectionKey:s,tags:p})),!!f&&r()(c.a,{label:n.i(o.default)("Production")},void 0,r()(u.a,{server:i,
provider:a,librarySectionKey:s,tags:[{tag:f}]}))):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=(n(80),n(79),n(867)),c=n(524),u=n(868);i.defaultProps={Producer:[],Director:[],Writer:[]},t.a=i},function(e,t,n){"use strict";function i(){return r()(o.a,{className:c.a.bottomDivider})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(298)),l=n(2517),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(){return r()(o.a,{className:c.a.topDivider})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(298)),l=n(2518),c=n.n(l);
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2522)),l=n.n(o);i.defaultProps={className:l.a.rightTitle},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2525)),l=n.n(o);i.defaultProps={className:l.a.tertiaryTitle},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.listType,i=e.serverEntityID,a=e.server,s=e.provider,o=e.librarySectionKey,p=e.titleComponents,g=e.thumb,m=e.tag,v=e.role,y=e.filter,b=e.cellX,S=e.cellY,w=e.cellWidth,M=e.cellHeight,I=e.showOffscreenPlaceholder,C={
filters:y,filterLabel:m};return r()(u.a,{cellX:b,cellY:S,cellWidth:w,cellHeight:M},void 0,r()(c.a,{className:f.a.cardLink,to:n.i(l.a)(a,s,o,C)},void 0,r()(d.a,{serverEntityID:i,imageWidth:w,imageHeight:w,imageUrl:g,title:m,tagType:t,isOffscreen:I})),r()("div",{className:f.a.titleContainer},void 0,p.map(function(e,t){return r()(h.a,{server:a,provider:s,librarySectionKey:o,tag:m,role:v,filter:y,component:e,isSecondary:t>0},t)})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(131)),l=(n(80),n(79),n(165)),c=n(26),u=n(106),d=n(511),h=n(510),p=n(2526),f=n.n(p);
t.a=n.i(o.a)(i)},function(e,t,n){"use strict";function i(e){return function(t){return u.a.createElement(m.a,l()({},e,t))}}function a(e){var t=e.listType,a=e.listContext,r=e.serverEntityID,o=e.server,l=e.provider,c=e.librarySectionKey,u=e.roles;if(!u)return null;var h=n.i(p.a)(t,a),m=1;return s()("div",{className:y.a.castList},void 0,s()(g.a,{hubIdentifier:"cast",title:n.i(d.default)("Cast"),size:u.length,listType:t,listContext:a,columnAdjustment:m,keyPropName:"id",items:u,layout:n.i(f.a)(t,a,m,h.length),
cellRenderer:i({listType:t,listContext:a,serverEntityID:r,server:o,provider:l,librarySectionKey:c,titleComponents:h})}))}var r=n(3),s=n.n(r),o=n(7),l=n.n(o),c=n(1),u=n.n(c),d=n(4),h=n(48),p=n(300),f=n(546),g=(n(80),n(79),n(506)),m=n(2047),v=n(2527),y=n.n(v);a.defaultProps={listType:"actor",listContext:h.a},t.a=a},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.relatedHubEntityIDs,a=e.showSpinner;return a?r()("div",{className:u.a.spinnerContainer},void 0,d):r()(l.a,{
className:u.a.relatedList,serverEntityID:t,providerEntityID:n,hubEntityIDs:i,columnAdjustment:1})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(41)),l=n(835),c=n(2528),u=n.n(c),d=r()(o.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.server,s=e.provider,m=e.metadataKey,x=e.librarySectionKey,P=e.type,E=e.duration,A=e.contentRating,L=e.Genre,k=e.summary,N=e.grandparentThumb,_=e.isSubscribed,O=e.subscriptionType,R=e.grandparentSubscriptionType,j=e.mediaItem,z=e.pageHeight,U=e.posterWidth,F=e.posterTop,B=e.record;
return r()("div",{},void 0,r()(w.a,{pageHeight:z,posterTop:F}),r()(u.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:m,type:P,posterType:"show",pageHeight:z,posterWidth:U,posterTop:F,posterUrl:N}),r()(d.a,{posterWidth:U},void 0,r()(h.a,{},void 0,r()(p.a,{},void 0,r()(g.a,{},void 0,r()(o.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),r()(f.a,{},void 0,r()(g.a,{},void 0,r()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),r()(I.a,{server:a,
provider:s,librarySectionKey:x,contentRating:A,genres:L},void 0,r()(c.a,{duration:E}),r()(M.a,{serverEntityID:t,metadataItemEntityID:i,type:P,isSubscribed:_,subscriptionType:O,grandparentSubscriptionType:R,isSubscribeModalOpen:B}))),T,r()(h.a,{},void 0,r()(v.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(C.a,{mediaItem:j},void 0,r()(D.a,{metadataItemEntityID:i,showFullTime:!0,showChannel:!0})),r()(y.a,{},void 0,k),r()(b.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i
}),r()(S.a,{serverEntityID:t,providerEntityID:n}))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(80),n(79),n(294)),l=n(295),c=n(515),u=n(527),d=n(525),h=n(526),p=n(528),f=n(529),g=n(374),m=n(298),v=n(523),y=n(530),b=n(531),S=n(532),w=n(533),M=n(534),I=n(536),C=n(535),D=n(870),T=r()(m.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.server,s=e.provider,f=e.metadataKey,D=e.librarySectionKey,T=e.title,x=e.type,P=e.year,E=e.duration,A=e.contentRating,L=e.Genre,k=e.summary,N=e.thumb,_=e.isSubscribed,O=e.subscriptionType,R=e.mediaItem,j=e.pageHeight,z=e.posterWidth,U=e.posterTop,F=e.record;
return r()("div",{},void 0,r()(b.a,{pageHeight:j,posterTop:U}),r()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:f,type:x,pageHeight:j,posterWidth:z,posterTop:U,posterUrl:N}),r()(c.a,{posterWidth:z},void 0,r()(u.a,{},void 0,r()(d.a,{},void 0,r()(p.a,{},void 0,T)),r()(h.a,{},void 0,r()(p.a,{},void 0,P)),r()(w.a,{server:a,provider:s,librarySectionKey:D,contentRating:A,genres:L},void 0,r()(o.a,{duration:E}),r()(S.a,{serverEntityID:t,metadataItemEntityID:i,type:x,isSubscribed:_,
subscriptionType:O,isSubscribeModalOpen:F}))),C,r()(u.a,{},void 0,r()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(M.a,{mediaItem:R},void 0,r()(I.a,{metadataItemEntityID:i,showFullTime:!0,showChannel:!0})),r()(m.a,{},void 0,k),r()(v.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(y.a,{serverEntityID:t,providerEntityID:n}))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(80),n(79),n(515)),l=n(527),c=n(525),u=n(526),d=n(528),h=n(529),p=n(374),f=n(298),g=n(523),m=n(530),v=n(531),y=n(532),b=n(533),S=n(534),w=n(536),M=n(535),I=n(870),C=r()(f.a,{});
t.a=i},function(e,t,n){"use strict";function i(){return n.i(S.createSelector)(n.i(D.a)(),function(e){return!(!e||!e.isPopulated)})}function a(){return n.i(S.createSelector)(M.a,I.a,n.i(C.a)(),n.i(T.a)(),i(),function(e,t,n,i,a){var r=m.a.pick(n,"librarySectionKey","title","type","year","duration","contentRating","summary","Genre","subscriptionType","grandparentSubscriptionType","thumb","parentThumb","grandparentThumb");return f()({server:e,provider:t,metadataKey:n.key,isSubscribed:null!=n.subscriptionID||null!=n.grandparentSubscriptionID,
mediaItem:i,isListReady:a},r)})}var r=n(17),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(7),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=n.n(v),b=n(15),S=n(9),w=(n.n(S),n(35)),M=n(58),I=n(62),C=n(29),D=n(322),T=n(281),x=n(773),P=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentWillMount=function(){this._populate(this.props)},t.prototype._populate=function(e){n.i(w.a)(function(){e.initPrePlayDescendantList({serverEntityID:e.serverEntityID
})})},t.prototype.render=function(){var e=this.props,t=e.component,n=s()(e,["component"]);return y.a.createElement(t,n)},t}(v.Component);t.a=n.i(b.b)(a,{initPrePlayDescendantList:x.initPrePlayDescendantList})(P)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(25)),p=(n(80),n(79),n(130)),f=n(364),g=n(516),m=n(527),v=n(525),y=n(526),b=n(528),S=n(529),w=n(374),M=n(298),I=n(2044),C=n(2043),D=n(523),T=n(530),x=n(531),P=n(532),E=n(533),A=n(534),L=n(2056),k=n(536),N=a()(M.a,{}),_=a()(I.a,{}),O=a()(C.a,{}),R=function(e){
function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onContentMeasure=function(e){var t=e.width,n=e.height;a.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},a.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(h.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataListEntityID,s=e.server,o=e.provider,l=e.metadataKey,c=e.librarySectionKey,u=e.title,d=e.type,h=e.year,M=e.contentRating,I=e.Genre,C=e.summary,R=e.thumb,j=e.isSubscribed,z=e.subscriptionType,U=e.isListReady,F=e.pageHeight,B=e.scrollTop,V=e.posterWidth,H=e.posterTop,W=e.record,Q=this.state,Y=Q.isContentMeasured,G=Q.contentWidth,K=Q.contentHeight,q=!(!Y||!r);
return a()("div",{},void 0,a()(E.a,{pageHeight:F,posterTop:H}),a()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:l,type:d,pageHeight:F,posterWidth:V,posterTop:H,posterUrl:R}),a()(v.a,{posterWidth:V},void 0,a()(p.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,a()(y.a,{},void 0,a()(b.a,{},void 0,a()(w.a,{},void 0,u)),a()(S.a,{},void 0,a()(w.a,{},void 0,h)),a()(k.a,{server:s,provider:o,librarySectionKey:c,contentRating:M,genres:I},void 0,a()(g.a,{serverEntityID:t,
providerEntityID:n,metadataItemEntityID:i}),a()(A.a,{serverEntityID:t,metadataItemEntityID:i,type:d,isSubscribed:j,subscriptionType:z,isSubscribeModalOpen:W}))),N,a()(y.a,{},void 0,a()(D.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(T.a,{},void 0,C)),_),q&&a()(f.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:r,component:L.a,initialSize:20,viewportWidth:G,viewportHeight:F,scrollTop:B-K}),q&&O,U&&a()(y.a,{},void 0,a()(x.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i
}),a()(P.a,{serverEntityID:t,providerEntityID:n}))))},t}(d.Component);t.a=R},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(25),f=n(131),g=n(106),m=n(30),v=n(26),y=n(108),b=n(496),S=n(230),w=n(295),M=n(841),I=n(2530),C=n.n(I),D=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onRecordPress=function(e){a.setState({isSubscribeModalOpen:!0})},a.onSubscribeModalClose=function(){a.setState({
isSubscribeModalOpen:!1})},a.state={isSubscribeModalOpen:!1},a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,s=e.cellIndex,o=e.cellX,l=e.cellY,c=e.cellWidth,u=e.cellHeight,d=e.isLoading,p=e.route,f=e.title,I=e.type,D=e.summary,T=e.hasSingleSubscription,x=this.state.isSubscribeModalOpen;return d?a()(g.a,{className:s%2?C.a.alternateLoadingItem:C.a.loadingItem,
cellX:o,cellY:l,cellWidth:c,cellHeight:u},void 0,n.i(h.default)("Loading...")):a()(g.a,{className:s%2?C.a.alternateItem:C.a.item,cellX:o,cellY:l,cellWidth:c,cellHeight:u},void 0,a()(v.a,{className:C.a.underlay,to:p}),a()("div",{className:C.a.overlay},void 0,a()("div",{className:C.a.primaryTitle},void 0,a()(w.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r})),a()("div",{className:C.a.secondaryTitle},void 0,T&&a()(m.a,{className:C.a.subscriptionIcon,name:"plex-icon-dvr-single-560","aria-label":n.i(h.default)("Recording Scheduled")
}),a()(M.a,{className:C.a.nextAiringDate,metadataItemEntityID:r,showFullTime:!0}),!!D&&a()(y.a,{className:C.a.separator}),D)),a()(b.a,{className:C.a.recordButton,tabIndex:"-1",title:f,onPress:this.onRecordPress}),a()(S.a,{serverEntityID:t,metadataItemEntityID:r,isOpen:x,subscriptionType:I,onModalClose:this.onSubscribeModalClose}))},t}(d.Component);t.a=n.i(f.a)(D)},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(p.a,f.a,n.i(g.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=l.a.pick(i,"title","type","summary");
return s()({isLoading:!i.key,route:n.i(m.a)(e,t,i.key),hasSingleSubscription:!!i.subscriptionID},a)})}function a(e){return u.a.createElement(v.a,e)}var r=n(7),s=n.n(r),o=n(2),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(9),p=(n.n(h),n(58)),f=n(62),g=n(29),m=n(86),v=n(2054);t.a=n.i(d.b)(i)(a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(7),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=(n(472),n(547)),v=n(41),y=n(469),b=n(2055),S=n(2531),w=n.n(S),M=96,I=n.i(m.a)(M),C=function(e){
function t(){var n,i,a;l()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.renderCell=function(e){return f.a.createElement(b.a,s()({serverEntityID:i.props.serverEntityID,providerEntityID:i.props.providerEntityID,metadataListEntityID:i.props.metadataListEntityID},e))},a=n,u()(i,a)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.metadataItemEntityIDs,i=e.populatedRange,r=e.isPending,s=e.error,o=e.viewportWidth,l=e.viewportHeight,c=e.scrollTop,u=e.onPageRequest;
return r?a()("div",{className:w.a.emptyContainer},void 0,a()(v.a,{label:n.i(g.default)("Loading episodes")})):s?a()("div",{className:w.a.emptyMessage},void 0,n.i(g.default)("Unable to load episodes")):t.length?a()(y.a,{keyPropName:"metadataItemEntityID",items:t,itemsOffset:i.start,size:t.length,layout:I,cellRenderer:this.renderCell,viewportWidth:o,viewportHeight:l,scrollTop:c,onPageRequest:u}):a()("div",{className:w.a.emptyMessage},void 0,n.i(g.default)("No episodes"))},t}(p.Component);t.a=C},function(e,t,n){
"use strict";function i(e){var t=e.personalCloudServerProviders,i=e.isPersonalCloudServerProvidersPending,a=e.isPersonalCloudServerProvidersPopulated,s=e.personalCloudServerProvidersError;return r()(p.a,{innerClassName:g.a.innerModalBody},void 0,r()("p",{},void 0,n.i(c.default)("Choose your cloud storage provider. You can use an existing account or create a new one."),m,n.i(c.default)("You'll be able to link additional providers later in settings.")),i&&!a&&r()("div",{className:g.a.providersButtonsSpinner
},void 0,v),a&&r()("div",{className:4===t.length?g.a.providerButtonsContainerNarrow:g.a.providerButtonsContainer},void 0,t.map(function(e){var t=e.image,i=e.label,a=e.url;return r()(d.a,{className:g.a.vendorLogoButton,"aria-label":i,to:o.join([a],{origin:n.i(l.a)(window.location.href,"#!/cpms")})},i,r()(h.a,{className:g.a.vendorLogo,src:t}))})),s&&n.i(c.default)("An error occurred retrieving cloud storage providers. Please try again."))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(20)),l=n(742),c=n(4),u=n(41),d=n(51),h=n(467),p=n(71),f=n(2532),g=n.n(f),m=r()("br",{}),v=r()(u.a,{});
t.a=i},function(e,t,n){"use strict";var i=n(15),a=n(674),r=n(2057);t.a=n.i(i.b)(a.a)(r.a)},function(e,t,n){"use strict";function i(e){var t=e.isProvisionPersonalCloudServerPending,i=e.provisionPersonalCloudServerError,a=e.isConnectToPersonalCloudServerPending,s=e.connectToPersonalCloudServerError,d=e.isPersonalCloudServerDriveCachePending,g=e.isPersonalCloudServerDriveCachePopulated,m=e.personalCloudServerDriveCacheError,v=e.ownedPersonalCloudServerUrl,y=n.i(l.default)("Plex Cloud Setup");return t?r()(c.a,{
title:y,description:n.i(l.default)("Creating a new Plex Cloud server just for you!")},void 0,h):i?r()(c.a,{title:y,description:n.i(l.default)("An error occurred creating your Plex Cloud server.")},void 0,r()(u.a,{to:"#!/dashboard",kind:o.c.PRIMARY},void 0,n.i(l.default)("Continue"))):a?r()(c.a,{title:y,description:n.i(l.default)("Your Plex Cloud server is waking up.")},void 0,p):s?r()(c.a,{title:y,description:n.i(l.default)("Your Plex Cloud server is taking longer than expected to wake up. Check again later.")
},void 0,r()(u.a,{to:"#!/dashboard",kind:o.c.PRIMARY},void 0,n.i(l.default)("Continue"))):d?r()(c.a,{title:y,description:n.i(l.default)("Scanning your cloud storage. If you have lots of data, this may take a while.")},void 0,f):m?r()(c.a,{title:y,description:n.i(l.default)("Scanning your cloud storage is taking longer than expected. Check again later.")},void 0,r()(u.a,{to:"#!/dashboard",kind:o.c.PRIMARY},void 0,n.i(l.default)("Continue"))):g?r()(c.a,{title:y,description:n.i(l.default)("Success! Plex Cloud is ready to go. This works just like a regular Plex Media Server. Pick it in the location menu of your favorite Plex app and stream away!")
},void 0,r()(u.a,{to:v,kind:o.c.PRIMARY},void 0,n.i(l.default)("Continue"))):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(23)),l=n(4),c=n(140),u=n(51),d=n(41),h=r()(d.a,{}),p=r()(d.a,{}),f=r()(d.a,{});t.a=i},function(e,t,n){"use strict";var i=n(11),a=n.n(i),r=n(13),s=n.n(r),o=n(12),l=n.n(o),c=n(7),u=n.n(c),d=n(1),h=n.n(d),p=n(15),f=n(9),g=(n.n(f),n(20)),m=n(35),v=n(672),y=n(438),b=n(134),S=n(2059),w=n.i(f.createSelector)(v.a,function(e){return g.join([e,"/api/v2/cloud_server/provision"])}),M=n.i(f.createSelector)(y.a,function(e){
return e?"#!/server/"+e.machineIdentifier+"/dashboard":null}),I=n.i(f.createSelector)(function(e){return e.ui.provisionPersonalCloudServerPage},w,M,function(e,t,n){return u()({},e,{provisionPersonalCloudServerUrl:t,ownedPersonalCloudServerUrl:n})}),C={provisionPersonalCloudServer:b.b,populatePersonalCloudServerCache:b.c,connectToOwnedPersonalCloudServer:b.d},D=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentWillMount=function(){this._populate(this.props);
},t.prototype.componentWillReceiveProps=function(e){e.isConnectToPersonalCloudServerPopulated&&!this.props.isConnectToPersonalCloudServerPopulated&&this.props.populatePersonalCloudServerCache(),e.isProvisionPersonalCloudServerPopulated&&!this.props.isProvisionPersonalCloudServerPopulated&&this.props.connectToOwnedPersonalCloudServer()},t.prototype._populate=function(e){var t=this;n.i(m.a)(function(){e.provisionPersonalCloudServer({url:t.props.provisionPersonalCloudServerUrl})})},t.prototype.render=function(){
return h.a.createElement(S.a,this.props)},t}(d.Component);t.a=n.i(p.b)(I,C)(D)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(588),f=(n.n(p),n(953)),g=n.n(f),m=n(25),v=n(23),y=n(194),b=n(2064),S=n(2063),w=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(m.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.machineIdentifier,n=e.selectedViewType;
return a()(y.a,{scrollDirection:v.a.NONE},void 0,a()(b.a,{machineIdentifier:t,selectedViewType:n}),h.a.createElement(S.a,this.props))},t}(d.Component);t.a=n.i(p.DragDropContext)(g.a)(w)},function(e,t,n){"use strict";function i(){return n.i(m.createSelector)(S.a,n.i(w.a)(y.a.SUBSCRIBE),function(e,t){var n=t[0];if(n){var i=e[n];return i&&i.identifier}})}function a(){return n.i(m.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e,t){var n=t.selectedViewType;return n},n.i(b.a)(),i(),M.a,function(e,t,n,i,a){
var r=e.isPagePopulated,s=e.isCalendarPopulated,o=e.calendarError,l=e.isMediaSubscriptionsPopulated,c=e.mediaSubscriptionsError,u=e.calendar,d=!s&&!o,h=!l&&!c,p=d||h,f=!p&&l&&!e.mediaSubscriptions.length;return{isPagePopulated:r,machineIdentifier:n.machineIdentifier,showSpinner:p,showEmptyState:f,programGuideIdentifier:i,time:u?u.time:void 0,selectedViewType:t||a.calendarViewType}})}var r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(7),h=n.n(d),p=n(1),f=n.n(p),g=n(15),m=n(9),v=(n.n(m),n(35)),y=n(171),b=n(63),S=n(324),w=n(670),M=n(157),I=n(76),C=n(279),D=n(2061),T=36e5,x=h()({
saveSettings:I.a},C),P=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a._updateCalendar=function(){a.props.goToToday(),a.props.fetchCalendar(),a._resetUpdateTimeout()},a._updateTimeoutID=null,a}return u()(t,e),t.prototype.componentWillMount=function(){this._populate(),this._resetUpdateTimeout(),this._saveViewType()},t.prototype.componentWillReceiveProps=function(e){var t=e.serverEntityID,n=e.time,i=e.selectedViewType;t!==this.props.serverEntityID&&this._populate(e),
this._updateTimeoutID&&n!==this.props.time&&this._resetUpdateTimeout(),i!==this.props.selectedViewType&&this._saveViewType(e)},t.prototype.componentWillUnmount=function(){this._updateTimeoutID&&clearTimeout(this._updateTimeoutID),this.props.clearRecordingSchedulePage()},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;n.i(v.a)(function(){e.initRecordingSchedulePage({serverEntityID:e.serverEntityID}),e.fetchCalendar(),e.fetchMediaSubscriptions();
})},t.prototype._resetUpdateTimeout=function(){this._updateTimeoutID&&clearTimeout(this._updateTimeoutID),this._updateTimeoutID=setTimeout(this._updateCalendar,T)},t.prototype._saveViewType=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;e.saveSettings({name:"experienceSettings",settings:{calendarViewType:e.selectedViewType}})},t.prototype.render=function(){return this.props.isPagePopulated?f.a.createElement(D.a,this.props):null},t}(p.Component);t.a=n.i(g.b)(a,x)(P);
},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.machineIdentifier,a=e.showSpinner,s=e.showEmptyState,m=e.programGuideIdentifier,y=e.selectedViewType;if(a)return r()(d.a,{},void 0,r()(h.a,{},void 0,r()(u.a,{label:n.i(o.default)("Loading schedule")})));if(s&&m){var b=encodeURIComponent(i),S=encodeURIComponent(m);return r()(d.a,{},void 0,r()(h.a,{icon:"plex-icon-calendar-560",title:n.i(o.default)("You have no recordings scheduled")},void 0,r()(c.a,{className:v.a.emptyDescription,
text:"Check out the {1}Program Guide{2} to browse available programming",args:['<a href="#!/server/'+b+"/provider/"+S+'">',"</a>"]})))}return s&&!m?r()(d.a,{},void 0,r()(h.a,{icon:"plex-icon-calendar-560",title:n.i(o.default)("You have no recordings scheduled"),description:n.i(o.default)("You need a DVR before you can schedule recordings")})):r()("div",{},void 0,r()(d.a,{className:v.a.schedulePageContent,innerClassName:v.a.schedulePageInnerContent},void 0,y===l.b.CALENDAR&&r()(f.a,{serverEntityID:t
}),y===l.b.AGENDA&&r()(g.a,{serverEntityID:t})),r()(p.a,{serverEntityID:t}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(23),c=n(746),u=n(41),d=n(231),h=n(164),p=n(2087),f=n(2074),g=n(2067),m=n(2533),v=n.n(m);t.a=i},function(e,t,n){"use strict";function i(e){return e===m.b.AGENDA?n.i(f.default)("Agenda View"):n.i(f.default)("Calendar View")}var a=n(3),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(4),g=n(25),m=n(23),v=n(73),y=n(195),b=n(196),S=n(522),w=n(521),M=n(2065),I=r()(S.a,{}),C=function(e){
function t(n,i){o()(this,t);var a=c()(this,e.call(this,n,i));return a.onViewsMenuButtonPress=function(e){a.setState({isViewsMenuOpen:!a.state.isViewsMenuOpen})},a.onViewsMenuClose=function(){a.setState({isViewsMenuOpen:!1})},a.state={isViewsMenuOpen:!1},a}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.machineIdentifier,a=e.selectedViewType;return r()(y.a,{},void 0,r()(b.a,{},void 0,r()("span",{},void 0,n.i(f.default)("Recording Schedule"),I),p.a.createElement(w.a,{
ref:"viewsMenuButton",hasMenu:!0,title:i(a),onPress:this.onViewsMenuButtonPress}),r()(v.a,{target:this.refs.viewsMenuButton,isOpen:this.state.isViewsMenuOpen,onMenuClose:this.onViewsMenuClose},void 0,m.b.all.map(function(e){return r()(M.a,{machineIdentifier:t,selectedViewType:a,viewType:e},e,i(e))}))))},t}(h.Component);t.a=C},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.machineIdentifier,i=e.selectedViewType,a=e.viewType,s=encodeURIComponent(n);return r()(o.a,{to:"#!/server/"+s+"/schedule?view="+a,
isSelected:i===a},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(116));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.showError,a=e.isEmpty,s=e.subscriptionCount;return i?r()(l.a,{title:n.i(o.default)("There was an error loading the agenda")}):a?r()(c.a,{subscriptionCount:s}):r()("div",{},void 0,h,r()(d.a,{serverEntityID:t}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(199),c=n(872),u=n(2072),d=n(2070),h=r()(u.a,{});t.a=i},function(e,t,n){"use strict";function i(){
return n.i(r.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.mediaSubscriptions,n=e.calendar,i=e.isCalendarPopulated,a=e.calendarError;return{showError:!i&&!!a,isEmpty:!n.scheduled.length,subscriptionCount:t.length}})}var a=n(15),r=n(9),s=(n.n(r),n(2066));t.a=n.i(a.b)(i)(s.a)},function(e,t,n){"use strict";function i(e,t,i,a,r,s){if("episode"!==e)return i;var o=n.i(w.a)({seasonIndex:a,episodeIndex:r,date:s});return t+" - "+o+" - "+i}var a=n(3),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(4),p=n(43),f=n.n(p),g=n(1),m=(n.n(g),
n(28)),v=n.n(m),y=n(327),b=n(262),S=n(687),w=n(127),M=n(25),I=n(26),C=n(290),D=n(226),T=n(291),x=n(836),P=n(230),E=n(873),A=n(371),L=n(295),k=n(2534),N=n.n(k),_={context:"agenda"},O=function(e){function t(n,i){o()(this,t);var a=c()(this,e.call(this,n,i));return a.onLinkPress=function(e){a.setState({isAiringDetailsModalOpen:!0})},a.onConflictIconPress=function(e){a.setState({isConflictsModalOpen:!0})},a.onRecordingModify=function(){a.setState({isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!0})},
a.onAiringDetailsModalClose=function(){a.setState({isAiringDetailsModalOpen:!1})},a.onSubscribeModalClose=function(){a.setState({isSubscribeModalOpen:!1,isConflictsModalOpen:!1})},a.state={isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!1,isConflictsModalOpen:!1},a}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(M.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,a=e.mediaSubscriptionEntityID,s=e.metadataItemEntityID,o=e.prePlayRoute,l=e.type,c=e.title,u=e.grandparentTitle,d=e.index,p=e.parentIndex,g=e.originallyAvailableAt,m=e.error,w=e.mediaItem,M=e.isRecording,k=e.recordingProgress,O=e.isComplete,R=e.hasError,j=e.hasSubscription,z=e.hasConflicts,U=e.showPlay,F=e.showDate,B=e.timeFormat,V=e.onPlayPress,H=this.state,W=H.isAiringDetailsModalOpen,Q=H.isSubscribeModalOpen,Y=H.isConflictsModalOpen,G=w.beginsAt,K=w.endsAt,q=w.startOffsetSeconds,Z=void 0===q?0:q,X=w.endOffsetSeconds,J=void 0===X?0:X,$=w.premiere,ee=f.a.unix(G),te=n.i(S.a)(G-Z,K+J,{
timeFormat:B}),ne=n.i(b.a)(G),ie=ee.format("ddd, MMM D");n.i(y.a)(G)?ie=n.i(h.default)("Yesterday"):ne&&(ie=n.i(h.default)("Today"));var ae=u?u:c,re=i(l,u,c,p,d,g);return r()("div",{className:v()(N.a.event,O&&N.a.isComplete,R&&N.a.hasError)},void 0,r()(I.a,{className:N.a.underlay,to:o,onPress:o?void 0:this.onLinkPress}),r()("div",{className:N.a.overlay},void 0,r()("div",{className:v()(N.a.date,ne&&N.a.isToday)},void 0,F&&ie),r()("div",{className:N.a.time},void 0,te),r()("div",{className:N.a.title,
title:re},void 0,$&&r()(C.a,{className:N.a.isNewBadge},void 0,n.i(h.default)("New")),ae,r()("div",{className:N.a.titleDetails},void 0,"movie"===l&&r()(A.a,{metadataItemEntityID:s}),"episode"===l&&r()(L.a,{metadataItemEntityID:s}))),r()("div",{className:N.a.status},void 0,M&&!R&&r()("div",{className:N.a.recording},void 0,r()(D.a,{size:24,backgroundClassName:N.a.recordingProgressBackground,lineWidth:2,progress:k,showProgressText:!1}),r()("span",{className:N.a.recordingIcon})),U&&r()(T.a,{title:c,onPress:V
}),R&&r()(E.a,{error:m,onPress:z?this.onConflictIconPress:this.onLinkPress}))),r()(x.a,{isOpen:W,metricsProperties:_,serverEntityID:t,metadataItemEntityID:s,error:m,mediaItem:w,hasSubscription:j,isComplete:O,hasError:R,isRecording:M,recordingProgress:k,onRecordingModify:this.onRecordingModify,onModalClose:this.onAiringDetailsModalClose}),j&&r()(P.a,{isOpen:Q||Y,metricsProperties:_,serverEntityID:t,mediaSubscriptionEntityID:a,metadataItemEntityID:s,subscriptionType:l,showConflicts:Y,isRecordingSchedule:!0,
onModalClose:this.onSubscribeModalClose}))},t}(g.Component);t.a=O},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.events;return r()("div",{},void 0,n.map(function(e,i){var a=o.a.unix(e.beginsAt),s=0===i||!o.a.unix(n[i-1].beginsAt).isSame(a,"day");return r()(c.a,{component:u.a,serverEntityID:t,metadataItemEntityID:e.metadataItem,mediaSubscriptionID:e.mediaSubscriptionID,eventID:e.metadataItem.key,status:e.status,error:e.error,linkedKey:e.linkedKey,mediaItem:e.mediaItem,hasConflicts:!(!e.conflicts||!e.conflicts.length),
showDate:s},i)}))}var a=n(3),r=n.n(a),s=n(43),o=n.n(s),l=n(1),c=(n.n(l),n(871)),u=n(2068);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar},function(e){return{events:e.scheduled}})}var a=n(15),r=n(9),s=(n.n(r),n(2069));t.a=n.i(a.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){return r()("div",{className:u.a.agendaHeader},void 0,o.a.createElement(l.a,e))}var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(874),c=n(2535),u=n.n(c);
t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.calendar,n=t.firstEvent,i=t.lastEvent;return{startTime:n?n.beginsAt:void 0,endTime:i?i.beginsAt:void 0}})}var a=n(15),r=n(9),s=(n.n(r),n(2071));t.a=n.i(a.b)(i)(s.a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(130),f=n(199),g=n(2085),m=n(2080),v=n(2078),y=n(872),b=n(2536),S=n.n(b),w=a()(m.a,{}),M=function(e){
function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onMeasure=function(e){var t=e.width,n=a.state.visibleDays,i=Math.min(Math.floor(t/120),7);i!==n&&a.props.onVisibleDaysChange(i),a.setState({isMeasured:!0,width:t,visibleDays:i})},a.state={isMeasured:!1,width:null,visibleDays:0},a}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.showError,r=e.isEmpty,s=e.subscriptionCount,o=e.visibleDays,l=e.onGoToPreviousRangePress,c=e.onGoToNextRangePress;return i?a()(f.a,{
title:n.i(h.default)("There was an error loading the calendar")}):r?a()(y.a,{subscriptionCount:s}):a()(p.a,{className:S.a.calendar,ignoreHeight:!0,onMeasure:this.onMeasure},void 0,o===this.state.visibleDays&&a()("div",{},void 0,a()(g.a,{onGoToPreviousRangePress:l,onGoToNextRangePress:c}),w,a()(v.a,{serverEntityID:t})))},t}(d.Component);t.a=M},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.mediaSubscriptions,n=e.calendar,i=e.isCalendarPopulated,a=e.calendarError;
return{showError:!i&&!!a,isEmpty:!n.scheduled.length,subscriptionCount:t.length,visibleDays:n.visibleDays}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(35)),v=n(279),y=n(2073),b=function(e){function t(){var i,a,r;o()(this,t);for(var s=arguments.length,l=Array(s),u=0;u<s;u++)l[u]=arguments[u];return i=a=c()(this,e.call.apply(e,[this].concat(l))),a.onVisibleDaysChange=function(e){n.i(m.a)(function(){a.props.setVisibleDays({visibleDays:e
})})},a.onGoToPreviousRangePress=function(){a.props.goToPreviousRange()},a.onGoToNextRangePress=function(){a.props.goToNextRange()},r=i,c()(a,r)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(y.a,r()({onVisibleDaysChange:this.onVisibleDaysChange,onGoToPreviousRangePress:this.onGoToPreviousRangePress,onGoToNextRangePress:this.onGoToNextRangePress},this.props))},t}(h.Component);t.a=n.i(f.b)(i,v)(b)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.date;return r()("div",{
className:c.a.day},void 0,r()(o.a,{serverEntityID:t,date:n}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2083)),l=n(2537),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.date,i=l.a.unix(t),a=n.i(f.a)(t),o=void 0;return o=n.i(p.a)(t)?n.i(s.default)("Yesterday"):a?n.i(s.default)("Today"):n.i(s.default)("{dayOfWeek} {monthNumber}/{dayNumber}",{dayOfWeek:n.i(h.a)(t,{abbreviate:!0}),monthNumber:i.month()+1,dayNumber:i.date()}),r()("div",{className:d()(m.a.dayOfWeek,a&&m.a.isToday),title:o
},void 0,o)}var a=n(3),r=n.n(a),s=n(4),o=n(43),l=n.n(o),c=n(1),u=(n.n(c),n(28)),d=n.n(u),h=n(682),p=n(327),f=n(262),g=n(2538),m=n.n(g);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.days,n=c()(e,["days"]);return o()("div",{className:f.a.calendarDays},void 0,t.map(function(e){return d.a.createElement(h.a,r()({key:e,date:e},n))}))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(2075),p=n(2539),f=n.n(p);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){
return e.ui.recordingSchedulePage},function(e){return{days:e.calendar.days}})}var a=n(15),r=n(9),s=(n.n(r),n(2077));t.a=n.i(a.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.daysOfWeek,n=c()(e,["daysOfWeek"]);return o()("div",{className:f.a.container},void 0,t.map(function(e){return d.a.createElement(h.a,r()({key:e,date:e},n))}))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(2076),p=n(2540),f=n.n(p);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){
return e.ui.recordingSchedulePage.calendar},function(e){return{daysOfWeek:e.daysOfWeek}})}var a=n(15),r=n(9),s=(n.n(r),n(2079));t.a=n.i(a.b)(i)(s.a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(28)),p=n.n(h),f=n(687),g=n(25),m=n(26),v=n(226),y=n(291),b=n(836),S=n(230),w=n(873),M=n(2542),I=n.n(M),C={context:"calendar"},D=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onLinkPress=function(e){
a.setState({isAiringDetailsModalOpen:!0})},a.onConflictIconPress=function(e){a.setState({isConflictsModalOpen:!0})},a.onRecordingModify=function(){a.setState({isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!0})},a.onAiringDetailsModalClose=function(){a.setState({isAiringDetailsModalOpen:!1})},a.onSubscribeModalClose=function(){a.setState({isSubscribeModalOpen:!1,isConflictsModalOpen:!1})},a.state={isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!1,isConflictsModalOpen:!1},a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){
return n.i(g.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.mediaSubscriptionEntityID,r=e.metadataItemEntityID,s=e.prePlayRoute,o=e.type,l=e.grandparentTitle,c=e.title,u=e.error,d=e.mediaItem,h=e.isRecording,g=e.recordingProgress,M=e.isComplete,D=e.hasError,T=e.hasSubscription,x=e.hasConflicts,P=e.showPlay,E=e.timeFormat,A=e.onPlayPress,L=this.state,k=L.isAiringDetailsModalOpen,N=L.isSubscribeModalOpen,_=L.isConflictsModalOpen,O=d.beginsAt,R=d.endsAt,j=d.startOffsetSeconds,z=void 0===j?0:j,U=d.endOffsetSeconds,F=void 0===U?0:U,B=n.i(f.a)(O-z,R+F,{
includeMinuteZero:!1,timeFormat:E}),V=l?l:c;return a()("div",{className:p()(I.a.event,M&&I.a.isComplete,D&&I.a.hasError)},void 0,a()(m.a,{className:I.a.underlay,to:s,onPress:s?void 0:this.onLinkPress}),a()("div",{className:I.a.overlay},void 0,a()("div",{className:I.a.title,title:V},void 0,V),a()("div",{className:I.a.secondary},void 0,a()("div",{className:I.a.time},void 0,B),a()("div",{className:I.a.status},void 0,h&&!D&&a()("div",{className:I.a.recording},void 0,a()(v.a,{size:24,backgroundClassName:I.a.recordingProgressBackground,
lineWidth:2,progress:g,showProgressText:!1}),a()("span",{className:I.a.recordingIcon})),P&&a()(y.a,{title:c,onPress:A}),D&&a()(w.a,{error:u,onPress:x?this.onConflictIconPress:this.onLinkPress})))),a()(b.a,{isOpen:k,metricsProperties:C,serverEntityID:t,metadataItemEntityID:r,error:u,mediaItem:d,hasSubscription:T,isComplete:M,hasError:D,isRecording:h,recordingProgress:g,onRecordingModify:this.onRecordingModify,onModalClose:this.onAiringDetailsModalClose}),T&&a()(S.a,{isOpen:N||_,metricsProperties:C,
serverEntityID:t,mediaSubscriptionEntityID:i,metadataItemEntityID:r,subscriptionType:o,showConflicts:_,isRecordingSchedule:!0,onModalClose:this.onSubscribeModalClose}))},t}(d.Component);t.a=D},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.events;return r()("div",{},void 0,n.map(function(e,n){return r()(o.a,{component:l.a,serverEntityID:t,metadataItemEntityID:e.metadataItem,mediaSubscriptionID:e.mediaSubscriptionID,eventID:e.metadataItem.key,status:e.status,error:e.error,linkedKey:e.linkedKey,
mediaItem:e.mediaItem,hasConflicts:!(!e.conflicts||!e.conflicts.length)},n)}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(871)),l=n(2081);t.a=i},function(e,t,n){"use strict";function i(){return n.i(u.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar},function(e,t){var n=t.date;return n},function(e,t){var n=h.a.unix(t),i=s.a.filter(e.scheduled,function(e){return h.a.unix(e.beginsAt).isSame(n,"day")});return{events:i}})}function a(e){return l.a.createElement(p.a,e)}var r=n(2),s=n.n(r),o=n(1),l=n.n(o),c=n(15),u=n(9),d=(n.n(u),
n(43)),h=n.n(d),p=n(2082);t.a=n.i(c.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.hasPastEvents,i=e.hasFutureEvents,a=e.onGoToPreviousRangePress,s=e.onGoToNextRangePress;return r()("div",{className:m.a.calendarHeader},void 0,r()("div",{className:m.a.calendarHeader},void 0,r()(p.a,{className:c()(m.a.calendarNav,!t&&m.a.calendarNavDisabled),kind:d.c.DEFAULT,size:d.d.MEDIUM,isDisabled:!t,onPress:a},void 0,r()(h.a,{name:"plex-icon-hub-prev-560","aria-label":n.i(u.default)("Previous Page")
})),o.a.createElement(f.a,e),r()(p.a,{className:c()(m.a.calendarNav,!i&&m.a.calendarNavDisabled),kind:d.c.DEFAULT,size:d.d.MEDIUM,isDisabled:!i,onPress:s},void 0,r()(h.a,{name:"plex-icon-hub-next-560","aria-label":n.i(u.default)("Next Page")}))))}var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(28),c=n.n(l),u=n(4),d=n(23),h=n(30),p=n(26),f=n(874),g=n(2543),m=n.n(g);t.a=i},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=l.a.pick(e.calendar,"time","startTime","endTime","hasPastEvents","hasFutureEvents");
return s()({},t)})}function a(e){return u.a.createElement(p.a,e)}var r=n(7),s=n.n(r),o=n(2),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(9),p=(n.n(h),n(2084));t.a=n.i(d.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.mediaSubscriptionEntityIDs,a=e.showError,s=e.moveIndex,d=e.onSubscriptionDragMove,p=e.onSubscriptionDragEnd;return r()("div",{className:h.a.pane},void 0,r()("div",{className:h.a.paneHeader},void 0,n.i(o.default)("Recording Priority")),r()(l.a,{className:h.a.paneScroller,
autoScroll:!0},void 0,a?r()("div",{className:h.a.error},void 0,r()("div",{},void 0,n.i(o.default)("There was an error loading recordings.")),r()("div",{},void 0,n.i(o.default)("Please try again."))):i.map(function(e,n){var i=null!=s,a=i&&s===n,o=i&&s===n+1;return r()(c.a,{serverEntityID:t,mediaSubscriptionEntityID:e,isDraggingBefore:a,isDraggingAfter:o,sortIndex:n,onSubscriptionDragMove:d,onSubscriptionDragEnd:p},e)})),r()(u.a,{serverEntityID:t}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(70),c=n(2090),u=n(2089),d=n(2545),h=n.n(d);
t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.mediaSubscriptions,n=e.isMediaSubscriptionsPopulated,i=e.mediaSubscriptionsError;return{mediaSubscriptionEntityIDs:t,showError:!n&&!!i}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(35)),v=n(279),y=n(2086),b=function(e){function t(i,a){o()(this,t);var s=c()(this,e.call(this,i,a));return s.onSubscriptionDragMove=function(e){
s.setState({moveIndex:e})},s.onSubscriptionDragEnd=function(e,t){var i=s.state.moveIndex;t&&null!=i&&n.i(m.a)(function(){s.props.moveMediaSubscription(r()({},e,{moveIndex:i}))}),s.setState({moveIndex:null})},s.state={moveIndex:null},s}return d()(t,e),t.prototype.render=function(){return p.a.createElement(y.a,r()({moveIndex:this.state.moveIndex,onSubscriptionDragMove:this.onSubscriptionDragMove,onSubscriptionDragEnd:this.onSubscriptionDragEnd},this.props))},t}(h.Component);t.a=n.i(f.b)(i,{moveMediaSubscription:v.moveMediaSubscription
})(b)},function(e,t,n){"use strict";function i(e){var t=void 0;switch(e){case"movie":t=[C.a,T.a];break;case"show":t=[C.a,A.a];break;case"episode":t=[D.a,x.a];break;case"playlist":t=[C.a,A.a];break;default:t=[C.a]}return t.push(L.a),t}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(11),d=n.n(u),h=n(13),p=n.n(h),f=n(12),g=n.n(f),m=n(1),v=n.n(m),y=n(25),b=n(202),S=n(30),w=n(26),M=n(362),I=n(368),C=n(369),D=n(512),T=n(855),x=n(517),P=n(230),E=n(2093),A=n(2092),L=n(2091),k=n(2546),N=n.n(k),_=48,O="copy",R=function(e){
function t(n,i){d()(this,t);var a=p()(this,e.call(this,n,i));return a.onLinkPress=function(e){a.setState({isSubscribeModalOpen:!0})},a.onSubscribeModalClose=function(){a.setState({isSubscribeModalOpen:!1})},a.state={isSubscribeModalOpen:!1},a}return g()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,a=e.mediaSubscriptionEntityID,s=e.type,l=e.thumb,u=e.grandparentThumb,d=e.connectDragSource,h=c()(e,["serverEntityID","mediaSubscriptionEntityID","type","thumb","grandparentThumb","connectDragSource"]),p=this.state.isSubscribeModalOpen,f="playlist"===s?"show":s;
return o()("div",{className:N.a.subscription},void 0,o()(w.a,{className:N.a.link,onPress:this.onLinkPress},void 0,o()("div",{className:N.a.linkContainer},void 0,o()(M.a,{className:N.a.posterContainer,serverEntityID:t,component:I.a,type:f,width:_,height:n.i(b.a)(_,f),url:u||l}),o()("div",{className:N.a.titleContainer},void 0,i(s).map(function(e,t){return v.a.createElement(E.a,r()({key:t,component:e,isSecondary:t>0,type:s},h))})))),d(o()("div",{className:N.a.dragHandle},void 0,o()(S.a,{className:N.a.dragIcon,
name:"plex-icon-reorder-560"})),{dropEffect:O}),o()(P.a,{isOpen:p,serverEntityID:t,mediaSubscriptionEntityID:a,subscriptionType:s,onModalClose:this.onSubscribeModalClose}))},t}(m.Component);R.defaultProps={connectDragSource:function(e){return e}},t.a=R},function(e,t,n){"use strict";function i(e){return{item:e.getItem(),itemType:e.getItemType(),currentOffset:e.getSourceClientOffset()}}var a=n(3),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=(n.n(h),n(588)),f=(n.n(p),n(25)),g=n(109),m=n.n(g),v=n(888),y=n(1844),b=n(875),S=n(2547),w=n.n(S),M=parseInt(m.a.recordingPriorityPaneWidth,10),I=parseInt(m.a.recordingPriorityDragHandleWidth,10),C=function(e){
function t(){return o()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.item,i=e.itemType,a=e.currentOffset;if(!a||i!==v.a)return null;var s=a.x,o=a.y,l=M-I,c="translate3d("+(s-l)+"px, "+o+"px, 0)",u={position:"absolute",WebkitTransform:c,msTransform:c,transform:c};return r()(y.a,{},void 0,r()("div",{className:w.a.dragPreview,style:u},void 0,r()(b.a,{
serverEntityID:t,mediaSubscriptionEntityID:n.mediaSubscriptionEntityID})))},t}(h.Component);t.a=n.i(p.DragLayer)(i)(C)},function(e,t,n){"use strict";function i(e,t){return{connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}}function a(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver()}}var r=n(3),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=(n.n(p),n(46)),g=(n.n(f),n(588)),m=(n.n(g),n(953)),v=(n.n(m),n(28)),y=n.n(v),b=n(25),S=n(888),w=n(895),M=n(875),I=n(2548),C=n.n(I),D={
beginDrag:function(e){var t=e.mediaSubscriptionEntityID;return{mediaSubscriptionEntityID:t}},endDrag:function(e,t,n){e.onSubscriptionDragEnd(t.getItem(),t.didDrop())}},T={hover:function(e,t,i){var a=n.i(f.findDOMNode)(i).getBoundingClientRect(),r=(a.bottom-a.top)/2,s=t.getClientOffset(),o=s.y-a.top,l=e.sortIndex,c=o>r?l+1:l;e.onSubscriptionDragMove(c)}},x=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidMount=function(){this.props.connectDragPreview(n.i(m.getEmptyImage)());
},t.prototype.shouldComponentUpdate=function(e,t){return n.i(b.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.mediaSubscriptionEntityID,i=e.isDragging,a=e.isDraggingBefore,r=e.isDraggingAfter,o=e.isOver,l=e.connectDropTarget,c=e.connectDragSource;return l(s()("div",{className:y()(C.a.dragSource,i&&w.d,a&&o&&w.e,r&&o&&w.f)},void 0,s()(M.a,{serverEntityID:t,mediaSubscriptionEntityID:n,connectDragSource:c})))},t}(p.Component);t.a=n.i(g.DropTarget)(S.a,T,a)(n.i(g.DragSource)(S.a,D,i)(x));
},function(e,t,n){"use strict";function i(e,t){return e?n.i(u.a)(e,t)?n.i(l.default)("Airing now"):n.i(c.a)(e):n.i(l.default)("No upcoming airings")}function a(e){var t=e.className,n=e.beginsAt,a=e.endsAt,r=i(n,a);return s()("span",{className:t},void 0,r)}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),n(4)),c=n(681),u=n(445);t.a=a},function(e,t,n){"use strict";function i(e){if("show"===e)return n.i(l.default)("Series")}function a(e){var t=e.className,n=e.type;return s()("span",{className:t},void 0,s()(c.a,{
className:d.a.seriesIcon,name:"plex-icon-dvr-series-560"}),i(n))}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),n(4)),c=n(30),u=n(2549),d=n.n(u);t.a=a},function(e,t,n){"use strict";function i(e){var t=e.component,n=e.isSecondary,i=o()(e,["component","isSecondary"]);return c.a.createElement(t,r()({className:n?d.a.secondaryTitle:d.a.title},i))}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(2550),d=n.n(u);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityIDs,n=e.query,i=e.isSearchPending,a=e.searchAllServers,s=e.onSearchAllChange;
return r()(l.a,{scrollDirection:o.a.NONE},void 0,r()(c.a,{isSearchPending:i,query:n,searchAllServers:a,onSearchAllChange:s}),r()(u.a,{serverEntityIDs:t,query:n}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(23)),l=n(194),c=n(2098),u=n(2097);t.a=i},function(e,t,n){"use strict";function i(){return n.i(b.createSelector)(function(e){return e.servers},function(e,t){var n=t.serverEntityID;return n},M.a,I.a,function(e,t,n,i){var a=i.searchAllServers;return e.reduce(function(e,i){if(i!==t&&!a)return e;var r=n[i],s=v.a.isMatch(r,{
isConnected:!0,isFullServer:!0});return s?e.concat(i):e},[])})}function a(){return n.i(w.a)(i(),function(e){return e})}function r(){return n.i(b.createSelector)(function(e){return e.ui.searchPage},a(),I.a,function(e,t,n){return{serverEntityIDs:t,searchAllServers:n.searchAllServers,isSearchPending:!!v.a.findWhere(e.searches,{isSearchPending:!0})}})}var s=n(7),o=n.n(s),l=n(11),c=n.n(l),u=n(13),d=n.n(u),h=n(12),p=n.n(h),f=n(1),g=n.n(f),m=n(2),v=n.n(m),y=n(15),b=n(9),S=(n.n(b),n(35)),w=n(173),M=n(256),I=n(157),C=n(774),D=n(76),T=n(2094),x={
populateSearchProviders:C.a,clearSearchPage:C.b,saveSettings:D.a},P=function(e){function t(){var i,a,r;c()(this,t);for(var s=arguments.length,o=Array(s),l=0;l<s;l++)o[l]=arguments[l];return i=a=d()(this,e.call.apply(e,[this].concat(o))),a.onSearchAllChange=function(e){n.i(S.a)(function(){a.props.saveSettings({name:"experienceSettings",settings:{searchAllServers:e}})})},r=i,d()(a,r)}return p()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){
e.serverEntityIDs!==this.props.serverEntityIDs&&this._populate(e)},t.prototype.componentWillUnmount=function(){this.props.clearSearchPage()},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;n.i(S.a)(function(){e.populateSearchProviders(e.serverEntityIDs)})},t.prototype.render=function(){return g.a.createElement(T.a,o()({},this.props,{onSearchAllChange:this.onSearchAllChange}))},t}(f.Component);t.a=n.i(y.b)(r,x)(P)},function(e,t,n){"use strict";
function i(e){var t=e.isSearchCapable,i=e.providers,a=e.searchAllServers,s=e.columnAdjustment;return t?o()(h.a,{innerClassName:g.a.searchPageContent},void 0,i.map(function(e){return c.a.createElement(d.a,r()({key:e.providerEntityID,columnAdjustment:s,searchAllServers:a},e))})):o()(p.a,{title:n.i(u.default)("This server does not support search"),description:n.i(u.default)("Browse libraries using the sidebar")})}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(2099),h=n(231),p=n(118),f=n(2551),g=n.n(f);
t.a=i},function(e,t,n){"use strict";function i(){return n.i(S.createSelector)(function(e,t){var n=t.serverEntityIDs;return n},I.a,C.a,function(e,t,n){return e.reduce(function(e,i){var a=t[i],r=a.desktop.providers;return r.forEach(function(t){var a=n[t];e[t]={serverEntityID:i,identifier:a.identifier,title:a.title}}),e},{})})}function a(){return n.i(M.a)(i(),function(e){return e})}function r(){return n.i(S.createSelector)(function(e){return e.ui.searchPage.searches},a(),function(e,t){var n=e.reduce(function(e,n){
var i=n.providerEntityID,a=t[i];if(!a)return e;var r=e[a.identifier];return r||(r=e[a.identifier]={providerEntityID:i,title:a.title,isSearchPending:!1,isSearchPopulated:!1,hubs:{}}),n.isSearchPending&&(r.isSearchPending=!0),n.isSearchPopulated&&(r.isSearchPopulated=!0),n.hubs.forEach(function(e){var t=e.results.map(function(e){return{serverEntityID:a.serverEntityID,providerEntityID:i,searchResultEntityID:e}}),n=r.hubs[e.hubIdentifier];n?(n.size+=e.size,n.results=n.results.concat(t)):r.hubs[e.hubIdentifier]={
hubIdentifier:e.hubIdentifier,size:e.size,type:e.type,title:e.title,results:[].concat(t)}}),e},{});return m.a.map(n,function(e){return{providerEntityID:e.providerEntityID,title:e.title,isSearchPending:e.isSearchPending,isSearchPopulated:e.isSearchPopulated,hubs:m.a.values(e.hubs)}})})}function s(){return n.i(S.createSelector)(a(),r(),D.a,function(e,t,n){return{availableProviders:e,isSearchCapable:!!f()(e).length,searchAllServers:n.searchAllServers,columnAdjustment:n.columnAdjustment,providers:t}});
}var o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(66),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=n.n(v),b=n(15),S=n(9),w=(n.n(S),n(35)),M=n(664),I=n(256),C=n(324),D=n(157),T=n(774),x=n(2096),P=30,E={fetchSearchPage:T.c,clearSearchPage:T.b},A=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentWillMount=function(){var e=this;n.i(w.a)(function(){e._clear(),e._populate()})},t.prototype.componentWillReceiveProps=function(e){var t=this,i=e.query!==this.props.query,a=e.availableProviders!==this.props.availableProviders;
(i||a)&&n.i(w.a)(function(){i&&t._clear(e),t._populate(e)})},t.prototype._clear=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;e.clearSearchPage()},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;e.fetchSearchPage({availableProviders:e.availableProviders,query:e.query,limit:P})},t.prototype.render=function(){return y.a.createElement(x.a,this.props)},t}(v.Component);t.a=n.i(b.b)(s,E)(A)},function(e,t,n){"use strict";
var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(4),f=n(25),g=n(23),m=n(41),v=n(359),y=n(293),b=n(195),S=n(196),w=n(520),M=n(232),I=n(522),C=n(2100),D=n(2552),T=n.n(D),x=a()(I.a,{}),P=a()(M.a,{},void 0,a()(y.a,{})),E=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onSearchMenuButtonPress=function(e){a.setState({isSearchMenuOpen:!a.state.isSearchMenuOpen})},a.onSearchMenuClose=function(){a.setState({isSearchMenuOpen:!1})},
a.state={isSearchMenuOpen:!1},a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.isSearchPending,i=e.query,r=e.searchAllServers,s=e.onSearchAllChange;return a()(b.a,{},void 0,a()(S.a,{},void 0,n.i(p.default)("Search"),x,h.a.createElement(v.a,{ref:"sharedSearchMenuButton",onPress:this.onSearchMenuButtonPress},r?n.i(p.default)("All Servers"):n.i(p.default)("This Server")),a()(C.a,{onSearchAllChange:s,isSearchAll:r,
target:this.refs.sharedSearchMenuButton,isOpen:this.state.isSearchMenuOpen,onMenuClose:this.onSearchMenuClose})),a()(w.a,{},void 0,a()("span",{},void 0,t?n.i(p.default)('Searching for "{1}"',i):n.i(p.default)('Results for "{1}"',i)),t&&a()(m.a,{className:T.a.spinner,size:g.d.SMALL})),P)},t}(d.Component);t.a=E},function(e,t,n){"use strict";function i(e){return function(t){return u.a.createElement(b.a,l()({component:S.a},e,t))}}function a(e){var t=e.title,a=e.hubs,r=e.columnAdjustment,o=e.searchAllServers,c=e.isSearchPending,b=e.isSearchPopulated;
return s()("div",{},void 0,s()("div",{"aria-role":"heading","aria-level":"2",className:M.a.providerTitle},void 0,t,c&&s()(m.a,{className:M.a.spinner,size:h.SMALL})),!a.length&&b?s()(y.a,{title:n.i(d.default)("No Results"),description:n.i(d.default)("Try a different query")}):a.map(function(e){var t=e.type,a=p.d,s=n.i(f.a)(t,a,{isSearch:!0,isSearchAll:o});return u.a.createElement(v.a,l()({},e,{key:e.hubIdentifier,listType:t,listContext:a,keyPropName:"searchResultEntityID",size:e.results.length,items:e.results,
itemsOffset:0,layout:n.i(g.a)(t,a,r,s.length),cellRenderer:i({listType:t,listContext:a,titleComponents:s})}))}))}var r=n(3),s=n.n(r),o=n(7),l=n.n(o),c=n(1),u=n.n(c),d=n(4),h=n(219),p=n(48),f=n(300),g=n(546),m=n(41),v=n(506),y=n(140),b=n(879),S=n(2144),w=n(2553),M=n.n(w);t.a=a},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(17),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(73),v=n(116),y=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];
return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onThisServerPress=function(){i.props.onSearchAllChange(!1)},i.onAllServersPress=function(){i.props.onSearchAllChange(!0)},a=n,u()(i,a)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.isSearchAll,i=s()(e,["isSearchAll"]);return f.a.createElement(m.a,i,a()(v.a,{isSelected:!t,onPress:this.onThisServerPress},void 0,n.i(g.default)("This Server")),a()(v.a,{isSelected:t,onPress:this.onAllServersPress},void 0,n.i(g.default)("All Servers")));
},t}(p.Component);t.a=y},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(132),f=n(26),g=n(90),m=n(163),v=n(537),y=n(538),b=n(539),S=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onUnlinkPress=function(){a.setState({isUnlinkPersonalCloudServerProviderModalOpen:!0})},a.onUnlinkCancel=function(){a.setState({isUnlinkPersonalCloudServerProviderModalOpen:!1})},a.state={isUnlinkPersonalCloudServerProviderModalOpen:!1
},a}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isUnlinking&&!e.isUnlinking&&this.setState({isUnlinkPersonalCloudServerProviderModalOpen:!1})},t.prototype.render=function(){var e=this.props,t=e.isUnlinking,i=e.label,r=e.linked,s=e.nickname,o=e.url,l=e.onUnlink,c=this.state.isUnlinkPersonalCloudServerProviderModalOpen;return a()(v.a,{},o,a()(y.a,{},void 0,r&&a()(f.a,{kind:p.PRIMARY,to:o},void 0,n.i(h.default)("Reauthorize")),r&&a()(f.a,{isDisabled:t,kind:p.PRIMARY,
onPress:this.onUnlinkPress},void 0,n.i(h.default)("Unlink")),r&&a()(m.a,{isConfirmButtonSpinning:t,isCancelButtonDisabled:t,isOpen:c,metricsPage:"confirmUnlinkPersonalCloudServerProvider",title:n.i(h.default)("Unlink {personalCloudServerProvider}",{personalCloudServerProvider:i}),message:n.i(h.default)("Plex Cloud will no longer be able to access media stored on this provider and it will be removed from your library."),confirmLabel:n.i(h.default)("Unlink"),kind:p.DANGER,onConfirm:l,onCancel:this.onUnlinkCancel
}),!r&&a()(f.a,{kind:p.PRIMARY,to:o},void 0,n.i(h.default)("Link"))),a()(b.a,{},void 0,a()(g.a,{},void 0,i),s||n.i(h.default)("No account linked")))},t}(d.Component);t.a=S},function(e,t,n){"use strict";function i(e){var t=n.i(g.a)(window.location.href,"#!/account/plex-cloud");return f.join([e],{origin:t})}var a=n(3),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=(n.n(h),n(15)),f=n(20),g=n(742),m=n(134),v=n(2101),y={unlinkPersonalCloudServerProvider:m.f},b=function(e){function t(){
var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onUnlink=function(){i.props.unlinkPersonalCloudServerProvider({url:i.props.url})},a=n,c()(i,a)}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.isUnlinking,n=e.label,a=e.linked,s=e.nickname,o=e.url;return r()(v.a,{isUnlinking:t,label:n,linked:a,nickname:s,url:i(o),onUnlink:this.onUnlink})},t}(h.Component);t.a=n.i(p.b)(null,y)(b)},function(e,t,n){
"use strict";function i(e){var t=e.hasOwnedPersonalCloudServer,i=e.isUnauthorized,a=e.personalCloudServerProviders,s=e.isPersonalCloudServerProvidersPending,l=e.isPersonalCloudServerProvidersPopulated,d=e.personalCloudServerProvidersError;return i?o()(f.a,{title:n.i(u.default)("You're not supposed to be here"),description:n.i(u.default)("You don't have access to Plex Cloud settings")}):o()(h.a,{},void 0,o()(p.a,{},void 0,n.i(u.default)("Plex Cloud")),t&&v,s&&!l&&y,l&&a.map(function(e){return c.a.createElement(g.a,r()({
key:e.url},e))}),d&&n.i(u.default)("An error occurred retrieving cloud storage providers. Please try again."))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(878),h=n(540),p=n(541),f=n(118),g=n(2102),m=n(2106),v=o()(m.a,{}),y=o()(d.a,{});t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(7),h=n.n(d),p=n(1),f=(n.n(p),n(15)),g=n(9),m=(n.n(g),n(438)),v=n(674),y=n(439),b=n(134),S=n(2103),w=n.i(g.createSelector)(m.a,v.a,y.a,function(e,t,n){
return h()({},t,{hasOwnedPersonalCloudServer:!!e,isUnauthorized:!n.cpms})}),M={fetchPersonalCloudServerProviders:b.e},I=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentDidMount=function(){this.props.fetchPersonalCloudServerProviders({options:{data:{type:"plex_cloud"}}})},t.prototype.render=function(){var e=this.props,t=e.hasOwnedPersonalCloudServer,n=e.isUnauthorized,i=e.personalCloudServerProviders,r=e.isPersonalCloudServerProvidersPending,s=e.isPersonalCloudServerProvidersPopulated,o=e.personalCloudServerProvidersError;
return a()(S.a,{hasOwnedPersonalCloudServer:t,isUnauthorized:n,personalCloudServerProviders:i,isPersonalCloudServerProvidersPending:r,isPersonalCloudServerProvidersPopulated:s,personalCloudServerProvidersError:o})},t}(p.Component);t.a=n.i(f.b)(w,M)(I)},function(e,t,n){"use strict";function i(e){var t=e.isError,i=e.isPending,a=e.isRunning,s=void 0;return s=a?n.i(o.default)("Active"):t?n.i(o.default)("Error checking server status"):n.i(o.default)("Sleeping"),r()(d.a,{},void 0,r()(h.a,{},void 0,r()(f.a,{
label:n.i(o.default)("Restart")})),r()(p.a,{},void 0,r()(c.a,{},void 0,n.i(o.default)("Plex Cloud Server")),i?g:s))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(219),c=n(90),u=n(41),d=n(537),h=n(538),p=n(539),f=n(877),g=r()(u.a,{size:l.SMALL});i.defaultProps={isError:!1,isPending:!1,isRunning:!0},t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(15)),p=n(1203),f=n(134),g=n(2105),m={fetchPersonalCloudServerStatus:f.g},v=function(e){
function t(n,i){return s()(this,t),l()(this,e.call(this,n,i))}return u()(t,e),t.prototype.componentDidMount=function(){this.props.fetchPersonalCloudServerStatus()},t.prototype.render=function(){var e=this.props,t=e.personalCloudServerStatus,n=e.isPersonalCloudServerStatusPending,i=e.personalCloudServerStatusError,r=t&&t.running;return a()(g.a,{isError:!!i,isPending:n,isRunning:r})},t}(d.Component);v.defaultProps={personalCloudServerStatus:null,isPersonalCloudServerStatusPending:!1,isPersonalCloudServerStatusPopulated:!1,
personalCloudServerStatusError:null},t.a=n.i(h.b)(p.a,m)(v)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(132),f=n(26),g=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onPress=function(){i.props.restartPersonalCloudServer()},a=n,l()(i,a)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.isPersonalCloudServerRestarting,i=e.label;
return a()(f.a,{isDisabled:t,kind:p.DANGER,onPress:this.onPress},void 0,t?n.i(h.default)("Restarting\u2026"):i||n.i(h.default)("Restart Plex Cloud"))},t}(d.Component);g.defaultProps={isPersonalCloudServerRestarting:!1},t.a=g},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(264),f=n(889),g=n(132),m=n(876),v=n(499),y=n(97),b=n(139),S=n(90),w=n(2561),M=n.n(w),I=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];
return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onTogglePress=function(e){i.props.onToggle(i.props.index)},i.onRemovePress=function(e){i.props.onRemove(i.props.url)},i.onSubmit=function(e){i.props.onSubmit(i.props.url,e.url)},a=n,l()(i,a)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.isOpen,i=e.isUpdating,r=e.isRemoving,s=e.url,o=e.error,l=e.onErrorDismiss,c=i||r;return a()(m.a,{isOpen:t,closedNode:a()("div",{},void 0,a()(S.a,{className:M.a.label},void 0,n.i(h.default)("URL")),s),
errorMessage:n.i(p.a)(o),onErrorDismiss:l,onTogglePress:this.onTogglePress},void 0,a()(b.a,{onSubmit:this.onSubmit},void 0,a()(v.a,{focusOnMount:!0,labelText:n.i(h.default)("URL"),isDisabled:c,name:"url",initialValue:s,validations:s?[f.a]:[]}),a()("div",{className:M.a.buttons},void 0,s&&a()(y.a,{className:M.a.dangerButton,kind:g.DANGER,isSpinning:r,isDisabled:c,onPress:this.onRemovePress},void 0,n.i(h.default)("Remove")),a()(y.a,{className:M.a.button,type:"submit",kind:g.PRIMARY,isSpinning:i,isDisabled:c
},void 0,n.i(h.default)("Save Changes")))))},t}(d.Component);t.a=I},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(132),f=n(878),g=n(540),m=n(541),v=n(118),y=n(2108),b=n(51),S=n(26),w=n(163),M=n(2562),I=n.n(M),C=5,D=a()(f.a,{}),T=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onToggle=function(e){var t=a.state.openFormSectionIndex===e;a.props.onErrorDismiss(),a.props.onToggle(),a.setState({
openFormSectionIndex:t?null:e})},a.onRemove=function(e){a.setState({removeWebhookModalURL:e,isRemoveWebhookModalOpen:!0})},a.onSubmit=function(e,t){e===t?(a.setState({openFormSectionIndex:null}),a.props.onToggle()):a.props.onSubmit(e,t)},a.onRemoveWebhookConfirmPress=function(e){var t=a.state.removeWebhookModalURL;a.props.onRemove(t)},a.onRemoveWebhookCancelPress=function(e){a.setState({isRemoveWebhookModalOpen:!1})},a.state={openFormSectionIndex:null,isRemoveWebhookModalOpen:!1},a}return u()(t,e),
t.prototype.componentWillReceiveProps=function(e){var t=!e.isRemovingWebhooks&&this.props.isRemovingWebhooks;t&&this.setState({openFormSectionIndex:null,isRemoveWebhookModalOpen:!1});var n=e.webhooks===this.props.webhooks?-1:e.webhooks.findIndex(function(e){return""===e.url}),i=n!==-1,a=!e.isUpdatingWebhooks&&!e.updateWebhooksError&&this.props.isUpdatingWebhooks;i?this.setState({openFormSectionIndex:n}):a&&this.setState({openFormSectionIndex:null})},t.prototype.render=function(){var e=this,t=this.props,i=t.isUnauthorized,r=t.isWebhooksPending,s=t.isWebhooksPopulated,o=t.webhooksError,l=t.isUpdatingWebhooks,c=t.isRemovingWebhooks,u=t.updateWebhooksError,d=t.webhooks,f=t.onAddWebhookPress,M=t.onErrorDismiss,T=this.state,x=T.openFormSectionIndex,P=T.removeWebhookModalURL,E=T.isRemoveWebhookModalOpen;
if(i)return a()(v.a,{title:n.i(h.default)("You're not supposed to be here"),description:n.i(h.default)("You don't have access to webhooks settings")});var A=d&&d.length,L=d&&d.find(function(e){return""===e.url}),k=s&&d&&A<C&&!L;return a()(g.a,{},void 0,a()(m.a,{},void 0,n.i(h.default)("Webhooks")),a()("p",{},void 0,n.i(h.default)("Plex Media Server will make requests to these webhooks on various media playback events.")),a()("p",{},void 0,a()(S.a,{kind:p.PRIMARY,to:"https://support.plex.tv/hc/en-us/articles/115002267687",
target:"_blank"},void 0,n.i(h.default)("Learn more"))),r&&!s&&D,s&&!!A&&d.map(function(t,n){var i=x===n;return a()(y.a,{index:n,url:t.url,isOpen:i,isUpdating:i&&l,isRemoving:i&&c,error:i?u:null,onErrorDismiss:M,onRemove:e.onRemove,onToggle:e.onToggle,onSubmit:e.onSubmit},n)}),k&&a()("div",{className:I.a.buttons},void 0,a()(b.a,{kind:p.PRIMARY,onPress:f},void 0,n.i(h.default)("Add webhook"))),o&&n.i(h.default)("An error occurred retrieving webhooks. Please try again."),a()(w.a,{isConfirmButtonSpinning:c,
isCancelButtonDisabled:c,isOpen:E,metricsPage:"confirmRemoveWebhook",title:n.i(h.default)("Remove webhook"),message:n.i(h.default)("Plex will no longer post updates to {url}.",{url:P}),confirmLabel:n.i(h.default)("Remove"),kind:p.DANGER,onConfirm:this.onRemoveWebhookConfirmPress,onCancel:this.onRemoveWebhookCancelPress}))},t}(d.Component);t.a=T},function(e,t,n){"use strict";var i=n(17),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(7),h=n.n(d),p=n(1),f=n.n(p),g=n(15),m=n(9),v=(n.n(m),
n(174)),y=n(676),b=n(345),S=n(2109),w=n(2),M=n.n(w),I=n.i(m.createSelector)(v.a,y.a,function(e,t){var n=M.a.pick(e.desktop,["webhooks","isWebhooksPending","isWebhooksPopulated","webhooksError","isUpdatingWebhooks","isRemovingWebhooks","updateWebhooksError"]);return h()({},n,{isUnauthorized:!t.webhooks})}),C={dispatchFetchWebhooks:b.d,onAddWebhookPress:function(){return n.i(b.e)()},onErrorDismiss:b.f,onRemove:function(e){return n.i(b.g)(e)},onSubmit:function(e,t){return n.i(b.h)({oldUrl:e,newUrl:t
})},onToggle:function(){return n.i(b.g)("")}},D=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchFetchWebhooks(),this.props.onErrorDismiss()},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchWebhooks,a()(e,["dispatchFetchWebhooks"]));return f.a.createElement(S.a,t)},t}(p.Component);t.a=n.i(g.b)(I,C)(D)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(2),h=n.n(d),p=n(1),f=(n.n(p),
n(130)),g=n(106),m=n(2563),v=n.n(m),y=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onMeasure=function(e){var t=e.width,n=e.height;a.setState({isMeasured:!0,width:t,height:n})},a.state={isMeasured:!1,width:null,height:null},a}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.items,n=e.currentIndex,i=e.size,r=e.renderSlide;if(!t||!t.length)return null;var s=this.state,o=s.isMeasured,l=s.width,c=s.height,u=1,d=h.a.range(Math.max(0,n-u),Math.min(i,n+u+1));
return a()(f.a,{className:v.a.magazine,onMeasure:this.onMeasure},void 0,o&&d.map(function(e){var t=n===e;return a()(g.a,{className:t?v.a.currentSlide:v.a.slide,cellY:0,cellX:(e-n)*l,cellWidth:l,cellHeight:c},e,r(e,l,c))}))},t}(p.Component);t.a=y},function(e,t,n){"use strict";function i(e){return r()("div",{style:c},void 0,r()(o.a,{serverEntityID:e.serverEntityID,url:e.url,width:l,height:l,minSize:!0,background:!0,transition:!0}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(217)),l=110,c={width:l,height:l
};t.a=i},function(e,t,n){"use strict";function i(e){var t=e.title,i=e.summary,a=e.dateTaken,s=e.index,p=e.size,g=e.videoPosition,m=e.videoDuration,v=e.canEdit,y=e.isPhotoStripOpen,b=e.isPhotoInformationOpen,S=e.isPaused,w=e.isEditing,M=e.isFullscreen,I=e.onPhotoStripTogglePress,C=e.onPhotoInformationTogglePress,D=e.onEditTogglePress,T=e.onFullscreenTogglePress,x=e.onPlayPausePress,P=e.onTitleBlur,E=e.onSummaryBlur,A=e.onTitleChange,L=e.onSummaryChange,k=e.onVideoPositionChange,N=t&&t.length,_=i&&i.length,O=!(v&&w);
return r()("div",{className:f.a.controls},void 0,m&&r()(d.a,{className:f.a.seekbar,showFill:!0,value:g,max:m,trackClassName:f.a.seekbarTrack,fillClassName:f.a.seekbarFill,onChange:k}),r()("div",{className:f.a.container},void 0,r()("div",{className:f.a.info},void 0,(w||N)&&r()("div",{className:f.a.title},void 0,r()(u.a,{name:"titleInput",className:f.a.textInput,value:t,placeholder:n.i(o.default)("Title"),isDisabled:O,onChange:A,onBlur:P})),r()("div",{},void 0,r()("span",{},void 0,!!a&&n.i(l.default)(a)+" - "),r()("span",{},void 0,!!p&&n.i(o.default)("{currentIndex} of {size}",{
currentIndex:s+1,size:p})))),(w||_)&&r()("div",{className:f.a.summary},void 0,r()(u.a,{name:"summaryInput",className:f.a.textInput,value:i,placeholder:n.i(o.default)("Description"),isDisabled:O,onChange:L,onBlur:E})),r()("div",{},void 0,r()(h.a,{isSelected:!S,onPress:x},void 0,S?r()(c.a,{className:f.a.actionButton,name:"plex-icon-play-560","aria-label":n.i(o.default)("Play")}):r()(c.a,{className:f.a.actionButton,name:"plex-icon-player-pause-560","aria-label":n.i(o.default)("Pause")})),v&&r()(h.a,{
isSelected:w,onPress:D},void 0,r()(c.a,{className:f.a.actionButton,name:"plex-icon-edit-560","aria-label":n.i(o.default)("Edit")})),r()(h.a,{isSelected:b,onPress:C},void 0,r()(c.a,{className:f.a.actionButton,name:"plex-icon-info-560","aria-label":n.i(o.default)("Information")})),r()(h.a,{isSelected:y,onPress:I},void 0,r()(c.a,{className:f.a.actionButton,name:"plex-icon-channels-560","aria-label":n.i(o.default)("Show Photo Strip")})),r()(h.a,{isSelected:M,onPress:T},void 0,M?r()(c.a,{className:f.a.actionButton,
name:"plex-icon-player-windowed-560","aria-label":n.i(o.default)("Windowed")}):r()(c.a,{className:f.a.actionButton,name:"plex-icon-player-fullscreen-560","aria-label":n.i(o.default)("Fullscreen")})))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(152),c=n(30),u=n(161),d=n(358),h=n(26),p=n(2564),f=n.n(p);t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(v.a)(),y.a,b.a,function(e,t,i){var a=e.title,r=e.summary,s=e.originallyAvailableAt,o=e.addedAt;return{title:a,summary:r,
dateTaken:s||n.i(m.default)(o,"YYYY-MM-DD"),canEdit:n.i(S.b)(t,i,e)}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(213)),v=n(29),y=n(58),b=n(62),S=n(233),w=n(113),M=n(346),I=n(2113),C={changeMetadataItemField:w.changeMetadataItemField,changePlayerPosition:M.h},D=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),
i.onTitleBlur=function(e){i._updateField("title",e.target.value,!0)},i.onSummaryBlur=function(e){i._updateField("summary",e.target.value,!0)},i.onTitleChange=function(e){i._updateField("title",e,!1)},i.onSummaryChange=function(e){i._updateField("summary",e,!1)},i.onVideoPositionChange=function(e){i.props.changePlayerPosition({index:i.props.index,playerType:"photo",position:e.positionValue})},a=n,c()(i,a)}return d()(t,e),t.prototype._updateField=function(e,t,n){this.props.changeMetadataItemField({
metadataItemEntityID:this.props.metadataItemEntityID,name:e,value:t,save:n})},t.prototype.render=function(){return p.a.createElement(I.a,r()({},this.props,{onTitleChange:this.onTitleChange,onSummaryChange:this.onSummaryChange,onTitleBlur:this.onTitleBlur,onSummaryBlur:this.onSummaryBlur,onVideoPositionChange:this.onVideoPositionChange}))},t}(h.Component);t.a=n.i(f.b)(i,C)(D)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.summary,i=e.totalSize,a=e.url,s=e.onPress;return r()("div",{
className:d.a.hub},void 0,r()(l.a,{onPress:s},void 0,r()("div",{className:d.a.container},void 0,r()("div",{className:d.a.overlay},void 0,r()("div",{className:d.a.title},void 0,n),r()("div",{className:d.a.count},void 0,h," ",i)),r()("div",{className:d.a.body},void 0,r()(c.a,{serverEntityID:t,url:a})))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(30)),l=n(26),c=n(2112),u=n(2565),d=n.n(u),h=r()(o.a,{name:"plex-icon-tag-auto-560"});t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(v.a)(),n.i(b.a)(),n.i(y.a)(),function(e,t,i){
var a=n.i(S.a)(e.machineIdentifier,t.identifier,i);return{hubLink:a,summary:i.summary,totalSize:i.totalSize,url:i.thumb}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(771)),v=n(63),y=n(667),b=n(103),S=n(896),w=n(2115),M=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onPress=function(){window.location.href=i.props.hubLink,
i.props.closePlayer("photo")},a=n,c()(i,a)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(w.a,r()({onPress:this.onPress},this.props))},t}(h.Component);t.a=n.i(f.b)(i,{closePlayer:m.e})(M)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.hubEntityIDs;return a&&a.length?r()("div",{className:u.a.container},void 0,r()("div",{className:u.a.title},void 0,n.i(o.default)("Related Photos")),r()("div",{className:u.a.list},void 0,a.map(function(e){
return r()(l.a,{serverEntityID:t,providerEntityID:i,hubEntityID:e},e)}))):d}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(2116),c=n(2566),u=n.n(c),d=r()("div",{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.serverEntityID,a=e.providerEntityID,s=e.hubEntityIDs,o=e.type,d=e.model,f=e.width,v=e.height,y=e.container,b=e.iso,S=e.aperture,w=e.exposure,M=e.size;return r()(h.a,{className:l()(t,g.a.photoInformation),autoScroll:!0},void 0,r()("div",{className:g.a.exif},void 0,r()("div",{
className:g.a.line},void 0,d?r()("div",{},void 0,d):r()("div",{},void 0,"clip"===o?n.i(c.default)("Video"):n.i(c.default)("Photo")),m),r()("div",{className:g.a.line},void 0,!(!f||!v)&&r()("div",{},void 0,f," x ",v),!!M&&r()("div",{},void 0,n.i(u.a)(M)),y&&r()("div",{className:g.a.format},void 0,y)),!!b&&r()("div",{className:g.a.line},void 0,r()("div",{},void 0,n.i(c.default)("ISO")," ",b),r()("div",{},void 0,S),r()("div",{},void 0,w))),r()(p.a,{serverEntityID:i,providerEntityID:a,hubEntityIDs:s}));
}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(28)),l=n.n(o),c=n(4),u=n(719),d=n(30),h=n(70),p=n(2117),f=n(2567),g=n.n(f),m=r()(d.a,{name:"plex-icon-camera-560"});t.a=i},function(e,t,n){"use strict";function i(){return n.i(u.createSelector)(n.i(d.a)(),function(e){var t=e.Media,n=e.type;if(!t||!t.length)return{};var i=t[0].Part,a=o.a.pick(t[0],["aperture","exposure","iso","model","width","height","container"]);return r()({type:n,size:i&&i[0].size},a)})}var a=n(7),r=n.n(a),s=n(2),o=n.n(s),l=n(1),c=(n.n(l),
n(15)),u=n(9),d=(n.n(u),n(29)),h=n(2118),p=n.i(c.b)(i)(h.a);p.propTypes={serverEntityID:l.PropTypes.string.isRequired,metadataItemEntityID:l.PropTypes.string.isRequired,hubEntityIDs:l.PropTypes.array.isRequired},t.a=p},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(2),h=n.n(d),p=n(1),f=(n.n(p),n(28)),g=n.n(f),m=n(130),v=n(106),y=n(2200),b=n(2125),S=n(2568),w=n.n(S),M=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onMeasure=function(e){
var t=e.width,n=e.height;a.setState({isMeasured:!0,width:t,height:n})},a.state={isMeasured:!1,width:null,height:null},a}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,i=e.serverEntityID,r=e.items,s=e.currentIndex,o=e.firstIndex,l=e.size,c=e.onPhotoPress,u=this.state,d=u.isMeasured,p=u.width,f=u.height,S=4,M=[],I=[],C=0;if(d){C=Math.ceil(f);var D=Math.ceil(p/C),T=n.i(y.a)({index:s,renderableWindow:D,length:l,cellPadding:S/2,cellWidth:C,width:p});I=h.a.range(T.renderStartIndex,T.renderEndIndex+1),
M=T.positions}return a()("div",{className:g()(t,w.a.strip)},void 0,a()(m.a,{className:w.a.thumbs,onMeasure:this.onMeasure},void 0,d&&I.map(function(e){var t=M[e],n=e===s,l=r[e-o];return a()(v.a,{className:w.a.cell,cellY:0,cellX:t,cellWidth:C,cellHeight:C},e,a()("div",{className:g()(w.a.thumbContainer,n&&w.a.isSelected)},void 0,l&&a()(b.a,{className:w.a.thumb,serverEntityID:i,metadataItemEntityID:l.metadataItem,dimension:C-S,index:e,onPlayPress:c})))})))},t}(p.Component);t.a=M},function(e,t,n){"use strict";
var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(4),f=n(30),g=n(73),m=n(115),v=n(372),y=n(2569),b=n.n(y),S=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onMenuButtonPress=function(){a.setState({isMenuOpen:!a.state.isMenuOpen})},a.onMenuClose=function(){a.setState({isMenuOpen:!1})},a.state={isMenuOpen:!1},a}return u()(t,e),t.prototype.createOnPress=function(e){var t=this;return function(){return t.props.onItemIDChange(e);
}},t.prototype.render=function(){var e=this,t=this.props,i=t.className,r=t.label,s=t.icon,o=t.items,l=t.currentItemID,c=this.state.isMenuOpen;return h.a.createElement(v.a,{className:i,ref:"menuButton",icon:s,label:r,isMenuOpen:c,onPress:this.onMenuButtonPress},a()(g.a,{isOpen:c,target:this.refs.menuButton,onMenuClose:this.onMenuClose},void 0,o.map(function(t){return a()(m.a,{onPress:e.createOnPress(t.id)},"menu-item-"+t.id,a()("div",{className:b.a.menuItemContainer},void 0,a()("div",{className:b.a.menuLabel
},void 0,t.title),t.id===l&&a()(f.a,{name:"plex-icon-selected-560",className:b.a.selectedIcon,"aria-label":n.i(p.default)("Selected")})))})))},t}(d.Component);t.a=S},function(e,t,n){"use strict";function i(e){var t=e.url,n=e.serverEntityID;return o()(u.a,{url:t,serverEntityID:n,width:1280,height:720,minSize:!0,style:d,background:!0,transition:!0,transitionProps:r()({},c.a),filters:h})}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=(n.n(l),n(302)),u=n(217),d={width:"100%",height:"100%",position:"absolute"
},h={blur:80,opacity:70};t.a=i},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(n.i(c.a)(),function(e){var t=e.url;return{url:t}})}function a(e){return e.url?s.a.createElement(u.a,e):null}var r=n(1),s=n.n(r),o=n(15),l=n(9),c=(n.n(l),n(485)),u=n(2122);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.serverEntityID,i=e.url,a=e.dimension,s=e.onPlayPress;return o()(u.a,{className:t,onPress:s},void 0,o()(d.a,{serverEntityID:n,url:i,width:a,height:a,
minSize:!0,style:h,background:!0,transition:!0,transitionProps:r()({},c.a)}))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=(n.n(l),n(302)),u=n(26),d=n(217),h={width:"100%",height:"100%",top:"0",position:"absolute",zIndex:"0"};t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(m.a)(),function(e){var t=e.url;return{url:t}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(485)),v=n(2124),y=function(e){function t(){
var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onPlayPress=function(){i.props.onPlayPress(i.props.index)},a=n,c()(i,a)}return d()(t,e),t.prototype.render=function(){return this.props.url?p.a.createElement(v.a,r()({},this.props,{onPlayPress:this.onPlayPress})):null},t}(h.Component);t.a=n.i(f.b)(i)(y)},function(e,t,n){"use strict";function i(e){var t={id:-1,title:n.i(c.default)("Original")},i=e.qualities.map(function(e){
return{id:e.index,title:n.i(u.default)(e)}}),a=o.a.sortBy(i,function(e){return-e.id}),s=[t].concat(a),l=e.className,h=e.qualityIndex,p=e.onQualityIndexChange;return r()(d.a,{className:l,label:n.i(c.default)("Quality"),icon:"plex-icon-player-video-settings-560",items:s,currentItemID:h,onItemIDChange:p})}var a=n(3),r=n.n(a),s=n(2),o=n.n(s),l=n(1),c=(n.n(l),n(4)),u=n(455),d=n(2121);t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=(n.n(p),
n(4)),g=n(302),m=n(217),v=n(41),y=n(2570),b=n.n(y),S=s()(v.a,{}),w=function(e){function t(){l()(this,t);var n=u()(this,e.call(this));return n.onLoad=function(){n.setState({loading:!1})},n.onError=function(){n.setState({error:!0})},n.state={loading:!0,error:!1},n}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.metadataKey,r=e.url,o=e.maximumWidth,l=e.maximumHeight,c=e.imageWidth,u=void 0===c?400:c,d=e.imageHeight,h=void 0===d?400:d,p=u/h,v=u/o,y=h/l,w=v>y,M=w?o:l*p,I=w?o/p:l,C={
width:M,height:I},D={width:"100%",height:"100%"},T=this.state,x=T.loading,P=T.error;return s()("div",{className:b.a.slideContainer,style:C},void 0,s()("div",{className:b.a.statusContainer},void 0,x&&!P&&S,P&&s()("div",{},void 0,n.i(f.default)("Unable to load photo"))),s()(m.a,{serverEntityID:t,url:r,width:M,height:I,style:D,minSize:!0,background:!0,transition:!0,transitionProps:a()({},g.a),onError:this.onError,onLoad:this.onLoad},i))},t}(p.Component);t.a=w},function(e,t,n){"use strict";function i(){
return n.i(h.createSelector)(n.i(p.a)(),function(e){return e&&e.url?l()({isLoading:!1,metadataKey:e.key},e):{isLoading:!0}})}function a(e){return e.isLoading?m:u.a.createElement(g.a,e)}var r=n(3),s=n.n(r),o=n(7),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(9),p=(n.n(h),n(485)),f=n(41),g=n(2127),m=s()(f.a,{});t.a=n.i(d.b)(i)(a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(744)),p=n(1312),f=n(41),g=n(39),m=n(2571),v=n.n(m),y={width:"100%",
height:"100%"},b=a()(f.a,{}),S=function(e){function t(){s()(this,t);var n=l()(this,e.call(this));return n.onPositionChange=function(e){n.props.onVideoPositionChange(n.props.index,e)},n.onStart=function(){n.setState({loading:!1})},n.onMediaStateChange=function(e){e===g.a.mediaStates.ERROR&&n.props.onError(n.props.index)},n.state={loading:!0},n}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.url,n=e.urlPosition,i=e.paused,r=e.error,s=e.protocol,o=e.onEnd,l=e.onTick,c="hls"===s?p.a:h.a,u=this.state.loading;
return a()("div",{className:v.a.slideContainer},void 0,a()("div",{className:v.a.statusContainer},void 0,u&&!r&&b,r&&a()("div",{},void 0,r)),!r&&a()(c,{style:y,className:v.a.videoElement,containerClassName:v.a.videoContainer,src:t,position:n,paused:i,onPositionChange:this.onPositionChange,onMediaStateChange:this.onMediaStateChange,onStart:this.onStart,onTick:l,onEnd:o},t))},t}(d.Component);t.a=S},function(e,t,n){"use strict";function i(){return n.i(v.createSelector)(function(e,t){var n=t.index;return n;
},function(e,t){var n=t.isCurrent;return n},function(e){return e.ui.photoPlayer},function(e,t){var n=t.playQueueItem;return e.ui.photoPlayer.decisions[n.playQueueItemID]},function(e,t,n,i){return i&&(i.url||i.error)?p()({currentIndex:n.currentIndex,isLoading:!1},i,{paused:!t||n.videoPaused||!1,urlPosition:n.videoPosition||0}):{isLoading:!0}})}var a=n(3),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(7),p=n.n(h),f=n(1),g=n.n(f),m=n(15),v=n(9),y=(n.n(v),n(346)),b=n(41),S=n(2129),w={
makeVideoDecision:y.c,removeVideoDecision:y.d,onError:function(e){return n.i(y.e)({index:e,playerType:"photo"})},onVideoPositionChange:function(e,t){return n.i(y.f)({position:t,index:e,playerType:"photo"})},videoPlayerTick:y.g},M=r()(b.a,{}),I=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onTick=function(e){i.props.videoPlayerTick({tickCount:e,index:i.props.currentIndex,playerType:"photo"
})},a=n,c()(i,a)}return d()(t,e),t.prototype.componentWillMount=function(){this.props.makeVideoDecision({playerType:"photo",index:this.props.index})},t.prototype.componentWillUnmount=function(){this.props.removeVideoDecision({playerType:"photo",playQueueItem:this.props.playQueueItem})},t.prototype.render=function(){return this.props.isLoading&&!this.props.error?M:g.a.createElement(S.a,p()({key:this.props.url,onTick:this.onTick},this.props))},t}(f.Component);t.a=n.i(m.b)(i,w)(I)},function(e,t,n){"use strict";
var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(46),f=n.n(p),g=n(28),m=n.n(g),v=n(32),y=n(35),b=n(350),S=n(25),w=n(299),M=n(109),I=n.n(M),C=n(2134),D=n(2143),T=n(2572),x=n.n(T),P=parseInt(I.a.searchResultHeight,10),E=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onScrollIntoView=function(e){var t=e.scrollTop,n=f.a.findDOMNode(r.refs.results),i=n.clientHeight,a=i+r.state.scrollTop,s=t+P>a||t<r.state.scrollTop;r.setState({
scrollTop:s?t:r.state.scrollTop})},r.onWindowPress=function(e){if(r.state.isOpen){var t=f.a.findDOMNode(r.refs.search),n=t&&t.contains(e.target);n||r.setState({isOpen:!1})}},r.onKeyDown=function(e){var t=r.props.serverEntityID,n=r.state.isOpen;switch(e.keyCode){case b.h:case b.i:n&&(e.stopPropagation(),e.preventDefault(),e.keyCode===b.i?r.props.selectQuickSearchResult({offset:-1}):r.props.selectQuickSearchResult({offset:1}),r.isTabScoped&&(w.b(),r.isTabScoped=!1));break;case b.j:if(n){var i=v.a.platformID,a="osx"===i?e.metaKey:e.ctrlKey,s=e.shiftKey;
w.e(),r.isTabScoped=!1,a?s?r.props.playQuickSearchItem({serverEntityID:t,shuffle:!0}):r.props.playQuickSearchItem({serverEntityID:t}):r.props.navigateQuickSearchResult({serverEntityID:t})}break;case b.b:e.nativeEvent.stopImmediatePropagation(),r.isTabScoped&&(w.b(),r.isTabScoped=!1),n?r.setState({isOpen:!1}):r.props.changeQuickSearchQuery("");break;case b.a:if(n){if(!r.isTabScoped){var o=f.a.findDOMNode(r.refs.results);w.c(o),r.isTabScoped=!0}w.a(e)}}},r.onInputClick=function(e){r.isTabScoped&&(w.b(),
r.isTabScoped=!1),r.state.isOpen||""===r.props.query||r.setState({isOpen:!0})},r.onScrollPositionChange=function(e){var t=e.scrollTop;r.setState({scrollTop:t})},r.onSearch=function(){n.i(y.a)(function(){r.props.fetchQuickSearch()})},r.onInputChange=function(e){n.i(y.a)(function(){r.props.changeQuickSearchQuery(e)})},r.isTabScoped=!1,r.state={scrollTop:0,isOpen:!1},r}return u()(t,e),t.prototype.componentWillMount=function(){this._listenForPress()},t.prototype.componentWillReceiveProps=function(e,t){
var n=e.selectedResultEntityID,i=e.query,a=this.props.query!==i,r=i.trim().length,s=this.state.isOpen;r&&!s&&a?this.setState({isOpen:!0}):!r&&s&&(this.setState({isOpen:!1}),this.isTabScoped&&(w.f(),this.isTabScoped=!1)),null==n&&this.setState({scrollTop:0})},t.prototype.shouldComponentUpdate=function(e,t){return n.i(S.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this._stopListeningForPress()},t.prototype._listenForPress=function(){window.addEventListener("mouseup",this.onWindowPress),
window.addEventListener("touchend",this.onWindowPress)},t.prototype._stopListeningForPress=function(){window.removeEventListener("mouseup",this.onWindowPress),window.removeEventListener("touchend",this.onWindowPress)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.query;return h.a.createElement("div",{ref:"search",className:m()(x.a.container),onKeyDown:this.onKeyDown},a()(C.a,{query:n,onChange:this.onInputChange,onSearch:this.onSearch,onClick:this.onInputClick}),this.state.isOpen&&h.a.createElement(D.a,{
ref:"results",serverEntityID:t,scrollTop:this.state.scrollTop,onScrollIntoView:this.onScrollIntoView,onScrollPositionChange:this.onScrollPositionChange}))},t}(d.Component);t.a=E},function(e,t,n){"use strict";function i(){return n.i(b.createSelector)(function(e){return e.ui.quickSearch},D,function(e,t){if(!t)return{};var n=g.a.pick(e,"query","providerIdentifier","selectedResultEntityID");return p()({serverEntityID:t.entityID,isConnected:t.isConnected,providerEntityIDs:t.desktop.providers},n)})}var a=n(17),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(7),p=n.n(h),f=n(2),g=n.n(f),m=n(1),v=n.n(m),y=n(15),b=n(9),S=(n.n(b),
n(35)),w=n(256),M=n(85),I=n(135),C=n(2131),D=n.i(b.createSelector)(function(e){return e.primaryServer},w.a,function(e,t){return e?t[e]:void 0}),T=p()({populateProviders:M.populateProviders},I),x=function(e){function t(){return o()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){var t=e.isConnected!==this.props.isConnected,n=e.providerEntityIDs!==this.props.providerEntityIDs,i=e.providerIdentifier!==this.props.providerIdentifier;
(t||n||i)&&this._populate(e)},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.serverEntityID,i=e.isConnected,a=e.providerEntityIDs,r=e.providerIdentifier;t&&i&&e.populateProviders({serverEntityID:t}),a&&a.length&&n.i(S.a)(function(){e.initQuickSearch({serverEntityID:t,providerEntityIDs:a,providerIdentifier:r})})},t.prototype.render=function(){var e=this.props,t=e.providerEntityIDs,n=r()(e,["providerEntityIDs"]);return t&&t.length?v.a.createElement(C.a,n):null;
},t}(m.Component);t.a=n.i(y.b)(i,T)(x)},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(25),y=n(879),b=n(2142),S=n(2573),w=n.n(S),M=function(e){function t(){return u()(this,t),h()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.title,n=e.selectedResultEntityID,i=e.results,r=l()(e,["title","selectedResultEntityID","results"]);
return s()("div",{},void 0,s()("h5",{className:w.a.hubTitle},void 0,t),i.map(function(e,t){return m.a.createElement(y.a,a()({key:e,searchResultEntityID:e,component:b.a,isSelected:n===e},r))}))},t}(g.Component);t.a=M},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(28),f=n.n(p),g=n(8),m=n(25),v=n(30),y=n(26),b=n(2574),S=n.n(b),w=function(e){function t(n){s()(this,t);var i=l()(this,e.call(this,n));return i.focusInput=function(){
i.refs.input.focus()},i.onClick=function(e){i.focusInput(),i.props.onClick()},i.onFocus=function(){i.setState({isFocused:!0})},i.onBlur=function(){i.setState({isFocused:!1})},i.onChange=function(e){var t=e.target.value;i.searchTimeout&&clearTimeout(i.searchTimeout),i.setState({query:t},function(){i.props.onChange(t),""!==t.trim()&&(i.searchTimeout=setTimeout(i.props.onSearch,200))})},i.onClearPress=function(e){e.stopPropagation(),i.searchTimeout&&clearTimeout(i.searchTimeout),i.setState({query:""
},function(){i.props.onChange(""),i.focusInput()})},i.state={isFocused:!1,query:n.query},i.searchTimeout=null,i}return u()(t,e),t.prototype.componentDidMount=function(){g.a.on("shortcut:search",this.focusInput)},t.prototype.componentWillReceiveProps=function(e){this.state.query!==e.query&&this.setState({query:e.query})},t.prototype.shouldComponentUpdate=function(e,t){return n.i(m.a)(this,e,t)},t.prototype.componentWillUnmount=function(){g.a.off("shortcut:search",this.focusInput),this.searchTimeout&&clearTimeout(this.searchTimeout);
},t.prototype.render=function(){var e=this.state,t=e.query,n=e.isFocused;return a()("div",{className:f()(S.a.container,n&&S.a.focused),onClick:this.onClick},void 0,a()(v.a,{name:"plex-icon-search-560",className:S.a.searchIcon}),h.a.createElement("input",{ref:"input",className:S.a.searchInput,value:t,type:"text",autoComplete:"off",spellCheck:"false",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur}),t.length>0&&a()(y.a,{onPress:this.onClearPress},void 0,a()(v.a,{name:"plex-icon-close-560",
className:S.a.closeIcon})))},t}(d.Component);w.defaultProps={query:"",onClick:d.PropTypes.func},t.a=w},function(e,t,n){"use strict";function i(e,t,i){return t?n.i(u.default)("Search in {1}...",t):i?n.i(u.default)("Search all servers...",e):n.i(u.default)("Show more results...",e)}function a(e){var t=e.server,n=e.query,a=e.searchAllServers,r=e.channelPlaceholder,o=e.channelID,l=e.channelSearchKey,u=e.isSelected,p=e.onLinkPress,g=e.onLinkFocus,m=encodeURIComponent(t.machineIdentifier),v=encodeURIComponent(n),y=void 0;
if(null!=o&&null!=l){var b=encodeURIComponent(o),S=d.join(l,{query:n}),w=encodeURIComponent(S);y="#!/server/"+m+"/channel/"+b+"/"+w}else y="#!/server/"+m+"/search/"+v;var M=i(n,r,a);return s()(h.a,{className:c()(f.a.placeholder,u&&f.a.isPlaceholderSelected),tabIndex:"1",title:M,to:y,onPress:p,onFocus:g},void 0,M)}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),n(28)),c=n.n(l),u=n(4),d=n(20),h=(n(80),n(26)),p=n(2575),f=n.n(p);t.a=a},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(v.a,function(e){
return e.ui.quickSearch},y.a,function(e,t,n){return{server:e,query:t.query,channelPlaceholder:t.channelPlaceholder,channelID:t.channelID,channelSearchKey:t.channelSearchKey,isSelected:!t.selectedResultEntityID,searchAllServers:n.searchAllServers}})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(299)),v=n(58),y=n(157),b=n(135),S=n(2135),w={resetQuickSearch:b.resetQuickSearch,selectQuickSearchResult:b.selectQuickSearchResult},M=function(e){
function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onLinkPress=function(e){var t=i.props.serverEntityID;i.props.resetQuickSearch({serverEntityID:t}),m.e()},i.onLinkFocus=function(e){i.props.selectQuickSearchResult({searchResultEntityID:null})},a=n,c()(i,a)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(S.a,r()({onLinkPress:this.onLinkPress,onLinkFocus:this.onLinkFocus
},this.props))},t}(h.Component);t.a=n.i(f.b)(i(),w)(M)},function(e,t,n){"use strict";function i(e){var t=e.isLoading,i=e.hubs,a=u()(e,["isLoading","hubs"]);return t?l()("div",{className:v.a.spinnerContainer},void 0,l()(f.a,{className:v.a.spinner})):i.length?l()("div",{},void 0,i.map(function(e){return h.a.createElement(g.a,s()({key:e.hubIdentifier,title:e.title,results:e.results},a))})):l()("div",{className:v.a.noResults},void 0,n.i(p.default)("No Results"))}function a(e){var t=e.title,n=e.isOnlyProvider,a=e.isSearchPending,r=(e.isSearchPopulated,
u()(e,["title","isOnlyProvider","isSearchPending","isSearchPopulated"]));return l()("div",{},void 0,!n&&l()("div",{className:v.a.title,"aria-label":"heading","aria-level":"4"},void 0,t),h.a.createElement(i,s()({isLoading:a&&!e.hubs.length},r)))}var r=n(7),s=n.n(r),o=n(3),l=n.n(o),c=n(17),u=n.n(c),d=n(1),h=n.n(d),p=n(4),f=n(41),g=n(2133),m=n(2576),v=n.n(m);t.a=a},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(function(e){return e.ui.quickSearch},n.i(c.a)(),function(e,t){return{
title:t.title,selectedResultEntityID:e.selectedResultEntityID}})}function a(e){return s.a.createElement(u.a,e)}var r=n(1),s=n.n(r),o=n(15),l=n(9),c=(n.n(l),n(103)),u=n(2137);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.searches,i=e.onScrollIntoView;return o()("div",{},void 0,n.map(function(e){return c.a.createElement(u.a,r()({},e,{key:e.key,isOnlyProvider:1===n.length,serverEntityID:t,onScrollIntoView:i}))}))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(2138);
t.a=i},function(e,t,n){"use strict";var i=n(15),a=n(9),r=(n.n(a),n(157)),s=n(2139),o=n.i(a.createSelector)(function(e){return e.ui.quickSearch},r.a,function(e,t){return{searches:e.searches}});t.a=n.i(i.b)(function(e){return o(e)})(s.a)},function(e,t,n){"use strict";function i(e){switch(e){case"movie":return[C.a,x.a];case"show":return[C.a,A.a];case"episode":return[C.a,T.a];case"artist":return[C.a,E.a];case"album":return[C.a,D.a];case"track":return[C.a,k.a];case"photo":return[C.a,L.a];case"photoalbum":
return[C.a,L.a];case"clip":return[C.a,L.a];case"playlist":return[C.a,P.a];case"actor":return[N.a,_.a];case"genre":return[N.a,_.a];case"director":return[N.a,_.a];case"autotag":return[N.a,_.a];case"collection":return[N.a,_.a];default:return[C.a,_.a]}}var a=n(3),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(46),g=n.n(f),m=n(28),v=n.n(m),y=n(25),b=n(86),S=n(30),w=n(26),M=n(73),I=n(365),C=n(370),D=n(513),T=n(294),x=n(371),P=n(847),E=n(842),A=n(518),L=n(514),k=n(1973),N=n(2152),_=n(880),O=n(2149),R=n(2147),j=n(2148),z=n(2577),U=n.n(z),F=function(e){
function t(n){o()(this,t);var i=c()(this,e.call(this,n));return i.onItemPress=function(e){e.stopPropagation();var t=g.a.findDOMNode(i.refs.menuButton);t&&t.contains(e.target)||i.props.onLinkPress()},i.onItemFocus=function(e){i.props.onResultFocus(i.props.searchResultEntityID)},i.onPlayPress=function(e){e.stopPropagation(),i.props.onPlayPress(i.props.searchResultEntityID)},i.onLinkPress=function(e){e.stopPropagation(),i.props.onLinkPress()},i.onMenuIconPress=function(e){i.setState({isMenuOpen:!i.state.isMenuOpen
})},i.onMenuClose=function(){i.setState({isMenuOpen:!1})},i.state={isMenuOpen:!1},i}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.componentWillUpdate=function(e,t){if(e.isSelected!==this.props.isSelected&&e.isSelected){var n=g.a.findDOMNode(this);this.props.onScrollIntoView({scrollTop:n.offsetTop})}},t.prototype.render=function(){var e=this,t=this.props,a=t.serverEntityID,s=t.providerEntityID,o=t.searchResultEntityID,l=t.metadataItemEntityID,c=t.server,u=t.provider,d=t.isSelected,h=t.isMetadataItem,f=t.imageWidth,g=t.imageHeight,m=t.imageUrl,y=t.resultRoute,C=t.metadataKey,D=t.metadataTitle,T=t.metadataType,x=t.tag,P=t.tagTypeString,E=t.librarySectionType,A=t.reasonTitle,L=this.state.isMenuOpen,k=u.protocols.livetv;
return r()(w.a,{component:"div",className:v()(U.a.button,(d||L)&&U.a.selected),onPress:this.onItemPress,onFocus:this.onItemFocus},void 0,r()(w.a,{className:U.a.link,tabIndex:"1",title:h?D:x,to:y,onPress:y?this.onLinkPress:this.onPlayPress}),r()("div",{className:U.a.imageContainer},void 0,h?r()(R.a,{serverEntityID:a,imageWidth:f,imageHeight:g,imageUrl:m,title:D,type:T,isLiveTVItem:k,recordLink:n.i(b.a)(c,u,C,{record:1}),onRecordPress:this.onLinkPress,onPlayPress:this.onPlayPress}):r()(j.a,{serverEntityID:a,
imageWidth:f,imageHeight:g,imageUrl:m,title:x,tagType:P,librarySectionType:E})),r()("div",{className:U.a.titles},void 0,i(h?T:P).map(function(t,n){var i=n>0,c=i&&!!A;return r()(O.a,{className:i?null:U.a.title,serverEntityID:a,providerEntityID:s,searchResultEntityID:o,metadataItemEntityID:l,component:c?_.a:t,isSecondary:i,onPress:e.onLinkPress},n)})),h&&!k&&p.a.createElement(w.a,{ref:"menuButton",tabIndex:"-1",className:U.a.moreButton,onPress:this.onMenuIconPress},r()(S.a,{className:U.a.moreIcon,name:"plex-icon-more-560"
})),h&&!k&&r()(M.a,{target:this.refs.menuButton,isOpen:L,onMenuClose:this.onMenuClose},void 0,r()(I.a,{serverEntityID:a,providerEntityID:s,metadataItemEntityID:l,showPlayTrailer:!1,showPlayPlexMix:!1,showPlayMusicVideo:!1,showEdit:!1,showRefresh:!1,showAnalyze:!1,showFixMatch:!1,showMatch:!1,showUnmatch:!1,showSplitApart:!1,showSync:!1,showOptimize:!1,showDownload:!1,showWatchLater:!1,showShare:!1,showRecommend:!1,showDelete:!1,showDeleteVersion:!1})))},t}(h.Component);F.defaultProps={isMetadataItem:!1
},t.a=F},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(w.a,M.a,n.i(I.a)(),n.i(C.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],r={server:e,provider:t,reasonID:i.reasonID,reasonTitle:i.reasonTitle};if(a){var s=n.i(P.c)(a.type)===P.d?L:k,o=n.i(E.a)(s,null,a.type,a);r=d()({metadataKey:a.key,metadataTitle:a.title,metadataType:a.type,typeString:a.type,imageWidth:o.width,imageHeight:o.height,imageUrl:o.url,resultRoute:n.i(S.a)(e,t,a)
},r)}else{var l=i.tagItem||{},c=m.a.get(l.tagType),u=c&&c.typeString,h=n.i(E.a)(k,null,u,l);r=d()({tag:l.tag,tagType:l.tagType,tagTypeString:u,librarySectionType:l.librarySectionType,imageWidth:h.width,imageHeight:h.height,imageUrl:h.url,resultRoute:n.i(b.a)(e,t,t.isLibraryProvider?i.reasonID:l.librarySectionKey,{filters:l.filter?l.filter:u+"="+l.id,filterLabel:l.tag})},r)}return r})}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(7),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),n(340)),v=n(299),y=n(35),b=n(165),S=n(897),w=n(58),M=n(62),I=n(223),C=n(29),D=n(113),T=n(135),x=n(301),P=n(202),E=n(377),A=n(2141),L=28,k=36,N=d()({
resetQuickSearch:T.resetQuickSearch,selectQuickSearchResult:T.selectQuickSearchResult,playQuickSearchItem:T.playQuickSearchItem},D),_=function(e){function t(){var i,a,s;r()(this,t);for(var l=arguments.length,c=Array(l),u=0;u<l;u++)c[u]=arguments[u];return i=a=o()(this,e.call.apply(e,[this].concat(c))),a.onLinkPress=function(){var e=a.props.serverEntityID;a.props.resetQuickSearch({serverEntityID:e}),v.e()},a.onResultFocus=function(e){n.i(y.a)(function(){a.props.selectQuickSearchResult({searchResultEntityID:e
})})},a.onPlayPress=function(e){var t=a.props.serverEntityID;a.props.playQuickSearchItem({serverEntityID:t,searchResultEntityID:e})},s=i,o()(a,s)}return c()(t,e),t.prototype.render=function(){return p.a.createElement(A.a,d()({},this.props,{onLinkPress:this.onLinkPress,onResultFocus:this.onResultFocus,onPlayPress:this.onPlayPress}))},t}(h.Component);t.a=n.i(f.b)(i,N,x.a)(_)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(28)),p=n.n(h),f=n(25),g=n(70),m=n(2136),v=n(2140),y=n(2578),b=n.n(y),S=function(e){
function t(n){s()(this,t);var i=l()(this,e.call(this,n));return i.onWindowResize=function(){i.setState({maxHeight:i.getMaxHeight()})},i.state={maxHeight:i.getMaxHeight()},i}return u()(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.onWindowResize)},t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.onWindowResize)},t.prototype.getMaxHeight=function(){return window.innerHeight-150;
},t.prototype.render=function(){var e=this.props,t=e.className,n=e.serverEntityID,i=e.scrollTop,r=e.onScrollIntoView,s=e.onScrollPositionChange;return a()(g.a,{className:p()(b.a.container,t),style:this.state,scrollTop:i,onScrollPositionChange:s},void 0,a()(m.a,{serverEntityID:n}),a()(v.a,{serverEntityID:n,onScrollIntoView:r}))},t}(d.Component);t.a=S},function(e,t,n){"use strict";function i(e){var t=e.isMetadataItem,n=o()(e,["isMetadataItem"]);return t?c.a.createElement(u.a,r()({},n,{showSelect:!1
})):c.a.createElement(d.a,n)}var a=n(7),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(507),d=n(2146);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.serverEntityID,i=e.providerEntityID,a=e.searchResultEntityID,s=e.imageWidth,o=e.imageHeight,h=e.imageUrl,f=e.tag,g=e.tagType,m=e.librarySectionType,v=e.cellX,y=e.cellY,b=e.cellWidth,S=e.cellHeight,w=e.showOffscreenPlaceholder,M=e.titleComponents;return r()(l.a,{className:t,cellX:v,cellY:y,cellWidth:b,cellHeight:S},void 0,r()("div",{
className:p.a.imageContainer},void 0,r()(c.a,{serverEntityID:n,imageWidth:s,imageHeight:o,imageUrl:h,title:f,tagType:g,librarySectionType:m,isOffscreen:w}),r()(u.a,{className:p.a.imageLink,serverEntityID:n,providerEntityID:i,searchResultEntityID:a})),r()("div",{className:p.a.titleContainer},void 0,M.map(function(e,t){return r()(d.a,{serverEntityID:n,providerEntityID:i,searchResultEntityID:a,component:e,isSecondary:t>0},t)})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(131)),l=n(106),c=n(511),u=n(881),d=n(510),h=n(2579),p=n.n(h);
t.a=n.i(o.a)(i)},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(function(e,t){var n=t.listType;return n},function(e,t){var n=t.listContext;return n},function(e,t){var n=t.cellWidth;return n},n.i(u.a)(),function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=a.tagItem,s=r.tag,o=r.tagType,l=r.librarySectionType,u=n.i(c.a)(i,null,e,r,t);return{tag:s,tagType:o,librarySectionType:l,imageWidth:u.width,imageHeight:u.height,imageUrl:u.url}})}function a(e){
return s.a.createElement(d.a,e)}var r=n(1),s=n.n(r),o=n(15),l=n(9),c=(n.n(l),n(377)),u=n(223),d=n(2145);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.imageWidth,i=e.imageHeight,a=e.imageUrl,s=e.title,d=e.isLiveTVItem,p=e.recordLink,f=e.onRecordPress,g=e.onPlayPress;return r()(c.a,{className:h.a.card,serverEntityID:t,component:u.a,width:n,height:i,url:a},void 0,d?r()(l.a,{className:h.a.recordButton,circleClassName:h.a.recordCircle,tabIndex:"-1",title:s,to:p,
onPress:f}):r()(o.a,{className:h.a.playButton,circleClassName:h.a.playCircle,tabIndex:"-1",title:s,onPress:g}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(291)),l=n(496),c=n(362),u=n(368),d=n(2580),h=n.n(d);i.defaultProps={isLiveTVItem:!1},t.a=i},function(e,t,n){"use strict";function i(e){return o.a.createElement(l.a,r()({className:u.a.card},e))}var a=n(7),r=n.n(a),s=n(1),o=n.n(s),l=n(511),c=n(2581),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.component,i=e.isSecondary,a=c()(e,["className","component","isSecondary"]);
return o()("div",{className:p()(t,g.a.title,i&&g.a.isSecondary)},void 0,d.a.createElement(n,r()({tabIndex:"-1"},a)))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(28),p=n.n(h),f=n(2582),g=n.n(f);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.server,a=e.provider,s=e.originalTitle,u=e.reason,d=e.reasonID,h=e.reasonTitle,p=e.filter,f=e.librarySectionID,g=e.librarySectionKey,m=e.onPress;if(!u)return null;if("originalTitle"===u)return r()("span",{className:t
},void 0,s);if(!h)return null;var v={},y="actor"===u||"director"===u;y&&(v.filters=p?p:u+"="+d,v.filterLabel=h);var b=a.isLibraryProvider?f:g,S=n.i(l.a)(i,a,b,v),w={director:n.i(o.default)("by"),actor:n.i(o.default)("with"),section:n.i(o.default)("in"),autotag:n.i(o.default)("tagged")};return S?r()("span",{className:t},void 0,w[u]," ",r()(c.a,{title:h,tabIndex:"-1",to:S,onPress:m},void 0,h)):r()("span",{className:t},void 0,w[u]+" "+h)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(165),c=(n(80),n(79),
n(26));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tag;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(n.i(c.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{tag:e.tagItem&&e.tagItem.tag}})}function a(e){return s.a.createElement(u.a,e)}var r=n(1),s=n.n(r),o=n(15),l=n(9),c=(n.n(l),n(223)),u=n(2151);t.a=n.i(o.b)(i)(a)},function(e,t,n){
"use strict";function i(e){var t=e.className,i=e.server,a=e.provider,s=e.reasonID,u=e.id,d=e.tag,h=e.filter,p=e.tagType,f=e.librarySectionKey,g=o.a.get(p),m=g.typeString,v=h?h:m+"="+u,y={filters:v,filterLabel:d},b=a.isLibraryProvider?s:f,S=n.i(l.a)(i,a,b,y);return r()(c.a,{className:t,title:d,to:S},void 0,d)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(340)),l=n(165),c=(n(80),n(79),n(26));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.machineIdentifier,a=e.friendlyName;if(!a)return null;
var s=encodeURIComponent(i);return r()("span",{className:t},void 0,n.i(o.default)("on")," ",r()(l.a,{title:a,to:"#!/server/"+s+"/dashboard"},void 0,a))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(26);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(e){return{machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName}})}var a=n(15),r=n(9),s=(n.n(r),n(63)),o=n(2154);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){return r()(c.a,{
target:e.target,isOpen:e.isOpen,onMenuClose:e.onMenuClose},void 0,e.showPlaySelected&&r()(u.a,{onPress:e.onPlaySelectedPress},void 0,n.i(o.default)("Play Selected")),e.showShuffle&&r()(u.a,{onPress:e.onShufflePress},void 0,n.i(o.default)("Shuffle")),e.showAddToPlaylist&&r()(u.a,{onPress:e.onAddToPlaylistPress},void 0,n.i(o.default)("Add to Playlist...")),e.showMarkWatched&&r()(u.a,{onPress:e.onMarkWatchedConfirm},void 0,n.i(o.default)("Mark Watched")),e.showMarkUnwatched&&r()(u.a,{onPress:e.onMarkUnwatchedConfirm
},void 0,n.i(o.default)("Mark Unwatched")),e.showEdit&&r()(u.a,{onPress:e.onEditPress},void 0,n.i(o.default)("Edit")),e.showRefresh&&r()(u.a,{onPress:e.onRefreshPress},void 0,n.i(o.default)("Refresh")),e.showAnalyze&&r()(u.a,{onPress:e.onAnalyzePress},void 0,n.i(o.default)("Analyze")),e.showMerge&&r()(u.a,{onPress:e.onMergePress},void 0,n.i(o.default)("Merge")),e.showSync&&r()(u.a,{onPress:e.onSyncPress},void 0,n.i(o.default)("Sync...")),e.showOptimize&&r()(u.a,{onPress:e.onOptimizePress},void 0,n.i(o.default)("Optimize...")),e.showDelete&&r()(u.a,{
kind:l.c.DANGER,onPress:e.onDeletePress},void 0,n.i(o.default)("Delete")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(23),c=n(501),u=n(115);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.activeSelectionItems,i=e.onDeselectAllPress,a=c()(e,["activeSelectionItems","onDeselectAllPress"]),s=t.length;return o()(g.a,{className:w.a.multiSelectPageHeader},void 0,o()(m.a,{},void 0,o()("div",{className:w.a.selectedTitle},void 0,o()(p.a,{name:"plex-icon-selected-560",className:w.a.icon}),1===s?n.i(h.default)("{1} item selected",s):n.i(h.default)("{1} items selected",s))),o()(v.a,{},void 0,d.a.createElement(b.a,r()({
numSelectedItems:s},a))),o()(y.a,{},void 0,o()(f.a,{className:w.a.deselectLink,onPress:i},void 0,o()(p.a,{name:"plex-icon-remove-560",className:w.a.icon}),n.i(h.default)("Deselect All"))))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(17),c=n.n(l),u=n(1),d=n.n(u),h=n(4),p=n(30),f=n(26),g=n(195),m=n(196),v=n(520),y=n(232),b=n(2158),S=n(2583),w=n.n(S);t.a=i},function(e,t,n){"use strict";function i(e,t){return!!g.a.find(e,function(e){return t[e]})}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(11),c=n.n(l),u=n(13),d=n.n(u),h=n(12),p=n.n(h),f=n(2),g=n.n(f),m=n(1),v=n.n(m),y=n(4),b=n(25),S=n(163),w=n(858),M=n(859),I=n(857),C=n(1980),D=n(1979),T=n(860),x=n(372),P=n(2156),E=["showRefresh","showAnalyze","showMerge","showOptimize","showDelete"],A=function(e){
function t(n,i){c()(this,t);var a=d()(this,e.call(this,n,i));return a.onActionsPress=function(e){a.setState({isActionsMenuOpen:!a.state.isActionsMenuOpen})},a.onActionsMenuClose=function(){a.setState({isActionsMenuOpen:!1})},a.onDeletePress=function(e){a.setState({isDeleteModalOpen:!0})},a.onDeleteConfirm=function(e){a.setState({isDeleteModalOpen:!1}),a.props.onDeleteConfirm()},a.onDeleteCancel=function(){a.setState({isDeleteModalOpen:!1})},a.state={isActionsMenuOpen:!1,isDeleteModalOpen:!1},a}return p()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return n.i(b.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.numSelectedItems,a=e.showPlaySelected,s=e.showShuffle,l=e.showAddToPlaylist,c=e.showMarkWatched,u=e.showMarkUnwatched,d=e.showEdit,h=e.showSync,p=e.onPlaySelectedPress,f=e.onShufflePress,g=e.onAddToPlaylistPress,m=e.onMarkWatchedConfirm,b=e.onMarkUnwatchedConfirm,A=e.onEditPress,L=e.onSyncPress,k=this.state,N=k.isActionsMenuOpen,_=k.isDeleteModalOpen,O=i(E,this.props);return o()("div",{},void 0,a&&o()(w.a,{
playLabel:n.i(y.default)("Play Selected"),onPress:p}),s&&o()(M.a,{onPress:f}),l&&o()(I.a,{onPress:g}),(c||u)&&o()(C.a,{numSelectedItems:t,showMarkWatched:c,showMarkUnwatched:u,onMarkWatchedConfirm:m,onMarkUnwatchedConfirm:b}),d&&o()(D.a,{onPress:A}),h&&o()(T.a,{onPress:L}),O&&v.a.createElement(x.a,{ref:"moreButton",icon:"plex-icon-toolbar-more-560",label:n.i(y.default)("More..."),isMenuOpen:N,onPress:this.onActionsPress}),v.a.createElement(P.a,r()({},this.props,{target:this.refs.moreButton,isOpen:N,
showPlaySelected:!1,showShuffle:!1,showAddToPlaylist:!1,showMarkWatched:!1,showMarkUnwatched:!1,showEdit:!1,showSync:!1,onDeletePress:this.onDeletePress,onMenuClose:this.onActionsMenuClose})),o()(S.a,{isOpen:_,metricsPage:"confirmDelete",title:n.i(y.default)("Delete"),message:1===t?n.i(y.default)("Are you sure you want to delete this item from your filesystem?"):n.i(y.default)("Are you sure you want to delete these {1} items from your filesystem?",t),onConfirm:this.onDeleteConfirm,onCancel:this.onDeleteCancel
}))},t}(m.Component);t.a=A},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(155),f=n(166),g=n.n(f),m=n(70),v=n(2172),y=n(2182),b=n(2161),S=n(2170),w=n(2584),M=n.n(w),I=n.i(p.a)(g.a.menuSpeed),C=a()(b.a,{}),D=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onMenuButtonPress=function(e){a.setState({isMenuOpen:!a.state.isMenuOpen})},a.onMenuClose=function(e){a.setState({isMenuOpen:!1})},a.state={
isMenuOpen:!1},a}return u()(t,e),t.prototype.componentDidUpdate=function(e,t){var n=this;!t.isMenuOpen&&this.state.isMenuOpen&&(this._openTimeoutID=setTimeout(function(){return n.props.onServerMenuOpen()},I))},t.prototype.componentWillUnmount=function(){this._openTimeoutID&&clearTimeout(this._openTimeoutID)},t.prototype.render=function(){var e=this.props,t=e.primaryServerEntityID,n=e.serverEntityIDs,i=e.canProvisionPersonalCloudServer;return a()("div",{className:M.a.sidebar},void 0,h.a.createElement(v.a,{
ref:"menuButton",hasPrimaryServer:!!t,serverEntityID:t,onPress:this.onMenuButtonPress}),a()(m.a,{className:M.a.sidebarScroller,autoScroll:!0},void 0,a()("div",{className:M.a.sidebarContent},void 0,t?a()(y.a,{serverEntityID:t}):C)),a()(S.a,{target:this.refs.menuButton,isOpen:this.state.isMenuOpen,canProvisionPersonalCloudServer:i,serverEntityIDs:n,onMenuClose:this.onMenuClose}))},t}(d.Component);t.a=D},function(e,t,n){"use strict";function i(e){var t=e.outOfDateServers,n=e.isWaitingForPrimaryServer,i=e.isUserRestricted,a=e.canProvisionPersonalCloudServer,s=e.onLinkPersonalCloudServerPress;
return n?h:t.length?r()(c.a,{outOfDateServers:t}):i?p:a?r()(d.a,{onPress:s}):f}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2162)),l=n(2164),c=n(2165),u=n(2166),d=n(2163),h=r()(u.a,{}),p=r()(l.a,{}),f=r()(o.a,{});t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createStructuredSelector)({outOfDateServers:m.a,isWaitingForPrimaryServer:function(e){return e.isWaitingForPrimaryServer},isUserRestricted:function(e){return!!e.user.restricted},canProvisionPersonalCloudServer:v.a})}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(9),m=(n.n(g),
n(673)),v=n(325),y=n(134),b=n(2160),S={showProvisionPersonalCloudServerModal:y.a},w=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onLinkPersonalCloudServerPress=function(e){i.props.showProvisionPersonalCloudServerModal({open:!0})},a=n,c()(i,a)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(b.a,r()({},this.props,{onLinkPersonalCloudServerPress:this.onLinkPersonalCloudServerPress
}))},t}(h.Component);t.a=n.i(f.b)(i,S)(w)},function(e,t,n){"use strict";function i(){return r()(l.a,{message:n.i(o.default)("A server could not be found. Download and install Plex Media Server, and it will appear here.")},void 0,r()(c.a,{to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560",title:n.i(o.default)("Where is my server?")}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(201),c=n(141);t.a=i},function(e,t,n){"use strict";function i(e){return r()("div",{},void 0,r()(l.a,{
message:n.i(o.default)("Don't have a computer to run Plex Media Server? You can get started with Plex Cloud right now!")},void 0,r()(c.a,{icon:"plex-icon-personal-cloud-560",title:n.i(o.default)("Set up Plex Cloud..."),onPress:e.onPress})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(201),c=n(141);t.a=i},function(e,t,n){"use strict";function i(){return r()(l.a,{message:n.i(o.default)("No one in your home has shared a library with you.")},void 0,r()(c.a,{to:"https://support.plex.tv/hc/en-us/articles/204234313-Example-Plex-Home-Setup",
target:"_blank",icon:"plex-icon-help-560",title:n.i(o.default)("Learn more")}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(201),c=n(141);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.outOfDateServers,i=t.map(function(e){return'"'+e.friendlyName+'"'}),a=n.i(l.a)(i),s=void 0;return s=1===t.length?n.i(o.default)("The server {1} needs an update.",a):n.i(o.default)("The servers {1} need updates.",a),r()(c.a,{message:s})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(736),c=n(201);t.a=i;
},function(e,t,n){"use strict";function i(){return r()(l.a,{message:n.i(o.default)("Please wait while servers are discovered.")})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(201);t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(28),y=n.n(v),b=n(4),S=n(1314),w=n(25),M=n(30),I=n(885),C=n(884),D=n(936),T=n.n(D),x=function(e){function t(){return u()(this,t),h()(this,e.apply(this,arguments));
}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(w.a)(this,e,t)},t.prototype.render=function(){if(!this.props.isPrimaryEligible||!this.props.friendlyName)return null;var e=this.props,t=e.className,i=e.isSelected,r=(e.onPress,l()(e,["className","isSelected","onPress"])),o=n.i(S.a)(r),c=o.isConnecting,u=o.statusWithSource;return m.a.createElement(I.a,a()({className:y()(t,(c||r.isUnavailable)&&T.a.disabledServerMenuItem,i&&T.a.selectedServerMenuItem),to:"#!/server/"+r.machineIdentifier+"/dashboard",
isDisabled:c,title:r.friendlyName,details:u,onPress:this.onPress},r),i&&s()(M.a,{name:"plex-icon-selected-560",className:y()(T.a.serverMenuIcon,T.a.selectedIcon),"aria-label":n.i(b.default)("Selected")}),s()(C.a,{className:T.a.serverMenuIcon,isConnected:r.isConnected,isUnavailable:r.isUnavailable,isSecure:r.isSecure,isRelayed:!i&&r.isRelayed}))},t}(g.Component);t.a=x},function(e,t,n){"use strict";function i(e){return c.a.createElement(h.a,r()({},e,{machineIdentifier:"plexCloud",title:n.i(u.default)("Plex Cloud"),
details:n.i(u.default)("Set up Plex Cloud\u2026")}),o()(d.a,{className:f.a.personalCloudIcon,name:"plex-icon-personal-cloud-560","aria-label":n.i(u.default)("Plex Cloud")}))}var a=n(7),r=n.n(a),s=n(3),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(30),h=n(885),p=n(2589),f=n.n(p);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(9)),p=(n.n(h),n(15)),f=n(134),g=n(325),m=n(2168),v=n.i(h.createStructuredSelector)({canProvisionPersonalCloudServer:g.a
}),y={showProvisionPersonalCloudServerModal:f.a},b=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(o))),S.call(i),a=n,l()(i,a)}return u()(t,e),t.prototype.render=function(){return this.props.canProvisionPersonalCloudServer?a()(m.a,{onPress:this.onPress}):null},t}(d.Component),S=function(){var e=this;this.onPress=function(){var t;(t=e.props).onPress.apply(t,arguments),e.props.showProvisionPersonalCloudServerModal({
open:!0})}};t.a=n.i(p.b)(v,y)(b)},function(e,t,n){"use strict";function i(e){var t=e.target,n=e.isOpen,i=e.serverEntityIDs,a=e.onMenuClose;return r()(l.a,{className:h.a.serverMenu,target:t,isOpen:n,scrollerProps:p,onMenuClose:a},void 0,r()(u.a,{onPress:a}),i.map(function(e){return r()(c.a,{serverEntityID:e},e)}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(23)),l=n(73),c=n(2173),u=n(2169),d=n(2590),h=n.n(d),p={className:h.a.serverMenuScroller,scrollDirection:o.a.VERTICAL,autoScroll:!0};t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.hasPrimaryServer,n=d()(e,["hasPrimaryServer"]);return t?p.a.createElement(r,n):p.a.createElement(a,n)}function a(e){return p.a.createElement(y.a,o()({className:w.a.serverMenuButton,isSelected:!0,isDisabled:!0},e),c()("div",{className:w.a.serverMenuButtonContainer},void 0,c()("span",{className:w.a.serverMenuTitle},void 0,n.i(f.default)("Looking for servers...")),c()(m.a,{size:g.d.SMALL,className:w.a.serverMenuSpinner})))}function r(e){var t=e.friendlyName,i=e.sourceTitle,a=e.isConnected,r=e.isUnavailable,s=e.isSecure,l=e.isRelayed,u=d()(e,["friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isRelayed"]),h=void 0;
return l&&i?h=n.i(f.default)("Indirect {1}","("+i+")"):l?h=n.i(f.default)("Indirect"):i&&(h=i),p.a.createElement(y.a,o()({className:w.a.serverMenuButton,"aria-haspopup":!0,"data-qa-id":"serverMenuButton",isSelected:!0},u),c()("div",{className:w.a.serverMenuButtonContainer},void 0,c()("span",{className:w.a.serverMenuTitle},void 0,c()("span",{className:w.a.serverMenuFriendlyNameContainer},void 0,c()("span",{className:w.a.serverMenuFriendlyName},void 0,t),M),h&&c()("span",{className:w.a.serverMenuUsername
},void 0,h)),c()(b.a,{className:w.a.icon,isConnected:a,isUnavailable:r,isSecure:s})))}var s=n(7),o=n.n(s),l=n(3),c=n.n(l),u=n(17),d=n.n(u),h=n(1),p=n.n(h),f=n(4),g=n(23),m=n(41),v=n(357),y=n(26),b=n(884),S=n(2591),w=n.n(S),M=c()(v.a,{isSelected:!0});t.a=i},function(e,t,n){"use strict";function i(){return n.i(u.createSelector)(n.i(d.a)(),function(e){return s.a.pick(e,"friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isRelayed")})}function a(e){return l.a.createElement(h.a,e)}var r=n(2),s=n.n(r),o=n(1),l=n.n(o),c=n(15),u=n(9),d=(n.n(u),
n(63)),h=n(2171);t.a=n.i(c.b)(i)(a)},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(n.i(p.a)(),function(e){return e.primaryServer},function(e,t){var n=l.a.pick(e,"machineIdentifier","friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isCloudSyncServer","isPrimaryEligible","activeConnection","isOutOfDate","isRelayed");return s()({},n,{isSelected:e.entityID===t})})}function a(e){return u.a.createElement(f.a,e)}var r=n(7),s=n.n(r),o=n(2),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(9),p=(n.n(h),
n(63)),f=n(2167);t.a=n.i(d.b)(i)(a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(28),f=n.n(p),g=n(4),m=n(61),v=n(25),y=n(163),b=n(2175),S=n(886),w=n(2594),M=n.n(w),I=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onActionsPress=function(e){a.setState({isActionsMenuOpen:!a.state.isActionsMenuOpen}),a.props.onActionsMenuOpen&&a.props.onActionsMenuOpen()},a.onActionsMenuClose=function(){a.setState({
isActionsMenuOpen:!1}),a.props.onActionsMenuClose&&a.props.onActionsMenuClose()},a.onOptimizeDatabasePress=function(e){a.setState({isOptimizeModalOpen:!0})},a.onOptimizeConfirm=function(){a.setState({isOptimizeModalOpen:!1}),a.props.onOptimizeDatabaseConfirm()},a.onOptimizeCancel=function(){a.setState({isOptimizeModalOpen:!1})},a.onCleanBundlesPress=function(e){a.setState({isCleanBundlesModalOpen:!0})},a.onCleanBundlesConfirm=function(){a.props.onCleanBundlesConfirm()},a.onCleanBundlesCancel=function(){
a.setState({isCleanBundlesModalOpen:!1})},a.onEmptyTrashPress=function(e){a.setState({isEmptyTrashModalOpen:!0})},a.onEmptyTrashConfirm=function(){a.setState({isEmptyTrashModalOpen:!1}),a.props.onEmptyTrashConfirm()},a.onEmptyTrashCancel=function(){a.setState({isEmptyTrashModalOpen:!1})},a.state={isActionsMenuOpen:!1,isOptimizeModalOpen:!1,isCleanBundlesModalOpen:!1,isEmptyTrashModalOpen:!1},a}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isCleanBundleInProgress&&!e.isCleanBundleInProgress&&this.setState({
isCleanBundlesModalOpen:!1})},t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.className,i=e.isHovered,r=e.isLibraryRefreshing,s=e.isCleanBundleInProgress,o=m.a.hasTouchScreen||i||this.state.isActionsMenuOpen;return a()("div",{className:f()(t,o&&M.a.isVisible),role:"menu"},void 0,a()(S.a,{className:M.a.action,"data-qa-id":"sidebarLibrariesAddButton",icon:"plex-icon-add-560",title:n.i(g.default)("Add Library"),onPress:this.props.onAddLibraryPress
}),h.a.createElement(S.a,{ref:"actionsMenuButton",className:M.a.action,"aria-haspopup":"true","data-qa-id":"sidebarLibrariesMoreButton",icon:"plex-icon-more-560",title:n.i(g.default)("More Actions"),onPress:this.onActionsPress}),a()(b.a,{target:this.refs.actionsMenuButton,isOpen:this.state.isActionsMenuOpen,isLibraryRefreshing:r,onMenuClose:this.onActionsMenuClose,onSharePress:this.props.onSharePress,onUpdateLibrariesPress:this.props.onUpdateLibrariesPress,onCancelUpdatePress:this.props.onCancelUpdatePress,
onOptimizeDatabasePress:this.onOptimizeDatabasePress,onCleanBundlesPress:this.onCleanBundlesPress,onEmptyTrashPress:this.onEmptyTrashPress}),a()(y.a,{isOpen:this.state.isOptimizeModalOpen,metricsPage:"confirmOptimizeDatabase",title:n.i(g.default)("Optimize Database"),message:n.i(g.default)("Cleans up the library database and ensures it is operating as quickly as possible. This is especially useful when you've added or removed a large amount of media from the library."),confirmLabel:n.i(g.default)("Optimize"),
onConfirm:this.onOptimizeConfirm,onCancel:this.onOptimizeCancel}),a()(y.a,{isOpen:this.state.isCleanBundlesModalOpen,isConfirmButtonSpinning:s,isCancelButtonDisabled:s,metricsPage:"confirmCleanBundles",title:n.i(g.default)("Clean Bundles"),message:n.i(g.default)("The media server stores information about your media to disk, as well as posters, artwork, and other media resources from the internet. Running this task deletes any bundles which are no longer in use."),confirmLabel:n.i(g.default)("Clean"),
onConfirm:this.onCleanBundlesConfirm,onCancel:this.onCleanBundlesCancel}),a()(y.a,{isOpen:this.state.isEmptyTrashModalOpen,metricsPage:"confirmEmptyTrash",title:n.i(g.default)("Empty Trash"),message:n.i(g.default)("By default the media server doesn't remove information for media right away. This helps if a drive is temporarily disconnected. When you empty the trash for a section, all information about missing media is deleted."),confirmLabel:n.i(g.default)("Empty"),onConfirm:this.onEmptyTrashConfirm,
onCancel:this.onEmptyTrashCancel}))},t}(d.Component);I.defaultProps={className:M.a.actions},t.a=I},function(e,t,n){"use strict";function i(e){var t=e.isLibraryRefreshing,i=e.onSharePress,a=e.onUpdateLibrariesPress,s=e.onCancelUpdatePress,l=e.onOptimizeDatabasePress,p=e.onCleanBundlesPress,f=e.onEmptyTrashPress,g=o()(e,["isLibraryRefreshing","onSharePress","onUpdateLibrariesPress","onCancelUpdatePress","onOptimizeDatabasePress","onCleanBundlesPress","onEmptyTrashPress"]);return c.a.createElement(d.a,g,r()(h.a,{
onPress:i},void 0,n.i(u.default)("Share...")),t?r()(h.a,{onPress:s},void 0,n.i(u.default)("Cancel Update")):r()(h.a,{onPress:a},void 0,n.i(u.default)("Update Libraries")),r()(h.a,{onPress:l},void 0,n.i(u.default)("Optimize Database")),r()(h.a,{onPress:p},void 0,n.i(u.default)("Clean Bundles")),r()(h.a,{onPress:f},void 0,n.i(u.default)("Empty Trash")))}var a=n(3),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(73),h=n(115);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=n.n(d),p=n(28),f=n.n(p),g=n(4),m=n(104),v=n(132),y=n(163),b=n(883),S=n(882),w=n(886),M=n(2177),I=n(2595),C=n.n(I),D=function(e){
function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onActionsPress=function(){a.setState({isActionsMenuOpen:!a.state.isActionsMenuOpen})},a.onActionsMenuClose=function(){a.setState({isActionsMenuOpen:!1})},a.onAnalyzePress=function(){a.setState({isAnalyzeModalOpen:!0})},a.onAnalyzeConfirm=function(){a.setState({isAnalyzeModalOpen:!1}),a.props.onAnalyzeLibraryPress()},a.onAnalyzeCancel=function(){a.setState({isAnalyzeModalOpen:!1})},a.onRefreshAllPress=function(){a.setState({isRefreshAllModalOpen:!0
})},a.onRefreshAllConfirm=function(){a.setState({isRefreshAllModalOpen:!1}),a.props.onRefreshLibraryPress()},a.onRefreshAllCancel=function(){a.setState({isRefreshAllModalOpen:!1})},a.onEmptyTrashPress=function(){a.setState({isEmptyTrashModalOpen:!0})},a.onEmptyTrashConfirm=function(){a.setState({isEmptyTrashModalOpen:!1}),a.props.onEmptyTrashLibraryPress()},a.onEmptyTrashCancel=function(){a.setState({isEmptyTrashModalOpen:!1})},a.onDeletePress=function(){a.setState({isDeleteModalOpen:!0})},a.onDeleteConfirm=function(){
a.props.onDeleteLibraryPress()},a.onDeleteCancel=function(){a.setState({isDeleteModalOpen:!1})},a.state={isActionsMenuOpen:!1,isAnalyzeModalOpen:!1,isRefreshAllModalOpen:!1,isEmptyTrashModalOpen:!1,isDeleteModalOpen:!1},a}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isLibraryDeleteInProgress&&!e.isLibraryDeleteInProgress&&this.setState({isDeleteModalOpen:!1})},t.prototype.render=function(){var e=this.props,t=e.machineIdentifier,i=e.isFullOwnedServer,r=e.id,s=e.type,o=e.title,l=e.refreshing,c=e.isLibraryDeleteInProgress,u=e.onShareLibraryPress,d=e.onUpdateLibraryPress,p=e.onCancelUpdateLibraryPress,I=e.onEditLibraryPress,D=encodeURIComponent(t),T=encodeURIComponent(r);
return a()(b.a,{className:C.a.libraryListItem},void 0,a()(S.a,{"data-qa-id":"sidebarLibraryItem--"+r,to:"#!/server/"+D+"/section/"+T,icon:m.a.get(s).sectionTypeIcon,title:o,showSpinner:i&&l}),i&&h.a.createElement(w.a,{className:f()(C.a.action,this.state.isActionsMenuOpen&&C.a.isVisible),"data-qa-id":"sidebarLibraryMoreButton",icon:"plex-icon-more-560",ref:"actionsMenuButton",title:n.i(g.default)("More Actions"),onPress:this.onActionsPress}),a()(M.a,{target:this.refs.actionsMenuButton,isOpen:this.state.isActionsMenuOpen,
isLibraryRefreshing:l,onMenuClose:this.onActionsMenuClose,onSharePress:u,onUpdatePress:d,onCancelUpdatePress:p,onEditPress:I,onAnalyzePress:this.onAnalyzePress,onRefreshAllPress:this.onRefreshAllPress,onEmptyTrashPress:this.onEmptyTrashPress,onDeletePress:this.onDeletePress}),a()(y.a,{isOpen:this.state.isAnalyzeModalOpen,metricsPage:"confirmAnalyzeLibrary",title:n.i(g.default)("Analyze Library"),message:n.i(g.default)("Analyzes all the media files in the library. The analysis captures information about the media which helps Plex decide how to optimally play back the media."),
confirmLabel:n.i(g.default)("Analyze"),onConfirm:this.onAnalyzeConfirm,onCancel:this.onAnalyzeCancel}),a()(y.a,{isOpen:this.state.isRefreshAllModalOpen,metricsPage:"confirmRefreshLibrary",title:n.i(g.default)("Refresh All"),message:n.i(g.default)("Forces a download of fresh media information from the internet. This can take a long time. Any locked fields are not modified."),confirmLabel:n.i(g.default)("Refresh"),onConfirm:this.onRefreshAllConfirm,onCancel:this.onRefreshAllCancel}),a()(y.a,{isOpen:this.state.isEmptyTrashModalOpen,
metricsPage:"confirmEmptyTrashLibrary",title:n.i(g.default)("Empty Trash"),message:n.i(g.default)("By default the media server doesn't remove information for media right away. This helps if a drive is temporarily disconnected. When you empty the trash for a section, all information about missing media is deleted."),confirmLabel:n.i(g.default)("Empty"),onConfirm:this.onEmptyTrashConfirm,onCancel:this.onEmptyTrashCancel}),a()(y.a,{isOpen:this.state.isDeleteModalOpen,isConfirmButtonSpinning:c,isCancelButtonDisabled:c,
metricsPage:"confirmDeleteLibrary",kind:v.DANGER,title:n.i(g.default)("Delete Library"),message:n.i(g.default)('The library "{libraryName}" will be removed from this server. Your media files will not be affected. This can\'t be undone. Continue?',{libraryName:o}),accordMessage:n.i(g.default)('Yes, delete the library "{libraryName}"',{libraryName:o}),confirmLabel:n.i(g.default)("Delete"),onConfirm:this.onDeleteConfirm,onCancel:this.onDeleteCancel}))},t}(d.Component);t.a=D},function(e,t,n){"use strict";
function i(e){var t=e.isLibraryRefreshing,i=e.onSharePress,a=e.onUpdatePress,s=e.onCancelUpdatePress,l=e.onEditPress,f=e.onAnalyzePress,g=e.onRefreshAllPress,m=e.onEmptyTrashPress,v=e.onDeletePress,y=o()(e,["isLibraryRefreshing","onSharePress","onUpdatePress","onCancelUpdatePress","onEditPress","onAnalyzePress","onRefreshAllPress","onEmptyTrashPress","onDeletePress"]);return c.a.createElement(d.a,y,r()(h.a,{onPress:i},void 0,n.i(u.default)("Share...")),t?r()(h.a,{onPress:s},void 0,n.i(u.default)("Cancel Update")):r()(h.a,{
onPress:a},void 0,n.i(u.default)("Update Library")),r()(h.a,{onPress:l},void 0,n.i(u.default)("Edit")),r()(h.a,{onPress:f},void 0,n.i(u.default)("Analyze")),r()(h.a,{onPress:g},void 0,n.i(u.default)("Refresh All")),r()(h.a,{onPress:m},void 0,n.i(u.default)("Empty Trash")),r()(h.a,{kind:p.c.DANGER,onPress:v},void 0,n.i(u.default)("Delete")))}var a=n(3),r=n.n(a),s=n(17),o=n.n(s),l=n(1),c=n.n(l),u=n(4),d=n(73),h=n(115),p=n(23);t.a=i},function(e,t,n){"use strict";var i=n(11),a=n.n(i),r=n(13),s=n.n(r),o=n(12),l=n.n(o),c=n(7),u=n.n(c),d=n(1),h=n.n(d),p=n(15),f=n(9),g=(n.n(f),
n(1201)),m=n(85),v=n(1538),y=n(783),b=n(2176),S=function(){return n.i(f.createSelector)(n.i(g.a)(),n.i(y.b)(),function(e,t){var n=e.key,i=e.title,a=void 0===i?"":i,r=e.type,s=e.agent,o=e.refreshing,l="movie"===r&&"com.plexapp.agents.none"===s;return{id:n,title:a.trim(),type:l?"videos":r,refreshing:o,isLibraryDeleteInProgress:!!t}})},w=u()({fetchLibraries:m.fetchLibraries},v),M=function(e){function t(){var n,i,r;a()(this,t);for(var o=arguments.length,l=Array(o),c=0;c<o;c++)l[c]=arguments[c];return n=i=s()(this,e.call.apply(e,[this].concat(l))),
i.onShareLibraryPress=function(){i.props.shareLibrary({serverEntityID:i.props.serverEntityID,libraryEntityID:i.props.libraryEntityID})},i.onUpdateLibraryPress=function(){i.props.startLibraryRefresh({serverEntityID:i.props.serverEntityID,libraryEntityID:i.props.libraryEntityID})},i.onCancelUpdateLibraryPress=function(){i.props.cancelLibraryRefresh({serverEntityID:i.props.serverEntityID,libraryEntityID:i.props.libraryEntityID})},i.onEditLibraryPress=function(){i.props.editLibrary({serverEntityID:i.props.serverEntityID,
libraryEntityID:i.props.libraryEntityID})},i.onAnalyzeLibraryPress=function(){i.props.analyzeLibrary({serverEntityID:i.props.serverEntityID,libraryEntityID:i.props.libraryEntityID})},i.onRefreshLibraryPress=function(){i.props.startLibraryForceRefresh({serverEntityID:i.props.serverEntityID,libraryEntityID:i.props.libraryEntityID})},i.onEmptyTrashLibraryPress=function(){i.props.emptyTrashLibrary({serverEntityID:i.props.serverEntityID,libraryEntityID:i.props.libraryEntityID})},i.onDeleteLibraryPress=function(){
i.props.deleteLibrary({serverEntityID:i.props.serverEntityID,libraryEntityID:i.props.libraryEntityID})},r=n,s()(i,r)}return l()(t,e),t.prototype.componentDidUpdate=function(e){e.isLibraryDeleteInProgress&&!this.props.isLibraryDeleteInProgress&&this.props.fetchLibraries({serverEntityID:this.props.serverEntityID})},t.prototype.render=function(){return h.a.createElement(b.a,u()({},this.props,{onShareLibraryPress:this.onShareLibraryPress,onUpdateLibraryPress:this.onUpdateLibraryPress,onCancelUpdateLibraryPress:this.onCancelUpdateLibraryPress,
onEditLibraryPress:this.onEditLibraryPress,onAnalyzeLibraryPress:this.onAnalyzeLibraryPress,onRefreshLibraryPress:this.onRefreshLibraryPress,onEmptyTrashLibraryPress:this.onEmptyTrashLibraryPress,onDeleteLibraryPress:this.onDeleteLibraryPress}))},t}(d.Component);t.a=n.i(p.b)(S,w)(M)},function(e,t,n){"use strict";function i(e){return l.a.EPG_IDENTIFIER.test(e)?"plex-icon-shows-broadcast-560":"plex-icon-channels-560"}function a(e){var t=e.machineIdentifier,n=e.identifier,a=e.isLibraryProvider,r=e.title,o=e.isRefreshing;
if(a)return null;var l=encodeURIComponent(t),u=encodeURIComponent(n);return s()(c.a,{to:"#!/server/"+l+"/provider/"+u,icon:i(n),title:r,showSpinner:o,highlightActiveRoute:!0})}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),n(72)),c=n(141);t.a=a},function(e,t,n){"use strict";function i(e){return o.a.createElement(h.a,e)}var a=n(2),r=n.n(a),s=n(1),o=n.n(s),l=n(15),c=n(9),u=(n.n(c),n(103)),d=n(349),h=n(2179),p=function(){return n.i(c.createSelector)(n.i(u.a)(),n.i(d.a)(),function(e,t){var n=r.a.pick(e,"identifier","isLibraryProvider","title");
return n.isRefreshing=!!t,n})};t.a=n.i(l.b)(p)(i)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.machineIdentifier,a=e.allowChannelAccess,s=e.isFullOwnedServer,v=e.isConnected,b=e.isClaimed,S=e.isLibrariesPopulated,w=e.librariesError,M=e.contentProviders,I=e.isProvidersPopulated,C=e.providersError,D=e.showRecordingSchedule;if(!v)return o.a.createElement(m.a,e);var T=!I&&!C,x=!S&&!w;if(T||x)return r()(u.a,{containerClassName:y.a.spinnerContainer,label:n.i(l.default)("Loading libraries")
});var P=encodeURIComponent(i);return r()("div",{},void 0,s&&r()(d.a,{title:n.i(l.default)("Manage")},void 0,r()(h.a,{to:"#!/status",icon:"plex-icon-status-560",title:n.i(l.default)("Status")},"status"),r()(h.a,{to:"#!/settings/server",icon:"plex-icon-settings-560",title:n.i(l.default)("Settings")},"settings",!b&&r()(c.a,{name:"plex-icon-alert-560",className:y.a.unclaimedIcon,"aria-label":n.i(l.default)("Unclaimed")})),D&&r()(h.a,{to:"#!/server/"+P+"/schedule",icon:"plex-icon-calendar-560",title:n.i(l.default)("Recording Schedule"),
highlightActiveRoute:!0},"schedule"),M.map(function(e){return r()(p.a,{serverEntityID:t,providerEntityID:e,machineIdentifier:i},e)})),o.a.createElement(f.a,e),r()(g.a,{machineIdentifier:i,showChannels:a}))}var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(4),c=n(30),u=n(41),d=n(542),h=n(141),p=n(2180),f=n(2183),g=n(2185),m=n(2187),v=n(2596),y=n.n(v);t.a=i},function(e,t,n){"use strict";function i(){return n.i(v.createSelector)(n.i(S.a)(),n.i(M.a)(),n.i(w.a)(b.a.CONTENT),n.i(w.a)(b.a.SUBSCRIBE),n.i(I.a)(),function(e,t,n,i,a){
var r=p.a.pick(e,"machineIdentifier","friendlyName","promiseState","presence","allowChannelAccess","isConnected","isFullServer","isFullOwnedServer","isPersonalCloudServer","isBundled","isClaimed","hasHttpsConnections","hasFallbackConnections"),s=p.a.pick(e&&e.desktop,"libraries","isLibrariesPending","isLibrariesPopulated","librariesError","isProvidersPending","isProvidersPopulated","providersError");return d()({},r,s,{contentProviders:n,showRecordingSchedule:!!i.length,isLibraryRefreshing:a,isCleanBundleInProgress:!!t
})})}var a=n(11),r=n.n(a),s=n(13),o=n.n(s),l=n(12),c=n.n(l),u=n(7),d=n.n(u),h=n(2),p=n.n(h),f=n(1),g=n.n(f),m=n(15),v=n(9),y=(n.n(v),n(35)),b=n(171),S=n(63),w=n(670),M=n(783),I=n(775),C=n(76),D=n(85),T=n(2181),x=d()({redirectToHttp:C.f},D),P=function(e){function t(){var n,i,a;r()(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=o()(this,e.call.apply(e,[this].concat(l))),i.onReloadHttpPress=function(e){i.props.redirectToHttp()},i.onRestartPress=function(e){i.props.restartPersonalCloudServer();
},i.onDeleteServerConfirm=function(){i.props.deleteServer({serverEntityID:i.props.serverEntityID})},i.onAddLibraryPress=function(e){i.props.addLibrary({serverEntityID:i.props.serverEntityID})},i.onSharePress=function(e){i.props.shareLibraries({serverEntityID:i.props.serverEntityID})},i.onUpdateLibrariesPress=function(e){i.props.startLibrariesRefresh({serverEntityID:i.props.serverEntityID})},i.onCancelUpdatePress=function(e){i.props.cancelLibrariesRefresh({serverEntityID:i.props.serverEntityID})},
i.onOptimizeDatabaseConfirm=function(e){i.props.optimizeDatabase({serverEntityID:i.props.serverEntityID})},i.onCleanBundlesConfirm=function(e){i.props.cleanBundles({serverEntityID:i.props.serverEntityID})},i.onEmptyTrashConfirm=function(e){i.props.emptyTrash({serverEntityID:i.props.serverEntityID})},i.onTryAgainPress=function(e){i.props.testServer({serverEntityID:i.props.serverEntityID})},i.onAllowFallbackPress=function(e){i.props.enableHttpFallback({serverEntityID:i.props.serverEntityID})},a=n,o()(i,a);
}return c()(t,e),t.prototype.componentWillMount=function(){var e=this.props.isConnected;e&&this._populate()},t.prototype.componentWillReceiveProps=function(e){var t=this.props,n=t.serverEntityID,i=t.isConnected,a=e.serverEntityID,r=e.isConnected,s=n!==a,o=i!==r;r&&(s||o)&&this._populate(e)},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;n.i(y.a)(function(){e.fetchLibraries({serverEntityID:e.serverEntityID}),e.fetchProviders({serverEntityID:e.serverEntityID
})})},t.prototype.render=function(){return g.a.createElement(T.a,d()({onReloadHttpPress:this.onReloadHttpPress,onRestartPress:this.onRestartPress,onDeleteServerConfirm:this.onDeleteServerConfirm,onAddLibraryPress:this.onAddLibraryPress,onSharePress:this.onSharePress,onUpdateLibrariesPress:this.onUpdateLibrariesPress,onCancelUpdatePress:this.onCancelUpdatePress,onOptimizeDatabaseConfirm:this.onOptimizeDatabaseConfirm,onCleanBundlesConfirm:this.onCleanBundlesConfirm,onEmptyTrashConfirm:this.onEmptyTrashConfirm,
onTryAgainPress:this.onTryAgainPress,onAllowFallbackPress:this.onAllowFallbackPress},this.props))},t}(f.Component);t.a=n.i(m.b)(i,x)(P)},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(17),l=n.n(o),c=n(11),u=n.n(c),d=n(13),h=n.n(d),p=n(12),f=n.n(p),g=n(1),m=n.n(g),v=n(4),y=n(2195),b=n(201),S=n(141),w=n(2174),M=n(2178),I=n(2597),C=n.n(I),D=function(e){function t(){return u()(this,t),h()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.machineIdentifier,r=e.isFullServer,o=e.isFullOwnedServer,c=e.isHovered,u=e.libraries,d=e.librariesError,h=e.onAddLibraryPress,p=e.onMouseMove,f=e.onMouseLeave,g=e.onFocus,y=e.onBlur,I=l()(e,["serverEntityID","machineIdentifier","isFullServer","isFullOwnedServer","isHovered","libraries","librariesError","onAddLibraryPress","onMouseMove","onMouseLeave","onFocus","onBlur"]),D=!!d&&!u.length,T=o&&!u.length,x=encodeURIComponent(i);
return s()("div",{role:"navigation","data-qa-id":"sidebarLibrariesList",onMouseMove:p,onMouseLeave:f,onFocus:g,onBlur:y},void 0,s()("div",{className:C.a.librariesListHeader,role:"header"},void 0,s()("div",{className:C.a.librariesTitle},void 0,n.i(v.default)("Libraries")),o&&m.a.createElement(w.a,a()({isHovered:c,onAddLibraryPress:h},I))),r&&s()(S.a,{to:"#!/server/"+x+"/playlists",icon:"plex-icon-playlists-560",title:n.i(v.default)("Playlists")},"playlists"),T&&s()(S.a,{icon:"plex-icon-add-560",title:n.i(v.default)("Add Library"),
onPress:h},"addLibrary"),D?s()(b.a,{message:n.i(v.default)("There was an unexpected error loading libraries.")}):u.map(function(e){return s()(M.a,{serverEntityID:t,libraryEntityID:e,machineIdentifier:i,isFullOwnedServer:o},e)}))},t}(g.Component);t.a=n.i(y.a)(D)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(290),f=n(542),g=n(141),m=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),
t.prototype.render=function(){var e=this.props,t=e.machineIdentifier,i=e.showChannels,r=e.isUserRestricted,s=e.unwatchedWatchLaterCount,o=e.unwatchedRecommendedCount,l=!r,c=encodeURIComponent(t);return i||l?a()(f.a,{title:n.i(h.default)("Online Content")},void 0,i&&a()(g.a,{to:"#!/server/"+c+"/channels",icon:"plex-icon-channels-560",title:n.i(h.default)("Channels")},"channels"),l&&a()(g.a,{to:"#!/playlist/queue",icon:"plex-icon-watch-later-560",title:n.i(h.default)("Watch Later")},"watchLater",a()(p.a,{},void 0,s)),l&&a()(g.a,{
to:"#!/playlist/recommendations",icon:"plex-icon-recommended-560",title:n.i(h.default)("Recommended")},"recommended",a()(p.a,{},void 0,o))):null},t}(d.Component);t.a=m},function(e,t,n){"use strict";var i=n(11),a=n.n(i),r=n(13),s=n.n(r),o=n(12),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(9),p=(n.n(h),n(35)),f=n(174),g=n(345),m=n(2184),v=n.i(h.createSelector)(f.a,function(e){var t=e.desktop;return{isSignedIn:e.isSignedIn,isUserRestricted:!!e.restricted,unwatchedWatchLaterCount:t.unwatchedWatchLaterList.totalSize,
unwatchedRecommendedCount:t.unwatchedRecommendedList.totalSize}}),y={repopulateUnwatchedWatchLaterList:g.b,repopulateUnwatchedRecommendedList:g.c},b=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){e.isSignedIn!==this.props.isSignedIn&&this._populate(e)},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;
e.isSignedIn&&!e.isUserRestricted&&n.i(p.a)(function(){e.repopulateUnwatchedWatchLaterList(),e.repopulateUnwatchedRecommendedList()})},t.prototype.render=function(){return u.a.createElement(m.a,this.props)},t}(c.Component);t.a=n.i(d.b)(function(e){return v(e)},y)(b)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),n(4)),p=n(61),f=n(59),g=n(83),m=n(25),v=n(23),y=n(163),b=n(141),S=n(201),w=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));
return a.onRemoveServerPress=function(e){a.setState({isRemoveModalOpen:!0})},a.onRemoveConfirm=function(){a.setState({isRemoveModalOpen:!1}),a.props.onDeleteServerConfirm(a.props.machineIdentifier)},a.onRemoveCancel=function(){a.setState({isRemoveModalOpen:!1})},a.state={isRemoveModalOpen:!1},a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(m.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.friendlyName,i=e.presence,r=e.promiseState,s=e.isBundled,o=e.isCloudServerConnected,l=e.isFullServer,c=e.isFullOwnedServer,u=e.isPersonalCloudServer,d=e.hasHttpsConnections,m=e.hasFallbackConnections,w=e.isPersonalCloudServerRestarting,M=e.onTryAgainPress,I=e.onReloadHttpPress,C=e.onRestartPress,D=e.onAllowFallbackPress,T=p.a.isHostedHttps,x=l&&i,P=d&&!m,E=!T||f.a.get("allowMixedContent"),A=void 0,L=void 0,k=void 0,N=void 0,_=void 0,O=void 0,R=void 0;
u?(A=!1,L=!1,k=!1,N=!1,_=o,O=!1,R=n.i(h.default)("Plex Cloud is unreachable. Make sure you're connected to the internet and try again. If you're still having trouble, you can restart your Plex Cloud server below.")):(A=!E&&x,L=E&&x&&P,k=A||L,N=!k,_=!1,O=c&&!s,R=k?n.i(h.default)("The selected server cannot be reached securely. An insecure connection may be possible."):n.i(h.default)("The selected server is unreachable. Make sure it's running, double check your network, and try again."));var j=r===g.a.promiseStates.PENDING,z=j?n.i(h.default)("Connecting"):n.i(h.default)("Try again");
return a()(S.a,{message:R},void 0,a()(b.a,{icon:"plex-icon-reload-560",title:z,showSpinner:j,isDisabled:j,onPress:M}),_&&a()(b.a,{icon:"plex-icon-personal-cloud-560",title:n.i(h.default)("Restart Cloud Server"),showSpinner:w,isDisabled:w,onPress:C}),A&&a()(b.a,{icon:"plex-icon-unlock-560",title:n.i(h.default)("Reload app insecurely"),onPress:I}),L&&a()(b.a,{icon:"plex-icon-unlock-560",title:n.i(h.default)("Allow insecure connection"),onPress:D}),k&&a()(b.a,{to:"https://support.plex.tv/hc/en-us/articles/206225077",
target:"_blank",icon:"plex-icon-help-560",title:n.i(h.default)("Learn more")}),N&&a()(b.a,{to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560",title:n.i(h.default)("Where is my server?")}),O&&a()(b.a,{icon:"plex-icon-remove-560",title:n.i(h.default)("Remove server"),onPress:this.onRemoveServerPress}),O&&a()(y.a,{isOpen:this.state.isRemoveModalOpen,metricsPage:"confirmRemoveServer",kind:v.c.DANGER,title:n.i(h.default)('Remove "{1}"',t),message:n.i(h.default)("If this server is restarted, it will automatically be added to your account again.",t),
confirmLabel:n.i(h.default)("Remove"),onConfirm:this.onRemoveConfirm,onCancel:this.onRemoveCancel}))},t}(d.Component);t.a=w},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,function(e){return e?{isCloudServerConnected:e.isConnected,isPersonalCloudServerRestarting:e.desktop.isPersonalCloudServerRestarting}:{isCloudServerConnected:!1}})}var a=n(15),r=n(9),s=(n.n(r),n(257)),o=n(2186);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.selectedKey,i=e.isPlexCloudVisible,a=e.isWebhooksVisible,s=e.myPlexUrl,h=e.username;
return r()(c.a,{className:p.a.container,autoScroll:!0},void 0,r()(u.a,{title:h},void 0,r()(d.a,{selectableKey:"account",selectedKey:t,to:"#!/account",title:n.i(o.default)("Account")}),r()(d.a,{to:n.i(l.join)([s,"/subscription"]),title:n.i(o.default)("Subscriptions")}),r()(d.a,{to:n.i(l.join)([s,"/users/payments"]),title:n.i(o.default)("Payments")}),i&&r()(d.a,{selectableKey:"plex-cloud",selectedKey:t,to:"#!/account/plex-cloud",title:n.i(o.default)("Plex Cloud")}),r()(d.a,{to:n.i(l.join)([s,"/cloudsync/providers"]),
title:n.i(o.default)("Cloud Sync")}),r()(d.a,{to:n.i(l.join)([s,"/users/profile"]),title:n.i(o.default)("Global App Settings")}),r()(d.a,{to:"#!/settings/devices",title:n.i(o.default)("Authorized Devices")}),a&&r()(d.a,{selectableKey:"webhooks",selectedKey:t,to:"#!/account/webhooks",title:n.i(o.default)("Webhooks")})),r()(u.a,{title:n.i(o.default)("Family & Friends")},void 0,r()(d.a,{to:"#!/settings/users",title:n.i(o.default)("Plex Home")}),r()(d.a,{to:"#!/settings/users/friends",title:n.i(o.default)("Sharing")
})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(20),c=n(70),u=n(542),d=n(2189),h=n(2598),p=n.n(h);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.selectableKey,i=e.selectedKey,a=e.to,s=e.title,l=i&&i===n,c=/^#/.test(a)?null:"_self";return r()(o.a,{target:c,to:a,icon:"plex-icon-settings-560",title:s,isSelected:l},n,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(141));t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(11),s=n.n(r),o=n(13),l=n.n(o),c=n(12),u=n.n(c),d=n(1),h=(n.n(d),
n(4)),p=n(23),f=n(51),g=n(117),m=n(91),v=n(98),y=n(71),b=n(92),S=n(78),w=n(3137),M=n.n(w),I=n(2058),C=n(2599),D=n.n(C),T=a()(I.a,{}),x=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onChooseCloudStorageProviderPress=function(e){a.setState({isChoosingProvider:!0})},a.state={isChoosingProvider:!1},a}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.isOpen,i=e.metricsProperties,r=e.onClose,s=this.state.isChoosingProvider;return a()(g.a,{size:p.d.LARGE,
isOpen:t,metricsPage:"cpms",metricsProperties:i,onModalClose:r},void 0,a()(m.a,{onModalClose:r},void 0,a()(v.a,{className:D.a.header},void 0,a()("div",{className:D.a.personalCloudServerTitle},void 0,n.i(h.default)("Plex Cloud")),n.i(h.default)("Your very own Plex Media Server in the cloud. No computer required.")),!s&&a()(y.a,{innerClassName:D.a.innerModalBody},void 0,a()("img",{className:D.a.upsellImage,src:M.a}),a()("div",{className:D.a.upsellText},void 0,a()("p",{},void 0,n.i(h.default)("Thanks for participating in the Plex Cloud beta! There are just a few quick steps between here and your very own Plex Media Server in the sky.")),a()("ul",{},void 0,a()("li",{
className:D.a.upsellPoint},void 0,n.i(h.default)("First, we\u2019ll link your cloud storage to your Plex account. Choose from popular providers like Dropbox and Google Drive.")),a()("li",{className:D.a.upsellPoint},void 0,n.i(h.default)("Next, we\u2019ll create your Plex Cloud. This may take a minute or two.")),a()("li",{className:D.a.upsellPoint},void 0,n.i(h.default)("Finally, add your media to your cloud storage and scan it in! Plex Cloud works just like a regular Media Server. Choose it from the location menu in your favorite Plex app and stream away!"))))),!s&&a()(b.a,{
className:D.a.footer},void 0,a()(S.a,{},void 0,a()(f.a,{kind:p.c.PRIMARY,size:p.d.LARGE,onPress:this.onChooseCloudStorageProviderPress},void 0,n.i(h.default)("Let's do this!")))),s&&T))},t}(d.Component);t.a=x},function(e,t,n){"use strict";function i(e){return{isOpen:e.ui.provisionPersonalCloudServerPage.isPersonalCloudServerModalOpen}}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(15),g=n(134),m=n(2190),v={fetchPersonalCloudServerProviders:g.e,showProvisionPersonalCloudServerModal:g.a
},y=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onClose=function(){i.props.showProvisionPersonalCloudServerModal({open:!1})},a=n,c()(i,a)}return d()(t,e),t.prototype.componentWillReceiveProps=function(e){e.isOpen&&!this.props.isOpen&&this.props.fetchPersonalCloudServerProviders({options:{data:{type:"plex_cloud"}}})},t.prototype.render=function(){return p.a.createElement(m.a,r()({},this.props,{
onClose:this.onClose}))},t}(h.Component);t.a=n.i(f.b)(i,v)(y)},function(e,t,n){"use strict";function i(e){var t=e.isOpen,i=e.metricsProperties,a=e.onModalClose;return r()(u.a,{size:l.d.LARGE,isOpen:t,metricsPage:"plexpassLite",metricsProperties:i,onModalClose:a},void 0,r()(d.a,{onModalClose:a},void 0,r()(h.a,{className:D.a.header},void 0,r()("div",{className:D.a.plexPassTitle},void 0,n.i(o.default)("Plex Pass Lite")),n.i(o.default)("Congratulations! You qualify for a free year of Plex Pass Lite!")),r()(p.a,{
innerClassName:D.a.body},void 0,r()(g.a,{img:v.a,title:n.i(o.default)("Mobile Sync"),description:n.i(o.default)("Enjoy your media offline on Android, iOS, and Windows devices")}),r()(g.a,{img:b.a,title:n.i(o.default)("Camera Upload"),description:n.i(o.default)("Sync photos from your mobile devices to Plex Media Server")}),r()(g.a,{img:w.a,title:n.i(o.default)("Cloud Sync"),description:n.i(o.default)("Sync media to the cloud and enjoy it anywhere there\u2019s internet")}),r()(g.a,{img:I.a,title:n.i(o.default)("Plex Home"),
description:n.i(o.default)("Parental controls and fast user switching")})),r()(f.a,{className:D.a.footer},void 0,r()(c.a,{kind:l.c.PRIMARY,size:l.d.LARGE,onPress:a},void 0,n.i(o.default)("Hooray, thanks!")))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(23),c=n(51),u=n(117),d=n(91),h=n(98),p=n(71),f=n(92),g=n(887),m=n(1022),v=n.n(m),y=n(1020),b=n.n(y),S=n(1021),w=n.n(S),M=n(3140),I=n.n(M),C=n(2601),D=n.n(C);t.a=i},function(e,t,n){"use strict";var i=n(7),a=n.n(i),r=n(3),s=n.n(r),o=n(11),l=n.n(o),c=n(13),u=n.n(c),d=n(12),h=n.n(d),p=n(1),f=n.n(p),g=n(28),m=n.n(g),v=n(4),y=n(20),b=n(443),S=n(23),w=n(25),M=n(41),I=n(26),C=n(51),D=n(822),T=n(91),x=n(98),P=n(71),E=n(92),A=n(887),L=n(1022),k=n.n(L),N=n(3138),_=n.n(N),O=n(3141),R=n.n(O),j=n(1020),z=n.n(j),U=n(1021),F=n.n(U),B=n(3139),V=n.n(B),H=n(2602),W=n.n(H),Q=s()(M.a,{}),Y=function(e){
function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(w.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.metricsProperties,i=e.metricsPage,r=e.plans,o=e.isPlansPending,l=e.isPlansPopulated,c=e.plansError,u=e.onModalClose;return s()(T.a,{onModalClose:u},void 0,s()(x.a,{className:W.a.header},void 0,s()("div",{className:W.a.plexPassTitle},void 0,n.i(v.default)("Plex Pass")),n.i(v.default)("Enhance your Plex experience with exclusive premium features")),s()(P.a,{
innerClassName:W.a.body},void 0,s()(A.a,{img:k.a,title:n.i(v.default)("Mobile Sync"),description:n.i(v.default)("Enjoy your media offline on Android, iOS, and Windows devices")}),s()(A.a,{img:_.a,title:n.i(v.default)("Exclusive Forum Access"),description:n.i(v.default)("Let your voice be heard in special members-only forums")}),s()(A.a,{img:R.a,title:n.i(v.default)("Trailers & Extras"),description:n.i(v.default)("See movie trailers, cast interviews, and other bonus features")}),s()(A.a,{img:z.a,title:n.i(v.default)("Camera Upload"),
description:n.i(v.default)("Sync photos from your mobile devices to Plex Media Server")}),s()(A.a,{img:F.a,title:n.i(v.default)("Cloud Sync"),description:n.i(v.default)("Sync media to the cloud and enjoy it anywhere there\u2019s internet")}),s()(A.a,{img:V.a,title:n.i(v.default)("Gracenote Music Magic"),description:n.i(v.default)("Song identification, album reviews, artist bios, and Plex Mix playlists")}),s()("div",{className:W.a.moreFeatures},void 0,s()(I.a,{className:W.a.link,to:b.b,target:"_self"
},void 0,n.i(v.default)("...plus more exclusive features!")))),s()(E.a,{className:W.a.footer},void 0,o&&s()("div",{className:W.a.spinnerContainer},void 0,Q),s()("div",{className:m()(W.a.plansContainer,o&&W.a.isPlansPending)},void 0,!o&&l&&r.map(function(e){var n=y.join(b.c,{plan:e.id,continue:window.location.href});return f.a.createElement(D.a,a()({key:e.id},t,{page:i,action:"subscribe",plan:e.id}),s()(C.a,{className:W.a.planButton,to:n,target:"_self",kind:S.c.PRIMARY,size:S.d.LARGE},void 0,e.formattedPrice," \u2014 ",e.name));
}),!o&&c&&f.a.createElement(D.a,a()({},t,{page:i,action:"subscribe",plan:"unknown"}),s()(C.a,{className:W.a.planButton,to:b.c,target:"_self",kind:S.c.PRIMARY,size:S.d.LARGE},void 0,n.i(v.default)("Subscribe")))),s()("div",{},void 0,n.i(v.default)("Subscribe today"),s()("span",{className:W.a.linkSeparator},void 0,"\u2014"),f.a.createElement(D.a,a()({},t,{page:i,action:"gift"}),s()(I.a,{className:W.a.link,to:b.d,target:"_self"},void 0,n.i(v.default)("or give Plex Pass as a gift!"))))))},t}(p.Component);
t.a=Y},function(e,t,n){"use strict";var i=n(11),a=n.n(i),r=n(13),s=n.n(r),o=n(12),l=n.n(o),c=n(1),u=n.n(c),d=n(15),h=n(9),p=(n.n(h),n(174)),f=n(345),g=n(2193),m=n.i(h.createSelector)(p.a,function(e){var t=e.desktop;return{isSignedIn:e.isSignedIn,plans:t.plans,isPlansPending:t.isPlansPending,isPlansPopulated:t.isPlansPopulated,plansError:t.plansError}}),v=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentWillMount=function(){this.props.isSignedIn&&this.props.fetchPlans();
},t.prototype.componentWillReceiveProps=function(e){e.isSignedIn&&e.isSignedIn!==this.props.isSignedIn&&e.fetchPlans()},t.prototype.render=function(){return u.a.createElement(g.a,this.props)},t}(c.Component);t.a=n.i(d.b)(function(e){return m(e)},{fetchPlans:f.a})(v)},function(e,t,n){"use strict";function i(e){var t=function(t){function n(e,i){o()(this,n);var a=c()(this,t.call(this,e,i));return a.onMouseMove=function(e){a._setHoveredState(!0),a.props.onMouseMove&&a.props.onMouseMove(e)},a.onMouseLeave=function(e){
a._setHoveredState(!1),a.props.onMouseLeave&&a.props.onMouseLeave(e)},a.onFocus=function(e){a._setHoveredState(!0),a.props.onFocus&&a.props.onFocus(e)},a.onBlur=function(e){a._setHoveredState(!1),a.props.onBlur&&a.props.onBlur(e)},a.state={isHovered:!1},a}return d()(n,t),n.prototype._setHoveredState=function(e){this.state.isHovered!==e&&this.setState({isHovered:e})},n.prototype.render=function(){var t=this.state.isHovered;return p.a.createElement(e,r()({isHovered:t},this.props,{onMouseMove:this.onMouseMove,
onMouseLeave:this.onMouseLeave,onFocus:this.onFocus,onBlur:this.onBlur}))},n}(h.Component);return t.displayName="Hoverable("+n.i(f.a)(e)+")",t.WrappedComponent=e,t}var a=n(7),r=n.n(a),s=n(11),o=n.n(s),l=n(13),c=n.n(l),u=n(12),d=n.n(u),h=n(1),p=n.n(h),f=n(273);t.a=i},function(e,t,n){"use strict";function i(e){if(e===document)return!0;if(!e)return!1;if(!e.parentNode)return!1;if(e.style){var t=e.style;if("none"===t.display||"hidden"===t.visibility)return!1}if(window.getComputedStyle){var n=window.getComputedStyle(e);
if("none"===n.getPropertyValue("display")||"hidden"===n.getPropertyValue("visibility"))return!1}return i(e.parentNode)}function a(e){var t=e.tabIndex;return null===t&&(t=void 0),!isNaN(t)&&t>=0&&r(e)}function r(e){if(!i(e))return!1;var t=e.nodeName.toLowerCase();return/input|select|textarea|button|object/.test(t)?!e.disabled:"a"!==t||e.href}function s(e){if(!e)return[];var t=[].slice.call(e.getElementsByTagName("*"),0).filter(function(e){return a(e)});return l.a.sortBy(t,function(e){return 0===e.tabIndex?1/0:e.tabIndex;
})}var o=n(2),l=n.n(o);t.a=s},function(e,t,n){"use strict";function i(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=e+t+i+a;if(h.hasOwnProperty(o))return h[o];var p=n.i(c.c)(e,t),f=parseInt(l.a.posterTitleHeight,10),g=parseInt(l.a.posterTitlePadding,10),m="mixed"===e?a+3:a,v=m*f+g,y=p>1?180:120,b=2,S=11,w=n.i(s.a)({direction:s.c,overscan:2,innerHorizontalPadding:30,innerVerticalPadding:30,outerPaddingTop:30,outerPaddingRight:60,
outerPaddingBottom:30,outerPaddingLeft:60,getCellWidth:function(e){return n.i(u.a)(r()({},e,{minCellWidth:y,minColumns:b,maxColumns:S,columnAdjustment:i,aspectRatio:p}))},getCellHeight:function(e){return n.i(d.a)(r()({},e,{aspectRatio:p,titleHeight:v}))}});return w.cellOptions={minCellWidth:y,minColumns:b,maxColumns:S,columnAdjustment:i,aspectRatio:p,titleHeight:v},h[o]=w,w}var a=n(7),r=n.n(a),s=n(470),o=n(109),l=n.n(o),c=n(202),u=n(891),d=n(890);t.a=i;var h={}},function(e,t,n){"use strict";function i(e){
function t(e){M=e.viewportHeight;var t=e.viewportWidth-2*m;I=t/u;var n=h.reduce(function(e,t){return e+t.height},0);return{height:n*I,width:t}}function i(e){n.i(l.a)(void 0!==M,"`getListStyle` must be called before `getPositionForIndex`");var t=o.a.find(b,function(t){var n=t.last;return e<=n}),i=o.a.find(t.cellLayouts,function(t){var n=t.cellIndex;return n===e});return{cellX:Math.round(i.left*I)+y,cellY:Math.round(t.top*I)+y,cellWidth:Math.round(i.width*I)-2*y,cellHeight:Math.round(t.height*I)-2*y
}}function a(e){if(e<0)return b[0];var t=o.a.find(b,function(t){var n=t.bottom;return e<(n+1)*I});return t||o.a.last(b)}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;arguments[1],arguments[2],arguments[3];n.i(l.a)(void 0!==M,"`getListStyle` must be called before `getRangesForPosition`");var t=e+M-1,i=e-M,r=t+M,s=a(i).first,o=a(r).last,c=a(e).first,u=a(t).last,d=c,h=u;return{renderStartIndex:s,renderEndIndex:o,visibleStartIndex:c,visibleEndIndex:u,partiallyVisibleStartIndex:d,
partiallyVisibleEndIndex:h}}var c=e.columns,u=void 0===c?1:c,d=e.rows,h=void 0===d?[]:d,p=e.offset,f=void 0===p?0:p,g=e.margin,m=void 0===g?0:g,v=e.cellMargin,y=void 0===v?0:v,b=[],S=0,w=f;h.forEach(function(e){var t=S;S+=e.height;var n=S-1,i=w;w+=e.widths.length;var a=w-1,s=[],o=0;e.widths.forEach(function(e,t){var n=o;o+=e,s.push({width:e,left:n,cellIndex:i+t})}),b.push(r()({},e,{top:t,bottom:n,first:i,last:a,cellLayouts:s}))});var M=void 0,I=void 0;return{getListStyle:t,getPositionForIndex:i,getRangesForPosition:s
}}var a=n(7),r=n.n(a),s=n(2),o=n.n(s),l=n(33);t.a=i},function(e,t,n){"use strict";function i(e){return Math.abs(e.actual-e.desired)/e.actual}function a(e){if(0===e.cells.length)return 1/0;var t=e.cells.reduce(function(e,t){return e+i(t)},0),n=t/e.cells.length,a=Math.abs(e.scale-1);return n+a}function r(e,t){var n=e.cells,i=n.reduce(function(e,t){return e+t.desired},0),a=t/i;return{scale:a,cells:n.map(function(e){var t=e.desired;return{desired:t,actual:t*a}})}}function s(e){var t=e.aspectRatios,n=e.columns,i=void 0===n?4:n,s=e.minAspectRatio,o=void 0===s?.4:s,l=e.maxAspectRatio,c=void 0===l?5:l,u=t.map(function(e){
return Math.max(o,Math.min(c,e))}),d=[],h={scale:null,cells:[]};u.forEach(function(e){var t={desired:e},n={scale:0,cells:h.cells.slice(0)};n.cells.push(t),n=r(n,i),a(n)<=a(h)?h=n:(d.push(h),h=r({scale:0,cells:[t]},i))});var p=1/Math.max(1,h.scale);return h.scale=Math.min(1,h.scale),h.cells=h.cells.map(function(e){var t=e.desired,n=e.actual;return{desired:t,actual:n*p}}),d.push(h),d.map(function(e){var t=e.scale,n=e.cells;return{height:t,widths:n.map(function(e){return e.actual})}})}t.a=s},function(e,t,n){
"use strict";function i(e){var t=e.index,n=e.length,i=e.renderableWindow,a=void 0===i?n:i,r=e.cellPadding,s=void 0===r?0:r,o=e.cellWidth,l=e.width,c=l/2,u=o/2,d=n*o+(n-1)*s,h=t*(o+s)-(c-u);d>l&&(h=Math.min(Math.max(h,0),d-l));for(var p=[],f=Math.max(0,t-a),g=Math.min(n-1,t+a),m=f;m<=g;m++)p[m]=m*(o+s)-h;return{renderStartIndex:f,renderEndIndex:g,positions:p}}t.a=i},function(e,t,n){"use strict";var i=n(547),a=n(109),r=n.n(a),s=parseInt(r.a.summaryCellHeight,10),o=n.i(i.a)(s);t.a=o},function(e,t,n){
"use strict";var i=n(547),a=n(109),r=n.n(a),s=parseInt(r.a.tableRowHeight,10),o=n.i(i.a)(s);t.a=o},function(e,t,n){"use strict";function i(e,t,i,r){if(i){var s=n.i(a.a)(i,t,r);if(1===s.length)return s[0];var o=void 0;return e[t]&&(o=e[t][i]),o&&s.indexOf(o)>-1?o:s[0]}}var a=n(892);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.split(":"),n=t[0];switch(n){case"addedAt":case"episode.addedAt":return a.a;case"duration":return s.a;case"lastViewedAt":return o.a;case"originallyAvailableAt":return l.a;
case"rating":return r.a;case"userRating":return c.a}}var a=n(1942),r=n(843),s=n(844),o=n(848),l=n(852),c=n(519);t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"CALENDAR",function(){return i}),n.d(t,"AGENDA",function(){return a}),n.d(t,"all",function(){return r});var i="calendar",a="agenda",r=[i,a]},function(e,t,n){"use strict";function i(e){return e.map(function(e){return e.model.type})}function a(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.a)(e,t,a);
}))}function r(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.a)(e,t,a)}))}function s(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.e)(e,t,a)}))}function o(e,t,i){return y.a.some(i.map(function(i){var a=i.model;return n.i(S.f)(e,t,a)}))}function l(e,t,i){return y.a.some(i.map(function(i){var a=i.model;return n.i(S.g)(e,t,a)}))}function c(e,t,a){var r=i(a);return!(y.a.uniq(r).length>1)&&y.a.every(a.map(function(i){var a=i.model;return n.i(S.b)(e,t,a)}));
}function u(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.h)(e,t,a)}))}function d(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.i)(e,t,a)}))}function h(e,t,n){if(!c(e,t,n))return!1;var a=i(n);return 1!==a.length&&(!(y.a.uniq(a).length>1)&&y.a.every(a,function(e){return I.indexOf(e)!==-1}))}function p(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.j)(e,t,a)}))}function f(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.k)(e,t,a);
}))}function g(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.l)(e,t,a)}))}function m(e,t,i,a){var r=M[a];n.i(b.a)(y.a.isArray(r),"getMultiSelectActionProps: Invalid type, "+a+", provided");var s=r.reduce(function(r,s){var o=w[s];return n.i(b.a)(y.a.isFunction(o),"getMultiSelectActionProps: Invalid action, "+s+", for "+a),r[s]=o(e,t,i),r},{});return s}var v=n(2),y=n.n(v),b=n(33),S=n(233);t.a=m;var w={showPlaySelected:a,showShuffle:r,showAddToPlaylist:s,showMarkWatched:o,showMarkUnwatched:l,
showEdit:c,showRefresh:u,showAnalyze:d,showMerge:h,showSync:p,showOptimize:f,showDelete:g},M={video:["showPlaySelected","showShuffle","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showMerge","showSync","showOptimize","showDelete"],audio:["showPlaySelected","showShuffle","showAddToPlaylist","showEdit","showRefresh","showAnalyze","showMerge","showSync","showOptimize","showDelete"],photo:["showPlaySelected","showShuffle","showAddToPlaylist","showEdit","showAnalyze","showSync","showOptimize","showDelete"]
},I=["movie","season","artist","album"]},function(e,t,n){"use strict";function i(e,t){if(!e||null==t)return!1;if(e===r&&a.hasOwnProperty(t))return a[t];e!==r&&(r=e,a={});var n=e.indexOf(t)!==-1;return a[t]=n,n}t.a=i;var a={},r=void 0},function(e,t){e.exports={defaultColor:"#fff",quietColor:"#a8a8a8",inverseColor:"#222",primaryColor:"#cc7b19",selectedColor:"#f9be03",successColor:"#6b5",dangerColor:"#f53",warningColor:"#f0ad4e",appBackgroundColor:"#3f4245",defaultLinkColor:"rgba(255, 255, 255, 0.7)",
defaultLinkHoverColor:"#fff",defaultLinkDisabledLinkColor:"rgba(255, 255, 255, 0.3)",defaultBackgroundColor:"rgba(255, 255, 255, 0.25)",defaultHoverBackgroundColor:"rgba(255, 255, 255, 0.3)",defaultActiveBackgroundColor:"rgba(255, 255, 255, 0.2)",defaultDisabledBackgroundColor:"rgba(255, 255, 255, 0.15)",primaryBackgroundColor:"#cc7b19",primaryHoverBackgroundColor:"color(#cc7b19 lightness(+5%))",primaryActiveBackgroundColor:"color(#cc7b19 blackness(+10%))",primaryDisabledBackgroundColor:"color(#cc7b19 blackness(+30%))",
quietBackgroundColor:"rgba(255, 255, 255, 0.08)",quietHoverBackgroundColor:"rgba(255, 255, 255, 0.1)",quietActiveBackgroundColor:"rgba(255, 255, 255, 0.06)",successBackgroundColor:"#3d7832",successHoverBackgroundColor:"color(#3d7832 lightness(+5%))",successActiveBackgroundColor:"color(#3d7832 blackness(+10%))",successDisabledBackgroundColor:"color(#3d7832 blackness(+30%))",dangerBackgroundColor:"#b32",dangerHoverBackgroundColor:"color(#b32 lightness(+5%))",dangerActiveBackgroundColor:"color(#b32 blackness(+10%))",
dangerDisabledBackgroundColor:"color(#b32 blackness(+30%))",headerColor:"rgba(255, 255, 255, 0.3)",dimColor:"rgba(255, 255, 255, 0.45)",shadowColor:"rgba(0, 0, 0, 0.35)",errorBackgroundColor:"rgba(255, 85, 51, 0.3)",inputBackgroundColor:"rgba(255, 255, 255, 0.25)",inputFocusBackgroundColor:"#eee",inputColor:"#eee",inputFocusColor:"#555",inputDisabledOpacity:"0.5",stripeListAlternateBackgroundColor:"rgba(255, 255, 255, 0.02)",stripeListHoverBackgroundColor:"rgba(255, 255, 255, 0.06)",stripeListSelectedBackgroundColor:"rgba(0, 0, 0, 0.15)",
dragPreviewBackgroundColor:"rgba(76, 76, 76, 0.7)",dragPreviewOpacity:"0.9",searchInputBackgroundColor:"rgba(255, 255, 255, 0.25)",searchBackgroundColor:"#3a3a3a",searchFocusBackgroundColor:"#eee",searchInputColor:"#eee",searchInputFocusColor:"#555",searchImagePlaceholderBackgroundColor:"rgba(255, 255, 255, 0.15)",searchImagePlaceholderColor:"rgba(0, 0, 0, 0.45)",searchHoverResultBackgroundColor:"rgba(0, 0, 0, 0.15)",searchSelectedResultBackgroundColor:"rgba(0, 0, 0, 0.30)",searchResultTitleColor:"rgba(255, 255, 255, 0.75)",
searchResultTitleSelectedColor:"rgba(255, 255, 255, 1)",searchResultSecondaryTitleColor:"rgba(255, 255, 255, 0.3)",searchResultShadowColor:"rgba(0, 0, 0, 0.3)",scrollbarBackgroundColor:"rgba(255, 255, 255, 0.2)",scrollbarHoverBackgroundColor:"rgba(255, 255, 255, 0.3)",scrollbarInactiveBackgroundColor:"rgba(255, 255, 255, 0.05)",menuBackgroundColor:"#333",menuItemHoverBackgroundColor:"rgba(0, 0, 0, 0.15)",menuItemActiveBackgroundColor:"rgba(0, 0, 0, 0.3)",menuSeparatorBackgroundColor:"rgba(200, 200, 200, 0.15)",
modalBackdropBackgroundColor:"rgba(102, 102, 102, 0.6)",modalBackgroundColor:"#2d2d2d",sliderTrackBackgroundColor:"rgba(255, 255, 255, 0.2)",sliderThumbBackgroundColor:"#ddd",sliderThumbHoverBackgroundColor:"#fff",avatarBackgroundColor:"#999",tooltipBackgroundColor:"#333",badgeBackgroundColor:"rgba(100, 100, 100, 0.15)",defaultBadgeColor:"rgba(255, 255, 255, 0.7)",sidebarBackgroundColor:"rgba(0, 0, 0, 0.15)",sidebarMenuButtonBackgroundColor:"rgba(0, 0, 0, 0.3)",sidebarMenuButtonHoverBackgroundColor:"rgba(0, 0, 0, 0.5)",
sidebarMenuButtonActiveBackgroundColor:"rgba(0, 0, 0, 0.75)",detailsBackgroundColor:"rgba(0, 0, 0, 0.15)",detailsShadowColor:"#000",playerPlaceholderColor:"rgba(0, 0, 0, 0.3)",playerOverlayColor:"rgba(0, 0, 0, 0.8)",playerSecondaryOverlayColor:"rgba(0, 0, 0, 0.4)",playerPanelColor:"rgba(0, 0, 0, 0.6)",posterBackgroundColor:"#333",posterHoverBackgroundColor:"linear-gradient(to bottom, rgba(34, 34, 34, 0), rgba(34, 34, 34, 0.6), #222)",posterSelectedBackgroundColor:"rgba(34, 34, 34, 0.6)",posterBlendedSelectedBackgroundColor:"#282828",
posterPlaceholderIconColor:"rgba(0, 0, 0, 0.45)",posterCenterCircleBackgroundColor:"rgba(0, 0, 0, 0.45)",posterBadgeShadowColor:"rgba(0, 0, 0, 0.6)",posterProgressTrackBackgroundColor:"rgba(0, 0, 0, 0.75)",posterVersionBadgeColor:"#556688",recordColor:"#f53",recordBackgroundColor:"#b32",recordActiveBackgroundColor:"color(#b32 blackness(+10%))",dayOfWeekBackgroundColor:"rgba(255, 255, 255, 0.1)",dayOfWeekColor:"rgba(255, 255, 255, 0.75)",todayBackgroundColor:"rgba(255, 255, 255, 0.3)",todayColor:"rgba(255, 255, 255, 0.1)",
calendarEventSuccessBackgroundColor:"rgba(0, 102, 153, 0.15)",calendarEventSuccessAlternateBackgroundColor:"rgba(31, 120, 165, 0.17)",calendarEventSuccessHoverBackgroundColor:"rgba(76, 148, 183, 0.20)",calendarEventErrorBackgroundColor:"rgba(187, 51, 34, 0.3)",calendarEventErrorAlternateBackgroundColor:"rgba(191, 64, 48, 0.31)",calendarEventErrorHoverBackgroundColor:"rgba(199, 87, 73, 0.34)",recordingIconColor:"#ff5533",playColor:"rgba(255, 255, 255, 0.75)"}},function(e,t){e.exports={defaultFontFamily:'"Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif',
boldFontFamily:'"Open Sans Bold", "Helvetica Neue", Helvetica, Arial, sans-serif',smallFontSize:"12px",defaultFontSize:"13px",defaultIconFontSize:"14px",largeFontSize:"15px",lineHeightComputed:"1.71428571"}},function(e,t,n){e.exports={default:n(2219),__esModule:!0}},function(e,t,n){e.exports={default:n(2220),__esModule:!0}},function(e,t,n){e.exports={default:n(2221),__esModule:!0}},function(e,t,n){e.exports={default:n(2222),__esModule:!0}},function(e,t,n){e.exports={default:n(2224),__esModule:!0};
},function(e,t,n){e.exports={default:n(2226),__esModule:!0}},function(e,t,n){e.exports={default:n(2227),__esModule:!0}},function(e,t,n){e.exports={default:n(2229),__esModule:!0}},function(e,t,n){var i=n(99),a=i.JSON||(i.JSON={stringify:JSON.stringify});e.exports=function(e){return a.stringify.apply(a,arguments)}},function(e,t,n){n(2251),e.exports=n(99).Number.isInteger},function(e,t,n){n(2252),e.exports=parseFloat},function(e,t,n){n(2253),e.exports=parseInt},function(e,t,n){n(2254),e.exports=n(99).Object.assign;
},function(e,t,n){n(2255);var i=n(99).Object;e.exports=function(e,t){return i.create(e,t)}},function(e,t,n){n(2256),e.exports=n(99).Object.getPrototypeOf},function(e,t,n){n(2257),e.exports=n(99).Object.keys},function(e,t,n){n(2258),e.exports=n(99).Object.setPrototypeOf},function(e,t,n){n(914),e.exports=n(99).Symbol.for},function(e,t,n){n(914),n(2259),n(2261),n(2262),e.exports=n(99).Symbol},function(e,t,n){n(2260),n(2263),e.exports=n(560).f("iterator")},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");
return e}},function(e,t){e.exports=function(){}},function(e,t,n){var i=n(206),a=n(2249),r=n(2248);e.exports=function(e){return function(t,n,s){var o,l=i(t),c=a(l.length),u=r(s,c);if(e&&n!=n){for(;c>u;)if(o=l[u++],o!=o)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var i=n(238),a=n(552),r=n(379);e.exports=function(e){var t=i(e),n=a.f;if(n)for(var s,o=n(e),l=r.f,c=0;o.length>c;)l.call(e,s=o[c++])&&t.push(s);return t}},function(e,t,n){e.exports=n(121).document&&document.documentElement;
},function(e,t,n){var i=n(901);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var i=n(236),a=Math.floor;e.exports=function(e){return!i(e)&&isFinite(e)&&a(e)===e}},function(e,t,n){"use strict";var i=n(551),a=n(380),r=n(553),s={};n(235)(s,n(239)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=i(s,{next:a(1,n)}),r(e,t+" Iterator")}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var i=n(238),a=n(206);e.exports=function(e,t){
for(var n,r=a(e),s=i(r),o=s.length,l=0;o>l;)if(r[n=s[l++]]===t)return n}},function(e,t,n){var i=n(382)("meta"),a=n(236),r=n(205),s=n(237).f,o=0,l=Object.isExtensible||function(){return!0},c=!n(204)(function(){return l(Object.preventExtensions({}))}),u=function(e){s(e,i,{value:{i:"O"+ ++o,w:{}}})},d=function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!r(e,i)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[i].i},h=function(e,t){if(!r(e,i)){if(!l(e))return!0;if(!t)return!1;
u(e)}return e[i].w},p=function(e){return c&&f.NEED&&l(e)&&!r(e,i)&&u(e),e},f=e.exports={KEY:i,NEED:!1,fastKey:d,getWeak:h,onFreeze:p}},function(e,t,n){"use strict";var i=n(238),a=n(552),r=n(379),s=n(381),o=n(905),l=Object.assign;e.exports=!l||n(204)(function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=i})?function(e,t){for(var n=s(e),l=arguments.length,c=1,u=a.f,d=r.f;l>c;)for(var h,p=o(arguments[c++]),f=u?i(p).concat(u(p)):i(p),g=f.length,m=0;g>m;)d.call(p,h=f[m++])&&(n[h]=p[h]);
return n}:l},function(e,t,n){var i=n(237),a=n(303),r=n(238);e.exports=n(234)?Object.defineProperties:function(e,t){a(e);for(var n,s=r(t),o=s.length,l=0;o>l;)i.f(e,n=s[l++],t[n]);return e}},function(e,t,n){var i=n(206),a=n(908).f,r={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return a(e)}catch(e){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==r.call(e)?o(e):a(i(e))}},function(e,t,n){var i=n(121).parseFloat,a=n(913).trim;
e.exports=1/i(n(556)+"-0")!==-(1/0)?function(e){var t=a(String(e),3),n=i(t);return 0===n&&"-"==t.charAt(0)?-0:n}:i},function(e,t,n){var i=n(121).parseInt,a=n(913).trim,r=n(556),s=/^[\-+]?0[xX]/;e.exports=8!==i(r+"08")||22!==i(r+"0x16")?function(e,t){var n=a(String(e),3);return i(n,t>>>0||(s.test(n)?16:10))}:i},function(e,t,n){var i=n(236),a=n(303),r=function(e,t){if(a(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){
try{i=n(902)(Function.call,n(907).f(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return r(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:r}},function(e,t,n){var i=n(557),a=n(378);e.exports=function(e){return function(t,n){var r,s,o=String(a(t)),l=i(n),c=o.length;return l<0||l>=c?e?"":void 0:(r=o.charCodeAt(l),r<55296||r>56319||l+1===c||(s=o.charCodeAt(l+1))<56320||s>57343?e?o.charAt(l):r:e?o.slice(l,l+2):(r-55296<<10)+(s-56320)+65536);
}}},function(e,t,n){var i=n(557),a=Math.max,r=Math.min;e.exports=function(e,t){return e=i(e),e<0?a(e+t,0):r(e,t)}},function(e,t,n){var i=n(557),a=Math.min;e.exports=function(e){return e>0?a(i(e),9007199254740991):0}},function(e,t,n){"use strict";var i=n(2231),a=n(2238),r=n(549),s=n(206);e.exports=n(906)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,a(1)):"keys"==t?a(0,n):"values"==t?a(0,e[n]):a(0,[n,e[n]]);
},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var i=n(120);i(i.S,"Number",{isInteger:n(2236)})},function(e,t,n){var i=n(120),a=n(2244);i(i.S+i.F*(Number.parseFloat!=a),"Number",{parseFloat:a})},function(e,t,n){var i=n(120),a=n(2245);i(i.S+i.F*(Number.parseInt!=a),"Number",{parseInt:a})},function(e,t,n){var i=n(120);i(i.S+i.F,"Object",{assign:n(2241)})},function(e,t,n){var i=n(120);i(i.S,"Object",{create:n(551)})},function(e,t,n){var i=n(381),a=n(909);n(911)("getPrototypeOf",function(){
return function(e){return a(i(e))}})},function(e,t,n){var i=n(381),a=n(238);n(911)("keys",function(){return function(e){return a(i(e))}})},function(e,t,n){var i=n(120);i(i.S,"Object",{setPrototypeOf:n(2246).set})},function(e,t){},function(e,t,n){"use strict";var i=n(2247)(!0);n(906)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){n(559)("asyncIterator");
},function(e,t,n){n(559)("observable")},function(e,t,n){n(2250);for(var i=n(121),a=n(235),r=n(549),s=n(239)("toStringTag"),o=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],l=0;l<5;l++){var c=o[l],u=i[c],d=u&&u.prototype;d&&!d[s]&&a(d,s,c),r[c]=r.Array}},,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var i=function(e){return e&&e.__esModule?e:{default:e}},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};t.__esModule=!0;var r=n(569),s=i(r),o=function(){
function e(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];a(this,e),Array.isArray(n[0])&&1===n.length&&(n=n[0]);for(var r=0;r<n.length;r++)if(!s.default(n[r]))throw new Error("Expected a disposable");this.disposables=n,this.isDisposed=!1}return e.prototype.add=function(e){this.isDisposed?e.dispose():this.disposables.push(e)},e.prototype.remove=function(e){if(this.isDisposed)return!1;var t=this.disposables.indexOf(e);return t!==-1&&(this.disposables.splice(t,1),e.dispose(),!0);
},e.prototype.dispose=function(){if(!this.isDisposed){for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.isDisposed=!0,this.disposables=[],this.length=0;for(var n=0;n<e;n++)t[n].dispose()}},e}();t.default=o,e.exports=t.default},function(e,t,n){"use strict";var i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,
"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();t.__esModule=!0;var r=function(){},s=function(){function e(t){i(this,e),this.isDisposed=!1,this.action=t||r}return e.prototype.dispose=function(){this.isDisposed||(this.action.call(null),this.isDisposed=!0)},a(e,null,[{key:"empty",enumerable:!0,value:{dispose:r}}]),e}();t.default=s,e.exports=t.default},function(e,t,n){"use strict";var i=function(e){return e&&e.__esModule?e:{
default:e}},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};t.__esModule=!0;var r=n(569),s=i(r),o=function(){function e(){a(this,e),this.isDisposed=!1,this.current=null}return e.prototype.getDisposable=function(){return this.current},e.prototype.setDisposable=function(){var e=void 0===arguments[0]?null:arguments[0];if(null!=e&&!s.default(e))throw new Error("Expected either an empty value or a valid disposable");var t=this.isDisposed,n=void 0;t||(n=this.current,
this.current=e),n&&n.dispose(),t&&e&&e.dispose()},e.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=null,e&&e.dispose()}},e}();t.default=o,e.exports=t.default},function(e,t,n){"use strict";var i=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var a=n(569),r=i(a);t.isDisposable=r.default;var s=n(2287),o=i(s);t.Disposable=o.default;var l=n(2286),c=i(l);t.CompositeDisposable=c.default;var u=n(2288),d=i(u);t.SerialDisposable=d.default;
},function(e,t,n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var s=n(610),o=a(s),l=n(2297),c=a(l),u=n(388),d=i(u),h=n(2291),p=a(h),f=n(924),g=(a(f),function(){function e(t){r(this,e);var n=o.default(c.default);this.store=n,
this.monitor=new p.default(n),this.registry=this.monitor.registry,this.backend=t(this),n.subscribe(this.handleRefCountChange.bind(this))}return e.prototype.handleRefCountChange=function(){var e=this.store.getState().refCount>0;e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1)},e.prototype.getMonitor=function(){return this.monitor},e.prototype.getBackend=function(){return this.backend},e.prototype.getRegistry=function(){return this.registry;
},e.prototype.getActions=function(){function e(e){return function(){var i=e.apply(t,arguments);"undefined"!=typeof i&&n(i)}}var t=this,n=this.store.dispatch;return Object.keys(d).filter(function(e){return"function"==typeof d[e]}).reduce(function(t,n){return t[n]=e(d[n]),t},{})},e}());t.default=g,e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;
var r=n(87),s=i(r),o=n(927),l=i(o),c=n(306),u=i(c),d=n(924),h=i(d),p=n(926),f=n(925),g=function(){function e(t){a(this,e),this.store=t,this.registry=new h.default(t)}return e.prototype.subscribeToStateChange=function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=n.handlerIds;s.default("function"==typeof e,"listener must be a function."),s.default("undefined"==typeof i||u.default(i),"handlerIds, when specified, must be an array of strings.");var a=this.store.getState().stateId,r=function(){
var n=t.store.getState(),r=n.stateId;try{var s=r===a||r===a+1&&!f.areDirty(n.dirtyHandlerIds,i);s||e()}finally{a=r}};return this.store.subscribe(r)},e.prototype.subscribeToOffsetChange=function(e){var t=this;s.default("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset,i=function(){var i=t.store.getState().dragOffset;i!==n&&(n=i,e())};return this.store.subscribe(i)},e.prototype.canDragSource=function(e){var t=this.registry.getSource(e);return s.default(t,"Expected to find a valid source."),
!this.isDragging()&&t.canDrag(this,e)},e.prototype.canDropOnTarget=function(e){var t=this.registry.getTarget(e);if(s.default(t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var n=this.registry.getTargetType(e),i=this.getItemType();return l.default(n,i)&&t.canDrop(this,e)},e.prototype.isDragging=function(){return Boolean(this.getItemType())},e.prototype.isDraggingSource=function(e){var t=this.registry.getSource(e,!0);if(s.default(t,"Expected to find a valid source."),
!this.isDragging()||!this.isSourcePublic())return!1;var n=this.registry.getSourceType(e),i=this.getItemType();return n===i&&t.isDragging(this,e)},e.prototype.isOverTarget=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.shallow,i=void 0!==n&&n;if(!this.isDragging())return!1;var a=this.registry.getTargetType(e),r=this.getItemType();if(!l.default(a,r))return!1;var s=this.getTargetIds();if(!s.length)return!1;var o=s.indexOf(e);return i?o===s.length-1:o>-1},e.prototype.getItemType=function(){
return this.store.getState().dragOperation.itemType},e.prototype.getItem=function(){return this.store.getState().dragOperation.item},e.prototype.getSourceId=function(){return this.store.getState().dragOperation.sourceId},e.prototype.getTargetIds=function(){return this.store.getState().dragOperation.targetIds},e.prototype.getDropResult=function(){return this.store.getState().dragOperation.dropResult},e.prototype.didDrop=function(){return this.store.getState().dragOperation.didDrop},e.prototype.isSourcePublic=function(){
return this.store.getState().dragOperation.isSourcePublic},e.prototype.getInitialClientOffset=function(){return this.store.getState().dragOffset.initialClientOffset},e.prototype.getInitialSourceClientOffset=function(){return this.store.getState().dragOffset.initialSourceClientOffset},e.prototype.getClientOffset=function(){return this.store.getState().dragOffset.clientOffset},e.prototype.getSourceClientOffset=function(){return p.getSourceClientOffset(this.store.getState().dragOffset)},e.prototype.getDifferenceFromInitialOffset=function(){
return p.getDifferenceFromInitialOffset(this.store.getState().dragOffset)},e}();t.default=g,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var a=function(){function e(){i(this,e)}return e.prototype.canDrag=function(){return!0},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},e.prototype.endDrag=function(){},e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";
function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var a=function(){function e(){i(this,e)}return e.prototype.canDrop=function(){return!0},e.prototype.hover=function(){},e.prototype.drop=function(){},e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){return new l(e)}
t.__esModule=!0,t.default=r;var s=n(934),o=i(s),l=function(){function e(t){a(this,e),this.actions=t.getActions()}return e.prototype.setup=function(){this.didCallSetup=!0},e.prototype.teardown=function(){this.didCallTeardown=!0},e.prototype.connectDragSource=function(){return o.default},e.prototype.connectDragPreview=function(){return o.default},e.prototype.connectDropTarget=function(){return o.default},e.prototype.simulateBeginDrag=function(e,t){this.actions.beginDrag(e,t)},e.prototype.simulatePublishDragSource=function(){
this.actions.publishDragSource()},e.prototype.simulateHover=function(e,t){this.actions.hover(e,t)},e.prototype.simulateDrop=function(){this.actions.drop()},e.prototype.simulateEndDrag=function(){this.actions.endDrag()},e}();e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var a=n(2290);t.DragDropManager=i(a);var r=n(2292);t.DragSource=i(r);var s=n(2293);t.DropTarget=i(s);var o=n(2294);t.createTestBackend=i(o)},function(e,t,n){"use strict";
function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){switch(void 0===e&&(e=u),t.type){case s.BEGIN_DRAG:return r({},e,{itemType:t.itemType,item:t.item,sourceId:t.sourceId,isSourcePublic:t.isSourcePublic,dropResult:null,didDrop:!1});case s.PUBLISH_DRAG_SOURCE:return r({},e,{isSourcePublic:!0});case s.HOVER:return r({},e,{targetIds:t.targetIds});case o.REMOVE_TARGET:return e.targetIds.indexOf(t.targetId)===-1?e:r({},e,{targetIds:c.default(e.targetIds,t.targetId)});case s.DROP:return r({},e,{
dropResult:t.dropResult,didDrop:!0,targetIds:[]});case s.END_DRAG:return r({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.default=a;var s=n(388),o=n(389),l=n(2358),c=i(l),u={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,
didDrop:!1,isSourcePublic:null};e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(926),r=i(a),s=n(2296),o=i(s),l=n(2298),c=i(l),u=n(925),d=i(u),h=n(2299),p=i(h);t.default=function(e,t){return void 0===e&&(e={}),{dirtyHandlerIds:d.default(e.dirtyHandlerIds,t,e.dragOperation),dragOffset:r.default(e.dragOffset,t),refCount:c.default(e.refCount,t),dragOperation:o.default(e.dragOperation,t),stateId:p.default(e.stateId)}},e.exports=t.default;
},function(e,t,n){"use strict";function i(e,t){switch(void 0===e&&(e=0),t.type){case a.ADD_SOURCE:case a.ADD_TARGET:return e+1;case a.REMOVE_SOURCE:case a.REMOVE_TARGET:return e-1;default:return e}}t.__esModule=!0,t.default=i;var a=n(389);e.exports=t.default},function(e,t,n){"use strict";function i(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0];return e+1}t.__esModule=!0,t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){return a++}t.__esModule=!0,t.default=i;
var a=0;e.exports=t.default},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}var a=n(2326),r=n(2327),s=n(2328),o=n(2329),l=n(2330);i.prototype.clear=a,i.prototype.delete=r,i.prototype.get=s,i.prototype.has=o,i.prototype.set=l,e.exports=i},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}var a=n(2334),r=n(2335),s=n(2336),o=n(2337),l=n(2338);i.prototype.clear=a,i.prototype.delete=r,
i.prototype.get=s,i.prototype.has=o,i.prototype.set=l,e.exports=i},function(e,t,n){var i=n(392),a=n(394),r=i(a,"Map");e.exports=r},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}var a=n(2339),r=n(2340),s=n(2341),o=n(2342),l=n(2343);i.prototype.clear=a,i.prototype.delete=r,i.prototype.get=s,i.prototype.has=o,i.prototype.set=l,e.exports=i},function(e,t,n){var i=n(392),a=n(394),r=i(a,"Set");e.exports=r},function(e,t){function n(e,t,n){
switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}e.exports=n},function(e,t){function n(e,t){for(var n=-1,i=null==e?0:e.length,a=0,r=[];++n<i;){var s=e[n];t(s,n,e)&&(r[a++]=s)}return r}e.exports=n},function(e,t){function n(e,t){for(var n=-1,i=t.length,a=e.length;++n<i;)e[a+n]=t[n];return e}e.exports=n},function(e,t){function n(e,t,n,i){for(var a=e.length,r=n+(i?1:-1);i?r--:++r<a;)if(t(e[r],r,e))return r;
return-1}e.exports=n},function(e,t,n){function i(e,t,n,s,o){var l=-1,c=e.length;for(n||(n=r),o||(o=[]);++l<c;){var u=e[l];t>0&&n(u)?t>1?i(u,t-1,n,s,o):a(o,u):s||(o[o.length]=u)}return o}var a=n(2308),r=n(2331);e.exports=i},function(e,t,n){function i(e,t,n){return t===t?s(e,t,n):a(e,r,n)}var a=n(2309),r=n(2314),s=n(2350);e.exports=i},function(e,t,n){function i(e,t,n){for(var i=n?s:r,d=e[0].length,h=e.length,p=h,f=Array(h),g=1/0,m=[];p--;){var v=e[p];p&&t&&(v=o(v,l(t))),g=u(v.length,g),f[p]=!n&&(t||d>=120&&v.length>=120)?new a(p&&v):void 0;
}v=e[0];var y=-1,b=f[0];e:for(;++y<d&&m.length<g;){var S=v[y],w=t?t(S):S;if(S=n||0!==S?S:0,!(b?c(b,w):i(m,w,n))){for(p=h;--p;){var M=f[p];if(!(M?c(M,w):i(e[p],w,n)))continue e}b&&b.push(w),m.push(S)}}return m}var a=n(570),r=n(572),s=n(573),o=n(574),l=n(930),c=n(576),u=Math.min;e.exports=i},function(e,t,n){function i(e){return r(e)&&a(e)==s}var a=n(929),r=n(579),s="[object Arguments]";e.exports=i},function(e,t){function n(e){return e!==e}e.exports=n},function(e,t,n){function i(e){if(!s(e)||r(e))return!1;
var t=a(e)?f:c;return t.test(o(e))}var a=n(933),r=n(2333),s=n(578),o=n(2351),l=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,h=u.toString,p=d.hasOwnProperty,f=RegExp("^"+h.call(p).replace(l,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=i},function(e,t,n){var i=n(2352),a=n(2322),r=n(932),s=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:r;e.exports=s},function(e,t,n){
function i(e,t,n){var i=-1,d=r,h=e.length,p=!0,f=[],g=f;if(n)p=!1,d=s;else if(h>=u){var m=t?null:l(e);if(m)return c(m);p=!1,d=o,g=new a}else g=t?[]:f;e:for(;++i<h;){var v=e[i],y=t?t(v):v;if(v=n||0!==v?v:0,p&&y===y){for(var b=g.length;b--;)if(g[b]===y)continue e;t&&g.push(y),f.push(v)}else d(g,y,n)||(g!==f&&g.push(y),f.push(v))}return f}var a=n(570),r=n(572),s=n(573),o=n(576),l=n(2321),c=n(931),u=200;e.exports=i},function(e,t,n){function i(e,t,n){var i=e.length;if(i<2)return i?s(e[0]):[];for(var o=-1,l=Array(i);++o<i;)for(var c=e[o],u=-1;++u<i;)u!=o&&(l[o]=a(l[o]||c,e[u],t,n));
return s(r(l,1),t,n)}var a=n(928),r=n(2310),s=n(2317);e.exports=i},function(e,t,n){function i(e){return a(e)?e:[]}var a=n(577);e.exports=i},function(e,t,n){var i=n(394),a=i["__core-js_shared__"];e.exports=a},function(e,t,n){var i=n(2305),a=n(934),r=n(931),s=1/0,o=i&&1/r(new i([,-0]))[1]==s?function(e){return new i(e)}:a;e.exports=o},function(e,t,n){var i=n(392),a=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=a},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;
e.exports=n}).call(t,n(144))},function(e,t,n){function i(e){var t=s.call(e,l),n=e[l];try{e[l]=void 0;var i=!0}catch(e){}var a=o.call(e);return i&&(t?e[l]=n:delete e[l]),a}var a=n(571),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,l=a?a.toStringTag:void 0;e.exports=i},function(e,t){function n(e,t){return null==e?void 0:e[t]}e.exports=n},function(e,t,n){function i(){this.__data__=a?a(null):{},this.size=0}var a=n(393);e.exports=i},function(e,t){function n(e){var t=this.has(e)&&delete this.__data__[e];
return this.size-=t?1:0,t}e.exports=n},function(e,t,n){function i(e){var t=this.__data__;if(a){var n=t[e];return n===r?void 0:n}return o.call(t,e)?t[e]:void 0}var a=n(393),r="__lodash_hash_undefined__",s=Object.prototype,o=s.hasOwnProperty;e.exports=i},function(e,t,n){function i(e){var t=this.__data__;return a?void 0!==t[e]:s.call(t,e)}var a=n(393),r=Object.prototype,s=r.hasOwnProperty;e.exports=i},function(e,t,n){function i(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=a&&void 0===t?r:t,
this}var a=n(393),r="__lodash_hash_undefined__";e.exports=i},function(e,t,n){function i(e){return s(e)||r(e)||!!(o&&e&&e[o])}var a=n(571),r=n(2355),s=n(306),o=a?a.isConcatSpreadable:void 0;e.exports=i},function(e,t){function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=n},function(e,t,n){function i(e){return!!r&&r in e}var a=n(2320),r=function(){var e=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();
e.exports=i},function(e,t){function n(){this.__data__=[],this.size=0}e.exports=n},function(e,t,n){function i(e){var t=this.__data__,n=a(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():s.call(t,n,1),--this.size,!0}var a=n(390),r=Array.prototype,s=r.splice;e.exports=i},function(e,t,n){function i(e){var t=this.__data__,n=a(t,e);return n<0?void 0:t[n][1]}var a=n(390);e.exports=i},function(e,t,n){function i(e){return a(this.__data__,e)>-1}var a=n(390);e.exports=i},function(e,t,n){function i(e,t){
var n=this.__data__,i=a(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}var a=n(390);e.exports=i},function(e,t,n){function i(){this.size=0,this.__data__={hash:new a,map:new(s||r),string:new a}}var a=n(2301),r=n(2302),s=n(2303);e.exports=i},function(e,t,n){function i(e){var t=a(this,e).delete(e);return this.size-=t?1:0,t}var a=n(391);e.exports=i},function(e,t,n){function i(e){return a(this,e).get(e)}var a=n(391);e.exports=i},function(e,t,n){function i(e){return a(this,e).has(e)}var a=n(391);
e.exports=i},function(e,t,n){function i(e,t){var n=a(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}var a=n(391);e.exports=i},function(e,t){function n(e){return a.call(e)}var i=Object.prototype,a=i.toString;e.exports=n},function(e,t,n){function i(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=r(i.length-t,0),l=Array(o);++s<o;)l[s]=i[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=i[s];return c[t]=n(l),a(e,this,c)}}var a=n(2306),r=Math.max;e.exports=i;
},function(e,t){function n(e){return this.__data__.set(e,i),this}var i="__lodash_hash_undefined__";e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t,n){var i=n(2316),a=n(2349),r=a(i);e.exports=r},function(e,t){function n(e){var t=0,n=0;return function(){var s=r(),o=a-(s-n);if(n=s,o>0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,a=16,r=Date.now;e.exports=n},function(e,t){function n(e,t,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===t)return i;
return-1}e.exports=n},function(e,t){function n(e){if(null!=e){try{return a.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var i=Function.prototype,a=i.toString;e.exports=n},function(e,t){function n(e){return function(){return e}}e.exports=n},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t,n){var i=n(574),a=n(2312),r=n(575),s=n(2319),o=r(function(e){var t=i(e,s);return t.length&&t[0]===e[0]?a(t):[]});e.exports=o},function(e,t,n){var i=n(2313),a=n(579),r=Object.prototype,s=r.hasOwnProperty,o=r.propertyIsEnumerable,l=i(function(){
return arguments}())?i:function(e){return a(e)&&s.call(e,"callee")&&!o.call(e,"callee")};e.exports=l},function(e,t,n){function i(e){return null!=e&&r(e.length)&&!a(e)}var a=n(933),r=n(2357);e.exports=i},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=9007199254740991;e.exports=n},function(e,t,n){var i=n(928),a=n(575),r=n(577),s=a(function(e,t){return r(e)?i(e,t):[]});e.exports=s},function(e,t,n){var i=n(2307),a=n(575),r=n(2318),s=n(577),o=a(function(e){return r(i(e,s));
});e.exports=o},function(e,t,n){"use strict";var i=n(581),a=n(943).default,r=n(582).default,s=n(583),o=n(2903),l=function(){var e=new i.HandlebarsEnvironment;return s.extend(e,i),e.SafeString=a,e.Exception=r,e.Utils=s,e.VM=o,e.template=function(t){return o.template(t,e)},e},c=l();c.create=l,t.default=c,e.exports=c},function(e,t){function n(e){for(var t=e.length,n=new Array(t),i=0;i<t;i++)n[i]=e.charCodeAt(i);return n}function i(e){for(var t="",n=0;n<e.length;n++)t+=SHA256_hexchars[e[n]>>4]+SHA256_hexchars[15&e[n]];
return t}function a(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}function r(){SHA256_H=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),SHA256_buf=new Array,SHA256_len=0}function s(e){"string"==typeof e?SHA256_buf=SHA256_buf.concat(n(e)):SHA256_buf=SHA256_buf.concat(e);for(var t=0;t+64<=SHA256_buf.length;t+=64)b(SHA256_H,SHA256_buf.slice(t,t+64));SHA256_buf=SHA256_buf.slice(t),SHA256_len+=e.length}function o(){if(SHA256_buf[SHA256_buf.length]=128,
SHA256_buf.length>56){for(var e=SHA256_buf.length;e<64;e++)SHA256_buf[e]=0;b(SHA256_H,SHA256_buf),SHA256_buf.length=0}for(var e=SHA256_buf.length;e<59;e++)SHA256_buf[e]=0;SHA256_buf[59]=SHA256_len>>>29&255,SHA256_buf[60]=SHA256_len>>>21&255,SHA256_buf[61]=SHA256_len>>>13&255,SHA256_buf[62]=SHA256_len>>>5&255,SHA256_buf[63]=SHA256_len<<3&255,b(SHA256_H,SHA256_buf);for(var t=new Array(32),e=0;e<8;e++)t[4*e+0]=SHA256_H[e]>>>24,t[4*e+1]=SHA256_H[e]>>16&255,t[4*e+2]=SHA256_H[e]>>8&255,t[4*e+3]=255&SHA256_H[e];
return delete SHA256_H,delete SHA256_buf,delete SHA256_len,t}function l(e){var t;return r(),s(e),t=o(),i(t)}function c(e){"string"==typeof e?HMAC_SHA256_key=n(e):HMAC_SHA256_key=(new Array).concat(e),HMAC_SHA256_key.length>64&&(r(),s(HMAC_SHA256_key),HMAC_SHA256_key=o());for(var t=HMAC_SHA256_key.length;t<64;t++)HMAC_SHA256_key[t]=0;for(var t=0;t<64;t++)HMAC_SHA256_key[t]^=54;r(),s(HMAC_SHA256_key)}function u(e){s(e)}function d(){for(var e=o(),t=0;t<64;t++)HMAC_SHA256_key[t]^=106;r(),s(HMAC_SHA256_key),
s(e);for(var t=0;t<64;t++)HMAC_SHA256_key[t]=0;return delete HMAC_SHA256_key,o()}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function p(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function g(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function m(e,t,n){return n^e&(t^n)}function v(e,t,n){return e&t^n&(e^t)}function y(e,t){for(var n=16;n<64;n++)t[n]=p(t[n-2])+t[n-7]+h(t[n-15])+t[n-16]&4294967295;for(var i=(new Array).concat(e),n=0;n<64;n++){
var a=i[7]+g(i[4])+m(i[4],i[5],i[6])+SHA256_K[n]+t[n],r=f(i[0])+v(i[0],i[1],i[2]);i.pop(),i.unshift(a+r&4294967295),i[4]=i[4]+a&4294967295}for(var n=0;n<8;n++)e[n]=e[n]+i[n]&4294967295}function b(e,t){for(var n=new Array(16),i=0;i<16;i++)n[i]=t[4*i+0]<<24|t[4*i+1]<<16|t[4*i+2]<<8|t[4*i+3];y(e,n)}SHA256_hexchars=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"),SHA256_K=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),
t.array_to_string=a,t.SHA256_hash=l,t.HMAC_SHA256_init=c,t.HMAC_SHA256_write=u,t.HMAC_SHA256_finalize=d},function(e,t){!function(){"use strict";var e={};!function(){function t(){i||console.log.apply(console,arguments);for(var e=Math.round(Date.now()-r),t=[],n=0;n<arguments.length;n++){var a=""+arguments[n];"[obj"!=a.slice(0,4)&&t.push(a)}var s=e+": "+t.join(", "),o=document.getElementById("console");o&&(o.value+=s+"\n"),i&&console.log(s)}function n(e){e<=a&&t.apply(null,arguments)}var i=!!(window.console&&window.console.log&&window.console.log.call),a=0,r=(new Date).getTime();
e.dlog=n,e.log=t,e.DLOG_LEVEL=a}(),function(){var t={SMOOTH_STREAMING:"smoothstreaming",DASH:"dash"};e.StreamingType=t}(),function(){var t=function(e){this.ttml_=e,this.frameRate_=30};t.prototype.xmlDecode_=function(e){return e.replace(/&apos;/g,"'").replace(/&quot;/g,'"').replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")},t.prototype.parseChildElements_=function(e,t,n){var i=[];if(null==n)return i;for(var a=n.firstElementChild;null!=a;a=a.nextElementSibling)a.nodeName==e&&i.push(t.call(this,a));
return i},t.prototype.parseAttributes_=function(e,t){var n={};for(var i in e)null!=t.attributes.getNamedItem(i)&&(n[i]=e[i](t.attributes[i].value));return n},t.prototype.parseTime_=function(e){var t=e.split(":"),n=3600*parseFloat(t[0])+60*parseFloat(t[1])+parseFloat(t[2])+parseFloat(t[3])/this.frameRate_;return n},t.prototype.parseTextTrack_=function(e){var t=this.xmlDecode_(e.replace(/[\r\n]+/g,"").replace(/ {2,}/g," ").replace(/<[^>]+>/g,"").replace(/<br\s*\/>/g,"\n"));return t.trim()},t.prototype.parse_cue_=function(e){
var t=this.parseAttributes_({begin:this.parseTime_.bind(this),end:this.parseTime_.bind(this)},e);return t&&(t.caption=this.parseTextTrack_(e.textContent),t.start=t.begin,delete t.begin),t},t.prototype.parse_div_=function(e){return this.parseChildElements_("p",this.parse_cue_,e)},t.prototype.parse_body_=function(e){var t=this.parseChildElements_("div",this.parse_div_,e);return t[0]},t.prototype.parse_ttml_=function(e){var t=this.parseChildElements_("body",this.parse_body_,e);return t[0]},t.prototype.parse=function(){
for(var e=new DOMParser,t=e.parseFromString(this.ttml_,"text/xml"),n=0;n<t.childNodes.length;n++)if("tt"===t.childNodes[n].nodeName)return this.parse_ttml_(t.childNodes[n])},e.Ttml=t}(),function(){var t=0,n=1,i=function(e){if(null==e)throw new Error("A url for the close captions location is required");this._url=e,this._callback=null,this._ccInfo=null};i.prototype.ccType=function(){return t},i.prototype.requestCC=function(){var e=new XMLHttpRequest;e.addEventListener("load",this.onCCLoad.bind(this)),
e.addEventListener("error",this.onCCError.bind(this)),e.open("GET",this._url),e.send()},i.prototype.load=function(t){if(null==t)throw new Error("A callback is required");this._callback=t,this.requestCC(),e.dlog(1,"Sent request to get the close captions info")},i.prototype.getCCInfo=function(){return this._ccInfo},i.prototype.onCCError=function(t){var n="Error geting captions from "+this._url;return e.log(n),this._callback(n)},i.prototype.onCCLoad=function(i){e.dlog(2,"Close Captions Info received");
var a=null;if(200!==i.target.status||i.target.status>299)return a="HTTP error "+i.target.status+" retrieving close captions from "+this._url,e.log(a),this._callback(a);switch(this.ccType()){case t:this._ccInfo=new e.Ttml(i.target.responseText).parse();break;case n:throw new Error("VTT parsing not implemented yet")}return null===this._ccInfo?(a="Error parsing the close captions info",e.log(a),this._callback(a)):this._callback(a,this._ccInfo)},e.CloseCaptionsLoader=i}(),function(){function t(e){return e;
}function n(e){var t=/PT(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?/,n=t.exec(e);return n?3600*parseFloat(n[2]||0)+60*parseFloat(n[4]||0)+parseFloat(n[6]||0):parseFloat(e)}function i(e,t,n){var i=[];if(null==n)return i;for(var a=n.firstElementChild;null!=a;a=a.nextElementSibling)a.nodeName==e&&i.push(t(a));return i}function a(e,t,n){return i(e,t,n)[0]||null}function r(e,t,n){n=n||{};for(var i in e)null!=t.attributes.getNamedItem(i)&&(n[i]=e[i](t.attributes[i].value));return n}function s(e){var t=/([0-9]+)(\/([0-9]+))?/.exec(e);
return t?t[3]?parseFloat(t[1])/(parseFloat(t[3])||1):parseFloat(t[1]):1}function o(e){var t=/([0-9]+)-([0-9]+)/.exec(e);if(!t)return null;var n=parseInt(t[1]),i=parseInt(t[2]);return{start:n,end:i,length:i-n+1}}function l(e){return r(w,e)}function c(e){return e.textContent}function u(e){return o(e.attributes.range.value)}function d(e){var t=r(M,e);return t.initialization=a("Initialization",u,e),t}function h(e){return r(I,e)}function p(e){var t=d(e);return t.timescale&&t.duration?t.durationSeconds=t.duration/t.timescale:t.durationSeconds=t.duration,
t.segmentURLs=i("SegmentURL",l,e),t}function f(e){var t=r(D,e);return t.baseURLs=i("BaseURL",c,e),t.segmentBase=a("SegmentBase",d,e),t.segmentList=a("SegmentList",p,e),t.contentProtection=a("ContentProtection",C,e),t}function g(e){var t=f(e);return r(T,e,t),t}function m(e){var t=f(e);t.representations=i("Representation",g,e),t.segmentTemplate=a("SegmentTemplate",h,e);for(var n=0;n<t.representations.length;n++)t.representations[n].segmentTemplate=t.segmentTemplate;return t}function v(e){var t=f(e);
return r(x,e,t),t.adaptationSets=i("AdaptationSet",m,e),t}function y(e){var t={};return r({mediaPresentationDuration:n},e,t),t.periods=i("Period",v,e),t.baseURLs=i("BaseURL",c,e),t}function b(e,t){e.manifestURL=t,e.duration=e.mediaPresentationDuration,delete e.mediaPresentationDuration,e.adaptationSets=e.periods[0].adaptationSets,delete e.periods;for(var n=0;n<e.adaptationSets.length;n++)e.adaptationSets[n].mimeType?(e.adaptationSets[n].mime=e.adaptationSets[n].mimeType,delete e.adaptationSets[n].mimeType):e.adaptationSets[n].mime=e.adaptationSets[n].representations[0].mimeType,
e.adaptationSets[n].codecs||(e.adaptationSets[n].codecs=e.adaptationSets[n].representations[0].codecs);return e}function S(e,t){var n=new DOMParser,i=n.parseFromString(e,"text/xml");return b(y(i.firstChild),t)}var w={media:t,mediaRange:o,index:t,indexRange:o},M={timescale:parseInt,duration:parseInt,indexRange:o,presentationTimeOffset:parseInt,startNumber:parseInt},I={timescale:parseInt,duration:parseInt,initialization:t,media:t,startNumber:parseInt},C=function(e){var t=e.attributes.schemeIdUri;if(!t||"http://youtube.com/drm/2012/10/10"!=t.textContent)return null;
for(var n={},i=e.firstElementChild;null!=i;i=i.nextElementSibling)if("yt:SystemURL"==i.nodeName){var a=i.attributes.type.textContent;n[a]=i.textContent}return n},D={id:t,profiles:t,width:parseInt,height:parseInt,frameRate:s,audioSamplingRate:parseInt,mimeType:t,codecs:t},T={bandwidth:parseInt,qualityRanking:parseInt},x={id:parseInt,start:n,duration:n};e.parseDASHManifest=S}(),function(){function t(e){for(var t=new DataView(e),n=0;n<e.byteLength;){var i=t.getUint32(n+4,!1);if(1936286840==i||1836019558==i)break;
n+=t.getUint32(n,!1)}return new Uint8Array(e.slice(0,n))}function n(e,t){for(var n=new DataView(e),i=0;1936286840!=n.getUint32(i+4,!1);)if(i+=n.getUint32(i,!1),i>=e.byteLength)throw"Could not find sidx";var a=n.getUint32(i,!1)+i;if(a>e.byteLength)throw"sidx terminates after array buffer";var r=n.getUint8(i+8);i+=12;var s=n.getUint32(i+4,!1);i+=8;var o,l;0==r?(o=n.getUint32(i,!1),l=n.getUint32(i+4,!1),i+=8):(o=(n.getUint32(i,!1)<<32)+n.getUint32(i+4,!1),l=(n.getUint32(i+8,!1)<<32)+n.getUint32(i+12,!1),
i+=16),l+=a+(t||0);var c=n.getUint16(i+2,!1);i+=4;for(var u=l,d=o,h=[],p=0;p<c;p++){var f=n.getUint32(i,!1),g=2147483648&f;if(g)throw"Unhandled indirect reference";f&=2147483647;var m=n.getUint32(i+4,!1);i+=12,h.push({size:f,offset:u,duration:m/s,time:d/s}),u+=f,d+=m}if(i!=a)throw"Error: final pos "+i+" differs from SIDX end "+a;return h}window.ArrayBuffer&&!window.ArrayBuffer.prototype.slice&&(window.ArrayBuffer.prototype.slice=function(e,t){var n=new Uint8Array(this);null==t&&(t=n.length);for(var i=new ArrayBuffer(t-e),a=new Uint8Array(i),r=0;r<a.length;r++)a[r]=n[r+e];
return i}),e.extractInit=t,e.parseSIDX=n}(),function(){function t(e){return e}function n(e){for(var t=new ArrayBuffer(e.length/2),n=new Uint8Array(t),i=0;i<e.length;i+=2)n[i/2]=parseInt(e.substr(i,2),16);return n}function i(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t}function a(e){return n(e.replace(/[{}-]/g,""))}function r(e,t,n){var i=[];if(null==n)return i;for(var a=n.firstElementChild;null!=a;a=a.nextElementSibling)a.nodeName==e&&i.push(t(a));return i}function s(e,t,n){
n=n||{};for(var i in e)null!=t.attributes.getNamedItem(i)&&(n[i]=e[i](t.attributes[i].value));return n}function o(t){var n={},a=t.split("00000001");return 3!==a.length?(t||(e.log("Warning, Audio codec private data is not specified."),t="1210"),n=i(t)):(n.SPS=i(a[1]),n.PPS=i(a[2])),n}function l(t){return"AACL"==t?"mp4a.40.2":"H264"==t||"AVC1"==t?"avc1.4d40":(e.log("Warning, unsupported FourCC encountered: "+t),"")}function c(e){var t={};return s({Bitrate:parseInt},e,t),s({CodecPrivateData:o},e,t),
s({MaxWidth:parseInt},e,t),s({MaxHeight:parseInt},e,t),s({FourCC:l},e,t),t}function u(e){var t={};return s({Bitrate:parseInt},e,t),s({CodecPrivateData:o},e,t),s({SamplingRate:parseInt},e,t),s({Channels:parseInt},e,t),s({BitsPerSample:parseInt},e,t),s({PacketSize:parseInt},e,t),s({FourCC:l},e,t),t}function d(e){var t=[];if(null==e)return t;for(var n=-1,i=e.firstElementChild;null!=i;i=i.nextElementSibling)if("c"==i.nodeName){var a={};if(n==-1&&(n=null!=i.attributes.getNamedItem("t")?parseInt(i.attributes.t.value):0),
a.time=n/1e7,a.timeURL=n,null==i.attributes.getNamedItem("d"))throw"Expected attribute 'd' not found";var r=parseInt(i.attributes.d.value);a.duration=r/1e7,a.durationURL=r,n+=r,t.push(a)}return t}function h(e){var n={};return s({Type:t},e,n),s({Url:t},e,n),"video"===n.Type?n.QualityLevels=r("QualityLevel",c,e):"audio"==n.Type&&(n.QualityLevels=r("QualityLevel",u,e)),n.Fragments=d(e),n}function p(e,t){for(var n=[],i=[],a=!1,r=!1,s=e.length-1;s>=0&&(r||"video"!==e[s].Type||(i.push(s),r=!0),a||"audio"!==e[s].Type||(i.push(s),
a=!0),!r||!a);s--);for(var s=0;s<e.length;s++)if(i.indexOf(s)!==-1){var o={};switch(o.contentProtection=null,e[s].Type){case"audio":o.mime="audio/mp4";break;case"video":o.mime="video/mp4"}if(e[s].QualityLevels){o.representations=[];for(var l=0;l<e[s].QualityLevels.length;l++){var c={};switch(c.bandwidth=e[s].QualityLevels[l].Bitrate,c.baseURLs=[],c.baseURLs[0]=e[s].Url,c.segmentBase=null,c.segs=e[s].Fragments,e[s].Type){case"audio":c.codecs=e[s].QualityLevels[l].FourCC,c.audio_codec_private_data=e[s].QualityLevels[l].CodecPrivateData,
c.audio_sample_rate=e[s].QualityLevels[l].SamplingRate;break;case"video":c.codecs=e[s].QualityLevels[l].FourCC+e[s].QualityLevels[l].CodecPrivateData.SPS[3].toString(16).toLowerCase(),c.sps=e[s].QualityLevels[l].CodecPrivateData.SPS,c.pps=e[s].QualityLevels[l].CodecPrivateData.PPS,c.width=e[s].QualityLevels[l].MaxWidth,c.height=e[s].QualityLevels[l].MaxHeight}o.representations.push(c)}o.codecs=o.representations[0].codecs}t&&(o.contentProtection=t),n.push(o)}return n}function f(e){for(var t=atob(e.trim()),n=new ArrayBuffer(t.length),i=new Uint8Array(n),a=0;a<t.length;a++)i[a]=t.charCodeAt(a);
return{ab:n,u8:i}}function g(e){for(var t=0,n=[],i=[],a=new Uint16Array(e),r=e.byteLength/2;t<r&&(0===n.length||0===i.length);){for(;t<r&&60!==a[t];)t++;if(75===a[t+1]&&73===a[t+2]&&68===a[t+3]&&62===a[t+4])for(t+=5;t<r&&60!==a[t];)n.push(a[t]),t++;else if(76===a[t+1]&&65===a[t+2]&&95===a[t+3]&&85===a[t+4]&&82===a[t+5]&&76===a[t+6]&&62===a[t+7])for(t+=8;t<r&&60!==a[t];)i.push(a[t]),t++;else t++}return{kid:String.fromCharCode.apply(null,n),url:String.fromCharCode.apply(null,i)}}function m(e){var t={};
s({SystemID:a},e,t);var n=f(e.textContent),i=g(n.ab);return t.KID=f(i.kid).u8,t.url=i.url,t.PrHeader=n.u8,t}function v(e){var t={};return t.ProtectionHeader=r("ProtectionHeader",m,e)[0],t}function y(e){var t={};s({TimeScale:parseInt},e,t),t.TimeScale||(t.TimeScale=1e7),s({Duration:parseInt},e,t),t.StreamIndexes=r("StreamIndex",h,e);var n=r("Protection",v,e);n&&n[0]&&(t.Protection=n[0]),t.duration=t.Duration/t.TimeScale;var i;return t.Protection&&(i={},t.Protection.ProtectionHeader.url?i.playready=t.Protection.ProtectionHeader.url:i.playready="http://playready.directtaps.net/pr/svc/rightsmanager.asmx"),
t.adaptationSets=p(t.StreamIndexes,i),t.Protection&&(t.pr={},t.pr.systemId=t.Protection.ProtectionHeader.SystemID,t.pr.prHeader=t.Protection.ProtectionHeader.PrHeader,t.pr.ivsize=8,t.pr.kid=t.Protection.ProtectionHeader.KID),t}function b(t,n){return t.manifestURL=n,t.type=e.StreamingType.SMOOTH_STREAMING,t}function S(e,t){for(var n,i=new DOMParser,a=i.parseFromString(e,"text/xml"),r=0;r<a.childNodes.length;r++)if("SmoothStreamingMedia"===a.childNodes[r].nodeName){n=a.childNodes[r];break}return b(y(n),t);
}e.parseSSManifest=S}(),function(){function t(e,t,n){e.setUint32(t,n)}function n(e,t,n){for(var i=0;i<4;i++)e.setUint8(t+4+i,n.charCodeAt(i));return 8}function i(e,t,n,i,a){return n.set(a,i),i+a.length}function a(e,i,a,r,s,o){var l=r;return r+=n(i,r,s),o&&(r=o(e,i,a,r)),t(i,l,r-l),r}function r(e,t,n,r,s,o){return a(e,t,n,r,s,function(e,t,n,a){return i(e,t,n,a,o)})}function s(e,t,n,i){return r(e,t,n,i,"smhd",[0,0,0,0,0,0,0,0])}function o(e,t,n,i){return r(e,t,n,i,"vmhd",[0,0,0,1,0,0,0,0,0,0,0,0])}
function l(e,t,n,r){return a(e,t,n,r,"esds",function(e,t,n,a){var r=e.audio_codec_private_data[0],s=e.audio_codec_private_data[1];return a=i(e,t,n,a,[0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,r,s,6,1,2])})}function c(e,t,n,r){return a(e,t,n,r,"avcC",function(e,t,n,a){return a=i(e,t,n,a,[1,77,64,30,255,225]),t.setUint16(a,e.sps.length),a+=2,a=i(e,t,n,a,e.sps),t.setUint8(a,1),a+=1,t.setUint16(a,e.pps.length),a+=2,a=i(e,t,n,a,e.pps)})}function u(e,t,n){for(var i=n-t+1,a=0,r=t;r<t+i/2;r++)a=e[r],
e[r]=e[n-r+t],e[n-r+t]=a}function d(e){var t=new ArrayBuffer(e.length),n=new Uint8Array(t);return n.set(e),u(n,0,3),u(n,4,5),u(n,6,7),n}function h(e,t,n,r){return a(e,t,n,r,"tenc",function(e,t,n,a){a=i(e,t,n,a,[0,0,0,0,0,0,1]),t.setUint8(a,e.pr.ivsize),a++;var r=d(e.pr.kid);return a=i(e,t,n,a,r)})}function p(e,t,n,i){return a(e,t,n,i,"schi",function(e,t,n,i){return i=h(e,t,n,i)})}function f(e,t,n,i){return r(e,t,n,i,"schm",[0,0,0,0,99,101,110,99,0,1,0,0])}function g(e,t,n,i){return"audio/mp4"!==e.mime?r(e,t,n,i,"frma",[97,118,99,49]):r(e,t,n,i,"frma",[109,112,52,97]);
}function m(e,t,n,i){return a(e,t,n,i,"sinf",function(e,t,n,i){return i=g(e,t,n,i),i=f(e,t,n,i),i=p(e,t,n,i)})}function v(e,t,n,r,s){return a(e,t,n,r,s,function(e,t,n,a){var r=e.audio_sample_rate>>8&255,o=255&e.audio_sample_rate;return a=i(e,t,n,a,[0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,r,o,0,0]),a=l(e,t,n,a),"enca"===s&&(a=m(e,t,n,a)),a})}function y(e,t,n,r,s){return a(e,t,n,r,s,function(e,t,n,a){return a=i(e,t,n,a,[0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t.setUint16(a,e.width),
a+=2,t.setUint16(a,e.height),a+=2,a=i(e,t,n,a,[0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]),a=c(e,t,n,a),"encv"===s&&(a=m(e,t,n,a)),a})}function b(e,t,n,r){return a(e,t,n,r,"stsd",function(e,t,n,a){return a=i(e,t,n,a,[0,0,0,0,0,0,0,1]),"audio/mp4"!==e.mime?(e.pr&&(a=y(e,t,n,a,"encv")),a=y(e,t,n,a,"avc1")):(e.pr&&(a=v(e,t,n,a,"enca")),a=v(e,t,n,a,"mp4a")),a})}function S(e,t,n,r){return a(e,t,n,r,"stbl",function(e,t,n,a){return a=b(e,t,n,a),
a="audio/mp4"!==e.mime?i(e,t,n,a,[0,0,0,16,115,116,116,115,0,0,0,0,0,0,0,0,0,0,0,16,115,116,115,99,0,0,0,0,0,0,0,0,0,0,0,16,115,116,99,111,0,0,0,0,0,0,0,0,0,0,0,20,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,115,116,115,115,0,0,0,0,0,0,0,0]):i(e,t,n,a,[0,0,0,16,115,116,116,115,0,0,0,0,0,0,0,0,0,0,0,16,115,116,115,99,0,0,0,0,0,0,0,0,0,0,0,16,115,116,99,111,0,0,0,0,0,0,0,0,0,0,0,20,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,0])})}function w(e,t,n,i){return r(e,t,n,i,"url ",[0,0,0,1])}function M(e,t,n,r){
return a(e,t,n,r,"dref",function(e,t,n,a){return a=i(e,t,n,a,[0,0,0,0,0,0,0,1]),a=w(e,t,n,a)})}function I(e,t,n,i){return a(e,t,n,i,"dinf",function(e,t,n,i){return i=M(e,t,n,i)})}function C(e,t,n,i){return a(e,t,n,i,"minf",function(e,t,n,i){return i=I(e,t,n,i),i=S(e,t,n,i),i="audio/mp4"!==e.mime?o(e,t,n,i):s(e,t,n,i)})}function D(e,t,n,i){return"audio/mp4"!==e.mime?r(e,t,n,i,"hdlr",[0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]):r(e,t,n,i,"hdlr",[0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);
}function T(e,t,n,i){return r(e,t,n,i,"mdhd",[0,0,0,0,204,96,118,241,204,96,118,241,0,152,150,128,0,0,0,0,85,196,0,0])}function x(e,t,n,i){return a(e,t,n,i,"mdia",function(e,t,n,i){return i=T(e,t,n,i),i=D(e,t,n,i),i=C(e,t,n,i)})}function P(e,t,n,r){return a(e,t,n,r,"tkhd",function(e,t,n,a){return a=i(e,t,n,a,[0,0,0,3,204,96,118,241,204,96,118,241,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0]),t.setUint32(a,e.width),
a+=4,t.setUint32(a,e.height),a+=4,t.setUint16(a,0),a+=2})}function E(e,t,n,i){return a(e,t,n,i,"trak",function(e,t,n,i){return i=P(e,t,n,i),i=x(e,t,n,i)})}function A(e,t,n,i){return r(e,t,n,i,"trex",[0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])}function L(e,t,n,i){return a(e,t,n,i,"mvex",function(e,t,n,i){return i=A(e,t,n,i)})}function k(e,t,n,r){return a(e,t,n,r,"pssh",function(e,t,n,a){return a=i(e,t,n,a,[0,0,0,0]),a=i(e,t,n,a,e.pr.systemId),t.setUint32(a,e.pr.prHeader.length),a+=4,a=i(e,t,n,a,e.pr.prHeader);
})}function N(e,t,n,i){return r(e,t,n,i,"mvhd",[0,0,0,0,204,96,118,241,204,96,118,241,0,152,150,128,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2])}function _(e,t,n,i){return a(e,t,n,i,"moov",function(e,t,n,i){return i=N(e,t,n,i),e.pr&&(i=k(e,t,n,i)),i=L(e,t,n,i),i=E(e,t,n,i)})}function O(e){var t=new ArrayBuffer(2e4),n=new DataView(t),i=new Uint8Array(t),a=0,r=0;a=_(e,n,i,a),
r=a-1;var s={};return s.data=t.slice(0,a),s.init={},s.init.start=0,s.init.end=r,s}function R(e,t,n){for(var i=0,a=t,r=0;r<4;r++)i<<=8,i+=n.charCodeAt(r);for(;e.getUint32(a+4,!1)!=i;)if(a+=e.getUint32(a),a>=e.byteLength)throw"Could not find box: "+n;return a}function j(e,t){var n=R(e,t,"traf");n=R(e,n+8,"tfhd"),e.setUint32(n+12,1)}function z(e,t,n,i){var a=R(e,t,n),r=e.getUint32(a);return e.setUint32(a,r+i),a}function U(e,t,n){var i=0;if(i=z(e,i,"moof",t),i=z(e,i+8,"traf",t),i=R(e,i+8,"trun"),1&e.getUint32(i+8)){
var a=i+16;e.setUint32(a,n)}return i}function F(e,t,n){var i=0;if(i=z(e,i,"moof",t),i=z(e,i+8,"traf",t),i=R(e,i+8,"trun"),1&e.getUint32(i+8)){var a=i+16,r=e.getUint32(a);e.setUint32(a,r+n)}return i}function B(e,t){var n=[0,0,0,20,116,102,100,116,1,0,0,0],i=n.length+8,a=new ArrayBuffer(e.byteLength+i),r=(new Uint8Array(e),new DataView(e)),s=new Uint8Array(a),o=new DataView(a),l=0;return j(r,8),l=F(r,i,i),s.set(new Uint8Array(e,0,l)),s.set(n,l),o.setUint32(l+12,t/4294967295&4294967295),o.setUint32(l+16,4294967295&t),
s.set(new Uint8Array(e,l,e.byteLength-l),l+i),a}function V(e,t,n,i,a){if(!a)return new Uint8Array(0);for(var r=new Uint8Array(n),s=0,o=0,l=t,c=0;c<n;c++)s=e.getUint16(l+i),o=i+2+6*s,r[c]=o,l+=o;return r}function H(e,t,n,r,s,o){return a(e,t,n,r,"mdat",function(e,t,n,a){return a=i(e,t,n,a,s),a=i(e,t,n,a,o)})}function W(e,t,n,r){return a(e,t,n,r,"saio",function(e,t,n,a){a=i(e,t,n,a,[0,0,0,0,0,0,0,1]);var r=a+4+8;return t.setUint32(a,r),a+=4})}function Q(e,t,n,r,s,o,l,c){return a(e,t,n,r,"saiz",function(e,t,n,a){
return a=l?i(e,t,n,a,[0,0,0,0,0]):i(e,t,n,a,[0,0,0,0,c]),t.setUint32(a,s),a+=4,n.set(o,a),a+=o.length})}function Y(e){var t=new DataView(e),n=0,i=0,a=0,r=t.getUint32(n);n=R(t,n+8,"traf"),n=R(t,n+8,"trun"),i=t.getUint32(n+12),n=R(t,n,"uuid");var s=t.getUint8(n+27),o=!1;if(2!==s&&0!==s)throw"uuid flags expected is 0x02 or 0x00 but found: "+s;2===s&&(o=!0);var l=t.getUint32(n+28);if(i!==l)throw"Samples count does not match "+i+" "+l;var c=t.getUint32(n);a=c-32;var u=200,d=new ArrayBuffer(e.byteLength+u),h=new Uint8Array(d),p=new DataView(d);
h.set(new Uint8Array(e,0,n));var f=n,g=8,m=n+32,v=n+c,y=t.getUint32(v),b=V(t,m,i,g,o);if(f=Q(null,p,h,f,i,b,o,g),f=W(null,p,h,f),o){for(var S=0,w=0;w<b.length;w++)S+=b[w];if(S!==a)throw"Samples size does not match "+S+" "+a}else if(g*i!==a)throw"Samples size does not match "+g*i+" "+a;var M=new Uint8Array(e,m,a),I=new Uint8Array(e,v+8,y-8),C=f-r,D=f;return f=H(null,p,h,f,M,I),U(p,C,D+8+a),new Uint8Array(d,0,f)}function G(e,t,n){var i=B(e,t);return n?Y(i):new Uint8Array(i)}e.abtohex=function(e){for(var t=[],n=0;n<e.byteLength;n++)t.push(e[n].toString(16));
return t},e.abtob64=function(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e)))},e.createSSInit=O,e.process_traf=G}(),function(){function t(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function n(e){return String.fromCharCode.apply(String,e)}var i=function(e){this.video=e,!e.generateKeyRequest&&e.webkitGenerateKeyRequest&&(e.generateKeyRequest=e.webkitGenerateKeyRequest),!e.addKey&&e.webkitAddKey&&(e.addKey=e.webkitAddKey),this.initDataQueue=[],
this.flavor=null,this.keySystem=null,this.licenseServerURL=null,this.mediaEvents_={},e.generateKeyRequest&&e.addKey&&(this.addMediaEventListener("needkey",this.onNeedKey),this.addMediaEventListener("keymessage",this.onKeyMessage),this.addMediaEventListener("keyerror",this.onKeyError),this.addMediaEventListener("webkitneedkey",this.onNeedKey),this.addMediaEventListener("webkitkeymessage",this.onKeyMessage),this.addMediaEventListener("webkitkeyerror",this.onKeyError))};i.kMime='video/mp4; codecs="avc1.640028"',
i.kFlavorToSystem={clearkey:["webkit-org.w3.clearkey","org.w3.clearkey"],widevine:["com.widevine.alpha"],playready:["com.youtube.playready","com.microsoft.playready"]},i.prototype.init=function(e,t,n){this.chooseFlavor(i.kMime,e,t),this.isClearKey="clearkey"==this.flavor},i.prototype.destroy=function(){this.removeAllMediaEventListeners(),this.video=null},i.prototype.addMediaEventListener=function(e,t){var n=t.bind(this);this.video.addEventListener(e,n),this.mediaEvents_[e]=n},i.prototype.removeMediaEventListener=function(e){
this.video.removeEventListener(e,this.mediaEvents_[e]),this.mediaEvents_[e]=null},i.prototype.removeAllMediaEventListeners=function(){for(var e in this.mediaEvents_)e&&this.removeMediaEventListener(e)},i.prototype.chooseFlavor=function(e,t,n){for(var a in t)if(!n||a==n){var r=i.kFlavorToSystem[a];if(r)for(var s in r)if(this.video.canPlayType(e,r[s]))return this.flavor=a,this.keySystem=r[s],void(this.licenseServerURL=t[a])}throw"Could not find a compatible key system"},i.prototype.extractBMFFClearKeyID=function(e){
var t=new ArrayBuffer(e.length),n=new Uint8Array(t);n.set(e);for(var i=new DataView(t),a=0;a<t.byteLength;){var r=i.getUint32(a,!1),s=i.getUint32(a+4,!1);if(1886614376!=s)throw"Box type "+s.toString(16)+' not equal to "pssh"';if(1477738184==i.getUint32(a+12,!1)&&69420633==i.getUint32(a+16,!1)&&2464609580==i.getUint32(a+20,!1)&&1558758348==i.getUint32(a+24,!1)){var o=i.getUint32(a+28,!1);if(16!=o)throw"Unexpected KID size "+o;return new Uint8Array(t.slice(a+32,a+32+o))}if(3991899049==i.getUint32(a+12,!1)&&2044086990==i.getUint32(a+16,!1)&&2747803612==i.getUint32(a+20,!1)&&3575456237==i.getUint32(a+24,!1))return new Uint8Array(t.slice(a+36,a+52));
a+=r}return e},i.prototype.onNeedKey=function(t){if(e.dlog(2,"onNeedKey()"),!this.keySystem)throw"Not initialized! Bad manifest parse?";if(16==t.initData.length)return void e.log("Dropping non-BMFF needKey event");var n=t.initData;this.isClearKey&&(n=this.extractBMFFClearKeyID(t.initData)),this.video.generateKeyRequest(this.keySystem,n),this.initDataQueue.push(n)},i.prototype.onKeyMessage=function(t){e.dlog(2,"onKeyMessage() Sending request: "+this.licenseServerURL+" "+t.sessionId);var n=this.initDataQueue.shift(),i=new XMLHttpRequest;
i.open("POST",this.licenseServerURL),i.setRequestHeader("content-type","text/xml;charset=utf-8"),i.addEventListener("load",this.onLoad.bind(this,n,t.sessionId)),i.responseType="arraybuffer",i.send(t.message)},i.prototype.onKeyError=function(t){e.dlog(2,"onKeyError("+t.keySystem+", "+t.errorCode.code+", "+t.systemCode+")")},i.prototype.onLoad=function(i,a,r){if(e.dlog(2,"onLoad("+this.licenseServerURL+"): "+a),r.target.status<200||r.target.status>299)throw"Bad XHR status: "+r.target.statusText;var s=n(new Uint8Array(r.target.response)).split("\r\n").pop();
this.video.addKey(this.keySystem,t(s),i,a)},e.EMEManager=i}(),function(){var t=function(e,t,n,i,a,r,s){this.url=e,this.bandwidth=t,this.width=n,this.height=i,this.sps=a,this.pps=r,this.codecs=s,this.initFragment=null,this.initRequestData=null,this.indexRequestData=null,this.isInitialized=!1,this.segs=null};e.Representation=t}(),function(){var t={ENOUGH:20},n=function(e,t,n,i,a,r){if(this.sourceBuffer_=t,this.sourceBuffer_.appendBuffer)this.appendBuffer_=this.sourceBuffer_.appendBuffer,this.sourceBuffer_.addEventListener("updateend",this.onUpdateEnd.bind(this));else{
if(!this.sourceBuffer_.append)throw new Error("Unknown SourceBuffer interface");this.appendBuffer_=this.sourceBuffer_.append}this.representations_=n,this.currentRep=0,this.segIndex=null,this.mime=i,this.resetReason=null,this.active=!0,this.type=a,this.pr_=r,this.seekingStartTime=null,this.mediaSrc_=e,this.bitrates=[];for(var s=0;s<this.representations_.length;s++)this.bitrates.push(this.representations_[s].bandwidth);this.deferredAppends_=[],this.segmentQueue=[],this.segmentSize=0,this.segmentLastEndTime=0,
this.waitingForBuffer=!1,this.segmentTimeout=null};n.prototype.destroy=function(){delete this.mediaSrc_},n.prototype.getCurrentTime=function(){var e=window.googledash.player,t=e&&e.getMediaElement();return t?t.currentTime:0},n.prototype.updateBuffer=function(){var t=this.sourceBuffer_.buffered;if(t.length>0){var n=t.end(t.length-1)-this.segmentLastEndTime;e.dlog(3,"["+this.mime+"] Play head: "+this.getCurrentTime()+" Segment size: "+(this.segmentSize/1024/1024).toFixed(2)+" MB Segment duration: "+n),
this.segmentQueue.push({size:this.segmentSize,duration:n,offset:this.segmentLastEndTime})}},n.prototype.reset=function(t){e.dlog(1,"SourceBuffer["+this.mime+"] reset: "+t),this.segIndex=null,this.representations_[this.currentRep].isInitialized=!1,this.resetReason=t||null,this.active=!0,this.segmentQueue=[],this.segmentSize=0,this.segmentLastEndTime=0,this.waitingForBuffer=!1,null!=this.segmentTimeout&&clearTimeout(this.segmentTimeout),"open"==this.mediaSrc_.readyState&&this.sourceBuffer_.abort()},
n.prototype.isInitialized=function(){return this.representations_[this.currentRep].isInitialized},n.prototype.initialize=function(){this.representations_[this.currentRep].isInitialized=!0},n.prototype.updating=function(){return this.sourceBuffer_.updating},n.prototype.onUpdateEnd=function(t){this.updateBuffer(),this.deferredAppends_.length>0&&(e.dlog(2,"SourceBuffer["+this.mime+"] appended deferred data"),this.append(this.deferredAppends_.pop()))},n.prototype.append=function(t){var n=this.sourceBuffer_.buffered;
if(this.segmentSize=t.length,this.segmentLastEndTime=0,n.length>0&&(this.segmentLastEndTime=n.end(n.length-1)),this.sourceBuffer_.updating){if(this.deferredAppends_.length<5)return e.dlog(2,"SourceBuffer["+this.mime+"] deferring append"),void this.deferredAppends_.push(t);e.log("SourceBuffer["+this.mime+"] too many deferrals, aborting"),this.deferredAppends_=[],this.appendBuffer_.abort()}this.appendBuffer_.call(this.sourceBuffer_,t),"appendBuffer"in this.sourceBuffer_||this.updateBuffer()},n.prototype.getCurrentRep=function(){
return this.representations_[this.currentRep]},n.prototype.changeQuality=function(t){if(t===this.currentRep)return!1;e.dlog(2,"Bandwitdth change sourceBuffer["+this.mime+"]: "+this.active),e.dlog(2,"bandwidthChange["+this.mime+"]: "+this.currentRep+" "+t);var n,i=this.representations_[this.currentRep].bandwidth,a=this.representations_[t].bandwidth;e.dlog(2,"bandwidthChange["+this.mime+"]: "+i+" "+a),n=i>a?"rep_down":"rep_up",this.reset(n),this.currentRep=t},n.prototype.getRangesString=function(){
for(var e=this.sourceBuffer_.buffered,t="Ranges["+this.mime+"]:",n=0;n<e.length;n++)t+=" ["+e.start(n)+","+e.end(n)+"]";return t},n.prototype.findRangeForPlaybackTime=function(e){for(var t=this.sourceBuffer_.buffered,n=0;n<t.length;n++)if(t.start(n)<=e&&t.end(n)>=e)return{start:t.start(n),end:t.end(n)};return null},n.prototype.getBufferSize=function(t){e.dlog(4,"Time: "+t+" Ranges in onProgress: "+this.getRangesString());var n=this.findRangeForPlaybackTime(t),i=n&&n.end||0;if(null!==this.segIndex){
var a=this.representations_[this.currentRep].segs[this.segIndex].time;i=a>i?a:i}if(n){var r=Math.abs(n.end-i);r>.001&&e.dlog(2,"Difference in available data: "+n.end+" "+i)}return i-t},n.prototype.findSegmentIndexForTime=function(t){for(var n=this.representations_[this.currentRep].segs,i=0;i<n.length;i++){var a=n[i];if(a.time<=t&&a.time+a.duration>=t)return i==n.length-1&&a.time+a.duration+.5<t?null:i}return e.dlog(5,"Could not find segment for time "+t),null},n.prototype.identifyNextFragment=function(n){
var i=this.findRangeForPlaybackTime(n),a=i&&i.end||n;if(a>n+t.ENOUGH)return e.dlog(3,"Enough buffering currentTime in rage: "+this.mime+" "+n+"  "+a),null;if(1==this.waitingForBuffer)return null;if(null==this.segIndex){if(e.dlog(4,"Non existing index, finding the index for the next request["+this.mime+"]"),this.segIndex=this.findSegmentIndexForTime(a),null===this.segIndex)return this.active=!1,null;e.dlog(4,"New Index["+this.mime+"]: "+a+" "+this.segIndex)}else{null==i&&e.log("Playback head outside of buffer in append-continue state.");
var r=this.representations_[this.currentRep].segs[this.segIndex].time;if(r>n+t.ENOUGH)return e.dlog(3,"Enough buffering: "+this.mime+" "+this.segIndex+" "+n+"  "+r),null}return a},n.prototype.appendData=function(t){for(e.dlog(2,"["+this.mime+"] Time is "+this.getCurrentTime()+", asked to add a "+(t.byteLength/1024/1024).toFixed(2)+" MB segment, see if we can."),this.segmentQueue.length>0&&e.dlog(2,"["+this.mime+"] End of first segment is "+(this.segmentQueue[0].offset+this.segmentQueue[0].duration).toFixed(2));this.segmentQueue.length>0&&this.segmentQueue[0].offset+this.segmentQueue[0].duration<this.getCurrentTime()+2;)e.dlog(2,"["+this.mime+"] Removing collectable segment."),
this.segmentQueue.shift();for(var n=0,i=0;i<this.segmentQueue.length;i++)n+=this.segmentQueue[i].size;e.dlog(2,"["+this.mime+"] Time is "+this.getCurrentTime()+" and there are "+(n/1024/1024).toFixed(2)+" MB uncollectable, bringing the proposed total to "+((n+t.byteLength)/1024/1024).toFixed(2)+" MB."),(n+t.byteLength)/1024/1024>24&&this.segmentQueue.length>0?(e.dlog(2,"["+this.mime+"] Waiting for buffer to have enough room."),this.waitingForBuffer=!0,this.segmentTimeout=setTimeout(function(){this.appendData(t);
}.bind(this),1e3)):(this.reallyAppendData(t),this.waitingForBuffer=!1)},n.prototype.reallyAppendData=function(t){e.dlog(3,"["+this.mime+"] Current Time: "+this.getCurrentTime()+" Ranges in appendData1: "+this.getRangesString());var n,i=this.representations_[this.currentRep].segs[this.segIndex].time,a=i+this.representations_[this.currentRep].segs[this.segIndex].duration;e.dlog(4,"Appending Response ["+this.mime+"] : ["+i+","+a+"]"),n=this.type===e.StreamingType.SMOOTH_STREAMING?process_traf(t,this.representations_[this.currentRep].segs[this.segIndex].timeURL,this.pr_):new Uint8Array(t),
this.append(n),this.segIndex++,this.segIndex>=this.representations_[this.currentRep].segs.length&&(this.active=!1,e.dlog(2,"Source["+this.mime+"] is not active: "+this.segIndex+" "+this.representations_[this.currentRep].segs.length)),e.dlog(3,"Ranges in appendData2: "+this.getRangesString())},e.SourceBufferManager=n}(),function(){var t=function(){this.mediaSrc_=null,this.sourceBufferManagers_=[],this.videoSrcBufIndex_=0,this.emeMgr_=null,this.type=null,this.pr,this.manifest_=null,this.attachedHandlers_={};
};t.prototype.destroy=function(){null!=this.mediaSrc_&&(this.detachAllHandlers_(),this.mediaSrc_=null);var e=this.sourceBufferManagers_;if(e){for(var t=0;t<e.length;t++)e[t].reset(),e[t].destroy();e.length=0}this.sourceBufferManagers_=null,this.emeMgr_&&(this.emeMgr_.destroy(),this.emeMgr_=null),this.revokeObjectURL_(),this.video_=null},t.prototype.getMediaSource=function(){return this.mediaSrc_},t.prototype.getSourceBufferCount=function(){return this.sourceBufferManagers_.length},t.prototype.getVideoSrcBufferIndex=function(){
return this.videoSrcBufIndex_},t.prototype.getLevel=function(e){return this.sourceBufferManagers_[e].currentRep},t.prototype.getSegIndex=function(e){return this.sourceBufferManagers_[e].segIndex},t.prototype.getCurrentRep=function(e){return this.sourceBufferManagers_[e].getCurrentRep()},t.prototype.getBufferSize=function(e,t){return this.sourceBufferManagers_[e].getBufferSize(t)},t.prototype.getLevel=function(e){return this.sourceBufferManagers_[e].currentRep},t.prototype.appendData=function(e,t){
this.mediaSrc_&&"closed"!==this.mediaSrc_.readyState&&this.sourceBufferManagers_[e].appendData(t)},t.prototype.append=function(e,t){this.mediaSrc_&&"closed"!==this.mediaSrc_.readyState&&this.sourceBufferManagers_[e].append(t)},t.prototype.isActive=function(e){return this.sourceBufferManagers_[e].active},t.prototype.isInitialized=function(e){return this.sourceBufferManagers_[e].isInitialized()},t.prototype.initialize=function(e){this.sourceBufferManagers_[e].initialize()},t.prototype.mime=function(e){
return this.sourceBufferManagers_[e].mime},t.prototype.getBitrates=function(e){return this.sourceBufferManagers_[e].bitrates},t.prototype.identifyNextFragment=function(e,t){return this.sourceBufferManagers_[e].identifyNextFragment(t)},t.prototype.resetAll=function(e){for(var t=0;t<this.sourceBufferManagers_.length;t++)this.sourceBufferManagers_[t].reset(e)},t.prototype.reset=function(e,t){this.sourceBufferManagers_[e].reset(t)},t.prototype.changeQuality=function(e,t){return this.sourceBufferManagers_[e].changeQuality(t);
},t.prototype.endOfStream=function(){if(this.mediaSrc_&&"open"===this.mediaSrc_.readyState){for(var t=!1,n=0;n<this.sourceBufferManagers_.length;n++)if(this.sourceBufferManagers_[n].updating()){t=!0;break}t||(e.log("Ending stream"),this.mediaSrc_.endOfStream())}},t.prototype.absolutizeURL=function(e,t){if(void 0===t&&(t=""),t.match(/^[a-z]*:\/\//))return t;var n;return n="/"==t[0]?e.match(/^[a-z]*:\/\/[^\/]*/)[0]:e.replace(/\/[^\/]*$/,"/"),n+t},t.prototype.displaySourceBuffers=function(t){for(var n=0;n<this.mediaSrc_.sourceBuffers.length;n++){
var i=this.mediaSrc_.sourceBuffers[n];e.dlog(5,t+" SourceBuffer["+i.mime+"]: "+i.active)}},t.prototype.normalizeRepresentation=function(t){var n={url:this.absolutizeURL(this.manifest_.manifestURL,t.baseURLs[0]),bandwidth:t.bandwidth,width:t.width,height:t.height,sps:t.sps,pps:t.pps,audio_codec_private_data:t.audio_codec_private_data,audio_sample_rate:t.audio_sample_rate};if(this.type===e.StreamingType.SMOOTH_STREAMING)return n.segs=t.segs,n;var i=null;if(null!=t.segmentList){i=t.segmentList.initialization,
n.segs=[];for(var a=0;a<t.segmentList.segmentURLs.length;a++){var r=t.segmentList.segmentURLs[a],s={start:r.mediaRange.start,end:r.mediaRange.end,index:r.indexRange&&r.indexRange.end||null,time:t.segmentList.durationSeconds*a,duration:t.segmentList.durationSeconds,subsegments:null};n.segs.push(s)}}else if(null!=t.segmentTemplate){n.segs=[];var o=t.segmentTemplate.duration/t.segmentTemplate.timescale,s={url:n.url+t.segmentTemplate.initialization.replace("$RepresentationID$",t.id)};n.segs.push(s);for(var l=0;l*o<this.manifest_.duration;l++){
var s={start:-1,end:-1,index:null,time:l*o,duration:o,subsegments:null,url:n.url+t.segmentTemplate.media.replace("$RepresentationID$",t.id).replace("$Number$",l)};n.segs.push(s)}}else{var s={start:null,end:null,index:null,time:0,duration:this.manifest_.duration,subsegments:null};if(null!=t.segmentBase){var r=t.segmentBase;i=r.initialization,null!=r.indexRange&&(n.indexRequestData=r.indexRange)}n.segs=[s]}return this.type!==e.StreamingType.SMOOTH_STREAMING&&(n.initRequestData={start:i&&i.start||0,
end:i&&i.end||n.segs[0].index||null}),n},t.prototype.onSourceOpen=function(t,n,i){e.dlog(2,"onSourceOpen()");var a,r,s,o,l=this.video_;if(this.mediaSrc_.sourceBuffers.length)for(e.dlog(2,"onSourceOpen(): Target already has buffers, bailing."),s=0;s<this.mediaSrc_.sourceBuffers.length;s++)this.mediaSrc_.sourceBuffers[s].active=!0;else{for(this.mediaSrc_.duration=this.manifest_.duration,this.sourceBufferManagers_=[],this.emeMgr_=new e.EMEManager(l),this.type=this.manifest_.type,this.pr=this.manifest_.pr,
s=0;s<this.manifest_.adaptationSets.length;s++)if(o=this.manifest_.adaptationSets[s],!(o.mime&&o.mime.indexOf("webm")>=0)){o.contentProtection&&this.emeMgr_.init(o.contentProtection,options.flavor),a=o.representations.map(this.normalizeRepresentation.bind(this)),r=this.mediaSrc_.addSourceBuffer(o.mime+'; codecs="'+o.codecs+'"'),e.dlog(2,"Buffer added properly: "+(this.mediaSrc_.sourceBuffers[s]===r));var c=new e.SourceBufferManager(this.mediaSrc_,r,a,o.mime,this.type,this.pr);o.mime.indexOf("video")>=0&&(this.videoSrcBufIndex_=s),
this.sourceBufferManagers_.push(c),e.dlog(2,"onSourceOpen. Initialized SourceBuffer["+o.mime+"]")}n()}},t.prototype.isSupported=function(e){return(null!=window.MediaSource||null!=window.WebKitMediaSource)&&(null==window.MediaSource&&(window.MediaSource=window.WebKitMediaSource),!0)},t.prototype.init=function(){this.mediaSrc_=new MediaSource},t.prototype.attach=function(e,t,n,i){if(!this.mediaSrc_)throw new Error("MediaSourceManager has not been initialized, please call init()");this.manifest_=t,this.video_=e,
this.attachHandler_("sourceopen",this.onSourceOpen.bind(this,n,i)),this.attachHandler_("webkitsourceopen",this.onSourceOpen.bind(this,n,i)),this.createAndSetObjectURL_(e,this.mediaSrc_)},t.prototype.createAndSetObjectURL_=function(e,t){this.revokeObjectURL_(),this.videoURL=window.URL.createObjectURL(t),e.src=this.videoURL},t.prototype.revokeObjectURL_=function(){this.videoURL&&(window.URL.revokeObjectURL(this.videoURL),this.videoURL=null)},t.prototype.attachHandler_=function(e,t){this.attachedHandlers_[e]||(this.attachedHandlers_[e]=[]),
this.attachedHandlers_[e].push(t),this.mediaSrc_.addEventListener(e,t)},t.prototype.detachAllHandlers_=function(){var e,t=this.attachedHandlers_,n=this.mediaSrc_;for(var i in t){e=t[i];for(var a=0;a<e.length;a++)n.removeEventListener(i,e[a]);e.length=0}},e.MediaSourceManager=t}(),function(){var t=0,n=1,i=function(e){if(null==e)throw new Error("A url for the manifest is required");this.url_=e,this.callback_=null,this.manifest_=null};i.prototype.load=function(t){if(null==t)throw new Error("A callback is required");
this.callback_=t,this.requestManifest_(),e.dlog(1,"Sent request to get the manifest")},i.prototype.getManifest=function(){return this.manifest_},i.prototype.manifestType_=function(){return this.url_.lastIndexOf(".mpd")!=-1?t:n},i.prototype.requestManifest_=function(){var e=new XMLHttpRequest;e.addEventListener("load",this.onManifestLoad_.bind(this)),e.addEventListener("error",this.onManifestError_.bind(this)),e.open("GET",this.url_),e.send()},i.prototype.onManifestError_=function(t){var n="Error retrieving manifest from "+this.url_;
return e.log(n),this.callback_(n)},i.prototype.onManifestLoad_=function(i){e.dlog(2,"Manifest received");var a=null;if(i.target.status<200||i.target.status>299)return a="HTTP error "+i.target.status+" retrieving manifest from "+this.url_,e.log(a),this.callback_(a);switch(this.manifestType_()){case t:this.manifest_=e.parseDASHManifest(i.target.responseText,this.url_);break;case n:this.manifest_=e.parseSSManifest(i.target.responseText,this.url_)}return null===this.manifest_?(a="Error parsing the manifest",
e.log(a),this.callback_(a)):this.callback_(a,this.manifest_)},e.ManifestLoader=i}(),function(){var t=.99,n=.98,i=5e5,a=5e5,r=function(e,t,n){this.bitrates_=e,this.levelCount_=this.bitrates_.length,this.algorithm_=t||"adaptive",this.cooldownPeriod_=2,n&&(this.level_=parseInt(n))};r.prototype.onBandwithTracking=function(r){var s=r.target;if(null!=s.lastTime&&r.timeStamp!=s.lastTime){var o=8e3*(r.loaded-s.lastSize)/(r.timeStamp-s.lastTime);i=t*i+(1-t)*o,a=n*a+(1-n)*o}s.lastTime=r.timeStamp,s.lastSize=r.loaded,
e.dlog(5,"Calculated bandwidth: "+i+" "+a)},r.prototype.adapt=function(t){if(!this.bitrates_||this.bitrates_.length<=1)return-1;var n=-1;if("fixed"===this.algorithm_)n=this.level_;else if("random"===this.algorithm_)Math.random()>.5&&(n=Math.floor(Math.random()*this.levelCount_));else if("adaptive"===this.algorithm_)if(this.cooldownPeriod_)this.cooldownPeriod_--;else{var r=0,s=0,o=.85,l=Math.min(i,a);e.dlog(5,"Calculated Bandwidth: "+l+" globalSlowBandwidth: "+i+" globalFastBandwidth: "+a);for(var c=0;c<this.bitrates_.length;c++){
var u=this.bitrates_[c];u>r&&u<o*l-128e3&&(r=u,s=c)}if(s!==t)return e.dlog(2,"Selected new rate "+r+" for bandwidth "+l+" (from "+i+", "+a+")"),this.cooldownPeriod_=8,s}return t!==n&&n!==-1?(e.dlog(2,"Selected new bitrate level: "+n),n):-1},e.AdaptiveManager=r}(),function(){var t=function(e,t,n){this.mediaSrcMgr_=e,this.bufferIndex_=t,this.adaptiveManager_=n,this.fragmentRequest_=null};t.prototype.appendInit=function(){e.dlog(2,"Appending init ["+this.mediaSrcMgr_.mime(this.bufferIndex_)+"]: "+this.mediaSrcMgr_.getLevel(this.bufferIndex_)),
this.mediaSrcMgr_.initialize(this.bufferIndex_),this.mediaSrcMgr_.append(this.bufferIndex_,this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment)},t.prototype.onXHRAbort=function(t){e.log("Received abort of XHR.")},t.prototype.onXHRError=function(t){return this.fragmentRequest_!==t.target?void e.log("Received error of untracked XHR."):(e.log("Received error of XHR."),void(this.fragmentRequest_=null))},t.prototype.onXHRLoad=function(t){this.fragmentRequest_!==t.target&&e.log("Error, HTTP response for unknown request");
var n=this.fragmentRequest_;if(this.fragmentRequest_=null,n.readyState==n.DONE)return n.status>=300?void e.log("HTTP Request failure, status="+n.status):(n.is_index&&(e.dlog(2,"Index Response"),this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs=e.parseSIDX(n.response,n.startByte)),n.is_init?(e.dlog(2,"Init Response"),this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment=e.extractInit(n.response),void(this.mediaSrcMgr_.isInitialized(this.bufferIndex_)||this.appendInit())):void this.mediaSrcMgr_.appendData(this.bufferIndex_,n.response));
},t.prototype.cancelRequests=function(){null!=this.fragmentRequest_&&(this.fragmentRequest_.abort(),this.fragmentRequest_=null)},t.prototype.makeSSXHR=function(){var t=new XMLHttpRequest,n=this.mediaSrcMgr_.getSegIndex(this.bufferIndex_),i=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).url,a=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).bandwidth,r=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[n].timeURL;if(i=i.replace("{bitrate}",a),i=i.replace("{start time}",r),t.open("GET",i),
t.responseType="arraybuffer",t.addEventListener("load",this.onXHRLoad.bind(this)),t.addEventListener("error",this.onXHRError.bind(this)),t.addEventListener("abort",this.onXHRAbort.bind(this)),null==i)throw"Null URL";return t.is_init=!1,t.is_index=!1,t.lastTime=null,t.lastSize=null,t.addEventListener("progress",this.adaptiveManager_.onBandwithTracking.bind(this.adaptiveManager_)),t.send(),e.dlog(2,"Sent XHR: url="+i),t},t.prototype.makeXHR=function(t){var n,i,a=new XMLHttpRequest,r=this.mediaSrcMgr_.getSegIndex(this.bufferIndex_),s=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_),o=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).url,l=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[r],c=!1;
null==r&&(r=0),null!=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[r].url&&(o=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[r].url),t?(n=0,i=s.initRequestData.end,null!=s.indexRequestData&&(i=s.indexRequestData.end,c=!0)):(n=l.offset,i=l.offset+l.size-1);var u=null;null!=n&&null!=i&&(u="bytes="+n+"-"+i);var d=!!/youtube.com/.exec(o);if(u&&d&&(o=o.replace(/&range=[^&]*/,""),o+="&range="+u.substring(6)),a.open("GET",o),a.responseType="arraybuffer",a.startByte=n,null==u||d||a.setRequestHeader("Range",u),
a.addEventListener("load",this.onXHRLoad.bind(this)),null==o)throw"Null URL";return a.is_init=t,a.is_index=c,a.lastTime=null,a.lastSize=null,a.addEventListener("progress",this.adaptiveManager_.onBandwithTracking.bind(this.adaptiveManager_)),a.send(),e.dlog(2,"Sent XHR: url="+o+", range="+u),a},t.prototype.findRangeForPlaybackTime=function(e,t){for(var n=e.buffered,i=0;i<n.length;i++)if(n.start(i)<=t&&n.end(i)>=t)return{start:n.start(i),end:n.end(i)}},t.prototype.initFragmentRequestNeeded=function(){
if(null==this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment){e.dlog(2,"Creating Init segment["+this.mediaSrcMgr_.mime(this.bufferIndex_)+"]");var t=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_);if(this.mediaSrcMgr_.type===e.StreamingType.SMOOTH_STREAMING){var n={pps:t.pps,sps:t.sps,width:t.width,height:t.height,mime:this.mediaSrcMgr_.mime(this.bufferIndex_),pr:this.mediaSrcMgr_.pr,audio_codec_private_data:t.audio_codec_private_data,audio_sample_rate:t.audio_sample_rate},i=e.createSSInit(n);
return this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment=e.extractInit(i.data),this.appendInit(),!1}return this.fragmentRequest_=this.makeXHR(!0),!0}return this.mediaSrcMgr_.isInitialized(this.bufferIndex_)||this.appendInit(),!1},t.prototype.requestNextFragment=function(t,n){this.mediaSrcMgr_.type===e.StreamingType.SMOOTH_STREAMING?this.fragmentRequest_=this.makeSSXHR():this.fragmentRequest_=this.makeXHR(!1),this.fragmentRequest_.expected_time=n},t.prototype.tick=function(t){if(!this.mediaSrcMgr_.isActive(this.bufferIndex_))return e.dlog(4,"Not active["+this.mediaSrcMgr_.mime(this.bufferIndex_)+"]"),
!1;if(this.fragmentRequest_)e.dlog(4,"Will not request next segment["+this.mediaSrcMgr_.mime(this.bufferIndex_)+"] request pending");else if(!this.initFragmentRequestNeeded()){var n=this.mediaSrcMgr_.identifyNextFragment(this.bufferIndex_,t);if(null!==n){var i=-1;this.mediaSrcMgr_.mime(this.bufferIndex_).indexOf("video")>=0&&(i=this.adaptiveManager_.adapt(this.mediaSrcMgr_.getLevel(this.bufferIndex_))),i>=0?(this.cancelRequests(),this.mediaSrcMgr_.changeQuality(this.bufferIndex_,i)):this.requestNextFragment(t,n);
}}return!0},e.FragmentManager=t}(),function(){function t(e){var t=new RegExp("[?&]"+e+"=([^&]*)"),n=t.exec(window.location.search);return null!=n?(n=n[1],/%/.exec(n)&&(n=decodeURIComponent(n)),n):null}function n(){for(var e={},n=["autoplay","algorithm","flavor","level","cc","url"],i=0;i<n.length;i++){var a=t(n[i]);e[n[i]]=a}if(e&&e.url)for(var r in e)e.hasOwnProperty(r)&&(this.options[r]=e[r])}var i={Audio_Type:"audio",Video_Type:"video",Image_Type:"img",MSE_Type:"mse"},a=function(t){t||(t={}),this.options=t,
this.mediaElementType_=null,this.manifestLoader_=null,this.closeCaptionsLoader_=null,this.progressTimer_=null,this.mediaSrcMgr_=new e.MediaSourceManager,this.fragmentManagers_=null,this.showControls_=t.showControls,this.mediaElement_=null,this.imageElement_=null,this.mediaEvents_=new Object,t.mediaElement?this.mediaElement_=t.mediaElement:t.imageElement?this.imageElement_=t.imageElement:this.createMediaElement(),e.player=this},r={AUTO_PAUSE_START:1,PAUSE_RESUME:5};a.prototype.destroy=function(){return this.destroyed_?void e.log("Refusing to destroy a second time"):(this.removeAllMediaEventListeners(),
this.mediaElementType_!==i.Image_Type&&this.mediaElement_.pause(),this.mediaElementType_===i.MSE_Type&&this.stopProgressTimer(),this.mediaSrcMgr_&&this.mediaSrcMgr_.destroy(),delete e.player,delete this.mediaElement_,delete this.imageElement_,void(this.destroyed_=!0))},a.prototype.getMediaElement=function(){return this.mediaElement_},a.prototype.onPause=function(t){e.log("Paused, auto="+this.mediaElement_.autopause_pending),this.mediaElement_.autopaused=this.mediaElement_.autopause_pending,this.mediaElement_.autopause_time=(new Date).getTime(),
this.mediaElement_.autopause_pending=!1},a.prototype.onPlay=function(t){e.log("Playing"),this.mediaElement_.autopause_pending=!1,this.mediaElement_.autopaused=!1,this.mediaElement_.autopause_time=null},a.prototype.onError=function(t){e.log("Error ("+this.mediaElement_.error.code+")")},a.prototype.cancelRequests=function(){for(var e=0;e<this.fragmentManagers_.length;e++)this.fragmentManagers_[e].cancelRequests()},a.prototype.onSeeking=function(t){e.log("Seeking"),this.cancelRequests(),this.mediaSrcMgr_.resetAll("seeking");
},a.prototype.onSeeked=function(t){e.log("Seeked")},a.prototype.onProgress=function(){var t=this.mediaSrcMgr_.getMediaSource();if(!t||"closed"===t.readyState)return void this.stopProgressTimer();var n=this.mediaElement_.currentTime;if(this.mediaElement_.error)return void e.dlog(2,"Video Error: "+this.mediaElement_.error);for(var i=!1,a=0,s=0,o=0;o<this.fragmentManagers_.length;o++)if(this.fragmentManagers_[o].tick(n)){var l=this.mediaSrcMgr_.getBufferSize(o,n);this.mediaElement_.paused?l>=r.PAUSE_RESUME&&s++:l<r.AUTO_PAUSE_START&&(i=!0);
}else a++;return a>0?void(a===this.fragmentManagers_.length&&this.mediaSrcMgr_.endOfStream()):void(this.mediaElement_.paused?this.mediaElement_.autopaused&&s===this.fragmentManagers_.length&&(e.dlog(2,"Autoresuming"),this.mediaElement_.play()):i&&(e.dlog(2,"Autopausing"),this.mediaElement_.autopause_pending=!0,this.mediaElement_.pause()))},a.prototype.createMediaElement=function(){var t=document.getElementById("mediaElement");this.mediaElement_=document.createElement(i.Video_Type),this.imageElement_=document.createElement(i.Image_Type),
t.appendChild(this.mediaElement_),t.appendChild(this.imageElement_),e.me=this.mediaElement_,e.img=this.imageElement_,this.showControls_?this.mediaElement_.hasAttribute("controls")||this.mediaElement_.setAttribute("controls","controls"):this.mediaElement_.hasAttribute("controls")&&this.mediaElement_.removeAttribute("controls")},a.prototype.showMediaElement=function(t){var n=document.getElementById("mediaElement");this.mediaElementType_===i.MSE_Type&&(this.removeMediaEventListener("seeking"),this.removeMediaEventListener("seeked"),
this.removeMediaEventListener("pause"),this.removeMediaEventListener("play"),this.removeMediaEventListener("error"),t!==i.MSE_Type&&(this.stopProgressTimer(),this.mediaSrcMgr_.destroy(),this.mediaSrcMgr_=new e.MediaSourceManager)),this.mediaElementType_!==i.Image_Type&&(this.mediaElement_.play(0),this.mediaElement_.pause());var a=n.children;if(a&&a.length>0)for(var r=0;r<a.length;r++)"VIDEO"===a[r].nodeName&&t!==i.Image_Type?a[r].style.display="block":"IMG"===a[r].nodeName&&t===i.Image_Type?a[r].style.display="block":(a[r].style.display="none",
a[r].src=null);this.mediaElementType_=t},a.prototype.addMediaEventListener=function(e,t){var n=t.bind(this);this.mediaElement_.addEventListener(e,n),this.mediaEvents_[e]=n},a.prototype.removeMediaEventListener=function(e){this.mediaElement_.removeEventListener(e,this.mediaEvents_[e]),this.mediaEvents_[e]=null},a.prototype.removeAllMediaEventListeners=function(){for(var e in this.mediaEvents_)e&&this.removeMediaEventListener(e)},a.prototype.initMseVideoElement=function(e){e&&this.addCaptionInfo(e),
this.addMediaEventListener("seeking",this.onSeeking),this.addMediaEventListener("seeked",this.onSeeked),this.addMediaEventListener("pause",this.onPause),this.addMediaEventListener("play",this.onPlay),this.addMediaEventListener("error",this.onError),this.mediaElement_.autopause_pending=!1,this.options.autoplay?this.mediaElement_.autopaused=!0:this.mediaElement_.autopaused=!1,this.mediaElement_.seekingStatus="none"},a.prototype.onManifestLoad=function(t){return this.destroyed_?void e.log("Ignoring manifest load after destruction"):t?void e.log("Unable to load manifest"):void(this.options.cc?(this.closeCaptionsLoader_=new e.CloseCaptionsLoader(this.options.cc),
this.closeCaptionsLoader_.load(this.onLoadcloseCaptions.bind(this))):this.onLoadcloseCaptions.call(this))},a.prototype.addCaptionInfo=function(e){var t;t=this.mediaElement_.textTracks.length>0?this.mediaElement_.textTracks[0]:this.mediaElement_.addTextTrack("captions"),t.mode="showing";for(var n=e[0].start,i=e[0].end,a=[],r=0;r<e.length;r++){var s=new TextTrackCue(e[r].start,e[r].end,e[r].caption);if(n===e[r].start&&i===e[r].end&&a.push(s),n!==e[r].start||i!==e[r].end||r===e.length-1){for(var o=a.length-1;o>=0;o--)t.addCue(a[o]);
a.length=0,n=e[r].start,i=e[r].end,r<e.length&&a.push(s)}}},a.prototype.onMediaSourceManagerInitialized=function(t){if(this.destroyed_)return void e.log("Ignoring MediaSourceManager initialization after destruction");this.initMseVideoElement(t);for(var n=0;n<this.mediaSrcMgr_.getSourceBufferCount();n++)this.fragmentManagers_.push(new e.FragmentManager(this.mediaSrcMgr_,n,new e.AdaptiveManager(this.mediaSrcMgr_.getBitrates(n),this.options.algorithm,this.options.level)));this.startProgressTimer()},
a.prototype.initializeMsePlayer=function(e){var t=null;this.closeCaptionsLoader_&&(t=this.closeCaptionsLoader_.getCCInfo()),this.fragmentManagers_=[],this.mediaSrcMgr_.init(),this.mediaSrcMgr_.attach(this.mediaElement_,this.manifestLoader_.getManifest(),t,this.onMediaSourceManagerInitialized.bind(this,t))},a.prototype.stopProgressTimer=function(){null!==this.progressTimer_&&(e.dlog(2,"Deregistering progress timer"),window.clearInterval(this.progressTimer_),this.progressTimer_=null)},a.prototype.startProgressTimer=function(){
null===this.progressTimer_&&(e.dlog(2,"Starting progress timer"),this.progressTimer_=setInterval(this.onProgress.bind(this),250))},a.prototype.initializeSimplePlayer=function(e,t){e!==i.Image_Type?(this.mediaElement_.src=t,this.mediaElement_.play()):this.imageElement_.src=t},a.prototype.onLoadcloseCaptions=function(t){return this.destroyed_?void e.log("Ignoring close captions load after destruction"):t?void e.log("Unable to load close captions"):void this.initializeMsePlayer()},a.prototype.onManifestLoad=function(t){
return this.destroyed_?void e.log("Ignoring manifest load after destruction"):t?void e.log("Unable to load manifest"):void(this.options.cc?(this.closeCaptionsLoader_=new e.CloseCaptionsLoader(this.options.cc),this.closeCaptionsLoader_.load(this.onLoadcloseCaptions.bind(this))):this.onLoadcloseCaptions.call(this))},a.prototype.getMediaType=function(t){var n=t.length;if(n<5)return e.log("Error invalid url"),null;var a=t.substring(t.length-4,t.length);switch(a){case".webm":case".mkv":case".mp4":return i.Video_Type;
case".mp3":return i.Audio_Type;case".jpg":return i.Image_Type;case".mpd":return i.MSE_Type;default:return i.MSE_Type}},a.prototype.init=function(){if(e.log("-------- Initializing --------"),!this.mediaSrcMgr_.isSupported())return e.log("Incompatible browser: Media Source extensions not suported"),!1;if(n(),!this.options.url)return e.log("No manifest URL found, please provide one"),!1;var t=this.getMediaType(this.options.url);this.mediaElementType_=t,this.options.mediaElement||this.options.imageElement||this.showMediaElement(t),
t===i.MSE_Type?(this.manifestLoader_=new e.ManifestLoader(this.options.url),this.manifestLoader_.load(this.onManifestLoad.bind(this))):this.initializeSimplePlayer(t,this.options.url)},e.BasicPlayer=a}(),window.googledash=e}(),e.exports=googledash},function(e,t){"undefined"==typeof jwplayer&&(jwplayer=function(e){if(jwplayer.api)return jwplayer.api.selectPlayer(e)},jwplayer.version="6.8.4616",jwplayer.vid=document.createElement("video"),jwplayer.audio=document.createElement("audio"),jwplayer.source=document.createElement("source"),
function(e){function t(e){return function(){return l(e)}}function n(e,t,n,i,a){return function(){var r,o;if(a)n(e);else{try{if((r=e.responseXML)&&(o=r.firstChild,r.lastChild&&"parsererror"===r.lastChild.nodeName))return void(i&&i("Invalid XML"))}catch(e){}if(r&&o)return n(e);(r=s.parseXML(e.responseText))&&r.firstChild?(e=s.extend({},e,{responseXML:r}),n(e)):i&&i(e.responseText?"Invalid XML":t)}}}var i=document,a=window,r=navigator,s=e.utils=function(){};s.exists=function(e){switch(typeof e){case"string":
return 0<e.length;case"object":return null!==e;case"undefined":return!1}return!0},s.styleDimension=function(e){return e+(0<e.toString().indexOf("%")?"":"px")},s.getAbsolutePath=function(e,t){if(s.exists(t)||(t=i.location.href),s.exists(e)){var n;if(s.exists(e)){n=e.indexOf("://");var a=e.indexOf("?");n=0<n&&(0>a||a>n)}else n=void 0;if(n)return e;n=t.substring(0,t.indexOf("://")+3);var r,a=t.substring(n.length,t.indexOf("/",n.length+1));0===e.indexOf("/")?r=e.split("/"):(r=t.split("?")[0],r=r.substring(n.length+a.length+1,r.lastIndexOf("/")),
r=r.split("/").concat(e.split("/")));for(var o=[],l=0;l<r.length;l++)r[l]&&s.exists(r[l])&&"."!=r[l]&&(".."==r[l]?o.pop():o.push(r[l]));return n+a+"/"+o.join("/")}},s.extend=function(){var e=s.extend.arguments;if(1<e.length){for(var t=1;t<e.length;t++)s.foreach(e[t],function(t,n){try{s.exists(n)&&(e[0][t]=n)}catch(e){}});return e[0]}return null};var o=window.console=window.console||{log:function(){}};s.log=function(){var e=Array.prototype.slice.call(arguments,0);"object"==typeof o.log?o.log(e):o.log.apply(o,e);
};var l=s.userAgentMatch=function(e){return null!==r.userAgent.toLowerCase().match(e)};s.isIE=s.isMSIE=t(/msie/i),s.isFF=t(/firefox/i),s.isChrome=t(/chrome/i),s.isIPod=t(/iP(hone|od)/i),s.isIPad=t(/iPad/i),s.isSafari602=t(/Macintosh.*Mac OS X 10_8.*6\.0\.\d* Safari/i),s.isIETrident=function(e){return e?(e=parseFloat(e).toFixed(1),l(RegExp("msie\\s*"+e+"|trident/.+rv:\\s*"+e,"i"))):l(/msie|trident/i)},s.isSafari=function(){return l(/safari/i)&&!l(/chrome/i)&&!l(/chromium/i)&&!l(/android/i)},s.isIOS=function(e){
return l(e?RegExp("iP(hone|ad|od).+\\sOS\\s"+e,"i"):/iP(hone|ad|od)/i)},s.isAndroid=function(e,t){var n=!t||!l(/chrome\/[23456789]/i);return e?n&&l(RegExp("android.*"+e,"i")):n&&l(/android/i)},s.isMobile=function(){return s.isIOS()||s.isAndroid()},s.saveCookie=function(e,t){i.cookie="jwplayer."+e+"="+t+"; path=/"},s.getCookies=function(){for(var e={},t=i.cookie.split("; "),n=0;n<t.length;n++){var a=t[n].split("=");0===a[0].indexOf("jwplayer.")&&(e[a[0].substring(9,a[0].length)]=a[1])}return e},s.typeOf=function(e){
var t=typeof e;return"object"===t?e?e instanceof Array?"array":t:"null":t},s.translateEventResponse=function(t,n){var i=s.extend({},n);if(t!=e.events.JWPLAYER_FULLSCREEN||i.fullscreen)if("object"==typeof i.data){var a=i.data;delete i.data,i=s.extend(i,a)}else"object"==typeof i.metadata&&s.deepReplaceKeyName(i.metadata,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]);else i.fullscreen="true"==i.message,delete i.message;return s.foreach(["position","duration","offset"],function(e,t){
i[t]&&(i[t]=Math.round(1e3*i[t])/1e3)}),i},s.flashVersion=function(){if(s.isAndroid())return 0;var e,t=r.plugins;try{if("undefined"!==t&&(e=t["Shockwave Flash"]))return parseInt(e.description.replace(/\D+(\d+)\..*/,"$1"),10)}catch(e){}if("undefined"!=typeof a.ActiveXObject)try{if(e=new a.ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return parseInt(e.GetVariable("$version").split(" ")[1].split(",")[0],10)}catch(e){}return 0},s.getScriptPath=function(e){for(var t=i.getElementsByTagName("script"),n=0;n<t.length;n++){
var a=t[n].src;if(a&&0<=a.indexOf(e))return a.substr(0,a.indexOf(e))}return""},s.deepReplaceKeyName=function(t,n,i){switch(e.utils.typeOf(t)){case"array":for(var a=0;a<t.length;a++)t[a]=e.utils.deepReplaceKeyName(t[a],n,i);break;case"object":s.foreach(t,function(a,r){var s;if(n instanceof Array&&i instanceof Array){if(n.length!=i.length)return;s=n}else s=[n];for(var o=a,l=0;l<s.length;l++)o=o.replace(RegExp(n[l],"g"),i[l]);t[o]=e.utils.deepReplaceKeyName(r,n,i),a!=o&&delete t[a]})}return t};var c=s.pluginPathType={
ABSOLUTE:0,RELATIVE:1,CDN:2};s.getPluginPathType=function(e){if("string"==typeof e){e=e.split("?")[0];var t=e.indexOf("://");if(0<t)return c.ABSOLUTE;var n=e.indexOf("/");return e=s.extension(e),!(0>t&&0>n)||e&&isNaN(e)?c.RELATIVE:c.CDN}},s.getPluginName=function(e){return e.replace(/^(.*\/)?([^-]*)-?.*\.(swf|js)$/,"$2")},s.getPluginVersion=function(e){return e.replace(/[^-]*-?([^\.]*).*$/,"$1")},s.isYouTube=function(e){return/^(http|\/\/).*(youtube\.com|youtu\.be)\/.+/.test(e)},s.youTubeID=function(e){
try{return/v[=\/]([^?&]*)|youtu\.be\/([^?]*)|^([\w-]*)$/i.exec(e).slice(1).join("").replace("?","")}catch(e){return""}},s.isRtmp=function(e,t){return 0===e.indexOf("rtmp")||"rtmp"==t},s.foreach=function(e,t){var n,i;for(n in e)"function"==s.typeOf(e.hasOwnProperty)?e.hasOwnProperty(n)&&(i=e[n],t(n,i)):(i=e[n],t(n,i))},s.isHTTPS=function(){return 0===a.location.href.indexOf("https")},s.repo=function(){var t="http://p.jwpcdn.com/"+e.version.split(/\W/).splice(0,2).join("/")+"/";try{s.isHTTPS()&&(t=t.replace("http://","https://ssl."));
}catch(e){}return t},s.ajax=function(e,t,i,r){var o;if(0<e.indexOf("#")&&(e=e.replace(/#.*$/,"")),e&&0<=e.indexOf("://")&&e.split("/")[2]!=a.location.href.split("/")[2]&&s.exists(a.XDomainRequest))o=new a.XDomainRequest,o.onload=n(o,e,t,i,r),o.ontimeout=o.onprogress=function(){},o.timeout=5e3;else{if(!s.exists(a.XMLHttpRequest))return i&&i(),o;var l=o=new a.XMLHttpRequest,c=e;o.onreadystatechange=function(){if(4===l.readyState)switch(l.status){case 200:n(l,c,t,i,r)();break;case 404:i("File not found");
}}}return o.overrideMimeType&&o.overrideMimeType("text/xml"),o.onerror=function(){i("Error loading file")},setTimeout(function(){try{o.open("GET",e,!0),o.send()}catch(t){i&&i(e)}},0),o},s.parseXML=function(e){var t;try{if(a.DOMParser){if(t=(new a.DOMParser).parseFromString(e,"text/xml"),t.childNodes&&t.childNodes.length&&"parsererror"==t.childNodes[0].firstChild.nodeName)return}else t=new a.ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)}catch(e){return}return t},s.filterPlaylist=function(e,t){
var n,i,a,r,o=[];for(n=0;n<e.length;n++)if(i=s.extend({},e[n]),i.sources=s.filterSources(i.sources),0<i.sources.length){for(a=0;a<i.sources.length;a++)r=i.sources[a],r.label||(r.label=a.toString());o.push(i)}if(t&&0===o.length)for(n=0;n<e.length;n++)if(i=s.extend({},e[n]),i.sources=s.filterSources(i.sources,!0),0<i.sources.length){for(a=0;a<i.sources.length;a++)r=i.sources[a],r.label||(r.label=a.toString());o.push(i)}return o},s.filterSources=function(t,n){var i,a,r=s.extensionmap;if(t){a=[];for(var o=0;o<t.length;o++){
var l=t[o].type,c=t[o].file;c&&(c=s.trim(c)),l||(l=r.extType(s.extension(c)),t[o].type=l),n?e.embed.flashCanPlay(c,l)&&(i||(i=l),l==i&&a.push(s.extend({},t[o]))):s.canPlayHTML5(l)&&(i||(i=l),l==i&&a.push(s.extend({},t[o])))}}return a},s.canPlayHTML5=function(t){return(!s.isAndroid()||"hls"!=t&&"m3u"!=t&&"m3u8"!=t)&&(t=s.extensionmap.types[t],!!t&&!!e.vid.canPlayType&&e.vid.canPlayType(t))},s.seconds=function(e){e=e.replace(",",".");var t=e.split(":"),n=0;return"s"==e.slice(-1)?n=parseFloat(e):"m"==e.slice(-1)?n=60*parseFloat(e):"h"==e.slice(-1)?n=3600*parseFloat(e):1<t.length?(n=parseFloat(t[t.length-1]),
n+=60*parseFloat(t[t.length-2]),3==t.length&&(n+=3600*parseFloat(t[t.length-3]))):n=parseFloat(e),n},s.serialize=function(e){return null==e?null:"true"==e.toString().toLowerCase()||"false"!=e.toString().toLowerCase()&&(isNaN(Number(e))||5<e.length||0===e.length?e:Number(e))}}(jwplayer),function(e){var t="video/",n=e.foreach,i={mp4:t+"mp4",vorbis:"audio/ogg",ogg:t+"ogg",webm:t+"webm",aac:"audio/mp4",mp3:"audio/mpeg",hls:"application/vnd.apple.mpegurl"},a={mp4:i.mp4,f4v:i.mp4,m4v:i.mp4,mov:i.mp4,m4a:i.aac,
f4a:i.aac,aac:i.aac,mp3:i.mp3,ogv:i.ogg,ogg:i.vorbis,oga:i.vorbis,webm:i.webm,m3u8:i.hls,hls:i.hls},t="video",t={flv:t,f4v:t,mov:t,m4a:t,m4v:t,mp4:t,aac:t,f4a:t,mp3:"sound",smil:"rtmp",m3u8:"hls",hls:"hls"},r=e.extensionmap={};n(a,function(e,t){r[e]={html5:t}}),n(t,function(e,t){r[e]||(r[e]={}),r[e].flash=t}),r.types=i,r.mimeType=function(e){var t;return n(i,function(n,i){!t&&i==e&&(t=n)}),t},r.extType=function(e){return r.mimeType(a[e])}}(jwplayer.utils),function(e){var t=e.loaderstatus={NEW:0,LOADING:1,
ERROR:2,COMPLETE:3},n=document;e.scriptloader=function(i){function a(){s=t.ERROR,l.sendEvent(o.ERROR)}function r(){s=t.COMPLETE,l.sendEvent(o.COMPLETE)}var s=t.NEW,o=jwplayer.events,l=new o.eventdispatcher;e.extend(this,l),this.load=function(){var l=e.scriptloader.loaders[i];if(!l||l.getStatus()!=t.NEW&&l.getStatus()!=t.LOADING){if(e.scriptloader.loaders[i]=this,s==t.NEW){s=t.LOADING;var c=n.createElement("script");c.addEventListener?(c.onload=r,c.onerror=a):c.readyState&&(c.onreadystatechange=function(){
("loaded"==c.readyState||"complete"==c.readyState)&&r()}),n.getElementsByTagName("head")[0].appendChild(c),c.src=i}}else l.addEventListener(o.ERROR,a),l.addEventListener(o.COMPLETE,r)},this.getStatus=function(){return s}},e.scriptloader.loaders={}}(jwplayer.utils),function(e){e.trim=function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},e.pad=function(e,t,n){for(n||(n="0");e.length<t;)e=n+e;return e},e.xmlAttribute=function(e,t){for(var n=0;n<e.attributes.length;n++)if(e.attributes[n].name&&e.attributes[n].name.toLowerCase()==t.toLowerCase())return e.attributes[n].value.toString();
return""},e.extension=function(e){return e&&"rtmp"!=e.substr(0,4)?(e=e.substring(e.lastIndexOf("/")+1,e.length).split("?")[0].split("#")[0],-1<e.lastIndexOf(".")?e.substr(e.lastIndexOf(".")+1,e.length).toLowerCase():void 0):""},e.stringToColor=function(e){return e=e.replace(/(#|0x)?([0-9A-F]{3,6})$/gi,"$2"),3==e.length&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)),parseInt(e,16)}}(jwplayer.utils),function(e){var t="touchmove",n="touchstart";e.touch=function(i){function a(e){
e.type==n?(l=!0,u=s(h.DRAG_START,e)):e.type==t?l&&(d||(r(h.DRAG_START,e,u),d=!0),r(h.DRAG,e)):(l&&(d?r(h.DRAG_END,e):(e.cancelBubble=!0,r(h.TAP,e))),l=d=!1,u=null)}function r(e,t,n){c[e]&&(t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault(),t=n?n:s(e,t))&&c[e](t)}function s(e,t){var n=null;if(t.touches&&t.touches.length?n=t.touches[0]:t.changedTouches&&t.changedTouches.length&&(n=t.changedTouches[0]),!n)return null;var i=o.getBoundingClientRect(),n={type:e,target:o,
x:n.pageX-window.pageXOffset-i.left,y:n.pageY,deltaX:0,deltaY:0};return e!=h.TAP&&u&&(n.deltaX=n.x-u.x,n.deltaY=n.y-u.y),n}var o=i,l=!1,c={},u=null,d=!1,h=e.touchEvents;return document.addEventListener(t,a),document.addEventListener("touchend",function(e){l&&d&&r(h.DRAG_END,e),l=d=!1,u=null}),document.addEventListener("touchcancel",a),i.addEventListener(n,a),i.addEventListener("touchend",a),this.addEventListener=function(e,t){c[e]=t},this.removeEventListener=function(e){delete c[e]},this}}(jwplayer.utils),
function(e){e.touchEvents={DRAG:"jwplayerDrag",DRAG_START:"jwplayerDragStart",DRAG_END:"jwplayerDragEnd",TAP:"jwplayerTap"}}(jwplayer.utils),function(e){e.key=function(t){var n,i,a;this.edition=function(){return a&&a.getTime()<(new Date).getTime()?"invalid":n},this.token=function(){return i},e.exists(t)||(t="");try{t=e.tea.decrypt(t,"36QXq4W@GSBV^teR");var r=t.split("/");(n=r[0])?/^(free|pro|premium|ads)$/i.test(n)?(i=r[1],r[2]&&0<parseInt(r[2])&&(a=new Date,a.setTime(String(r[2])))):n="invalid":n="free";
}catch(e){n="invalid"}}}(jwplayer.utils),function(e){var t=e.tea={};t.encrypt=function(e,a){if(0==e.length)return"";var r=t.strToLongs(i.encode(e));1>=r.length&&(r[1]=0);for(var s,o=t.strToLongs(i.encode(a).slice(0,16)),l=r.length,c=r[l-1],u=r[0],d=Math.floor(6+52/l),h=0;0<d--;){h+=2654435769,s=h>>>2&3;for(var p=0;p<l;p++)u=r[(p+1)%l],c=(c>>>5^u<<2)+(u>>>3^c<<4)^(h^u)+(o[3&p^s]^c),c=r[p]+=c}return r=t.longsToStr(r),n.encode(r)},t.decrypt=function(e,a){if(0==e.length)return"";for(var r,s=t.strToLongs(n.decode(e)),o=t.strToLongs(i.encode(a).slice(0,16)),l=s.length,c=s[l-1],u=s[0],d=2654435769*Math.floor(6+52/l);0!=d;){
r=d>>>2&3;for(var h=l-1;0<=h;h--)c=s[0<h?h-1:l-1],c=(c>>>5^u<<2)+(u>>>3^c<<4)^(d^u)+(o[3&h^r]^c),u=s[h]-=c;d-=2654435769}return s=t.longsToStr(s),s=s.replace(/\0+$/,""),i.decode(s)},t.strToLongs=function(e){for(var t=Array(Math.ceil(e.length/4)),n=0;n<t.length;n++)t[n]=e.charCodeAt(4*n)+(e.charCodeAt(4*n+1)<<8)+(e.charCodeAt(4*n+2)<<16)+(e.charCodeAt(4*n+3)<<24);return t},t.longsToStr=function(e){for(var t=Array(e.length),n=0;n<e.length;n++)t[n]=String.fromCharCode(255&e[n],e[n]>>>8&255,e[n]>>>16&255,e[n]>>>24&255);
return t.join("")};var n={code:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e,t){var a,r,s,o,l,c,u=[],d="",h=n.code;if(c=("undefined"==typeof t?0:t)?i.encode(e):e,l=c.length%3,0<l)for(;3>l++;)d+="=",c+="\0";for(l=0;l<c.length;l+=3)a=c.charCodeAt(l),r=c.charCodeAt(l+1),s=c.charCodeAt(l+2),o=a<<16|r<<8|s,a=o>>18&63,r=o>>12&63,s=o>>6&63,o&=63,u[l/3]=h.charAt(a)+h.charAt(r)+h.charAt(s)+h.charAt(o);return u=u.join(""),u=u.slice(0,u.length-d.length)+d},decode:function(e,t){
t="undefined"!=typeof t&&t;var a,r,s,o,l,c,u=[],d=n.code;c=t?i.decode(e):e;for(var h=0;h<c.length;h+=4)a=d.indexOf(c.charAt(h)),r=d.indexOf(c.charAt(h+1)),o=d.indexOf(c.charAt(h+2)),l=d.indexOf(c.charAt(h+3)),s=a<<18|r<<12|o<<6|l,a=s>>>16&255,r=s>>>8&255,s&=255,u[h/4]=String.fromCharCode(a,r,s),64==l&&(u[h/4]=String.fromCharCode(a,r)),64==o&&(u[h/4]=String.fromCharCode(a));return o=u.join(""),t?i.decode(o):o}},i={encode:function(e){return e=e.replace(/[\u0080-\u07ff]/g,function(e){return e=e.charCodeAt(0),
String.fromCharCode(192|e>>6,128|63&e)}),e=e.replace(/[\u0800-\uffff]/g,function(e){return e=e.charCodeAt(0),String.fromCharCode(224|e>>12,128|e>>6&63,128|63&e)})},decode:function(e){return e=e.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(e){return e=(15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2),String.fromCharCode(e)}),e=e.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(e){return e=(31&e.charCodeAt(0))<<6|63&e.charCodeAt(1),String.fromCharCode(e)})}};
}(jwplayer.utils),function(e){e.events={COMPLETE:"COMPLETE",ERROR:"ERROR",API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_SETUP_ERROR:"jwplayerSetupError",JWPLAYER_MEDIA_BEFOREPLAY:"jwplayerMediaBeforePlay",JWPLAYER_MEDIA_BEFORECOMPLETE:"jwplayerMediaBeforeComplete",JWPLAYER_COMPONENT_SHOW:"jwplayerComponentShow",JWPLAYER_COMPONENT_HIDE:"jwplayerComponentHide",JWPLAYER_MEDIA_BUFFER:"jwplayerMediaBuffer",
JWPLAYER_MEDIA_BUFFER_FULL:"jwplayerMediaBufferFull",JWPLAYER_MEDIA_ERROR:"jwplayerMediaError",JWPLAYER_MEDIA_LOADED:"jwplayerMediaLoaded",JWPLAYER_MEDIA_COMPLETE:"jwplayerMediaComplete",JWPLAYER_MEDIA_SEEK:"jwplayerMediaSeek",JWPLAYER_MEDIA_TIME:"jwplayerMediaTime",JWPLAYER_MEDIA_VOLUME:"jwplayerMediaVolume",JWPLAYER_MEDIA_META:"jwplayerMediaMeta",JWPLAYER_MEDIA_MUTE:"jwplayerMediaMute",JWPLAYER_MEDIA_LEVELS:"jwplayerMediaLevels",JWPLAYER_MEDIA_LEVEL_CHANGED:"jwplayerMediaLevelChanged",JWPLAYER_CAPTIONS_CHANGED:"jwplayerCaptionsChanged",
JWPLAYER_CAPTIONS_LIST:"jwplayerCaptionsList",JWPLAYER_CAPTIONS_LOADED:"jwplayerCaptionsLoaded",JWPLAYER_PLAYER_STATE:"jwplayerPlayerState",state:{BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"},JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem",JWPLAYER_PLAYLIST_COMPLETE:"jwplayerPlaylistComplete",JWPLAYER_DISPLAY_CLICK:"jwplayerViewClick",JWPLAYER_CONTROLS:"jwplayerViewControls",JWPLAYER_USER_ACTION:"jwplayerUserAction",JWPLAYER_INSTREAM_CLICK:"jwplayerInstreamClicked",
JWPLAYER_INSTREAM_DESTROYED:"jwplayerInstreamDestroyed",JWPLAYER_AD_TIME:"jwplayerAdTime",JWPLAYER_AD_ERROR:"jwplayerAdError",JWPLAYER_AD_CLICK:"jwplayerAdClicked",JWPLAYER_AD_COMPLETE:"jwplayerAdComplete",JWPLAYER_AD_IMPRESSION:"jwplayerAdImpression",JWPLAYER_AD_COMPANIONS:"jwplayerAdCompanions",JWPLAYER_AD_SKIPPED:"jwplayerAdSkipped"}}(jwplayer),function(e){var t=e.utils;e.events.eventdispatcher=function(n,i){function a(e,n,i){if(e)for(var a=0;a<e.length;a++){var r=e[a];if(r){null!==r.count&&0===--r.count&&delete e[a];
try{r.listener(n)}catch(e){t.log('Error handling "'+i+'" event listener ['+a+"]: "+e.toString(),r.listener,n)}}}}var r,s;this.resetEventListeners=function(){r={},s=[]},this.resetEventListeners(),this.addEventListener=function(e,n,i){try{t.exists(r[e])||(r[e]=[]),"string"==t.typeOf(n)&&(n=new Function("return "+n)()),r[e].push({listener:n,count:i||null})}catch(e){t.log("error",e)}return!1},this.removeEventListener=function(e,n){if(r[e]){try{for(var i=0;i<r[e].length;i++)if(r[e][i].listener.toString()==n.toString()){
r[e].splice(i,1);break}}catch(e){t.log("error",e)}return!1}},this.addGlobalListener=function(e,n){try{"string"==t.typeOf(e)&&(e=new Function("return "+e)()),s.push({listener:e,count:n||null})}catch(e){t.log("error",e)}return!1},this.removeGlobalListener=function(e){if(e){try{for(var n=s.length;n--;)s[n].listener.toString()==e.toString()&&s.splice(n,1)}catch(e){t.log("error",e)}return!1}},this.sendEvent=function(o,l){t.exists(l)||(l={}),t.extend(l,{id:n,version:e.version,type:o}),i&&t.log(o,l),a(r[o],l,o),
a(s,l,o)}}}(window.jwplayer),function(e){var t={},n={};e.plugins=function(){},e.plugins.loadPlugins=function(i,a){return n[i]=new e.plugins.pluginloader(new e.plugins.model(t),a),n[i]},e.plugins.registerPlugin=function(n,i,a,r){var s=e.utils.getPluginName(n);t[s]||(t[s]=new e.plugins.plugin(n)),t[s].registerPlugin(n,i,a,r)}}(jwplayer),function(e){e.plugins.model=function(t){this.addPlugin=function(n){var i=e.utils.getPluginName(n);return t[i]||(t[i]=new e.plugins.plugin(n)),t[i]},this.getPlugins=function(){
return t}}}(jwplayer),function(e){var t=jwplayer.utils,n=jwplayer.events;e.pluginmodes={FLASH:0,JAVASCRIPT:1,HYBRID:2},e.plugin=function(i){function a(){switch(t.getPluginPathType(i)){case t.pluginPathType.ABSOLUTE:return i;case t.pluginPathType.RELATIVE:return t.getAbsolutePath(i,window.location.href)}}function r(){u=setTimeout(function(){d=t.loaderstatus.COMPLETE,h.sendEvent(n.COMPLETE)},1e3)}function s(){d=t.loaderstatus.ERROR,h.sendEvent(n.ERROR)}var o,l,c,u,d=t.loaderstatus.NEW,h=new n.eventdispatcher;
t.extend(this,h),this.load=function(){if(d==t.loaderstatus.NEW)if(0<i.lastIndexOf(".swf"))o=i,d=t.loaderstatus.COMPLETE,h.sendEvent(n.COMPLETE);else if(t.getPluginPathType(i)==t.pluginPathType.CDN)d=t.loaderstatus.COMPLETE,h.sendEvent(n.COMPLETE);else{d=t.loaderstatus.LOADING;var e=new t.scriptloader(a());e.addEventListener(n.COMPLETE,r),e.addEventListener(n.ERROR,s),e.load()}},this.registerPlugin=function(e,i,a,r){u&&(clearTimeout(u),u=void 0),c=i,a&&r?(o=r,l=a):"string"==typeof a?o=a:"function"==typeof a?l=a:!a&&!r&&(o=e),
d=t.loaderstatus.COMPLETE,h.sendEvent(n.COMPLETE)},this.getStatus=function(){return d},this.getPluginName=function(){return t.getPluginName(i)},this.getFlashPath=function(){if(o)switch(t.getPluginPathType(o)){case t.pluginPathType.ABSOLUTE:return o;case t.pluginPathType.RELATIVE:return 0<i.lastIndexOf(".swf")?t.getAbsolutePath(o,window.location.href):t.getAbsolutePath(o,a())}return null},this.getJS=function(){return l},this.getTarget=function(){return c},this.getPluginmode=function(){return"undefined"!=typeof o&&"undefined"!=typeof l?e.pluginmodes.HYBRID:"undefined"!=typeof o?e.pluginmodes.FLASH:"undefined"!=typeof l?e.pluginmodes.JAVASCRIPT:void 0;
},this.getNewInstance=function(e,t,n){return new l(e,t,n)},this.getURL=function(){return i}}}(jwplayer.plugins),function(e){var t=e.utils,n=e.events,i=t.foreach;e.plugins.pluginloader=function(a,r){function s(){d?p.sendEvent(n.ERROR,{message:l}):u||(u=!0,c=t.loaderstatus.COMPLETE,p.sendEvent(n.COMPLETE))}function o(){if(h||s(),!u&&!d){var n=0,i=a.getPlugins();t.foreach(h,function(a){a=t.getPluginName(a);var r=i[a];a=r.getJS();var o=r.getTarget(),r=r.getStatus();r==t.loaderstatus.LOADING||r==t.loaderstatus.NEW?n++:a&&(!o||parseFloat(o)>parseFloat(e.version))&&(d=!0,
l="Incompatible player version",s())}),0==n&&s()}}var l,c=t.loaderstatus.NEW,u=!1,d=!1,h=r,p=new n.eventdispatcher;t.extend(this,p),this.setupPlugins=function(e,n,r){var s={length:0,plugins:{}},o=0,l={},c=a.getPlugins();return i(n.plugins,function(i,a){var u=t.getPluginName(i),d=c[u],h=d.getFlashPath(),p=d.getJS(),f=d.getURL();h&&(s.plugins[h]=t.extend({},a),s.plugins[h].pluginmode=d.getPluginmode(),s.length++);try{if(p&&n.plugins&&n.plugins[f]){var g=document.createElement("div");g.id=e.id+"_"+u,
g.style.position="absolute",g.style.top=0,g.style.zIndex=o+10,l[u]=d.getNewInstance(e,t.extend({},n.plugins[f]),g),o++,e.onReady(r(l[u],g,!0)),e.onResize(r(l[u],g))}}catch(e){t.log("ERROR: Failed to load "+u+".")}}),e.plugins=l,s},this.load=function(){if(!t.exists(r)||"object"==t.typeOf(r)){c=t.loaderstatus.LOADING,i(r,function(e){t.exists(e)&&(e=a.addPlugin(e),e.addEventListener(n.COMPLETE,o),e.addEventListener(n.ERROR,f))});var e=a.getPlugins();i(e,function(e,t){t.load()})}o()};var f=this.pluginFailed=function(){
d||(d=!0,l="File not found",s())};this.getStatus=function(){return c}}}(jwplayer),function(){jwplayer.parsers={localName:function(e){return e?e.localName?e.localName:e.baseName?e.baseName:"":""},textContent:function(e){return e?e.textContent?jwplayer.utils.trim(e.textContent):e.text?jwplayer.utils.trim(e.text):"":""},getChildNode:function(e,t){return e.childNodes[t]},numChildren:function(e){return e.childNodes?e.childNodes.length:0}}}(jwplayer),function(e){var t=e.parsers;(t.jwparser=function(){}).parseEntry=function(n,i){
for(var a=[],r=[],s=e.utils.xmlAttribute,o=0;o<n.childNodes.length;o++){var l=n.childNodes[o];if("jwplayer"==l.prefix){var c=t.localName(l);"source"==c?(delete i.sources,a.push({file:s(l,"file"),default:s(l,"default"),label:s(l,"label"),type:s(l,"type")})):"track"==c?(delete i.tracks,r.push({file:s(l,"file"),default:s(l,"default"),kind:s(l,"kind"),label:s(l,"label")})):(i[c]=e.utils.serialize(t.textContent(l)),"file"==c&&i.sources&&delete i.sources)}i.file||(i.file=i.link)}if(a.length)for(i.sources=[],
o=0;o<a.length;o++)0<a[o].file.length&&(a[o].default="true"==a[o].default,a[o].label.length||delete a[o].label,i.sources.push(a[o]));if(r.length)for(i.tracks=[],o=0;o<r.length;o++)0<r[o].file.length&&(r[o].default="true"==r[o].default,r[o].kind=r[o].kind.length?r[o].kind:"captions",r[o].label.length||delete r[o].label,i.tracks.push(r[o]));return i}}(jwplayer),function(e){var t=jwplayer.utils,n=t.xmlAttribute,i=e.localName,a=e.textContent,r=e.numChildren,s=e.mediaparser=function(){};s.parseGroup=function(e,o){
var l,c,u=[];for(c=0;c<r(e);c++)if(l=e.childNodes[c],"media"==l.prefix&&i(l))switch(i(l).toLowerCase()){case"content":n(l,"duration")&&(o.duration=t.seconds(n(l,"duration"))),0<r(l)&&(o=s.parseGroup(l,o)),n(l,"url")&&(o.sources||(o.sources=[]),o.sources.push({file:n(l,"url"),type:n(l,"type"),width:n(l,"width"),label:n(l,"label")}));break;case"title":o.title=a(l);break;case"description":o.description=a(l);break;case"guid":o.mediaid=a(l);break;case"thumbnail":o.image||(o.image=n(l,"url"));break;case"group":
s.parseGroup(l,o);break;case"subtitle":var d={};if(d.file=n(l,"url"),d.kind="captions",0<n(l,"lang").length){var h=d;l=n(l,"lang");var p={zh:"Chinese",nl:"Dutch",en:"English",fr:"French",de:"German",it:"Italian",ja:"Japanese",pt:"Portuguese",ru:"Russian",es:"Spanish"};l=p[l]?p[l]:l,h.label=l}u.push(d)}for(o.hasOwnProperty("tracks")||(o.tracks=[]),c=0;c<u.length;c++)o.tracks.push(u[c]);return o}}(jwplayer.parsers),function(e){function t(t){for(var a={},r=0;r<t.childNodes.length;r++){var o=t.childNodes[r],l=s(o);
if(l)switch(l.toLowerCase()){case"enclosure":a.file=n.xmlAttribute(o,"url");break;case"title":a.title=i(o);break;case"guid":a.mediaid=i(o);break;case"pubdate":a.date=i(o);break;case"description":a.description=i(o);break;case"link":a.link=i(o);break;case"category":a.tags=a.tags?a.tags+i(o):i(o)}}return a=e.mediaparser.parseGroup(t,a),a=e.jwparser.parseEntry(t,a),new jwplayer.playlist.item(a)}var n=jwplayer.utils,i=e.textContent,a=e.getChildNode,r=e.numChildren,s=e.localName;e.rssparser={},e.rssparser.parse=function(e){
for(var n=[],i=0;i<r(e);i++){var o=a(e,i);if("channel"==s(o).toLowerCase())for(var l=0;l<r(o);l++){var c=a(o,l);"item"==s(c).toLowerCase()&&n.push(t(c))}}return n}}(jwplayer.parsers),function(e){e.playlist=function(t){var n=[];if("array"==e.utils.typeOf(t))for(var i=0;i<t.length;i++)n.push(new e.playlist.item(t[i]));else n.push(new e.playlist.item(t));return n}}(jwplayer),function(e){var t=e.item=function(n){var i=jwplayer.utils,a=i.extend({},t.defaults,n);a.tracks=n&&i.exists(n.tracks)?n.tracks:[],
0==a.sources.length&&(a.sources=[new e.source(a)]);for(var r=0;r<a.sources.length;r++){var s=a.sources[r].default;a.sources[r].default=!!s&&"true"==s.toString(),a.sources[r]=new e.source(a.sources[r])}if(a.captions&&!i.exists(n.tracks)){for(n=0;n<a.captions.length;n++)a.tracks.push(a.captions[n]);delete a.captions}for(r=0;r<a.tracks.length;r++)a.tracks[r]=new e.track(a.tracks[r]);return a};t.defaults={description:"",image:"",mediaid:"",title:"",sources:[],tracks:[]}}(jwplayer.playlist),function(e){
var t=jwplayer,n=t.utils,i=t.events,a=t.parsers;e.loader=function(){function t(t){try{var n=t.responseXML.childNodes;t="";for(var r=0;r<n.length&&(t=n[r],!(8!=t.nodeType));r++);if("xml"==a.localName(t)&&(t=t.nextSibling),"rss"!=a.localName(t))s("Not a valid RSS feed");else{var l=new e(a.rssparser.parse(t));o.sendEvent(i.JWPLAYER_PLAYLIST_LOADED,{playlist:l})}}catch(e){s()}}function r(e){s(e.match(/invalid/i)?"Not a valid RSS feed":"")}function s(e){o.sendEvent(i.JWPLAYER_ERROR,{message:e?e:"Error loading file"
})}var o=new i.eventdispatcher;n.extend(this,o),this.load=function(e){n.ajax(e,t,r)}}}(jwplayer.playlist),function(e){var t=jwplayer.utils,n={file:void 0,label:void 0,type:void 0,default:void 0};e.source=function(e){var i=t.extend({},n);return t.foreach(n,function(n){t.exists(e[n])&&(i[n]=e[n],delete e[n])}),i.type&&0<i.type.indexOf("/")&&(i.type=t.extensionmap.mimeType(i.type)),"m3u8"==i.type&&(i.type="hls"),"smil"==i.type&&(i.type="rtmp"),i}}(jwplayer.playlist),function(e){var t=jwplayer.utils,n={
file:void 0,label:void 0,kind:"captions",default:!1};e.track=function(e){var i=t.extend({},n);return e||(e={}),t.foreach(n,function(n){t.exists(e[n])&&(i[n]=e[n],delete e[n])}),i}}(jwplayer.playlist),function(e){function t(e,t,i){var a=e.style;a.backgroundColor="#000",a.color="#FFF",a.width=n.styleDimension(i.width),a.height=n.styleDimension(i.height),a.display="table",a.opacity=1,i=document.createElement("p"),a=i.style,a.verticalAlign="middle",a.textAlign="center",a.display="table-cell",a.font="15px/20px Arial, Helvetica, sans-serif",
i.innerHTML=t.replace(":",":<br>"),e.innerHTML="",e.appendChild(i)}var n=e.utils,i=e.events,a=!0,r=!1,s=document,o=e.embed=function(l){function c(e,t){n.foreach(t,function(t,n){"function"==typeof e[t]&&e[t].call(e,n)})}function u(){if(!D)if("array"==n.typeOf(b.playlist)&&2>b.playlist.length&&(0==b.playlist.length||!b.playlist[0].sources||0==b.playlist[0].sources.length))p();else if(!C)if("string"==n.typeOf(b.playlist)){var t=new e.playlist.loader;t.addEventListener(i.JWPLAYER_PLAYLIST_LOADED,function(e){
b.playlist=e.playlist,C=r,u()}),t.addEventListener(i.JWPLAYER_ERROR,function(e){C=r,p(e)}),C=a,t.load(b.playlist)}else if(I.getStatus()==n.loaderstatus.COMPLETE){for(t=0;t<b.modes.length;t++)if(b.modes[t].type&&o[b.modes[t].type]){var s=n.extend({},b),h=new o[b.modes[t].type](m,b.modes[t],s,I,l);if(h.supportsConfig())return h.addEventListener(i.ERROR,d),h.embed(),c(l,s.events),l}var g;b.fallback?(g="No suitable players found and fallback enabled",T=setTimeout(function(){f(g,a)},10),n.log(g),new o.download(m,b,p)):(g="No suitable players found and fallback disabled",
f(g,r),n.log(g),m.parentNode.replaceChild(y,m))}}function d(e){g(M+e.message)}function h(e){g("Could not load plugins: "+e.message)}function p(e){g(e&&e.message?"Error loading playlist: "+e.message:M+"No playable sources found")}function f(e,t){T&&(clearTimeout(T),T=null),T=setTimeout(function(){T=null,l.dispatchEvent(i.JWPLAYER_SETUP_ERROR,{message:e,fallback:t})},0)}function g(e){D||(b.fallback?(D=a,t(m,e,b),f(e,a)):f(e,r))}var m,v,y,b=new o.config(l.config),S=b.width,w=b.height,M="Error loading player: ",I=e.plugins.loadPlugins(l.id,b.plugins),C=r,D=r,T=null;
return b.fallbackDiv&&(y=b.fallbackDiv,delete b.fallbackDiv),b.id=l.id,v=s.getElementById(l.id),b.aspectratio?l.config.aspectratio=b.aspectratio:delete l.config.aspectratio,m=s.createElement("div"),m.id=v.id,m.style.width=0<S.toString().indexOf("%")?S:S+"px",m.style.height=0<w.toString().indexOf("%")?w:w+"px",v.parentNode.replaceChild(m,v),this.embed=function(){D||(I.addEventListener(i.COMPLETE,u),I.addEventListener(i.ERROR,h),I.load())},this.errorScreen=g,this};e.embed.errorScreen=t}(jwplayer),function(e){
function t(e){if(e.playlist)for(var t=0;t<e.playlist.length;t++)e.playlist[t]=new a(e.playlist[t]);else{var r={};i.foreach(a.defaults,function(t){n(e,r,t)}),r.sources||(e.levels?(r.sources=e.levels,delete e.levels):(t={},n(e,t,"file"),n(e,t,"type"),r.sources=t.file?[t]:[])),e.playlist=[new a(r)]}}function n(e,t,n){i.exists(e[n])&&(t[n]=e[n],delete e[n])}var i=e.utils,a=e.playlist.item;(e.embed.config=function(n){var a={fallback:!0,height:270,primary:"html5",width:480,base:n.base?n.base:i.getScriptPath("jwplayer.js"),
aspectratio:""};n=i.extend(a,e.defaults,n);var a={type:"html5",src:n.base+"jwplayer.html5.js"},r={type:"flash",src:n.base+"jwplayer.flash.swf"};if(n.modes="flash"==n.primary?[r,a]:[a,r],n.listbar&&(n.playlistsize=n.listbar.size,n.playlistposition=n.listbar.position,n.playlistlayout=n.listbar.layout),n.flashplayer&&(r.src=n.flashplayer),n.html5player&&(a.src=n.html5player),t(n),r=n.aspectratio,"string"==typeof r&&i.exists(r)){var s=r.indexOf(":");-1==s?a=0:(a=parseFloat(r.substr(0,s)),r=parseFloat(r.substr(s+1)),
a=0>=a||0>=r?0:100*(r/a)+"%")}else a=0;return-1==n.width.toString().indexOf("%")?delete n.aspectratio:a?n.aspectratio=a:delete n.aspectratio,n}).addConfig=function(e,n){return t(n),i.extend(e,n)}}(jwplayer),function(e){var t=e.utils,n=document;e.embed.download=function(e,i,a){function r(e,i){for(var a=n.querySelectorAll(e),r=0;r<a.length;r++)t.foreach(i,function(e,t){a[r].style[e]=t})}function s(e,t,i){return e=n.createElement(e),t&&(e.className="jwdownload"+t),i&&i.appendChild(e),e}var o,l=t.extend({},i),c=l.width?l.width:480,u=l.height?l.height:320;
i=i.logo?i.logo:{prefix:t.repo(),file:"logo.png",margin:10};var d,h,p,f,l=l.playlist,g=["mp4","aac","mp3"];if(l&&l.length){for(f=l[0],o=f.sources,l=0;l<o.length;l++){var m=o[l],v=m.type?m.type:t.extensionmap.extType(t.extension(m.file));m.file&&t.foreach(g,function(e){v==g[e]?(d=m.file,h=f.image):t.isYouTube(m.file)&&(p=m.file)})}d?(o=d,a=h,e&&(l=s("a","display",e),s("div","icon",l),s("div","logo",l),o&&l.setAttribute("href",t.getAbsolutePath(o))),l="#"+e.id+" .jwdownload",e.style.width="",e.style.height="",
r(l+"display",{width:t.styleDimension(Math.max(320,c)),height:t.styleDimension(Math.max(180,u)),background:"black center no-repeat "+(a?"url("+a+")":""),backgroundSize:"contain",position:"relative",border:"none",display:"block"}),r(l+"display div",{position:"absolute",width:"100%",height:"100%"}),r(l+"logo",{top:i.margin+"px",right:i.margin+"px",background:"top right no-repeat url("+i.prefix+i.file+")"}),r(l+"icon",{background:"center no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAgNJREFUeNrs28lqwkAYB/CZqNVDDj2r6FN41QeIy8Fe+gj6BL275Q08u9FbT8ZdwVfotSBYEPUkxFOoks4EKiJdaDuTjMn3wWBO0V/+sySR8SNSqVRKIR8qaXHkzlqS9jCfzzWcTCYp9hF5o+59sVjsiRzcegSckFzcjT+ruN80TeSlAjCAAXzdJSGPFXRpAAMYwACGZQkSdhG4WCzehMNhqV6vG6vVSrirKVEw66YoSqDb7cqlUilE8JjHd/y1MQefVzqdDmiaJpfLZWHgXMHn8F6vJ1cqlVAkEsGuAn83J4gAd2RZymQygX6/L1erVQt+9ZPWb+CDwcCC2zXGJaewl/DhcHhK3DVj+KfKZrMWvFarcYNLomAv4aPRSFZVlTlcSPA5fDweW/BoNIqFnKV53JvncjkLns/n/cLdS+92O7RYLLgsKfv9/t8XlDn4eDyiw+HA9Jyz2eyt0+kY2+3WFC5hluej0Ha7zQQq9PPwdDq1Et1sNsx/nFBgCqWJ8oAK1aUptNVqcYWewE4nahfU0YQnk4ntUEfGMIU2m01HoLaCKbTRaDgKtaVLk9tBYaBcE/6Artdr4RZ5TB6/dC+9iIe/WgAMYADDpAUJAxjAAAYwgGFZgoS/AtNNTF7Z2bL0BYPBV3Jw5xFwwWcYxgtBP5OkE8i9G7aWGOOCruvauwADALMLMEbKf4SdAAAAAElFTkSuQmCC)"
})):p?(i=p,e=s("iframe","",e),e.src="http://www.youtube.com/embed/"+t.youTubeID(i),e.width=c,e.height=u,e.style.border="none"):a()}}}(jwplayer),function(e){var t=e.utils,n=e.events,i={};(e.embed.flash=function(r,s,o,l,c){function u(e,t,n){var i=document.createElement("param");i.setAttribute("name",t),i.setAttribute("value",n),e.appendChild(i)}function d(e,t,n){return function(){try{n&&document.getElementById(c.id+"_wrapper").appendChild(t);var i=document.getElementById(c.id).getPluginConfig("display");
"function"==typeof e.resize&&e.resize(i.width,i.height),t.style.left=i.x,t.style.top=i.h}catch(e){}}}function h(e){if(!e)return{};var n={},i=[];return t.foreach(e,function(e,a){var r=t.getPluginName(e);i.push(e),t.foreach(a,function(e,t){n[r+"."+e]=t})}),n.plugins=i.join(","),n}var p=new e.events.eventdispatcher,f=t.flashVersion();t.extend(this,p),this.embed=function(){if(o.id=c.id,10>f)return p.sendEvent(n.ERROR,{message:"Flash version must be 10.0 or greater"}),!1;var e,a,g=c.config.listbar,m=t.extend({},o);
if(r.id+"_wrapper"==r.parentNode.id)e=document.getElementById(r.id+"_wrapper");else{if(e=document.createElement("div"),a=document.createElement("div"),a.style.display="none",a.id=r.id+"_aspect",e.id=r.id+"_wrapper",e.style.position="relative",e.style.display="block",e.style.width=t.styleDimension(m.width),e.style.height=t.styleDimension(m.height),c.config.aspectratio){var v=parseFloat(c.config.aspectratio);a.style.display="block",a.style.marginTop=c.config.aspectratio,e.style.height="auto",e.style.display="inline-block",
g&&("bottom"==g.position?a.style.paddingBottom=g.size+"px":"right"==g.position&&(a.style.marginBottom=-1*g.size*(v/100)+"px"))}r.parentNode.replaceChild(e,r),e.appendChild(r),e.appendChild(a)}for(e=l.setupPlugins(c,m,d),0<e.length?t.extend(m,h(e.plugins)):delete m.plugins,"undefined"!=typeof m["dock.position"]&&"false"==m["dock.position"].toString().toLowerCase()&&(m.dock=m["dock.position"],delete m["dock.position"]),e=m.wmode?m.wmode:m.height&&40>=m.height?"transparent":"opaque",a="height width modes events primary base fallback volume".split(" "),
g=0;g<a.length;g++)delete m[a[g]];a=t.getCookies(),t.foreach(a,function(e,t){"undefined"==typeof m[e]&&(m[e]=t)}),a=window.location.href.split("/"),a.splice(a.length-1,1),a=a.join("/"),m.base=a+"/",i[r.id]=m,t.isIE()?(a='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" " width="100%" height="100%"id="'+r.id+'" name="'+r.id+'" tabindex=0"">',a+='<param name="movie" value="'+s.src+'">',a+='<param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always">',a+='<param name="seamlesstabbing" value="true">',
a+='<param name="wmode" value="'+e+'">',a+='<param name="bgcolor" value="#000000">',a+="</object>",r.outerHTML=a,e=document.getElementById(r.id)):(a=document.createElement("object"),a.setAttribute("type","application/x-shockwave-flash"),a.setAttribute("data",s.src),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("bgcolor","#000000"),a.setAttribute("id",r.id),a.setAttribute("name",r.id),a.setAttribute("tabindex",0),u(a,"allowfullscreen","true"),u(a,"allowscriptaccess","always"),
u(a,"seamlesstabbing","true"),u(a,"wmode",e),r.parentNode.replaceChild(a,r),e=a),c.config.aspectratio&&(e.style.position="absolute"),c.container=e,c.setPlayer(e,"flash")},this.supportsConfig=function(){if(f){if(!o)return!0;if("string"==t.typeOf(o.playlist))return!0;try{var e=o.playlist[0].sources;if("undefined"==typeof e)return!0;for(var n=0;n<e.length;n++)if(e[n].file&&a(e[n].file,e[n].type))return!0}catch(e){}}return!1}}).getVars=function(e){return i[e]};var a=e.embed.flashCanPlay=function(e,n){
if(t.isYouTube(e)||t.isRtmp(e,n)||"hls"==n)return!0;var i=t.extensionmap[n?n:t.extension(e)];return!!i&&!!i.flash}}(jwplayer),function(e){var t=e.utils,n=t.extensionmap,i=e.events;e.embed.html5=function(a,r,s,o,l){function c(e,t,n){return function(){try{var i=document.querySelector("#"+a.id+" .jwmain");n&&i.appendChild(t),"function"==typeof e.resize&&(e.resize(i.clientWidth,i.clientHeight),setTimeout(function(){e.resize(i.clientWidth,i.clientHeight)},400)),t.left=i.style.left,t.top=i.style.top}catch(e){}
}}function u(e){d.sendEvent(e.type,{message:"HTML5 player not found"})}var d=this,h=new i.eventdispatcher;t.extend(d,h),d.embed=function(){if(e.html5){o.setupPlugins(l,s,c),a.innerHTML="";var n=e.utils.extend({},s);delete n.volume,n=new e.html5.player(n),l.container=document.getElementById(l.id),l.setPlayer(n,"html5")}else n=new t.scriptloader(r.src),n.addEventListener(i.ERROR,u),n.addEventListener(i.COMPLETE,d.embed),n.load()},d.supportsConfig=function(){if(e.vid.canPlayType)try{if("string"==t.typeOf(s.playlist))return!0;
for(var i=s.playlist[0].sources,a=0;a<i.length;a++){var r,o=i[a].file,l=i[a].type;if(null!==navigator.userAgent.match(/BlackBerry/i)||t.isAndroid()&&("m3u"==t.extension(o)||"m3u8"==t.extension(o))||t.isRtmp(o,l))r=!1;else{var c,u=n[l?l:t.extension(o)];if(!u||u.flash&&!u.html5)c=!1;else{var d=u.html5,h=e.vid;if(d)try{c=!!h.canPlayType(d)}catch(e){c=!1}else c=!0}r=c}if(r)return!0}}catch(e){}return!1}}}(jwplayer),function(e){var t=e.embed,n=e.utils,i=/\.(js|swf)$/;e.embed=n.extend(function(a){function r(){
s="Adobe SiteCatalyst Error: Could not find Media Module"}var s,o=n.repo(),l=n.extend({},e.defaults),c=n.extend({},l,a.config),u=a.config,d=c.plugins,h=c.analytics,p=o+"jwpsrv.js",f=o+"sharing.js",g=o+"related.js",m=o+"gapro.js",l=e.key?e.key:l.key,v=new e.utils.key(l).edition(),d=d?d:{};switch("ads"==v&&c.advertising&&(i.test(c.advertising.client)?d[c.advertising.client]=c.advertising:d[o+c.advertising.client+".js"]=c.advertising),delete u.advertising,u.key=l,c.analytics&&i.test(c.analytics.client)&&(p=c.analytics.client),
delete u.analytics,h&&"ads"!==v&&delete h.enabled,"free"!=v&&h&&!1===h.enabled||(d[p]=h?h:{}),delete d.sharing,delete d.related,v){case"ads":if(u.sitecatalyst)try{window.s&&window.s.hasOwnProperty("Media")?new e.embed.sitecatalyst(a):r()}catch(e){r()}case"premium":c.related&&(i.test(c.related.client)&&(g=c.related.client),d[g]=c.related),c.ga&&(i.test(c.ga.client)&&(m=c.ga.client),d[m]=c.ga);case"pro":c.sharing&&(i.test(c.sharing.client)&&(f=c.sharing.client),d[f]=c.sharing),c.skin&&(u.skin=c.skin.replace(/^(beelden|bekle|five|glow|modieus|roundster|stormtrooper|vapor)$/i,n.repo()+"skins/$1.xml"));
}return u.plugins=d,a.config=u,a=new t(a),s&&a.errorScreen(s),a},e.embed)}(jwplayer),function(e){var t=jwplayer.utils;e.sitecatalyst=function(e){function n(e){h.debug&&t.log(e)}function i(e){return e=e.split("/"),e=e[e.length-1],e=e.split("?"),e[0]}function a(){if(!f){f=!0;var e=d.getPosition();n("stop: "+o+" : "+e),s.Media.stop(o,e)}}function r(){g||(a(),g=!0,n("close: "+o),s.Media.close(o),u=!0,c=0)}var o,l,c,u,d=e,h=t.extend({},d.config.sitecatalyst),p={onPlay:function(){if(!u){var e=d.getPosition();
f=!1,n("play: "+o+" : "+e),s.Media.play(o,e)}},onPause:a,onBuffer:a,onIdle:r,onPlaylistItem:function(e){try{u=!0,r(),c=0;var n;if(h.mediaName)n=h.mediaName;else{var a=d.getPlaylistItem(e.index);n=a.title?a.title:a.file?i(a.file):a.sources&&a.sources.length?i(a.sources[0].file):""}o=n,l=h.playerName?h.playerName:d.id}catch(e){t.log(e)}},onTime:function(){if(u){var e=d.getDuration();if(-1==e)return;g=f=u=!1,n("open: "+o+" : "+e+" : "+l),s.Media.open(o,e,l),n("play: "+o+" : 0"),s.Media.play(o,0)}if(e=d.getPosition(),
3<=Math.abs(e-c)){var t=c;n("seek: "+t+" to "+e),n("stop: "+o+" : "+t),s.Media.stop(o,t),n("play: "+o+" : "+e),s.Media.play(o,e)}c=e},onComplete:r},f=!0,g=!0;t.foreach(p,function(e){d[e](p[e])})}}(jwplayer.embed),function(e,t){var n=[],i=e.utils,a=e.events,r=a.state,s=document,o=e.api=function(n){function l(e,t){return function(n){return t(e,n)}}function c(e,t){return v[e]||(v[e]=[],d(a.JWPLAYER_PLAYER_STATE,function(t){var n=t.newstate;if(t=t.oldstate,n==e){var i=v[n];if(i)for(var a=0;a<i.length;a++){
var r=i[a];"function"==typeof r&&r.call(this,{oldstate:t,newstate:n})}}})),v[e].push(t),g}function u(e,t){try{e.jwAddEventListener(t,'function(dat) { jwplayer("'+g.id+'").dispatchEvent("'+t+'", dat); }')}catch(e){i.log("Could not add internal listener")}}function d(e,t){return m[e]||(m[e]=[],p&&y&&u(p,e)),m[e].push(t),g}function h(){if(y){if(p){var e=Array.prototype.slice.call(arguments,0),t=e.shift();if("function"==typeof p[t]){switch(e.length){case 6:return p[t](e[0],e[1],e[2],e[3],e[4],e[5]);case 5:
return p[t](e[0],e[1],e[2],e[3],e[4]);case 4:return p[t](e[0],e[1],e[2],e[3]);case 3:return p[t](e[0],e[1],e[2]);case 2:return p[t](e[0],e[1]);case 1:return p[t](e[0])}return p[t]()}}return null}b.push(arguments)}var p,f,g=this,m={},v={},y=!1,b=[],S={},w={};g.container=n,g.id=n.id,g.getBuffer=function(){return h("jwGetBuffer")},g.getContainer=function(){return g.container},g.addButton=function(e,t,n,a){try{w[a]=n,h("jwDockAddButton",e,t,"jwplayer('"+g.id+"').callback('"+a+"')",a)}catch(e){i.log("Could not add dock button"+e.message);
}},g.removeButton=function(e){h("jwDockRemoveButton",e)},g.callback=function(e){w[e]&&w[e]()},g.forceState=function(e){return h("jwForceState",e),g},g.releaseState=function(){return h("jwReleaseState")},g.getDuration=function(){return h("jwGetDuration")},g.getFullscreen=function(){return h("jwGetFullscreen")},g.getHeight=function(){return h("jwGetHeight")},g.getLockState=function(){return h("jwGetLockState")},g.getMeta=function(){return g.getItemMeta()},g.getMute=function(){return h("jwGetMute")},
g.getPlaylist=function(){var e=h("jwGetPlaylist");return"flash"==g.renderingMode&&i.deepReplaceKeyName(e,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]),e},g.getPlaylistItem=function(e){return i.exists(e)||(e=g.getPlaylistIndex()),g.getPlaylist()[e]},g.getPlaylistIndex=function(){return h("jwGetPlaylistIndex")},g.getPosition=function(){return h("jwGetPosition")},g.getRenderingMode=function(){return g.renderingMode},g.getState=function(){return h("jwGetState")},g.getVolume=function(){
return h("jwGetVolume")},g.getWidth=function(){return h("jwGetWidth")},g.setFullscreen=function(e){return i.exists(e)?h("jwSetFullscreen",e):h("jwSetFullscreen",!h("jwGetFullscreen")),g},g.setMute=function(e){return i.exists(e)?h("jwSetMute",e):h("jwSetMute",!h("jwGetMute")),g},g.lock=function(){return g},g.unlock=function(){return g},g.load=function(e){return h("jwLoad",e),g},g.playlistItem=function(e){return h("jwPlaylistItem",parseInt(e,10)),g},g.playlistPrev=function(){return h("jwPlaylistPrev"),
g},g.playlistNext=function(){return h("jwPlaylistNext"),g},g.resize=function(e,t){if("flash"!==g.renderingMode)h("jwResize",e,t);else{var n=s.getElementById(g.id+"_wrapper"),a=s.getElementById(g.id+"_aspect");a&&(a.style.display="none"),n&&(n.style.display="block",n.style.width=i.styleDimension(e),n.style.height=i.styleDimension(t))}return g},g.play=function(e){return e===t?(e=g.getState(),h(e==r.PLAYING||e==r.BUFFERING?"jwPause":"jwPlay")):h("jwPlay",e),g},g.pause=function(e){return e===t?(e=g.getState(),
h(e==r.PLAYING||e==r.BUFFERING?"jwPause":"jwPlay")):h("jwPause",e),g},g.stop=function(){return h("jwStop"),g},g.seek=function(e){return h("jwSeek",e),g},g.setVolume=function(e){return h("jwSetVolume",e),g},g.createInstream=function(){return new o.instream(this,p)},g.setInstream=function(e){return f=e},g.loadInstream=function(e,t){return f=g.setInstream(g.createInstream()).init(t),f.loadItem(e),f},g.getQualityLevels=function(){return h("jwGetQualityLevels")},g.getCurrentQuality=function(){return h("jwGetCurrentQuality");
},g.setCurrentQuality=function(e){h("jwSetCurrentQuality",e)},g.getCaptionsList=function(){return h("jwGetCaptionsList")},g.getCurrentCaptions=function(){return h("jwGetCurrentCaptions")},g.setCurrentCaptions=function(e){h("jwSetCurrentCaptions",e)},g.getControls=function(){return h("jwGetControls")},g.getSafeRegion=function(){return h("jwGetSafeRegion")},g.setControls=function(e){h("jwSetControls",e)},g.destroyPlayer=function(){h("jwPlayerDestroy")},g.playAd=function(t){var n=e(g.id).plugins;n.vast&&n.vast.jwPlayAd(t);
},g.pauseAd=function(){var t=e(g.id).plugins;t.vast?t.vast.jwPauseAd():h("jwPauseAd")};var M={onBufferChange:a.JWPLAYER_MEDIA_BUFFER,onBufferFull:a.JWPLAYER_MEDIA_BUFFER_FULL,onError:a.JWPLAYER_ERROR,onSetupError:a.JWPLAYER_SETUP_ERROR,onFullscreen:a.JWPLAYER_FULLSCREEN,onMeta:a.JWPLAYER_MEDIA_META,onMute:a.JWPLAYER_MEDIA_MUTE,onPlaylist:a.JWPLAYER_PLAYLIST_LOADED,onPlaylistItem:a.JWPLAYER_PLAYLIST_ITEM,onPlaylistComplete:a.JWPLAYER_PLAYLIST_COMPLETE,onReady:a.API_READY,onResize:a.JWPLAYER_RESIZE,
onComplete:a.JWPLAYER_MEDIA_COMPLETE,onSeek:a.JWPLAYER_MEDIA_SEEK,onTime:a.JWPLAYER_MEDIA_TIME,onVolume:a.JWPLAYER_MEDIA_VOLUME,onBeforePlay:a.JWPLAYER_MEDIA_BEFOREPLAY,onBeforeComplete:a.JWPLAYER_MEDIA_BEFORECOMPLETE,onDisplayClick:a.JWPLAYER_DISPLAY_CLICK,onControls:a.JWPLAYER_CONTROLS,onQualityLevels:a.JWPLAYER_MEDIA_LEVELS,onQualityChange:a.JWPLAYER_MEDIA_LEVEL_CHANGED,onCaptionsList:a.JWPLAYER_CAPTIONS_LIST,onCaptionsChange:a.JWPLAYER_CAPTIONS_CHANGED,onAdError:a.JWPLAYER_AD_ERROR,onAdClick:a.JWPLAYER_AD_CLICK,
onAdImpression:a.JWPLAYER_AD_IMPRESSION,onAdTime:a.JWPLAYER_AD_TIME,onAdComplete:a.JWPLAYER_AD_COMPLETE,onAdCompanions:a.JWPLAYER_AD_COMPANIONS,onAdSkipped:a.JWPLAYER_AD_SKIPPED};i.foreach(M,function(e){g[e]=l(M[e],d)});var I={onBuffer:r.BUFFERING,onPause:r.PAUSED,onPlay:r.PLAYING,onIdle:r.IDLE};return i.foreach(I,function(e){g[e]=l(I[e],c)}),g.remove=function(){if(!y)throw"Cannot call remove() before player is ready";b=[],o.destroyPlayer(this.id)},g.setup=function(t){if(e.embed){var n=s.getElementById(g.id);
return n&&(t.fallbackDiv=n),n=g,b=[],o.destroyPlayer(n.id),n=e(g.id),n.config=t,new e.embed(n).embed(),n}return g},g.registerPlugin=function(t,n,i,a){e.plugins.registerPlugin(t,n,i,a)},g.setPlayer=function(e,t){p=e,g.renderingMode=t},g.detachMedia=function(){if("html5"==g.renderingMode)return h("jwDetachMedia")},g.attachMedia=function(e){if("html5"==g.renderingMode)return h("jwAttachMedia",e)},g.removeEventListener=function(e,t){var n=m[e];if(n)for(var i=n.length;i--;)n[i]===t&&n.splice(i,1)},g.dispatchEvent=function(e,t){
var n=m[e];if(n)for(var n=n.slice(0),r=i.translateEventResponse(e,t),s=0;s<n.length;s++){var o=n[s];if("function"==typeof o)try{e===a.JWPLAYER_PLAYLIST_LOADED&&i.deepReplaceKeyName(r.playlist,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]),o.call(this,r)}catch(e){i.log("There was an error calling back an event handler")}}},g.dispatchInstreamEvent=function(e){f&&f.dispatchEvent(e,arguments)},g.callInternal=h,g.playerReady=function(e){for(y=!0,p||g.setPlayer(s.getElementById(e.id)),
g.container=s.getElementById(g.id),i.foreach(m,function(e){u(p,e)}),d(a.JWPLAYER_PLAYLIST_ITEM,function(){S={}}),d(a.JWPLAYER_MEDIA_META,function(e){i.extend(S,e.metadata)}),g.dispatchEvent(a.API_READY);0<b.length;)h.apply(this,b.shift())},g.getItemMeta=function(){return S},g.isBeforePlay=function(){return h("jwIsBeforePlay")},g.isBeforeComplete=function(){return h("jwIsBeforeComplete")},g};o.selectPlayer=function(e){var t;return i.exists(e)||(e=0),e.nodeType?t=e:"string"==typeof e&&(t=s.getElementById(e)),
t?(e=o.playerById(t.id))?e:o.addPlayer(new o(t)):"number"==typeof e?n[e]:null},o.playerById=function(e){for(var t=0;t<n.length;t++)if(n[t].id==e)return n[t];return null},o.addPlayer=function(e){for(var t=0;t<n.length;t++)if(n[t]==e)return e;return n.push(e),e},o.destroyPlayer=function(e){for(var t,a=-1,r=0;r<n.length;r++)n[r].id==e&&(a=r,t=n[r]);return 0<=a&&(e=t.id,r=s.getElementById(e+("flash"==t.renderingMode?"_wrapper":"")),i.clearCss&&i.clearCss("#"+e),r&&("html5"==t.renderingMode&&t.destroyPlayer(),
t=s.createElement("div"),t.id=e,r.parentNode.replaceChild(t,r)),n.splice(a,1)),null},e.playerReady=function(t){var n=e.api.playerById(t.id);n?n.playerReady(t):e.api.selectPlayer(t.id).playerReady(t)}}(window.jwplayer),function(e){var t=e.events,n=e.utils,i=t.state;e.api.instream=function(e,a){function r(t,n){return c[t]||(c[t]=[],a.jwInstreamAddEventListener(t,'function(dat) { jwplayer("'+e.id+'").dispatchInstreamEvent("'+t+'", dat); }')),c[t].push(n),this}function s(e,n){return u[e]||(u[e]=[],r(t.JWPLAYER_PLAYER_STATE,function(t){
var n=t.newstate,i=t.oldstate;if(n==e){var a=u[n];if(a)for(var r=0;r<a.length;r++){var s=a[r];"function"==typeof s&&s.call(this,{oldstate:i,newstate:n,type:t.type})}}})),u[e].push(n),this}var o,l,c={},u={},d=this;d.type="instream",d.init=function(){return e.callInternal("jwInitInstream"),d},d.loadItem=function(t,i){o=t,l=i||{},"array"==n.typeOf(t)?e.callInternal("jwLoadArrayInstream",o,l):e.callInternal("jwLoadItemInstream",o,l)},d.removeEvents=function(){c=u={}},d.removeEventListener=function(e,t){
var n=c[e];if(n)for(var i=n.length;i--;)n[i]===t&&n.splice(i,1)},d.dispatchEvent=function(e,t){var i=c[e];if(i)for(var i=i.slice(0),a=n.translateEventResponse(e,t[1]),r=0;r<i.length;r++){var s=i[r];"function"==typeof s&&s.call(this,a)}},d.onError=function(e){return r(t.JWPLAYER_ERROR,e)},d.onMediaError=function(e){return r(t.JWPLAYER_MEDIA_ERROR,e)},d.onFullscreen=function(e){return r(t.JWPLAYER_FULLSCREEN,e)},d.onMeta=function(e){return r(t.JWPLAYER_MEDIA_META,e)},d.onMute=function(e){return r(t.JWPLAYER_MEDIA_MUTE,e);
},d.onComplete=function(e){return r(t.JWPLAYER_MEDIA_COMPLETE,e)},d.onPlaylistComplete=function(e){return r(t.JWPLAYER_PLAYLIST_COMPLETE,e)},d.onPlaylistItem=function(e){return r(t.JWPLAYER_PLAYLIST_ITEM,e)},d.onTime=function(e){return r(t.JWPLAYER_MEDIA_TIME,e)},d.onBuffer=function(e){return s(i.BUFFERING,e)},d.onPause=function(e){return s(i.PAUSED,e)},d.onPlay=function(e){return s(i.PLAYING,e)},d.onIdle=function(e){return s(i.IDLE,e)},d.onClick=function(e){return r(t.JWPLAYER_INSTREAM_CLICK,e)},
d.onInstreamDestroyed=function(e){return r(t.JWPLAYER_INSTREAM_DESTROYED,e)},d.onAdSkipped=function(e){return r(t.JWPLAYER_AD_SKIPPED,e)},d.play=function(e){a.jwInstreamPlay(e)},d.pause=function(e){a.jwInstreamPause(e)},d.hide=function(){e.callInternal("jwInstreamHide")},d.destroy=function(){d.removeEvents(),e.callInternal("jwInstreamDestroy")},d.setText=function(e){a.jwInstreamSetText(e?e:"")},d.getState=function(){return a.jwInstreamState()},d.setClick=function(e){a.jwInstreamClick&&a.jwInstreamClick(e);
}}}(window.jwplayer),function(e){var t=e.api,n=t.selectPlayer;t.selectPlayer=function(t){return(t=n(t))?t:{registerPlugin:function(t,n,i){e.plugins.registerPlugin(t,n,i)}}}}(jwplayer)),e.exports=jwplayer},function(e,t){var n=function(){function e(){if(!W){try{var e=j.getElementsByTagName("body")[0].appendChild(v("span"));e.parentNode.removeChild(e)}catch(e){return}W=!0;for(var t=F.length,n=0;n<t;n++)F[n]()}}function t(e){W?e():F[F.length]=e}function i(e){if(typeof R.addEventListener!=E)R.addEventListener("load",e,!1);else if(typeof j.addEventListener!=E)j.addEventListener("load",e,!1);else if(typeof R.attachEvent!=E)y(R,"onload",e);else if("function"==typeof R.onload){
var t=R.onload;R.onload=function(){t(),e()}}else R.onload=e}function a(){U?r():s()}function r(){var e=j.getElementsByTagName("body")[0],t=v(A);t.setAttribute("type",N);var n=e.appendChild(t);if(n){var i=0;!function(){if(typeof n.GetVariable!=E){var a=n.GetVariable("$version");a&&(a=a.split(" ")[1].split(","),G.pv=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)])}else if(i<10)return i++,void setTimeout(arguments.callee,10);e.removeChild(t),n=null,s()}()}else s()}function s(){var e=B.length;if(e>0)for(var t=0;t<e;t++){
var n=B[t].id,i=B[t].callbackFn,a={success:!1,id:n};if(G.pv[0]>0){var r=m(n);if(r)if(!b(B[t].swfVersion)||G.wk&&G.wk<312)if(B[t].expressInstall&&l()){var s={};s.data=B[t].expressInstall,s.width=r.getAttribute("width")||"0",s.height=r.getAttribute("height")||"0",r.getAttribute("class")&&(s.styleclass=r.getAttribute("class")),r.getAttribute("align")&&(s.align=r.getAttribute("align"));for(var d={},h=r.getElementsByTagName("param"),p=h.length,f=0;f<p;f++)"movie"!=h[f].getAttribute("name").toLowerCase()&&(d[h[f].getAttribute("name")]=h[f].getAttribute("value"));
c(s,d,n,i)}else u(r),i&&i(a);else w(n,!0),i&&(a.success=!0,a.ref=o(n),i(a))}else if(w(n,!0),i){var g=o(n);g&&typeof g.SetVariable!=E&&(a.success=!0,a.ref=g),i(a)}}}function o(e){var t=null,n=m(e);if(n&&"OBJECT"==n.nodeName)if(typeof n.SetVariable!=E)t=n;else{var i=n.getElementsByTagName(A)[0];i&&(t=i)}return t}function l(){return!Q&&b("6.0.65")&&(G.win||G.mac)&&!(G.wk&&G.wk<312)}function c(e,t,n,i){Q=!0,D=i||null,T={success:!1,id:n};var a=m(n);if(a){"OBJECT"==a.nodeName?(I=d(a),C=null):(I=a,C=n),
e.id=_,(typeof e.width==E||!/%$/.test(e.width)&&parseInt(e.width,10)<310)&&(e.width="310"),(typeof e.height==E||!/%$/.test(e.height)&&parseInt(e.height,10)<137)&&(e.height="137"),j.title=j.title.slice(0,47)+" - Flash Player Installation";var r=G.ie&&G.win?"ActiveX":"PlugIn",s="MMredirectURL="+R.location.toString().replace(/&/g,"%26")+"&MMplayerType="+r+"&MMdoctitle="+j.title;if(typeof t.flashvars!=E?t.flashvars+="&"+s:t.flashvars=s,G.ie&&G.win&&4!=a.readyState){var o=v("div");n+="SWFObjectNew",o.setAttribute("id",n),
a.parentNode.insertBefore(o,a),a.style.display="none",function(){4==a.readyState?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)}()}h(e,t,n)}}function u(e){if(G.ie&&G.win&&4!=e.readyState){var t=v("div");e.parentNode.insertBefore(t,e),t.parentNode.replaceChild(d(e),t),e.style.display="none",function(){4==e.readyState?e.parentNode.removeChild(e):setTimeout(arguments.callee,10)}()}else e.parentNode.replaceChild(d(e),e)}function d(e){var t=v("div");if(G.win&&G.ie)t.innerHTML=e.innerHTML;else{
var n=e.getElementsByTagName(A)[0];if(n){var i=n.childNodes;if(i)for(var a=i.length,r=0;r<a;r++)1==i[r].nodeType&&"PARAM"==i[r].nodeName||8==i[r].nodeType||t.appendChild(i[r].cloneNode(!0))}}return t}function h(e,t,n){var i,a=m(n);if(G.wk&&G.wk<312)return i;if(a)if(typeof e.id==E&&(e.id=n),G.ie&&G.win){var r="";for(var s in e)e[s]!=Object.prototype[s]&&("data"==s.toLowerCase()?t.movie=e[s]:"styleclass"==s.toLowerCase()?r+=' class="'+e[s]+'"':"classid"!=s.toLowerCase()&&(r+=" "+s+'="'+e[s]+'"'));var o="";
for(var l in t)t[l]!=Object.prototype[l]&&(o+='<param name="'+l+'" value="'+t[l]+'" />');a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+r+">"+o+"</object>",V[V.length]=e.id,i=m(e.id)}else{var c=v(A);c.setAttribute("type",N);for(var u in e)e[u]!=Object.prototype[u]&&("styleclass"==u.toLowerCase()?c.setAttribute("class",e[u]):"classid"!=u.toLowerCase()&&c.setAttribute(u,e[u]));for(var d in t)t[d]!=Object.prototype[d]&&"movie"!=d.toLowerCase()&&p(c,d,t[d]);a.parentNode.replaceChild(c,a),
i=c}return i}function p(e,t,n){var i=v("param");i.setAttribute("name",t),i.setAttribute("value",n),e.appendChild(i)}function f(e){var t=m(e);t&&"OBJECT"==t.nodeName&&(G.ie&&G.win?(t.style.display="none",function(){4==t.readyState?g(e):setTimeout(arguments.callee,10)}()):t.parentNode.removeChild(t))}function g(e){var t=m(e);if(t){for(var n in t)"function"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}}function m(e){var t=null;try{t=j.getElementById(e)}catch(e){}return t}function v(e){return j.createElement(e);
}function y(e,t,n){e.attachEvent(t,n),H[H.length]=[e,t,n]}function b(e){var t=G.pv,n=e.split(".");return n[0]=parseInt(n[0],10),n[1]=parseInt(n[1],10)||0,n[2]=parseInt(n[2],10)||0,t[0]>n[0]||t[0]==n[0]&&t[1]>n[1]||t[0]==n[0]&&t[1]==n[1]&&t[2]>=n[2]}function S(e,t,n,i){if(!G.ie||!G.mac){var a=j.getElementsByTagName("head")[0];if(a){var r=n&&"string"==typeof n?n:"screen";if(i&&(x=null,P=null),!x||P!=r){var s=v("style");s.setAttribute("type","text/css"),s.setAttribute("media",r),x=a.appendChild(s),G.ie&&G.win&&typeof j.styleSheets!=E&&j.styleSheets.length>0&&(x=j.styleSheets[j.styleSheets.length-1]),
P=r}G.ie&&G.win?x&&typeof x.addRule==A&&x.addRule(e,t):x&&typeof j.createTextNode!=E&&x.appendChild(j.createTextNode(e+" {"+t+"}"))}}}function w(e,t){if(Y){var n=t?"visible":"hidden";W&&m(e)?m(e).style.visibility=n:S("#"+e,"visibility:"+n)}}function M(e){var t=/[\\\"<>\.;]/,n=null!=t.exec(e);return n&&typeof encodeURIComponent!=E?encodeURIComponent(e):e}var I,C,D,T,x,P,E="undefined",A="object",L="Shockwave Flash",k="ShockwaveFlash.ShockwaveFlash",N="application/x-shockwave-flash",_="SWFObjectExprInst",O="onreadystatechange",R=window,j=document,z=navigator,U=!1,F=[a],B=[],V=[],H=[],W=!1,Q=!1,Y=!0,G=function(){
var e=typeof j.getElementById!=E&&typeof j.getElementsByTagName!=E&&typeof j.createElement!=E,t=z.userAgent.toLowerCase(),n=z.platform.toLowerCase(),i=n?/win/.test(n):/win/.test(t),a=n?/mac/.test(n):/mac/.test(t),r=!!/webkit/.test(t)&&parseFloat(t.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),s=!1,o=[0,0,0],l=null;if(typeof z.plugins!=E&&typeof z.plugins[L]==A)l=z.plugins[L].description,!l||typeof z.mimeTypes!=E&&z.mimeTypes[N]&&!z.mimeTypes[N].enabledPlugin||(U=!0,s=!1,l=l.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),
o[0]=parseInt(l.replace(/^(.*)\..*$/,"$1"),10),o[1]=parseInt(l.replace(/^.*\.(.*)\s.*$/,"$1"),10),o[2]=/[a-zA-Z]/.test(l)?parseInt(l.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof R.ActiveXObject!=E)try{var c=new ActiveXObject(k);c&&(l=c.GetVariable("$version"),l&&(s=!0,l=l.split(" ")[1].split(","),o=[parseInt(l[0],10),parseInt(l[1],10),parseInt(l[2],10)]))}catch(e){}return{w3:e,pv:o,wk:r,ie:s,win:i,mac:a}}();(function(){G.w3&&((typeof j.readyState!=E&&"complete"==j.readyState||typeof j.readyState==E&&(j.getElementsByTagName("body")[0]||j.body))&&e(),
W||(typeof j.addEventListener!=E&&j.addEventListener("DOMContentLoaded",e,!1),G.ie&&G.win&&(j.attachEvent(O,function(){"complete"==j.readyState&&(j.detachEvent(O,arguments.callee),e())}),R==top&&!function(){if(!W){try{j.documentElement.doScroll("left")}catch(e){return void setTimeout(arguments.callee,0)}e()}}()),G.wk&&!function(){if(!W)return/loaded|complete/.test(j.readyState)?void e():void setTimeout(arguments.callee,0)}(),i(e)))})(),function(){G.ie&&G.win&&window.attachEvent("onunload",function(){
for(var e=H.length,t=0;t<e;t++)H[t][0].detachEvent(H[t][1],H[t][2]);for(var i=V.length,a=0;a<i;a++)f(V[a]);for(var r in G)G[r]=null;G=null;for(var s in n)n[s]=null;n=null})}();return{registerObject:function(e,t,n,i){if(G.w3&&e&&t){var a={};a.id=e,a.swfVersion=t,a.expressInstall=n,a.callbackFn=i,B[B.length]=a,w(e,!1)}else i&&i({success:!1,id:e})},getObjectById:function(e){if(G.w3)return o(e)},embedSWF:function(e,n,i,a,r,s,o,u,d,p){var f={success:!1,id:n};G.w3&&!(G.wk&&G.wk<312)&&e&&n&&i&&a&&r?(w(n,!1),
t(function(){i+="",a+="";var t={};if(d&&typeof d===A)for(var g in d)t[g]=d[g];t.data=e,t.width=i,t.height=a;var m={};if(u&&typeof u===A)for(var v in u)m[v]=u[v];if(o&&typeof o===A)for(var y in o)typeof m.flashvars!=E?m.flashvars+="&"+y+"="+o[y]:m.flashvars=y+"="+o[y];if(b(r)){var S=h(t,m,n);t.id==n&&w(n,!0),f.success=!0,f.ref=S}else{if(s&&l())return t.data=s,void c(t,m,n,p);w(n,!0)}p&&p(f)})):p&&p(f)},switchOffAutoHideShow:function(){Y=!1},ua:G,getFlashPlayerVersion:function(){return{major:G.pv[0],
minor:G.pv[1],release:G.pv[2]}},hasFlashPlayerVersion:b,createSWF:function(e,t,n){return G.w3?h(e,t,n):void 0},showExpressInstall:function(e,t,n,i){G.w3&&l()&&c(e,t,n,i)},removeSWF:function(e){G.w3&&f(e)},createCSS:function(e,t,n,i){G.w3&&S(e,t,n,i)},addDomLoadEvent:t,addLoadEvent:i,getQueryParamValue:function(e){var t=j.location.search||j.location.hash;if(t){if(/\?/.test(t)&&(t=t.split("?")[1]),null==e)return M(t);for(var n=t.split("&"),i=0;i<n.length;i++)if(n[i].substring(0,n[i].indexOf("="))==e)return M(n[i].substring(n[i].indexOf("=")+1));
}return""},expressInstallCallback:function(){if(Q){var e=m(_);e&&I&&(e.parentNode.replaceChild(I,e),C&&(w(C,!0),G.ie&&G.win&&(I.style.display="block")),D&&D(T)),Q=!1}}}}();e.exports=n},function(e,t){e.exports={container:"Measure-container-sqMtz",scrollContainer:"Measure-scrollContainer-2e8Ny",expandContent:"Measure-expandContent-2L0Xd",shrinkContent:"Measure-shrinkContent-lvKC7 Measure-expandContent-2L0Xd"}},function(e,t){e.exports={cell:"virtualized-cell-2EX52",isMoving:"virtualized-isMoving-1F4jb"
}},function(e,t){e.exports={wrapper:"AbstractReactPageView-wrapper-3OW78"}},function(e,t){e.exports={pageContainer:"ReactCapturePageView-pageContainer-1Khtw"}},function(e,t){e.exports={sidebarContainer:"ReactSidebarPageView-sidebarContainer-1dEmt",pageContainer:"ReactSidebarPageView-pageContainer-1bcfz"}},function(e,t){e.exports={page:"PhotoAlbumDetailsView-page-18TbK"}},function(e,t){e.exports={anagram:"Anagram-anagram-1Hlqt"}},function(e,t){e.exports={badge:"Badge-badge-3Bl8W",isHidden:"Badge-isHidden-1BwbX",
default:"Badge-default-eSs7w",primary:"Badge-primary-3TAhL",success:"Badge-success-1i1sr",danger:"Badge-danger-1Nwr1"}},function(e,t){e.exports={circularProgressBarContainer:"CircularProgressBar-circularProgressBarContainer-gT0YK",absoluteCenterCircularProgressBarContainer:"CircularProgressBar-absoluteCenterCircularProgressBarContainer-3Kbkc absoluteCenter-absoluteCenter-3-Tjr",circularProgressBar:"CircularProgressBar-circularProgressBar-2_WaT",circularProgressBarBackground:"CircularProgressBar-circularProgressBarBackground-3BdDt absoluteCenter-absoluteCenter-3-Tjr",
circularProgressBarText:"CircularProgressBar-circularProgressBarText-2Yq9k"}},function(e,t){e.exports={lineHeightMeasure:"CollapsibleText-lineHeightMeasure-3CVbl",contentTransition:"CollapsibleText-contentTransition-23OAb",readMore:"CollapsibleText-readMore-u67n0",readMoreArrow:"CollapsibleText-readMoreArrow-87Fmg DisclosureArrow-default-2XoT4"}},function(e,t){e.exports={separator:"DashSeparator-separator-1aUG6"}},function(e,t){e.exports={disclosureArrow:"DisclosureArrow-disclosureArrow-gfrtK",default:"DisclosureArrow-default-2XoT4",
primary:"DisclosureArrow-primary-3qk0b",success:"DisclosureArrow-success-1Lopg",danger:"DisclosureArrow-danger-3T4pT",small:"DisclosureArrow-small-3DsCx",up:"DisclosureArrow-up-kPsMB",down:"DisclosureArrow-down-3u1wF",right:"DisclosureArrow-right-30P-C",left:"DisclosureArrow-left-1c5uq",medium:"DisclosureArrow-medium-3v7QT",large:"DisclosureArrow-large-3N-21",isSelected:"DisclosureArrow-isSelected-3GbwP"}},function(e,t){e.exports={dragLayer:"DragPreviewLayer-dragLayer-nFK2W"}},function(e,t){e.exports={
grid:"FlexGrid-grid-stq6c"}},function(e,t){e.exports={takeOver:"Overlay-takeOver-4ziz_",contents:"Overlay-contents-26UJW",enter:"Overlay-enter-3xjFk",enterActive:"Overlay-enterActive-3HrXC",leave:"Overlay-leave-1Porg",leaveActive:"Overlay-leaveActive-2G4At"}},function(e,t){e.exports={plexPassIcon:"PlexPassBadge-plexPassIcon-A77hU"}},function(e,t){e.exports={scroller:"Scroller-scroller-3dIYI",none:"Scroller-none-2Dk2v",vertical:"Scroller-vertical-b0trl",auto:"Scroller-auto-3k65H",horizontal:"Scroller-horizontal-2B8rQ",
omni:"Scroller-omni-2Zlik"}},function(e,t){e.exports={slider:"Slider-slider-2hb32",thumb:"Slider-thumb-3Mq0Q Link-link-2wZEE",isDragging:"Slider-isDragging-2oq5T",hasAutoHideThumb:"Slider-hasAutoHideThumb-280nA",track:"Slider-track-2DISH absoluteCenter-absoluteCenter-3-Tjr",fill:"Slider-fill-2iSI6"}},function(e,t){e.exports={spinner:"Spinner-spinner-2calh spin-spin-3DhWc",spinnerContainer:"Spinner-spinnerContainer-vfC96",spinnerLabel:"Spinner-spinnerLabel-3k3_N",small:"Spinner-small-2VmRj Spinner-spinner-2calh spin-spin-3DhWc",
medium:"Spinner-medium-2xvrA Spinner-spinner-2calh spin-spin-3DhWc",large:"Spinner-large-HYRab Spinner-spinner-2calh spin-spin-3DhWc"}},function(e,t){e.exports={starRating:"StarRating-starRating-1Ah-g",stars:"StarRating-stars-M5hdp",emptyStars:"StarRating-emptyStars-3fP9y",star:"StarRating-star-PnG0B",dot:"StarRating-dot-3QqSN",enter:"StarRating-enter-1RTCc",enterActive:"StarRating-enterActive-3r-bP",leave:"StarRating-leave-K6XL-",leaveActive:"StarRating-leaveActive-8gs4G",isReadOnly:"StarRating-isReadOnly-1b7Ug",
isUnrated:"StarRating-isUnrated-3LoQq",slider:"StarRating-slider-1p_u2",track:"StarRating-track-2CXge"}},function(e,t){e.exports={button:"Button-button-3q-sB Link-link-2wZEE",default:"Button-default-26J-5",primary:"Button-primary-3B_Yf",success:"Button-success-x0DUC",danger:"Button-danger-D_ZtH",small:"Button-small-l404y",medium:"Button-medium-1fL_A",large:"Button-large-1CiJW"}},function(e,t){e.exports={button:"DisclosureArrowButton-button-mYlNb"}},function(e,t){e.exports={link:"Link-link-2wZEE",
default:"Link-default-1sSkX",primary:"Link-primary-3dgz2",success:"Link-success-17_R_",danger:"Link-danger-3J-0i",small:"Link-small-25E8W",medium:"Link-medium-2tCL-",large:"Link-large-20KSm",isSelected:"Link-isSelected-3uKOY",isActiveRoute:"Link-isActiveRoute-2L2XA"}},function(e,t){e.exports={playButton:"PlayButton-playButton-auoLt",playCircle:"PlayButton-playCircle-1aLOj",playIcon:"PlayButton-playIcon-3FLXQ"}},function(e,t){e.exports={recordButton:"RecordButton-recordButton-3PJnD PlayButton-playButton-auoLt",
recordCircle:"RecordButton-recordCircle-2EXnY PlayButton-playCircle-1aLOj",recordIcon:"RecordButton-recordIcon-1Vb2O absoluteCenter-absoluteCenter-3-Tjr"}},function(e,t){e.exports={selectButton:"SelectButton-selectButton-1ktQa",isSelected:"SelectButton-isSelected-1SG_U",selectCircle:"SelectButton-selectCircle-1L7KA",selectedIcon:"SelectButton-selectedIcon-11coB absoluteCenter-absoluteCenter-3-Tjr"}},function(e,t){e.exports={button:"SpinnerButton-button-36TbR Button-button-3q-sB Link-link-2wZEE",spinnerContainer:"SpinnerButton-spinnerContainer-2UjkJ",
spinner:"SpinnerButton-spinner-2Mstz Spinner-spinner-2calh spin-spin-3DhWc",label:"SpinnerButton-label-E7DXE",isSpinning:"SpinnerButton-isSpinning-3B8nK"}},function(e,t){e.exports={input:"CheckInput-input--GZRR",label:"CheckInput-label-2F4uA",small:"CheckInput-small-MnNBh",large:"CheckInput-large-1PGPq",isDisabled:"CheckInput-isDisabled-_CZrN",hasError:"CheckInput-hasError-19Rlr"}},function(e,t){e.exports={group:"FormGroup-group-1ndLJ"}},function(e,t){e.exports={help:"FormHelp-help-2kfsD"}},function(e,t){
e.exports={label:"FormLabel-label-2Jltc",hasError:"FormLabel-hasError-1nToZ"}},function(e,t){e.exports={sectionError:"FormSectionError-sectionError-2HjEe",sectionErrorIcon:"FormSectionError-sectionErrorIcon-2NOA0",sectionErrorDismiss:"FormSectionError-sectionErrorDismiss-1oCGC"}},function(e,t){e.exports={input:"NumberInputGroup-input-3qbCL TextInput-input-1tsVo input-input-2Sokt"}},function(e,t){e.exports={input:"SelectInput-input-vbkMT input-input-2Sokt",small:"SelectInput-small-3Mk4v input-small-3nq5L",
select:"SelectInput-select-2YnvV",large:"SelectInput-large-1PcZ4 input-large-30z10",isDisabled:"SelectInput-isDisabled-1hY-c",hasError:"SelectInput-hasError-QjJaM"}},function(e,t){e.exports={input:"TextInput-input-1tsVo input-input-2Sokt",small:"TextInput-small-3U-kn input-small-3nq5L",large:"TextInput-large-1lwq3 input-large-30z10",isDisabled:"TextInput-isDisabled-2neDn",hasError:"TextInput-hasError-1mH_A"}},function(e,t){e.exports={avatar:"AvatarImg-avatar-P4Cli"}},function(e,t){e.exports={card:"PosterCard-card-l4TPB"
}},function(e,t){e.exports={imageContainer:"PosterCardImg-imageContainer-3W2cJ cover-cover-2zml1"}},function(e,t){e.exports={scroller:"VirtualListScroller-scroller-3a5IA"}},function(e,t){e.exports={menuPortal:"Menu-menuPortal-34ZLC",menu:"Menu-menu-DTLJb",menuScroller:"Menu-menuScroller-2gPY1 Scroller-vertical-b0trl",enter:"Menu-enter-1RAHs",enterActive:"Menu-enterActive-1x55o",leave:"Menu-leave-2Iagg",leaveActive:"Menu-leaveActive-2nDxW"}},function(e,t){e.exports={menu:"MenuContainer-menu-3Y-MI resetFont-resetFont-ekCtc"
}},function(e,t){e.exports={menuItem:"MenuItem-menuItem-1TZOI",default:"MenuItem-default-1c5pq",primary:"MenuItem-primary-1JpHM",success:"MenuItem-success-30dXe",danger:"MenuItem-danger-hJ0cb"}},function(e,t){e.exports={separator:"MenuSeparator-separator-3CIjX"}},function(e,t){e.exports={menuItemContainer:"SelectedMenuItem-menuItemContainer-3ZzRi",menuLabel:"SelectedMenuItem-menuLabel-2d1zX",selectedIcon:"SelectedMenuItem-selectedIcon-1JZ63",isSelected:"SelectedMenuItem-isSelected-GRl6J"}},function(e,t){
e.exports={confirmBody:"ConfirmModal-confirmBody-2UTn9 ModalBody-modalScroller-3IjAh ModalBody-modalBody-3Uc96",accordLabel:"ConfirmModal-accordLabel-1om7V",accordInput:"ConfirmModal-accordInput-3TXow",cancelButton:"ConfirmModal-cancelButton-1OPdP",confirmButton:"ConfirmModal-confirmButton-19R4m"}},function(e,t){e.exports={modalContainer:"Modal-modalContainer-2_eTM resetFont-resetFont-ekCtc",modalBackdrop:"Modal-modalBackdrop-1gYne",modal:"Modal-modal-3O2mt",small:"Modal-small-3_7_d Modal-modal-3O2mt",
medium:"Modal-medium-uql8p Modal-modal-3O2mt",large:"Modal-large-3J-Uf Modal-modal-3O2mt",enter:"Modal-enter-1jnxP",enterActive:"Modal-enterActive-1tPiP",leave:"Modal-leave-ealFp",leaveActive:"Modal-leaveActive-vliDj"}},function(e,t){e.exports={modalBody:"ModalBody-modalBody-3Uc96",modalScroller:"ModalBody-modalScroller-3IjAh ModalBody-modalBody-3Uc96",innerModalBody:"ModalBody-innerModalBody-2gxHe"}},function(e,t){e.exports={modalContent:"ModalContent-modalContent-bEdmZ",closeButton:"ModalContent-closeButton-2xplI"
}},function(e,t){e.exports={modalScroller:"ModalContentCenter-modalScroller-3DjOE ModalBody-modalScroller-3IjAh ModalBody-modalBody-3Uc96",innerModalBody:"ModalContentCenter-innerModalBody-W1eSF ModalBody-innerModalBody-2gxHe absoluteCenter-absoluteCenter-3-Tjr"}},function(e,t){e.exports={icon:"ModalContentError-icon-2yeHQ",default:"ModalContentError-default-lbHo3",primary:"ModalContentError-primary-2IWBp",success:"ModalContentError-success-2l4Xp",danger:"ModalContentError-danger-2IzkP",message:"ModalContentError-message-1l-uF"
}},function(e,t){e.exports={modalFooter:"ModalFooter-modalFooter-u33FH"}},function(e,t){e.exports={buttonBar:"ModalFooterButtonBar-buttonBar-1SC1v"}},function(e,t){e.exports={modalHeader:"ModalHeader-modalHeader-3N0A7 truncate-truncate-2Z4gk"}},function(e,t){e.exports={toolbarButton:"ToolbarButton-toolbarButton-1gQOb",toolbarTooltip:"ToolbarButton-toolbarTooltip-1XT9d Tooltip-bottomCenter-3n87H Tooltip-tooltipArrow-3A7Ob Tooltip-tooltipTopArrow-3g459 Tooltip-tooltipCenterAlignArrow-3XMXO"}},function(e,t){
e.exports={toolbarMenu:"ToolbarMenu-toolbarMenu-2HC3X Menu-menu-DTLJb"}},function(e,t){e.exports={tooltipPortal:"Tooltip-tooltipPortal-3M_Ey",tooltip:"Tooltip-tooltip-25aMb resetFont-resetFont-ekCtc",tooltipArrow:"Tooltip-tooltipArrow-3A7Ob",tooltipBottomArrow:"Tooltip-tooltipBottomArrow-1s6on",tooltipTopArrow:"Tooltip-tooltipTopArrow-3g459",tooltipRightArrow:"Tooltip-tooltipRightArrow-j58G4",tooltipLeftArrow:"Tooltip-tooltipLeftArrow-3Q1VQ",tooltipCenterAlignArrow:"Tooltip-tooltipCenterAlignArrow-3XMXO",
tooltipLeftAlignArrow:"Tooltip-tooltipLeftAlignArrow-1v5xU",tooltipRightAlignArrow:"Tooltip-tooltipRightAlignArrow-CIENa",tooltipMiddleAlignArrow:"Tooltip-tooltipMiddleAlignArrow-LDpJU",topLeft:"Tooltip-topLeft-2Odf9 Tooltip-tooltipArrow-3A7Ob Tooltip-tooltipBottomArrow-1s6on Tooltip-tooltipLeftAlignArrow-1v5xU",topCenter:"Tooltip-topCenter-3Ltik Tooltip-tooltipArrow-3A7Ob Tooltip-tooltipBottomArrow-1s6on Tooltip-tooltipCenterAlignArrow-3XMXO",topRight:"Tooltip-topRight-2tv72 Tooltip-tooltipArrow-3A7Ob Tooltip-tooltipBottomArrow-1s6on Tooltip-tooltipRightAlignArrow-CIENa",
bottomLeft:"Tooltip-bottomLeft-SRTnc Tooltip-tooltipArrow-3A7Ob Tooltip-tooltipTopArrow-3g459 Tooltip-tooltipLeftAlignArrow-1v5xU",bottomCenter:"Tooltip-bottomCenter-3n87H Tooltip-tooltipArrow-3A7Ob Tooltip-tooltipTopArrow-3g459 Tooltip-tooltipCenterAlignArrow-3XMXO",bottomRight:"Tooltip-bottomRight-dzvXI Tooltip-tooltipArrow-3A7Ob Tooltip-tooltipTopArrow-3g459 Tooltip-tooltipRightAlignArrow-CIENa",middleLeft:"Tooltip-middleLeft-2KaSh Tooltip-tooltipArrow-3A7Ob Tooltip-tooltipRightArrow-j58G4 Tooltip-tooltipMiddleAlignArrow-LDpJU",
middleRight:"Tooltip-middleRight-1_O4m Tooltip-tooltipArrow-3A7Ob Tooltip-tooltipLeftArrow-3Q1VQ Tooltip-tooltipMiddleAlignArrow-LDpJU",enter:"Tooltip-enter-XjfPE",enterActive:"Tooltip-enterActive-2Fksy",leave:"Tooltip-leave-3LV9p",leaveActive:"Tooltip-leaveActive-15ET8"}},function(e,t){e.exports={liveTVSettings:"LiveTVSettings-liveTVSettings-qcb24 resetFont-resetFont-ekCtc",info:"LiveTVSettings-info-2L0zK"}},function(e,t){e.exports={device:"DVRDevice-device-2rPVD",deviceImage:"DVRDevice-deviceImage-1TCgk DVRDeviceImage-image-28E1H",
details:"DVRDevice-details-20bVZ",model:"DVRDevice-model-SRLwX",deviceSettingsIcon:"DVRDevice-deviceSettingsIcon-3aBY1",uri:"DVRDevice-uri-VMbal",deviceWarning:"DVRDevice-deviceWarning-18Ve8",deviceWarningIconContainer:"DVRDevice-deviceWarningIconContainer-35FKp",separator:"DVRDevice-separator-C24uY DashSeparator-separator-1aUG6",info:"DVRDevice-info-3_HwR",removeDeviceContainer:"DVRDevice-removeDeviceContainer-2auGf",removeDevice:"DVRDevice-removeDevice-3cxyw"}},function(e,t){e.exports={image:"DVRDeviceImage-image-28E1H",
small:"DVRDeviceImage-small-2z-b6",large:"DVRDeviceImage-large-3MX9i"}},function(e,t){e.exports={form:"DVRDeviceSettingsModalContent-form-pHgLH",container:"DVRDeviceSettingsModalContent-container-2RM6Q",info:"DVRDeviceSettingsModalContent-info-2wWC5",deviceImage:"DVRDeviceSettingsModalContent-deviceImage-3L5vq",model:"DVRDeviceSettingsModalContent-model-GUInR",settings:"DVRDeviceSettingsModalContent-settings-B9tyG"}},function(e,t){e.exports={dvr:"DVRListItem-dvr-3Q3j3",header:"DVRListItem-header-334j_",
separator:"DVRListItem-separator-19wSD DashSeparator-separator-1aUG6",name:"DVRListItem-name-3erSh truncate-truncate-2Z4gk",deleteLink:"DVRListItem-deleteLink-VkgkG",actions:"DVRListItem-actions-R1Y_g",actionIcon:"DVRListItem-actionIcon-4nTRp",devices:"DVRListItem-devices-1uZa0",addDeviceIcon:"DVRListItem-addDeviceIcon-1tqu5"}},function(e,t){e.exports={form:"DVRManageChannelsModalContent-form-KNDsG",manageChannelsBody:"DVRManageChannelsModalContent-manageChannelsBody-3fZmK ModalBody-modalBody-3Uc96",
scanChannelsContainer:"DVRManageChannelsModalContent-scanChannelsContainer-1RDS3",scanChannelsMessage:"DVRManageChannelsModalContent-scanChannelsMessage-3OoZb",scroller:"DVRManageChannelsModalContent-scroller-e_pqj Scroller-vertical-b0trl",centeredContainer:"DVRManageChannelsModalContent-centeredContainer-IS3No absoluteCenter-absoluteCenter-3-Tjr",progressContainer:"DVRManageChannelsModalContent-progressContainer-358AO"}},function(e,t){e.exports={form:"DVRSettingsModalContent-form-1UdNL"}},function(e,t){
e.exports={attribution:"GracenoteAttribution-attribution-ag5ic"}},function(e,t){e.exports={modal:"DVRSetupModal-modal-xQvQj Modal-medium-uql8p Modal-modal-3O2mt"}},function(e,t){e.exports={errorMessage:"DVRSetupModalContent-errorMessage-19Hum",errorIcon:"DVRSetupModalContent-errorIcon-nreWk"}},function(e,t){e.exports={footer:"DVRSetupModalFooter-footer-1ECZu ModalFooter-modalFooter-u33FH"}},function(e,t){e.exports={deviceImageContainer:"DVRSetupDevice-deviceImageContainer-16cUz",selectButton:"DVRSetupDevice-selectButton-2f6we SelectButton-selectButton-1ktQa cover-cover-2zml1",
details:"DVRSetupDevice-details-1-8U4",model:"DVRSetupDevice-model-TV1EH",uri:"DVRSetupDevice-uri-1b4LD",channelCount:"DVRSetupDevice-channelCount-3qPqo"}},function(e,t){e.exports={channel:"DVRSetupDeviceChannel-channel-3rdL0",channelIdentifier:"DVRSetupDeviceChannel-channelIdentifier-mw261"}},function(e,t){e.exports={deviceInfoBody:"DVRSetupDeviceInfo-deviceInfoBody-3-jTp ModalBody-modalBody-3Uc96",channelInfo:"DVRSetupDeviceInfo-channelInfo-3dB49",channelMessage:"DVRSetupDeviceInfo-channelMessage-COyUH",
channelDetails:"DVRSetupDeviceInfo-channelDetails-3LIdu",deviceDetails:"DVRSetupDeviceInfo-deviceDetails-22ZjE",channelScanSourceSelect:"DVRSetupDeviceInfo-channelScanSourceSelect-2tpza SelectInput-input-vbkMT input-input-2Sokt",deviceChannelsContainer:"DVRSetupDeviceInfo-deviceChannelsContainer-2czTj",deviceChannels:"DVRSetupDeviceInfo-deviceChannels-1kJJB Scroller-vertical-b0trl",emptyChannels:"DVRSetupDeviceInfo-emptyChannels-vrIE0 DVRSetupDeviceInfo-deviceChannels-1kJJB Scroller-vertical-b0trl",
emptyChannelsContent:"DVRSetupDeviceInfo-emptyChannelsContent-30A1M",emptyMessage:"DVRSetupDeviceInfo-emptyMessage-zQncR",emptyChannelsClockContainer:"DVRSetupDeviceInfo-emptyChannelsClockContainer-Adp6U",emptyChannelsClock:"DVRSetupDeviceInfo-emptyChannelsClock-2g8sA absoluteCenter-absoluteCenter-3-Tjr",emptyChannelsClockTime:"DVRSetupDeviceInfo-emptyChannelsClockTime-3Mz1A DVRSetupDeviceInfo-emptyChannelsClock-2g8sA absoluteCenter-absoluteCenter-3-Tjr",blink:"DVRSetupDeviceInfo-blink-33flu",emptyChannelsClockBackground:"DVRSetupDeviceInfo-emptyChannelsClockBackground-3UXdK CircularProgressBar-circularProgressBarBackground-3BdDt absoluteCenter-absoluteCenter-3-Tjr"
}},function(e,t){e.exports={addDeviceButton:"DVRSetupDeviceSelector-addDeviceButton-27dbJ",manualDeviceButtonContainer:"DVRSetupDeviceSelector-manualDeviceButtonContainer-2oONl",manualDeviceContainer:"DVRSetupDeviceSelector-manualDeviceContainer-346Vy",manualAddressArrow:"DVRSetupDeviceSelector-manualAddressArrow-3cAUT",manualAddressArrowOpen:"DVRSetupDeviceSelector-manualAddressArrowOpen-XQ8yg",manualDeviceInput:"DVRSetupDeviceSelector-manualDeviceInput-275bz TextInput-input-1tsVo input-input-2Sokt",
deviceCount:"DVRSetupDeviceSelector-deviceCount-82_X1",devices:"DVRSetupDeviceSelector-devices-2Nvid",device:"DVRSetupDeviceSelector-device-1q4jL",spinnerContainer:"DVRSetupDeviceSelector-spinnerContainer-3H1aq"}},function(e,t){e.exports={message:"EPGDownload-message-2M0lE",spinnerContainer:"EPGDownload-spinnerContainer-91z1-",spinnerMessage:"EPGDownload-spinnerMessage-1PXcM"}},function(e,t){e.exports={message:"EPGMapping-message-1peNh",spinnerContainer:"EPGMapping-spinnerContainer-pAya6"}},function(e,t){
e.exports={form:"EPGSettings-form-2bX_n",message:"EPGSettings-message-2_Mq3",postalCodeFetchingSpinner:"EPGSettings-postalCodeFetchingSpinner-1o_KR Spinner-spinner-2calh spin-spin-3DhWc"}},function(e,t){e.exports={channelMapping:"DeviceChannelMapping-channelMapping-3FS2q",deviceInfo:"DeviceChannelMapping-deviceInfo-2ceYj",channelEnabled:"DeviceChannelMapping-channelEnabled-2Tx4i",deviceIdentifier:"DeviceChannelMapping-deviceIdentifier-11Nb8",mappingDisabled:"DeviceChannelMapping-mappingDisabled-2I2ny",
channelName:"DeviceChannelMapping-channelName-1lMBX",epgChannel:"DeviceChannelMapping-epgChannel-1loQM",drmChannel:"DeviceChannelMapping-drmChannel-20kZ2",drmChannelBadge:"DeviceChannelMapping-drmChannelBadge-2Km6P"}},function(e,t){e.exports={form:"DeviceChannelMappings-form-1QV7D",channelMappingsBody:"DeviceChannelMappings-channelMappingsBody-16hMD ModalBody-modalBody-3Uc96",programGuideLabel:"DeviceChannelMappings-programGuideLabel-eRQCx",programGuideSelectContainer:"DeviceChannelMappings-programGuideSelectContainer-Q-Lke",
programGuideTitle:"DeviceChannelMappings-programGuideTitle-39CDf",centeredContainer:"DeviceChannelMappings-centeredContainer-oxG5H",scroller:"DeviceChannelMappings-scroller-19wmC Scroller-vertical-b0trl",channelMappingsContainer:"DeviceChannelMappings-channelMappingsContainer-PkCfa"}},function(e,t){e.exports={container:"DeviceChannelMappingsHeader-container-1xcae",deviceChannels:"DeviceChannelMappingsHeader-deviceChannels-pYyXy truncate-truncate-2Z4gk",guideChannels:"DeviceChannelMappingsHeader-guideChannels-2oMVG truncate-truncate-2Z4gk",
deviceChannelsPadding:"DeviceChannelMappingsHeader-deviceChannelsPadding-3mCSa"}},function(e,t){e.exports={hubContainer:"HubCell-hubContainer-1tIia",hubHeader:"HubCell-hubHeader-q30C8",hubTitle:"HubCell-hubTitle-1Js1A truncate-truncate-2Z4gk",hubLink:"HubCell-hubLink-16y8H",hubActions:"HubCell-hubActions-2vN5P",hubScrollButton:"HubCell-hubScrollButton-TfL8-"}},function(e,t){e.exports={titleContainer:"MetadataPosterCell-titleContainer-1wOCi",continueWatchingTitleContainer:"MetadataPosterCell-continueWatchingTitleContainer-1xItQ"
}},function(e,t){e.exports={item:"MetadataSummaryCell-item-3jWcj",isActionsMenuOpen:"MetadataSummaryCell-isActionsMenuOpen-3UhBO",button:"MetadataSummaryCell-button-33CCf",hasActiveSelection:"MetadataSummaryCell-hasActiveSelection-2J3gS",underlay:"MetadataSummaryCell-underlay-u2KY9 cover-cover-2zml1",isForcingSelection:"MetadataSummaryCell-isForcingSelection-2oDem",overlay:"MetadataSummaryCell-overlay-2sVXa linkOverlay-linkOverlay-1dSxA cover-cover-2zml1",editButton:"MetadataSummaryCell-editButton-1REQa MetadataSummaryCell-button-33CCf",
moreButton:"MetadataSummaryCell-moreButton-3E_qd MetadataSummaryCell-button-33CCf",isSelected:"MetadataSummaryCell-isSelected-1kUk6",selectButton:"MetadataSummaryCell-selectButton-3DAgb SelectButton-selectButton-1ktQa MetadataSummaryCell-button-33CCf",alternateItem:"MetadataSummaryCell-alternateItem-2tAko MetadataSummaryCell-item-3jWcj",posterContainer:"MetadataSummaryCell-posterContainer-pB7iq",summaryContainer:"MetadataSummaryCell-summaryContainer-29KUJ",actionsContainer:"MetadataSummaryCell-actionsContainer-1Ubxt",
libraryActionsContainer:"MetadataSummaryCell-libraryActionsContainer-ioydR MetadataSummaryCell-actionsContainer-1Ubxt",titleContainer:"MetadataSummaryCell-titleContainer-UlNur",title:"MetadataSummaryCell-title-RrbSc truncate-truncate-2Z4gk",rating:"MetadataSummaryCell-rating-3Geyl",separator:"MetadataSummaryCell-separator-3ckiR DashSeparator-separator-1aUG6",summary:"MetadataSummaryCell-summary-3oBlv",selectCoverButton:"MetadataSummaryCell-selectCoverButton-1KjkS cover-cover-2zml1"}},function(e,t){
e.exports={loadingItem:"MetadataSummaryCellLoading-loadingItem-2YDac",alternateLoadingItem:"MetadataSummaryCellLoading-alternateLoadingItem-t8eUQ MetadataSummaryCellLoading-loadingItem-2YDac",posterContainer:"MetadataSummaryCellLoading-posterContainer-32zVD"}},function(e,t){e.exports={tableCell:"MetadataTableCell-tableCell-2tczW truncate-truncate-2Z4gk",activeTableCell:"MetadataTableCell-activeTableCell-3DNJz MetadataTableCell-tableCell-2tczW truncate-truncate-2Z4gk",title:"MetadataTableCell-title-2qU8L"
}},function(e,t){e.exports={tableHeader:"MetadataTableHeader-tableHeader-GFqNv",tableHeaderLink:"MetadataTableHeader-tableHeaderLink-ZdnbO",tableHeaderCell:"MetadataTableHeader-tableHeaderCell-3A1eh MetadataTableCell-tableCell-2tczW truncate-truncate-2Z4gk",activeTableHeaderCell:"MetadataTableHeader-activeTableHeaderCell-2Sfbp MetadataTableHeader-tableHeaderCell-3A1eh MetadataTableCell-tableCell-2tczW truncate-truncate-2Z4gk",tableHeaderTitle:"MetadataTableHeader-tableHeaderTitle-2B6q5 truncate-truncate-2Z4gk",
sortDirectionIcon:"MetadataTableHeader-sortDirectionIcon-2kmCX",playCell:"MetadataTableHeader-playCell-2olnN MetadataTableRow-playCell-1sbNr MetadataTableHeader-tableHeaderCell-3A1eh MetadataTableCell-tableCell-2tczW truncate-truncate-2Z4gk",actionsCell:"MetadataTableHeader-actionsCell-1E7fW MetadataTableRow-libraryActionsCell-Oniju MetadataTableRow-actionsCell-3SsVT MetadataTableHeader-tableHeaderCell-3A1eh MetadataTableCell-tableCell-2tczW truncate-truncate-2Z4gk",columnsButton:"MetadataTableHeader-columnsButton-2TIXJ"
}},function(e,t){e.exports={item:"MetadataTableRow-item-2yOED",isActionsMenuOpen:"MetadataTableRow-isActionsMenuOpen-bL3GJ",transientTitle:"MetadataTableRow-transientTitle-3Dt2n",button:"MetadataTableRow-button-1MLDh",hasActiveSelection:"MetadataTableRow-hasActiveSelection-3H68j",underlay:"MetadataTableRow-underlay-3rggJ cover-cover-2zml1",isForcingSelection:"MetadataTableRow-isForcingSelection-1cVgo",overlay:"MetadataTableRow-overlay-3jdlB linkOverlay-linkOverlay-1dSxA cover-cover-2zml1",transientTitleLeft:"MetadataTableRow-transientTitleLeft-2WMnL MetadataTableRow-transientTitle-3Dt2n",
transientTitleRight:"MetadataTableRow-transientTitleRight-1B_JO MetadataTableRow-transientTitle-3Dt2n",playButton:"MetadataTableRow-playButton-2ZTwh PlayButton-playButton-auoLt MetadataTableRow-button-1MLDh",editButton:"MetadataTableRow-editButton-2A9ep MetadataTableRow-button-1MLDh",moreButton:"MetadataTableRow-moreButton-2g4LQ MetadataTableRow-button-1MLDh",isSelected:"MetadataTableRow-isSelected-2Nje2",selectButton:"MetadataTableRow-selectButton-1x-FZ SelectButton-selectButton-1ktQa MetadataTableRow-button-1MLDh",
alternateItem:"MetadataTableRow-alternateItem-1tHpb MetadataTableRow-item-2yOED",playCell:"MetadataTableRow-playCell-1sbNr",actionsCell:"MetadataTableRow-actionsCell-3SsVT",libraryActionsCell:"MetadataTableRow-libraryActionsCell-Oniju MetadataTableRow-actionsCell-3SsVT",selectCoverButton:"MetadataTableRow-selectCoverButton-2_2XS cover-cover-2zml1"}},function(e,t){e.exports={loadingItem:"MetadataTableRowLoading-loadingItem-7XzRK",alternateLoadingItem:"MetadataTableRowLoading-alternateLoadingItem-3GuZR MetadataTableRowLoading-loadingItem-7XzRK"
}},function(e,t){e.exports={photoContainer:"PhotoCell-photoContainer-kfeXt",photo:"PhotoCell-photo-2z2fE",image:"PhotoCell-image-22QCO",badge:"PhotoCell-badge-BEfCn",title:"PhotoCell-title-3X-5I"}},function(e,t){e.exports={sliderContainer:"MetadataListStylesMenu-sliderContainer-6JzT0",slider:"MetadataListStylesMenu-slider-194Zz Slider-slider-2hb32",stylesButton:"MetadataListStylesMenu-stylesButton-3e1tu",stylesIcon:"MetadataListStylesMenu-stylesIcon-2tygN"}},function(e,t){e.exports={divider:"MetadataListStylesMenuDivider-divider-2SQxo PageHeaderDivider-pageHeaderDivider-3WHgk"
}},function(e,t){e.exports={completeIcon:"AiringDetailsModalContent-completeIcon-2iU2w",recordingIcon:"AiringDetailsModalContent-recordingIcon-3OwOI",errorIcon:"AiringDetailsModalContent-errorIcon-2Qbp9",separator:"AiringDetailsModalContent-separator-3aK9y DashSeparator-separator-1aUG6",summary:"AiringDetailsModalContent-summary-2PAAU"}},function(e,t){e.exports={container:"ConflictItemRow-container-3BEE1"}},function(e,t){e.exports={title:"ConflictTitle-title-lLzoq truncate-truncate-2Z4gk",secondaryTitle:"ConflictTitle-secondaryTitle-1lIt4 truncate-truncate-2Z4gk"
}},function(e,t){e.exports={message:"MediaSubscriptionConflict-message-2zssk",conflicts:"MediaSubscriptionConflict-conflicts-3Dd2r"}},function(e,t){e.exports={baseForm:"MediaSubscriptionForm-baseForm-3a8vH",advancedForm:"MediaSubscriptionForm-advancedForm-2ybgz",advancedSettings:"MediaSubscriptionForm-advancedSettings-x0PqP",baseSettings:"MediaSubscriptionForm-baseSettings-2LE-c",footer:"MediaSubscriptionForm-footer-3tsMZ ModalFooter-modalFooter-u33FH",advancedIcon:"MediaSubscriptionForm-advancedIcon-26Suq"
}},function(e,t){e.exports={errorMessage:"MediaSubscriptionNoLibrary-errorMessage-2h-Hz",addIcon:"MediaSubscriptionNoLibrary-addIcon-1n1yO"}},function(e,t){e.exports={container:"MediaSubscriptionTargetPosterTitle-container-1QvRD",left:"MediaSubscriptionTargetPosterTitle-left-2U7gL",right:"MediaSubscriptionTargetPosterTitle-right-3_cQT",subscriptionBadge:"MediaSubscriptionTargetPosterTitle-subscriptionBadge-NOZb1 MetadataPosterCardOverlay-badge-Fo5_r",subscriptionBadgeIcon:"MediaSubscriptionTargetPosterTitle-subscriptionBadgeIcon-1JORo",
titleContainer:"MediaSubscriptionTargetPosterTitle-titleContainer-16Bw2",staticHeightTitleContainer:"MediaSubscriptionTargetPosterTitle-staticHeightTitleContainer-84c4y MediaSubscriptionTargetPosterTitle-titleContainer-16Bw2"}},function(e,t){e.exports={title:"MediaSubscriptionTitle-title-3_Htm truncate-truncate-2Z4gk",secondaryTitle:"MediaSubscriptionTitle-secondaryTitle-3knhj truncate-truncate-2Z4gk"}},function(e,t){e.exports={overlay:"EPGPosterCardOverlay-overlay-3M6pD cover-cover-2zml1",background:"EPGPosterCardOverlay-background-15iYq cover-cover-2zml1",
link:"EPGPosterCardOverlay-link-1ruey cover-cover-2zml1",subscriptionBadge:"EPGPosterCardOverlay-subscriptionBadge-3olsn MetadataPosterCardOverlay-badge-Fo5_r",subscriptionBadgeIcon:"EPGPosterCardOverlay-subscriptionBadgeIcon-JBUUh",progress:"EPGPosterCardOverlay-progress-8iZxv PosterCardOverlayProgress-progress-afdt-",button:"EPGPosterCardOverlay-button-367wB MetadataPosterCardOverlay-button-3gK0Y",recordButton:"EPGPosterCardOverlay-recordButton-3BsTX absoluteCenter-absoluteCenter-3-Tjr RecordButton-recordButton-3PJnD PlayButton-playButton-auoLt EPGPosterCardOverlay-button-367wB MetadataPosterCardOverlay-button-3gK0Y",
recordCoverButton:"EPGPosterCardOverlay-recordCoverButton-2Uw-O EPGPosterCardOverlay-recordButton-3BsTX absoluteCenter-absoluteCenter-3-Tjr RecordButton-recordButton-3PJnD PlayButton-playButton-auoLt EPGPosterCardOverlay-button-367wB MetadataPosterCardOverlay-button-3gK0Y",recordCircle:"EPGPosterCardOverlay-recordCircle-8kP4C RecordButton-recordCircle-2EXnY PlayButton-playCircle-1aLOj MetadataPosterCardOverlay-centerCircle-3H7Xg absoluteCenter-absoluteCenter-3-Tjr",recordIcon:"EPGPosterCardOverlay-recordIcon-2v6L- RecordButton-recordIcon-1Vb2O absoluteCenter-absoluteCenter-3-Tjr",
moreButton:"EPGPosterCardOverlay-moreButton-3vBy2 EPGPosterCardOverlay-button-367wB MetadataPosterCardOverlay-button-3gK0Y",isActionsMenuOpen:"EPGPosterCardOverlay-isActionsMenuOpen-22PAH"}},function(e,t){e.exports={cardContainer:"MetadataPosterCard-cardContainer-2sQpR",card:"MetadataPosterCard-card-18QcO",isFlipped:"MetadataPosterCard-isFlipped-1eBnt"}},function(e,t){e.exports={poster:"MetadataPosterCardFace-poster-31R6h",isSelected:"MetadataPosterCardFace-isSelected-1Nu0V",isOtherItemSelected:"MetadataPosterCardFace-isOtherItemSelected-2xO9r",
face:"MetadataPosterCardFace-face-1_Xht cover-cover-2zml1 MetadataPosterCardFace-poster-31R6h",faceFront:"MetadataPosterCardFace-faceFront-p2e-5",faceBack:"MetadataPosterCardFace-faceBack-ehv1B"}},function(e,t){e.exports={placeholderIcon:"MetadataPosterCardIcon-placeholderIcon-3-3nZ"}},function(e,t){e.exports={overlay:"MetadataPosterCardOverlay-overlay-2MZYR cover-cover-2zml1",background:"MetadataPosterCardOverlay-background-3PuZt cover-cover-2zml1",link:"MetadataPosterCardOverlay-link-2AuWf cover-cover-2zml1",
badge:"MetadataPosterCardOverlay-badge-Fo5_r",versionBadge:"MetadataPosterCardOverlay-versionBadge-2w5Cd MetadataPosterCardOverlay-badge-Fo5_r",versionBadgeIcon:"MetadataPosterCardOverlay-versionBadgeIcon-zVwur",unwatchedBadge:"MetadataPosterCardOverlay-unwatchedBadge-1JqR- MetadataPosterCardOverlay-badge-Fo5_r",unwatchedTagContainer:"MetadataPosterCardOverlay-unwatchedTagContainer-10NHP",unwatchedTag:"MetadataPosterCardOverlay-unwatchedTag-2tnwM MetadataPosterCardOverlay-unwatchedBadge-1JqR- MetadataPosterCardOverlay-badge-Fo5_r",
progress:"MetadataPosterCardOverlay-progress-2A-JX PosterCardOverlayProgress-progress-afdt-",button:"MetadataPosterCardOverlay-button-3gK0Y",centerCircle:"MetadataPosterCardOverlay-centerCircle-3H7Xg absoluteCenter-absoluteCenter-3-Tjr",playButton:"MetadataPosterCardOverlay-playButton-12XyM absoluteCenter-absoluteCenter-3-Tjr PlayButton-playButton-auoLt MetadataPosterCardOverlay-button-3gK0Y",playCoverButton:"MetadataPosterCardOverlay-playCoverButton-1dmrp MetadataPosterCardOverlay-playButton-12XyM absoluteCenter-absoluteCenter-3-Tjr PlayButton-playButton-auoLt MetadataPosterCardOverlay-button-3gK0Y",
playCircle:"MetadataPosterCardOverlay-playCircle-Lk-_9 PlayButton-playCircle-1aLOj MetadataPosterCardOverlay-centerCircle-3H7Xg absoluteCenter-absoluteCenter-3-Tjr",selectButton:"MetadataPosterCardOverlay-selectButton-woFxZ SelectButton-selectButton-1ktQa MetadataPosterCardOverlay-button-3gK0Y",selectCircle:"MetadataPosterCardOverlay-selectCircle-z9jy_ SelectButton-selectCircle-1L7KA",coverButton:"MetadataPosterCardOverlay-coverButton-VFQu8 cover-cover-2zml1",selectCoverButton:"MetadataPosterCardOverlay-selectCoverButton-1Ll-i MetadataPosterCardOverlay-coverButton-VFQu8 cover-cover-2zml1",
deselectCoverButton:"MetadataPosterCardOverlay-deselectCoverButton-1zu2g MetadataPosterCardOverlay-coverButton-VFQu8 cover-cover-2zml1",editButton:"MetadataPosterCardOverlay-editButton-KL-5d MetadataPosterCardOverlay-button-3gK0Y",moreButton:"MetadataPosterCardOverlay-moreButton-O-tOl MetadataPosterCardOverlay-button-3gK0Y",isActionsMenuOpen:"MetadataPosterCardOverlay-isActionsMenuOpen-2WxTY",isOtherItemSelected:"MetadataPosterCardOverlay-isOtherItemSelected-2kFx5",hasActiveSelection:"MetadataPosterCardOverlay-hasActiveSelection-3NBVL",
refreshingCircle:"MetadataPosterCardOverlay-refreshingCircle-3nqeO MetadataPosterCardOverlay-centerCircle-3H7Xg absoluteCenter-absoluteCenter-3-Tjr",trashCircle:"MetadataPosterCardOverlay-trashCircle-3FO7P MetadataPosterCardOverlay-centerCircle-3H7Xg absoluteCenter-absoluteCenter-3-Tjr",isSelected:"MetadataPosterCardOverlay-isSelected-3WzA5",isConflictingTypeSelected:"MetadataPosterCardOverlay-isConflictingTypeSelected-1PPGk",isModifierKeyPressed:"MetadataPosterCardOverlay-isModifierKeyPressed-2o2qX",
isRefreshing:"MetadataPosterCardOverlay-isRefreshing-31aJr",isTrash:"MetadataPosterCardOverlay-isTrash-1VQYW",refreshingSpinnerContainer:"MetadataPosterCardOverlay-refreshingSpinnerContainer-2tTGC absoluteCenter-absoluteCenter-3-Tjr",refreshingSpinner:"MetadataPosterCardOverlay-refreshingSpinner-K_U6v",refreshingIcon:"MetadataPosterCardOverlay-refreshingIcon-2plma"}},function(e,t){e.exports={placeholder:"MetadataPosterCardPlaceholder-placeholder-2WD0B MetadataPosterCardFace-poster-31R6h"}},function(e,t){
e.exports={title:"MetadataPosterTitle-title-1s2zc truncate-truncate-2Z4gk",isSecondary:"MetadataPosterTitle-isSecondary-bApZD",isSplitLeft:"MetadataPosterTitle-isSplitLeft-2pkQK",isSplitRight:"MetadataPosterTitle-isSplitRight-q5A56"}},function(e,t){e.exports={progress:"PosterCardOverlayProgress-progress-afdt-",progressTrack:"PosterCardOverlayProgress-progressTrack-3TqjT cover-cover-2zml1",progressBar:"PosterCardOverlayProgress-progressBar-kPz3z cover-cover-2zml1"}},function(e,t){e.exports={card:"TagPosterCard-card-1v04p MetadataPosterCardFace-poster-31R6h"
}},function(e,t){e.exports={container:"CriticRating-container-8pLg3",rating:"CriticRating-rating-31201",rt:"CriticRating-rt-hKcRG",ratingImage:"CriticRating-ratingImage-DAAv0",imdb:"CriticRating-imdb-21G4q CriticRating-ratingImage-DAAv0",certified:"CriticRating-certified-ANNNa CriticRating-ratingImage-DAAv0",ripe:"CriticRating-ripe-2bcoW CriticRating-ratingImage-DAAv0",rotten:"CriticRating-rotten-3zSJm CriticRating-ratingImage-DAAv0",spilled:"CriticRating-spilled-3yZNA CriticRating-ratingImage-DAAv0",
upright:"CriticRating-upright-b01gO CriticRating-ratingImage-DAAv0",other:"CriticRating-other-O2PBU CriticRating-ratingImage-DAAv0"}},function(e,t){e.exports={separator:"MetadataTitleAirDate-separator-24URr DashSeparator-separator-1aUG6"}},function(e,t){e.exports={trackArtist:"MetadataTitleCombinedTitleTrackArtist-trackArtist-21tFS"}},function(e,t){e.exports={duration:"MetadataTitleDuration-duration-2yPes"}},function(e,t){e.exports={episodeCount:"MetadataTitleEpisodeCount-episodeCount-2PDJV"}},function(e,t){
e.exports={unwatchedCircle:"MetadataTitleMiniProgress-unwatchedCircle-1R2QY MetadataTitleProgress-unwatchedCircle-SmiKf",partiallyWatchedCircle:"MetadataTitleMiniProgress-partiallyWatchedCircle-13wHz MetadataTitleMiniProgress-unwatchedCircle-1R2QY MetadataTitleProgress-unwatchedCircle-SmiKf"}},function(e,t){e.exports={unwatchedCircle:"MetadataTitleProgress-unwatchedCircle-SmiKf"}},function(e,t){e.exports={page:"Page-page--d_pw resetFont-resetFont-ekCtc"}},function(e,t){e.exports={pageContent:"PageContent-pageContent-benw0",
innerPageContent:"PageContent-innerPageContent-hLnhE"}},function(e,t){e.exports={pageHeader:"PageHeader-pageHeader-3lHPG"}},function(e,t){e.exports={pageHeaderCenter:"PageHeaderCenter-pageHeaderCenter-JAY68 pageHeaderColumn-pageHeaderColumn-NeuQj"}},function(e,t){e.exports={pageHeaderDivider:"PageHeaderDivider-pageHeaderDivider-3WHgk"}},function(e,t){e.exports={pageHeaderLeft:"PageHeaderLeft-pageHeaderLeft-1hYs8 pageHeaderColumn-pageHeaderColumn-NeuQj"}},function(e,t){e.exports={pageHeaderRight:"PageHeaderRight-pageHeaderRight-3uedC pageHeaderColumn-pageHeaderColumn-NeuQj"
}},function(e,t){e.exports={pageHeaderSeparator:"PageHeaderSeparator-pageHeaderSeparator-39bx6 DashSeparator-separator-1aUG6"}},function(e,t){e.exports={sectionDetails:"AccountFormSection-sectionDetails-3wf28 CloseableFormSection-isPressable-2nSw6 SettingsFormSectionDetails-sectionDetails-37wtZ",label:"AccountFormSection-label-115UN FormLabel-label-2Jltc CloseableFormSection-isPressable-2nSw6",submitButton:"AccountFormSection-submitButton-2Xd6f"}},function(e,t){e.exports={avatarContainer:"AvatarEditor-avatarContainer-2dy_E",
isOverDropTarget:"AvatarEditor-isOverDropTarget-2ExpQ",avatarPane:"AvatarEditor-avatarPane-2owKC",sliderContainer:"AvatarEditor-sliderContainer-3d1h3",sliderEnd:"AvatarEditor-sliderEnd-4U5m2",sliderWrapper:"AvatarEditor-sliderWrapper-1zajw",slider:"AvatarEditor-slider-3GVoU Slider-slider-2hb32",help:"AvatarEditor-help-1JdKo",avatarTextPane:"AvatarEditor-avatarTextPane-2ZZ9A",avatarActionButtons:"AvatarEditor-avatarActionButtons-2d3Gz"}},function(e,t){e.exports={dashboardPageContent:"DashboardPage-dashboardPageContent-1rrVe PageContent-innerPageContent-hLnhE",
attribution:"DashboardPage-attribution-2q8Vq GracenoteAttribution-attribution-ag5ic"}},function(e,t){e.exports={refreshingSpinner:"DashboardPageHeader-refreshingSpinner-1bi-4"}},function(e,t){e.exports={title:"DetailsHeader-title-d0s6E",summary:"DetailsHeader-summary-18ORK"}},function(e,t){e.exports={scroller:"PhotoAlbum-scroller-CRr2B",body:"PhotoAlbum-body-ZD0BX",album:"PhotoAlbum-album-23BtC",spinner:"PhotoAlbum-spinner-2encW"}},function(e,t){e.exports={container:"PhotoAlbumContainer-container-2e_r2"
}},function(e,t){e.exports={emptyPage:"EmptyPage-emptyPage-GRG_y resetFont-resetFont-ekCtc",content:"EmptyPage-content-ERJeW",icon:"EmptyPage-icon-3DTIa",default:"EmptyPage-default-1cpD3",primary:"EmptyPage-primary-WHkOP",success:"EmptyPage-success-Rmudr",danger:"EmptyPage-danger-NloaZ",title:"EmptyPage-title-3gAwP",description:"EmptyPage-description-uqqJm",footer:"EmptyPage-footer-33Een"}},function(e,t){e.exports={icon:"ErrorPage-icon-1Igoq EmptyPage-icon-3DTIa"}},function(e,t){e.exports={icon:"InnerErrorPage-icon-NJEqW ErrorPage-icon-1Igoq EmptyPage-icon-3DTIa"
}},function(e,t){e.exports={emptyPage:"ServerDownloadRequiredPage-emptyPage-3y6_V EmptyPage-emptyPage-GRG_y resetFont-resetFont-ekCtc",content:"ServerDownloadRequiredPage-content-G92iV EmptyPage-content-ERJeW",title:"ServerDownloadRequiredPage-title-33XIu EmptyPage-title-3gAwP",description:"ServerDownloadRequiredPage-description-gf8wx EmptyPage-description-uqqJm",pmsLogo:"ServerDownloadRequiredPage-pmsLogo-1ZiNc",button:"ServerDownloadRequiredPage-button-17Oxw",downloadMessage:"ServerDownloadRequiredPage-downloadMessage-2eY2w"
}},function(e,t){e.exports={updateLink:"ServerUpdateRequiredPage-updateLink-2nfUy",updateDisabledLink:"ServerUpdateRequiredPage-updateDisabledLink-2tSWW ServerUpdateRequiredPage-updateLink-2nfUy"}},function(e,t){e.exports={attribution:"LibraryPage-attribution-JE43w GracenoteAttribution-attribution-ag5ic"}},function(e,t){e.exports={badge:"LibraryPageHeader-badge-Yf_b5",divider:"LibraryPageHeader-divider-1hNVt PageHeaderDivider-pageHeaderDivider-3WHgk"}},function(e,t){e.exports={menuButton:"LibraryPageHeaderMenuButton-menuButton-3wphf",
menuButtonLabel:"LibraryPageHeaderMenuButton-menuButtonLabel-3enn- truncate-truncate-2Z4gk",isSelected:"LibraryPageHeaderMenuButton-isSelected-YACfg"}},function(e,t){e.exports={jumpBar:"LibraryPageJumpBar-jumpBar-3eMxd"}},function(e,t){e.exports={character:"LibraryPageJumpBarCharacter-character-2efa3"}},function(e,t){e.exports={menuItemContainer:"DisclosureFilterMenuItem-menuItemContainer-3a9zK SelectedMenuItem-menuItemContainer-3ZzRi",menuLabel:"DisclosureFilterMenuItem-menuLabel-2cXLF SelectedMenuItem-menuLabel-2d1zX",
spinner:"DisclosureFilterMenuItem-spinner-2g92v Spinner-spinner-2calh spin-spin-3DhWc",selectedIcon:"DisclosureFilterMenuItem-selectedIcon-2zBNu SelectedMenuItem-selectedIcon-1JZ63",isSelected:"DisclosureFilterMenuItem-isSelected-XBsfp"}},function(e,t){e.exports={header:"LibraryFilterOptionsList-header-1AjpT",headerTitle:"LibraryFilterOptionsList-headerTitle-W6lBI",backIcon:"LibraryFilterOptionsList-backIcon-2_15C",filterText:"LibraryFilterOptionsList-filterText-2pTpL truncate-truncate-2Z4gk",searchInput:"LibraryFilterOptionsList-searchInput-1g-1k TextInput-input-1tsVo input-input-2Sokt",
filterOptionsScroller:"LibraryFilterOptionsList-filterOptionsScroller-3Wl4Z Scroller-vertical-b0trl",filterOptionsWithSearchScroller:"LibraryFilterOptionsList-filterOptionsWithSearchScroller--Yrpz LibraryFilterOptionsList-filterOptionsScroller-3Wl4Z Scroller-vertical-b0trl",filterOptionMenuItem:"LibraryFilterOptionsList-filterOptionMenuItem-1MI0N MenuItem-menuItem-1TZOI",emptyText:"LibraryFilterOptionsList-emptyText-1YVuQ"}},function(e,t){e.exports={filtersScroller:"LibraryFiltersList-filtersScroller-1cg2B Scroller-vertical-b0trl"
}},function(e,t){e.exports={filtersMenu:"LibraryFiltersMenu-filtersMenu-2fez_ Menu-menu-DTLJb",panesContainer:"LibraryFiltersMenu-panesContainer-1fzen",pane:"LibraryFiltersMenu-pane-2Vy8g",filtersPane:"LibraryFiltersMenu-filtersPane-1FgcM LibraryFiltersMenu-pane-2Vy8g",filterOptionsPane:"LibraryFiltersMenu-filterOptionsPane-24Ach LibraryFiltersMenu-pane-2Vy8g",showFilterOptions:"LibraryFiltersMenu-showFilterOptions-1uOLD"}},function(e,t){e.exports={metadataListPageContent:"MetadataListPageContent-metadataListPageContent-3ODfW PageContent-pageContent-benw0",
hasHeader:"MetadataListPageContent-hasHeader-16YlZ",metadataListScroller:"MetadataListPageContent-metadataListScroller-35EBQ",hasGutter:"MetadataListPageContent-hasGutter-1TM88",attribution:"MetadataListPageContent-attribution-2Oh2R"}},function(e,t){e.exports={menuButton:"MetadataListPageHeader-menuButton-2hCa1",title:"MetadataListPageHeader-title-3h8fN truncate-truncate-2Z4gk",badge:"MetadataListPageHeader-badge-zv62k",divider:"MetadataListPageHeader-divider-3qGtv PageHeaderDivider-pageHeaderDivider-3WHgk"
}},function(e,t){e.exports={carousel:"PhotoCarousel-carousel-2ZELa",headerButton:"PhotoCarousel-headerButton-vwdeQ",playPauseButton:"PhotoCarousel-playPauseButton-2pLFw",header:"PhotoCarousel-header-3aM63",contents:"PhotoCarousel-contents-2r1jV",navigationButton:"PhotoCarousel-navigationButton-2uIFn",action:"PhotoCarousel-action-riaxM"}},function(e,t){e.exports={lightbox:"PhotoPlayer-lightbox-2u0B1",player:"PhotoPlayer-player-RZCQ0",content:"PhotoPlayer-content-1OOEd",main:"PhotoPlayer-main-2wvG5",
mainFooter:"PhotoPlayer-mainFooter-8dAy9",aside:"PhotoPlayer-aside-1v7Ki"}},function(e,t){e.exports={prePlayPageContentContainer:"PrePlayPageContent-prePlayPageContentContainer-196aq",prePlayPageContent:"PrePlayPageContent-prePlayPageContent-38LSB PageContent-pageContent-benw0"}},function(e,t){e.exports={breadcrumbLink:"PrePlayPageHeader-breadcrumbLink-3g7ux truncate-truncate-2Z4gk"}},function(e,t){e.exports={separator:"PrePlayDashSeparator-separator-JX70d"}},function(e,t){e.exports={group:"PrePlayDetailsGroup-group-xoZbV"
}},function(e,t){e.exports={groupItem:"PrePlayDetailsGroupItem-groupItem-2TQg_",label:"PrePlayDetailsGroupItem-label-1bI47"}},function(e,t){e.exports={divider:"PrePlayDivider-divider-O58e5"}},function(e,t){e.exports={leftTitle:"PrePlayLeftTitle-leftTitle-2jeSD truncate-truncate-2Z4gk"}},function(e,t){e.exports={bottomDivider:"PrePlayListBottomDivider-bottomDivider-bf8G4 PrePlayDivider-divider-O58e5"}},function(e,t){e.exports={topDivider:"PrePlayListTopDivider-topDivider-1TND3 PrePlayDivider-divider-O58e5"
}},function(e,t){e.exports={content:"PrePlayMetadataContent-content-13zOX"}},function(e,t){e.exports={innerContent:"PrePlayMetadataInnerContent-innerContent-3Vhad"}},function(e,t){e.exports={primaryTitle:"PrePlayPrimaryTitle-primaryTitle-16wDb"}},function(e,t){e.exports={rightTitle:"PrePlayRightTitle-rightTitle-2QNI_ truncate-truncate-2Z4gk"}},function(e,t){e.exports={secondaryTitle:"PrePlaySecondaryTitle-secondaryTitle-2dgyV PrePlayPrimaryTitle-primaryTitle-16wDb"}},function(e,t){e.exports={summary:"PrePlaySummary-summary-36GRE"
}},function(e,t){e.exports={tertiaryTitle:"PrePlayTertiaryTitle-tertiaryTitle-1sU4J"}},function(e,t){e.exports={cardLink:"PrePlayCastCell-cardLink-34SI2",titleContainer:"PrePlayCastCell-titleContainer-1zfjE"}},function(e,t){e.exports={castList:"PrePlayCastList-castList-1BBnh"}},function(e,t){e.exports={relatedList:"PrePlayRelatedList-relatedList-2ePhV",spinnerContainer:"PrePlayRelatedList-spinnerContainer-3j9gL"}},function(e,t){e.exports={recordButton:"EPGPrePlayRecordButton-recordButton-2McnS Button-default-26J-5",
recordingIcon:"EPGPrePlayRecordButton-recordingIcon-MyB27",recordIcon:"EPGPrePlayRecordButton-recordIcon-2mzhO"}},function(e,t){e.exports={item:"EPGPrePlayEpisodeCell-item-2mKde",recordButton:"EPGPrePlayEpisodeCell-recordButton-3sMiO RecordButton-recordButton-3PJnD PlayButton-playButton-auoLt",alternateItem:"EPGPrePlayEpisodeCell-alternateItem-ZjqeP EPGPrePlayEpisodeCell-item-2mKde",underlay:"EPGPrePlayEpisodeCell-underlay-2N5HS cover-cover-2zml1",overlay:"EPGPrePlayEpisodeCell-overlay-6JkP_ linkOverlay-linkOverlay-1dSxA cover-cover-2zml1",
primaryTitle:"EPGPrePlayEpisodeCell-primaryTitle-3F7sD truncate-truncate-2Z4gk",secondaryTitle:"EPGPrePlayEpisodeCell-secondaryTitle-3IBOA truncate-truncate-2Z4gk",subscriptionIcon:"EPGPrePlayEpisodeCell-subscriptionIcon--m0FW",nextAiringDate:"EPGPrePlayEpisodeCell-nextAiringDate-198hl",separator:"EPGPrePlayEpisodeCell-separator-6Q1gI",loadingItem:"EPGPrePlayEpisodeCell-loadingItem-HOxFD EPGPrePlayEpisodeCell-overlay-6JkP_ linkOverlay-linkOverlay-1dSxA cover-cover-2zml1",alternateLoadingItem:"EPGPrePlayEpisodeCell-alternateLoadingItem-3_wek EPGPrePlayEpisodeCell-loadingItem-HOxFD EPGPrePlayEpisodeCell-overlay-6JkP_ linkOverlay-linkOverlay-1dSxA cover-cover-2zml1"
}},function(e,t){e.exports={emptyContainer:"EPGPrePlayEpisodeList-emptyContainer-2iPnx",emptyMessage:"EPGPrePlayEpisodeList-emptyMessage-1zAK5 EPGPrePlayEpisodeList-emptyContainer-2iPnx"}},function(e,t){e.exports={innerModalBody:"PersonalCloudServerChooseProviderModalBody-innerModalBody-1z0ZL PersonalCloudServerModal-innerModalBody-13z05 ModalBody-innerModalBody-2gxHe",providersButtonsSpinner:"PersonalCloudServerChooseProviderModalBody-providersButtonsSpinner-1EmR9",providerButtonsContainer:"PersonalCloudServerChooseProviderModalBody-providerButtonsContainer-2HV2h",
providerButtonsContainerNarrow:"PersonalCloudServerChooseProviderModalBody-providerButtonsContainerNarrow-1OXaV PersonalCloudServerChooseProviderModalBody-providerButtonsContainer-2HV2h",vendorLogoButton:"PersonalCloudServerChooseProviderModalBody-vendorLogoButton-i4RZr Button-button-3q-sB Link-link-2wZEE",vendorLogo:"PersonalCloudServerChooseProviderModalBody-vendorLogo-30ygJ"}},function(e,t){e.exports={schedulePageContent:"RecordingSchedulePageContent-schedulePageContent-2MzUK PageContent-pageContent-benw0",
schedulePageInnerContent:"RecordingSchedulePageContent-schedulePageInnerContent-3xeq2 PageContent-innerPageContent-hLnhE",emptyDescription:"RecordingSchedulePageContent-emptyDescription-2qmP4 EmptyPage-description-uqqJm"}},function(e,t){e.exports={event:"AgendaEvent-event-2EGH9",isComplete:"AgendaEvent-isComplete-31dny",hasError:"AgendaEvent-hasError-zTE33",underlay:"AgendaEvent-underlay-2hhJM cover-cover-2zml1",overlay:"AgendaEvent-overlay-YJ-re linkOverlay-linkOverlay-1dSxA cover-cover-2zml1",statusIcon:"AgendaEvent-statusIcon-wDD49",
date:"AgendaEvent-date-ZOXjM truncate-truncate-2Z4gk",isToday:"AgendaEvent-isToday-1gsF4",time:"AgendaEvent-time-1f8yu",isNewBadge:"AgendaEvent-isNewBadge-sbcJp",title:"AgendaEvent-title-2QyOS truncate-truncate-2Z4gk",titleDetails:"AgendaEvent-titleDetails-28v7G truncate-truncate-2Z4gk",status:"AgendaEvent-status-3VZaw",recording:"AgendaEvent-recording-2pwX3",recordingProgressBackground:"AgendaEvent-recordingProgressBackground-vW5Z2 CircularProgressBar-circularProgressBarBackground-3BdDt absoluteCenter-absoluteCenter-3-Tjr",
recordingIcon:"AgendaEvent-recordingIcon-7lxkS absoluteCenter-absoluteCenter-3-Tjr"}},function(e,t){e.exports={agendaHeader:"AgendaHeader-agendaHeader-2LO1P"}},function(e,t){e.exports={calendar:"Calendar-calendar-R4xR9"}},function(e,t){e.exports={day:"CalendarDay-day-34Fpe"}},function(e,t){e.exports={dayOfWeek:"CalendarDayOfWeek-dayOfWeek-2czb- truncate-truncate-2Z4gk",isToday:"CalendarDayOfWeek-isToday-3nhmE"}},function(e,t){e.exports={calendarDays:"CalendarDays-calendarDays-1TVOa"}},function(e,t){
e.exports={container:"CalendarDaysOfWeek-container-PExb9"}},function(e,t){e.exports={errorButton:"CalendarErrorButton-errorButton-3RS3M",errorTooltip:"CalendarErrorButton-errorTooltip-ZlO17 Tooltip-tooltip-25aMb resetFont-resetFont-ekCtc"}},function(e,t){e.exports={event:"CalendarEvent-event-10_aF",isComplete:"CalendarEvent-isComplete-NZ9qe",hasError:"CalendarEvent-hasError-2sdO5",underlay:"CalendarEvent-underlay-x7Bn8 cover-cover-2zml1",overlay:"CalendarEvent-overlay-rHJ3b linkOverlay-linkOverlay-1dSxA cover-cover-2zml1",
errorIcon:"CalendarEvent-errorIcon-1Cvxi",title:"CalendarEvent-title-3a-tM truncate-truncate-2Z4gk",secondary:"CalendarEvent-secondary-1eywc",time:"CalendarEvent-time-3cdVm",status:"CalendarEvent-status-1cn7b",recording:"CalendarEvent-recording-2pfNr",recordingProgressBackground:"CalendarEvent-recordingProgressBackground-12RSk CircularProgressBar-circularProgressBarBackground-3BdDt absoluteCenter-absoluteCenter-3-Tjr",recordingIcon:"CalendarEvent-recordingIcon-3zLda absoluteCenter-absoluteCenter-3-Tjr"
}},function(e,t){e.exports={calendarHeaderContainer:"CalendarHeader-calendarHeaderContainer-10Kiz",calendarHeader:"CalendarHeader-calendarHeader-1iifF",calendarNav:"CalendarHeader-calendarNav-1NCjA Link-link-2wZEE",calendarNavDisabled:"CalendarHeader-calendarNavDisabled-2-XcF"}},function(e,t){e.exports={title:"CalendarHeaderTitle-title-3hEG9"}},function(e,t){e.exports={pane:"RecordingPriorityPane-pane-2Wyei",paneHeader:"RecordingPriorityPane-paneHeader-1cEIi",paneScroller:"RecordingPriorityPane-paneScroller-1T5vf Scroller-vertical-b0trl",
error:"RecordingPriorityPane-error-I_Cxl"}},function(e,t){e.exports={subscription:"RecordingPrioritySubscription-subscription-3nHdD",link:"RecordingPrioritySubscription-link-3qOCo",linkContainer:"RecordingPrioritySubscription-linkContainer-2-Ky0",posterContainer:"RecordingPrioritySubscription-posterContainer-3ZyNA",titleContainer:"RecordingPrioritySubscription-titleContainer-2Xl4M",dragHandle:"RecordingPrioritySubscription-dragHandle-Q_dR2 Link-link-2wZEE",dragIcon:"RecordingPrioritySubscription-dragIcon-2dMRM"
}},function(e,t){e.exports={dragPreview:"RecordingPrioritySubscriptionDragPreview-dragPreview-1tqsA"}},function(e,t){e.exports={dragSource:"RecordingPrioritySubscriptionDragSource-dragSource-1yhiH stripeListItem-stripeListItem-27BZf"}},function(e,t){e.exports={seriesIcon:"RecordingPrioritySubscriptionSeriesTitle-seriesIcon-2I0vE"}},function(e,t){e.exports={title:"RecordingPrioritySubscriptionTitle-title-1nu1r truncate-truncate-2Z4gk",secondaryTitle:"RecordingPrioritySubscriptionTitle-secondaryTitle-3M-Od truncate-truncate-2Z4gk"
}},function(e,t){e.exports={searchPageContent:"SearchPageContent-searchPageContent-7Ccob DashboardPage-dashboardPageContent-1rrVe PageContent-innerPageContent-hLnhE"}},function(e,t){e.exports={spinner:"SearchPageHeader-spinner-3zb_6",separator:"SearchPageHeader-separator-1H3pz"}},function(e,t){e.exports={providerTitle:"SearchProviderHubs-providerTitle-aFt6r",spinner:"SearchProviderHubs-spinner-2amlT"}},function(e,t){e.exports={isPressable:"CloseableFormSection-isPressable-2nSw6",isClosed:"CloseableFormSection-isClosed-1RpOt CloseableFormSection-isPressable-2nSw6",
isOpen:"CloseableFormSection-isOpen-G5zcx"}},function(e,t){e.exports={sectionWrapper:"SettingsFormSection-sectionWrapper-3tkTg",section:"SettingsFormSection-section-31JGk"}},function(e,t){e.exports={actionLinks:"SettingsFormSectionActionLinks-actionLinks-2ySHY"}},function(e,t){e.exports={sectionDetails:"SettingsFormSectionDetails-sectionDetails-37wtZ"}},function(e,t){e.exports={page:"SettingsPage-page-3Acq- Page-page--d_pw resetFont-resetFont-ekCtc",content:"SettingsPage-content-1AkIq"}},function(e,t){
e.exports={header:"SettingsPageHeader-header-2UaUC"}},function(e,t){e.exports={spinnerContainer:"SettingsPageLoadingSpinner-spinnerContainer-1VPIs"}},function(e,t){e.exports={buttons:"WebhookFormSection-buttons-2WJPP",button:"WebhookFormSection-button-3xHCO",dangerButton:"WebhookFormSection-dangerButton-3vADI",label:"WebhookFormSection-label-2Q8sh FormLabel-label-2Jltc CloseableFormSection-isPressable-2nSw6"}},function(e,t){e.exports={buttons:"WebhooksSettingsPage-buttons-2c0_h"}},function(e,t){e.exports={
magazine:"Carousel-magazine-2kcuk",slide:"Carousel-slide-2mqL5",currentSlide:"Carousel-currentSlide-1WjO6 Carousel-slide-2mqL5"}},function(e,t){e.exports={controls:"PhotoControls-controls-aIZ6h",container:"PhotoControls-container-14kx_",textInput:"PhotoControls-textInput-LoR2O TextInput-input-1tsVo input-input-2Sokt",summary:"PhotoControls-summary-2PjU4",seekbar:"PhotoControls-seekbar-3sWhS Slider-slider-2hb32",seekbarTrack:"PhotoControls-seekbarTrack-BJaRN Slider-track-2DISH absoluteCenter-absoluteCenter-3-Tjr",
seekbarFill:"PhotoControls-seekbarFill-2Of7P Slider-fill-2iSI6",info:"PhotoControls-info-2Q-Af",title:"PhotoControls-title-2eogt",actionButton:"PhotoControls-actionButton-109Oz"}},function(e,t){e.exports={hub:"PhotoHub-hub-GTrGV",container:"PhotoHub-container-1Mf_F",body:"PhotoHub-body-vQVVG",overlay:"PhotoHub-overlay-380hp",title:"PhotoHub-title-i0fGW truncate-truncate-2Z4gk",count:"PhotoHub-count-35qoc"}},function(e,t){e.exports={container:"PhotoHubList-container-3VesM",title:"PhotoHubList-title-7pKqc",
list:"PhotoHubList-list-2OEP1"}},function(e,t){e.exports={photoInformation:"PhotoInformation-photoInformation-2Wruw Scroller-vertical-b0trl",exif:"PhotoInformation-exif-1b_DZ",line:"PhotoInformation-line-1HDSJ",split:"PhotoInformation-split-90-Hb PhotoInformation-line-1HDSJ",format:"PhotoInformation-format-2It7f"}},function(e,t){e.exports={strip:"PhotoStrip-strip-1dzTY",thumbs:"PhotoStrip-thumbs-3fsPA",cell:"PhotoStrip-cell-3iaKK",thumbContainer:"PhotoStrip-thumbContainer-NmA0a",isSelected:"PhotoStrip-isSelected-1QnIV",
thumb:"PhotoStrip-thumb-VMtLI",thumbOverlay:"PhotoStrip-thumbOverlay-fSbXL cover-cover-2zml1"}},function(e,t){e.exports={menuItemContainer:"PlayerAttributeMenu-menuItemContainer-1e-sc",menuLabel:"PlayerAttributeMenu-menuLabel-Q4_XD",selectedIcon:"PlayerAttributeMenu-selectedIcon-_nY44"}},function(e,t){e.exports={slideContainer:"SlideImg-slideContainer-18zco",statusContainer:"SlideImg-statusContainer-1_BJe fadeIn-fadeIn-zdrm-"}},function(e,t){e.exports={slideContainer:"SlideVideo-slideContainer-331-G",
statusContainer:"SlideVideo-statusContainer-2zJ1l fadeIn-fadeIn-zdrm-",videoContainer:"SlideVideo-videoContainer-3581Q",videoElement:"SlideVideo-videoElement-O8ssU"}},function(e,t){e.exports={container:"QuickSearch-container-18Zgf resetFont-resetFont-ekCtc"}},function(e,t){e.exports={hubTitle:"QuickSearchHub-hubTitle-3Nuuf"}},function(e,t){e.exports={container:"QuickSearchInput-container-3P9xh resetFont-resetFont-ekCtc",focused:"QuickSearchInput-focused-iaYhS",searchIcon:"QuickSearchInput-searchIcon-GS8nv",
closeIcon:"QuickSearchInput-closeIcon-3mM8H",searchInput:"QuickSearchInput-searchInput-1r44V"}},function(e,t){e.exports={placeholder:"QuickSearchPlaceholder-placeholder-2wdbz",isPlaceholderSelected:"QuickSearchPlaceholder-isPlaceholderSelected-MDBWF"}},function(e,t){e.exports={title:"QuickSearchProvider-title-22gwT",noResults:"QuickSearchProvider-noResults-3ks1B",spinnerContainer:"QuickSearchProvider-spinnerContainer-3TiI6",spinner:"QuickSearchProvider-spinner-2AqsH"}},function(e,t){e.exports={button:"QuickSearchResult-button-2c38D",
title:"QuickSearchResult-title-1obDF",selected:"QuickSearchResult-selected-3nnkg",link:"QuickSearchResult-link-3DOcz cover-cover-2zml1",imageContainer:"QuickSearchResult-imageContainer-298P1",titles:"QuickSearchResult-titles-34LiN",moreButton:"QuickSearchResult-moreButton-3-g7Q",moreIcon:"QuickSearchResult-moreIcon-2KQm2"}},function(e,t){e.exports={container:"QuickSearchResults-container-2ya-Q"}},function(e,t){e.exports={titleContainer:"SearchTagPosterCell-titleContainer-2awwf",imageContainer:"SearchTagPosterCell-imageContainer-EXEDs",
imageLink:"SearchTagPosterCell-imageLink-RUR9t cover-cover-2zml1"}},function(e,t){e.exports={card:"QuickSearchMetadataPosterCard-card-2su5P",playButton:"QuickSearchMetadataPosterCard-playButton-18TLB PlayButton-playButton-auoLt absoluteCenter-absoluteCenter-3-Tjr",playCircle:"QuickSearchMetadataPosterCard-playCircle-1ezfW PlayButton-playCircle-1aLOj absoluteCenter-absoluteCenter-3-Tjr",recordButton:"QuickSearchMetadataPosterCard-recordButton-vLvKT RecordButton-recordButton-3PJnD PlayButton-playButton-auoLt absoluteCenter-absoluteCenter-3-Tjr",
recordCircle:"QuickSearchMetadataPosterCard-recordCircle-3JLeO RecordButton-recordCircle-2EXnY PlayButton-playCircle-1aLOj absoluteCenter-absoluteCenter-3-Tjr"}},function(e,t){e.exports={card:"QuickSearchTagPosterCard-card-207ds TagPosterCard-card-1v04p MetadataPosterCardFace-poster-31R6h"}},function(e,t){e.exports={title:"QuickSearchTitle-title-2T8i5 truncate-truncate-2Z4gk",isSecondary:"QuickSearchTitle-isSecondary-_dTy3"}},function(e,t){e.exports={multiSelectPageHeader:"MultiSelectPageHeader-multiSelectPageHeader-2z9MR PageHeader-pageHeader-3lHPG",
selectedTitle:"MultiSelectPageHeader-selectedTitle--Fufv truncate-truncate-2Z4gk",deselectLink:"MultiSelectPageHeader-deselectLink-3OVlR truncate-truncate-2Z4gk",icon:"MultiSelectPageHeader-icon-1wdVA"}},function(e,t){e.exports={sidebar:"Sidebar-sidebar--ttmH resetFont-resetFont-ekCtc",sidebarScroller:"Sidebar-sidebarScroller-ZIUls",sidebarContent:"Sidebar-sidebarContent-1ueAD"}},function(e,t){e.exports={sidebarLink:"SidebarLink-sidebarLink-1hL-L Link-default-1sSkX",container:"SidebarLink-container-mwxLF",
icon:"SidebarLink-icon-20QPc",title:"SidebarLink-title-32_S4",children:"SidebarLink-children-w_jAa",spinner:"SidebarLink-spinner-12zyz"}},function(e,t){e.exports={sidebarListHeader:"SidebarList-sidebarListHeader-14VKG truncate-truncate-2Z4gk"}},function(e,t){e.exports={sidebarListItem:"SidebarListItem-sidebarListItem--Du_n"}},function(e,t){e.exports={sidebarMessage:"SidebarMessage-sidebarMessage-3GGS-"}},function(e,t){e.exports={personalCloudIcon:"ProvisionPersonalCloudServerMenuItem-personalCloudIcon-1oQlJ ServerMenuItem-serverMenuIcon-37xX5"
}},function(e,t){e.exports={serverMenu:"ServerMenu-serverMenu-WnJ5u Menu-menu-DTLJb",serverMenuScroller:"ServerMenu-serverMenuScroller-1ZH7N Scroller-vertical-b0trl"}},function(e,t){e.exports={serverMenuButton:"ServerMenuButton-serverMenuButton-1IxGd",serverMenuButtonContainer:"ServerMenuButton-serverMenuButtonContainer-2qKiX",serverMenuSpinner:"ServerMenuButton-serverMenuSpinner-1oz_3",serverMenuTitle:"ServerMenuButton-serverMenuTitle-39WFk",serverMenuFriendlyNameContainer:"ServerMenuButton-serverMenuFriendlyNameContainer-2ttwJ",
serverMenuFriendlyName:"ServerMenuButton-serverMenuFriendlyName--P-xL truncate-truncate-2Z4gk",serverMenuUsername:"ServerMenuButton-serverMenuUsername-3TeiJ truncate-truncate-2Z4gk",icon:"ServerMenuButton-icon-3jXhv"}},function(e,t){e.exports={secureIcon:"ServerMenuIcon-secureIcon-3gRwQ",alertIcon:"ServerMenuIcon-alertIcon-2FcKs",warningIcon:"ServerMenuIcon-warningIcon-3WlWA"}},function(e,t){e.exports={sidebarIconButton:"SidebarIconButton-sidebarIconButton-1lP0M"}},function(e,t){e.exports={actions:"SidebarLibrariesActions-actions-3Cz4V",
action:"SidebarLibrariesActions-action-3YAa7 SidebarIconButton-sidebarIconButton-1lP0M",isVisible:"SidebarLibrariesActions-isVisible-2uNfY"}},function(e,t){e.exports={action:"SidebarLibraryItem-action-3sBTH SidebarIconButton-sidebarIconButton-1lP0M",libraryListItem:"SidebarLibraryItem-libraryListItem-1-6RQ SidebarListItem-sidebarListItem--Du_n",isVisible:"SidebarLibraryItem-isVisible-2y8ms"}},function(e,t){e.exports={spinnerContainer:"SidebarServerContent-spinnerContainer-2vA36",unclaimedIcon:"SidebarServerContent-unclaimedIcon-1HLQb"
}},function(e,t){e.exports={librariesListHeader:"SidebarServerLibraries-librariesListHeader-3FEFw SidebarList-sidebarListHeader-14VKG truncate-truncate-2Z4gk",librariesTitle:"SidebarServerLibraries-librariesTitle-1CzqE truncate-truncate-2Z4gk"}},function(e,t){e.exports={container:"UserSidebar-container-36yFK resetFont-resetFont-ekCtc"}},function(e,t){e.exports={personalCloudServerTitle:"PersonalCloudServerModal-personalCloudServerTitle-2XPfX",header:"PersonalCloudServerModal-header-1t4Y2 ModalHeader-modalHeader-3N0A7 truncate-truncate-2Z4gk",
innerModalBody:"PersonalCloudServerModal-innerModalBody-13z05 ModalBody-innerModalBody-2gxHe",upsellImage:"PersonalCloudServerModal-upsellImage-3pQn-",upsellText:"PersonalCloudServerModal-upsellText-2OAXJ",upsellPoint:"PersonalCloudServerModal-upsellPoint-1WQje",footer:"PersonalCloudServerModal-footer-3RzTy ModalFooter-modalFooter-u33FH"}},function(e,t){e.exports={feature:"PlexPassFeature-feature-1IR_O",featurePadding:"PlexPassFeature-featurePadding-3Vogr",featureImage:"PlexPassFeature-featureImage-1y96F",
featureContainer:"PlexPassFeature-featureContainer-2NQRD",featureTitle:"PlexPassFeature-featureTitle-3g13F",featureDescription:"PlexPassFeature-featureDescription-2i2wE"}},function(e,t){e.exports={plexPassTitle:"PlexPassLiteModal-plexPassTitle-1YLgJ PlexPassModalContent-plexPassTitle-3Mvtk",header:"PlexPassLiteModal-header-1H4FG PlexPassModalContent-header-9l45Z ModalHeader-modalHeader-3N0A7 truncate-truncate-2Z4gk",body:"PlexPassLiteModal-body-1ixw_ PlexPassModalContent-body-27BEP ModalBody-innerModalBody-2gxHe",
footer:"PlexPassLiteModal-footer-IeMjD PlexPassModalContent-footer-24EJe ModalFooter-modalFooter-u33FH"}},function(e,t){e.exports={plexPassTitle:"PlexPassModalContent-plexPassTitle-3Mvtk",header:"PlexPassModalContent-header-9l45Z ModalHeader-modalHeader-3N0A7 truncate-truncate-2Z4gk",body:"PlexPassModalContent-body-27BEP ModalBody-innerModalBody-2gxHe",moreFeatures:"PlexPassModalContent-moreFeatures-3rbtP",footer:"PlexPassModalContent-footer-24EJe ModalFooter-modalFooter-u33FH",planButton:"PlexPassModalContent-planButton-19lDB truncate-truncate-2Z4gk",
link:"PlexPassModalContent-link-TCe_x",linkSeparator:"PlexPassModalContent-linkSeparator-FYZuH",spinnerContainer:"PlexPassModalContent-spinnerContainer-2uOKi",plansContainer:"PlexPassModalContent-plansContainer-1CPZh",isPlansPending:"PlexPassModalContent-isPlansPending-30bji"}},function(e,t){e.exports={appear:"crossFadeTransition-appear-1ugg8",enter:"crossFadeTransition-enter-2mrZj",appearActive:"crossFadeTransition-appearActive-2nC0r",enterActive:"crossFadeTransition-enterActive-B0MXS",leave:"crossFadeTransition-leave-3i7-t",
leaveActive:"crossFadeTransition-leaveActive-3eeTj"}},function(e,t,n){"use strict";function i(e,t){for(var n=e;n.parentNode;)n=n.parentNode;var i=n.querySelectorAll(t);return Array.prototype.indexOf.call(i,e)!==-1}var a=n(37),r={addClass:function(e,t){return/\s/.test(t)?a(!1):void 0,t&&(e.classList?e.classList.add(t):r.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return/\s/.test(t)?a(!1):void 0,t&&(e.classList?e.classList.remove(t):r.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),
e},conditionClass:function(e,t,n){return(n?r.addClass:r.removeClass)(e,t)},hasClass:function(e,t){return/\s/.test(t)?a(!1):void 0,e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1},matchesSelector:function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(t){return i(e,t)};return n.call(e,t)}};e.exports=r},,,,,,,,,,,,,,,function(e,t,n){e.exports=n.p+"img/desktop/queue/bookmarklet-steps-ie.3cbda4e75b0dd0e186e0c24999ab0d1d.png";
},function(e,t,n){e.exports=n.p+"img/desktop/queue/bookmarklet-steps.abc5147d9257f0ec59f7b2257db9cb8f.png"},function(e,t,n){e.exports=n.p+"img/desktop/queue/email-links.f1b12dd82ea85b39a4c0fa07dd6df095.png"},function(e,t,n){e.exports=n.p+"mp3/null.2036f08ba858d37814b7f6982d26414a.mp3"},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<svg class="circle-progress-bar" version="1.1" xmlns="http://www.w3.org/2000/svg"> <circle fill="transparent"></circle> </svg> <div class="circle-progress-text"></div> ';
})},function(e,t){e.exports=function(){return""}},function(e,t){e.exports=function(){return""}},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="video-player-image-overlays"></div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s="",o="function",l=this.escapeExpression;return s+='<div class="page-container '+l((r=t&&t.styles,
r=null==r||r===!1?r:r.pageContainer,typeof r===o?r.apply(t):r))+'"></div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s="",o="function",l=this.escapeExpression;return s+='<div class="sidebar-container '+l((r=t&&t.styles,r=null==r||r===!1?r:r.sidebarContainer,typeof r===o?r.apply(t):r))+'"></div> <div class="page-container '+l((r=t&&t.styles,r=null==r||r===!1?r:r.pageContainer,typeof r===o?r.apply(t):r))+'"></div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<button class="lyrics-btn btn-link dropdown-toggle hidden" data-toggle="dropdown" href="#lyrics-dropdown"> <i class="plex-icon-lyrics"></i> </button> <div class="lyrics-dropdown dropdown-menu pull-center"></div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return(s=n.reason)?r=s.call(t,{hash:{},data:a}):(s=t&&t.reason,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+" "})},function(e,t){e.exports=function(){return""}},function(e,t){e.exports=function(){return""}},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<span class="loading loading-inline"></span> '})},function(e,t,n){var i=n(6);
e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return(s=n.text)?r=s.call(t,{hash:{},data:a}):(s=t&&t.text,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+" "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<button class="timed-btn btn-link"> <i class="plex-icon-timer"></i> </button> <button class="prev-lyrics-btn btn-link"> <i class="plex-icon-triangle-left"></i> </button> <span class="lyrics-streams-index"></span> / <span class="lyrics-streams-length"></span> <button class="next-lyrics-btn btn-link"> <i class="plex-icon-triangle-right"></i> </button> <div class="vendor-logo vendor-logo-lyricfind"></div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="lyrics-region"></div> <div class="lyrics-streams-region"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+=l(i(n(0)).call(t,"Your mix will resume shortly",{
hash:{},data:s}))+" "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="background transition-out"></div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div id="content" class="scroll-container dark-scrollbar"></div> <div class="scroll-shadow transition-out"></div> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+="<p>"+g(i(n(0)).call(e,"Requirements",{hash:{},data:t}))+": ",a=e&&e.requirements,a=typeof a===m?a.apply(e):a,(a||0===a)&&(r+=a),r+="</p>"}function l(e,t){var n,i="";return i+="<p>",n=e&&e.info,n=typeof n===m?n.apply(e):n,(n||0===n)&&(i+=n),i+="</p>"}function c(e,t){var r,s="";return s+=' <div class="btn-group dropup download-server-btn-group"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> '+g(i(n(0)).call(e,"Download",{
hash:{},data:t}))+' <span class="caret"></span> </button> <ul class="dropdown-menu"> ',r=a.each.call(e,e&&e.releases,{hash:{},inverse:v.noop,fn:v.program(6,u,t),data:t}),(r||0===r)&&(s+=r),s+=" </ul> </div> "}function u(e,t){var n,i="";return i+=' <li><a href="'+g((n=e&&e.url,typeof n===m?n.apply(e):n))+'" download class="download-btn">'+g((n=e&&e.label,typeof n===m?n.apply(e):n))+"</a></li> "}function d(e,t){var n,i="";return i+=' <div class="download-server-btn-group"> ',n=a.each.call(e,e&&e.releases,{
hash:{},inverse:v.noop,fn:v.program(9,h,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> "}function h(e,t){var n,i="";return i+=' <a href="'+g((n=e&&e.url,typeof n===m?n.apply(e):n))+'" download class="btn btn-primary download-btn">'+g((n=e&&e.label,typeof n===m?n.apply(e):n))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g=this.escapeExpression,m="function",v=this;return f+='<div class="type-'+g((p=t&&t.type,typeof p===m?p.apply(t):p))+" platform-logo platform-"+g((p=t&&t.id,
typeof p===m?p.apply(t):p))+'"></div> <h2><strong>'+g((p=t&&t.name,typeof p===m?p.apply(t):p))+"</strong> "+g(i(n(0)).call(t,"Download",{hash:{},data:s}))+"</h2> <h5>"+g(i(n(0)).call(t,"Version",{hash:{},data:s}))+" "+g((p=t&&t.version,typeof p===m?p.apply(t):p))+"</h5> <h5>"+g(i(n(701)).call(t,t&&t.date,{hash:{},data:s}))+'</h5> <div class="more-info"> ',p=a.if.call(t,t&&t.requirements,{hash:{},inverse:v.noop,fn:v.program(1,o,s),data:s}),(p||0===p)&&(f+=p),f+=" ",p=a.if.call(t,t&&t.info,{hash:{},
inverse:v.noop,fn:v.program(3,l,s),data:s}),(p||0===p)&&(f+=p),f+=" </div> ",p=a.if.call(t,t&&t.shouldUseDropup,{hash:{},inverse:v.program(8,d,s),fn:v.program(5,c,s),data:s}),(p||0===p)&&(f+=p),f+=" "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<button class="like-meh-btn btn-link"><i class="plex-icon-heart plex-icon-heart-empty"></i></button> <button class="dislike-btn btn-link"><i class="plex-icon-heart-strikethrough"></i></button> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"(Plex Pass)"}function l(e,t){var n,i="";return i+=' <p><span class="text-muted">Name:</span> '+p((n=e&&e.primaryServer,n=null==n||n===!1?n:n.friendlyName,typeof n===h?n.apply(e):n))+'</p> <p><span class="text-muted">URL:</span> '+p((n=e&&e.primaryServerUrl,typeof n===h?n.apply(e):n))+'</p> <p><span class="text-muted">Version:</span> '+p((n=e&&e.primaryServer,
n=null==n||n===!1?n:n.version,typeof n===h?n.apply(e):n))+'</p> <p><span class="text-muted">Token:</span> '+p((n=e&&e.primaryServer,n=null==n||n===!1?n:n.accessToken,typeof n===h?n.apply(e):n))+"</p> "}function c(e,t){return' <p><span class="text-muted">none</span></p> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h="function",p=this.escapeExpression,f=this;return d+='<h3>Browser</h3> <p><span class="text-muted">Host:</span> '+p((u=t&&t.host,typeof u===h?u.apply(t):u))+'</p> <p><span class="text-muted">User Agent:</span> '+p((u=t&&t.userAgent,
typeof u===h?u.apply(t):u))+'</p> <p><span class="text-muted">Name:</span> '+p((u=t&&t.browser,u=null==u||u===!1?u:u.name,typeof u===h?u.apply(t):u))+'</p> <p><span class="text-muted">Version:</span> '+p((u=t&&t.browser,u=null==u||u===!1?u:u.version,typeof u===h?u.apply(t):u))+'</p> <p><span class="text-muted">Platform:</span> '+p((u=t&&t.browser,u=null==u||u===!1?u:u.platform,typeof u===h?u.apply(t):u))+'</p> <p><span class="text-muted">Mobile:</span> '+p(i(n(447)).call(t,(u=t&&t.browser,null==u||u===!1?u:u.mobile),{
hash:{},data:s}))+'</p> <h3>User</h3> <p><span class="text-muted">Username:</span> '+p((u=t&&t.user,u=null==u||u===!1?u:u.username,typeof u===h?u.apply(t):u))+" ",u=a.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='</p> <p><span class="text-muted">Email:</span> '+p((u=t&&t.user,u=null==u||u===!1?u:u.email,typeof u===h?u.apply(t):u))+'</p> <p><span class="text-muted">Token:</span> '+p((u=t&&t.user,u=null==u||u===!1?u:u.accessToken,typeof u===h?u.apply(t):u))+'</p> <h3>plex.tv</h3> <p><span class="text-muted">URL:</span> '+p((u=t&&t.cloudServerUrl,
typeof u===h?u.apply(t):u))+'</p> <p><span class="text-muted">Available:</span> '+p(i(n(447)).call(t,(u=t&&t.cloudServer,null==u||u===!1?u:u.available),{hash:{},data:s}))+'</p> <p><span class="text-muted">Authorized:</span> '+p(i(n(447)).call(t,(u=t&&t.cloudServer,null==u||u===!1?u:u.authorized),{hash:{},data:s}))+"</p> <h3>Primary Server</h3> ",u=a.if.call(t,t&&t.primaryServer,{hash:{},inverse:f.program(5,c,s),fn:f.program(3,l,s),data:s}),(u||0===u)&&(d+=u),d+=" "})},function(e,t){e.exports=function(){
return""}},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<textarea class="form-control">',(s=n.logs)?r=s.call(t,{hash:{},data:a}):(s=t&&t.logs,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+"</textarea> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
function o(e,t){var a="";return a+=' <div class="remember-group checkbox"> <label class="control-label"> <input type="checkbox" id="remember" checked> '+u(i(n(0)).call(e,"Remember me",{hash:{},data:t}))+" </label> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this.escapeExpression,d=this;return c+='<div class="row"> <div class="col-sm-12"> <h2 class="sign-in-header"> <a class="sign-in-btn selected" href="#">'+u(i(n(0)).call(t,"Sign In",{hash:{},data:s}))+'</a> <span class="sign-in-header-divider">'+u(i(n(0)).call(t,"or",{
hash:{},data:s}))+'</span> <a class="sign-up-btn" href="#">'+u(i(n(0)).call(t,"Sign Up",{hash:{},data:s}))+'</a> </h2> </div> </div> <div class="username-group form-group"> <label for="username" class="control-label"> '+u(i(n(0)).call(t,"Username",{hash:{},data:s}))+' <span class="control-error">'+u(i(n(0)).call(t,"Required",{hash:{},data:s}))+'</span> </label> <input type="text" id="username" class="form-control" autocorrect="off" autocapitalize="off"> </div> <div class="email-group form-group"> <label for="email" class="control-label"> '+u(i(n(0)).call(t,"Email",{
hash:{},data:s}))+' <span class="control-error">'+u(i(n(0)).call(t,"Required",{hash:{},data:s}))+'</span> </label> <input type="text" id="email" class="form-control" autocorrect="off" autocapitalize="off"> </div> <div class="password-group form-group"> <label for="password" class="control-label"> '+u(i(n(0)).call(t,"Password",{hash:{},data:s}))+' <span class="control-error">'+u(i(n(0)).call(t,"Required",{hash:{},data:s}))+'</span> </label> <input type="password" id="password" class="form-control"> </div> <div class="confirm-group form-group"> <label for="confirm" class="control-label"> '+u(i(n(0)).call(t,"Confirm Password",{
hash:{},data:s}))+' <span class="control-error">'+u(i(n(0)).call(t,"Passwords do not match",{hash:{},data:s}))+'</span> </label> <input type="password" id="confirm" class="form-control"> </div> <div class="age-disclaimer form-group"> '+u(i(n(0)).call(t,"By creating an account, you confirm that you have read and accept the {1}Terms and Conditions{2} and are at least 13 years old.",'<a href="https://plex.tv/terms" target="_blank">',"</a>",{hash:{},data:s}))+' </div> <div class="form-footer"> <button type="submit" class="btn btn-lg btn-primary btn-loading pull-right"> <div class="loading loading-sm"></div> <span class="sign-in-label btn-label">'+u(i(n(0)).call(t,"Sign In",{
hash:{},data:s}))+'</span> <span class="sign-up-label btn-label">'+u(i(n(0)).call(t,"Sign Up",{hash:{},data:s}))+"</span> </button> ",l=a.if.call(t,t&&t.showRememberMe,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=" </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <a class="btn-gray tv-mode-btn" href="#"> '+f(i(n(0)).call(e,"Enter TV Full Screen",{
hash:{},data:t}))+' <i class="plex-icon-tv-mode-enter-560 tv-mode-icon"></i> </a> '}function l(e,t){return' <form id="user-account-form"></form> '}function c(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.showWhySignIn,{hash:{},inverse:g.program(8,d,t),fn:g.program(6,u,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function u(e,t){var a="";return a+=" <p>"+f(i(n(0)).call(e,"You must be signed in for Plex to work properly. If you are not signed in:",{hash:{},data:t}))+'</p> <ul class="text-muted"> <li>'+f(i(n(0)).call(e,"Any connections between your media server and players WILL NOT BE SECURE",{
hash:{},data:t}))+"</li> <li>"+f(i(n(0)).call(e,"You may experience degraded streaming performance",{hash:{},data:t}))+"</li> <li>"+f(i(n(0)).call(e,"It will be more difficult, and sometimes impossible, to find your server and discover players",{hash:{},data:t}))+"</li> <li>"+f(i(n(0)).call(e,"You will not be able to access your media server from outside your home",{hash:{},data:t}))+"</li> <li>"+f(i(n(0)).call(e,"You will not be able to access content and many features provided by Plex",{hash:{},
data:t}))+'</li> </ul> <div class="skip-sign-in-container"> <p><button type="button" class="back-to-sign-in-btn btn btn-lg btn-primary">'+f(i(n(0)).call(e,"Sign In",{hash:{},data:t}))+'</button></p> <p><a class="skip-btn" href="#">'+f(i(n(0)).call(e,"Skip and accept limited functionality",{hash:{},data:t}))+"</a></p> </div> "}function d(e,t){var a="";return a+=' <div class="skip-sign-in-container"> <a class="why-sign-in-btn" href="#">'+f(i(n(0)).call(e,"What's this?",{hash:{},data:t}))+"</a> </div> ";
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f=this.escapeExpression,g=this;return h=a.if.call(t,t&&t.showTVMode,{hash:{},inverse:g.noop,fn:g.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=' <div class="sign-in-logo text-center"> <i class="plex-image logo"></i> </div> <div class="row row-padded"> <div class="col-sm-6 col-sm-offset-3"> ',h=a.unless.call(t,t&&t.showWhySignIn,{hash:{},inverse:g.noop,fn:g.program(3,l,s),data:s}),(h||0===h)&&(p+=h),p+=" ",h=a.if.call(t,t&&t.showSkip,{
hash:{},inverse:g.noop,fn:g.program(5,c,s),data:s}),(h||0===h)&&(p+=h),p+=" </div> </div> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){var i,a="";return a+='<span class="star"><i class="star-icon glyphicon ',i=n.if.call(e,e,{hash:{},inverse:u.program(4,o,t),fn:u.program(2,s,t),data:t}),(i||0===i)&&(a+=i),a+='"></i><span class="empty-icon"></span></span>'}function s(e,t){return"star"}function o(e,t){return"dislikes"}this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),a=a||{};var l,c="",u=this;return l=n.each.call(t,t&&t.stars,{hash:{},inverse:u.noop,fn:u.program(1,r,a),data:a}),(l||0===l)&&(c+=l),c+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return p(i(n(0)).call(e,"Play",{hash:{},data:t}))}function l(e,t){return p(i(n(0)).call(e,"Play All",{hash:{},data:t}))}function c(e,t){var a,r="";return r+=' <li><a class="download-btn secondary-only" href="'+p((a=e&&e.downloadUrl,
typeof a===f?a.apply(e):a))+'" target="'+p((a=e&&e.defaultLinkTarget,typeof a===f?a.apply(e):a))+'" ',a=i(n(64)).call(e,e&&e.defaultLinkTarget,"_blank",{hash:{},inverse:g.noop,fn:g.program(6,u,t),data:t}),(a||0===a)&&(r+=a),r+=">"+p(i(n(0)).call(e,"Download",{hash:{},data:t}))+"</a></li> "}function u(e,t){var n,i="";return i+='download="'+p((n=e&&e.downloadName,typeof n===f?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this.escapeExpression,f="function",g=this;
return h+='<ul class="nav action-bar-nav"> <li> <a class="play-btn btn-gray" href="#" title="',d=a.if.call(t,t&&t.isSingleItem,{hash:{},inverse:g.program(3,l,s),fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+='" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-unwatched-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Play Unwatched",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-shuffled-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Shuffle",{
hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon random"></i></a> </li> <li> <a class="play-trailer-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Play Trailer",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="plex-icon-play-strip"></i></a> </li> <li> <a class="edit-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Edit",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon pencil"></i></a> </li> <li> <a class="add-to-playlist-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Add to playlist",{
hash:{},data:s}))+'" data-toggle="tooltip"><i class="plex-icon-add-to-playlist"></i></a> </li> <li> <a class="refresh-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Refresh",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon repeat"></i></a> </li> <li> <a class="analyze-btn btn-gray secondary-action" href="#" title="'+p(i(n(0)).call(t,"Analyze",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon magic"></i></a> </li> <li> <a class="mark-watched-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Mark as Watched",{
hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon circle-ok"></i></a> </li> <li> <a class="mark-unwatched-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Mark as Unwatched",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon circle-minus"></i></a> </li> <li> <a class="select-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Select",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon check"></i></a> </li> <li> <a class="deselect-btn btn-gray selected" href="#" title="'+p(i(n(0)).call(t,"Deselect All",{
hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon unchecked"></i></a> </li> <li> <a class="sync-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Sync",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon download"></i></a> </li> <li> <a class="share-btn btn-gray secondary-action" href="#" title="'+p(i(n(0)).call(t,"Share",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon share"></i></a> </li> <li> <a class="recommend-btn btn-gray secondary-action" href="#" title="'+p(i(n(0)).call(t,"Recommend",{
hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon share-alt"></i></a> </li> <li> <a class="delete-btn btn-gray secondary-action" href="#" title="'+p(i(n(0)).call(t,"Delete",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon bin"></i></a> </li> <li> <a class="delete-from-user-playlist-btn btn-gray secondary-action" href="#" title="'+p(i(n(0)).call(t,"Delete",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon bin"></i></a> </li> <li> <a class="info-btn btn-gray secondary-action" href="#" title="'+p(i(n(0)).call(t,"Info",{
hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon circle-info"></i></a> </li> <li class="secondary-actions-dropdown dropdown"> <a class="more-btn btn-gray dropdown-toggle" href="#" data-toggle="dropdown"><i class="glyphicon more"></i></a> <ul class="dropdown-menu"> <li><a class="play-version-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Play Version...",{hash:{},data:s}))+'</a></li> <li><a class="play-all-btn secondary-only" href="#">',d=a.if.call(t,t&&t.isSingleItem,{hash:{},inverse:g.program(3,l,s),
fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+='</a></li> <li><a class="play-next-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Play Next",{hash:{},data:s}))+'</a></li> <li><a class="add-to-queue-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Add to Queue",{hash:{},data:s}))+'</a></li> <li class="secondary-divider divider"></li> <li><a class="convert-btn" href="#">'+p(i(n(0)).call(t,"Optimize...",{hash:{},data:s}))+'</a></li> <li><a class="analyze-btn" href="#">'+p(i(n(0)).call(t,"Analyze",{
hash:{},data:s}))+'</a></li> <li><a class="match-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Match",{hash:{},data:s}))+'</a></li> <li><a class="fix-match-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Fix Incorrect Match",{hash:{},data:s}))+'</a></li> <li><a class="unmatch-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Unmatch",{hash:{},data:s}))+'</a></li> <li><a class="merge-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Merge",{hash:{},data:s}))+'</a></li> <li><a class="split-apart-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Split Apart",{
hash:{},data:s}))+"</a></li> ",d=a.if.call(t,t&&t.downloadUrl,{hash:{},inverse:g.noop,fn:g.program(5,c,s),data:s}),(d||0===d)&&(h+=d),h+=' <li><a class="watch-later-btn" href="#" tabindex="-1">'+p(i(n(0)).call(t,"Watch Later",{hash:{},data:s}))+'</a></li> <li><a class="share-btn" href="#">'+p(i(n(0)).call(t,"Share",{hash:{},data:s}))+'</a></li> <li><a class="recommend-btn" href="#">'+p(i(n(0)).call(t,"Recommend",{hash:{},data:s}))+'</a></li> <li><a class="delete-btn has-danger" href="#">'+p(i(n(0)).call(t,"Delete",{
hash:{},data:s}))+'</a></li> <li><a class="delete-versions-btn has-danger secondary-only" href="#">'+p(i(n(0)).call(t,"Delete Versions",{hash:{},data:s}))+'</a></li> <li><a class="delete-from-user-playlist-btn has-danger" href="#">'+p(i(n(0)).call(t,"Delete",{hash:{},data:s}))+'</a></li> <li><a class="info-btn" href="#">'+p(i(n(0)).call(t,"Info",{hash:{},data:s}))+"</a></li> </ul> </li> </ul> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="action-bar"> <ul class="nav action-bar-nav"> <li> <a class="options-btn btn-gray" href="#" title="'+l(i(n(0)).call(t,"Options",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon show-lines"></i></a> </li> </ul> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="action-bar"> <ul class="nav action-bar-nav"> <li> <a class="options-btn btn-gray" href="#" title="'+l(i(n(0)).call(t,"Options",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon show-lines"></i></a> </li> <li> <a class="play-btn btn-gray" href="#" title="'+l(i(n(0)).call(t,"Play All",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-shuffled-btn btn-gray" href="#" title="'+l(i(n(0)).call(t,"Shuffle",{
hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon random"></i></a> </li> <li> <a class="add-to-playlist-btn btn-gray" href="#" title="'+l(i(n(0)).call(t,"Add to playlist",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="plex-icon-add-to-playlist"></i></a> </li> <li> <a class="select-btn btn-gray" href="#" title="'+l(i(n(0)).call(t,"Select",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon check"></i></a> </li> <li> <a class="deselect-btn btn-gray selected" href="#" title="'+l(i(n(0)).call(t,"Deselect All",{
hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon unchecked"></i></a> </li> <li> <a class="edit-btn btn-gray" href="#" title="'+l(i(n(0)).call(t,"Edit",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon pencil"></i></a> </li> <li> <a class="mark-watched-btn btn-gray" href="#" title="'+l(i(n(0)).call(t,"Mark as Watched",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon circle-ok"></i></a> </li> <li> <a class="mark-unwatched-btn btn-gray" href="#" title="'+l(i(n(0)).call(t,"Mark as Unwatched",{
hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon circle-minus"></i></a> </li> <li> <a class="sync-btn btn-gray" href="#" title="'+l(i(n(0)).call(t,"Sync",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon download"></i></a> </li> <li class="secondary-actions-dropdown dropdown"> <a class="more-btn btn-gray dropdown-toggle" href="#" data-toggle="dropdown"><i class="glyphicon more"></i></a> <ul class="dropdown-menu"> <li><a class="convert-btn secondary-only" href="#">'+l(i(n(0)).call(t,"Optimize...",{
hash:{},data:s}))+'</a></li> <li><a class="refresh-btn secondary-only" href="#">'+l(i(n(0)).call(t,"Refresh",{hash:{},data:s}))+'</a></li> <li><a class="analyze-btn secondary-only" href="#">'+l(i(n(0)).call(t,"Analyze",{hash:{},data:s}))+'</a></li> <li><a class="add-to-collection-btn secondary-only" href="#">'+l(i(n(0)).call(t,"Add to Collection...",{hash:{},data:s}))+'</a></li> <li><a class="merge-btn secondary-only" href="#">'+l(i(n(0)).call(t,"Merge",{hash:{},data:s}))+'</a></li> <li><a class="delete-btn has-danger secondary-only" href="#">'+l(i(n(0)).call(t,"Delete",{
hash:{},data:s}))+"</a></li> </ul> </li> </ul> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this,d=this.escapeExpression;return c+='<ul class="nav nav-header pull-right"> <li class="alerts-nav-item"><a class="alerts-btn btn-gray ',l=i(n(19)).call(t,t&&t.subset,"alerts",{hash:{},inverse:u.noop,
fn:u.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+='" href="#!/status/alerts">'+d(i(n(0)).call(t,"Alerts",{hash:{},data:s}))+'</a></li> <li class="sync-nav-item"><a class="sync-btn btn-gray ',l=i(n(19)).call(t,t&&t.subset,"sync",{hash:{},inverse:u.noop,fn:u.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+='" href="#!/status/sync">'+d(i(n(0)).call(t,"Sync",{hash:{},data:s}))+'</a></li> <li class="conversion-nav-item"><a class="conversion-btn btn-gray ',l=i(n(19)).call(t,t&&t.subset,"conversion",{hash:{},
inverse:u.noop,fn:u.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+='" href="#!/status/conversion">'+d(i(n(0)).call(t,"Conversion",{hash:{},data:s}))+'<span class="badge"></span></a></li> <li class="now-playing-nav-item"><a class="now-playing-btn btn-gray ',l=i(n(19)).call(t,t&&t.subset,"nowPlaying",{hash:{},inverse:u.noop,fn:u.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+='" href="#!/status/playing">'+d(i(n(0)).call(t,"Now Playing",{hash:{},data:s}))+'<span class="badge"></span></a></li> </ul> <h2>'+d(i(n(0)).call(t,"Status",{
hash:{},data:s}))+'</h2> <div class="activity-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <div class="filter-bar-right"> <span class="page-count">'+p(i(n(0)).call(e,"{1} of {2}",e&&e.page,e&&e.pages,{hash:{},data:t}))+'</span> <a class="previous-btn btn-gray ',r=a.unless.call(e,e&&e.enablePrevious,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),
(r||0===r)&&(s+=r),s+='" href="#"> <i class="glyphicon chevron-left"></i> </a> <a class="next-btn btn-gray ',r=a.unless.call(e,e&&e.enableNext,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='" href="#"> <i class="glyphicon chevron-right"></i> </a> </div> '}function l(e,t){return"disabled"}function c(e,t){var a="";return a+=' <div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h4 class="text-muted text-center">'+p(i(n(0)).call(e,"Alerts are restricted from shared users.",{
hash:{},data:t}))+"</h4> </div> </div> "}function u(e,t){return' <div class="alert-list-container"></div> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this.escapeExpression,f=this;return h+='<div class="filter-bar"> ',d=a.unless.call(t,t&&t.shared,{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" </div> ",d=a.if.call(t,t&&t.shared,{hash:{},inverse:f.program(6,u,s),fn:f.program(4,c,s),data:s}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <div class="filter-bar-right"> <button class="pause-btn btn btn-sm btn-default ',r=a.if.call(e,e&&e.isPaused,{hash:{},inverse:g.noop,fn:g.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='">'+m(i(n(0)).call(e,"Pause",{hash:{},data:t}))+'</button> <button class="resume-btn btn btn-sm btn-primary ',r=a.unless.call(e,e&&e.isPaused,{hash:{},inverse:g.noop,
fn:g.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='">'+m(i(n(0)).call(e,"Resume",{hash:{},data:t}))+"</button> </div> "}function l(e,t){return"hidden"}function c(e,t){var a,r="";return r+=' <p class="conversion-error-message"><i class="conversion-error-icon glyphicon circle-exclamation-mark text-danger"></i> '+m((a=e&&e.errorMessage,typeof a===v?a.apply(e):a))+" "+m(i(n(0)).call(e,"Check the status in {1}Optimized Versions Settings{2}.",'<a href="#!/settings/server/{3}/versions">',"</a>",e&&e.serverID,{
hash:{},data:t}))+"</p> "}function u(e,t){var a="";return a+=' <p class="conversion-status-message">'+m(i(n(0)).call(e,"Manage your completed conversions in {1}Optimized Versions Settings{2}.",'<a href="#!/settings/server/{3}/versions">',"</a>",e&&e.serverID,{hash:{},data:t}))+"</p> "}function d(e,t){var n,i="";return i+=' <div class="conversion-queue-empty-region"></div> <div class="conversion-queue-up-next-list-region"></div> <hr class="conversion-queue-divider ',n=a.unless.call(e,e&&e.shouldShowDivider,{
hash:{},inverse:g.noop,fn:g.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+='"> <div class="conversion-queue-after-up-next-list-region"></div> '}function h(e,t){var a="";return a+=' <div class="row row-padded"> <h4 class="text-muted text-center"> '+m(i(n(0)).call(e,"This requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" </h4> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g=this,m=this.escapeExpression,v="function";return f+='<div class="conversion-filter-bar filter-bar"> ',
p=a.if.call(t,t&&t.hasPausedSetting,{hash:{},inverse:g.noop,fn:g.program(1,o,s),data:s}),(p||0===p)&&(f+=p),f+=" </div> ",p=a.if.call(t,t&&t.errorMessage,{hash:{},inverse:g.program(6,u,s),fn:g.program(4,c,s),data:s}),(p||0===p)&&(f+=p),f+=" ",p=a.if.call(t,t&&t.shouldShowList,{hash:{},inverse:g.program(10,h,s),fn:g.program(8,d,s),data:s}),(p||0===p)&&(f+=p),f+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
function o(e,t){return' <div class="sessions-list-container"></div> '}function l(e,t){var n,i="";return i+=' <div class="row row-padded"> <h4 class="text-muted text-center"> ',n=a.if.call(e,e&&e.shared,{hash:{},inverse:m.program(6,u,t),fn:m.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+=" </h4> </div> "}function c(e,t){var a="";return a+=" "+g(i(n(0)).call(e,"Now Playing is restricted from shared users.",{hash:{},data:t}))+" "}function u(e,t){var n;return n=a.if.call(e,e&&e.synced,{hash:{},inverse:m.program(9,h,t),
fn:m.program(7,d,t),data:t}),n||0===n?n:""}function d(e,t){var a="";return a+=" "+g(i(n(0)).call(e,"Now Playing is unavailable with synced servers.",{hash:{},data:t}))+" "}function h(e,t){var a="";return a+=" "+g(i(n(0)).call(e,"Now Playing requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g=this.escapeExpression,m=this;return f+='<div class="filter-bar"></div> ',p=a.if.call(t,t&&t.shouldShowList,{
hash:{},inverse:m.program(3,l,s),fn:m.program(1,o,s),data:s}),(p||0===p)&&(f+=p),f+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="row row-loading"> <div class="loading loading-inline"></div> </div> <div class="sync-empty-message row row-padded hidden"> <h4 class="text-muted text-center"> '+l(i(n(0)).call(t,"Nothing is synced to this device.",{
hash:{},data:s}))+' </h4> </div> <div class="sync-device-message row hidden"> <h4 class="sync-device-message-text text-muted text-center"></h4> </div> <div class="sync-item-list-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return'<a class="edit-btn btn-gray" href="#"><i class="glyphicon pencil"></i></a>'}function l(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.devices,{
hash:{},inverse:C.program(14,g,t),fn:C.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function c(e,t){var n,i="";return i+=' <div class="row"> <div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> ',n=a.each.call(e,e&&e.devices,{hash:{},inverse:C.noop,fn:C.programWithDepth(5,u,t,e),data:t}),(n||0===n)&&(i+=n),i+=' </ul> </div> <div class="sync-device-container col-sm-8 col-md-9"></div> </div> '}function u(e,t,r){var s,o="";return o+=' <li> <a class="card btn-gray ',s=i(n(19)).call(e,(s=r&&r.selectedDevice,
null==s||s===!1?s:s.id),e&&e.id,{hash:{},inverse:C.noop,fn:C.program(6,d,t),data:t}),(s||0===s)&&(o+=s),o+='" data-id="'+I((s=e&&e.id,typeof s===M?s.apply(e):s))+'" href="#"> ',s=a.if.call(e,e&&e.name,{hash:{},inverse:C.program(10,p,t),fn:C.program(8,h,t),data:t}),(s||0===s)&&(o+=s),o+=" ",s=a.if.call(e,e&&e.isCloudSync,{hash:{},inverse:C.noop,fn:C.program(12,f,t),data:t}),(s||0===s)&&(o+=s),o+=" </a> </li> "}function d(e,t){return"selected"}function h(e,t){var n;return I((n=e&&e.name,typeof n===M?n.apply(e):n));
}function p(e,t){var n;return I((n=e&&e.device,typeof n===M?n.apply(e):n))}function f(e,t){return'<i class="cloud-sync-icon glyphicon cloud"></i><button class="cloud-sync-settings-btn btn-link btn-gray"><i class="glyphicon cogwheel"></i></button>'}function g(e,t){var a="";return a+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+I(i(n(0)).call(e,"You have no sync capable devices.",{hash:{},data:t}))+"</h4> </div> "}function m(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.sync,{
hash:{},inverse:C.program(20,b,t),fn:C.program(17,v,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function v(e,t){var n,i="";return i+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+I((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.message,typeof n===M?n.apply(e):n))+'</h4> <p class="text-center ',n=a.unless.call(e,(n=e&&e.plexPassInfo,null==n||n===!1?n:n.showButton),{hash:{},inverse:C.noop,fn:C.program(18,y,t),data:t}),(n||0===n)&&(i+=n),i+='"> <a class="btn btn-sm btn-primary" href="'+I((n=e&&e.plexPassInfo,
n=null==n||n===!1?n:n.url,typeof n===M?n.apply(e):n))+'" target="'+I((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.target,typeof n===M?n.apply(e):n))+'">'+I((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.buttonText,typeof n===M?n.apply(e):n))+"</a> </p> </div> "}function y(e,t){return"hidden"}function b(e,t){var a="";return a+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+I(i(n(0)).call(e,"This server does not support sync.",{hash:{},data:t}))+"</h4> </div> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var S,w="",M="function",I=this.escapeExpression,C=this;return w+='<div class="filter-bar"> <div class="filter-bar-right"> ',S=a.if.call(t,t&&t.hasTouchScreen,{hash:{},inverse:C.noop,fn:C.program(1,o,s),data:s}),(S||0===S)&&(w+=S),w+=' <a class="refresh-btn btn-gray" href="#"><i class="glyphicon repeat"></i></a> </div> </div> ',S=a.if.call(t,t&&t.allowSync,{hash:{},inverse:C.program(16,m,s),fn:C.program(3,l,s),data:s}),(S||0===S)&&(w+=S),w+=" "})},function(e,t,n){
var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">',(s=n.message)?r=s.call(t,{hash:{},data:a}):(s=t&&t.message,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+"</span> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"circle-ok"}function l(e,t){return"circle-exclamation-mark"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this,h="function";return u+='<button class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <i class="alert-icon glyphicon ',c=i(n(19)).call(t,t&&t.type,"success",{hash:{},inverse:d.program(3,l,s),fn:d.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+='"></i> <h4>',
c=t&&t.message,c=typeof c===h?c.apply(t):c,(c||0===c)&&(u+=c),u+="</h4> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <a class="info-link link" href="'+d((a=e&&e.url,typeof a===u?a.apply(e):a))+'" target="_blank">'+d(i(n(0)).call(e,"More Info",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u="function",d=this.escapeExpression,h=this;
return c+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">'+d((l=t&&t.content,typeof l===u?l.apply(t):l))+"</span> ",l=a.if.call(t,t&&t.url,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <span class="message">'+d(i(n(0)).call(e,"An insecure media server has been found on your network.",{
hash:{},data:t}))+'</span> <a class="reload-link link" href="#">'+d(i(n(0)).call(e,"Reload app insecurely",{hash:{},data:t}))+"</a> "}function l(e,t){var a="";return a+=' <span class="message">'+d(i(n(0)).call(e,"An unclaimed media server has been found on your network.",{hash:{},data:t}))+'</span> <a class="claim-link link" href="#">'+d(i(n(0)).call(e,"Claim it now",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h=this;
return u+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> ',c=a.if.call(t,t&&t.showInsecureMessage,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <a class="download-link link" href="#">'+p(i(n(0)).call(e,"Download now",{hash:{},data:t}))+"</a> ";
}function l(e,t){var a;return a=i(n(19)).call(e,e&&e.state,"downloaded",{hash:{},inverse:g.program(6,u,t),fn:g.program(4,c,t),data:t}),a||0===a?a:""}function c(e,t){var a="";return a+=' <a class="install-link link" href="#">'+p(i(n(0)).call(e,"Install now",{hash:{},data:t}))+"</a> "}function u(e,t){var a,r="";return r+=' <a class="link" href="'+p((a=e&&e.downloadURL,typeof a===f?a.apply(e):a))+'" target="_blank">'+p(i(n(0)).call(e,"Download now",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this.escapeExpression,f="function",g=this;return h+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">'+p(i(n(0)).call(t,"A Plex Media Server update is available!",{hash:{},data:s}))+"</span> ",d=i(n(19)).call(t,t&&t.state,"available",{hash:{},inverse:g.program(3,l,s),fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<i class="alert-icon glyphicon cardio"></i> <span class="status"></span> '})},function(e,t){e.exports=function(){return""}},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return'<a class="settings-btn btn-gray" href="#"><i class="glyphicon cogwheel"></i></a>'}function l(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
s=s||{};var c,u="",d=this,h=this.escapeExpression,p="function";return u+='<div class="breadcrumb-actions pull-right"> ',c=a.if.call(t,t&&t.showSettings,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=' <span id="channel-list-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#channel-list-dropdown" data-toggle="dropdown"><i class="glyphicon show-thumbnails"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="list-btn" data-type="media-tile-list" href="#">'+h(i(n(0)).call(t,"Posters",{
hash:{},data:s}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',c=i(n(64)).call(t,t&&t.listType,"media-tile-list",{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+='"></i></a></li> <li><a class="list-btn" data-type="media-details-list" href="#">'+h(i(n(0)).call(t,"Details",{hash:{},data:s}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',c=i(n(64)).call(t,t&&t.listType,"media-details-list",{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+='"></i></a></li> <li><a class="list-btn" data-type="media-list" href="#">'+h(i(n(0)).call(t,"List",{
hash:{},data:s}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',c=i(n(64)).call(t,t&&t.listType,"media-list",{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+='"></i></a></li> </ul> </span> </div> <span class="breadcrumb-dropdown"><a href="'+h((c=t&&t.channelUrl,typeof c===p?c.apply(t):c))+'">'+h((c=t&&t.channelTitle,typeof c===p?c.apply(t):c))+'</a></span> <span class="breadcrumb-subset-dropdown ',c=a.unless.call(t,t&&t.title,{hash:{},inverse:d.noop,fn:d.program(3,l,s),
data:s}),(c||0===c)&&(u+=c),u+='"><span class="dropdown-placeholder">'+h((c=t&&t.title,typeof c===p?c.apply(t):c))+'</span></span> <span class="list-badge badge badge-lg">'+h((c=t&&t.totalSize,typeof c===p?c.apply(t):c))+"</span> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <span id="section-list-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#section-list-dropdown" data-toggle="dropdown"><i class="glyphicon show-thumbnails"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="list-btn" data-type="episode-tile-list" href="#">'+v(i(n(0)).call(e,"Posters",{
hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',a=i(n(64)).call(e,e&&e.listType,"episode-tile-list",{hash:{},inverse:y.noop,fn:y.program(2,l,t),data:t}),(a||0===a)&&(r+=a),r+='"></i></a></li> <li><a class="list-btn" data-type="episode-details-list" href="#">'+v(i(n(0)).call(e,"Details",{hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',a=i(n(64)).call(e,e&&e.listType,"episode-details-list",{hash:{},inverse:y.noop,fn:y.program(2,l,t),data:t}),(a||0===a)&&(r+=a),
r+='"></i></a></li> <li><a class="list-btn" data-type="episode-list" href="#">'+v(i(n(0)).call(e,"List",{hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',a=i(n(64)).call(e,e&&e.listType,"episode-list",{hash:{},inverse:y.noop,fn:y.program(2,l,t),data:t}),(a||0===a)&&(r+=a),r+='"></i></a></li> </ul> </span> '}function l(e,t){return"hidden"}function c(e,t){var n,i="";return i+=' <span id="section-dropdown" class="details-breadcrumb dropdown"> ',n=a.if.call(e,e&&e.section,{hash:{},
inverse:y.program(7,d,t),fn:y.program(5,u,t),data:t}),(n||0===n)&&(i+=n),i+=' <a class="btn-gray dropdown-toggle split-dropdown-toggle" href="#section-dropdown" data-toggle="dropdown"> <i class="caret-icon caret-icon-sm"></i> </a> <ul class="dropdown-menu"> ',n=a.if.call(e,e&&e.showPlaylists,{hash:{},inverse:y.noop,fn:y.program(9,h,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.each.call(e,e&&e.sections,{hash:{},inverse:y.noop,fn:y.programWithDepth(12,f,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> </span> ";
}function u(e,t){var n,i="";return i+=' <a class="section-btn btn-gray" data-key="'+v((n=e&&e.section,n=null==n||n===!1?n:n.key,typeof n===b?n.apply(e):n))+'" href="#">'+v((n=e&&e.section,n=null==n||n===!1?n:n.title,typeof n===b?n.apply(e):n))+"</a> "}function d(e,t){var a="";return a+=' <a class="playlists-btn btn-gray" href="#">'+v(i(n(0)).call(e,"Playlists",{hash:{},data:t}))+"</a> "}function h(e,t){var r,s="";return s+=' <li><a class="playlists-btn" href="#"><span class="dropdown-truncated-label">'+v(i(n(0)).call(e,"Playlists",{
hash:{},data:t}))+"</span>",r=a.unless.call(e,(r=e&&e.section,null==r||r===!1?r:r.key),{hash:{},inverse:y.noop,fn:y.program(10,p,t),data:t}),(r||0===r)&&(s+=r),s+="</a></li> "}function p(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function f(e,t,a){var r,s="";return s+=' <li><a class="section-btn" data-key="'+v((r=e&&e.key,typeof r===b?r.apply(e):r))+'" href="#"><span class="dropdown-truncated-label">'+v((r=e&&e.title,typeof r===b?r.apply(e):r))+'</span><i class="dropdown-selected-icon glyphicon ok-2 ',
r=i(n(64)).call(e,(r=a&&a.section,null==r||r===!1?r:r.key),e&&e.key,{hash:{},inverse:y.noop,fn:y.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='"></i></a></li> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v=this.escapeExpression,y=this,b="function";return m+='<div class="breadcrumb-actions pull-right"> ',g=a.if.call(t,t&&t.listType,{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(g||0===g)&&(m+=g),m+=' <a class="previous-btn btn-gray hidden" href="#"><i class="glyphicon chevron-left"></i></a> <a class="next-btn btn-gray hidden" href="#"><i class="glyphicon chevron-right"></i></a> </div> ',
g=a.if.call(t,t&&t.showSectionDropdown,{hash:{},inverse:y.noop,fn:y.program(4,c,s),data:s}),(g||0===g)&&(m+=g),m+=' <span class="grandparent-item hidden"></span> <span class="parents-dropdown hidden"></span> <span class="siblings-dropdown hidden"></span> <span class="current-item hidden"></span> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <span id="section-actions-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#section-actions-dropdown" data-toggle="dropdown"><i class="glyphicon cogwheel"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="import-btn" href="#">'+u(i(n(0)).call(e,"Import from iTunes",{
hash:{},data:t}))+"</a></li> </ul> </span> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this.escapeExpression,d=this,h="function";return c+='<div class="breadcrumb-actions pull-right"> ',l=a.if.call(t,t&&t.canImportPlaylists,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=' </div> <span class="breadcrumb-dropdown"></span> <span class="breadcrumb-subset-dropdown"></span> <span class="breadcrumb-items-dropdown"> <span class="items-badge badge badge-lg">'+u((l=t&&t.totalSize,
typeof l===h?l.apply(t):l))+"</span> </span> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <a class="update-btn btn-gray btn-loading btn-loading-replace btn-loading-static ',r=a.if.call(e,e&&e.refreshing,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='" href="#" title="'+f((r=e&&e.updateTitle,typeof r===p?r.apply(e):r))+'" data-title-alt="'+f((r=e&&e.updateTitleAlt,
typeof r===p?r.apply(e):r))+'" data-toggle="tooltip"> <span class="loading loading-bc"></span> <i class="btn-label-alt glyphicon ban"></i> <i class="btn-label glyphicon repeat"></i> </a> <span id="section-actions-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#section-actions-dropdown" data-toggle="dropdown"><i class="glyphicon cogwheel"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="edit-btn btn-gray" href="#">'+f(i(n(0)).call(e,"Edit Library",{
hash:{},data:t}))+'</a></li> <li><a class="share-btn" href="#">'+f(i(n(0)).call(e,"Share...",{hash:{},data:t}))+'</a></li> <li><a class="analyze-btn" href="#">'+f(i(n(0)).call(e,"Analyze",{hash:{},data:t}))+'</a></li> <li><a class="force-refresh-btn" href="#">'+f(i(n(0)).call(e,"Refresh All",{hash:{},data:t}))+'</a></li> <li><a class="empty-trash-btn" href="#">'+f(i(n(0)).call(e,"Empty Trash",{hash:{},data:t}))+'</a></li> <li><a class="delete-btn has-danger" href="#">'+f(i(n(0)).call(e,"Delete Library",{
hash:{},data:t}))+"</a></li> </ul> </span> "}function l(e,t){return"active"}function c(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this,p="function",f=this.escapeExpression;return d+='<div class="breadcrumb-actions pull-right"> ',u=a.unless.call(t,t&&t.limited,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+=' <span id="section-list-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#section-list-dropdown" data-toggle="dropdown"><i class="glyphicon show-thumbnails"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="list-btn" data-type="media-tile-list" href="#">'+f(i(n(0)).call(t,"Posters",{
hash:{},data:s}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=i(n(64)).call(t,t&&t.listType,"media-tile-list",{hash:{},inverse:h.noop,fn:h.program(4,c,s),data:s}),(u||0===u)&&(d+=u),d+='"></i></a></li> <li><a class="list-btn" data-type="media-details-list" href="#">'+f(i(n(0)).call(t,"Details",{hash:{},data:s}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=i(n(64)).call(t,t&&t.listType,"media-details-list",{hash:{},inverse:h.noop,fn:h.program(4,c,s),data:s}),(u||0===u)&&(d+=u),d+='"></i></a></li> <li><a class="list-btn" data-type="media-list" href="#">'+f(i(n(0)).call(t,"List",{
hash:{},data:s}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=i(n(64)).call(t,t&&t.listType,"media-list",{hash:{},inverse:h.noop,fn:h.program(4,c,s),data:s}),(u||0===u)&&(d+=u),d+='"></i></a></li> </ul> </span> </div> <span class="breadcrumb-dropdown"></span> <span class="breadcrumb-subset-dropdown"></span> <span class="breadcrumb-type-dropdown"></span> <span class="breadcrumb-items-dropdown"> <span class="items-badge badge badge-lg">'+f((u=t&&t.totalSize,typeof u===p?u.apply(t):u))+"</span> </span> ";
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,a){var r,s="";return s+=' <li><a class="card btn-gray ',r=i(n(19)).call(e,a&&a.currentKey,e&&e.key,{hash:{},inverse:d.noop,fn:d.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='" href="#!/server/'+h(i(n(69)).call(e,a&&a.serverID,{hash:{},data:t}))+"/directory/"+h(i(n(69)).call(e,e&&e.key,{hash:{},data:t}))+'">'+h(i(n(0)).call(e,e&&e.title,{hash:{},data:t
}))+"</a></li> "}function l(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this,h=this.escapeExpression;return u+="<h2>"+h(i(n(0)).call(t,"Channel Directory",{hash:{},data:s}))+'</h2> <div class="filter-bar"> <a class="btn btn-sm btn-default pull-right" href="#!/server/'+h(i(n(69)).call(t,t&&t.serverID,{hash:{},data:s}))+'/channels">'+h(i(n(0)).call(t,"Browse Channels",{hash:{},data:s}))+'</a> </div> <div class="row"> <div class="col-md-3"> <ul class="nav nav-cards"> ',
c=a.each.call(t,t&&t.directories,{hash:{},inverse:d.noop,fn:d.programWithDepth(1,o,s,t),data:s}),(c||0===c)&&(u+=c),u+=' </ul> </div> <div class="directory-container col-md-9"></div> </div> '})},function(e,t){e.exports=function(){return""}},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+='<span class="badge">'+g((n=e&&e.allCount,typeof n===f?n.apply(e):n))+"</span>"}function l(e,t){
var n,i="";return i+='<span class="badge">'+g((n=e&&e.videoCount,typeof n===f?n.apply(e):n))+"</span>"}function c(e,t){var n,i="";return i+='<span class="badge">'+g((n=e&&e.musicCount,typeof n===f?n.apply(e):n))+"</span>"}function u(e,t){var n,i="";return i+='<span class="badge">'+g((n=e&&e.photoCount,typeof n===f?n.apply(e):n))+"</span>"}function d(e,t){var a="";return a+=' <div class="filter-bar"> <a class="btn btn-sm btn-primary pull-right" href="#!/server/'+g(i(n(69)).call(e,e&&e.serverID,{hash:{},
data:t}))+'/directory">'+g(i(n(0)).call(e,"Install Channels",{hash:{},data:t}))+'</a> <a class="check-updates-btn btn btn-sm btn-default btn-loading" href="#"> <div class="loading loading-sm"></div> <span class="btn-label">'+g(i(n(0)).call(e,"Check for Updates",{hash:{},data:t}))+"</span> </a> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f="function",g=this.escapeExpression,m=this;return p+='<ul class="nav nav-header pull-right"> <li><a class="all-btn btn-gray selected" href="#">'+g(i(n(0)).call(t,"All",{
hash:{},data:s})),h=a.if.call(t,t&&t.allCount,{hash:{},inverse:m.noop,fn:m.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+='</a></li> <li><a class="video-btn btn-gray" href="#">'+g(i(n(0)).call(t,"Video",{hash:{},data:s})),h=a.if.call(t,t&&t.videoCount,{hash:{},inverse:m.noop,fn:m.program(3,l,s),data:s}),(h||0===h)&&(p+=h),p+='</a></li> <li><a class="music-btn btn-gray" href="#">'+g(i(n(0)).call(t,"Music",{hash:{},data:s})),h=a.if.call(t,t&&t.musicCount,{hash:{},inverse:m.noop,fn:m.program(5,c,s),data:s
}),(h||0===h)&&(p+=h),p+='</a></li> <li><a class="photo-btn btn-gray" href="#">'+g(i(n(0)).call(t,"Photo",{hash:{},data:s})),h=a.if.call(t,t&&t.photoCount,{hash:{},inverse:m.noop,fn:m.program(7,u,s),data:s}),(h||0===h)&&(p+=h),p+="</a></li> </ul> <h2>"+g(i(n(0)).call(t,"Channels",{hash:{},data:s}))+"</h2> ",h=a.unless.call(t,t&&t.shared,{hash:{},inverse:m.noop,fn:m.program(9,d,s),data:s}),(h||0===h)&&(p+=h),p+=' <div class="channels-container"></div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){
function r(e,t){return' <a class="media-poster-container play-btn" href="#"> <div class="album-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </a> '}function s(e,t){return' <div class="album-poster item-poster media-poster"></div> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,c="",u="function",d=this.escapeExpression,h=this;return c+='<div class="details-title-container"> <h1><a class="artist-title btn-metadata-link" href="#!/server/',
(l=n.serverID)?o=l.call(t,{hash:{},data:a}):(l=t&&t.serverID,o=typeof l===u?l.call(t,{hash:{},data:a}):l),c+=d(o)+"/details/",(l=n.parentKey)?o=l.call(t,{hash:{},data:a}):(l=t&&t.parentKey,o=typeof l===u?l.call(t,{hash:{},data:a}):l),c+=d(o)+'"></a></h1> <h2 class="album-title"></h2> <h3 class="item-year"></h3> </div> <div class="details-metadata-container"> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> </div> <p class="metadata-labels"> <span class="rating-container rating-container-inline"></span> </p> <div class="summary-container"></div> <div class="track-list-container details-list-region"></div> </div> <div class="details-poster-container"> ',
o=n.if.call(t,t&&t.canPlay,{hash:{},inverse:h.program(3,s,a),fn:h.program(1,r,a),data:a}),(o||0===o)&&(c+=o),c+=" </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return' <a class="media-poster-container play-btn" href="#"> <div class="artist-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </a> ';
}function l(e,t){return' <div class="artist-poster item-poster media-poster"></div> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h=this;return u+='<div class="details-title-container"> <h1 class="item-title"></h1> </div> <div class="details-metadata-container"> <div class="artist-details-metadata-container"> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> </div> <p class="metadata-labels"> </p> <div class="summary-container"></div> </div> <div class="popular-tracks-region hidden"> <h3 class="popular-tracks-header">'+d(i(n(0)).call(t,"Popular Tracks",{
hash:{},data:s}))+'</h3> </div> <div class="albums-region details-list-region"> <h3 class="albums-header">'+d(i(n(0)).call(t,"Albums",{hash:{},data:s}))+'</h3> </div> <div class="extras-region hidden"> <h3 class="extras-header">'+d(i(n(0)).call(t,"Music Videos",{hash:{},data:s}))+'</h3> </div> <div class="concert-region hidden"> <h3 class="concert-header"> '+d(i(n(0)).call(t,"On Tour",{hash:{},data:s}))+'<div class="concert-api-logo"></div> </h3> </div> <div class="similar-artists-region hidden"> <h3 class="similar-artists-header">'+d(i(n(0)).call(t,"Similar Artists",{
hash:{},data:s}))+'</h3> </div> </div> <div class="details-poster-container"> ',c=a.if.call(t,t&&t.canPlay,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=" </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="details-title-container"> <h1 class="item-title"></h1> <h2 class="item-year"></h2> </div> <div class="details-metadata-container"> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> <div class="rating-container"></div> <div class="content-rating-flag-container"></div> </div> <p class="metadata-labels"> <span class="item-duration metadata-duration"></span> </p> <p class="item-tagline metadata-tagline"></p> <div class="item-director metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Director",{
hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Writer",{hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Cast",{hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+l(i(n(0)).call(t,"Audio",{
hash:{},data:s}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Subtitles",{hash:{},data:s}))+'</span> </div> <div class="summary-container"></div> <div class="studio-flag-container"></div> </div> <div class="details-poster-container"> <a class="media-poster-container play-btn" href="#"> <div class="clip-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </a> <div class="video-audio-flags-container media-flags"></div> </div> ';
})},function(e,t){e.exports=function(){return""}},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c="function",u=this.escapeExpression;return l+='<div class="details-title-container"> <h1><a class="show-title btn-metadata-link" href="#!/server/'+u((o=t&&t.serverID,typeof o===c?o.apply(t):o))+"/details/"+u((o=t&&t.grandparentKey,typeof o===c?o.apply(t):o))+'"></a></h1> <h2 class="episode-title"></h2> <h3 class="episode-index"></h3> </div> <div class="details-metadata-container"> <div class="details-progress-container"> <div class="item-progress details-progress"></div> </div> <div class="metadata-right pull-right"> <div class="item-available-at metadata-tags"></div> <div class="rating-container"></div> <div class="content-rating-flag-container"></div> </div> <p class="metadata-labels"> <span class="item-duration metadata-duration"></span> <span class="item-unwatched-label label label-primary">'+u(i(n(0)).call(t,"Unwatched",{
hash:{},data:s}))+'</span> <a class="item-unavailable-btn label label-btn label-danger" href="#"><i class="label-icon glyphicon circle-info"></i> '+u(i(n(0)).call(t,"Unavailable",{hash:{},data:s}))+'</a> </p> <div class="item-director metadata-tags"> <span class="metadata-label">'+u(i(n(0)).call(t,"Director",{hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+u(i(n(0)).call(t,"Writer",{hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+u(i(n(0)).call(t,"Cast",{
hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+u(i(n(0)).call(t,"Audio",{hash:{},data:s}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+u(i(n(0)).call(t,"Subtitles",{hash:{},data:s}))+'</span> </div> <div class="summary-container"></div> </div> <div class="details-poster-container"> <a class="media-poster-container play-btn" href="#"> <div class="episode-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> <span class="media-count-badge badge badge-lg hidden"></span> </div> </a> <div class="video-audio-flags-container media-flags"></div> </div> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="details-title-container"> <h1 class="item-title"></h1> <h2 class="item-year"></h2> </div> <div class="details-metadata-container"> <div class="movie-details-metadata-container"> <div class="details-progress-container"> <div class="item-progress details-progress"></div> </div> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> <div class="rating-container"></div> <div class="content-rating-flag-container"></div> </div> <p class="metadata-labels"> <span class="item-duration metadata-duration"></span> <span class="item-unwatched-label label label-primary">'+l(i(n(0)).call(t,"Unwatched",{
hash:{},data:s}))+'</span> <a class="item-unavailable-btn label label-btn label-danger" href="#"><i class="label-icon glyphicon circle-info"></i> '+l(i(n(0)).call(t,"Unavailable",{hash:{},data:s}))+'</a> </p> <p class="item-tagline metadata-tagline"></p> <div class="item-director metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Director",{hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Writer",{
hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Cast",{hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+l(i(n(0)).call(t,"Audio",{hash:{},data:s}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Subtitles",{hash:{},
data:s}))+'</span> </div> <div class="summary-container"></div> <div class="studio-flag-container"></div> </div> <div class="extras-region hidden"> <h3 class="extras-header">'+l(i(n(0)).call(t,"Extras",{hash:{},data:s}))+'</h3> </div> </div> <div class="details-poster-container"> <a class="media-poster-container play-btn" href="#"> <div class="movie-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> <span class="media-count-badge badge badge-lg hidden"></span> </div> </a> <div class="video-audio-flags-container media-flags"></div> </div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s="",o="function",l=this.escapeExpression;return s+='<div class="photo-album-page '+l((r=t&&t.styles,r=null==r||r===!1?r:r.page,typeof r===o?r.apply(t):r))+'"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <div class="playlist-poster item-poster media-poster '+p((n=e&&e.type,
typeof n===h?n.apply(e):n))+'"> ',n=a.if.call(e,e&&e.smart,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> "}function l(e,t){return' <span class="smart-badge badge badge-round"> <i class="icon glyphicon cogwheel"></i> </span> '}function c(e,t){var n,i="";return i+=" ",n=a.unless.call(e,e&&e.hasComposite,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h="function",p=this.escapeExpression,f=this;
return d+='<div class="details-title-container '+p((u=t&&t.type,typeof u===h?u.apply(t):u))+'"> <h1 class="item-title"></h1> </div> <div class="details-metadata-container '+p((u=t&&t.type,typeof u===h?u.apply(t):u))+'"> <div class="playlist-details-metadata-container"> <p class="metadata-right pull-right"> <span class="item-duration metadata-duration"></span> </p> <p class="metadata-labels"> <span class="item-count"></span> </p> <p class="item-summary metadata-summary"></p> </div> <div class="playlist-items-container details-list-region"></div> <h1 class="error-text hidden">'+p(i(n(0)).call(t,"Failed to load items for this playlist.",{
hash:{},data:s}))+'</h1> <div class="loading-container"> <div class="loading loading-inline"></div> </div> </div> <div class="details-poster-container '+p((u=t&&t.type,typeof u===h?u.apply(t):u))+'"> ',u=a.if.call(t,t&&t.hasComposite,{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+=' <div class="playlist-side-strip item-side-strip media-poster '+p((u=t&&t.type,typeof u===h?u.apply(t):u))+'"> ',u=a.if.call(t,t&&t.smart,{hash:{},inverse:f.noop,fn:f.program(4,c,s),data:s}),
(u||0===u)&&(d+=u),d+=" </div> </div> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<div class="details-title-container"> <h1><a class="show-title btn-metadata-link" href="#!/server/',(s=n.serverID)?r=s.call(t,{hash:{},data:a}):(s=t&&t.serverID,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+"/details/",(s=n.parentKey)?r=s.call(t,{
hash:{},data:a}):(s=t&&t.parentKey,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+'"></a></h1> <h2 class="season-title"></h2> </div> <div class="details-metadata-container"> <div class="media-actions-container title"></div> <div class="summary-container"></div> <div class="episode-list-container details-list-region"></div> </div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return' <a class="media-poster-container play-btn" href="#"> <div class="show-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> <span class="unwatched-count-badge details-unwatched-count-badge badge badge-lg hidden"></span> </div> </a> ';
}function s(e,t){return' <div class="show-poster item-poster media-poster"> <span class="unwatched-count-badge details-unwatched-count-badge badge badge-lg hidden"></span> </div> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l="",c=this;return l+='<div class="details-title-container"> <h1 class="item-title"></h1> <h2 class="item-year"></h2> </div> <div class="details-metadata-container"> <div class="show-details-metadata-container"> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> </div> <p class="metadata-labels"> <span class="item-duration metadata-duration"></span> <span class="rating-container rating-container-inline"></span> <span class="content-rating-flag-container content-rating-flag-container-inline"></span> </p> <div class="summary-container"></div> <div class="studio-flag-container"></div> </div> <div class="season-list-container details-list-region"></div> </div> <div class="details-poster-container"> ',
o=n.if.call(t,t&&t.canPlay,{hash:{},inverse:c.program(3,s,a),fn:c.program(1,r,a),data:a}),(o||0===o)&&(l+=o),l+=" </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h1>'+l(i(n(0)).call(t,"This media type does not have a details page.",{
hash:{},data:s}))+"</h1> </div> </div> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<a class="concert-link" target="_blank"> <div class="concert-calendar"> <div class="concert-month"></div> <div class="concert-day"></div> </div> <div class="concert-details"> <div class="concert-name"></div> <div class="concert-location"> <span class="concert-venue"></span> (<span class="concert-city"></span>) </div> </div> </a> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<p class="item-summary metadata-summary"></p> <div class="summary-divider hidden"> <button type="button" class="summary-divider-btn">'+l(i(n(0)).call(t,"More",{hash:{},data:s}))+"</button> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <li><a class="auto-match-agent" href="#" data-id="'+d((n=e&&e.identifier,typeof n===u?n.apply(e):n))+'">'+d((n=e&&e.name,typeof n===u?n.apply(e):n))+"</a></li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u="function",d=this.escapeExpression,h=this;return c+='<a class="dropdown-toggle" href="#auto-match-dropdown" data-toggle="dropdown">'+d(i(n(0)).call(t,"Auto Match",{
hash:{},data:s}))+' <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu"> ',l=a.each.call(t,t&&t.agents,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=" </ul> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <a class="breadcrumb-btn btn-gray" data-key="'+g((n=e&&e.item,n=null==n||n===!1?n:n.key,typeof n===f?n.apply(e):n))+'" href="#"><span class="breadcrumb-truncated-label">'+g((n=e&&e.item,
n=null==n||n===!1?n:n.title,typeof n===f?n.apply(e):n))+'</span></a> <a class="btn-gray dropdown-toggle split-dropdown-toggle" href="#'+g((n=e&&e.id,typeof n===f?n.apply(e):n))+'" data-toggle="dropdown"> <i class="caret-icon caret-icon-sm"></i> </a> <ul class="dropdown-menu"> ',n=a.each.call(e,e&&e.items,{hash:{},inverse:m.noop,fn:m.programWithDepth(2,l,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function l(e,t,a){var r,s="";return s+=' <li><a class="breadcrumb-btn" data-key="'+g((r=e&&e.key,typeof r===f?r.apply(e):r))+'" href="#"><span class="dropdown-truncated-label">'+g((r=e&&e.title,
typeof r===f?r.apply(e):r))+'</span><i class="dropdown-selected-icon glyphicon ok-2 ',r=i(n(64)).call(e,(r=a&&a.item,null==r||r===!1?r:r.key),e&&e.key,{hash:{},inverse:m.noop,fn:m.program(3,c,t),data:t}),(r||0===r)&&(s+=r),s+='"></i></a></li> '}function c(e,t){return"hidden"}function u(e,t){var n,i="";return i+=' <a class="breadcrumb-btn btn-gray" ',n=a.unless.call(e,e&&e.hasDetails,{hash:{},inverse:m.noop,fn:m.program(6,d,t),data:t}),(n||0===n)&&(i+=n),i+=' href="#"> <span class="breadcrumb-truncated-label">'+g((n=e&&e.item,
n=null==n||n===!1?n:n.title,typeof n===f?n.apply(e):n))+"</span> </a> "}function d(e,t){var n,i="";return i+='data-key="'+g((n=e&&e.item,n=null==n||n===!1?n:n.key,typeof n===f?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f="function",g=this.escapeExpression,m=this;return h=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:m.program(5,u,s),fn:m.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+='<li><a class="download-btn" href="'+h((a=e&&e.downloadUrl,typeof a===d?a.apply(e):a))+'" target="'+h((a=e&&e.defaultLinkTarget,typeof a===d?a.apply(e):a))+'" ',a=i(n(64)).call(e,e&&e.defaultLinkTarget,"_blank",{hash:{},inverse:p.noop,fn:p.program(2,l,t),data:t}),(a||0===a)&&(r+=a),r+=' tabindex="-1">'+h(i(n(0)).call(e,"Download",{hash:{},data:t}))+"</a></li>"}function l(e,t){var n,i="";return i+='download="'+h((n=e&&e.downloadName,
typeof n===d?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d="function",h=this.escapeExpression,p=this;return u+='<li><a class="play-version-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play Version...",{hash:{},data:s}))+'</a></li> <li><a class="play-all-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play All",{hash:{},data:s}))+'</a></li> <li><a class="play-shuffled-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Shuffle",{hash:{},data:s}))+'</a></li> <li><a class="play-next-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play Next",{
hash:{},data:s}))+'</a></li> <li><a class="add-to-queue-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Add to Queue",{hash:{},data:s}))+'</a></li> <li><a class="play-mix-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play Plex Mix",{hash:{},data:s}))+'</a></li> <li><a class="play-trailer-btn play-primary-extra-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play Trailer",{hash:{},data:s}))+'</a></li> <li><a class="play-music-video-btn play-primary-extra-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play Music Video",{
hash:{},data:s}))+'</a></li> <li><a class="add-to-playlist-btn btn-link" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Add to Playlist...",{hash:{},data:s}))+'</a></li> <li class="divider"></li> <li><a class="refresh-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Refresh",{hash:{},data:s}))+'</a></li> <li><a class="mark-watched-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Mark as Watched",{hash:{},data:s}))+'</a></li> <li><a class="mark-unwatched-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Mark as Unwatched",{
hash:{},data:s}))+'</a></li> <li><a class="sync-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Sync...",{hash:{},data:s}))+'</a></li> <li><a class="convert-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Optimize...",{hash:{},data:s}))+"</a></li> ",c=a.if.call(t,t&&t.downloadUrl,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=' <li><a class="watch-later-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Watch Later",{hash:{},data:s}))+'</a></li> <li><a class="share-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Share...",{
hash:{},data:s}))+'</a></li> <li><a class="recommend-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Recommend...",{hash:{},data:s}))+'</a></li> <li><a class="delete-btn has-danger" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Delete",{hash:{},data:s}))+'</a></li> <li><a class="info-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Info",{hash:{},data:s}))+"</a></li> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="play-queue-empty-message">'+l(i(n(0)).call(t,"Nothing queued",{hash:{},data:s}))+"</div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){return"readonly"}function c(e,t){return' <button class="btn-gray save-btn" href="#"> <i class="plex-icon-add-to-playlist"></i> </button> ';
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this,p=this.escapeExpression;return d+='<button class="btn-link dropdown-toggle ',u=a.unless.call(t,t&&t.canEdit,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='" href="#play-queue-dropdown" data-toggle="dropdown"> <i class="glyphicon show-thumbnails-with-lines"></i> </button> <ol class="play-queue-list dropdown-menu pull-right ',u=a.unless.call(t,t&&t.canEdit,{hash:{},inverse:h.noop,fn:h.program(3,l,s),
data:s}),(u||0===u)&&(d+=u),d+='"> <li class="dropdown-header play-queue-header"> ',u=a.if.call(t,t&&t.canPlaylist,{hash:{},inverse:h.noop,fn:h.program(5,c,s),data:s}),(u||0===u)&&(d+=u),d+=' <i class="glyphicon show-thumbnails-with-lines"></i> '+p(i(n(0)).call(t,"Up Next",{hash:{},data:s}))+" </li> </ol> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<a class="play-queue-metadata-region" href="#"></a> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<div class="media-poster ',(s=n.type)?r=s.call(t,{hash:{},data:a}):(s=t&&t.type,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+'"></div> <div class="media-item"> <div class="media-title"></div> <div class="media-subtitle-1"><span class="media-primary-subtitle"></span><span class="media-secondary-subtitle"></span></div> </div> <button class="delete-btn btn-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+='<li><a class="download-btn" href="'+h((a=e&&e.downloadUrl,typeof a===d?a.apply(e):a))+'" target="'+h((a=e&&e.defaultLinkTarget,typeof a===d?a.apply(e):a))+'" ',a=i(n(64)).call(e,e&&e.defaultLinkTarget,"_blank",{hash:{},inverse:p.noop,fn:p.program(2,l,t),data:t}),(a||0===a)&&(r+=a),r+=' tabindex="-1">'+h(i(n(0)).call(e,"Download",{
hash:{},data:t}))+"</a></li>"}function l(e,t){var n,i="";return i+='download="'+h((n=e&&e.downloadName,typeof n===d?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d="function",h=this.escapeExpression,p=this;return u+='<li><a class="play-mix-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play Plex Mix",{hash:{},data:s}))+'</a></li> <li><a class="add-to-playlist-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Add to Playlist...",{hash:{},data:s}))+'</a></li> <li class="divider"></li> <li><a class="sync-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Sync...",{
hash:{},data:s}))+"</a></li> ",c=a.if.call(t,t&&t.downloadUrl,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=' <li><a class="share-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Share...",{hash:{},data:s}))+'</a></li> <li><a class="recommend-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Recommend...",{hash:{},data:s}))+'</a></li> <li><a class="info-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Info",{hash:{},data:s}))+"</a></li> "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,a){var r,s="";return s+=' <li><a href="#" class="type-btn" data-key="'+h((r=e&&e.key,typeof r===d?r.apply(e):r))+'">'+h(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+" ",r=i(n(19)).call(e,(r=a&&a.currentType,null==r||r===!1?r:r.key),e&&e.key,{hash:{},inverse:p.noop,fn:p.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="</a></li> "}function l(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>';
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d="function",h=this.escapeExpression,p=this;return u+='<a class="btn-gray dropdown-toggle" href="#playlist-type-dropdown" data-toggle="dropdown">'+h(i(n(0)).call(t,(c=t&&t.currentType,null==c||c===!1?c:c.title),{hash:{},data:s}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',c=a.each.call(t,t&&t.types,{hash:{},inverse:p.noop,fn:p.programWithDepth(1,o,s,t),data:s}),(c||0===c)&&(u+=c),u+=" </ul> "})},function(e,t,n){
var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"active"}function s(e,t){return"plex-icon-companion-cast-active"}function o(e,t){return"plex-icon-companion-cast"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var l,c="",u=this;return c+='<a class="dropdown-toggle ',l=n.if.call(t,t&&t.isActive,{hash:{},inverse:u.noop,fn:u.program(1,r,a),data:a}),(l||0===l)&&(c+=l),c+='" href="#primary-player-dropdown" data-toggle="dropdown"> <i class="',l=n.if.call(t,t&&t.isActive,{
hash:{},inverse:u.program(5,o,a),fn:u.program(3,s,a),data:a}),(l||0===l)&&(c+=l),c+='"></i><i class="caret-icon"></i> </a> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <li class="dropdown-header"><span class="dropdown-truncated-label">',r=a.if.call(e,e&&e.nowPlaying,{hash:{},inverse:w.noop,fn:w.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=b((r=e&&e.primaryPlayer,r=null==r||r===!1?r:r.friendlyName,
typeof r===S?r.apply(e):r))+"</span></li> ",r=a.if.call(e,e&&e.showNowPlaying,{hash:{},inverse:w.noop,fn:w.program(4,c,t),data:t}),(r||0===r)&&(s+=r),s+=' <li> <a class="local-player-btn" href="#"> <i class="glyphicon ban"></i> '+b(i(n(0)).call(e,"Disconnect",{hash:{},data:t}))+" </a> </li> "}function l(e,t){var a="";return a+=b(i(n(0)).call(e,"Casting on",{hash:{},data:t}))+" "}function c(e,t){var n,i="";return i+=" ",n=a.each.call(e,e&&e.nowPlaying,{hash:{},inverse:w.noop,fn:w.program(5,u,t),data:t
}),(n||0===n)&&(i+=n),i+=" "}function u(e,t){var n,i="";return i+=' <li> <a class="now-playing-btn" data-id="'+b((n=e&&e.ratingKey,typeof n===S?n.apply(e):n))+'" href="#"> <i class="glyphicon play"></i> <span class="dropdown-truncated-label">'+b((n=e&&e.title,typeof n===S?n.apply(e):n))+"</span> </a> </li> "}function d(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.showPlayers,{hash:{},inverse:w.program(14,m,t),fn:w.program(8,h,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function h(e,t){var n,i="";return i+=" ",
n=a.if.call(e,e&&e.showCast,{hash:{},inverse:w.noop,fn:w.program(9,p,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.each.call(e,e&&e.players,{hash:{},inverse:w.noop,fn:w.program(12,g,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function p(e,t){var r,s="";return s+=' <li> <a class="cast-player-btn" href="#"> <span class="dropdown-truncated-label">'+b(i(n(0)).call(e,"Cast...",{hash:{},data:t}))+"</span> ",r=a.if.call(e,e&&e.selected,{hash:{},inverse:w.noop,fn:w.program(10,f,t),data:t}),(r||0===r)&&(s+=r),s+=" </a> </li> ";
}function f(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function g(e,t){var n,i="";return i+=' <li> <a class="plex-player-btn" data-id="'+b((n=e&&e.machineIdentifier,typeof n===S?n.apply(e):n))+'" href="#"> <span class="dropdown-truncated-label">'+b((n=e&&e.name,typeof n===S?n.apply(e):n))+"</span> ",n=a.if.call(e,e&&e.selected,{hash:{},inverse:w.noop,fn:w.program(10,f,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> </li> "}function m(e,t){var a="";return a+=' <li class="dropdown-menu-item"> <a class="disabled">'+b(i(n(0)).call(e,"No players found",{
hash:{},data:t}))+"</a> </li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var v,y="",b=this.escapeExpression,S="function",w=this;return v=a.if.call(t,t&&t.primaryPlayer,{hash:{},inverse:w.program(7,d,s),fn:w.program(1,o,s),data:s}),(v||0===v)&&(y+=v),y+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <a class="dropdown-toggle" href="#primary-server-dropdown" data-toggle="dropdown"> <span class="dropdown-friendly-name">'+f((n=e&&e.currentServer,
n=null==n||n===!1?n:n.friendlyName,typeof n===p?n.apply(e):n))+'</span> <i class="caret-icon"></i> </a> <ul class="dropdown-menu"> ',n=a.each.call(e,e&&e.servers,{hash:{},inverse:g.noop,fn:g.programWithDepth(2,l,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function l(e,t,a){var r,s="";return s+=' <li><a data-id="'+f((r=e&&e.machineIdentifier,typeof r===p?r.apply(e):r))+'" href="#"><span class="dropdown-truncated-label">'+f((r=e&&e.friendlyName,typeof r===p?r.apply(e):r))+"</span>",r=i(n(19)).call(e,(r=a&&a.currentServer,
null==r||r===!1?r:r.machineIdentifier),e&&e.machineIdentifier,{hash:{},inverse:g.noop,fn:g.program(3,c,t),data:t}),(r||0===r)&&(s+=r),s+="</a></li> "}function c(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function u(e,t){var n,i="";return i+=' <span class="dropdown-placeholder"> <span class="dropdown-friendly-name">'+f((n=e&&e.currentServer,n=null==n||n===!1?n:n.friendlyName,typeof n===p?n.apply(e):n))+"</span> </span> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
s=s||{};var d,h="",p="function",f=this.escapeExpression,g=this;return d=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:g.program(5,u,s),fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <a class="dropdown-toggle" href="#section-dropdown" data-toggle="dropdown">'+f((n=e&&e.currentSectionTitle,typeof n===m?n.apply(e):n))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',
n=a.if.call(e,e&&e.showPlaylists,{hash:{},inverse:g.noop,fn:g.programWithDepth(2,l,t,e),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.each.call(e,e&&e.sections,{hash:{},inverse:g.noop,fn:g.programWithDepth(5,u,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function l(e,t,r){var s,o="";return o+=' <li><a href="#!/server/'+f(i(n(69)).call(e,r&&r.serverID,{hash:{},data:t}))+'/playlists"><span class="dropdown-truncated-label">'+f(i(n(0)).call(e,"Playlists",{hash:{},data:t}))+"</span>",s=a.unless.call(e,e&&e.currentSectionKey,{
hash:{},inverse:g.noop,fn:g.program(3,c,t),data:t}),(s||0===s)&&(o+=s),o+="</a></li> "}function c(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function u(e,t,a){var r,s="";return s+=' <li><a href="#!/server/'+f(i(n(69)).call(e,a&&a.serverID,{hash:{},data:t}))+"/section/"+f(i(n(69)).call(e,e&&e.key,{hash:{},data:t}))+'"><span class="dropdown-truncated-label">'+f((r=e&&e.title,typeof r===m?r.apply(e):r))+"</span>",r=i(n(19)).call(e,a&&a.currentSectionKey,e&&e.key,{hash:{},inverse:g.noop,
fn:g.program(3,c,t),data:t}),(r||0===r)&&(s+=r),s+="</a></li> "}function d(e,t){var n,i="";return i+=" "+f((n=e&&e.currentSectionTitle,typeof n===m?n.apply(e):n))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f=this.escapeExpression,g=this,m="function";return h=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:g.program(7,d,s),fn:g.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
function o(e,t){var r,s="";return s+=' <a class="btn-gray dropdown-toggle" href="#section-subset-dropdown" data-toggle="dropdown">'+f(i(n(0)).call(e,(r=e&&e.currentSubset,null==r||r===!1?r:r.title),{hash:{},data:t}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',r=a.each.call(e,e&&e.subsets,{hash:{},inverse:g.noop,fn:g.programWithDepth(2,l,t,e),data:t}),(r||0===r)&&(s+=r),s+=" </ul> "}function l(e,t,n){var i,r="";return r+=" ",i=a.if.call(e,e&&e.primary,{hash:{},inverse:g.noop,fn:g.programWithDepth(3,c,t,n),
data:t}),(i||0===i)&&(r+=i),r+=" "}function c(e,t,a){var r,s="";return s+=' <li><a href="#!/server/'+f(i(n(69)).call(e,a&&a.serverID,{hash:{},data:t}))+"/section/"+f(i(n(69)).call(e,a&&a.sectionID,{hash:{},data:t}))+"/"+f(i(n(69)).call(e,e&&e.key,{hash:{},data:t}))+'">'+f(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+" ",r=i(n(19)).call(e,(r=a&&a.currentSubset,null==r||r===!1?r:r.key),e&&e.key,{hash:{},inverse:g.noop,fn:g.program(4,u,t),data:t}),(r||0===r)&&(s+=r),s+="</a></li> "}function u(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>';
}function d(e,t){var a,r="";return r+=' <span class="dropdown-placeholder">'+f(i(n(0)).call(e,(a=e&&e.currentSubset,null==a||a===!1?a:a.title),{hash:{},data:t}))+"</span> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f=this.escapeExpression,g=this;return h=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:g.program(6,d,s),fn:g.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression;return l+='<a class="btn-gray dropdown-toggle" href="#section-type-dropdown" data-toggle="dropdown">'+c(i(n(0)).call(t,(o=t&&t.currentType,null==o||o===!1?o:o.plural),{hash:{},data:s}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"></ul> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){
return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this.escapeExpression,d=this;return c+='<a href="#">'+u(i(n(0)).call(t,t&&t.plural,{hash:{},data:s}))+" ",l=a.if.call(t,t&&t.selected,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+="</a> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){
var r,s="";return s+=' <a class="dropdown-toggle" href="#'+f((r=e&&e.type,typeof r===p?r.apply(e):r))+'-dropdown" data-toggle="dropdown"> '+f(i(n(446)).call(e,e&&e.selectedStream,{hash:{},data:t}))+' <i class="caret-icon caret-icon-sm"></i> </a> <ul class="dropdown-menu"> ',r=a.each.call(e,e&&e.streams,{hash:{},inverse:g.noop,fn:g.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=" </ul> "}function l(e,t){var r,s="";return s+=' <li> <a data-id="'+f((r=e&&e.id,typeof r===p?r.apply(e):r))+'" href="#"> '+f(i(n(446)).call(e,e,{
hash:{},data:t}))+" ",r=a.if.call(e,e&&e.selected,{hash:{},inverse:g.noop,fn:g.program(3,c,t),data:t}),(r||0===r)&&(s+=r),s+=" </a> </li> "}function c(e,t){return' <i class="dropdown-selected-icon glyphicon ok-2"></i> '}function u(e,t){var a="";return a+=" "+f(i(n(446)).call(e,e&&e.selectedStream,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p="function",f=this.escapeExpression,g=this;return d=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:g.program(5,u,s),
fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+u(i(n(24)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this.escapeExpression,d=this;return c+='<form class="edit-metadata-form"> ',l=a.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,o,s),
data:s}),(l||0===l)&&(c+=l),c+=" </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <div class="row"> <div class="col-md-12 selectize"> '+p(i(n(24)).call(e,"autocompleteTextInput",{hash:{label:"Artist",name:"parentTitle",placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.parentTitle),ratingKey:(a=e&&e.item,null==a||a===!1?a:a.parentRatingKey),title:(a=e&&e.item,null==a||a===!1?a:a.parentTitle)
},data:t}))+" </div> </div> "}function l(e,t){var a,r="";return r+=' <div class="col-md-4"> '+p(i(n(24)).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(a=e&&e.item,null==a||a===!1?a:a.year),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.year),locked:(a=e&&e.locked,null==a||a===!1?a:a.year),ratingKey:(a=e&&e.item,null==a||a===!1?a:a.ratingKey)},data:t}))+" </div> "}function c(e,t){return"9"}function u(e,t){return"5"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
s=s||{};var d,h="",p=this.escapeExpression,f=this;return h+='<form class="edit-metadata-form"> ',d=a.if.call(t,t&&t.canReparent,{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=' <div class="row"> <div class="col-md-12 selectize"> '+p(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Album",name:"title",value:(d=t&&t.item,null==d||d===!1?d:d.title),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.title),locked:(d=t&&t.locked,null==d||d===!1?d:d.title),ratingKey:(d=t&&t.item,
null==d||d===!1?d:d.ratingKey),scopeToAttr:"parentRatingKey",scopeToParam:"artist.id"},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Sort Album",name:"titleSort",value:(d=t&&t.item,null==d||d===!1?d:d.titleSort),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.titleSort),locked:(d=t&&t.locked,null==d||d===!1?d:d.titleSort),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-3"> <label>'+p(i(n(0)).call(t,"Rating",{
hash:{},data:s}))+'</label> <div class="rating-region"></div> </div> ',d=a.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:f.noop,fn:f.program(3,l,s),data:s}),(d||0===d)&&(h+=d),h+=' <div class="col-md-',d=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:f.program(7,u,s),fn:f.program(5,c,s),data:s}),(d||0===d)&&(h+=d),h+=' "> '+p(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(d=t&&t.item,null==d||d===!1?d:d.originallyAvailableAt),
placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.originallyAvailableAt),locked:(d=t&&t.locked,null==d||d===!1?d:d.originallyAvailableAt)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Record Label",name:"studio",value:(d=t&&t.item,null==d||d===!1?d:d.studio),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.studio),locked:(d=t&&t.locked,null==d||d===!1?d:d.studio),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)
},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+p(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Review",name:"summary",value:(d=t&&t.item,null==d||d===!1?d:d.summary),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.summary),type:"textarea",rows:"5",locked:(d=t&&t.locked,null==d||d===!1?d:d.summary),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);
e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(o=t&&t.locked,null==o||o===!1?o:o.genre)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);
e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+c(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Artist",name:"title",value:(o=t&&t.item,null==o||o===!1?o:o.title),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.title),locked:(o=t&&t.locked,null==o||o===!1?o:o.title),ratingKey:(o=t&&t.item,
null==o||o===!1?o:o.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+c(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Sort Artist",name:"titleSort",value:(o=t&&t.item,null==o||o===!1?o:o.titleSort),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.titleSort),locked:(o=t&&t.locked,null==o||o===!1?o:o.titleSort),ratingKey:(o=t&&t.item,null==o||o===!1?o:o.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTextInput",{
hash:{label:"Biography",name:"summary",value:(o=t&&t.item,null==o||o===!1?o:o.summary),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.summary),type:"textarea",rows:"5",locked:(o=t&&t.locked,null==o||o===!1?o:o.summary)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <div class="row"> <div class="col-md-12"> '+u(i(n(24)).call(e,"lockableTagInput",{
hash:{label:"Similar Artists",name:"similar",attribute:"similar",query:"title",locked:(a=e&&e.locked,null==a||a===!1?a:a.similar)},data:t}))+" </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this.escapeExpression,d=this;return c+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+u(i(n(24)).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(l=t&&t.locked,null==l||l===!1?l:l.genre)},data:s
}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(24)).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(l=t&&t.locked,null==l||l===!1?l:l.collection)},data:s}))+" </div> </div> ",l=a.if.call(t,t&&t.canEditSimilarArtists,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=" </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
function o(e,t){var r,s="";return s+=' <div class="upload-artwork-container"> <div class="upload-prompt"> ',r=a.if.call(e,e&&e.showFileUpload,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=' <a class="upload-url-btn" href="#">'+d(i(n(0)).call(e,"enter a url",{hash:{},data:t}))+'</a> </div> <div class="upload-progress"> '+d(i(n(0)).call(e,"Uploading artwork...",{hash:{},data:t}))+' </div> <div class="upload-success"> '+d(i(n(0)).call(e,"this artwork was uploaded successfully",{
hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '+d(i(n(0)).call(e,"{1}upload another{2}",'<a class="upload-back-btn" href="#">',"</a>",{hash:{},data:t}))+' </div> <div class="upload-error"> '+d(i(n(0)).call(e,"there was an error uploading this artwork",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '+d(i(n(0)).call(e,"{1}try again{2}",'<a class="upload-back-btn" href="#">',"</a>",{hash:{},data:t}))+' </div> <form id="upload-form" class="upload-form"> <input type="text" class="form-control" name="url" placeholder="'+d(i(n(0)).call(e,"Enter a url to upload an image from the web",{
hash:{},data:t}))+'"> <div class="upload-form-help"> <div class="pull-right">'+d(i(n(0)).call(e,"enter to {1}upload{2}",'<a class="submit-url-btn" href="#">',"</a>",{hash:{},data:t}))+'</div> <div class="pull-left">'+d(i(n(0)).call(e,"esc to {1}cancel{2}",'<a class="cancel-url-btn" href="#">',"</a>",{hash:{},data:t}))+"</div> </div> </form> </div> "}function l(e,t){var a="";return a+=' <span class="artwork-file-container"> <input type="file" class="artwork-file-control" multiple> <a href="#">'+d(i(n(0)).call(e,"choose an image",{
hash:{},data:t}))+'</a> </span> <span class="upload-prompt-divider">&middot;</span> '+d(i(n(0)).call(e,"drag and drop",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h=this;return c=a.if.call(t,t&&t.showUpload,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=' <div class="artwork-list-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(o=t&&t.item,null==o||o===!1?o:o.title),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.title),locked:(o=t&&t.locked,null==o||o===!1?o:o.title)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTextInput",{
hash:{label:"Sort Title",name:"titleSort",value:(o=t&&t.item,null==o||o===!1?o:o.titleSort),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.titleSort),locked:(o=t&&t.locked,null==o||o===!1?o:o.titleSort)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-6"> '+c(i(n(24)).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(o=t&&t.item,null==o||o===!1?o:o.rating),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.rating),locked:(o=t&&t.locked,null==o||o===!1?o:o.rating)
},data:s}))+' </div> <div class="col-md-6"> '+c(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(o=t&&t.item,null==o||o===!1?o:o.originallyAvailableAt),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.originallyAvailableAt),locked:(o=t&&t.locked,null==o||o===!1?o:o.originallyAvailableAt)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(o=t&&t.item,
null==o||o===!1?o:o.summary),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.summary),type:"textarea",rows:"5",locked:(o=t&&t.locked,null==o||o===!1?o:o.summary)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTagInput",{
hash:{label:"Writers",name:"writer",attribute:"writers",locked:(o=t&&t.locked,null==o||o===!1?o:o.writer)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTagInput",{hash:{label:"Directors",name:"director",attribute:"directors",locked:(o=t&&t.locked,null==o||o===!1?o:o.director)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+="<h4>"+l(i(n(0)).call(t,"Files",{hash:{},data:s}))+'</h4> <ul class="media-info-file-list"></ul> <div class="loading-container"><div class="loading"></div></div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return(s=n.file)?r=s.call(t,{
hash:{},data:a}):(s=t&&t.file,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=" "+f(i(n(24)).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(a=e&&e.item,null==a||a===!1?a:a.originallyAvailableAt),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.originallyAvailableAt),
locked:(a=e&&e.locked,null==a||a===!1?a:a.originallyAvailableAt)},data:t}))+" "}function l(e,t){var a,r="";return r+=" "+f(i(n(24)).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(a=e&&e.item,null==a||a===!1?a:a.year),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.year),locked:(a=e&&e.locked,null==a||a===!1?a:a.year)},data:t}))+" "}function c(e,t){return"12"}function u(e,t){return"6"}function d(e,t){var a,r="";return r+=' <div class="col-md-6"> '+f(i(n(24)).call(e,"lockableTextInput",{
hash:{label:"Originally Available",name:"originallyAvailableAt",value:(a=e&&e.item,null==a||a===!1?a:a.originallyAvailableAt),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.originallyAvailableAt),locked:(a=e&&e.locked,null==a||a===!1?a:a.originallyAvailableAt)},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f=this.escapeExpression,g=this;return p+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(24)).call(t,"lockableTextInput",{
hash:{label:"Title",name:"title",value:(h=t&&t.item,null==h||h===!1?h:h.title),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.title),locked:(h=t&&t.locked,null==h||h===!1?h:h.title),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(h=t&&t.item,null==h||h===!1?h:h.titleSort),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.titleSort),
locked:(h=t&&t.locked,null==h||h===!1?h:h.titleSort),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Original Title",name:"originalTitle",value:(h=t&&t.item,null==h||h===!1?h:h.originalTitle),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.originalTitle),locked:(h=t&&t.locked,null==h||h===!1?h:h.originalTitle),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)
},data:s}))+' </div> </div> <div class="row"> <div class="col-md-4"> ',h=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:g.program(3,l,s),fn:g.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=' </div> <div class="col-md-4"> '+f(i(n(24)).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(h=t&&t.item,null==h||h===!1?h:h.rating),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.rating),locked:(h=t&&t.locked,null==h||h===!1?h:h.rating)},data:s}))+' </div> <div class="col-md-4 selectize"> '+f(i(n(24)).call(t,"lockableTextInput",{
hash:{label:"Content Rating",name:"contentRating",value:(h=t&&t.item,null==h||h===!1?h:h.contentRating),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.contentRating),locked:(h=t&&t.locked,null==h||h===!1?h:h.contentRating),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-',h=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:g.program(7,u,s),fn:g.program(5,c,s),data:s}),(h||0===h)&&(p+=h),p+=' selectize"> '+f(i(n(24)).call(t,"lockableTextInput",{
hash:{label:"Studio",name:"studio",value:(h=t&&t.item,null==h||h===!1?h:h.studio),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.studio),locked:(h=t&&t.locked,null==h||h===!1?h:h.studio),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+" </div> ",h=a.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:g.noop,fn:g.program(9,d,s),data:s}),(h||0===h)&&(p+=h),p+=' </div> <div class="row"> <div class="col-md-12"> '+f(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Tagline",
name:"tagline",value:(h=t&&t.item,null==h||h===!1?h:h.tagline),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.tagline),locked:(h=t&&t.locked,null==h||h===!1?h:h.tagline)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+f(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(h=t&&t.item,null==h||h===!1?h:h.summary),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.summary),type:"textarea",rows:"5",locked:(h=t&&t.locked,null==h||h===!1?h:h.summary)
},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-6"> '+c(i(n(24)).call(t,"lockableTagInput",{hash:{label:"Directors",name:"director",attribute:"directors",locked:(o=t&&t.locked,null==o||o===!1?o:o.director)
},data:s}))+' </div> <div class="col-md-6"> '+c(i(n(24)).call(t,"lockableTagInput",{hash:{label:"Country",name:"country",attribute:"countries",locked:(o=t&&t.locked,null==o||o===!1?o:o.country)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(o=t&&t.locked,null==o||o===!1?o:o.genre)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTagInput",{
hash:{label:"Writers",name:"writer",attribute:"writers",locked:(o=t&&t.locked,null==o||o===!1?o:o.writer)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(o=t&&t.locked,null==o||o===!1?o:o.collection)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-6"> '+c(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(o=t&&t.item,null==o||o===!1?o:o.title),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.title),locked:(o=t&&t.locked,null==o||o===!1?o:o.title)},data:s}))+' </div> <div class="col-md-6"> '+c(i(n(24)).call(t,"lockableTextInput",{
hash:{label:"Sort Title",name:"titleSort",value:(o=t&&t.item,null==o||o===!1?o:o.titleSort),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.titleSort),locked:(o=t&&t.locked,null==o||o===!1?o:o.titleSort)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(o=t&&t.item,null==o||o===!1?o:o.summary),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.summary),type:"textarea",rows:"5",locked:(o=t&&t.locked,
null==o||o===!1?o:o.summary)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-9"> '+c(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(o=t&&t.item,null==o||o===!1?o:o.title),
placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.title),locked:(o=t&&t.locked,null==o||o===!1?o:o.title)},data:s}))+' </div> <div class="col-md-3"> '+c(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Year",name:"year",value:(o=t&&t.item,null==o||o===!1?o:o.year),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.year),locked:(o=t&&t.locked,null==o||o===!1?o:o.year)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Sort Title",
name:"titleSort",value:(o=t&&t.item,null==o||o===!1?o:o.titleSort),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.titleSort),locked:(o=t&&t.locked,null==o||o===!1?o:o.titleSort)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(o=t&&t.item,null==o||o===!1?o:o.summary),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.summary),type:"textarea",rows:"5",locked:(o=t&&t.locked,null==o||o===!1?o:o.summary)
},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"textInput",{hash:{label:"Title",name:"title",value:(o=t&&t.item,null==o||o===!1?o:o.title)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"textInput",{
hash:{label:"Summary",name:"summary",value:(o=t&&t.item,null==o||o===!1?o:o.summary),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.summary),type:"textarea",rows:"5"},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTextInput",{
hash:{label:"Summary",name:"summary",value:(o=t&&t.item,null==o||o===!1?o:o.summary),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.summary),type:"textarea",rows:"5",locked:(o=t&&t.locked,null==o||o===!1?o:o.summary)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> ',
n=a.if.call(e,e&&e.showLabels,{hash:{},inverse:f.program(4,c,t),fn:f.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> </div> </form> "}function l(e,t){var a,r="";return r+=" "+p(i(n(24)).call(e,"lockableTagInput",{hash:{label:"Labels",name:"label",attribute:"labels",locked:(a=e&&e.locked,null==a||a===!1?a:a.label)},data:t}))+" "}function c(e,t){var a="";return a+=' <div class="form-group"> <label>'+p(i(n(0)).call(e,"Labels",{hash:{},data:t}))+"</label> <p>"+p(i(n(0)).call(e,"Labels require Plex Media Server {1} or later.",e&&e.labelsMinVersion,{
hash:{},data:t}))+"</p> </div> "}function u(e,t){var a,r="";return r+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+p(i(n(0)).call(e,"You need a Plex Pass to use restrictions.",{hash:{},data:t}))+'</h4> <p class="text-center"> <a class="btn btn-sm btn-primary" href="'+p((a=e&&e.plexPassUrl,typeof a===g?a.apply(e):a))+'" target="_blank">'+p(i(n(0)).call(e,"Learn More",{hash:{},data:t}))+"</a> </p> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this.escapeExpression,f=this,g="function";
return d=a.if.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:f.program(6,u,s),fn:f.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=" "+f(i(n(24)).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(a=e&&e.item,null==a||a===!1?a:a.originallyAvailableAt),placeholder:(a=e&&e.placeholders,
null==a||a===!1?a:a.originallyAvailableAt),locked:(a=e&&e.locked,null==a||a===!1?a:a.originallyAvailableAt)},data:t}))+" "}function l(e,t){var a,r="";return r+=" "+f(i(n(24)).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(a=e&&e.item,null==a||a===!1?a:a.year),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.year),locked:(a=e&&e.locked,null==a||a===!1?a:a.year)},data:t}))+" "}function c(e,t){return"12"}function u(e,t){return"6"}function d(e,t){var a,r="";return r+=' <div class="col-md-6"> '+f(i(n(24)).call(e,"lockableTextInput",{
hash:{label:"Originally Available",name:"originallyAvailableAt",value:(a=e&&e.item,null==a||a===!1?a:a.originallyAvailableAt),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.originallyAvailableAt),locked:(a=e&&e.locked,null==a||a===!1?a:a.originallyAvailableAt)},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f=this.escapeExpression,g=this;return p+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(24)).call(t,"lockableTextInput",{
hash:{label:"Title",name:"title",value:(h=t&&t.item,null==h||h===!1?h:h.title),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.title),locked:(h=t&&t.locked,null==h||h===!1?h:h.title),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(h=t&&t.item,null==h||h===!1?h:h.titleSort),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.titleSort),
locked:(h=t&&t.locked,null==h||h===!1?h:h.titleSort),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-4"> ',h=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:g.program(3,l,s),fn:g.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=' </div> <div class="col-md-4"> '+f(i(n(24)).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(h=t&&t.item,null==h||h===!1?h:h.rating),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.rating),
locked:(h=t&&t.locked,null==h||h===!1?h:h.rating)},data:s}))+' </div> <div class="col-md-4 selectize"> '+f(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Content Rating",name:"contentRating",value:(h=t&&t.item,null==h||h===!1?h:h.contentRating),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.contentRating),locked:(h=t&&t.locked,null==h||h===!1?h:h.contentRating),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(24)).call(t,"lockableTextInput",{
hash:{label:"Original Title",name:"originalTitle",value:(h=t&&t.item,null==h||h===!1?h:h.originalTitle),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.originalTitle),locked:(h=t&&t.locked,null==h||h===!1?h:h.originalTitle),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-',h=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:g.program(7,u,s),fn:g.program(5,c,s),data:s}),(h||0===h)&&(p+=h),p+=' selectize"> '+f(i(n(24)).call(t,"lockableTextInput",{
hash:{label:"Studio",name:"studio",value:(h=t&&t.item,null==h||h===!1?h:h.studio),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.studio),locked:(h=t&&t.locked,null==h||h===!1?h:h.studio),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+" </div> ",h=a.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:g.noop,fn:g.program(9,d,s),data:s}),(h||0===h)&&(p+=h),p+=' </div> <div class="row"> <div class="col-md-12"> '+f(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Tagline",
name:"tagline",value:(h=t&&t.item,null==h||h===!1?h:h.tagline),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.tagline),locked:(h=t&&t.locked,null==h||h===!1?h:h.tagline)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+f(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(h=t&&t.item,null==h||h===!1?h:h.summary),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.summary),type:"textarea",rows:"5",locked:(h=t&&t.locked,null==h||h===!1?h:h.summary)
},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(o=t&&t.locked,null==o||o===!1?o:o.genre)
},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(o=t&&t.locked,null==o||o===!1?o:o.collection)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <div class="row"> <div class="col-md-12 selectize"> '+u(i(n(24)).call(e,"autocompleteTextInput",{
hash:{label:"Artist",name:"grandparentTitle",placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.grandparentTitle),ratingKey:(a=e&&e.item,null==a||a===!1?a:a.grandparentRatingKey),title:(a=e&&e.item,null==a||a===!1?a:a.grandparentTitle)},data:t}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+u(i(n(24)).call(e,"autocompleteTextInput",{hash:{label:"Album",name:"parentTitle",placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.parentTitle),ratingKey:(a=e&&e.item,null==a||a===!1?a:a.parentRatingKey),
title:(a=e&&e.item,null==a||a===!1?a:a.parentTitle),scopeToAttr:"grandparentRatingKey",scopeToParam:"artist.id"},data:t}))+" </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this.escapeExpression,d=this;return c+='<form class="edit-metadata-form"> ',l=a.if.call(t,t&&t.canReparent,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=' <div class="row"> <div class="col-md-12"> '+u(i(n(24)).call(t,"lockableTextInput",{hash:{label:"Title",
name:"title",value:(l=t&&t.item,null==l||l===!1?l:l.title),placeholder:(l=t&&t.placeholders,null==l||l===!1?l:l.title),locked:(l=t&&t.locked,null==l||l===!1?l:l.title)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-4"> <label>'+u(i(n(0)).call(t,"Rating",{hash:{},data:s}))+'</label> <div class="rating-region"></div> </div> <div class="col-md-4"> '+u(i(n(24)).call(t,"lockableNumericInput",{hash:{label:"Track",name:"index",value:(l=t&&t.item,null==l||l===!1?l:l.index),placeholder:(l=t&&t.placeholders,
null==l||l===!1?l:l.index),locked:(l=t&&t.locked,null==l||l===!1?l:l.index),disabled:t&&t.disableIndices},data:s}))+' </div> <div class="col-md-4"> '+u(i(n(24)).call(t,"lockableNumericInput",{hash:{label:"Disc",name:"parentIndex",value:(l=t&&t.item,null==l||l===!1?l:l.parentIndex),placeholder:(l=t&&t.placeholders,null==l||l===!1?l:l.parentIndex),locked:(l=t&&t.locked,null==l||l===!1?l:l.parentIndex),disabled:t&&t.disableIndices},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+u(i(n(24)).call(t,"lockableTextInput",{
hash:{label:"Track Artist",name:"originalTitle",value:(l=t&&t.item,null==l||l===!1?l:l.originalTitle),placeholder:(l=t&&t.placeholders,null==l||l===!1?l:l.originalTitle),locked:(l=t&&t.locked,null==l||l===!1?l:l.originalTitle),ratingKey:(l=t&&t.item,null==l||l===!1?l:l.ratingKey)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
s=s||{};var o,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(24)).call(t,"lockableTagInput",{hash:{label:"Moods",name:"mood",attribute:"moods",locked:(o=t&&t.locked,null==o||o===!1?o:o.mood)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <div class="setup-agent-section"> <div class="setup-agent-title">'+d(i(n(0)).call(e,"{1} Settings",e&&e.agentName,{
hash:{},data:t}))+'</div> <p class="setup-agent-disclaimer">'+d(i(n(0)).call(e,"Note: These settings will take effect for all libraries using the {1} agent.",e&&e.agentName,{hash:{},data:t}))+'</p> <div class="setup-agent-settings"> ',r=a.each.call(e,e&&e.settings,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=" </div> </div> "}function l(e,t){var a="";return a+=" "+d(i(n(24)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
s=s||{};var c,u="",d=this.escapeExpression,h=this;return c=a.if.call(t,t&&t.settings,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<form class="edit-section-type-form settings-container"> <p>'+l(i(n(0)).call(t,"There was an error adding this library.",{
hash:{},data:s}))+"</p> <p>"+l(i(n(0)).call(t,"You need to {1}follow these instructions{2} to troubleshoot the Plex Media Server.",'<a href="https://support.plex.tv/hc/en-us/articles/201119258-Resetting-System-and-Framework-bundles" target="_blank">',"</a>",{hash:{},data:s}))+"</p> </form>"})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<div class="filter-bar-right"> <a class="clear-filters-btn btn-gray" href="#"><i class="glyphicon remove-2"></i></a> </div> <h4>',
(s=n.titles)?r=s.call(t,{hash:{},data:a}):(s=t&&t.titles,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+"</h4> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return' <i class="server-alert-icon glyphicon cogwheel"></i> '}function l(e,t){var a;return a=i(n(19)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"status",{hash:{},inverse:V.program(6,u,t),fn:V.program(4,c,t),data:t}),a||0===a?a:"";
}function c(e,t){return' <i class="server-alert-icon glyphicon bullhorn"></i> '}function u(e,t){var a;return a=i(n(19)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"playing",{hash:{},inverse:V.program(9,h,t),fn:V.program(7,d,t),data:t}),a||0===a?a:""}function d(e,t){return' <i class="server-alert-icon glyphicon imac"></i> '}function h(e,t){var a;return a=i(n(19)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"websocket",{hash:{},inverse:V.program(13,g,t),fn:V.program(10,p,t),data:t}),a||0===a?a:"";
}function p(e,t){var n,i="";return i+=" ",n=a.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.opened),{hash:{},inverse:V.program(11,f,t),fn:V.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function f(e,t){return' <i class="server-alert-icon glyphicon warning-sign"></i> '}function g(e,t){var a;return a=i(n(19)).call(e,(a=e&&e.event,null==a||a===!1?a:a.state),0,{hash:{},inverse:V.program(16,v,t),fn:V.program(14,m,t),data:t}),a||0===a?a:""}function m(e,t){return' <i class="server-alert-icon glyphicon plus"></i> ';
}function v(e,t){var a;return a=i(n(19)).call(e,(a=e&&e.event,null==a||a===!1?a:a.state),5,{hash:{},inverse:V.program(19,b,t),fn:V.program(17,y,t),data:t}),a||0===a?a:""}function y(e,t){return' <i class="server-alert-icon glyphicon ok-2"></i> '}function b(e,t){var a;return a=i(n(19)).call(e,(a=e&&e.event,null==a||a===!1?a:a.state),6,{hash:{},inverse:V.program(22,w,t),fn:V.program(20,S,t),data:t}),a||0===a?a:""}function S(e,t){return' <i class="server-alert-icon glyphicon magic"></i> '}function w(e,t){
var a;return a=i(n(19)).call(e,(a=e&&e.event,null==a||a===!1?a:a.state),9,{hash:{},inverse:V.program(25,I,t),fn:V.program(23,M,t),data:t}),a||0===a?a:""}function M(e,t){return' <i class="server-alert-icon glyphicon bin"></i> '}function I(e,t){return' <i class="server-alert-icon glyphicon tags"></i> '}function C(e,t){var a,r="";return r+=" "+H(i(n(0)).call(e,"{1} set to {2}.",(a=e&&e.event,null==a||a===!1?a:a.label),(a=e&&e.event,null==a||a===!1?a:a.value),{hash:{},data:t}))+" "}function D(e,t){var a;
return a=i(n(19)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"status",{hash:{},inverse:V.program(36,A,t),fn:V.program(30,T,t),data:t}),a||0===a?a:""}function T(e,t){var n,i="";return i+=" ",n=a.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.message),{hash:{},inverse:V.program(33,P,t),fn:V.program(31,x,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function x(e,t){var a,r="";return r+=" "+H(i(n(0)).call(e,(a=e&&e.event,null==a||a===!1?a:a.message),{hash:{},data:t}))+" "}function P(e,t){var r,s="";return s+=" "+H(i(n(0)).call(e,(r=e&&e.event,
null==r||r===!1?r:r.title),{hash:{},data:t})),r=a.if.call(e,(r=e&&e.event,null==r||r===!1?r:r.description),{hash:{},inverse:V.noop,fn:V.program(34,E,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function E(e,t){var a,r="";return r+=": "+H(i(n(0)).call(e,(a=e&&e.event,null==a||a===!1?a:a.description),{hash:{},data:t}))}function A(e,t){var a;return a=i(n(19)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"timeline",{hash:{},inverse:V.program(39,k,t),fn:V.program(37,L,t),data:t}),a||0===a?a:""}function L(e,t){
var a,r="";return r+=" "+H(i(n(0)).call(e,(a=e&&e.event,null==a||a===!1?a:a.stateString),{hash:{},data:t}))+' <a href="#!/server/'+H(i(n(69)).call(e,e&&e.serverID,{hash:{},data:t}))+"/details/"+H(i(n(69)).call(e,e&&e.itemKey,{hash:{},data:t}))+'">'+H((a=e&&e.event,a=null==a||a===!1?a:a.mediaTitle,typeof a===W?a.apply(e):a))+"</a> "+H(i(n(0)).call(e,"in",{hash:{},data:t}))+' <a href="#!/server/'+H(i(n(69)).call(e,e&&e.serverID,{hash:{},data:t}))+"/section/"+H(i(n(69)).call(e,(a=e&&e.event,null==a||a===!1?a:a.sectionID),{
hash:{},data:t}))+'">'+H((a=e&&e.event,a=null==a||a===!1?a:a.sectionTitle,typeof a===W?a.apply(e):a))+"</a> "}function k(e,t){var a;return a=i(n(19)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"playing",{hash:{},inverse:V.program(42,_,t),fn:V.program(40,N,t),data:t}),a||0===a?a:""}function N(e,t){var a,r="";return r+=" "+H(i(n(0)).call(e,"{1} started playing {2} on {3}.",(a=e&&e.event,null==a||a===!1?a:a.username),(a=e&&e.event,null==a||a===!1?a:a.title),(a=e&&e.event,null==a||a===!1?a:a.player),{
hash:{},data:t}))+" "}function _(e,t){var a;return a=i(n(19)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"websocket",{hash:{},inverse:V.noop,fn:V.program(43,O,t),data:t}),a||0===a?a:""}function O(e,t){var n,i="";return i+=" ",n=a.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.opened),{hash:{},inverse:V.program(46,j,t),fn:V.program(44,R,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function R(e,t){var a="";return a+=" "+H(i(n(0)).call(e,"Opened connection to {1}, listening for events.",e&&e.serverName,{
hash:{},data:t}))+" "}function j(e,t){var n;return n=a.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.closed),{hash:{},inverse:V.program(49,U,t),fn:V.program(47,z,t),data:t}),n||0===n?n:""}function z(e,t){var a="";return a+=" "+H(i(n(0)).call(e,"Connection to {1} closed.",e&&e.serverName,{hash:{},data:t}))+" "}function U(e,t){var a="";return a+=" "+H(i(n(0)).call(e,"Unable to listen for events on {1}.",e&&e.serverName,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
s=s||{};var F,B="",V=this,H=this.escapeExpression,W="function";return B+='<div class="striped-list-inner-item alert-list-inner-item"> ',F=i(n(19)).call(t,(F=t&&t.event,null==F||F===!1?F:F._type),"setting",{hash:{},inverse:V.program(3,l,s),fn:V.program(1,o,s),data:s}),(F||0===F)&&(B+=F),B+=' <div class="server-alert-details"> <span class="server-alert-time">'+H(i(n(701)).call(t,(F=t&&t.event,null==F||F===!1?F:F.time),"LT",{hash:{},data:s}))+"</span> ",F=i(n(19)).call(t,(F=t&&t.event,null==F||F===!1?F:F._type),"setting",{
hash:{},inverse:V.program(29,D,s),fn:V.program(27,C,s),data:s}),(F||0===F)&&(B+=F),B+=" </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="row row-padded"> <h4 class="text-muted text-center"> '+l(i(n(0)).call(t,"Nothing is currently being played.",{hash:{},data:s}))+" </h4> </div> ";
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hide-actions"}function l(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this,h="function",p=this.escapeExpression;return u+='<a class="media-poster-container ',c=a.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+='" href="'+p((c=t&&t.url,
typeof c===h?c.apply(t):c))+'"> <div class="media-poster-fade invisible"></div> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-top-overlay"></div> <div class="media-poster-actions ',c=a.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="info-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon circle-info"></i></button> </div> <button class="close-btn btn-link btn-gray" href="#"><i class="glyphicon remove-2"></i></button> <img class="device-icon"> <div class="session-player"></div> <div class="session-state"></div> <div class="session-transcode-details"> <p class="session-transcode-title"> <span class="session-transcode"></span> <span class="session-transcode-throttled"></span> </p> <p class="session-transcode-video"> <span class="session-transcode-label">'+p(i(n(0)).call(t,"Video",{
hash:{},data:s}))+'</span> <span class="session-transcode-video-decision"></span> </p> <p class="session-transcode-audio"> <span class="session-transcode-label">'+p(i(n(0)).call(t,"Audio",{hash:{},data:s}))+'</span> <span class="session-transcode-audio-decision"></span> </p> </div> <div class="media-progress"></div> </div> <div class="session-user pull-right"> <div class="user-poster img-circle"></div> <div class="session-username media-heading secondary"></div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"cloud-download"}function s(e,t){return"circle-arrow-down"}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var l,c="",u=this;return c+='<a class="media-poster-container" href="#"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="sync-status"> <div class="sync-status-transcode hidden"></div> <i class="sync-status-icon sync-complete-icon glyphicon ok-2 hidden"></i> <i class="sync-status-icon sync-waiting-icon glyphicon ',
l=n.if.call(t,t&&t.isCloudSync,{hash:{},inverse:u.program(3,s,a),fn:u.program(1,r,a),data:a}),(l||0===l)&&(c+=l),c+=' hidden"></i> <i class="sync-status-icon sync-processing-icon glyphicon more hidden"></i> <i class="sync-status-icon sync-failed-icon glyphicon warning-sign ',l=n.unless.call(t,t&&t.isFailure,{hash:{},inverse:u.noop,fn:u.program(5,o,a),data:a}),(l||0===l)&&(c+=l),c+='"></i> <i class="sync-status-icon sync-unknown-icon glyphicon circle-question-mark ',l=n.if.call(t,t&&t.isFailure,{hash:{},
inverse:u.noop,fn:u.program(5,o,a),data:a}),(l||0===l)&&(c+=l),c+='"></i> </div> <div class="media-poster-actions"> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="delete-btn media-poster-btn btn-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> <div class="media-context media-heading secondary"></div> </a> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <i class="glyphicon cloud-download"></i> <span class="cloud-sync-waiting">'+d(i(n(0)).call(e,"Waiting to be uploaded",{hash:{},data:t}))+'</span> <span class="cloud-sync-uploading hidden">'+d(i(n(0)).call(e,"Uploading",{hash:{},data:t}))+' &middot; <span class="transcode-progress"></span>%</span> '}function l(e,t){var a="";return a+=' <i class="glyphicon circle-arrow-down"></i> '+d(i(n(0)).call(e,"Waiting to be downloaded",{
hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h=this;return u+='<div class="media-poster"></div> <p class="title"></p> <p class="complete-subtitle subtitle hidden"> <i class="glyphicon ok-2"></i> '+d(i(n(0)).call(t,"Synced",{hash:{},data:s}))+' </p> <p class="waiting-subtitle subtitle hidden"> ',c=a.if.call(t,t&&t.isCloudSync,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=' </p> <p class="downloading-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(i(n(0)).call(t,"Downloading",{
hash:{},data:s}))+' &middot; <span class="transcode-progress"></span>% </p> <p class="converting-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(i(n(0)).call(t,"Converting",{hash:{},data:s}))+' &middot; <span class="transcode-progress"></span>% &middot; <span class="transcode-remaining"></span> </p> <p class="processing-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(i(n(0)).call(t,"Waiting to be converted",{hash:{},data:s}))+' </p> <p class="unknown-subtitle subtitle hidden"> <i class="glyphicon circle-question-mark"></i> '+d(i(n(0)).call(t,"Unknown",{
hash:{},data:s}))+' </p> <p class="failed-subtitle subtitle hidden"> <i class="glyphicon warning-sign"></i> <span class="error-message"></span> </p> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="row row-padded"> <h4 class="text-muted text-center"> <p>'+l(i(n(0)).call(t,"Conversions for sync and media optimization will appear here.",{
hash:{},data:s}))+"</p> <p>"+l(i(n(0)).call(t,"Manage your optimized versions in {1}Optimized Versions Settings{2}.",'<a href="#!/settings/server/{3}/versions">',"</a>",t&&t.serverID,{hash:{},data:s}))+"</p> </h4> </div> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return' <div class="sortable-handle btn-gray-link"><i class="glyphicon show-lines"></i></div> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o,l="",c="function",u=this.escapeExpression,d=this;
return l+='<div class="show-actions striped-list-inner-item playlist-inner-item ',(o=n.type)?s=o.call(t,{hash:{},data:a}):(o=t&&t.type,s=typeof o===c?o.call(t,{hash:{},data:a}):o),l+=u(s)+'"> <div class="media-actions media-reorder"> ',s=n.unless.call(t,t&&t.hideDragHandle,{hash:{},inverse:d.noop,fn:d.program(1,r,a),data:a}),(s||0===s)&&(l+=s),l+=' </div> <div class="generator-poster-container"> <div class="media-poster"></div> </div> <div class="media-actions generator-actions"> <button class="promote-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon up-arrow"></i></button> <button class="delete-btn media-action-btn btn-gray-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> <div class="media-item"> <div class="media-details"> <div class="generator-title col-lg"></div> <div class="generator-target col-md col-secondary"></div> <div class="conversion-status-region col-md col-secondary"></div> </div> </div> </div> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression,u="function";return l+='<div class="conversion-status-container conversion-status-converting"> <div class="progress-bar-region"></div> <div class="conversion-status-converting-label-container"> <span class="conversion-status-converting-label">'+c(i(n(0)).call(t,"Converting",{
hash:{},data:s}))+'</span> <span class="conversion-status-converting-speed"></span> <div class="conversion-status-converting-progress"> <span class="conversion-status-converting-percentage"></span> <span class="conversion-status-converting-progress-separator">&middot;</span> <span class="conversion-status-converting-remaining"></span> </div> </div> </div> <div class="conversion-status-container conversion-status-processed"> <i class="conversion-status-icon glyphicon ok-2 text-success"></i> '+c(i(n(0)).call(t,"Complete",{
hash:{},data:s}))+' </div> <div class="conversion-status-container conversion-status-disabled"> <i class="conversion-status-icon glyphicon circle-exclamation-mark text-danger"></i> '+c(i(n(0)).call(t,"Deleted",{hash:{},data:s}))+' <button class="enable-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon repeat"></i></button> </div> <div class="conversion-status-container conversion-status-error"> <i class="conversion-status-icon glyphicon circle-exclamation-mark text-danger"></i> <span class="conversion-status-failed-message">'+c((o=t&&t.initialErrorMessage,
typeof o===u?o.apply(t):o))+'</span> <button class="retry-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon repeat"></i></button> </div> <div class="conversion-status-container conversion-status-pending"> <i class="conversion-status-icon glyphicon clock"></i> <span class="conversion-status-pending-label">'+c(i(n(0)).call(t,"Waiting",{hash:{},data:s}))+"</span> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression;return l+='<a class="card-collapsed" href="#!/server/'+c(i(n(69)).call(t,t&&t.serverID,{hash:{},data:s}))+"/directory/"+c(i(n(69)).call(t,t&&t.currentKey,{hash:{},data:s}))+"/"+c(i(n(69)).call(t,(o=t&&t.channel,null==o||o===!1?o:o.key),{hash:{},data:s}))+'"> <span class="media-title media-heading"></span> </a> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),a=a||{},'<a class="media-poster-container" href="#"> <div class="media-poster"> <div class="installed-icon"><i class="glyphicon ok-2"></i></div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <div class="media-poster-overlay"></div> <div class="media-poster-actions"> ',
n=a.if.call(e,(n=e&&e.item,null==n||n===!1?n:n.hasPrefs),{hash:{},inverse:d.noop,fn:d.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=' <button class="uninstall-btn media-poster-btn btn-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> '}function l(e,t){return' <button class="settings-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon cogwheel"></i></button> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this,h=this.escapeExpression;
return u+='<a class="media-poster-container" href="#!/server/'+h(i(n(69)).call(t,t&&t.serverID,{hash:{},data:s}))+"/channel/"+h(i(n(69)).call(t,(c=t&&t.item,null==c||c===!1?c:c.key),{hash:{},data:s}))+'"> <div class="media-poster"> ',c=a.unless.call(t,t&&t.shared,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=' <div class="loading loading-inline"></div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"hide-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,c="",u=this,d="function",h=this.escapeExpression;return c+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:u.noop,fn:u.program(1,r,a),data:a}),(o||0===o)&&(c+=o),c+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,o=typeof l===d?l.call(t,{
hash:{},data:a}):l),c+=h(o)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-actions ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:u.noop,fn:u.program(3,s,a),data:a}),(o||0===o)&&(c+=o),c+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> <div class="media-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o,l="",c=this,u="function",d=this.escapeExpression;return l+='<div class="striped-list-inner-item media-list-item track-list-item track"> <a class="track-list-inner-item show-actions ',s=n.if.call(t,t&&t.selected,{hash:{},inverse:c.noop,fn:c.program(1,r,a),data:a}),(s||0===s)&&(l+=s),l+='" href="#"> <div class="track-actions media-actions"> <button class="track-more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="track-index media-index media-heading secondary"> <span>',
(o=n.index)?s=o.call(t,{hash:{},data:a}):(o=t&&t.index,s=typeof o===u?o.call(t,{hash:{},data:a}):o),l+=d(s)+'</span> <i class="glyphicon volume-up"></i> </span> <span class="track-title media-title media-heading"></span> <span class="track-subtitle-1 media-subtitle-1 media-heading secondary"></span> <span class="track-context media-context media-heading secondary"></span> <button class="track-music-video-btn media-action-btn btn-link" tabindex="-1"><i class="plex-icon-shows-560"></i></button> </a> <div class="track-actions-dropdown media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> </div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<a class="artwork-option media-poster-container" data-rating-key="',(s=n.ratingKey)?r=s.call(t,{hash:{},data:a}):(s=t&&t.ratingKey,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+'" href="#"> <div class="media-poster"></div> </a> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){
function r(e,t){return"show-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,c="",u=this,d="function",h=this.escapeExpression;return c+='<a class="episode-list-inner-item media-list-inner-item ',o=n.if.call(t,t&&t.showActions,{hash:{},inverse:u.noop,fn:u.program(1,r,a),data:a}),(o||0===o)&&(c+=o),c+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,o=typeof l===d?l.call(t,{hash:{},data:a}):l),c+=h(o)+'"> <div class="media-poster"> <span class="media-count-badge badge hidden"></span> <span class="unwatched-count-badge badge hidden"></span> <div class="media-progress"></div> </div> <div class="media-actions ',
o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:u.noop,fn:u.program(3,s,a),data:a}),(o||0===o)&&(c+=o),c+='"> <button class="play-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-index media-heading secondary"></span> <span class="media-title media-heading"></span> <span class="unwatched-icon"></span> <span class="media-context media-heading media-rating"></span> <p class="media-tagline"></p> <p class="media-summary"></p> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"show-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,c="",u=this,d="function",h=this.escapeExpression;return c+='<a class="episode-list-inner-item media-list-inner-item ',o=n.if.call(t,t&&t.showActions,{hash:{},inverse:u.noop,fn:u.program(1,r,a),data:a}),(o||0===o)&&(c+=o),c+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,
o=typeof l===d?l.call(t,{hash:{},data:a}):l),c+=h(o)+'"> <span class="media-index media-heading secondary"></span> <span class="media-title media-heading"></span> <span class="unwatched-icon"></span> <div class="media-actions ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:u.noop,fn:u.program(3,s,a),data:a}),(o||0===o)&&(c+=o),c+='"> <button class="play-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-context media-heading media-rating"></span> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"hide-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,c="",u=this,d="function",h=this.escapeExpression;return c+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:u.noop,fn:u.program(1,r,a),data:a}),(o||0===o)&&(c+=o),c+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,o=typeof l===d?l.call(t,{
hash:{},data:a}):l),c+=h(o)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-actions ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:u.noop,fn:u.program(3,s,a),data:a}),(o||0===o)&&(c+=o),c+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-count-badge badge badge-lg hidden"></span> <div class="media-progress"></div> </div> <span class="unwatched-icon"></span> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> <div class="media-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<a class="media-poster-container play-btn" href="',(s=n.url)?r=s.call(t,{hash:{},data:a}):(s=t&&t.url,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> <div class="media-progress"></div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"missing"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this.escapeExpression,d="function",h=this;return c+='<div class="row disc-number hidden"> '+u(i(n(0)).call(t,"Disc {1}",t&&t.parentIndex,{hash:{},data:s}))+' </div> <div class="row striped-list-inner-item"> <span class="col-xs-1 match-index"> '+u((l=t&&t.index,
typeof l===d?l.apply(t):l))+'. </span> <span class="col-xs-11 match-track-name ',l=a.unless.call(t,t&&t.matched,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+='"> '+u((l=t&&t.name,typeof l===d?l.apply(t):l))+" </span> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="match-empty-message">'+l(i(n(0)).call(t,"No matches found.",{
hash:{},data:s}))+"</div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <span class="match-name">'+p((n=e&&e.parentName,typeof n===h?n.apply(e):n))+'</span> &ndash; <span class="match-name">'+p((n=e&&e.name,typeof n===h?n.apply(e):n))+"</span> "}function l(e,t){var n,i="";return i+=' <span class="match-name">'+p((n=e&&e.name,typeof n===h?n.apply(e):n))+"</span> "}function c(e,t){
var n,i="";return i+=' <span class="match-year">'+p((n=e&&e.year,typeof n===h?n.apply(e):n))+'</span> <span class="match-separator">&middot;</span> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h="function",p=this.escapeExpression,f=this;return d+='<a class="match-result col-xs-12" href="#"> <div class="row"> <div class="col-xs-9 match-title-info"> ',u=a.if.call(t,t&&t.parentName,{hash:{},inverse:f.program(3,l,s),fn:f.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+=' </div> <div class="col-xs-3 match-score-info" title="'+p(i(n(0)).call(t,"Score {1}",t&&t.normalizedScore,{
hash:{},data:s}))+'"> ',u=a.if.call(t,t&&t.year,{hash:{},inverse:f.noop,fn:f.program(5,c,s),data:s}),(u||0===u)&&(d+=u),d+=' <span class="match-score"><i class="match-score-icon glyphicon certificate"></i>'+p((u=t&&t.normalizedScore,typeof u===h?u.apply(t):u))+'</span> </div> </div> <div class="row match-extended-info hidden"> <div class="col-xs-4"> <img class="match-art" src="'+p((u=t&&t.thumb,typeof u===h?u.apply(t):u))+'"/> </div> <div class="col-xs-8 children-region"></div> </div> </a> '})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"show-actions"}function l(e,t){return"selected"}function c(e,t){return"hidden"}function u(e,t){return' <span class="media-added-at"></span> '}function d(e,t){var a;return a=i(n(19)).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:w.program(12,p,t),fn:w.program(10,h,t),data:t}),a||0===a?a:""}function h(e,t){return' <span class="media-available-at"></span> ';
}function p(e,t){var a;return a=i(n(19)).call(e,e&&e.sort,"rating",{hash:{},inverse:w.program(15,g,t),fn:w.program(13,f,t),data:t}),a||0===a?a:""}function f(e,t){return' <span class="media-rating"></span> '}function g(e,t){var a;return a=i(n(19)).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:w.program(18,v,t),fn:w.program(16,m,t),data:t}),a||0===a?a:""}function m(e,t){return' <span class="media-resolution"></span> '}function v(e,t){var a;return a=i(n(19)).call(e,e&&e.sort,"duration",{hash:{},inverse:w.noop,
fn:w.program(19,y,t),data:t}),a||0===a?a:""}function y(e,t){return' <span class="media-duration"></span> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var b,S="",w=this,M="function",I=this.escapeExpression;return S+='<a class="media-list-inner-item ',b=a.if.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(1,o,s),data:s}),(b||0===b)&&(S+=b),S+=" ",b=a.if.call(t,t&&t.selected,{hash:{},inverse:w.noop,fn:w.program(3,l,s),data:s}),(b||0===b)&&(S+=b),S+='" href="'+I((b=t&&t.url,
typeof b===M?b.apply(t):b))+'"> <div class="media-poster"> <span class="media-count-badge badge hidden"></span> <span class="unwatched-count-badge badge hidden"></span> <span class="video-badge badge badge-round hidden"> <i class="glyphicon facetime-video"></i> </span> <div class="media-progress"></div> </div> <div class="media-actions ',b=a.unless.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(5,c,s),data:s}),(b||0===b)&&(S+=b),S+='"> <button class="play-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="play-unwatched-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-action-btn btn-loading btn-loading-static" tabindex="-1"> <i class="btn-label glyphicon pencil"></i> <div class="loading loading-sm"></div> </button> <button class="more-btn media-action-btn" tabindex="-1"><i class="glyphicon more"></i></button> </div> <div class="media-sort media-heading secondary"> ',
b=i(n(19)).call(t,t&&t.sort,"addedAt",{hash:{},inverse:w.program(9,d,s),fn:w.program(7,u,s),data:s}),(b||0===b)&&(S+=b),S+=' </div> <span class="media-title media-heading"></span> <span class="media-subtitle-2 media-heading secondary"></span> <span class="media-subtitle-1 media-heading secondary"></span> <span class="unwatched-icon"></span> <span class="media-context media-heading secondary"></span> <p class="media-tagline"></p> <p class="media-summary"></p> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"show-actions"}function l(e,t){return"selected"}function c(e,t){return"hidden"}function u(e,t){return' <span class="media-added-at"></span> '}function d(e,t){var a;return a=i(n(19)).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:w.program(12,p,t),fn:w.program(10,h,t),data:t}),a||0===a?a:""}function h(e,t){return' <span class="media-available-at"></span> ';
}function p(e,t){var a;return a=i(n(19)).call(e,e&&e.sort,"rating",{hash:{},inverse:w.program(15,g,t),fn:w.program(13,f,t),data:t}),a||0===a?a:""}function f(e,t){return' <span class="media-rating"></span> '}function g(e,t){var a;return a=i(n(19)).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:w.program(18,v,t),fn:w.program(16,m,t),data:t}),a||0===a?a:""}function m(e,t){return' <span class="media-resolution"></span> '}function v(e,t){var a;return a=i(n(19)).call(e,e&&e.sort,"duration",{hash:{},inverse:w.noop,
fn:w.program(19,y,t),data:t}),a||0===a?a:""}function y(e,t){return' <span class="media-duration"></span> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var b,S="",w=this,M="function",I=this.escapeExpression;return S+='<a class="media-list-inner-item ',b=a.if.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(1,o,s),data:s}),(b||0===b)&&(S+=b),S+=" ",b=a.if.call(t,t&&t.selected,{hash:{},inverse:w.noop,fn:w.program(3,l,s),data:s}),(b||0===b)&&(S+=b),S+='" href="'+I((b=t&&t.url,
typeof b===M?b.apply(t):b))+'"> <div class="media-actions ',b=a.unless.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(5,c,s),data:s}),(b||0===b)&&(S+=b),S+='"> <button class="play-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="play-unwatched-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-action-btn btn-link btn-loading btn-loading-static" tabindex="-1"> <i class="btn-label glyphicon pencil"></i> <div class="loading loading-sm"></div> </button> <button class="more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-title media-heading"></span> <span class="media-subtitle-2 media-heading secondary"></span> <span class="media-subtitle-1 media-heading secondary"></span> <span class="unwatched-icon"></span> <span class="media-context media-heading secondary"></span> <span class="media-sort media-heading secondary"> ',
b=i(n(19)).call(t,t&&t.sort,"addedAt",{hash:{},inverse:w.program(9,d,s),fn:w.program(7,u,s),data:s}),(b||0===b)&&(S+=b),S+=' </span> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="media-progress-track"></div> <div class="media-progress-pct"></div> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hide-actions"}function l(e,t){return"selected"}function c(e,t){return"hidden"}function u(e,t){return' <span class="media-added-at"></span> '}function d(e,t){var a;return a=i(n(19)).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:w.program(12,p,t),fn:w.program(10,h,t),data:t}),a||0===a?a:""}function h(e,t){return' <span class="media-available-at"></span> ';
}function p(e,t){var a;return a=i(n(19)).call(e,e&&e.sort,"rating",{hash:{},inverse:w.program(15,g,t),fn:w.program(13,f,t),data:t}),a||0===a?a:""}function f(e,t){return' <span class="media-rating"></span> '}function g(e,t){var a;return a=i(n(19)).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:w.program(18,v,t),fn:w.program(16,m,t),data:t}),a||0===a?a:""}function m(e,t){return' <span class="media-resolution"></span> '}function v(e,t){var a;return a=i(n(19)).call(e,e&&e.sort,"duration",{hash:{},inverse:w.noop,
fn:w.program(19,y,t),data:t}),a||0===a?a:""}function y(e,t){return' <span class="media-duration"></span> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var b,S="",w=this,M="function",I=this.escapeExpression;return S+='<a class="media-poster-container ',b=a.unless.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(1,o,s),data:s}),(b||0===b)&&(S+=b),S+=" ",b=a.if.call(t,t&&t.selected,{hash:{},inverse:w.noop,fn:w.program(3,l,s),data:s}),(b||0===b)&&(S+=b),S+='" href="'+I((b=t&&t.url,
typeof b===M?b.apply(t):b))+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons with-actions"> <i class="analyzing-icon media-poster-overlay-icon glyphicon magic hidden"></i> <i class="matching-icon media-poster-overlay-icon glyphicon search hidden"></i> <i class="metadata-icon media-poster-overlay-icon glyphicon tags hidden"></i> <i class="trash-icon media-poster-overlay-icon glyphicon bin warning hidden"></i> </div> <div class="media-poster-actions ',
b=a.unless.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(5,c,s),data:s}),(b||0===b)&&(S+=b),S+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="play-unwatched-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-count-badge badge badge-lg hidden"></span> <span class="unwatched-count-badge badge badge-lg hidden"></span> <span class="video-badge badge badge-round hidden"> <i class="glyphicon facetime-video"></i> </span> <div class="media-progress"></div> <div class="loading loading-inline"></div> </div> <span class="unwatched-icon"></span> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> <div class="media-subtitle-2 media-heading secondary"></div> <div class="media-context media-heading secondary"></div> <div class="media-sort media-heading secondary"> ',
b=i(n(19)).call(t,t&&t.sort,"addedAt",{hash:{},inverse:w.program(9,d,s),fn:w.program(7,u,s),data:s}),(b||0===b)&&(S+=b),S+=' </div> <div class="media-subtitle-1-fill media-heading hidden"></div> <div class="media-subtitle-2-fill media-heading hidden"></div> </a> <div class="media-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),a=a||{},'<a class="playlist-metadata-region" href="#"></a> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return' <div class="media-actions media-reorder"> <div class="sortable-handle btn-gray-link"><i class="glyphicon show-lines"></i></div> </div> '}function l(e,t){return' <div class="media-poster-container play-btn"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </div> ';
}function c(e,t){return' <div class="media-actions media-delete"> <button class="delete-btn media-action-btn btn-gray-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> '}function u(e,t){return"has-actions"}function d(e,t){return"btn-metadata-link"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f="function",g=this.escapeExpression,m=this;return p+='<div class="show-actions playlist-inner-item '+g((h=t&&t.type,typeof h===f?h.apply(t):h))+'"> ',
h=a.if.call(t,t&&t.canEdit,{hash:{},inverse:m.noop,fn:m.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=' <div class="media-index media-heading secondary"> <i class="glyphicon volume-up"></i> </div> ',h=i(n(64)).call(t,t&&t.type,"track",{hash:{},inverse:m.noop,fn:m.program(3,l,s),data:s}),(h||0===h)&&(p+=h),p+=" ",h=a.if.call(t,t&&t.canEdit,{hash:{},inverse:m.noop,fn:m.program(5,c,s),data:s}),(h||0===h)&&(p+=h),p+=' <div class="media-item '+g((h=t&&t.type,typeof h===f?h.apply(t):h))+" ",h=a.if.call(t,t&&t.canEdit,{
hash:{},inverse:m.noop,fn:m.program(7,u,s),data:s}),(h||0===h)&&(p+=h),p+='"> <div class="media-details"> <div class="media-detail media-heading"> <span class="media-title ',h=a.if.call(t,t&&t.hasDetails,{hash:{},inverse:m.noop,fn:m.program(9,d,s),data:s}),(h||0===h)&&(p+=h),p+='"></span> </div> <div class="media-detail media-optional media-heading secondary"> <span class="media-primary-subtitle btn-metadata-link"></span> </div> <div class="media-detail media-always media-heading secondary"> <span class="media-secondary-subtitle btn-metadata-link"></span> </div> <div class="media-duration media-heading secondary"></div> </div> </div> </div>';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"hide-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,c="",u=this,d="function",h=this.escapeExpression;return c+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:u.noop,fn:u.program(1,r,a),data:a}),(o||0===o)&&(c+=o),c+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,o=typeof l===d?l.call(t,{
hash:{},data:a}):l),c+=h(o)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-actions ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:u.noop,fn:u.program(3,s,a),data:a}),(o||0===o)&&(c+=o),c+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="play-unwatched-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="unwatched-count-badge badge badge-lg hidden"></span> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> <div class="media-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<a class="playlist" data-id="',(s=n.ratingKey)?r=s.call(t,{hash:{},data:a}):(s=t&&t.ratingKey,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+'" href="#"> <span class="media-poster playlist-poster"></span> ',(s=n.title)?r=s.call(t,{hash:{},data:a}):(s=t&&t.title,r=typeof s===l?s.call(t,{
hash:{},data:a}):s),o+=c(r)+" </a>"})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"selected"}function l(e,t){return' <button class="track-edit-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h=this;return u+='<div class="disc-number hidden"> '+d(i(n(0)).call(t,"Disc {1}",'<span class="track-parent-index"></span>',{
hash:{},data:s}))+' </div> <div class="striped-list-inner-item media-list-item track-list-item track"> <a class="track-list-inner-item show-actions ',c=a.if.call(t,t&&t.selected,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+='" href="#"> <div class="track-actions media-actions"> ',c=a.if.call(t,t&&t.showEdit,{hash:{},inverse:h.noop,fn:h.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+=' <button class="track-more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="track-index media-index media-heading secondary"> <span></span> <i class="glyphicon volume-up"></i> </span> <span class="track-title media-title media-heading"></span> <span class="track-subtitle-1 media-subtitle-1 media-heading secondary"></span> <span class="track-context media-context media-heading secondary"></span> <button class="track-music-video-btn media-action-btn btn-link" tabindex="-1"><i class="plex-icon-shows-560"></i></button> </a> <div class="track-actions-dropdown media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> </div> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="row row-padded"> <h4 class="text-muted text-center"> <p>'+l(i(n(0)).call(t,'Choose "Optimize..." on items in your library and optimized versions will appear here.',{hash:{},data:s}))+"</p> <p>"+l(i(n(0)).call(t,"Monitor conversion progress in {1}Conversion Activity{2}.",'<a href="#!/status/conversion">',"</a>",{
hash:{},data:s}))+"</p> </h4> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c="function",u=this.escapeExpression;return l+='<a class="show-actions playlist-inner-item '+u((o=t&&t.type,typeof o===c?o.apply(t):o))+'" href="#"> <div class="media-actions media-reorder"> <div class="sortable-handle btn-gray-link"><i class="glyphicon show-lines"></i></div> </div> <div class="generator-poster-container"> <div class="media-poster"></div> </div> <div class="media-actions generator-actions"> <button class="retry-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon repeat"></i></button> <button class="edit-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="delete-btn media-action-btn btn-gray-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> <div class="media-item"> <div class="media-details"> <div class="generator-title col-lg"></div> <div class="generator-target col-md col-secondary"></div> <div class="generator-status col-md col-secondary"> <div class="generator-status-container generator-status-complete"> <i class="generator-status-icon glyphicon ok-2 text-success"></i> '+u(i(n(0)).call(t,"Complete",{
hash:{},data:s}))+' </div> <div class="generator-status-container generator-status-failed"> <i class="generator-status-icon glyphicon circle-exclamation-mark text-danger"></i> <span class="generator-status-failed-message">'+u(i(n(0)).call(t,"Failed",{hash:{},data:s}))+'</span> </div> <div class="generator-status-container generator-status-converting"> <i class="generator-status-icon glyphicon restart"></i> '+u(i(n(0)).call(t,"Converting",{hash:{},data:s}))+' </div> <div class="generator-status-container generator-status-pending"> <i class="generator-status-icon glyphicon clock"></i> '+u(i(n(0)).call(t,"Waiting",{
hash:{},data:s}))+" </div> </div> </div> </div> </a> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<div class="striped-list-inner-item"> <div class="generator-poster-container"> <div class="media-poster"></div> </div> <div class="conversion-status-region"></div> <div class="generator-metadata-title">',(s=n.title)?r=s.call(t,{hash:{},
data:a}):(s=t&&t.title,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+'</div> <div class="generator-metadata-episode-index generator-metadata-subtitle"></div> <div class="generator-metadata-year generator-metadata-subtitle">',(s=n.year)?r=s.call(t,{hash:{},data:a}):(s=t&&t.year,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+"</div> </div> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};
var r,s,o="",l="function",c=this.escapeExpression;return o+='<a class="btn-gray" href="#">',(s=n.title)?r=s.call(t,{hash:{},data:a}):(s=t&&t.title,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+"</a> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <div class="label-list-item"> <a class="new-filter-btn label label-btn label-default" href="#"><i class="label-icon glyphicon circle-plus"></i> '+d(i(n(0)).call(e,"New Filter",{
hash:{},data:t}))+"</a> </div> "}function l(e,t){var a,r="";return r+=' <div class="label-list-item"> <a class="remove-filter-btn label label-btn label-primary" data-key="'+d((a=e&&e.key,typeof a===h?a.apply(e):a))+'" href="#"><i class="label-icon glyphicon circle-remove"></i> <span class="label-truncate">'+d(i(n(1220)).call(e,e&&e.titles,{hash:{},data:t}))+"</span></a> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h="function",p=this;
return c=a.unless.call(t,t&&t.currentFilters,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=" ",c=a.each.call(t,t&&t.currentFilters,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"boolean-btn"}function l(e,t){return"filter-btn"}function c(e,t){return"selected"}function u(e,t){return"hidden";
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this,f=this.escapeExpression;return h+='<a class="',d=i(n(19)).call(t,(d=t&&t.filter,null==d||d===!1?d:d.filterType),"boolean",{hash:{},inverse:p.program(3,l,s),fn:p.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" btn-gray ",d=a.if.call(t,t&&t.selected,{hash:{},inverse:p.noop,fn:p.program(5,c,s),data:s}),(d||0===d)&&(h+=d),h+='" href="#"> '+f(i(n(0)).call(t,(d=t&&t.filter,null==d||d===!1?d:d.title),{hash:{},data:s}))+' <i class="selected-icon glyphicon ok-2 ',
d=a.unless.call(t,t&&t.selected,{hash:{},inverse:p.noop,fn:p.program(7,u,s),data:s}),(d||0===d)&&(h+=d),h+='"></i> </a> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this,d="function",h=this.escapeExpression;return c+='<form id="filter-options-search-form" class="',l=a.unless.call(t,t&&t.showSearch,{
hash:{},inverse:u.noop,fn:u.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+='"> <div class="form-group form-group-search"> <label class="control-label-search" for="filter-options-search"><i class="glyphicon search"></i></label> <input type="search" id="filter-options-search" class="form-control form-control-search" value="'+h((l=t&&t.query,typeof l===d?l.apply(t):l))+'"> </div> </form> <div id="filter-options-loading" class="loading ',l=a.unless.call(t,t&&t.showLoading,{hash:{},inverse:u.noop,fn:u.program(1,o,s),
data:s}),(l||0===l)&&(c+=l),c+='"></div> <ul class="list side-bar-list"> <li><a class="filter-options-deselect-btn btn-gray" href="#">'+h(i(n(0)).call(t,"Deselect All",{hash:{},data:s}))+"</a> </ul> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"selected"}function l(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this,h=this.escapeExpression;
return u+='<a class="filter-option-btn btn-gray ',c=a.if.call(t,t&&t.selected,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+='" href="#"> '+h(i(n(0)).call(t,(c=t&&t.filterOption,null==c||c===!1?c:c.title),{hash:{},data:s}))+' <i class="selected-icon glyphicon ok-2 ',c=a.unless.call(t,t&&t.selected,{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+='"></i> </a> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<a class="sort-btn btn-gray" href="#"> '+l(i(n(0)).call(t,t&&t.title,{hash:{},data:s}))+' <i class="desc-icon caret-icon caret-icon-sm hidden"></i> <i class="asc-icon caret-icon caret-icon-sm caret-icon-reverse hidden"></i> </a> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"left-arrow"}function s(e,t){var i;return i=n.if.call(e,(i=e&&e.filePath,
null==i||i===!1?i:i.home),{hash:{},inverse:g.program(6,l,t),fn:g.program(4,o,t),data:t}),i||0===i?i:""}function o(e,t){return"home"}function l(e,t){var i;return i=n.if.call(e,(i=e&&e.filePath,null==i||i===!1?i:i.network),{hash:{},inverse:g.program(9,u,t),fn:g.program(7,c,t),data:t}),i||0===i?i:""}function c(e,t){return"globe"}function u(e,t){var i;return i=n.if.call(e,e&&e.isRoot,{hash:{},inverse:g.program(12,h,t),fn:g.program(10,d,t),data:t}),i||0===i?i:""}function d(e,t){return"hdd"}function h(e,t){
return"folder-open"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var p,f="",g=this,m="function",v=this.escapeExpression;return f+='<a class="striped-list-item" href="#" data-key="'+v((p=t&&t.filePath,p=null==p||p===!1?p:p.key,typeof p===m?p.apply(t):p))+'"> <i class="folder-icon glyphicon ',p=n.if.call(t,(p=t&&t.filePath,null==p||p===!1?p:p.isBackShortcut),{hash:{},inverse:g.program(3,s,a),fn:g.program(1,r,a),data:a}),(p||0===p)&&(f+=p),f+='"></i> '+v((p=t&&t.filePath,p=null==p||p===!1?p:p.title,
typeof p===m?p.apply(t):p))+' <div class="loading loading-sm loading-inline hidden"></div> </a> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<a class="btn-gray" data-identifier="',(s=n.identifier)?r=s.call(t,{hash:{},data:a}):(s=t&&t.identifier,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+'" href="#">',(s=n.name)?r=s.call(t,{
hash:{},data:a}):(s=t&&t.name,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+"</a> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"checked"}function l(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d="function",h=this.escapeExpression,p=this;return u+='<div class="card-actions"> <button class="info-btn card-action-btn"><i class="glyphicon circle-info"></i></button> <button class="settings-btn card-action-btn"><i class="glyphicon cogwheel"></i></button> </div> <div class="card-handle"><i class="glyphicon show-lines"></i></div> <label for="'+h((c=t&&t.identifier,
typeof c===d?c.apply(t):c))+'"> <input id="'+h((c=t&&t.identifier,typeof c===d?c.apply(t):c))+'" name="'+h((c=t&&t.identifier,typeof c===d?c.apply(t):c))+'" type="checkbox" ',c=a.if.call(t,t&&t.enabled,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=" ",c=a.if.call(t,t&&t.isPrimary,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+="> "+h(i(n(0)).call(t,t&&t.name,{hash:{},data:s}))+" </label> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="row-padded"> <h4 class="text-muted text-center">'+l(i(n(0)).call(t,"No devices found",{hash:{},data:s}))+"</h4> </div> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="card card-device"> <img class="card-poster device-icon"> <div class="card-actions"> <button class="remove-device-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4 class="name"></h4> <div class="card-details"> <div class="pull-right"> <div class="last-seen text-muted"></div> <span class="sync-info hidden"> <span class="glyphicon circle-arrow-down sync-icon"></span> <span class="sync-count"></span> <span class="sync-size"></span> </span> </div> <span class="version text-muted"></span> <div class="device-info-container"> <div class="product"></div> <div class="device text-muted"></div> <div class="platform-info text-muted"> <span class="platform"></span> <span class="platform-version"></span> </div> </div> </div> </div> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<h4 class="text-muted text-center">'+l(i(n(0)).call(t,"No friends yet. {1}Invite a friend{2} and share your libraries.",'<a class="invite-friend-btn" href="#">',"</a>",{hash:{},data:s}))+"</h4> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="card card-user card-friend"> <div class="card-poster media-poster img-circle"></div> <div class="card-actions"> <button class="edit-btn card-action-btn"><i class="glyphicon pencil"></i></button> <button class="delete-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4 class="username"></h4> <div class="card-details"></div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <p class="user-summary"> <i class="server-share-direction-icon glyphicon right-arrow"></i> <a class="server-share-edit-btn server-share-status shared '+v((n=e&&e.shared,n=null==n||n===!1?n:n.status,typeof n===y?n.apply(e):n))+" ",n=a.unless.call(e,e&&e.canEdit,{hash:{},inverse:b.noop,fn:b.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+='" href="#"> <i class="server-share-status-icon available glyphicon circle-ok"></i> <i class="server-share-status-icon unavailable glyphicon circle-exclamation-mark"></i> <i class="server-share-status-icon unknown glyphicon circle-question-mark"></i> <i class="server-share-status-hover-icon glyphicon pencil"></i> </a> ',
n=a.if.call(e,(n=e&&e.shared,null==n||n===!1?n:n.hasActiveShare),{hash:{},inverse:b.program(6,u,t),fn:b.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+=" </p> "}function l(e,t){return"disabled"}function c(e,t){var a,r="";return r+=" "+v(i(n(0)).call(e,"shares {1} {2} with you",(a=e&&e.shared,null==a||a===!1?a:a.numLibraries),(a=e&&e.shared,null==a||a===!1?a:a.libraryLabel),{hash:{},data:t}))+" "}function u(e,t){var a,r="";return r+=" "+v(i(n(0)).call(e,"wants to share {1} {2} with you",(a=e&&e.shared,
null==a||a===!1?a:a.numLibraries),(a=e&&e.shared,null==a||a===!1?a:a.libraryLabel),{hash:{},data:t}))+" "}function d(e,t){var n,i="";return i+=' <p class="user-summary"> <i class="server-share-direction-icon glyphicon left-arrow"></i> <a class="server-share-edit-btn server-share-status owned '+v((n=e&&e.owned,n=null==n||n===!1?n:n.status,typeof n===y?n.apply(e):n))+" ",n=a.unless.call(e,e&&e.canEdit,{hash:{},inverse:b.noop,fn:b.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+='" href="#"> <i class="server-share-status-icon available glyphicon circle-ok"></i> <i class="server-share-status-icon unavailable glyphicon circle-exclamation-mark"></i> <i class="server-share-status-icon unknown glyphicon circle-question-mark"></i> <i class="server-share-status-hover-icon glyphicon pencil"></i> </a> ',
n=a.if.call(e,(n=e&&e.owned,null==n||n===!1?n:n.hasActiveShare),{hash:{},inverse:b.program(11,p,t),fn:b.program(9,h,t),data:t}),(n||0===n)&&(i+=n),i+=" </p> "}function h(e,t){var a,r="";return r+=" "+v(i(n(0)).call(e,"sharing {1} {2} with this {3}",(a=e&&e.owned,null==a||a===!1?a:a.numLibraries),(a=e&&e.owned,null==a||a===!1?a:a.libraryLabel),(a=e&&e.owned,null==a||a===!1?a:a.friendLabel),{hash:{},data:t}))+" "}function p(e,t){var a,r="";return r+=" "+v(i(n(0)).call(e,"invited to share {1} {2}",(a=e&&e.owned,
null==a||a===!1?a:a.numLibraries),(a=e&&e.owned,null==a||a===!1?a:a.libraryLabel),{hash:{},data:t}))+" "}function f(e,t){var a="";return a+=' <p class="user-summary server-share-empty-message">'+v(i(n(0)).call(e,"no shared libraries",{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v=this.escapeExpression,y="function",b=this;return g=a.if.call(t,(g=t&&t.shared,null==g||g===!1?g:g.numLibraries),{hash:{},inverse:b.noop,fn:b.program(1,o,s),data:s
}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.owned,null==g||g===!1?g:g.numLibraries),{hash:{},inverse:b.noop,fn:b.program(8,d,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,t&&t.showEmptyMessage,{hash:{},inverse:b.noop,fn:b.program(13,f,s),data:s}),(g||0===g)&&(m+=g),m+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <h4 class="text-muted text-center">'+d(i(n(0)).call(e,"No one else is in your home. {1}Add a user{2} to enable user switching.",'<a class="add-user-btn" href="#">',"</a>",{
hash:{},data:t}))+"</h4> "}function l(e,t){var a,r="";return r+=' <h4 class="text-muted text-center">'+d(i(n(0)).call(e,"You need a Plex Pass to add users to your home.",{hash:{},data:t}))+'</h4> <p class="text-center"> <a class="btn btn-sm btn-primary" href="'+d((a=e&&e.plexPassUrl,typeof a===h?a.apply(e):a))+'" target="_blank">'+d(i(n(0)).call(e,"Learn More",{hash:{},data:t}))+"</a> </p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h="function",p=this;
return c=a.if.call(t,t&&t.hasHomeFeature,{hash:{},inverse:p.program(3,l,s),fn:p.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=' <ul class="list centered-home-user-container"></ul> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return'<div class="selected-user-icon"></div>'}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o="",l=this;return o+='<div class="card card-user card-friend card-home-user"> ',s=n.if.call(t,t&&t.isSignedInUser,{
hash:{},inverse:l.noop,fn:l.program(1,r,a),data:a}),(s||0===s)&&(o+=s),o+=' <div class="card-poster media-poster img-circle"></div> <div class="card-actions"> <button class="pin-btn pin-protected-btn card-action-btn btn-success"><i class="glyphicon lock"></i></button> <button class="pin-btn pin-unprotected-btn card-action-btn"><i class="glyphicon unlock"></i></button> <button class="edit-btn card-action-btn"><i class="glyphicon pencil"></i></button> <button class="delete-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4> <i class="admin-icon glyphicon crown"></i> <span class="username"></span> </h4> <div class="card-details"> <div class="user-type text-muted"></div> </div> </div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return'<button class="accept-btn card-action-btn btn-success"><i class="glyphicon ok-2"></i></button>'}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o="",l=this;return o+='<div class="card card-user"> <div class="card-poster media-poster img-circle"></div> <div class="card-actions"> ',s=n.if.call(t,t&&t.showAccept,{hash:{},inverse:l.noop,fn:l.program(1,r,a),data:a}),(s||0===s)&&(o+=s),
o+=' <button class="delete-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4 class="username"></h4> <div class="card-details"> <p class="user-summary"></p> </div> </div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<div class="card card-section"> <div class="card-actions"> <button class="edit-section-btn card-action-btn"><i class="glyphicon pencil"></i></button> <button class="delete-section-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <i class="section-icon glyphicon ',
(s=n.icon)?r=s.call(t,{hash:{},data:a}):(s=t&&t.icon,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+'"></i> <span class="section-title"></span> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){var n,i="";return i+=' <h4><a href="'+p((n=e&&e.url,typeof n===h?n.apply(e):n))+'" target="_blank">'+p((n=e&&e.title,typeof n===h?n.apply(e):n))+'</a></h4> <a href="'+p((n=e&&e.url,
typeof n===h?n.apply(e):n))+'" target="_blank"> <img class="thumb"/> </a> '}function c(e,t){var n,i="";return i+=" <h4>"+p((n=e&&e.title,typeof n===h?n.apply(e):n))+'</h4> <img class="thumb"/> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h="function",p=this.escapeExpression,f=this;return d+='<div class="card card-announcement"> <div class="unread ',u=a.if.call(t,t&&t.read,{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='"></div> ',u=a.if.call(t,t&&t.url,{
hash:{},inverse:f.program(5,c,s),fn:f.program(3,l,s),data:s}),(u||0===u)&&(d+=u),d+=' <div class="date">'+p(i(n(1221)).call(t,t&&t.notifyAt,{hash:{},data:s}))+'</div> <div class="description">',u=t&&t.content,u=typeof u===h?u.apply(t):u,(u||0===u)&&(d+=u),d+="</div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c="function",u=this.escapeExpression;
return l+='<a class="friend" data-id="'+u((o=t&&t.recommendationsPlaylistId,typeof o===c?o.apply(t):o))+'" href="#"> <span class="media-poster user-poster"></span> '+u(i(n(448)).call(t,t&&t.title,20,{hash:{},data:s}))+" </a> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<a class="card card-user-playlist" href="',(s=n.url)?r=s.call(t,{
hash:{},data:a}):(s=t&&t.url,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+'"> <div class="card-poster media-poster"></div> <div class="card-actions"> <button class="play-btn card-action-btn"><i class="glyphicon play"></i></button> <button class="mark-unwatched-btn card-action-btn"><i class="glyphicon circle-minus"></i></button> <button class="mark-watched-btn card-action-btn"><i class="glyphicon circle-ok"></i></button> <button class="delete-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4 class="media-title"></h4> <div class="card-details"> <span class="media-subtitle-1"></span> <span class="media-context"></span> <p class="media-summary"></p> </div> </a> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="modal-dialog"> <div class="modal-content"> <form name="add-folder-form"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon folder-plus"></i> '+l(i(n(0)).call(t,"Add Folder",{
hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <div class="row"> <div class="col-md-12"> <input type="text" name="path" class="form-control" value=""> </div> </div> <div class="row directory-container-row"> <div class="home-directory-container col-md-5"></div> <div class="path-container col-md-7"></div> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+l(i(n(0)).call(t,"Cancel",{hash:{},
data:s}))+'</button> <button type="submit" class="add-btn btn btn-primary">'+l(i(n(0)).call(t,"Add",{hash:{},data:s}))+"</button> </div> </form> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <ul class="list select-list select-collections-list dark-scrollbar"> ',n=a.each.call(e,e&&e.collections,{hash:{},inverse:m.noop,fn:m.program(2,l,t),data:t}),(n||0===n)&&(i+=n),
i+=" </ul> "}function l(e,t){var n,i="";return i+=' <li class="striped-list-item select-list-item"> <a class="collection" data-value="'+g((n=e&&e.key,typeof n===f?n.apply(e):n))+'" href="#">'+g((n=e&&e.title,typeof n===f?n.apply(e):n))+"</a> </li> "}function c(e,t){var n;return n=a.if.call(e,e&&e.loading,{hash:{},inverse:m.program(7,d,t),fn:m.program(5,u,t),data:t}),n||0===n?n:""}function u(e,t){return' <div class="loading-container"> <div class="loading loading-inline"></div> </div> '}function d(e,t){
var a="";return a+=' <div class="empty-message">'+g(i(n(0)).call(e,"There are no collections in this library.",{hash:{},data:t}))+"</div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f="function",g=this.escapeExpression,m=this;return p+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon folder-plus"></i> '+g(i(n(0)).call(t,"Select a Collection",{
hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',h=a.if.call(t,t&&t.collections,{hash:{},inverse:m.program(4,c,s),fn:m.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=' <div class="message-container"> <input class="message form-control" placeholder="'+g(i(n(0)).call(t,"New collection...",{hash:{},data:s}))+'"> </div> </div> <div class="modal-footer"> <button type="button" class="add-btn btn btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+g(i(n(0)).call(t,"Add",{
hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return v(i(n(0)).call(e,"Select a Playlist",{hash:{},data:t}))}function l(e,t){return v(i(n(0)).call(e,"Create Playlist",{hash:{},data:t}))}function c(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.hasPlaylists,{hash:{},inverse:y.program(8,d,t),fn:y.program(6,u,t),data:t}),(n||0===n)&&(i+=n),
i+=" "}function u(e,t){return' <div class="playlists-container"></div> '}function d(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.loading,{hash:{},inverse:y.program(11,p,t),fn:y.program(9,h,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function h(e,t){return' <div class="loading-container"> <div class="loading loading-inline"></div> </div> '}function p(e,t){var a="";return a+=' <div class="empty-message">'+v(i(n(0)).call(e,"There are no playlists on this server.",{hash:{},data:t}))+"</div> "}function f(e,t){
return"only-control"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v=this.escapeExpression,y=this;return m+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon plex-icon-add-to-playlist"></i> ',g=a.if.call(t,t&&t.showExisting,{hash:{},inverse:y.program(3,l,s),fn:y.program(1,o,s),data:s}),(g||0===g)&&(m+=g),
m+=' </h4> </div> <div class="modal-body modal-body-scroll minimal-scroll"> ',g=a.if.call(t,t&&t.showExisting,{hash:{},inverse:y.noop,fn:y.program(5,c,s),data:s}),(g||0===g)&&(m+=g),m+=' <div class="message-container ',g=a.unless.call(t,t&&t.showExisting,{hash:{},inverse:y.noop,fn:y.program(13,f,s),data:s}),(g||0===g)&&(m+=g),m+='"> <input class="message form-control" placeholder="'+v(i(n(0)).call(t,"New playlist...",{hash:{},data:s}))+'"> </div> </div> <div class="modal-footer"> <button type="button" class="add-btn btn btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+v(i(n(0)).call(t,"Add",{
hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon circle-info"></i> '+c((r=t&&t.agent,
r=null==r||r===!1?r:r.name,typeof r===l?r.apply(t):r))+' </h4> </div> <div class="modal-body"> <p class="agent-icon-container"></p> <p>',(s=n.attribution)?r=s.call(t,{hash:{},data:a}):(s=t&&t.attribution,r=typeof s===l?s.call(t,{hash:{},data:a}):s),(r||0===r)&&(o+=r),o+="</p> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+='<button class="browse-btn btn btn-primary">'+u(i(n(0)).call(e,"Browse",{
hash:{},data:t}))+"</button>"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this.escapeExpression,d="function",h=this;return c+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title">'+u((l=t&&t.channel,l=null==l||l===!1?l:l.title,typeof l===d?l.apply(t):l))+'</h4> </div> <div class="modal-body"> <div class="channel-poster-container"> <div class="channel-poster media-poster"></div> <div class="installed-actions-container"> ',
l=a.unless.call(t,t&&t.agent,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=' <div class="btn-group"> <button type="button" class="update-btn btn btn-default btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+u(i(n(0)).call(t,"Update",{hash:{},data:s}))+'</span> </button> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <i class="caret-icon caret-icon-sm"></i> </button> <ul class="dropdown-menu pull-right"> <li><a class="restart-btn" href="#">'+u(i(n(0)).call(t,"Restart",{
hash:{},data:s}))+'</a></li> <li><a class="reset-btn" href="#">'+u(i(n(0)).call(t,"Reset",{hash:{},data:s}))+'</a></li> </ul> </div> <button class="uninstall-btn btn btn-danger btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+u(i(n(0)).call(t,"Uninstall",{hash:{},data:s}))+'</span> </button> </div> <div class="uninstalled-actions-container"> <button class="install-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+u(i(n(0)).call(t,"Install",{
hash:{},data:s}))+'</span> </button> </div> </div> <div class="channel-details"> '+u((l=t&&t.channel,l=null==l||l===!1?l:l.summary,typeof l===d?l.apply(t):l))+" </div> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+h(i(n(0)).call(e,"Directory Settings",{hash:{},data:t}))+" "}function l(e,t){var a="";return a+=" "+h(i(n(0)).call(e,"{1} Settings",e&&e.title,{
hash:{},data:t}))+" "}function c(e,t){var a="";return a+=" "+h(i(n(24)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this.escapeExpression,p=this;return d+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon cogwheel"></i> ',
u=i(n(19)).call(t,t&&t.title,"Preferences...",{hash:{},inverse:p.program(3,l,s),fn:p.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+=' </h4> </div> <form id="channel-settings-form"> <div class="modal-body settings-container"> ',u=a.each.call(t,t&&t.settings,{hash:{},inverse:p.noop,fn:p.program(5,c,s),data:s}),(u||0===u)&&(d+=u),d+=' </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+h(i(n(0)).call(t,"Cancel",{hash:{},data:s}))+'</button> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(t,"Save",{
hash:{},data:s}))+"</span> </button> </div> </form> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+h(i(n(0)).call(e,e&&e.cancelLabel,{hash:{},data:t}))+"</button> "}function l(e,t){return"btn-danger"}function c(e,t){return"btn-primary"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
s=s||{};var u,d="",h=this.escapeExpression,p="function",f=this;return d+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-exclamation-mark"></i> '+h((u=t&&t.title,typeof u===p?u.apply(t):u))+'</h4> </div> <div class="modal-body"> <p class="confirm-message">'+h((u=t&&t.message,typeof u===p?u.apply(t):u))+'</p> <p class="double-confirm-message text-warning"></p> </div> <div class="modal-footer"> ',
u=a.unless.call(t,t&&t.hideCancel,{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+=' <button type="button" class="confirm-btn btn btn-lg ',u=a.if.call(t,t&&t.hasDanger,{hash:{},inverse:f.program(5,c,s),fn:f.program(3,l,s),data:s}),(u||0===u)&&(d+=u),d+=' btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(t,t&&t.confirmLabel,{hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,r){var s,o="";return o+=' <li class="striped-list-item select-list-item download-list-item"> <a class="media" data-value="'+m((s=null==t||t===!1?t:t.index,typeof s===g?s.apply(e):s))+'" href="'+m((s=e&&e.downloadUrl,typeof s===g?s.apply(e):s))+'" target="'+m((s=r&&r.defaultLinkTarget,typeof s===g?s.apply(e):s))+'" ',s=i(n(64)).call(e,r&&r.defaultLinkTarget,"_blank",{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),
(s||0===s)&&(o+=s),o+="> ",s=a.if.call(e,e&&e.title,{hash:{},inverse:v.noop,fn:v.program(4,c,t),data:t}),(s||0===s)&&(o+=s),o+=" ",s=a.if.call(e,e&&e.videoResolution,{hash:{},inverse:v.noop,fn:v.program(6,u,t),data:t}),(s||0===s)&&(o+=s),o+=" ",s=a.if.call(e,e&&e.bitrate,{hash:{},inverse:v.noop,fn:v.program(9,h,t),data:t}),(s||0===s)&&(o+=s),o+=" </a> </li> "}function l(e,t){var n,i="";return i+='download="'+m((n=e&&e.downloadName,typeof n===g?n.apply(e):n))+'"'}function c(e,t){var n,i="";return i+=" "+m((n=e&&e.title,
typeof n===g?n.apply(e):n))+' <span class="title-separator">\u2022</span> '}function u(e,t){var r,s="";return s+=" "+m(i(n(703)).call(e,e&&e.videoResolution,{hash:{},data:t})),r=a.if.call(e,e&&e.bitrate,{hash:{},inverse:v.noop,fn:v.program(7,d,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function d(e,t){return","}function h(e,t){var a="";return a+=" "+m(i(n(702)).call(e,e&&e.bitrate,0,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g="function",m=this.escapeExpression,v=this;
return f+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon download-alt"></i> '+m(i(n(0)).call(t,"Download a Version",{hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list download-list"> ',p=a.each.call(t,t&&t.mediaItems,{hash:{},inverse:v.noop,
fn:v.programWithDepth(1,o,s,t),data:s}),(p||0===p)&&(f+=p),f+=" </ul> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <i class="modal-icon glyphicon plus"></i> '+y(i(n(0)).call(e,"Add {1} Library",'<span class="section-type-title"></span>',{hash:{},data:t}))+" "}function l(e,t){var a="";return a+=' <i class="modal-icon glyphicon pencil"></i> '+y(i(n(0)).call(e,"Edit Library",{
hash:{},data:t}))+" "}function c(e,t){return" selected"}function u(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"Select type",{hash:{},data:t}))+" "}function d(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"General",{hash:{},data:t}))+" "}function h(e,t){return"disabled"}function p(e,t){var a="";return a+=' <button type="button" class="delete-btn btn btn-danger pull-left" data-dismiss="modal">'+y(i(n(0)).call(e,"Delete Library",{hash:{},data:t}))+"</button> "}function f(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"Add Library",{
hash:{},data:t}))+" "}function g(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"Save Changes",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var m,v="",y=this.escapeExpression,b=this;return v+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> ',m=a.if.call(t,t&&t.add,{hash:{},inverse:b.program(3,l,s),
fn:b.program(1,o,s),data:s}),(m||0===m)&&(v+=m),v+=' </h4> </div> <div class="modal-body modal-body-scroll modal-body-with-panes"> <div class="modal-nav-pane dark-scrollbar"> <ul class="list modal-nav-list"> <li> <a class="btn-gray change-pane-btn type-btn',m=i(n(19)).call(t,t&&t.selectedPane,"type",{hash:{},inverse:b.noop,fn:b.program(5,c,s),data:s}),(m||0===m)&&(v+=m),v+='" data-pane="type" href="#"> <i class="modal-nav-icon glyphicon align-center"></i> ',m=a.if.call(t,t&&t.add,{hash:{},inverse:b.program(9,d,s),
fn:b.program(7,u,s),data:s}),(m||0===m)&&(v+=m),v+=' </a> </li> <li> <a class="btn-gray change-pane-btn folders-btn',m=i(n(19)).call(t,t&&t.selectedPane,"folders",{hash:{},inverse:b.noop,fn:b.program(5,c,s),data:s}),(m||0===m)&&(v+=m),v+=" ",m=a.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(11,h,s),data:s}),(m||0===m)&&(v+=m),v+='" data-pane="folders" href="#"> <i class="modal-nav-icon glyphicon folder-open"></i> '+y(i(n(0)).call(t,"Add folders",{hash:{},data:s}))+' </a> </li> <li> <a class="btn-gray change-pane-btn options-btn',
m=i(n(19)).call(t,t&&t.selectedPane,"options",{hash:{},inverse:b.noop,fn:b.program(5,c,s),data:s}),(m||0===m)&&(v+=m),v+=" ",m=a.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(11,h,s),data:s}),(m||0===m)&&(v+=m),v+=' hidden" data-pane="options" href="#"> <i class="modal-nav-icon glyphicon magic"></i> '+y(i(n(0)).call(t,"Options",{hash:{},data:s}))+' </a> </li> <li> <a class="btn-gray change-pane-btn advanced-btn',m=i(n(19)).call(t,t&&t.selectedPane,"advanced",{hash:{},inverse:b.noop,fn:b.program(5,c,s),
data:s}),(m||0===m)&&(v+=m),v+=" ",m=a.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(11,h,s),data:s}),(m||0===m)&&(v+=m),v+='" data-pane="advanced" href="#"> <i class="modal-nav-icon glyphicon cogwheel"></i> '+y(i(n(0)).call(t,"Advanced",{hash:{},data:s}))+' </a> </li> </ul> </div> <div class="modal-body-pane pane-region dark-scrollbar"> </div> </div> <div class="modal-footer"> ',m=a.if.call(t,t&&t.canDelete,{hash:{},inverse:b.noop,fn:b.program(13,p,s),data:s}),(m||0===m)&&(v+=m),v+=' <span class="form-message"></span> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+y(i(n(0)).call(t,"Cancel",{
hash:{},data:s}))+'</button> <button type="button" class="save-btn btn btn-primary btn-loading ',m=a.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(11,h,s),data:s}),(m||0===m)&&(v+=m),v+='"> <div class="loading loading-sm"></div> <span class="btn-label"> <span class="save-btn-label-next">'+y(i(n(0)).call(t,"Next",{hash:{},data:s}))+'</span> <span class="save-btn-label-save"> ',m=a.if.call(t,t&&t.add,{hash:{},inverse:b.program(17,g,s),fn:b.program(15,f,s),data:s}),(m||0===m)&&(v+=m),v+=" </span> </span> </button> </div> </div> </div> ";
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <div class="match-location"> '+h(i(n(0)).call(e,"Location",{hash:{},data:t}))+": "+h(i(n(704)).call(e,e&&e.location,60,12,{hash:{},data:t}))+" </div> "}function l(e,t){var a="";return a+=' <ul class="list modal-list"> <li class="modal-list-item"><a class="search-options-btn" href="#">'+h(i(n(0)).call(e,"Search Options",{hash:{},
data:t}))+'</a></li> <li class="auto-match-dropdown-region modal-list-item"></li> </ul> '}function c(e,t){var a="";return a+=' <button type="submit" class="search-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(e,"Search",{hash:{},data:t}))+"</span> </button> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this.escapeExpression,p=this;return d+='<div class="modal-dialog"> <div class="modal-content"> <form id="fix-incorrect-match-form"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon nameplate"></i> <span class="modal-title-text"></span></h4> ',
u=a.if.call(t,t&&t.location,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+=' </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',u=a.if.call(t,t&&t.showNavigation,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(u||0===u)&&(d+=u),d+=' <div class="pane-region"></div> </div> <div class="modal-footer"> <div class="match-search-actions"> <button type="button" class="cancel-btn btn btn-default">'+h(i(n(0)).call(t,"Cancel",{hash:{},data:s}))+"</button> ",
u=a.if.call(t,t&&t.showNavigation,{hash:{},inverse:p.noop,fn:p.program(5,c,s),data:s}),(u||0===u)&&(d+=u),d+=" </div> </div> </form> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+d(i(n(0)).call(e,"Insecure connections will only be allowed when you're on the same network as the server.",{hash:{},data:t}))+" "}function l(e,t){var a="";return a+=" "+d(i(n(0)).call(e,"Insecure connections will be allowed to any server.",{
hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h=this;return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-exclamation-mark"></i> '+d(i(n(0)).call(t,"Server Unreachable",{hash:{},data:s}))+' </h4> </div> <div class="modal-body"> <p> ',
c=a.if.call(t,t&&t.publicAddressMatches,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=" </p> <p>"+d(i(n(0)).call(t,"The Allow Fallback to Insecure Connections setting can be changed in Web Settings. Would you like to allow insecure connections?",{hash:{},data:s}))+'</p> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+d(i(n(0)).call(t,"No",{hash:{},data:s}))+'</button> <button type="button" class="confirm-btn btn btn-lg btn-danger">'+d(i(n(0)).call(t,"Yes",{
hash:{},data:s}))+"</button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){var n,i="";return i+=' <option value="'+h((n=e&&e.key,typeof n===d?n.apply(e):n))+'">'+h((n=e&&e.title,typeof n===d?n.apply(e):n))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d="function",h=this.escapeExpression,p=this;return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon file-import"></i> '+h(i(n(0)).call(t,"Import from iTunes",{
hash:{},data:s}))+' </h4> </div> <div class="modal-body"> <p class="help-block">'+h(i(n(0)).call(t,"Importing from iTunes will import your music playlists. It will also import your ratings, the date you added the music, as well as play and skip counts for tracks in your library. Depending on how many tracks you have, this process can take many minutes to complete.",{hash:{},data:s}))+'</p> <div class="form-group ',c=a.unless.call(t,t&&t.showSections,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s
}),(c||0===c)&&(u+=c),u+='"> <label class="control-label"> '+h(i(n(0)).call(t,"Add to library: ",{hash:{},data:s}))+' <select id="section-list"> ',c=a.each.call(t,t&&t.sections,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+=' </select> </label> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="import-all"> '+h(i(n(0)).call(t,"Overwrite existing playlists",{hash:{},data:s}))+' </label> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+h(i(n(0)).call(t,"Cancel",{
hash:{},data:s}))+'</button> <button type="button" class="import-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(t,"Import",{hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <h5 class="keyboard-shortcuts-header">'+m((n=e&&e.label,typeof n===g?n.apply(e):n))+'</h5> <ul class="list keyboard-shortcuts-list"> ',
n=a.each.call(e,e&&e.shortcuts,{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function l(e,t){var r,s="";return s+=' <li> <span class="keyboard-shortcuts-keys"> ',r=a.each.call(e,e&&e.keys,{hash:{},inverse:v.noop,fn:v.program(3,c,t),data:t}),(r||0===r)&&(s+=r),s+=' </span> <span class="keyboard-shortcuts-label text-muted">'+m(i(n(0)).call(e,e&&e.label,{hash:{},data:t}))+"</span> </li> "}function c(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.plain,{hash:{},
inverse:v.noop,fn:v.program(4,u,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.unless.call(e,e&&e.plain,{hash:{},inverse:v.noop,fn:v.program(6,d,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.split,{hash:{},inverse:v.noop,fn:v.program(8,h,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function u(e,t){var n,i="";return i+=' <span class="keyboard-shortcuts-keys-plain">'+m((n=e&&e.s,typeof n===g?n.apply(e):n))+"</span> "}function d(e,t){var n,i="";return i+=' <span class="keyboard-shortcuts-keys-key">'+m((n=e&&e.s,
typeof n===g?n.apply(e):n))+"</span> "}function h(e,t){return" <br> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g="function",m=this.escapeExpression,v=this;return f+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon keyboard-wireless"></i> '+m(i(n(0)).call(t,"Keyboard Shortcuts",{
hash:{},data:s}))+' </h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',p=a.each.call(t,t&&t.groups,{hash:{},inverse:v.noop,fn:v.program(1,o,s),data:s}),(p||0===p)&&(f+=p),f+=" </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"Internet Required",{hash:{},data:t}))+" "}function l(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"Plex Pass Required",{
hash:{},data:t}))+" "}function c(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"This server cannot reach the Internet. Please verify connectivity and try again.",{hash:{},data:t}))+" "}function u(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"This library requires your server be signed in to a Plex Pass account.",{hash:{},data:t}))+" "}function d(e,t){var a="";return a+=' <button type="button" class="confirm-btn btn btn-lg btn-primary">'+v(i(n(0)).call(e,"OK",{hash:{},data:t}))+"</button> "}function h(e,t){
var n,i="";return i+=' <a class="confirm-btn btn btn-lg btn-primary" href="#!/settings/server/'+v((n=e&&e.serverID,typeof n===y?n.apply(e):n))+'"> ',n=a.if.call(e,e&&e.isSignedIn,{hash:{},inverse:b.program(14,f,t),fn:b.program(12,p,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> "}function p(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"Settings",{hash:{},data:t}))+" "}function f(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"Sign In",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
s=s||{};var g,m="",v=this.escapeExpression,y="function",b=this;return m+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon circle-exclamation-mark"></i> ',g=a.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:b.program(3,l,s),fn:b.program(1,o,s),data:s}),(g||0===g)&&(m+=g),m+=' </h4> </div> <div class="modal-body"> <p class="confirm-message"> ',
g=a.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:b.program(7,u,s),fn:b.program(5,c,s),data:s}),(g||0===g)&&(m+=g),m+=' </p> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+v(i(n(0)).call(t,"Ignore",{hash:{},data:s}))+"</button> ",g=a.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:b.program(11,h,s),fn:b.program(9,d,s),data:s}),(g||0===g)&&(m+=g),m+=" </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hide-streams-column"}function l(e,t){var r,s="";return s+=' <div class="files"> <h4>'+N(i(n(0)).call(e,"Files",{hash:{},data:t}))+"</h4> ",r=a.each.call(e,e&&e.media,{hash:{},inverse:O.noop,fn:O.programWithDepth(4,c,t,e),data:t}),(r||0===r)&&(s+=r),s+=" </div> "}function c(e,t,n){var i,r="";return r+=' <ul class="media-info-file-list well"> ',i=a.if.call(e,n&&n.showDeleteFile,{hash:{},inverse:O.noop,fn:O.program(5,u,t),
data:t}),(i||0===i)&&(r+=i),r+=" ",i=a.each.call(e,e&&e.Part,{hash:{},inverse:O.noop,fn:O.programWithDepth(10,p,t,n),data:t}),(i||0===i)&&(r+=i),r+=" </ul> "}function u(e,t){var a,r="";return r+=' <a href="#" data-media-item="'+N((a=null==t||t===!1?t:t.index,typeof a===_?a.apply(e):a))+'" class="delete-btn text-danger pull-right"> <i class="glyphicon bin"></i> ',a=i(n(19)).call(e,(a=e&&e.Part,null==a||a===!1?a:a.length),"1",{hash:{},inverse:O.program(8,h,t),fn:O.program(6,d,t),data:t}),(a||0===a)&&(r+=a),
r+=" </a> "}function d(e,t){var a="";return a+=" "+N(i(n(0)).call(e,"Delete File",{hash:{},data:t}))+" "}function h(e,t){var a="";return a+=" "+N(i(n(0)).call(e,"Delete Files",{hash:{},data:t}))+" "}function p(e,t,n){var i,r="";return r+=" <li> ",i=a.if.call(e,n&&n.showFilepath,{hash:{},inverse:O.program(13,g,t),fn:O.program(11,f,t),data:t}),(i||0===i)&&(r+=i),r+=" ",i=a.unless.call(e,e&&e.accessible,{hash:{},inverse:O.noop,fn:O.program(15,m,t),data:t}),(i||0===i)&&(r+=i),r+=" </li> "}function f(e,t){
var n,i="";return i+=" "+N((n=e&&e.file,typeof n===_?n.apply(e):n))+" "}function g(e,t){var a="";return a+=" "+N(i(n(1226)).call(e,e&&e.file,{hash:{},data:t}))+" "}function m(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.exists,{hash:{},inverse:O.program(18,y,t),fn:O.program(16,v,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function v(e,t){var a="";return a+=' <span class="label label-danger" data-toggle="tooltip" title="'+N(i(n(0)).call(e,"Please check the permissions for this file.",{hash:{},data:t
}))+'">'+N(i(n(0)).call(e,"Inaccessible",{hash:{},data:t}))+"</span> "}function y(e,t){var a="";return a+=' <span class="label label-danger" data-toggle="tooltip" title="'+N(i(n(0)).call(e,"Please check that this file exists and the necessary drive is mounted.",{hash:{},data:t}))+'">'+N(i(n(0)).call(e,"Unavailable",{hash:{},data:t}))+"</span> "}function b(e,t,r){var s,o="";return o+=' <div class="media"> <div class="props"> <h4>'+N(i(n(0)).call(e,"Media",{hash:{},data:t}))+"</h4> <ul> ",s=a.each.call(e,e&&e.properties,{
hash:{},inverse:O.noop,fn:O.program(21,S,t),data:t}),(s||0===s)&&(o+=s),o+=" </ul> </div> ",s=a.each.call(e,e&&e.Part,{hash:{},inverse:O.noop,fn:O.programWithDepth(23,w,t,r),data:t}),(s||0===s)&&(o+=s),o+=" </div> "}function S(e,t){var a,r="";return r+=' <li> <span class="detail-label">'+N(i(n(0)).call(e,e&&e.name,{hash:{},data:t}))+'</span> <span class="detail">'+N((a=e&&e.value,typeof a===_?a.apply(e):a))+"</span> </li> "}function w(e,t,r){var s,o="";return o+=' <div class="part"> <div class="props"> <h4>'+N(i(n(0)).call(e,"Part",{
hash:{},data:t}))+"</h4> <ul> ",s=a.each.call(e,e&&e.properties,{hash:{},inverse:O.noop,fn:O.program(21,S,t),data:t}),(s||0===s)&&(o+=s),o+=' </ul> </div> <div class="streams"> ',s=a.each.call(e,e&&e.Stream,{hash:{},inverse:O.noop,fn:O.program(24,M,t),data:t}),(s||0===s)&&(o+=s),o+=" ",s=a.if.call(e,r&&r.loading,{hash:{},inverse:O.noop,fn:O.program(33,P,t),data:t}),(s||0===s)&&(o+=s),o+=" </div> </div> "}function M(e,t){var r,s="";return s+=' <div class="props"> ',r=i(n(19)).call(e,e&&e.streamType,"1",{
hash:{},inverse:O.program(27,C,t),fn:O.program(25,I,t),data:t}),(r||0===r)&&(s+=r),s+=" <ul> ",r=a.each.call(e,e&&e.properties,{hash:{},inverse:O.noop,fn:O.program(21,S,t),data:t}),(r||0===r)&&(s+=r),s+=" </ul> </div> "}function I(e,t){var a="";return a+=" <h4>"+N(i(n(0)).call(e,"Video",{hash:{},data:t}))+"</h4> "}function C(e,t){var a;return a=i(n(19)).call(e,e&&e.streamType,"2",{hash:{},inverse:O.program(30,T,t),fn:O.program(28,D,t),data:t}),a||0===a?a:""}function D(e,t){var a="";return a+=" <h4>"+N(i(n(0)).call(e,"Audio",{
hash:{},data:t}))+"</h4> "}function T(e,t){var a;return a=i(n(19)).call(e,e&&e.streamType,"3",{hash:{},inverse:O.noop,fn:O.program(31,x,t),data:t}),a||0===a?a:""}function x(e,t){var a="";return a+=" <h4>"+N(i(n(0)).call(e,"Subtitles",{hash:{},data:t}))+"</h4> "}function P(e,t){var a="";return a+=' <div class="props"> <h4>'+N(i(n(0)).call(e,"Loading",{hash:{},data:t}))+"...</h4> </div> "}function E(e,t,n){var i;return i=a.if.call(e,n&&n.showFilepath,{hash:{},inverse:O.noop,fn:O.program(36,A,t),data:t
}),i||0===i?i:""}function A(e,t){var a,r="";return r+=' <div class="modal-footer"> <div class="pull-left"> <a href="'+N((a=e&&e.url,typeof a===_?a.apply(e):a))+'" target="_blank">'+N(i(n(0)).call(e,"View XML",{hash:{},data:t}))+"</a> </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var L,k="",N=this.escapeExpression,_="function",O=this;return k+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-info"></i> '+N(i(n(0)).call(t,"Media Info",{
hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <div class="position-ref ',L=a.unless.call(t,t&&t.hasStreams,{hash:{},inverse:O.noop,fn:O.program(1,o,s),data:s}),(L||0===L)&&(k+=L),k+='"> ',L=a.if.call(t,t&&t.hasFiles,{hash:{},inverse:O.noop,fn:O.program(3,l,s),data:s}),(L||0===L)&&(k+=L),k+=" ",L=a.each.call(t,t&&t.media,{hash:{},inverse:O.noop,fn:O.programWithDepth(20,b,s,t),data:s}),(L||0===L)&&(k+=L),k+=" </div> </div> ",L=a.if.call(t,t&&t.key,{hash:{},
inverse:O.noop,fn:O.programWithDepth(35,E,s,t),data:s}),(L||0===L)&&(k+=L),k+=" </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+g((n=null==t||t===!1?t:t.index,typeof n===f?n.apply(e):n))+'" href="#"> ',n=a.if.call(e,e&&e.title,{hash:{},inverse:m.noop,fn:m.program(2,l,t),data:t}),
(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.videoResolution,{hash:{},inverse:m.noop,fn:m.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.bitrate,{hash:{},inverse:m.noop,fn:m.program(7,d,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> </li> "}function l(e,t){var n,i="";return i+=" "+g((n=e&&e.title,typeof n===f?n.apply(e):n))+' <span class="title-separator">\u2022</span> '}function c(e,t){var r,s="";return s+=" "+g(i(n(703)).call(e,e&&e.videoResolution,{hash:{},data:t})),r=a.if.call(e,e&&e.bitrate,{
hash:{},inverse:m.noop,fn:m.program(5,u,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function u(e,t){return","}function d(e,t){var a="";return a+=" "+g(i(n(702)).call(e,e&&e.bitrate,0,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f="function",g=this.escapeExpression,m=this;return p+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon adjust-alt"></i> '+g(i(n(0)).call(t,"Select a Version",{
hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',h=a.each.call(t,t&&t.mediaItems,{hash:{},inverse:m.noop,fn:m.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=" </ul> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <p class="text-muted">'+d(i(n(0)).call(e,"Everything you need to experience the best of Plex. Your subscription gives you premium features and exclusive access to new ones.",{
hash:{},data:t}))+"</p> "}function l(e,t){var a="";return a+=' <p class="text-muted">'+d(i(n(0)).call(e,'The server "{1}" has not been claimed. This server must be claimed by an account with a Plex Pass subscription.',e&&e.friendlyName,{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h=this,p="function";return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon circle-arrow-right"></i> '+d(i(n(0)).call(t,"Go Premium",{
hash:{},data:s}))+' </h4> </div> <div class="modal-body"> <p class="text-center"><i class="plex-image plex-pass"></i></p> <h4 class="text-center">'+d(i(n(0)).call(t,"This feature requires a Plex Pass subscription.",{hash:{},data:s}))+"</h4> ",c=a.if.call(t,t&&t.isClaimed,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=' <p class="text-center"> <a class="btn btn-sm btn-primary" href="'+d((c=t&&t.plexPassUrl,typeof c===p?c.apply(t):c))+'" target="_blank">'+d(i(n(0)).call(t,"Learn More",{
hash:{},data:s}))+"</a> </p> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <div class="friends-container"></div> <div class="message-container invisible"> <textarea class="message form-control" placeholder="'+d(i(n(0)).call(e,"Say something about this...",{hash:{},data:t}))+'"></textarea> </div> '}function l(e,t){var a="";return a+=' <div class="empty-message"> '+d(i(n(0)).call(e,"You need {1}friends{2} to recommend media.",'<a class="friends-btn" href="#!/friends">',"</a>",{
hash:{},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h=this;return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon share-alt"></i> '+d(i(n(0)).call(t,"Select Friends",{hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',
c=a.if.call(t,t&&t.hasFriends,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=' </div> <div class="modal-footer"> <span class="characters-remaining"></span> <button type="button" class="send-btn btn btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+d(i(n(0)).call(t,"Send",{hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);
e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression,u="function";return l+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon circle-exclamation-mark"></i> '+c(i(n(0)).call(t,"Limited Connection",{hash:{},data:s
}))+" - "+c((o=t&&t.serverName,typeof o===u?o.apply(t):o))+' </h4> </div> <div class="modal-body"> <p> '+c(i(n(0)).call(t,"You are not connected directly to {1} so streaming quality may be limited. You may be able to connect directly to this server by changing your home network settings. {2}Learn more{3}",t&&t.serverName,'<a href="https://help.plex.tv/relay" target="_blank" class="learn-more">',"</a>",{hash:{},data:s}))+' </p> </div> <div class="modal-footer"> <button type="button" class="confirm-btn btn btn-lg btn-primary">'+c(i(n(0)).call(t,"OK",{
hash:{},data:s}))+"</button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,r){var s,o="";return o+=' <h4 class="update-list-title">'+p(i(n(0)).call(e,"New",{hash:{},data:t}))+"</h4> <ul> ",s=a.each.call(e,r&&r.added,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(s||0===s)&&(o+=s),o+=" </ul> "}function l(e,t){var n="";return n+=" <li>"+p(typeof e===h?e.apply(e):e)+"</li> ";
}function c(e,t,r){var s,o="";return o+=' <h4 class="update-list-title">'+p(i(n(0)).call(e,"Fixes",{hash:{},data:t}))+"</h4> <ul> ",s=a.each.call(e,r&&r.fixed,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(s||0===s)&&(o+=s),o+=" </ul> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h="function",p=this.escapeExpression,f=this;return d+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-info"></i> '+p(i(n(0)).call(t,"Plex Media Server Release Notes",{
hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <span class="text-muted">'+p(i(n(0)).call(t,"Version {1}",t&&t.version,{hash:{},data:s}))+"</span> ",u=a.if.call(t,t&&t.added,{hash:{},inverse:f.noop,fn:f.programWithDepth(1,o,s,t),data:s}),(u||0===u)&&(d+=u),d+=" ",u=a.if.call(t,t&&t.fixed,{hash:{},inverse:f.noop,fn:f.programWithDepth(4,c,s,t),data:s}),(u||0===u)&&(d+=u),d+=" </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+p((n=e&&e.id,typeof n===f?n.apply(e):n))+'" href="#"> ',n=a.if.call(e,e&&e.name,{hash:{},inverse:g.program(4,c,t),fn:g.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.isCloudSync,{hash:{},inverse:g.noop,fn:g.program(6,u,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> </li> "}function l(e,t){var a="";return a+=" "+p(i(n(448)).call(e,e&&e.name,25,{
hash:{},data:t}))+" "}function c(e,t){var a="";return a+=" "+p(i(n(448)).call(e,e&&e.device,25,{hash:{},data:t}))+" "}function u(e,t){return'<i class="cloud-sync-icon glyphicon cloud"></i>'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this.escapeExpression,f="function",g=this;return h+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon iphone"></i> '+p(i(n(0)).call(t,"Choose Destination",{
hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',d=a.each.call(t,t&&t.devices,{hash:{},inverse:g.noop,fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" </ul> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+d((a=null==t||t===!1?t:t.index,
typeof a===u?a.apply(e):a))+'" href="#"> ',a=i(n(1225)).call(e,(a=e&&e.Part,a=null==a||a===!1?a:a[0],null==a||a===!1?a:a.file),35,{hash:{},data:t}),(a||0===a)&&(r+=a),r+=" </a> </li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u="function",d=this.escapeExpression,h=this;return c+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon file"></i> '+d(i(n(0)).call(t,"Select a File",{
hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',l=a.each.call(t,t&&t.medias,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=" </ul> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression,u="function";
return l+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-arrow-right"></i> '+c(i(n(0)).call(t,"Resume",{hash:{},data:s}))+'</h4> </div> <div class="modal-body"> <ul class="list select-list"> <li class="striped-list-item select-list-item"><a class="offset" data-value="'+c((o=t&&t.offset,typeof o===u?o.apply(t):o))+'" href="#">'+c(i(n(0)).call(t,"Resume from {1}",t&&t.formattedOffset,{
hash:{},data:s}))+'</a></li> <li class="striped-list-item select-list-item"><a class="offset" data-value="0" href="#">'+c(i(n(0)).call(t,"Start from beginning",{hash:{},data:s}))+"</a></li> </ul> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <li><a class="btn-gray show-pane-btn type-btn',a=i(n(19)).call(e,e&&e.selectedPane,e&&e.id,{hash:{},inverse:d.noop,
fn:d.program(2,l,t),data:t}),(a||0===a)&&(r+=a),r+='" href="#" data-pane="'+p((a=e&&e.id,typeof a===h?a.apply(e):a))+'">'+p((a=e&&e.name,typeof a===h?a.apply(e):a))+"</a></li> "}function l(e,t){return" selected"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this,h="function",p=this.escapeExpression;return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon plex-icon-plex-chevron"></i> '+p(i(n(0)).call(t,"Plex Media Server Downloads",{
hash:{},data:s}))+' </h4> </div> <div class="modal-body modal-body-scroll modal-body-with-panes"> <div class="modal-nav-pane dark-scrollbar"> <ul class="list modal-nav-list"> ',c=a.each.call(t,t&&t.items,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=' </ul> </div> <div class="modal-body-pane pane-region dark-scrollbar"> </div> </div> <div class="server-download-loading loading loading-inline"></div> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <ul class="list select-list select-networks-list dark-scrollbar"> ',r=a.each.call(e,e&&e.networks,{hash:{},inverse:y.noop,fn:y.programWithDepth(2,l,t,e),data:t}),(r||0===r)&&(s+=r),s+=' </ul> <div class="message-container ',r=a.unless.call(e,e&&e.autoSelect,{hash:{},inverse:y.noop,fn:y.program(10,p,t),data:t}),(r||0===r)&&(s+=r),s+='"> <textarea class="message form-control" placeholder="'+S(i(n(0)).call(e,"Say something about this...",{
hash:{},data:t}))+'"></textarea> </div> '}function l(e,t,r){var s,o="";return o+=' <li class="striped-list-item select-list-item"> <a class="network ',s=a.if.call(e,r&&r.autoSelect,{hash:{},inverse:y.noop,fn:y.program(3,c,t),data:t}),(s||0===s)&&(o+=s),o+='" data-id="'+S((s=e&&e.key,typeof s===b?s.apply(e):s))+'" href="#"> ',s=i(n(19)).call(e,e&&e.key,"facebook",{hash:{},inverse:y.program(7,d,t),fn:y.program(5,u,t),data:t}),(s||0===s)&&(o+=s),o+=" "+S((s=e&&e.title,typeof s===b?s.apply(e):s))+" </a> </li> ";
}function c(e,t){return"selected"}function u(e,t){return' <i class="network-icon glyphicon glyphicon-social facebook"></i> '}function d(e,t){var a,r="";return r+=" ",a=i(n(19)).call(e,e&&e.key,"twitter",{hash:{},inverse:y.noop,fn:y.program(8,h,t),data:t}),(a||0===a)&&(r+=a),r+=" "}function h(e,t){return' <i class="network-icon glyphicon glyphicon-social twitter"></i> '}function p(e,t){return"invisible"}function f(e,t){var a="";return a+=' <div class="empty-message"> '+S(i(n(0)).call(e,"You need to {1}link your account{2}.",'<a href="{3}" target="_blank">',"</a>",e&&e.accountUrl,{
hash:{},data:t}))+" </div> "}function g(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var m,v="",y=this,b="function",S=this.escapeExpression;return v+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon share"></i> '+S(i(n(0)).call(t,"Share",{hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',
m=a.if.call(t,t&&t.networks,{hash:{},inverse:y.program(12,f,s),fn:y.program(1,o,s),data:s}),(m||0===m)&&(v+=m),v+=' </div> <div class="modal-footer"> <span class="characters-remaining"></span> <button type="button" class="share-btn btn btn-primary btn-loading ',m=a.unless.call(t,t&&t.autoSelect,{hash:{},inverse:y.noop,fn:y.program(14,g,s),data:s}),(m||0===m)&&(v+=m),v+='"> <div class="loading loading-sm"></div> <span class="btn-label">'+S(i(n(0)).call(t,"Share",{hash:{},data:s}))+"</span> </button> </div> </div> </div> ";
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <p class="text-muted"><i class="glyphicon warning-sign"></i> '+d((n=e&&e.Status,n=null==n||n===!1?n:n.failure,typeof n===u?n.apply(e):n))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u="function",d=this.escapeExpression,h=this;return c+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon download"></i> '+d(i(n(0)).call(t,"Sync Status",{
hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <h4 class="sync-item-title">'+d((l=t&&t.rootTitle,typeof l===u?l.apply(t):l))+" &middot; "+d((l=t&&t.title,typeof l===u?l.apply(t):l))+"</h4> ",l=a.if.call(t,(l=t&&t.Status,null==l||l===!1?l:l.failure),{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=' <div class="sync-status-list-container"></div> </div> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=" "+h((n=e&&e.status,typeof n===d?n.apply(e):n))+" "}function l(e,t){var a="";return a+=" "+h(i(n(0)).call(e,"There was a problem preparing for optimization.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d="function",h=this.escapeExpression,p=this;return u+='<div class="convert-message-container row"> <div class="col-sm-3 text-center"> <p class="convert-error-icon"><i class="glyphicon circle-exclamation-mark"></i></p> </div> <div class="col-sm-8"> <h4> ',
c=a.if.call(t,t&&t.status,{hash:{},inverse:p.program(3,l,s),fn:p.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=' </h4> <h4><a class="try-again-link" href="#">'+h(i(n(0)).call(t,"Try again",{hash:{},data:s}))+"</a></h4> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"disabled"}function l(e,t){return"selected"}function c(e,t,a){var r,s="";return s+=' <option value="'+p((r=e&&e.id,
typeof r===h?r.apply(e):r))+'" ',r=i(n(19)).call(e,a&&a.selectedLocationID,e&&e.id,{hash:{},inverse:f.noop,fn:f.program(3,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+p(i(n(704)).call(e,e&&e.path,50,20,{hash:{},data:t}))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h="function",p=this.escapeExpression,f=this;return d+='<label class="control-label" for="convert-storage-location">'+p(i(n(0)).call(t,"Version storage location",{hash:{},data:s}))+'</label> <select id="convert-storage-location" class="storage-location-select" name="storageLocation" ',
u=a.if.call(t,t&&t.disableLocation,{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='> <option value="-1" ',u=i(n(19)).call(t,t&&t.selectedLocationID,-1,{hash:{},inverse:f.noop,fn:f.program(3,l,s),data:s}),(u||0===u)&&(d+=u),d+=">"+p(i(n(0)).call(t,"In folders with original items",{hash:{},data:s}))+"</option> ",u=a.each.call(t,t&&t.locations,{hash:{},inverse:f.noop,fn:f.programWithDepth(5,c,s,t),data:s}),(u||0===u)&&(d+=u),d+=' </select> <p class="help-block">'+p(i(n(0)).call(t,'A "Plex Versions" folder will be created in your chosen location.',{
hash:{},data:s}))+"</p> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){return"checked"}function c(e,t){var n,i="";return i+='value="'+v((n=e&&e.policy,n=null==n||n===!1?n:n.value,typeof n===m?n.apply(e):n))+'"'}function u(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.isCloudSync,{hash:{},inverse:y.program(10,h,t),fn:y.program(8,d,t),data:t}),(n||0===n)&&(i+=n),
i+=" "}function d(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"A large number of sync items may be time-consuming to convert, and the time to upload is dependent on your bandwidth. A large number of high quality items may take a very long time. If you have trouble, try reducing the number of items or your quality setting.",{hash:{},data:t}))+" "}function h(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"A large number of sync items may be time-consuming to convert and transfer to your device. If you have trouble, try reducing the number of items.",{
hash:{},data:t}))+" "}function p(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"A large number of items may be time-consuming to convert. If you have trouble, try reducing the number of items.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var f,g="",m="function",v=this.escapeExpression,y=this;return g+='<div class="form-group ',f=a.unless.call(t,t&&t.showUnwatched,{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(f||0===f)&&(g+=f),g+='"> <label class="control-label"> <input type="checkbox" id="convert-policy-unwatched" name="policyUnwatched" ',
f=a.if.call(t,(f=t&&t.policy,null==f||f===!1?f:f.unwatched),{hash:{},inverse:y.noop,fn:y.program(3,l,s),data:s}),(f||0===f)&&(g+=f),g+="> "+v(i(n(0)).call(t,"Unwatched only",{hash:{},data:s}))+' </label> </div> <div class="form-group ',f=a.unless.call(t,t&&t.isDirectory,{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(f||0===f)&&(g+=f),g+='"> <label class="control-label"> <input type="checkbox" id="convert-policy-scope" name="policyScope" value="count" ',f=i(n(19)).call(t,(f=t&&t.policy,null==f||f===!1?f:f.scope),"count",{
hash:{},inverse:y.noop,fn:y.program(3,l,s),data:s}),(f||0===f)&&(g+=f),g+="> "+v(i(n(0)).call(t,"Limit to",{hash:{},data:s}))+' <input type="number" id="convert-policy-value" name="policyValue" class="policy-value-control form-control" ',f=a.if.call(t,(f=t&&t.policy,null==f||f===!1?f:f.value),{hash:{},inverse:y.noop,fn:y.program(5,c,s),data:s}),(f||0===f)&&(g+=f),g+="> "+v(i(n(0)).call(t,"items",{hash:{},data:s}))+' </label> <p class="convert-warning help-block ',f=a.unless.call(t,t&&t.showLimitWarning,{
hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(f||0===f)&&(g+=f),g+='"> <i class="convert-warning-icon glyphicon circle-exclamation-mark"></i> <span class="convert-warning-text"> ',f=a.if.call(t,t&&t.isSync,{hash:{},inverse:y.program(12,p,s),fn:y.program(7,u,s),data:s}),(f||0===f)&&(g+=f),g+=" </span> </p> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"disabled"}function l(e,t,r){
var s,o="";return o+=' <option value="'+g((s=e&&e.id,typeof s===m?s.apply(e):s))+'" ',s=i(n(19)).call(e,(s=r&&r.item,null==s||s===!1?s:s.targetTagID),e&&e.id,{hash:{},inverse:v.noop,fn:v.program(4,c,t),data:t}),(s||0===s)&&(o+=s),o+="> "+g((s=e&&e.tag,typeof s===m?s.apply(e):s)),s=a.if.call(e,(s=e&&e.mediaSettings,null==s||s===!1?s:s.videoResolution),{hash:{},inverse:v.noop,fn:v.program(6,u,t),data:t}),(s||0===s)&&(o+=s),o+=" </option> "}function c(e,t){return"selected"}function u(e,t){var a="";return a+=" - "+g(i(n(153)).call(e,e&&e.mediaSettings,{
hash:{},data:t}))}function d(e,t,a){var r,s="";return s+=' <option value="'+g((r=e&&e.title,typeof r===m?r.apply(e):r))+'" ',r=i(n(19)).call(e,(r=a&&a.selectedProfile,null==r||r===!1?r:r.title),e&&e.title,{hash:{},inverse:v.noop,fn:v.program(4,c,t),data:t}),(r||0===r)&&(s+=r),s+="> "+g((r=e&&e.title,typeof r===m?r.apply(e):r))+" </option> "}function h(e,t,a){var r,s="";return s+=' <option value="'+g((r=e&&e.index,typeof r===m?r.apply(e):r))+'" ',r=i(n(19)).call(e,(r=a&&a.selectedCustomQuality,null==r||r===!1?r:r.index),e&&e.index,{
hash:{},inverse:v.noop,fn:v.program(4,c,t),data:t}),(r||0===r)&&(s+=r),s+="> "+g(i(n(153)).call(e,e,{hash:{},data:t}))+" </option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g=this.escapeExpression,m="function",v=this;return f+='<select class="convert-target-select" name="target" ',p=a.if.call(t,t&&t.disableTarget,{hash:{},inverse:v.noop,fn:v.program(1,o,s),data:s}),(p||0===p)&&(f+=p),f+="> ",p=a.each.call(t,t&&t.targets,{hash:{},inverse:v.noop,fn:v.programWithDepth(3,l,s,t),
data:s}),(p||0===p)&&(f+=p),f+=' <option value="-1" ',p=a.unless.call(t,(p=t&&t.item,null==p||p===!1?p:p.targetTagID),{hash:{},inverse:v.noop,fn:v.program(4,c,s),data:s}),(p||0===p)&&(f+=p),f+=">"+g(i(n(0)).call(t,"Custom",{hash:{},data:s}))+'</option> </select> <div class="convert-custom-target-container"> <input type="text" class="convert-target-title form-control" name="targetTitle" class="form-control" value="'+g((p=t&&t.item,p=null==p||p===!1?p:p.target,typeof p===m?p.apply(t):p))+'" placeholder="'+g(i(n(0)).call(t,"Quality Name",{
hash:{},data:s}))+'"> <select class="convert-target-profile-select" name="targetProfile"> ',p=a.each.call(t,t&&t.profiles,{hash:{},inverse:v.noop,fn:v.programWithDepth(8,d,s,t),data:s}),(p||0===p)&&(f+=p),f+=' </select> <select class="convert-target-quality-select" name="targetQuality"> ',p=a.each.call(t,t&&t.availableCustomQualities,{hash:{},inverse:v.noop,fn:v.programWithDepth(10,h,s,t),data:s}),(p||0===p)&&(f+=p),f+=' </select> </div> <p class="help-block">'+g(i(n(0)).call(t,"Plex will convert your media to this quality. Each version will be stored in a separate file.",{
hash:{},data:s}))+"</p> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){return h(i(n(0)).call(e,"Optimize",{hash:{},data:t}))}function c(e,t){return h(i(n(0)).call(e,"Save",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this.escapeExpression,p=this,f="function";return d+='<form id="convert-form" class="settings-container"> <div class="modal-body"> <div class="form-group ',
u=a.unless.call(t,t&&t.showRemuxOnlyWarning,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='"> <p class="convert-warning help-block"> <i class="convert-warning-icon glyphicon circle-exclamation-mark"></i> <span class="convert-warning-text"> '+h(i(n(0)).call(t,"Video optimization may take a long time to complete on this server. You'll be able to use Plex normally while you wait.",{hash:{},data:s}))+' </span> </p> </div> <div class="form-group"> <label class="control-label" for="convert-title">'+h(i(n(0)).call(t,"Title",{
hash:{},data:s}))+'</label> <input type="text" id="convert-title" name="title" class="form-control" value="'+h((u=t&&t.conversionItem,u=null==u||u===!1?u:u.title,typeof u===f?u.apply(t):u))+'" placeholder="'+h((u=t&&t.conversionItem,u=null==u||u===!1?u:u.title,typeof u===f?u.apply(t):u))+'"> </div> <div class="policy-region"></div> <div class="targets-region"></div> <div class="location-region"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">'+h(i(n(0)).call(t,"Cancel",{
hash:{},data:s}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',u=a.if.call(t,t&&t.isNew,{hash:{},inverse:p.program(5,c,s),fn:p.program(3,l,s),data:s}),(u||0===u)&&(d+=u),d+="</span> </button> </div> </form> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="loading loading-inline"></div> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon restart"></i> '+l(i(n(0)).call(t,"Optimize",{
hash:{},data:s}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="convert-message-container row"> <div class="col-sm-3 text-center"> <p class="convert-success-icon"><i class="glyphicon ok-2"></i></p> </div> <div class="col-sm-8"> <h4>'+l(i(n(0)).call(t,"This media is being converted.",{
hash:{},data:s}))+"</h4> <h4>"+l(i(n(0)).call(t,"Watch the status of the conversion {1}here{2}.",'<a class="status-link" href="#">',"</a>",{hash:{},data:s}))+"</h4> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="convert-message-container row"> <div class="col-sm-3 text-center"> <p class="convert-error-icon"><i class="glyphicon circle-exclamation-mark"></i></p> </div> <div class="col-sm-8"> <h4>'+l(i(n(0)).call(t,"There was a problem syncing this media.",{
hash:{},data:s}))+'</h4> <h4><a class="try-again-link" href="#">'+l(i(n(0)).call(t,"Try again",{hash:{},data:s}))+"</a></h4> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <select class="sync-quality-select" name="videoQuality"> ',n=a.if.call(e,e&&e.supportsOriginalQuality,{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.each.call(e,e&&e.availableVideoQualities,{
hash:{},inverse:v.noop,fn:v.programWithDepth(5,u,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function l(e,t){var a,r="";return r+=' <option value="-1" ',a=i(n(19)).call(e,(a=e&&e.selectedVideoQuality,null==a||a===!1?a:a.index),-1,{hash:{},inverse:v.noop,fn:v.program(3,c,t),data:t}),(a||0===a)&&(r+=a),r+="> "+y(i(n(0)).call(e,"Original",{hash:{},data:t}))+" </option> "}function c(e,t){return"selected"}function u(e,t,a){var r,s="";return s+=' <option value="'+y((r=e&&e.index,typeof r===b?r.apply(e):r))+'" ',
r=i(n(19)).call(e,(r=a&&a.selectedVideoQuality,null==r||r===!1?r:r.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(3,c,t),data:t}),(r||0===r)&&(s+=r),s+="> "+y(i(n(153)).call(e,e,{hash:{},data:t}))+" </option> "}function d(e,t){var n,i="";return i+=' <select class="sync-quality-select" name="musicQuality"> ',n=a.each.call(e,e&&e.availableMusicQualities,{hash:{},inverse:v.noop,fn:v.programWithDepth(8,h,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function h(e,t,a){var r,s="";return s+=' <option value="'+y((r=e&&e.index,
typeof r===b?r.apply(e):r))+'" ',r=i(n(19)).call(e,(r=a&&a.selectedMusicQuality,null==r||r===!1?r:r.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(3,c,t),data:t}),(r||0===r)&&(s+=r),s+="> "+y(i(n(153)).call(e,e,{hash:{},data:t}))+" </option> "}function p(e,t){var n,i="";return i+=' <select class="sync-quality-select" name="photoQuality"> ',n=a.each.call(e,e&&e.availablePhotoQualities,{hash:{},inverse:v.noop,fn:v.programWithDepth(11,f,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function f(e,t,a){
var r,s="";return s+=' <option value="'+y((r=e&&e.index,typeof r===b?r.apply(e):r))+'" ',r=i(n(19)).call(e,(r=a&&a.selectedPhotoQuality,null==r||r===!1?r:r.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(3,c,t),data:t}),(r||0===r)&&(s+=r),s+="> "+y((r=e&&e.title,typeof r===b?r.apply(e):r))+" </option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v=this,y=this.escapeExpression,b="function";return g=i(n(19)).call(t,t&&t.typeElement,"video",{hash:{},inverse:v.noop,
fn:v.program(1,o,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=i(n(19)).call(t,t&&t.typeElement,"audio",{hash:{},inverse:v.noop,fn:v.program(7,d,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=i(n(19)).call(t,t&&t.typeElement,"photo",{hash:{},inverse:v.noop,fn:v.program(10,p,s),data:s}),(g||0===g)&&(m+=g),m+=' <p class="help-block">'+y(i(n(0)).call(t,"Plex will convert your media to this quality and transfer the converted media to your device.",{hash:{},data:s}))+"</p> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return d(i(n(0)).call(e,"Sync",{hash:{},data:t}))}function l(e,t){return d(i(n(0)).call(e,"Save",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h="function",p=this;return u+='<form id="sync-form" class="settings-container"> <div class="modal-body"> <div class="form-group"> <label class="control-label" for="sync-title">'+d(i(n(0)).call(t,"Title",{
hash:{},data:s}))+'</label> <input type="text" id="sync-title" name="title" class="form-control" value="'+d((c=t&&t.syncItem,c=null==c||c===!1?c:c.title,typeof c===h?c.apply(t):c))+'" placeholder="'+d((c=t&&t.syncItem,c=null==c||c===!1?c:c.title,typeof c===h?c.apply(t):c))+'"> </div> <div class="policy-region"></div> <div class="quality-region"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">'+d(i(n(0)).call(t,"Cancel",{hash:{},data:s}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',
c=a.if.call(t,t&&t.isNew,{hash:{},inverse:p.program(3,l,s),fn:p.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+="</span> </button> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon download"></i> '+l(i(n(0)).call(t,"Sync",{
hash:{},data:s}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="convert-message-container row"> <div class="col-sm-3 text-center"> <p class="convert-success-icon"><i class="glyphicon ok-2"></i></p> </div> <div class="col-sm-8"> <h4>'+l(i(n(0)).call(t,"This media is being synced.",{
hash:{},data:s}))+"</h4> <h4>"+l(i(n(0)).call(t,"Watch the status of the sync {1}here{2}.",'<a class="status-link" href="#">',"</a>",{hash:{},data:s}))+"</h4> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon restart"></i> <span class="generator-title"></span></h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <h4> <span class="generator-failure-container pull-right"> <i class="generator-failure-icon glyphicon circle-exclamation-mark text-danger"></i> <span class="generator-failure-message text-muted"></span> </span> <span class="generator-items-count"></span> &middot; <span class="generator-total-size"></span> </h4> <div class="list-region"></div> <div class="list-feedback-container"> <span class="loading hidden"></span> <span class="error-message text-muted hidden"> '+l(i(n(0)).call(t,"There was a problem loading these items.",{
hash:{},data:s}))+" </span> </div> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=" "+y((n=e&&e.title,typeof n===v?n.apply(e):n))+" "}function l(e,t){var a,r="";return r+=" ",a=i(n(19)).call(e,e&&e.type,"home",{hash:{},inverse:b.program(6,u,t),fn:b.program(4,c,t),data:t}),(a||0===a)&&(r+=a),r+=" "}function c(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"Add User",{
hash:{},data:t}))+" "}function u(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"Invite Friend",{hash:{},data:t}))+" "}function d(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"Save Changes",{hash:{},data:t}))+" "}function h(e,t){var a,r="";return r+=" ",a=i(n(19)).call(e,e&&e.type,"home",{hash:{},inverse:b.program(13,f,t),fn:b.program(11,p,t),data:t}),(a||0===a)&&(r+=a),r+=" "}function p(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"Add",{hash:{},data:t}))+" "}function f(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"Invite",{
hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v="function",y=this.escapeExpression,b=this;return m+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <div class="modal-poster media-poster img-circle placeholder-friend"></div> <h4 class="modal-title"> ',g=a.if.call(t,t&&t.title,{hash:{},inverse:b.program(3,l,s),fn:b.program(1,o,s),
data:s}),(g||0===g)&&(m+=g),m+=' </h4> </div> <form id="share-server-form"> <div class="modal-body modal-body-scroll modal-body-with-panes"> <div class="modal-nav-pane dark-scrollbar"></div> <div class="modal-body-pane dark-scrollbar"></div> </div> <div class="modal-footer"> <span class="form-message"></span> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+y(i(n(0)).call(t,"Cancel",{hash:{},data:s}))+'</button> <button type="submit" class="next-btn btn btn-lg btn-primary disabled">'+y(i(n(0)).call(t,"Next",{
hash:{},data:s}))+'</button> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading hidden"> <div class="loading loading-sm"></div> <span class="btn-label"> ',g=a.if.call(t,t&&t.title,{hash:{},inverse:b.program(10,h,s),fn:b.program(8,d,s),data:s}),(g||0===g)&&(m+=g),m+=" </span> </button> </div> </form> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";
return r+=' <div class="restricted-name-group form-group"> <input type="text" id="restricted-title" name="title" class="form-control" placeholder="'+M(i(n(0)).call(e,"Name",{hash:{},data:t}))+'" value="'+M((a=e&&e.homeUser,a=null==a||a===!1?a:a.title,typeof a===I?a.apply(e):a))+'"> </div> '}function l(e,t){var n,i="";return i+=' <h3 class="friend-title"> ',n=a.if.call(e,(n=e&&e.friend,null==n||n===!1?n:n.title),{hash:{},inverse:C.program(6,u,t),fn:C.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+=' </h3> <p class="text-muted"> ',
n=a.if.call(e,(n=e&&e.friend,null==n||n===!1?n:n.email),{hash:{},inverse:C.program(10,h,t),fn:C.program(8,d,t),data:t}),(n||0===n)&&(i+=n),i+=" </p> "}function c(e,t){var n,i="";return i+=" "+M((n=e&&e.friend,n=null==n||n===!1?n:n.title,typeof n===I?n.apply(e):n))+" "}function u(e,t){var n,i="";return i+=" "+M((n=e&&e.friend,n=null==n||n===!1?n:n.username,typeof n===I?n.apply(e):n))+" "}function d(e,t){var n,i="";return i+=" "+M((n=e&&e.friend,n=null==n||n===!1?n:n.email,typeof n===I?n.apply(e):n))+" ";
}function h(e,t){var a="";return a+=" "+M(i(n(0)).call(e,"An invite will be sent to this user.",{hash:{},data:t}))+" "}function p(e,t){var n,i="";return i+=' <div class="edit-friend-footer"> ',n=a.if.call(e,(n=e&&e.homeUser,null==n||n===!1?n:n.restricted),{hash:{},inverse:C.program(18,v,t),fn:C.program(13,f,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> "}function f(e,t){var n,i="";return i+=" ",n=a.if.call(e,(n=e&&e.homeUser,null==n||n===!1?n:n.guest),{hash:{},inverse:C.program(16,m,t),fn:C.program(14,g,t),
data:t}),(n||0===n)&&(i+=n),i+=" "}function g(e,t){var a="";return a+=' <button type="button" class="disable-guest-btn btn btn-sm btn-danger">'+M(i(n(0)).call(e,"Disable guest",{hash:{},data:t}))+"</button> "}function m(e,t){var a="";return a+=' <button type="button" class="remove-home-btn btn btn-sm btn-danger">'+M(i(n(0)).call(e,"Delete user",{hash:{},data:t}))+"</button> "}function v(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.canRemoveFriend,{hash:{},inverse:C.noop,fn:C.program(19,y,t),data:t
}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.canRemoveHomeUser,{hash:{},inverse:C.noop,fn:C.program(21,b,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function y(e,t){var a="";return a+=' <button type="button" class="remove-friend-btn btn btn-sm btn-danger">'+M(i(n(0)).call(e,"Remove this friend",{hash:{},data:t}))+"</button> "}function b(e,t){var a="";return a+=' <button type="button" class="remove-home-btn btn btn-sm btn-danger">'+M(i(n(0)).call(e,"Remove from home",{hash:{},data:t}))+"</button> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var S,w="",M=this.escapeExpression,I="function",C=this;return w+='<div class="edit-friend-header"> <div class="media-poster img-circle placeholder-friend"></div> ',S=a.if.call(t,(S=t&&t.homeUser,null==S||S===!1?S:S.restricted),{hash:{},inverse:C.program(3,l,s),fn:C.program(1,o,s),data:s}),(S||0===S)&&(w+=S),w+=" </div> ",S=a.if.call(t,t&&t.showActions,{hash:{},inverse:C.noop,fn:C.program(12,p,s),data:s}),(S||0===S)&&(w+=S),w+=" "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<li> <a class="btn-gray change-pane-btn disabled" data-pane="general" data-pane-id="general" href="#"> <i class="modal-nav-icon glyphicon user"></i> '+l(i(n(0)).call(t,"General",{hash:{},data:s}))+' </a> </li> <li class="owned-list-header modal-nav-list-header">'+l(i(n(0)).call(t,"My Servers",{
hash:{},data:s}))+'</li> <li class="owned-servers-container"></li> <li> <a class="btn-gray change-pane-btn disabled" data-pane="restrictions" data-pane-id="restrictions" href="#"> <i class="modal-nav-icon glyphicon ban"></i> '+l(i(n(0)).call(t,"Restrictions",{hash:{},data:s}))+' </a> </li> <li class="shared-list-header modal-nav-list-header">'+l(i(n(0)).call(t,"Shared With Me",{hash:{},data:s}))+'</li> <li class="shared-servers-container"></li> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<span class="modal-nav-icon friend-server-status ',(s=n.status)?r=s.call(t,{hash:{},data:a}):(s=t&&t.status,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+'"> <i class="friend-server-status-icon unknown glyphicon circle-question-mark"></i> <i class="friend-server-status-icon available glyphicon circle-ok"></i> <i class="friend-server-status-icon unavailable glyphicon circle-exclamation-mark"></i> </span> '+c((r=t&&t.server,
r=null==r||r===!1?r:r.name,typeof r===l?r.apply(t):r))+" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="server-header"> <i class="plex-image server server-xs"></i> <h3 class="server-title"></h3> <a class="server-status-btn unknown" href="#"> <span class="server-status-label available">'+l(i(n(0)).call(t,"Available",{
hash:{},data:s}))+'</span> <span class="server-status-label unavailable">'+l(i(n(0)).call(t,"Unavailable",{hash:{},data:s}))+'</span> <span class="server-status-label unauthorized">'+l(i(n(0)).call(t,"Unauthorized",{hash:{},data:s}))+'</span> <span class="server-status-label unknown">'+l(i(n(0)).call(t,"Unknown",{hash:{},data:s}))+'</span> <i class="server-details-open-icon glyphicon chevron-down"></i> <i class="server-details-close-icon glyphicon chevron-up"></i> </a> </div> <div class="server-details transition-out"> <h4>'+l(i(n(0)).call(t,"Info",{
hash:{},data:s}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Version",{hash:{},data:s}))+'</div> <div class="server-detail-value server-detail-version"></div> </div> <div class="server-detail-row server-detail-last-seen-row hidden"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Last Seen",{hash:{},data:s}))+'</div> <div class="server-detail-value server-detail-last-seen"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Address",{
hash:{},data:s}))+'</div> <div class="server-detail-value server-detail-address"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Port",{hash:{},data:s}))+'</div> <div class="server-detail-value server-detail-port"></div> </div> </div> <div class="share-details"> <h4>'+l(i(n(0)).call(t,"Share",{hash:{},data:s}))+"</h4> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
function o(e,t){var r,s="";return s+=' <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <div class="checkbox"> <label for="allow-channels-cb"> <input type="checkbox" id="allow-channels-cb" name="allowChannels" ',r=a.if.call(e,(r=e&&e.user,null==r||r===!1?r:r.allowChannels),{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+p(i(n(0)).call(e,"Allow Channels",{hash:{},data:t}))+' </label> </div> </div> </div> <div class="row"> <h4 class="text-muted plex-pass-restrictions-header"> <span class="plex-pass-restrictions-title">'+p(i(n(0)).call(e,"Plex Pass restrictions",{
hash:{},data:t}))+'</span> <a href="'+p((r=e&&e.plexPassUrl,typeof r===f?r.apply(e):r))+'" target="_blank">'+p(i(n(0)).call(e,"Learn More",{hash:{},data:t}))+'</a> </h4> <p class="text-center"> </p> </div> '}function l(e,t){return"checked"}function c(e,t){var r,s="";return s+=' <div class="checkbox"> <label for="allow-channels-cb"> <input type="checkbox" id="allow-channels-cb" name="allowChannels" ',r=a.if.call(e,(r=e&&e.user,null==r||r===!1?r:r.allowChannels),{hash:{},inverse:h.noop,fn:h.program(2,l,t),
data:t}),(r||0===r)&&(s+=r),s+="> "+p(i(n(0)).call(e,"Allow Channels",{hash:{},data:t}))+" </label> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this,p=this.escapeExpression,f="function";return u=a.unless.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+=' <div class="plex-pass-restrictions"> <div class="overlay"></div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <div class="checkbox"> <label for="allow-sync-cb"> <input type="checkbox" id="allow-sync-cb" name="allowSync" ',
u=a.if.call(t,(u=t&&t.user,null==u||u===!1?u:u.allowSync),{hash:{},inverse:h.noop,fn:h.program(2,l,s),data:s}),(u||0===u)&&(d+=u),d+="> "+p(i(n(0)).call(t,"Allow Sync",{hash:{},data:s}))+' </label> </div> <div class="checkbox"> <label for="allow-camera-upload-images-cb"> <input type="checkbox" id="allow-camera-upload-images-cb" name="allowCameraUpload" ',u=a.if.call(t,(u=t&&t.user,null==u||u===!1?u:u.allowCameraUpload),{hash:{},inverse:h.noop,fn:h.program(2,l,s),data:s}),(u||0===u)&&(d+=u),d+="> "+p(i(n(0)).call(t,"Allow Camera Upload",{
hash:{},data:s}))+' </label> <p class="help-block">'+p(i(n(0)).call(t,"Enabling this option will allow this user to upload media to your server.",{hash:{},data:s}))+"</p> </div> ",u=a.if.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:h.noop,fn:h.program(4,c,s),data:s}),(u||0===u)&&(d+=u),d+=' </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+p((u=t&&t.moviesIcon,typeof u===f?u.apply(t):u))+'"></i> '+p(i(n(0)).call(t,"Movies",{
hash:{},data:s}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+p(i(n(0)).call(t,"Only allow movies matching the ratings or labels below.",{hash:{},data:s}))+' </div> </div> <div class="form-group"> <label for="filter-movie-contentRating" class="col-sm-3 control-label"> '+p(i(n(0)).call(t,"Ratings",{hash:{},data:s}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-movie-contentRating" class="form-control tag-input-hidden" name="filterMovies" data-filter="contentRating" data-section-type="movie" placeholder="'+p(i(n(0)).call(t,"Allow all ratings",{
hash:{},data:s}))+'" value="'+p((u=t&&t.user,u=null==u||u===!1?u:u.filterMovies,u=null==u||u===!1?u:u.contentRating,typeof u===f?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label for="filter-movie-label" class="col-sm-3 control-label"> '+p(i(n(0)).call(t,"Labels",{hash:{},data:s}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-movie-label" class="form-control tag-input-hidden" name="filterMovies" data-filter="label" data-section-type="movie" placeholder="'+p(i(n(0)).call(t,"Allow all labels",{
hash:{},data:s}))+'" value="'+p((u=t&&t.user,u=null==u||u===!1?u:u.filterMovies,u=null==u||u===!1?u:u.label,typeof u===f?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+p((u=t&&t.showsIcon,typeof u===f?u.apply(t):u))+'"></i> '+p(i(n(0)).call(t,"TV Shows",{hash:{},data:s}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+p(i(n(0)).call(t,"Only allow TV shows matching the ratings or labels below.",{
hash:{},data:s}))+' </div> </div> <div class="form-group"> <label for="filter-show-contentRating" class="col-sm-3 control-label"> '+p(i(n(0)).call(t,"Ratings",{hash:{},data:s}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-show-contentRating" class="form-control tag-input-hidden" name="filterTelevision" data-filter="contentRating" data-section-type="show" placeholder="'+p(i(n(0)).call(t,"Allow all ratings",{hash:{},data:s}))+'" value="'+p((u=t&&t.user,u=null==u||u===!1?u:u.filterTelevision,
u=null==u||u===!1?u:u.contentRating,typeof u===f?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label for="filter-show-label" class="col-sm-3 control-label"> '+p(i(n(0)).call(t,"Labels",{hash:{},data:s}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-show-label" class="form-control tag-input-hidden" name="filterTelevision" data-filter="label" data-section-type="show" placeholder="'+p(i(n(0)).call(t,"Allow all labels",{hash:{},data:s}))+'" value="'+p((u=t&&t.user,u=null==u||u===!1?u:u.filterTelevision,
u=null==u||u===!1?u:u.label,typeof u===f?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+p((u=t&&t.musicIcon,typeof u===f?u.apply(t):u))+'"></i> '+p(i(n(0)).call(t,"Albums",{hash:{},data:s}))+' </label> </div> <div class="form-group"> <label for="filter-artist-label" class="col-sm-3 control-label"> '+p(i(n(0)).call(t,"Labels",{hash:{},data:s}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-artist-label" class="form-control tag-input-hidden" name="filterMusic" data-filter="label" data-section-type="artist" placeholder="'+p(i(n(0)).call(t,"Allow all labels",{
hash:{},data:s}))+'" value="'+p((u=t&&t.user,u=null==u||u===!1?u:u.filterMusic,u=null==u||u===!1?u:u.label,typeof u===f?u.apply(t):u))+'"> </div> </div> </div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"checked"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o,l="",c="function",u=this.escapeExpression,d=this;return l+='<div class="checkbox"> <label for="share-section-'+u((s=t&&t.section,s=null==s||s===!1?s:s.id,
typeof s===c?s.apply(t):s))+'-cb"> <input type="checkbox" id="share-section-'+u((s=t&&t.section,s=null==s||s===!1?s:s.id,typeof s===c?s.apply(t):s))+'-cb" value="'+u((s=t&&t.section,s=null==s||s===!1?s:s.id,typeof s===c?s.apply(t):s))+'" ',s=n.if.call(t,t&&t.isChecked,{hash:{},inverse:d.noop,fn:d.program(1,r,a),data:a}),(s||0===s)&&(l+=s),l+='> <i class="section-type-icon glyphicon ',(o=n.typeIcon)?s=o.call(t,{hash:{},data:a}):(o=t&&t.typeIcon,s=typeof o===c?o.call(t,{hash:{},data:a}):o),l+=u(s)+'"></i> '+u((s=t&&t.section,
s=null==s||s===!1?s:s.title,typeof s===c?s.apply(t):s))+" </label> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"show-libraries"}function l(e,t){var r,s="";return s+=' <li class="share-section-list-item"> <div class="checkbox"> <label for="share-all-libraries-'+y((r=e&&e.server,r=null==r||r===!1?r:r.machineIdentifier,typeof r===v?r.apply(e):r))+'-cb"> <input type="checkbox" id="share-all-libraries-'+y((r=e&&e.server,
r=null==r||r===!1?r:r.machineIdentifier,typeof r===v?r.apply(e):r))+'-cb" name="share-all-libraries-cb" value="all" ',r=a.if.call(e,e&&e.allLibraries,{hash:{},inverse:b.noop,fn:b.program(4,c,t),data:t}),(r||0===r)&&(s+=r),s+="> "+y(i(n(0)).call(e,"All Libraries",{hash:{},data:t}))+" </label> </div> </li> "}function c(e,t){return"checked"}function u(e,t){var a="";return a+=' <p class="text-muted">'+y(i(n(0)).call(e,"Loading...",{hash:{},data:t}))+"</p> "}function d(e,t){var n;return n=a.if.call(e,e&&e.hasFailed,{
hash:{},inverse:b.program(11,p,t),fn:b.program(9,h,t),data:t}),n||0===n?n:""}function h(e,t){var a,r="";return r+=' <p class="text-muted">'+y(i(n(0)).call(e,"We were unable to retrieve libraries for {1}. Please ensure the server is signed in to your Plex account.",(a=e&&e.server,null==a||a===!1?a:a.name),{hash:{},data:t}))+"</p> "}function p(e,t){var n;return n=a.unless.call(e,e&&e.hasSections,{hash:{},inverse:b.noop,fn:b.program(12,f,t),data:t}),n||0===n?n:""}function f(e,t){var a="";return a+=' <p class="text-muted">'+y(i(n(0)).call(e,"No libraries",{
hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v="function",y=this.escapeExpression,b=this;return m+='<ul id="'+y((g=t&&t.server,g=null==g||g===!1?g:g.machineIdentifier,typeof g===v?g.apply(t):g))+'-section-list" class="list share-section-list ',g=a.unless.call(t,t&&t.allLibraries,{hash:{},inverse:b.noop,fn:b.program(1,o,s),data:s}),(g||0===g)&&(m+=g),m+='"> ',g=a.if.call(t,t&&t.hasSections,{hash:{},inverse:b.noop,fn:b.program(3,l,s),data:s
}),(g||0===g)&&(m+=g),m+=" </ul> ",g=a.if.call(t,t&&t.isPending,{hash:{},inverse:b.program(8,d,s),fn:b.program(6,u,s),data:s}),(g||0===g)&&(m+=g),m+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="server-header"> <i class="plex-image server server-xs"></i> <h3 class="server-title"></h3> <a class="server-status-btn unknown" href="#"> <span class="server-status-label available">'+l(i(n(0)).call(t,"Available",{
hash:{},data:s}))+'</span> <span class="server-status-label unavailable">'+l(i(n(0)).call(t,"Unavailable",{hash:{},data:s}))+'</span> <span class="server-status-label unauthorized">'+l(i(n(0)).call(t,"Unauthorized",{hash:{},data:s}))+'</span> <span class="server-status-label unknown">'+l(i(n(0)).call(t,"Unknown",{hash:{},data:s}))+'</span> <i class="server-details-open-icon glyphicon chevron-down"></i> <i class="server-details-close-icon glyphicon chevron-up"></i> </a> </div> <div class="server-details transition-out"> <h4>'+l(i(n(0)).call(t,"Info",{
hash:{},data:s}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Version",{hash:{},data:s}))+'</div> <div class="server-detail-value server-detail-version"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Last Seen",{hash:{},data:s}))+'</div> <div class="server-detail-value server-detail-last-seen"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Address",{
hash:{},data:s}))+'</div> <div class="server-detail-value server-detail-address"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Port",{hash:{},data:s}))+'</div> <div class="server-detail-value server-detail-port"></div> </div> </div> <div class="share-details"> <h4>'+l(i(n(0)).call(t,"Sharing",{hash:{},data:s}))+'</h4> <div class="share-server-container"> <div class="server-restriction-allow-sync share-section-list-item no-checkbox"> <i class="section-type-icon glyphicon ok-2"></i> '+l(i(n(0)).call(t,"Sync Allowed",{
hash:{},data:s}))+' </div> <ul class="list share-section-list show-libraries"></ul> </div> </div> <div class="share-details-footer"> <button type="button" class="leave-server-btn btn btn-sm btn-danger">'+l(i(n(0)).call(t,"Leave Server",{hash:{},data:s}))+"</button> </div> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<li class="share-section-list-item no-checkbox"> <i class="section-type-icon glyphicon ',
(s=n.typeIcon)?r=s.call(t,{hash:{},data:a}):(s=t&&t.typeIcon,r=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=c(r)+'"></i> '+c((r=t&&t.section,r=null==r||r===!1?r:r.title,typeof r===l?r.apply(t):r))+" </li> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <div class="existing-user-group username-group"> <div class="media-poster img-circle placeholder-square"></div> <div class="username-group-input-container"> <i class="validation-success-icon glyphicon circle-ok"></i> <i class="validation-error-icon glyphicon circle-exclamation-mark"></i> <input type="text" class="form-control hidden" name="username" placeholder="'+d(i(n(0)).call(e,"Username or email",{
hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <button type="button" class="add-existing-user-btn btn btn-primary">'+d(i(n(0)).call(e,"Add an Existing Plex User",{hash:{},data:t}))+'</button> <p class="help-block">'+d(i(n(0)).call(e,"Adding a Plex user to your home will allow you to quickly switch accounts. The invited user will be asked to confirm home membership.",{hash:{},data:t}))+'</p> </div> </div> <div class="restricted-user-group username-group"> <div class="media-poster img-circle placeholder-friend"></div> <div class="username-group-input-container"> <input type="text" class="form-control hidden" name="title" placeholder="'+d(i(n(0)).call(e,"Name",{
hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <button type="button" class="add-restricted-user-btn btn btn-primary">'+d(i(n(0)).call(e,"Create a Managed User",{hash:{},data:t}))+'</button> <p class="help-block">'+d(i(n(0)).call(e,"Managed users are only available when signed in with an account in your home. You can choose any name you like and you'll be able to set restrictions on accessible media.",{hash:{},data:t}))+"</p> </div> </div> "}function l(e,t){var a="";return a+=' <div class="friend-group username-group"> <div class="media-poster img-circle placeholder-friend"></div> <div class="username-group-input-container"> <i class="validation-success-icon glyphicon circle-ok"></i> <i class="validation-error-icon glyphicon circle-exclamation-mark"></i> <input type="text" class="form-control" name="username" placeholder="'+d(i(n(0)).call(e,"Username or email",{
hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <p class="help-block">'+d(i(n(0)).call(e,"The invited user will be asked to confirm friendship. If libraries are shared with the user, you'll be able to set restrictions on accessible media.",{hash:{},data:t}))+"</p> </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h=this;return c=i(n(19)).call(t,t&&t.type,"home",{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s
}),(c||0===c)&&(u+=c),u+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-info"></i> '+l(i(n(0)).call(t,"Welcome to Plex Home",{
hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <p>'+l(i(n(0)).call(t,"{1}, so we've made a few changes to help keep your media safe.",t&&t.intro,{hash:{},data:s}))+"</p> <ol> <li>"+l(i(n(0)).call(t,"We've increased the security requirements on this server, so anything communicating with it will need to be signed in to a Plex account.",{hash:{},data:s}))+"</li> <li>"+l(i(n(0)).call(t,"We've disabled DLNA to prevent any DLNA-enabled device from browsing and playing media without a password or PIN. You can change this preference in your {1}server settings{2}.",'<a class="server-settings-btn" href="#">',"</a>",{
hash:{},data:s}))+"</li> </ol> <p>"+l(i(n(0)).call(t,"For more information on Plex Home security settings, please see the {1}Plex Home section{2} on our support site.",'<a href="https://support.plex.tv/hc/en-us/sections/200641063" target="_blank">',"</a>",{hash:{},data:s}))+'</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-lg btn-primary" data-dismiss="modal">'+l(i(n(0)).call(t,"OK",{hash:{},data:s}))+"</button> </div> </div> </div> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="modal-dialog"> <div class="modal-alert"></div> <div class="modal-content"></div> </div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l="function",c=this.escapeExpression;return o+='<span class="message">',(s=n.message)?r=s.call(t,{hash:{},data:a}):(s=t&&t.message,r=typeof s===l?s.call(t,{hash:{},
data:a}):s),o+=c(r)+"</span> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return' <a class="back-btn btn-gray" href="#"><i class="glyphicon chevron-left"></i></a> '}function l(e,t){var a="";return a+=' <i class="modal-icon glyphicon pencil"></i> '+b(i(n(0)).call(e,"Edit PIN",{hash:{},data:t}))+" "}function c(e,t){var n;return n=a.if.call(e,e&&e.isEditConfirmation,{hash:{},inverse:S.program(8,d,t),
fn:S.program(6,u,t),data:t}),n||0===n?n:""}function u(e,t){var a="";return a+=" "+b(i(n(0)).call(e,"Confirm Current PIN",{hash:{},data:t}))+" "}function d(e,t){var a="";return a+=" "+b(i(n(0)).call(e,"Enter PIN",{hash:{},data:t}))+" "}function h(e,t){var a="";return a+=' <p class="help-block"> '+b(i(n(0)).call(e,"You do not currently have a PIN. This will allow any users in this home to switch to your account.",{hash:{},data:t}))+" </p> "}function p(e,t){var r,s="";return s+=' <div class="modal-footer"> ',
r=a.if.call(e,e&&e.hasCurrentPIN,{hash:{},inverse:S.noop,fn:S.program(13,f,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,e&&e.isEditWarning,{hash:{},inverse:S.program(17,m,t),fn:S.program(15,g,t),data:t}),(r||0===r)&&(s+=r),s+=' <button type="submit" class="save-btn btn-link">'+b(i(n(0)).call(e,"Save",{hash:{},data:t}))+"</button> </div> "}function f(e,t){var a="";return a+=' <button type="button" class="remove-btn btn-gray pull-left">'+b(i(n(0)).call(e,"Remove",{hash:{},data:t}))+"</button> ";
}function g(e,t){var a="";return a+=' <button type="button" class="skip-btn btn-gray" data-dismiss="modal">'+b(i(n(0)).call(e,"Skip",{hash:{},data:t}))+"</button> "}function m(e,t){var a="";return a+=' <button type="button" class="cancel-btn btn-gray" data-dismiss="modal">'+b(i(n(0)).call(e,"Cancel",{hash:{},data:t}))+"</button> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var v,y="",b=this.escapeExpression,S=this;return y+='<div class="modal-header"> <div class="home-user-dropdown-container pull-right"></div> <h4 class="modal-title"> ',
v=a.if.call(t,t&&t.showBackButton,{hash:{},inverse:S.noop,fn:S.program(1,o,s),data:s}),(v||0===v)&&(y+=v),y+=" ",v=a.if.call(t,t&&t.isEditing,{hash:{},inverse:S.program(5,c,s),fn:S.program(3,l,s),data:s}),(v||0===v)&&(y+=v),y+=' <span class="loading loading-sm hidden"></span> </h4> </div> <form id="pin-form"> <div class="modal-body"> <ul class="tile-list user-select-list disabled"></ul> <input type="number" pattern="[0-9]*" class="pin-input"> <div class="pin-digit-container" aria-hidden="true"> <div class="pin-digit"></div> <div class="pin-digit"></div> <div class="pin-digit"></div> <div class="pin-digit"></div> </div> ',
v=a.if.call(t,t&&t.isEditWarning,{hash:{},inverse:S.noop,fn:S.program(10,h,s),data:s}),(v||0===v)&&(y+=v),y+=" </div> ",v=a.if.call(t,t&&t.isEditing,{hash:{},inverse:S.noop,fn:S.program(12,p,s),data:s}),(v||0===v)&&(y+=v),y+=" </form> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return' <div class="user-select-container"> '}function s(e,t){return' <a class="user-select-container" href="#"> '}function o(e,t){return" </div> "}function l(e,t){
return" </a> "}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var c,u="",d=this;return c=n.if.call(t,t&&t.disabled,{hash:{},inverse:d.program(3,s,a),fn:d.program(1,r,a),data:a}),(c||0===c)&&(u+=c),u+=' <div class="user-select-top"> <div class="user-poster img-circle"></div> <i class="protected-icon user-icon glyphicon lock"></i> <i class="admin-icon user-icon glyphicon crown"></i> </div> <div class="username"></div> ',c=n.if.call(t,t&&t.disabled,{hash:{},inverse:d.program(7,l,a),
fn:d.program(5,o,a),data:a}),(c||0===c)&&(u+=c),u+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="modal-header"> <h4 class="modal-title"> '+l(i(n(0)).call(t,"Select User",{hash:{},data:s}))+' <span class="loading loading-sm"></span> </h4> </div> <div class="modal-body"></div> '})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){var r,s="";return s+=' <li><a class="exit-fullscreen-btn ',r=a.unless.call(e,e&&e.isFullscreen,{hash:{},inverse:h.noop,fn:h.program(1,o,t),data:t}),(r||0===r)&&(s+=r),s+='" href="#" title="'+p(i(n(0)).call(e,"Exit Full Screen",{hash:{},data:t}))+'" data-toggle="tooltip"><i class="plex-icon-tv-mode-exit-560"></i></a></li> <li><a class="tv-mode-btn ',
r=a.unless.call(e,e&&e.isOnDashboard,{hash:{},inverse:h.noop,fn:h.program(1,o,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,e&&e.isFullscreen,{hash:{},inverse:h.noop,fn:h.program(1,o,t),data:t}),(r||0===r)&&(s+=r),s+='" href="#" title="'+p(i(n(0)).call(e,"Enter TV Full Screen",{hash:{},data:t}))+'" data-toggle="tooltip"><i class="plex-icon-tv-mode-enter-560"></i></a></li> '}function c(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this,p=this.escapeExpression,f="function";
return d+='<ul class="nav nav-bar-nav"> <li><a class="back-btn ',u=a.unless.call(t,t&&t.hasHistory,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='" href="#"><i class="glyphicon chevron-left"></i></a></li> <li><a class="home-btn" href="#"><i class="glyphicon home"></i></a></li> </ul> <div class="nav-bar-search-container"></div> <ul class="nav nav-bar-nav nav-bar-right"> <li><a class="plex-pass-btn ',u=a.unless.call(t,t&&t.canGoPremium,{hash:{},inverse:h.noop,fn:h.program(1,o,s),
data:s}),(u||0===u)&&(d+=u),d+='" href="#"><span class="plex-pass-label label label-primary">'+p(i(n(0)).call(t,"Go Premium",{hash:{},data:s}))+"</span></a></li> ",u=a.if.call(t,t&&t.isKonvergo,{hash:{},inverse:h.noop,fn:h.program(3,l,s),data:s}),(u||0===u)&&(d+=u),d+=' <li class="',u=a.if.call(t,t&&t.activityCount,{hash:{},inverse:h.noop,fn:h.program(5,c,s),data:s}),(u||0===u)&&(d+=u),d+='"><a class="activity-btn ',u=a.unless.call(t,t&&t.showActivity,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s
}),(u||0===u)&&(d+=u),d+='" href="#!/status" title="'+p(i(n(0)).call(t,"Status",{hash:{},data:s}))+'" data-toggle="tooltip"><span class="activity-badge badge badge-transparent ',u=a.unless.call(t,t&&t.activityCount,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='">'+p((u=t&&t.activityCount,typeof u===f?u.apply(t):u))+'</span><i class="glyphicon cardio"></i></a></li> <li><a class="settings-btn" href="#!/settings" title="'+p(i(n(0)).call(t,"Settings",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon settings"></i></a></li> </ul> <div class="modal-container"></div> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){return"signed-in"}function c(e,t){return"full-user"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this,p="function",f=this.escapeExpression;return d+='<a class="dropdown-toggle dropdown-poster-toggle" href="#nav-dropdown" data-toggle="dropdown"> <div class="dropdown-poster-container"> <div class="media-poster img-circle"></div> <i class="caret-icon"></i> </div> <span class="total-badge badge ',
u=a.unless.call(t,t&&t.totalCount,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='">'+f((u=t&&t.totalCount,typeof u===p?u.apply(t):u))+'</span> </a> <ul class="dropdown-menu ',u=a.if.call(t,t&&t.signedIn,{hash:{},inverse:h.noop,fn:h.program(3,l,s),data:s}),(u||0===u)&&(d+=u),d+=" ",u=a.if.call(t,t&&t.isFullUser,{hash:{},inverse:h.noop,fn:h.program(5,c,s),data:s}),(u||0===u)&&(d+=u),d+='"> <li class="signed-in-item dropdown-header username-header"></li> <li class="signed-in-item full-user-item"><a href="#!/account">'+f(i(n(0)).call(t,"Account",{
hash:{},data:s}))+'</a></li> <li class="signed-in-item"><a class="users-btn" href="#">'+f(i(n(0)).call(t,"Users",{hash:{},data:s}))+' <span class="invites-badge badge ',u=a.unless.call(t,t&&t.invitesCount,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='">'+f((u=t&&t.invitesCount,typeof u===p?u.apply(t):u))+'</span></a></li> <li class="signed-in-item full-user-item divider"></li> <li class="signed-in-item full-user-item"><a href="#!/playlist/queue">'+f(i(n(0)).call(t,"Watch Later",{
hash:{},data:s}))+'</a></li> <li class="signed-in-item full-user-item"><a href="#!/playlist/recommendations">'+f(i(n(0)).call(t,"Recommended",{hash:{},data:s}))+'</a></li> <li class="signed-in-item divider"></li> <li class="announcements-item ',u=a.if.call(t,t&&t.isRestricted,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='"><a href="#!/announcements">'+f(i(n(0)).call(t,"Announcements",{hash:{},data:s}))+' <span class="announcements-badge badge ',u=a.unless.call(t,t&&t.unreadAnnouncementsCount,{
hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='">'+f((u=t&&t.unreadAnnouncementsCount,typeof u===p?u.apply(t):u))+'</span></a></li> <li><a href="'+f((u=t&&t.appsUrl,typeof u===p?u.apply(t):u))+'" target="_blank">'+f(i(n(0)).call(t,"Get Plex apps",{hash:{},data:s}))+'</a></li> <li><a href="'+f((u=t&&t.helpUrl,typeof u===p?u.apply(t):u))+'" target="_blank">'+f(i(n(0)).call(t,"Help",{hash:{},data:s}))+'</a></li> <li class="divider"></li> <li class="signed-in-item switch-user-item ',
u=a.unless.call(t,t&&t.home,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='"><a class="switch-user-btn" href="#">'+f(i(n(0)).call(t,"Switch User...",{hash:{},data:s}))+'</a></li> <li class="signed-out-item"><a class="sign-in-btn" href="#">'+f(i(n(0)).call(t,"Sign In",{hash:{},data:s}))+'</a></li> <li class="signed-in-item full-user-item"><a class="sign-out-btn" href="#">'+f(i(n(0)).call(t,"Sign Out",{hash:{},data:s}))+"</a></li> </ul> "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+='data-scope-to-attr="'+d((n=e&&e.scopeToAttr,typeof n===u?n.apply(e):n))+'" data-scope-to-param="'+d((n=e&&e.scopeToParam,typeof n===u?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u="function",d=this.escapeExpression,h=this;return c+='<div class="form-group" data-attr="'+d((l=t&&t.name,typeof l===u?l.apply(t):l))+'"> <label for="text-'+d((l=t&&t.name,
typeof l===u?l.apply(t):l))+'" class="control-label">'+d(i(n(0)).call(t,t&&t.label,{hash:{},data:s}))+'<span class="control-error"></span></label> <div class="input-group selectize-group"> <input type="text" id="text-'+d((l=t&&t.name,typeof l===u?l.apply(t):l))+'" class="form-control text-field" name="'+d((l=t&&t.name,typeof l===u?l.apply(t):l))+'" placeholder="'+d((l=t&&t.placeholder,typeof l===u?l.apply(t):l))+'" data-rating-key="'+d((l=t&&t.ratingKey,typeof l===u?l.apply(t):l))+'" data-title="'+d((l=t&&t.title,
typeof l===u?l.apply(t):l))+'" ',l=a.if.call(t,t&&t.scopeToAttr,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+="> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <h4 class="server-connect-error-header">'+f(i(n(0)).call(e,"Problem Connecting to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+f(i(n(0)).call(e,"Plex was unable to authenticate your server. Please sign your server out and try again.",{
hash:{},data:t}))+"</p> "}function l(e,t){var a,r="";return a=i(n(19)).call(e,e&&e.mappingError,"myplexgone",{hash:{},inverse:g.program(6,u,t),fn:g.program(4,c,t),data:t}),(a||0===a)&&(r+=a),r+=" "}function c(e,t){var a="";return a+=' <h4 class="server-connect-error-header">'+f(i(n(0)).call(e,"Problem Connecting to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+f(i(n(0)).call(e,"Your server was unable to reach Plex. Please ensure that the computer or device running your server can access the internet.",{
hash:{},data:t}))+"</p> "}function u(e,t){var a="";return a+=' <h4 class="server-connect-error-header">'+f(i(n(0)).call(e,"Signed in to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+f(i(n(0)).call(e,"You have successfully signed your server in to Plex, but we were unable to reach it from outside your network.",{hash:{},data:t}))+"</p> "}function d(e,t){var a="";return a+=' <p class="text-muted">'+f(i(n(0)).call(e,"If you skip this step you will not be able to share or stream media outside your home. If you change your mind later, you can adjust this in Settings.",{
hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f=this.escapeExpression,g=this;return h=i(n(19)).call(t,t&&t.mappingError,"badauth",{hash:{},inverse:g.program(3,l,s),fn:g.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=" ",h=i(n(64)).call(t,t&&t.context,"settings",{hash:{},inverse:g.noop,fn:g.program(8,d,s),data:s}),(h||0===h)&&(p+=h),p+=' <p class="text-muted">'+f(i(n(0)).call(t,"If you would like to enable this now, you will need to configure your router or firewall to allow Plex to contact your server. Please refer to our {1}Connecting a Server{2} article for more information.",'<a href="http://support.plex.tv/hc/en-us/articles/200484543-Connecting-a-Server" target="_blank">',"</a>",{
hash:{},data:s}))+"</p> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"locked"}function l(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d="function",h=this.escapeExpression,p=this;return u+='<div class="form-group"> <label for="lockable-'+h((c=t&&t.name,typeof c===d?c.apply(t):c))+'">'+h(i(n(0)).call(t,t&&t.label,{hash:{},data:s}))+'</label> <div class="input-group"> <a href="#" data-field="'+h((c=t&&t.name,
typeof c===d?c.apply(t):c))+'" class="input-group-addon edit-lock-addon ',c=a.if.call(t,t&&t.locked,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=" ",c=a.if.call(t,t&&t.disabled,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+='" tabindex="-1"><i class="glyphicon lock"></i></a> <input type="number" id="lockable-'+h((c=t&&t.name,typeof c===d?c.apply(t):c))+'" class="form-control lockable-field" name="'+h((c=t&&t.name,typeof c===d?c.apply(t):c))+'" value="'+h((c=t&&t.value,
typeof c===d?c.apply(t):c))+'" placeholder="'+h((c=t&&t.placeholder,typeof c===d?c.apply(t):c))+'" ',c=a.if.call(t,t&&t.disabled,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+="> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return" locked"}function l(e,t){var n,i="";return i+='data-query="'+h((n=e&&e.query,typeof n===d?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var c,u="",d="function",h=this.escapeExpression,p=this;return u+='<div class="form-group"> <label for="lockable-'+h((c=t&&t.name,typeof c===d?c.apply(t):c))+'">'+h(i(n(0)).call(t,t&&t.label,{hash:{},data:s}))+'</label> <div class="input-group selectize-group"> <a href="#" data-field="'+h((c=t&&t.name,typeof c===d?c.apply(t):c))+'" class="input-group-addon edit-lock-addon',c=a.if.call(t,t&&t.locked,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(u+=c),
u+='"><i class="glyphicon lock"></i></a> <input type="text" id="lockable-'+h((c=t&&t.name,typeof c===d?c.apply(t):c))+'" class="form-control lockable-field tag-input-hidden" data-name="'+h((c=t&&t.name,typeof c===d?c.apply(t):c))+'" data-attr="'+h((c=t&&t.attribute,typeof c===d?c.apply(t):c))+'" ',c=a.if.call(t,t&&t.query,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+="> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
function o(e,t){return" locked"}function l(e,t){var n,i="";return i+=' <textarea class="form-control lockable-field" id="lockable-'+m((n=e&&e.name,typeof n===g?n.apply(e):n))+'" name="'+m((n=e&&e.name,typeof n===g?n.apply(e):n))+'"',n=a.if.call(e,e&&e.rows,{hash:{},inverse:v.noop,fn:v.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+=' placeholder="'+m((n=e&&e.placeholder,typeof n===g?n.apply(e):n))+'">'+m((n=e&&e.value,typeof n===g?n.apply(e):n))+"</textarea> "}function c(e,t){var n,i="";return i+=' rows="'+m((n=e&&e.rows,
typeof n===g?n.apply(e):n))+'"'}function u(e,t){var n,i="";return i+=' <input type="text" id="lockable-'+m((n=e&&e.name,typeof n===g?n.apply(e):n))+'" class="form-control lockable-field" name="'+m((n=e&&e.name,typeof n===g?n.apply(e):n))+'" value="'+m((n=e&&e.value,typeof n===g?n.apply(e):n))+'" placeholder="'+m((n=e&&e.placeholder,typeof n===g?n.apply(e):n))+'" ',n=a.if.call(e,e&&e.scopeToAttr,{hash:{},inverse:v.noop,fn:v.program(7,d,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.ratingKey,{
hash:{},inverse:v.noop,fn:v.program(9,h,t),data:t}),(n||0===n)&&(i+=n),i+="> "}function d(e,t){var n,i="";return i+='data-scope-to-attr="'+m((n=e&&e.scopeToAttr,typeof n===g?n.apply(e):n))+'" data-scope-to-param="'+m((n=e&&e.scopeToParam,typeof n===g?n.apply(e):n))+'"'}function h(e,t){var n,i="";return i+='data-rating-key="'+m((n=e&&e.ratingKey,typeof n===g?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g="function",m=this.escapeExpression,v=this;return f+='<div class="form-group selectize-group" data-attr="'+m((p=t&&t.name,
typeof p===g?p.apply(t):p))+'"> <label for="lockable-'+m((p=t&&t.name,typeof p===g?p.apply(t):p))+'">'+m(i(n(0)).call(t,t&&t.label,{hash:{},data:s}))+'</label> <div class="input-group"> <a href="#" data-field="'+m((p=t&&t.name,typeof p===g?p.apply(t):p))+'" class="input-group-addon edit-lock-addon',p=a.if.call(t,t&&t.locked,{hash:{},inverse:v.noop,fn:v.program(1,o,s),data:s}),(p||0===p)&&(f+=p),f+='" tabindex="-1"><i class="glyphicon lock"></i></a> ',p=i(n(19)).call(t,t&&t.type,"textarea",{hash:{},
inverse:v.program(6,u,s),fn:v.program(3,l,s),data:s}),(p||0===p)&&(f+=p),f+=" </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"advanced-setting"}function l(e,t){var r,s="";return s+=' <label class="control-label" for="input_'+w((r=e&&e.id,typeof r===M?r.apply(e):r))+w((r=e&&e.idSuffix,typeof r===M?r.apply(e):r))+'"> <input type="checkbox" id="input_'+w((r=e&&e.id,typeof r===M?r.apply(e):r))+w((r=e&&e.idSuffix,
typeof r===M?r.apply(e):r))+'" name="'+w((r=e&&e.id,typeof r===M?r.apply(e):r))+'" value="1" ',r=a.if.call(e,e&&e.value,{hash:{},inverse:I.noop,fn:I.program(4,c,t),data:t}),(r||0===r)&&(s+=r),s+="> "+w(i(n(0)).call(e,e&&e.label,{hash:{},data:t}))+" </label> ",r=a.if.call(e,e&&e.summary,{hash:{},inverse:I.noop,fn:I.program(6,u,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function c(e,t){return"checked"}function u(e,t){var a="";return a+=' <p class="help-block">'+w(i(n(0)).call(e,e&&e.summary,{hash:{},data:t
}))+"</p> "}function d(e,t){var r,s="";return s+=' <label class="control-label" for="input_'+w((r=e&&e.id,typeof r===M?r.apply(e):r))+w((r=e&&e.idSuffix,typeof r===M?r.apply(e):r))+'">'+w(i(n(0)).call(e,e&&e.label,{hash:{},data:t}))+"</label> ",r=a.if.call(e,e&&e.enumValues,{hash:{},inverse:I.program(13,g,t),fn:I.program(9,h,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,e&&e.summary,{hash:{},inverse:I.noop,fn:I.program(6,u,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function h(e,t){var n,i="";return i+=' <select id="input_'+w((n=e&&e.id,
typeof n===M?n.apply(e):n))+w((n=e&&e.idSuffix,typeof n===M?n.apply(e):n))+'" name="'+w((n=e&&e.id,typeof n===M?n.apply(e):n))+'"> ',n=a.each.call(e,e&&e.enumValues,{hash:{},inverse:I.noop,fn:I.programWithDepth(10,p,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function p(e,t,a){var r,s="";return s+=' <option value="'+w((r=e&&e.value,typeof r===M?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.value,a&&a.value,{hash:{},inverse:I.noop,fn:I.program(11,f,t),data:t}),(r||0===r)&&(s+=r),s+=">"+w(i(n(0)).call(e,e&&e.label,{
hash:{},data:t}))+"</option> "}function f(e,t){return'selected="selected"'}function g(e,t){var r,s="";return s+=' <input type="',r=i(n(19)).call(e,e&&e.option,"hidden",{hash:{},inverse:I.program(16,v,t),fn:I.program(14,m,t),data:t}),(r||0===r)&&(s+=r),s+='" id="input_'+w((r=e&&e.id,typeof r===M?r.apply(e):r))+w((r=e&&e.idSuffix,typeof r===M?r.apply(e):r))+'" class="form-control" name="'+w((r=e&&e.id,typeof r===M?r.apply(e):r))+'" value="'+w((r=e&&e.value,typeof r===M?r.apply(e):r))+'" ',r=a.if.call(e,e&&e.placeholder,{
hash:{},inverse:I.noop,fn:I.program(18,y,t),data:t}),(r||0===r)&&(s+=r),s+="> "}function m(e,t){return"password"}function v(e,t){return"text"}function y(e,t){var n,i="";return i+='placeholder="'+w((n=e&&e.placeholder,typeof n===M?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var b,S="",w=this.escapeExpression,M="function",I=this;return S+='<div class="form-group ',b=a.if.call(t,t&&t.advanced,{hash:{},inverse:I.noop,fn:I.program(1,o,s),data:s}),(b||0===b)&&(S+=b),
S+='"> ',b=i(n(19)).call(t,t&&t.type,"bool",{hash:{},inverse:I.program(8,d,s),fn:I.program(3,l,s),data:s}),(b||0===b)&&(S+=b),S+=" </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <textarea class="form-control text-field" id="text-'+f((n=e&&e.name,typeof n===p?n.apply(e):n))+'" name="'+f((n=e&&e.name,typeof n===p?n.apply(e):n))+'"',n=a.if.call(e,e&&e.rows,{hash:{},
inverse:g.noop,fn:g.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=' placeholder="'+f((n=e&&e.placeholder,typeof n===p?n.apply(e):n))+'">'+f((n=e&&e.value,typeof n===p?n.apply(e):n))+"</textarea> "}function l(e,t){var n,i="";return i+=' rows="'+f((n=e&&e.rows,typeof n===p?n.apply(e):n))+'"'}function c(e,t){var n,i="";return i+=' <input type="text" id="text-'+f((n=e&&e.name,typeof n===p?n.apply(e):n))+'" class="form-control text-field" name="'+f((n=e&&e.name,typeof n===p?n.apply(e):n))+'" value="'+f((n=e&&e.value,
typeof n===p?n.apply(e):n))+'" placeholder="'+f((n=e&&e.placeholder,typeof n===p?n.apply(e):n))+'" ',n=a.if.call(e,e&&e.excludeParam,{hash:{},inverse:g.noop,fn:g.program(5,u,t),data:t}),(n||0===n)&&(i+=n),i+="> "}function u(e,t){var n,i="";return i+='data-exclude-param="'+f((n=e&&e.excludeParam,typeof n===p?n.apply(e):n))+'" data-exclude-value="'+f((n=e&&e.excludeValue,typeof n===p?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p="function",f=this.escapeExpression,g=this;
return h+='<div class="form-group"> <label for="text-'+f((d=t&&t.name,typeof d===p?d.apply(t):d))+'">'+f(i(n(0)).call(t,t&&t.label,{hash:{},data:s}))+"</label> ",d=i(n(19)).call(t,t&&t.type,"textarea",{hash:{},inverse:g.program(4,c,s),fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" </div> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="mini-controls"> <div class="loading loading-inline"></div> </div> ';
})},function(e,t){e.exports=function(){return""}},function(e,t){e.exports=function(){return""}},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression,u="function";return l+='<div class="post-play-background background"></div> <div class="post-play-footer"> <div class="item-previous"> <div class="item-poster"> <h1>'+c(i(n(0)).call(t,"Previous",{
hash:{},data:s}))+'</h1> <a class="media-poster-container replay-btn play-btn" href="#"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon refresh"></i> </div> </div> </a> </div> <div class="item-summary"> <h1 class="media-title">'+c((o=t&&t.previous,o=null==o||o===!1?o:o.title,typeof o===u?o.apply(t):o))+'</h1> <h2 class="media-subtitle-1">',o=t&&t.previous,o=null==o||o===!1?o:o.subtitle,o=typeof o===u?o.apply(t):o,
(o||0===o)&&(l+=o),l+='</h2> </div> </div> <div class="item-next"> <div class="item-poster"> <h1>'+c(i(n(0)).call(t,"Playing Next",{hash:{},data:s}))+'</h1> <a class="media-poster-container next-btn play-btn" href="#"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="countdown"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </a> </div> <div class="item-summary"> <h1 class="media-title">'+c((o=t&&t.next,
o=null==o||o===!1?o:o.title,typeof o===u?o.apply(t):o))+'</h1> <h2 class="media-subtitle-1">'+c((o=t&&t.next,o=null==o||o===!1?o:o.subtitle,typeof o===u?o.apply(t):o))+'</h2> <h3 class="media-subtitle-2">',o=t&&t.next,o=null==o||o===!1?o:o.index,o=typeof o===u?o.apply(t):o,(o||0===o)&&(l+=o),l+="</h3> <p>"+c((o=t&&t.next,o=null==o||o===!1?o:o.summary,typeof o===u?o.apply(t):o))+"</p> </div> </div> </div> "})},function(e,t){e.exports=function(){return""}},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="video-container"> <div class="video-controls-container"></div> <div class="video-post-play-container"></div> <div class="video-details-container"></div> </div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="mini-controls"> <div class="seek-bar-container"></div> <div class="mini-controls-left"> <a class="media-poster-container" href="#"><div class="media-poster"></div></a> </div> <div class="mini-player-scrub-preview persistent-tooltip top fade"> <div class="tooltip-arrow"></div> <div class="tooltip-inner"></div> </div> <div class="mini-controls-right"> <div class="mini-controls-below-track-segment media-title"> <div class="grandparent-title-container"> <button class="grandparent-title btn-link btn-metadata-link"></button> </div> <div class="title-container"> <button class="item-title btn-link btn-metadata-link"></button> </div> </div> <div class="mini-controls-below-track-segment mini-controls-numeric-progress"> <span class="player-position"></span><span class="separator"></span><span class="player-duration"></span> </div> <div class="mini-controls-below-track-segment"> <button class="previous-btn btn-link"><i class="glyphicon fast-backward"></i></button> <button class="play-btn btn-link btn-link-lg hidden"><i class="glyphicon play"></i></button> <button class="pause-btn btn-link btn-link-lg hidden"><i class="glyphicon pause"></i></button> <button class="stop-btn btn-link btn-link-lg hidden"><i class="glyphicon stop"></i></button> <button class="next-btn btn-link"><i class="glyphicon fast-forward"></i></button> <span id="player-actions-dropdown" class="dropup"> <button class="more-btn btn-link dropdown-toggle" href="#player-actions-dropdown" data-toggle="dropdown"><i class="glyphicon more"></i></button> </span> </div> <div class="mini-controls-below-track-segment player-dropdowns-container rating-container"> </div> <div class="mini-controls-below-track-segment ancillary-btns"> <span class="player-lyrics-container"></span> <button class="shuffle-btn btn-link"><i class="plex-icon-osd-shuffle"></i></button> <button class="repeat-btn btn-link"> <i class="repeat-one plex-icon-osd-repeat-one"></i> <i class="repeat plex-icon-osd-repeat"></i> </button> </div> <div class="mini-controls-below-track-segment"> <button class="volume-btn btn-link hidden"> <i class="glyphicon volume-up"></i> <i class="glyphicon volume-down"></i> <i class="glyphicon mute"></i> </button> <span class="player-volume-slider-container"></span> <button class="enter-fullscreen-btn fullscreen-btn btn-link hidden"><i class="glyphicon resize-full"></i></button> <button class="exit-fullscreen-btn fullscreen-btn btn-link hidden"><i class="glyphicon resize-small"></i></button> <button class="maximize-btn btn-link"><i class="glyphicon chevron-up"></i></button> <span class="player-play-queue-container"></span> </div> </div> </div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="player-slider-track"> <div class="player-slider-buffer"></div> <div class="player-slider-progress"></div> </div> <div class="player-slider-thumb"></div> '})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="player-slider-track"> <div class="player-slider-progress"></div> </div> <div class="player-slider-thumb"></div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<img class="player-scrub-preview-thumbnail hidden"> <div class="tooltip top player-scrub-preview-tooltip"> <div class="tooltip-inner player-scrub-preview-time"></div> <div class="tooltip-arrow"></div> </div>'})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return' <video id="html-video" class="html-video"></video> <div class="video-subtitles-container"></div> <div class="flash-video-background"></div> <div class="flash-video"> <div id="flash-video-placeholder"></div> </div> ';
}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o="",l=this;return o+='<div class="video-background"> <div class="video-background-image"></div> </div> ',s=n.if.call(t,t&&t.showVideoElements,{hash:{},inverse:l.noop,fn:l.program(1,r,a),data:a}),(s||0===s)&&(o+=s),o+=' <div class="video-image-overlays-region"></div> <div class="video-loading loading loading-inline"></div> <div class="alert-player alert-paused"><i class="glyphicon play"></i></div> <button class="video-overlay-btn"></button> <button class="player-close-btn btn-gray"><i class="glyphicon remove-2"></i></button> <div class="video-error-message-container"> <div class="video-error-message-center"> <div class="video-error-message"></div> <div class="video-error-skip-message btn-link"></div> </div> </div> <div class="video-controls-overlay video-controls-overlay-top"> <div class="video-controls-left"> <span class="video-title"></span> </div> <div class="player-dropdowns-container video-controls-right"> <button class="player-close-btn btn-link"><i class="glyphicon remove-2"></i></button> <button class="btn-link share-btn pull-left"><i class="glyphicon share"></i></button> <button class="btn-link recommend-btn pull-left"><i class="glyphicon share-alt"></i></button> </div> </div> <div class="player-primary-player-name-container"> <span class="primary-player-name"></span> </div> <div class="player-scrub-preview-container"></div> <div class="video-controls-overlay video-controls-overlay-bottom"> <div class="video-controls-left"> <button class="previous-btn btn-link hidden"><i class="glyphicon fast-backward"></i></button> <button class="play-btn btn-link hidden"><i class="glyphicon play"></i></button> <button class="pause-btn btn-link hidden"><i class="glyphicon pause"></i></button> <button class="next-btn btn-link hidden"><i class="glyphicon fast-forward"></i></button> </div> <div class="player-dropups-container video-controls-right"> <button class="volume-btn btn-link btn-link-lg hidden"> <i class="glyphicon volume-up"></i> <i class="glyphicon volume-down"></i> <i class="glyphicon mute"></i> </button> <div class="player-volume-slider-container"></div> <button class="enter-fullscreen-btn fullscreen-btn btn-link hidden"><i class="glyphicon resize-full"></i></button> <button class="exit-fullscreen-btn fullscreen-btn btn-link hidden"><i class="glyphicon resize-small"></i></button> <button class="minimize-btn btn-link"><i class="glyphicon chevron-down"></i></button> </div> <div class="video-controls-center-wrapper"> <div class="video-controls-center"> <span class="player-position"></span> <div class="seek-bar-container"></div> <span class="player-duration"></span> </div> </div> </div> <div class="video-player-poster media-poster"></div> <div class="video-alert-region"></div> ';
})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){var i,a="";return a+=' <button class="btn-link dropdown-toggle ',i=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:h.noop,fn:h.program(2,s,t),data:t}),(i||0===i)&&(a+=i),a+='" href="#player-primary-player-dropdown" data-toggle="dropdown"> <i class="',i=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:h.program(6,l,t),fn:h.program(4,o,t),data:t}),(i||0===i)&&(a+=i),a+='"></i> </button> '}function s(e,t){
return"active"}function o(e,t){return"plex-icon-companion-cast-active"}function l(e,t){return"plex-icon-companion-cast"}function c(e,t){var i,a="";return a+=' <button class="btn-link cast-btn ',i=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:h.noop,fn:h.program(2,s,t),data:t}),(i||0===i)&&(a+=i),a+="\" href='#'> <i class=\"",i=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:h.program(6,l,t),fn:h.program(4,o,t),data:t}),(i||0===i)&&(a+=i),a+='"></i> </button> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
a=a||{};var u,d="",h=this;return u=n.if.call(t,t&&t.showDropdown,{hash:{},inverse:h.program(8,c,a),fn:h.program(1,r,a),data:a}),(u||0===u)&&(d+=u),d+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <li> <a class="',r=a.unless.call(e,e&&e.hasSelectedQuality,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='" data-index="-1" href="#"> '+p(i(n(0)).call(e,"Original",{
hash:{},data:t}))+' <i class="player-dropdown-selected-icon selected-icon glyphicon ok-2"></i> </a> </li> '}function l(e,t){return"selected"}function c(e,t){var r,s="";return s+=' <li> <a class="',r=a.if.call(e,e&&e.selected,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='" data-index="'+p((r=e&&e.index,typeof r===f?r.apply(e):r))+'" href="#"> '+p(i(n(153)).call(e,e,{hash:{},data:t}))+' <i class="player-dropdown-selected-icon dropdown-selected-icon glyphicon ok-2"></i> </a> </li> ';
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this,p=this.escapeExpression,f="function";return d+='<button class="btn-link dropdown-toggle" href="#player-quality-dropdown" data-toggle="dropdown"> <i class="glyphicon adjust-alt"></i> </button> <ul class="dropdown-menu pull-right"> ',u=a.if.call(t,t&&t.includeOriginal,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+=" ",u=a.each.call(t,t&&t.availableQualities,{hash:{},inverse:h.noop,fn:h.program(4,c,s),
data:s}),(u||0===u)&&(d+=u),d+=" </ul> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"plex-icon-audio"}function l(e,t){return"plex-icon-subtitles-alt"}function c(e,t,r){var s,o="";return o+=' <li><a class="',s=a.if.call(e,e&&e.selected,{hash:{},inverse:M.noop,fn:M.program(6,u,t),data:t}),(s||0===s)&&(o+=s),o+='" data-id="'+w((s=e&&e.id,typeof s===S?s.apply(e):s))+'" href="#">',s=a.if.call(e,e&&e.language,{
hash:{},inverse:M.program(10,h,t),fn:M.program(8,d,t),data:t}),(s||0===s)&&(o+=s),s=i(n(19)).call(e,r&&r.type,"subtitles",{hash:{},inverse:M.noop,fn:M.program(12,p,t),data:t}),(s||0===s)&&(o+=s),s=i(n(19)).call(e,r&&r.type,"audio",{hash:{},inverse:M.noop,fn:M.program(16,m,t),data:t}),(s||0===s)&&(o+=s),o+=' <i class="player-dropdown-selected-icon dropdown-selected-icon glyphicon ok-2"></i></a></li> '}function u(e,t){return"selected"}function d(e,t){var n;return w((n=e&&e.language,typeof n===S?n.apply(e):n));
}function h(e,t){return w(i(n(0)).call(e,"Unknown",{hash:{},data:t}))}function p(e,t){var n;return n=a.if.call(e,e&&e.format,{hash:{},inverse:M.noop,fn:M.program(13,f,t),data:t}),n||0===n?n:""}function f(e,t){var r,s="";return s+=" ("+w(i(n(1224)).call(e,e&&e.format,{hash:{},data:t})),r=a.if.call(e,e&&e.forced,{hash:{},inverse:M.noop,fn:M.program(14,g,t),data:t}),(r||0===r)&&(s+=r),s+=")"}function g(e,t){var a="";return a+=" "+w(i(n(0)).call(e,"Forced",{hash:{},data:t}))}function m(e,t){var n;return n=a.if.call(e,e&&e.codec,{
hash:{},inverse:M.noop,fn:M.program(17,v,t),data:t}),n||0===n?n:""}function v(e,t){var a="";return a+=" ("+w(i(n(1223)).call(e,e&&e.codec,{hash:{},data:t}))+" "+w(i(n(1222)).call(e,e&&e.channels,{hash:{},data:t}))+")"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var y,b="",S="function",w=this.escapeExpression,M=this;return b+='<button class="btn-link dropdown-toggle" href="#player-'+w((y=t&&t.type,typeof y===S?y.apply(t):y))+'-dropdown" data-toggle="dropdown"> <i class="',y=i(n(19)).call(t,t&&t.type,"audio",{
hash:{},inverse:M.program(3,l,s),fn:M.program(1,o,s),data:s}),(y||0===y)&&(b+=y),b+='"></i> </button> <ul class="dropdown-menu pull-right"> ',y=a.each.call(t,t&&t.streams,{hash:{},inverse:M.noop,fn:M.programWithDepth(5,c,s,t),data:s}),(y||0===y)&&(b+=y),b+=" </ul> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return' <span class="smart-badge badge badge-round"> <i class="icon glyphicon cogwheel"></i> </span> '}this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),a=a||{};var s,o,l="",c="function",u=this.escapeExpression,d=this;return l+='<a class="media-poster-container" href="',(o=n.url)?s=o.call(t,{hash:{},data:a}):(o=t&&t.url,s=typeof o===c?o.call(t,{hash:{},data:a}):o),l+=u(s)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> ',s=n.if.call(t,t&&t.smart,{hash:{},inverse:d.noop,fn:d.program(1,r,a),data:a}),(s||0===s)&&(l+=s),l+=' <div class="media-poster-actions"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> </div> <div class="media-subtitle-1-fill media-heading playlist-title"></div> <div class="media-subtitle-2-fill media-heading secondary playlist-duration"></div> </a> <div class="media-actions-dropdown playlist-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t){e.exports=function(){return""}},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+u(i(n(0)).call(e,"Click {1}here{2} to add content to the library.",'<a href="#" class="add-to-library-link">',"</a>",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this.escapeExpression,d=this;return c+='<div class="section-loading-container hidden"> <div class="loading loading-inline"></div> </div> <h4 class="empty-message text-muted text-center"> <span class="empty-default"> '+u(i(n(0)).call(t,"The library has no content yet.",{
hash:{},data:s}))+" ",l=a.if.call(t,t&&t.canEdit,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=' </span> <span class="empty-refreshing"> '+u(i(n(0)).call(t,"The library is still being refreshed. Hang on while we look for your content.",{hash:{},data:s}))+' </span> <span class="empty-filter"> '+u(i(n(0)).call(t,"There is no content matching your active filter.",{hash:{},data:s}))+' </span> <span class="empty-folder"> '+u(i(n(0)).call(t,"There is no content in the selected folder.",{
hash:{},data:s}))+" </span> </h4> "})},function(e,t){e.exports=function(){return""}},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c="function",u=this.escapeExpression;return l+='<form class="edit-section-advanced-form settings-container"> <div class="language-group"> <input type="hidden" name="language" value="'+u((o=t&&t.section,o=null==o||o===!1?o:o.language,
typeof o===c?o.apply(t):o))+'"> </div> <div class="row"> <div class="col-md-12 section-settings-region"></div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group scanner-group hidden"> <label for="edit-section-scanner" class="control-label"> '+u(i(n(0)).call(t,"Scanner",{hash:{},data:s}))+' <span class="control-error">'+u(i(n(0)).call(t,"A scanner is required.",{hash:{},data:s}))+'</span> </label> <select id="edit-section-scanner" name="scanner"></select> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group agent-group hidden"> <label for="edit-section-agent" class="control-label"> '+u(i(n(0)).call(t,"Agent",{
hash:{},data:s}))+' <span class="control-error">'+u(i(n(0)).call(t,"An agent is required.",{hash:{},data:s}))+'</span> </label> <select id="edit-section-agent" name="agent"></select> </div> </div> </div> <div class="row"> <div class="col-md-12 section-agent-settings-region"></div> </div> </form> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
s=s||{};var l,c="",u=this.escapeExpression,d=this;return c+='<form class="edit-section-folders-form settings-container"> <label> '+u(i(n(0)).call(t,"Add folders to your library",{hash:{},data:s}))+' </label> <div class="form-group Location-group"> <div class="paths-region"></div> <p class="add-folder-container"> <span class="add-folder-populating loading ',l=a.unless.call(t,t&&t.isPersonalCloudServerDriveCachePending,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+='"></span> <span class="add-folder-populating ',
l=a.unless.call(t,t&&t.isPersonalCloudServerDriveCachePending,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+='"> '+u(i(n(0)).call(t,"Plex Cloud is searching for folders",{hash:{},data:s}))+' </span> <span class="add-folder-error hidden"> '+u(i(n(0)).call(t,"Plex Cloud took too long finding folders. Please try again.",{hash:{},data:s}))+' </span> <button type="button" class="add-folder-btn btn btn-icon-label btn-default ',l=a.if.call(t,t&&t.isPersonalCloudServerDriveCachePending,{
hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+='"> <i class="glyphicon folder-plus"></i> '+u(i(n(0)).call(t,"Browse for media folder",{hash:{},data:s}))+' </button> </p> <p class="control-error">'+u(i(n(0)).call(t,"At least one folder is required.",{hash:{},data:s}))+'</p> </div> <p class="help-block">'+u(i(n(0)).call(t,"Help us out by following {1}our guide{2} to naming and organizing your media.",'<a href="http://support.plex.tv/hc/en-us/categories/200028098-Media-Preparation" target="_blank">',"</a>",{
hash:{},data:s}))+"</p> </form> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="section-options" />'})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){var i,a,r="";return r+=' <input type="text" name="path" class="form-control" value="',(a=n.path)?i=a.call(e,{hash:{},data:t}):(a=e&&e.path,i=typeof a===c?a.call(e,{hash:{},data:t
}):a),r+=u(i)+'"> '}function s(e,t){var i,a,r="";return r+=' <span class="form-static-value">',(a=n.path)?i=a.call(e,{hash:{},data:t}):(a=e&&e.path,i=typeof a===c?a.call(e,{hash:{},data:t}):a),r+=u(i)+'<input type="hidden" name="path" value="',(a=n.path)?i=a.call(e,{hash:{},data:t}):(a=e&&e.path,i=typeof a===c?a.call(e,{hash:{},data:t}):a),r+=u(i)+'" /></span> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l="",c="function",u=this.escapeExpression,d=this;return l+='<div class="col-md-12"> <div class="form-group path-group"> ',
o=n.if.call(t,t&&t.canEditPath,{hash:{},inverse:d.program(3,s,a),fn:d.program(1,r,a),data:a}),(o||0===o)&&(l+=o),l+=' <div class="path-actions"> <a href="#" class="remove-path-btn btn-link btn-gray"><i class="glyphicon remove-2"></i></a> </div> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <p class="help-block"> '+d(i(n(0)).call(e,"Note: An active Plex Pass is required for this service. Don't have a Plex Pass? {1}Subscribe here{2}",'<a href="{3}" target="_blank">',"</a>",e&&e.plexPassUrl,{
hash:{},data:t}))+" </p> "}function l(e,t){return'<div class="vendor-logo vendor-logo-lyricfind"></div>'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h=this;return u+='<div class="choose-library use-premium-library" data-agent="com.plexapp.agents.plexmusic" data-scanner="Plex Premium Music Scanner"> <div class="row"> <div class="col-xs-12"> <div class="row use-library-header"> <div class="col-xs-12"> <input type="radio"> <span class="header-text"> '+d(i(n(0)).call(t,"Create a premium Plex music library!",{
hash:{},data:s}))+' </span> </div> </div> <div class="row use-premium-library-body"> <div class="col-xs-8"> <ul> <li>'+d(i(n(0)).call(t,"Access to the best artwork, artist bios, album reviews, and more",{hash:{},data:s}))+"</li> <li>"+d(i(n(0)).call(t,"Smart mixes based on track or mood",{hash:{},data:s}))+"</li> <li>"+d(i(n(0)).call(t,"Improved music recognition and matching",{hash:{},data:s}))+"</li> </ul> ",c=a.unless.call(t,t&&t.hasPremiumMusic,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s
}),(c||0===c)&&(u+=c),u+=' </div> <div class="col-xs-4 vendor-logos"> ',c=a.if.call(t,t&&t.hasLyrics,{hash:{},inverse:h.noop,fn:h.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+=' <div class="vendor-logo vendor-logo-gracenote"></div> <div class="vendor-logo vendor-logo-plex-pass"></div> </div> </div> </div> </div> </div> <div class="choose-library use-basic-library"> <div class="row use-library-header"> <div class="col-xs-12"> <input type="radio"> '+d(i(n(0)).call(t,"Create a basic music library",{
hash:{},data:s}))+" </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <p class="help-block"> '+u(i(n(0)).call(e,"Note: An active Plex Pass is required for this service. Don't have a Plex Pass? {1}Subscribe here{2}",'<a href="{3}" target="_blank">',"</a>",e&&e.plexPassUrl,{hash:{},data:t}))+" </p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
s=s||{};var l,c="",u=this.escapeExpression,d=this;return c+='<div class="choose-library use-premium-library"> <div class="row"> <div class="col-xs-12"> <div class="row use-library-header"> <div class="col-xs-12"> <input type="radio" disabled> <span class="header-text"> '+u(i(n(0)).call(t,"Automatically tag my photos!",{hash:{},data:s}))+' </span> </div> </div> <div class="use-premium-library-body"> <div class="row"> <div class="col-xs-8"> <ul> <li>'+u(i(n(0)).call(t,"Wondering if your photos contain kittens? Our advanced neural net can help you figure it out!",{
hash:{},data:s}))+"</li> <li>"+u(i(n(0)).call(t,"A fun new way to explore your collection!",{hash:{},data:s}))+'</li> </ul> </div> <div class="col-xs-4 vendor-logos"> <div class="vendor-logo vendor-logo-plex-pass"></div> </div> </div> <div class="row"> <div class="col-xs-12"> <p class="help-block"> '+u(i(n(0)).call(t,"Note: photo thumbnails will be temporarily uploaded to a third party for analysis. {1}Learn more{2}",'<a href="https://help.plex.tv/photo-auto-tagging" target="_blank">',"</a>",{hash:{},
data:s}))+" </p> ",l=a.unless.call(t,t&&t.hasPremiumPhotos,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=' </div> </div> </div> </div> </div> </div> <div class="choose-library use-basic-library"> <div class="row use-library-header"> <div class="col-xs-12"> <input type="radio" disabled> '+u(i(n(0)).call(t,"No thanks, I don't care about kittens",{hash:{},data:s}))+" </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
function o(e,t,r){var s,o="";return o+=" "+h(i(n(24)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" ",s=a.if.call(e,r&&r.edit,{hash:{},inverse:p.noop,fn:p.program(2,l,t),data:t}),(s||0===s)&&(o+=s),o+=" "}function l(e,t){var a,r="";return r+=" ",a=i(n(19)).call(e,e&&e.id,"enableBIFGeneration",{hash:{},inverse:p.noop,fn:p.program(3,c,t),data:t}),(a||0===a)&&(r+=a),r+=" "}function c(e,t){var a="";return a+=' <div class="form-group"> <button type="button" class="delete-thumbnails-btn btn btn-sm btn-danger">'+h(i(n(0)).call(e,"Delete Preview Thumbnails",{
hash:{},data:t}))+"</button> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this.escapeExpression,p=this;return u=a.each.call(t,t&&t.settings,{hash:{},inverse:p.noop,fn:p.programWithDepth(1,o,s,t),data:s}),(u||0===u)&&(d+=u),d+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"section-type-chosen"}function l(e,t){var a="";return a+=' <p class="prompt">'+v(i(n(0)).call(e,"Select your library type",{
hash:{},data:t}))+"</p> "}function c(e,t){var a="";return a+=" <label>"+v(i(n(0)).call(e,"Library type",{hash:{},data:t}))+"</label> "}function u(e,t,r){var s,o="";return o+=' <a class="wizard-block section-type ',s=a.if.call(e,r&&r.canChangeType,{hash:{},inverse:y.noop,fn:y.program(8,d,t),data:t}),(s||0===s)&&(o+=s),o+=" ",s=i(n(19)).call(e,r&&r.currentSectionKey,e&&e.key,{hash:{},inverse:y.noop,fn:y.program(10,h,t),data:t}),(s||0===s)&&(o+=s),o+='" data-key="'+v((s=e&&e.key,typeof s===b?s.apply(e):s))+'" href="#"> <i class="wizard-block-icon '+v((s=e&&e.sectionTypeIcon,
typeof s===b?s.apply(e):s))+'"></i> '+v((s=e&&e.title,typeof s===b?s.apply(e):s))+" </a> "}function d(e,t){return"selectable"}function h(e,t){return"selected"}function p(e,t){var a="";return a+=' <div class="row"> <div class="col-xs-12"> <p class="prompt">'+v(i(n(0)).call(e,"Name your library and choose language.",{hash:{},data:t}))+"</p> </div> </div> "}function f(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"Last updated {1}",e&&e.updatedAt,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var g,m="",v=this.escapeExpression,y=this,b="function";return m+='<form class="edit-section-type-form settings-container ',g=a.if.call(t,(g=t&&t.section,null==g||g===!1?g:g.type),{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(g||0===g)&&(m+=g),m+='"> ',g=a.if.call(t,t&&t.add,{hash:{},inverse:y.program(5,c,s),fn:y.program(3,l,s),data:s}),(g||0===g)&&(m+=g),m+=' <div class="wizard-blocks-group form-group type-group"> ',g=a.each.call(t,t&&t.sectionTypes,{hash:{},
inverse:y.noop,fn:y.programWithDepth(7,u,s,t),data:s}),(g||0===g)&&(m+=g),m+=' <label class="control-label"> <span class="control-error">'+v(i(n(0)).call(t,"You must select a media type.",{hash:{},data:s}))+'</span> </label> </div> <div class="visible-once-section-type-chosen"> ',g=a.if.call(t,t&&t.hasType,{hash:{},inverse:y.noop,fn:y.program(12,p,s),data:s}),(g||0===g)&&(m+=g),m+=' <div class="row"> <div class="col-md-7"> <div class="form-group title-group"> <div> <label for="edit-section-title" class="control-label"> '+v(i(n(0)).call(t,"Name",{
hash:{},data:s}))+' <span class="control-error">'+v(i(n(0)).call(t,"A library name is required.",{hash:{},data:s}))+'</span> </label> </div> <input type="text" id="edit-section-title" name="title" class="form-control" value="'+v((g=t&&t.section,g=null==g||g===!1?g:g.title,typeof g===b?g.apply(t):g))+'"> </div> </div> <div class="col-md-5"> <div class="form-group language-group"> <div> <label for="edit-section-language" class="control-label"> '+v(i(n(0)).call(t,"Language",{hash:{},data:s}))+' <span class="control-error">'+v(i(n(0)).call(t,"A language is required.",{
hash:{},data:s}))+'</span> </label> </div> <select id="edit-section-language" name="language"></select> </div> </div> </div> <div class="row"> <div class="col-md-12"> <span class="text-muted"> ',g=a.if.call(t,t&&t.updatedAt,{hash:{},inverse:y.noop,fn:y.program(14,f,s),data:s}),(g||0===g)&&(m+=g),m+=" </span> </div> </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";
return i+=' <option value="'+f((n=e&&e.value,typeof n===p?n.apply(e):n))+'" ',n=a.if.call(e,e&&e.selected,{hash:{},inverse:g.noop,fn:g.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=">"+f((n=e&&e.label,typeof n===p?n.apply(e):n))+"</option> "}function l(e,t){return"selected"}function c(e,t){var a="";return a+=' <option value="">'+f(i(n(0)).call(e,"Loading...",{hash:{},data:t}))+"</option> "}function u(e,t){var n,i="";return i+=' <option value="'+f((n=e&&e.value,typeof n===p?n.apply(e):n))+'">'+f((n=e&&e.label,
typeof n===p?n.apply(e):n))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p="function",f=this.escapeExpression,g=this;return h+='<div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-title">'+f(i(n(0)).call(t,"Title",{hash:{},data:s}))+'</label> <input type="text" id="match-search-title" name="title" class="form-control" value="'+f((d=t&&t.item,d=null==d||d===!1?d:d.title,typeof d===p?d.apply(t):d))+'"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-agent">'+f(i(n(0)).call(t,"Agent",{
hash:{},data:s}))+'</label> <select id="match-search-agent" name="agent"> ',d=a.each.call(t,t&&t.agents,{hash:{},inverse:g.program(4,c,s),fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=' </select> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-year">'+f(i(n(0)).call(t,"Year",{hash:{},data:s}))+'</label> <input type="text" id="match-search-year" name="year" class="form-control" value="'+f((d=t&&t.item,d=null==d||d===!1?d:d.year,
typeof d===p?d.apply(t):d))+'"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-language">'+f(i(n(0)).call(t,"Language",{hash:{},data:s}))+'</label> <select id="match-search-language" name="language"> ',d=a.each.call(t,t&&t.languages,{hash:{},inverse:g.program(4,c,s),fn:g.program(6,u,s),data:s}),(d||0===d)&&(h+=d),h+=" </select> </div> </div> </div> "})},function(e,t,n){var i=n(6);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),a=a||{},'<div class="result-region"> <div class="loading loading-inline"></div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.title,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function l(e,t){var a,r="";return r+=' <li> <a class="card btn-gray ',a=i(n(19)).call(e,e&&e.id,"all",{hash:{},
inverse:h.noop,fn:h.program(3,c,t),data:t}),(a||0===a)&&(r+=a),r+='" data-id="'+f((a=e&&e.id,typeof a===p?a.apply(e):a))+'" href="#">'+f(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</a> </li> "}function c(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this,p="function",f=this.escapeExpression;return d+='<div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> ',u=a.each.call(t,t&&t.deviceTypes,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s
}),(u||0===u)&&(d+=u),d+=' </ul> </div> <div class="device-list-container col-sm-8 col-md-9"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<h3 class="invite-list-header top">'+l(i(n(0)).call(t,"Invites",{hash:{},data:s}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+l(i(n(0)).call(t,"Friends",{
hash:{},data:s}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+l(i(n(0)).call(t,"Pending",{hash:{},data:s}))+'</h3> <div class="pending-list-container"></div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<h3 class="invite-list-header top">'+l(i(n(0)).call(t,"Invites",{
hash:{},data:s}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+l(i(n(0)).call(t,"My Home",{hash:{},data:s}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+l(i(n(0)).call(t,"Pending",{hash:{},data:s}))+'</h3> <div class="pending-list-container"></div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"selected";
}function l(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this,h=this.escapeExpression;return u+='<ul class="nav nav-header pull-right"> <li class="web-nav-item"><a class="web-btn btn-gray ',c=i(n(19)).call(t,t&&t.subset,"web",{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+='" href="#!/settings/web">'+h(i(n(0)).call(t,"Web",{hash:{},data:s}))+'</a></li> <li class="server-nav-item ',c=a.unless.call(t,t&&t.hasPrimaryServer,{
hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+='"><a class="server-btn btn-gray ',c=i(n(19)).call(t,t&&t.subset,"server",{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+='" href="#!/settings/server">'+h(i(n(0)).call(t,"Server",{hash:{},data:s}))+'</a></li> <li class="users-nav-item ',c=a.unless.call(t,t&&t.signedIn,{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+='"><a class="users-btn btn-gray ',c=i(n(19)).call(t,t&&t.subset,"users",{
hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+='" href="#!/settings/users">'+h(i(n(0)).call(t,"Users",{hash:{},data:s}))+'<span class="badge"></span></a></li> <li class="devices-nav-item ',c=a.unless.call(t,t&&t.signedIn,{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+='"><a class="devices-btn btn-gray ',c=i(n(19)).call(t,t&&t.subset,"devices",{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+='" href="#!/settings/devices">'+h(i(n(0)).call(t,"Devices",{
hash:{},data:s}))+"</a></li> </ul> <h2>"+h(i(n(0)).call(t,"Settings",{hash:{},data:s}))+'</h2> <div class="settings-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){return"selected"}function c(e,t){var a,r="";return r+=' <li> <a class="friends-card card btn-gray ',a=i(n(19)).call(e,e&&e.subset,"friends",{hash:{},inverse:h.noop,fn:h.program(3,l,t),
data:t}),(a||0===a)&&(r+=a),r+='" href="#!/settings/users/friends"> <span class="badge"></span> '+p(i(n(0)).call(e,"Friends",{hash:{},data:t}))+" </a> </li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this,p=this.escapeExpression;return d+='<div class="filter-bar"> <div class="filter-bar-right"> <span class="user-actions ',u=a.unless.call(t,t&&t.showUserActions,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='"> <button class="add-user-btn btn btn-sm btn-default">'+p(i(n(0)).call(t,"Add User",{
hash:{},data:s}))+'</button> <button class="enable-guest-btn btn btn-sm btn-default ',u=a.unless.call(t,t&&t.showEnableGuest,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='">'+p(i(n(0)).call(t,"Enable Guest",{hash:{},data:s}))+'</button> <button class="disable-guest-btn btn btn-sm btn-danger ',u=a.unless.call(t,t&&t.showDisableGuest,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='">'+p(i(n(0)).call(t,"Disable Guest",{hash:{},data:s}))+'</button> </span> <button class="leave-home-btn btn btn-sm btn-danger ',
u=a.unless.call(t,t&&t.showLeaveHome,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+='">'+p(i(n(0)).call(t,"Leave Home",{hash:{},data:s}))+'</button> <button class="invite-friend-btn btn btn-sm btn-default">'+p(i(n(0)).call(t,"Invite Friend",{hash:{},data:s}))+'</button> </div> </div> <div class="users-row row"> <div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> <li> <a class="home-card card btn-gray ',u=i(n(19)).call(t,t&&t.subset,"home",{hash:{},inverse:h.noop,
fn:h.program(3,l,s),data:s}),(u||0===u)&&(d+=u),d+='" href="#!/settings/users/home"> <span class="badge"></span> '+p(i(n(0)).call(t,"My Home",{hash:{},data:s}))+" </a> </li> ",u=a.if.call(t,t&&t.showFriends,{hash:{},inverse:h.noop,fn:h.program(5,c,s),data:s}),(u||0===u)&&(d+=u),d+=" </ul> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,a){var r,s="";return s+=' <option value="'+_((r=e&&e.value,
typeof r===N?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.language),{hash:{},inverse:O.noop,fn:O.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+_((r=e&&e.title,typeof r===N?r.apply(e):r))+" </option> "}function l(e,t){return"selected"}function c(e,t){var r,s="";return s+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="autoLogin" ',r=a.if.call(e,(r=e&&e.settings,null==r||r===!1?r:r.autoLogin),{hash:{},inverse:O.noop,fn:O.program(5,u,t),
data:t}),(r||0===r)&&(s+=r),s+="> "+_(i(n(0)).call(e,"Automatically Sign In",{hash:{},data:t}))+' </label> <p class="help-block">'+_(i(n(0)).call(e,"Do not prompt to select a user or enter a PIN during startup on this device.",{hash:{},data:t}))+"</p> </div> "}function u(e,t){return"checked"}function d(e,t){var r,s="";return s+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="playThemeMusic" ',r=a.if.call(e,(r=e&&e.settings,null==r||r===!1?r:r.playThemeMusic),{hash:{},
inverse:O.noop,fn:O.program(5,u,t),data:t}),(r||0===r)&&(s+=r),s+="> "+_(i(n(0)).call(e,"Play Theme Music",{hash:{},data:t}))+' </label> <p class="help-block">'+_(i(n(0)).call(e,"Automatically play theme music in the background when available.",{hash:{},data:t}))+"</p> </div> "}function h(e,t,a){var r,s="";return s+=' <option value="'+_((r=e&&e.value,typeof r===N?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.allowHttpFallback),{hash:{},inverse:O.noop,fn:O.program(2,l,t),
data:t}),(r||0===r)&&(s+=r),s+=">"+_(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function p(e,t,a){var r,s="";return s+=' <option value="'+_((r=e&&e.value,typeof r===N?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.value,(r=a&&a.experienceSettings,null==r||r===!1?r:r.timeFormat),{hash:{},inverse:O.noop,fn:O.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+_(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function f(e,t,a){var r,s="";return s+=' <option value="'+_((r=e&&e.value,
typeof r===N?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.debugLevel),{hash:{},inverse:O.noop,fn:O.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+_(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function g(e,t){var r,s="";return s+=' <div class="form-group"> <label for="chromecastAppID">Chromecast Receiver</label> <select id="chromecastAppID"> ',r=a.each.call(e,e&&e.chromecastAppIDs,{hash:{},inverse:O.noop,fn:O.programWithDepth(16,m,t,e),data:t
}),(r||0===r)&&(s+=r),s+=' </select> <p class="help-block">Refresh after saving this setting for it to take effect.</p> </div> <div id="chromecast-custom-group" class="form-group ',r=i(n(64)).call(e,(r=e&&e.settings,null==r||r===!1?r:r.chromecastAppID),"custom",{hash:{},inverse:O.noop,fn:O.program(18,v,t),data:t}),(r||0===r)&&(s+=r),s+='"> <label for="chromecastCustomAppID">Custom Chromecast Application ID</label> <input type="text" id="chromecastCustomAppID" class="form-control" placeholder="Application ID" value="'+_((r=e&&e.settings,
r=null==r||r===!1?r:r.chromecastCustomAppID,typeof r===N?r.apply(e):r))+'"> <p class="help-block">Refresh after saving this setting for it to take effect.</p> </div> <div class="form-group"> <label for="myPlexScheme">Plex.tv Scheme</label> <input type="text" id="myPlexScheme" class="form-control" placeholder="https" value="'+_((r=e&&e.settings,r=null==r||r===!1?r:r.myPlexScheme,typeof r===N?r.apply(e):r))+'"> </div> <div class="form-group"> <label for="myPlexUrl">Plex.tv Address</label> <input type="text" id="myPlexUrl" class="form-control" placeholder="plex.tv" value="'+_((r=e&&e.settings,
r=null==r||r===!1?r:r.myPlexUrl,typeof r===N?r.apply(e):r))+'"> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="rejectDirectConnections" ',r=a.if.call(e,(r=e&&e.settings,null==r||r===!1?r:r.rejectDirectConnections),{hash:{},inverse:O.noop,fn:O.program(5,u,t),data:t}),(r||0===r)&&(s+=r),s+='> Reject direct connections </label> <p class="help-block">Forces relayed connections if available. Refresh after saving this setting for it to take effect.</p> </div> ';
}function m(e,t,a){var r,s="";return s+=' <option value="'+_((r=e&&e.value,typeof r===N?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.chromecastAppID),{hash:{},inverse:O.noop,fn:O.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+_(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function v(e,t){return"hidden"}function y(e,t,a){var r,s="";return s+=' <option value="'+_((r=e&&e.index,typeof r===N?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.index,(r=a&&a.settings,
null==r||r===!1?r:r.localQuality),{hash:{},inverse:O.noop,fn:O.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+_(i(n(153)).call(e,e,{hash:{},data:t}))+" </option> "}function b(e,t,a){var r,s="";return s+=' <option value="'+_((r=e&&e.index,typeof r===N?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.index,(r=a&&a.settings,null==r||r===!1?r:r.remoteQuality),{hash:{},inverse:O.noop,fn:O.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+_(i(n(153)).call(e,e,{hash:{},data:t}))+" </option> "}function S(e,t,a){
var r,s="";return s+=' <option value="'+_((r=e&&e.index,typeof r===N?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.index,(r=a&&a.settings,null==r||r===!1?r:r.channelQuality),{hash:{},inverse:O.noop,fn:O.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+_(i(n(153)).call(e,e,{hash:{},data:t}))+" </option> "}function w(e,t){var r,s="";return s+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="dash" ',r=a.if.call(e,(r=e&&e.settings,null==r||r===!1?r:r.dash),{hash:{},inverse:O.noop,
fn:O.program(5,u,t),data:t}),(r||0===r)&&(s+=r),s+="> "+_(i(n(0)).call(e,"HTML5 Player",{hash:{},data:t}))+' </label> <p class="help-block">'+_(i(n(0)).call(e,"Prefer the HTML5 video player over the Flash player.",{hash:{},data:t}))+"</p> </div> "}function M(e,t){var a="";return a+=" "+_(i(n(0)).call(e,"Allows the player to play compatible media without any conversion.",{hash:{},data:t}))+" "}function I(e,t){var a="";return a+=" "+_(i(n(0)).call(e,"Allows the player to play compatible media without any conversion. In most browsers, direct play supports MP4 videos with h264 video and AAC audio. Videos with subtitles cannot be played directly.",{
hash:{},data:t}))+" "}function C(e,t){var r,s="";return s+=' <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="allowAC3" ',r=a.if.call(e,(r=e&&e.settings,null==r||r===!1?r:r.allowAC3),{hash:{},inverse:O.noop,fn:O.program(5,u,t),data:t}),(r||0===r)&&(s+=r),s+="> "+_(i(n(0)).call(e,"Allow Direct Play of AC3 Audio",{hash:{},data:t}))+' </label> <p class="help-block">'+_(i(n(0)).call(e,"Allow MP4 videos with AC3 audio to be played directly. Browser support for AC3 audio is limited.",{
hash:{},data:t}))+"</p> </div> "}function D(e,t){var r,s="";return s+=' <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="preferAAC" ',r=a.if.call(e,(r=e&&e.settings,null==r||r===!1?r:r.preferAAC),{hash:{},inverse:O.noop,fn:O.program(5,u,t),data:t}),(r||0===r)&&(s+=r),s+="> "+_(i(n(0)).call(e,"Prefer AAC Audio",{hash:{},data:t}))+' </label> <p class="help-block">'+_(i(n(0)).call(e,"Prefer AAC over MP3 when transcoding audio. Some devices, like the Wii U, only support HLS with AAC audio.",{
hash:{},data:t}))+"</p> </div> "}function T(e,t,a){var r,s="";return s+=' <option value="'+_((r=e&&e.value,typeof r===N?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.audioBoost),{hash:{},inverse:O.noop,fn:O.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+_(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function x(e,t){var r,s="";return s+=' <div class="form-group"> <label for="subtitleSize">'+_(i(n(0)).call(e,"Subtitle Size",{hash:{},data:t}))+'</label> <select id="subtitleSize" data-type="int"> ',
r=a.each.call(e,e&&e.subtitleSizes,{hash:{},inverse:O.noop,fn:O.programWithDepth(39,P,t,e),data:t}),(r||0===r)&&(s+=r),s+=' </select> </div> <div class="form-group"> <label for="subtitlesBurnLevel">'+_(i(n(0)).call(e,"Burn Subtitles",{hash:{},data:t}))+'</label> <select id="subtitlesBurnLevel"> ',r=a.each.call(e,e&&e.subtitlesBurnLevels,{hash:{},inverse:O.noop,fn:O.programWithDepth(41,E,t,e),data:t}),(r||0===r)&&(s+=r),s+=' </select> <p class="help-block">'+_(i(n(0)).call(e,"Determines if the server should burn in subtitles when converting video depending on the subtitles format. Avoiding burn in improves server performance and is only supported by the HTML5 player.",{
hash:{},data:t}))+"</p> </div> "}function P(e,t,a){var r,s="";return s+=' <option value="'+_((r=e&&e.value,typeof r===N?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.subtitleSize),{hash:{},inverse:O.noop,fn:O.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+_(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function E(e,t,a){var r,s="";return s+=' <option value="'+_((r=e&&e.value,typeof r===N?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.value,(r=a&&a.settings,
null==r||r===!1?r:r.subtitlesBurnLevel),{hash:{},inverse:O.noop,fn:O.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+_(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function A(e,t,a){var r,s="";return s+=' <option value="'+_((r=e&&e.value,typeof r===N?r.apply(e):r))+'" ',r=i(n(19)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.extrasPrefixCount),{hash:{},inverse:O.noop,fn:O.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+_(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> ";
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var L,k="",N="function",_=this.escapeExpression,O=this;return k+='<div class="filter-bar"> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right basic-setting">'+_(i(n(0)).call(t,"Show Advanced",{hash:{},data:s}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right advanced-setting">'+_(i(n(0)).call(t,"Hide Advanced",{hash:{},data:s}))+'</button> </div> <div class="row"> <div class="col-sm-4 col-md-3"> <ul class="settings-nav nav nav-cards"> <li><a class="card btn-gray selected" href="#general-web-group">'+_(i(n(0)).call(t,"General",{
hash:{},data:s}))+'</a></li> <li class="advanced-setting"><a class="card btn-gray" href="#debug-web-group">'+_(i(n(0)).call(t,"Debug",{hash:{},data:s}))+'</a></li> <li><a class="card btn-gray" href="#player-web-group">'+_(i(n(0)).call(t,"Player",{hash:{},data:s}))+'</a></li> </ul> </div> <div class="col-sm-8 col-md-9"> <form id="web-settings-form"> <div id="general-web-group" class="settings-group active"> <h4 class="version-title"> '+_(i(n(0)).call(t,"Version",{hash:{},data:s}))+" "+_((L=t&&t.version,
typeof L===N?L.apply(t):L))+' </h4> <div class="form-group"> <label for="language">'+_(i(n(0)).call(t,"Language",{hash:{},data:s}))+'</label> <select id="language"> ',L=a.each.call(t,t&&t.languages,{hash:{},inverse:O.noop,fn:O.programWithDepth(1,o,s,t),data:s}),(L||0===L)&&(k+=L),k+=' </select> <p class="help-block">'+_(i(n(0)).call(t,"Help us translate this app into your language {1}here{2}.",'<a href="https://transifex.com/plex-1/plex-web" target="_blank">',"</a>",{hash:{},data:s}))+"</p> </div> ",
L=a.if.call(t,t&&t.hasHome,{hash:{},inverse:O.noop,fn:O.program(4,c,s),data:s}),(L||0===L)&&(k+=L),k+=" ",L=a.unless.call(t,t&&t.isPMPDesktop,{hash:{},inverse:O.noop,fn:O.program(7,d,s),data:s}),(L||0===L)&&(k+=L),k+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="showUnwatchedIcons" ',L=a.if.call(t,(L=t&&t.settings,null==L||L===!1?L:L.showUnwatchedIcons),{hash:{},inverse:O.noop,fn:O.program(5,u,s),data:s}),(L||0===L)&&(k+=L),k+="> "+_(i(n(0)).call(t,"Show Unwatched Icons",{
hash:{},data:s}))+' </label> <p class="help-block">'+_(i(n(0)).call(t,"Show unwatched icons in list items.",{hash:{},data:s}))+'</p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="keyboardShortcuts" ',L=a.if.call(t,(L=t&&t.settings,null==L||L===!1?L:L.keyboardShortcuts),{hash:{},inverse:O.noop,fn:O.program(5,u,s),data:s}),(L||0===L)&&(k+=L),k+="> "+_(i(n(0)).call(t,"Enable Keyboard Shortcuts",{hash:{},data:s}))+' </label> <p class="help-block">'+_(i(n(0)).call(t,"Press ? to view the list of {1}available shortcuts{2}.",'<a class="keyboard-shortcuts-btn" href="#">',"</a>",{
hash:{},data:s}))+'</p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="companion" ',L=a.if.call(t,(L=t&&t.settings,null==L||L===!1?L:L.companion),{hash:{},inverse:O.noop,fn:O.program(5,u,s),data:s}),(L||0===L)&&(k+=L),k+="> "+_(i(n(0)).call(t,"Advertise as player",{hash:{},data:s}))+' </label> <p class="help-block">'+_(i(n(0)).call(t,"Allow other Plex apps to fling content to this device and control it remotely.",{hash:{},data:s}))+'</p> </div> <div class="form-group"> <label for="allowHttpFallback">'+_(i(n(0)).call(t,"Allow Fallback to Insecure Connections",{
hash:{},data:s}))+'</label> <select id="allowHttpFallback"> ',L=a.each.call(t,t&&t.httpFallbackOptions,{hash:{},inverse:O.noop,fn:O.programWithDepth(9,h,s,t),data:s}),(L||0===L)&&(k+=L),k+=' </select> <p class="help-block">'+_(i(n(0)).call(t,"Allow this browser to make insecure connections to Plex Media Server if secure connections fail.",{hash:{},data:s}))+'</p> </div> <div class="form-group"> <label for="timeFormat">'+_(i(n(0)).call(t,"Time Format",{hash:{},data:s}))+'</label> <select id="timeFormat"> ',
L=a.each.call(t,t&&t.timeFormats,{hash:{},inverse:O.noop,fn:O.programWithDepth(11,p,s,t),data:s}),(L||0===L)&&(k+=L),k+=' </select> </div> </div> <div id="debug-web-group" class="settings-group"> <div class="form-group"> <label for="debugLevel">'+_(i(n(0)).call(t,"Debug Level",{hash:{},data:s}))+'</label> <select id="debugLevel" data-type="int"> ',L=a.each.call(t,t&&t.debugLevels,{hash:{},inverse:O.noop,fn:O.programWithDepth(13,f,s,t),data:s}),(L||0===L)&&(k+=L),k+=' </select> <p class="help-block">'+_(i(n(0)).call(t,"You can view the debug logs {1}here{2}.",'<a href="#!/logs">',"</a>",{
hash:{},data:s}))+"</p> </div> ",L=a.if.call(t,t&&t.isNinja,{hash:{},inverse:O.noop,fn:O.program(15,g,s),data:s}),(L||0===L)&&(k+=L),k+=' </div> <div id="player-web-group" class="settings-group"> <h4 class="settings-header">'+_(i(n(0)).call(t,"Streaming Quality",{hash:{},data:s}))+'</h4> <div class="form-group"> <label for="localQuality">'+_(i(n(0)).call(t,"Local Quality",{hash:{},data:s}))+'</label> <select id="localQuality" data-type="int"> <option value="-1">'+_(i(n(0)).call(t,"Original",{hash:{},
data:s}))+"</option> ",L=a.each.call(t,t&&t.availableQualities,{hash:{},inverse:O.noop,fn:O.programWithDepth(20,y,s,t),data:s}),(L||0===L)&&(k+=L),k+=' </select> </div> <div class="form-group"> <label for="remoteQuality">'+_(i(n(0)).call(t,"Remote Quality",{hash:{},data:s}))+'</label> <select id="remoteQuality" data-type="int"> <option value="-1">'+_(i(n(0)).call(t,"Original",{hash:{},data:s}))+"</option> ",L=a.each.call(t,t&&t.availableQualities,{hash:{},inverse:O.noop,fn:O.programWithDepth(22,b,s,t),
data:s}),(L||0===L)&&(k+=L),k+=' </select> </div> <div class="form-group"> <label for="channelQuality">'+_(i(n(0)).call(t,"Online Quality",{hash:{},data:s}))+'</label> <select id="channelQuality" data-type="int"> <option value="-1">'+_(i(n(0)).call(t,"Original",{hash:{},data:s}))+"</option> ",L=a.each.call(t,t&&t.availableQualities,{hash:{},inverse:O.noop,fn:O.programWithDepth(24,S,s,t),data:s}),(L||0===L)&&(k+=L),k+=" </select> </div> ",L=a.if.call(t,t&&t.showExperimentalPlayer,{hash:{},inverse:O.noop,
fn:O.program(26,w,s),data:s}),(L||0===L)&&(k+=L),k+=' <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="directPlay" ',L=a.if.call(t,(L=t&&t.settings,null==L||L===!1?L:L.directPlay),{hash:{},inverse:O.noop,fn:O.program(5,u,s),data:s}),(L||0===L)&&(k+=L),k+="> "+_(i(n(0)).call(t,"Direct Play",{hash:{},data:s}))+' </label> <p class="help-block"> ',L=a.if.call(t,t&&t.isPMPDesktop,{hash:{},inverse:O.program(30,I,s),fn:O.program(28,M,s),data:s}),(L||0===L)&&(k+=L),
k+=' </p> </div> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="directStream" ',L=a.if.call(t,(L=t&&t.settings,null==L||L===!1?L:L.directStream),{hash:{},inverse:O.noop,fn:O.program(5,u,s),data:s}),(L||0===L)&&(k+=L),k+="> "+_(i(n(0)).call(t,"Direct Stream",{hash:{},data:s}))+' </label> <p class="help-block">'+_(i(n(0)).call(t,"Allows the server to copy compatible audio and video streams without converting them.",{hash:{},data:s}))+'</p> </div> <h4 class="settings-header">'+_(i(n(0)).call(t,"Audio & Subtitles",{
hash:{},data:s}))+"</h4> ",L=a.unless.call(t,t&&t.isPMPDesktop,{hash:{},inverse:O.noop,fn:O.program(32,C,s),data:s}),(L||0===L)&&(k+=L),k+=" ",L=a.unless.call(t,t&&t.isPMPDesktop,{hash:{},inverse:O.noop,fn:O.program(34,D,s),data:s}),(L||0===L)&&(k+=L),k+=' <div class="form-group"> <label for="audioBoost">'+_(i(n(0)).call(t,"Multi-Channel Audio Boost",{hash:{},data:s}))+'</label> <select id="audioBoost" data-type="int"> ',L=a.each.call(t,t&&t.audioBoostLevels,{hash:{},inverse:O.noop,fn:O.programWithDepth(36,T,s,t),
data:s}),(L||0===L)&&(k+=L),k+=' </select> <p class="help-block">'+_(i(n(0)).call(t,"Boost volume when converting multi-channel audio to stereo.",{hash:{},data:s}))+"</p> </div> ",L=a.unless.call(t,t&&t.isPMPDesktop,{hash:{},inverse:O.noop,fn:O.program(38,x,s),data:s}),(L||0===L)&&(k+=L),k+=' <h4 class="settings-header">'+_(i(n(0)).call(t,"Extras",{hash:{},data:s}))+'</h4> <div class="form-group"> <label for="extrasPrefixCount">'+_(i(n(0)).call(t,"Cinema Trailers to Play Before Movies",{hash:{},data:s
}))+'</label> <select id="extrasPrefixCount" data-type="int"> ',L=a.each.call(t,t&&t.extrasPrefixCounts,{hash:{},inverse:O.noop,fn:O.programWithDepth(43,A,s,t),data:s}),(L||0===L)&&(k+=L),k+=' </select> </div> </div> <div class="form-footer"> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+_(i(n(0)).call(t,"Save Changes",{hash:{},data:s}))+'</span> </button> <span class="form-message"></span> </div> </form> </div> </div> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,a){var r,s="";return s+=' <li class="',r=i(n(19)).call(e,(r=a&&a.currentType,null==r||r===!1?r:r.id),e&&e.id,{hash:{},inverse:d.noop,fn:d.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='"> <a class="btn-gray" data-type="'+p((r=e&&e.typeString,typeof r===h?r.apply(e):r))+'" href="#">'+p(i(n(0)).call(e,e&&e.plural,{hash:{},data:t}))+"</a> </li> "}function l(e,t){
return"active"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this,h="function",p=this.escapeExpression;return u+='<ul class="agent-types-nav nav nav-pills"> ',c=a.each.call(t,t&&t.agentTypes,{hash:{},inverse:d.noop,fn:d.programWithDepth(1,o,s,t),data:s}),(c||0===c)&&(u+=c),u+=' </ul> <div class="agents-list-container"></div> <p class="help-block sortable-help-block">'+p(i(n(0)).call(t,"Select which additional agents should contribute to metadata from {1}, and drag them to change the order of preference.",'<span class="agent-label"></span>',{
hash:{},data:s}))+'</p> <div class="contributors-list-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+u(i(n(24)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this.escapeExpression,d=this;return c+='<div class="sign-in-region"></div> <hr> <form id="server-settings-form"> <div class="form-group"> <h4 class="version-header"><span class="version"></span> <span class="update-region"></span></h4> </div> ',
l=a.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=' <div class="form-footer"> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+u(i(n(0)).call(t,"Save Changes",{hash:{},data:s}))+'</span> </button> <span class="form-message"></span> </div> </form> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
function o(e,t){var r,s="";return s+=' <p class="text-muted"> '+p(i(n(0)).call(e,"The Plex Media Server logs and database can be helpful to developers and forum community members in diagnosing server issues.",{hash:{},data:t}))+' </p> <div class="help-btn-container"> ',r=a.if.call(e,e&&e.showDownloadLogs,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,e&&e.showDownloadDatabases,{hash:{},inverse:f.noop,fn:f.program(4,c,t),data:t}),(r||0===r)&&(s+=r),s+=" </div> ";
}function l(e,t){var a,r="";return r+=' <a class="btn btn-primary" href="'+p((a=e&&e.downloadLogsUrl,typeof a===h?a.apply(e):a))+'" target="'+p((a=e&&e.defaultLinkTarget,typeof a===h?a.apply(e):a))+'">'+p(i(n(0)).call(e,"Download Logs",{hash:{},data:t}))+"</a> "}function c(e,t){var a,r="";return r+=' <a class="btn btn-primary" href="'+p((a=e&&e.downloadDatabasesUrl,typeof a===h?a.apply(e):a))+'" target="'+p((a=e&&e.defaultLinkTarget,typeof a===h?a.apply(e):a))+'">'+p(i(n(0)).call(e,"Download Database",{
hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h="function",p=this.escapeExpression,f=this;return d+='<div class="help-container"> <p class="text-muted"> '+p(i(n(0)).call(t,"You can find documentation, guides and FAQs as well as our friendly Community Forums among our {1}support resources{2}.",'<a href="https://support.plex.tv" target="_blank">',"</a>",{hash:{},data:s}))+" </p> ",u=a.if.call(t,t&&t.showDownloadLogsOrDatabases,{hash:{},inverse:f.noop,
fn:f.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+=" </div> "})},function(e,t){e.exports=function(){return""}},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c="function",u=this.escapeExpression;return l+='<a class="card btn-gray" href="#" data-group="'+u((o=t&&t.id,typeof o===c?o.apply(t):o))+'"> <span class="modal-nav-icon"> <i class="server-settings-status-icon unknown glyphicon circle-question-mark"></i> <i class="server-settings-status-icon error glyphicon circle-exclamation-mark"></i> <i class="server-settings-status-icon success glyphicon circle-ok"></i> <i class="server-settings-status-icon warning plex-icon-alert-560"></i> </span> '+u(i(n(0)).call(t,t&&t.title,{
hash:{},data:s}))+" </a> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+u(i(n(24)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this.escapeExpression,d=this;return c+='<form id="server-settings-form"> ',l=a.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),
c+=' <div class="form-footer"> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+u(i(n(0)).call(t,"Save Changes",{hash:{},data:s}))+'</span> </button> <span class="form-message"></span> </div> </form> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+B(i(n(0)).call(e,"Connecting server...",{
hash:{},data:t}))+" </h4> "}function l(e,t){var a;return a=i(n(19)).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.remoteAccessState),"disconnecting",{hash:{},inverse:V.program(6,u,t),fn:V.program(4,c,t),data:t}),a||0===a?a:""}function c(e,t){var a="";return a+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+B(i(n(0)).call(e,"Disconnecting server...",{hash:{},data:t}))+" </h4> "}function u(e,t){var n;return n=a.if.call(e,e&&e.isUnavailable,{hash:{},inverse:V.program(12,f,t),
fn:V.program(7,d,t),data:t}),n||0===n?n:""}function d(e,t){var r,s="";return s+=' <h4 class="status-header text-danger">'+B(i(n(0)).call(e,"Not available outside your network",{hash:{},data:t}))+"</h4> ",r=a.if.call(e,e&&e.isSignedOut,{hash:{},inverse:V.program(10,p,t),fn:V.program(8,h,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function h(e,t){var a="";return a+=' <span class="status-description help-block">'+B(i(n(0)).call(e,"First {1}sign in{2} to access your server from anywhere.",'<a class="sign-in-link" href="#">',"</a>",{
hash:{},data:t}))+"</span> "}function p(e,t){var a="";return a+=' <span class="status-description help-block">'+B(i(n(0)).call(e,"Enable to access your server from anywhere.",{hash:{},data:t}))+'</span> <button class="remote-access-enable-btn btn btn-sm btn-primary">'+B(i(n(0)).call(e,"Enable Remote Access",{hash:{},data:t}))+"</button> "}function f(e,t){var r,s="";return s+=" ",r=i(n(19)).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"unreachable",{hash:{},inverse:V.program(19,b,t),
fn:V.program(13,g,t),data:t}),(r||0===r)&&(s+=r),s+=' <button class="remote-access-disable-btn btn btn-sm btn-default">'+B(i(n(0)).call(e,"Disable Remote Access",{hash:{},data:t}))+"</button> ",r=a.if.call(e,(r=e&&e.mappingModeSetting,null==r||r===!1?r:r.value),{hash:{},inverse:V.noop,fn:V.program(21,S,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function g(e,t){var a,r="";return r+=' <h4 class="status-header text-danger">'+B(i(n(0)).call(e,"Not available outside your network",{hash:{},data:t}))+'</h4> <span class="unreachable-description status-description help-block">'+B(i(n(0)).call(e,"Your server is signed in to Plex, but is not reachable from outside your network. {1}Learn more{2}",'<a href="https://support.plex.tv/hc/en-us/articles/200484543-Connecting-a-Server" target="_blank">',"</a>",{
hash:{},data:t}))+"</span> ",a=i(n(19)).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.mappingError),"jumboframes",{hash:{},inverse:V.program(16,v,t),fn:V.program(14,m,t),data:t}),(a||0===a)&&(r+=a),r+=" "}function m(e,t){var a="";return a+=' <span class="jumbo-frames-description status-details help-block"> <span class="help-tip">'+B(i(n(0)).call(e,"Tip:",{hash:{},data:t}))+"</span> "+B(i(n(0)).call(e,'It looks like the devices between your server and the internet have "jumbo frames" enabled which can cause issues with remote access. Disable jumbo frames on at least one device and try again.',{
hash:{},data:t}))+" </span> "}function v(e,t){var a;return a=i(n(19)).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.mappingError),"doublenat",{hash:{},inverse:V.noop,fn:V.program(17,y,t),data:t}),a||0===a?a:""}function y(e,t){var a="";return a+=' <span class="double-nat-description status-details help-block"> <span class="help-tip">'+B(i(n(0)).call(e,"Tip:",{hash:{},data:t}))+"</span> "+B(i(n(0)).call(e,'It looks like your server may be connected to the internet through multiple routers or other network devices. Try connecting it directly to your primary device, or visit our support site for more information about troubleshooting this "Double-NAT" scenario. {1}Learn more{2}','<a href="https://support.plex.tv/hc/en-us/articles/200931138" target="_blank">',"</a>",{
hash:{},data:t}))+" </span> "}function b(e,t){var a="";return a+=' <h4 class="status-header text-success">'+B(i(n(0)).call(e,"Fully accessible outside your network",{hash:{},data:t}))+'</h4> <span class="status-description help-block"> '+B(i(n(0)).call(e,"You can access this server from signed-in Plex apps or in a browser at {1}.",'<a href="https://plex.tv/web" target="_blank">https://plex.tv/web</a>',{hash:{},data:t}))+" </span> "}function S(e,t){var a="";return a+=' <p class="remote-access-disable-message help-block"> <i class="remote-access-disable-warning-icon glyphicon circle-exclamation-mark"></i> '+B(i(n(0)).call(e,"You currently have Remote Access enabled through a manually-specified port. If you wish to disable Remote Access, you will need to remove your manual port forwarding from your router.",{
hash:{},data:t}))+" </p> "}function w(e,t){var a,r="";return r+=" ",a=i(n(64)).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.remoteAccessState),"disconnecting",{hash:{},inverse:V.noop,fn:V.program(24,M,t),data:t}),(a||0===a)&&(r+=a),r+=" "}function M(e,t){var r,s="";return s+=' <div class="remote-access-advanced"> <div class="remote-access-mapping-container ',r=a.unless.call(e,e&&e.forceAdvanced,{hash:{},inverse:V.noop,fn:V.program(25,I,t),data:t}),(r||0===r)&&(s+=r),s+='"> <hr> <i class="plex-image server server-xs server-logo"></i> <div class="remote-access-mapping"> <span class="mapping-label text-muted">'+B(i(n(0)).call(e,"Private",{
hash:{},data:t}))+'</span> <span class="mapping-address"> ',r=a.if.call(e,e&&e.hasPrivateAddress,{hash:{},inverse:V.program(29,D,t),fn:V.program(27,C,t),data:t}),(r||0===r)&&(s+=r),s+=" </span> ",r=a.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:V.program(33,x,t),fn:V.program(31,T,t),data:t}),(r||0===r)&&(s+=r),s+=' <span class="mapping-label text-muted">'+B(i(n(0)).call(e,"Public",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',r=a.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:V.program(29,D,t),
fn:V.program(35,P,t),data:t}),(r||0===r)&&(s+=r),s+=" </span> ",r=i(n(19)).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"ok",{hash:{},inverse:V.program(33,x,t),fn:V.program(31,T,t),data:t}),(r||0===r)&&(s+=r),s+=' <span class="mapping-internet ',r=i(n(64)).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"ok",{hash:{},inverse:V.noop,fn:V.program(37,E,t),data:t}),(r||0===r)&&(s+=r),s+='"> <i class="mapping-internet-icon glyphicon globe text-muted"></i> '+B(i(n(0)).call(e,"Internet",{
hash:{},data:t}))+" </span> </div> </div> ",r=a.if.call(e,e&&e.hasMappingSettings,{hash:{},inverse:V.noop,fn:V.program(39,A,t),data:t}),(r||0===r)&&(s+=r),s+=" </div> "}function I(e,t){return"advanced-setting"}function C(e,t){var a,r="";return r+=' <span class="mapping-value">'+B((a=e&&e.cloudAccount,a=null==a||a===!1?a:a.privateAddress,typeof a===H?a.apply(e):a))+'</span> <span class="mapping-separator text-muted">'+B(i(n(0)).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+B((a=e&&e.cloudAccount,
a=null==a||a===!1?a:a.privatePort,typeof a===H?a.apply(e):a))+"</span> "}function D(e,t){var a="";return a+=' <span class="mapping-empty-value">'+B(i(n(0)).call(e,"Unknown IP",{hash:{},data:t}))+"</span> "}function T(e,t){return' <i class="mapping-icon glyphicon left-arrow text-success"></i> '}function x(e,t){return' <i class="mapping-icon glyphicon remove-2 text-danger"></i> '}function P(e,t){var a,r="";return r+=' <span class="mapping-value">'+B((a=e&&e.cloudAccount,a=null==a||a===!1?a:a.publicAddress,
typeof a===H?a.apply(e):a))+'</span> <span class="mapping-separator text-muted">'+B(i(n(0)).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+B((a=e&&e.cloudAccount,a=null==a||a===!1?a:a.publicPort,typeof a===H?a.apply(e):a))+"</span> "}function E(e,t){return"unreachable"}function A(e,t){var r,s="";return s+=' <div class="remote-access-error-container ',r=a.unless.call(e,e&&e.forceAdvanced,{hash:{},inverse:V.noop,fn:V.program(25,I,t),data:t}),(r||0===r)&&(s+=r),s+='"> <div class="form-inline"> <div class="checkbox"> <label class="',
r=a.if.call(e,e&&e.isUnavailable,{hash:{},inverse:V.noop,fn:V.program(40,L,t),data:t}),(r||0===r)&&(s+=r),s+='"> <input type="checkbox" id="'+B((r=e&&e.mappingModeSetting,r=null==r||r===!1?r:r.id,typeof r===H?r.apply(e):r))+'" name="'+B((r=e&&e.mappingModeSetting,r=null==r||r===!1?r:r.id,typeof r===H?r.apply(e):r))+'" value="1" ',r=a.if.call(e,e&&e.isUnavailable,{hash:{},inverse:V.noop,fn:V.program(40,L,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,(r=e&&e.mappingModeSetting,null==r||r===!1?r:r.value),{
hash:{},inverse:V.noop,fn:V.program(42,k,t),data:t}),(r||0===r)&&(s+=r),s+="> "+B(i(n(0)).call(e,"Manually specify public port",{hash:{},data:t}))+' </label> </div> <div class="form-group"> <input type="text" id="'+B((r=e&&e.mappingPortSetting,r=null==r||r===!1?r:r.id,typeof r===H?r.apply(e):r))+'" name="'+B((r=e&&e.mappingPortSetting,r=null==r||r===!1?r:r.id,typeof r===H?r.apply(e):r))+'" class="form-control" value="'+B((r=e&&e.mappingPortSetting,r=null==r||r===!1?r:r.value,typeof r===H?r.apply(e):r))+'" ',
r=a.unless.call(e,e&&e.canEditPort,{hash:{},inverse:V.noop,fn:V.program(40,L,t),data:t}),(r||0===r)&&(s+=r),s+='> </div> <button class="retry-btn btn btn-primary btn-loading" ',r=a.if.call(e,e&&e.isUnavailable,{hash:{},inverse:V.noop,fn:V.program(40,L,t),data:t}),(r||0===r)&&(s+=r),s+='> <div class="loading loading-sm"></div> <span class="btn-label">',r=i(n(19)).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"unreachable",{hash:{},inverse:V.program(46,_,t),fn:V.program(44,N,t),
data:t}),(r||0===r)&&(s+=r),s+='</span> </button> </div> <p class="help-block">'+B(i(n(0)).call(e,"You may need to enable this to establish a direct connection from outside your network. You may also need to configure your router. Detailed instructions are available {1}here{2}.",'<a href="http://support.plex.tv/hc/en-us/articles/200931138-Troubleshooting-myPlex-Server-connections" target="_blank">',"</a>",{hash:{},data:t}))+"</p> </div> "}function L(e,t){return"disabled"}function k(e,t){return"checked";
}function N(e,t){return B(i(n(0)).call(e,"Retry",{hash:{},data:t}))}function _(e,t){return B(i(n(0)).call(e,"Apply",{hash:{},data:t}))}function O(e,t){var r,s="";return s+=' <div class="remote-access-upload-container ',r=a.unless.call(e,e&&e.totalRateSettingValue,{hash:{},inverse:V.noop,fn:V.program(49,R,t),data:t}),(r||0===r)&&(s+=r),s+='"> <hr> <div class="remote-access-upload-icon-container"> <i class="remote-access-upload-icon glyphicon circle-arrow-top"></i> <i class="remote-access-upload-warning-icon glyphicon circle-exclamation-mark"></i> </div> <form id="remote-access-upload-form" class="remote-access-upload-form"> <div class="remote-access-upload-speed-header">'+B(i(n(0)).call(e,"No upload speed set",{
hash:{},data:t}))+'</div> <div class="form-group"> <div class="form-inline"> <div class="form-group"> '+B(i(n(0)).call(e,"Internet upload speed",{hash:{},data:t}))+' <input type="text" id="'+B((r=e&&e.totalRateSettingID,typeof r===H?r.apply(e):r))+'" name="'+B((r=e&&e.totalRateSettingID,typeof r===H?r.apply(e):r))+'" class="remote-access-upload-speed-control form-control" value="',r=a.if.call(e,e&&e.totalRateSettingValue,{hash:{},inverse:V.noop,fn:V.program(51,j,t),data:t}),(r||0===r)&&(s+=r),s+='" > '+B(i(n(0)).call(e,"Mbps",{
hash:{},data:t}))+' </div> <p class="help-block"> '+B(i(n(0)).call(e,"You can use {1}speedtest.net{2} to determine your internet upload capacity.",'<a href="http://speedtest.net" target="_blank" rel="noopener noreferrer">',"</a>",{hash:{},data:t}))+" <br> "+B(i(n(0)).call(e,"Enter an upload speed here and Plex can ensure it operates within this boundary.",{hash:{},data:t}))+" </p> </div> </div> ",r=a.each.call(e,e&&e.uploadSettings,{hash:{},inverse:V.noop,fn:V.program(53,z,t),data:t}),(r||0===r)&&(s+=r),
s+=' <div class="form-footer"> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+B(i(n(0)).call(e,"Save Changes",{hash:{},data:t}))+'</span> </button> <span class="form-message"></span> </div> </form> </div> '}function R(e,t){return"show-warning"}function j(e,t){var n;return B((n=e&&e.totalRateSettingValue,typeof n===H?n.apply(e):n))}function z(e,t){var a="";return a+=" "+B(i(n(24)).call(e,"setting",{
hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var U,F="",B=this.escapeExpression,V=this,H="function";return F+='<i class="remote-access-status-icon glyphicon globe"></i> <div class="remote-access-status-message"> ',U=i(n(19)).call(t,(U=t&&t.cloudAccount,null==U||U===!1?U:U.remoteAccessState),"connecting",{hash:{},inverse:V.program(3,l,s),fn:V.program(1,o,s),data:s}),(U||0===U)&&(F+=U),F+=" </div> ",U=i(n(64)).call(t,(U=t&&t.cloudAccount,null==U||U===!1?U:U.remoteAccessState),"connecting",{
hash:{},inverse:V.noop,fn:V.program(23,w,s),data:s}),(U||0===U)&&(F+=U),F+=" ",U=a.if.call(t,t&&t.hasUploadLimitSettings,{hash:{},inverse:V.noop,fn:V.program(48,O,s),data:s}),(U||0===U)&&(F+=U),F+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <button class="server-sign-out-btn btn btn-default btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(e,"Sign Out",{
hash:{},data:t}))+"</span> </button> "}function l(e,t){var a="";return a+=' <div class="server-claim-container"> <div class="server-claim-info"> <h4>'+h(i(n(0)).call(e,"This server is unclaimed and not secure",{hash:{},data:t}))+'</h4> <p class="help-block"> '+h(i(n(0)).call(e,"Claiming this server will associate it with your Plex account. {1} This helps your devices find each other and helps keep your media safe.","<br>",{hash:{},data:t}))+' </p> </div> <button class="server-claim-btn btn btn-default btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(e,"Claim Server",{
hash:{},data:t}))+"</span> </button> </div> "}function c(e,t){var a="";return a+=' <form id="server-sign-in-form" class="form-inline"> <div class="form-group"> <input type="text" class="form-control" name="username" placeholder="'+h(i(n(0)).call(e,"Username or email",{hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> </div> <div class="form-group"> <input type="password" class="form-control" name="password" placeholder="'+h(i(n(0)).call(e,"Password",{hash:{},data:t}))+'"> </div> <button type="submit" class="server-sign-in-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(e,"Sign In",{
hash:{},data:t}))+'</span> </button> <p class="help-block">'+h(i(n(0)).call(e,"Sign in with your Plex account to help your devices find this server, access your media remotely, and more. {1}Learn more{2}",'<a href="https://support.plex.tv/hc/en-us/articles/200484543-Connecting-a-Server">',"</a>",{hash:{},data:t}))+"</p> </form> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,d="",h=this.escapeExpression,p=this;return d+='<div class="server-account-poster user-poster img-circle placeholder-friend"> <i class="server-signedout-icon plex-icon-alert-560"></i> </div> <div class="server-account-info"> <div class="server-account-user"> <div class="server-account-label">'+h(i(n(0)).call(t,"Server signed in as",{
hash:{},data:s}))+'</div> <div class="server-account-username"></div> </div> ',u=a.if.call(t,t&&t.showSignOut,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(u||0===u)&&(d+=u),d+=" </div> ",u=a.if.call(t,t&&t.showClaimMessage,{hash:{},inverse:p.program(5,c,s),fn:p.program(3,l,s),data:s}),(u||0===u)&&(d+=u),d+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this,d=this.escapeExpression;return c+='<a href="#" class="check-for-updates-btn label label-btn label-primary ',l=a.unless.call(t,t&&t.canCheckForUpdate,{hash:{},inverse:u.noop,fn:u.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+='"> <i class="label-icon glyphicon upload"></i> '+d(i(n(0)).call(t,"Check for Updates",{hash:{},data:s}))+' </a> <a href="#" class="checking-for-updates-btn label label-btn label-primary active"> <i class="label-icon glyphicon upload"></i> '+d(i(n(0)).call(t,"Checking for Updates",{
hash:{},data:s}))+' </a> <a href="#" class="available-updates-btn label label-btn label-primary"> <i class="label-icon glyphicon download"></i> '+d(i(n(0)).call(t,"Download Updates",{hash:{},data:s}))+' </a> <span class="downloading-updates-container label label-btn label-progress active"> <i class="label-icon glyphicon download"></i> '+d(i(n(0)).call(t,"Downloading Update",{hash:{},data:s}))+' <span class="downloading-progress-container hidden">(<span class="downloading-progress-label"></span>%)</span ></span> <a href="#" class="install-updates-btn label label-btn label-primary"> <i class="label-icon glyphicon download"></i> '+d(i(n(0)).call(t,"Install Update",{
hash:{},data:s}))+' </a> <a href="#" class="installing-updates-btn label label-btn label-primary active"> <i class="label-icon glyphicon upload"></i> '+d(i(n(0)).call(t,"Installing",{hash:{},data:s}))+' </a> <span class="install-info-label up-to-date-label"> <i class="success-icon glyphicon ok-2"></i> '+d(i(n(0)).call(t,"Up to date",{hash:{},data:s}))+' </span> <span class="install-info-label install-error-label"> <i class="failure-icon glyphicon circle-exclamation-mark"></i> <span class="update-error-message"></span> <a class="install-manual-link" href="https://plex.tv/downloads" target="_blank">'+d(i(n(0)).call(t,"Please install manually.",{
hash:{},data:s}))+'</a> </span> <a href="#" class="release-notes-btn label label-btn label-default"> <i class="label-icon glyphicon circle-info"></i> '+d(i(n(0)).call(t,"What's New",{hash:{},data:s}))+" </a> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+p(i(n(0)).call(e,"Optimized Versions requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" ";
}function l(e,t){var n;return n=a.if.call(e,e&&e.isTranscoderRequired,{hash:{},inverse:f.program(6,u,t),fn:f.program(4,c,t),data:t}),n||0===n?n:""}function c(e,t){var a="";return a+=" "+p(i(n(0)).call(e,"This Plex Media Server platform is not capable of converting video.",{hash:{},data:t}))+" "}function u(e,t){var a="";return a+=" "+p(i(n(0)).call(e,"There was a problem requesting media versions from this server.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};
var d,h="",p=this.escapeExpression,f=this;return h+='<div class="row row-padded"> <h4 class="text-muted text-center"> ',d=a.if.call(t,t&&t.isUpgradeRequired,{hash:{},inverse:f.program(3,l,s),fn:f.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" </h4> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<p class="versions-status-message hidden"> <button class="delete-all-btn btn btn-sm btn-danger pull-right">'+l(i(n(0)).call(t,"Delete All Versions",{
hash:{},data:s}))+"</button> "+l(i(n(0)).call(t,"Monitor conversion progress in {1}Conversion Activity{2}.",'<a href="#!/status/conversion">',"</a>",{hash:{},data:s}))+' </p> <div class="background-processing-list-region"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <div class="filter-bar-right"> <button class="toggle-advanced-btn btn btn-sm btn-default basic-setting">'+u(i(n(0)).call(e,"Show Advanced",{
hash:{},data:t}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default advanced-setting">'+u(i(n(0)).call(e,"Hide Advanced",{hash:{},data:t}))+"</button> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this.escapeExpression,d=this;return c+='<div class="filter-bar"> ',l=a.unless.call(t,t&&t.shared,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=' </div> <div class="settings-row row"> <div class="nav-region col-sm-4 col-md-3"></div> <div class="pane-region col-sm-8 col-md-9"></div> </div> ';
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <div class="setup-basic-form-group form-group"> <p class="text-muted"> '+d(i(n(0)).call(e,"Give it a friendly name to help identify it in Plex apps and on your network.",{hash:{},data:t}))+' </p> <input type="text" id="'+d((a=e&&e.friendlyNameSetting,a=null==a||a===!1?a:a.id,typeof a===h?a.apply(e):a))+'" class="form-control" value="'+d((a=e&&e.friendlyNameSetting,
a=null==a||a===!1?a:a.value,typeof a===h?a.apply(e):a))+'" placeholder="'+d((a=e&&e.server,a=null==a||a===!1?a:a.friendlyName,typeof a===h?a.apply(e):a))+'"> </div> '}function l(e,t){var a,r="";return r+=' <div class="setup-basic-form-group form-group"> <div class="publish-checkbox checkbox"> <label for="'+d((a=e&&e.publishSetting,a=null==a||a===!1?a:a.id,typeof a===h?a.apply(e):a))+'"> <input type="checkbox" id="'+d((a=e&&e.publishSetting,a=null==a||a===!1?a:a.id,typeof a===h?a.apply(e):a))+'" checked> '+d(i(n(0)).call(e,"Allow me to access my media outside my home",{
hash:{},data:t}))+' </label> </div> <p class="text-muted"> '+d(i(n(0)).call(e,"Plex will attempt to automatically configure your network to allow access to your Plex Media Server from Plex apps outside your home.",{hash:{},data:t}))+" </p> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h="function",p=this;return u+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <h4>'+d(i(n(0)).call(t,"Great, we found a server!",{hash:{},data:s
}))+'</h4> <form id="setup-basic-form" class="settings-container"> ',c=a.if.call(t,t&&t.friendlyNameSetting,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=" ",c=a.if.call(t,t&&t.publishSetting,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+=' <div class="setup-footer"> <button type="submit" class="submit-btn btn btn-primary btn-loading btn-lg"> <div class="loading loading-sm"></div> <span class="btn-label">'+d(i(n(0)).call(t,"Next",{hash:{},data:s
}))+'</span> </button> <button class="next-btn hidden" data-subset="setupLibrary"></button> </div> </form> </div> </div> <div class="modal-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <div class="checkbox"> <label for="'+h((r=e&&e.collectUsageDataSetting,r=null==r||r===!1?r:r.id,typeof r===d?r.apply(e):r))+'"> <input type="checkbox" id="'+h((r=e&&e.collectUsageDataSetting,
r=null==r||r===!1?r:r.id,typeof r===d?r.apply(e):r))+'" name="'+h((r=e&&e.collectUsageDataSetting,r=null==r||r===!1?r:r.id,typeof r===d?r.apply(e):r))+'" value="1" ',r=a.if.call(e,(r=e&&e.collectUsageDataSetting,null==r||r===!1?r:r.value),{hash:{},inverse:p.noop,fn:p.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+h(i(n(0)).call(e,"Send anonymous usage data to Plex",{hash:{},data:t}))+' </label> </div> <p class="setup-complete-help text-muted"> '+h(i(n(0)).call(e,"Help us improve everyone's Plex experience by sending anonymous usage data.",{
hash:{},data:t}))+" </p> "}function l(e,t){return"checked"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d="function",h=this.escapeExpression,p=this;return u+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <div class="setup-apps-container"> <img class="setup-apps-image" src="'+h((c=t&&t.devicesImg,typeof c===d?c.apply(t):c))+'"> <a href="https://plex.tv/downloads" target="_blank" class="btn btn-default btn-lg">'+h(i(n(0)).call(t,"Get Plex Apps",{hash:{},
data:s}))+'</a> </div> <p class="text-muted">'+h(i(n(0)).call(t,"All set! Your Plex Media Server is working hard to find your media and make it beautiful. Grab the Plex app for all your favorite devices to get the most out of Plex and start streaming everywhere!",{hash:{},data:s}))+'</p> <form id="setup-complete-form" class="settings-container"> ',c=a.if.call(t,t&&t.collectUsageDataSetting,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=' <div class="setup-footer setup-done-footer"> <button class="next-btn btn btn-default btn-lg" data-subset="setupLibrary">'+h(i(n(0)).call(t,"Back",{
hash:{},data:s}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading btn-lg"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(t,"Done",{hash:{},data:s}))+'</span> </button> <button class="done-btn btn btn-primary btn-lg hidden"></button> </div> </form> </div> </div> <div class="modal-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){
var a="";return a+=" <h1>"+d(i(n(0)).call(e,"Setup is not allowed for shared servers.",{hash:{},data:t}))+"</h1> "}function l(e,t){var a="";return a+=" <h1>"+d(i(n(0)).call(e,"A problem has been detected with a core component of Plex Media Server.",{hash:{},data:t}))+'</h1> <h2 class="text-muted">'+d(i(n(0)).call(e,"Please visit the {1}forums{2} and provide your logs, as described {3}here{4}.",'<a href="https://forums.plex.tv" target="_blank">',"</a>",'<a href="http://support.plex.tv/hc/en-us/articles/200250417-Log-File-Locations" target="_blank">',"</a>",{
hash:{},data:t}))+"</h2> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d=this.escapeExpression,h=this;return u+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> ',c=a.if.call(t,t&&t.shared,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=" </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression,u="function";return l+='<h2 class="setup-intro-header">'+c(i(n(0)).call(t,"How Plex Works",{hash:{},data:s}))+"</h2> <h4>"+c(i(n(0)).call(t,"Plex Media Server runs on the computer where you keep your media",{hash:{},data:s}))+'</h4> <img class="setup-intro-img setup-intro-computer-img" src='+c((o=t&&t.computerImg,typeof o===u?o.apply(t):o))+"> <h4>"+c(i(n(0)).call(t,"Plex scans your media, automatically organizes it, and makes it beautiful",{
hash:{},data:s}))+'</h4> <img class="setup-intro-img setup-intro-media-img" src='+c((o=t&&t.mediaImg,typeof o===u?o.apply(t):o))+"> <h4>"+c(i(n(0)).call(t,"Play your media on any screen with your favorite Plex app",{hash:{},data:s}))+'</h4> <img class="setup-intro-img setup-intro-play-img" src='+c((o=t&&t.playImg,typeof o===u?o.apply(t):o))+'> <p> <button class="next-btn btn btn-primary btn-lg" data-subset="setupLoading">'+c(i(n(0)).call(t,"Got it!",{hash:{},data:s}))+"</button> </p> "})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <h4>'+l(i(n(0)).call(t,"Organize Your Media",{hash:{},data:s}))+'</h4> <p class="text-muted">'+l(i(n(0)).call(t,"Plex organizes your media into libraries. You can add as many libraries as you want, and you can have multiple libraries with the same type.",{
hash:{},data:s}))+'</p> <p class="setup-add-section-container"> <button class="add-section-btn btn btn-default">'+l(i(n(0)).call(t,"Add Library",{hash:{},data:s}))+'</button> </p> <div class="setup-section-list-container"></div> <div class="setup-footer"> <button class="next-btn btn btn-default btn-lg" data-subset="setupBasic">'+l(i(n(0)).call(t,"Back",{hash:{},data:s}))+'</button> <button class="next-btn btn btn-primary btn-lg" data-subset="setupComplete">'+l(i(n(0)).call(t,"Next",{hash:{},data:s
}))+"</button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="loading loading-inline"></div> <p class="loading-title">'+l(i(n(0)).call(t,"Please wait a moment while Plex starts.",{hash:{},data:s}))+"</p> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="setup-header row hidden"> <div class="col-sm-6 col-sm-offset-3"> <div class="sign-in-logo text-center"> <i class="plex-image logo"></i> </div> <h2>'+l(i(n(0)).call(t,"Server Setup",{hash:{},data:s}))+'</h2> <div class="setup-progress"> <div class="basic-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupBasic" href="#">'+l(i(n(0)).call(t,"Name",{
hash:{},data:s}))+'</a> </div> <div class="library-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupLibrary" href="#">'+l(i(n(0)).call(t,"Media Library",{hash:{},data:s}))+'</a> </div> <div class="complete-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupComplete" href="#">'+l(i(n(0)).call(t,"Finish",{hash:{},data:s}))+'</a> </div> </div> </div> </div> <div class="setup-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="side-bar-page main-page minimal-scroll"> <div class="section-sort-container"> <h5>'+l(i(n(0)).call(t,"Sort",{hash:{},data:s}))+'</h5> <div class="section-sort-list-container"></div> </div> </div>'})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){
function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,c="",u=this,d=this.escapeExpression;return c+='<div class="side-bar-page main-page dark-scrollbar"> <div class="section-current-filters-container"> <div class="side-bar-actions"> <a class="new-filter-icon-btn new-filter-btn btn-gray ',l=a.unless.call(t,t&&t.showNewFilterIconBtn,{hash:{},inverse:u.noop,fn:u.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+='" href="#"><i class="glyphicon plus"></i></a> </div> <h5>'+d(i(n(0)).call(t,"Filters",{
hash:{},data:s}))+'</h5> <div class="section-current-filters-list-container"></div> </div> <div class="section-sort-container hidden"> <h5>'+d(i(n(0)).call(t,"Sort",{hash:{},data:s}))+'</h5> <div class="section-sort-list-container"></div> </div> </div> <div class="side-bar-page filters-page dark-scrollbar"> <div class="section-filters-container"> <div class="side-bar-actions"> <a class="hide-btn btn-gray" href="#"><i class="glyphicon chevron-left"></i></a> </div> <h5>'+d(i(n(0)).call(t,"Select A Filter",{
hash:{},data:s}))+'</h5> <div class="section-filters-list-container"></div> </div> </div> <div class="side-bar-page filter-options-page dark-scrollbar"> <div class="section-filter-options-container"> <div class="side-bar-actions"> <a class="hide-btn btn-gray" href="#"><i class="glyphicon chevron-left"></i></a> </div> <h5 class="filter-options-header"></h5> <div class="section-filter-option-list-container"></div> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e);
}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+="<h2>"+l(i(n(0)).call(t,"Announcements",{hash:{},data:s}))+'</h2> <div class="announcements-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",c=this.escapeExpression,u="function";
return l+="<h2>"+c(i(n(0)).call(t,"Watch Later Help",{hash:{},data:s}))+'</h2> <div class="filter-bar"> <h4>'+c(i(n(0)).call(t,"Add videos from your browser",{hash:{},data:s}))+'</h4> </div> <div class="row text-muted"> <div class="col-md-5"> <div class="text-center"> <a class="btn btn-primary btn-lg btn-plexit" href="javascript:(function(d){var s=d.createElement(\'script\');s.type=\'text/javascript\';s.src=\'//plex.tv/queue/bookmarklet_payload\';var h=d.getElementsByTagName(\'head\')[0];h.appendChild(s);}(document))"><span class="plexit-hidden">\u276f</span> Plex It!</a> </div> <ol class="steps-list"> <li>'+c((o=t&&t.firstStepText,
typeof o===u?o.apply(t):o))+"</li> <li>"+c(i(n(0)).call(t,'To save a video to Watch Later, click "Plex It!" in your Bookmarks Bar.',{hash:{},data:s}))+"</li> <li>"+c(i(n(0)).call(t,"A panel will appear on the left side of the page to let you know the video has been saved.",{hash:{},data:s}))+"</li> <li>"+c(i(n(0)).call(t,'You can also recommend the video to friends or "fling" it to a Plex player and watch it there.',{hash:{},data:s}))+'</li> </ol> </div> <div class="col-md-7 text-right"> <img class="plexit-img" src="'+c((o=t&&t.stepsImgSrc,
typeof o===u?o.apply(t):o))+'"/> </div> </div> <div class="filter-bar"> <h4>'+c(i(n(0)).call(t,"Add videos by email",{hash:{},data:s}))+'</h4> </div> <div class="row text-muted"> <div class="col-md-5"> <div class="queue-email form-control input-lg disabled" title="'+c((o=t&&t.copyCommand,typeof o===u?o.apply(t):o))+'" tabindex="-1">'+c((o=t&&t.queueEmail,typeof o===u?o.apply(t):o))+'</div> <ol class="steps-list"> <li>'+c(i(n(0)).call(t,"Send an email to the address above with any link(s) you want added to Watch Later.",{
hash:{},data:s}))+"</li> <li>"+c(i(n(0)).call(t,"Add this to your address book so you can easily email links from your iPhone, iPad, Android, or any other device.",{hash:{},data:s}))+'</li> </ol> </div> <div class="col-md-7 text-right"> <img class="email-links" src="'+c((o=t&&t.emailImgSrc,typeof o===u?o.apply(t):o))+'"/> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(6);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";
return i+=' <li><a class="'+h((n=e&&e.subset,typeof n===d?n.apply(e):n))+'-btn btn-gray" href="#!/playlist/'+h((n=e&&e.key,typeof n===d?n.apply(e):n))+"/"+h((n=e&&e.subset,typeof n===d?n.apply(e):n))+'">'+h((n=e&&e.title,typeof n===d?n.apply(e):n))+'<span class="badge"></span></a></li> '}function l(e,t){var n,i="";return i+=' <a class="user-playlist-help btn-gray" href="'+h((n=e&&e.helpRoute,typeof n===d?n.apply(e):n))+'" target="'+h((n=e&&e.defaultTarget,typeof n===d?n.apply(e):n))+'"><i class="glyphicon circle-question-mark"></i></a> ';
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,u="",d="function",h=this.escapeExpression,p=this;return u+='<ul class="nav nav-header pull-right"> ',c=a.each.call(t,t&&t.filters,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(u+=c),u+=" </ul> <h2> "+h(i(n(0)).call(t,t&&t.label,{hash:{},data:s}))+" ",c=a.if.call(t,t&&t.helpRoute,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(c||0===c)&&(u+=c),u+=' </h2> <div class="user-playlist-container"></div> ';
})},function(e,t,n){"use strict";function i(e){var t=e&&e[0]||1,n=d;if(t!==n){if(t<n){var i=h[n],a=h[t];throw new u("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+a+").")}throw new u("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function a(e,t){if(!t)throw new u("No environment passed to template");
var n=function(e,n,i,a,r,s){var o=t.VM.invokePartial.apply(this,arguments);if(null!=o)return o;if(t.compile){var l={helpers:a,partials:r,data:s};return r[n]=t.compile(e,{data:void 0!==s},t),r[n](i,l)}throw new u("The partial "+n+" could not be compiled when running in runtime-only mode")},i={escapeExpression:c.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var i=this.programs[e];return n?i=s(e,t,n):i||(i=this.programs[e]=s(e,t)),i},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n={},
c.extend(n,t),c.extend(n,e)),n},programWithDepth:t.VM.programWithDepth,noop:t.VM.noop,compilerInfo:null};return function(n,a){a=a||{};var r,s,o=a.partial?a:t;a.partial||(r=a.helpers,s=a.partials);var l=e.call(i,o,n,r,s,a.data);return a.partial||t.VM.checkRevision(i.compilerInfo),l}}function r(e,t,n){var i=Array.prototype.slice.call(arguments,3),a=function(e,a){return a=a||{},t.apply(this,[e,a.data||n].concat(i))};return a.program=e,a.depth=i.length,a}function s(e,t,n){var i=function(e,i){return i=i||{},
t(e,i.data||n)};return i.program=e,i.depth=0,i}function o(e,t,n,i,a,r){var s={partial:!0,helpers:i,partials:a,data:r};if(void 0===e)throw new u("The partial "+t+" could not be found");if(e instanceof Function)return e(n,s)}function l(){return""}var c=n(583),u=n(582).default,d=n(581).COMPILER_REVISION,h=n(581).REVISION_CHANGES;t.checkRevision=i,t.template=a,t.programWithDepth=r,t.program=s,t.invokePartial=o,t.noop=l},function(e,t,n){"use strict";var i={childContextTypes:!0,contextTypes:!0,defaultProps:!0,
displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};e.exports=function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;++r)i[n[r]]||a[n[r]]||(e[n[r]]=t[n[r]]);return e}},function(e,t){(function(){window.Modernizr=function(e,t,n){function i(e){v.cssText=e}function a(e,t){return typeof e===t}function r(e,t){return!!~(""+e).indexOf(t)}function s(e,t){for(var i in e){var a=e[i];if(!r(a,"-")&&v[a]!==n)return"pfx"!=t||a;
}return!1}function o(e,t,i){for(var r in e){var s=t[e[r]];if(s!==n)return i===!1?e[r]:a(s,"function")?s.bind(i||t):s}return!1}function l(e,t,n){var i=e.charAt(0).toUpperCase()+e.slice(1),r=(e+" "+S.join(i+" ")+i).split(" ");return a(t,"string")||a(t,"undefined")?s(r,t):(r=(e+" "+w.join(i+" ")+i).split(" "),o(r,t,n))}var c,u,d,h="2.8.3",p={},f=t.documentElement,g="modernizr",m=t.createElement(g),v=m.style,y=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),b="Webkit Moz O ms",S=b.split(" "),w=b.toLowerCase().split(" "),M={},I=[],C=I.slice,D=function(e,n,i,a){
var r,s,o,l,c=t.createElement("div"),u=t.body,d=u||t.createElement("body");if(parseInt(i,10))for(;i--;)o=t.createElement("div"),o.id=a?a[i]:g+(i+1),c.appendChild(o);return r=["&#173;",'<style id="s',g,'">',e,"</style>"].join(""),c.id=g,(u?c:d).innerHTML+=r,d.appendChild(c),u||(d.style.background="",d.style.overflow="hidden",l=f.style.overflow,f.style.overflow="hidden",f.appendChild(d)),s=n(c,e),u?c.parentNode.removeChild(c):(d.parentNode.removeChild(d),f.style.overflow=l),!!s},T={}.hasOwnProperty;
d=a(T,"undefined")||a(T.call,"undefined")?function(e,t){return t in e&&a(e.constructor.prototype[t],"undefined")}:function(e,t){return T.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=C.call(arguments,1),i=function(){if(this instanceof i){var a=function(){};a.prototype=t.prototype;var r=new a,s=t.apply(r,n.concat(C.call(arguments)));return Object(s)===s?s:r}return t.apply(e,n.concat(C.call(arguments)))};return i;
}),M.csstransforms3d=function(){var e=!!l("perspective");return e&&"webkitPerspective"in f.style&&D("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t,n){e=9===t.offsetLeft&&3===t.offsetHeight}),e};for(var x in M)d(M,x)&&(u=x.toLowerCase(),p[u]=M[x](),I.push((p[u]?"":"no-")+u));return p.addTest=function(e,t){if("object"==typeof e)for(var i in e)d(e,i)&&p.addTest(i,e[i]);else{if(e=e.toLowerCase(),p[e]!==n)return p;t="function"==typeof t?t():t,
"undefined"!=typeof enableClasses&&enableClasses&&(f.className+=" "+(t?"":"no-")+e),p[e]=t}return p},i(""),m=c=null,p._version=h,p._prefixes=y,p._domPrefixes=w,p._cssomPrefixes=S,p.testProp=function(e){return s([e])},p.testAllProps=l,p.testStyles=D,p}(this,this.document),e.exports=window.Modernizr}).call(window)},function(e,t,n){var i,a,r;/*!
 * jQuery Mousewheel 3.1.13
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 */
!function(s){a=[n(5)],i=s,r="function"==typeof i?i.apply(t,a):i,!(void 0!==r&&(e.exports=r))}(function(e){function t(t){var s=t||window.event,o=l.call(arguments,1),c=0,d=0,h=0,p=0,f=0,g=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(h=s.detail*-1),"wheelDelta"in s&&(h=s.wheelDelta),"wheelDeltaY"in s&&(h=s.wheelDeltaY),"wheelDeltaX"in s&&(d=s.wheelDeltaX*-1),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(d=h*-1,h=0),c=0===h?d:h,"deltaY"in s&&(h=s.deltaY*-1,c=h),"deltaX"in s&&(d=s.deltaX,0===h&&(c=d*-1)),
0!==h||0!==d){if(1===s.deltaMode){var m=e.data(this,"mousewheel-line-height");c*=m,h*=m,d*=m}else if(2===s.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,h*=v,d*=v}if(p=Math.max(Math.abs(h),Math.abs(d)),(!r||p<r)&&(r=p,i(s,p)&&(r/=40)),i(s,p)&&(c/=40,d/=40,h/=40),c=Math[c>=1?"floor":"ceil"](c/r),d=Math[d>=1?"floor":"ceil"](d/r),h=Math[h>=1?"floor":"ceil"](h/r),u.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=t.clientX-y.left,g=t.clientY-y.top;
}return t.deltaX=d,t.deltaY=h,t.deltaFactor=r,t.offsetX=f,t.offsetY=g,t.deltaMode=0,o.unshift(t,c,d,h),a&&clearTimeout(a),a=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,o)}}function n(){r=null}function i(e,t){return u.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var a,r,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;
if(e.event.fixHooks)for(var c=s.length;c;)e.event.fixHooks[s[--c]]=e.event.mouseHooks;var u=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=o.length;n;)this.addEventListener(o[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",u.getLineHeight(this)),e.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=o.length;n;)this.removeEventListener(o[--n],t,!1);else this.onmousewheel=null;
e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e);
}})})},function(e,t,n){var i,a;!function(n,r){var s=this;i=[],a=function(){return r(s)}.apply(t,i),!(void 0!==a&&(e.exports=a))}(this,function(e){"use strict";return function(e){function t(i){if(n[i])return n[i];var a=n[i]=Object.create(null);return e[i](a,t),a}var n=Object.create(null);return t(0)}([function(e,t){var n=t(23),i=t(23);e.debugMode=i.debugMode,e.verboseMode=i.verboseMode;var a=t(33),r=t(33);e.Set=r.Set;var s=t(30),o=t(30);e.Map=o.Map;var l=t(32),c=t(32);e.Promise=c.Promise,e.DeferredPromise=c.DeferredPromise;
var u=t(37);e.webworker=u;var d=t(8);e.parts=d;var h=t(1);e.parser=h;var p=t(14);e.renderers=p;var f=t(24);e.ASS=f.ASS;var g=t(25);e.Attachment=g.Attachment,e.AttachmentType=g.AttachmentType;var m=t(26);e.Dialogue=m.Dialogue;var v=t(28);e.ScriptProperties=v.ScriptProperties;var y=t(29);e.Style=y.Style;var b=t(27);e.BorderStyle=b.BorderStyle,e.Format=b.Format,e.WrappingStyle=b.WrappingStyle,Object.defineProperties(e,{debugMode:{get:function(){return n.debugMode},set:n.setDebugMode},verboseMode:{get:function(){
return n.verboseMode},set:n.setVerboseMode},Set:{get:function(){return a.Set},set:a.setImplementation},Map:{get:function(){return s.Map},set:s.setImplementation},Promise:{get:function(){return l.Promise},set:l.setImplementation}})},function(e,t){var n=t(3);e.parse=n.parse;var i=t(5);e.BrowserReadableStream=i.BrowserReadableStream,e.StringStream=i.StringStream,e.XhrStream=i.XhrStream;var a=t(4);e.StreamParser=a.StreamParser,e.SrtStreamParser=a.SrtStreamParser},function(e,t){function n(e){var t=e.indexOf(":");
if(t===-1)return null;var n=e.substr(0,t),i=e.substr(t+1).replace(/^\s+/,"");return{name:n,value:i}}function i(e,t){var i=n(e);if(null===i)return null;var r=i.value.split(",");r.length>t.length&&(r[t.length-1]=r.slice(t.length-1).join(","));var s=new a.Map;return t.forEach(function(e,t){s.set(e,r[t])}),{type:i.name,template:s}}var a=t(30);e.parseLineIntoProperty=n,e.parseLineIntoTypedTemplate=i},function(e,t){function n(e,t){var n=new l(e,t);if(null===n.result||n.result.end!==e.length)throw r.debugMode&&console.error("Parse failed. %s %s %o",t,e,n.result),
new Error("Parse failed.");return n.result.value}function i(e,t,n,i){l.prototype["parse_tag_"+e]=function(a){var r=this,s=new h(a);if(null===r.read(s,e))return a.pop(),null;var o=n.call(r,s);if(null!==o)s.value=new t(o.value);else{if(i)return a.pop(),null;s.value=new t(null)}return s}}var a=t(8),r=t(23),s=t(30),o=new s.Map;e.parse=n;var l=function(){function e(e,t){this._input=e,this._parseTree=new h(null),this._result=o.get(t).call(this,this._parseTree)}return Object.defineProperty(e.prototype,"result",{
get:function(){return this._result},enumerable:!0,configurable:!0}),e.prototype.parse_dialogueParts=function(e){var t,i=new h(e);for(i.value=[];this._haveMore();){var r=this.parse_enclosedTags(i);if(null!==r)(t=i.value).push.apply(t,r.value);else{var s=this.parse_newline(i)||this.parse_hardspace(i)||this.parse_text(i);if(null===s)return e.pop(),null;if(s.value instanceof a.Text&&i.value[i.value.length-1]instanceof a.Text){var o=i.value[i.value.length-1];i.value[i.value.length-1]=new a.Text(o.value+s.value.value);
}else i.value.push(s.value)}}var l=!1;return i.value.forEach(function(e,t){e instanceof a.DrawingMode?l=0!==e.scale:e instanceof a.Text&&l&&(i.value[t]=new a.DrawingInstructions(n(e.value,"drawingInstructions")))}),i},e.prototype.parse_enclosedTags=function(e){var t=new h(e);if(t.value=[],null===this.read(t,"{"))return e.pop(),null;for(var n=this._peek();this._haveMore()&&"}"!==n;n=this._peek()){var i=null;if(null!==this.read(t,"\\")&&(i=this.parse_tag_alpha(t)||this.parse_tag_iclip(t)||this.parse_tag_xbord(t)||this.parse_tag_ybord(t)||this.parse_tag_xshad(t)||this.parse_tag_yshad(t)||this.parse_tag_blur(t)||this.parse_tag_bord(t)||this.parse_tag_clip(t)||this.parse_tag_fade(t)||this.parse_tag_fscx(t)||this.parse_tag_fscy(t)||this.parse_tag_move(t)||this.parse_tag_shad(t)||this.parse_tag_fad(t)||this.parse_tag_fax(t)||this.parse_tag_fay(t)||this.parse_tag_frx(t)||this.parse_tag_fry(t)||this.parse_tag_frz(t)||this.parse_tag_fsp(t)||this.parse_tag_fsplus(t)||this.parse_tag_fsminus(t)||this.parse_tag_org(t)||this.parse_tag_pbo(t)||this.parse_tag_pos(t)||this.parse_tag_an(t)||this.parse_tag_be(t)||this.parse_tag_fn(t)||this.parse_tag_fr(t)||this.parse_tag_fs(t)||this.parse_tag_kf(t)||this.parse_tag_ko(t)||this.parse_tag_1a(t)||this.parse_tag_1c(t)||this.parse_tag_2a(t)||this.parse_tag_2c(t)||this.parse_tag_3a(t)||this.parse_tag_3c(t)||this.parse_tag_4a(t)||this.parse_tag_4c(t)||this.parse_tag_a(t)||this.parse_tag_b(t)||this.parse_tag_c(t)||this.parse_tag_i(t)||this.parse_tag_k(t)||this.parse_tag_K(t)||this.parse_tag_p(t)||this.parse_tag_q(t)||this.parse_tag_r(t)||this.parse_tag_s(t)||this.parse_tag_t(t)||this.parse_tag_u(t),
null===i&&t.pop()),null===i&&(i=this.parse_comment(t)),null===i)return e.pop(),null;i.value instanceof a.Comment&&t.value[t.value.length-1]instanceof a.Comment?t.value[t.value.length-1]=new a.Comment(t.value[t.value.length-1].value+i.value.value):t.value.push(i.value)}return null===this.read(t,"}")?(e.pop(),null):t},e.prototype.parse_newline=function(e){var t=new h(e);return null===this.read(t,"\\N")?(e.pop(),null):(t.value=new a.NewLine,t)},e.prototype.parse_hardspace=function(e){var t=new h(e);return null===this.read(t,"\\h")?(e.pop(),
null):(t.value=new a.Text("\xa0"),t)},e.prototype.parse_text=function(e){var t=this._peek(),n=new h(e),i=new h(n,t);return n.value=new a.Text(i.value),n},e.prototype.parse_comment=function(e){var t=this._peek(),n=new h(e),i=new h(n,t);return n.value=new a.Comment(i.value),n},e.prototype.parse_tag_a=function(e){var t=new h(e);if(null===this.read(t,"a"))return e.pop(),null;var n=this._peek();switch(n){case"1":var i=this._peek(2);switch(i){case"10":case"11":n=i}break;case"2":case"3":case"5":case"6":
case"7":case"9":break;default:return e.pop(),null}var r=new h(t,n),s=null;switch(r.value){case"1":s=1;break;case"2":s=2;break;case"3":s=3;break;case"5":s=7;break;case"6":s=8;break;case"7":s=9;break;case"9":s=4;break;case"10":s=5;break;case"11":s=6}return t.value=new a.Alignment(s),t},e.prototype.parse_tag_alpha=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_an=function(e){var t=new h(e);if(null===this.read(t,"an"))return e.pop(),null;var n=this._peek();if(n<"1"||n>"9")return e.pop(),
null;var i=new h(t,n);return t.value=new a.Alignment(parseInt(i.value)),t},e.prototype.parse_tag_b=function(e){var t=new h(e);if(null===this.read(t,"b"))return e.pop(),null;var n=null,i=this._peek();return i>="1"&&i<="9"&&(i=this._peek(3),"00"===i.substr(1)&&(n=new h(t,i),n.value=parseInt(n.value))),null===n&&(n=this.parse_enableDisable(t)),null!==n?t.value=new a.Bold(n.value):t.value=new a.Bold(null),t},e.prototype.parse_tag_be=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_blur=function(){
throw new Error("Method not implemented.")},e.prototype.parse_tag_bord=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_c=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_clip=function(e){return this._parse_tag_clip_or_iclip("clip",e)},e.prototype.parse_tag_fad=function(e){var t=new h(e);if(null===this.read(t,"fad"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),
null;var i=this.parse_decimal(t);return null===i?(e.pop(),null):null===this.read(t,")")?(e.pop(),null):(t.value=new a.Fade(n.value/1e3,i.value/1e3),t)},e.prototype.parse_tag_fade=function(e){var t=new h(e);if(null===this.read(t,"fade"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var i=this.parse_decimal(t);if(null===i)return e.pop(),null;if(null===this.read(t,","))return e.pop(),
null;var r=this.parse_decimal(t);if(null===r)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var s=this.parse_decimal(t);if(null===s)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var o=this.parse_decimal(t);if(null===o)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var l=this.parse_decimal(t);if(null===l)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var c=this.parse_decimal(t);return null===c?(e.pop(),null):null===this.read(t,")")?(e.pop(),
null):(t.value=new a.ComplexFade(1-n.value/255,1-i.value/255,1-r.value/255,s.value/1e3,o.value/1e3,l.value/1e3,c.value/1e3),t)},e.prototype.parse_tag_fax=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fay=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fn=function(e){var t=new h(e);if(null===this.read(t,"fn"))return e.pop(),null;for(var n=new h(t,""),i=this._peek();this._haveMore()&&"\\"!==i&&"}"!==i;i=this._peek())n.value+=i;return n.value.length>0?t.value=new a.FontName(n.value):t.value=new a.FontName(null),
t},e.prototype.parse_tag_fr=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_frx=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fry=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_frz=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fs=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fsplus=function(e){var t=new h(e);if(null===this.read(t,"fs+"))return e.pop(),
null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new a.FontSizePlus(n.value),t)},e.prototype.parse_tag_fsminus=function(e){var t=new h(e);if(null===this.read(t,"fs-"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new a.FontSizeMinus(n.value),t)},e.prototype.parse_tag_fscx=function(e){var t=new h(e);if(null===this.read(t,"fscx"))return e.pop(),null;var n=this.parse_decimal(t);return null!==n?t.value=new a.FontScaleX(n.value/100):t.value=new a.FontScaleX(null),
t},e.prototype.parse_tag_fscy=function(e){var t=new h(e);if(null===this.read(t,"fscy"))return e.pop(),null;var n=this.parse_decimal(t);return null!==n?t.value=new a.FontScaleY(n.value/100):t.value=new a.FontScaleY(null),t},e.prototype.parse_tag_fsp=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_i=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_iclip=function(e){return this._parse_tag_clip_or_iclip("iclip",e)},e.prototype.parse_tag_k=function(e){
var t=new h(e);if(null===this.read(t,"k"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new a.ColorKaraoke(n.value/100),t)},e.prototype.parse_tag_K=function(e){var t=new h(e);if(null===this.read(t,"K"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new a.SweepingColorKaraoke(n.value/100),t)},e.prototype.parse_tag_kf=function(e){var t=new h(e);if(null===this.read(t,"kf"))return e.pop(),null;var n=this.parse_decimal(t);
return null===n?(e.pop(),null):(t.value=new a.SweepingColorKaraoke(n.value/100),t)},e.prototype.parse_tag_ko=function(e){var t=new h(e);if(null===this.read(t,"ko"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new a.OutlineKaraoke(n.value/100),t)},e.prototype.parse_tag_move=function(e){var t=new h(e);if(null===this.read(t,"move"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),
null;var i=this.parse_decimal(t);if(null===i)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var r=this.parse_decimal(t);if(null===r)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var s=this.parse_decimal(t);if(null===s)return e.pop(),null;var o=null,l=null;if(null!==this.read(t,",")){if(o=this.parse_decimal(t),null===o)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;if(l=this.parse_decimal(t),null===l)return e.pop(),null}return null===this.read(t,")")?(e.pop(),
null):(t.value=new a.Move(n.value,i.value,r.value,s.value,null!==o?o.value/1e3:null,null!==l?l.value/1e3:null),t)},e.prototype.parse_tag_org=function(e){var t=new h(e);if(null===this.read(t,"org"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var i=this.parse_decimal(t);return null===i?(e.pop(),null):null===this.read(t,")")?(e.pop(),null):(t.value=new a.RotationOrigin(n.value,i.value),
t)},e.prototype.parse_tag_p=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_pbo=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_pos=function(e){var t=new h(e);if(null===this.read(t,"pos"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var i=this.parse_decimal(t);return null===i?(e.pop(),null):null===this.read(t,")")?(e.pop(),
null):(t.value=new a.Position(n.value,i.value),t)},e.prototype.parse_tag_q=function(e){var t=new h(e);if(null===this.read(t,"q"))return e.pop(),null;var n=this._peek();if(n<"0"||n>"3")return e.pop(),null;var i=new h(t,n);return t.value=new a.WrappingStyle(parseInt(i.value)),t},e.prototype.parse_tag_r=function(e){var t=new h(e);if(null===this.read(t,"r"))return e.pop(),null;for(var n=new h(t,""),i=this._peek();this._haveMore()&&"\\"!==i&&"}"!==i;i=this._peek())n.value+=i;return n.value.length>0?t.value=new a.Reset(n.value):t.value=new a.Reset(null),
t},e.prototype.parse_tag_s=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_shad=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_t=function(e){var t=new h(e);if(null===this.read(t,"t"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=null,i=null,r=null,s=this.parse_decimal(t);if(null!==s){if(null===this.read(t,","))return e.pop(),null;var o=this.parse_decimal(t);if(null!==o){if(n=s,i=o,null===this.read(t,","))return e.pop(),
null;var l=this.parse_decimal(t);if(null!==l&&(r=l,null===this.read(t,",")))return e.pop(),null}else if(r=s,null===this.read(t,","))return e.pop(),null}for(var c=[],u=this._peek();this._haveMore()&&")"!==u&&"}"!==u;u=this._peek()){var d=null;if(null!==this.read(t,"\\")&&(d=this.parse_tag_alpha(t)||this.parse_tag_iclip(t)||this.parse_tag_xbord(t)||this.parse_tag_ybord(t)||this.parse_tag_xshad(t)||this.parse_tag_yshad(t)||this.parse_tag_blur(t)||this.parse_tag_bord(t)||this.parse_tag_clip(t)||this.parse_tag_fscx(t)||this.parse_tag_fscy(t)||this.parse_tag_shad(t)||this.parse_tag_fax(t)||this.parse_tag_fay(t)||this.parse_tag_frx(t)||this.parse_tag_fry(t)||this.parse_tag_frz(t)||this.parse_tag_fsp(t)||this.parse_tag_fsplus(t)||this.parse_tag_fsminus(t)||this.parse_tag_be(t)||this.parse_tag_fr(t)||this.parse_tag_fs(t)||this.parse_tag_1a(t)||this.parse_tag_1c(t)||this.parse_tag_2a(t)||this.parse_tag_2c(t)||this.parse_tag_3a(t)||this.parse_tag_3c(t)||this.parse_tag_4a(t)||this.parse_tag_4c(t)||this.parse_tag_c(t),
null===d&&t.pop()),null===d&&(d=this.parse_comment(t)),null===d)return e.pop(),null;d.value instanceof a.Comment&&c[c.length-1]instanceof a.Comment?c[c.length-1]=new a.Comment(c[c.length-1].value+d.value.value):c.push(d.value)}return this.read(t,")"),t.value=new a.Transform(null!==n?n.value/1e3:null,null!==i?i.value/1e3:null,null!==r?r.value/1e3:null,c),t},e.prototype.parse_tag_u=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_xbord=function(){throw new Error("Method not implemented.");
},e.prototype.parse_tag_xshad=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_ybord=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_yshad=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_1a=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_1c=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_2a=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_2c=function(){
throw new Error("Method not implemented.")},e.prototype.parse_tag_3a=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_3c=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_4a=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_4c=function(){throw new Error("Method not implemented.")},e.prototype.parse_drawingInstructions=function(e){var t=new h(e),n=null,i=[];for(t.value=[];this._haveMore();){for(;null!==this.read(t," "););
if(!this._haveMore())break;if(null!==n){var r=this.parse_decimal(t);if(null!==r){i.push(r),"m"===n&&2===i.length?(t.value.push(new a.drawing.MoveInstruction(i[0].value,i[1].value)),i.splice(0,i.length)):"l"===n&&2===i.length?(t.value.push(new a.drawing.LineInstruction(i[0].value,i[1].value)),i.splice(0,i.length)):"b"===n&&6===i.length&&(t.value.push(new a.drawing.CubicBezierCurveInstruction(i[0].value,i[1].value,i[2].value,i[3].value,i[4].value,i[5].value)),i.splice(0,i.length));continue}}var s=this.parse_text(t);
if(null===s)break;var o=s.value.value;switch(o){case"m":case"l":case"b":n=o,i.splice(0,i.length)}}for(;null!==this.read(t," "););return t},e.prototype.parse_decimalInt32=function(e){for(var t=new h(e),n=null!==this.read(t,"-"),i=new h(t,""),a=this._peek();this._haveMore()&&a>="0"&&a<="9";a=this._peek())i.value+=a;if(0===i.value.length)return e.pop(),null;var r=parseInt(i.value);return r>=4294967295?r=4294967295:n&&(r=-r),t.value=r,t},e.prototype.parse_hexInt32=function(e){for(var t=new h(e),n=null!==this.read(t,"-"),i=new h(t,""),a=this._peek();this._haveMore()&&(a>="0"&&a<="9"||a>="a"&&a<="f"||a>="A"&&a<="F");a=this._peek())i.value+=a;
if(0===i.value.length)return e.pop(),null;var r=parseInt(i.value,16);return r>=4294967295?r=4294967295:n&&(r=-r),t.value=r,t},e.prototype.parse_decimalOrHexInt32=function(e){var t=new h(e),n=null!==this.read(t,"&H")||null!==this.read(t,"&h")?this.parse_hexInt32(t):this.parse_decimalInt32(t);return null===n?(e.pop(),null):(t.value=n.value,t)},e.prototype.parse_decimal=function(e){var t=new h(e),n=null!==this.read(t,"-"),i=this.parse_unsignedDecimal(t);return null===i?(e.pop(),null):(t.value=i.value,
n&&(t.value=-t.value),t)},e.prototype.parse_unsignedDecimal=function(e){for(var t=new h(e),n=new h(t,""),i=null,a=this._peek();this._haveMore()&&a>="0"&&a<="9";a=this._peek())n.value+=a;if(0===n.value.length)return e.pop(),null;if(null!==this.read(t,".")){i=new h(t,"");for(var a=this._peek();this._haveMore()&&a>="0"&&a<="9";a=this._peek())i.value+=a;if(0===i.value.length)return e.pop(),null}return t.value=parseFloat(n.value+(null!==i?"."+i.value:"")),t},e.prototype.parse_enableDisable=function(e){
var t=this._peek();if("0"===t||"1"===t){var n=new h(e,t);return n.value="1"===n.value,n}return null},e.prototype.parse_color=function(e){for(var t=new h(e);null!==this.read(t,"&")||null!==this.read(t,"H"););var n=this.parse_hexInt32(t);if(null===n)return e.pop(),null;var i=n.value;for(t.value=new a.Color(255&i,i>>8&255,i>>16&255);null!==this.read(t,"&")||null!==this.read(t,"H"););return t},e.prototype.parse_alpha=function(e){for(var t=new h(e);null!==this.read(t,"&")||null!==this.read(t,"H"););var n=this.parse_hexInt32(t);
if(null===n)return e.pop(),null;var i=n.value;for(t.value=1-(255&i)/255;null!==this.read(t,"&")||null!==this.read(t,"H"););return t},e.prototype.parse_colorWithAlpha=function(e){var t=new h(e),n=this.parse_decimalOrHexInt32(t);if(null===n)return e.pop(),null;var i=n.value;return t.value=new a.Color(255&i,i>>8&255,i>>16&255,1-(i>>24&255)/255),t},e.prototype.read=function(e,t){return this._peek(t.length)!==t?null:new h(e,t)},e.prototype._peek=function(e){return void 0===e&&(e=1),1===e?this._input[this._parseTree.end]:this._input.substr(this._parseTree.end,e);
},e.prototype._haveMore=function(){return this._parseTree.end<this._input.length},e.prototype._parse_tag_clip_or_iclip=function(e,t){var i=new h(t);if(null===this.read(i,e))return t.pop(),null;if(null===this.read(i,"("))return t.pop(),null;var r=null,s=null,o=null,l=null,c=null,u=null,d=this.parse_decimal(i);if(null!==d){if(null===this.read(i,","))return t.pop(),null;var p=this.parse_decimal(i);null!==p?(r=d,o=p):c=d}if(null!==r&&null!==o){if(null===this.read(i,","))return t.pop(),null;if(s=this.parse_decimal(i),
null===this.read(i,","))return t.pop(),null;l=this.parse_decimal(i),i.value=new a.RectangularClip(r.value,o.value,s.value,l.value,"clip"===e)}else{u=new h(i,"");for(var f=this._peek();this._haveMore()&&")"!==f&&"}"!==f;f=this._peek())u.value+=f;i.value=new a.VectorClip(null!==c?c.value:1,n(u.value,"drawingInstructions"),"clip"===e)}return null===this.read(i,")")?(t.pop(),null):i},e}();i("alpha",a.Alpha,l.prototype.parse_alpha,!1),i("be",a.Blur,l.prototype.parse_decimal,!1),i("blur",a.GaussianBlur,l.prototype.parse_decimal,!1),
i("bord",a.Border,l.prototype.parse_decimal,!1),i("c",a.PrimaryColor,l.prototype.parse_color,!1),i("fax",a.SkewX,l.prototype.parse_decimal,!1),i("fay",a.SkewY,l.prototype.parse_decimal,!1),i("fr",a.RotateZ,l.prototype.parse_decimal,!1),i("frx",a.RotateX,l.prototype.parse_decimal,!1),i("fry",a.RotateY,l.prototype.parse_decimal,!1),i("frz",a.RotateZ,l.prototype.parse_decimal,!1),i("fs",a.FontSize,l.prototype.parse_decimal,!1),i("fsp",a.LetterSpacing,l.prototype.parse_decimal,!1),i("i",a.Italic,l.prototype.parse_enableDisable,!1),
i("p",a.DrawingMode,l.prototype.parse_decimal,!0),i("pbo",a.DrawingBaselineOffset,l.prototype.parse_decimal,!0),i("s",a.StrikeThrough,l.prototype.parse_enableDisable,!1),i("shad",a.Shadow,l.prototype.parse_decimal,!1),i("u",a.Underline,l.prototype.parse_enableDisable,!1),i("xbord",a.BorderX,l.prototype.parse_decimal,!1),i("xshad",a.ShadowX,l.prototype.parse_decimal,!1),i("ybord",a.BorderY,l.prototype.parse_decimal,!1),i("yshad",a.ShadowY,l.prototype.parse_decimal,!1),i("1a",a.PrimaryAlpha,l.prototype.parse_alpha,!1),
i("1c",a.PrimaryColor,l.prototype.parse_color,!1),i("2a",a.SecondaryAlpha,l.prototype.parse_alpha,!1),i("2c",a.SecondaryColor,l.prototype.parse_color,!1),i("3a",a.OutlineAlpha,l.prototype.parse_alpha,!1),i("3c",a.OutlineColor,l.prototype.parse_color,!1),i("4a",a.ShadowAlpha,l.prototype.parse_alpha,!1),i("4c",a.ShadowColor,l.prototype.parse_color,!1);for(var c=0,u=Object.keys(l.prototype);c<u.length;c++){var d=u[c];0===d.indexOf("parse_")&&"function"==typeof l.prototype[d]&&o.set(d.substr("parse_".length),l.prototype[d]);
}var h=function(){function e(e,t){void 0===t&&(t=null),this._parent=e,this._children=[],null!==e&&e.children.push(this),this._start=null!==e?e.end:0,this._end=this._start,this.value=t}return Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e,null!==this._value&&this._value.constructor===String&&0===this._children.length&&this._setEnd(this._start+this._value.length)},enumerable:!0,configurable:!0}),e.prototype.pop=function(){this._children.splice(this._children.length-1,1),this._children.length>0?this._setEnd(this._children[this._children.length-1].end):this._setEnd(this.start);
},e.prototype._setEnd=function(e){this._end=e,null!==this._parent&&this._parent.end!==this._end&&this._parent._setEnd(this._end)},e}(),p=t(32),f=t(36),g=t(38);g.registerWorkerCommand(f.WorkerCommands.Parse,function(e){return new p.Promise(function(t){t(n(e.input,e.rule))})})},function(e,t){function n(e){for(var t="",n=0;n<e.length;n++){var i=e.charCodeAt(n)-33;if(i<0||i>63)throw new Error("Out-of-range character code "+i+" at index "+n+" in string "+e);t+=i<26?String.fromCharCode("A".charCodeAt(0)+i):i<52?String.fromCharCode("a".charCodeAt(0)+i-26):i<62?String.fromCharCode("0".charCodeAt(0)+i-52):62===i?"+":"/";
}return t}var i,a=t(23),r=t(24),s=t(29),o=t(26),l=t(25),c=t(30),u=t(32),d=t(2);!function(e){e[e.ScriptInfo=0]="ScriptInfo",e[e.Styles=1]="Styles",e[e.Events=2]="Events",e[e.Fonts=3]="Fonts",e[e.Graphics=4]="Graphics",e[e.Other=5]="Other",e[e.EOF=6]="EOF"}(i||(i={}));var h=function(){function e(e){var t=this;this._stream=e,this._ass=new r.ASS,this._minimalDeferred=new u.DeferredPromise,this._deferred=new u.DeferredPromise,this._shouldSwallowBom=!0,this._currentSection=i.ScriptInfo,this._currentAttachment=null,
this._stream.nextLine().then(function(e){return t._onNextLine(e)},function(e){t._minimalDeferred.reject(e),t._deferred.reject(e)})}return Object.defineProperty(e.prototype,"minimalASS",{get:function(){return this._minimalDeferred.promise},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ass",{get:function(){return this._deferred.promise},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentSection",{get:function(){return this._currentSection},set:function(e){
if(null!==this._currentAttachment&&(this._ass.addAttachment(this._currentAttachment),this._currentAttachment=null),this._currentSection===i.ScriptInfo&&e!==i.ScriptInfo&&this._minimalDeferred.resolve(this._ass),e===i.EOF){var t=this._ass.properties;void 0===t.resolutionX||void 0===t.resolutionY?(this._minimalDeferred.reject("Malformed ASS script."),this._deferred.reject("Malformed ASS script.")):(this._minimalDeferred.resolve(this._ass),this._deferred.resolve(this._ass))}this._currentSection=e},enumerable:!0,
configurable:!0}),e.prototype._onNextLine=function(e){var t=this;if(null===e)return void(this.currentSection=i.EOF);if("\r"===e[e.length-1]&&(e=e.substr(0,e.length-1)),65279===e.charCodeAt(0)&&this._shouldSwallowBom&&(e=e.substr(1)),this._shouldSwallowBom=!1,""===e);else if(";"===e[0]&&null===this._currentAttachment);else if("[Script Info]"===e)this.currentSection=i.ScriptInfo;else if("[V4+ Styles]"===e||"[V4 Styles]"===e)this.currentSection=i.Styles;else if("[Events]"===e)this.currentSection=i.Events;else if("[Fonts]"===e)this.currentSection=i.Fonts;else if("[Graphics]"===e)this.currentSection=i.Graphics;else switch(null===this._currentAttachment&&"["===e[0]&&"]"===e[e.length-1]&&(this.currentSection=i.Other),
this.currentSection){case i.ScriptInfo:var r=d.parseLineIntoProperty(e);if(null!==r)switch(r.name){case"PlayResX":this._ass.properties.resolutionX=parseInt(r.value);break;case"PlayResY":this._ass.properties.resolutionY=parseInt(r.value);break;case"WrapStyle":this._ass.properties.wrappingStyle=parseInt(r.value);break;case"ScaledBorderAndShadow":this._ass.properties.scaleBorderAndShadow="yes"===r.value}break;case i.Styles:if(null===this._ass.stylesFormatSpecifier){var s=d.parseLineIntoProperty(e);null!==s&&"Format"===s.name&&(this._ass.stylesFormatSpecifier=s.value.split(",").map(function(e){
return e.trim()}))}else try{this._ass.addStyle(e)}catch(t){a.debugMode&&console.error("Could not parse style from line "+e+" - "+(t.stack||t))}break;case i.Events:if(null===this._ass.dialoguesFormatSpecifier){var o=d.parseLineIntoProperty(e);null!==o&&"Format"===o.name&&(this._ass.dialoguesFormatSpecifier=o.value.split(",").map(function(e){return e.trim()}))}else try{this._ass.addEvent(e)}catch(t){a.debugMode&&console.error("Could not parse event from line "+e+" - "+(t.stack||t))}break;case i.Fonts:
case i.Graphics:var c=this.currentSection===i.Fonts?/^fontname:(.+)/:/^filename:(.+)/,u=c.exec(e);if(null!==u)null!==this._currentAttachment&&(this._ass.addAttachment(this._currentAttachment),this._currentAttachment=null),this._currentAttachment=new l.Attachment(u[1].trim(),this.currentSection===i.Fonts?l.AttachmentType.Font:l.AttachmentType.Graphic);else if(null!==this._currentAttachment)try{this._currentAttachment.contents+=n(e)}catch(e){a.debugMode&&console.error("Encountered error while reading font "+this._currentAttachment.filename+": %o",e),
this._currentAttachment=null}break;case i.Other:break;default:throw new Error("Unhandled state "+this.currentSection)}this._stream.nextLine().then(function(e){return t._onNextLine(e)},function(e){t._minimalDeferred.reject(e),t._deferred.reject(e)})},e}();e.StreamParser=h;var p=function(){function e(e){var t=this;this._stream=e,this._ass=new r.ASS,this._deferred=new u.DeferredPromise,this._shouldSwallowBom=!0,this._currentDialogueNumber=null,this._currentDialogueStart=null,this._currentDialogueEnd=null,
this._currentDialogueText=null,this._stream.nextLine().then(function(e){return t._onNextLine(e)},function(e){t._deferred.reject(e)}),this._ass.properties.resolutionX=1280,this._ass.properties.resolutionY=720,this._ass.properties.wrappingStyle=1,this._ass.properties.scaleBorderAndShadow=!0;var n=new s.Style(new c.Map([["Name","Default"],["FontSize","36"]]));this._ass.styles.set(n.name,n)}return Object.defineProperty(e.prototype,"ass",{get:function(){return this._deferred.promise},enumerable:!0,configurable:!0
}),e.prototype._onNextLine=function(e){var t=this;if(null===e)return null!==this._currentDialogueNumber&&null!==this._currentDialogueStart&&null!==this._currentDialogueEnd&&null!==this._currentDialogueText&&this._ass.dialogues.push(new o.Dialogue(new c.Map([["Style","Default"],["Start",this._currentDialogueStart],["End",this._currentDialogueEnd],["Text",this._currentDialogueText]]),this._ass)),void this._deferred.resolve(this._ass);if("\r"===e[e.length-1]&&(e=e.substr(0,e.length-1)),65279===e.charCodeAt(0)&&this._shouldSwallowBom&&(e=e.substr(1)),
this._shouldSwallowBom=!1,""===e)null!==this._currentDialogueNumber&&null!==this._currentDialogueStart&&null!==this._currentDialogueEnd&&null!==this._currentDialogueText&&this._ass.dialogues.push(new o.Dialogue(new c.Map([["Style","Default"],["Start",this._currentDialogueStart],["End",this._currentDialogueEnd],["Text",this._currentDialogueText]]),this._ass)),this._currentDialogueNumber=this._currentDialogueStart=this._currentDialogueEnd=this._currentDialogueText=null;else if(null===this._currentDialogueNumber)/^\d+$/.test(e)&&(this._currentDialogueNumber=e);else if(null===this._currentDialogueStart&&null===this._currentDialogueEnd){
var n=/^(\d\d:\d\d:\d\d,\d\d\d) --> (\d\d:\d\d:\d\d,\d\d\d)/.exec(e);null!==n&&(this._currentDialogueStart=n[1].replace(",","."),this._currentDialogueEnd=n[2].replace(",","."))}else e=e.replace(/<b>/g,"{\\b1}").replace(/\{b\}/g,"{\\b1}").replace(/<\/b>/g,"{\\b0}").replace(/\{\/b\}/g,"{\\b0}").replace(/<i>/g,"{\\i1}").replace(/\{i\}/g,"{\\i1}").replace(/<\/i>/g,"{\\i0}").replace(/\{\/i\}/g,"{\\i0}").replace(/<u>/g,"{\\u1}").replace(/\{u\}/g,"{\\u1}").replace(/<\/u>/g,"{\\u0}").replace(/\{\/u\}/g,"{\\u0}").replace(/<font color="#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})">/g,function(e,t,n,i){
return"{c&H"+i+n+t+"&}"}).replace(/<\/font>/g,"{\\c}"),null!==this._currentDialogueText?this._currentDialogueText+="\\N"+e:this._currentDialogueText=e;this._stream.nextLine().then(function(e){return t._onNextLine(e)},function(e){t._deferred.reject(e)})},e}();e.SrtStreamParser=p},function(t,n){var i=n(32),a=function(){function e(e){this._str=e,this._readTill=0}return e.prototype.nextLine=function(){var e=null;if(this._readTill<this._str.length){var t=this._str.indexOf("\n",this._readTill);t!==-1?(e=i.Promise.resolve(this._str.substring(this._readTill,t)),
this._readTill=t+1):(e=i.Promise.resolve(this._str.substr(this._readTill)),this._readTill=this._str.length)}else e=i.Promise.resolve(null);return e},e}();t.StringStream=a;var r=function(){function e(e){var t=this;this._xhr=e,this._readTill=0,this._pendingDeferred=null,this._failedError=null,e.addEventListener("progress",function(){return t._onXhrProgress()},!1),e.addEventListener("load",function(){return t._onXhrLoad()},!1),e.addEventListener("error",function(e){return t._onXhrError(e)},!1)}return e.prototype.nextLine=function(){
if(null!==this._pendingDeferred)throw new Error("XhrStream only supports one pending unfulfilled read at a time.");var e=this._pendingDeferred=new i.DeferredPromise;return this._tryResolveNextLine(),e.promise},e.prototype._onXhrProgress=function(){null!==this._pendingDeferred&&this._xhr.readyState!==XMLHttpRequest.DONE&&this._tryResolveNextLine()},e.prototype._onXhrLoad=function(){null!==this._pendingDeferred&&this._tryResolveNextLine()},e.prototype._onXhrError=function(e){this._failedError=e,null!==this._pendingDeferred&&this._tryResolveNextLine();
},e.prototype._tryResolveNextLine=function(){if(null!==this._failedError)return void this._pendingDeferred.reject(this._failedError);var e=this._xhr.responseText,t=e.indexOf("\n",this._readTill);t!==-1?(this._pendingDeferred.resolve(e.substring(this._readTill,t)),this._readTill=t+1,this._pendingDeferred=null):this._xhr.readyState===XMLHttpRequest.DONE&&(null!==this._failedError?this._pendingDeferred.reject(this._failedError):this._readTill<e.length?(this._pendingDeferred.resolve(e.substr(this._readTill)),
this._readTill=e.length):this._pendingDeferred.resolve(null),this._pendingDeferred=null)},e}();t.XhrStream=r;var s=function(){function t(t,n){this._buffer="",this._pendingDeferred=null,this._reader=t.getReader(),this._decoder=new e.TextDecoder(n,{ignoreBOM:!0})}return t.prototype.nextLine=function(){if(null!==this._pendingDeferred)throw new Error("BrowserReadableStream only supports one pending unfulfilled read at a time.");var e=this._pendingDeferred=new i.DeferredPromise;return this._tryResolveNextLine(),
e.promise},t.prototype._tryResolveNextLine=function(){var e=this,t=this._buffer.indexOf("\n");t!==-1?(this._pendingDeferred.resolve(this._buffer.substr(0,t)),this._buffer=this._buffer.substr(t+1),this._pendingDeferred=null):this._reader.read().then(function(t){var n=t.value,i=t.done;i?(0===e._buffer.length?e._pendingDeferred.resolve(null):(e._pendingDeferred.resolve(e._buffer),e._buffer=""),e._pendingDeferred=null):(e._buffer+=e._decoder.decode(n,{stream:!0}),e._tryResolveNextLine())})},t}();t.BrowserReadableStream=s;
},function(e,t){function n(e){for(var t=atob(e.contents),n=new Uint8Array(new ArrayBuffer(t.length)),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);for(var a={dataView:new DataView(n.buffer),position:0},r=u.read(a),s=null,i=0;i<r.numTables;i++){var o=d.read(a);if(o.c1+o.c2+o.c3+o.c4==="name"){s=o;break}}a.position=s.offset;for(var c=h.read(a),f=new l.Set,i=0;i<c.count;i++){var g=p.read(a);switch(g.nameId){case 1:case 4:case 6:var m=s.offset+c.stringOffset+g.offset,v=n.subarray(m,m+g.length);switch(g.platformId){
case 1:for(var y="",b=0;b<v.length;b++)y+=String.fromCharCode(v[b]);f.add(y);break;case 3:for(var S="",b=0;b<v.length;b+=2)S+=String.fromCharCode((v[b]<<8)+v[b+1]);f.add(S)}}}return f}function i(e){var t=e.__fields;return e.read=function(n){for(var i=new e,a=0;a<t.length;a++){var s=t[a],o=void 0;switch(s.type){case r.Char:o=String.fromCharCode(n.dataView.getInt8(n.position)),n.position+=1;break;case r.Uint16:o=n.dataView.getUint16(n.position),n.position+=2;break;case r.Uint32:o=n.dataView.getUint32(n.position),
n.position+=4}i[s.field]=o}return i},e}function a(e){var t=c.get(e);return void 0===t&&(t=function(t,n){var i=t.constructor;void 0===i.__fields&&(i.__fields=[]),i.__fields.push({type:e,field:n})},c.set(e,t)),t}var r,s=t(34).__decorate,o=t(30),l=t(33);!function(e){e[e.Char=0]="Char",e[e.Uint16=1]="Uint16",e[e.Uint32=2]="Uint32"}(r||(r={}));var c=new o.Map,u=function(){function e(){}return s([a(r.Uint16)],e.prototype,"majorVersion",void 0),s([a(r.Uint16)],e.prototype,"minorVersion",void 0),s([a(r.Uint16)],e.prototype,"numTables",void 0),
s([a(r.Uint16)],e.prototype,"searchRange",void 0),s([a(r.Uint16)],e.prototype,"entrySelector",void 0),s([a(r.Uint16)],e.prototype,"rangeShift",void 0),e=s([i],e)}(),d=function(){function e(){}return s([a(r.Char)],e.prototype,"c1",void 0),s([a(r.Char)],e.prototype,"c2",void 0),s([a(r.Char)],e.prototype,"c3",void 0),s([a(r.Char)],e.prototype,"c4",void 0),s([a(r.Uint32)],e.prototype,"checksum",void 0),s([a(r.Uint32)],e.prototype,"offset",void 0),s([a(r.Uint32)],e.prototype,"length",void 0),e=s([i],e);
}(),h=function(){function e(){}return s([a(r.Uint16)],e.prototype,"formatSelector",void 0),s([a(r.Uint16)],e.prototype,"count",void 0),s([a(r.Uint16)],e.prototype,"stringOffset",void 0),e=s([i],e)}(),p=function(){function e(){}return s([a(r.Uint16)],e.prototype,"platformId",void 0),s([a(r.Uint16)],e.prototype,"encodingId",void 0),s([a(r.Uint16)],e.prototype,"languageId",void 0),s([a(r.Uint16)],e.prototype,"nameId",void 0),s([a(r.Uint16)],e.prototype,"length",void 0),s([a(r.Uint16)],e.prototype,"offset",void 0),
e=s([i],e)}();e.getTtfNames=n},function(e){var t=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),e}();e.MoveInstruction=t;var n=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{
get:function(){return this._y},enumerable:!0,configurable:!0}),e}();e.LineInstruction=n;var i=function(){function e(e,t,n,i,a,r){this._x1=e,this._y1=t,this._x2=n,this._y2=i,this._x3=a,this._y3=r}return Object.defineProperty(e.prototype,"x1",{get:function(){return this._x1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this._y1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x2",{get:function(){return this._x2},enumerable:!0,configurable:!0
}),Object.defineProperty(e.prototype,"y2",{get:function(){return this._y2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x3",{get:function(){return this._x3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y3",{get:function(){return this._y3},enumerable:!0,configurable:!0}),e}();e.CubicBezierCurveInstruction=i},function(e,t){var n=t(7);e.drawing=n;var i=function(){function e(e,t,n,i){void 0===i&&(i=1),this._red=e,this._green=t,this._blue=n,this._alpha=i}return Object.defineProperty(e.prototype,"red",{
get:function(){return this._red},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"green",{get:function(){return this._green},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blue",{get:function(){return this._blue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},enumerable:!0,configurable:!0}),e.prototype.withAlpha=function(t){return null!==t?new e(this._red,this._green,this._blue,t):this},e.prototype.toString=function(){
return"rgba("+this._red+", "+this._green+", "+this._blue+", "+this._alpha.toFixed(3)+")"},e.prototype.interpolate=function(t,n){return new e(this._red+n*(t.red-this._red),this._green+n*(t.green-this._green),this._blue+n*(t.blue-this._blue),this._alpha+n*(t.alpha-this._alpha))},e}();e.Color=i;var a=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Comment=a;var r=function(){function e(e){
this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"Text { value: "+this._value.replace(/\u00A0/g,"\\h")+" }"},e}();e.Text=r;var s=function(){function e(){}return e}();e.NewLine=s;var o=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Italic=o;var l=function(){function e(e){
this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Bold=l;var c=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Underline=c;var u=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.StrikeThrough=u;
var d=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Border=d;var h=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.BorderX=h;var p=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,
configurable:!0}),e}();e.BorderY=p;var f=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Shadow=f;var g=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.ShadowX=g;var m=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){
return this._value},enumerable:!0,configurable:!0}),e}();e.ShadowY=m;var v=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Blur=v;var y=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.GaussianBlur=y;var b=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{
get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontName=b;var S=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontSize=S;var w=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontSizePlus=w;var M=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{
get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontSizeMinus=M;var I=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontScaleX=I;var C=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontScaleY=C;var D=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{
get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.LetterSpacing=D;var T=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.RotateX=T;var x=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.RotateY=x;var P=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{
get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.RotateZ=P;var E=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.SkewX=E;var A=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.SkewY=A;var L=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{
get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.PrimaryColor=L;var k=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.SecondaryColor=k;var N=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.OutlineColor=N;var _=function(){function e(e){this._value=e;
}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.ShadowColor=_;var O=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Alpha=O;var R=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.PrimaryAlpha=R;var j=function(){
function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.SecondaryAlpha=j;var z=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.OutlineAlpha=z;var U=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0
}),e}();e.ShadowAlpha=U;var F=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Alignment=F;var B=function(){function e(e){this._duration=e}return Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e}();e.ColorKaraoke=B;var V=function(){function e(e){this._duration=e}return Object.defineProperty(e.prototype,"duration",{get:function(){
return this._duration},enumerable:!0,configurable:!0}),e}();e.SweepingColorKaraoke=V;var H=function(){function e(e){this._duration=e}return Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e}();e.OutlineKaraoke=H;var W=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.WrappingStyle=W;var Q=function(){function e(e){this._value=e;
}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Reset=Q;var Y=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),e}();e.Position=Y;var G=function(){function e(e,t,n,i,a,r){this._x1=e,this._y1=t,this._x2=n,this._y2=i,this._t1=a,
this._t2=r}return Object.defineProperty(e.prototype,"x1",{get:function(){return this._x1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this._y1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x2",{get:function(){return this._x2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y2",{get:function(){return this._y2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t1",{get:function(){return this._t1;
},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t2",{get:function(){return this._t2},enumerable:!0,configurable:!0}),e}();e.Move=G;var K=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),e}();e.RotationOrigin=K;var q=function(){function e(e,t){this._start=e,this._end=t}return Object.defineProperty(e.prototype,"start",{
get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),e}();e.Fade=q;var Z=function(){function e(e,t,n,i,a,r,s){this._a1=e,this._a2=t,this._a3=n,this._t1=i,this._t2=a,this._t3=r,this._t4=s}return Object.defineProperty(e.prototype,"a1",{get:function(){return this._a1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"a2",{get:function(){return this._a2},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"a3",{get:function(){return this._a3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t1",{get:function(){return this._t1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t2",{get:function(){return this._t2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t3",{get:function(){return this._t3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t4",{get:function(){return this._t4;
},enumerable:!0,configurable:!0}),e}();e.ComplexFade=Z;var X=function(){function e(e,t,n,i){this._start=e,this._end=t,this._accel=n,this._tags=i}return Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accel",{get:function(){return this._accel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tags",{
get:function(){return this._tags},enumerable:!0,configurable:!0}),e}();e.Transform=X;var J=function(){function e(e,t,n,i,a){this._x1=e,this._y1=t,this._x2=n,this._y2=i,this._inside=a}return Object.defineProperty(e.prototype,"x1",{get:function(){return this._x1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this._y1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x2",{get:function(){return this._x2},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"y2",{get:function(){return this._y2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inside",{get:function(){return this._inside},enumerable:!0,configurable:!0}),e}();e.RectangularClip=J;var $=function(){function e(e,t,n){this._scale=e,this._instructions=t,this._inside=n}return Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instructions",{get:function(){
return this._instructions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inside",{get:function(){return this._inside},enumerable:!0,configurable:!0}),e}();e.VectorClip=$;var ee=function(){function e(e){this._scale=e}return Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!0,configurable:!0}),e}();e.DrawingMode=ee;var te=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value;
},enumerable:!0,configurable:!0}),e}();e.DrawingBaselineOffset=te;var ne=function(){function e(e){this._instructions=e}return Object.defineProperty(e.prototype,"instructions",{get:function(){return this._instructions},enumerable:!0,configurable:!0}),e}();e.DrawingInstructions=ne;for(var ie=function(e,t){if(!e.prototype.hasOwnProperty("toString")){var n=Object.getOwnPropertyNames(e.prototype).filter(function(e){return"constructor"!==e});e.prototype.toString=function(){var e=this;return t+" { "+n.map(function(t){
return t+": "+e[t]}).join(", ")+(n.length>0?" ":"")+"}"}}},ae=t(38),re=0,se=Object.keys(e);re<se.length;re++){var oe=se[re],le=e[oe];le instanceof Function&&(ie(le,oe),ae.registerClassPrototype(le.prototype))}for(var ce=0,ue=Object.keys(n);ce<ue.length;ce++){var oe=ue[ce],le=n[oe];le instanceof Function&&(ie(le,"Drawing"+oe),ae.registerClassPrototype(le.prototype))}},function(e,t){var n=t(23),i=t(11),a=function(){function e(e,t){this._getCurrentTime=e,this._autoPauseAfter=t,this._manualClock=new i.ManualClock,
this._nextAnimationFrameRequestId=null,this._lastKnownExternalTime=null,this._lastKnownExternalTimeObtainedAt=null}return e.prototype.play=function(){this._manualClock.enabled&&(this._startTicking(),this._manualClock.play())},e.prototype.pause=function(){if(this._manualClock.enabled){if(null===this._nextAnimationFrameRequestId)return void(n.debugMode&&console.warn("AutoClock.pause: Abnormal state detected. AutoClock._nextAnimationFrameRequestId should not have been null."));this._stopTicking(),this._manualClock.pause();
}},e.prototype.seeking=function(){this._manualClock.seek(this._getCurrentTime())},Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._manualClock.currentTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._manualClock.enabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._manualClock.paused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rate",{
get:function(){return this._manualClock.rate},enumerable:!0,configurable:!0}),e.prototype.setRate=function(e){this._manualClock.setRate(e)},e.prototype.enable=function(){return!!this._manualClock.enable()&&(this._startTicking(),!0)},e.prototype.disable=function(){return!!this._manualClock.disable()&&(this._stopTicking(),!0)},e.prototype.toggle=function(){this._manualClock.enabled?this.disable():this.enable()},e.prototype.setEnabled=function(e){return e?this.enable():this.disable()},e.prototype.addEventListener=function(e,t){
this._manualClock.addEventListener(e,t)},e.prototype._onTimerTick=function(e){var t=this;if(!this._manualClock.enabled)return void(n.debugMode&&console.warn("AutoClock._onTimerTick: Called when disabled."));var i=this._manualClock.currentTime,a=this._getCurrentTime();this._manualClock.paused?i!==a&&(this._lastKnownExternalTime=a,this._lastKnownExternalTimeObtainedAt=e,this._manualClock.tick(a)):null!==this._lastKnownExternalTime&&a===this._lastKnownExternalTime?e-this._lastKnownExternalTimeObtainedAt>this._autoPauseAfter?(this._lastKnownExternalTimeObtainedAt=null,
this._manualClock.pause()):this._manualClock.tick((e-this._lastKnownExternalTimeObtainedAt)/1e3*this._manualClock.rate+this._lastKnownExternalTime):(this._lastKnownExternalTime=a,this._lastKnownExternalTimeObtainedAt=e,this._manualClock.tick(a)),this._nextAnimationFrameRequestId=requestAnimationFrame(function(e){return t._onTimerTick(e)})},e.prototype._startTicking=function(){var e=this;null===this._nextAnimationFrameRequestId&&(this._nextAnimationFrameRequestId=requestAnimationFrame(function(t){
return e._onTimerTick(t)}))},e.prototype._stopTicking=function(){null!==this._nextAnimationFrameRequestId&&(cancelAnimationFrame(this._nextAnimationFrameRequestId),this._nextAnimationFrameRequestId=null)},e}();e.AutoClock=a},function(e){var t=function(){function e(){}return e.prototype.addEventListener=function(e,t){var n=this._eventListeners.get(e);void 0===n&&this._eventListeners.set(e,n=[]),n.push(t)},e.prototype._dispatchEvent=function(e,t){var n=this._eventListeners.get(e);if(void 0!==n)for(var i=0;i<n.length;i++){
var a=n[i];a.apply(this,t)}},e}();e.EventSource=t,function(e){e[e.Play=0]="Play",e[e.Tick=1]="Tick",e[e.Pause=2]="Pause",e[e.Stop=3]="Stop",e[e.RateChange=4]="RateChange"}(e.ClockEvent||(e.ClockEvent={}))},function(e,t){var n=t(31),i=t(30),a=t(10),r=function(){function e(){this._currentTime=-1,this._rate=1,this._enabled=!0,this._paused=!0,this._eventListeners=new i.Map}return e.prototype.play=function(){this._enabled&&this._paused&&(this._paused=!1,this._dispatchEvent(a.ClockEvent.Play,[]))},e.prototype.tick=function(e){
this._enabled&&this._currentTime!==e&&(this.play(),this._currentTime=e,this._dispatchEvent(a.ClockEvent.Tick,[]))},e.prototype.seek=function(e){this._enabled&&(this.pause(),this._currentTime!==e&&(this.stop(),this.tick(e),this.pause()))},e.prototype.pause=function(){this._enabled&&(this._paused||(this._paused=!0,this._dispatchEvent(a.ClockEvent.Pause,[])))},e.prototype.stop=function(){this._dispatchEvent(a.ClockEvent.Stop,[])},Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._currentTime;
},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._paused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rate",{get:function(){return this._rate},enumerable:!0,configurable:!0}),e.prototype.setRate=function(e){this._rate!==e&&(this._rate=e,this._dispatchEvent(a.ClockEvent.RateChange,[]))},e.prototype.enable=function(){
return!this._enabled&&(this._enabled=!0,!0)},e.prototype.disable=function(){return!!this._enabled&&(this.pause(),this.stop(),this._enabled=!1,!0)},e.prototype.toggle=function(){this._enabled?this.disable():this.enable()},e.prototype.setEnabled=function(e){return e?this.enable():this.disable()},e}();e.ManualClock=r,n.mixin(r,[a.EventSource])},function(e,t){var n=t(9),i=function(){function e(e){var t=this;this._autoClock=new n.AutoClock(function(){return e.currentTime},100),e.addEventListener("playing",function(){
return t._autoClock.play()},!1),e.addEventListener("pause",function(){return t._autoClock.pause()},!1),e.addEventListener("seeking",function(){return t._autoClock.seeking()},!1),e.addEventListener("ratechange",function(){return t._autoClock.setRate(e.playbackRate)},!1)}return Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._autoClock.currentTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._autoClock.enabled},
enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._autoClock.paused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rate",{get:function(){return this._autoClock.rate},enumerable:!0,configurable:!0}),e.prototype.enable=function(){return this._autoClock.enable()},e.prototype.disable=function(){return this._autoClock.disable()},e.prototype.toggle=function(){this._autoClock.enabled?this.disable():this.enable()},e.prototype.setEnabled=function(e){
return e?this.enable():this.disable()},e.prototype.addEventListener=function(e,t){this._autoClock.addEventListener(e,t)},e}();e.VideoClock=i},function(e,t){var n=t(34).__extends,i=t(12),a=t(21),r=function(e){function t(t,n,a){e.call(this,n,new i.VideoClock(t),document.createElement("div"),a),this._video=t,this._video.parentElement.replaceChild(this.libjassSubsWrapper,this._video),this.libjassSubsWrapper.insertBefore(this._video,this.libjassSubsWrapper.firstElementChild)}return n(t,e),t.prototype.resize=function(){
var t=this._video.videoWidth,n=this._video.videoHeight,i=this._video.offsetWidth,a=this._video.offsetHeight,r=Math.min(i/t,a/n),s=t*r,o=n*r,l=(i-s)/2,c=(a-o)/2;e.prototype.resize.call(this,s,o,l,c)},t.prototype.resizeVideo=function(){console.warn("`DefaultRenderer.resizeVideo(width, height)` has been deprecated. Use `DefaultRenderer.resize()` instead."),this.resize()},t.prototype._ready=function(){this.resize(),e.prototype._ready.call(this)},t}(a.WebRenderer);e.DefaultRenderer=r},function(e,t){var n=t(10);
e.ClockEvent=n.ClockEvent,e.EventSource=n.EventSource;var i=t(9);e.AutoClock=i.AutoClock;var a=t(11);e.ManualClock=a.ManualClock;var r=t(12);e.VideoClock=r.VideoClock;var s=t(13);e.DefaultRenderer=s.DefaultRenderer;var o=t(15);e.NullRenderer=o.NullRenderer;var l=t(21);e.WebRenderer=l.WebRenderer;var c=t(16);e.RendererSettings=c.RendererSettings},function(e,t){var n=t(10),i=t(16),a=t(23),r=function(){function e(t,a,r){var s=this;this._ass=t,this._clock=a,this._id=++e._lastRendererId,this._settings=i.RendererSettings.from(r),
this._clock.addEventListener(n.ClockEvent.Play,function(){return s._onClockPlay()}),this._clock.addEventListener(n.ClockEvent.Tick,function(){return s._onClockTick()}),this._clock.addEventListener(n.ClockEvent.Pause,function(){return s._onClockPause()}),this._clock.addEventListener(n.ClockEvent.Stop,function(){return s._onClockStop()}),this._clock.addEventListener(n.ClockEvent.RateChange,function(){return s._onClockRateChange()})}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id;
},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ass",{get:function(){return this._ass},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clock",{get:function(){return this._clock},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"settings",{get:function(){return this._settings},enumerable:!0,configurable:!0}),e.prototype.preRender=function(){},e.prototype.draw=function(){},e.prototype.enable=function(){return this._clock.enable()},e.prototype.disable=function(){
return this._clock.disable()},e.prototype.toggle=function(){this._clock.toggle()},e.prototype.setEnabled=function(e){return this._clock.setEnabled(e)},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._clock.enabled},enumerable:!0,configurable:!0}),e.prototype._onClockPlay=function(){a.verboseMode&&console.log("NullRenderer._onClockPlay")},e.prototype._onClockTick=function(){var e=this._clock.currentTime;a.verboseMode&&console.log("NullRenderer._onClockTick: currentTime = "+e);
for(var t=0,n=this._ass.dialogues;t<n.length;t++){var i=n[t];i.end>e&&(i.start<=e?this.draw(i):i.start<=e+this._settings.preRenderTime&&this.preRender(i))}},e.prototype._onClockPause=function(){a.verboseMode&&console.log("NullRenderer._onClockPause")},e.prototype._onClockStop=function(){a.verboseMode&&console.log("NullRenderer._onClockStop")},e.prototype._onClockRateChange=function(){a.verboseMode&&console.log("NullRenderer._onClockRateChange")},e._lastRendererId=-1,e}();e.NullRenderer=r},function(e,t){
function n(e){return e.type===CSSRule.FONT_FACE_RULE}var i=t(30),a=function(){function e(){}return e.makeFontMapFromStyleElement=function(e){for(var t=new i.Map,a=e.sheet,r=0;r<a.cssRules.length;r++){var s=a.cssRules[r];if(n(s)){var o=s.style.getPropertyValue("font-family").match(/^["']?(.*?)["']?$/)[1],l=s.style.getPropertyValue("src");l||(l=s.cssText.split("\n").map(function(e){return e.match(/src:\s*([^;]+?)\s*;/)}).filter(function(e){return null!==e}).map(function(e){return e[1]})[0]),t.set(o,l);
}}return t},e.from=function(t){void 0!==t&&null!==t||(t={});var n=t,i=n.fontMap,a=void 0===i?null:i,r=n.preRenderTime,s=void 0===r?5:r,o=n.preciseOutlines,l=void 0!==o&&o,c=n.enableSvg,u=void 0===c||c,d=n.fallbackFonts,h=void 0===d?'Arial, Helvetica, sans-serif, "Segoe UI Symbol"':d,p=n.useAttachedFonts,f=void 0!==p&&p,g=new e;return g.fontMap=a,g.preRenderTime=s,g.preciseOutlines=l,g.enableSvg=u,g.fallbackFonts=h,g.useAttachedFonts=f,g},e}();e.RendererSettings=a},function(e,t){var n=t(30),i=function(){
function e(t,i){this._style=i,this._animationStyle="",this._animationDelays=new n.Map,this._numAnimations=0,this._id=t.id+"-"+e._nextId++,this._rate=t.clock.rate}return Object.defineProperty(e.prototype,"animationStyle",{get:function(){return this._animationStyle},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationDelays",{get:function(){return this._animationDelays},enumerable:!0,configurable:!0}),e.prototype.add=function(e,t){for(var n=null,i=null,a=0;a<t.length;a++){var r=t[a];
null===n&&(n=r.time),i=r.time}for(var s="",o=0;o<t.length;o++){var r=t[o];s+="\t"+(100*(i-n===0?1:(r.time-n)/(i-n))).toFixed(3)+"% {\n",r.properties.forEach(function(e,t){s+="\t\t"+t+": "+e+";\n"}),s+="\t}\n"}var l="animation-"+this._id+"-"+this._numAnimations++;this._style.appendChild(document.createTextNode("@-webkit-keyframes "+l+" {\n"+s+"\n}")),this._style.appendChild(document.createTextNode("@keyframes "+l+" {\n"+s+"\n}")),""!==this._animationStyle&&(this._animationStyle+=","),this._animationStyle+=l+" "+((i-n)/this._rate).toFixed(3)+"s "+e,
this._animationDelays.set(l,n)},e._nextId=0,e}();e.AnimationCollection=i},function(e,t){var n=t(8),i=function(){function e(e,t){this._outputScaleX=e,this._outputScaleY=t,this._scale=1,this._baselineOffset=0}return Object.defineProperty(e.prototype,"scale",{set:function(e){this._scale=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baselineOffset",{set:function(e){this._baselineOffset=e},enumerable:!0,configurable:!0}),e.prototype.toSVG=function(e,t){for(var i=Math.pow(2,this._scale-1),a=this._outputScaleX/i,r=this._outputScaleY/i,s=document.createElementNS("http://www.w3.org/2000/svg","path"),o=0,l=0,c=0,u=e.instructions;c<u.length;c++){
var d=u[c];d instanceof n.drawing.MoveInstruction?(s.pathSegList.appendItem(s.createSVGPathSegMovetoAbs(d.x,d.y+this._baselineOffset)),o=Math.max(o,d.x),l=Math.max(l,d.y+this._baselineOffset)):d instanceof n.drawing.LineInstruction?(s.pathSegList.appendItem(s.createSVGPathSegLinetoAbs(d.x,d.y+this._baselineOffset)),o=Math.max(o,d.x),l=Math.max(l,d.y+this._baselineOffset)):d instanceof n.drawing.CubicBezierCurveInstruction&&(s.pathSegList.appendItem(s.createSVGPathSegCurvetoCubicAbs(d.x3,d.y3+this._baselineOffset,d.x1,d.y1+this._baselineOffset,d.x2,d.y2+this._baselineOffset)),
o=Math.max(o,d.x1,d.x2,d.x3),l=Math.max(l,d.y1+this._baselineOffset,d.y2+this._baselineOffset,d.y3+this._baselineOffset))}var h=document.createElementNS("http://www.w3.org/2000/svg","svg");h.setAttribute("version","1.1"),h.width.baseVal.valueAsString=(o*a).toFixed(3)+"px",h.height.baseVal.valueAsString=(l*r).toFixed(3)+"px";var p=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(p),p.setAttribute("transform","scale("+a.toFixed(3)+" "+r.toFixed(3)+")"),p.appendChild(s),
s.setAttribute("fill",t.toString()),h},e}();e.DrawingStyles=i},function(e,t){function n(e,t,n,i){var a='"'+e+'"';""!==n&&(a+=", "+n),i.style.fontFamily=a,i.style.fontSize=t+"px"}function i(e,t,i,a){return n(e,t,i,a),new c.Promise(function(e){return setTimeout(function(){return e(a.offsetHeight)},1e3)})}function a(e,t,i,a){return n(e,t,i,a),a.offsetHeight}function r(e,t){return[e,180/(t-e)]}function s(e,t,n){return i(e,180,t,n).then(function(a){return i(e,360,t,n).then(function(e){return r(a,e)})});
}function o(e,t,n){return 180+(e-t)*n}function l(e,t,n,i,s){var l=s.get(e);if(void 0===l){var c=a(e,180,n,i),u=a(e,360,n,i);s.set(e,l=r(c,u))}var d=l[0],h=l[1];return o(t,d,h)}var c=t(32);e.calculateFontMetrics=s,e.fontSizeForLineHeight=l},function(e){var t=function(){function e(e,t){this._time=e,this._properties=t}return Object.defineProperty(e.prototype,"time",{get:function(){return this._time},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this._properties;
},enumerable:!0,configurable:!0}),e}();e.Keyframe=t},function(t,n){var i=n(34).__extends,a=n(17),r=n(18),s=n(19),o=n(20),l=n(22),c=n(10),u=n(15),d=n(6),h=n(8),p=n(23),f=n(25),g=n(27),m=n(31),v=n(30),y=n(32),b=/^(url|local)\(["']?(.+?)["']?\)$/,S=function(t){function n(n,i,a,r){var s=this;t.call(this,n,i,function(){if(!(a instanceof HTMLDivElement)){var e=r;r=a,a=e,console.warn("WebRenderer's constructor now takes libjassSubsWrapper as the third parameter and settings as the fourth parameter. Please update the caller.");
}return r}()),this._libjassSubsWrapper=a,this._layerWrappers=[],this._layerAlignmentWrappers=[],this._fontMetricsCache=new v.Map,this._currentSubs=new v.Map,this._preRenderedSubs=new v.Map,this._eventListeners=new v.Map,this._libjassSubsWrapper.classList.add("libjass-wrapper"),this._subsWrapper=document.createElement("div"),this._libjassSubsWrapper.appendChild(this._subsWrapper),this._subsWrapper.className="libjass-subs",this._fontSizeElement=document.createElement("div"),this._libjassSubsWrapper.appendChild(this._fontSizeElement),
this._fontSizeElement.className="libjass-font-measure",this._fontSizeElement.appendChild(document.createTextNode("M")),p.debugMode&&console.log("Preloading fonts...");var o=[],l=new v.Map,c=null===this.settings.fontMap?new v.Map:this.settings.fontMap,u=new v.Map;this.settings.useAttachedFonts&&n.attachments.forEach(function(e){if(e.type===f.AttachmentType.Font){var t=null;try{t=d.getTtfNames(e)}catch(e){return void console.error(e)}var n="data:application/x-font-ttf;base64,"+e.contents;t.forEach(function(e){
var t=c.get(e);if(void 0!==t)if("string"!=typeof t)t.push(n);else{var i=u.get(e);void 0===i&&u.set(e,i=[]),i.push(n)}else c.set(e,[n])})}}),c.forEach(function(t,n){var i;if(e.document.fonts&&e.document.fonts.add){var a="string"==typeof t?t:t.map(function(e){return null!==e.match(b)?e:'url("'+e+'")'}).join(", "),r=u.get(n);if(void 0!==r)for(var c=0;c<r.length;c++){var d=r[c];a+=', url("'+d+'")'}var h=[];e.document.fonts.forEach(function(e){e.family!==n&&e.family!=='"'+n+'"'||h.push(e)});var f;if(0===h.length){
var g=new FontFace(n,a),m=new FontFace('"'+n+'"',a);e.document.fonts.add(g),e.document.fonts.add(m),f=y.any([g.load(),m.load()])}else f=y.any(h.map(function(e){return e.load()}));i=s._calculateFontMetricsAfterFetch(n,f.catch(function(e){return console.warn("Fetching fonts for "+n+" at "+a+" failed: %o",e),null}))}else{var v=("string"==typeof t?t.split(/,/):t).map(function(e){return e.trim()}).map(function(e){var t=e.match(b);return null===t?e:"local"===t[1]?null:t[2]}).filter(function(e){return null!==e;
}),r=u.get(n);void 0!==r&&(v=v.concat(r));var S=v.map(function(e){var t=l.get(e);return void 0===t&&(t=new y.Promise(function(t,n){var i=new XMLHttpRequest;i.addEventListener("load",function(){p.debugMode&&console.log("Preloaded "+e+"."),t(null)}),i.addEventListener("error",function(e){n(e)}),i.open("GET",e,!0),i.send()}),l.set(e,t)),t}),w=0===S.length?y.Promise.resolve(null):y.first(S).catch(function(e){return console.warn("Fetching fonts for "+n+" at "+v.join(", ")+" failed: %o",e),null});i=s._calculateFontMetricsAfterFetch(n,w);
}o.push(i.then(function(e){return s._fontMetricsCache.set(n,e)}))}),y.Promise.all(o).then(function(){p.debugMode&&console.log("All fonts have been preloaded."),s._ready()})}return i(n,t),Object.defineProperty(n.prototype,"libjassSubsWrapper",{get:function(){return this._libjassSubsWrapper},enumerable:!0,configurable:!0}),n.prototype.resize=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=0),this._removeAllSubs(),this._subsWrapper.style.width=e.toFixed(3)+"px",this._subsWrapper.style.height=t.toFixed(3)+"px",
this._subsWrapper.style.left=n.toFixed(3)+"px",this._subsWrapper.style.top=i.toFixed(3)+"px",this._subsWrapperWidth=e,this._scaleX=e/this.ass.properties.resolutionX,this._scaleY=t/this.ass.properties.resolutionY,this._preRenderedSubs.clear(),this.clock.currentTime!==-1&&this._onClockTick()},n.prototype.preRender=function(e){var t=this,i=this._preRenderedSubs.get(e.id);if(i)return i;var s=this.clock.currentTime-e.start;if(e.containsTransformTag&&s<0)return null;var c=document.createElement("div");c.style.marginLeft=(this._scaleX*e.style.marginLeft).toFixed(3)+"px",
c.style.marginRight=(this._scaleX*e.style.marginRight).toFixed(3)+"px",c.style.marginTop=c.style.marginBottom=(this._scaleY*e.style.marginVertical).toFixed(3)+"px",c.style.minWidth=(this._subsWrapperWidth-this._scaleX*(e.style.marginLeft+e.style.marginRight)).toFixed(3)+"px";var u=document.createElement("style");u.id="libjass-animation-styles-"+this.id+"-"+e.id,u.type="text/css";var d=new a.AnimationCollection(this,u),f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("version","1.1"),
f.setAttribute("class","libjass-filters"),f.width.baseVal.valueAsString="0",f.height.baseVal.valueAsString="0";var m=document.createElementNS("http://www.w3.org/2000/svg","defs");f.appendChild(m);var y=null,b=new l.SpanStyles(this,e,this._scaleX,this._scaleY,this.settings,this._fontSizeElement,m,this._fontMetricsCache),S=null,w=!1,M=function(e){null!==y&&y.hasChildNodes()&&c.appendChild(b.setStylesOnSpan(y,S)),null!==S&&S.animationDelays.forEach(function(e,t){return d.animationDelays.set(t,e)}),e&&(w?c.appendChild(b.makeNewLine()):c.appendChild(document.createElement("br"))),
y=document.createElement("span"),S=new a.AnimationCollection(t,u),w=e};M(!1);for(var I=new r.DrawingStyles(this._scaleX,this._scaleY),C=this.ass.properties.wrappingStyle,D=0,T=0,x=e.parts;T<x.length;T++){var P=x[T];if(P instanceof h.Italic)b.italic=P.value;else if(P instanceof h.Bold)b.bold=P.value;else if(P instanceof h.Underline)b.underline=P.value;else if(P instanceof h.StrikeThrough)b.strikeThrough=P.value;else if(P instanceof h.Border)b.outlineWidth=P.value,b.outlineHeight=P.value;else if(P instanceof h.BorderX)b.outlineWidth=P.value;else if(P instanceof h.BorderY)b.outlineHeight=P.value;else if(P instanceof h.Shadow)b.shadowDepthX=P.value,
b.shadowDepthY=P.value;else if(P instanceof h.ShadowX)b.shadowDepthX=P.value;else if(P instanceof h.ShadowY)b.shadowDepthY=P.value;else if(P instanceof h.Blur)b.blur=P.value;else if(P instanceof h.GaussianBlur)b.gaussianBlur=P.value;else if(P instanceof h.FontName)b.fontName=P.value;else if(P instanceof h.FontSize)b.fontSize=P.value;else if(P instanceof h.FontSizePlus)b.fontSize+=P.value;else if(P instanceof h.FontSizeMinus)b.fontSize-=P.value;else if(P instanceof h.FontScaleX)b.fontScaleX=P.value;else if(P instanceof h.FontScaleY)b.fontScaleY=P.value;else if(P instanceof h.LetterSpacing)b.letterSpacing=P.value;else if(P instanceof h.RotateX)b.rotationX=P.value;else if(P instanceof h.RotateY)b.rotationY=P.value;else if(P instanceof h.RotateZ)b.rotationZ=P.value;else if(P instanceof h.SkewX)b.skewX=P.value;else if(P instanceof h.SkewY)b.skewY=P.value;else if(P instanceof h.PrimaryColor)b.primaryColor=P.value;else if(P instanceof h.SecondaryColor)b.secondaryColor=P.value;else if(P instanceof h.OutlineColor)b.outlineColor=P.value;else if(P instanceof h.ShadowColor)b.shadowColor=P.value;else if(P instanceof h.Alpha)b.primaryAlpha=P.value,
b.secondaryAlpha=P.value,b.outlineAlpha=P.value,b.shadowAlpha=P.value;else if(P instanceof h.PrimaryAlpha)b.primaryAlpha=P.value;else if(P instanceof h.SecondaryAlpha)b.secondaryAlpha=P.value;else if(P instanceof h.OutlineAlpha)b.outlineAlpha=P.value;else if(P instanceof h.ShadowAlpha)b.shadowAlpha=P.value;else if(P instanceof h.Alignment);else if(P instanceof h.ColorKaraoke)M(!1),S.add("step-end",[new o.Keyframe(0,new v.Map([["color",b.secondaryColor.withAlpha(b.secondaryAlpha).toString()]])),new o.Keyframe(D,new v.Map([["color",b.primaryColor.withAlpha(b.primaryAlpha).toString()]]))]),
D+=P.duration;else if(P instanceof h.WrappingStyle)C=P.value;else if(P instanceof h.Reset)b.reset(this.ass.styles.get(P.value));else if(P instanceof h.Position)c.style.position="absolute",c.style.left=(this._scaleX*P.x).toFixed(3)+"px",c.style.top=(this._scaleY*P.y).toFixed(3)+"px";else if(P instanceof h.Move)c.style.position="absolute",d.add("linear",[new o.Keyframe(0,new v.Map([["left",(this._scaleX*P.x1).toFixed(3)+"px"],["top",(this._scaleY*P.y1).toFixed(3)+"px"]])),new o.Keyframe(P.t1,new v.Map([["left",(this._scaleX*P.x1).toFixed(3)+"px"],["top",(this._scaleY*P.y1).toFixed(3)+"px"]])),new o.Keyframe(P.t2,new v.Map([["left",(this._scaleX*P.x2).toFixed(3)+"px"],["top",(this._scaleY*P.y2).toFixed(3)+"px"]])),new o.Keyframe(e.end-e.start,new v.Map([["left",(this._scaleX*P.x2).toFixed(3)+"px"],["top",(this._scaleY*P.y2).toFixed(3)+"px"]]))]);else if(P instanceof h.Fade)d.add("linear",[new o.Keyframe(0,new v.Map([["opacity","0"]])),new o.Keyframe(P.start,new v.Map([["opacity","1"]])),new o.Keyframe(e.end-e.start-P.end,new v.Map([["opacity","1"]])),new o.Keyframe(e.end-e.start,new v.Map([["opacity","0"]]))]);else if(P instanceof h.ComplexFade)d.add("linear",[new o.Keyframe(0,new v.Map([["opacity",P.a1.toFixed(3)]])),new o.Keyframe(P.t1,new v.Map([["opacity",P.a1.toFixed(3)]])),new o.Keyframe(P.t2,new v.Map([["opacity",P.a2.toFixed(3)]])),new o.Keyframe(P.t3,new v.Map([["opacity",P.a2.toFixed(3)]])),new o.Keyframe(P.t4,new v.Map([["opacity",P.a3.toFixed(3)]])),new o.Keyframe(e.end-e.start,new v.Map([["opacity",P.a3.toFixed(3)]]))]);else if(P instanceof h.Transform)for(var E=s<=P.start?0:s>=P.end?1:Math.pow((s-P.start)/(P.end-P.start),P.accel),A=0,L=P.tags;A<L.length;A++){
var k=L[A];k instanceof h.Border?(b.outlineWidth+=E*(k.value-b.outlineWidth),b.outlineHeight+=E*(k.value-b.outlineHeight)):k instanceof h.BorderX?b.outlineWidth+=E*(k.value-b.outlineWidth):k instanceof h.BorderY?b.outlineHeight+=E*(k.value-b.outlineHeight):k instanceof h.Shadow?(b.shadowDepthX+=E*(k.value-b.shadowDepthX),b.shadowDepthY+=E*(k.value-b.shadowDepthY)):k instanceof h.ShadowX?b.shadowDepthX+=E*(k.value-b.shadowDepthX):k instanceof h.ShadowY?b.shadowDepthY+=E*(k.value-b.shadowDepthY):k instanceof h.Blur?b.blur+=E*(k.value-b.blur):k instanceof h.GaussianBlur?b.gaussianBlur+=E*(k.value-b.gaussianBlur):k instanceof h.FontSize?b.fontSize+=E*(k.value-b.fontSize):k instanceof h.FontSizePlus?b.fontSize+=E*k.value:k instanceof h.FontSizeMinus?b.fontSize-=E*k.value:k instanceof h.FontScaleX?b.fontScaleX+=E*(k.value-b.fontScaleX):k instanceof h.FontScaleY?b.fontScaleY+=E*(k.value-b.fontScaleY):k instanceof h.LetterSpacing?b.letterSpacing+=E*(k.value-b.letterSpacing):k instanceof h.RotateX?b.rotationX+=E*(k.value-b.rotationX):k instanceof h.RotateY?b.rotationY+=E*(k.value-b.rotationY):k instanceof h.RotateZ?b.rotationZ+=E*(k.value-b.rotationZ):k instanceof h.SkewX?b.skewX+=E*(k.value-b.skewX):k instanceof h.SkewY?b.skewY+=E*(k.value-b.skewY):k instanceof h.PrimaryColor?b.primaryColor=b.primaryColor.interpolate(k.value,E):k instanceof h.SecondaryColor?b.secondaryColor=b.secondaryColor.interpolate(k.value,E):k instanceof h.OutlineColor?b.outlineColor=b.outlineColor.interpolate(k.value,E):k instanceof h.ShadowColor?b.shadowColor=b.shadowColor.interpolate(k.value,E):k instanceof h.Alpha?(b.primaryAlpha+=E*(k.value-b.primaryAlpha),
b.secondaryAlpha+=E*(k.value-b.secondaryAlpha),b.outlineAlpha+=E*(k.value-b.outlineAlpha),b.shadowAlpha+=E*(k.value-b.shadowAlpha)):k instanceof h.PrimaryAlpha?b.primaryAlpha+=E*(k.value-b.primaryAlpha):k instanceof h.SecondaryAlpha?b.secondaryAlpha+=E*(k.value-b.secondaryAlpha):k instanceof h.OutlineAlpha?b.outlineAlpha+=E*(k.value-b.outlineAlpha):k instanceof h.ShadowAlpha&&(b.shadowAlpha+=E*(k.value-b.shadowAlpha))}else P instanceof h.DrawingMode?0!==P.scale&&(I.scale=P.scale):P instanceof h.DrawingBaselineOffset?I.baselineOffset=P.value:P instanceof h.DrawingInstructions?(y.appendChild(I.toSVG(P,b.primaryColor.withAlpha(b.primaryAlpha))),
M(!1)):P instanceof h.Text?(y.appendChild(document.createTextNode(P.value+"\u200c")),M(!1)):p.debugMode&&P instanceof h.Comment?(y.appendChild(document.createTextNode(P.value)),M(!1)):P instanceof h.NewLine&&M(!0)}for(var N=0,_=e.parts;N<_.length;N++){var P=_[N];if(P instanceof h.Position||P instanceof h.Move){var O=n._transformOrigins[e.alignment],R="translate("+-O[0]+"%, "+-O[1]+"%) translate(-"+c.style.marginLeft+", -"+c.style.marginTop+")",j=O[0]+"% "+O[1]+"%";c.style.webkitTransform=R,c.style.webkitTransformOrigin=j,
c.style.transform=R,c.style.transformOrigin=j;break}}switch(C){case g.WrappingStyle.EndOfLineWrapping:c.style.whiteSpace="pre-wrap";break;case g.WrappingStyle.NoLineWrapping:c.style.whiteSpace="pre";break;case g.WrappingStyle.SmartWrappingWithWiderTopLine:case g.WrappingStyle.SmartWrappingWithWiderBottomLine:c.style.whiteSpace="pre-wrap"}if(""!==c.style.position)switch(e.alignment){case 1:case 4:case 7:c.style.textAlign="left";break;case 2:case 5:case 8:c.style.textAlign="center";break;case 3:case 6:
case 9:c.style.textAlign="right"}c.style.webkitAnimation=d.animationStyle,c.style.animation=d.animationStyle,c.setAttribute("data-dialogue-id",this.id+"-"+e.id),""!==u.textContent&&c.appendChild(u),m.hasChildNodes()&&c.appendChild(f);var z={sub:c,animationDelays:d.animationDelays};return e.containsTransformTag||this._preRenderedSubs.set(e.id,z),z},n.prototype.draw=function(e){var t=this;if(!this._currentSubs.has(e)||e.containsTransformTag){p.debugMode&&console.log(e.toString());var n=this._preRenderedSubs.get(e.id);
void 0===n&&(n=this.preRender(e),p.debugMode&&console.log(e.toString()));var i=n.sub.cloneNode(!0),a=function(i){var a=i.style.animationName||i.style.webkitAnimationName;if(void 0!==a&&""!==a){var r=a.split(",").map(function(i){i=i.trim();var a=n.animationDelays.get(i);return((a+e.start-t.clock.currentTime)/t.clock.rate).toFixed(3)+"s"}).join(", ");i.style.webkitAnimationDelay=r,i.style.animationDelay=r}};a(i);for(var r=i.querySelectorAll('[style*="animation:"]'),s=0;s<r.length;s++)a(r[s]);var o=e.layer,l="absolute"===i.style.position?0:e.alignment;
if(void 0===this._layerWrappers[o]){var c=document.createElement("div");c.className="layer layer"+o;for(var u=null,d=o+1;d<this._layerWrappers.length&&null===u;d++)void 0!==this._layerWrappers[d]&&(u=this._layerWrappers[d]);this._subsWrapper.insertBefore(c,u),this._layerWrappers[o]=c,this._layerAlignmentWrappers[o]=[]}if(void 0===this._layerAlignmentWrappers[o][l]){var h=document.createElement("div");h.className="an an"+l;for(var c=this._layerWrappers[o],u=null,f=l+1;f<this._layerAlignmentWrappers[o].length&&null===u;f++)void 0!==this._layerAlignmentWrappers[o][f]&&(u=this._layerAlignmentWrappers[o][f]);
c.insertBefore(h,u),this._layerAlignmentWrappers[o][l]=h}this._layerAlignmentWrappers[o][l].appendChild(i);var g=i.getElementsByTagName("style")[0];if(void 0!==g){var m=g.sheet;0===m.cssRules.length&&(m.cssText=g.textContent)}this._currentSubs.set(e,i)}},n.prototype._onClockPlay=function(){t.prototype._onClockPlay.call(this),this._removeAllSubs(),this._subsWrapper.style.display="",this._subsWrapper.classList.remove("paused")},n.prototype._onClockTick=function(){var e=this,n=this.clock.currentTime;
this._currentSubs.forEach(function(t,i){(i.start>n||i.end<n||i.containsTransformTag)&&(e._currentSubs.delete(i),e._removeSub(t))}),t.prototype._onClockTick.call(this)},n.prototype._onClockPause=function(){t.prototype._onClockPause.call(this),this._subsWrapper.classList.add("paused")},n.prototype._onClockStop=function(){t.prototype._onClockStop.call(this),this._subsWrapper.style.display="none"},n.prototype._onClockRateChange=function(){t.prototype._onClockRateChange.call(this),this._preRenderedSubs.clear();
},n.prototype._ready=function(){this._dispatchEvent("ready",[])},n.prototype._calculateFontMetricsAfterFetch=function(e,t){var n=this;return t.then(function(){var t=n._fontSizeElement.cloneNode(!0);return n._libjassSubsWrapper.appendChild(t),y.lastly(s.calculateFontMetrics(e,n.settings.fallbackFonts,t),function(){n._libjassSubsWrapper.removeChild(t)})})},n.prototype._removeSub=function(e){e.parentNode.removeChild(e)},n.prototype._removeAllSubs=function(){var e=this;this._currentSubs.forEach(function(t){
return e._removeSub(t)}),this._currentSubs.clear()},n._transformOrigins=[null,[0,100],[50,100],[100,100],[0,50],[50,50],[100,50],[0,0],[50,0],[100,0]],n}(u.NullRenderer);t.WebRenderer=S,m.mixin(S,[c.EventSource])},function(e,t){var n=t(19),i=function(){function e(e,t,n,i,a,r,s,o){this._scaleX=n,this._scaleY=i,this._settings=a,this._fontSizeElement=r,this._svgDefsElement=s,this._fontMetricsCache=o,this._nextFilterId=0,this._id=e.id+"-"+t.id,this._defaultStyle=t.style,this.reset(null)}return e.prototype.reset=function(e){
void 0!==e&&null!==e||(e=this._defaultStyle),this.italic=e.italic,this.bold=e.bold,this.underline=e.underline,this.strikeThrough=e.strikeThrough,this.outlineWidth=e.outlineThickness,this.outlineHeight=e.outlineThickness,this.shadowDepthX=e.shadowDepth,this.shadowDepthY=e.shadowDepth,this.fontName=e.fontName,this.fontSize=e.fontSize,this.fontScaleX=e.fontScaleX,this.fontScaleY=e.fontScaleY,this.letterSpacing=e.letterSpacing,this._rotationX=null,this._rotationY=null,this._rotationZ=e.rotationZ,this._skewX=null,
this._skewY=null,this.primaryColor=e.primaryColor,this.secondaryColor=e.secondaryColor,this.outlineColor=e.outlineColor,this.shadowColor=e.shadowColor,this.primaryAlpha=e.primaryColor.alpha,this.secondaryAlpha=e.secondaryColor.alpha,this.outlineAlpha=e.outlineColor.alpha,this.shadowAlpha=e.shadowColor.alpha,this.blur=null,this.gaussianBlur=null},e.prototype.setStylesOnSpan=function(t,i){var a=t.childNodes[0]instanceof Text,r="";this._italic&&(r+="italic "),this._bold===!0?r+="bold ":this._bold!==!1&&(r+=this._bold+" ");
var s=(this._scaleY*n.fontSizeForLineHeight(this._fontName,this._fontSize*(a?this._fontScaleX:1),this._settings.fallbackFonts,this._fontSizeElement,this._fontMetricsCache)).toFixed(3),o=(this._scaleY*this._fontSize).toFixed(3),l=this._fontName;switch(l){case"cursive":case"fantasy":case"monospace":case"sans-serif":case"serif":break;default:l='"'+l+'"'}""!==this._settings.fallbackFonts&&(l+=", "+this._settings.fallbackFonts),t.style.font=""+r+s+"px/"+o+"px "+l;var c="";this._underline&&(c="underline"),
this._strikeThrough&&(c+=" line-through"),t.style.textDecoration=c.trim();var u="";if(a?this._fontScaleY!==this._fontScaleX&&(u+="scaleY("+(this._fontScaleY/this._fontScaleX).toFixed(3)+") "):(1!==this._fontScaleX&&(u+="scaleX("+this._fontScaleX+") "),1!==this._fontScaleY&&(u+="scaleY("+this._fontScaleY+") ")),null!==this._rotationY&&(u+="rotateY("+this._rotationY+"deg) "),null!==this._rotationX&&(u+="rotateX("+this._rotationX+"deg) "),0!==this._rotationZ&&(u+="rotateZ("+-1*this._rotationZ+"deg) "),
null!==this._skewX||null!==this._skewY){var d=e._valueOrDefault(this._skewX,0),h=e._valueOrDefault(this._skewY,0);u+="matrix(1, "+h+", "+d+", 1, 0, 0) "}""!==u&&(t.style.webkitTransform=u,t.style.webkitTransformOrigin="50% 50%",t.style.transform=u,t.style.transformOrigin="50% 50%",t.style.display="inline-block"),t.style.letterSpacing=(this._scaleX*this._letterSpacing).toFixed(3)+"px";var p=this._scaleX*this._outlineWidth,f=this._scaleY*this._outlineHeight,g=document.createElement("span");g.appendChild(t);
var m=this._primaryColor.withAlpha(this._primaryAlpha),v=this._outlineColor.withAlpha(this._outlineAlpha),y=this._shadowColor.withAlpha(this._shadowAlpha);if(this._settings.enableSvg||(0!==p||0!==f)&&v.alpha!==m.alpha||(0!==this._shadowDepthX||0!==this._shadowDepthY)&&y.alpha!==m.alpha||(m=this._primaryColor.withAlpha(1),v=this._outlineColor.withAlpha(1),y=this._shadowColor.withAlpha(1),t.style.opacity=this._primaryAlpha.toFixed(3)),t.style.color=m.toString(),this._settings.enableSvg?this._setSvgOutlineOnSpan(g,p,f,v,this._primaryAlpha):this._setTextShadowOutlineOnSpan(t,p,f,v),
0!==this._shadowDepthX||0!==this._shadowDepthY){var b=y.toString()+" "+(this._shadowDepthX*this._scaleX).toFixed(3)+"px "+(this._shadowDepthY*this._scaleY).toFixed(3)+"px 0px";""===t.style.textShadow?t.style.textShadow=b:t.style.textShadow+=", "+b}return 0===this._rotationX&&0===this._rotationY||(g.style.display="inline-block"),t.style.webkitAnimation=i.animationStyle,t.style.animation=i.animationStyle,g},e.prototype._setSvgOutlineOnSpan=function(e,t,n,i,a){var r="svg-filter-"+this._id+"-"+this._nextFilterId++,s=document.createElementNS("http://www.w3.org/2000/svg","filter");
if(s.id=r,s.x.baseVal.valueAsString="-50%",s.width.baseVal.valueAsString="200%",s.y.baseVal.valueAsString="-50%",s.height.baseVal.valueAsString="200%",t>0||n>0){var o=0,l=!this._settings.preciseOutlines&&this._gaussianBlur>0?this._gaussianBlur:1;!function(e){if(t<=n)if(t>0){var i;for(i=0;i<=t;i+=l)e(i,n/t*Math.sqrt(t*t-i*i));i!==t+l&&e(t,0)}else e(0,n);else if(n>0){var a;for(a=0;a<=n;a+=l)e(t/n*Math.sqrt(n*n-a*a),a);a!==n+l&&e(0,n)}else e(t,0)}(function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","feMorphology");
s.appendChild(n),n.in1.baseVal="source",n.operator.baseVal=SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE,n.radiusX.baseVal=e,n.radiusY.baseVal=t,n.result.baseVal="outline"+o,o++});var c=document.createElementNS("http://www.w3.org/2000/svg","feComponentTransfer");s.insertBefore(c,s.firstElementChild),c.in1.baseVal="SourceAlpha",c.result.baseVal="source";var u=document.createElementNS("http://www.w3.org/2000/svg","feFuncA");c.appendChild(u),u.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,
u.slope.baseVal=0===a?1:1/a,u.intercept.baseVal=0;var d=document.createElementNS("http://www.w3.org/2000/svg","feMerge");s.appendChild(d);for(var h=0;h<o;h++){var p=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");d.appendChild(p),p.in1.baseVal="outline"+h}var f=document.createElementNS("http://www.w3.org/2000/svg","feComponentTransfer");s.appendChild(f),f.setAttribute("color-interpolation-filters","sRGB");var g=document.createElementNS("http://www.w3.org/2000/svg","feFuncR");f.appendChild(g),
g.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,g.slope.baseVal=0,g.intercept.baseVal=i.red/255*i.alpha;var m=document.createElementNS("http://www.w3.org/2000/svg","feFuncG");f.appendChild(m),m.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,m.slope.baseVal=0,m.intercept.baseVal=i.green/255*i.alpha;var v=document.createElementNS("http://www.w3.org/2000/svg","feFuncB");f.appendChild(v),v.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,
v.slope.baseVal=0,v.intercept.baseVal=i.blue/255*i.alpha;var y=document.createElementNS("http://www.w3.org/2000/svg","feFuncA");if(f.appendChild(y),y.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,y.slope.baseVal=i.alpha,y.intercept.baseVal=0,this._gaussianBlur>0){var b=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur");s.appendChild(b),b.stdDeviationX.baseVal=this._gaussianBlur,b.stdDeviationY.baseVal=this._gaussianBlur}for(var h=0;h<this._blur;h++){
var S=document.createElementNS("http://www.w3.org/2000/svg","feConvolveMatrix");s.appendChild(S),S.setAttribute("kernelMatrix","1 2 1 2 4 2 1 2 1"),S.edgeMode.baseVal=SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE}var w=document.createElementNS("http://www.w3.org/2000/svg","feComposite");s.appendChild(w),w.in2.baseVal="source",w.operator.baseVal=SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT;var M=document.createElementNS("http://www.w3.org/2000/svg","feMerge");s.appendChild(M);var I=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");
M.appendChild(I);var C=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");M.appendChild(C),C.in1.baseVal="SourceGraphic"}else{if(this._gaussianBlur>0){var b=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur");s.appendChild(b),b.stdDeviationX.baseVal=this._gaussianBlur,b.stdDeviationY.baseVal=this._gaussianBlur}for(var h=0;h<this._blur;h++){var S=document.createElementNS("http://www.w3.org/2000/svg","feConvolveMatrix");s.appendChild(S),S.setAttribute("kernelMatrix","1 2 1 2 4 2 1 2 1"),
S.edgeMode.baseVal=SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE}}s.childElementCount>0&&(this._svgDefsElement.appendChild(s),e.style.webkitFilter='url("#'+r+'")',e.style.filter='url("#'+r+'")')},e.prototype._setTextShadowOutlineOnSpan=function(e,t,n,i){var a=this;if(t>0||n>0){var r="";!function(e){for(var i=0;i<=t;i++)for(var a=0===t?n:n*Math.sqrt(1-i*i/(t*t)),r=0;r<=a;r++)e(i,r),0!==i&&e(-i,r),0!==r&&e(i,-r),0!==i&&0!==r&&e(-i,-r)}(function(e,t){r+=", "+i.toString()+" "+e+"px "+t+"px "+a._gaussianBlur.toFixed(3)+"px";
}),e.style.textShadow=r.substr(", ".length)}},e.prototype.makeNewLine=function(){var e=document.createElement("br");return e.style.lineHeight=(this._scaleY*this._fontSize).toFixed(3)+"px",e},Object.defineProperty(e.prototype,"italic",{set:function(t){this._italic=e._valueOrDefault(t,this._defaultStyle.italic)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bold",{set:function(t){this._bold=e._valueOrDefault(t,this._defaultStyle.bold)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"underline",{
set:function(t){this._underline=e._valueOrDefault(t,this._defaultStyle.underline)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strikeThrough",{set:function(t){this._strikeThrough=e._valueOrDefault(t,this._defaultStyle.strikeThrough)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineWidth",{get:function(){return this._outlineWidth},set:function(t){this._outlineWidth=e._valueOrDefault(t,this._defaultStyle.outlineThickness)},enumerable:!0,configurable:!0
}),Object.defineProperty(e.prototype,"outlineHeight",{get:function(){return this._outlineWidth},set:function(t){this._outlineHeight=e._valueOrDefault(t,this._defaultStyle.outlineThickness)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowDepthX",{get:function(){return this._shadowDepthX},set:function(t){this._shadowDepthX=e._valueOrDefault(t,this._defaultStyle.shadowDepth)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowDepthY",{get:function(){return this._shadowDepthY;
},set:function(t){this._shadowDepthY=e._valueOrDefault(t,this._defaultStyle.shadowDepth)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blur",{get:function(){return this._blur},set:function(t){this._blur=e._valueOrDefault(t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gaussianBlur",{get:function(){return this._gaussianBlur},set:function(t){this._gaussianBlur=e._valueOrDefault(t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontName",{
set:function(t){this._fontName=e._valueOrDefault(t,this._defaultStyle.fontName)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize=e._valueOrDefault(t,this._defaultStyle.fontSize)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontScaleX",{get:function(){return this._fontScaleX},set:function(t){this._fontScaleX=e._valueOrDefault(t,this._defaultStyle.fontScaleX)},enumerable:!0,configurable:!0
}),Object.defineProperty(e.prototype,"fontScaleY",{get:function(){return this._fontScaleY},set:function(t){this._fontScaleY=e._valueOrDefault(t,this._defaultStyle.fontScaleY)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(t){this._letterSpacing=e._valueOrDefault(t,this._defaultStyle.letterSpacing)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationX",{get:function(){return this._rotationX;
},set:function(e){this._rotationX=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationY",{get:function(){return this._rotationY},set:function(e){this._rotationY=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationZ",{get:function(){return this._rotationZ},set:function(t){this._rotationZ=e._valueOrDefault(t,this._defaultStyle.rotationZ)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skewX",{get:function(){return this._skewX},
set:function(e){this._skewX=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skewY",{get:function(){return this._skewY},set:function(e){this._skewY=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"primaryColor",{get:function(){return this._primaryColor},set:function(t){this._primaryColor=e._valueOrDefault(t,this._defaultStyle.primaryColor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"secondaryColor",{get:function(){return this._secondaryColor;
},set:function(t){this._secondaryColor=e._valueOrDefault(t,this._defaultStyle.secondaryColor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineColor",{get:function(){return this._outlineColor},set:function(t){this._outlineColor=e._valueOrDefault(t,this._defaultStyle.outlineColor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowColor",{get:function(){return this._shadowColor},set:function(t){this._shadowColor=e._valueOrDefault(t,this._defaultStyle.shadowColor);
},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"primaryAlpha",{get:function(){return this._primaryAlpha},set:function(t){this._primaryAlpha=e._valueOrDefault(t,this._defaultStyle.primaryColor.alpha)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"secondaryAlpha",{get:function(){return this._secondaryAlpha},set:function(t){this._secondaryAlpha=e._valueOrDefault(t,this._defaultStyle.secondaryColor.alpha)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineAlpha",{
get:function(){return this._outlineAlpha},set:function(t){this._outlineAlpha=e._valueOrDefault(t,this._defaultStyle.outlineColor.alpha)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowAlpha",{get:function(){return this._shadowAlpha},set:function(t){this._shadowAlpha=e._valueOrDefault(t,this._defaultStyle.shadowColor.alpha)},enumerable:!0,configurable:!0}),e._valueOrDefault=function(e,t){return null!==e?e:t},e}();e.SpanStyles=i},function(e){function t(t){e.debugMode=t}function n(t){
e.verboseMode=t}e.debugMode=!1,e.verboseMode=!1,e.setDebugMode=t,e.setVerboseMode=n},function(t,n){var i=n(26),a=n(29),r=n(28),s=n(27),o=n(23),l=n(1),c=n(2),u=n(30),d=n(32),h=function(){function t(){if(this._properties=new r.ScriptProperties,this._styles=new u.Map,this._dialogues=[],this._attachments=[],this._stylesFormatSpecifier=null,this._dialoguesFormatSpecifier=null,1===arguments.length)throw new Error("Constructor `new ASS(rawASS)` has been deprecated. Use `ASS.fromString(rawASS)` instead.");
this._styles.set("Default",new a.Style(new u.Map([["Name","Default"]])))}return Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"styles",{get:function(){return this._styles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dialogues",{get:function(){return this._dialogues},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"attachments",{get:function(){return this._attachments;
},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stylesFormatSpecifier",{get:function(){return this._stylesFormatSpecifier},set:function(e){this._stylesFormatSpecifier=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dialoguesFormatSpecifier",{get:function(){return this._dialoguesFormatSpecifier},set:function(e){this._dialoguesFormatSpecifier=e},enumerable:!0,configurable:!0}),t.prototype.addStyle=function(e){var t=c.parseLineIntoTypedTemplate(e,this._stylesFormatSpecifier);
if(null!==t&&"Style"===t.type){var n=t.template;if(o.verboseMode){var i="";n.forEach(function(e,t){return i+=t+" = "+e+", "}),console.log("Read style: "+i)}var r=new a.Style(n);this._styles.set(r.name,r)}},t.prototype.addEvent=function(e){var t=c.parseLineIntoTypedTemplate(e,this._dialoguesFormatSpecifier);if(null!==t&&"Dialogue"===t.type){var n=t.template;if(o.verboseMode){var a="";n.forEach(function(e,t){return a+=t+" = "+e+", "}),console.log("Read dialogue: "+a)}this.dialogues.push(new i.Dialogue(n,this));
}},t.prototype.addAttachment=function(e){this._attachments.push(e)},t.fromString=function(e,n){return void 0===n&&(n=s.Format.ASS),t.fromStream(new l.StringStream(e),n)},t.fromStream=function(e,t){switch(void 0===t&&(t=s.Format.ASS),t){case s.Format.ASS:return new l.StreamParser(e).ass;case s.Format.SRT:return new l.SrtStreamParser(e).ass;default:throw new Error("Illegal value of type: "+t)}},t.fromUrl=function(n,i){void 0===i&&(i=s.Format.ASS);var a;return a="function"==typeof e.fetch&&"function"==typeof e.ReadableStream&&"function"==typeof e.ReadableStream.prototype.getReader&&"function"==typeof e.TextDecoder?e.fetch(n).then(function(e){
if(e.ok===!1||void 0===e.ok&&(e.status<200||e.status>299))throw new Error("HTTP request for "+n+" failed with status code "+e.status);return t.fromReadableStream(e.body,"utf-8",i)}):d.Promise.reject(new Error("Not supported.")),a.catch(function(e){console.warn("fetch() failed, falling back to XHR: %o",e);var a=new XMLHttpRequest,r=t.fromStream(new l.XhrStream(a),i);return a.open("GET",n,!0),a.send(),r})},t.fromReadableStream=function(e,n,i){return void 0===n&&(n="utf-8"),void 0===i&&(i=s.Format.ASS),
t.fromStream(new l.BrowserReadableStream(e,n),i)},t}();t.ASS=h},function(e){!function(e){e[e.Font=0]="Font",e[e.Graphic=1]="Graphic"}(e.AttachmentType||(e.AttachmentType={}));var t=function(){function e(e,t){this._filename=e,this._type=t,this._contents=""}return Object.defineProperty(e.prototype,"filename",{get:function(){return this._filename},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contents",{
get:function(){return this._contents},set:function(e){this._contents=e},enumerable:!0,configurable:!0}),e}();e.Attachment=t},function(e,t){var n=t(27),i=t(3),a=t(8),r=t(23),s=t(30),o=function(){function e(t,i){this._parts=null,this._containsTransformTag=!1;var a=new s.Map;t.forEach(function(e,t){a.set(t.toLowerCase(),e)}),t=a,this._id=++e._lastDialogueId;var o=t.get("style");if(void 0!==o&&null!==o&&o.constructor===String&&(o=o.replace(/^\*+/,""),null!==o.match(/^Default$/i)&&(o="Default")),this._style=i.styles.get(o),
void 0===this._style&&(r.debugMode&&console.warn("Unrecognized style "+o+'. Falling back to "Default"'),this._style=i.styles.get("Default")),void 0===this._style)throw new Error("Unrecognized style "+o);if(this._start=e._toTime(t.get("start")),this._end=e._toTime(t.get("end")),this._layer=Math.max(n.valueOrDefault(t,"layer",parseInt,function(e){return!isNaN(e)},"0"),0),this._rawPartsString=t.get("text"),void 0===this._rawPartsString||null===this._rawPartsString||this._rawPartsString.constructor!==String)throw new Error("Dialogue doesn't have any text.");
}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return null===this._parts&&this._parsePartsString(),
this._alignment},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"layer",{get:function(){return this._layer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parts",{get:function(){return null===this._parts&&this._parsePartsString(),this._parts},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"containsTransformTag",{get:function(){return null===this._parts&&this._parsePartsString(),this._containsTransformTag},enumerable:!0,configurable:!0}),e.prototype.toString=function(){
return"#"+this._id+" ["+this._start.toFixed(3)+"-"+this._end.toFixed(3)+"] "+(null!==this._parts?this._parts.join(", "):this._rawPartsString)},e.prototype._parsePartsString=function(){var e=this;if(this._parts=i.parse(this._rawPartsString,"dialogueParts"),this._alignment=this._style.alignment,this._parts.forEach(function(t,n){t instanceof a.Alignment?e._alignment=t.value:t instanceof a.Move?null!==t.t1&&null!==t.t2||(e._parts[n]=new a.Move(t.x1,t.y1,t.x2,t.y2,0,e._end-e._start)):t instanceof a.Transform&&(null!==t.start&&null!==t.end&&null!==t.accel||(e._parts[n]=new a.Transform(null===t.start?0:t.start,null===t.end?e._end-e._start:t.end,null===t.accel?1:t.accel,t.tags)),
e._containsTransformTag=!0)}),r.debugMode){var t=this._parts.filter(function(e){return e instanceof a.Comment&&e.value.indexOf("\\")!==-1});t.length>0&&console.warn("Possible incorrect parse:\n"+this._rawPartsString+"\nwas parsed as\n"+this.toString()+"\nThe possibly incorrect parses are:\n"+t.join("\n"))}},e._toTime=function(e){return e.split(":").reduce(function(e,t){return 60*e+parseFloat(t)},0)},e._lastDialogueId=-1,e}();e.Dialogue=o},function(e){function t(e,t,n,i,a){var r=e.get(t);if(void 0===r)return n(a);
try{var s=n(r);if(null!==i&&!i(s))throw new Error("Validation failed.");return s}catch(e){throw new Error("Property "+t+" has invalid value "+r+" - "+e.stack)}}!function(e){e[e.ASS=0]="ASS",e[e.SRT=1]="SRT"}(e.Format||(e.Format={})),function(e){e[e.SmartWrappingWithWiderTopLine=0]="SmartWrappingWithWiderTopLine",e[e.SmartWrappingWithWiderBottomLine=3]="SmartWrappingWithWiderBottomLine",e[e.EndOfLineWrapping=1]="EndOfLineWrapping",e[e.NoLineWrapping=2]="NoLineWrapping"}(e.WrappingStyle||(e.WrappingStyle={})),
function(e){e[e.Outline=1]="Outline",e[e.OpaqueBox=3]="OpaqueBox"}(e.BorderStyle||(e.BorderStyle={})),e.valueOrDefault=t},function(e){var t=function(){function e(){}return Object.defineProperty(e.prototype,"resolutionX",{get:function(){return this._resolutionX},set:function(e){this._resolutionX=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resolutionY",{get:function(){return this._resolutionY},set:function(e){this._resolutionY=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wrappingStyle",{
get:function(){return this._wrappingStyle},set:function(e){this._wrappingStyle=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scaleBorderAndShadow",{get:function(){return this._scaleBorderAndShadow},set:function(e){this._scaleBorderAndShadow=e},enumerable:!0,configurable:!0}),e}();e.ScriptProperties=t},function(e,t){var n=t(27),i=t(3),a=t(30),r=function(){function e(e){var t=new a.Map;if(e.forEach(function(e,n){t.set(n.toLowerCase(),e)}),e=t,this._name=e.get("name"),void 0===this._name||null===this._name||this._name.constructor!==String)throw new Error("Style doesn't have a name.");
this._name=this._name.replace(/^\*+/,""),this._italic=!!n.valueOrDefault(e,"italic",parseFloat,function(e){return!isNaN(e)},"0"),this._bold=!!n.valueOrDefault(e,"bold",parseFloat,function(e){return!isNaN(e)},"0"),this._underline=!!n.valueOrDefault(e,"underline",parseFloat,function(e){return!isNaN(e)},"0"),this._strikeThrough=!!n.valueOrDefault(e,"strikeout",parseFloat,function(e){return!isNaN(e)},"0"),this._fontName=n.valueOrDefault(e,"fontname",function(e){return e},function(e){return e.constructor===String;
},"sans-serif"),this._fontSize=n.valueOrDefault(e,"fontsize",parseFloat,function(e){return!isNaN(e)},"18"),this._fontScaleX=n.valueOrDefault(e,"scalex",parseFloat,function(e){return e>=0},"100")/100,this._fontScaleY=n.valueOrDefault(e,"scaley",parseFloat,function(e){return e>=0},"100")/100,this._letterSpacing=n.valueOrDefault(e,"spacing",parseFloat,function(e){return e>=0},"0"),this._rotationZ=n.valueOrDefault(e,"angle",parseFloat,function(e){return!isNaN(e)},"0"),this._primaryColor=n.valueOrDefault(e,"primarycolour",function(e){
return i.parse(e,"colorWithAlpha")},null,"&H00FFFFFF"),this._secondaryColor=n.valueOrDefault(e,"secondarycolour",function(e){return i.parse(e,"colorWithAlpha")},null,"&H00FFFF00"),this._outlineColor=n.valueOrDefault(e,"outlinecolour",function(e){return i.parse(e,"colorWithAlpha")},null,"&H00000000"),this._shadowColor=n.valueOrDefault(e,"backcolour",function(e){return i.parse(e,"colorWithAlpha")},null,"&H80000000"),this._outlineThickness=n.valueOrDefault(e,"outline",parseFloat,function(e){return e>=0;
},"2"),this._borderStyle=n.valueOrDefault(e,"borderstyle",parseInt,function(e){return n.BorderStyle[n.BorderStyle[e]]===e},"1"),this._shadowDepth=n.valueOrDefault(e,"shadow",parseFloat,function(e){return e>=0},"3"),this._alignment=n.valueOrDefault(e,"alignment",parseInt,function(e){return e>=1&&e<=9},"2"),this._marginLeft=n.valueOrDefault(e,"marginl",parseFloat,function(e){return!isNaN(e)},"20"),this._marginRight=n.valueOrDefault(e,"marginr",parseFloat,function(e){return!isNaN(e)},"20"),this._marginVertical=n.valueOrDefault(e,"marginv",parseFloat,function(e){
return!isNaN(e)},"20")}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"italic",{get:function(){return this._italic},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bold",{get:function(){return this._bold},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"underline",{get:function(){return this._underline},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strikeThrough",{
get:function(){return this._strikeThrough},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontName",{get:function(){return this._fontName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontScaleX",{get:function(){return this._fontScaleX},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontScaleY",{get:function(){return this._fontScaleY;
},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"letterSpacing",{get:function(){return this._letterSpacing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationZ",{get:function(){return this._rotationZ},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"primaryColor",{get:function(){return this._primaryColor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"secondaryColor",{get:function(){return this._secondaryColor},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"outlineColor",{get:function(){return this._outlineColor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowColor",{get:function(){return this._shadowColor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineThickness",{get:function(){return this._outlineThickness},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"borderStyle",{get:function(){return this._borderStyle},enumerable:!0,configurable:!0
}),Object.defineProperty(e.prototype,"shadowDepth",{get:function(){return this._shadowDepth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this._alignment},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marginLeft",{get:function(){return this._marginLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marginRight",{get:function(){return this._marginRight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marginVertical",{
get:function(){return this._marginVertical},enumerable:!0,configurable:!0}),e}();e.Style=r},function(t){function n(e){null!==e?t.Map=e:t.Map=i}t.Map=e.Map;var i=function(){function e(e){if(this.clear(),void 0!==e){if(!Array.isArray(e))throw new Error("Non-array iterables are not supported by the SimpleMap constructor.");for(var t=0;t<e.length;t++){var n=e[t];this.set(n[0],n[1])}}}return e.prototype.get=function(e){var t=this._keyToProperty(e);if(null!==t)return this._values[t]},e.prototype.has=function(e){
var t=this._keyToProperty(e);return null!==t&&t in this._keys},e.prototype.set=function(e,t){var n=this._keyToProperty(e);if(null===n)throw new Error("This Map implementation only supports Number and String keys, or keys with an id property.");return n in this._keys||this._size++,this._keys[n]=e,this._values[n]=t,this},e.prototype.delete=function(e){var t=this._keyToProperty(e);if(null===t)return!1;var n=t in this._keys;return n&&(delete this._keys[t],delete this._values[t],this._size--),n},e.prototype.clear=function(){
this._keys=Object.create(null),this._values=Object.create(null),this._size=0},e.prototype.forEach=function(e,t){for(var n=0,i=Object.keys(this._keys);n<i.length;n++){var a=i[n];e.call(t,this._values[a],this._keys[a],this)}},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype._keyToProperty=function(e){return"number"==typeof e?"#"+e:"string"==typeof e?"'"+e:void 0!==e.id?"!"+e.id:null},e}();(void 0===t.Map||"function"!=typeof t.Map.prototype.forEach||function(){
try{return 2!==new t.Map([[1,"foo"],[2,"bar"]]).size}catch(e){return!0}}())&&(t.Map=i),t.setImplementation=n},function(e){function t(e,t){for(var n=0;n<t.length;n++)for(var i=t[n],a=0,r=Object.getOwnPropertyNames(i.prototype);a<r.length;a++){var s=r[a];e.prototype[s]=i.prototype[s]}}e.mixin=t},function(t){function n(e){null!==e?t.Promise=e:t.Promise=l}function i(e){return a(e,[])}function a(e,n){if(0===e.length)return t.Promise.reject(n);var i=e[0],r=e.slice(1);return i.catch(function(e){return a(r,n.concat(e));
})}function r(e){return new t.Promise(function(n,i){return t.Promise.all(e.map(function(e){return e.then(n,function(e){return e})})).then(i)})}function s(e,t){return e.then(function(e){return t(),e},function(e){throw t(),e})}t.Promise=e.Promise;var o=function(){var t=e.MutationObserver||e.WebkitMutationObserver;if(void 0!==e.process&&"function"==typeof e.process.nextTick)return function(t){e.process.nextTick(t)};if(void 0!==t){var n=[],i=!1,a=document.createElement("div"),r=new t(function(){for(var e=n.splice(0,n.length),t=0;t<e.length;t++){
var r=e[t];r()}i=!1,n.length>0&&(a.classList.toggle("foo"),i=!0)});return r.observe(a,{attributes:!0}),function(e){n.push(e),i||(a.classList.toggle("foo"),i=!0)}}return function(e){return setTimeout(e,0)}}(),l=function(){function e(e){if(this._state=c.PENDING,this._fulfillReactions=[],this._rejectReactions=[],this._fulfilledValue=null,this._rejectedReason=null,"function"!=typeof e)throw new TypeError('typeof executor !== "function"');var t=this._createResolvingFunctions(),n=t.resolve,i=t.reject;try{
e(n,i)}catch(e){i(e)}}return e.prototype.then=function(e,t){var n=new u;"function"!=typeof e&&(e=function(e){return e}),"function"!=typeof t&&(t=function(e){throw e});var i={capabilities:n,handler:e},a={capabilities:n,handler:t};switch(this._state){case c.PENDING:this._fulfillReactions.push(i),this._rejectReactions.push(a);break;case c.FULFILLED:this._enqueueFulfilledReactionJob(i,this._fulfilledValue);break;case c.REJECTED:this._enqueueRejectedReactionJob(a,this._rejectedReason)}return n.promise;
},e.prototype.catch=function(e){return this.then(null,e)},e.resolve=function(n){return n instanceof e?n:new t.Promise(function(e){return e(n)})},e.reject=function(e){return new t.Promise(function(t,n){return n(e)})},e.all=function(e){return new t.Promise(function(n,i){var a=[],r=e.length;return 0===r?void n(a):void e.forEach(function(e,s){return t.Promise.resolve(e).then(function(e){a[s]=e,r--,0===r&&n(a)},i)})})},e.race=function(e){return new t.Promise(function(n,i){for(var a=0;a<e.length;a++){var r=e[a];
t.Promise.resolve(r).then(n,i)}})},e.prototype._createResolvingFunctions=function(){var e=this,t=!1,n=function(n){if(!t){if(t=!0,n===e)return void e._reject(new TypeError("resolution === this"));if(null===n||"object"!=typeof n&&"function"!=typeof n)return void e._fulfill(n);try{var i=n.then}catch(t){return void e._reject(t)}return"function"!=typeof i?void e._fulfill(n):void o(function(){return e._resolveWithThenable(n,i)})}},i=function(n){t||(t=!0,e._reject(n))};return{resolve:n,reject:i}},e.prototype._resolveWithThenable=function(e,t){
var n=this._createResolvingFunctions(),i=n.resolve,a=n.reject;try{t.call(e,i,a)}catch(e){a(e)}},e.prototype._fulfill=function(e){var t=this._fulfillReactions;this._fulfilledValue=e,this._fulfillReactions=void 0,this._rejectReactions=void 0,this._state=c.FULFILLED;for(var n=0;n<t.length;n++){var i=t[n];this._enqueueFulfilledReactionJob(i,e)}},e.prototype._reject=function(e){var t=this._rejectReactions;this._rejectedReason=e,this._fulfillReactions=void 0,this._rejectReactions=void 0,this._state=c.REJECTED;
for(var n=0;n<t.length;n++){var i=t[n];this._enqueueRejectedReactionJob(i,e)}},e.prototype._enqueueFulfilledReactionJob=function(e,t){o(function(){var n,i=e.capabilities,a=i.resolve,r=i.reject,s=e.handler;try{n=s(t)}catch(e){return void r(e)}a(n)})},e.prototype._enqueueRejectedReactionJob=function(e,t){o(function(){var n,i=e.capabilities,a=i.resolve,r=i.reject,s=e.handler;try{n=s(t)}catch(e){return void r(e)}a(n)})},e}();void 0===t.Promise&&(t.Promise=l);var c;!function(e){e[e.PENDING=0]="PENDING",
e[e.FULFILLED=1]="FULFILLED",e[e.REJECTED=2]="REJECTED"}(c||(c={})),t.setImplementation=n;var u=function(){function e(){var e=this;this._promise=new t.Promise(function(t,n){Object.defineProperties(e,{resolve:{value:t,enumerable:!0},reject:{value:n,enumerable:!0}})})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!0,configurable:!0}),e}();t.DeferredPromise=u,t.first=i,t.any=r,t.lastly=s},function(t){function n(e){null!==e?t.Set=e:t.Set=i}t.Set=e.Set;
var i=function(){function e(e){if(this.clear(),void 0!==e){if(!Array.isArray(e))throw new Error("Non-array iterables are not supported by the SimpleSet constructor.");for(var t=0;t<e.length;t++){var n=e[t];this.add(n)}}}return e.prototype.add=function(e){var t=this._toProperty(e);if(null===t)throw new Error("This Set implementation only supports Number and String values.");return t in this._elements||this._size++,this._elements[t]=e,this},e.prototype.clear=function(){this._elements=Object.create(null),
this._size=0},e.prototype.has=function(e){var t=this._toProperty(e);return null!==t&&t in this._elements},e.prototype.forEach=function(e,t){for(var n=0,i=Object.keys(this._elements);n<i.length;n++){var a=i[n],r=this._elements[a];e.call(t,r,r,this)}},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype._toProperty=function(e){return"number"==typeof e?"#"+e:"string"==typeof e?"'"+e:null},e}();(void 0===t.Set||"function"!=typeof t.Set.prototype.forEach||function(){
try{return 2!==new t.Set([1,2]).size}catch(e){return!0}}())&&(t.Set=i),t.setImplementation=n},function(e){function t(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n}function n(e,t,n){return arguments.length<3?i(e.reverse(),t):void a(e.reverse(),t,n)}function i(e,t){for(var n=0;n<e.length;n++){var i=e[n];t=i(t)||t}return t}function a(e,t,n){for(var i=0;i<e.length;i++){var a=e[i];a(t,n)}}e.__extends=t,e.__decorate=n},function(e,t){
var n=t(30),i=t(32),a=t(36),r=t(38),s=function(){function e(e){var t=this;this._comm=e,this._pendingRequests=new n.Map,this._comm.addEventListener("message",function(e){return t._onMessage(e.data)},!1)}return e.prototype.request=function(t,n){var a=new i.DeferredPromise,s=++e._lastRequestId;this._pendingRequests.set(s,a);var o={requestId:s,command:t,parameters:n};return this._comm.postMessage(r.serialize(o)),a.promise},e.prototype.cancelRequest=function(e){var t=this._pendingRequests.get(e);void 0!==t&&(this._pendingRequests.delete(e),
t.reject(new Error("Cancelled.")))},e.prototype._respond=function(e){var t=e.requestId,n=e.error,i=e.result;n instanceof Error&&(n={message:n.message,stack:n.stack}),this._comm.postMessage(r.serialize({command:a.WorkerCommands.Response,requestId:t,error:n,result:i}))},e.prototype._onMessage=function(e){var t=this,n=r.deserialize(e);if(n.command===a.WorkerCommands.Response){var i=n,s=this._pendingRequests.get(i.requestId);void 0!==s&&(this._pendingRequests.delete(i.requestId),null===i.error?s.resolve(i.result):s.reject(i.error));
}else{var o=n,l=o.requestId,c=r.getWorkerCommandHandler(o.command);if(void 0===c)return void this._respond({requestId:l,error:new Error("No handler registered for command "+o.command),result:null});c(o.parameters).then(function(e){return{requestId:l,error:null,result:e}},function(e){return{requestId:l,error:e,result:null}}).then(function(e){return t._respond(e)})}},e._lastRequestId=-1,e}();e.WorkerChannelImpl=s,r.registerWorkerCommand(a.WorkerCommands.Ping,function(){return new i.Promise(function(e){
return e(null)})})},function(e){!function(e){e[e.Response=0]="Response",e[e.Parse=1]="Parse",e[e.Ping=2]="Ping"}(e.WorkerCommands||(e.WorkerCommands={}))},function(t,n){function i(e){return void 0===e&&(e=s.src),new a.WorkerChannelImpl(new Worker(e))}var a=n(35),r=n(36);t.WorkerCommands=r.WorkerCommands,t.supported="undefined"!=typeof Worker;var s="undefined"!=typeof document&&void 0!==document.currentScript?document.currentScript:null;t.createWorker=i,"undefined"!=typeof WorkerGlobalScope&&e instanceof WorkerGlobalScope&&new a.WorkerChannelImpl(e);
},function(e,t){function n(e,t){l.set(e,t)}function i(e){return l.get(e)}function a(e){e._classTag=c.size,c.set(e._classTag,e)}function r(e){return JSON.stringify(e,function(e,t){return t&&void 0!==t._classTag&&(t._classTag=t._classTag),t})}function s(e){return JSON.parse(e,function(e,t){if(t&&void 0!==t._classTag){for(var n=Object.create(c.get(t._classTag)),i=0,a=Object.keys(t);i<a.length;i++){var r=a[i];"_classTag"!==r&&(n[r]=t[r])}t=n}return t})}var o=t(30),l=new o.Map,c=new o.Map;e.registerWorkerCommand=n,
e.getWorkerCommandHandler=i,e.registerClassPrototype=a,e.serialize=r,e.deserialize=s}])})},function(e,t,n){"use strict";function i(e){return null==e?void 0===e?l:o:c&&c in Object(e)?n.i(r.a)(e):n.i(s.a)(e)}var a=n(947),r=n(2911),s=n(2912),o="[object Null]",l="[object Undefined]",c=a.a?a.a.toStringTag:void 0;t.a=i},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(t,n(144))},function(e,t,n){"use strict";var i=n(2913),a=n.i(i.a)(Object.getPrototypeOf,Object);
t.a=a},function(e,t,n){"use strict";function i(e){var t=s.call(e,l),n=e[l];try{e[l]=void 0;var i=!0}catch(e){}var a=o.call(e);return i&&(t?e[l]=n:delete e[l]),a}var a=n(947),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,l=a.a?a.a.toStringTag:void 0;t.a=i},function(e,t,n){"use strict";function i(e){return r.call(e)}var a=Object.prototype,r=a.toString;t.a=i},function(e,t,n){"use strict";function i(e,t){return function(n){return e(t(n))}}t.a=i},function(e,t,n){"use strict";var i=n(2909),a="object"==typeof self&&self&&self.Object===Object&&self,r=i.a||a||Function("return this")();
t.a=r},function(e,t,n){"use strict";function i(e){return null!=e&&"object"==typeof e}t.a=i},function(e,t,n){"use strict";function i(e){if(!n.i(s.a)(e)||n.i(a.a)(e)!=o)return!1;var t=n.i(r.a)(e);if(null===t)return!0;var i=d.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&u.call(i)==h}var a=n(2908),r=n(2910),s=n(2915),o="[object Object]",l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=u.call(Object);t.a=i},function(e,t,n){var i;!function(a,r,s){
function o(e,t,n){return e.addEventListener?void e.addEventListener(t,n,!1):void e.attachEvent("on"+t,n)}function l(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return w[e.which]?w[e.which]:M[e.which]?M[e.which]:String.fromCharCode(e.which).toLowerCase()}function c(e,t){return e.sort().join(",")===t.sort().join(",")}function u(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),
t}function d(e){return e.preventDefault?void e.preventDefault():void(e.returnValue=!1)}function h(e){return e.stopPropagation?void e.stopPropagation():void(e.cancelBubble=!0)}function p(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function f(){if(!S){S={};for(var e in w)e>95&&e<112||w.hasOwnProperty(e)&&(S[w[e]]=e)}return S}function g(e,t,n){return n||(n=f()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function m(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus"),e.split("+"));
}function v(e,t){var n,i,a,r=[];for(n=m(e),a=0;a<n.length;++a)i=n[a],C[i]&&(i=C[i]),t&&"keypress"!=t&&I[i]&&(i=I[i],r.push("shift")),p(i)&&r.push(i);return t=g(i,r,t),{key:i,modifiers:r,action:t}}function y(e,t){return null!==e&&e!==r&&(e===t||y(e.parentNode,t))}function b(e){function t(e){e=e||{};var t,n=!1;for(t in S)e[t]?n=!0:S[t]=0;n||(I=!1)}function n(e,t,n,i,a,r){var s,o,l=[],u=n.type;if(!m._callbacks[e])return[];for("keyup"==u&&p(e)&&(t=[e]),s=0;s<m._callbacks[e].length;++s)if(o=m._callbacks[e][s],
(i||!o.seq||S[o.seq]==o.level)&&u==o.action&&("keypress"==u&&!n.metaKey&&!n.ctrlKey||c(t,o.modifiers))){var d=!i&&o.combo==a,h=i&&o.seq==i&&o.level==r;(d||h)&&m._callbacks[e].splice(s,1),l.push(o)}return l}function i(e,t,n,i){m.stopCallback(t,t.target||t.srcElement,n,i)||e(t,n)===!1&&(d(t),h(t))}function a(e){"number"!=typeof e.which&&(e.which=e.keyCode);var t=l(e);if(t)return"keyup"==e.type&&w===t?void(w=!1):void m.handleKey(t,u(e),e)}function s(){clearTimeout(y),y=setTimeout(t,1e3)}function f(e,n,a,r){
function o(t){return function(){I=t,++S[e],s()}}function c(n){i(a,n,e),"keyup"!==r&&(w=l(n)),setTimeout(t,10)}S[e]=0;for(var u=0;u<n.length;++u){var d=u+1===n.length,h=d?c:o(r||v(n[u+1]).action);g(n[u],h,r,e,u)}}function g(e,t,i,a,r){m._directMap[e+":"+i]=t,e=e.replace(/\s+/g," ");var s,o=e.split(" ");return o.length>1?void f(e,o,t,i):(s=v(e,i),m._callbacks[s.key]=m._callbacks[s.key]||[],n(s.key,s.modifiers,{type:s.action},a,e,r),void m._callbacks[s.key][a?"unshift":"push"]({callback:t,modifiers:s.modifiers,
action:s.action,seq:a,level:r,combo:e}))}var m=this;if(e=e||r,!(m instanceof b))return new b(e);m.target=e,m._callbacks={},m._directMap={};var y,S={},w=!1,M=!1,I=!1;m._handleKey=function(e,a,r){var s,o=n(e,a,r),l={},c=0,u=!1;for(s=0;s<o.length;++s)o[s].seq&&(c=Math.max(c,o[s].level));for(s=0;s<o.length;++s)if(o[s].seq){if(o[s].level!=c)continue;u=!0,l[o[s].seq]=1,i(o[s].callback,r,o[s].combo,o[s].seq)}else u||i(o[s].callback,r,o[s].combo);var d="keypress"==r.type&&M;r.type!=I||p(e)||d||t(l),M=u&&"keydown"==r.type;
},m._bindMultiple=function(e,t,n){for(var i=0;i<e.length;++i)g(e[i],t,n)},o(e,"keypress",a),o(e,"keydown",a),o(e,"keyup",a)}for(var S,w={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},M={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},I={
"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},C={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},D=1;D<20;++D)w[111+D]="f"+D;for(D=0;D<=9;++D)w[D+96]=D;b.prototype.bind=function(e,t,n){var i=this;return e=e instanceof Array?e:[e],i._bindMultiple.call(i,e,t,n),i},b.prototype.unbind=function(e,t){var n=this;return n.bind.call(n,e,function(){},t);
},b.prototype.trigger=function(e,t){var n=this;return n._directMap[e+":"+t]&&n._directMap[e+":"+t]({},e),n},b.prototype.reset=function(){var e=this;return e._callbacks={},e._directMap={},e},b.prototype.stopCallback=function(e,t){var n=this;return!((" "+t.className+" ").indexOf(" mousetrap ")>-1)&&(!y(t,n.target)&&("INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable))},b.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},b.init=function(){
var e=b(r);for(var t in e)"_"!==t.charAt(0)&&(b[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t))},b.init(),a.Mousetrap=b,"undefined"!=typeof e&&e.exports&&(e.exports=b),i=function(){return b}.call(t,n,t,e),!(i!==s&&(e.exports=i))}(window,document)},function(e,t,n){var i=n(949),a={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1};a.parseValues=function(e,t){for(var n={},a=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),r=0,s=a.length;r<s;++r){
var o=a[r],l=o.indexOf("]=")===-1?o.indexOf("="):o.indexOf("]=")+1;if(l===-1)n[i.decode(o)]="",t.strictNullHandling&&(n[i.decode(o)]=null);else{var c=i.decode(o.slice(0,l)),u=i.decode(o.slice(l+1));Object.prototype.hasOwnProperty.call(n,c)?n[c]=[].concat(n[c]).concat(u):n[c]=u}}return n},a.parseObject=function(e,t,n){if(!e.length)return t;var i,r=e.shift();if("[]"===r)i=[],i=i.concat(a.parseObject(e,t,n));else{i=n.plainObjects?Object.create(null):{};var s="["===r[0]&&"]"===r[r.length-1]?r.slice(1,r.length-1):r,o=parseInt(s,10),l=""+o;
!isNaN(o)&&r!==s&&l===s&&o>=0&&n.parseArrays&&o<=n.arrayLimit?(i=[],i[o]=a.parseObject(e,t,n)):i[s]=a.parseObject(e,t,n)}return i},a.parseKeys=function(e,t,n){if(e){n.allowDots&&(e=e.replace(/\.([^\.\[]+)/g,"[$1]"));var i=/^([^\[\]]*)/,r=/(\[[^\[\]]*\])/g,s=i.exec(e),o=[];if(s[1]){if(!n.plainObjects&&Object.prototype.hasOwnProperty(s[1])&&!n.allowPrototypes)return;o.push(s[1])}for(var l=0;null!==(s=r.exec(e))&&l<n.depth;)++l,(n.plainObjects||!Object.prototype.hasOwnProperty(s[1].replace(/\[|\]/g,""))||n.allowPrototypes)&&o.push(s[1]);
return s&&o.push("["+e.slice(s.index)+"]"),a.parseObject(o,t,n)}},e.exports=function(e,t){if(t=t||{},t.delimiter="string"==typeof t.delimiter||i.isRegExp(t.delimiter)?t.delimiter:a.delimiter,t.depth="number"==typeof t.depth?t.depth:a.depth,t.arrayLimit="number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,t.parseArrays=t.parseArrays!==!1,t.allowDots="boolean"==typeof t.allowDots?t.allowDots:a.allowDots,t.plainObjects="boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,t.allowPrototypes="boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,
t.parameterLimit="number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,t.strictNullHandling="boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling,""===e||null===e||"undefined"==typeof e)return t.plainObjects?Object.create(null):{};for(var n="string"==typeof e?a.parseValues(e,t):e,r=t.plainObjects?Object.create(null):{},s=Object.keys(n),o=0,l=s.length;o<l;++o){var c=s[o],u=a.parseKeys(c,n[c],t);r=i.merge(r,u,t)}return i.compact(r)}},function(e,t,n){var i=n(949),a={
delimiter:"&",arrayPrefixGenerators:{brackets:function(e,t){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e,t){return e}},strictNullHandling:!1};a.stringify=function(e,t,n,r,s){if("function"==typeof s)e=s(t,e);else if(i.isBuffer(e))e=e.toString();else if(e instanceof Date)e=e.toISOString();else if(null===e){if(r)return i.encode(t);e=""}if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return[i.encode(t)+"="+i.encode(e)];var o=[];if("undefined"==typeof e)return o;
for(var l=Array.isArray(s)?s:Object.keys(e),c=0,u=l.length;c<u;++c){var d=l[c];o=Array.isArray(e)?o.concat(a.stringify(e[d],n(t,d),n,r,s)):o.concat(a.stringify(e[d],t+"["+d+"]",n,r,s))}return o},e.exports=function(e,t){t=t||{};var n,i,r="undefined"==typeof t.delimiter?a.delimiter:t.delimiter,s="boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling;"function"==typeof t.filter?(i=t.filter,e=i("",e)):Array.isArray(t.filter)&&(n=i=t.filter);var o=[];if("object"!=typeof e||null===e)return"";
var l;l=t.arrayFormat in a.arrayPrefixGenerators?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":"indices";var c=a.arrayPrefixGenerators[l];n||(n=Object.keys(e));for(var u=0,d=n.length;u<d;++u){var h=n[u];o=o.concat(a.stringify(e[h],h,c,s,i))}return o.join(r)}},function(e,t,n){"use strict";function i(e){this.name="RavenConfigError",this.message=e}i.prototype=new Error,i.prototype.constructor=i,e.exports=i},function(e,t,n){"use strict";(function(t){function i(){return+new Date}function a(){
this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument="undefined"!=typeof document,this._lastCapturedException=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,maxMessageLength:0,stackTraceLimit:50},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,
this._originalConsole=window.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=i(),this._wrappedBuiltIns=[];for(var e in this._originalConsole)this._originalConsoleMethods[e]=this._originalConsole[e]}var r=n(2922),s=n(2920),o=n(951),l=o.isFunction,c=o.isUndefined,u=o.isError,d=o.isEmptyObject,h=o.hasKey,p=o.joinRegExp,f=o.each,g=o.objectMerge,m=o.truncate,v=o.urlencode,y=o.uuid4,b="source protocol user pass host port path".split(" "),S=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
a.prototype={VERSION:"2.2.0",debug:!1,TraceKit:r,config:function(e,t){var n=this;if(this._globalServer)return this._logDebug("error","Error: Raven has already been configured"),this;if(!e)return this;t&&f(t,function(e,t){"tags"===e||"extra"===e?n._globalContext[e]=t:n._globalOptions[e]=t});var i=this._parseDSN(e),a=i.path.lastIndexOf("/"),s=i.path.substr(1,a);return this._dsn=e,this._globalOptions.ignoreErrors.push(/^Script error\.?$/),this._globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),
this._globalOptions.ignoreErrors=p(this._globalOptions.ignoreErrors),this._globalOptions.ignoreUrls=!!this._globalOptions.ignoreUrls.length&&p(this._globalOptions.ignoreUrls),this._globalOptions.whitelistUrls=!!this._globalOptions.whitelistUrls.length&&p(this._globalOptions.whitelistUrls),this._globalOptions.includePaths=p(this._globalOptions.includePaths),this._globalKey=i.user,this._globalSecret=i.pass&&i.pass.substr(1),this._globalProject=i.path.substr(a+1),this._globalServer=this._getGlobalServer(i),
this._globalEndpoint=this._globalServer+"/"+s+"api/"+this._globalProject+"/store/",this._globalOptions.fetchContext&&(r.remoteFetching=!0),this._globalOptions.linesOfContext&&(r.linesOfContext=this._globalOptions.linesOfContext),r.collectWindowErrors=!!this._globalOptions.collectWindowErrors,this},install:function(){var e=this;return this.isSetup()&&!this._isRavenInstalled&&(r.report.subscribe(function(){e._handleOnErrorStackInfo.apply(e,arguments)}),this._wrapBuiltIns(),this._drainPlugins(),this._isRavenInstalled=!0),
Error.stackTraceLimit=this._globalOptions.stackTraceLimit,this},context:function(e,t,n){return l(e)&&(n=t||[],t=e,e=void 0),this.wrap(e,t).apply(this,n)},wrap:function(e,t){function n(){for(var n=[],a=arguments.length,r=!e||e&&e.deep!==!1;a--;)n[a]=r?i.wrap(e,arguments[a]):arguments[a];try{return t.apply(this,n)}catch(t){throw i._ignoreNextOnError(),i.captureException(t,e),t}}var i=this;if(c(t)&&!l(e))return e;if(l(e)&&(t=e,e=void 0),!l(t))return t;try{if(t.__raven__)return t}catch(e){return t}if(t.__raven_wrapper__)return t.__raven_wrapper__;
for(var a in t)h(t,a)&&(n[a]=t[a]);return t.__raven_wrapper__=n,n.prototype=t.prototype,n.__raven__=!0,n.__inner__=t,n},uninstall:function(){return r.report.uninstall(),this._restoreBuiltIns(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},captureException:function(e,t){if(!u(e))return this.captureMessage(e,t);this._lastCapturedException=e;try{var n=r.computeStackTrace(e);this._handleStackInfo(n,t)}catch(t){if(e!==t)throw t}return this},captureMessage:function(e,t){
if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e))return this._send(g({message:e+""},t)),this},addPlugin:function(e){var t=Array.prototype.slice.call(arguments,1);return this._plugins.push([e,t]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(e){return this._globalContext.user=e,this},setExtraContext:function(e){return this._mergeContext("extra",e),this},setTagsContext:function(e){return this._mergeContext("tags",e),this},clearContext:function(){
return this._globalContext={},this},getContext:function(){return JSON.parse(JSON.stringify(this._globalContext))},setRelease:function(e){return this._globalOptions.release=e,this},setDataCallback:function(e){return this._globalOptions.dataCallback=e,this},setShouldSendCallback:function(e){return this._globalOptions.shouldSendCallback=e,this},setTransport:function(e){return this._globalOptions.transport=e,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId;
},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var e=window.RavenConfig;e&&this.config(e.dsn,e.config).install()},showReportDialog:function(e){if(window.document){e=e||{};var t=e.eventId||this.lastEventId();if(!t)throw new s("Missing eventId");var n=e.dsn||this._dsn;if(!n)throw new s("Missing DSN");var i=encodeURIComponent,a="";
a+="?eventId="+i(t),a+="&dsn="+i(n);var r=e.user||this._globalContext.user;r&&(r.name&&(a+="&name="+i(r.name)),r.email&&(a+="&email="+i(r.email)));var o=this._getGlobalServer(this._parseDSN(n)),l=document.createElement("script");l.async=!0,l.src=o+"/api/embed/error-page/"+a,(document.head||document.body).appendChild(l)}},_ignoreNextOnError:function(){var e=this;this._ignoreOnError+=1,setTimeout(function(){e._ignoreOnError-=1})},_triggerEvent:function(e,t){var n,i;if(this._hasDocument){t=t||{},e="raven"+e.substr(0,1).toUpperCase()+e.substr(1),
document.createEvent?(n=document.createEvent("HTMLEvents"),n.initEvent(e,!0,!0)):(n=document.createEventObject(),n.eventType=e);for(i in t)h(t,i)&&(n[i]=t[i]);if(document.createEvent)document.dispatchEvent(n);else try{document.fireEvent("on"+n.eventType.toLowerCase(),n)}catch(e){}}},_wrapBuiltIns:function(){function e(e,t,n,a){var r=e[t];e[t]=n(r),a||i._wrappedBuiltIns.push([e,t,r])}function n(e){return function(t,n){var a=[].slice.call(arguments),r=a[0];return l(r)&&(a[0]=i.wrap(r)),e.apply?e.apply(this,a):e(a[0],a[1]);
}}var i=this;e(window,"setTimeout",n),e(window,"setInterval",n),window.requestAnimationFrame&&e(window,"requestAnimationFrame",function(e){return function(t){return e(i.wrap(t))}}),"EventTarget Window Node ApplicationCache AudioTrackList ChannelMergerNode CryptoOperation EventSource FileReader HTMLUnknownElement IDBDatabase IDBRequest IDBTransaction KeyOperation MediaController MessagePort ModalWindow Notification SVGElementInstance Screen TextTrack TextTrackCue TextTrackList WebSocket WebSocketWorker Worker XMLHttpRequest XMLHttpRequestEventTarget XMLHttpRequestUpload".replace(/\w+/g,function(t){
var n=window[t]&&window[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(e(n,"addEventListener",function(e){return function(t,n,a,r){try{n&&n.handleEvent&&(n.handleEvent=i.wrap(n.handleEvent))}catch(e){}return e.call(this,t,i.wrap(n),a,r)}}),e(n,"removeEventListener",function(e){return function(t,n,i,a){return n=n&&(n.__raven_wrapper__?n.__raven_wrapper__:n),e.call(this,t,n,i,a)}}))}),"XMLHttpRequest"in window&&e(XMLHttpRequest.prototype,"send",function(t){return function(n){
var a=this;return"onreadystatechange onload onerror onprogress".replace(/\w+/g,function(t){t in a&&"[object Function]"===Object.prototype.toString.call(a[t])&&e(a,t,function(e){return i.wrap(e)},!0)}),t.apply(this,arguments)}});var a=t||window.$;a&&a.fn&&a.fn.ready&&e(a.fn,"ready",function(e){return function(t){return e.call(this,i.wrap(t))}})},_restoreBuiltIns:function(){for(var e;this._wrappedBuiltIns.length;){e=this._wrappedBuiltIns.shift();var t=e[0],n=e[1],i=e[2];t[n]=i}},_drainPlugins:function(){
var e=this;f(this._plugins,function(t,n){var i=n[0],a=n[1];i.apply(e,[e].concat(a))})},_parseDSN:function(e){var t=S.exec(e),n={},i=7;try{for(;i--;)n[b[i]]=t[i]||""}catch(t){throw new s("Invalid DSN: "+e)}if(n.pass&&!this._globalOptions.allowSecretKey)throw new s("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return n},_getGlobalServer:function(e){var t="//"+e.host+(e.port?":"+e.port:"");return e.protocol&&(t=e.protocol+":"+t),t},_handleOnErrorStackInfo:function(){
this._ignoreOnError||this._handleStackInfo.apply(this,arguments)},_handleStackInfo:function(e,t){var n=this,i=[];e.stack&&e.stack.length&&f(e.stack,function(e,t){var a=n._normalizeFrame(t);a&&i.push(a)}),this._triggerEvent("handle",{stackInfo:e,options:t}),this._processException(e.name,e.message,e.url,e.lineno,i.slice(0,this._globalOptions.stackTraceLimit),t)},_normalizeFrame:function(e){if(e.url){var t,n={filename:e.url,lineno:e.line,colno:e.column,function:e.func||"?"},i=this._extractContextFromFrame(e);
if(i){var a=["pre_context","context_line","post_context"];for(t=3;t--;)n[a[t]]=i[t]}return n.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(n.filename)||/(Raven|TraceKit)\./.test(n.function)||/raven\.(min\.)?js$/.test(n.filename)),n}},_extractContextFromFrame:function(e){if(e.context&&this._globalOptions.fetchContext){for(var t=e.context,n=~~(t.length/2),i=t.length,a=!1;i--;)if(t[i].length>300){a=!0;break}if(a){if(c(e.column))return;return[[],t[n].substr(e.column,50),[]];
}return[t.slice(0,n),t[n],t.slice(n+1)]}},_processException:function(e,t,n,i,a,r){var s,o;if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t))&&(t+="",t=m(t,this._globalOptions.maxMessageLength),o=e+": "+t,o=m(o,this._globalOptions.maxMessageLength),a&&a.length?(n=a[0].filename||n,a.reverse(),s={frames:a}):n&&(s={frames:[{filename:n,lineno:i,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(n))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(n)))){
var l=g({exception:{values:[{type:e,value:t,stacktrace:s}]},culprit:n,message:o},r);this._send(l)}},_trimPacket:function(e){var t=this._globalOptions.maxMessageLength;if(e.message=m(e.message,t),e.exception){var n=e.exception.values[0];n.value=m(n.value,t)}return e},_getHttpData:function(){if(this._hasDocument&&document.location&&document.location.href){var e={headers:{"User-Agent":navigator.userAgent}};return e.url=document.location.href,document.referrer&&(e.headers.Referer=document.referrer),e;
}},_send:function(e){var t=this,n=this._globalOptions,a={project:this._globalProject,logger:n.logger,platform:"javascript"},r=this._getHttpData();if(r&&(a.request=r),e=g(a,e),e.tags=g(g({},this._globalContext.tags),e.tags),e.extra=g(g({},this._globalContext.extra),e.extra),e.extra["session:duration"]=i()-this._startTime,d(e.tags)&&delete e.tags,this._globalContext.user&&(e.user=this._globalContext.user),n.release&&(e.release=n.release),n.serverName&&(e.server_name=n.serverName),l(n.dataCallback)&&(e=n.dataCallback(e)||e),
e&&!d(e)&&(!l(n.shouldSendCallback)||n.shouldSendCallback(e))&&(this._lastEventId=e.event_id||(e.event_id=y()),e=this._trimPacket(e),this._logDebug("debug","Raven about to send:",e),this.isSetup())){var s={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(s.sentry_secret=this._globalSecret);var o=this._globalEndpoint;(n.transport||this._makeRequest).call(this,{url:o,auth:s,data:e,options:n,onSuccess:function(){t._triggerEvent("success",{data:e,
src:o})},onError:function(){t._triggerEvent("failure",{data:e,src:o})}})}},_makeImageRequest:function(e){e.auth.sentry_data=JSON.stringify(e.data);var t=this._newImage(),n=e.url+"?"+v(e.auth),i=e.options.crossOrigin;(i||""===i)&&(t.crossOrigin=i),t.onload=e.onSuccess,t.onerror=t.onabort=e.onError,t.src=n},_makeXhrRequest:function(e){function t(){200===n.status?e.onSuccess&&e.onSuccess():e.onError&&e.onError()}var n,i=e.url;n=new XMLHttpRequest,"withCredentials"in n?n.onreadystatechange=function(){
4===n.readyState&&t()}:(n=new XDomainRequest,i=i.replace(/^https?:/,""),n.onload=t),n.open("POST",i+"?"+v(e.auth)),n.send(JSON.stringify(e.data))},_makeRequest:function(e){var t="withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest;return(t?this._makeXhrRequest:this._makeImageRequest)(e)},_newImage:function(){return document.createElement("img")},_logDebug:function(e){this._originalConsoleMethods[e]&&this.debug&&Function.prototype.apply.call(this._originalConsoleMethods[e],this._originalConsole,[].slice.call(arguments,1));
},_mergeContext:function(e,t){c(t)?delete this._globalContext[e]:this._globalContext[e]=g(this._globalContext[e]||{},t)}},a.prototype.setUser=a.prototype.setUserContext,a.prototype.setReleaseContext=a.prototype.setRelease,e.exports=a}).call(t,n(5))},function(e,t,n){"use strict";function i(){return"undefined"==typeof document?"":document.location.href}var a=n(951),r=a.hasKey,s=a.isString,o=a.isUndefined,l={remoteFetching:!1,collectWindowErrors:!0,linesOfContext:7,debug:!1},c=[].slice,u="?";l.report=function(){
function e(e){o(),g.push(e)}function t(e){for(var t=g.length-1;t>=0;--t)g[t]===e&&g.splice(t,1)}function n(){u(),g=[]}function a(e,t){var n=null;if(!t||l.collectWindowErrors){for(var i in g)if(r(g,i))try{g[i].apply(null,[e].concat(c.call(arguments,2)))}catch(e){n=e}if(n)throw n}}function s(e,t,n,r,s){var o=null;if(y)l.computeStackTrace.augmentStackTraceWithInitialElement(y,t,n,e),d();else if(s)o=l.computeStackTrace(s),a(o,!0);else{var c={url:t,line:n,column:r};c.func=l.computeStackTrace.guessFunctionName(c.url,c.line),
c.context=l.computeStackTrace.gatherContext(c.url,c.line),o={message:e,url:i(),stack:[c]},a(o,!0)}return!!p&&p.apply(this,arguments)}function o(){f||(p=window.onerror,window.onerror=s,f=!0)}function u(){f&&(window.onerror=p,f=!1,p=void 0)}function d(){var e=y,t=m;m=null,y=null,v=null,a.apply(null,[e,!1].concat(t))}function h(e,t){var n=c.call(arguments,1);if(y){if(v===e)return;d()}var i=l.computeStackTrace(e);if(y=i,v=e,m=n,window.setTimeout(function(){v===e&&d()},i.incomplete?2e3:0),t!==!1)throw e;
}var p,f,g=[],m=null,v=null,y=null;return h.subscribe=e,h.unsubscribe=t,h.uninstall=n,h}(),l.computeStackTrace=function(){function e(e){if(!l.remoteFetching)return"";try{var t=function(){try{return new window.XMLHttpRequest}catch(e){return new window.ActiveXObject("Microsoft.XMLHTTP")}},n=t();return n.open("GET",e,!1),n.send(""),n.responseText}catch(e){return""}}function t(t){if(!s(t))return[];if(!r(w,t)){var n="",i="";try{i=document.domain}catch(e){}t.indexOf(i)!==-1&&(n=e(t)),w[t]=n?n.split("\n"):[];
}return w[t]}function n(e,n){var i,a=/function ([^(]*)\(([^)]*)\)/,r=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,s="",l=10,c=t(e);if(!c.length)return u;for(var d=0;d<l;++d)if(s=c[n-d]+s,!o(s)){if(i=r.exec(s))return i[1];if(i=a.exec(s))return i[1]}return u}function a(e,n){var i=t(e);if(!i.length)return null;var a=[],r=Math.floor(l.linesOfContext/2),s=r+l.linesOfContext%2,c=Math.max(0,n-r-1),u=Math.min(i.length,n+s-1);n-=1;for(var d=c;d<u;++d)o(i[d])||a.push(i[d]);return a.length>0?a:null;
}function c(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function d(e){return c(e).replace("<","(?:<|&lt;)").replace(">","(?:>|&gt;)").replace("&","(?:&|&amp;)").replace('"','(?:"|&quot;)').replace(/\s+/g,"\\s+")}function h(e,n){for(var i,a,r=0,s=n.length;r<s;++r)if((i=t(n[r])).length&&(i=i.join("\n"),a=e.exec(i)))return{url:n[r],line:i.substring(0,a.index).split("\n").length,column:a.index-i.lastIndexOf("\n",a.index)-1};return null}function p(e,n,i){var a,r=t(n),s=new RegExp("\\b"+c(e)+"\\b");
return i-=1,r&&r.length>i&&(a=s.exec(r[i]))?a.index:null}function f(e){if("undefined"!=typeof document){for(var t,n,i,a,r=[window.location.href],s=document.getElementsByTagName("script"),o=""+e,l=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,u=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,p=0;p<s.length;++p){var f=s[p];f.src&&r.push(f.src)}if(i=l.exec(o)){var g=i[1]?"\\s+"+i[1]:"",m=i[2].split(",").join("\\s*,\\s*");t=c(i[3]).replace(/;$/,";?"),n=new RegExp("function"+g+"\\s*\\(\\s*"+m+"\\s*\\)\\s*{\\s*"+t+"\\s*}");
}else n=new RegExp(c(o).replace(/\s+/g,"\\s+"));if(a=h(n,r))return a;if(i=u.exec(o)){var v=i[1];if(t=d(i[2]),n=new RegExp("on"+v+"=[\\'\"]\\s*"+t+"\\s*[\\'\"]","i"),a=h(n,r[0]))return a;if(n=new RegExp(t),a=h(n,r))return a}return null}}function g(e){if(!o(e.stack)&&e.stack){for(var t,r,s=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,l=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[).*?)(?::(\d+))?(?::(\d+))?\s*$/i,c=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,d=e.stack.split("\n"),h=[],f=/^(.*) is undefined$/.exec(e.message),g=0,m=d.length;g<m;++g){
if(t=s.exec(d[g])){var v=t[2]&&t[2].indexOf("native")!==-1;r={url:v?null:t[2],func:t[1]||u,args:v?[t[2]]:[],line:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}else if(t=c.exec(d[g]))r={url:t[2],func:t[1]||u,args:[],line:+t[3],column:t[4]?+t[4]:null};else{if(!(t=l.exec(d[g])))continue;r={url:t[3],func:t[1]||u,args:t[2]?t[2].split(","):[],line:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}!r.func&&r.line&&(r.func=n(r.url,r.line)),r.line&&(r.context=a(r.url,r.line)),h.push(r)}return h.length?(h[0].line&&!h[0].column&&f?h[0].column=p(f[1],h[0].url,h[0].line):h[0].column||o(e.columnNumber)||(h[0].column=e.columnNumber+1),
{name:e.name,message:e.message,url:i(),stack:h}):null}}function m(e){var t=e.stacktrace;if(!o(e.stacktrace)&&e.stacktrace){for(var r,s=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,l=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,c=t.split("\n"),u=[],d=0;d<c.length;d+=2){var h=null;if((r=s.exec(c[d]))?h={url:r[2],line:+r[1],column:null,func:r[3],args:[]}:(r=l.exec(c[d]))&&(h={url:r[6],line:+r[1],column:+r[2],func:r[3]||r[4],args:r[5]?r[5].split(","):[]
}),h){if(!h.func&&h.line&&(h.func=n(h.url,h.line)),h.line)try{h.context=a(h.url,h.line)}catch(e){}h.context||(h.context=[c[d+1]]),u.push(h)}}return u.length?{name:e.name,message:e.message,url:i(),stack:u}:null}}function v(e){var s=e.message.split("\n");if(s.length<4)return null;var o,l=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,c=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,u=/^\s*Line (\d+) of function script\s*$/i,p=[],f=document.getElementsByTagName("script"),g=[];
for(var m in f)r(f,m)&&!f[m].src&&g.push(f[m]);for(var v=2;v<s.length;v+=2){var y=null;if(o=l.exec(s[v]))y={url:o[2],func:o[3],args:[],line:+o[1],column:null};else if(o=c.exec(s[v])){y={url:o[3],func:o[4],args:[],line:+o[1],column:null};var b=+o[1],S=g[o[2]-1];if(S){var w=t(y.url);if(w){w=w.join("\n");var M=w.indexOf(S.innerText);M>=0&&(y.line=b+w.substring(0,M).split("\n").length)}}}else if(o=u.exec(s[v])){var I=window.location.href.replace(/#.*$/,""),C=new RegExp(d(s[v+1])),D=h(C,[I]);y={url:I,
func:"",args:[],line:D?D.line:o[1],column:null}}if(y){y.func||(y.func=n(y.url,y.line));var T=a(y.url,y.line),x=T?T[Math.floor(T.length/2)]:null;T&&x.replace(/^\s*/,"")===s[v+1].replace(/^\s*/,"")?y.context=T:y.context=[s[v+1]],p.push(y)}}return p.length?{name:e.name,message:s[0],url:i(),stack:p}:null}function y(e,t,i,r){var s={url:t,line:i};if(s.url&&s.line){e.incomplete=!1,s.func||(s.func=n(s.url,s.line)),s.context||(s.context=a(s.url,s.line));var o=/ '([^']+)' /.exec(r);if(o&&(s.column=p(o[1],s.url,s.line)),
e.stack.length>0&&e.stack[0].url===s.url){if(e.stack[0].line===s.line)return!1;if(!e.stack[0].line&&e.stack[0].func===s.func)return e.stack[0].line=s.line,e.stack[0].context=s.context,!1}return e.stack.unshift(s),e.partial=!0,!0}return e.incomplete=!0,!1}function b(e,t){for(var a,r,s,o=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,c=[],d={},h=!1,g=b.caller;g&&!h;g=g.caller)if(g!==S&&g!==l.report){if(r={url:null,func:u,line:null,column:null},g.name?r.func=g.name:(a=o.exec(g.toString()))&&(r.func=a[1]),
"undefined"==typeof r.func)try{r.func=a.input.substring(0,a.input.indexOf("{"))}catch(e){}if(s=f(g)){r.url=s.url,r.line=s.line,r.func===u&&(r.func=n(r.url,r.line));var m=/ '([^']+)' /.exec(e.message||e.description);m&&(r.column=p(m[1],s.url,s.line))}d[""+g]?h=!0:d[""+g]=!0,c.push(r)}t&&c.splice(0,t);var v={name:e.name,message:e.message,url:i(),stack:c};return y(v,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),v}function S(e,t){var n=null;t=null==t?0:+t;try{if(n=m(e))return n;
}catch(e){if(l.debug)throw e}try{if(n=g(e))return n}catch(e){if(l.debug)throw e}try{if(n=v(e))return n}catch(e){if(l.debug)throw e}try{if(n=b(e,t+1))return n}catch(e){if(l.debug)throw e}return{name:e.name,message:e.message,url:i()}}var w={};return S.augmentStackTraceWithInitialElement=y,S.computeStackTraceFromStackProp=g,S.guessFunctionName=n,S.gatherContext=a,S}(),e.exports=l},function(e,t,n){e.exports=n(3038)},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=n(2997),s=i(r),o=n(2998),l=i(o),c=function(){function e(){a(this,e),this.entered=[]}return e.prototype.enter=function(e){var t=this.entered.length;return this.entered=s.default(this.entered.filter(function(t){return document.documentElement.contains(t)&&(!t.contains||t.contains(e))}),[e]),0===t&&this.entered.length>0},e.prototype.leave=function(e){var t=this.entered.length;return this.entered=l.default(this.entered.filter(function(e){
return document.documentElement.contains(e)}),e),t>0&&0===this.entered.length},e.prototype.reset=function(){this.entered=[]},e}();t.default=c,e.exports=t.default},function(e,t,n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;
var s=n(2990),o=a(s),l=n(2930),c=a(l),u=n(2924),d=a(u),h=n(952),p=n(2928),f=n(2927),g=n(584),m=i(g),v=function(){function e(t){r(this,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.sourceNodes={},this.sourceNodeOptions={},this.enterLeaveCounter=new d.default,this.getSourceClientOffset=this.getSourceClientOffset.bind(this),this.handleTopDragStart=this.handleTopDragStart.bind(this),this.handleTopDragStartCapture=this.handleTopDragStartCapture.bind(this),
this.handleTopDragEndCapture=this.handleTopDragEndCapture.bind(this),this.handleTopDragEnter=this.handleTopDragEnter.bind(this),this.handleTopDragEnterCapture=this.handleTopDragEnterCapture.bind(this),this.handleTopDragLeaveCapture=this.handleTopDragLeaveCapture.bind(this),this.handleTopDragOver=this.handleTopDragOver.bind(this),this.handleTopDragOverCapture=this.handleTopDragOverCapture.bind(this),this.handleTopDrop=this.handleTopDrop.bind(this),this.handleTopDropCapture=this.handleTopDropCapture.bind(this),
this.handleSelectStart=this.handleSelectStart.bind(this),this.endDragIfSourceWasRemovedFromDOM=this.endDragIfSourceWasRemovedFromDOM.bind(this),this.endDragNativeItem=this.endDragNativeItem.bind(this)}return e.prototype.setup=function(){if("undefined"!=typeof window){if(this.constructor.isSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.constructor.isSetUp=!0,this.addEventListeners(window)}},e.prototype.teardown=function(){"undefined"!=typeof window&&(this.constructor.isSetUp=!1,
this.removeEventListeners(window),this.clearCurrentDragSourceNode())},e.prototype.addEventListeners=function(e){e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),
e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.removeEventListeners=function(e){e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),
e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.connectDragPreview=function(e,t,n){var i=this;return this.sourcePreviewNodeOptions[e]=n,this.sourcePreviewNodes[e]=t,function(){delete i.sourcePreviewNodes[e],delete i.sourcePreviewNodeOptions[e];
}},e.prototype.connectDragSource=function(e,t,n){var i=this;this.sourceNodes[e]=t,this.sourceNodeOptions[e]=n;var a=function(t){return i.handleDragStart(t,e)},r=function(t){return i.handleSelectStart(t,e)};return t.setAttribute("draggable",!0),t.addEventListener("dragstart",a),t.addEventListener("selectstart",r),function(){delete i.sourceNodes[e],delete i.sourceNodeOptions[e],t.removeEventListener("dragstart",a),t.removeEventListener("selectstart",r),t.setAttribute("draggable",!1)}},e.prototype.connectDropTarget=function(e,t){
var n=this,i=function(t){return n.handleDragEnter(t,e)},a=function(t){return n.handleDragOver(t,e)},r=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",i),t.addEventListener("dragover",a),t.addEventListener("drop",r),function(){t.removeEventListener("dragenter",i),t.removeEventListener("dragover",a),t.removeEventListener("drop",r)}},e.prototype.getCurrentSourceNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions[e];return o.default(t||{},{dropEffect:"move"
})},e.prototype.getCurrentDropEffect=function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect},e.prototype.getCurrentSourcePreviewNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions[e];return o.default(t||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})},e.prototype.getSourceClientOffset=function(e){return p.getNodeClientOffset(this.sourceNodes[e])},e.prototype.isDraggingNativeItem=function(){var e=this.monitor.getItemType();
return Object.keys(m).some(function(t){return m[t]===e})},e.prototype.beginDragNativeItem=function(e){this.clearCurrentDragSourceNode();var t=f.createNativeDragSource(e);this.currentNativeSource=new t,this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle]),h.isFirefox()&&window.addEventListener("mousemove",this.endDragNativeItem,!0)},e.prototype.endDragNativeItem=function(){this.isDraggingNativeItem()&&(h.isFirefox()&&window.removeEventListener("mousemove",this.endDragNativeItem,!0),
this.actions.endDrag(),this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},e.prototype.endDragIfSourceWasRemovedFromDOM=function(){var e=this.currentDragSourceNode;document.body.contains(e)||this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.setCurrentDragSourceNode=function(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.currentDragSourceNodeOffset=p.getNodeClientOffset(e),this.currentDragSourceNodeOffsetChanged=!1,
window.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},e.prototype.clearCurrentDragSourceNode=function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0),!0)},e.prototype.checkIfCurrentDragSourceRectChanged=function(){var e=this.currentDragSourceNode;return!!e&&(!!this.currentDragSourceNodeOffsetChanged||(this.currentDragSourceNodeOffsetChanged=!c.default(p.getNodeClientOffset(e),this.currentDragSourceNodeOffset),
this.currentDragSourceNodeOffsetChanged))},e.prototype.handleTopDragStartCapture=function(){this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},e.prototype.handleDragStart=function(e,t){this.dragStartSourceIds.unshift(t)},e.prototype.handleTopDragStart=function(e){var t=this,n=this.dragStartSourceIds;this.dragStartSourceIds=null;var i=p.getEventClientOffset(e);this.actions.beginDrag(n,{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:i});var a=e.dataTransfer,r=f.matchNativeItemType(a);
if(this.monitor.isDragging()){if("function"==typeof a.setDragImage){var s=this.monitor.getSourceId(),o=this.sourceNodes[s],l=this.sourcePreviewNodes[s]||o,c=this.getCurrentSourcePreviewNodeOptions(),u=c.anchorX,d=c.anchorY,h={anchorX:u,anchorY:d},g=p.getDragPreviewOffset(o,l,i,h);a.setDragImage(l,g.x,g.y)}try{a.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target);var m=this.getCurrentSourcePreviewNodeOptions(),v=m.captureDraggingState;v?this.actions.publishDragSource():setTimeout(function(){
return t.actions.publishDragSource()})}else if(r)this.beginDragNativeItem(r);else{if(!(a.types||e.target.hasAttribute&&e.target.hasAttribute("draggable")))return;e.preventDefault()}},e.prototype.handleTopDragEndCapture=function(){this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.handleTopDragEnterCapture=function(e){this.dragEnterTargetIds=[];var t=this.enterLeaveCounter.enter(e.target);if(t&&!this.monitor.isDragging()){var n=e.dataTransfer,i=f.matchNativeItemType(n);i&&this.beginDragNativeItem(i);
}},e.prototype.handleDragEnter=function(e,t){this.dragEnterTargetIds.unshift(t)},e.prototype.handleTopDragEnter=function(e){var t=this,n=this.dragEnterTargetIds;if(this.dragEnterTargetIds=[],this.monitor.isDragging()){h.isFirefox()||this.actions.hover(n,{clientOffset:p.getEventClientOffset(e)});var i=n.some(function(e){return t.monitor.canDropOnTarget(e)});i&&(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect())}},e.prototype.handleTopDragOverCapture=function(){this.dragOverTargetIds=[];
},e.prototype.handleDragOver=function(e,t){this.dragOverTargetIds.unshift(t)},e.prototype.handleTopDragOver=function(e){var t=this,n=this.dragOverTargetIds;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer.dropEffect="none");this.actions.hover(n,{clientOffset:p.getEventClientOffset(e)});var i=n.some(function(e){return t.monitor.canDropOnTarget(e)});i?(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect()):this.isDraggingNativeItem()?(e.preventDefault(),
e.dataTransfer.dropEffect="none"):this.checkIfCurrentDragSourceRectChanged()&&(e.preventDefault(),e.dataTransfer.dropEffect="move")},e.prototype.handleTopDragLeaveCapture=function(e){this.isDraggingNativeItem()&&e.preventDefault();var t=this.enterLeaveCounter.leave(e.target);t&&this.isDraggingNativeItem()&&this.endDragNativeItem()},e.prototype.handleTopDropCapture=function(e){this.dropTargetIds=[],e.preventDefault(),this.isDraggingNativeItem()&&this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer),
this.enterLeaveCounter.reset()},e.prototype.handleDrop=function(e,t){this.dropTargetIds.unshift(t)},e.prototype.handleTopDrop=function(e){var t=this.dropTargetIds;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:p.getEventClientOffset(e)}),this.actions.drop(),this.isDraggingNativeItem()?this.endDragNativeItem():this.endDragIfSourceWasRemovedFromDOM()},e.prototype.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),
t.dragDrop()))},e}();t.default=v,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var a=function(){function e(t,n){i(this,e);for(var a=t.length,r=[],s=0;s<a;s++)r.push(s);r.sort(function(e,n){return t[e]<t[n]?-1:1});for(var o=[],l=[],c=[],u=void 0,d=void 0,s=0;s<a-1;s++)u=t[s+1]-t[s],d=n[s+1]-n[s],l.push(u),o.push(d),c.push(d/u);for(var h=[c[0]],s=0;s<l.length-1;s++){var p=c[s],f=c[s+1];if(p*f<=0)h.push(0);else{
u=l[s];var g=l[s+1],m=u+g;h.push(3*m/((m+g)/p+(m+u)/f))}}h.push(c[c.length-1]);for(var v=[],y=[],b=void 0,s=0;s<h.length-1;s++){b=c[s];var S=h[s],w=1/l[s],m=S+h[s+1]-b-b;v.push((b-S-m)*w),y.push(m*w*w)}this.xs=t,this.ys=n,this.c1s=h,this.c2s=v,this.c3s=y}return e.prototype.interpolate=function(e){var t=this.xs,n=this.ys,i=this.c1s,a=this.c2s,r=this.c3s,s=t.length-1;if(e===t[s])return n[s];for(var o=0,l=r.length-1,c=void 0;o<=l;){c=Math.floor(.5*(o+l));var u=t[c];if(u<e)o=c+1;else{if(!(u>e))return n[c];
l=c-1}}s=Math.max(0,l);var d=e-t[s],h=d*d;return n[s]+i[s]*d+a[s]*h+r[s]*d*h},e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,
e}function s(e,t,n){var i=t.reduce(function(t,n){return t||e.getData(n)},null);return null!=i?i:n}function o(e){var t=h[e],n=t.exposeProperty,i=t.matchesTypes,s=t.getData;return function(){function e(){a(this,e),this.item=Object.defineProperties({},r({},n,{get:function(){return console.warn("Browser doesn't allow reading \""+n+'" until the drop event.'),null},configurable:!0,enumerable:!0}))}return e.prototype.mutateItemByReadingDataTransfer=function(e){delete this.item[n],this.item[n]=s(e,i)},e.prototype.canDrag=function(){
return!0},e.prototype.beginDrag=function(){return this.item},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},e.prototype.endDrag=function(){},e}()}function l(e){var t=Array.prototype.slice.call(e.types||[]);return Object.keys(h).filter(function(e){var n=h[e].matchesTypes;return n.some(function(e){return t.indexOf(e)>-1})})[0]||null}t.__esModule=!0;var c;t.createNativeDragSource=o,t.matchNativeItemType=l;var u=n(584),d=i(u),h=(c={},r(c,d.FILE,{exposeProperty:"files",matchesTypes:["Files"],
getData:function(e){return Array.prototype.slice.call(e.files)}}),r(c,d.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return s(e,t,"").split("\n")}}),r(c,d.TEXT,{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(e,t){return s(e,t,"")}}),c)},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.nodeType===u?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),i=n.top,a=n.left;
return{x:a,y:i}}function r(e){return{x:e.clientX,y:e.clientY}}function s(e,t,n,i){var r="IMG"===t.nodeName&&(o.isFirefox()||!document.documentElement.contains(t)),s=r?e:t,l=a(s),u={x:n.x-l.x,y:n.y-l.y},d=e.offsetWidth,h=e.offsetHeight,p=i.anchorX,f=i.anchorY,g=r?t.width:d,m=r?t.height:h;o.isSafari()&&r?(m/=window.devicePixelRatio,g/=window.devicePixelRatio):o.isFirefox()&&!r&&(m*=window.devicePixelRatio,g*=window.devicePixelRatio);var v=new c.default([0,.5,1],[u.x,u.x/d*g,u.x+g-d]),y=new c.default([0,.5,1],[u.y,u.y/h*m,u.y+m-h]),b=v.interpolate(p),S=y.interpolate(f);
return o.isSafari()&&r&&(S+=(window.devicePixelRatio-1)*m),{x:b,y:S}}t.__esModule=!0,t.getNodeClientOffset=a,t.getEventClientOffset=r,t.getDragPreviewOffset=s;var o=n(952),l=n(2926),c=i(l),u=1},function(e,t,n){"use strict";function i(){return a||(a=new Image,a.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),a}t.__esModule=!0,t.default=i;var a=void 0;e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(e===t)return!0;var n=Object.keys(e),i=Object.keys(t);
if(n.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty,r=0;r<n.length;r++){if(!a.call(t,n[r])||e[n[r]]!==t[n[r]])return!1;var s=e[n[r]],o=t[n[r]];if(s!==o)return!1}return!0}t.__esModule=!0,t.default=i,e.exports=t.default},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}var a=n(2958),r=n(2959),s=n(2960),o=n(2961),l=n(2962);i.prototype.clear=a,i.prototype.delete=r,i.prototype.get=s,i.prototype.has=o,i.prototype.set=l,
e.exports=i},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}var a=n(2968),r=n(2969),s=n(2970),o=n(2971),l=n(2972);i.prototype.clear=a,i.prototype.delete=r,i.prototype.get=s,i.prototype.has=o,i.prototype.set=l,e.exports=i},function(e,t,n){var i=n(400),a=n(307),r=i(a,"Map");e.exports=r},function(e,t,n){var i=n(400),a=n(307),r=i(a,"Set");e.exports=r},function(e,t,n){function i(e,t){var n=s(e),i=!n&&r(e),u=!n&&!i&&o(e),h=!n&&!i&&!u&&c(e),p=n||i||u||h,f=p?a(e.length,String):[],g=f.length;
for(var m in e)!t&&!d.call(e,m)||p&&("length"==m||u&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||l(m,g))||f.push(m);return f}var a=n(2949),r=n(967),s=n(968),o=n(2991),l=n(964),c=n(2992),u=Object.prototype,d=u.hasOwnProperty;e.exports=i},function(e,t){function n(e,t){for(var n=-1,i=null==e?0:e.length,a=Array(i);++n<i;)a[n]=t(e[n],n,e);return a}e.exports=n},function(e,t){function n(e,t){for(var n=-1,i=t.length,a=e.length;++n<i;)e[a+n]=t[n];return e}e.exports=n},function(e,t,n){
function i(e,t,n){var i=e[t];o.call(e,t)&&r(i,n)&&(void 0!==n||t in e)||a(e,t,n)}var a=n(959),r=n(402),s=Object.prototype,o=s.hasOwnProperty;e.exports=i},function(e,t,n){function i(e,t,n,i){var d=-1,h=r,p=!0,f=e.length,g=[],m=t.length;if(!f)return g;n&&(t=o(t,l(n))),i?(h=s,p=!1):t.length>=u&&(h=c,p=!1,t=new a(t));e:for(;++d<f;){var v=e[d],y=null==n?v:n(v);if(v=i||0!==v?v:0,p&&y===y){for(var b=m;b--;)if(t[b]===y)continue e;g.push(v)}else h(t,y,i)||g.push(v)}return g}var a=n(955),r=n(957),s=n(958),o=n(2936),l=n(960),c=n(961),u=200;
e.exports=i},function(e,t){function n(e,t,n,i){for(var a=e.length,r=n+(i?1:-1);i?r--:++r<a;)if(t(e[r],r,e))return r;return-1}e.exports=n},function(e,t,n){function i(e,t,n,s,o){var l=-1,c=e.length;for(n||(n=r),o||(o=[]);++l<c;){var u=e[l];t>0&&n(u)?t>1?i(u,t-1,n,s,o):a(o,u):s||(o[o.length]=u)}return o}var a=n(2937),r=n(2963);e.exports=i},function(e,t,n){function i(e,t,n){return t===t?s(e,t,n):a(e,r,n)}var a=n(2940),r=n(2944),s=n(2986);e.exports=i},function(e,t,n){function i(e){return r(e)&&a(e)==s;
}var a=n(586),r=n(404),s="[object Arguments]";e.exports=i},function(e,t){function n(e){return e!==e}e.exports=n},function(e,t,n){function i(e){if(!s(e)||r(e))return!1;var t=a(e)?f:c;return t.test(o(e))}var a=n(970),r=n(2966),s=n(403),o=n(2987),l=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,h=u.toString,p=d.hasOwnProperty,f=RegExp("^"+h.call(p).replace(l,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=i;
},function(e,t,n){function i(e){return s(e)&&r(e.length)&&!!L[a(e)]}var a=n(586),r=n(971),s=n(404),o="[object Arguments]",l="[object Array]",c="[object Boolean]",u="[object Date]",d="[object Error]",h="[object Function]",p="[object Map]",f="[object Number]",g="[object Object]",m="[object RegExp]",v="[object Set]",y="[object String]",b="[object WeakMap]",S="[object ArrayBuffer]",w="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",C="[object Int8Array]",D="[object Int16Array]",T="[object Int32Array]",x="[object Uint8Array]",P="[object Uint8ClampedArray]",E="[object Uint16Array]",A="[object Uint32Array]",L={};
L[M]=L[I]=L[C]=L[D]=L[T]=L[x]=L[P]=L[E]=L[A]=!0,L[o]=L[l]=L[S]=L[c]=L[w]=L[u]=L[d]=L[h]=L[p]=L[f]=L[g]=L[m]=L[v]=L[y]=L[b]=!1,e.exports=i},function(e,t,n){function i(e){if(!a(e))return s(e);var t=r(e),n=[];for(var i in e)("constructor"!=i||!t&&l.call(e,i))&&n.push(i);return n}var a=n(403),r=n(2967),s=n(2978),o=Object.prototype,l=o.hasOwnProperty;e.exports=i},function(e,t,n){var i=n(2989),a=n(962),r=n(966),s=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0
})}:r;e.exports=s},function(e,t){function n(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}e.exports=n},function(e,t,n){function i(e,t,n){var i=-1,d=r,h=e.length,p=!0,f=[],g=f;if(n)p=!1,d=s;else if(h>=u){var m=t?null:l(e);if(m)return c(m);p=!1,d=o,g=new a}else g=t?[]:f;e:for(;++i<h;){var v=e[i],y=t?t(v):v;if(v=n||0!==v?v:0,p&&y===y){for(var b=g.length;b--;)if(g[b]===y)continue e;t&&g.push(y),f.push(v)}else d(g,y,n)||(g!==f&&g.push(y),f.push(v))}return f}var a=n(955),r=n(957),s=n(958),o=n(961),l=n(2954),c=n(965),u=200;
e.exports=i},function(e,t,n){function i(e,t,n,i){var s=!n;n||(n={});for(var o=-1,l=t.length;++o<l;){var c=t[o],u=i?i(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),s?r(n,c,u):a(n,c,u)}return n}var a=n(2938),r=n(959);e.exports=i},function(e,t,n){var i=n(307),a=i["__core-js_shared__"];e.exports=a},function(e,t,n){function i(e){return a(function(t,n){var i=-1,a=n.length,s=a>1?n[a-1]:void 0,o=a>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(a--,s):void 0,o&&r(n[0],n[1],o)&&(s=a<3?void 0:s,a=1),t=Object(t);++i<a;){
var l=n[i];l&&e(t,l,i,s)}return t})}var a=n(398),r=n(2964);e.exports=i},function(e,t,n){var i=n(2934),a=n(2995),r=n(965),s=1/0,o=i&&1/r(new i([,-0]))[1]==s?function(e){return new i(e)}:a;e.exports=o},function(e,t,n){function i(e,t,n,i){return void 0===e||a(e,r[n])&&!s.call(i,n)?t:e}var a=n(402),r=Object.prototype,s=r.hasOwnProperty;e.exports=i},function(e,t,n){function i(e){var t=s.call(e,l),n=e[l];try{e[l]=void 0;var i=!0}catch(e){}var a=o.call(e);return i&&(t?e[l]=n:delete e[l]),a}var a=n(585),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,l=a?a.toStringTag:void 0;
e.exports=i},function(e,t){function n(e,t){return null==e?void 0:e[t]}e.exports=n},function(e,t,n){function i(){this.__data__=a?a(null):{},this.size=0}var a=n(401);e.exports=i},function(e,t){function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}e.exports=n},function(e,t,n){function i(e){var t=this.__data__;if(a){var n=t[e];return n===r?void 0:n}return o.call(t,e)?t[e]:void 0}var a=n(401),r="__lodash_hash_undefined__",s=Object.prototype,o=s.hasOwnProperty;e.exports=i},function(e,t,n){
function i(e){var t=this.__data__;return a?void 0!==t[e]:s.call(t,e)}var a=n(401),r=Object.prototype,s=r.hasOwnProperty;e.exports=i},function(e,t,n){function i(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=a&&void 0===t?r:t,this}var a=n(401),r="__lodash_hash_undefined__";e.exports=i},function(e,t,n){function i(e){return s(e)||r(e)||!!(o&&e&&e[o])}var a=n(585),r=n(967),s=n(968),o=a?a.isConcatSpreadable:void 0;e.exports=i},function(e,t,n){function i(e,t,n){if(!o(n))return!1;var i=typeof t;
return!!("number"==i?r(n)&&s(t,n.length):"string"==i&&t in n)&&a(n[t],e)}var a=n(402),r=n(587),s=n(964),o=n(403);e.exports=i},function(e,t){function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=n},function(e,t,n){function i(e){return!!r&&r in e}var a=n(2952),r=function(){var e=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=i},function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||i;
return e===n}var i=Object.prototype;e.exports=n},function(e,t){function n(){this.__data__=[],this.size=0}e.exports=n},function(e,t,n){function i(e){var t=this.__data__,n=a(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():s.call(t,n,1),--this.size,!0}var a=n(397),r=Array.prototype,s=r.splice;e.exports=i},function(e,t,n){function i(e){var t=this.__data__,n=a(t,e);return n<0?void 0:t[n][1]}var a=n(397);e.exports=i},function(e,t,n){function i(e){return a(this.__data__,e)>-1}var a=n(397);e.exports=i;
},function(e,t,n){function i(e,t){var n=this.__data__,i=a(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}var a=n(397);e.exports=i},function(e,t,n){function i(){this.size=0,this.__data__={hash:new a,map:new(s||r),string:new a}}var a=n(2931),r=n(2932),s=n(2933);e.exports=i},function(e,t,n){function i(e){var t=a(this,e).delete(e);return this.size-=t?1:0,t}var a=n(399);e.exports=i},function(e,t,n){function i(e){return a(this,e).get(e)}var a=n(399);e.exports=i},function(e,t,n){function i(e){
return a(this,e).has(e)}var a=n(399);e.exports=i},function(e,t,n){function i(e,t){var n=a(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}var a=n(399);e.exports=i},function(e,t){function n(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}e.exports=n},function(e,t,n){(function(e){var i=n(963),a="object"==typeof t&&t&&!t.nodeType&&t,r=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=r&&r.exports===a,o=s&&i.process,l=function(){try{return o&&o.binding&&o.binding("util")}catch(e){}
}();e.exports=l}).call(t,n(612)(e))},function(e,t){function n(e){return a.call(e)}var i=Object.prototype,a=i.toString;e.exports=n},function(e,t,n){function i(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=r(i.length-t,0),l=Array(o);++s<o;)l[s]=i[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=i[s];return c[t]=n(l),a(e,this,c)}}var a=n(956),r=Math.max;e.exports=i},function(e,t){function n(e){return this.__data__.set(e,i),this}var i="__lodash_hash_undefined__";e.exports=n;
},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t,n){var i=n(2948),a=n(2985),r=a(i);e.exports=r},function(e,t){function n(e){var t=0,n=0;return function(){var s=r(),o=a-(s-n);if(n=s,o>0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,a=16,r=Date.now;e.exports=n},function(e,t){function n(e,t,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===t)return i;return-1}e.exports=n},function(e,t){function n(e){if(null!=e){try{return a.call(e)}catch(e){}
try{return e+""}catch(e){}}return""}var i=Function.prototype,a=i.toString;e.exports=n},function(e,t,n){var i=n(2951),a=n(2953),r=n(2993),s=a(function(e,t,n,a){i(t,r(t),e,a)});e.exports=s},function(e,t){function n(e){return function(){return e}}e.exports=n},function(e,t,n){var i=n(956),a=n(2988),r=n(398),s=n(2955),o=r(function(e){return e.push(void 0,s),i(a,void 0,e)});e.exports=o},function(e,t,n){(function(e){var i=n(307),a=n(2996),r="object"==typeof t&&t&&!t.nodeType&&t,s=r&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===r,l=o?i.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||a;
e.exports=u}).call(t,n(612)(e))},function(e,t,n){var i=n(2946),a=n(960),r=n(2979),s=r&&r.isTypedArray,o=s?a(s):i;e.exports=o},function(e,t,n){function i(e){return s(e)?a(e,!0):r(e)}var a=n(2935),r=n(2947),s=n(587);e.exports=i},function(e,t,n){function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(r);var n=function(){var i=arguments,a=t?t.apply(this,i):i[0],r=n.cache;if(r.has(a))return r.get(a);var s=e.apply(this,i);return n.cache=r.set(a,s)||r,s};return n.cache=new(i.Cache||a),
n}var a=n(954),r="Expected a function";i.Cache=a,e.exports=i},function(e,t){function n(){}e.exports=n},function(e,t){function n(){return!1}e.exports=n},function(e,t,n){var i=n(2941),a=n(398),r=n(2950),s=n(969),o=a(function(e){return r(i(e,1,s,!0))});e.exports=o},function(e,t,n){var i=n(2939),a=n(398),r=n(969),s=a(function(e,t){return r(e)?i(e,t):[]});e.exports=s},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");
}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){m.default.apply(void 0,["DragDropContext","backend"].concat(l.call(arguments)));var t=void 0;t="object"==typeof e&&"function"==typeof e.default?e.default:e,f.default("function"==typeof t,"Expected the backend to be a function or an ES6 module exporting a default function. Read more: http://gaearon.github.io/react-dnd/docs-drag-drop-context.html");
var n={dragDropManager:new h.DragDropManager(t)};return function(e){var t=e.displayName||e.name||"Component";return function(i){function s(){a(this,s),i.apply(this,arguments)}return r(s,i),s.prototype.getDecoratedComponentInstance=function(){return this.refs.child},s.prototype.getManager=function(){return n.dragDropManager},s.prototype.getChildContext=function(){return n},s.prototype.render=function(){return d.default.createElement(e,o({},this.props,{ref:"child"}))},c(s,null,[{key:"DecoratedComponent",
value:e,enumerable:!0},{key:"displayName",value:"DragDropContext("+t+")",enumerable:!0},{key:"childContextTypes",value:{dragDropManager:u.PropTypes.object.isRequired},enumerable:!0}]),s}(u.Component)}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=Array.prototype.slice,c=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,
i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();t.default=s;var u=n(1),d=i(u),h=n(2295),p=n(87),f=i(p),g=n(405),m=i(g);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return w.default.apply(void 0,["DragLayer","collect[, options]"].concat(l.call(arguments))),b.default("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-layer.html",e),
b.default(v.default(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-layer.html',t),function(n){var i=t.arePropsEqual,s=void 0===i?g.default:i,l=n.displayName||n.name||"Component";return function(t){function i(e,n){a(this,i),t.call(this,e),this.handleChange=this.handleChange.bind(this),this.manager=n.dragDropManager,b.default("object"==typeof this.manager,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://gaearon.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",l,l),
this.state=this.getCurrentState()}return r(i,t),i.prototype.getDecoratedComponentInstance=function(){return this.refs.child},i.prototype.shouldComponentUpdate=function(e,t){return!s(e,this.props)||!p.default(t,this.state)},c(i,null,[{key:"DecoratedComponent",value:n,enumerable:!0},{key:"displayName",value:"DragLayer("+l+")",enumerable:!0},{key:"contextTypes",value:{dragDropManager:u.PropTypes.object.isRequired},enumerable:!0}]),i.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0;var e=this.manager.getMonitor();
this.unsubscribeFromOffsetChange=e.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=e.subscribeToStateChange(this.handleChange),this.handleChange()},i.prototype.componentWillUnmount=function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange(),this.unsubscribeFromStateChange()},i.prototype.handleChange=function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();p.default(e,this.state)||this.setState(e)}},i.prototype.getCurrentState=function(){var t=this.manager.getMonitor();
return e(t)},i.prototype.render=function(){return d.default.createElement(n,o({},this.props,this.state,{ref:"child"}))},i}(u.Component)}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=Array.prototype.slice,c=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i);
}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();t.default=s;var u=n(1),d=i(u),h=n(589),p=i(h),f=n(975),g=i(f),m=n(245),v=i(m),y=n(87),b=i(y),S=n(405),w=i(S);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){var i=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];d.default.apply(void 0,["DragSource","type, spec, collect[, options]"].concat(r.call(arguments)));var a=e;"function"!=typeof e&&(o.default(I.default(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',e),
a=function(){return e}),o.default(c.default(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',t);var s=v.default(t);return o.default("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',n),
o.default(c.default(i),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',n),function(e){return p.default({connectBackend:function(e,t){return e.connectDragSource(t)},containerDisplayName:"DragSource",createHandler:s,registerHandler:g.default,createMonitor:b.default,createConnector:w.default,DecoratedComponent:e,getType:a,collect:n,options:i})}}t.__esModule=!0;
var r=Array.prototype.slice;t.default=a;var s=n(87),o=i(s),l=n(245),c=i(l),u=n(405),d=i(u),h=n(973),p=i(h),f=n(3009),g=i(f),m=n(3004),v=i(m),y=n(3005),b=i(y),S=n(3003),w=i(S),M=n(974),I=i(M);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){var i=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];d.default.apply(void 0,["DropTarget","type, spec, collect[, options]"].concat(r.call(arguments)));var a=e;"function"!=typeof e&&(o.default(I.default(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',e),
a=function(){return e}),o.default(c.default(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',t);var s=v.default(t);return o.default("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',n),
o.default(c.default(i),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',n),function(e){return p.default({connectBackend:function(e,t){return e.connectDropTarget(t)},containerDisplayName:"DropTarget",createHandler:s,registerHandler:g.default,createMonitor:b.default,createConnector:w.default,DecoratedComponent:e,getType:a,collect:n,options:i})}}t.__esModule=!0;
var r=Array.prototype.slice;t.default=a;var s=n(87),o=i(s),l=n(245),c=i(l),u=n(405),d=i(u),h=n(973),p=i(h),f=n(3010),g=i(f),m=n(3007),v=i(m),y=n(3008),b=i(y),S=n(3006),w=i(S),M=n(974),I=i(M);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){function t(){c&&(c(),c=null),a&&r&&(c=e.connectDragSource(a,r,o))}function n(){h&&(h(),h=null),a&&u&&(h=e.connectDragPreview(a,u,d))}function i(e){e!==a&&(a=e,t(),n())}var a=void 0,r=void 0,o=void 0,c=void 0,u=void 0,d=void 0,h=void 0,p=s.default({
dragSource:function(e,n){e===r&&l.default(n,o)||(r=e,o=n,t())},dragPreview:function(e,t){e===u&&l.default(t,d)||(u=e,d=t,n())}});return{receiveHandlerId:i,hooks:p}}t.__esModule=!0,t.default=a;var r=n(976),s=i(r),o=n(972),l=i(o);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){Object.keys(e).forEach(function(t){o.default(c.indexOf(t)>-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',c.join(", "),t),
o.default("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t,t,e[t])}),u.forEach(function(t){o.default("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t,t,e[t])});var t=function(){function t(e){
a(this,t),this.monitor=e,this.props=null,this.component=null}return t.prototype.receiveProps=function(e){this.props=e},t.prototype.receiveComponent=function(e){this.component=e},t.prototype.canDrag=function(){return!e.canDrag||e.canDrag(this.props,this.monitor)},t.prototype.isDragging=function(t,n){return e.isDragging?e.isDragging(this.props,this.monitor):n===t.getSourceId()},t.prototype.beginDrag=function(){var t=e.beginDrag(this.props,this.monitor,this.component);return t},t.prototype.endDrag=function(){
e.endDrag&&e.endDrag(this.props,this.monitor,this.component)},t}();return function(e){return new t(e)}}t.__esModule=!0,t.default=r;var s=n(87),o=i(s),l=n(245),c=(i(l),["canDrag","beginDrag","canDrag","isDragging","endDrag"]),u=["beginDrag"];e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){return new u(e)}t.__esModule=!0,t.default=r;var s=n(87),o=i(s),l=!1,c=!1,u=function(){
function e(t){a(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.sourceId=e},e.prototype.canDrag=function(){o.default(!l,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drag-source-monitor.html");try{return l=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{l=!1}},e.prototype.isDragging=function(){o.default(!c,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drag-source-monitor.html");
try{return c=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{c=!1}},e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem()},e.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){
return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){function t(){o&&(o(),
o=null),i&&a&&(o=e.connectDropTarget(i,a,r))}function n(e){e!==i&&(i=e,t())}var i=void 0,a=void 0,r=void 0,o=void 0,c=s.default({dropTarget:function(e,n){e===a&&l.default(n,r)||(a=e,r=n,t())}});return{receiveHandlerId:n,hooks:c}}t.__esModule=!0,t.default=a;var r=n(976),s=i(r),o=n(972),l=i(o);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){
Object.keys(e).forEach(function(t){o.default(c.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',c.join(", "),t),o.default("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html",t,t,e[t]);
});var t=function(){function t(e){a(this,t),this.monitor=e,this.props=null,this.component=null}return t.prototype.receiveProps=function(e){this.props=e},t.prototype.receiveMonitor=function(e){this.monitor=e},t.prototype.receiveComponent=function(e){this.component=e},t.prototype.canDrop=function(){return!e.canDrop||e.canDrop(this.props,this.monitor)},t.prototype.hover=function(){e.hover&&e.hover(this.props,this.monitor,this.component)},t.prototype.drop=function(){if(e.drop){var t=e.drop(this.props,this.monitor,this.component);
return t}},t}();return function(e){return new t(e)}}t.__esModule=!0,t.default=r;var s=n(87),o=i(s),l=n(245),c=(i(l),["canDrop","hover","drop"]);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){return new c(e)}t.__esModule=!0,t.default=r;var s=n(87),o=i(s),l=!1,c=function(){function e(t){a(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){
this.targetId=e},e.prototype.canDrop=function(){o.default(!l,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drop-target-monitor.html");try{return l=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{l=!1}},e.prototype.isOver=function(e){return this.internalMonitor.isOverTarget(this.targetId,e)},e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem();
},e.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){
return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){function i(){a.removeSource(r)}var a=n.getRegistry(),r=a.addSource(e,t);return{handlerId:r,unregister:i}}t.__esModule=!0,t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){function i(){a.removeTarget(r)}var a=n.getRegistry(),r=a.addTarget(e,t);
return{handlerId:r,unregister:i}}t.__esModule=!0,t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=e.ref;return s.default("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?o.cloneElement(e,{ref:function(e){
t(e),n&&n(e)}}):o.cloneElement(e,{ref:t})}t.__esModule=!0,t.default=a;var r=n(87),s=i(r),o=n(1);e.exports=t.default},function(e,t,n){function i(e){return null==e?void 0===e?l:o:c&&c in Object(e)?r(e):s(e)}var a=n(977),r=n(3015),s=n(3016),o="[object Null]",l="[object Undefined]",c=a?a.toStringTag:void 0;e.exports=i},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(144))},function(e,t,n){var i=n(3017),a=i(Object.getPrototypeOf,Object);e.exports=a;
},function(e,t,n){function i(e){var t=s.call(e,l),n=e[l];try{e[l]=void 0;var i=!0}catch(e){}var a=o.call(e);return i&&(t?e[l]=n:delete e[l]),a}var a=n(977),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,l=a?a.toStringTag:void 0;e.exports=i},function(e,t){function n(e){return a.call(e)}var i=Object.prototype,a=i.toString;e.exports=n},function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},function(e,t,n){var i=n(3013),a="object"==typeof self&&self&&self.Object===Object&&self,r=i||a||Function("return this")();
e.exports=r},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(1),o=(n.n(s),n(980));n(590);n.d(t,"a",function(){return l});var l=function(e){function t(n,r){i(this,t);var s=a(this,e.call(this,n,r));return s.store=n.store,s}return r(t,e),t.prototype.getChildContext=function(){return{store:this.store}},t.prototype.render=function(){return s.Children.only(this.props.children)},t}(s.Component);
l.propTypes={store:o.a.isRequired,children:s.PropTypes.element.isRequired},l.childContextTypes={store:o.a.isRequired},l.displayName="Provider"},function(e,t,n){"use strict";function i(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function a(e,t,n){for(var i=t.length-1;i>=0;i--){var a=t[i](e);if(a)return a}return function(t,i){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+i.wrappedComponentName+".");
}}function r(e,t){return e===t}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,n=void 0===t?o.a:t,s=e.mapStateToPropsFactories,f=void 0===s?u.a:s,g=e.mapDispatchToPropsFactories,m=void 0===g?c.a:g,v=e.mergePropsFactories,y=void 0===v?d.a:v,b=e.selectorFactory,S=void 0===b?h.a:b;return function(e,t,s){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=o.pure,u=void 0===c||c,d=o.areStatesEqual,h=void 0===d?r:d,g=o.areOwnPropsEqual,v=void 0===g?l.a:g,b=o.areStatePropsEqual,w=void 0===b?l.a:b,M=o.areMergedPropsEqual,I=void 0===M?l.a:M,C=i(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),D=a(e,f,"mapStateToProps"),T=a(t,m,"mapDispatchToProps"),x=a(s,y,"mergeProps");
return n(S,p({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:D,initMapDispatchToProps:T,initMergeProps:x,pure:u,areStatesEqual:h,areOwnPropsEqual:v,areStatePropsEqual:w,areMergedPropsEqual:I},C))}}var o=n(978),l=n(3029),c=n(3023),u=n(3024),d=n(3025),h=n(3026),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e;
};t.a=s()},function(e,t,n){"use strict";function i(e){return"function"==typeof e?n.i(o.a)(e,"mapDispatchToProps"):void 0}function a(e){return e?void 0:n.i(o.b)(function(e){return{dispatch:e}})}function r(e){return e&&"object"==typeof e?n.i(o.b)(function(t){return n.i(s.bindActionCreators)(e,t)}):void 0}var s=n(611),o=(n.n(s),n(979));t.a=[i,a,r]},function(e,t,n){"use strict";function i(e){return"function"==typeof e?n.i(r.a)(e,"mapStateToProps"):void 0}function a(e){return e?void 0:n.i(r.b)(function(){
return{}})}var r=n(979);t.a=[i,a]},function(e,t,n){"use strict";function i(e,t,n){return o({},n,e,t)}function a(e){return function(t,n){var i=(n.displayName,n.pure),a=n.areMergedPropsEqual,r=!1,s=void 0;return function(t,n,o){var l=e(t,n,o);return r?i&&a(l,s)||(s=l):(r=!0,s=l),s}}}function r(e){return"function"==typeof e?a(e):void 0}function s(e){return e?void 0:function(){return i}}var o=(n(981),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);
}return e});t.a=[r,s]},function(e,t,n){"use strict";function i(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function a(e,t,n,i){return function(a,r){return n(e(a,r),t(i,r),r)}}function r(e,t,n,i,a){function r(a,r){return f=a,g=r,m=e(f,g),v=t(i,g),y=n(m,v,g),p=!0,y}function s(){return m=e(f,g),t.dependsOnOwnProps&&(v=t(i,g)),y=n(m,v,g)}function o(){return e.dependsOnOwnProps&&(m=e(f,g)),t.dependsOnOwnProps&&(v=t(i,g)),y=n(m,v,g)}function l(){
var t=e(f,g),i=!h(t,m);return m=t,i&&(y=n(m,v,g)),y}function c(e,t){var n=!d(t,g),i=!u(e,f);return f=e,g=t,n&&i?s():n?o():i?l():y}var u=a.areStatesEqual,d=a.areOwnPropsEqual,h=a.areStatePropsEqual,p=!1,f=void 0,g=void 0,m=void 0,v=void 0,y=void 0;return function(e,t){return p?c(e,t):r(e,t)}}function s(e,t){var n=t.initMapStateToProps,s=t.initMapDispatchToProps,o=t.initMergeProps,l=i(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),c=n(e,l),u=s(e,l),d=o(e,l),h=l.pure?r:a;return h(c,u,d,e,l);
}n(3027);t.a=s},function(e,t,n){"use strict";n(590)},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(){var e=[],t=[];return{clear:function(){t=r,e=r},notify:function(){for(var n=e=t,i=0;i<n.length;i++)n[i]()},subscribe:function(n){var i=!0;return t===e&&(t=e.slice()),t.push(n),function(){i&&e!==r&&(i=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}}n.d(t,"a",function(){return o});var r=null,s={notify:function(){}
},o=function(){function e(t,n){i(this,e),this.store=t,this.parentSub=n,this.unsubscribe=null,this.listeners=s}return e.prototype.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},e.prototype.notifyNestedSubs=function(){this.listeners.notify()},e.prototype.isSubscribed=function(){return Boolean(this.unsubscribe)},e.prototype.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),
this.listeners=a())},e.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=s)},e}()},function(e,t,n){"use strict";function i(e,t){if(e===t)return!0;var n=0,i=0;for(var r in e){if(a.call(e,r)&&e[r]!==t[r])return!1;n++}for(var s in t)a.call(t,s)&&i++;return n===i}t.a=i;var a=Object.prototype.hasOwnProperty},,,,,,,,,function(e,t,n){"use strict";function i(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){
if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to ReactCSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}}}var a=n(56),r=n(408),s=n(3072),o=n(3039),l=r.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:o.propTypes.name,transitionAppear:r.PropTypes.bool,
transitionEnter:r.PropTypes.bool,transitionLeave:r.PropTypes.bool,transitionAppearTimeout:i("Appear"),transitionEnterTimeout:i("Enter"),transitionLeaveTimeout:i("Leave")},getDefaultProps:function(){return{transitionAppear:!1,transitionEnter:!0,transitionLeave:!0}},_wrapChild:function(e){return r.createElement(o,{name:this.props.transitionName,appear:this.props.transitionAppear,enter:this.props.transitionEnter,leave:this.props.transitionLeave,appearTimeout:this.props.transitionAppearTimeout,enterTimeout:this.props.transitionEnterTimeout,
leaveTimeout:this.props.transitionLeaveTimeout},e)},render:function(){return r.createElement(s,a({},this.props,{childFactory:this._wrapChild}))}});e.exports=l},function(e,t,n){"use strict";var i=n(408),a=n(990),r=n(2604),s=n(3071),o=n(1014),l=17,c=i.createClass({displayName:"ReactCSSTransitionGroupChild",propTypes:{name:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.shape({enter:i.PropTypes.string,leave:i.PropTypes.string,active:i.PropTypes.string}),i.PropTypes.shape({enter:i.PropTypes.string,
enterActive:i.PropTypes.string,leave:i.PropTypes.string,leaveActive:i.PropTypes.string,appear:i.PropTypes.string,appearActive:i.PropTypes.string})]).isRequired,appear:i.PropTypes.bool,enter:i.PropTypes.bool,leave:i.PropTypes.bool,appearTimeout:i.PropTypes.number,enterTimeout:i.PropTypes.number,leaveTimeout:i.PropTypes.number},transition:function(e,t,n){var i=a.findDOMNode(this);if(!i)return void(t&&t());var o=this.props.name[e]||this.props.name+"-"+e,l=this.props.name[e+"Active"]||o+"-active",c=null,u=function(e){
e&&e.target!==i||(clearTimeout(c),r.removeClass(i,o),r.removeClass(i,l),s.removeEndEventListener(i,u),t&&t())};r.addClass(i,o),this.queueClass(l),n?(c=setTimeout(u,n),this.transitionTimeouts.push(c)):s.addEndEventListener(i,u)},queueClass:function(e){this.classNameQueue.push(e),this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,l))},flushClassNameQueue:function(){this.isMounted()&&this.classNameQueue.forEach(r.addClass.bind(r,a.findDOMNode(this))),this.classNameQueue.length=0,this.timeout=null;
},componentWillMount:function(){this.classNameQueue=[],this.transitionTimeouts=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach(function(e){clearTimeout(e)})},componentWillAppear:function(e){this.props.appear?this.transition("appear",e,this.props.appearTimeout):e()},componentWillEnter:function(e){this.props.enter?this.transition("enter",e,this.props.enterTimeout):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e,this.props.leaveTimeout):e();
},render:function(){return o(this.props.children)}});e.exports=c},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var i=n(1007),a={getChildMapping:function(e){return e?i(e):e},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var i={},a=[];for(var r in e)t.hasOwnProperty(r)?a.length&&(i[r]=a,a=[]):a.push(r);var s,o={};for(var l in t){if(i.hasOwnProperty(l))for(s=0;s<i[l].length;s++){var c=i[l][s];o[i[l][s]]=n(c)}o[l]=n(l)}for(s=0;s<a.length;s++)o[a[s]]=n(a[s]);
return o}};e.exports=a},function(e,t,n){"use strict";function i(){var e=o("animationend"),t=o("transitionend");e&&l.push(e),t&&l.push(t)}function a(e,t,n){e.addEventListener(t,n,!1)}function r(e,t,n){e.removeEventListener(t,n,!1)}var s=n(74),o=n(1011),l=[];s.canUseDOM&&i();var c={addEndEventListener:function(e,t){return 0===l.length?void window.setTimeout(t,0):void l.forEach(function(n){a(e,n,t)})},removeEndEventListener:function(e,t){0!==l.length&&l.forEach(function(n){r(e,n,t)})}};e.exports=c},function(e,t,n){
"use strict";var i=n(56),a=n(408),r=n(3070),s=n(100),o=a.createClass({displayName:"ReactTransitionGroup",propTypes:{component:a.PropTypes.any,childFactory:a.PropTypes.func},getDefaultProps:function(){return{component:"span",childFactory:s.thatReturnsArgument}},getInitialState:function(){return{children:r.getChildMapping(this.props.children)}},componentWillMount:function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},componentDidMount:function(){var e=this.state.children;
for(var t in e)e[t]&&this.performAppear(t)},componentWillReceiveProps:function(e){var t=r.getChildMapping(e.children),n=this.state.children;this.setState({children:r.mergeChildMappings(n,t)});var i;for(i in t){var a=n&&n.hasOwnProperty(i);!t[i]||a||this.currentlyTransitioningKeys[i]||this.keysToEnter.push(i)}for(i in n){var s=t&&t.hasOwnProperty(i);!n[i]||s||this.currentlyTransitioningKeys[i]||this.keysToLeave.push(i)}},componentDidUpdate:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);
var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},performAppear:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)},_handleDoneAppearing:function(e){var t=this.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e];var n=r.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performEnter:function(e){
this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)},_handleDoneEntering:function(e){var t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e];var n=r.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performLeave:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e);
},_handleDoneLeaving:function(e){var t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];var n=r.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)?this.performEnter(e):this.setState(function(t){var n=i({},t.children);return delete n[e],{children:n}})},render:function(){var e=[];for(var t in this.state.children){var n=this.state.children[t];n&&e.push(a.cloneElement(this.props.childFactory(n),{ref:t,key:t}))}return a.createElement(this.props.component,this.props,e);
}});e.exports=o},,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(n,i,a){var s=e(n,i,a),l=s.dispatch,c=[],u={getState:s.getState,dispatch:function(e){return l(e)}};return c=t.map(function(e){return e(u)}),l=o.default.apply(void 0,c)(s.dispatch),r({},s,{dispatch:l})}}}t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){
var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.default=a;var s=n(1016),o=i(s)},function(e,t,n){"use strict";function i(e,t){return function(){return t(e.apply(void 0,arguments))}}function a(e,t){if("function"==typeof e)return i(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
for(var n=Object.keys(e),a={},r=0;r<n.length;r++){var s=n[r],o=e[s];"function"==typeof o&&(a[s]=i(o,t))}return a}t.__esModule=!0,t.default=a},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=t&&t.type,i=n&&'"'+n.toString()+'"'||"an action";return"Given action "+i+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state.'}function r(e){Object.keys(e).forEach(function(t){var n=e[t],i=n(void 0,{type:o.ActionTypes.INIT
});if("undefined"==typeof i)throw new Error('Reducer "'+t+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var a="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:a}))throw new Error('Reducer "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle "+o.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.");
})}function s(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++){var s=t[i];"function"==typeof e[s]&&(n[s]=e[s])}var o,l=Object.keys(n);try{r(n)}catch(e){o=e}return function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];if(o)throw o;for(var i=!1,r={},s=0;s<l.length;s++){var c=l[s],u=n[c],d=e[c],h=u(d,t);if("undefined"==typeof h){var p=a(c,t);throw new Error(p)}r[c]=h,i=i||h!==d}return i?r:e}}t.__esModule=!0,t.default=s;var o=n(610),l=n(1019),c=(i(l),n(1017));i(c);
},function(e,t,n){function i(e){return null==e?void 0===e?l:o:c&&c in Object(e)?r(e):s(e)}var a=n(1018),r=n(3099),s=n(3100),o="[object Null]",l="[object Undefined]",c=a?a.toStringTag:void 0;e.exports=i},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(144))},function(e,t,n){var i=n(3101),a=i(Object.getPrototypeOf,Object);e.exports=a},function(e,t,n){function i(e){var t=s.call(e,l),n=e[l];try{e[l]=void 0;var i=!0}catch(e){}var a=o.call(e);return i&&(t?e[l]=n:delete e[l]),
a}var a=n(1018),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,l=a?a.toStringTag:void 0;e.exports=i},function(e,t){function n(e){return a.call(e)}var i=Object.prototype,a=i.toString;e.exports=n},function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},function(e,t,n){var i=n(3097),a="object"==typeof self&&self&&self.Object===Object&&self,r=i||a||Function("return this")();e.exports=r},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){
var i,a;/*! tether 1.3.0 */
!function(r,s){i=s,a="function"==typeof i?i.call(t,n,t,e):i,!(void 0!==a&&(e.exports=a))}(this,function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){var t=getComputedStyle(e)||{},n=t.position,i=[];if("fixed"===n)return[e];for(var a=e;(a=a.parentNode)&&a&&1===a.nodeType;){var r=void 0;try{r=getComputedStyle(a)}catch(e){}if("undefined"==typeof r||null===r)return i.push(a),i;var s=r,o=s.overflow,l=s.overflowX,c=s.overflowY;
/(auto|scroll)/.test(o+c+l)&&("absolute"!==n||["relative","absolute","fixed"].indexOf(r.position)>=0)&&i.push(a)}return i.push(document.body),i}function r(){document.body.removeChild(C),C=void 0}function s(e){var t=void 0;e===document?(t=document,e=document.documentElement):t=e.ownerDocument;var n=t.documentElement,i={},a=e.getBoundingClientRect();for(var r in a)i[r]=a[r];var s=x();return i.top-=s.top,i.left-=s.left,"undefined"==typeof i.width&&(i.width=document.body.scrollWidth-i.left-i.right),"undefined"==typeof i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),
i.top=i.top-n.clientTop,i.left=i.left-n.clientLeft,i.right=t.body.clientWidth-i.width-i.left,i.bottom=t.body.clientHeight-i.height-i.top,i}function o(e){return e.offsetParent||document.documentElement}function l(){var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");c(t.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);
var n=e.offsetWidth;t.style.overflow="scroll";var i=e.offsetWidth;n===i&&(i=t.clientWidth),document.body.removeChild(t);var a=n-i;return{width:a,height:a}}function c(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=[];return Array.prototype.push.apply(t,arguments),t.slice(1).forEach(function(t){if(t)for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}),e}function u(e,t){if("undefined"!=typeof e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.remove(t)});else{
var n=new RegExp("(^| )"+t.split(" ").join("|")+"( |$)","gi"),i=p(e).replace(n," ");f(e,i)}}function d(e,t){if("undefined"!=typeof e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.add(t)});else{u(e,t);var n=p(e)+(" "+t);f(e,n)}}function h(e,t){if("undefined"!=typeof e.classList)return e.classList.contains(t);var n=p(e);return new RegExp("(^| )"+t+"( |$)","gi").test(n)}function p(e){return e.className instanceof SVGAnimatedString?e.className.baseVal:e.className}function f(e,t){e.setAttribute("class",t);
}function g(e,t,n){n.forEach(function(n){t.indexOf(n)===-1&&h(e,n)&&u(e,n)}),t.forEach(function(t){h(e,t)||d(e,t)})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t);
}function v(e,t){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return e+n>=t&&t>=e-n}function y(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function b(){for(var e={top:0,left:0},t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach(function(t){var n=t.top,i=t.left;"string"==typeof n&&(n=parseFloat(n,10)),"string"==typeof i&&(i=parseFloat(i,10)),e.top+=n,e.left+=i}),e}function S(e,t){return"string"==typeof e.left&&e.left.indexOf("%")!==-1&&(e.left=parseFloat(e.left,10)/100*t.width),
"string"==typeof e.top&&e.top.indexOf("%")!==-1&&(e.top=parseFloat(e.top,10)/100*t.height),e}function w(e,t){return"scrollParent"===t?t=e.scrollParents[0]:"window"===t&&(t=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),t===document&&(t=t.documentElement),"undefined"!=typeof t.nodeType&&!function(){var e=s(t),n=e,i=getComputedStyle(t);t=[n.left,n.top,e.width+n.left,e.height+n.top],G.forEach(function(e,n){e=e[0].toUpperCase()+e.substr(1),"Top"===e||"Left"===e?t[n]+=parseFloat(i["border"+e+"Width"]):t[n]-=parseFloat(i["border"+e+"Width"]);
})}(),t}var M=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),I=void 0;"undefined"==typeof I&&(I={modules:[]});var C=null,D=function(){var e=0;return function(){return++e}}(),T={},x=function(){var e=C;e||(e=document.createElement("div"),e.setAttribute("data-tether-id",D()),c(e.style,{top:0,left:0,position:"absolute"
}),document.body.appendChild(e),C=e);var t=e.getAttribute("data-tether-id");if("undefined"==typeof T[t]){T[t]={};var n=e.getBoundingClientRect();for(var i in n)T[t][i]=n[i];E(function(){delete T[t]})}return T[t]},P=[],E=function(e){P.push(e)},A=function(){for(var e=void 0;e=P.pop();)e()},L=function(){function e(){i(this,e)}return M(e,[{key:"on",value:function(e,t,n){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];"undefined"==typeof this.bindings&&(this.bindings={}),"undefined"==typeof this.bindings[e]&&(this.bindings[e]=[]),
this.bindings[e].push({handler:t,ctx:n,once:i})}},{key:"once",value:function(e,t,n){this.on(e,t,n,!0)}},{key:"off",value:function(e,t){if("undefined"==typeof this.bindings||"undefined"==typeof this.bindings[e])if("undefined"==typeof t)delete this.bindings[e];else for(var n=0;n<this.bindings[e].length;)this.bindings[e][n].handler===t?this.bindings[e].splice(n,1):++n}},{key:"trigger",value:function(e){if("undefined"!=typeof this.bindings&&this.bindings[e]){for(var t=0,n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];
for(;t<this.bindings[e].length;){var r=this.bindings[e][t],s=r.handler,o=r.ctx,l=r.once,c=o;"undefined"==typeof c&&(c=this),s.apply(c,i),l?this.bindings[e].splice(t,1):++t}}}}]),e}();I.Utils={getScrollParents:a,getBounds:s,getOffsetParent:o,extend:c,addClass:d,removeClass:u,hasClass:h,updateClasses:g,defer:E,flush:A,uniqueId:D,Evented:L,getScrollBarSize:l,removeUtilElements:r};var k=function(){function e(e,t){var n=[],i=!0,a=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),
!t||n.length!==t);i=!0);}catch(e){a=!0,r=e}finally{try{!i&&o.return&&o.return()}finally{if(a)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),M=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),
i&&e(t,i),t}}(),N=function(e,t,n){for(var i=!0;i;){var a=e,r=t,s=n;i=!1,null===a&&(a=Function.prototype);var o=Object.getOwnPropertyDescriptor(a,r);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var c=Object.getPrototypeOf(a);if(null===c)return;e=c,t=r,n=s,i=!0,o=c=void 0}};if("undefined"==typeof I)throw new Error("You must include the utils.js file before tether.js");var _=I.Utils,a=_.getScrollParents,s=_.getBounds,o=_.getOffsetParent,c=_.extend,d=_.addClass,u=_.removeClass,g=_.updateClasses,E=_.defer,A=_.flush,l=_.getScrollBarSize,r=_.removeUtilElements,O=function(){
if("undefined"==typeof document)return"";for(var e=document.createElement("div"),t=["transform","webkitTransform","OTransform","MozTransform","msTransform"],n=0;n<t.length;++n){var i=t[n];if(void 0!==e.style[i])return i}}(),R=[],j=function(){R.forEach(function(e){e.position(!1)}),A()};!function(){var e=null,t=null,n=null,i=function i(){return"undefined"!=typeof t&&t>16?(t=Math.min(t-16,250),void(n=setTimeout(i,250))):void("undefined"!=typeof e&&y()-e<10||("undefined"!=typeof n&&(clearTimeout(n),n=null),
e=y(),j(),t=y()-e))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(e){window.addEventListener(e,i)})}();var z={center:"center",left:"right",right:"left"},U={middle:"middle",top:"bottom",bottom:"top"},F={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},B=function(e,t){var n=e.left,i=e.top;return"auto"===n&&(n=z[t.left]),"auto"===i&&(i=U[t.top]),{left:n,top:i}},V=function(e){var t=e.left,n=e.top;return"undefined"!=typeof F[e.left]&&(t=F[e.left]),
"undefined"!=typeof F[e.top]&&(n=F[e.top]),{left:t,top:n}},H=function(e){var t=e.split(" "),n=k(t,2),i=n[0],a=n[1];return{top:i,left:a}},W=H,Q=function(e){function t(e){var n=this;i(this,t),N(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.position=this.position.bind(this),R.push(this),this.history=[],this.setOptions(e,!1),I.modules.forEach(function(e){"undefined"!=typeof e.initialize&&e.initialize.call(n)}),this.position()}return m(t,e),M(t,[{key:"getClass",value:function(){
var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=this.options.classes;return"undefined"!=typeof t&&t[e]?this.options.classes[e]:this.options.classPrefix?this.options.classPrefix+"-"+e:e}},{key:"setOptions",value:function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]||arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=c(i,e);var r=this.options,s=r.element,o=r.target,l=r.targetModifier;if(this.element=s,this.target=o,
this.targetModifier=l,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(e){if("undefined"==typeof t[e])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof t[e].jquery?t[e]=t[e][0]:"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),d(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&d(this.target,this.getClass("target")),
!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=W(this.options.targetAttachment),this.attachment=W(this.options.attachment),this.offset=H(this.options.offset),this.targetOffset=H(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=a(this.target),this.options.enabled!==!1&&this.enable(n)}},{key:"getTargetBounds",value:function(){
if("undefined"==typeof this.targetModifier)return s(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var e=s(this.target),t={height:e.height,width:e.width,top:e.top,left:e.left};return t.height=Math.min(t.height,e.height-(pageYOffset-e.top)),t.height=Math.min(t.height,e.height-(e.top+e.height-(pageYOffset+innerHeight))),t.height=Math.min(innerHeight,t.height),t.height-=2,t.width=Math.min(t.width,e.width-(pageXOffset-e.left)),
t.width=Math.min(t.width,e.width-(e.left+e.width-(pageXOffset+innerWidth))),t.width=Math.min(innerWidth,t.width),t.width-=2,t.top<pageYOffset&&(t.top=pageYOffset),t.left<pageXOffset&&(t.left=pageXOffset),t}if("scroll-handle"===this.targetModifier){var e=void 0,n=this.target;n===document.body?(n=document.documentElement,e={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):e=s(n);var i=getComputedStyle(n),a=n.scrollWidth>n.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,r=0;
a&&(r=15);var o=e.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-r,t={width:15,height:.975*o*(o/n.scrollHeight),left:e.left+e.width-parseFloat(i.borderLeftWidth)-15},l=0;o<408&&this.target===document.body&&(l=-11e-5*Math.pow(o,2)-.00727*o+22.58),this.target!==document.body&&(t.height=Math.max(t.height,24));var c=this.target.scrollTop/(n.scrollHeight-o);return t.top=c*(o-t.height-l)+e.top+parseFloat(i.borderTopWidth),this.target===document.body&&(t.height=Math.max(t.height,24)),
t}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(e,t){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[e]&&(this._cache[e]=t.call(this)),this._cache[e]}},{key:"enable",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];this.options.addTargetClasses!==!1&&d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(t){
t!==document&&t.addEventListener("scroll",e.position)}),t&&this.position()}},{key:"disable",value:function(){var e=this;u(this.target,this.getClass("enabled")),u(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.position)})}},{key:"destroy",value:function(){var e=this;this.disable(),R.forEach(function(t,n){t===e&&R.splice(n,1)}),0===R.length&&r()}},{key:"updateAttachClasses",value:function(e,t){
var n=this;e=e||this.attachment,t=t||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var a=this._addAttachClasses;e.top&&a.push(this.getClass("element-attached")+"-"+e.top),e.left&&a.push(this.getClass("element-attached")+"-"+e.left),t.top&&a.push(this.getClass("target-attached")+"-"+t.top),
t.left&&a.push(this.getClass("target-attached")+"-"+t.left);var r=[];i.forEach(function(e){r.push(n.getClass("element-attached")+"-"+e),r.push(n.getClass("target-attached")+"-"+e)}),E(function(){"undefined"!=typeof n._addAttachClasses&&(g(n.element,n._addAttachClasses,r),n.options.addTargetClasses!==!1&&g(n.target,n._addAttachClasses,r),delete n._addAttachClasses)})}},{key:"position",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();
var n=B(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var i=this.cache("element-bounds",function(){return s(e.element)}),a=i.width,r=i.height;if(0===a&&0===r&&"undefined"!=typeof this.lastSize){var c=this.lastSize;a=c.width,r=c.height}else this.lastSize={width:a,height:r};var u=this.cache("target-bounds",function(){return e.getTargetBounds()}),d=u,h=S(V(this.attachment),{width:a,height:r}),p=S(V(n),d),f=S(this.offset,{width:a,height:r}),g=S(this.targetOffset,d);
h=b(h,f),p=b(p,g);for(var m=u.left+p.left-h.left,v=u.top+p.top-h.top,y=0;y<I.modules.length;++y){var w=I.modules[y],M=w.position.call(this,{left:m,top:v,targetAttachment:n,targetPos:u,elementPos:i,offset:h,targetOffset:p,manualOffset:f,manualTargetOffset:g,scrollbarSize:D,attachment:this.attachment});if(M===!1)return!1;"undefined"!=typeof M&&"object"==typeof M&&(v=M.top,m=M.left)}var C={page:{top:v,left:m},viewport:{top:v-pageYOffset,bottom:pageYOffset-v-r+innerHeight,left:m-pageXOffset,right:pageXOffset-m-a+innerWidth
}},D=void 0;return document.body.scrollWidth>window.innerWidth&&(D=this.cache("scrollbar-size",l),C.viewport.bottom-=D.height),document.body.scrollHeight>window.innerHeight&&(D=this.cache("scrollbar-size",l),C.viewport.right-=D.width),["","static"].indexOf(document.body.style.position)!==-1&&["","static"].indexOf(document.body.parentElement.style.position)!==-1||(C.page.bottom=document.body.scrollHeight-v-r,C.page.right=document.body.scrollWidth-m-a),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){
var t=e.cache("target-offsetparent",function(){return o(e.target)}),n=e.cache("target-offsetparent-bounds",function(){return s(t)}),i=getComputedStyle(t),a=n,r={};if(["Top","Left","Bottom","Right"].forEach(function(e){r[e.toLowerCase()]=parseFloat(i["border"+e+"Width"])}),n.right=document.body.scrollWidth-n.left-a.width+r.right,n.bottom=document.body.scrollHeight-n.top-a.height+r.bottom,C.page.top>=n.top+r.top&&C.page.bottom>=n.bottom&&C.page.left>=n.left+r.left&&C.page.right>=n.right){var l=t.scrollTop,c=t.scrollLeft;
C.offset={top:C.page.top-n.top+l-r.top,left:C.page.left-n.left+c-r.left}}}(),this.move(C),this.history.unshift(C),this.history.length>3&&this.history.pop(),t&&A(),!0}}},{key:"move",value:function(e){var t=this;if("undefined"!=typeof this.element.parentNode){var n={};for(var i in e){n[i]={};for(var a in e[i]){for(var r=!1,s=0;s<this.history.length;++s){var l=this.history[s];if("undefined"!=typeof l[i]&&!v(l[i][a],e[i][a])){r=!0;break}}r||(n[i][a]=!0)}}var u={top:"",left:"",right:"",bottom:""},d=function(e,n){
var i="undefined"!=typeof t.options.optimizations,a=i?t.options.optimizations.gpu:null;if(a!==!1){var r=void 0,s=void 0;e.top?(u.top=0,r=n.top):(u.bottom=0,r=-n.bottom),e.left?(u.left=0,s=n.left):(u.right=0,s=-n.right),u[O]="translateX("+Math.round(s)+"px) translateY("+Math.round(r)+"px)","msTransform"!==O&&(u[O]+=" translateZ(0)")}else e.top?u.top=n.top+"px":u.bottom=n.bottom+"px",e.left?u.left=n.left+"px":u.right=n.right+"px"},h=!1;if((n.page.top||n.page.bottom)&&(n.page.left||n.page.right)?(u.position="absolute",
d(n.page,e.page)):(n.viewport.top||n.viewport.bottom)&&(n.viewport.left||n.viewport.right)?(u.position="fixed",d(n.viewport,e.viewport)):"undefined"!=typeof n.offset&&n.offset.top&&n.offset.left?!function(){u.position="absolute";var i=t.cache("target-offsetparent",function(){return o(t.target)});o(t.element)!==i&&E(function(){t.element.parentNode.removeChild(t.element),i.appendChild(t.element)}),d(n.offset,e.offset),h=!0}():(u.position="absolute",d({top:!0,left:!0},e.page)),!h){for(var p=!0,f=this.element.parentNode;f&&1===f.nodeType&&"BODY"!==f.tagName;){
if("static"!==getComputedStyle(f).position){p=!1;break}f=f.parentNode}p||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element))}var g={},m=!1;for(var a in u){var y=u[a],b=this.element.style[a];b!==y&&(m=!0,g[a]=y)}m&&E(function(){c(t.element.style,g)})}}}]),t}(L);Q.modules=[],I.position=j;var Y=c(Q,I),k=function(){function e(e,t){var n=[],i=!0,a=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){
a=!0,r=e}finally{try{!i&&o.return&&o.return()}finally{if(a)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=I.Utils,s=_.getBounds,c=_.extend,g=_.updateClasses,E=_.defer,G=["left","top","right","bottom"];I.modules.push({position:function(e){var t=this,n=e.top,i=e.left,a=e.targetAttachment;if(!this.options.constraints)return!0;var r=this.cache("element-bounds",function(){
return s(t.element)}),o=r.height,l=r.width;if(0===l&&0===o&&"undefined"!=typeof this.lastSize){var u=this.lastSize;l=u.width,o=u.height}var d=this.cache("target-bounds",function(){return t.getTargetBounds()}),h=d.height,p=d.width,f=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(e){var t=e.outOfBoundsClass,n=e.pinnedClass;t&&f.push(t),n&&f.push(n)}),f.forEach(function(e){["left","top","right","bottom"].forEach(function(t){f.push(e+"-"+t)})});var m=[],v=c({},a),y=c({},this.attachment);
return this.options.constraints.forEach(function(e){var r=e.to,s=e.attachment,c=e.pin;"undefined"==typeof s&&(s="");var u=void 0,d=void 0;if(s.indexOf(" ")>=0){var f=s.split(" "),g=k(f,2);d=g[0],u=g[1]}else u=d=s;var b=w(t,r);"target"!==d&&"both"!==d||(n<b[1]&&"top"===v.top&&(n+=h,v.top="bottom"),n+o>b[3]&&"bottom"===v.top&&(n-=h,v.top="top")),"together"===d&&("top"===v.top&&("bottom"===y.top&&n<b[1]?(n+=h,v.top="bottom",n+=o,y.top="top"):"top"===y.top&&n+o>b[3]&&n-(o-h)>=b[1]&&(n-=o-h,v.top="bottom",
y.top="bottom")),"bottom"===v.top&&("top"===y.top&&n+o>b[3]?(n-=h,v.top="top",n-=o,y.top="bottom"):"bottom"===y.top&&n<b[1]&&n+(2*o-h)<=b[3]&&(n+=o-h,v.top="top",y.top="top")),"middle"===v.top&&(n+o>b[3]&&"top"===y.top?(n-=o,y.top="bottom"):n<b[1]&&"bottom"===y.top&&(n+=o,y.top="top"))),"target"!==u&&"both"!==u||(i<b[0]&&"left"===v.left&&(i+=p,v.left="right"),i+l>b[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===u&&(i<b[0]&&"left"===v.left?"right"===y.left?(i+=p,v.left="right",i+=l,y.left="left"):"left"===y.left&&(i+=p,
v.left="right",i-=l,y.left="right"):i+l>b[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=l,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=l,y.left="left"):"center"===v.left&&(i+l>b[2]&&"left"===y.left?(i-=l,y.left="right"):i<b[0]&&"right"===y.left&&(i+=l,y.left="left"))),"element"!==d&&"both"!==d||(n<b[1]&&"bottom"===y.top&&(n+=o,y.top="top"),n+o>b[3]&&"top"===y.top&&(n-=o,y.top="bottom")),"element"!==u&&"both"!==u||(i<b[0]&&("right"===y.left?(i+=l,y.left="left"):"center"===y.left&&(i+=l/2,
y.left="left")),i+l>b[2]&&("left"===y.left?(i-=l,y.left="right"):"center"===y.left&&(i-=l/2,y.left="right"))),"string"==typeof c?c=c.split(",").map(function(e){return e.trim()}):c===!0&&(c=["top","left","right","bottom"]),c=c||[];var S=[],M=[];n<b[1]&&(c.indexOf("top")>=0?(n=b[1],S.push("top")):M.push("top")),n+o>b[3]&&(c.indexOf("bottom")>=0?(n=b[3]-o,S.push("bottom")):M.push("bottom")),i<b[0]&&(c.indexOf("left")>=0?(i=b[0],S.push("left")):M.push("left")),i+l>b[2]&&(c.indexOf("right")>=0?(i=b[2]-l,
S.push("right")):M.push("right")),S.length&&!function(){var e=void 0;e="undefined"!=typeof t.options.pinnedClass?t.options.pinnedClass:t.getClass("pinned"),m.push(e),S.forEach(function(t){m.push(e+"-"+t)})}(),M.length&&!function(){var e=void 0;e="undefined"!=typeof t.options.outOfBoundsClass?t.options.outOfBoundsClass:t.getClass("out-of-bounds"),m.push(e),M.forEach(function(t){m.push(e+"-"+t)})}(),(S.indexOf("left")>=0||S.indexOf("right")>=0)&&(y.left=v.left=!1),(S.indexOf("top")>=0||S.indexOf("bottom")>=0)&&(y.top=v.top=!1),
v.top===a.top&&v.left===a.left&&y.top===t.attachment.top&&y.left===t.attachment.left||(t.updateAttachClasses(y,v),t.trigger("update",{attachment:y,targetAttachment:v}))}),E(function(){t.options.addTargetClasses!==!1&&g(t.target,m,f),g(t.element,m,f)}),{top:n,left:i}}});var _=I.Utils,s=_.getBounds,g=_.updateClasses,E=_.defer;I.modules.push({position:function(e){var t=this,n=e.top,i=e.left,a=this.cache("element-bounds",function(){return s(t.element)}),r=a.height,o=a.width,l=this.getTargetBounds(),c=n+r,u=i+o,d=[];
n<=l.bottom&&c>=l.top&&["left","right"].forEach(function(e){var t=l[e];t!==i&&t!==u||d.push(e)}),i<=l.right&&u>=l.left&&["top","bottom"].forEach(function(e){var t=l[e];t!==n&&t!==c||d.push(e)});var h=[],p=[],f=["left","top","right","bottom"];return h.push(this.getClass("abutted")),f.forEach(function(e){h.push(t.getClass("abutted")+"-"+e)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(e){p.push(t.getClass("abutted")+"-"+e)}),E(function(){t.options.addTargetClasses!==!1&&g(t.target,p,h),
g(t.element,p,h)}),!0}});var k=function(){function e(e,t){var n=[],i=!0,a=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){a=!0,r=e}finally{try{!i&&o.return&&o.return()}finally{if(a)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return I.modules.push({position:function(e){var t=e.top,n=e.left;
if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:t,left:n}));var a=void 0,r=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var s=i,o=k(s,2);a=o[0],r=o[1],a=parseFloat(a,10),r=parseFloat(r,10)}else a=i.top,r=i.left;return t+=a,n+=r,{top:t,left:n}}}}),Y})},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBzdHlsZT0ic3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPGNpcmNsZSBpZD0iMCIgY3g9IjUwIiBjeT0iNTAiIHI9IjUwIiBzdHlsZT0iZmlsbDp1cmwoIzMpIi8+CiA8Y2lyY2xlIGlkPSIxIiBjeD0iNTAiIGN5PSI1MCIgcj0iNDciIHN0eWxlPSJmaWxsOnVybCgjNCkiLz4KIDxwYXRoIGlkPSIyIiBkPSJtMzIuOSAxOC44bDE4LjE2MSAwIDIwLjAzOSAzMS4yNS0yMC4wMzkgMzEuMjUtMTguMTYxIDAgMjAuMDM5LTMxLjI1LTIwLjAzOS0zMS4yNSIgc3R5bGU9ImZpbGw6dXJsKCM1KSIvPgogPGRlZnM+CiAgPGxpbmVhckdyYWRpZW50IGlkPSIzIiB4MT0iMTAwIiB4Mj0iMCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICA8c3RvcCBvZmZzZXQ9IjAlIiBzdHlsZT0ic3RvcC1jb2xvcjojZjliZTAzIi8+CiAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3R5bGU9InN0b3AtY29sb3I6I2NjN2IxOSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPGxpbmVhckdyYWRpZW50IGlkPSI0IiB4MT0iOTciIHgyPSIzIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgIDxzdG9wIG9mZnNldD0iMCUiIHN0eWxlPSJzdG9wLWNvbG9yOiMyODI4MjgiLz4KICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdHlsZT0ic3RvcC1jb2xvcjojMWYxZjFmIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmFkaWFsR3JhZGllbnQgaWQ9IjUiIGN4PSI2NyIgY3k9IjQ5LjkiIHI9IjU3LjgxMjMiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4bGluazpocmVmPSIjMyIvPgogPC9kZWZzPgo8L3N2Zz4K";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNhNGM2MzkiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im00NC44ODIgMjUuMzcxbDIuODE3IDQuODU5Yy01LjEyNyAyLjQ5NS04LjYwMiA3LjM4MS04LjYwMiAxMi45ODZoMzIuODA3YzAtNS42MDUtMy40NzUtMTAuNDktOC42MDMtMTIuOTg2bDIuODE3LTQuODU5YzAgMCAuMTM0LS4yNTgtLjExOS0uNDAzLS4yNTMtLjE0NS0uNDIzLjEwMi0uNDIzLjEwMmwtMi44NiA0LjkwMmMtMi4xNzgtLjk2Mi00LjYyNi0xLjUwNS03LjIxNi0xLjUwNS0yLjU5IDAtNS4wNC41NDMtNy4yMTYgMS41MDVsLTIuODYtNC45MDJjMCAwLS4xNi0uMjQ3LS40MTQtLjEwMy0uMjU1LjE0NC0uMTI4LjQwMy0uMTI4LjQwM20yLjgxNyA5LjQxMmMuODYgMCAxLjU2LjY5NSAxLjU2IDEuNTQ4IDAgLjg1My0uNyAxLjUyNi0xLjU2IDEuNTI2LS44NTkgMC0xLjU2LS42NzQtMS41Ni0xLjUyNiAwLS44NTMuNzAxLTEuNTQ4IDEuNTYtMS41NDhtMTUuNjAyIDBjLjg2IDAgMS41Ni42OTUgMS41NiAxLjU0OCAwIC44NTMtLjcgMS41MjYtMS41NiAxLjUyNi0uODU5IDAtMS41Ni0uNjc0LTEuNTYtMS41MjYgMC0uODUzLjcwMS0xLjU0OCAxLjU2LTEuNTQ4bS0yNC4zMzcgMTAuMzI4djI0LjY5NGMwIDEuMjI1IDEuNDkzIDIuODI5IDIuNzI3IDIuODI5aDMuOTAzdjguNDE5YzAgMi4xNDMgMS41NzQgMy44NyAzLjUzMyAzLjg3IDEuOTU4IDAgMy41MzItMS43MjcgMy41MzItMy44N3YtOC40MTloNS42Nzh2OC40MTljMCAyLjE0MyAxLjU3NCAzLjg3IDMuNTMyIDMuODcgMS45NTggMCAzLjU1NC0xLjcyNyAzLjU1NC0zLjg3di04LjQxOWgzLjg4MWMxLjIzNSAwIDIuNzI4LTEuNjA0IDIuNzI4LTIuODI5di0yNC42OTRoLTMzLjA3bS01LjQ0Mi0uNTE3YzEuOTUzIDAgMy41MzUgMS43MzMgMy41MzUgMy44N3YxNC42NTFjMCAyLjEzNi0xLjU4MyAzLjg3LTMuNTM1IDMuODctMS45NTMgMC0zLjUzNi0xLjczMy0zLjUzNi0zLjg3di0xNC42NTFjMC0yLjEzNyAxLjU4My0zLjg3IDMuNTM2LTMuODdtNDMuOTU2IDBjMS45NTMgMCAzLjUzNiAxLjczMyAzLjUzNiAzLjg3djE0LjY1MWMwIDIuMTM2LTEuNTgyIDMuODctMy41MzYgMy44Ny0xLjk1MiAwLTMuNTM1LTEuNzMzLTMuNTM1LTMuODd2LTE0LjY1MWMwLTIuMTM3IDEuNTgyLTMuODcgMy41MzUtMy44NyIgZmlsbD0iIzFmMWYxZiIvPjwvZz48L3N2Zz4=";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNkOGQ4ZDgiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im00My44MDIgNTUuODQ0Yy0uMDMzLTMuNTUyIDIuODU3LTUuMjU5IDIuOTg3LTUuMzQxLTEuNjI1LTIuNDEyLTQuMTU0LTIuNzQzLTUuMDU2LTIuNzgzLTIuMTU0LS4yMjEtNC4yMDIgMS4yODctNS4yOTMgMS4yODctMS4wOTEgMC0yLjc3OC0xLjI1NC00LjU2Mi0xLjIxOS0yLjM0OC4wMzQtNC41MTEgMS4zODQtNS43MjEgMy41MTYtMi40MzcgNC4yOTUtLjYyMyAxMC42NTYgMS43NTMgMTQuMTQgMS4xNjIgMS43MDMgMi41NDYgMy42MiA0LjM2NCAzLjU1MSAxLjc1Mi0uMDY5IDIuNDEzLTEuMTQ5IDQuNTI5LTEuMTQ5IDIuMTE2IDAgMi43MTIgMS4xNDkgNC41NjQgMS4xMTMgMS44ODUtLjAzNCAzLjA3OC0xLjczNiA0LjIzMS0zLjQ0NiAxLjMzMy0xLjk3OCAxLjg4Mi0zLjg5MyAxLjkxNS0zLjk5MS0uMDQxLS4wMTktMy42NzQtMS40MzItMy43MTEtNS42NzhtLTMuNDc5LTEwLjQyOGMuOTY2LTEuMTg3IDEuNjE2LTIuODM3IDEuNDM4LTQuNDgxLTEuMzkuMDU4LTMuMDc0Ljk0MS00LjA3MyAyLjEyNi0uODk0IDEuMDUxLTEuNjc4IDIuNzI5LTEuNDY2IDQuMzQxIDEuNTUuMTIyIDMuMTM1LS44IDQuMTAxLTEuOTg2bTE3Ljk1Ny0zLjY0MXY1Ljk0OGg1LjMxMnYyLjg2N2gtNS4zMTJ2MTEuMTY5YzAgMi41NjguNzE3IDQuMDIgMi43ODMgNC4wMi45NyAwIDEuNjg3LS4xMjggMi4xNS0uMjU3bC4xNjkgMi44MjRjLS43MTcuMy0xLjg1NS41MTQtMy4yODkuNTE0LTEuNzI4IDAtMy4xMi0uNTU2LTQuMDEtMS41ODMtMS4wNTQtMS4xMTMtMS40MzMtMi45NTMtMS40MzMtNS4zOTJ2LTExLjI5OGgtMy4xNjJ2LTIuODY3aDMuMTYydi00Ljk2NGwzLjYyNi0uOTg0bTExLjI5OCA1Ljk0OGw0LjAxIDExLjY0Yy42NzUgMS44ODMgMS4yMjMgMy41OTUgMS42NDQgNS4zMDZoLjEyNmMuNDY0LTEuNzEyIDEuMDU0LTMuNDI0IDEuNzI5LTUuMzA2bDMuOTYzLTExLjY0aDMuODc5bC04LjAxIDIwLjcxMmgtMy41NDJsLTcuNzU4LTIwLjcxMmgzLjk2MyIgZmlsbD0iIzFmMWYxZiIvPjwvZz48L3N2Zz4=";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiM0Y2I2NDkiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGZpbGw9IiNmY2QyMDkiIGQ9Im0zNy42IDExMGg3Mi40di03NGgtNTguMjRsMS44NTkgNS43MTggOC45MzIgMi42NDIgNC41MyA4LjY2LS43NyA4eiIvPjxwYXRoIGZpbGw9IiNlZDVlNTAiIGQ9Im04IDBsMzQuMTkgNTkuOTguNDEtOS41NCAzLjUzLTUuNTM0IDguODctMy45MDZoNTV2LTQwLjk5N3oiLz48Y2lyY2xlIGZpbGw9IiMxZjFmMWYiIGN4PSI1NSIgY3k9IjU1IiByPSIzMCIvPjxwYXRoIGQ9Im01NSA4NWMxNi41NjkgMCAzMC0xMy40MzEgMzAtMzAgMC01LjA2LTEuMjUzLTkuODI4LTMuNDY1LTE0LjAxbC0yNy41MzUuMDA5YzguNTk5IDEuOTI5IDE0LjE4OCA1Ljc2OSAxMS45OTMgMjAuNjEzbC0xMy42NzUgMjMuMjY4YzAgMCAxLjc3OC4xMTggMi42ODEuMTE4IiBmaWxsPSIjNjY2Ii8+PHBhdGggZD0ibTgxLjU1IDQxLjAxYy01LjAzLTkuNTI0LTE1LjAzLTE2LjAxLTI2LjU0OC0xNi4wMS0xMC40NyAwLTE5LjY4OCA1LjM2NC0yNS4wNSAxMy40OTRsMTIuMjM1IDIxLjUwNmMtMy4zMzEtMTUuNzg4IDExLjgyLTE4Ljk4NSAxMS44Mi0xOC45ODVoMjcuNTQ4IiBmaWxsPSIjMzMzIi8+PHBhdGggZD0ibTU0LjUgNjhjNy40NTYgMCAxMy41LTYuMDQgMTMuNS0xMy41IDAtNy40NTYtNi4wNC0xMy41LTEzLjUtMTMuNS03LjQ1NiAwLTEzLjUgNi4wNC0xMy41IDEzLjUgMCA3LjQ1NiA2LjA0IDEzLjUgMTMuNSAxMy41bTAtMmMtNi4zNTEgMC0xMS41LTUuMTQ5LTExLjUtMTEuNSAwLTYuMzUxIDUuMTQ5LTExLjUgMTEuNS0xMS41IDYuMzUxIDAgMTEuNSA1LjE0OSAxMS41IDExLjUgMCA2LjM1MS01LjE0OSAxMS41LTExLjUgMTEuNSIgZmlsbD0iIzY1OWVjZSIvPjwvZz48L3N2Zz4=";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNlNWEwMGQiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im01NC4yMSA1My4zYy0uMTIyLS4xNTctLjI4Ni0uMjEzLS40NDUtLjIxMy0uMTI3IDAtLjI0OC4wNzItLjM0NC4ybC0xMS40ODIgMTMuNjIxYy0uMjE3LjI4My0uMTA0LjYwNS4yNTIuNjA1bDYuODA5LjAyOXYxMy41MDljMCAuNjYyLjMxNC45MjQuOTc0LjkyNmw3LjY2Mi4wMTljLjY2LjAwMi45MzctLjI1OS45MzctLjkyM2wuMDI1LTEzLjUzMmg2LjgzOGMuMzU2IDAgLjQ3LS4zNDMuMjUyLS42MjZsLTExLjQ3OC0xMy42MTVtMTYuMzktMTQuMjE2Yy0xLjUwNiAwLTIuOTUzLjI0Ny00LjMxMi42OTEtMi43NzEtNi4xNTMtOC45MjMtMTAuNDQxLTE2LjA5LTEwLjQ0MS05Ljc1NiAwLTE3LjY2MyA3LjkzOC0xNy42NjMgMTcuNzMgMCAuNjEuMDMxIDEuMjExLjA5IDEuODA0LTQuMTQ1LjkwOC03LjI1MiA0Ljc5Mi03LjI1MiA5LjIyNCAwIDUuMTEyIDQuMTMgOS40NDggOS4yMjQgOS40NDhoMi45NjNjLS4wODYtMS4wNDYuMTg3LTIuMTEuODY5LTIuOTk2bDEyLjA2LTEzLjc0OWMuNzAyLS45MzYgMS45NDMtMS41NjUgMy4yNzctMS41NjUgMS4zNzMgMCAyLjY0MS42MjIgMy40NzkgMS43MDRsMTEuODYyIDEzLjQ5Yy43NTEuOTY4IDEuMDQ1IDIuMDU5Ljk3IDMuMTE1aDEuMDFjNy43MDUgMCAxMy40NjQtNi40NyAxMy40NjQtMTQuMjI5IDAtNy43NTQtNi4yNDUtMTQuMjI4LTEzLjk1LTE0LjIyOCIgZmlsbD0iIzFmMWYxZiIvPjwvZz48L3N2Zz4=";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgdmlld0JveD0iMCAwIDExMCAxMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjMzMzIiBkPSJNMCAwaDExMHYxMTBIMHoiLz48cGF0aCBmaWxsPSIjMUYxRjFGIiBkPSJNNTQuNTkgMjVsMTkuNDA2IDI5Ljk5OC0xOS40MDYgMzBIMzd2LS4wMDZsMTkuNDEtMjkuOTk0TDM3IDI1aDE3LjU5Ii8+PC9nPjwvc3ZnPgo="},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiM0NWFhNDIiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im01NS40OSAyNWMxNi42NTkgMCAzMC41NTggMTAuMTkyIDMzLjc4MyAyMy43NDQuMyAxLjI1OC41MDMgMi41MzEtLjA3NyAzLjM4My0uODIgMS4yMDUtMi42OTYuOTc3LTMuOTkuOTc3aC0yNC42MzNjLTIuNDg5IDAtNC4yOTQuMDMzLTYuNjQyLTEuMTM1LTEuODEyLS45MDItMi40NDItMS42NTgtMy42NzUtMy4wODItMS42NzMtMS45MzEtNC4xMzEtMy4xNS02Ljg3LTMuMTUtNS4wNCAwLTkuMTI4IDQuMTI4LTkuMTI4IDkuMjIxIDAgNS4wOTMgNC4wODcgOS4yMjEgOS4xMjggOS4yMjEgMi4xNzcgMCA0LjE3Ny0uNzcgNS43NDUtMi4wNTYuODE5LS42NzEgMS44OTEtMS45MjMgMi42NDgtMi43MjEgMS44NTQtMS45NTIgNC43NjEtMi41NzUgOC4wNy0yLjQ0OGgyNi4zMTVjMi43OTMtLjA2OCAzLjgxMS40ODYgMy4yODIgMy4wNTYtMi44NzMgMTMuOTMzLTE2Ljk4MSAyNC41MTItMzMuOTUzIDI0LjUxMi0xMC4yNjIgMC0xOS40NzctMy44NjktMjUuNzk0LTEwLjAxLS43NjItLjc0MS0xLjA3Mi0xLjY5LjAwNy0yLjI5NS4zOTktLjIyNC45OTEtLjM1IDEuODExLS4zNTJoMTcuNjg4YzEuODk0LjEwOCAzLjU4Mi42MDIgNS4wODYgMS40ODYgMS43NTYgMS4wMzMgMi4wNzIgMS43NDYgMy4zMjIgMy4wNTYgMS42NiAxLjc0MSAzLjk5MiAyLjgyNCA2LjU3NCAyLjgyNCA1LjA0IDAgOS4xMjgtNC4xMjggOS4xMjgtOS4yMjEgMC01LjA5My00LjA4Ny05LjIyMS05LjEyOC05LjIyMS0yLjE3NyAwLTQuMTc3Ljc3LTUuNzQ1IDIuMDU2LS44MTkuNjcxLTEuODkxIDEuOTIzLTIuNjQ4IDIuNzIxLTIuODMxIDIuOTgtNy41MiAyLjQ0OC0xMS4yNjYgMi40NDhoLTEzLjM2MWMtMi4wNzcgMC00LjM4Mi4yMTYtNi4xODItLjk3OC0xLjEzNC0uNzUzLTEuOTE4LTEuOTYtMi41MjUtMy43MDQtLjk0Ni0yLjcxNS0xLjQ1NS01LjU5My0xLjQ1NS04LjU3NCAwLTIuNTE1LjM2My00Ljk1NiAxLjA0NC03LjI4OCAxLjAxLTMuMzc5IDIuNjc2LTYuMDUgNy41OTgtNS45MTdoMTguMjk2YzIuNjcxLS4xMDIgNS4wODEuMjg1IDYuODg2IDEuNDY1Ljk4OS42NDcgMS4zNzQgMS4yNDIgMi4xMzcgMi4wODEuNTYzLjYxOSAxLjE3NSAxLjIzNSAxLjY5MyAxLjYyMyAxLjYyNSAxLjIxNiAzLjU2OCAyLjA1NiA1Ljc0NiAyLjA1NiA1LjA0IDAgOS4xMjctNC4xMjggOS4xMjctOS4yMjEgMC01LjA5My00LjA4Ni05LjIyMS05LjEyNy05LjIyMS0yLjc4NSAwLTUuMjc4IDEuMjYtNi45NTIgMy4yNDYtMS42MTkgMS45MjEtMy4yOTcgMy4xMzktNS40NzYgMy43MjctMS40ODkuNDAyLTIuNzA0LjM5My00LjIxLjM5M2gtMTYuMDNjLTMuMTY0LS4wMDktMy4wMzUtMS44MjktMS4xNS0zLjUyNiA2LjI3Ny01LjY1NiAxNS4xMi05LjE3OSAyNC45MTEtOS4xNzkiIGZpbGw9IiMxZjFmMWYiLz48L2c+PC9zdmc+";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMzMjc3YmMiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im00NS40MiA0OS4xOGgyMS4xMWMwLTcuNTQzLTMuMjctMTIuNjg1LTEyLjE4Ny0xMi42ODUtMTAuNTM4IDAtMjEuMjU0IDYuOTA0LTI2LjM0OCAxNS41MTIgMS41NzgtMTQuOTQxIDEyLjIyMy0yNyAyOC4yNS0yNyAxMy43MzYgMCAyNi43NTEgMTAuNTcgMjYuNzUxIDI4LjE0djYuNjhoLTM3LjQ2M2MwIDkuMDkgNy44ODEgMTIuNjk0IDE2LjEzIDEyLjY5NCAxMC4wNCAwIDE2LjI2NS00LjU0MyAxNi4yNjUtNC41NDN2MTIuNzM1YzAgMC03LjAyIDQuMjkzLTE4LjIxNSA0LjI5My0xNC41NDUgMC0yNC44MTMtMTAuNDkxLTI0LjgxMy0yMy41MzYgMC0xMC4yNCA2LjE1NC0xOC40MTUgMTQuNjc5LTIxLjc4OS00LjE1IDQuNTg2LTQuMTY0IDkuNTAyLTQuMTY0IDkuNTAyIiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNlYjc3MWYiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im01MS4yMyA0MC45MDljLS42MjItLjA3NC0xLjI2LS4wMDEtMS44OTEuMDEzLTEuNjE2LS41NjktMi40MTQtMi4xODEtMy44MzItMy0uMDcxLTIuNjc0IDEuODQ1LTQuMzQ1IDMuMzg5LTYuMjE3LS45ODUtLjU2Ni0xLjc2Ny0uMTMyLTIuMjk0LjIxNy0yLjkyNyAxLjkzOC02LjA1IDIuNzY2LTkuNTkxIDMuMDY0LTIuNTI4LjIxMy0zLjcyOS0uMzE4LTQuMzk5LTIuNTY0LS4zNjMtMS4wNDItLjcyNi0yLjA4NC0xLjE0Ni0zLjI4OC0yLjI2MyAyLjAzMi0yLjk2NyA0Ljc3MS0yLjkgNy40MTYuMDkxIDMuNTk4LTEuNzc4IDYuMTIyLTMuNTY5IDguODA2LS4xODYgMy4xMzEuNDI1IDExLjIwNi40ODggMTEuMzg5IDEuNzYxIDEzLjE1MiAxMi4zMTEgMjMuMjQgMjYuMTggMjUuMDQuMTg0LjA2OCAzLjg2OC4zMiA2LjI5NS4wMTEgMTIuOTQ3LTEuNzcgMjMuMjMtMTEuOTI3IDI2LjA2LTI1LjcwMi4yNzQtMS4zMzUgMS4wMzEtNy43Ljg5NC05LjMwMy0uMDg1LS4wMzEtLjE2NC0uMTM1LS4yMzYtLjMzNy4wMDEtLjg3Ni0xLjIzOC0uNTI5LTEuMzM1LTEuNjgyLS40NTEtNS4zODMtMy43NTItOS4zMTItNy4xOS0xMy4xMi0yLjg4Ny0uNzkyLTUuMzk3LTIuNjQ2LTguNDQ3LTIuOTg1LTEuMjgzLS4xNDMtMi41NjMtLjMzNC00LjQ4LS41ODggMS42MjUgMS41MDEgMy40NjEgMS43MjggNC4zMDEgMy40Ni0uOS4xMzctMS42ODQuMjU1LTMuMTI4LjQ3NCA1LjA2NiAyLjc4OSAxMC4yNzUgNC43NTMgMTEuNzc3IDExLjAyLS45MDktLjM3Ny0xLjUyMy0uNjMyLTIuMzU3LS45NzguNTIyIDMuNzE2IDEuMzUyIDcuMjAyLjM1OCAxMS4xNjctLjY2Ni0xLjAxNi0xLjA5Ni0xLjY3MS0xLjg2MS0yLjgzOC0uMTgyIDQuNjA4LjMzIDguODE1LTEuOTk0IDEyLjQ5bC0uNTM5LTEuNjg2Yy0xLjM5My0uODM5LTEuNDU2LjY4Ny0xLjg5OSAxLjIwNS01LjMyOSA2LjIyOC0xMS42NjYgNy41NDYtMTguMTEgMy42NDUtLjg1OC0uNTE5LTEuODM4LS45NDktMi40MTktMi40NjMgNS4wODQuOTcxIDguMjYxLTMuMTI3IDEyLjYwMS00LjEyOSAxLjMwMS0uMy40NDMtMS40NDYtLjEzOC0xLjk3My0xLjk0My0xLjc2MS00LjE1Mi0yLjAyOC02LjU1OS0uOTY3LTQuMjcyIDEuODgyLTYuNzgyIDEuMjE0LTkuNTE2LTIuNDM2LS41MzctLjcxNi0uOTY2LTEuNDIxLS41MjgtMi4zMjUuNDUyLS45MzIgMS4yOTMtLjg4OCAyLjE3NS0uOTE3IDEuMTQ2LS4wMzggMi42MTcgMS4yNzkgMy4zMTUuMDY0Ljc2OS0xLjMzOC0uMTk3LTIuOS0uODczLTQuMjU5LjE2OC0uMTkzLjMzNy0uMzg0LjUwNi0uNTc2IDEuNDgyLTEuMTAyIDMuMzIyLTEuNzU4IDQuMzIyLTMuNDYxLS4wNy0uMDgxLS4xNC0uMTUtLjIxMS0uMjA3LjEzNy4wMDIuMjc0LjAwNC40MTEuMDA2LjIzMS0uNTE5LjMzNC0xLjAxLS4zMDItMS4zMjktLjQ0NS0uMDYxLS45MzktLjI5OC0xLjMyOC0uMTU0IiBmaWxsPSIjMWYxZjFmIi8+PC9nPjwvc3ZnPg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMwMDhiY2YiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im01OC4wNyAxOS42MDd2MzUuMzhjMCAzLjI1OS0yLjI1MiAzLjE0NS01Ljc3IDMuODU5LTUuNDg5IDEuMTE1LTE0LjE0IDEuMTkyLTIyLjc2OSAxLjE2Ny05LjEyNi0uMDI3LTE4LjI5OS0uMDY2LTIzLjcwMS0xLjQxNi0yLjkyOS0uNzMyLTQuODI5LS43NC00LjgyOS0zLjU5OHYtMzUuMzhjMC0zLjMwMyAyLjI1Mi0zLjE0NSA1Ljc3LTMuODU5IDQuMDU4LS44MjQgOS44NDgtMS4wODEgMTYuMDgtMS4xNDlsLTguNzY4LTExLjExYy0xLjQzMy0xLjgxNi0xLjEwOC0yLjI2OC0uNDY1LTIuODM5LjY0My0uNTcxIDEuMjk2LS43NzYgMi44MDIuNzYzbDEyLjg5NCAxMy4xN2guMjEybDEzLjEyLTEzLjMzNmMxLjYyNi0xLjY1MyAyLjE0LTEuMzY0IDIuNzkxLS44MDIuNjUxLjU2Mi45MDYgMS4xNTgtLjQyNCAyLjg0NWwtOC45NDQgMTEuMzMzYy4yMjguMDAzLjQ1Ni4wMDYuNjgzLjAwOSA2LjUyMi4wOTIgMTIuNTI0LjM3NyAxNi40OTEgMS4zNjggMi45MjguNzMyIDQuODI5LjkwNCA0LjgyOSAzLjU5N20tNTQuMzMuMjYzdjM0Ljc3NmMwIC4yMi4yNTYuMzk5LjU2OC4zOTloNTAuMjVjLjMxMyAwIC41NjgtLjE4LjU2OC0uMzk5di0zNC43NzZjMC0uMjItLjI1NS0uMzk5LS41NjgtLjM5OWgtNTAuMjVjLS4zMTIgMC0uNTY4LjE4LS41NjguMzk5bTcuMzA2IDUuMDcyaDkuNDYyYy4zNjcgMCAuNjY4LjI5OC42NjguNjYxdjUuMjg4YzAgLjM2NC0uMzAxLjY2MS0uNjY4LjY2MWgtOS40NjJjLS4zNjcgMC0uNjY4LS4yOTctLjY2OC0uNjYxdi01LjI4OGMwLS4zNjQuMzAxLS42NjEuNjY4LS42NjFtMTMuODYxIDE4LjE4aDkuNDYyYy4zNjcgMCAuNjY4LjI5OC42NjguNjYxdjUuMjg4YzAgLjM2NC0uMzAxLjY2MS0uNjY4LjY2MWgtOS40NjJjLS4zNjcgMC0uNjY4LS4yOTctLjY2OC0uNjYxdi01LjI4OGMwLS4zNjMuMzAxLS42NjEuNjY4LS42NjFtMC0xOC4xOGg5LjQ2MmMuMzY3IDAgLjY2OC4yOTguNjY4LjY2MXY1LjI4OGMwIC4zNjQtLjMwMS42NjEtLjY2OC42NjFoLTkuNDYyYy0uMzY3IDAtLjY2OC0uMjk3LS42NjgtLjY2MXYtNS4yODhjMC0uMzY0LjMwMS0uNjYxLjY2OC0uNjYxbS0xMy44NjEgOC45MjNoOS40NjJjLjM2NyAwIC42NjguMjk3LjY2OC42NjF2NS4yODhjMCAuMzYzLS4zMDEuNjYxLS42NjguNjYxaC05LjQ2MmMtLjM2NyAwLS42NjgtLjI5Ny0uNjY4LS42NjF2LTUuMjg4YzAtLjM2NC4zMDEtLjY2MS42NjgtLjY2MW0yNy4zODcgOS4yNTNoOS40NjJjLjM2NyAwIC42NjguMjk4LjY2OC42NjF2NS4yODhjMCAuMzY0LS4zMDEuNjYxLS42NjguNjYxaC05LjQ2MmMtLjM2NyAwLS42NjgtLjI5Ny0uNjY4LS42NjF2LTUuMjg4YzAtLjM2My4zMDEtLjY2MS42NjgtLjY2MW0tMjcuMzg3IDBoOS40NjJjLjM2NyAwIC42NjguMjk4LjY2OC42NjF2NS4yODhjMCAuMzY0LS4zMDEuNjYxLS42NjguNjYxaC05LjQ2MmMtLjM2NyAwLS42NjgtLjI5Ny0uNjY4LS42NjF2LTUuMjg4YzAtLjM2My4zMDEtLjY2MS42NjgtLjY2MW0yNy4zODctOS4yNTNoOS40NjJjLjM2NyAwIC42NjguMjk3LjY2OC42NjF2NS4yODhjMCAuMzYzLS4zMDEuNjYxLS42NjguNjYxaC05LjQ2MmMtLjM2NyAwLS42NjgtLjI5Ny0uNjY4LS42NjF2LTUuMjg4YzAtLjM2NC4zMDEtLjY2MS42NjgtLjY2MW0tMTMuNTI2IDBoOS40NjJjLjM2NyAwIC42NjguMjk3LjY2OC42NjF2NS4yODhjMCAuMzYzLS4zMDEuNjYxLS42NjguNjYxaC05LjQ2MmMtLjM2NyAwLS42NjgtLjI5Ny0uNjY4LS42NjF2LTUuMjg4YzAtLjM2NC4zMDEtLjY2MS42NjgtLjY2MW0xMy41MjYtOC45MjNoOS40NjJjLjM2NyAwIC42NjguMjk4LjY2OC42NjF2NS4yODhjMCAuMzY0LS4zMDEuNjYxLS42NjguNjYxaC05LjQ2MmMtLjM2NyAwLS42NjgtLjI5Ny0uNjY4LS42NjF2LTUuMjg4YzAtLjM2NC4zMDEtLjY2MS42NjgtLjY2MSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjYgMjUpIiBmaWxsPSIjMWYxZjFmIi8+PC9nPjwvc3ZnPg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiM1MjkwY2QiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxnIGZpbGw9IiMxZjFmMWYiPjxwYXRoIGQ9Im02MS4xOCAzMC44NzZjLTEuNjk2LS4yNjYtMy40NzUtLjQwNS01LjMyOS0uNDA1LTcuNDY2IDAtMTMuNDg4IDIuMTgyLTE4LjA3IDYuMjk2LTUuMjA3IDQuNzM4LTguMDkzIDEwLjk0MS04LjA5MyAxOC4xMSAwIC4wNiAwIC4xMjEuMDAxLjE4MSA3LjMyNi0xMS40MDQgMTguNTkzLTE3LjI0NiAyMS41ODEtMTguNzg5LjQ3LS4yMTguNzUzLjM0My4zMTQuNTYxLTUuMTQ3IDMuMDYzLTE0LjgxIDEyLjA4LTIwLjgzMSAyNS4wNCAxLjQ3NCA0Ljc0NCA0LjQyNiA5IDguNTM0IDEyLjExIDQuNTQ4IDMuMzk3IDEwLjMyIDUuMTEyIDE3LjQwOSA1LjExMiAxMy4wMiAwIDIyLjE1LTcuMTM4IDI1LjQwOC0xNy41NDlsLTE3Ljg4LS4wMzFjLS43NTMgMy42NzgtMy4yNjMgNS42NDItNy4xODQgNS42NDItNC45MjUgMC04LjMxMi0yLjY4MS04LjUzMi04Ljg4M2wzMy45NC0uMDMxYy4wNjMtMS4yNzgtLjA5NC0yLjE4My0uMDk0LTMuMTggMC0xMS42MjgtNy0yMC43MjEtMTguMzkzLTIzLjYxOSA0LjY0Mi0yLjg2NSAxMy4zMS03LjEgMTcuNDg0LTMuNzE3IDMuMTM3IDIuNTI1IDEuNDEyIDcuODI0LjY1OSAxMC4wMS0uMTI1LjU2MS41MzQuNjU1LjY1OS4xMjUgMS41NjgtMy45MjggMi4wMzktOS4xOTUtLjI1MS0xMS4yNTMtNC43MjMtNC4yMjYtMTUuNDI1Ljg0Mi0yMS4zMzQgNC4yN20zLjEwOSAxOS42MDdoLTE1Ljg0MWMuMDk0LTUuMzkyIDMuOTg0LTcuNzMgOC4wNi03LjczIDQuMjk4IDAgNy43NzkgMi40NjMgNy43NzkgNy43MyIvPjxwYXRoIGQ9Im0zMC42IDgzLjg3Yy02LjQ2Mi00LjA1Mi0zLjIzMS0xNS4wOS41OTYtMjIuOTQxbDIuOTggNi4zNThjLTIuNjk4IDUuNzM1LTQuMjA0IDExLjg0NS0xLjI4NiAxNC4wMyAzLjc2NCAyLjgwNSAxMS41MTIuMzQzIDE3LjAzLTIuOTkybDEuNzg4LjE1NmMtNy4xMiA0LjcwNy0xNi4xMiA4LjUwOS0yMS4xMSA1LjM5MiIvPjwvZz48L2c+PC9zdmc+";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNkOGQ4ZDgiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0IDM4KSIgZmlsbD0iIzFmMWYxZiI+PHBhdGggZD0ibTEuNzA4IDEwLjE3Mmg1LjE3OXYyMi45NDhoLTUuMTc5eiIvPjxwYXRoIGQ9Im0yNS4xOSAxLjA4MWMtNy43MDIgMC0xMy45NDcgNS44NDgtMTMuOTQ3IDE2LjQyIDAgMTAuNTcyIDYuMjQ1IDE2LjQyIDEzLjk0NyAxNi40MiA3LjcwMiAwIDEzLjgzOS03LjA2IDEzLjgzOS0xNi40MDUgMC0xMC4zOTUtNi4xMzctMTYuNDM0LTEzLjgzOS0xNi40MzRtLjAzMiA0LjU4YzQuNDU5IDAgOC4yNDIgNi4yNzYgOC4xNTYgMTIuNTQyLS4wODUgNi4yNjYtMy42OTcgMTEuMTM4LTguMTU2IDExLjEzOC00LjQ1OSAwLTguMzY4LTQuMjE5LTguMzY4LTExLjg0IDAtNy42MiAzLjkwOS0xMS44NCA4LjM2OC0xMS44NCIvPjxwYXRoIGQ9Im03LjcwMyA0LjEyNmMwIDEuNzY0LTEuNTAzIDMuMTk0LTMuMzU3IDMuMTk0LTEuODU0IDAtMy4zNTctMS40My0zLjM1Ny0zLjE5NCAwLTEuNzY0IDEuNTAzLTMuMTk0IDMuMzU3LTMuMTk0IDEuODU0IDAgMy4zNTcgMS40MyAzLjM1NyAzLjE5NCIvPjxwYXRoIGQ9Im00Mi42NzcgMjYuNzA5YzAgMCAzLjI0NiAyLjEwNCA3LjUyNiAyLjAyOSA0LjI4LS4wNzUgNS4wOTEtMi42MyA1LjAyLTQuODA5LS4wNzQtMi4xNzktMy4wMi0zLjk1OS02Ljg2Mi01LjE4Ni00Ljk0NC0xLjU3OC02LjkzNi02LjkxNC02LjM0Ni0xMC43NDcuNTktMy44MzIgNS40Ni02LjkxNCAxMC45Mi02LjY4OCA1LjQ2LjIyNSA2LjcxNCAxLjY1MyA2LjcxNCAxLjY1M2wtMS4yNTQgNC43MzRjMCAwLTIuODA0LTIuMDI5LTUuMDkxLTEuOTU0LTIuMjg3LjA3NS01LjYwOCAxLjI3Ny01LjgyOSAzLjMwNy0uMjIxIDIuMDI5IDEuNjIzIDQuMDU4IDQuMTMyIDUuMjYgMi41MDkgMS4yMDIgOS43MzkgMy45MDggOS4zNzEgMTAuMjIxLS4zNjkgNi4zMTMtNS40NiA3Ljg5LTcuODIxIDguNjQzLTIuMzYxLjc1MS02LjQ5My4wNzUtOC4zMzgtLjQ1MS0xLjg0NS0uNTI2LTMuNjg5LTEuMTI3LTMuNjg5LTEuMTI3bDEuNTUtNC44ODUiLz48L2c+PC9nPjwvc3ZnPg==";
},function(e,t,n){e.exports=n.p+"img/desktop/devices/linux.e80fefdbe1947faf2913d4ce0043c707.svg"},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNlMjA2MTMiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im01NS40NyA4NC45NjljLTMuNjI4IDAtNy4wMi0uNzEtMTAuMTM5LTIuMTQxLTMuMTIxLTEuNDM1LTUuOTI2LTMuNTU4LTguNDEzLTYuMzQzLTIuNzE3LTIuOTg5LTQuNzI5LTYuMjI5LTYuMDEtOS43MTgtMS4yOC0zLjQ4MS0xLjkwNi03LjQtMS45MDYtMTEuNzQ0IDAtNC4zNDQuNjI1LTguMjYgMS45MDYtMTEuNzQxIDEuMjgtMy40ODcgMy4yOTItNi43MjkgNi4wMS05LjcxOCAyLjUxMy0yLjgwOSA1LjMyNS00Ljk1MyA4LjQ1Mi02LjQwMiAzLjEyNy0xLjQ0MyA2LjQ5OS0yLjE2MiAxMC4xLTIuMTYyIDMuNjAyIDAgNi45NzcuNzE5IDEwLjEgMi4xNjIgMy4xMjQgMS40NDkgNS45NDEgMy41OTMgOC40NDggNi40MDIgMi42OTMgMi45NjYgNC42ODggNi4xODggNS45NTMgOS42NiAxLjI2OCAzLjQ2NiAxLjg4NSA3LjQwNiAxLjg4NSAxMS44IDAgNC4zOTQtLjYxNyA4LjMzNy0xLjg4NSAxMS44LTEuMjY1IDMuNDc1LTMuMjYgNi42OTQtNS45NSA5LjY2Mi0yLjQ5IDIuNzg2LTUuMjg2IDQuOTA5LTguNDEzIDYuMzQzLTMuMTI3IDEuNDMxLTYuNTA4IDIuMTQxLTEwLjEzNiAyLjE0MW0wLTMuODcyYzQuMDc3IDAgNi42NzMtMS41NTUgOC4xMzYtNC41NyAxLjU2OS0zLjIxOSAyLjQ1Ny0xMC4yNzIgMi40NTctMjEuNTA0IDAtMTEuMjI2LS44ODgtMTguMjgyLTIuNDU3LTIxLjUwNi0xLjQ2My0zLjAxLTQuMDU5LTQuNTY1LTguMTM2LTQuNTY1LTQuMSAwLTYuNzIgMS41Ny04LjIwMSA0LjYwOS0xLjU4NCAzLjI0OC0yLjQ3MiAxMC4yODktMi40NzIgMjEuNDYyIDAgMTEuMTc2Ljg4OCAxOC4yMiAyLjQ3MiAyMS40NjggMS40ODEgMy4wMzYgNC4xIDQuNjA2IDguMjAxIDQuNjA2IiBmaWxsPSIjMWYxZjFmIi8+PC9nPjwvc3ZnPg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNkOGQ4ZDgiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im03MS45NDIgNTYuODc4Yy0uMDcyLTcuNTk1IDYuMjI1LTExLjI0NCA2LjUxLTExLjQyMS0zLjU0Mi01LjE1OC05LjA1LTUuODY1LTExLjAyLTUuOTUtNC42OTMtLjQ3My05LjE1NiAyLjc1Mi0xMS41MzQgMi43NTItMi4zNzggMC02LjA1LTIuNjgtOS45NDItMi42MDctNS4xMTcuMDczLTkuODI5IDIuOTYtMTIuNDY3IDcuNTE5LTUuMzEgOS4xODQtMS4zNTcgMjIuNzg1IDMuODIgMzAuMjMgMi41MzEgMy42NDEgNS41NDcgNy43NCA5LjUxMSA3LjU5MSAzLjgxNy0uMTQ4IDUuMjU5LTIuNDU2IDkuODY5LTIuNDU2IDQuNjEyIDAgNS45MSAyLjQ1NiA5Ljk0NSAyLjM4IDQuMTA3LS4wNzIgNi43MDctMy43MTMgOS4yMi03LjM2OCAyLjkwNi00LjIyOSA0LjEwMS04LjMyNCA0LjE3My04LjUzNC0uMDktLjA0MS04LjAxLTMuMDYyLTguMDktMTIuMTRtLTcuNTgyLTIyLjI5N2MyLjEwNS0yLjUzOCAzLjUyMS02LjA3IDMuMTMzLTkuNTgxLTMuMDMuMTIzLTYuNjk5IDIuMDEtOC44NzUgNC41NDctMS45NDkgMi4yNDYtMy42NTYgNS44MzYtMy4xOTQgOS4yODEgMy4zNzguMjYxIDYuODMxLTEuNzEyIDguOTM2LTQuMjQ3IiBmaWxsPSIjMWYxZjFmIi8+PC9nPjwvc3ZnPg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9IjAiIGQ9Im01NC41OSAyNWwxOS40MDYgMjkuOTk4LTE5LjQwNiAzMGgtOC43OTctOC43OTN2LS4wMDZsMTkuNDEtMjkuOTk0LTE5LjQxLTI5Ljk5OGgxNy41OSIgZmlsbD0iIzFmMWYxZiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNlNWEwMGQiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjx1c2UgeGxpbms6aHJlZj0iIzAiLz48L2c+PC9zdmc+";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNlNWEwMGQiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im0zMCA2MGMxNi41NjkgMCAzMC0xMy40MzEgMzAtMzAgMC0xNi41NjktMTMuNDMxLTMwLTMwLTMwLTE2LjU2OSAwLTMwIDEzLjQzMS0zMCAzMCAwIDE2LjU2OSAxMy40MzEgMzAgMzAgMzBtLS41NzEtNDguNzJsMTIuMTQ5IDE4Ljc0OS0xMi4xNSAxOC43NWgtNS41MDQtNS41MDR2LS4wMDRsMTIuMTQ3LTE4Ljc0Ni0xMi4xNDctMTguNzQ2di0uMDAyaDExLjAxIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNSAyNSkiIGZpbGw9IiMxZjFmMWYiLz48L2c+PC9zdmc+";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiM4ZTIzZTEiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE2IDQyKSIgZmlsbD0iIzFmMWYxZiI+PHBhdGggZD0ibTIxLjUxMiAyNC4yMWgtNy4wMWwtNS41NjQtNy43MzloLTEuODcxdjcuNzIyaC02LjE3NXYtMjMuMmg4Ljg0N2M1LjEgMCA5LjI2MyAzLjQ3NyA5LjI2MyA3Ljc1NCAwIDIuNjA5LTEuNTk2IDQuOTM5LTQuMDMgNi4zNjVsNi41MzMgOS4xbS04LjY4NC0xNS40NjNjMC0yLjE1OC0xLjczMi0zLjg5NS0zLjg0OS0zLjg5NWgtMS45MDl2Ny43NTZoMS45MDljMi4xMTggMCAzLjg0OS0xLjczOSAzLjg0OS0zLjg2MSIvPjxwYXRoIGQ9Im0zNy45ODIgMTUuMTFjMCA1LjI1NS00LjI2MyA5LjQ2My05LjUwNiA5LjQ2My01LjI0IDAtOS40NzItNC4yMDgtOS40NzItOS40NjMgMC01LjI1MSA0LjIzMS05LjQ2MSA5LjQ3Mi05LjQ2MSA1LjI0MiAwIDkuNTA2IDQuMjEgOS41MDYgOS40NjFtLTkuNTA2LTQuOTcyYy0xLjYzMSAwLTMuMDIgMi4yMjItMy4wMiA0Ljk3MiAwIDIuNzUxIDEuMzg3IDQuOTc2IDMuMDIgNC45NzYgMS42NjggMCAzLjA1NC0yLjIyNSAzLjA1NC00Ljk3NiAwLTIuNzUxLTEuMzg1LTQuOTcyLTMuMDU0LTQuOTcyIi8+PHBhdGggZD0ibTUyLjQ3IDYuMDNsLTcuMTE0IDcuMTN2LTcuMTU0aC02LjE3NHYxOC4xOGg2LjE3NHYtNy4zNzVsNy40MjcgNy4zNzVoNy43NzJsLTkuNDM4LTkuNDYyIDcuODE3LTcuODMzdjEwLjc4OWMwIDMuNTgyIDIuMTQ5IDYuODg4IDcuNTYxIDYuODg4IDIuNTY5IDAgNC45MjctMS40NjEgNi4wNzMtMi43ODNsMi43NzYgMi40aDEuMzE4di0xOC4xNmgtNi4xNzR2MTEuNzU2Yy0uNjk1IDEuMjE2LTEuNjY1IDEuOTgxLTMuMTYyIDEuOTgxLTEuNTE5IDAtMi4yMTYtLjkwMy0yLjIxNi0zLjc5di05Ljk0N2gtMTIuNjQiLz48L2c+PC9nPjwvc3ZnPg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMwMGEzZGIiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI1IDI1KSIgZmlsbD0iIzFmMWYxZiI+PHBhdGggZD0ibTMwIDBjLTE2LjU2OSAwLTMwIDEzLjQzMS0zMCAzMCAwIDE2LjU2OSAxMy40MzEgMzAgMzAgMzAgMTYuNTY5IDAgMzAtMTMuNDMxIDMwLTMwIDAtMTYuNTY5LTEzLjQzMS0zMC0zMC0zMG0yNS4xOSAzMy41MTVjLTEuMzE0IDEwLjE5NC05LjI1NSAxOC45NDQtMTkuMjg2IDIxLjIxLTEuMTY4LjI2NC0yLjM4My4zMi0zLjU1My41NzctLjk1MS4yMDktMS40NTctLjA5Mi0xLjY5OC0xLjAxLS4wOTEtLjM0OS0uMy0uNjY2LS40NjUtMS4wMTgtLjEwOC4xMDEtLjE4NC4xNDMtLjIxOC4yMDctMS4wNTIgMS45OC0xLjA1MSAxLjk4LTMuMjQ4IDEuNzE5LTExLjc0LTEuMzk2LTIxLjI2OC0xMS41NzQtMjEuOTY2LTIzLjQzMS0uMDM0LS41ODMuMTQ0LS44NDcuNjU0LTEuMDI3LjQzNC0uMTUzLjg0My0uMzc3IDEuMzA5LS41OTItLjA3Ni0uMTU3LS4wODMtLjIwNC0uMTA4LS4yMTgtMS45NjktMS4wNTItMS45NjktMS4wNTItMS42ODYtMy4yNzMgMS41LTExLjc5MyAxMS42ODktMjEuMjkyIDIzLjQ4NS0yMS45MTcuNTEzLS4wMjcuNzg4LjA5OS45NjYuNTc5LjE4Ni41MDMuNDQzLjk3OS41OTMgMS4zMDMuMTk4LjIxNy4yNDIuMTk2LjI5LjA5Mi45ODgtMi4xMTMuOTg5LTIuMTEzIDMuMzE0LTEuNzggMTEuODc3IDEuNzAxIDIwLjkyOSAxMS40MTggMjEuNzgyIDIzLjM1NC4wMzkuNTQ1LS4wNDUuODc2LS41OTEgMS4wNjYtLjQ2MS4xNjEtLjg5NC40MDItMS4zMzcuNjA2LjA2NC4xMzQuMDc4LjIzMi4xMjguMjU2IDEuOTM4Ljk0MSAxLjkzOS45NCAxLjYzNSAzLjI5NSIvPjxwYXRoIGQ9Im00MS40MSAyOC43MjNjLTEuNDgtLjIzMS0yLjUzNC0uNzE2LTIuNzQ0LTIuMzQ4LS4wMzctLjI5LS4yMjEtLjU4OC0uNDA4LS44MjYtLjQ2Ni0uNTk1LS4yOTctMS4wNDcuMTE2LTEuNjIyIDIuMTctMy4wMyA0LjI5MS02LjA4NiA2LjQyMS05LjE0MS4xNjEtLjIzLjQ2MS0uNDExLjM4LS43NzktLjQ5My0uMTUyLS43MTMuMjU3LS45ODYuNDc5LTIuMzQ3IDEuOTEyLTQuNzI1IDMuNzktNi45OTkgNS43ODctMS4zNDUgMS4xODEtMi41MzggMi4wOTYtNC4zOTYuODg1LS41NjctLjM3LS45MzMtLjYzOC0xLjA3Ni0xLjI4Mi0uNDc3LTIuMTU1LS45ODgtNC4zMDMtMS40ODUtNi40NTMtLjA2OC4wMDktLjEzNi4wMTgtLjIwNC4wMjYtLjUyMSAyLjE3OC0xLjA2OSA0LjM1MS0xLjU0NCA2LjUzOS0uMTMzLjYxMi0uMzY0Ljg3MS0uOTg4IDEuMDYyLTMuMTc5Ljk3NC01LjM2MiAzLjAzOC02LjM2MyA2LjIzNi0uMjI2LjcyMS0uNTU0IDEuMDQtMS4zMDYgMS4xOTQtMi4wOTEuNDI4LTQuMTU4Ljk3LTYuMjM1IDEuNDY3IDEuODQ3LjY2NyAzLjY2OCAxLjE0OSA1LjUxNCAxLjUwNCAxLjE0Ny4yMiAyLjAyOC41MzggMi4xODkgMS44OTcuMDYuNTA4LjM3NyAxLjAzMi43MDMgMS40NS40MjQuNTQ1LjI5My45MTUtLjA3NCAxLjQxNy0yLjIyIDMuMDM4LTQuNDA4IDYuMDk5LTYuNjAzIDkuMTU2LS4xNi4yMjItLjQxMS40Mi0uMzg4Ljc3Ni41MDEuMDY4LjcxNi0uMjUxLjk3My0uNDU2IDIuNDg0LTEuOTg5IDUuMDItMy45MjQgNy40MTgtNi4wMSAxLjIzNS0xLjA3MiAyLjI5LTEuNjc1IDMuOTE5LS43NDkuNjkuMzkyIDEuMTU0LjY0OSAxLjMyNCAxLjQ3NC40MzQgMi4xMTMuOTcyIDQuMjA0IDEuNDY5IDYuMzA0LjY5Ni0yLjE4NSAxLjIwMy00LjM1MyAxLjcwMS02LjUyNC4xMzQtLjU4NS4zMy0uOTcxIDEuMDI3LTEuMTgzIDMuMi0uOTczIDUuMjk1LTMuMTM1IDYuMjc4LTYuMzE3LjE5NS0uNjMuNTA5LS44NTkgMS4wOC0uOTg1IDEuNzc5LS4zOSAzLjU1Ny0uNzg1IDUuMzItMS4yMzcuMzktLjEuOTE1LS4wMSAxLjI0NC0uNTE3LTEuODEyLS40MzItMy41MjUtLjk1Mi01LjI3OC0xLjIyNW0tMTcuMTMgNC4xODhjLTEuMjY4LTIuMjY2LS45MTEtNS4xMzMuODA0LTcuMTE4IDEuODQ0LTIuMTM0IDQuNjczLTIuODQyIDcuNDE5LTEuNzQ4LTEuNjAyIDEuMzU2LTMuMjc5IDIuNTMyLTQuNjQyIDQtMS4zNDggMS40NTMtMi4zNzggMy4yMDEtMy41ODEgNC44NjZtMTAuODQ3IDEuMzA0Yy0xLjkwOSAyLjIyOS00LjMyMiAyLjgzNy03LjUxNiAxLjk5MSAzLjU3OC0yLjM4IDYuMzA0LTUuMjQ1IDguMjkzLTguODkyIDEuMTc0IDIuMjUuODQgNS4wMS0uNzc3IDYuOTAxIi8+PC9nPjwvZz48L3N2Zz4=";
},function(e,t){e.exports="data:image/svg+xml;base64, ";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMwMWFjY2EiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im00OS42MjEgNjAuMjljLjY2NC42OTIgMS40NjEgMS4yMzMgMi4zODggMS42Mi45MjcuMzg4IDEuOTMzLjU4MiAzLjAyLjU4MiAxLjA4NCAwIDIuMDgxLS4xOTQgMi45OTEtLjU4Mi45MS0uMzg3IDEuNjk3LS45MjggMi4zNjItMS42Mi42NjQtLjY5MSAxLjE4MS0xLjUxIDEuNTQ4LTIuNDU1LjM2Ny0uOTQ1LjU1MS0xLjk3NS41NTEtMy4wODh2LTIxLjY0M2gtMTQuOTU3djIxLjY0M2MwIDEuMTE0LjE4NCAyLjE0NC41NTEgMy4wODguMzY3Ljk0NS44ODMgMS43NjQgMS41NDggMi40NTVtMjcuMDUtMjcuMTloLTZ2MjEuOTQ3YzAgMi4xMjYtLjMzMyA0LjA4NC0uOTk3IDUuODcyLS42NjUgMS43ODktMS42NTMgMy4zNDItMi45NjUgNC42NTgtMS4zMTIgMS4zMTYtMi45NDggMi4zNDYtNC45MDcgMy4wODgtMS45Ni43NDItNC4yMTcgMS4xMTQtNi43NyAxLjExNC0yLjU5IDAtNC44NjQtLjM3Mi02LjgyMy0xLjExNC0xLjk2LS43NDItMy41OTUtMS43NzItNC45MDctMy4wODgtMS4zMTItMS4zMTYtMi4zMDEtMi44NjgtMi45NjUtNC42NTgtLjY2NS0xLjc4OC0uOTk3LTMuNzQ2LS45OTctNS44NzJ2LTIxLjk0N2gtNmMtNC42MDIgMC04LjMzMyAzLjcxNC04LjMzMyA4LjI5N3YyOC4yMWMwIDQuNTgyIDMuNzMxIDguMjk3IDguMzMzIDguMjk3aDQzLjMzYzQuNjAyIDAgOC4zMzMtMy43MTQgOC4zMzMtOC4yOTd2LTI4LjIxYzAtNC41ODItMy43MzEtOC4yOTctOC4zMzMtOC4yOTciIGZpbGw9IiMxZjFmMWYiLz48L2c+PC9zdmc+";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMwMGJkZjYiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im0yNC45MDMgNTYuMzN2MjAuMjI3bDI0LjYwOSAzLjQyNXYtMjMuNTUxbC0yNC42MDktLjEwMW0yNC42MDktMjYuMThsLTI0LjYwOSAzLjYxM3YxOS45OThsMjQuNjA5LS4xMDF2LTIzLjUwOW0zNS41NjMgMjMuMzYydi0yOC41ODNsLTMyLjY4NSA0Ljc5OXYyMy45MmwzMi42ODUtLjEzNW0tMzIuNjg1IDI2Ljg2OGwzMi42ODUgNC41NDh2LTI4LjM1NGwtMzIuNjg1LS4xMzV2MjMuOTQiIGZpbGw9IiMxZjFmMWYiLz48L2c+PC9zdmc+";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMzOTMiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im01NC44NjMgMjVjLTE2LjQ5MyAwLTI5Ljg2MyAxMy40MTUtMjkuODYzIDI5Ljk2MyAwIDE2LjU0OCAxMy4zNyAyOS45NjMgMjkuODYzIDI5Ljk2MyAxNi40OTMgMCAyOS44NjMtMTMuNDE1IDI5Ljg2My0yOS45NjMgMC0xNi41NDgtMTMuMzctMjkuOTYzLTI5Ljg2My0yOS45NjNtLTExLjY5MSAxMy45NzZjMCAwIDcuOTk0LTQuMzY0IDE0LjgzNC44OTRsLTMuODI3IDEzLjE5NmMwIDAtNC4yODMtMi45Ni03LjQ2NC0yLjY0MS0zLjE4MS4zMTktNy4zNyAxLjg0Ny03LjM3IDEuODQ3bDMuODI3LTEzLjI5Nm0tLjg0NyAyNy4yOGMtMy4wNTMuMjU1LTUuNy43MjItNy40NjIgMS42MzdsMy44MDctMTMuMjk0YzAgMCA0LjI5MS0yIDcuODUzLTEuNzQ3IDMuNTYyLjI1NSA2LjQwNyAyLjE3OSA3LjAyIDIuNjIxbC0zLjg2NyAxMy4zMzNjMCAwLTQuMjk4LTIuODA2LTcuMzUyLTIuNTUxbTI0LjI1IDQuNTk3YzAgMC00LjIxIDEuOTc3LTguMDMgMS43ODUtMy44MTctLjE5Mi02LjEwOS0yLjM4Mi02LjgwNy0yLjY1OWwzLjgwOC0xMy4yMTZjMCAwIDQuMDgxIDIuNjYzIDYuNzUzIDIuNTk5IDIuNjMyLS4wNjMgNC40NTMtLjI3MSA4LjAyLTEuNjc2LjAyLS4wMDguMDYyLS4wMzYuMDc2LS4wNDYgMCAwIC4wMDEtLjAwMS4wMDEtLjAwMi4wMDctLjAwNC4wMDUtLjAwMi0uMDAxLjAwMi0uMDkyLjEwMi0zLjgyNiAxMy4yMTItMy44MjYgMTMuMjEybTQuNDgxLTE1LjQ5OWMtLjU4LjE5NS0yLjk2NiAxLjU4My03LjM1NSAxLjgzOS00LjM4OS4yNTUtNy41MDYtMi44MDgtNy41MDYtMi44MDhsMy44MzctMTMuMTJjMS4xLjc5NCAzLjE2MSAyLjIwNiA2LjQ2OCAyLjU4OCAzLjMwOC4zODMgOC4zNjUtMS43MzUgOC4zNjUtMS43MzVsLTMuODA5IDEzLjIzNiIgZmlsbD0iIzFmMWYxZiIvPjwvZz48L3N2Zz4=";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMxMDdjMTAiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im0zOC4xIDI5Ljk4OWMtLjAzMS4wMjMtLjA1NC4wNTQtLjA4OS4wNzcuMTY5LS4xNzcuNDE0LS4zNjkuNTY5LS40NjkgNC42LTIuOTkxIDkuOTIzLTQuNTk3IDE1LjgyNi00LjU5NyA1LjUxNCAwIDEwLjY5NCAxLjUyOSAxNS4xIDQuMTc0LjMyMy4xODkgMS4xOTEuNzkxIDEuNjQgMS4zNC00LjI1NC00LjctMTYuNzc0IDUuMzc3LTE2Ljc3NCA1LjM3Ny00LjMzMS0zLjMzNy04LjMwNi01LjYxMS0xMS4yNzQtNi40MTctMi40NzctLjY4LTQuMTk0LS4xMjMtNSAuNTE0bTM3Ljg4IDQuNDQzYy0uMTM0LS4xNDYtLjI4LS4yOC0uNDExLS40MjYtMS4wNzEtMS4xODMtMi40LTEuNDcxLTMuNTgzLTEuMzk0LTEuMDk0LjM0Ni02LjEwNiAyLjE1NC0xMi4yODkgNy45OTEgMCAwIDYuOTU0IDYuNzYzIDExLjIxNyAxMy42ODMgNC4yNjMgNi45MiA2LjgwNiAxMi4zNTQgNS4yNDYgMTkuOSA0Ljc0My01LjIyMyA3LjY0My0xMi4xNTQgNy42NDMtMTkuNzc3IDAtNy43MTEtMi45NjktMTQuNzMxLTcuODIzLTE5Ljk3N20tMTAuNjI2IDIyLjgxMWMtMS44OTctMi4xMi00LjY5Ny01LjE1Ny04LjQxNC04Ljg1MS0uODAzLS44MDMtMS42NjMtMS42NC0yLjU2Ni0yLjUxMSAwIDAtMS4zNTEgMS4zNTEtMy4xMTQgMy4xMzctMi4yNjYgMi4yNzctNS4xOTEgNS4yNTctNi44MiA2Ljk4Ni0yLjg5MSAzLjA5MS0xMS4xODMgMTIuNzkxLTExLjY1MSAxOC4yMjYgMCAwLTEuODQzLTQuMzA2IDIuMjA5LTE0LjI1MSAyLjY0Ni02LjUwNiAxMC42MzctMTYuMjcxIDEzLjk3NC0xOS40NTQgMCAwLTMuMDQ2LTMuMzU3LTYuODc0LTUuNjY5bC0uMDIzLS4wMTFjMCAwLS4wNDYtLjAzNC0uMTExLS4wNzctMS44NDMtMS4wOTQtMy44NTEtMS45NDMtNS43ODMtMi4wNTQtMS45NzQuMTM0LTMuMjIzIDEuNTg2LTMuMjIzIDEuNTg2LTQuOTQ2IDUuMjU3LTcuOTYgMTIuMzMxLTcuOTYgMjAuMTEgMCAxNi4yMzcgMTMuMTcxIDI5LjQwOSAyOS40MDkgMjkuNDA5IDguNjE3IDAgMTYuMzc0LTMuNzE3IDIxLjc1NC05LjYyIDAtLjAxMS0uNjE0LTMuODk3LTQuNTc3LTkuNDU0LS45MjYtMS4zMDYtNC4zMzEtNS4zNjktNi4yMjktNy41IiBmaWxsPSIjMWYxZjFmIi8+PC9nPjwvc3ZnPg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cmVjdCB3aWR0aD0iNTYwIiBoZWlnaHQ9IjU2MCIgc3R5bGU9ImZpbGw6IzJmNDc0MSIvPgogPHBhdGggZD0ibTE0MCAyNDRjMC04LjI0MyA1LjgzMi0xNS4zNDcgMTQtMTYuNTE2bDI4LTMuNDgzaDE5NmwyOCAzLjQ4M2M4LjE4MyAxLjE2OSAxNCA4LjI4MSAxNCAxNi41MTZ2NzJjMCA4LjI0My01LjgzMiAxNS4zNDctMTQgMTYuNTE2bC0yOCAzLjQ4M2gtMTk2bC0yOC0zLjQ4M2MtOC4xODMtMS4xNjktMTQtOC4yODEtMTQtMTYuNTE2di03MiIgc3R5bGU9ImZpbGwtb3BhY2l0eTouMTQ5MDIiLz4KIDxwYXRoIGQ9Im0zNzggMzM2aC0xOTZsLTI4LTMuNDgzYy0uNTA2LS4wNzUtMS4wMS0uMTY4LTEuNTA2LS4yODgtMS4wODktLjI2MS0yLjE0OS0uNjM3LTMuMTU5LTEuMTItMi4xMzItMS4wMTgtNC4wMi0yLjUxNC01LjUyLTQuMzQtMS4yMzEtMS41MDItMi4xOTQtMy4yMi0yLjg0MS01LjA1LS40MzQtMS4yMzItLjcyNi0yLjUxMy0uODY5LTMuODExLS4wNjMtLjU2OS0uMTA0LTEuNzE0LS4xMDQtMS43MTR2LTcyLjM5YzAgMCAuMDQxLTEuMTQ2LjEwNC0xLjcxNi4xNDQtMS4yOTkuNDM2LTIuNTgxLjg3MS0zLjgxMi42NDgtMS44MzIgMS42MTItMy41NTEgMi44NDUtNS4wNSAxLjQ5OC0xLjgyNSAzLjM4OS0zLjMyIDUuNTE5LTQuMzM4IDEuMDEtLjQ4MiAyLjA2OS0uODU3IDMuMTU2LTEuMTE5LjQ5Ny0uMTE5Ljk5OS0uMjEyIDEuNTA0LS4yODdsMjgtMy40ODNoMTk2YzAgMCAxOC42NjcgMi4zMjIgMjggMy40ODMuNTA2LjA3NSAxLjAxLjE2OCAxLjUwNi4yODggMS4wODkuMjYxIDIuMTQ5LjYzNyAzLjE1OSAxLjEyIDIuMTMyIDEuMDE4IDQuMDIgMi41MTQgNS41MiA0LjM0IDEuMjMxIDEuNTAyIDIuMTk0IDMuMjIgMi44NDEgNS4wNS40MzQgMS4yMzIuNzI2IDIuNTEzLjg2OSAzLjgxMS4wNjMuNTY5LjEwNCAxLjcxNC4xMDQgMS43MTR2NzIuMzljMCAwLS4wNDEgMS4xNDYtLjEwNCAxLjcxNi0uMTQ0IDEuMjk5LS40MzYgMi41ODEtLjg3MSAzLjgxMi0uNjQ4IDEuODMyLTEuNjEyIDMuNTUxLTIuODQ1IDUuMDUtMS40OTggMS44MjUtMy4zODkgMy4zMi01LjUxOSA0LjMzOC0xLjAxLjQ4Mi0yLjA2OS44NTctMy4xNTYgMS4xMTktLjQ5Ny4xMTktLjk5OS4yMTItMS41MDQuMjg3bC0yOCAzLjQ4M20tLjU1OC0xMDNoLTE5NC44OGMtOS4xMjQgMS4xMzUtMTguMjc4IDIuMDUyLTI3LjM3MiAzLjQwNS0uMTEzLjAxOS0uMjI2LjAzOS0uMzM4LjA2MS0uNjQxLjEzNC0xLjI2LjM0OC0xLjg0MS42NS0uOTMxLjQ4Ni0xLjc0NSAxLjE4My0yLjM4NCAyLjAxLS40OTcuNjQ4LS44ODkgMS4zNzYtMS4xNjEgMi4xNDYtLjI5OS44NDYtLjQ2MSAyLjYyOS0uNDYxIDIuNjI5bC4wMDEgNzIuMjhjMCAwIC4xOTMgMS44MzQuNTE5IDIuNjk3LjI4Ny43NjIuNjkyIDEuNDc5IDEuMjAyIDIuMTE0LjY3MS44MzcgMS41MjQgMS41MjggMi40OTMgMS45OTEuNTk4LjI4NiAxLjIzMi40NzkgMS44ODQuNTkybC4wODcuMDE0LjAzMi4wMDQgMjcuMzM5IDMuNDAxaDE5NC44OGMwIDAgMTguMjc4LTIuMDUyIDI3LjM3MS0zLjQwNS42ODEtLjExIDEuMzQzLS4zMDcgMS45NjYtLjYwNCAxLjAyLS40ODggMS45MS0xLjIyNiAyLjU5OC0yLjEyMi40OC0uNjI1Ljg2MS0xLjMyNSAxLjEzMi0yLjA2NS4zMTctLjg2OS40OS0yLjcxLjQ5LTIuNzFsLS4wMDEtNzIuMjhjMCAwLS4xOTMtMS44MzQtLjUxOS0yLjY5OC0uMjg3LS43NjEtLjY5Mi0xLjQ3OC0xLjIwMS0yLjExMy0uNjU1LS44MTYtMS40ODItMS40OTQtMi40MjItMS45NTYtLjYxOS0uMzA1LTEuMjc4LS41MDktMS45NTYtLjYyN2wtLjA4Ni0uMDEzLS4wMzItLjAwNS0yNy4zNC0zLjQwMW0tMTMuNDQyIDM4YzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOW0tNDIgMGM0Ljk2NyAwIDkgNC4wMyA5IDkgMCA0Ljk2Ny00LjAzIDktOSA5LTQuOTY3IDAtOS00LjAzLTktOSAwLTQuOTY3IDQuMDMtOSA5LTltLTEyNiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOSIgc3R5bGU9ImZpbGw6IzkxYzUzYiIvPgo8L3N2Zz4K";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cmVjdCB3aWR0aD0iNTYwIiBoZWlnaHQ9IjU2MCIgc3R5bGU9ImZpbGw6IzQxNDEzZSIvPgogPHBhdGggZD0ibTg0IDI0NGMwLTguMjQzIDUuODMyLTE1LjM0NyAxNC0xNi41MTZsNTYtMy40ODNoMjUybDU2IDMuNDgzYzguMTgzIDEuMTY5IDE0IDguMjgxIDE0IDE2LjUxNnY3MmMwIDguMjQzLTUuODMyIDE1LjM0Ny0xNCAxNi41MTZsLTU2IDMuNDgzaC0yNTJsLTU2LTMuNDgzYy04LjE4My0xLjE2OS0xNC04LjI4MS0xNC0xNi41MTZ2LTcyIiBzdHlsZT0iZmlsbC1vcGFjaXR5Oi4xNDkwMiIvPgogPHBhdGggZD0ibTQwNiAzMzZoLTI1MmwtNTYtMy40ODNjLS41MDYtLjA3NS0xLjAxLS4xNjgtMS41MDYtLjI4OC0xLjA4OS0uMjYxLTIuMTQ5LS42MzctMy4xNTktMS4xMi0yLjEzMi0xLjAxOC00LjAyLTIuNTE0LTUuNTItNC4zNC0xLjIzMS0xLjUwMi0yLjE5NC0zLjIyLTIuODQxLTUuMDUtLjQzNC0xLjIzMi0uNzI2LTIuNTEzLS44NjktMy44MTEtLjA2My0uNTY5LS4xMDQtMS43MTQtLjEwNC0xLjcxNHYtNzIuMzljMCAwIC4wNDEtMS4xNDYuMTA0LTEuNzE2LjE0NC0xLjI5OS40MzYtMi41ODEuODcxLTMuODEyLjY0OC0xLjgzMiAxLjYxMi0zLjU1MSAyLjg0NS01LjA1IDEuNDk4LTEuODI1IDMuMzg5LTMuMzIgNS41MTktNC4zMzggMS4wMS0uNDgyIDIuMDY5LS44NTcgMy4xNTYtMS4xMTkuNDk3LS4xMTkuOTk5LS4yMTIgMS41MDQtLjI4N2w1Ni0zLjQ4M2gyNTJjMCAwIDM3LjMzIDIuMzIyIDU2IDMuNDgzLjUwNi4wNzUgMS4wMS4xNjggMS41MDYuMjg4IDEuMDg5LjI2MSAyLjE0OS42MzcgMy4xNTkgMS4xMiAyLjEzMiAxLjAxOCA0LjAyIDIuNTE0IDUuNTIgNC4zNCAxLjIzMSAxLjUwMiAyLjE5NCAzLjIyIDIuODQxIDUuMDUuNDM0IDEuMjMyLjcyNiAyLjUxMy44NjkgMy44MTEuMDYzLjU2OS4xMDQgMS43MTQuMTA0IDEuNzE0djcyLjM5YzAgMC0uMDQxIDEuMTQ2LS4xMDQgMS43MTYtLjE0NCAxLjI5OS0uNDM2IDIuNTgxLS44NzEgMy44MTItLjY0OCAxLjgzMi0xLjYxMiAzLjU1MS0yLjg0NSA1LjA1LTEuNDk4IDEuODI1LTMuMzg5IDMuMzItNS41MTkgNC4zMzgtMS4wMS40ODItMi4wNjkuODU3LTMuMTU2IDEuMTE5LS40OTcuMTE5LS45OTkuMjEyLTEuNTA0LjI4N2wtNTYgMy40ODNtLS4yOC0xMDNoLTI1MS40NGwtNTUuMjkgMy40MzljLS4xMDMuMDE5LS4yMDYuMDQtLjMwOC4wNjMtLjYwOC4xNDItMS4xOTUuMzU2LTEuNzQ1LjY1MS0uOTUxLjUxLTEuNzc2IDEuMjQxLTIuNDEzIDIuMTExLS40NTEuNjE0LS44MDggMS4yOTUtMS4wNjIgMi4wMS0uMjk5Ljg0NS0uNDYxIDIuNjI4LS40NjEgMi42Mjh2NzIuMjhjMCAwIC4xOTMgMS44MzQuNTE5IDIuNjk4LjI4Ny43NjEuNjkyIDEuNDc4IDEuMjAyIDIuMTEzLjY3MS44MzggMS41MjQgMS41MjggMi40OTMgMS45OTEuNTYzLjI2OSAxLjE2LjQ1OSAxLjc3NC41NzJsNTUuMjkgMy40MzloMjUxLjQ0bDU1LjI5LTMuNDM5Yy42MTItLjExMyAxLjIwNy0uMzAyIDEuNzY5LS41NyAxLjAyLS40ODggMS45MS0xLjIyNiAyLjU5OC0yLjEyMi40OC0uNjI1Ljg2MS0xLjMyNSAxLjEzMi0yLjA2NS4zMTctLjg2OS40OS0yLjcxLjQ5LTIuNzFsLS4wMDEtNzIuMjhjMCAwLS4xOTMtMS44MzQtLjUxOS0yLjY5OC0uMjg3LS43NjEtLjY5Mi0xLjQ3OC0xLjIwMS0yLjExMy0uNjcyLS44MzgtMS41MjUtMS41MjgtMi40OTUtMS45OTItLjU2My0uMjY5LTEuMTYtLjQ1OC0xLjc3My0uNTcxbC01NS4yOS0zLjQzOW0tNDEuNzIgMzhjNC45NjcgMCA5IDQuMDMgOSA5IDAgNC45NjctNC4wMyA5LTkgOS00Ljk2NyAwLTktNC4wMy05LTkgMC00Ljk2NyA0LjAzLTkgOS05bS00MiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOW0tNDIgMGM0Ljk2NyAwIDkgNC4wMyA5IDkgMCA0Ljk2Ny00LjAzIDktOSA5LTQuOTY3IDAtOS00LjAzLTktOSAwLTQuOTY3IDQuMDMtOSA5LTltLTg0IDBjNC45NjcgMCA5IDQuMDMgOSA5IDAgNC45NjctNC4wMyA5LTkgOS00Ljk2NyAwLTktNC4wMy05LTkgMC00Ljk2NyA0LjAzLTkgOS05bS00MiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOSIgc3R5bGU9ImZpbGw6I2Y3OTQxZSIvPgo8L3N2Zz4K";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cmVjdCB3aWR0aD0iNTYwIiBoZWlnaHQ9IjU2MCIgc3R5bGU9ImZpbGw6IzFlNDI1NCIvPgogPHBhdGggZD0ibTQyMCAyMzhjMC03LjcyNi02LjI3NS0xNC0xNC0xNGgtMjUyYy03LjcyNyAwLTE0IDYuMjc0LTE0IDE0djg0YzAgNy43MjcgNi4yNzMgMTQgMTQgMTRoMjUyYzcuNzI2IDAgMTQtNi4yNzMgMTQtMTR2LTg0IiBzdHlsZT0iZmlsbC1vcGFjaXR5Oi4xNDkwMiIvPgogPHBhdGggZD0ibTQwNi4xOCAyMjRjMCAwIC45NTIuMDM2IDEuNDI2LjA5IDEuMDM2LjExOSAyLjA1OS4zNTQgMy4wNDMuNzAxIDEuOTE2LjY3NSAzLjY3NSAxLjc3NCA1LjEyOCAzLjE5MiAxLjQ5MiAxLjQ1OCAyLjY1NCAzLjI0NiAzLjM3MiA1LjIwNC4zNTguOTc4LjYwNiAxLjk5Ny43MzcgMy4wMy4wNjguNTMyLjExMiAxLjYwMS4xMTIgMS42MDF2ODQuMzZjMCAwLS4wNDQgMS4wNjktLjExMiAxLjYwMS0uMTMxIDEuMDMzLS4zNzkgMi4wNTItLjczNyAzLjAzLS43MTggMS45NTgtMS44OCAzLjc0Ni0zLjM3MiA1LjIwNC0xLjQ1MyAxLjQxOC0zLjIxMiAyLjUxNy01LjEyOCAzLjE5Mi0uOTg0LjM0Ny0yLjAxLjU4Mi0zLjA0My43MDEtLjQ3NC4wNTQtMS40MjYuMDktMS40MjYuMDloLTI1Mi4zNmMwIDAtLjk1Mi0uMDM2LTEuNDI2LS4wOS0xLjAzNi0uMTE5LTIuMDU5LS4zNTQtMy4wNDMtLjcwMS0xLjkxNi0uNjc1LTMuNjc1LTEuNzc0LTUuMTI4LTMuMTkyLTEuNDkyLTEuNDU4LTIuNjU0LTMuMjQ2LTMuMzcyLTUuMjA0LS4zNTgtLjk3OC0uNjA2LTEuOTk3LS43MzctMy4wMy0uMDY4LS41MzItLjExMi0xLjYwMS0uMTEyLTEuNjAxdi04NC4zNmMwIDAgLjA0NC0xLjA2OS4xMTItMS42MDEuMTMxLTEuMDMzLjM3OS0yLjA1Mi43MzctMy4wMy43MTgtMS45NTggMS44OC0zLjc0NiAzLjM3Mi01LjIwNCAxLjQ1My0xLjQxOCAzLjIxMi0yLjUxNyA1LjEyOC0zLjE5Mi45ODQtLjM0NyAyLjAxLS41ODIgMy4wNDMtLjcwMS40NzQtLjA1NCAxLjQyNi0uMDkgMS40MjYtLjA5aDI1Mi4zNm0tMjUyLjE1IDguOTk5YzAgMC0uNDA4LjAxLS42MTEuMDMzLS40MDYuMDQ3LS44MDYuMTQ0LTEuMTg4LjI4OS0xLjM0NC41MTEtMi40MzQgMS42MTQtMi45MjggMi45NjMtLjE5NC41MjktLjMgMS42NDgtLjMgMS42NDhsLjAwMSA4NC4yYzAgMCAuMTEyIDEuMDc0LjI5OSAxLjU4Mi40OTQgMS4zNDkgMS41ODQgMi40NTIgMi45MjggMi45NjMuNTI0LjIgMS42MzguMzIgMS42MzguMzJoMjUyLjI3YzAgMCAxLjExNC0uMTIgMS42MzktLjMyIDEuMzQzLS41MTEgMi40MzMtMS42MTQgMi45MjctMi45NjMuMTg2LS41MDguMjk5LTEuNTgyLjI5OS0xLjU4MnYtODQuMjdjMCAwLS4xMi0xLjExNC0uMzItMS42MzgtLjUxMS0xLjM0NC0xLjYxNC0yLjQzNC0yLjk2My0yLjkyOC0uNTA4LS4xODctMS41ODItLjI5OS0xLjU4Mi0uMjk5bC0yNTIuMS0uMDAybTEwMS43MSA2My40MmgtNi45NjN2LTMyLjgzOGg2Ljk2M3YxMi44N2gxMy4wMXYtMTIuODdoNi45NDF2MzIuODM4aC02Ljk0MXYtMTQuMTczaC0xMy4wMXYxNC4xNzNtMzcuNTMyIDBoLTkuMjk4di0zMi44MzhoMTAuMzA5YzUuMzYxIDAgOS41MjQgMS40MTUgMTIuNDg4IDQuMjQ1IDIuOTY1IDIuODMgNC40NDggNi43ODMgNC40NDggMTEuODYgMCA1LjQwNS0xLjUzOSA5LjU0NS00LjYxNiAxMi40Mi0zLjA3NyAyLjg3NS03LjUyIDQuMzEzLTEzLjMzMSA0LjMxM20xLjM3MS0yNy4xM2gtMy43MDd2MjEuMzgzaDIuOTg4YzYuNzA4IDAgMTAuMDYtMy42MDEgMTAuMDYtMTAuODA0IDAtNy4wNS0zLjExNC0xMC41NzktOS4zNDMtMTAuNTc5IiBzdHlsZT0iZmlsbDojMzFhZmMwIi8+Cjwvc3ZnPgo=";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cmVjdCB3aWR0aD0iNTYwIiBoZWlnaHQ9IjU2MCIgc3R5bGU9ImZpbGw6IzJmMzM0ZCIvPgogPHBhdGggZD0ibTg0IDI0NGMwLTguMjQzIDUuODMyLTE1LjM0NyAxNC0xNi41MTZsNTYtMy40ODNoMjUybDU2IDMuNDgzYzguMTgzIDEuMTY5IDE0IDguMjgxIDE0IDE2LjUxNnY3MmMwIDguMjQzLTUuODMyIDE1LjM0Ny0xNCAxNi41MTZsLTU2IDMuNDgzaC0yNTJsLTU2LTMuNDgzYy04LjE4My0xLjE2OS0xNC04LjI4MS0xNC0xNi41MTZ2LTcyIiBzdHlsZT0iZmlsbC1vcGFjaXR5Oi4xNDkwMiIvPgogPHBhdGggZD0ibTQwNiAzMzZoLTI1MmwtNTYtMy40ODNjLS41MDYtLjA3NS0xLjAxLS4xNjgtMS41MDYtLjI4OC0xLjA4OS0uMjYxLTIuMTQ5LS42MzctMy4xNTktMS4xMi0yLjEzMi0xLjAxOC00LjAyLTIuNTE0LTUuNTItNC4zNC0xLjIzMS0xLjUwMi0yLjE5NC0zLjIyLTIuODQxLTUuMDUtLjQzNC0xLjIzMi0uNzI2LTIuNTEzLS44NjktMy44MTEtLjA2My0uNTY5LS4xMDQtMS43MTQtLjEwNC0xLjcxNHYtNzIuMzljMCAwIC4wNDEtMS4xNDYuMTA0LTEuNzE2LjE0NC0xLjI5OS40MzYtMi41ODEuODcxLTMuODEyLjY0OC0xLjgzMiAxLjYxMi0zLjU1MSAyLjg0NS01LjA1IDEuNDk4LTEuODI1IDMuMzg5LTMuMzIgNS41MTktNC4zMzggMS4wMS0uNDgyIDIuMDY5LS44NTcgMy4xNTYtMS4xMTkuNDk3LS4xMTkuOTk5LS4yMTIgMS41MDQtLjI4N2w1Ni0zLjQ4M2gyNTJjMCAwIDM3LjMzIDIuMzIyIDU2IDMuNDgzLjUwNi4wNzUgMS4wMS4xNjggMS41MDYuMjg4IDEuMDg5LjI2MSAyLjE0OS42MzcgMy4xNTkgMS4xMiAyLjEzMiAxLjAxOCA0LjAyIDIuNTE0IDUuNTIgNC4zNCAxLjIzMSAxLjUwMiAyLjE5NCAzLjIyIDIuODQxIDUuMDUuNDM0IDEuMjMyLjcyNiAyLjUxMy44NjkgMy44MTEuMDYzLjU2OS4xMDQgMS43MTQuMTA0IDEuNzE0djcyLjM5YzAgMC0uMDQxIDEuMTQ2LS4xMDQgMS43MTYtLjE0NCAxLjI5OS0uNDM2IDIuNTgxLS44NzEgMy44MTItLjY0OCAxLjgzMi0xLjYxMiAzLjU1MS0yLjg0NSA1LjA1LTEuNDk4IDEuODI1LTMuMzg5IDMuMzItNS41MTkgNC4zMzgtMS4wMS40ODItMi4wNjkuODU3LTMuMTU2IDEuMTE5LS40OTcuMTE5LS45OTkuMjEyLTEuNTA0LjI4N2wtNTYgMy40ODNtLS4yOC0xMDNoLTI1MS40NGwtNTUuMjkgMy40MzljLS4xMDMuMDE5LS4yMDYuMDQtLjMwOC4wNjMtLjYwOC4xNDItMS4xOTUuMzU2LTEuNzQ1LjY1MS0uOTUxLjUxLTEuNzc2IDEuMjQxLTIuNDEzIDIuMTExLS40NTEuNjE0LS44MDggMS4yOTUtMS4wNjIgMi4wMS0uMjk5Ljg0NS0uNDYxIDIuNjI4LS40NjEgMi42Mjh2NzIuMjhjMCAwIC4xOTMgMS44MzQuNTE5IDIuNjk4LjI4Ny43NjEuNjkyIDEuNDc4IDEuMjAyIDIuMTEzLjY3MS44MzggMS41MjQgMS41MjggMi40OTMgMS45OTEuNTYzLjI2OSAxLjE2LjQ1OSAxLjc3NC41NzJsNTUuMjkgMy40MzloMjUxLjQ0bDU1LjI5LTMuNDM5Yy42MTItLjExMyAxLjIwNy0uMzAyIDEuNzY5LS41NyAxLjAyLS40ODggMS45MS0xLjIyNiAyLjU5OC0yLjEyMi40OC0uNjI1Ljg2MS0xLjMyNSAxLjEzMi0yLjA2NS4zMTctLjg2OS40OS0yLjcxLjQ5LTIuNzFsLS4wMDEtNzIuMjhjMCAwLS4xOTMtMS44MzQtLjUxOS0yLjY5OC0uMjg3LS43NjEtLjY5Mi0xLjQ3OC0xLjIwMS0yLjExMy0uNjcyLS44MzgtMS41MjUtMS41MjgtMi40OTUtMS45OTItLjU2My0uMjY5LTEuMTYtLjQ1OC0xLjc3My0uNTcxbC01NS4yOS0zLjQzOW0tNDEuNzIgMzhjNC45NjcgMCA5IDQuMDMgOSA5IDAgNC45NjctNC4wMyA5LTkgOS00Ljk2NyAwLTktNC4wMy05LTkgMC00Ljk2NyA0LjAzLTkgOS05bS00MiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOW0tNDIgMGM0Ljk2NyAwIDkgNC4wMyA5IDkgMCA0Ljk2Ny00LjAzIDktOSA5LTQuOTY3IDAtOS00LjAzLTktOSAwLTQuOTY3IDQuMDMtOSA5LTltLTg0IDBjNC45NjcgMCA5IDQuMDMgOSA5IDAgNC45NjctNC4wMyA5LTkgOS00Ljk2NyAwLTktNC4wMy05LTkgMC00Ljk2NyA0LjAzLTkgOS05bS00MiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOSIgc3R5bGU9ImZpbGw6Izk0NTA4ZCIvPgo8L3N2Zz4K";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTQ4IiBoZWlnaHQ9IjM2MCIgdmlld0JveD0iMCAwIDU0OCAzNjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjx0aXRsZT5Hcm91cDwvdGl0bGU+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0xOTYgMTczdjEzSDgxdi0xNCIvPjxtYXNrIGlkPSJqIiB4PSIwIiB5PSIwIiB3aWR0aD0iMTE1IiBoZWlnaHQ9IjE0IiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik02LjUyMiAxNzNDMi45MiAxNzMgMCAxNzAuNjMxIDAgMTY3LjcxVjUuMjlDMCAyLjM3IDIuOTIgMCA2LjUyMiAwaDI2Mi45NTZDMjczLjA4IDAgMjc2IDIuMzY5IDI3NiA1LjI5djE2Mi40MmMwIDIuOTIxLTIuOTIgNS4yOS02LjUyMiA1LjI5SDYuNTIyeiIgaWQ9ImIiLz48bWFzayBpZD0iayIgeD0iMCIgeT0iMCIgd2lkdGg9IjI3NiIgaGVpZ2h0PSIxNzMiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2IiLz48L21hc2s+PHBhdGggaWQ9ImMiIGQ9Ik0xMyAxNjAuMTg1aDI0OS45MVYxM0gxM3oiLz48bWFzayBpZD0ibCIgeD0iMCIgeT0iMCIgd2lkdGg9IjI0OS45MTEiIGhlaWdodD0iMTQ3LjE4NSIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYyIvPjwvbWFzaz48cmVjdCBpZD0iZCIgd2lkdGg9IjE5MiIgaGVpZ2h0PSIxNDAiIHJ4PSI2Ii8+PG1hc2sgaWQ9Im0iIHg9IjAiIHk9IjAiIHdpZHRoPSIxOTIiIGhlaWdodD0iMTQwIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNkIi8+PC9tYXNrPjxwYXRoIGlkPSJlIiBkPSJNMjAgMTFoMTUydjExOEgyMHoiLz48bWFzayBpZD0ibiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE1MiIgaGVpZ2h0PSIxMTgiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2UiLz48L21hc2s+PGNpcmNsZSBpZD0iZiIgY3g9IjEyIiBjeT0iNzAiIHI9IjYiLz48bWFzayBpZD0ibyIgeD0iMCIgeT0iMCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEyIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNmIi8+PC9tYXNrPjxwYXRoIGlkPSJnIiBkPSJNMCAxOGg3MnY4NEgweiIvPjxtYXNrIGlkPSJwIiB4PSIwIiB5PSIwIiB3aWR0aD0iNzIiIGhlaWdodD0iODQiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2ciLz48L21hc2s+PGNpcmNsZSBpZD0iaCIgY3g9IjM2IiBjeT0iMTA5IiByPSI1Ii8+PG1hc2sgaWQ9InEiIHg9IjAiIHk9IjAiIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjaCIvPjwvbWFzaz48cmVjdCBpZD0iaSIgd2lkdGg9IjcyIiBoZWlnaHQ9IjEyMCIgcng9IjguNCIvPjxtYXNrIGlkPSJyIiB4PSIwIiB5PSIwIiB3aWR0aD0iNzIiIGhlaWdodD0iMTIwIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNpIi8+PC9tYXNrPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI3MiA4NykiPjx1c2Ugc3Ryb2tlPSIjQkJCIiBtYXNrPSJ1cmwoI2opIiBzdHJva2Utd2lkdGg9IjYiIHhsaW5rOmhyZWY9IiNhIi8+PHVzZSBzdHJva2U9IiNCQkIiIG1hc2s9InVybCgjaykiIHN0cm9rZS13aWR0aD0iNiIgeGxpbms6aHJlZj0iI2IiLz48dXNlIHN0cm9rZT0iI0JCQiIgbWFzaz0idXJsKCNsKSIgc3Ryb2tlLXdpZHRoPSI0IiB4bGluazpocmVmPSIjYyIvPjxwYXRoIGZpbGw9IiNGOEFEMTgiIGQ9Ik0xMzcuMDQyIDEyMC43NUgxMTdsMjIuMTktMzQuMzc1TDExNyA1MmgyMC4wNDJsMjIuMTkgMzQuMzc1eiIvPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDIyMCkiPjx1c2Ugc3Ryb2tlPSIjQkJCIiBtYXNrPSJ1cmwoI20pIiBzdHJva2Utd2lkdGg9IjYiIHhsaW5rOmhyZWY9IiNkIi8+PHVzZSBzdHJva2U9IiNCQkIiIG1hc2s9InVybCgjbikiIHN0cm9rZS13aWR0aD0iNCIgeGxpbms6aHJlZj0iI2UiLz48dXNlIHN0cm9rZT0iI0JCQiIgbWFzaz0idXJsKCNvKSIgc3Ryb2tlLXdpZHRoPSI0IiB4bGluazpocmVmPSIjZiIvPjxjaXJjbGUgZmlsbD0iI0JCQiIgY3g9IjE4MCIgY3k9IjcwIiByPSIyIi8+PHBhdGggZmlsbD0iI0Y4QUQxOCIgZD0iTTk0LjU4IDEwMkg3NmwyMC42NDUtMzAuOTY4TDc2IDM4aDE4LjU4bDIwLjY0NiAzMy4wMzJ6Ii8+PC9nPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDYwKSI+PHJlY3Qgd2lkdGg9IjcyIiBoZWlnaHQ9IjEyMCIgcng9IjguNCIvPjx1c2Ugc3Ryb2tlPSIjQkJCIiBtYXNrPSJ1cmwoI3ApIiBzdHJva2Utd2lkdGg9IjQiIHhsaW5rOmhyZWY9IiNnIi8+PHVzZSBzdHJva2U9IiNCQkIiIG1hc2s9InVybCgjcSkiIHN0cm9rZS13aWR0aD0iNCIgeGxpbms6aHJlZj0iI2giLz48cmVjdCBmaWxsPSIjQkJCIiB4PSIzMSIgeT0iMTAiIHdpZHRoPSIxMC44IiBoZWlnaHQ9IjIuNCIgcng9IjEuMiIvPjx1c2Ugc3Ryb2tlPSIjQkJCIiBtYXNrPSJ1cmwoI3IpIiBzdHJva2Utd2lkdGg9IjYiIHhsaW5rOmhyZWY9IiNpIi8+PHBhdGggZD0iTTM1LjAzMiA3OUgyNGwxMi4yNTgtMTguMzg3TDI0IDQxaDExLjAzMkw0Ny4yOSA2MC42MTN6IiBmaWxsPSIjRjhBRDE4Ii8+PC9nPjwvZz48L3N2Zz4=";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODEwIiBoZWlnaHQ9IjIzMCIgdmlld0JveD0iMCAwIDgxMCAyMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjx0aXRsZT5QTVMg4oaSIENvbXB1dGVyPC90aXRsZT48ZGVmcz48cGF0aCBkPSJNMTU5LjU5NSAyMDcuNDc3Yy0uNDk0LTIuNDctMi42NS05LjczMi0zLjM0Ny0yMS40NDRIOTkuMzZjLS42OTggMTEuNzEyLTIuODUzIDE4Ljk3NC0zLjM0NiAyMS40NDQtLjk3NiA0Ljg4LTQuNzkgOC44MjktMTIuMDQgMTEuMDU5LTUuOTEyIDEuODE5LTUuMTU4IDEwLjY5MyAxLjY3NCAxMC42OTNoODQuMzE0YzYuODMxIDAgNy41ODctOC44NzMgMS42NzMtMTAuNjkzLTcuMjUtMi4yMy0xMS4wNjQtNi4xNzgtMTIuMDQtMTEuMDU5eiIgaWQ9ImEiLz48bWFzayBpZD0iZCIgeD0iMCIgeT0iMCIgd2lkdGg9Ijk1LjYzMyIgaGVpZ2h0PSI0My4xOTYiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTI1NiAxNDcuNXYzMS41NjRjMCA1LjUyNy00LjQ3IDEwLjAwOC05Ljk5NiAxMC4wMDhIOS45OTZjLTUuNTIgMC05Ljk5Ni00LjQ3Ni05Ljk5Ni0xMC4wMDhWMTAuMDAzQzAgNC40OCA0LjQ3IDAgOS45OTYgMGgyMzYuMDA4QzI1MS41MjQgMCAyNTYgNC40ODUgMjU2IDEwLjAwM1YxNDcuNXoiIGlkPSJiIi8+PG1hc2sgaWQ9ImUiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNTYiIGhlaWdodD0iMTg5LjA3MiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYiIvPjwvbWFzaz48Y2lyY2xlIGlkPSJjIiBjeD0iMTEwIiBjeT0iMTEwIiByPSIxMTAiLz48bWFzayBpZD0iZiIgeD0iMCIgeT0iMCIgd2lkdGg9IjIyMCIgaGVpZ2h0PSIyMjAiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2MiLz48L21hc2s+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTUzKSIgc3Ryb2tlPSIjQkJCIj48dXNlIG1hc2s9InVybCgjZCkiIHN0cm9rZS13aWR0aD0iNiIgeGxpbms6aHJlZj0iI2EiLz48dXNlIG1hc2s9InVybCgjZSkiIHN0cm9rZS13aWR0aD0iNiIgeGxpbms6aHJlZj0iI2IiLz48cGF0aCBkPSJNMS41IDE0Ny41aDI1My4xOTgiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIvPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDUpIj48dXNlIHN0cm9rZT0iI0Y4QUQxOCIgbWFzaz0idXJsKCNmKSIgc3Ryb2tlLXdpZHRoPSI4IiBmaWxsPSIjMUYxRjFGIiB4bGluazpocmVmPSIjYyIvPjxwYXRoIGZpbGw9IiNGOEFEMTgiIGQ9Ik0xMTIuMTM0IDE3OS42NjdINzIuMTFsNDQuMzEtNjkuMDU2LTQ0LjMxLTY5LjA1NWg0MC4wMjNsNDQuMzEgNjkuMDU1eiIvPjwvZz48ZyBmaWxsPSIjQkJCIj48cGF0aCBkPSJNNTA0LjUgMTE1bC0xNCAxMy41di0yN3pNNDc5IDExOGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnptLTE2IDBhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0tMTYgMGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnptLTE2IDBhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0tMTYgMGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnptLTE2IDBhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0tMTYgMGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnptLTE2IDBhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0tMTYgMGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnoiLz48L2c+PC9nPjwvc3ZnPg==";
},function(e,t){e.exports="data:image/svg+xml;base64, ";
},function(e,t){e.exports="data:image/svg+xml;base64, ";
},function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0ZWQgYnkgSWNvTW9vbi5pbyAtLT4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxMDI0IiBoZWlnaHQ9IjEwMjQiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPgo8ZyBpZD0iaWNvbW9vbi1pZ25vcmUiPgo8L2c+CjxwYXRoIGZpbGw9IiNlZWUiIGQ9Ik00OTcuNCA5MTAuNmMtMTMzLTQuNC0yMzcuNy0xMTYuMi0yMzMuNC0yNDkuMiA0LjQtMTMzLjEgMTE2LjItMjM3LjcgMjQ5LjItMjMzLjRzMjM3LjcgMTE2LjIgMjMzLjQgMjQ5LjJjLTQuNCAxMzMuMS0xMTYuMiAyMzcuOC0yNDkuMiAyMzMuNHpNNTExLjggNDcxLjljLTEwOC45LTMuNi0yMDAuMyA4Mi4xLTIwMy45IDE5MXM4Mi4xIDIwMC4zIDE5MC45IDIwMy45YzEwOC45IDMuNiAyMDAuMy04Mi4xIDIwMy45LTE5MC45cy04Mi4xLTIwMC40LTE5MC45LTIwNHoiPjwvcGF0aD4KPHBhdGggZmlsbD0iI2VlZSIgZD0iTTE4OS41IDY3Ni4yYy05LjYtMC4zLTg4LjItNC41LTEzOS44LTU4LjgtMzAuNi0zMi4yLTQ1LjMtNzQuOC00My42LTEyNi43IDEuOC01NC4yIDI3LjYtMTA0LjEgNzAuOC0xMzYuOSAzNi43LTI3LjkgODEuNy00MC4yIDEyNy4yLTM1LjYgMjUuOC0xNTQuNCAxNjIuNi0yNjguMiAzMjEuNC0yNjMgMTE2LjQgMy44IDIyMi4yIDcyLjkgMjczLjIgMTc3LjMgNTguMSAzLjIgMTExLjkgMjcuNiAxNTIuNyA2OS42IDQ0LjMgNDUuNiA2Ny42IDEwNS43IDY1LjUgMTY5LjItNS43IDE3MS43LTE1NC44IDIxMy43LTIwMC40IDIyMi41LTEyIDIuMy0yMy40LTUuNS0yNS43LTE3LjRzNS41LTIzLjQgMTcuNC0yNS43YzQ4LTkuMyAxNjAuMy00NS40IDE2NC43LTE4MC44IDEuNy01MS41LTE3LjItMTAwLjItNTMuMS0xMzcuMi0zNS43LTM2LjctODQtNTctMTM1LjMtNTYuNy05LjEgMC0xNi44LTUuMi0yMC4yLTEzLjItNDEuNy05Ni0xMzYtMTYwLjMtMjQwLjMtMTYzLjgtMTQzLjUtNC43LTI2Ni4yIDEwMy42LTI3OS4zIDI0Ni42LTAuNiA2LjQtMy45IDEyLjEtOS4xIDE1LjhzLTExLjggNS0xOCAzLjVjLTM5LjgtOS42LTgxLjYtMS0xMTQuMiAyMy44cy01Mi4xIDYyLjUtNTMuNCAxMDMuNGMtMS4zIDM5LjYgOS4yIDcxLjUgMzEuMyA5NC45IDQwLjkgNDMuMiAxMDcuMyA0NS4xIDEwOS45IDQ1LjMgMCAwIDAuMSAwIDAuMSAwIDEyLjEgMC40IDIxLjYgMTAuNCAyMS4zIDIyLjQtMC4yIDEyLjEtMTAuMiAyMS43LTIyLjMgMjEuNS0wLjEgMC0wLjQgMC0wLjggMHoiPjwvcGF0aD4KPHBhdGggZmlsbD0iI2VlZSIgZD0iTTUxMi41IDU0My40aC03My45bDczLjkgMTI3LjQtNzMuOSAxMjcuNGg3My45bDczLjktMTI3LjQtNzMuOS0xMjcuNHoiPjwvcGF0aD4KPC9zdmc+Cg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cGF0aCBkPSJtMjgwIDU2MGMtMTU0LjM1IDAtMjgwLTEyNS42NS0yODAtMjgwIDAtMTU0LjM1IDEyNS42NS0yODAgMjgwLTI4MCAxNTQuMzUgMCAyODAgMTI1LjY1IDI4MCAyODAgMCAxNTQuMzUtMTI1LjQ2IDI4MC0yODAgMjgwbTAtNTQ3LjczYy0xNDcuNjIgMC0yNjcuNTMgMTIwLjExLTI2Ny41MyAyNjcuNTMgMCAxNDcuNjIgMTIwLjExIDI2Ny41MyAyNjcuNTMgMjY3LjUzIDE0Ny40MiAwIDI2Ny41My0xMjAuMTEgMjY3LjUzLTI2Ny41My4xOTgtMTQ3LjQyLTExOS45MS0yNjcuNTMtMjY3LjUzLTI2Ny41M20tMTIuNjUgMzU3LjczbC02MS41IDQ4LjZjLTEuMi45LTIuNyAxLjQtNC4xIDEuNC0xIDAtMi0uMi0yLjktLjctMi4zLTEuMS0zLjgtMy40LTMuOC02di00My4zaC0zNi43Yy0xMSAwLTIwLTktMjAtMjB2LTE1MGMwLTExIDktMjAgMjAtMjBoMjQzLjNjMTEgMCAyMCA5IDIwIDIwdjE1MGMwIDExLTkgMjAtMjAgMjBoLTEzNC4zbTEzNC40LTE3Ni43aC0yNDMuNGMtMy43IDAtNi43IDMtNi43IDYuN3YxNTBjMCAzLjcgMyA2LjcgNi43IDYuN2g0My40YzMuNyAwIDYuNyAzIDYuNyA2Ljd2MzYuMmw1Mi41LTQxLjVjMS4yLS45IDIuNi0xLjQgNC4xLTEuNGgxMzYuN2MzLjcgMCA2LjctMyA2LjctNi43di0xNTBjMC0zLjctMy02LjctNi43LTYuN20tNDMuNCAxMDcuOGgtMTUwYy0zLjcgMC02LjctMy02LjctNi43IDAtMy43IDMtNi43IDYuNy02LjdoMTUwYzMuNyAwIDYuNyAzIDYuNyA2LjcgMCAzLjctMi45OTkgNi42OTktNi43IDYuN20wLTQxLjFoLTE1MGMtMy43IDAtNi43LTMtNi43LTYuNyAwLTMuNyAzLTYuNyA2LjctNi43aDE1MGMzLjcgMCA2LjcgMyA2LjcgNi43IDAgMy43LTIuOTk5IDYuNjk5LTYuNyA2LjciIHN0eWxlPSJmaWxsOiNjYzdiMTk7ZmlsbC1ydWxlOm5vbnplcm8iLz4KPC9zdmc+Cg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NC4zNDYgMC0yODAtMTI1LjY1My0yODAtMjgwIDAtMTU0LjM0NyAxMjUuNjUzLTI4MCAyODAtMjgwIDE1NC4zNDYgMCAyODAgMTI1LjY1MyAyODAgMjgwIDAgMTU0LjM0Ny0xMjUuNjUzIDI4MC0yODAgMjgwbTAtNTQ3LjUzM2MtMTQ3LjYxOSAwLTI2Ny41MzQgMTIwLjExMy0yNjcuNTM0IDI2Ny41MzQgMCAxNDcuNjE4IDEyMC4xMTMgMjY3LjUzMyAyNjcuNTM0IDI2Ny41MzMgMTQ3LjQyMSAwIDI2Ny41MzQtMTIwLjExMyAyNjcuNTM0LTI2Ny41MzMgMC0xNDcuNjE5LTExOS45MTUtMjY3LjUzNC0yNjcuNTM0LTI2Ny41MzRtNzcuMTI5IDM3Ni44NDljMC0xOC43ODUtMzUuNjA0LTMzLjk5My03OS40MzgtMzMuOTkzLTQzLjgzNSAwLTc5LjQzOCAxNS4yMDctNzkuNDM4IDMzLjk5MyAwIDE4Ljc4NiAzNS40MjQgMzMuOTk0IDc5LjQzOCAzMy45OTQgNDMuODMzIDAgNzkuNDM4LTE1LjIwNyA3OS40MzgtMzMuOTk0bTExLjQ1LTE0MS42OTljMC01MC4wOTYtNDAuNjE0LTkwLjcwOS05MC43MDktOTAuNzA5LTUwLjA5NiAwLTkwLjcwOSA0MC42MTMtOTAuNzA5IDkwLjcwOSAwIDUwLjA5NSA0MC42MTMgOTAuNzA5IDkwLjcwOSA5MC43MDkgNDkuOTE3IDAgOTAuNzA5LTQwLjYxNCA5MC43MDktOTAuNzA5bTIyLjU0My04NS4xNjNjMC0xMi41MjQtMTAuMTk4LTIyLjcyMy0yMi43MjItMjIuNzIzLTEyLjUyNCAwLTIyLjcyMiAxMC4xOTktMjIuNzIyIDIyLjcyMyAwIDEyLjUyNCAxMC4xOTggMjIuNzIyIDIyLjcyMiAyMi43MjIgMTIuNzAzIDAgMjIuNzIyLTEwLjE5OCAyMi43MjItMjIuNzIyIi8+Cjwvc3ZnPgo=";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NCAwLTI4MC0xMjYtMjgwLTI4MCAwLTE1NCAxMjYtMjgwIDI4MC0yODAgMTU0IDAgMjgwIDEyNiAyODAgMjgwIDAgMTU0LTEyNiAyODAtMjgwIDI4MG0wLTU0Ny44N2MtMTQ3LjQ3IDAtMjY3Ljg3IDEyMC40LTI2Ny44NyAyNjcuODcgMCAxNDcuNDcgMTIwLjQgMjY3Ljg3IDI2Ny44NyAyNjcuODcgMTQ3LjQ3IDAgMjY3Ljg3LTEyMC40IDI2Ny44Ny0yNjcuODctLjkzMy0xNDcuNDctMTIwLjQtMjY3Ljg3LTI2Ny44Ny0yNjcuODdtLTI4LjM0IDQwMy44N2gtODkuNzVsLTIuMjk2LS40NTdjLTEuOTMzLTEuMjkxLTEuOTU2LTEuMzE0LTMuMjQ3LTMuMjQ3bC0uNDU3LTIuMjk2di0xMTcuODloLTMwLjkwN2MtLjc2NC0uMTUyLTEuNTczLS4xNTgtMi4yOTMtLjQ1NS0uNzItLjI5OC0xLjM5My0uNzQ3LTEuOTQ1LTEuMjk3LTEuMTI0LTEuMTIzLTEuNzU4LTIuNjQ1LTEuNzYyLTQuMjM0LS4wMDItLjc3OS4xNTQtMS41NzMuNDUtMi4yOTQuMjk2LS43Mi44NjItMS4yOTggMS4yOTItMS45NDhsMTU1LTE1Ni4xMSAxLjk1Mi0xLjMxMSAyLjMwNi0uNDYxYy43NjkuMTU0IDEuNTM3LjMwNyAyLjMwNi40NjFsMS45NTIgMS4zMTEgMTU1IDE1Ni4xMWMuNDMuNjUuOTk2IDEuMjI4IDEuMjkyIDEuOTQ4LjYwNCAxLjQ3LjYgMy4xMTktLjAxMSA0LjU4Ni0uMjk5LjcxOS0uNzUgMS4zOTEtMS4zMDEgMS45NDItLjU1Mi41NS0xLjIyNS45OTktMS45NDUgMS4yOTctLjcyLjI5Ny0xLjUyOC4zMDMtMi4yOTMuNDU1aC0zMC4yNnYxMTcuODlsLS40NTYgMi4yOTZjLTEuMjkyIDEuOTMzLTEuMzE1IDEuOTU2LTMuMjQ4IDMuMjQ3bC0yLjI5Ni40NTdoLTg4LjM0bC0yLjI5Ni0uNDU3Yy0xLjkzNC0xLjI5MS0xLjk1Ni0xLjMxNC0zLjI0OC0zLjI0N2wtLjQ1Ni0yLjI5NnYtNzguMjRoLTQ2LjczM3Y3OC4yNGwtLjQ1NyAyLjI5NmMtMS4yOTEgMS45MzMtMS4zMTQgMS45NTYtMy4yNDcgMy4yNDdsLTIuMjk2LjQ1N20tMTEyLjI1LTEzNS44OWgyMi40OTRsMi4yOTYuNDU3YzEuOTMzIDEuMjkxIDEuOTU2IDEuMzE0IDMuMjQ3IDMuMjQ3bC40NTcgMi4yOTZ2MTE3Ljg5aDc3Ljc1di03OC4yNGwuNDU3LTIuMjk2YzEuMjkyLTEuOTM0IDEuMzE0LTEuOTU2IDMuMjQ3LTMuMjQ4bDIuMjk2LS40NTZoNTguNzMzbDIuMjk2LjQ1NmMxLjkzMyAxLjI5MiAxLjk1NSAxLjMxNSAzLjI0NyAzLjI0OGwuNDU3IDIuMjk2djc4LjI0aDc2LjM0di0xMTcuODlsLjQ1Ny0yLjI5NmMxLjI5Mi0xLjkzMyAxLjMxNC0xLjk1NiAzLjI0Ny0zLjI0N2wyLjI5Ni0uNDU3aDIxLjg1MmwtMTQwLjU5LTE0MS41OS0xNDAuNTkgMTQxLjU5IiBzdHlsZT0iZmlsbC1ydWxlOm5vbnplcm8iLz4KPC9zdmc+Cg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCAwYy0xNTQgMC0yODAgMTI2LTI4MCAyODAgMCAxNTQgMTI2IDI4MCAyODAgMjgwIDE1NCAwIDI4MC0xMjYgMjgwLTI4MCAwLTE1NC0xMjYtMjgwLTI4MC0yODBtMCA1NDcuNzVjLTE0Ny44NzUgMC0yNjcuNzUtMTE5Ljg3NS0yNjcuNzUtMjY3Ljc1IDAtMTQ3Ljg3NSAxMTkuODc1LTI2Ny43NSAyNjcuNzUtMjY3Ljc1IDE0Ny44NzUgMCAyNjcuNzUgMTE5Ljg3NSAyNjcuNzUgMjY3Ljc1IDAgMTQ3Ljg3NS0xMTkuODc1IDI2Ny43NS0yNjcuNzUgMjY3Ljc1bTQzLjc1LTMwNy4xMjVsLTE2Mi43NS0yNC41Yy01LjI1LS44NzUtOS42MjUtMy41LTEyLjI1LTctMi42MjUtMy41LTQuMzc1LTguNzUtMy41LTEzLjEyNWw1LjI1LTM4LjVjLjg3NS05LjYyNSAxMC41LTE2LjYyNSAyMC4xMjUtMTQuODc1bDIzMy42MjUgMzQuMTI1YzQuMzc1Ljg3NSA4Ljc1IDIuNjI1IDExLjM3NSA2LjEyNSAyLjYyNSAzLjUgNC4zNzUgOC43NSAzLjUgMTMuMTI1bC01LjI1IDM4LjVjMCA0LjM3NS0xLjc1IDctNC4zNzUgOS42MjUgNC4zNzUgMy41IDcgOC43NSA3IDE0bDAgMTM1LjYyNWMwIDEwLjUtOC43NSAxOC4zNzUtMTguMzc1IDE4LjM3NWwtMjM2LjI1IDBjLTEwLjUgMC0xOC4zNzUtOC43NS0xOC4zNzUtMTguMzc1bDAtMTM0Ljc1YzAtMTAuNDk5IDguNzQ5LTE4LjM3NCAxOC4zNzUtMTguMzc1bDE2MS44NzUgMG03NC4zNzUgMTU4LjM3NWMyLjYyNy0uMDAyIDUuMjUtMi42MjYgNS4yNS01LjI1bDAtNzkuNjI1LTI0Ni43NSAwIDAgNzkuNjI1YzAgMi42MjUgMS43NSA1LjI1IDUuMjUgNS4yNWwyMzYuMjUgMG0tMTczLjI1LTk3LjEyNWMuODc1LS44NzUuODc1LS44NzYuODc1LTEuNzVsMjkuNzUtNDcuMjUtNDIgMGMwIC44NzUgMCAuODc1LS44NzUgMi42MjVsLTI4Ljg3NSA0Ni4zNzUgNDEuMTI1IDBtNTYuODc1IDBjLjg3NS0uODc1Ljg3NS0uODc2Ljg3NS0xLjc1bDI5Ljc1LTQ3LjI1LTQyIDBjMCAuMzgzLS4xNjcuNTk4LS4zNTYuNzkzbC0uMTYzLjE2NGMtLjE4OS4xOTUtLjM1Ni40MS0uMzU2Ljc5M2wtMjkuNzUgNDcuMjUgNDIgMG01NiAwYy44NzUtLjg3NS44NzUtLjg3Ni44NzUtMS43NWwyOS43NS00Ny4yNS00MiAwYzAgLjM4My0uMTY3LjU5OC0uMzU2Ljc5M2wtLjE2My4xNjRjLS4xODkuMTk1LS4zNTYuNDEtLjM1Ni43OTNsLTI5Ljc1IDQ3LjI1IDQyIDBtLTE2OC44NzUgMGMuODc1LS44NzUuODc1LS44NzYuODc1LTEuNzVsMjkuNzUtNDcuMjUtMzcuNjI1IDBjLTMuNSAwLTUuMjUgMi42MjUtNi4xMjUgNi4xMjVsMCA0Mi44NzUgMTMuMTI1IDBtMjM0LjUtLjg3NWwwLTQyLjg3NWMwLTIuNjI1LTEuNzUtNS4yNS01LjI1LTUuMjVsLTE0Ljg3NSAwYzAgLjM4My0uMTY3LjU5OC0uMzU2Ljc5M2wtLjE2My4xNjRjLS4xODkuMTk1LS4zNTYuNDEtLjM1Ni43OTNsLTI4Ljg3NSA0Ni4zNzUgNDkuODc1IDBtLS44NzUtMTEybC00My43NS02LjEyNSAyMS44NzUgNDkuODc1IDAgMy41IDE1Ljc1IDEuNzVjMi42MjUgMCA1LjI1LTEuNzUgNS4yNS00LjM3NWw1LjI1LTM4LjVjMC0xLjc1IDAtMy41LS44NzUtNC4zNzUtLjg3NS0uODc1LTIuNjI1LTEuNzUtMy41LTEuNzVtLTc3Ljg3NSAzNS44NzVsMCAyLjYyNSA0Mi44NzUgNy0yMi43NS01MS42MjUgMC0xLjc1LTQyLTYuMTI1IDIxLjg3NSA0OS44NzVtLTU2LTguNzVjMCAuODc1Ljg3NSAyLjYyNSAwIDMuNWw0Mi44NzUgNi4xMjUtMjIuNzUtNTEuNjI1IDAtMS43NS00Mi02LjEyNSAyMS44NzUgNDkuODc1bS01Ni03Ljg3NWMuODc1Ljg3NS44NzUgMS43NSAwIDIuNjI1bDQyLjg3NSA2LjEyNS0yMi43NS01MS42MjUgMC0xLjc1LTQyLTYuMTI1IDIxLjg3NSA1MC43NW0tNTAuNzUtNC4zNzVsMzcuNjI1IDUuMjUtMjIuNzUtNTEuNjI1IDAtMS43NS03Ljg3NS0uODc1Yy0zLjUgMC02LjEyNSAxLjc1LTYuMTI1IDQuMzc1bC01LjI1IDM4LjVjMCAxLjc1IDAgMy41Ljg3NSA0LjM3NS44NzUuODc1IDEuNzUgMS43NSAzLjUgMS43NSIvPgo8L3N2Zz4K";
},function(e,t){(function(t){e.exports=t}).call(t,{})},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1026),a=(n.n(i),n(1024));a.a.start()}],[3147]);