webpackJsonp([1],[,function(e,t,n){e.exports=n(1628)()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(1607),a=i(r),o=n(832),s=i(o);t.default=function(){var e="function"==typeof s.default&&a.default&&(0,a.default)("react.element")||60103;return function(t,n,i,r){var a=t&&t.defaultProps,o=arguments.length-3;if(n||0===o||(n={}),n&&a)for(var s in a)void 0===n[s]&&(n[s]=a[s]);else n||(n=a||{});if(1===o)n.children=r;else if(o>1){
for(var l=Array(o),c=0;c<o;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){function i(){var e=r.initial(arguments).concat({escape:!0}),t=r.last(arguments).hash;return r.isObject(t)&&!r.isEmpty(t)&&e.splice(1,0,t),new a.SafeString(o.apply(o,e))}var r=n(5),a=n(14),o=n(4).default;e.exports=i},function(e,t,n){"use strict";function i(){return r.a.t.apply(r.a,arguments)}Object.defineProperty(t,"__esModule",{
value:!0}),t.default=i;var r=n(467)},,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 r(e,t){return e===t}function a(e){var t=arguments.length<=1||void 0===arguments[1]?r:arguments[1],n=null,i=null;return function(){for(var r=arguments.length,a=Array(r),o=0;o<r;o++)a[o]=arguments[o];return null!==n&&n.length===a.length&&a.every(function(e,i){return t(e,n[i])})?i:(n=a,i=e.apply(void 0,a))
}}function o(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 s(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a]
;var s=0,l=r.pop(),c=o(r),u=e.apply(void 0,[function(){return s++,l.apply(void 0,arguments)}].concat(n)),d=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=c.map(function(n){return n.apply(void 0,[e,t].concat(r))});return u.apply(void 0,i(o))};return d.resultFunc=l,d.recomputations=function(){return s},d.resetRecomputations=function(){return s=0},d}}function l(){return s(a).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=a,t.createSelectorCreator=s,
t.createSelector=l,t.createStructuredSelector=c},function(e,t,n){"use strict";t.__esModule=!0;var i=n(457),r=function(e){return e&&e.__esModule?e:{default:e}}(i);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";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";t.__esModule=!0;var i=n(273),r=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,r.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(1621),a=i(r),o=n(1625),s=i(o),l=n(273),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 "+(void 0===t?"undefined":(0,c.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.default?(0,a.default)(e,t):e.__proto__=t)}},function(e,t,n){"use strict";var i=n(1630),r=(n(888),n(1633));n.d(t,"a",function(){return i.a}),n.d(t,"b",function(){return r.a})},,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){e.exports=n(1451)},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 r(e,t,n){h[e]=i(t,n);var r=f[e];r&&(delete f[e],r.resolve(h[e]))}function a(e){u.a.each(e,function(e,t){var n=void 0,i=void 0;Array.isArray(e)?(n=e[0],i=e[1]):n=e,r(t,n,i)})}
function o(e){return s(e)?p.a.Deferred().resolve(h[e]).promise():(f[e]||(f[e]=p.a.Deferred()),f[e].promise())}function s(e){return h.hasOwnProperty(e)}function l(e){return h[e]}t.b=r,t.c=a,t.e=o,t.a=s,t.d=l;var c=n(5),u=n.n(c),d=n(12),p=n.n(d),h=(n(33),{}),f={}},function(e,t,n){"use strict";function i(e){return!0}function r(e){return p.a.isObject(e)&&!Array.isArray(e)}function a(e,t){t||(t={});var n=p.a.defaults(t,{typeName:e,parse:p.a.bind(h.a.parseType,h.a,e),
stringify:p.a.bind(h.a.stringifyType,h.a,e)});return n.validate=t.validate?o(t.validate):i,n.isRequired=u()({},n,{validate:function(e){return null!=e&&n.validate(e)},typeName:n.typeName+"<required>"}),n}function o(e){return function(t){return null==t||e(t)}}var s=n(1372),l=n.n(s),c=n(7),u=n.n(c),d=n(5),p=n.n(d),h=n(58),f=["boolean","integer","float","string","object","array"],v={any:a("any"),boolean:a("boolean",{validate:p.a.isBoolean}),integer:a("integer",{validate:l.a}),float:a("float",{
validate:p.a.isNumber}),string:a("string",{validate:p.a.isString}),object:a("object",{validate:r}),array:a("array",{validate:Array.isArray}),list:a("list",{validate:Array.isArray}),encodedString:a("encodedString",{validate:p.a.isString}),queryString:a("queryString",{validate:r}),instanceOf:function(){var e=p.a.toArray(arguments);return a("instanceOf",{validate:function(t){return p.a.some(e,function(e){return t instanceof e})}})},oneOf:function(){var e=p.a.toArray(arguments);return a("oneOf",{
validate:function(t){return p.a.contains(e,t)}})},oneOfType:function(){var e=p.a.toArray(arguments);return a("oneOfType",{validate:function(t){return p.a.some(e,function(e){return e.validate(t)})}})},custom:function(e){return a("custom",{validate:e})},getAttrTypeFor:function(e){if(null==e)return v.any;for(var t=0,n=f.length;t<n;t++){var i=f[t],r=v[i];if(r.validate(e))return r}return v.any}};t.a=v},function(e,t,n){"use strict";var i=n(69),r=n(89),a=i.a.extend({mixins:r.a});t.a=new a
},function(e,t,n){"use strict";var i=n(273),r=n.n(i),a=n(50),o=n.n(a),s=n(178),l=n.n(s),c=n(5),u=n.n(c),d=n(68),p=n(12),h=n.n(p),f=n(15),v=n(17),g=n(58),m=n(842),y=n(33),b=n(30),I=n(19),S=(n(603),n(466)),M=n(16),D=n(51),C=n(34),O=n(62),j=/^change:([\w]+)$/,P=d.c.Model.extend({mixins:[S.a],name:"AbstractModel",responseType:D.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.c.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.c.Model.prototype.constructor.apply(this,arguments),this._initModel(t),void(n&&(n.apply(this,arguments),this.initialize=n));var i=this.findOption(t,"onlyIfCached"),r=this.cache.getItemCacheKey(this,e),a=this.cache.get(r)
;if(!a&&this.entityID&&Object(f.a)("appModel")){var o=Object(f.d)("appModel");if(o.has("entities")){var s=o.get("entities").get(this.entityType),l=this.entityID(e),c=s.get(l);c&&(a=c.get("model"))}}return a?(this.uninitialize(),i||(this.mergeStrategy&&(a.isMergingAttributes=!0),t.parse?e=a.parse(e):u.a.extend(e,a._getRelations(this.syncedRelations,e)),a.set(e),a.isMergingAttributes=!1),u.a.each(this.getContext(),function(e){a.setContext(e,this[e]||a[e])},this),
t.collection&&(a.collection=t.collection),a.updateEntity(),a):i?{}:(d.c.Model.prototype.constructor.apply(this,arguments),this._initModel(t),n&&(n.apply(this,arguments),this.initialize=n),void this.cache.store(this,r))},uninitialize:function(){this.stopListening()},_initModel:function(e){O.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,r=this.get(t),a=this.previous(t),o=r&&r instanceof i
;a&&a instanceof i&&u.a.has(this._relationListeners,t)&&(a.off("all",this._relationListeners[t]),this._relationListeners[t]=null),o&&this._forwardRelationEvents(r,t)},_initDerived:function(){u.a.each(this.derivedAttrs,this._setDerived,this)},_initState:function(){O.a.get("shouldCreateStateTree")&&(this.state=this.toState(),this.updateState=this.updateState.bind(this),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(-1!==this.getContext().indexOf(e)&&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 r=u.a.extend({},this.sessionRelations,this.syncedRelations);u.a.each(r,function(n,i){var r=this.get(i);r&&r.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.state,t=this.getState();this.state=this.toState();var n=this.getState();return n!==t&&this.updateEntity(),this.trigger("statechange",this,n,t),{name:this.name,previousState:e,nextState:n}},updateEntity:function(){
this._computedEntityID&&!this.skipCache&&(Object(y.a)(this.entityType,this.name+" requires an `entityType`"),v.a.trigger("change:entity",{type:this.entityType,id:this._computedEntityID,model:this}))},toState:function(){var e=(this.name,o()(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,n){var i=this.get(n);if(i){var r;r=t.excludeDefaults?i instanceof d.c.Collection?i.map(function(e){return Object(m.a)(u.a.result(e,"defaults"),e.toJSON(t))}):Object(m.a)(u.a.result(i,"defaults"),i.toJSON(t)):i.toJSON(t),f[n]=r}}
var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(this.name,this.syncedAttrs),i=this.sessionRelations,r=this.syncedRelations,a=this.attributes,o={};for(var s in a){var l=i&&u.a.has(i,s),c=r&&u.a.has(r,s),p=t.syncedOnly&&(!n||!u.a.has(n,s));l||c||p||(o[s]=a[s])}var f=h.a.extend(!0,{},o);return t.excludeDefaults&&(f=Object(m.a)(u.a.result(this,"defaults"),f)),t.syncedOnly||u.a.each(i,e,this),u.a.each(r,e,this),f},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){Object(y.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 r;return!this.isMergingAttributes&&n.merge&&this.mergeStrategy&&(r=!0,this.isMergingAttributes=!0),this.isMergingAttributes&&(i=this._mergeAttributes(i)),d.c.Model.prototype.set.call(this,i,n),r&&(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 n=u.a.extend({},this.sessionAttrs,this.syncedAttrs,this.sessionRelations,this.syncedRelations),i=this._validateTypes(e,n);return i&&Object(y.a)(!1,i),i},parse:function(e,t){if(t&&t.save&&!this.hasResponseOnSave)return this.attributes;this.name;return this.convert(e,t)},parseResponse:function(e){var t,n=e,i=u.a.result(this,"responseType");return u.a.isString(n)&&(t=!0,u.a.isFunction(this.augmentResponseText)&&(n=this.augmentResponseText(n,i)),n=i.parse(n)),
i===D.a.json&&n.MediaContainer&&(n=n.MediaContainer),u.a.isFunction(this.augmentResponse)&&(n=this.augmentResponse(n,i)),t&&this.rootPropertyName&&u.a.has(n,this.rootPropertyName)&&(n=n[this.rootPropertyName]),Array.isArray(n)&&(n=n[0]),n},convert:function(e,t){var n,i=this.parseResponse(e),r={};u.a.each(this.sessionAttrs,function(e,t){u.a.has(i,t)&&(r[t]=i[t])}),u.a.each(this.syncedAttrs,function(e,t){if(u.a.has(i,t)){var a,o=e;o.typeName||(o=e.type,a=u.a.omit(e,"type")),
r[t]=null==i[t]?i[t]:o.parse(i[t],a)}else this.has(t)&&(n||(n=u.a.result(this,"defaults")),r[t]=n&&u.a.has(n,t)?n[t]:void 0)},this);var a=u.a.extend({},t,{parse:!0});return u.a.extend(r,this._getRelations(this.syncedRelations,i,a)),r},save:function(e,t,n){var i;null==e||"object"===(void 0===e?"undefined":r()(e))?(i=e,n=t):(i={})[e]=t;var a=u.a.extend({save:!0},n),o=u.a.extend(this.getSaveParams(i),a.data);if(u.a.isEmpty(o))return a.success&&a.success(this),h.a.Deferred().resolve(this);a.data=o
;var s=a.success;return a.success=function(e,t,n){e.cache&&e.cache.store(e),s&&s(e,t,n)},d.c.Model.prototype.save.call(this,i,a)},sync:function(e,t,n){var i=n?u.a.clone(n):{};if("create"===e||"update"===e){var r=i.data,a=i.url||u.a.result(this,"saveUrl")||u.a.result(this,"syncUrl")||u.a.result(this,"url");i.url=I.join(a,r),i.data=""}return d.c.Model.prototype.sync.call(this,e,t,i)},getSaveParams:function(e){var t=this._getSaveAttrs(e);return u.a.reduce(t,function(e,t,n){
var i=t.definition,r=t.value,a=n;if(!i)return e[a]=r,e;var o=i.relationClass;if(o){var s,l=o.prototype.model;i.rootPropertyName?s=i.rootPropertyName:r.rootPropertyName?s=r.rootPropertyName:l&&l.prototype&&(s=l.prototype.rootPropertyName),r=r.getSaveParams(),s&&(a=s)}else{var c,d;u.a.has(i,"type")?(c=i.type,d=u.a.omit(i,"type")):c=i,r=c.stringify(r,d)}return e[a]=r,e},{},this)},startCapturingChangeEvents:function(){
if(this.releaseCapturedChangeEvents)return void Object(y.a)(!1,this.name+" is already capturing events");var e=this.set,t=[],n=u.a.clone(this.attributes);this.set=function(n,i,a){var o,s=u.a.extend({},a,{silent:!0});return"object"===(void 0===n?"undefined":r()(n))?(o=n,a=i):(o={})[n]=i,u.a.each(o,function(n,i){this.get(i)!==n&&(t.push({key:i,value:n}),e.call(this,i,n,s))},this),u.a.each(this._derivedListeners,function(n){var i=n.key,r=this.derivedAttrs[i],a=r.call(this)
;this.get(i)!==a&&(t.push({key:i,value:a}),e.call(this,i,a,s))},this),this},this.releaseCapturedChangeEvents=function(){this.set=e,this.releaseCapturedChangeEvents=null,this.discardCapturedChangeEvents=null,this._previousAttributes=n,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;return t?u.a.reduce(e,function(e,n,i){return e[i]=t(i,this.get(i),n),e},{},this):e},_resolveRelationDefinition:function(e){return u.a.isFunction(e)?e.call(this):e},_getRelations:function(e,t,n){
t||(t={}),n||(n={});var i={};return u.a.each(e,function(e,r){var a=this._resolveRelationDefinition(e),o=a.relationClass;Object(y.a)(o,this.name+" requires a `relationClass` for the "+r+" relation");var s=r;n.parse&&!u.a.has(t,r)&&u.a.has(a,"rootPropertyName")&&(s=a.rootPropertyName);var l=t[s];if(l instanceof o)return void(i[r]=l);if(!l&&a.deferred)return void(i[r]=void 0);var c=n.reset?null:this.get(r),p=c instanceof o,h=o.prototype instanceof d.c.Collection;if(h?l=g.a.parseArray(l):l||(l={}),
p&&!h&&(n.parse&&(l=c.parse(l)),p=c.id===l[c.idAttribute||"id"]),p){c.isMergingAttributes=this.isMergingAttributes;var f=a.setOptions;u.a.isFunction(f)&&(f=f.call(this,n)),h?c.set(l,u.a.extend({parse:n.parse,remove:!this.isMergingAttributes},f)):c.set(l,u.a.extend({merge:!0},f)),c.isMergingAttributes=!1}else{var v={parse:n.parse};if(u.a.each(this.getContext(),function(e){v[e]=this[e]},this),!h){var m=a.attrs;u.a.isFunction(m)&&(m=m.call(this,t)),l=u.a.extend({},l,m)}var b=a.options
;u.a.isFunction(b)&&(b=b.call(this,t)),u.a.extend(v,{parent:this},b),c=new o(l,v)}i[r]=c},this),i},_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))&&C.b(this.updateState,this));var r=u.a.toArray(arguments);r[0]="change:"+t+"."+n,this.trigger.apply(this,r),u.a.contains(i,n)||(this.trigger("change:"+t+".change",this,e),this.trigger("change",this))}}
var i=["sync","request","invalid","error","add","remove"];e.on("all",n,this),this._relationListeners[t]=n},_setDerived:function(e,t){var n,i=this.spyOnGet(function(){var i=this.set;this.set=function(){Object(y.a)(!1,this.name+" blocked `set` in the "+t+" attribute. Derived attributes are read-only.")},n=e.call(this),this.set=i});this.set(t,n),u.a.each(i,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)};u.a.findWhere(this._derivedListeners,{key:e,name:i.name})||(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),r=i.save
;return u.a.isFunction(r)&&(r=r.call(this)),r&&(e[n]={definition:i,value:this.get(n)}),e},{},this)}return t},_validateTypes:function(e,t){var n=o()(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 r,a=e[i],o=this._resolveRelationDefinition(t[i]),s=o.relationClass
;r=s?this.hasInitialRelations?M.a.instanceOf(s):s.prototype instanceof d.c.Collection?M.a.oneOfType(M.a.array,M.a.object):M.a.object:o.type?o.type:o;var c=r.validate;return c?c(a)||n.push(i+" of type "+r.typeName+" has an invalid value: "+l()(a)):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,t,n){if(!t)return void b.a.warn("Unable to handle",e)
;var i=e.match(j);if(i){var r=i[1];t.get(r)!==this.state[r]&&(n&&n.updateEntity&&n.updateEntity(),C.b(this.updateState,this))}}});t.a=P},function(e,t,n){"use strict";function i(e){return String(e).replace(/^\/|\/$/g,"")}function r(e){return e?f.a.first(/[^\/\\]+$/.exec(e))||e:""}function a(e,t){return g.a.stringify(e,p()({arrayFormat:"repeat"},t))}function o(e,t){return g.a.parse(e,t)}function s(e,t){m.href=e
;var n=f.a.pick(m,"hash","host","hostname","href","origin","pathname","port","protocol","search");return n.isAbsolute=/^[\w:]*\/\//.test(e),n.search&&(n.params=o(n.search.substring(1))),n.origin||(n.origin=n.protocol+"//"+n.host),n}function l(e,t,n){f.a.isString(e)&&(e=[e]),e=e.filter(function(e){return e});var r=n&&n.recognizeHash,s=r?y:b,l=e.reduce(function(e,t){var n=i(t).match(s),r=n[1],a=n[2],o=n[3];return r&&(e.path=e.path?e.path+"/"+r:r),a&&(e.params=e.params?e.params+"&"+a:a),
o&&(e.hash=o),e},{path:"",params:"",hash:""}),c=void 0;if(n&&n.parseParams)c=a(u()(o(l.params),f.a.isString(t)?o(t):t));else{var d=f.a.isString(t)?t:a(t);c=l.params+(l.params&&d?"&":"")+d}return(e.length&&"/"===e[0].charAt(0)?"/":"")+l.path+(c?"?"+c:"")+l.hash}Object.defineProperty(t,"__esModule",{value:!0}),t.getLastSegment=r,t.stringifyParams=a,t.parseParams=o,t.parseUrl=s,t.join=l;var c=n(457),u=n.n(c),d=n(7),p=n.n(d),h=n(5),f=n.n(h),v=n(590),g=n.n(v),m=(n(33),
document.createElement("a")),y=/^([^\?#]*)(?:\?([^#]*))?(#.*)?/,b=/([^\?]*)\??(.*)()/},function(e,t,n){"use strict";var i=n(178),r=n.n(i),a=n(5),o=n.n(a),s=n(68),l=n(836),c=n.n(l),u=n(33),d=n(30);n(1358),n(1359),n(1360);c.a.isNodeAttached=function(e){return s.c.$.contains(document.documentElement,e)};var p=o.a.clone(c.a.View.prototype),h=o.a.clone(c.a.CollectionView.prototype),f=o.a.clone(c.a.Region.prototype),v=o.a.clone(c.a.Region),g=o.a.clone(c.a.Layout.prototype),m={constructor:function(){
this.wrapAfterRender(),p.constructor.apply(this,arguments),this.listenViewEvents()},listenViewEvents:function(){var e=this;this.stopListeningViewEvents();var t=o.a.result(this,"viewEvents");t&&(this._viewEventsListeners=o.a.mapObject(t,function(t){return o.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(){
p._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,p._removeElement.apply(this,arguments)},bindAllWhenRendered:function(){Object(u.a)(arguments.length>0,"`bindAllWhenRendered` requires at least one function");var e=Array.isArray(arguments[0])?arguments[0]:arguments
;o.a.each(e,function(e){try{this[e]=this.whenRendered(this[e])}catch(t){Object(u.a)(!1,"`bindAllWhenRendered` is unable to wrap "+r()(e))}},this)},whenRendered:function(e){return Object(u.a)(o.a.isFunction(e),"`whenRendered` must be called with a single function"),o.a.bind(function(){if(!this.isClosed){var t=o.a.toArray(arguments),n=o.a.bind(function(){this.isRendered&&!this.isClosed&&e.apply(this,t)},this);if(this.isRendered)return void o.a.defer(n);this.listenToOnce(this,"render",function(){
o.a.defer(n)})}},this)},wrapAfterRender:function(){void 0!==this.onlyAfterRender&&(Object(u.a)(Array.isArray(this.onlyAfterRender),"`onlyAfterRender` must be an array"),this.bindAllWhenRendered.apply(this,this.onlyAfterRender))},bindUIElements:function(){p.bindUIElements.apply(this,arguments),this.bindToModel(),this.isRendered=!0},unbindUIElements:function(){p.unbindUIElements.apply(this,arguments),this.unbindFromModel()},_getImmediateChildren:function(){return[]},_getNestedViews:function(){
var e=this._getImmediateChildren();return e.length?o.a.reduce(e,function(e,t){return t._getNestedViews?e.concat(t._getNestedViews()):e},e):e}},y={constructor:function(){h.constructor.apply(this,arguments)},triggerRendered:function(){return this.isRendered=!0,h.triggerRendered.apply(this,arguments)},rebase:function(e){return this.stopListening(this.collection),this.collection=e,this._initialEvents(),o.a.isFunction(this._renderChildren)?this._renderChildren():this.render(),this},
buildItemView:function(){var e=h.buildItemView.apply(this,arguments);return e._parentView=this,e},_getImmediateChildren:function(){return o.a.values(this.children._views)}},b={constructor:function(){h.constructor.apply(this,arguments)}},I={append:function(e,t,n){var i=e.isClosed||o.a.isUndefined(e.$el),r=e!==this.currentView;return r&&this.close(),e.render(),(r||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=o.a.union([e],o.a.result(e,"_getNestedViews")||[]);o.a.each(n,function(e){e.triggerMethod&&e.triggerMethod("attached",this)},this)}},_updateParentView:function(e){
e&&(e._parentView=this._parentView)}},S={buildRegion:function(e,t){var n=v.buildRegion.apply(this,arguments);return n._parentView=e._parentView,n}},M={_buildRegions:function(e){var t=this,n=o.a.mapObject(e,function(e){return o.a.isString(e)?{_parentView:t,selector:e}:o.a.defaults(e,{_parentView:t})});return g._buildRegions.call(this,n)},_getImmediateChildren:function(){return o.a.chain(this.regionManager._regions).values().pluck("currentView").compact().value()}}
;o.a.extend(c.a.View.prototype,m),o.a.extend(c.a.ItemView.prototype,m),o.a.extend(c.a.CollectionView.prototype,m,y),o.a.extend(c.a.CompositeView.prototype,m,b),o.a.extend(c.a.Region.prototype,I),o.a.extend(c.a.Region,S),o.a.extend(c.a.Layout.prototype,M),c.a.extend=s.c.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";function i(){return Object(r.createSelector)(function(e,t){return t.metadataItemEntityID},a.a,function(e,t){return t[e]})}t.a=i;var r=n(6),a=(n.n(r),n(110))},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),
n(0)),v=n.n(f),g=n(84),m=n.n(g),y=n(33),b=n(215),I=n(29),S=n(348),M=n(65),D=(n(61),n(1811)),C=n.n(D),O=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));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,o=t.onTouchEnd;r._isActive&&!a&&(!n||i&&"_self"!==i||(e.preventDefault(),window.location.href=n),r._press(e)),r._activate(!1),o&&o(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){if(r._preventFocus)return void(r._preventFocus=!1)
;r._focus(!0),r.props.onFocus&&r.props.onFocus(e)},r.onBlur=function(e){r._focus(!1),r.props.onBlur&&r.props.onBlur(e)},Object(y.a)(!n.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 p()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(I.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(){return!this.props.allowFocusOnPress&&!(m.a.findDOMNode(this)===document.activeElement)},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,n=new RegExp("^"+Object(b.a)(t)+"\\b");return!(!e||!t)&&n.test(e)},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.to,i=e.kind,a=e.size,s=e.isSelected,l=e.isDisabled,c=e.component,u=(e.allowFocusOnPress,e.highlightActiveRoute),d=(e.onPress,o()(e,["className","to","kind","size","isSelected","isDisabled","component","allowFocusOnPress","highlightActiveRoute","onPress"])),p=this.state,h=p.isActive,f=p.isFocused,g={},m=c;return n&&(m="a",g.href=n),d.role||(g.role=n?"link":"button"),
g.className=(t||"")+" "+(C.a.link||"")+" "+(C.a[i]||"")+" "+(a&&C.a[a]||"")+" "+(s&&C.a.isSelected||"")+" "+(h&&S.a||"")+" "+(f&&S.f||"")+" "+(l&&S.b||"")+" "+(u&&this._isActiveRoute()&&C.a.isActiveRoute||""||""),"button"!==m&&"input"!==m||(g.type=d.type||"button",g.disabled=l),v.a.createElement(m,r()({},d,g,{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}(f.Component);O.defaultProps={component:"button",kind:M.DEFAULT,isSelected:!1,isDisabled:!1,allowFocusOnPress:!1,highlightActiveRoute:!1},t.a=O},function(e,t,n){"use strict";var i=n(178),r=(n.n(i),n(5)),a=n.n(r),o=n(68),s=n(12),l=n.n(s),c=(n(33),n(19)),u=(n(603),n(466)),d=n(51),p=n(34),h=n(62),f=o.c.Collection.extend({mixins:[u.a],responseType:d.a.xml,
instanceOptions:["url","path","pageStart","pageSize","persistInCache","skipCache"],_context:["parent"],cache:null,cacheKey:function(){return a.a.result(this,"url")},constructor:function(e,t){t||(t={}),a.a.each(this.getContext(),function(e){var n=t[e];void 0!==n&&this.setContext(e,n)},this);var n=a.a.result(this,"instanceOptions");if(a.a.each(n,function(e){a.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 o.c.Collection.prototype.constructor.apply(this,arguments),void this._initState();this.initialize.apply(this,arguments);var i=this.cache.getItemCacheKey(this),r=this.cache.get(i);return this.uninitialize(),r||(t.onlyIfCached?{}:(o.c.Collection.prototype.constructor.apply(this,arguments),this._initState(),void this.cache.store(this,i)))},
uninitialize:function(){this.stopListening()},_initState:function(){h.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=a.a.result(this,"context");return this._context.concat(e)},setContext:function(e,t){-1!==this.getContext().indexOf(e)&&this[e]!==t&&(this[e]=t,
this.each(function(n){n.setContext(e,t)}))},getState:function(){return this.state},updateState:function(){var e=this.state,t=this.getState();this.state=this.toState();var n=this.getState();return this.trigger("statechange",this,n,t),{name:this.name,previousState:e,nextState:n}},toState:function(){this.name;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),o.c.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={"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){this.name;return this.convert(e)},convert:function(e){var t=e;if(a.a.isString(t)){var n=a.a.result(this,"responseType")
;a.a.isFunction(this.augmentResponseText)&&(t=this.augmentResponseText(t,n)),t=n.parse(t),n===d.a.json&&t.MediaContainer&&(t=t.MediaContainer)}if(a.a.isFunction(this.augmentResponse)&&(t=this.augmentResponse(t)),Array.isArray(t))return t;var i=this.model.prototype.rootPropertyName;if(!i)return t;var r=t[i];return r?(Array.isArray(r)||(r=[r]),r):[]},clone:function(e){e||(e=this.models);var t=a.a.result(this,"instanceOptions"),n=a.a.extend(a.a.pick(this,t),a.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=a.a.map(e,function(e){return e.clone()});return this.clone(t)},clear:function(e){e=a.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(){p.b(this.updateState,this)},onStateChange:function(e,t,n){
e!==this&&this.shouldUpdateModelState(e,t,n)&&p.b(this.updateState,this)}});t.a=f},function(e,t,n){"use strict";var i=n(419);n.d(t,"a",function(){return i});var r=n(65);n.d(t,"b",function(){return r});var a=n(61);n.d(t,"e",function(){return a});var o=n(101);n.d(t,"d",function(){return o});var s=n(961);n.d(t,"f",function(){return s});var l=n(1810);n.d(t,"c",function(){return l})},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){var t=e["aria-label"],n=e.className,i=e.name,r=e.style;return a()("i",{className:n?i+" "+n:i,"aria-hidden":!t,"aria-label":t,style:r})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0));n.n(s);t.a=i},function(e,t,n){function i(e,t){var n=a.partials[e],i=r.extend({},t.hash.context||this,t.hash);return new a.SafeString(n(i))}var r=n(5),a=n(14);e.exports=i},function(e,t,n){"use strict";function i(e){var t=j.get(e);if(t&&t.child)return j.get(t.child)}function r(e){var t=j.get(e);if(t){
var n=t.child;return null==n?t:r(n)}}function a(e){var t=j.get(e);if(t){var n=t.parent;return null==n?t:a(n)}}function o(e,t){if(!t){var n=a(e);return n?o(n.id,[]):[]}var r=j.get(e),s=i(e),l=[].concat(t,[r]);return s?o(s.id,l):l}function s(e){return!!i(e)}function l(e){var t=j.get(e);return!!t&&t.mediaType===d.b}n.d(t,"f",function(){return p}),n.d(t,"k",function(){return h}),n.d(t,"j",function(){return f}),n.d(t,"e",function(){return v}),n.d(t,"b",function(){return g}),n.d(t,"a",function(){
return m}),n.d(t,"l",function(){return y}),n.d(t,"c",function(){return b}),n.d(t,"g",function(){return I}),n.d(t,"h",function(){return S}),n.d(t,"i",function(){return M}),n.d(t,"d",function(){return D}),n.d(t,"m",function(){return C}),n.d(t,"n",function(){return P}),n.d(t,"r",function(){return w}),n.d(t,"o",function(){return T}),t.p=i,t.q=r,t.t=a,t.s=o,t.v=s,t.u=l
;var c=n(275),u=n(4),d=n(59),p="movie",h="show",f="season",v="episode",g="artist",m="album",y="track",b="clip",I="photo",S="photoalbum",M="playlist",D="collection",C="userPlaylistItem",O=["id","typeString"],j=Object(c.a)(O,[{id:1,typeString:p,title:function(){return Object(u.default)("Movie")},plural:function(){return Object(u.default)("Movies")},mediaType:d.d},{id:2,typeString:h,title:function(){return Object(u.default)("Show")},plural:function(){return Object(u.default)("Shows")},
mediaType:d.b,child:f},{id:3,typeString:f,title:function(){return Object(u.default)("Season")},plural:function(){return Object(u.default)("Seasons")},mediaType:d.b,parent:h,child:v},{id:4,typeString:v,title:function(){return Object(u.default)("Episode")},plural:function(){return Object(u.default)("Episodes")},mediaType:d.d,parent:f},{id:5,typeString:"trailer",title:function(){return Object(u.default)("Trailer")},plural:function(){return Object(u.default)("Trailers")},mediaType:d.d},{id:6,
typeString:"comic",title:function(){return Object(u.default)("Comic")},plural:function(){return Object(u.default)("Comics")},mediaType:d.c},{id:7,typeString:"person",title:function(){return Object(u.default)("Person")},plural:function(){return Object(u.default)("People")},mediaType:d.b},{id:8,typeString:g,title:function(){return Object(u.default)("Artist")},plural:function(){return Object(u.default)("Artists")},mediaType:d.b,child:m},{id:9,typeString:m,title:function(){
return Object(u.default)("Album")},plural:function(){return Object(u.default)("Albums")},mediaType:d.b,parent:g,child:y},{id:10,typeString:y,title:function(){return Object(u.default)("Track")},plural:function(){return Object(u.default)("Tracks")},mediaType:d.a,parent:m},{id:11,typeString:"picture",title:function(){return Object(u.default)("Picture")},plural:function(){return Object(u.default)("Pictures")},mediaType:d.c},{id:12,typeString:b,title:function(){return Object(u.default)("Clip")},
plural:function(){return Object(u.default)("Clips")},mediaType:d.d},{id:13,typeString:I,title:function(){return Object(u.default)("Photo")},plural:function(){return Object(u.default)("Photos")},mediaType:d.c,parent:S},{id:14,typeString:S,title:function(){return Object(u.default)("Photo Album")},plural:function(){return Object(u.default)("Photo Albums")},mediaType:d.b,child:I},{id:15,typeString:M,title:function(){return Object(u.default)("Playlist")},plural:function(){
return Object(u.default)("Playlists")},mediaType:d.b,parent:S},{id:16,typeString:"playlistFolder",title:function(){return Object(u.default)("Playlist")},plural:function(){return Object(u.default)("Playlists")},mediaType:d.b,child:M},{id:18,typeString:D,title:function(){return Object(u.default)("Collection")},plural:function(){return Object(u.default)("Collections")},mediaType:d.b},{id:1001,typeString:C,title:function(){return Object(u.default)("Clip")},plural:function(){
return Object(u.default)("Clips")},mediaType:d.d}]),P=j.contains,w=j.get,T=j.getAll},function(e,t,n){"use strict";function i(e,t,n,i,o){var s=!1,l=o||r.a,c=l(e.props,t);return c?(c=l(e.state,n),c&&i?(c=l(e.context,i))||s&&a(e,"context",i):s&&a(e,"state",n)):s&&a(e,"props",t),!c}t.a=i;var r=n(250),a=!1},function(e,t,n){"use strict";var i=n(178),r=n.n(i),a=n(1326),o=n.n(a),s=n(1330),l=n.n(s),c=n(50),u=n.n(c),d=n(17),p={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},h=new RegExp("("+u()(p).join("|")+")(\\s?=\\s?)(['\"]?)[^'\"\n]+(['\"]?)","g"),f=/%[sdif]/g,v=/(error|exception)\]$/i,g={"%s":function(e){return e},"%d":function(e){return l()(e,10)},"%f":function(e){return o()(e)}},m=function(e,t,n){return function(){var i,r=void 0,a=arguments.length;if(t=void 0===t?y.LEVEL_LOG:t,!(y.level<t)){if(0===a&&n)i=n;else if(1===a)i=y.serialize(arguments[0]);else if(a>1){
for(var o=Array(a),s=-1;++s<a;)o[s]=y.serialize(arguments[s]);o[0]=o[0].replace(f,function(e,t){var n=e;return o.length>1&&(n=g[e](o[1]),o.splice(1,1)),n}),i=o.join(" ")}return!i||r&&!r.test(i)||d.a.trigger(e,{type:e,level:t,message:i}),i}}},y=m("log:message");y.LEVEL_NONE=-1,y.LEVEL_ERROR=0,y.LEVEL_WARN=1,y.LEVEL_INFO=2,y.LEVEL_DEBUG=3,y.LEVEL_LOG=4,y.LEVEL_GROUP=y.LEVEL_INFO,y.LEVEL_GROUP_END=y.LEVEL_INFO,y.level=y.LEVEL_LOG,y.redacts=!0,y.setLevel=function(e){
y.level=Math.max(y.LEVEL_NONE,Math.min(e,y.LEVEL_LOG))},y.debug=m("log:message",y.LEVEL_DEBUG),y.info=m("log:message",y.LEVEL_INFO),y.warn=m("log:message",y.LEVEL_WARN),y.error=m("log:message",y.LEVEL_ERROR),y.group=m("log:group",y.LEVEL_GROUP,"Group"),y.groupCollapsed=m("log:groupCollapsed",y.LEVEL_GROUP,"Group"),y.groupEnd=function(){y.level<y.LEVEL_GROUP_END||d.a.trigger("log:groupEnd",{type:"log:groupEnd",level:y.LEVEL_GROUP_END})},y.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 y.redacts?e.replace(h,"$1$2$3REDACTED$4"):e;case"[object Object]":case"[object Array]":try{var n=y.redacts?y._jsonReplacer:null;return r()(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(v.test(t)){var i=y._getMaxStackLength(),a=e.stacktrace||e.stack;return a&&a.length>i&&(a=a.substr(0,i-3)+"..."),y.serialize({type:t,stack:a,name:e.name,message:e.message})}return e.toString()}},y._jsonReplacer=function(e,t){return p[e]?"REDACTED":"[object String]"===Object.prototype.toString.call(t)?y.serialize(t):t},y._getMaxStackLength=function(){return 1e3},t.a=y},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),
n.d(t,"a",function(){return o}),n.d(t,"h",function(){return s}),n.d(t,"f",function(){return l}),n.d(t,"j",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"e",function(){return d}),n.d(t,"g",function(){return p}),n.d(t,"c",function(){return h}),n.d(t,"d",function(){return f});var i=n(1),r=n.n(i),a="library",o="continueWatching",s="prePlay",l="playlist",c="search",u="quickSearch",d="player",p="playQueue",h="lineTVTimeline",f="newscast"
;r.a.oneOf(["discover",a,"metadataList","timeline",o,s,"postPlayPrevious","postPlayNext",l,c,u,d,p,h,f,"userPlaylist"])},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(33),o=n(30),s={_map:{},register:function(e,t){Object(a.a)(r.a.isFunction(t),'The "'+e+'" command must be a function'),this._map[e]=t},registerAll:function(e){var t=this;r.a.each(e,function(e,n){"__esModule"!==n&&t.register(n,e)})},hasRegistered:function(e){return this._map.hasOwnProperty(e)},reset:function(){this._map={}},
execute:function(e){var t=this._map[e];if(Object(a.a)(t,'The "'+e+'" command has not been registered'),t){Object(o.a)("[Commands] Executing",e);for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.apply(void 0,i)}}};t.a=s},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e)return!0;if(r.a.error(t),n)throw new Error(t);return!1}
var r=n(30),a="`assert` requires an error message argument";t.a=i},function(e,t,n){"use strict";function i(){g&&(g=clearTimeout(g))}function r(){m&&(m=clearTimeout(m))}function a(){var e=y;y=null,r();e()}function o(){i(),r();var e=window.performance.now(),t=void 0;for(h=!0;d.length&&(!t||t-e<f);)d.pop()(),t=window.performance.now();h=!1,d.length?(c.a.warn("[State] Unable to process all updates within budget; %s update(s) remaining",d.length),g=setTimeout(o,v)):y&&(m=setTimeout(a,v))}
function s(e){for(i(),r(),h=!0,p=!0;d.length;)d.pop()();if(e)try{e()}catch(e){Object(u.a)(!1,e.name+": "+e.message)}y&&a(),h=!1,p=!1}function l(e,t){return t.isStateTreeRoot?(y=e,void(h||m||(m=setTimeout(a,v)))):p?void e():(r(),d[0]!==e&&d.unshift(e),void(h||g||(g=setTimeout(o,v))))}t.a=s,t.b=l;var c=n(30),u=n(33),d=[],p=!1,h=!1,f=1e3/60,v=1e3/60,g=void 0,m=void 0,y=void 0},function(e,t,n){"use strict";n.d(t,"x",function(){return i}),n.d(t,"E",function(){return r}),n.d(t,"R",function(){return a
}),n.d(t,"N",function(){return o}),n.d(t,"V",function(){return s}),n.d(t,"T",function(){return l}),n.d(t,"I",function(){return c}),n.d(t,"L",function(){return u}),n.d(t,"a",function(){return d}),n.d(t,"P",function(){return p}),n.d(t,"Q",function(){return h}),n.d(t,"v",function(){return f}),n.d(t,"Z",function(){return v}),n.d(t,"X",function(){return g}),n.d(t,"y",function(){return m}),n.d(t,"_2",function(){return y}),n.d(t,"J",function(){return b}),n.d(t,"K",function(){return I}),
n.d(t,"_0",function(){return S}),n.d(t,"w",function(){return M}),n.d(t,"D",function(){return D}),n.d(t,"W",function(){return C}),n.d(t,"Y",function(){return O}),n.d(t,"B",function(){return j}),n.d(t,"C",function(){return P}),n.d(t,"A",function(){return w}),n.d(t,"z",function(){return T}),n.d(t,"_1",function(){return E}),n.d(t,"H",function(){return x}),n.d(t,"b",function(){return N}),n.d(t,"c",function(){return A}),n.d(t,"o",function(){return L}),n.d(t,"n",function(){return k}),
n.d(t,"g",function(){return _}),n.d(t,"p",function(){return R}),n.d(t,"e",function(){return z}),n.d(t,"j",function(){return U}),n.d(t,"i",function(){return B}),n.d(t,"d",function(){return V}),n.d(t,"l",function(){return F}),n.d(t,"k",function(){return Q}),n.d(t,"h",function(){return H}),n.d(t,"t",function(){return Y}),n.d(t,"u",function(){return W}),n.d(t,"s",function(){return G}),n.d(t,"f",function(){return K}),n.d(t,"q",function(){return q}),n.d(t,"r",function(){return Z}),
n.d(t,"m",function(){return X}),n.d(t,"O",function(){return J}),n.d(t,"U",function(){return $}),n.d(t,"M",function(){return ee}),n.d(t,"G",function(){return te}),n.d(t,"F",function(){return ne}),n.d(t,"S",function(){return ie})
;var i="discover",r="library",a="preplay",o="playlists",s="searchResults",l="quickSearchResults",c="metadataList",u="player",d="account",p="plexpass",h="plexpassLite",f="cpms",v="signIn",g="setupWizard",m="downloads",y="unclaimedServer",b="metadataSettings",I="nowPlaying",S="status",M="devices",D="homeUsers",C="settings",O="sharing",j="dvrSettings",P="dvrSetup",w="dvrManageChannels",T="dvrDeviceSettings",E="subscriptions",x="manageSubscription",N="airingDetails",A="channelsGrid",L="confirmMarkAsWatched",k="confirmMarkAsUnwatched",_="confirmDelete",R="confirmOptimizeDatabase",z="confirmCleanBundles",U="confirmEmptyTrash",B="confirmDeleteServer",V="confirmAnalyzeLibrary",F="confirmForceRefreshLibrary",Q="confirmEmptyTrashLibrary",H="confirmDeleteLibrary",Y="confirmRemoveWebhook",W="confirmUnlinkOauthProvider",G="confirmRemoveDVR",K="confirmClosePlayer",q="confirmPlayback",Z="confirmRemoteToLocalPlayback",X="confirmLocalToRemotePlayback",J="playVersion",$="resumePlayback",ee="playerError",te="liveTVPlayerConflict",ne="liveTVJoinSession",ie="settings"
},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";function i(){return Object(a.createSelector)(function(e,t){return e.entities.providers[t]},function(e){return e?{identifier:e.identifier,metricsIdentifier:e.metricsIdentifier,isLibraryProvider:e.isLibraryProvider,isPopulated:!!e.isPopulated,epgSource:e.epgSource,
protocols:e.protocols.reduce(function(e,t){return e[t]=!0,e},{}),features:e.features.reduce(function(e,t){var n=t;if(t.type===s.b.ACTIONS){var i={type:s.b.ACTIONS};i=t.actions.reduce(function(e,t){return e[t.id]=t,e},i),n=i}return e[t.type]=n,e},{})}:{}})}function r(e,t){var n=t.providerEntityID,r=l[n];return r||(r=Object(o.a)(i(),function(e){return e}),l[n]=r),r(e,n)}t.a=r;var a=n(6),o=(n.n(a),n(424)),s=n(76),l={}},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 r=/version\/(\d+(\.\d+)?)/i,a=/(?:chrome|crios|gfibertv)[\/-](\d+(\.\d+)?)/i,o=/firefox[ \/](\d+(\.\d+)?)/i,s=/(msie |rv:)(\d+(\.\d+)?)/i,l=/\/([^\s]+)\s+\(Vizio/,c=/(?:applewebkit|safari)\/(\d+(\.\d+)?)/i,u=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:"wiiu",name:"Wii U",regex:/wiiu/i,versionRegex:c,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:"PlayStation 3",webkit:!0,regex:/\(PlayStation 3\)/,versionRegex:c},{id:"ps4",name:"PlayStation 4",webkit:!0,regex:/\(PlayStation 4\)/,versionRegex:c},{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:s,versionMatchIndex:2},{id:"opera",name:"Opera",presto:!0,regex:/opera/i,versionRegex:r},{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:a},{id:"firefox",name:"Firefox",gecko:!0,regex:/firefox/i,versionRegex:o},{id:"safari",name:"Safari",webkit:!0,regex:/macintosh.+safari/i,versionRegex:r},{id:"safari",name:"Safari",webkit:!0,regex:/applewebkit/i,versionRegex:c}],platforms:[{id:"metrological",name:"Metrological",tv:!0,regex:/WPE([-\w]+)?$/,version:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=/WPE(?:-(\w*))?$/.exec(e);if(t&&t[1])return t[1]}},{
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)}},{id:"blackberry",name:"Blackberry",mobile:!0,regex:/BlackBerry|RIM|BB10/,version:function(e){
var t=/PlayBook/.test(e)?/Tablet OS (\d+\.\d+)/:r,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:"Windows",tv:!0,predicate:function(e){return!!window.Windows},version:function(e){try{for(var t=window.Windows.System.Profile.AnalyticsInfo.versionInfo.deviceFamilyVersion,n=("0000000000000000"+parseInt(t,10).toString(16)).slice(-16),i=[],r=0;r<n.length;){var a=n.substring(r,r+4),o=parseInt(a,16);i.push(o),r+=4}return i.join(".")}catch(e){}}},{id:"viera",name:"Viera",
tv:!0,predicate:function(e){return!!this.version(e)},version:function(e){var t=/Viera\/(\d+(\.\d+)*)/i.exec(e);return t&&t[1]||void 0}},{id:"sta",name:"Smart TV Alliance",tv:!0,version:function(e){var t,n;if(/SmartTvA/.test(e))n=/SmartTvA\/(\d+\.\d+)/.exec(e),t=n&&n[1]||t;else{var i=[/Linux i686.+Chromium\/18/,/nettv\/4.2/i,/toshiba-dtv/i,/viera/i],r=[/nettv\/4/i],a=[/nettv/i],o=function(t){return t.test(e)};i.some(o)?t="2.0":r.some(o)?t="1.0":a.some(o)&&(t="0")}return t},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:"viziosmartcast",name:"Vizio SmartCast",tv:!0,predicate:function(e){return window.VIZIO&&window.VIZIO.isSmartCastDevice},version:function(e){}},{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=l.exec(e);return t&&t[1]||void 0}},{id:"viziomtk",name:"Vizio MTK",tv:!0,predicate:function(e){return l.test(e)&&"undefined"!=typeof iMTK_JSP},version:function(e){var t=l.exec(e);return t&&t[1]||void 0}},{id:"viziosigma",name:"Vizio Sigma",tv:!0,regex:l,version:function(e){var t=l.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:"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:u},{id:"openelec",name:"Embedded",tv:!0,regex:/plexmediaplayer.*openelec/i,
version:u},{id:"linuxkonvergo",name:"Linux",tv:!0,regex:/plexmediaplayer.*linux/i,version:u},{id:"osxkonvergo",name:"OSX",tv:!0,regex:/plexmediaplayer.*mac/i,version:u},{id:"windowskonvergo",name:"Windows",tv:!0,regex:/plexmediaplayer.*win/i,version:u},{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:"chromeos",name:"Chrome OS",regex:/CrOS/,version:function(e){var t=/CrOS [\S]* (\d+)[_.]?(\d+)?/.exec(e);if(t)return t[2]?t[1]+"."+t[2]:t[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,r,a=0;!0!==i&&(r=e[a++]);)n=t[r.context||"userAgent"],r.regex?i=r.regex.test(n):r.predicate&&(i=r.predicate(n));return r},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){return s.a.createElement(c.a,a()({},e,{loadingLabel:Object(l.default)("Loading")}))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(4),c=n(494);i.defaultProps=c.a.defaultProps,t.a=i},function(e,t,n){"use strict";function i(e,t){if(t){var n=[];n.push(e);for(var i=arguments.length,r=Array(i>2?i-2:0),a=2;a<i;a++)r[a-2]=arguments[a];for(var o=0,s=r.length;o<s;o++){var l=r[o];l&&n.push(l)}return n.push(t),n.join("--")}}t.a=i},,function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(function(e,t){return t.serverEntityID},a.a,function(e,t){return t[e]})}t.a=i;var r=n(6),a=(n.n(r),n(218))},function(e,t,n){"use strict";n.d(t,"m",function(){return i}),n.d(t,"k",function(){return r}),n.d(t,"c",function(){return a}),n.d(t,"b",function(){return o}),n.d(t,"o",function(){return s}),n.d(t,"l",function(){return l}),n.d(t,"a",function(){return c}),n.d(t,"h",function(){return u}),n.d(t,"f",function(){return d}),n.d(t,"g",function(){return p}),
n.d(t,"n",function(){return h}),n.d(t,"p",function(){return f}),n.d(t,"e",function(){return v}),n.d(t,"d",function(){return g}),n.d(t,"j",function(){return m}),n.d(t,"i",function(){return y});var i="servers",r="providers",a="libraries",o="hubs",s="users",l="resources",c="friends",u="metadataLists",d="metadataDirectories",p="metadataItems",h="sessions",f="userPlaylistItems",v="mediaSubscriptions",g="liveTVSessions",m="playQueueItems",y="playlistItems"},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(function(e){return e.ui},function(e,t){return t.playerType},function(e,t){return e[t+"Player"]})}t.a=i;var r=n(6);n.n(r)},function(e,t,n){var i=n(71),r=n(1873);e.exports=i({},r,{signInFormSectionWidth:"320px",sliderTrackWidth:"60px",sliderThumbSize:"12px",serverMenuItemHeight:"60px",posterTitlePadding:"10px",posterTitleHeight:"20px",posterCenterCircleSize:"42px",posterBadgeHeight:"24px",posterHoverSlideDistance:"10px",posterIconPadding:"20px",
listButtonHeight:"40px",pageHeaderHeight:"60px",pagePadding:"60px",breadcrumbMargin:"25px",recordingPriorityPaneWidth:"360px",recordingPriorityPaneBorderWidth:"4px",recordingPriorityDragHandleWidth:"62px",channelGridRowHeight:"60px",channelGridTitleColumnWidth:"130px",channelGridChannelColumnWidth:"250px",channelGridChannelOverflowWidth:"100px",toolbarButtonWidth:"50px",jumpBarCharacterHeight:"25px",jumpBarGutter:"30px",playCellWidth:"42px",actionsCellWidth:"122px",summaryCellHeight:"136px",
simpleSummaryCellHeight:"90px",summaryCellPadding:"20px",mosaicCellPadding:"5px",timelineGutter:"60px",prePlaySummaryMaxWidth:"750px",prePlayPosterMinWidth:"150px",prePlayPosterMaxWidth:"230px",prePlayPosterWidthRatio:"0.15",prePlayContentPadding:"20px",prePlayRatingBase:"1em",postPlayPosterWidth:"260px",postPlayTitleHeight:"40px",postPlayAutoPlayHeight:"55px",filterBuilderFooterHeight:"46px",dvrSetupImageWidth:"193px",playerControlsHeight:"86px",playerInfoBarHeight:"45px",
playerTopControlsHeight:"60px",playerSideControlsWidth:"100px",playerPosterHeight:"90px",miniPlayerVideoHeight:"135px",seekBarHeight:"4px",seekBarTooltipMarginBottom:"4px",seekBarTooltipHeight:"23px",seekBarTooltipSmallWidth:"60px",seekBarTooltipLargeWidth:"90px",playQueueItemHeight:"68px",playQueueMoveButtonWidth:"54px",playQueueSidePadding:"60px",lyricsLineHeight:"30px",lyricsLineWidth:"640px",playlistItemCardWidth:"64px"})},,function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.children,i=e.kind,r=e.size,o=s()(e,["className","children","kind","size"]);return u.a.createElement(h.a,a()({className:(t||"")+" "+(v.a.button||"")+" "+(v.a[i]||"")+" "+(v.a[r]||"")},o),n)}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(65),p=n(61),h=n(22),f=n(1812),v=n.n(f);i.defaultProps={kind:d.DEFAULT,size:p.MEDIUM},t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e,t){return e.entities.servers[t]
},function(e){return e?{entityID:e.entityID,machineIdentifier:e.machineIdentifier,allowSync:e.allowSync,allowMediaDeletion:e.allowMediaDeletion,backgroundProcessing:e.backgroundProcessing,transcoderVideo:e.transcoderVideo,isFullServer:e.isFullServer,isFullOwnedServer:e.isFullOwnedServer,isCloud:e.isCloud,livetv:e.livetv}:{}})}function r(e,t){var n=t.serverEntityID,r=s[n];return r||(r=Object(o.a)(i(),function(e){return e}),s[n]=r),r(e,n)}t.a=r;var a=n(6),o=(n.n(a),n(195)),s={}},function(e,t,n){
"use strict";var i=n(1469),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(70),u=c.a.extend({className:"confirm-modal modal modal-sm fade",template:r.a,ui:{doubleConfirmMessage:".double-confirm-message",confirmBtn:".confirm-btn",confirmLabel:".confirm-btn .btn-label"},events:o.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=o.a.pick(e,this.whitelistedOptions),this.promise=l.a.Deferred()},serializeData:function(){return o.a.defaults(this.data,{confirmLabel:"Yes",cancelLabel:"No"})},onRender:function(){c.a.prototype.onRender.apply(this,arguments),setTimeout(o.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){e.exports={default:n(1334),__esModule:!0}},function(e,t,n){"use strict";function i(e,t){return t||(t={}),a.a.defaults(t,{
typeName:e,parse:a.a.bind(o.a.parseType,o.a,e)})}var r=n(5),a=n.n(r),o=n(58),s={xml:i("xml"),json:i("json",{accept:"application/json"}),text:i("text")};t.a=s},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"c",function(){return r}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return o}),n.d(t,"f",function(){return s}),n.d(t,"j",function(){return l}),n.d(t,"g",function(){return c}),n.d(t,"h",function(){return u}),n.d(t,"i",function(){return d}),n.d(t,"b",function(){
return p});var i="abd37b14-706c-461f-8255-fa9563882af3",r="32cc8bf5-b425-4582-a52d-71b4f1cf436b",a="b2403ac6-4885-4971-8b96-59353fd87c72",o="de789b83-9c5e-4472-bccf-791c69e67500",s="9eaa5152-320b-48e6-9d47-9492ba5e5b54",l="6f82ca43-6117-4e55-ae0e-5ea3b3e99a96",c="96cac76e-c5bc-4596-87eb-4fdfef9aaa11",u="4b522f91-ae89-4f62-af9c-76f44d8ef61c",d="6b0cd31b-ec15-40b6-9cc3-3fe14e760a43",p="ef3cb855-8236-45c9-9afa-83e9c954001b"},,function(e,t,n){"use strict";function i(){return"id-"+r++}t.a=i;var r=0
},function(e,t,n){"use strict";n.d(t,"c",function(){return f}),n.d(t,"b",function(){return v});var i,r=n(7),a=n.n(r),o=n(19),s=n(469),l=n(43),c=n(40),u=n(16),d=n(470),p=n(18),h=n(855),f={LIBRARY_PROVIDER_IDENTIFIER:"com.plexapp.plugins.library",CHANNEL_PROVIDER_IDENTIFIER:"tv.plex.providers.channel",NEWS_PROVIDER_IDENTIFIER:"tv.plex.provider.news",NEWS_STAGE_PROVIDER_IDENTIFIER:"tv.plex.provider.news-stage",PODCASTS_PROVIDER_IDENTIFER:"tv.plex.provider.podcasts",
PODCASTS_STAGE_PROVIDER_IDENTIFER:"tv.plex.provider.podcasts-stage",WEBSHOWS_PROVIDER_IDENTIFER:"tv.plex.provider.webshows",WEBSHOWS_STAGE_PROVIDER_IDENTIFER:"tv.plex.provider.webshows-stage",EPG_IDENTIFIER:/tv\.plex\.providers\.epg\./},v={LIVE_TV:"livetv"},g=(i={},i[f.NEWS_PROVIDER_IDENTIFIER]={"X-Plex-Provider-Version":"1.2"},i[f.NEWS_STAGE_PROVIDER_IDENTIFIER]={"X-Plex-Provider-Version":"1.2"},i[f.PODCASTS_PROVIDER_IDENTIFER]={"X-Plex-Provider-Version":"1.2","X-Plex-Text-Format":"html"},
i[f.PODCASTS_STAGE_PROVIDER_IDENTIFER]={"X-Plex-Provider-Version":"1.2","X-Plex-Text-Format":"html"},i[f.WEBSHOWS_PROVIDER_IDENTIFER]={"X-Plex-Provider-Version":"1.2"},i[f.WEBSHOWS_STAGE_PROVIDER_IDENTIFER]={"X-Plex-Provider-Version":"1.2"},i),m=p.a.extend({name:"ProviderModel",context:["server"],entityType:l.k,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(c.a)(this.entityType,e.identifier,this.server.entityID())},
idAttribute:"identifier",rootPropertyName:"MediaProvider",url:function(){return this.get("baseURL")},mergeStrategy:function(e,t,n){return"protocols"===e&&n&&n.length>0?n:Object(d.a)(e,t,n)},syncedAttrs:{id:u.a.integer,parentID:u.a.integer,identifier:u.a.string,providerIdentifier:u.a.string,baseURL:u.a.string,title:u.a.string,types:u.a.list,protocols:u.a.list,subscriptions:u.a.boolean,icon:u.a.string,epgSource:u.a.string},sessionAttrs:{isPending:u.a.boolean,isPopulated:u.a.boolean,
error:u.a.object},syncedRelations:{features:{relationClass:h.a,rootPropertyName:"Feature",options:function(){return{provider:this}},setOptions:{remove:!1}}},derivedAttrs:{isLibraryProvider:function(){return this.get("identifier")===f.LIBRARY_PROVIDER_IDENTIFIER},allowRemotePlayer:function(){return this.get("isLibraryProvider")||this.get("identifier")===f.CHANNEL_PROVIDER_IDENTIFIER},metricsIdentifier:function(){return this.get("providerIdentifier")||this.get("identifier")},
sourceBaseURI:function(){if(this.server){return this.server.get("isCloud")?"provider://"+this.get("identifier"):"server://"+this.server.get("machineIdentifier")+"/"+this.get("identifier")}}},getXHROptions:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(s.a)(e)?e:o.join([this.get("baseURL"),e]),i=this.get("providerIdentifier")||this.get("identifier"),r=g[i],l=t.headers;return this.server.getXHROptions(n,a()({},t,{headers:a()({},r,l)}))},defaults:function(){
return{protocols:[],isPending:!0,isPopulated:!1,error:null}}});t.a=m},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(20)),s=n(84),l=n.n(s),c=n(11),u=n(15),d=o.a.Layout.extend({template:function(){return""},mountReact:function(){var e=Object(u.d)("appStore");l.a.render(r()(c.a,{store:e},void 0,this.component(this.options)),this.el)},unmountReact:function(){this.isRendered&&l.a.unmountComponentAtNode(this.el)},onBeforeRender:function(){this.unmountReact()},onRender:function(){
this.mountReact()},onClose:function(){this.unmountReact()}});t.a=d},function(e,t,n){"use strict";function i(){var e=p.b.apply(void 0,arguments);return function(t){function n(e,t){var n=t.metricsPage,r=t.metricsContext,o=e.metricsContext,l=s()(e,["metricsContext"]);return d.a.createElement(i,a()({metricsPage:n,metricsContext:o||r},l))}var i=e(t);return n.contextTypes={metricsPage:c.a.string.isRequired,metricsContext:c.a.string},n}}t.a=i
;var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=n.n(l),u=n(0),d=n.n(u),p=n(11)},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(601),o=n(602),s=n(1376),l=n(1377),c=n(464),u=n(1378),d=n(1380),p=n(840),h=n(1381),f=n(465),v=n(1382),g=n(1383),m=n(841),y={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(r.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&&r.a.has(n,t))return n[t];var i=t.charAt(0).toUpperCase()+t.slice(1),a=e+i;return r.a.has(this,a)?(n[t]=this[a],this[a]):void 0},parseBoolean:o.a,stringifyBoolean:v.a,parseInteger:c.a,parseFloat:l.a,parseString:h.a,parseEncodedString:s.a,parseArray:a.a,parseList:d.a,stringifyList:g.a,parseQueryString:p.a,stringifyQueryString:m.a,parseJSON:u.a,parseXML:f.a,reset:function(){this._parseTypeMap={json:this.parseJSON,xml:this.parseXML},
this._stringifyTypeMap={}}};y.reset(),t.a=y},function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"d",function(){return a}),n.d(t,"a",function(){return o}),n.d(t,"c",function(){return s});var i=n(275),r="none",a="video",o="audio",s="photo",l=["id","typeString"],c=Object(i.a)(l,[{id:0,typeString:r},{id:1,typeString:a},{id:2,typeString:o},{id:3,typeString:s}]);c.get,c.getAll},function(e,t,n){"use strict";function i(e){return e.get("related").findWhere({browse:!1}).get("metadataList")
}function r(e,t,n){return function(){if(t.get("isOpen")&&e===$)return n.apply(void 0,arguments);g.a.warn("[Player] Player was closed or a new playback session was started; ignoring playback request")}}n.d(t,"c",function(){return z}),n.d(t,"b",function(){return U}),n.d(t,"a",function(){return B}),n.d(t,"m",function(){return V}),n.d(t,"n",function(){return F}),n.d(t,"o",function(){return Q}),n.d(t,"j",function(){return H}),n.d(t,"i",function(){return Y}),n.d(t,"h",function(){return W}),
n.d(t,"k",function(){return G}),n.d(t,"e",function(){return K}),n.d(t,"d",function(){return q}),n.d(t,"f",function(){return Z}),n.d(t,"l",function(){return X}),n.d(t,"p",function(){return J}),n.d(t,"g",function(){return ee})
;var a,o=n(7),s=n.n(o),l=n(13),c=n.n(l),u=n(5),d=n.n(u),p=n(12),h=n.n(p),f=n(15),v=n(4),g=n(30),m=n(19),y=n(28),b=n(73),I=n(85),S=n(197),M=n(1764),D=n(34),C=n(78),O=n(171),j=n(36),P=n(488),w=n(657),T=n(415),E=n(343),x=n(930),N=n(932),A=n(490),L=n(344),k=n(660),_=n(77),R=n(118),z="ui/player/playerLifecycle/startPlayback",U="ui/player/playerLifecycle/queuePlayback",B="ui/player/playerLifecycle/endPlayback",V=Object(j.a)(z),F=Object(j.a)("ui/player/playerLifecycle/startPrimaryExtraPlayback"),Q=Object(j.a)("ui/player/playerLifecycle/startRelatedMixPlayback"),H=Object(j.a)("ui/player/playerLifecycle/startExistingPlayQueuePlayback"),Y=Object(j.a)("ui/player/playerLifecycle/queueRelatedMixPlayback"),W=Object(j.a)(U),G=Object(j.a)("ui/player/playerLifecycle/startLegacyChannelPlayback"),K=Object(j.a)("ui/player/playerControls/clearPlayerConfirmPlaybackPayload"),q=Object(j.a)("ui/player/playerControls/clearPlayerConfirmOffsetPayload"),Z=Object(j.a)(B),X=Object(j.a)(z,function(e){
var t=e.options,n=void 0===t?{}:t,i=c()(e,["options"]);return s()({},i,{metricsAction:b.I,options:s()({},n,{playAll:!0})})}),J=Object(j.a)(z,function(e){var t=e.options,n=void 0===t?{}:t,i=c()(e,["options"]);return s()({},i,{metricsAction:b.U,options:s()({},n,{shuffle:!0})})}),$=void 0,ee=(a={},a[z]=function(e,t,n){
var i=t.serverEntityID,a=t.providerEntityID,o=t.metadataItemEntityID,l=t.liveTVSessionEntityID,c=t.confirmPlayback,u=t.confirmOffset,d=t.startOffsetMilliseconds,p=void 0===d?null:d,h=t.startMediaIndex,g=void 0===h?null:h,m=t.openState,j=void 0===m?S.a:m,P=t.isPaused,E=void 0!==P&&P,A=t.extrasPrefixCount,k=t.metricsPage,_=t.metricsContext,R=Object(w.a)(e,t),z=Object(T.a)(R),U=I.c(z),B=Object(O.b)(e,U),V=B.get("playQueue"),F=R.metadataItemModel
;if(!V||!F||V.get("playQueueSelectedMetadataItemID")!==F.get("ratingKey")){if(!c&&V&&V.get("playQueueVersion")>1)return void B.set("confirmPlaybackPayload",t);var Q={serverEntityID:i,providerEntityID:a,isOpen:!0,openState:j,isPlayQueueLoading:!0,isMediaLoading:!0,isPaused:E,startOffsetMilliseconds:p,startMediaIndex:g,metricsPage:k,metricsContext:_};if(l&&(Q.liveTVSession=C.b(e,{liveTVSessionEntityID:l})),F&&Object(M.a)(F)&&(Q.startMetadataItemEntityID=o),
!u&&F&&F.get("viewOffset")&&(Q.confirmOffsetPayload=t),Object(D.a)(function(){B.restoreDefaults(Q)}),!Q.confirmOffsetPayload){var H=!(p||!F||F.get("type")!==y.f),Y=Object(x.a)(s()({},R,{extrasPrefixCount:H?A:void 0,playQueueModel:Object(N.a)(s()({},R,{playQueueType:z}))}));$=Y,Y.done(r(Y,B,function(t){B.set({isPlayQueueLoading:!1,playQueue:t}),Object(L.a)(e).startPlayback(B)})).fail(r(Y,B,function(){B.restoreDefaults({hasError:!0,
errorMessage:Object(v.default)("An error occurred loading items to play.")})}));var W=t.metricsProperties||{};Object(f.d)("metrics").trackClick(s()({page:t.metricsPage,action:t.metricsAction||b.H,type:z,context:_},W))}}},a["ui/player/playerLifecycle/startPrimaryExtraPlayback"]=function(e,t,n){var i=t.options||{},r=C.d(e,t);n(V(s()({},t,{metadataItemEntityID:null,metricsAction:b.K,options:s()({},i,{metadataItemKey:r.get("primaryExtraKey"),type:"video"})})))},
a["ui/player/playerLifecycle/startRelatedMixPlayback"]=function(e,t,n){var r=t.options||{},a=C.d(e,t),o=i(a);n(V({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,metricsAction:b.L,options:s()({},r,{type:Object(T.a)({metadataItemModel:a}),containerKey:o.get("containerKey")})}))},a["ui/player/playerLifecycle/startExistingPlayQueuePlayback"]=function(e,t){
var n=t.serverEntityID,i=t.providerEntityID,r=t.playQueueType,a=t.playQueueID,o=t.startOffsetMilliseconds,s=void 0===o?null:o,l=t.startMediaIndex,c=void 0===l?null:l,u=I.c(r),d=C.h(e,t),p=Object(O.b)(e,u),h=Object(N.a)({providerModel:d,playQueueID:a,playQueueType:r});return p.set({serverEntityID:n,providerEntityID:i,isOpen:!0,openState:S.a,isPlayQueueLoading:!0,isMediaLoading:!0,startOffsetMilliseconds:s,startMediaIndex:c}),Object(E.a)(h).done(function(){p.set({playQueue:h,isPlayQueueLoading:!1
}),P.startPlayback(p)}).fail(function(){p.restoreDefaults({hasError:!0,errorMessage:Object(v.default)("An error occurred loading items to play.")})})},a["ui/player/playerLifecycle/queueRelatedMixPlayback"]=function(e,t,n){var r=C.d(e,t),a=i(r);n(W({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,metricsPage:t.metricsPage,metricsAction:b.M,listType:Object(T.a)({metadataItemModel:r}),options:{next:!0,
containerKey:m.join(a.get("containerKey"),{excludeSeedItem:1})}}))},a["ui/player/playerLifecycle/startLegacyChannelPlayback"]=function(e,t,n){var i=t.serverModel,r=t.metadataItemModel,a=t.options,o=void 0===a?{}:a,l=c()(t,["serverModel","metadataItemModel","options"]),u=d.a.omit(r.toJSON(),"id","sourceTitle","recommender","message","isUserPlaylistItem","children"),p=new k.a({},{server:i}),h=new _.a(u,{server:i,provider:p,channel:r.channel,containerKey:r.containerKey});e.set({
legacyChannelProvider:p,legacyChannelMetadataItem:h}),n(V(s()({serverEntityID:i.entityID(),providerEntityID:p.entityID(),metadataItemEntityID:h.entityID(),options:o},l)))},a[U]=function(e,t,n){var i=t.serverEntityID,a=t.providerEntityID,o=t.startOffsetMilliseconds,l=void 0===o?null:o,c=t.openState,u=void 0===c?S.a:c,d=Object(w.a)(e,t),p=Object(T.a)(d),h=I.c(p),g=Object(O.b)(e,h),m=!!d.playQueueID,y=g.get("playQueue");if(y&&g.get("providerEntityID")===a)Object(x.a)(s()({},d,{playQueueModel:y
})).done(Object(A.a)(g,function(){Object(L.a)(e).refreshRemotePlayQueue(g)})).fail(Object(A.a)(g,function(){g.set({hasError:!0,errorMessage:Object(v.default)("An error occurred loading items into the play queue.")})}));else{Object(D.a)(function(){g.restoreDefaults({serverEntityID:i,providerEntityID:a,isOpen:!0,openState:u,isPlayQueueLoading:!0,isMediaLoading:!0,isPaused:!d.next,repeatAll:!!d.playQueueRepeat,startOffsetMilliseconds:l})}),y=Object(N.a)(s()({},d,{playQueueType:p}))
;var M=m?Object(E.a)(y):Object(x.a)(s()({},d,{next:!1,playQueueModel:y}));$=M,M.done(r(M,g,function(t){g.set({isPlayQueueLoading:!1,playQueue:t}),Object(L.a)(e).startPlayback(g)})).fail(r(M,g,function(){n(Object(R.l)()),m?g.restoreDefaults():g.restoreDefaults({hasError:!0,errorMessage:Object(v.default)("An error occurred loading items to play.")})}))}var C=d.next?b.J:b.c,j=t.metricsProperties||{};Object(f.d)("metrics").trackClick(s()({page:t.metricsPage,action:t.metricsAction||C,type:p},j))},
a["ui/player/playerControls/clearPlayerConfirmPlaybackPayload"]=function(e,t){var n=t.playerType,i=(t.openState,Object(O.b)(e,n));Object(D.a)(function(){i.set("confirmPlaybackPayload",null)})},a["ui/player/playerControls/clearPlayerConfirmOffsetPayload"]=function(e,t){var n=t.playerType,i=(t.openState,Object(O.b)(e,n));Object(D.a)(function(){i.restoreDefaults()})},a[B]=function(e,t,n){var i=t.playerType,r=Object(O.b)(e,i),a=Object(L.a)(e),o=r.get("liveTVSession");if(Object(D.a)(function(){
n(Object(R.l)()),a.endPlayback(r),e.get("legacyChannelProvider")&&(e.unset("legacyChannelProvider"),e.unset("legacyChannelMetadataItem"))}),o){var s=m.join(["/media/subscriptions",o.id]);h.a.ajax(o.server.getXHROptions(s,{method:"DELETE"}))}},a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"TINY",function(){return i}),n.d(t,"SMALL",function(){return r}),n.d(t,"MEDIUM",function(){return a}),n.d(t,"LARGE",function(){return o}),n.d(t,"all",function(){return s
});var i="tiny",r="small",a="medium",o="large",s=[i,r,a,o]},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(68),o=n(1362).default,s=a.c.Model.extend({defaults:r.a.extend({allowFlash:!1,allowServerUpdates:!1,testPrivateConnectionsWhenPublicAddressDoesNotMatch:!0,allowHttpsMediaServerConnections:!1,allowMediaServerRelayConnections:!1,allowLoopbackDiscovery:!1,allowSSO:!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,requiresPlexPass:!1,myPlexAccessToken:null,alerts:null,continueUrl:null,primaryServer:null,shouldCreateNewSessionWhenSeekingLiveTV:!1},o,window.PLEXWEB)}),l=new s;t.a=l},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(20),o=a.a.CollectionView.extend({appendHtml:function(e,t,n){
return this.sorted?this.sortedAppendHtml.apply(this,arguments):this.reversed?this.reversedAppendHtml.apply(this,arguments):a.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 r=e.itemViewContainer?e.$(e.itemViewContainer):e.$el,a=r.children();a.size()<=n?r.append(t.el):a.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{(e.itemViewContainer?e.$(e.itemViewContainer):e.$el).prepend(t.el)}},measureList:function(){if(this.children.length){var e=this.children._views,t=e[r.a.first(r.a.keys(e))];r.a.defer(r.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=r.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=o},,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 r}),n.d(t,"SUCCESS",function(){return a}),n.d(t,"DANGER",function(){return o}),n.d(t,"DARK",function(){return s}),n.d(t,"all",function(){return l});var i="default",r="primary",a="success",o="danger",s="dark",l=[i,r,a,o,s]},function(e,t,n){"use strict";function i(e){var t=e.children;return a()("div",{className:c.a.container},void 0,t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(1757)),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(e,t){Array.isArray(t)?o.a.each(t,e):e(t)}function r(e){return o.a.reduce(e,function(e,t){var n=t.split("="),i=n[0],r=n[1];try{i=decodeURIComponent(i),r=void 0===r?null:decodeURIComponent(r),e.hasOwnProperty(i)?Array.isArray(e[i])?e[i].push(r):e[i]=[e[i],r]:e[i]=r}catch(e){c.a.warn("Unable to decode query string at "+i)}return e},{})}var a=n(5),o=n.n(a),s=n(599),l=n.n(s),c=n(30),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){Array.isArray(t)||(t=[t]);var i=t.join("|"),r=new RegExp("<("+i+")","g"),a=new RegExp("</("+i+")>","g")
;return e=e.replace(r,"<"+n+' elementName="$1"'),e=e.replace(a,"</"+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];e[t]=null==n||""===n?0: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];e[t]=null===n||""===n?0: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];Array.isArray(n)||(e[t]=[n])}else e[t]=[]}e&&i(n,t)},parseQueryString:function(e,t,n){function a(t){if(e.hasOwnProperty(t)){var i=e[t];if(!o.a.isObject(i)){if(!o.a.isString(i))return void(e[t]={})
;if(!(i=i.trim().replace(/^(\?|#)/,"")))return void(e[t]={});e[t]=r(i.split(n))}}}e&&(n||(n="&"),i(a,t))}};t.a=d},function(e,t,n){"use strict";function i(e){var t={},n=u.a.result(e,"responseType");return n&&n.accept&&(t.Accept=n.accept),t}function r(e,t){return t.server?t.server:e.getXHROptions?e:e.provider?e.provider:e.server?e.server:e}n.d(t,"a",function(){return g}),n.d(t,"b",function(){return m})
;var a=n(7),o=n.n(a),s=n(13),l=n.n(s),c=n(5),u=n.n(c),d=n(321),p=n.n(d),h=n(69),f=n(19),v=n(1355),g=3e4,m=6e4,y=p.a.noConflict(),b=y.sync;y.sync=function(e,t,n){var a=n.url,s=n.data,c=n.headers,d=l()(n,["url","data","headers"]),p=d.server||t.server||t,h=r(t,d),v=a||u.a.result(t,"syncUrl")||u.a.result(t,"url"),y=u.a.isObject(s)?f.stringifyParams(s):s,I=!!y&&y.indexOf("checkFiles=1")>-1,S=I||p.get("isPersonalCloudServer"),M=o()({data:y,dataType:"text",processData:!1,headers:u.a.extend(i(t),c),
timeout:S?m:g},d);return u.a.isFunction(h.getXHROptions)?(M=h.getXHROptions(v,M),"cloudsync"===p.get("platform")&&(M.url=f.join(M.url,{redirect:0}))):M.url=v,b(e,t,M)},y.wrapError=function(e,t){var n=t.error;t.error=function(i){n&&n(e,i,t),e.trigger("error",e,i,t)}},u.a.extend(y.View.prototype,v.a),y.Model.extend=h.a.extend,y.Collection.extend=h.a.extend,y.Router.extend=h.a.extend,y.View.extend=h.a.extend,y.History.extend=h.a.extend,t.c=y},function(e,t,n){"use strict";function i(){
a.a.isFunction(this.initialize)&&this.initialize.apply(this,arguments)}var r=n(5),a=n.n(r),o=function(e,t){var n,i=this;n=e&&a.a.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)||null},a.a.extend(n,i,t);var r=function(){this.constructor=n};if(r.prototype=i.prototype,n.prototype=new r,e&&e.hasOwnProperty("mixins")){var o=e.mixins;delete e.mixins,Array.isArray(o)||(o=[o]),a.a.each(o,function(e){a.a.extend(n.prototype,e)})}return e&&a.a.extend(n.prototype,e),
n.__super__=i.prototype,n};i.extend=o,t.a=i},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=n(17),c=0,u=[],d=s.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(){0===(c-=1)&&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",r.a.bind(function(){u[0]===this&&this.hide()},this)),this.listenToOnce(this,"close",function(){var e=u.indexOf(this);-1!==e&&u.splice(e,1)}),u.unshift(this),this.$el.modal()),o()(":focus").blur())},onHide:function(e){this.isHidden=!0,r.a.each(this.panes,function(e,t){var n=e.constructor.onModalClose;n&&n.apply(this)},this),setTimeout(r.a.bind(function(){
l.a.trigger("hide:modal",this),this.trigger("close")},this),this.animationDelay)}});t.a=d},,function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=(n(33),n(29)),v=n(2026),g=n.n(v),m=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));y.call(r);var a=n.ignoreWidth,s=n.ignoreHeight,c=n.ignorePosition;return r.state={isMeasured:!1,width:a?void 0:0,scrollWidth:a?void 0:0,height:s?void 0:0,
scrollHeight:s?void 0:0,x:c?void 0:0,y:c?void 0:0},r}return u()(t,e),t.prototype.componentDidMount=function(){this._requestFrame()},t.prototype.shouldComponentUpdate=function(e,t){return Object(f.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._expandContainer,t=this._shrinkContainer;e.scrollTop=1e5,e.scrollLeft=1e5,t.scrollTop=1e5,t.scrollLeft=1e5},t.prototype.render=function(){var e=this.props,t=e.id,n=e.className,i=e.children,a=e.style,o=e.onKeyDown,s=(e.onMeasure,"function"!=typeof i);return h.a.createElement("div",{id:t,className:n,style:a,ref:this._setContainerRef,onKeyDown:o
},s?i:i(this.state),h.a.createElement("div",{className:g.a.scrollContainer,ref:this._setExpandContainerRef,onScroll:this.onScroll},r()("div",{className:g.a.expandContent})),h.a.createElement("div",{className:g.a.scrollContainer,ref:this._setShrinkContainerRef,onScroll:this.onScroll},r()("div",{className:g.a.shrinkContent})))},t}(p.Component),y=function(){var e=this;this._requestFrame=function(){e._clearTimeout(),e._cancelFrame(),e._frameRequestID=window.requestAnimationFrame(e._measure)},
this._requestTimeout=function(){e._clearTimeout(),e._cancelFrame(),e._measureTimeoutID=setTimeout(e._requestFrame,e.props.resizeTimeout)},this._measure=function(){
var t=e.props,n=t.ignoreWidth,i=t.ignoreHeight,r=t.ignorePosition,a=t.ignoreTransforms,o=e.state,s=o.isMeasured,l=o.width,c=o.scrollWidth,u=o.height,d=o.scrollHeight,p=o.x,h=o.y,f=e._container,v=f.getBoundingClientRect(),g=a?f.offsetWidth:v.width,m=a?f.offsetHeight:v.height,y=!0!==s,b=!r&&(v.left!==p||v.top!==h),I=!n&&(g!==l||f.scrollWidth!==c),S=!i&&(m!==u||f.scrollHeight!==d);if(e._reset(),y||b||I||S){var M=window.getComputedStyle(f),D={isMeasured:!0};if(r||(D.x=b?v.left:p,D.y=b?v.top:h),!n){
var C=parseInt(M.paddingRight,10)||0,O=parseInt(M.paddingLeft,10)||0;D.width=I?g-O-C:l,D.scrollWidth=I?f.scrollWidth:c}if(!i){var j=parseInt(M.paddingTop,10)||0,P=parseInt(M.paddingBottom,10)||0;D.height=S?m-j-P:u,D.scrollHeight=S?f.scrollHeight:d}e.setState(D),e.props.onMeasure&&e.props.onMeasure(D)}},this._setContainerRef=function(t){e._container=t;var n=e.props.onContainerRef;n&&n(t)},this._setExpandContainerRef=function(t){e._expandContainer=t},this._setShrinkContainerRef=function(t){
e._shrinkContainer=t},this.onScroll=function(t){e._requestTimeout()}};m.defaultProps={className:g.a.container,ignoreWidth:!1,ignoreHeight:!1,ignorePosition:!1,ignoreTransforms:!1,resizeTimeout:100},t.a=m},function(e,t,n){"use strict";n.d(t,"h",function(){return i}),n.d(t,"o",function(){return r}),n.d(t,"V",function(){return a}),n.d(t,"k",function(){return o}),n.d(t,"Q",function(){return s}),n.d(t,"f",function(){return l}),n.d(t,"z",function(){return c}),n.d(t,"j",function(){return u}),
n.d(t,"H",function(){return d}),n.d(t,"U",function(){return p}),n.d(t,"I",function(){return h}),n.d(t,"K",function(){return f}),n.d(t,"L",function(){return v}),n.d(t,"M",function(){return g}),n.d(t,"J",function(){return m}),n.d(t,"c",function(){return y}),n.d(t,"b",function(){return b}),n.d(t,"r",function(){return I}),n.d(t,"B",function(){return S}),n.d(t,"A",function(){return M}),n.d(t,"P",function(){return D}),n.d(t,"d",function(){return C}),n.d(t,"u",function(){return O}),
n.d(t,"Z",function(){return j}),n.d(t,"C",function(){return P}),n.d(t,"W",function(){return w}),n.d(t,"Y",function(){return T}),n.d(t,"E",function(){return E}),n.d(t,"p",function(){return x}),n.d(t,"l",function(){return N}),n.d(t,"O",function(){return A}),n.d(t,"_1",function(){return L}),n.d(t,"x",function(){return k}),n.d(t,"N",function(){return _}),n.d(t,"S",function(){return R}),n.d(t,"v",function(){return z}),n.d(t,"D",function(){return U}),n.d(t,"R",function(){return B}),
n.d(t,"F",function(){return V}),n.d(t,"i",function(){return F}),n.d(t,"t",function(){return Q}),n.d(t,"n",function(){return H}),n.d(t,"a",function(){return Y}),n.d(t,"T",function(){return W}),n.d(t,"_0",function(){return G}),n.d(t,"g",function(){return K}),n.d(t,"w",function(){return q}),n.d(t,"s",function(){return Z}),n.d(t,"e",function(){return X}),n.d(t,"m",function(){return J}),n.d(t,"q",function(){return $}),n.d(t,"G",function(){return ee}),n.d(t,"X",function(){return te}),
n.d(t,"y",function(){return ne})
;var i="claim",r="dismiss",a="skip",o="confirm",s="select",l="cancel",c="learn",u="complete",d="play",p="shuffle",h="playAll",f="playPrimaryExtra",v="playRelatedMix",g="queueRelatedMix",m="playNext",y="addToQueue",b="addToPlaylist",I="edit",S="markAsWatched",M="markAsUnwatched",D="refresh",C="analyze",O="fixMatch",j="unmatch",P="merge",w="splitApart",T="sync",E="optimize",x="download",N="delete",A="recommend",L="watchLater",k="getInfo",_="rate",R="selectStream",z="follow",U="mute",B="selectServer",V="optimizeDatabase",F="cleanBundles",Q="emptyTrash",H="deleteServer",Y="addLibrary",W="shareLibrary",G="updateLibrary",K="cancelLibraryUpdate",q="forceRefreshLibrary",Z="editLibrary",X="analyzeLibrary",J="deleteLibrary",$="downloadServer",ee="optOutMetrics",te="subscribe",ne="gift"
},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.innerClassName,r=e.scrollDirection,o=c()(e,["children","className","innerClassName","scrollDirection"]),l=r!==h.NONE;return n||(n=l?g.a.modalScroller:g.a.modalBody),p.a.createElement(f.a,a()({className:n,scrollDirection:r,autoScroll:!0},o),l?s()("div",{className:i},void 0,t):t)}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(101),f=n(80),v=n(1822),g=n.n(v);i.defaultProps={
innerClassName:g.a.innerModalBody},t.a=i},function(e,t,n){"use strict";function i(e){return Math.min(window.innerHeight-2*z,e.maxHeight)}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(84),y=n.n(m),b=n(349),I=n(29),S=n(54),M=n(671),D=n(420),C=n(251),O=n(421),j=n(101),P=n(482),w=n.n(P),T=n(1881),E=n.n(T),x=n(973),N=n(80),A=n(410),L=n(1883),k=n(1885),_=n.n(k),R=Object(C.a)(w.a.menuSpeed),z=parseInt(E.a.menuPadding,10),U={
appear:_.a.enter,appearActive:_.a.enterActive,enter:_.a.enter,enterActive:_.a.enterActive,leave:_.a.leave,leaveActive:_.a.leaveActive},B=function(e){function t(n,r){c()(this,t);var a=d()(this,e.call(this,n,r));return a.onResize=function(e){a.setState({maxHeight:i(a.props)})},a.onWindowPress=function(e){var t=a.props.target,n=document.getElementById(a._menuID),i=n&&n.contains(e.target),r=!i&&document.getElementById(t),o=r&&r.contains(e.target);i||o||a.props.onMenuClose()},a.onKeyDown=function(e){
var t=e.keyCode;t===b.j?O.e(e):t===b.e&&(e.preventDefault(),e.stopPropagation(),a.props.onMenuClose(),O.c())},a.onMenuEnable=function(){a.setState({isDisabled:!1})},a.onMenuDisable=function(){a.setState({isDisabled:!0})},a.state={isDisabled:!1,maxHeight:i(n)},a._menuID=Object(S.a)(),a}return h()(t,e),t.prototype.componentDidMount=function(){this.props.isOpen&&this._enable(),window.addEventListener("resize",this.onResize)},t.prototype.shouldComponentUpdate=function(e,t){
return Object(I.a)(this,e,t)},t.prototype.componentDidUpdate=function(e,t){var n=!e.isOpen&&this.props.isOpen,i=this.props.isOpen&&t.isDisabled&&!this.state.isDisabled;if(n||i)this._enable();else{var r=e.isOpen&&!this.props.isOpen,a=this.props.isOpen&&!t.isDisabled&&this.state.isDisabled;(r||a)&&this._disable()}},t.prototype.componentWillUnmount=function(){this.props.isOpen&&this._disable(),window.removeEventListener("resize",this.onResize)},t.prototype._enable=function(){
O.f(y.a.findDOMNode(this.refs.menu)),document.addEventListener("mouseup",this.onWindowPress),document.addEventListener("touchend",this.onWindowPress),document.addEventListener("keydown",this.onKeyDown)},t.prototype._disable=function(){document.removeEventListener("mouseup",this.onWindowPress),document.removeEventListener("touchend",this.onWindowPress),document.removeEventListener("keydown",this.onKeyDown)},t.prototype.render=function(){
var e=this,t=this.props,n=t.children,i=t.className,r=t.target,o=t.options,l=t.isOpen,c=t.scrollerProps,u=t.size,d=t.onMenuClose,p=this.state.maxHeight,h=Object(M.a)(n,function(t){var n=Object(D.a)(d,t.props.onPress);return g.a.cloneElement(t,{onPress:n,onMenuEnable:e.onMenuEnable,onMenuDisable:e.onMenuDisable})});return s()(x.a,{className:_.a.menuPortal,target:r,options:o,isOpen:l,closeTimeout:R},void 0,s()(A.a,{id:this._menuID,transitionName:U,transitionAppearTimeout:R,transitionEnterTimeout:R,
transitionLeaveTimeout:R},void 0,l&&s()(L.a,{className:i,size:u,isDisabled:this.state.isDisabled},void 0,g.a.createElement(N.a,a()({},c,{style:{maxHeight:p}}),h))))},t}(v.Component);B.defaultProps={maxHeight:600,scrollerProps:{className:_.a.menuScroller,scrollDirection:j.VERTICAL,autoScroll:!0}},t.a=B},function(e,t,n){"use strict";n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c});var i=n(16),r=n(18),a=n(1432),o=n(856),s=n(1438),l={ACTION:"action",ACTIONS:"actions",
CONTENT:"content",IMAGE_TRANSCODER:"imagetranscoder",SUBSCRIBE:"subscribe",SEARCH:"search",MATCH:"match",METADATA:"metadata",PLAY_QUEUE:"playqueue",RATE:"rate",MANAGE:"manage",SETTINGS:"settings",TIMELINE:"timeline"},c={UNIVERSAL:"universal"},u=r.a.extend({name:"ProviderFeatureModel",context:["server","provider"],sessionAttrs:{isSettingsPending:i.a.boolean,isSettingsPopulated:i.a.boolean,settingsError:i.a.object},syncedAttrs:{id:i.a.string,key:i.a.string,reverseKey:i.a.string,
scrobbleKey:i.a.string,unscrobbleKey:i.a.string,type:i.a.string,flavor:i.a.string,automaticLibraryFolders:i.a.boolean,public:i.a.boolean},syncedRelations:{directories:{relationClass:a.a,rootPropertyName:"Directory",deferred:!0},settings:{relationClass:o.default,rootPropertyName:"Setting",deferred:!0},actions:{relationClass:s.a,rootPropertyName:"Action",deferred:!0}},defaults:{isSettingsPending:!0,isSettingsPopulated:!1}});t.a=u},function(e,t,n){"use strict"
;var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(4),l=n(67),c=n(58),u=n(94),d=n(19),p=n(1431),h=n(393),f=n(243),v=n(28),g=n(129),m=n(43),y=n(40),b=n(242),I=n(612),S=n(16),M=n(51),D=n(18),C=n(1439),O=n(276),j=n(1440),P=n(1441),w=n(1443),T=n(1445),E=D.a.extend({name:"MetadataModel",context:["server","provider","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey","relatedOptions"],
responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:m.g,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(y.a)(this.entityType,e.key||this.cid,this.server.entityID())},idAttribute:"ratingKey",rootPropertyName:"Metadata",cache:new b.a,mergeStrategy:j.a,responseType:function(){var e=this.get("key")
;return e&&e.indexOf("/system/services/url/lookup")>-1?M.a.xml:Object(I.a)(this.server,this.provider,this.channel)},url:function(){return this.get("key")},urlRoot:function(){return this.get("key")},saveUrl:function(){return this.get("isPlaylist")?"/library/metadata/"+this.get("ratingKey"):r.a.result(this,"url")},cacheKey:function(e){this.channel&&(e=this.normalizeChannelKey(e));var t=this.extractChildrenKey(e.key);return this.server&&this.server.getScopedKey(t.key)},sessionAttrs:{
isPreFetched:S.a.boolean,isStreamChangeInProgress:S.a.boolean,metadataState:S.a.string,mediaState:S.a.string,indirectHttpHeaders:S.a.object,isSettingsUpdating:S.a.boolean,settingsUpdateError:S.a.object},syncedAttrs:{elementName:S.a.string,ratingKey:S.a.string,parentRatingKey:S.a.string,grandparentRatingKey:S.a.string,key:S.a.string,childrenKey:S.a.string,parentKey:S.a.string,grandparentKey:S.a.string,primaryExtraKey:S.a.string,guid:S.a.string,librarySectionID:S.a.string,
librarySectionTitle:S.a.string,librarySectionUUID:S.a.string,librarySectionKey:S.a.string,type:S.a.string,subtype:S.a.string,title:S.a.string,titleSort:S.a.string,originalTitle:S.a.string,parentTitle:S.a.string,grandparentTitle:S.a.string,year:S.a.string,minYear:S.a.string,maxYear:S.a.string,tagline:S.a.string,summary:S.a.string,studio:S.a.string,contentRating:S.a.string,originallyAvailableAt:S.a.string,thumb:S.a.string,parentThumb:S.a.string,grandparentThumb:S.a.string,banner:S.a.string,
art:S.a.string,parentArt:S.a.string,grandparentArt:S.a.string,theme:S.a.string,parentTheme:S.a.string,grandparentTheme:S.a.string,chapterSource:S.a.string,ratingImage:S.a.string,audienceRating:S.a.float,audienceRatingImage:S.a.string,rating:S.a.float,userRating:S.a.float,playbackSpeed:S.a.float,index:S.a.integer,parentIndex:S.a.integer,absoluteIndex:S.a.integer,duration:S.a.integer,viewOffset:S.a.integer,viewCount:S.a.integer,childCount:S.a.integer,leafCount:S.a.integer,
viewedLeafCount:S.a.integer,ratingCount:S.a.integer,mediaCount:S.a.integer,mediaCountOptimized:S.a.integer,extraType:S.a.integer,lastViewedAt:S.a.integer,addedAt:S.a.integer,updatedAt:S.a.integer,deletedAt:S.a.integer,Geolocation:S.a.object,url:S.a.string,playlistID:S.a.integer,playlistType:S.a.string,specialPlaylistType:S.a.string,smart:S.a.boolean,readOnly:S.a.boolean,icon:S.a.string,composite:S.a.string,durationInSeconds:S.a.integer,skipChildren:S.a.boolean,skipParent:S.a.boolean,
skipDetails:S.a.boolean,subscriptionID:S.a.string,saved:S.a.boolean,grandparentSubscriptionID:S.a.string,subscriptionType:S.a.string,grandparentSubscriptionType:S.a.string,Channel:S.a.array,Topic:S.a.array,onAir:S.a.boolean,Media:S.a.array,Collection:S.a.array,Director:S.a.array,Producer:S.a.array,Writer:S.a.array,Genre:S.a.array,Mood:S.a.array,Country:S.a.array,Label:S.a.array,Role:S.a.array,Location:S.a.array,Tag:S.a.array,Autotag:S.a.array},sessionRelations:{children:function(){return{
relationClass:n(98).default}}},syncedRelations:{chapters:{relationClass:P.a,rootPropertyName:"Chapter",deferred:!0},overlays:{relationClass:w.a,rootPropertyName:"Overlay",deferred:!0},preferences:{relationClass:O.a,rootPropertyName:"Preferences",deferred:!0},onDeck:function(){return{relationClass:E,rootPropertyName:"OnDeck",deferred:!0}},related:function(){var e={skipCache:!0};return this.relatedOptions&&r.a.extend(e,this.relatedOptions),{relationClass:n(212).default,
rootPropertyName:"RelatedHubs",deferred:!0,options:e}},popularLeaves:function(){return{relationClass:n(98).default,rootPropertyName:"PopularLeaves",deferred:!0}},extras:function(){return{relationClass:n(98).default,rootPropertyName:"Extras",deferred:!0,attrs:function(e){return{containerKey:d.join([e.key,"extras"])}}}},concerts:{relationClass:T.a,rootPropertyName:"Concert",deferred:!0},transcodeSession:{relationClass:C.a,rootPropertyName:"TranscodeSession",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"))},isChannelItem:function(){return!!this.channel},isPlaylist:function(){return this.get("type")===v.i},isFolder:function(){
return/\/folder\?parent\=/.test(this.get("key"))},isExtra:function(){return!!this.get("extraType")},isPremium:function(){var e=this.get("Media")||[];return r.a.any(e,function(e){return e.premium})},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=r.a.first(r.a.first(t).Part),i=n&&n.key;if(i)return function(){var t=d.join(i,{download:1})
;return e.server.resolveUrl(t,{appendToken:!0})}}}},defaults:{isStreamChangeInProgress:!1,isSettingsUpdating:!1,settingsUpdateError:null,rating:0,onAir:!1,Media:[],Collection:[],Director:[],Producer:[],Writer:[],Genre:[],Mood:[],Country:[],Label:[],Topic:[],Channel:[],Role:[],Location:[],Autotag:[],Tag:[]},initialize:function(){this.setChildrenKey(this.get("childrenKey")),this.on("change:childrenKey",this.onChildrenKeyChange,this)},uninitialize:function(){
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=r.a.extend({},this._populatedParams,e.data)),e.usePopulatedParams&&(e.data=this._populatedParams),D.a.prototype.fetch.call(this,e)},augmentResponseText:function(e,t){return t===M.a.xml?Object(u.b)(e):e},augmentResponse:function(e,t){var n=this,i=e[this.rootPropertyName]
;i&&(Array.isArray(i)&&(i=i[0]),i.librarySectionID=e.librarySectionID,i.librarySectionTitle=e.librarySectionTitle,i.librarySectionUUID=e.librarySectionUUID),this.responseContext.forEach(function(t){var r=e[t]||i&&i[t];void 0!==r&&n.setContext(t,r)});var a=i||e,o=a.Related,s=a.OnDeck,l=a.Preferences,c=this.extractChildrenKey(a.key);return c.childrenKey&&(a.childrenKey=c.childrenKey,a.key=c.key),a.Media=this.convertMediaItems(a.Media),a.Channel=this.convertChannelItems(a.Channel),
a.Topic=this.convertTopicItems(a.Topic),o&&(a.RelatedHubs=r.a.compact([].concat(o.Hub,o.Directory))),s&&(a.OnDeck=s.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=d.join(e,{includeRelated:1})),this.get("children").set("containerKey",e))},convertMediaItems:function(e){var t=c.a.parseArray(e)
;return r.a.each(t,function(e){l.a.parseBoolean(e,["indirect","optimizedForStreaming","premium","premiere","selected"]),l.a.parseInteger(e,["id","duration","width","height","bitrate","audioChannels","proxyType","beginsAt","endsAt","beginOffset","startOffsetSeconds","endOffsetSeconds"]),l.a.parseArray(e,"Part"),r.a.each(e.Part,function(e){null!=e.exists&&(e.exists=c.a.parseBoolean(e.exists)),null!=e.accessible&&(e.accessible=c.a.parseBoolean(e.accessible)),
l.a.parseInteger(e,["id","duration","size"]),l.a.parseBoolean(e,"optimizedForStreaming"),l.a.parseEncodedString(e,"file"),l.a.parseArray(e,"Stream"),r.a.each(e.Stream,function(e){l.a.parseBoolean(e,["selected","default","forced","timed","cabac","hasScalingMatrix","headerStripping"]),l.a.parseInteger(e,["id","index","streamType","duration","width","height","bitrate","bitDepth","level","refFrames","samplingRate","channels","minLines"]),l.a.parseFloat(e,"frameRate")})})}),
this.addNoneSubtitlesStreams(t)},convertChannelItems:function(e){var t=c.a.parseArray(e);return r.a.each(t,function(e){l.a.parseBoolean(e,["followed","muted"])}),t},convertTopicItems:function(e){var t=c.a.parseArray(e);return r.a.each(t,function(e){l.a.parseBoolean(e,["followed","muted"])}),t},addNoneSubtitlesStreams:function(e){var t=g.a.get("subtitles");return r.a.each(e,function(e){var n=r.a.first(e.Part);if(n&&n.Stream&&Object(h.a)(e)){var i=Object(f.a)(e,{streamType:t.id})
;if(!i.find(function(e){return 0===e.id})){var a=i.find(function(e){return e.selected}),o={id:0,streamType:t.id,language:Object(s.default)("None")};a||(o.selected=!0),n.Stream.unshift(o)}}}),e},normalize:function(e){return this.channel?(e=this.normalizeChannelKey(e),e=this.normalizeChannelType(e),e=this.normalizeChannelMetadata(e)):e=this.normalizeType(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"),Object(v.r)(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=o.a.Deferred()
;if(!e||!t)return i.reject(this).promise();if(!e.indirect)return i.resolve(this).promise();if(t.postURL){var a=r.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 s=t.key;this.server.get("isCloud")&&(s=this.server.swizzleNodeUrl(s));var l=o.a.ajax(this.server.getXHROptions(s));return l.done(function(r){
n.mergeIndirectResponse(r,e,t)?i.resolve(n):i.reject(n)}),l.fail(function(){i.reject(n)}),i.promise()},resolvePostUrl:function(e,t,n){var i=this,r=o.a.Deferred(),a=t.key,s=t.postURL,l=n.getXHROptions("/system/proxy");l.headers=l.headers||{},l.headers["X-Plex-Url"]=s;var c=o.a.ajax(l);return c=c.then(function(e,t,n){var r=d.join(a,{postURL:s});i.server.get("isCloud")&&(r=i.server.swizzleNodeUrl(r));var l=i.server.getXHROptions(r);return l.type="POST",l.headers=l.headers||{},
l.data=n.getAllResponseHeaders()+"\r\n"+e,o.a.ajax(l)}),c.done(function(n,a,o){i.mergeIndirectResponse(n,e,t)?r.resolve(i):r.reject(i)}),c.fail(function(){r.reject(i)}),r.promise()},mergeIndirectResponse:function(e,t,n){var i=c.a.parseXML(Object(u.b)(e));if(!(i&&i.Metadata&&i.Metadata.Media&&i.Metadata.Media.Part))return!1;var a=r.a.first(this.convertMediaItems(i.Metadata.Media)),o=c.a.parseArray(a.Part),s=r.a.first(o);if(!a||!s)return!1;if(a.indirect=!1,r.a.extend(t,r.a.omit(a,"Part")),
r.a.extend(n,s),o.length>1){var l;(l=t.Part).push.apply(l,o.slice(1))}if(i.httpHeaders){for(var d,p=new RegExp("([^=]+)=([^&]+)&?","g"),h={};d=p.exec(i.httpHeaders);)d[1]in h?(Array.isArray(h[d[1]])||(h[d[1]]=[h[d[1]]]),h[d[1]].push(d[2])):h[d[1]]=d[2];this.set("indirectHttpHeaders",h)}return!0},batchAdd:function(e,t,n){var i=r.a.map(e,function(e){return e.get("ratingKey")}),a=d.join(["/library/metadata",i.join(","),t,"add"],{tag:n}),s=this.server.getXHROptions(a,{type:"PUT"});return o.a.ajax(s)
},getDownloadUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.get("Media")[e];if(t){var n=r.a.first(t.Part),i=n&&n.key;if(i){var a=d.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=r.a.first(t.Part);if(n)return n.file}},getLocation:function(){var e=this.get("Location")
;return e.length?r.a.first(e).path:this.getFilepath()},getMediaKey:function(){var e=r.a.first(this.get("Media"));if(e){var t=r.a.first(e.Part);if(t)return t.key}return this.get("key")},isLibraryItem:function(e,t){return!(this.provider&&!this.provider.get("isLibraryProvider"))&&Object(p.a)(e,t)},isPlexMusicItem:function(){var e=this.section;return e&&"com.plexapp.agents.plexmusic"===e.get("agent")},onChildrenKeyChange:function(e,t){this.setChildrenKey(t)}});t.a=E},function(e,t,n){"use strict"
;function i(e){return e.get("user").get("desktop")}function r(e,t){var n=t.serverEntityID;return Object(y.a)(e,b.m,n)}function a(e,t){var n=t.serverEntityID;return Object(y.b)(e,b.m,n)}function o(e,t){var n=r(e,t);return n&&n.get("desktop")}function s(e,t){var n=t.providerEntityID;return Object(y.a)(e,b.k,n)}function l(e,t){var n=t.providerEntityID;return Object(y.b)(e,b.k,n)}function c(e,t){var n=t.libraryEntityID;return Object(y.a)(e,b.c,n)}function u(e,t){var n=t.metadataListEntityID
;return Object(y.a)(e,b.h,n)}function d(e,t){var n=t.metadataListEntityID;return Object(y.b)(e,b.h,n)}function p(e,t){var n=t.metadataItemEntityID;return Object(y.a)(e,b.g,n)}function h(e,t){var n=t.metadataItemEntityID;return Object(y.b)(e,b.g,n)}function f(e,t){var n=t.mediaSubscriptionEntityID;return Object(y.a)(e,b.e,n)}function v(e,t){var n=t.liveTVSessionEntityID;return Object(y.a)(e,b.d,n)}function g(e,t){var n=t.playQueueItemEntityID;return Object(y.a)(e,b.j,n)}function m(e,t){
var n=t.playlistItemEntityID;return Object(y.a)(e,b.i,n)}t.k=i,t.j=r,t.o=a,t.i=o,t.h=s,t.n=l,t.a=c,t.e=u,t.m=d,t.d=p,t.l=h,t.c=f,t.b=v,t.f=g,t.g=m;var y=n(632),b=n(43)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.providerEntityID},a.a,function(e,t){return t[e]})}t.a=i;var r=n(6),a=(n.n(r),n(194))},function(e,t,n){"use strict";var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(1),u=(n.n(c),
n(0)),d=n.n(u),p=n(495),h=n.n(p),f=n(963),v=n.n(f),g=n(671),m=n(29),y=n(101),b=n(1821),I=n.n(b),S=function(e){function t(n,i){r()(this,t);var a=o()(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 l()(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 Object(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,r=null!=n&&n!==this._currentScrollLeft;if(i||r){if(!this.props.smoothScroll&&!this.props.restoreScroll)return this._currentScrollTop=t,this._currentScrollLeft=n,void this._updateScrollPosition({scrollTop:t,scrollLeft:n})
;var a=this.props.smoothScrollDuration/1e3,o={ease:v.a.Power3.easeOut,onUpdate:this.onScrollToUpdate,onComplete:this.onScrollToComplete};this._scrollToPosition={},i&&(o.scrollTop=Math.min(t,this.refs.scroller.scrollHeight-this.refs.scroller.clientHeight),this._scrollToPosition.scrollTop=this.refs.scroller.scrollTop),r&&(o.scrollLeft=Math.min(n,this.refs.scroller.scrollWidth-this.refs.scroller.clientWidth),this._scrollToPosition.scrollLeft=this.refs.scroller.scrollLeft),this._cancelScrollTo(),
this._scrollToTween=h.a.to(this._scrollToPosition,a,o)}}},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,n=t.style,i=t.className,r=t.children,a=t.scrollDirection,o=t.autoScroll,s=t.enableChildrenProps,l=t.onScroll,c=t.onScrollPositionChange;return d.a.createElement("div",{style:n,className:(i||"")+" "+(I.a.scroller||"")+" "+(I.a[a]||"")+" "+(o&&I.a.auto||""||""),ref:"scroller",onScroll:c?this.onScroll:l},s?Object(g.a)(r,function(t){return d.a.cloneElement(t,{isScrolling:e.state.isScrolling,scrollTop:e._currentScrollTop,scrollLeft:e._currentScrollLeft})}):r)},t}(u.Component)
;S.defaultProps={scrollDirection:y.VERTICAL,autoScroll:!1,smoothScroll:!0,restoreScroll:!1,smoothScrollDuration:400,enableChildrenProps:!1,isScrollingTimeout:100},t.a=S},function(e,t,n){"use strict";function i(e,t){return r(t)||a(e)}function r(e){return e===l||e===c}function a(e){return e.length>1}n.d(t,"c",function(){return l}),n.d(t,"b",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"d",function(){return d}),n.d(t,"e",function(){return p}),n.d(t,"a",function(){return h}),t.g=i,
t.h=r;var o=n(1),s=n.n(o),l="poster",c="mosaic",u="table",d="simpleSummary",p="summary",h="epgEpisode";s.a.oneOf([l,c,u,d,p,h])},function(e,t,n){"use strict";n.d(t,"A",function(){return i}),n.d(t,"o",function(){return r}),n.d(t,"u",function(){return a}),n.d(t,"R",function(){return o}),n.d(t,"E",function(){return s}),n.d(t,"B",function(){return l}),n.d(t,"D",function(){return c}),n.d(t,"C",function(){return u}),n.d(t,"p",function(){return d}),n.d(t,"M",function(){return p}),n.d(t,"r",function(){
return h}),n.d(t,"O",function(){return f}),n.d(t,"v",function(){return v}),n.d(t,"S",function(){return g}),n.d(t,"_6",function(){return m}),n.d(t,"i",function(){return y}),n.d(t,"q",function(){return b}),n.d(t,"N",function(){return I}),n.d(t,"_2",function(){return S}),n.d(t,"_7",function(){return M}),n.d(t,"j",function(){return D}),n.d(t,"I",function(){return C}),n.d(t,"g",function(){return O}),n.d(t,"y",function(){return j}),n.d(t,"U",function(){return P}),n.d(t,"_0",function(){return w}),
n.d(t,"l",function(){return T}),n.d(t,"m",function(){return E}),n.d(t,"_3",function(){return x}),n.d(t,"_4",function(){return N}),n.d(t,"_5",function(){return A}),n.d(t,"_10",function(){return L}),n.d(t,"n",function(){return k}),n.d(t,"_11",function(){return _}),n.d(t,"V",function(){return R}),n.d(t,"h",function(){return z}),n.d(t,"P",function(){return U}),n.d(t,"s",function(){return B}),n.d(t,"z",function(){return V}),n.d(t,"H",function(){return F}),n.d(t,"_1",function(){return Q}),
n.d(t,"w",function(){return H}),n.d(t,"b",function(){return Y}),n.d(t,"c",function(){return W}),n.d(t,"_9",function(){return G}),n.d(t,"K",function(){return K}),n.d(t,"L",function(){return q}),n.d(t,"T",function(){return Z}),n.d(t,"x",function(){return X}),n.d(t,"e",function(){return J}),n.d(t,"a",function(){return $}),n.d(t,"d",function(){return ee}),n.d(t,"Z",function(){return te}),n.d(t,"G",function(){return ne}),n.d(t,"F",function(){return ie}),n.d(t,"t",function(){return re}),
n.d(t,"Q",function(){return ae}),n.d(t,"Y",function(){return oe}),n.d(t,"_8",function(){return se}),n.d(t,"k",function(){return le}),n.d(t,"J",function(){return ce}),n.d(t,"W",function(){return ue}),n.d(t,"X",function(){return de}),n.d(t,"_12",function(){return pe}),n.d(t,"f",function(){return he})
;var i="INIT_DASHBOARD_PAGE",r="FETCH_HUBS",a="FETCH_PROMOTED_HUBS",o="POPULATE_PROMOTED_HUBS",s="INIT_METADATA_LIST_PAGE",l="INIT_LIBRARY_PAGE",c="INIT_LIBRARY_PAGE_METADATA_LIST",u="INIT_LIBRARY_PAGE_DIRECTORY_LIST",d="FETCH_LIBRARY_DETAILS",p="POPULATE_LIBRARY_DETAILS",h="FETCH_LIBRARY_FIRST_CHARACTERS",f="POPULATE_LIBRARY_FIRST_CHARACTERS",v="FETCH_QUERY_PARSE",g="POPULATE_QUERY_PARSE",m="SELECT_LIBRARY_FILTER",y="DESELECT_LIBRARY_FILTER",b="FETCH_LIBRARY_FILTER_OPTIONS",I="POPULATE_LIBRARY_FILTER_OPTIONS",S="SEARCH_LIBRARY_FILTER_OPTIONS",M="SELECT_LIBRARY_TABLE_COLUMN",D="DESELECT_LIBRARY_TABLE_COLUMN",C="INIT_TIMELINE_PAGE",O="CLOSE_TIMELINE_PAGE",j="FETCH_TIMELINE_DETAILS",P="POPULATE_TIMELINE_DETAILS",w="RESET_EPG_SETTINGS",T="FETCH_EPG_COUNTRIES",E="FETCH_EPG_LANGUAGES",x="SELECT_EPG_COUNTRY",N="SELECT_EPG_LANGUAGE",A="SELECT_EPG_REGION",L="SET_EPG_POSTAL_CODE",k="FETCH_EPG_LINEUPS",_="SHOW_PROVISION_PERSONAL_CLOUD_SERVER_MODAL",R="PROVISION_PERSONAL_CLOUD_SERVER",z="CONNECT_TO_OWNED_PERSONAL_CLOUD_SERVER",U="POPULATE_PERSONAL_CLOUD_SERVER_CACHE",B="FETCH_PERSONAL_CLOUD_SERVER_STATUS",V="INDICATE_INTEREST_IN_PERSONAL_CLOUD_SERVER",F="INIT_QUICK_SEARCH",Q="RESET_QUICK_SEARCH",H="FETCH_QUICK_SEARCH",Y="CHANGE_SEARCH_QUERY",W="CHANGE_SEARCH_SETTINGS",G="SELECT_SEARCH_RESULT",K="NAVIGATE_SEARCH_RESULT",q="PLAY_SEARCH_RESULT",Z="POPULATE_SEARCH_PROVIDERS",X="FETCH_SEARCH_PAGE",J="CLEAR_SEARCH_PAGE",$="CHANGE_BACKGROUND",ee="CHANGE_THEME_MUSIC",te="RESET_BACKGROUND",ne="INIT_PLAYLIST_PAGE",ie="INIT_PLAYLIST_ITEM_LIST",re="FETCH_PLAYLIST",ae="POPULATE_PLAYLIST_ITEM_RANGE",oe="REPOPULATE_PLAYLIST_ITEMS",se="SELECT_PLAYLIST_ITEM",le="DESELECT_PLAYLIST_ITEM",ce="MOVE_PLAYLIST_ITEM",ue="REMOVE_PLAYLIST_ITEM",de="REMOVE_SELECTED_ITEMS",pe="UPDATE_USER_PROFILE",he="CLEAR_UPDATE_USER_PROFILE_ERROR"
},function(e,t,n){"use strict";var i=n(38),r={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(){
return!("ie"===i.a.id&&11===parseInt(i.a.version,10)||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!0===document.hidden||!1===document.hidden}(),hasWebKitPageVisibility:function(){return!0===document.webkitHidden||!1===document.webkitHidden}(),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};t.a=r},,function(e,t,n){"use strict";function i(e){return l[e]}
n.d(t,"a",function(){return o}),n.d(t,"b",function(){return s}),t.c=i;var r,a=n(214),o="audioVideo",s="photo",l=(r={},r[a.a]=o,r[a.c]=o,r[a.b]=s,r)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.separator;return a()("span",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(1864)),c=n.n(l);i.defaultProps={className:c.a.separator,separator:"\u2014"},t.a=i},function(e,t,n){"use strict";var i=n(1),r=n.n(i);r.a.shape({identifier:r.a.string.isRequired,
isLibraryProvider:r.a.bool.isRequired,isPopulated:r.a.bool.isRequired,protocols:r.a.object.isRequired,features:r.a.object.isRequired})},function(e,t,n){"use strict";function i(e){return e.multiSelect}t.a=i},function(e,t,n){"use strict";var i=n(273),r=n.n(i),a=n(5),o=n.n(a),s=/\s+/,l=function(e,t,n,i){if(!n)return!0;if("object"===(void 0===n?"undefined":r()(n))){for(var a in n)e[t].apply(e,[a,n[a]].concat(i));return!1}if(s.test(n)){
for(var o=n.split(s),l=0,c=o.length;l<c;l++)e[t].apply(e,[o[l]].concat(i));return!1}return!0},c=function(e,t){var n,i=-1,r=e.length,a=t[0],o=t[1],s=t[2];switch(t.length){case 0:for(;++i<r;)(n=e[i]).callback.call(n.ctx);return;case 1:for(;++i<r;)(n=e[i]).callback.call(n.ctx,a);return;case 2:for(;++i<r;)(n=e[i]).callback.call(n.ctx,a,o);return;case 3:for(;++i<r;)(n=e[i]).callback.call(n.ctx,a,o,s);return;default:for(;++i<r;)(n=e[i]).callback.apply(n.ctx,t)}},u={on:function(e,t,n){
return l(this,"on",e,[t,n])&&t?(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:n,ctx:n||this}),this):this},once:function(e,t,n){if(!l(this,"once",e,[t,n])||!t)return this;var i=this,r=o.a.once(function(){i.off(e,r),t.apply(this,arguments)});return r._callback=t,this.on(e,r,n)},off:function(e,t,n){var i,r,a,s,c,u,d,p;if(!this._events||!l(this,"off",e,[t,n]))return this;if(!e&&!t&&!n)return this._events=void 0,this
;for(s=e?[e]:o.a.keys(this._events),c=0,u=s.length;c<u;c++)if(e=s[c],a=this._events[e]){if(this._events[e]=i=[],t||n)for(d=0,p=a.length;d<p;d++)r=a[d],(t&&t!==r.callback&&t!==r.callback._callback||n&&n!==r.context)&&i.push(r);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 a=!t&&!n;n||"object"!==(void 0===t?"undefined":r()(t))||(n=this),e&&((i={})[e._listenId]=e);for(var s in i)e=i[s],e.off(t,n,this),(a||o.a.isEmpty(e._events))&&delete this._listeningTo[s];return this},hasListener:function(e){var t=this._events&&this._events[e];return Array.isArray(t)&&t.length>0}},d={listenTo:"on",listenToOnce:"once"};o.a.each(d,function(e,t){u[t]=function(t,n,i){
return(this._listeningTo||(this._listeningTo={}))[t._listenId||(t._listenId=o.a.uniqueId("l"))]=t,i||"object"!==(void 0===n?"undefined":r()(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){var t=e.key,n=e.getModel,i=Object(r.a)(t),o="is"+i+"Pending",s="is"+i+"Populated",l=t?t+"Error":"error";return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n(e,i),c=t?r.get(t):r,u=(r.sessionAttrs,r.get(o))
;r.set(o,!0),c.fetch(i.options).done(function(){var e;r.set((e={},e[o]=!1,e[s]=!0,e[l]=null,e))}).fail(function(e,t){var n;if(t.aborting)return void r.set(o,u);r.set((n={},n[o]=!1,n[l]=Object(a.a)(t),n))})}}t.a=i;var r=(n(33),n(326)),a=n(140)},,function(e,t,n){"use strict";function i(e){var t=e.children,n=a()(e,["children"]);return l.a.createElement("div",n,t)}var r=n(13),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(1824),u=n.n(c);i.defaultProps={className:u.a.buttonBar},t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.children,i=e.cellX,r=e.cellY,o=e.cellWidth,s=e.cellHeight,l=e.onMouseMove,c=e.onMouseLeave,u=e.onFocus,d=e.onBlur,p="translate3d("+i+"px, "+r+"px, 0)",h={position:"absolute",width:o,height:s,WebkitTransform:p,msTransform:p,transform:p};return a()("div",{className:t,"data-qa-id":"cellItem",style:h,onMouseMove:l,onMouseLeave:c,onFocus:u,onBlur:d},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0));n.n(s);t.a=i},function(e,t,n){"use strict"
;function i(e,t){var n=t&&t.includeDirectories,i=n?["Directory"].concat(o):o,s=Object(r.a)(e,i,"Metadata");return n?s:Object(a.a)(s)}n.d(t,"a",function(){return o});var r=n(1429),a=n(1430),o=["Video","Track","Photo","Playlist"];t.b=i},function(e,t,n){"use strict";var i=n(1),r=n.n(i);r.a.shape({machineIdentifier:r.a.string.isRequired,allowSync:r.a.bool,allowMediaDeletion:r.a.bool,transcoderVideo:r.a.bool,isFullServer:r.a.bool.isRequired,isFullOwnedServer:r.a.bool.isRequired})},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.children;return a()("div",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2414)),c=n.n(l);i.defaultProps={className:c.a.leftTitle},t.a=i},function(e,t,n){"use strict";function i(e){var t=e&&e.get("isCloud"),n=e&&e.supports("json")&&!e.get("onlyXML")&&e.get("isFullServer")&&!e.get("isPersonalCloudServer");return t||n?r.a.json:r.a.xml}t.a=i;var r=n(51)},function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=n.n(i),a=n(58),o=n(94),s=n(19),l=n(43),c=n(40),u=n(612),d=n(244),p=n(16),h=n(51),f=n(18),v=n(325),g=f.a.extend({mixins:[d.a],name:"MetadataListModel",context:["server","provider","section","metadataItem","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","excludeFields","excludeElements","excludeAllLeaves","includeRelated","includeCollections"],
responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:l.h,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(c.a)(this.entityType,e.containerKey||e.key,this.server.entityID())},idAttribute:"containerKey",collectionName:"metadataItems",responseType:function(){return Object(u.a)(this.server,this.provider,this.channel)},url:function(){var e=this.getPaginatedUrl(this.get("containerKey")||this.get("key")),t={
excludeElements:this.excludeElements?this.excludeElements:void 0,excludeFields:this.excludeFields?this.excludeFields:void 0,excludeAllLeaves:this.excludeAllLeaves?1:void 0,includeRelated:this.includeRelated?1:void 0,includeCollections:this.includeCollections?1:void 0};return e?s.join(e,t):e},sessionAttrs:{isMetadataList:p.a.boolean,containerKey:p.a.string,containerTitle:p.a.string,currentPageStart:p.a.integer,currentPageSize:p.a.integer,populatedRange:p.a.object,isPending:p.a.boolean,
isPopulated:p.a.boolean,error:p.a.object},syncedAttrs:{key:p.a.string,librarySectionID:p.a.string,totalSize:p.a.integer,viewGroup:p.a.string,title:p.a.string,thumb:p.a.string,art:p.a.string,banner:p.a.string,theme:p.a.string,allowSync:p.a.boolean},syncedRelations:{metadataItems:{relationClass:v.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},firstItemSubtype:function(){var e=this.getCollection().first();return e?e.get("subtype"):this.attributes.firstItemSubtype},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){var n=this.get("containerKey")||this.get("key"),i=/\/folder(\?|$)/.test(n);return t===h.a.xml?Object(o.b)(e,{includeDirectories:i}):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=a.a.parseArray(e.Metadata),o=a.a.parseInteger(e.totalSize);return this.allowAllLeaves||(e.Metadata=r.a.reject(i,function(e){var t=/\/allLeaves$/.test(e.key);return t&&(this._totalSizeAdjustment-=1),t},this)),o&&this._totalSizeAdjustment&&(e.totalSize=o-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);r.a.each(i,function(e,t){n.setContext(t,e)})}});t.default=g},function(e,t,n){"use strict";n.d(t,"b",function(){return R}),n.d(t,"a",function(){return z})
;var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(5),l=n.n(s),c=n(68),u=n(15),d=n(33),p=n(19),h=n(83),f=n(395),v=n(43),g=n(40),m=n(242),y=n(396),b=n(391),I=n(30),S=n(618),M=n(32),D=n(62),C=n(16),O=n(608),j=n(607),P=n(18),w=n(619),T=n(1463),E=n(472),x=n(274),N=n(192),A={PENDING:"pending",CONNECTED:"connected",UNAVAILABLE:"unavailable",UNAUTHORIZED:"unauthorized"},L={PENDING:"pending",RESOLVED:"resolved",REJECTED:"rejected"},k={SECONDARY:"secondary"
},_=["camera_upload","cloudsync","content_filter","home","lyrics","music_videos","pass","premium_music_metadata","sync","trailers"],R="ok",z="none",U=P.a.extend({mixins:[j.a],name:"ServerModel",entityType:v.m,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(g.a)(this.entityType,e.machineIdentifier||this.cid)},idAttribute:"machineIdentifier",connectionTestTimeout:1e4,cache:new m.a,persistInCache:!0,sessionAttrs:{
connectionTestResult:C.a.oneOf(A.PENDING,A.CONNECTED,A.UNAVAILABLE,A.UNAUTHORIZED).isRequired,promiseState:C.a.oneOf(L.PENDING,L.RESOLVED,L.REJECTED).isRequired,sections:C.a.instanceOf(w.a).isRequired,playlists:C.a.instanceOf(T.a).isRequired,isShared:C.a.boolean.isRequired,isBundled:C.a.boolean.isRequired,isCloud:C.a.boolean.isRequired,isMerged:C.a.boolean.isRequired,superToken:C.a.string,accessToken:C.a.string,sourceTitle:C.a.string,publicAddressMatches:C.a.boolean,httpsRequired:C.a.boolean,
presence:C.a.boolean,home:C.a.boolean,synced:C.a.boolean,createdAt:C.a.integer,lastSeenAt:C.a.integer,ownerId:C.a.integer,hasEventConnection:C.a.boolean,serverClass:C.a.oneOf(k.SECONDARY),onlyXML:C.a.boolean},sessionRelations:{activeConnection:{relationClass:x.a,deferred:!0},connections:{relationClass:E.b,options:function(){return{server:this}}}},syncedAttrs:{machineIdentifier:C.a.string,friendlyName:C.a.string,startState:C.a.string,version:C.a.string,platform:C.a.string,
platformVersion:C.a.string,sync:C.a.boolean,backgroundProcessing:C.a.boolean,multiuser:C.a.boolean,transcoderLyrics:C.a.boolean,myPlex:C.a.boolean,myPlexMappingState:C.a.string,myPlexSigninState:C.a.oneOf(R,z,"invalid"),myPlexSubscription:C.a.boolean,myPlexUsername:C.a.string,transcoderPhoto:C.a.boolean,transcoderAudio:C.a.boolean,transcoderVideo:C.a.boolean,transcoderVideoRemuxOnly:C.a.boolean,transcoderSubtitles:C.a.boolean,transcoderActiveVideoSessions:C.a.integer,
allowMediaDeletion:C.a.boolean,allowCameraUpload:C.a.boolean,allowChannelAccess:C.a.boolean,allowSync:C.a.boolean,diagnostics:C.a.list,companionProxy:C.a.boolean,updater:C.a.boolean,isDesktop:C.a.boolean,photoAutoTag:C.a.boolean,itemClusters:C.a.boolean,updatedAt:C.a.integer,countryCode:C.a.string,ownerFeatures:C.a.list,mediaProviders:C.a.integer,maxUploadBitrate:C.a.integer,maxUploadBitrateReason:C.a.string,maxUploadBitrateReasonMessage:C.a.string,streamingBrainABRVersion:C.a.integer,
livetv:C.a.integer},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(){return Object(S.a)(this.get("version"))},isConnected:function(){return this.get("connectionTestResult")===A.CONNECTED},isUnavailable:function(){return this.get("connectionTestResult")===A.UNAVAILABLE},isUnauthorized:function(){
return this.get("connectionTestResult")===A.UNAUTHORIZED},isPending:function(){return this.get("promiseState")===L.PENDING},isPrivateConnection:function(){var e=this.get("activeConnection");return!(!e||!e.get("isPrivate"))},isResolved:function(){return this.get("promiseState")===L.RESOLVED},isRejected:function(){return this.get("promiseState")===L.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(){return!!this.get("connections").findWhere({isHttps:!0})},hasFallbackConnections:function(){return!!this.get("connections").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")===k.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!(!D.a.get("allowCloudSyncServers")&&this.get("isCloudSyncServer"))&&(!(!D.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("1.3.0"))},isClaimed:function(){return!!this.get("isPersonalCloudServer")||(this.get("isConnected")?this.get("myPlexSigninState")===R:void 0)},
hasManualConnection:function(){return this.get("connections").some(function(e){return e.get("sources").some(function(e){return/^manual/.test(e.id)})})},hasAdaptiveBitrate:function(){return this.get("streamingBrainABRVersion")>=3},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(){
return this.get("connectionTestResult")===A.PENDING?null:this.get("isConnected")},available:function(){return this.get("connectionTestResult")===A.PENDING?null:!this.get("isUnavailable")},authorized:function(){return this.get("connectionTestResult")===A.PENDING?null:this.get("isResolved")},relayed:function(){return this.get("isRelayed")}},defaults:function(){return{connectionTestResult:A.PENDING,promiseState:L.PENDING,sections:new w.a([],{server:this}),playlists:new T.a({},{server:this}),
isShared:!1,isBundled:!1,isCloud:!1,isMerged:!1,hasEventConnection:!1,sync:!1,backgroundProcessing:!1,allowChannelAccess:!1,updater:!0,ownerFeatures:[]}},url:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.get("activeConnection");Object(d.a)(e,"An active or manual connection is required for a server url");var t=l.a.result(e,"url");return/\/$/.test(t)||(t+="/"),t},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 P.a.prototype.updateEntity.apply(this,arguments)},fetch:function(){return c.c.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=void 0;n=t.useRelativeUrl?this.get("isMobileServer")?"http://127.0.0.1:"+this.getLoopbackPort()+"/":"":this.url(t.connection);var i=this.get("accessToken"),r=l.a.extend({},t.params);return t.appendHeaders&&l.a.defaults(r,this.getHeaders()),t.appendToken&&i&&(r["X-Plex-Token"]=i),p.join([n,e],r)},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=o()(t,["headers"]);return r()({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),n=this.get("accessToken");n&&(t["X-Plex-Token"]=n);var i=Object(u.d)("appModel").get("settings"),r=i.get("language")
;return r&&(t["X-Plex-Language"]=r,t["Accept-Language"]=r),t},addConnection:function(e){e.sources||(e.sources=[{id:"internal"}]);var t=this.get("connections"),n=new x.a(e),i=t.get(n.id);if(i){return i.get("sources").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;){t.at(n).get("sources").remove(e),n--}},
testAllConnections:function(){var e=this,t=this.get("connections");return Object(I.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;return this.get("connections").each(function(t){var n=!t.get("relay"),i=t.get("isUntested"),r=t.get("isAborted");n&&(i||r)&&e.testConnection(t)}),
this.populatePromise},testOnlyUntestedRelayConnections:function(){var e=this;return this.get("connections").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]:{};return t.server=this,t.connection=e,this.get("promiseState")===L.REJECTED&&this._reset(),
M.a.execute("testServerConnection",t).done(this.onConnectionTestSuccess.bind(this)).fail(this.onConnectionTestError.bind(this))},abortAllConnectionTests:function(){var e=this,t=this.get("connections");Object(I.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};M.a.execute("abortServerConnectionTest",t)},populateIdentity:function(e){var t=this
;if(this._identityPromise)return this._identityPromise;var n=M.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),n=this.cache.get(t);if(n){var i=n.get("debugName");I.a.warn("[Identity] %s and %s (cached) collide",e,i),
n.get("isConnected")||!this.get("isConnected")?(Object(I.a)("[Identity] Merging %s into %s (cached)",e,i),n.merge(this)):(Object(I.a)("[Identity] Merging %s (cached) into %s",i,e),this.merge(n),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),D.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")&&_.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||Object(f.a)(t,e)},hasRegression:function(e){if(!e)return!1;var t=this.isVersionOrNewer(e.introduced),n=e.resolved&&this.isVersionOrNewer(e.resolved);return t&&!n},canAllowHttpFallback:function(){if(!this.get("isFullServer")||this.get("isPersonalCloudServer"))return!1;if(h.a.isHostedHttps&&!D.a.get("allowMixedContent"))return!1
;var e=Object(u.d)("appModel").get("settings"),t=e.get("allowHttpFallback"),n=t===y.a.ALWAYS,i=t===y.a.SAME_NETWORK;return!!(n||i&&this.get("publicAddressMatches"))},hasOtherLoopbackServer:function(){return!!this.collection&&this.collection.hasLoopbackServer()},getLoopbackPort:function(){var e=this.get("connections").findWhere({isPrivate:!0});return e?e.get("port"):"32400"},authenticate:function(e){this._resolve({accessToken:e})},deauthenticate:function(){this._reject({accessToken:null})},
_reset:function(){this.startCapturingChangeEvents(),this.set("promiseState",L.PENDING),this._resetPopulate(),this.releaseCapturedChangeEvents()},_resolve:function(e){var t=l.a.extend({connectionTestResult:A.CONNECTED,promiseState:L.RESOLVED},e);this.startCapturingChangeEvents(),this.set(t),this._resolvePopulate(),this.releaseCapturedChangeEvents()},_reject:function(e){var t=this.get("connections")
;t.hasOnlyFailedConnections()&&I.a.warn("[Connections] All connections to %s failed",this.get("debugName"));var n=t.findWhere({isUnauthorized:!0})?A.UNAUTHORIZED:A.UNAVAILABLE,i=l.a.extend({connectionTestResult:n,promiseState:L.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(r()({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")&&I.a.info("[Connections] Active connection to %s is %s",this.get("debugName"),t.id),this._resolve(r()({activeConnection:t},t.get("serverAttrs"))),
D.a.get("allowLoopbackDiscovery")){var n=this.get("connections"),i=this.get("activeConnection"),a=i.get("isPrivate"),o=!!n.findWhere({isLoopback:!0});!a||o||this.hasOtherLoopbackServer()||(Object(I.a)("[Connections] Adding possible loopback connection for",this.get("debugName")),this.addConnection(i.getLoopbackAttributes()))}},onConnectionTestError:function(e,t){var n=this;if(!e.get("isAborted")){var i=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});Object(I.a)("[Connections] Added insecure fallback connection for %s at %s",this.get("debugName"),r.id)}else I.a.warn("[Connections] Prevented fallback to insecure connection for",this.get("debugName"));!this.id&&e.get("isUnauthorized")&&this.populateIdentity(e),
i.hasOnlyFailedConnections()?this.id||!this._identityPromise?this._reject():this._identityPromise.always(function(){i.hasOnlyFailedConnections()&&n._reject()}):i.hasFailedEveryDirectConnection()&&this.testOnlyUntestedRelayConnections()}}},{connectionTestResults:A,promiseStates:L,serverClasses:k});Object(O.a)(U,function(){return{relationClass:Object(u.d)("ServerFlexModel"),options:{server:this}}}),t.c=U},function(e,t,n){"use strict";function i(e){return e.experienceSettings}t.a=i
},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 r}),n.d(t,"HORIZONTAL",function(){return a}),n.d(t,"OMNI",function(){return o}),n.d(t,"all",function(){return s});var i="none",r="vertical",a="horizontal",o="omni",s=[i,r,a,o]},function(e,t,n){"use strict";function i(e){return s.a.createElement(c.a,a()({},e,{loadingLabel:Object(l.default)("Loading")}))}
var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(4),c=n(962);i.defaultProps=c.a.defaultProps,t.a=i},function(e,t,n){"use strict";function i(e){return s.a.createElement(l.a,a()({iconComponent:c.a},e))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(1818),c=n(26);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=t.searchResultEntityID;return Object(r.a)(e,a.SEARCH_RESULT,n)}t.f=i;var r=n(632),a=n(287),o=n(78);n.d(t,"a",function(){return o.a}),n.d(t,"b",function(){return o.d}),n.d(t,"c",function(){
return o.e}),n.d(t,"d",function(){return o.g}),n.d(t,"e",function(){return o.h}),n.d(t,"g",function(){return o.i}),n.d(t,"h",function(){return o.j}),n.d(t,"i",function(){return o.l}),n.d(t,"j",function(){return o.n}),n.d(t,"k",function(){return o.o})},function(e,t,n){"use strict";function i(e){return e}var r=n(50);n.n(r),n(392),n(33);t.a=i},function(e,t,n){"use strict";n.d(t,"c",function(){return m}),n.d(t,"b",function(){return y}),n.d(t,"f",function(){return b}),n.d(t,"e",function(){return I}),
n.d(t,"g",function(){return S}),n.d(t,"d",function(){return M}),n.d(t,"i",function(){return D}),n.d(t,"h",function(){return C}),n.d(t,"a",function(){return O});var i,r=n(7),a=n.n(r),o=n(36),s=n(5),l=n.n(s),c=n(15),u=n(17),d=n(1072),p=n(958),h=n(959),f=n(2353),v=n(2354),g=n(240),m=(Object(o.a)("app/saveSettings"),
Object(o.a)("app/downloadServer")),y=Object(o.a)("app/discoverServers"),b=Object(o.a)("app/redirectToRoute"),I=Object(o.a)("app/redirectToHttp"),S=Object(o.a)("app/redirectToUrl"),M=Object(o.a)("app/preferInsecure"),D=Object(o.a)("app/switchAppLayout"),C=Object(o.a)("app/saveSettings",function(e){return{name:"experienceSettings",settings:e}}),O=a()({},g.c,(i={},i["app/saveSettings"]=function(e,t){var n=t.name,i=t.settings;e.get(n).save(i)},i["app/downloadServer"]=function(e,t){var n=new v.a({
downloadType:t});u.a.trigger("show:modal",n)},i["app/discoverServers"]=function(e){u.a.trigger("discover:servers")},i[g.b]=function(e){e.set({primaryServer:null,isWaitingForPrimaryServer:!0})},i[g.a]=function(e,t,n){var i=t.machineIdentifier,r=t.metricsProperties,o=void 0===r?{}:r;e.get("servers").findServer(i).done(function(t){if(t.get("isOutOfDate"))n(b({route:"needsUpdate",options:{serverID:i,replace:!0}}));else if(t.get("isPrimaryEligible")){if(e.get("primaryServer")!==t){var r=t.toJSON()
;Object(c.d)("metrics").trackEvent({event:"client:selectserver",properties:a()({serverType:Object(p.a)(r),serverVersion:t.get("version"),connectionType:Object(h.a)(r.activeConnection),secure:t.get("isSecure")},o)})}e.set({primaryServer:t,isWaitingForPrimaryServer:!1})}else n(b({route:"dashboard"}))}).fail(function(){n(b({route:"dashboard"}))})},i["app/redirectToRoute"]=function(e,t){var n=t.route,i=t.options;l.a.defer(function(){u.a.trigger("navigate",n,i)})},i["app/redirectToHttp"]=function(){
Object(f.a)()},i["app/redirectToUrl"]=function(e,t){var n=t.url;window.location.href=n},i["app/preferInsecure"]=function(){window.localStorage.setItem("preferInsecure","1")},i["app/switchAppLayout"]=function(){Object(d.a)("tv")},i))},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return a()("div",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2455)),c=n.n(l);i.defaultProps={className:c.a.innerContent},t.a=i},function(e,t,n){"use strict"
;function i(e){return s.a.createElement(l.a,a()({},e,{selectedIconAriaLabel:Object(c.default)("Selected")}))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(2478),c=n(4),u=n(26);i.defaultProps={iconComponent:u.a},t.a=i},function(e,t,n){"use strict";function i(e,t){var n=Object(r.d)("appModel"),i=n.get("user"),l=i.get("features").get(o.i),c=void 0;c=l||!s[e]?e:s[e],a.a.trigger("navigate",c,t)}t.a=i;var r=n(15),a=n(17),o=n(52),s={serverSettings:"legacyServerSettings",manage:"legacyServerSettings",
webSettings:"legacyWebSettings",alerts:"legacyAlerts",sync:"legacySync",conversion:"legacyConversion",nowPlaying:"legacyNowPlaying"}},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(170)),a=Object(i.createSelector)(r.a,function(e){return e.metadataItems});t.a=a},function(e,t,n){"use strict";function i(e){var t=e.children,n=s()(e,["children"]);return u.a.createElement("div",a()({className:p.a.modalHeader},n),t)}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),
n(0)),u=n.n(c),d=n(1820),p=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=s()(e,["className","children"]);return u.a.createElement("div",a()({className:t},i),n)}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(1823),p=n.n(d);i.defaultProps={className:p.a.modalFooter},t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return h}),n.d(t,"c",function(){return f}),n.d(t,"b",function(){return v}),n.d(t,"q",function(){return g}),
n.d(t,"n",function(){return m}),n.d(t,"d",function(){return y}),n.d(t,"o",function(){return b}),n.d(t,"r",function(){return I}),n.d(t,"i",function(){return S}),n.d(t,"p",function(){return M}),n.d(t,"j",function(){return D}),n.d(t,"f",function(){return C}),n.d(t,"e",function(){return O}),n.d(t,"h",function(){return j}),n.d(t,"l",function(){return P}),n.d(t,"g",function(){return w}),n.d(t,"k",function(){return T}),n.d(t,"m",function(){return E})
;var i,r=n(7),a=n.n(r),o=n(36),s=n(17),l=n(1832),c=n(78),u=n(34),d=n(90),p=n(193),h="server/confirmRelayConnection",f="server/updateActivity",v="server/finishActivity",g=Object(o.a)("server/testServer"),m=(Object(o.a)("server/testServers"),
Object(o.a)("server/setRelayReminder")),y=Object(o.a)(h),b=Object(o.a)("server/startActivity"),I=Object(o.a)(f),S=Object(o.a)(v),M=Object(o.a)("server/startSyntheticActivity"),D=Object(o.a)("server/finishSyntheticActivity"),C=Object(o.a)("server/eventConnectionOpen"),O=Object(o.a)("server/eventConnectionClose"),j=Object(o.a)("server/fetchProviders"),P=Object(o.a)("server/populateProviders"),w=Object(o.a)("server/fetchLibraries"),T=Object(o.a)("server/populateLibraries"),E=(i={},
i["server/setRelayReminder"]=function(e,t){var n=e.get("experienceSettings"),i=n.get("relayReminders"),r=i[t]||{};i[t]=Object(l.a)(r.times),n.save("relayReminders",a()({},i))},i[h]=function(e,t){},i["server/startActivity"]=function(e,t,n){var i=Object(c.i)(e,t),r=t.activity;i.get("activities").add([r],{parse:!0}),r.synthetic||n(D({serverEntityID:t.serverEntityID,activityType:r.type}))},i[f]=function(e,t){Object(c.i)(e,t).get("activities").add([t.activity],{parse:!0,merge:!0})},
i[v]=function(e,t){Object(c.i)(e,t).get("activities").remove(t.activity.uuid)},i["server/startSyntheticActivity"]=function(e,t,n){Object(u.a)(function(){n(b({serverEntityID:t.serverEntityID,activity:{type:t.activityType,synthetic:!0,uuid:t.activityType+"-"+Date.now()}}))})},i["server/finishSyntheticActivity"]=function(e,t){var n=Object(c.i)(e,t),i=n.get("activities"),r=i.findWhere({type:t.activityType,synthetic:!0});r&&i.remove(r)},i["server/eventConnectionOpen"]=function(e,t){
var n=Object(c.j)(e,t),i=Object(c.i)(e,t),r=i.get("activities");n.set("hasEventConnection",!0),n.get("isFullOwnedServer")&&r.fetch()},i["server/eventConnectionClose"]=function(e,t){Object(c.j)(e,t).set("hasEventConnection",!1)},i["server/fetchProviders"]=Object(d.a)({key:"providers",getModel:c.i}),i["server/populateProviders"]=Object(p.a)({key:"providers",fetchActionType:"server/fetchProviders",getModel:c.i}),i["server/fetchLibraries"]=Object(d.a)({key:"libraries",getModel:c.i}),
i["server/populateLibraries"]=Object(p.a)({key:"libraries",fetchActionType:"server/fetchLibraries",getModel:c.i}),i["server/testServer"]=function(e,t){var n=Object(c.j)(e,t);s.a.trigger("test:server",n)},i["server/testServers"]=function(){s.a.trigger("test:servers")},i)},function(e,t,n){"use strict";n.d(t,"g",function(){return i}),n.d(t,"c",function(){return r}),n.d(t,"m",function(){return a}),n.d(t,"i",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return l}),
n.d(t,"h",function(){return c}),n.d(t,"k",function(){return u}),n.d(t,"l",function(){return d}),n.d(t,"j",function(){return p}),n.d(t,"a",function(){return h}),n.d(t,"b",function(){return f}),n.d(t,"f",function(){return v});var i="picker",r="fallback",a="startup",o="server",s="library",l="list",c="selection",u="settings",d="setupWizard",p="serverDownload",h="agenda",f="calendar",v="navBar"},function(e,t,n){"use strict";var i=n(1),r=n.n(i);r.a.shape({key:r.a.string.isRequired,
value:r.a.oneOfType([r.a.string,r.a.array]).isRequired,operator:r.a.string.isRequired,type:r.a.string})},function(e,t){var n=e.exports={version:"2.5.4"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var i=n(273),r=n.n(i),a=n(5),o=n.n(a),s=n(68),l=n(12),c=n.n(l),u=n(67),d=n(33),p=n(19),h=n(242),f=n(466),v=s.c.Model.extend({mixins:[f.a],cache:new h.a,constructor:function(e,t){if(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"),this.findOption(t,"skipCache"))return void s.c.Model.prototype.constructor.apply(this,arguments);var n=this.cache.getItemCacheKey(this,e),i=this.cache.get(n);return i?(t.parse&&(e=i.parse(e)),this.preserveCachedAttributes&&this.preserveCachedAttributes(t.url)?o.a.each(e,function(e,t){o.a.isUndefined(i.get(t))&&!o.a.isUndefined(e)&&i.set(t,e)}):i.set(e),
i.server=this.server||i.server,i.section=this.section||i.section,i.channel=this.channel||i.channel,i.device=this.device||i.device,i.parent=this.parent||i.parent,t.collection&&(i.collection=t.collection),i):this.findOption(t,"onlyIfCached")?{}:(s.c.Model.prototype.constructor.apply(this,arguments),void this.cache.store(this,n))},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){return o.a.isObject(e)?e:u.a.parseXML(e)},parse:function(e,t){var n=this.convert(e);return this.whitelistedAttrs&&(n=o.a.pick(n,this.whitelistedAttrs)),n},save:function(e,t,n){var i,a,l,u=this.attributes;null==e||"object"===(void 0===e?"undefined":r()(e))?(i=e,n=t):(i={})[e]=t,n=o.a.extend({validate:!0},n);var d=this.getSaveParams(i,n);if(o.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=o.a.extend({},u,i)),o.a.isEmpty(d)&&!n.force)return n.success&&n.success(this),c.a.Deferred().resolve(this);void 0===n.parse&&(n.parse=!0);var h=this,f=n.success;n.success=function(e){if(h.attributes=u,e){var t=h.parse(e,n);if(n.wait&&(t=o.a.extend(i||{},t)),o.a.isObject(t)&&!h.set(t,n))return!1;h.cache.store(h)}f&&f(h,e,n),h.trigger("sync",h,e,n)},s.c.wrapError(this,n),
"patch"===(a=this.isNew()?"create":n.patch?"patch":"update")&&(n.attrs=i);var v=o.a.result(this,"saveUrl")||o.a.result(this,"url");return o.a.isEmpty(d)||(n.url=p.join(v,d)),n.data="",l=this.sync(a,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&&o.a.isFunction(this.cacheKey)?this.cacheKey(this.attributes)+"!"+e:e},restoreDefaults:function(e){
var t=o.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 Object(d.a)(!1,"This model is already capturing events");var e=this.set,t={};this.set=function(n,i,a){var s;"object"===(void 0===n?"undefined":r()(n))?(s=n,a=i):(s={})[n]=i;var l=o.a.extend({},a,{silent:!0}),c=e.call(this,s,l);return o.a.extend(t,this.changed),c},
this.releaseCapturedChangeEvents=function(){o.a.each(t,function(e,t){this.trigger("change:"+t,this,e)},this),o.a.isEmpty(t)||this.trigger("change",this,{}),t={},this.set=e,this.releaseCapturedChangeEvents=null}}});v.extend=function(){var e=s.c.Model.extend.apply(this,arguments);return e.prototype.cache=new h.a,e},t.a=v},function(e,t,n){"use strict";n.d(t,"b",function(){return g}),n.d(t,"a",function(){return m}),n.d(t,"h",function(){return y}),n.d(t,"i",function(){return b}),n.d(t,"f",function(){
return I}),n.d(t,"g",function(){return S}),n.d(t,"u",function(){return M}),n.d(t,"p",function(){return D}),n.d(t,"t",function(){return C}),n.d(t,"o",function(){return O}),n.d(t,"q",function(){return j}),n.d(t,"s",function(){return P}),n.d(t,"r",function(){return w}),n.d(t,"d",function(){return T}),n.d(t,"e",function(){return E}),n.d(t,"k",function(){return x}),n.d(t,"c",function(){return N}),n.d(t,"n",function(){return A}),n.d(t,"l",function(){return L}),n.d(t,"m",function(){return k}),
n.d(t,"j",function(){return _});var i,r=n(30),a=n(19),o=n(346),s=n(34),l=n(171),c=n(78),u=n(36),d=n(343),p=n(490),h=n(344),f=n(661),v=n(60),g="ui/player/playQueue/savePlayQueueState",m="ui/player/playQueue/removePlayQueueState",y=Object(u.a)("ui/player/playQueue/playNextItem"),b=Object(u.a)("ui/player/playQueue/playPreviousItem"),I=Object(u.a)("ui/player/playQueue/playItemByIndex"),S=Object(u.a)("ui/player/playQueue/playItemByKey"),M=(Object(u.a)("ui/player/playQueue/playItemByID"),
Object(u.a)("ui/player/playQueue/toggleShuffle")),D=Object(u.a)("ui/player/playQueue/setRepeat"),C=Object(u.a)("ui/player/playQueue/toggleRepeat"),O=Object(u.a)("ui/player/playQueue/setAutoPlay"),j=Object(u.a)("ui/player/playQueue/showPostPlay"),P=Object(u.a)("ui/player/playQueue/togglePlayerPlayQueueState"),w=Object(u.a)("ui/player/playQueue/togglePlayerLyricsState"),T=Object(u.a)("ui/player/playQueue/fetchPlayQueueItemLyrics"),E=Object(u.a)("ui/player/playQueue/movePlayQueueItem"),x=Object(u.a)("ui/player/playQueue/removePlayQueueItem"),N=Object(u.a)("ui/player/playQueue/fetchPlayQueue"),A=Object(u.a)(g),L=Object(u.a)(m),k=Object(u.a)("ui/player/playQueue/restorePlayQueue"),_=(i={},
i["ui/player/playQueue/playNextItem"]=function(e,t){var n=t.playerType,i=t.isApplicationInitiated,r=Object(l.b)(e,n),a=Object(h.a)(e);Object(s.a)(function(){r.get("isPostPlayVisible")&&r.set({isPostPlayVisible:!1}),a.playNextItem(r,i)})},i["ui/player/playQueue/playPreviousItem"]=function(e,t){var n=t.playerType,i=Object(l.b)(e,n),r=Object(h.a)(e);Object(s.a)(function(){i.set({isPostPlayVisible:!1}),i.get("positionSeconds")>o.a?(r.seek(i,0),r.play(i)):r.playPreviousItem(i)})},
i["ui/player/playQueue/playItemByIndex"]=function(e,t){var n=t.playerType,i=t.index,r=Object(l.b)(e,n),a=Object(h.a)(e);Object(s.a)(function(){a.playItem(r,i)})},i["ui/player/playQueue/playItemByKey"]=function(e,t,n){var i=t.playerType,a=t.key,o=Object(l.b)(e,i),s=o.get("playQueue"),c=s.get("playQueueItems"),u=c.find(function(e){return a===e.get("metadataItem").get("key")});if(u){var d=c.indexOf(u);n(I({playerType:i,index:d}))}else r.a.warn('[Player] Unable to play unknown key "'+a+'"')},
i["ui/player/playQueue/playItemByID"]=function(e,t,n){var i=t.playerType,a=t.playQueueItemID,o=Object(l.b)(e,i),s=o.get("playQueue"),c=s.get("playQueueItems"),u=c.get(a);if(u){var d=c.indexOf(u);n(I({playerType:i,index:d}))}else r.a.warn('[Player] Unable to play unknown PlayQueueItemID "'+a+'"')},i["ui/player/playQueue/toggleShuffle"]=function(e,t,n){var i=t.playerType,r=Object(l.b)(e,i),a=r.get("playQueue");Object(s.a)(function(){var t=a.get("playQueueShuffled"),o=!t
;a.set("playQueueShuffled",o);var s=o?"shuffle":"unshuffle";Object(d.a)(a,{urlPath:s,type:"PUT"}).done(Object(p.a)(r,function(){var t=Object(h.a)(e);n(A({playerType:i})),t.refreshRemotePlayQueue(r)})).fail(Object(p.a)(r,function(){a.set("playQueueShuffled",!o)}))})},i["ui/player/playQueue/setRepeat"]=function(e,t,n){var i=t.playerType,r=t.repeatAll,a=t.repeatOne,o=Object(l.b)(e,i),c=o.get("playQueue"),u=Object(h.a)(e);Object(s.a)(function(){u.setRepeat(o,{repeatAll:r||a,repeatOne:a}),
Object(d.a)(c).done(Object(p.a)(o,function(){n(A({playerType:i}))})).fail(Object(p.a)(o,function(){c.set({repeatAll:!1,repeatOne:!1}),c.set("repeat",!1)}))})},i["ui/player/playQueue/toggleRepeat"]=function(e,t,n){var i=t.playerType,r=Object(l.b)(e,i),a=r.get("repeatAll"),o=r.get("repeatOne");n(D({playerType:i,repeatAll:!a||!o,repeatOne:a&&!o}))},i["ui/player/playQueue/setAutoPlay"]=function(e,t){var n=t.playerType,i=t.autoPlay,r=Object(l.b)(e,n),a=e.get("experienceSettings")
;Object(h.a)(e).changeAutoPlay(r,a,i)},i["ui/player/playQueue/showPostPlay"]=function(e,t,n){var i=t.playerType,r=Object(l.b)(e,i),a=Object(h.a)(e),o=r.get("playQueue"),s=Object(l.a)(r,o.get("currentIndex")),c=s.get("postPlay");r.set({isPostPlayLoading:!0}),c.fetch().done(Object(p.a)(r,function(){var e=c.findWhere({upNext:!0});c.remove(e),r.set({isPostPlayVisible:!0,isSettingsVisible:!1,isPostPlayLoading:!1}),a.pause(r,!0)}))},i["ui/player/playQueue/togglePlayerPlayQueueState"]=function(e,t){
var n=t.playerType,i=Object(l.b)(e,n),r=i.get("isPlayQueueVisible");Object(s.a)(function(){i.set(Object(f.a)(i,r,{isSettingsVisible:!1,isPlayQueueVisible:!r,isLyricsVisible:!1}))})},i["ui/player/playQueue/togglePlayerLyricsState"]=function(e,t){var n=t.playerType,i=Object(l.b)(e,n),r=i.get("isLyricsVisible");Object(s.a)(function(){i.set(Object(f.a)(i,r,{isSettingsVisible:!1,isLyricsVisible:!r,isPlayQueueVisible:!1}))})},i["ui/player/playQueue/fetchPlayQueueItemLyrics"]=function(e,t,n){
var i=t.streamID,r=Object(c.f)(e,t),a=r.get("lyricsStreams").get(i);a.set("lyricsError",null),a.fetch({merge:!0}).fail(function(e){a.set("lyricsError",e)})},i["ui/player/playQueue/movePlayQueueItem"]=function(e,t,n){var i=t.playerType,r=t.playQueueItemEntityID,o=t.moveIndex,u=Object(l.b)(e,i),f=u.get("playQueue"),v=Object(c.f)(e,{playQueueItemEntityID:r}),g=f.get("playQueueItems"),m=g.indexOf(v);if(m!==o&&m!==o-1){var y=o>m?o-1:o,b=o>0?g.at(o-1).id:void 0,I=a.join(["items",v.id,"move"]),S={
after:b};Object(s.a)(function(){g.remove(v),g.add(v,{at:y}),Object(d.a)(f,{urlPath:I,params:S,type:"PUT"}).done(Object(p.a)(u,function(){var t=Object(h.a)(e);n(A({playerType:i})),t.refreshRemotePlayQueue(u)})).fail(Object(p.a)(u,function(){g.indexOf(v)===y&&(g.remove(v),g.add(v,{at:m}))}))})}},i["ui/player/playQueue/removePlayQueueItem"]=function(e,t,n){var i=t.playerType,r=t.playQueueItemEntityID,o=Object(l.b)(e,i),u=o.get("playQueue"),f=u.get("playQueueItems"),v=Object(c.f)(e,{
playQueueItemEntityID:r}),g=f.indexOf(v),m=a.join(["items",v.id]);Object(s.a)(function(){f.remove(v),Object(d.a)(u,{urlPath:m,type:"DELETE"}).done(Object(p.a)(o,function(){var t=Object(h.a)(e);n(A({playerType:i})),t.refreshRemotePlayQueue(o)})).fail(Object(p.a)(o,function(){f.add(v,{at:g})}))})},i["ui/player/playQueue/fetchPlayQueue"]=function(e,t){var n=t.playerType,i=Object(l.b)(e,n),r=i.get("playQueue");Object(d.a)(r)},i[g]=function(e,t){t.playerType},i[m]=function(e){},
i["ui/player/playQueue/restorePlayQueue"]=function(e,t,n){var i=t.serverEntityID,r=t.providerEntityID,a=t.playQueueType,o=t.playQueueOffset,s=t.playQueueRepeat,l=t.playQueueID,c=t.next,u={serverEntityID:i,providerEntityID:r,startOffsetMilliseconds:1e3*o,options:{type:a,playQueueRepeat:s,playQueueID:l,next:c}};n(Object(v.h)(u))},i)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0
;return Object(r.createSelector)(Object(o.a)(),s.a,function(t,n){var i=t?t.playQueueItems:[];if(i.length){var r=t.currentIndex,o=t.playQueueTotalCount,s=r+e;t.repeat&&(s=Object(a.a)(r,e,o));var l=i[s];return l&&n[l]}})}var r=n(6),a=(n.n(r),n(1780)),o=n(935),s=n(662);t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Object(c.d)("metrics").trackClick(o()({page:n,action:e,type:t.get("type")},i))}
Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"ADD_METADATA_ITEM_TO_PLAYLIST",function(){return z}),n.d(t,"ANALYZE_METADATA_ITEM",function(){return U}),n.d(t,"DELETE_METADATA_ITEM",function(){return B}),n.d(t,"DELETE_METADATA_ITEM_VERSION",function(){return V}),n.d(t,"DOWNLOAD_METADATA_ITEM_VERSION",function(){return F}),n.d(t,"EDIT_METADATA_ITEM",function(){return Q}),n.d(t,"FIX_METADATA_ITEM_MATCH",function(){return H}),n.d(t,"GET_METADATA_ITEM_INFO",function(){return Y}),
n.d(t,"UPDATE_METADATA_ITEM_PLAYED_STATUS",function(){return W}),n.d(t,"OPTIMIZE_METADATA_ITEM",function(){return G}),n.d(t,"RATE_METADATA_ITEM",function(){return K}),n.d(t,"RECOMMEND_METADATA_ITEM",function(){return q}),n.d(t,"REFRESH_METADATA_ITEM",function(){return Z}),n.d(t,"SPLIT_METADATA_ITEM_APART",function(){return X}),n.d(t,"SYNC_METADATA_ITEM",function(){return J}),n.d(t,"UNMATCH_METADATA_ITEM",function(){return $}),n.d(t,"WATCH_METADATA_ITEM_LATER",function(){return ee}),
n.d(t,"CHANGE_METADATA_ITEM_FIELD",function(){return te}),n.d(t,"UPDATE_METADATA_ITEM_REFRESHING_STATE",function(){return ne}),n.d(t,"TOGGLE_METADATA_ITEM_SAVE",function(){return ie}),n.d(t,"UPDATE_METADATA_SETTINGS",function(){return re}),n.d(t,"CLEAR_METADATA_SETTINGS_ERROR",function(){return ae}),n.d(t,"addMetadataItemToPlaylist",function(){return oe}),n.d(t,"analyzeMetadataItem",function(){return se}),n.d(t,"deleteMetadataItem",function(){return le}),
n.d(t,"deleteMetadataItemVersion",function(){return ce}),n.d(t,"downloadMetadataItemVersion",function(){return ue}),n.d(t,"editMetadataItem",function(){return de}),n.d(t,"fixMetadataItemMatch",function(){return pe}),n.d(t,"getMetadataItemInfo",function(){return he}),n.d(t,"updateMetadataItemPlayedStatus",function(){return fe}),n.d(t,"optimizeMetadataItem",function(){return ve}),n.d(t,"rateMetadataItem",function(){return ge}),n.d(t,"recommendMetadataItem",function(){return me}),
n.d(t,"refreshMetadataItem",function(){return ye}),n.d(t,"splitMetadataItemApart",function(){return be}),n.d(t,"syncMetadataItem",function(){return Ie}),n.d(t,"unmatchMetadataItem",function(){return Se}),n.d(t,"watchMetadataItemLater",function(){return Me}),n.d(t,"changeMetadataItemField",function(){return De}),n.d(t,"updateMetadataItemRefreshingState",function(){return Ce}),n.d(t,"toggleMetadataItemSave",function(){return Oe}),n.d(t,"updateMetadataSettings",function(){return je}),
n.d(t,"clearMetadataSettingsError",function(){return Pe}),n.d(t,"favoriteMetadataItem",function(){return we}),n.d(t,"unfavoriteMetadataItem",function(){return Te}),n.d(t,"markMetadataItemUnplayed",function(){return Ee}),n.d(t,"markMetadataItemPlayed",function(){return xe}),n.d(t,"metadataActionHandlers",function(){return Ne})
;var r,a=n(7),o=n.n(a),s=n(12),l=n.n(s),c=n(15),u=n(4),d=n(17),p=n(19),h=n(73),f=n(43),v=n(40),g=n(104),m=n(498),y=n(32),b=n(36),I=n(974),S=n(1887),M=n(975),D=n(976),C=n(978),O=n(76),j=n(499),P=n(980),w=n(1936),T=n(394),E=n(1937),x=n(502),N=n(1979),A=n(688),L=n(689),k=n(246),_=n(282),R=n(139),z="metadata/addMetadataItemToPlaylist",U="metadata/analyzeMetadataItem",B="metadata/deleteMetadataItem",V="metadata/deleteMetadataItemVersion",F="metadata/downloadMetadataItemVersion",Q="metadata/editMetadataItem",H="metadata/fixMetadataItemMatch",Y="metadata/getMetadataItemInfo",W="metadata/updateMetadataItemPlayedStatus",G="metadata/optimizeMetadataItem",K="metadata/rateMetadataItem",q="metadata/recommendMetadataItem",Z="metadata/refreshMetadataItem",X="metadata/splitMetadataItemApart",J="metadata/syncMetadataItem",$="metadata/unmatchMetadataItem",ee="metadata/watchMetadataItemLater",te="metadata/changeMetadataItemField",ne="metadata/updateMetadataItemRefreshingState",ie="metadata/toggleMetadataItemSave",re="metadata/UPDATE_METADATA_SETTINGS",ae="CLEAR_METADATA_SETTINGS_ERROR",oe=Object(b.a)(z),se=Object(b.a)(U),le=Object(b.a)(B),ce=Object(b.a)(V),ue=Object(b.a)(F),de=Object(b.a)(Q),pe=Object(b.a)(H),he=Object(b.a)(Y),fe=Object(b.a)(W),ve=Object(b.a)(G),ge=Object(b.a)(K),me=Object(b.a)(q),ye=Object(b.a)(Z),be=Object(b.a)(X),Ie=Object(b.a)(J),Se=Object(b.a)($),Me=Object(b.a)(ee),De=Object(b.a)(te),Ce=Object(b.a)(ne),Oe=Object(b.a)(ie),je=Object(b.a)(re),Pe=Object(b.a)(ae),we=Object(b.a)(K,function(e){
return o()({},e,{rating:m.a})}),Te=Object(b.a)(K,function(e){return o()({},e,{rating:m.b})}),Ee=Object(b.a)(W,function(e){return o()({},e,{played:!1})}),xe=Object(b.a)(W,function(e){return o()({},e,{played:!0})}),Ne=o()({},_.b,(r={},r[z]=function(e,t){var n=Object(g.b)(e,t),r=new j.a({model:n,title:n.get("title")});d.a.trigger("show:modal",r),i(h.b,n,t.metricsPage)},r[U]=function(e,t,n){var i=Object(g.b)(e,t),r=t.metricsPage,a={allowMetrics:!!r,metricsProperties:{page:r}}
;Object(C.a)(i,a).fail(function(e){n(Object(k.b)(Object(u.default)("There was a problem analyzing this item.")))})},r[F]=function(e,t){var n=Object(g.b)(e,t),i=new N.a({model:n});d.a.trigger("show:modal",i)},r[B]=function(e,t){var n=Object(g.b)(e,t),r=t.options||{},a=n.get("isPlaylist")?"deletePlaylist":"deleteItems";y.a.execute(a,o()({item:n},r)),i(h.l,n,t.metricsPage)},r[V]=function(e,t){var n=Object(g.b)(e,t);y.a.execute("deleteVersions",{item:n}),i(h.l,n,t.metricsPage)},r[Q]=function(e,t){
var n=Object(g.b)(e,t),r=n.get("isPlaylist")?new w.a({model:n}):new P.a({model:n});d.a.trigger("show:modal",r),i(h.r,n,t.metricsPage)},r[H]=function(e,t){var n=Object(g.b)(e,t),r=new E.a({model:n});d.a.trigger("show:modal",r),i(h.u,n,t.metricsPage)},r[Y]=function(e,t){var n=Object(g.b)(e,t),r=new L.a({model:n});d.a.trigger("show:modal",r),i(h.x,n,t.metricsPage)},r[W]=function(e,t,n){var r=Object(g.b)(e,t);Object(I.a)(e,t).then(function(){n(Object(R.b)({serverEntityID:t.serverEntityID}))
},function(){var e=t.played?Object(u.default)("There was an unexpected error marking an item played."):Object(u.default)("There was an unexpected error marking an item unplayed.");n(Object(k.b)(e))}),i(t.played?h.B:h.A,r,t.metricsPage)},r[G]=function(e,t){var n=Object(g.b)(e,t),r=new x.a({item:n});d.a.trigger("show:modal",r),i(h.E,n,t.metricsPage)},r[K]=function(e,t,n){var i=t.rating,r=t.metricsPage,a=Object(g.e)(e,t),o=Object(g.b)(e,t),s={rating:i,allowMetrics:!!r,metricsProperties:{page:r}}
;Object(M.a)(a,o,s).fail(function(e){n(Object(k.b)(Object(u.default)("There was a problem rating this item.")))})},r[q]=function(e,t){var n=Object(g.b)(e,t),r=new A.a({model:n});d.a.trigger("show:modal",r),i(h.O,n,t.metricsPage)},r[Z]=function(e,t,n){var i=Object(g.b)(e,t),r=t.metricsPage,a={allowMetrics:!!r,metricsProperties:{page:r}};Object(D.a)(i,a).fail(function(e){503===e.status?d.a.trigger("show:modal",new T.a({model:i.server
})):n(Object(k.b)(Object(u.default)("There was a problem refreshing this item.")))})},r[X]=function(e,t,n){var r=Object(g.b)(e,t);y.a.execute("splitApart",{item:r,skipNavigate:!0}).done(function(){n(Object(R.b)({serverEntityID:t.serverEntityID}))}),i(h.W,r,t.metricsPage)},r[J]=function(e,t){var n=Object(g.b)(e,t);y.a.execute("showSyncModal",{item:n}),i(h.Y,n,t.metricsPage)},r[$]=function(e,t){var n=Object(g.b)(e,t);y.a.execute("unmatch",{item:n}),i(h.Z,n,t.metricsPage)},r[ee]=function(e,t){
var n=Object(g.b)(e,t);y.a.execute("watchLater",{item:n}),i(h._1,n,t.metricsPage)},r[te]=function(e,t,n){var r,a=t.providerEntityID,o=t.metadataItemEntityID,s=t.name,c=t.value,d=Object(g.b)(e,{metadataItemEntityID:o}),f=Object(g.e)(e,{providerEntityID:a}),v=p.join(d.get("key"),(r={},r[s]=c,r[s+".locked"]=1,r)),m=f.getXHROptions(v,{type:"PUT"});l.a.ajax(m).fail(function(e){n(Object(k.b)(Object(u.default)("There was a problem editing this item.")))}),i(h.r,d,t.metricsPage)},r[ne]=function(e,t){
var n=Object(g.i)(e,t);n&&n.set({metadataState:t.metadataState,mediaState:t.mediaState})},r[ie]=function(e,t,n){var i=Object(g.e)(e,t),r=Object(g.b)(e,t),a=r.get("grandparentRatingKey")||r.get("ratingKey"),o=r.get("grandparentKey"),s=void 0;if(o){var c=Object(v.a)(f.g,o,t.serverEntityID);s=Object(g.i)(e,{metadataItemEntityID:c})}var u=r.get("saved"),d=!u;r.set("saved",d),s&&s.set("saved",d)
;var h=i.get("features").get(O.b.ACTIONS).get("actions").get("save"),m=d?h.get("key"):h.get("reverseKey"),y=p.join(m,{ratingKey:a}),b=i.getXHROptions(y,{type:"PUT"});l.a.ajax(b).then(function(){n(Object(R.b)({serverEntityID:t.serverEntityID}))},function(){r.set("saved",u),s&&s.set("saved",u)})},r[re]=function(e,t,n){var i=Object(g.e)(e,t),r=Object(g.b)(e,t),a=t.data;Object(S.a)(i,r,a).then(function(){n(Object(_.d)({serverEntityID:t.serverEntityID,metadataItemEntityID:t.metadataItemEntityID}))})
},r[ae]=function(e,t,n){Object(g.b)(e,t).set("settingsUpdateError",null)},r))},function(e,t,n){"use strict";function i(e,t,n){if(n)switch(n){case o.i:switch(e){case"genre":case"channel":return l}break;case o.h:switch(e){case"episode":return c}break;case o.a:case o.d:return c;case o.e:switch(e){case"movie":case"episode":return c}break;case o.g:case o.f:switch(e){case"episode":return c}}switch(t){case"podcast":switch(e){case"show":return l}}switch(e){case"movie":case"show":case"season":
case"episode":return s;case"artist":case"album":case"track":case"photo":case"photoalbum":return l;case"clip":return c;case"collection":return s;case"extra":case"musicVideo":return c;case"mixed":return s;case"genre":case"channel":return c;default:return l}}function r(e,t,n,r){var a=i(t,n,r);return Math.round(e*a)}function a(e,t,n,r){var a=i(t,n,r);return Math.round(e/a)}n.d(t,"b",function(){return s}),n.d(t,"a",function(){return c}),t.c=i,t.e=r,t.d=a;var o=n(31),s=1/1.5,l=1,c=16/9
},function(e,t,n){"use strict";function i(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e&&t&&n){var o=encodeURIComponent(e.machineIdentifier);if(t.isLibraryProvider){if(e.isCloudSyncServer){var s=encodeURIComponent(n+"/all");return r.join("#!/server/"+o+"/list?key="+s,i)}var l="/"===String(n).charAt(0),c=l?n:"/library/sections/"+n,u=encodeURIComponent(c);return r.join("#!/server/"+o+"?key="+u,i)}var d=encodeURIComponent(n),p=Object(a.a)(e,t)
;return r.join("#!"+p+"?key="+d,i)}}t.a=i;var r=n(19),a=n(507)},function(e,t,n){"use strict";function i(e,t){return function(n){return s.a.createElement(t,a()({},e,n))}}t.a=i;var r=n(7),a=n.n(r),o=n(0),s=n.n(o)},function(e,t,n){"use strict";function i(e){var t=function(t){function n(e,i){c()(this,n);var r=d()(this,t.call(this,e,i));return r.onMoveTimeout=function(){r.setState({isMoving:!1})},r.state={isMoving:!1},r}return h()(n,t),n.prototype.componentDidMount=function(){this._setRenderedItem(),
this._setVisibleItem()},n.prototype.componentWillReceiveProps=function(e,t){var n=this.props[this.props.keyPropName],i=e[e.keyPropName];null!=n&&n===i?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())},n.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},
n.prototype.componentDidUpdate=function(){this._setRenderedItem(),this._setVisibleItem()},n.prototype.componentWillUnmount=function(){this._clearMoveTimeout()},n.prototype._setRenderedItem=function(){this.props.isScrolling||(this._renderedItem=this.props[this.props.keyPropName])},n.prototype._setVisibleItem=function(){this.props.isVisible&&(this._visibleItem=this.props[this.props.keyPropName])},n.prototype._clearMoveTimeout=function(){
this._moveTimeoutID&&(this._moveTimeoutID=clearTimeout(this._moveTimeoutID))},n.prototype.render=function(){var t=this.props,n=t.className,i=t.keyPropName,r=t.isScrolling,o=t.isVisible,l=(t.moveTimeout,s()(t,["className","keyPropName","isScrolling","isVisible","moveTimeout"])),c=l[i],u=r&&c!==this._renderedItem,d=!o&&c!==this._visibleItem;return g.a.createElement(e,a()({className:(n||"")+" "+(I.a.cell||"")+" "+(this.state.isMoving&&I.a.isMoving||""||""),showScrollPlaceholder:u,
showOffscreenPlaceholder:d},l))},n}(v.Component);return t.displayName="Virtualized("+Object(m.a)(e)+")",t.WrappedComponent=e,t.defaultProps={moveTimeout:400,isScrolling:!1,isVisible:!0},t}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(153),y=n(29),b=n(2439),I=n.n(b);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className;return a()("div",{className:t})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(2457)),c=n.n(l);i.defaultProps={className:c.a.divider},t.a=i},function(e,t,n){"use strict";function i(e){return s.a.createElement(l.a,a()({iconClassName:u.a.icon,icon:"plex-icon-alert-560"},e))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(157),c=n(2658),u=n.n(c);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(24),m=n(355),y=n(22),b=n(2686),I=n.n(b),S=function(e){function t(){
return l()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.tooltip,i=e.className,a=e.tooltipAttachment,s=e.hideOnPress,l=e.onPress,c=o()(e,["children","tooltip","className","tooltipAttachment","hideOnPress","onPress"]);return v.a.createElement(m.a,r()({className:i,"aria-label":n,component:y.a,tooltip:n,tooltipClassName:I.a[a],hideOnPress:s,onPress:l},c),t)},t}(f.Component);S.defaultProps={className:I.a.toolbarButton,
tooltipAttachment:g.f.BOTTOM_CENTER},t.a=S},,function(e,t,n){"use strict";var i=n(4),r=n(275),a=["id","typeString"],o=Object(r.a)(a,[{id:1,typeString:"video",key:"videoStreamID",title:function(){return Object(i.default)("Video")}},{id:2,typeString:"audio",key:"audioStreamID",title:function(){return Object(i.default)("Audio")}},{id:3,typeString:"subtitles",key:"subtitleStreamID",title:function(){return Object(i.default)("Subtitles")}},{id:4,typeString:"lyrics",key:"lyricStreamID",
title:function(){return Object(i.default)("Lyrics")}}]);t.a=o},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(475),o=n(870),s=r.a.extend({},a.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,n){
if(!e||!t)return[];if(Array.isArray(e)||(e=[e]),0===e.length)return[];var i=t.get("transcoderVideo"),a=t.get("transcoderVideoRemuxOnly"),s=this.getMaximumResolution(e);if(!i||a||!s)return[];var l=t.get("maxUploadBitrate"),c=r.a.extend({},n,{comparator:function(e){if(l&&this.qualities.bitrate[e]>l)return!0;var t=this.qualities.videoResolution[e].split("x");return Object(o.a)(t[0],t[1])>s}});return this.getAvailableQualities(c)},getNearestIndexToBitrate:function(e){
return this.getNearestIndex(this.qualities.bitrate,e)},getMinimumQuality:function(e,t){return(e===s.ORIGINAL?Number.MAX_VALUE:e)<(t===s.ORIGINAL?Number.MAX_VALUE:t)?e:t},getMaximumQuality:function(e,t){return this.getMinimumQuality(e,t)===e?t:e},getMaximumResolution:function(e){return e.reduce(function(e,t){if(!t.width&&!t.height)return e;var n=Object(o.a)(t.width,t.height);return null===e||n>e?n:e},null)},isExplicitQuality:function(e){return e!==s.ORIGINAL&&e!==s.CONVERT_AUTOMATICALLY}});t.a=s
},function(e,t,n){"use strict";function i(e,t,n){return Math.max(0,Math.min(t-s.b,e+n))}n.d(t,"c",function(){return E}),n.d(t,"a",function(){return _}),n.d(t,"b",function(){return R}),n.d(t,"n",function(){return z}),n.d(t,"w",function(){return U}),n.d(t,"y",function(){return B}),n.d(t,"z",function(){return V}),n.d(t,"v",function(){return F}),n.d(t,"x",function(){return Q}),n.d(t,"i",function(){return H}),n.d(t,"s",function(){return Y}),n.d(t,"t",function(){return W}),n.d(t,"m",function(){
return G}),n.d(t,"o",function(){return K}),n.d(t,"p",function(){return q}),n.d(t,"q",function(){return Z}),n.d(t,"r",function(){return X}),n.d(t,"h",function(){return J}),n.d(t,"u",function(){return $}),n.d(t,"e",function(){return ee}),n.d(t,"f",function(){return te}),n.d(t,"g",function(){return ne}),n.d(t,"d",function(){return ie}),n.d(t,"k",function(){return re}),n.d(t,"j",function(){return ae}),n.d(t,"l",function(){return oe})
;var r,a=n(7),o=n.n(a),s=n(346),l=n(1781),c=n(663),u=n(34),d=n(78),p=n(171),h=n(19),f=n(36),v=n(664),g=n(343),m=n(665),y=n(1782),b=n(661),I=n(1784),S=n(1785),M=n(1786),D=n(490),C=n(344),O=n(666),j=n(1787),P=n(282),w=n(1789),T=n(118),E="ui/player/playerMedia/updatePlayerPosition",x="ui/player/playerMedia/togglePlayPause",N="ui/player/playerMedia/seek",A="ui/player/playerMedia/skipBack",L="ui/player/playerMedia/stepBack",k="ui/player/playerMedia/changeVolume",_="ui/player/playerSettings/changeQualityIndex",R="ui/player/playerSettings/changeStream",z=Object(f.a)("ui/player/playerMedia/sendTimeline"),U=Object(f.a)("ui/player/playerMedia/updatePlayerDuration"),B=Object(f.a)(E),V=Object(f.a)("ui/player/playerMedia/updatePlayerSeekRange"),F=Object(f.a)("ui/player/playerMedia/updatePlayerBuffering"),Q=(Object(f.a)("ui/player/playerMedia/updatePlayerLoading"),
Object(f.a)("ui/player/playerMedia/updatePlayerError")),H=Object(f.a)("ui/player/playerMedia/clearPlayerError"),Y=Object(f.a)("ui/player/playerMedia/tickPlayer"),W=Object(f.a)(x),G=Object(f.a)(N),K=(Object(f.a)("ui/player/playerMedia/transcodeSeek"),
Object(f.a)(A)),q=Object(f.a)("ui/player/playerMedia/skipForward"),Z=Object(f.a)(L),X=Object(f.a)("ui/player/playerMedia/stepForward"),J=Object(f.a)(k),$=Object(f.a)("ui/player/playerSettings/togglePlayerSettingsState"),ee=Object(f.a)(_),te=Object(f.a)(R),ne=Object(f.a)("ui/player/playerSettings/changeSubtitleSize"),ie=Object(f.a)("ui/player/playerMedia/changePlaybackSpeed"),re=Object(f.a)(x,function(e){return o()({},e,{shouldPlay:!0})}),ae=Object(f.a)(x,function(e){return o()({},e,{
shouldPause:!0})}),oe=(Object(f.a)(k,function(e){return o()({},e,{delta:l.a})}),Object(f.a)(k,function(e){return o()({},e,{delta:-l.a})}),r={},r["ui/player/playerMedia/sendTimeline"]=function(e,t,n){var i=t.playerType,r=t.providerEntityID,a=t.shouldRefreshPlayQueue,s=t.options,l=void 0===s?{}:s,c=Object(p.b)(e,i),u=d.h(e,{providerEntityID:r}),h=d.f(e,t),f={state:Object(m.a)(c),playbackSessionID:v.a};Object(y.a)(u,h,o()({},f,l)).done(Object(D.a)(c,function(e){n(Object(T.n)({playerType:i}))
;var t=e.bandwidthTimeline,r=e.captureBuffer,o=e.transcodeSession;c.set("bandwidthTimeline",t);var s=c.get("liveTVSession");o?(n(V({playerType:i,seekStartSeconds:o.seekStartSeconds,seekEndSeconds:o.seekEndSeconds})),s&&o.startedAt&&s.set({startedAt:o.startedAt,captureBuffer:r})):r&&(n(V({playerType:i,seekStartSeconds:r.seekStartSeconds,seekEndSeconds:r.seekEndSeconds})),s&&r.startedAt&&s.set({startedAt:r.startedAt}));var l=c.get("playQueue")
;a&&l.get("playQueueSelectedItemID")===h.get("playQueueItemID")&&Object(g.a)(l).done(Object(D.a)(c,function(){n(Object(T.n)({playerType:i}))})),e.terminationCode&&(n(Object(T.l)()),c.restoreDefaults({hasError:!0,errorMessage:e.terminationText}))}))},r["ui/player/playerMedia/updatePlayerDuration"]=function(e,t){var n=t.playerType,i=t.durationMilliseconds,r=Object(p.b)(e,n),a=Object(O.a)(r),o=a.get("metadataItem"),s=Object(j.a)(r);if(s){
var l=o.get("Media")[s.mediaIndex],u=Object(c.a)(l),d=!!u&&"vbr"===u.bitrateMode,h=i>0&&!d,f=h?i:l.duration;r.set({isMediaLoading:!1,durationSeconds:Math.floor((f||0)/1e3)})}},r[E]=function(e,t){var n=t.playerType,i=t.positionSeconds,r=Object(p.b)(e,n);Object(u.a)(function(){var e={positionSeconds:i};i>r.get("lastSeekPositionSeconds")&&(e.lastSeekPositionSeconds=null),r.set(e)})},r["ui/player/playerMedia/updatePlayerSeekRange"]=function(e,t){
var n=t.playerType,i=t.seekStartSeconds,r=t.seekEndSeconds;Object(p.b)(e,n).set({seekStartSeconds:i,seekEndSeconds:r})},r["ui/player/playerMedia/updatePlayerBuffering"]=function(e,t){var n=t.playerType,i=t.isBuffering;Object(p.b)(e,n).set({isBuffering:i})},r["ui/player/playerMedia/updatePlayerLoading"]=function(e,t){var n=t.playerType,i=t.isMediaLoading;Object(p.b)(e,n).set({isMediaLoading:i})},r["ui/player/playerMedia/updatePlayerError"]=function(e,t){Object(p.b)(e,t.playerType).set({
isMediaLoading:!1,hasError:!0,errorMessage:t.errorMessage,errorCode:t.errorCode,errorCategory:t.errorCategory})},r["ui/player/playerMedia/clearPlayerError"]=function(e,t){var n=t.playerType,i=Object(p.b)(e,n);Object(u.a)(function(){i.set({hasError:!1,errorMessage:null,errorCode:null,errorCategory:null})})},r["ui/player/playerMedia/tickPlayer"]=function(e,t,n){var i=t.playerType,r=(t.index,t.secondsElapsed),a=Object(p.b)(e,i),o=a.get("playQueue"),s=Object(j.a)(a);if(s){
var l=a.get("isPaused"),c=!(r%10),u=!(r%30);if(c){var h=o.get("playQueueSelectedItemID"),f=o.get("playQueueItems").get(h);n(z({playerType:i,providerEntityID:a.get("providerEntityID"),playQueueItemEntityID:f.entityID(),options:{positionSeconds:a.get("positionSeconds"),durationSeconds:a.get("durationSeconds"),mediaIndex:s.mediaIndex,partIndex:s.partIndex,partCount:s.partCount}}))}if(u&&l&&s.transcodeSessionID){var v=s.transcodeServerEntityID,g=d.j(e,{serverEntityID:v})
;Object(I.a)(g,s.transcodeSessionID)}}},r[x]=function(e,t){var n=t.playerType,i=t.shouldPlay,r=t.shouldPause,a=t.isApplicationInitiated,o=Object(p.b)(e,n),s=Object(C.a)(e),l=void 0;if(o.get("isPostPlayVisible"))return void Object(u.a)(function(){o.set({isPostPlayVisible:!1}),s.playNextItem(o,!0)});l=i?"play":r?"pause":o.get("isPaused")?"play":"pause",Object(u.a)(function(){s[l](o,a)})},r[N]=function(e,t){var n=t.playerType,i=t.positionSeconds,r=Object(p.b)(e,n),a=Object(C.a)(e)
;Object(u.a)(function(){a.seek(r,i)})},r["ui/player/playerMedia/transcodeSeek"]=function(e,t){var n,i=t.playerType,r=t.positionSeconds,a=Object(p.b)(e,i),s=Object(O.a)(a),l=Object(j.a)(a);if(l){var c=s.entityID(),u=Object(h.parseUrl)(l.url),d=u.origin,f=u.pathname,v=u.params;v.offset=r;var g=Object(h.join)([d,f],v),m=o()({},l,{url:g});a.set({currentDecision:m,decisions:o()({},a.get("decisions"),(n={},n[c]=m,n))})}},r[A]=function(e,t){
var n=t.playerType,r=Object(p.b)(e,n),a=Object(C.a)(e),o=i(r.get("positionSeconds"),r.get("durationSeconds"),-s.c);Object(u.a)(function(){a.seek(r,o)})},r["ui/player/playerMedia/skipForward"]=function(e,t){var n=t.playerType,r=Object(p.b)(e,n),a=Object(C.a)(e),o=r.get("positionSeconds"),l=r.get("durationSeconds");if(l-o>s.b){var c=i(o,l,s.d);Object(u.a)(function(){a.seek(r,c)})}},r[L]=function(e,t){
var n=t.playerType,r=Object(p.b)(e,n),a=Object(C.a)(e),o=Object(O.a)(r),l=o.get("metadataItem"),c=l.get("chapters"),d=r.get("positionSeconds"),h=r.get("durationSeconds"),f=void 0;f=c&&c.length?Object(S.a)(c,d):i(d,h,-s.e),Object(u.a)(function(){a.seek(r,f)})},r["ui/player/playerMedia/stepForward"]=function(e,t){var n=t.playerType,r=Object(p.b)(e,n),a=Object(C.a)(e),o=Object(O.a)(r),l=o.get("metadataItem"),c=l.get("chapters"),d=r.get("positionSeconds"),h=r.get("durationSeconds"),f=void 0
;c&&c.length?f=Object(M.a)(c,d):h-d>s.b&&(f=i(d,h,s.f)),null!=f&&Object(u.a)(function(){a.seek(r,f)})},r[k]=function(e,t){var n=t.playerType,i=t.volume,r=t.delta,a=Object(w.a)(e),o=r?a+r:i;if((o=Math.max(0,Math.min(100,o)))!==a){var s=Object(p.b)(e,n),l=e.get("experienceSettings"),c=Object(C.a)(e);Object(u.a)(function(){c.changeVolume(s,l,o)})}},r["ui/player/playerSettings/togglePlayerSettingsState"]=function(e,t){var n=t.playerType,i=Object(p.b)(e,n),r=i.get("isSettingsVisible")
;Object(u.a)(function(){i.set(Object(b.a)(i,r,{isSettingsVisible:!r,isPlayQueueVisible:!1,isLyricsVisible:!1}))})},r[_]=function(e,t){var n=t.playerType,i=t.qualityIndex,r=Object(p.b)(e,n);Object(C.a)(e).changeQualityIndex(r,i)},r[R]=function(e,t,n){var i=t.playerType,r=t.streamTypeString,a=t.streamID,o=Object(p.b)(e,i),s=Object(O.a)(o),l=s.get("metadataItem"),c=Object(C.a)(e);n(Object(P.e)({metadataItemEntityID:l.entityID(),mediaIndex:o.get("mediaIndex"),streamTypeString:r,streamID:a})),
c.changeStream(o,r,a)},r["ui/player/playerSettings/changeSubtitleSize"]=function(e,t){var n=t.playerType,i=t.subtitleSize,r=Object(p.b)(e,n),a=e.get("experienceSettings");Object(C.a)(e).changeSubtitleSize(r,a,i)},r["ui/player/playerMedia/changePlaybackSpeed"]=function(e,t){var n=t.playerType,i=t.playbackSpeed,r=Object(p.b)(e,n),a=Object(C.a)(e),o=Math.round(10*i)/10;a.changePlaybackSpeed(r,o)},r)},function(e,t,n){"use strict";function i(e){
var t=e.children,n=e.metricsPage,i=e.metricsProperties,r=s()(e,["children","metricsPage","metricsProperties"]);return u.a.createElement(d.a,r,u.a.createElement(p.a,a()({},i,{page:n}),t))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(1815),p=n(284);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.errorClassName,r=e.name,o=e.hasError,l=s()(e,["children","className","errorClassName","name","hasError"])
;return u.a.createElement("label",a()({},l,{className:(n||"")+" "+(o&&i||""||""),htmlFor:r}),t)}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2004),p=n.n(d);i.defaultProps={className:p.a.label,errorClassName:p.a.hasError},t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments[4];if(e&&t&&n){var l=Object(o.a)(e,t),c=encodeURIComponent(n),u=s===a.i?"playlist":"details",d="#!"+l+"/"+u+"?key="+c
;return r.join(d,i)}}t.a=i;var r=n(19),a=n(28),o=n(507)},function(e,t,n){"use strict";function i(e){return e.get("ui").get("dvrSettingsUI").get("dvrSetup")}function r(e){return e.get("ui").get("dvrSettingsUI").get("dvrs")}function a(e,t){return r(e).get(t.dvrID)}function o(e,t){var n=i(e),r=t.deviceID;if(t.dvrID&&r){var o=a(e,t).get("devices").get(r);if(o)return o}if(r){var s=n.get("devices").get(r);if(s)return s}return n.get("selectedDevice")}function s(e,t){if(t.country)return t.country
;var n=i(e),r=n.get("epgSettings").get("selectedCountry");return r?r.get("code"):void 0}function l(e,t){if(t.dvrID&&t.deviceID){return o(e,t).get("channelMappings")}return i(e).get("channelMappings")}function c(e,t){var n=i(e),r=Object(P.h)(e,t),a=o(e,t),s=a.get("channels"),c=t.data,u=[],d={};h()(c).forEach(function(e){var t=c[e],n=t.enabled,i=t.lineupIdentifier,r=s.get(e),a=!(!r||!r.get("drm"));n&&i&&!a&&u.push(e),i&&(d["channelMapping["+e+"]"]=i)})
;var p=I.join(["/media/grabbers/devices",t.deviceID,"channelmap"],v()({channelsEnabled:u.toString()},d));n.set("isChannelMappingsSaving",!0);var f=r.getXHROptions(p,{type:"PUT"}),g=m.a.ajax(f);return g.done(function(){n.set({isChannelMappingsSaving:!1,channelMappingsSaveError:null});var i=l(e,t);s.forEach(function(e){var t=e.id,n=-1!==u.indexOf(t),r=d["channelMapping["+t+"]"];r?i.add([{deviceIdentifier:t,enabled:n,lineupIdentifier:r}],{parse:!0,merge:!0}):i.remove(t)})}),g.fail(function(e){
n.set({isChannelMappingsSaving:!1,channelMappingsSaveError:Object(D.a)(e)})}),g}function u(e,t){var n=Object(P.h)(e,t),r=t.enabled,a=I.join(["/media/grabbers/devices",t.deviceID],{enabled:r?1:0}),s=n.getXHROptions(a,{type:"PUT"}),l=m.a.ajax(s).promise();return l.done(function(){if(i(e)){var n=o(e,t);n&&n.set("status",r?"enabled":"disabled")}}),l}n.d(t,"g",function(){return k}),n.d(t,"l",function(){return _}),n.d(t,"m",function(){return R}),n.d(t,"q",function(){return z}),n.d(t,"j",function(){
return U}),n.d(t,"b",function(){return B}),n.d(t,"z",function(){return V}),n.d(t,"A",function(){return F}),n.d(t,"p",function(){return Q}),n.d(t,"o",function(){return H}),n.d(t,"y",function(){return Y}),n.d(t,"c",function(){return W}),n.d(t,"s",function(){return G}),n.d(t,"B",function(){return K}),n.d(t,"d",function(){return q}),n.d(t,"u",function(){return Z}),n.d(t,"e",function(){return X}),n.d(t,"v",function(){return J}),n.d(t,"a",function(){return $}),n.d(t,"t",function(){return ee}),
n.d(t,"w",function(){return te}),n.d(t,"f",function(){return ne}),n.d(t,"x",function(){return ie}),n.d(t,"i",function(){return re}),n.d(t,"h",function(){return ae}),n.d(t,"C",function(){return oe}),n.d(t,"r",function(){return se}),n.d(t,"n",function(){return le}),n.d(t,"k",function(){return ce})
;var d,p=n(50),h=n.n(p),f=n(7),v=n.n(f),g=n(12),m=n.n(g),y=n(4),b=n(36),I=n(19),S=n(298),M=n(58),D=n(140),C=n(68),O=n(105),j=n(90),P=n(104),w=n(276),T=n(175),E=n(113),x=n(106),N=n(529),A=n(299),L=n(1078),k=Object(b.a)("CLEAR_DVR_SETUP"),_=Object(b.a)("DVR_SETUP_NEXT_STEP"),R=Object(b.a)("DVR_SETUP_PREVIOUS_STEP"),z=Object(b.a)("FETCH_DEVICES"),U=Object(b.a)("DISCOVER_DEVICES"),B=Object(b.a)("ADD_DEVICE"),V=Object(b.a)("SELECT_DEVICE"),F=Object(b.a)("SELECT_DEVICE_SOURCE"),Q=Object(b.a)("FETCH_DEVICE_DETAILS"),H=Object(b.a)("FETCH_DEVICE_CHANNELS"),Y=Object(b.a)("SCAN_DEVICE_CHANNELS"),W=Object(b.a)("CANCEL_SCAN_DEVICE_CHANNELS"),G=Object(b.a)("FIND_BEST_EPG_LINEUP"),K=Object(b.a)("SELECT_EPG_LINEUP"),q=Object(b.a)("CLEAR_CHANNEL_MAP_ERROR"),Z=Object(b.a)("SAVE_CHANNEL_MAP"),X=Object(b.a)("CLEAR_CHANNEL_MAPPINGS_SAVE_ERROR"),J=Object(b.a)("SAVE_DVR"),$=Object(b.a)("ADD_DVR_DEVICE"),ee=Object(b.a)("REMOVE_DVR_DEVICE"),te=Object(b.a)("SAVE_DVR_SETTINGS"),ne=Object(b.a)("CLEAR_DVR_SETTINGS_SAVE_ERROR"),ie=Object(b.a)("SAVE_DEVICE_SETTINGS"),re=Object(b.a)("CLEAR_DEVICE_SETTINGS_SAVE_ERROR"),ae=Object(b.a)("CLEAR_DEVICE_SCAN_PREFS"),oe=Object(b.a)("SET_DVR_DEVICE_ENABLED"),se=Object(b.a)("FETCH_LINEUP_CHANNELS",function(e){
var t=I.join("/livetv/epg/channels",{lineup:e.lineupUUID});return v()({options:{url:t,timeout:C.b}},e)}),le=Object(b.a)("FETCH_CHANNEL_MAP",function(e){var t=I.join("/livetv/epg/channelmap",{device:e.deviceUUID,lineup:e.lineupUUID});return v()({options:{url:t}},e)}),ce=Object(O.a)((d={},d.CLEAR_DVR_SETUP=function(e){i(e).restoreDefaults()},d.DVR_SETUP_NEXT_STEP=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e),r={};switch(n.get("step")){case N.b.DEVICE:
n.get("selectedDevice").get("unsupported")?r.step=N.b.UNSUPPORTED_DEVICE:r.step=N.b.DEVICE_CHANNELS;break;case N.b.UNSUPPORTED_DEVICE:r.step=N.b.DEVICE_CHANNELS;break;case N.b.DEVICE_CHANNELS:t.dvrID?(r.selectedLineupUUID=a(e,t).get("lineup"),r.step=N.b.CHANNEL_MAPPING):r.step=N.b.EPG;break;case N.b.EPG:n.get("selectedLineupUUID")?r.step=N.b.CHANNEL_MAPPING:r.step=N.b.EPG_MAPPING;break;case N.b.EPG_MAPPING:r.step=N.b.CHANNEL_MAPPING;break;case N.b.CHANNEL_MAPPING:r.step=N.b.EPG_DOWNLOAD}
n.get("setupErrorMessages").reset(),n.set(r)},d.DVR_SETUP_PREVIOUS_STEP=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e),r={};switch(n.get("step")){case N.b.UNSUPPORTED_DEVICE:r.step=N.b.DEVICE;break;case N.b.DEVICE_CHANNELS:r.hasScannedChannels=!1,r.step=N.b.DEVICE;break;case N.b.EPG:r.step=N.b.DEVICE_CHANNELS;break;case N.b.CHANNEL_MAPPING:t.dvrID?r.step=N.b.DEVICE_CHANNELS:r.step=N.b.EPG}n.get("setupErrorMessages").reset(),n.set(r)},
d.FETCH_DEVICES=function(e,t,n){var r=i(e),a=r.get("devices");r.set("isDevicesPending",!0),a.fetch().done(function(){r.set({isDevicesPending:!1,isDevicesPopulated:!0,devicesError:null});var e=a.filter(function(e){return!e.get("parentID")&&e.get("status")===A.b.ALIVE});1===e.length&&n(V({serverEntityID:t.serverEntityID,deviceID:e[0].id}))}).fail(function(e,t){r.set({isDevicesPending:!1,devicesError:Object(D.a)(t)})})},d.DISCOVER_DEVICES=function(e,t,n){
var r=Object(P.h)(e,t),a=i(e),o=r.getXHROptions("/media/grabbers/devices/discover",{type:"POST"});a.get("isDiscoveringDevices")||(a.set("isDiscoveringDevices",!0),m.a.ajax(o).done(function(e){var i=a.get("devices"),r=i.add(e,{parse:!0,merge:!0}),o=r.filter(function(e){return!e.get("parentID")&&e.get("status")===A.b.ALIVE});a.get("setupErrorMessages").remove("discoverDevices"),1===o.length&&n(V({serverEntityID:t.serverEntityID,deviceID:o[0].id})),a.set("isDiscoveringDevices",!1)
}).fail(function(e){a.get("setupErrorMessages").add({id:"discoverDevices",message:Object(S.a)(e,Object(y.default)("There was a problem discovering devices"))}),a.set("isDiscoveringDevices",!1)}))},d.ADD_DEVICE=function(e,t,n){var r=Object(P.h)(e,t),a=i(e),o=I.join(["/media/grabbers","tv.plex.grabbers.hdhomerun","devices"],{uri:t.uri}),s=r.getXHROptions(o,{type:"POST"});a.set("addDevicePending",!0),m.a.ajax(s).done(function(e,n){var i=a.get("devices"),r=i.add(e,{parse:!0});if(0===r.length){
var o=M.a.parseXML(e),s=o&&o.message||Object(y.default)("No device found at {1}",t.uri);a.get("setupErrorMessages").add({id:"addDevice",message:s}),a.set("addDevicePending",!1)}else a.get("setupErrorMessages").remove("addDevice"),a.set({addDevicePending:!1,selectedDevice:1===r.length?r[0]:a.get("selectedDevice")})}).fail(function(e){a.get("setupErrorMessages").add({id:"addDevice",message:Object(S.a)(e,Object(y.default)("There was a problem adding the device: {1}",t.uri))}),
a.set("addDevicePending",!1)})},d.SELECT_DEVICE=function(e,t){var n=i(e),r=o(e,t);n.set("selectedDevice",r)},d.SELECT_DEVICE_SOURCE=function(e,t){i(e).get("selectedDevice").set("selectedSource",t.source)},d.FETCH_DEVICE_DETAILS=function(e,t){var n=i(e);o(e,t).fetch().fail(function(e){n.get("setupErrorMessages").add({id:"fetchDeviceDetails",message:Object(S.a)(e,Object(y.default)("There was a problem getting the details for your device"))})})},d.FETCH_DEVICE_CHANNELS=function(e,t){
var n=i(e),r=o(e,t),a=I.join(["/media/grabbers/devices",r.get("key"),"channels"]);r.set("isChannelsPending",!0);var s={url:a,timeout:C.b};r.get("channels").fetch(s).done(function(){r.set({isChannelsPending:!1,isChannelsPopulated:!0,channelsError:null})}).fail(function(e){r.set({isChannelsPending:!1,isChannelsPopulated:!0,channelsError:null}),n.get("setupErrorMessages").add({id:"fetchDeviceDetails",
message:Object(S.a)(e,Object(y.default)("There was a problem getting the channels for your device"))})})},d.SCAN_DEVICE_CHANNELS=function(e,t,n){var r=i(e),a=Object(P.h)(e,t),l=o(e,t),c=s(e,t),u=l.get("selectedSource")||l.get("source"),d=t.prefs,p=t.network,h=I.join(["/media/grabbers/devices",l.get("key"),"scan"],{source:u,country:c,prefs:d,network:p}),f=a.getXHROptions(h,{type:"POST"});m.a.ajax(f).done(function(e,i,a){var o=a.getResponseHeader("X-Plex-Activity");if(l.get("channels").reset(),
o)n(ae(t));else{var s=new w.a(e,{parse:!0});r.set("scanPrefs",s)}}).fail(function(e){r.get("setupErrorMessages").add({id:"scanDeviceChannels",message:Object(S.a)(e,Object(y.default)("There was a problem scanning channels"))})})},d.CANCEL_SCAN_DEVICE_CHANNELS=function(e,t,n){var r=i(e),a=Object(P.h)(e,t),o=t.deviceID;if(!o)throw new Error("A device ID is required to cancel a channel scan.");var s=I.join(["/media/grabbers/devices",o,"scan"]),l=a.getXHROptions(s,{type:"DELETE"})
;m.a.ajax(l).fail(function(e){r.get("setupErrorMessages").add({id:"cancelScanDeviceChannels",message:Object(S.a)(e,Object(y.default)("There was a problem canceling the current channel scan"))})})},d.FIND_BEST_EPG_LINEUP=function(e,t,n){var r=Object(P.h)(e,t),a=i(e),o=a.get("selectedDevice"),s=a.get("epgSettings").get("lineupGroup"),l=I.join("/livetv/epg/lineup",{device:o.get("uuid"),lineupGroup:s.get("uuid")}),c=r.getXHROptions(l);m.a.ajax(c).done(function(e,t,n){
var i=n.getResponseHeader("X-Plex-Activity");a.set("epgLineupActivityID",i)}).fail(function(e){a.get("setupErrorMessages").add({id:"findBestEPGLineup",message:Object(S.a)(e,Object(y.default)("There was a problem mapping channels"))})})},d.SELECT_EPG_LINEUP=function(e,t){i(e).set("selectedLineupUUID",t.lineupUUID)},d.FETCH_LINEUP_CHANNELS=Object(j.a)({key:"lineupChannels",getModel:i}),d.FETCH_CHANNEL_MAP=function(e,t){var n=i(e,t),r=n.get("channelMappings"),a=v()({timeout:C.b},t.options)
;n.set("isChannelMappingsPending",!0),r.fetch(a).done(function(){t.forceEnabled&&r.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:Object(D.a)(t)})})},d.CLEAR_CHANNEL_MAP_ERROR=function(e,t){i(e,t).set({channelMappingsError:null,lineupChannelsError:null})},d.SAVE_CHANNEL_MAP=function(e,t,n){c(e,t).done(function(){
n(Q(t))})},d.CLEAR_CHANNEL_MAPPINGS_SAVE_ERROR=function(e){i(e).set("channelMappingsSaveError",null)},d.SAVE_DVR=function(e,t,n){var a=i(e);a.set("isSavingDVR",!0);var o=t.serverEntityID,l=t.deviceID,d=r(e,t);u(e,{serverEntityID:o,deviceID:l,enabled:!0}).then(function(){return c(e,t)}).then(function(){var n=Object(P.h)(e,t),i=a.get("selectedDevice"),r=a.get("selectedLineupUUID"),o=a.get("epgSettings").get("selectedLanguage"),l=s(e,t);a.get("setupErrorMessages").remove("saveDVR")
;var c=I.join("/livetv/dvrs",{device:i.get("uuid"),lineup:r,language:o.get("code"),country:l}),u=n.getXHROptions(c,{type:"POST"});return m.a.ajax(u)}).done(function(e,t,i){var r=i.getResponseHeader("X-Plex-Activity"),s=d.add(e,{parse:!0})[0];a.get("setupErrorMessages").remove("saveDVR"),a.set({epgDownloadActivityID:r,selectedDVR:s,isSavingDVR:!1}),n(Object(x.h)({hasDismissedDVRUpsell:!0})),n(_({serverEntityID:o})),n(Object(E.h)({serverEntityID:o}))}).fail(function(e){
a.get("setupErrorMessages").add({id:"saveDVR",message:Object(S.a)(e,Object(y.default)("There was a problem saving your DVR. Please try again."))}),a.set("isSavingDVR",!1)})},d.ADD_DVR_DEVICE=function(e,t,n){var r=i(e);r.set("isSavingDVR",!0);var o=t.serverEntityID,s=t.deviceID,l=r.get("selectedDevice"),d=a(e,t);u(e,{serverEntityID:o,deviceID:s,enabled:!0}).then(function(){return c(e,t)}).then(function(){var n=Object(P.h)(e,t),i=I.join(["/livetv/dvrs",d.id,"devices",l.id]),r=n.getXHROptions(i,{
type:"PUT"});return m.a.ajax(r)}).done(function(e,t,i){var a=i.getResponseHeader("X-Plex-Activity");d.get("devices").add([l]),r.set({epgDownloadActivityID:a,selectedDVR:d,isSavingDVR:!1}),n(_({serverEntityID:o})),n(Object(E.h)({serverEntityID:o}))}).fail(function(e){r.get("setupErrorMessages").add({id:"addDVRDevice",message:Object(S.a)(e,Object(y.default)("There was a problem adding a new device to your DVR. Please try again."))}),r.set("isSavingDVR",!1)})},d.REMOVE_DVR_DEVICE=function(e,t,n){
var i=Object(P.h)(e,t),r=a(e,t),o=t.deviceID,s=I.join(["/livetv/dvrs",r.id,"devices",o]),l=i.getXHROptions(s,{type:"DELETE"});m.a.ajax(l).done(function(e,t,n){r.get("devices").remove(o)})},d.SAVE_DVR_SETTINGS=function(e,t){var n=Object(P.h)(e,t),i=a(e,t),r=t.prefs,o=I.join(["/livetv/dvrs",t.dvrID,"prefs"],r);i.set("isSaving",!0);var s=n.getXHROptions(o,{type:"PUT"}),l=m.a.ajax(s);l.done(function(){var e=i.get("prefs");h()(r).forEach(function(t){e.get(t).set("value",r[t])}),i.set({isSaving:!1,
saveError:null})}),l.fail(function(e){i.set({isSaving:!1,saveError:Object(D.a)(e)})})},d.CLEAR_DVR_SETTINGS_SAVE_ERROR=function(e,t){a(e,t).set("saveError",null)},d.SAVE_DEVICE_SETTINGS=function(e,t){var n=Object(P.h)(e,t),i=o(e,t),r=t.prefs,a=I.join(["/media/grabbers/devices",t.deviceID,"prefs"],r);i.set("isSaving",!0);var s=n.getXHROptions(a,{type:"PUT"}),l=m.a.ajax(s);l.done(function(){var e=i.get("prefs");h()(r).forEach(function(t){e.get(t).set("value",r[t])}),i.set({isSaving:!1,
saveError:null})}),l.fail(function(e){i.set({isSaving:!1,saveError:Object(D.a)(e)})})},d.CLEAR_DEVICE_SETTINGS_SAVE_ERROR=function(e,t){o(e,t).set("saveError",null)},d.CLEAR_DEVICE_SCAN_PREFS=function(e){i(e).set({scanPrefs:void 0,scanNetworks:void 0})},d.SET_DVR_DEVICE_ENABLED=function(e,t){u(e,t)},d[E.b]=function(e,t,n){var r=i(e);if(r){var a=r.get("selectedDevice"),o=t.activity
;if(!a||o.type!==T.a.PROVIDER_DEVICE_CHANNELSCAN||parseInt(o.Context.deviceID,10)!==a.id)return o.uuid===r.get("epgLineupActivityID")?(r.set({selectedLineupUUID:o.Response.lineup,epgLineupActivityID:""}),void n(_({serverEntityID:t.serverEntityID}))):o.uuid===r.get("epgDownloadActivityID")?void r.set("epgDownloadActivityID",""):void 0;var s=o.Response.Network;if(s){var l=new L.a(s,{parse:!0});r.set("scanNetworks",l)}else r.set("hasScannedChannels",!0)}},d))},function(e,t,n){"use strict"
;function i(e){var t=e.className,n=e.children;return a()("div",{className:t,"data-qa-id":"preplayMainTitle"},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2411)),c=n.n(l);i.defaultProps={className:c.a.primaryTitle},t.a=i},function(e,t,n){"use strict";function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(s.d)("metrics").trackClick(o()({page:t,action:e,context:u.e},n))}n.d(t,"g",function(){return M}),n.d(t,"h",function(){return D}),
n.d(t,"i",function(){return C}),n.d(t,"a",function(){return O}),n.d(t,"m",function(){return j}),n.d(t,"f",function(){return P}),n.d(t,"k",function(){return w}),n.d(t,"c",function(){return T}),n.d(t,"l",function(){return E}),n.d(t,"d",function(){return x}),n.d(t,"b",function(){return N}),n.d(t,"j",function(){return A}),n.d(t,"e",function(){return L})
;var r,a=n(7),o=n.n(a),s=n(15),l=n(17),c=n(73),u=n(114),d=n(104),p=n(32),h=n(36),f=n(90),v=n(193),g=n(1091),m=n(732),y=n(366),b=n(499),I=n(502),S="metadata/metadataList/fetchMetadataList",M=(Object(h.a)(S),
Object(h.a)("metadata/metadataList/populateMetadataList")),D=Object(h.a)("metadata/metadataList/populateMetadataListRange"),C=Object(h.a)("metadata/metadataList/repopulateMetadataListRange"),O=Object(h.a)("metadata/metadataList/addMetadataListToPlaylist"),j=Object(h.a)("metadata/metadataList/syncMetadataList"),P=Object(h.a)("metadata/metadataList/optimizeMetadataList"),w=Object(h.a)("metadata/metadataList/selectMetadataListItem"),T=Object(h.a)("metadata/metadataList/deselectMetadataListItem"),E=Object(h.a)("metadata/metadataList/selectMetadataListItems"),x=Object(h.a)("metadata/metadataList/deselectMetadataListItems"),N=Object(h.a)("metadata/metadataList/deselectAllMetadataListItems"),A=Object(h.a)("metadata/metadataList/resetMetadataList"),L=(r={},
r[S]=Object(f.a)({getModel:d.c}),r["metadata/metadataList/populateMetadataList"]=Object(v.a)({fetchActionType:S,getModel:d.c}),r["metadata/metadataList/populateMetadataListRange"]=Object(g.a)({getModel:d.c}),r["metadata/metadataList/repopulateMetadataListRange"]=Object(m.a)({getModel:d.c}),r["metadata/metadataList/addMetadataListToPlaylist"]=function(e,t){var n=Object(d.c)(e,t),r=t.options||{},a=new b.a(o()({model:n,title:n.get("title")},r));l.a.trigger("show:modal",a),
i(c.b,t.metricsPage,t.metricsProperties)},r["metadata/metadataList/syncMetadataList"]=function(e,t){var n=Object(d.c)(e,t);p.a.execute("showSyncModal",{item:n}),i(c.Y,t.metricsPage,t.metricsProperties)},r["metadata/metadataList/optimizeMetadataList"]=function(e,t){var n=Object(d.c)(e,t),r=new I.a({item:n});l.a.trigger("show:modal",r),i(c.E,t.metricsPage,t.metricsProperties)},r["metadata/metadataList/selectMetadataListItem"]=function(e,t,n){
var i=t.id,r=t.type,a=t.isRangeSelect,o=Object(d.c)(e,t),s=Object(d.b)(e,{metadataItemEntityID:i}),l=o.getCollection();s&&n(Object(y.r)({type:r,model:s,collection:l,isRangeSelect:a}))},r["metadata/metadataList/deselectMetadataListItem"]=function(e,t,n){var i=Object(d.b)(e,{metadataItemEntityID:t.id});i&&n(Object(y.g)([i.id]))},r["metadata/metadataList/selectMetadataListItems"]=function(e,t,n){var i=t.ids,r=t.type,a=i.reduce(function(t,n){var i=Object(d.i)(e,{metadataItemEntityID:n})
;return i&&t.push({id:i&&i.id,type:r,model:i}),t},[]);n(Object(y.s)(a))},r["metadata/metadataList/deselectMetadataListItems"]=function(e,t,n){var i=t.ids.reduce(function(t,n){var i=Object(d.i)(e,{metadataItemEntityID:n});return i&&t.push({id:i&&i.id}),t},[]);n(Object(y.g)(i))},r["metadata/metadataList/deselectAllMetadataListItems"]=function(e,t,n){var i=Object(d.c)(e,t),r=i.getCollection();n(Object(y.f)(r))},r["metadata/metadataList/resetMetadataList"]=function(e,t){var n=Object(d.c)(e,t)
;n.abortPendingPopulate(),n.resetPopulatePromise(null),n.restoreDefaults({containerKey:n.get("containerKey"),containerTitle:n.get("containerTitle")})},r)},function(e,t,n){"use strict";function i(e){return{onServerMenuOpen:function(){e(Object(l.b)()),e(Object(c.a)())}}}var r=n(11),a=n(6),o=(n.n(a),n(785)),s=n(550),l=n(106),c=n(335),u=n(2974),d=Object(a.createStructuredSelector)({primaryServerEntityID:function(e){return e.primaryServer},serverEntityIDs:function(e){return e.servers},
providerEntityIDs:o.a,canProvisionPersonalCloudServer:s.a}),p=Object(r.b)(d,i)(u.a);t.a=p},function(e,t,n){"use strict";n.d(t,"a",function(){return c}),n.d(t,"b",function(){return u}),n.d(t,"c",function(){return d});var i,r=n(7),a=n.n(r),o=n(17),s=n(36),l=n(246),c="ui/repopulatePage",u=Object(s.a)(c),d=a()({},l.c,(i={},i[l.a]=function(e,t){o.a.trigger("show:alert",t)},i))},function(e,t,n){"use strict";function i(e){return{status:e.status,statusText:e.statusText,readyState:e.readyState,
responseText:e.responseText}}t.a=i},function(e,t,n){"use strict";var i=function(e,t,n,i,r,a,o,s){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,r,a,o,s],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";n.d(t,"a",function(){return i}),
n.d(t,"b",function(){return r});var i="news",r="podcast"},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(423)),a=Object(i.createSelector)(Object(r.a)("features"),function(e){return e.reduce(function(e,t){return e[t.uuid]=!0,e},{})});t.a=a},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,r=n.payload;switch(i){case M.CHANGE:var a=r.name,o=r.change;if(null==o){var s=h()({},t);return delete s[a],s}
return h()({},t,(e={},e[a]=o,e));case M.REPLACE_STATE:return r;case M.RESET:return{};case M.SHOW_ERRORS:return v.a.mapObject(t,function(e){return h()({},e,{showErrors:0!==e.errors.length})});default:return t}}n.d(t,"a",function(){return D});var r=n(13),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(7),h=n.n(p),f=n(5),v=n.n(f),g=n(1),m=(n.n(g),n(0)),y=n.n(m),b=n(480),I=(n.n(b),n(668)),S=n(36),M={CHANGE:"CHANGE",REPLACE_STATE:"REPLACE_STATE",RESET:"RESET",SHOW_ERRORS:"SHOW_ERRORS"
},D={change:Object(S.a)(M.CHANGE),replaceState:Object(S.a)(M.REPLACE_STATE),reset:Object(S.a)(M.RESET),showErrors:Object(S.a)(M.SHOW_ERRORS)},C=function(e){function t(n,r){s()(this,t);var a=c()(this,e.call(this,n,r));return a.onFormStoreChange=function(){var e=a.store.getState();e!==a.prevState&&(a.prevState=e,a.props.onChange(e))},a.onSubmit=function(e){e.preventDefault(),e.nativeEvent.preventDefault();var t=a.store.getState();if(v.a.some(t,function(e,t){return 0!==e.errors.length
}))a.actions.showErrors();else{var n=v.a.mapObject(t,function(e,t){return e.value});a.props.onSubmit(n,t)}},a.store=Object(b.createStore)(i),a.prevState=a.store.getState(),a.actions=Object(b.bindActionCreators)(D,a.store.dispatch),a}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.formState,e.onChange,a()(e,["children","formState","onChange"]));return y.a.createElement("form",h()({},n,{onSubmit:this.onSubmit}),t)},t}(m.Component);C.childContextTypes={formStore:I.a},C.defaultProps={
onSubmit:function(){},onChange:function(){}},t.b=C},function(e,t,n){"use strict";function i(e){var t=function(t){function n(e,i){c()(this,n);var r=d()(this,t.call(this,e,i));return r.onFormStoreChange=function(){var e=r.props.name,t=r.store.getState(),n=t[e];n||r.initializeInputState(r.props),Object(M.a)(t,r.previousFormState)||(r.previousFormState=t,r.handleStateChange(r.props)),r.state!==n&&null!=n&&r.setState(n)},r.onChange=function(e){var t=r.props.transformValue
;r.handleStateChange(r.props,t?t(e):e)},r.onBlur=function(){if(!r.hasBlurred){r.hasBlurred=!0;var e=r.store.getState(),t=r.props.name,n=e[t],i=r.calculateErrors(n.value,e,r.props);r.actions.change({name:t,change:s()({},n,{errors:i,showErrors:0!==i.length})})}},r.store=i.formStore,r.actions=Object(b.bindActionCreators)(O.a,r.store.dispatch),r.state=null,r.hasBlurred=!1,r}return h()(n,t),n.prototype.componentWillMount=function(){this.previousFormState=this.store.getState(),
this.unsubscribe=this.store.subscribe(this.onFormStoreChange),this.initializeInputState(this.props)},n.prototype.componentWillReceiveProps=function(e){Object(I.a)(e.initialValue)&&Object(I.a)(this.props.initialValue)?Object(M.a)(e.initialValue,this.props.initialValue)||this.handleStateChange(e,e.initialValue):e.initialValue!==this.props.initialValue&&this.handleStateChange(e,e.initialValue)},n.prototype.shouldComponentUpdate=function(e,t){return Object(D.a)(this,e,t)},
n.prototype.componentWillUnmount=function(){var e=this.props.name;this.unsubscribe&&this.unsubscribe(),this.actions.change({name:e,change:null})},n.prototype.initializeInputState=function(e){var t=e.name,n=e.initialValue,i=this.store.getState();i[t]={errors:this.calculateErrors(n,i,e),showErrors:!1,value:n},this.actions.replaceState(i)},n.prototype.handleStateChange=function(e,t){
var n=this.store.getState(),i=e.name,r=n[i],a=(Array.isArray(t)?v.a.isEqual(e.initialValue,t):null==t)?r.value:t,o=this.calculateErrors(a,n,e);v.a.isEqual(r.value,a)&&v.a.isEqual(r.errors,o)||this.actions.change({name:i,change:{errors:o,showErrors:this.hasBlurred&&0!==o.length,value:a}})},n.prototype.calculateErrors=function(e,t,n){return n.validations.map(function(n){return n(e,t)}).filter(function(e){return null!=e})},n.prototype.render=function(){var t=this.props,n=(t.validations,
t.errors),i=a()(t,["validations","errors"]);if(!this.state)return null;var r=n.length>0,o=this.state,l=o.value,c=o.errors,u=o.showErrors;return y.a.createElement(e,s()({},i,{showErrors:!!r||u,errors:r?n:c,value:l,onChange:this.onChange,onBlur:this.onBlur}))},n}(m.Component);return t.displayName="FormInput("+Object(S.a)(e)+")",t.WrappedComponent=e,t.contextTypes={formStore:C.a},t.defaultProps={validations:[],errors:[]},t}
var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(5),v=n.n(f),g=n(1),m=(n.n(g),n(0)),y=n.n(m),b=n(480),I=(n.n(b),n(33),n(392)),S=n(153),M=n(250),D=n(29),C=n(668),O=n(145);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.dangerouslySetInnerHTML,i=e.children,r=i.split("\n");return a()(l.a,{className:t,dangerouslySetInnerHTML:n},void 0,r.length>1?r.map(function(e,t){return a()("p",{},t,e)}):i)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(2482)),c=n(2484),u=n.n(c);i.defaultProps={className:u.a.summary,children:""},t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"initQuickSearch",function(){return a}),n.d(t,"resetQuickSearch",function(){return o}),n.d(t,"fetchQuickSearch",function(){return s}),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,"playQuickSearchResult",function(){return p});var i=n(36),r=n(82),a=Object(i.a)(r.H),o=Object(i.a)(r._1),s=Object(i.a)(r.w),l=Object(i.a)(r.b),c=Object(i.a)(r.c),u=Object(i.a)(r._9),d=Object(i.a)(r.K),p=Object(i.a)(r.L)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return a()("div",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3193)),c=n.n(l);i.defaultProps={
className:c.a.innerContent},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,o=e.showPoster,s=e.posterType,c=e.attribution,u=e.metadataKey,m=e.type,y=e.subtype,b=e.thumb,I=e.art,S=e.pageWidth,M=e.pageHeight,D=e.scrollTop,C=e.posterWidth,O=e.posterTop,j=!!I,P=O,w=void 0;if(j){w=Math.min(Math.round(S/d.a),M-g);var T=Object(d.d)(C,m,y,l.h),E=O+w-D,x=M+v-T;P=Math.min(Math.max(E,O),x)}
return a()("div",{},void 0,j&&a()(p.a,{serverEntityID:n,providerEntityID:i,width:S,height:w,url:I}),c&&a()(c,{providerEntityID:i,pageHeight:M,posterTop:O}),o&&a()(h.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:r,metadataKey:u,type:m,subtype:y,posterType:s,pageHeight:M,posterWidth:C,posterTop:P,posterUrl:b}),o?a()(f.a,{posterWidth:C},void 0,t):a()("div",{},void 0,t))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(31)),c=n(45),u=n.n(c),d=n(121),p=n(3194),h=n(3196),f=n(3198),v=parseInt(u.a.pageHeaderHeight,10),g=246;i.defaultProps={showPoster:!0},t.a=i},function(e,t,n){"use strict";function i(e){var t=a.a.Deferred();return e&&e.then?e.then(t.resolve,t.resolve):t.resolve(e),t.promise()}var r=n(12),a=n.n(r);t.a=i},function(e,t,n){function i(e){return function(){return e.apply(this,r.initial(arguments))}}var r=n(5);e.exports=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";var i=n(2),r=n.n(i),a=n(7),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(15),m=n(4),y=n(73),b=n(29),I=n(24),S=n(493),M=n(47),D=n(102),C=n(132),O=n(103),j=n(111),P=n(74),w=n(112),T=n(92),E=n(1825),x=n.n(E),N=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onCancel=function(){
Object(g.d)("metrics").trackClick(o()({},r.props.metricsProperties,{page:r.props.metricsPage,action:y.f})),r.props.onCancel()},r.onAccordChange=function(e){r.setState({isAccordGiven:e.target.checked})},r.state={isAccordGiven:!1},r}return p()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(b.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.isCancelButtonDisabled,n=e.isConfirmButtonSpinning,i=e.isOpen,a=e.metricsPage,s=e.metricsProperties,l=e.kind,c=e.title,u=e.message,d=e.accordMessage,p=e.confirmLabel,h=e.cancelLabel,f=e.hideCancelButton,g=e.onConfirm,b=!!d,E=n||b&&!this.state.isAccordGiven;return r()(C.a,{size:I.e.SMALL,isOpen:i,metricsPage:a,metricsProperties:s,onModalClose:this.onCancel},void 0,r()(O.a,{onModalClose:this.onCancel},void 0,r()(j.a,{},void 0,c),r()(P.a,{className:x.a.confirmBody
},void 0,u,b&&r()("label",{className:x.a.accordLabel},void 0,r()("input",{type:"checkbox",className:x.a.accordInput,checked:this.state.isAccordGiven,onChange:this.onAccordChange}),d)),r()(w.a,{},void 0,r()(T.a,{},void 0,!f&&r()(M.a,{className:x.a.cancelButton,kind:I.b.DEFAULT,isDisabled:t,onPress:this.onCancel},void 0,h||Object(m.default)("Cancel")),v.a.createElement(S.a,o()({},s,{action:y.k}),r()(D.a,{className:x.a.confirmButton,"data-autofocus":!0,kind:l,isDisabled:E,isSpinning:n,onPress:g
},void 0,p||Object(m.default)("OK")))))))},t}(f.Component);N.defaultProps={isConfirmButtonSpinning:!1,kind:I.b.PRIMARY},t.a=N},function(e,t,n){"use strict";function i(e){var t=Math.floor((new Date).getTime()/1e3);return e.get("Media").find(function(e){return e.beginsAt<=t&&t<=e.endsAt})}function r(e){var t=i(e);return t?t.channelIdentifier:void 0}function a(e){return{channelIdentifier:e,beginsAt:Math.floor((new Date).getTime()/1e3)}}function o(e,t){var n=Object(m.b)(e,t),i=n.get("liveTVSession")
;i&&i.set("lastSeekPosition",i.get("currentPosition"))}n.d(t,"l",function(){return A}),n.d(t,"e",function(){return L}),n.d(t,"d",function(){return k}),n.d(t,"a",function(){return _}),n.d(t,"n",function(){return R}),n.d(t,"g",function(){return z}),n.d(t,"h",function(){return U}),n.d(t,"j",function(){return B}),n.d(t,"k",function(){return V}),n.d(t,"i",function(){return F}),n.d(t,"c",function(){return Q}),n.d(t,"b",function(){return H}),n.d(t,"m",function(){return Y}),n.d(t,"f",function(){return W
})
;var s,l=n(7),c=n.n(l),u=n(12),d=n.n(u),p=n(4),h=n(85),f=n(197),v=n(34),g=n(78),m=n(171),y=n(140),b=n(964),I=n(36),S=n(657),M=n(415),D=n(664),C=n(1830),O=n(661),j=n(1831),P=n(113),w=n(131),T=n(60),E="ui/player/liveTVPlayer/skipBack",x="ui/player/liveTVPlayer/stepBack",N="ui/player/liveTVPlayer/seek",A=Object(I.a)("ui/player/liveTVPlayer/startLiveTVPlayback"),L=Object(I.a)("ui/player/liveTVPlayer/endLiveTVPlayback"),k=Object(I.a)("ui/player/liveTVPlayer/confirmLiveTVPlayback"),_=Object(I.a)("ui/player/liveTVPlayer/cancelConfirmLiveTVPlayback"),R=Object(I.a)("ui/player/liveTVPlayer/updatePlayerLiveTVMetadata"),z=Object(I.a)("ui/player/liveTVPlayer/playNextItem"),U=Object(I.a)("ui/player/liveTVPlayer/playPreviousItem"),B=Object(I.a)(E),V=Object(I.a)("ui/player/liveTVPlayer/skipForward"),F=(Object(I.a)(x),
Object(I.a)("ui/player/liveTVPlayer/stepForward"),Object(I.a)(N)),Q=Object(I.a)("ui/player/liveTVPlayer/clearPlayerConflicts"),H=Object(I.a)("ui/player/liveTVPlayer/cancelMediaGrabber"),Y=Object(I.a)("ui/player/liveTVPlayer/togglePlayerAlsoAiringState"),W=(s={},s["ui/player/liveTVPlayer/startLiveTVPlayback"]=function(e,t,n){var r=t.serverEntityID,o=t.providerEntityID,s=Object(S.a)(e,t),l=Object(M.a)(s),u=h.c(l),d=Object(m.b)(e,u),y=g.j(e,t),I=g.h(e,{providerEntityID:o
}),O=I.get("parentID"),j=s.metadataItemModel,P=null;if(j?P=i(j):s.identifier&&(P=a(s.identifier)),!P)return void Object(v.a)(function(){d.restoreDefaults({hasError:!0,errorMessage:Object(p.default)("Unable to tune channel (Not on air)")})});if(e.get("remotePlayer"))return void Object(v.a)(function(){d.set({hasError:!0,errorMessage:Object(p.default)("Live TV is not currently supported when connected to a remote player.")})});Object(v.a)(function(){d.restoreDefaults({serverEntityID:r,
providerEntityID:o,isOpen:!0,openState:f.a,isPlayQueueLoading:!0,isMediaLoading:!0})});var w=new b.a({},{server:y,provider:I}),E=P.channelIdentifier;Object(C.a)(w,O,E,{playbackSessionID:D.a,currentMediaItem:P}).done(function(){d.set("liveTVSession",w);var e=w.get("grabOperation"),i=e.get("metadataItem");n(Object(T.m)(c()({},t,{liveTVSessionEntityID:w.entityID(),metadataItemEntityID:i.entityID(),options:{offset:void 0}})))}).fail(function(e){
var t=e.confirmPlayback,n=e.hasConflicts,i=e.errorMessage;t?d.restoreDefaults({serverEntityID:r,providerEntityID:o,liveTVSession:w,confirmLiveTVPlayback:t}):n?d.restoreDefaults({serverEntityID:r,providerEntityID:o,liveTVSession:w,hasConflicts:n}):d.restoreDefaults({hasError:!0,errorMessage:i})})},s["ui/player/liveTVPlayer/endLiveTVPlayback"]=function(e,t,n){var i=t.playerType,r=t.showError,a=Object(m.b)(e,i);r?a.restoreDefaults({hasError:!0,
errorMessage:Object(p.default)("This live TV session has ended due to a recording conflict")}):n(Object(T.f)({playerType:i}))},s["ui/player/liveTVPlayer/confirmLiveTVPlayback"]=function(e,t,n){var i=t.playerType,r=t.serverEntityID,a=t.providerEntityID,o=t.offset,s=Object(m.b)(e,i),l=s.get("liveTVSession"),c=l.get("captureBuffer"),u=l.get("grabOperation"),d=u.get("metadataItem");if(null!=o){var p=c.startedAt+Math.floor(o/1e3);l.set({currentPosition:p,lastSeekPosition:p})}n(Object(T.m)({
serverEntityID:r,providerEntityID:a,liveTVSessionEntityID:l.entityID(),metadataItemEntityID:d.entityID(),startOffsetMilliseconds:o}))},s["ui/player/liveTVPlayer/cancelConfirmLiveTVPlayback"]=function(e,t){var n=t.playerType,i=Object(m.b)(e,n);Object(v.a)(function(){i.restoreDefaults()})},s["ui/player/liveTVPlayer/updatePlayerLiveTVMetadata"]=function(e,t){var n=t.serverEntityID,i=t.playerType,r=Object(m.b)(e,i),a=r.get("liveTVSession");if(a&&r.get("serverEntityID")===n){
var o=a.get("dvrID"),s=a.get("channelIdentifier");Object(C.a)(a,o,s,{playbackSessionID:D.a})}},s["ui/player/liveTVPlayer/playNextItem"]=function(e,t,n){var i=t.playerType,r=Object(m.b)(e,i),a=j.a(r);j.g(e,i,a,n)},s["ui/player/liveTVPlayer/playPreviousItem"]=function(e,t,n){var i=t.playerType,r=Object(m.b)(e,i),a=j.b(r);j.g(e,i,a,n)},s[E]=function(e,t,n){var i=t.playerType,r=Object(m.b)(e,i),a=j.c(r);j.g(e,i,a,n)},s["ui/player/liveTVPlayer/skipForward"]=function(e,t,n){
var i=t.playerType,r=Object(m.b)(e,i),a=j.d(r);j.g(e,i,a,n)},s[x]=function(e,t,n){var i=t.playerType,r=Object(m.b)(e,i),a=j.e(r);j.g(e,i,a,n)},s["ui/player/liveTVPlayer/stepForward"]=function(e,t,n){var i=t.playerType,r=Object(m.b)(e,i),a=j.f(r);j.g(e,i,a,n)},s[N]=function(e,t,n){var i=t.playerType,r=t.seekPosition;j.g(e,i,r,n)},s["ui/player/liveTVPlayer/clearPlayerConflicts"]=function(e,t){var n=t.playerType,i=Object(m.b)(e,n);Object(v.a)(function(){i.set({hasConflicts:!1})})},
s["ui/player/liveTVPlayer/cancelMediaGrabber"]=function(e,t,n){var i=t.playerType,a=t.grabOperationKey,o=Object(m.b)(e,i),s=o.get("serverEntityID"),l=g.j(e,{serverEntityID:s}),c=o.get("liveTVSession"),u=c.get("grabOperation"),h=u.get("metadataItem"),f=!o.get("isOpen");if(f&&!r(h))return void o.restoreDefaults({hasError:!0,errorMessage:Object(p.default)("Unable to cancel conflict, please try again.")});Object(v.a)(function(){o.set({isConflictCancelling:!0})});var b=l.getXHROptions(a,{
type:"DELETE"});d.a.ajax(b).done(function(e){if(o.set({hasConflicts:!1,isConflictCancelling:!1,cancelConflictError:null}),f){var t=o.get("providerEntityID");if(!r(h))return void o.restoreDefaults({hasError:!0,errorMessage:Object(p.default)("Unable to tune channel after cancelling a conflict, please try again.")});n(A({serverEntityID:s,providerEntityID:t,metadataItemEntityID:h.entityID(),playerType:i}))}}).fail(function(e){o.set({isConflictCancelling:!1,cancelConflictError:Object(y.a)(e)})})},
s[P.c]=function(e,t){var n=t.serverEntityID,i=t.activity,r=Object(m.b)(e,h.a),a=r.get("liveTVSession");if(a&&r.get("serverEntityID")===n&&a.get("activityUUID")===i.uuid&&i.Context){var o=!!i.Context.conflicts,s=r.get("hasConflicts");if(o&&!s){var l=a.get("dvrID"),c=a.get("channelIdentifier");Object(C.a)(a,l,c,{playbackSessionID:D.a}).fail(function(e){e.hasConflicts&&r.set({hasConflicts:!0})})}else!o&&s&&r.set({hasConflicts:!1})}},s[P.b]=function(e,t,n){
var i=t.serverEntityID,r=t.activity,a=Object(m.b)(e,h.a),o=a.get("liveTVSession");if(o&&a.get("serverEntityID")===i&&o.get("activityUUID")===r.uuid){var s=a.get("hasConflicts")?Object(p.default)("This live TV session has ended due to a recording conflict"):Object(p.default)("This live TV session has ended");a.restoreDefaults({hasError:!0,errorMessage:s})}},s["ui/player/liveTVPlayer/togglePlayerAlsoAiringState"]=function(e,t){var n=t.playerType,i=Object(m.b)(e,n),r=i.get("isAlsoAiringVisible")
;Object(v.a)(function(){i.set(Object(O.a)(i,r,{isSettingsVisible:!1,isAlsoAiringVisible:!r,isLyricsVisible:!1}))})},s[w.a]=function(e,t){o(e,t.playerType)},s[w.b]=function(e,t){o(e,t.playerType)},s[w.c]=function(e,t){var n=t.playerType,i=t.positionSeconds,r=Object(m.b)(e,n),a=r.get("liveTVSession");if(a){var o=a.get("startedAt"),s=a.get("lastSeekPosition"),l=o+i;l>s&&Object(v.a)(function(){a.set({currentPosition:l,lastSeekPosition:null})})}},s)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.children,i=e.kind,r=e.isDisabled,o=e.isHidden,l=(e.onMenuEnable,e.onMenuDisable,s()(e,["className","children","kind","isDisabled","isHidden","onMenuEnable","onMenuDisable"]));return u.a.createElement(p.a,a()({className:(t||"")+" "+(f.a.menuItem||"")+" "+(f.a[i]||"")+" "+(r&&f.a.isDisabled||"")+" "+(o&&f.a.isHidden||""||""),"data-qa-id":"dropdownItem",role:"menuitem"},l),n)}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),
n(0)),u=n.n(c),d=n(65),p=n(22),h=n(1997),f=n.n(h);i.defaultProps={kind:d.DEFAULT,isDisabled:!1},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.contentClassName,n=e.iconClassName,i=e.titleClassName,r=e.descriptionClassName,o=e.footerClassName,l=e.children,u=e.kind,d=e.icon,h=e.title,g=e.description,y=e.footer,b=c()(e,["contentClassName","iconClassName","titleClassName","descriptionClassName","footerClassName","children","kind","icon","title","description","footer"])
;return p.a.createElement(v.a,a()({className:m.a.emptyPage},b),s()("div",{className:t},void 0,!!d&&s()(f.a,{name:d,className:(m.a[u]||"")+" "+(n||"")}),!!h&&s()("div",{className:i},void 0,h),!!g&&s()("div",{className:r},void 0,g),l),!!y&&s()("div",{className:o},void 0,y))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(24),f=n(26),v=n(80),g=n(2409),m=n.n(g);i.defaultProps={contentClassName:m.a.content,iconClassName:m.a.icon,titleClassName:m.a.title,
descriptionClassName:m.a.description,footerClassName:m.a.footer,kind:h.b.DEFAULT},t.a=i},function(e,t,n){"use strict";function i(){return Object(I.createSelector)(function(e,t){return t.columnAdjustment},Object(M.a)(),C.a,D.a,function(e,t,n,i){var r=v.a.pick(t,"totalSize","populatedRange","allowSync","isPending","isPopulated","error","firstItemType","firstItemSubtype","isFirstItemLibraryItem");return h()({metadataItemEntityIDs:t.metadataItems,containerKey:t.containerKey||t.key,
disableReloadThreshold:!!n.activeSelectionType,columnAdjustment:e||i.columnAdjustment},r)})}var r=n(13),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(7),h=n.n(p),f=n(5),v=n.n(f),g=n(1),m=(n.n(g),n(0)),y=n.n(m),b=n(11),I=n(6),S=(n.n(I),n(34)),M=n(159),D=n(100),C=n(88),O=n(137),j={dispatchPopulateMetadataList:O.g,dispatchPopulateMetadataListRange:O.h,dispatchDeselectAllMetadataListItems:O.b,dispatchResetMetadataList:O.j},P=function(e){function t(){var n,i,r;s()(this,t)
;for(var a=arguments.length,o=Array(a),l=0;l<a;l++)o[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(o))),i.onPageRequest=function(e){var t=i.props,n=t.metadataListEntityID,r=t.disableReloadThreshold;(0,t.dispatchPopulateMetadataListRange)(h()({metadataListEntityID:n,disableReloadThreshold:r},e))},r=n,c()(i,r)}return d()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){
e.metadataListEntityID!==this.props.metadataListEntityID&&this._populate(e)},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.metadataListEntityID,n=e.shouldResetOnUnmount;this.props.dispatchDeselectAllMetadataListItems({metadataListEntityID:t}),n&&this.props.dispatchResetMetadataList({metadataListEntityID:t})},t.prototype._populate=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.metadataListEntityID,n=e.initialSize,i=e.dispatchPopulateMetadataList,r=e.dispatchPopulateMetadataListRange;n&&Object(S.a)(function(){n===1/0?i({metadataListEntityID:t}):r({metadataListEntityID:t,startIndex:0,endIndex:n-1,pages:1})})},t.prototype.render=function(){var e=this.props,t=e.component,n=(e.dispatchPopulateMetadataListRange,e.dispatchDeselectAllMetadataListItems,e.dispatchResetMetadataList,
a()(e,["component","dispatchPopulateMetadataListRange","dispatchDeselectAllMetadataListItems","dispatchResetMetadataList"]));return y.a.createElement(t,h()({},n,{onPageRequest:this.onPageRequest}))},t}(m.Component);P.defaultProps={disableReloadThreshold:!1,shouldResetOnUnmount:!1},t.a=Object(b.b)(i,j)(P)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.metadataListEntityID},a.a,function(e,t){return t[e]})}t.a=i;var r=n(6),a=(n.n(r),n(2431))
},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),Object(i.createSelector)(function(e){return e.ui.dvrSettingsUI},function(e){return e.dvrSetup}));t.a=r},,function(e,t,n){var i=n(179),r=n(116),a=n(820),o=n(317),s=n(272),l=function(e,t,n){var c,u,d,p=e&l.F,h=e&l.G,f=e&l.S,v=e&l.P,g=e&l.B,m=e&l.W,y=h?r:r[t]||(r[t]={}),b=y.prototype,I=h?i:f?i[t]:(i[t]||{}).prototype;h&&(n=t);for(c in n)(u=!p&&I&&void 0!==I[c])&&s(y,c)||(d=u?I[c]:n[c],
y[c]=h&&"function"!=typeof I[c]?n[c]:g&&u?a(d,i):m&&I[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.prototype=e.prototype,t}(d):v&&"function"==typeof d?a(Function.call,d):d,v&&((y.virtual||(y.virtual={}))[c]=d,e&l.R&&b&&!b[c]&&o(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,n){
"use strict";var i=n(239),r=new i.a({interface:["get","set","remove","clear"]});t.a=r},function(e,t,n){"use strict";var i=(n(33),n(16)),r=n(609),a=n(1408),o=r.a.extend({name:"UserStorageModel",storageKey:"users",sessionAttrs:{activeUserID:i.a.integer},syncedRelations:{users:{relationClass:a.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 o},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(68),o=n(12),s=n.n(o),l=n(67),c=n(19),u=n(468),d=n(466),p=a.c.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(s.a.Deferred().resolve().promise()),!t.allowInCache&&!t.persistInCache)return void a.c.Collection.prototype.constructor.apply(this,arguments);this.initialize.apply(this,arguments);var n=this.cache.getItemCacheKey(this),i=this.cache.get(n);if(this.uninitialize(),t.onlyIfCached&&(i||(i={})),i)return i;a.c.Collection.prototype.constructor.apply(this,arguments),
this.cache.store(this,n)},uninitialize:function(){this.stopListening()},sync:function(){return(this.allowInCache||this.persistInCache)&&this.cache.store(this),a.c.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=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=r.a.isObject(e)?e:l.a.parseXML(e);if(!t)return n;var i=n[t];return i?(Array.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=r.a.extend({silent:!0},e),this.abortPendingPopulate(),this.resetPopulatePromise(null),this.reset([],e)}})
;p.extend=function(){var e=a.c.Collection.extend.apply(this,arguments);return e.prototype.cache=new u.a,e},t.a=p},function(e,t,n){"use strict";var i=n(4),r=n(275),a=n(28),o=["key","typeID","typeString","rootTypeString"],s=Object(r.a)(o,[{key:"movies",typeID:"1",typeString:a.f,rootTypeString:a.f,title:function(){return Object(i.default)("Movies")},shortTitle:function(){return Object(i.default)("Movies")},defaultAgent:"com.plexapp.agents.imdb",defaultLanguage:"en",
defaultScanner:"Plex Movie Scanner",sectionTypeIcon:"plex-icon-movies-560"},{key:"tv",typeID:"2",typeString:a.k,rootTypeString:a.k,title:function(){return Object(i.default)("TV Shows")},shortTitle:function(){return Object(i.default)("Shows")},defaultAgent:"com.plexapp.agents.thetvdb",defaultLanguage:"en",defaultScanner:"Plex Series Scanner",sectionTypeIcon:"plex-icon-shows-560"},{key:"music",typeID:"8",typeString:a.b,rootTypeString:a.b,title:function(){return Object(i.default)("Music")},
shortTitle:function(){return Object(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:a.g,rootTypeString:a.h,title:function(){return Object(i.default)("Photos")},shortTitle:function(){return Object(i.default)("Photos")},
defaultAgent:"com.plexapp.agents.none",defaultLanguage:"en",defaultScanner:"Plex Photo Scanner",sectionTypeIcon:"plex-icon-photos-560"},{key:"videos",typeID:"1",typeString:a.f,rootTypeString:a.c,title:function(){return Object(i.default)("Other Videos")},shortTitle:function(){return Object(i.default)("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(630),r=n(477),a=n(333),o=a.a.extend({background:!0,setup:function(e){this.minSize=!0,this.type=e.type,this.modelAttribute=e.modelAttribute||"thumb",!1!==e.placeholder&&(this.model&&this.model.get("isFolder")?this.placeholderClass=r.a.folder:e.placeholderClass||(this.placeholderClass=r.a[this.type])),a.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)),
a.a.prototype.setDimensions.call(this,e)},setModel:function(e,t){a.a.prototype.setModel.apply(this,arguments),this.model&&this.model.get("isFolder")&&(this.placeholderClass=r.a.folder)}});t.a=o},,function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(s.a)(),function(e){return!e||e.isPersonalCloudServer})}function r(){return Object(o.createSelector)(Object(l.a)(),i(),function(e,t){return t.useClientFilters},function(e,t,n){return{useClientFilters:null!=n?n:t,url:e}})}
var a=n(11),o=n(6),s=(n.n(o),n(42)),l=n(898),c=n(409),u=Object(a.b)(r)(c.a);t.a=u},function(e,t,n){"use strict";function i(e){return e.entities}t.a=i},function(e,t,n){"use strict";function i(e,t){return e.get("ui").get(t+"Player")}function r(e,t){var n=e.get("playQueue");if(n){var i=n.get("playQueueItems");if(!(t<0||t>=i.length)){return i.at(t)}}}t.b=i,t.a=r},function(e,t,n){"use strict";n.d(t,"a",function(){return f})
;var i=n(19),r=n(30),a=n(15),o=n(32),s=n(16),l=n(608),c=n(99),u=n(472),d=n(274),p=n(1844),h=n(1846),f="myPlex",v=c.c.connectionTestResults,g=c.c.promiseStates,m=c.c.extend({name:"CloudServerModel",connectionTestUrl:"https://plex.tv/monitoring/health",sessionAttrs:{connectionTestResult:s.a.oneOf(v.PENDING,v.CONNECTED,v.UNAVAILABLE,v.UNAUTHORIZED).isRequired,promiseState:s.a.oneOf(g.PENDING,g.RESOLVED,g.REJECTED).isRequired,isShared:s.a.boolean.isRequired,isBundled:s.a.boolean.isRequired,
isCloud:s.a.boolean.isRequired,isMerged:s.a.boolean.isRequired,isDownForMaintenance:s.a.boolean.isRequired,isResourcesPending:s.a.boolean.isRequired,hasFailedResources:s.a.boolean.isRequired,accessToken:s.a.string,baseUrl:s.a.string.isRequired,plexPassUrl:s.a.string.isRequired,accountUrl:s.a.string.isRequired,cloudSyncUrl:s.a.string.isRequired,appsUrl:s.a.string.isRequired,helpUrl:s.a.string.isRequired,hasEventConnection:s.a.boolean},sessionRelations:{activeConnection:{relationClass:d.a,
deferred:!0},connections:{relationClass:u.b,options:function(){return{server:this}}},resources:{relationClass:p.a,options:function(){return{server:this}}}},defaults:function(){var e="https://plex.tv";return{connectionTestResult:v.PENDING,promiseState:g.PENDING,isShared:!1,isBundled:!1,isCloud:!0,isMerged:!1,isDownForMaintenance:!1,isResourcesPending:!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",hasEventConnection:!1}},swizzleNodeUrl:function(e){var t=this.parent.get("primaryServer");return t&&t.get("isConnected")&&t.get("isFullServer")&&t.get("allowChannelAccess")?t.swizzleUrl(e):this.swizzleUrl(e,{connection:new d.a({scheme:"https",address:"node.plexapp.com",port:"32443"})})},testAllConnections:function(){var e=this,t=this.get("connections")
;Object(r.a)("[Connections] Testing all %s connection(s) for %s",t.length,this.get("debugName"));var n=t.map(function(t){return e.testConnection(t)});return Object(h.a)(n)},testConnection:function(e){var t={server:this,connection:e,url:this.connectionTestUrl};return o.a.execute("testServerConnection",t).done(this.onConnectionTestSuccess.bind(this)).fail(this.onConnectionTestError.bind(this))},abortConnectionTest:function(e){var t={server:this,connection:e,url:this.connectionTestUrl}
;o.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();r.a.info("[Connections] Active connection to %s is %s",this.get("debugName"),t.id),this.startCapturingChangeEvents(),this.set({isDownForMaintenance:!1,connectionTestResult:v.CONNECTED,activeConnection:t}),
this.releaseCapturedChangeEvents()},onConnectionTestError:function(e,t){e.get("isAborted")||this.get("connections").hasOnlyFailedConnections()&&this._reject({isDownForMaintenance:503===t.status})}});Object(l.a)(m,function(){return{relationClass:Object(a.d)("CloudServerFlexModel"),options:{server:this}}}),t.b=m},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.circleClassName,i=e.iconClassName,r=e.title,o=c()(e,["className","circleClassName","iconClassName","title"])
;return p.a.createElement(h.a,a()({className:t,"aria-label":Object(f.default)("Play {title}",{title:r})},o),s()("div",{className:n},void 0,s()(v.a,{name:"plex-icon-play-560",className:i})))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(22),f=n(4),v=n(26),g=n(2031),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,t,n){if("mixed"===e)return[]
;switch(n){case s.h:switch(e){case"season":return[d.a,I.a];case"episode":return[d.a,D.a];case"album":return[d.a,g.a];case"actor":return[x.a,N.a]}break;case s.a:switch(e){case"movie":return[d.a,O.a,g.a];case"clip":return[d.a,O.a];case"episode":return[f.a,O.a,M.a]}break;case s.j:switch(t){case"news":switch(e){case"clip":return[d.a,A.a,P.a]}}switch(e){case"artist":return[d.a,y.a];case"photo":return[u.a,j.a];case"photoalbum":case"clip":return[d.a,j.a];case"playlist":return[d.a,C.a];case"collection":
return[d.a,m.a];case"actor":case"genre":case"director":case"autotag":case"tag":case"place":return[R.a]}break;case s.g:case s.e:case s.f:case s.c:switch(t){case"news":switch(e){case"clip":return[u.a,P.a]}break;case"podcast":switch(e){case"track":return[f.a,M.a]}}switch(e){case"episode":return[f.a,M.a];case"clip":return[d.a,j.a];case"track":return[d.a,v.a]}break;case s.d:return[p.a,L.a,A.a,P.a,null]}switch(t){case"news":switch(e){case"clip":return[p.a,A.a,P.a,null]}break;case"podcast":switch(e){
case"show":return[d.a]}}switch(e){case"movie":return[d.a,g.a];case"show":return[d.a,b.a];case"season":return[h.a,d.a];case"episode":return[f.a,d.a,S.a];case"artist":return[d.a];case"album":return[h.a,d.a];case"track":return[f.a,d.a];case"photo":return[u.a];case"photoalbum":case"clip":return[d.a];case"extra":return[u.a,E.a];case"musicVideo":return[f.a,u.a];case"playlist":return[d.a,C.a];case"collection":return[d.a,m.a]}return[u.a]}function r(e,t,n,r,a){var o=t===c.e,s=t===c.g,u=n===l.d
;if(!o&&!s&&!u)return e;var d=i(n,r,a),p=i(t,r,a),h=e.filter(function(e){return!p.includes(e)});return d.concat(h)}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.subtype,a=n.activeSort,l=n.isSearch,c=n.isSearchAll,u=n.providerEntityID,d=i(e,r,t);if(l&&(d.push(k.a),c&&d.push(_.a)),o.c.EPG_IDENTIFIER.test(u)&&("movie"===e||"episode"===e||"mixed"===e))switch(t){case s.g:case s.e:d.push(T.a);break;case s.c:break;default:d.push(w.a)}if(a){var p=Object(z.a)(a)
;p&&!d.includes(p)&&d.push(p)}return d}t.a=r,t.b=a;var o=n(55),s=n(31),l=n(28),c=n(229),u=n(708),d=n(518),p=n(2203),h=n(433),f=n(230),v=n(709),g=n(294),m=n(1031),y=n(1032),b=n(710),I=n(711),S=n(712),M=n(255),D=n(1035),C=n(2213),O=n(1037),j=n(715),P=n(1038),w=n(1040),T=n(2222),E=n(2224),x=n(2227),N=n(2228),A=n(2229),L=n(2231),k=n(1051),_=n(2235),R=n(1052),z=n(2238)},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(18),r=n(16),a=n(97),o={GRABBER_GRAB:"grabber.grab",
PROVIDER_DEVICE_CHANNELSCAN:"provider.device.channelscan",PROVIDER_EPG_LOAD:"provider.epg.load",PROVIDER_SUBSCRIPTION_PROCESS:"provider.subscriptions.process",OPTIMIZE_DATABASE:"general.db.optimize",CLEAN_BUNDLES:"general.bundle.clean",LIBRARY_DELETE:"library.delete",LIBRARY_REFRESH_ITEMS:"library.refresh.items"},s=i.a.extend({name:"ActivityModel",context:["server"],idAttribute:"uuid",rootPropertyName:"Activity",responseType:function(){return Object(a.a)(this.server)},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=s},function(e,t,n){"use strict";function i(e){return a()(l.a,{},void 0,s.a.createElement(c.a,e))}var r=n(2),a=n.n(r),o=n(0),s=n.n(o),l=n(787),c=n(788);t.a=i},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(function(e){return e.ui.prePlayPage},function(e){var t=e.relatedHubs,n=e.isRelatedHubsPending;return{relatedHubEntityIDs:t,showSpinner:!t.length&&n}})}var r=n(11),a=n(6),o=(n.n(a),n(3206));t.a=Object(r.b)(i)(o.a)},function(e,t,n){e.exports={default:n(1316),__esModule:!0}},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";function i(e){var t=e.children,n=a()(e,["children"]);return l.a.createElement("div",n,t)}var r=n(13),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(2003),u=n.n(c);i.defaultProps={className:u.a.group},t.a=i},function(e,t,n){"use strict";function i(e){return s.a.createElement(c.a,a()({className:d.a.innerEmptyPage,contentClassName:d.a.innerEmptyPageContent,scrollDirection:l.NONE},e))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(101),c=n(157),u=n(1083),d=n.n(u);t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className;return a()("div",{className:n,"data-qa-id":"preplaySecondTitle"},void 0,t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2412)),c=n.n(l);i.defaultProps={className:c.a.secondaryTitle},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return a()("div",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2413)),c=n.n(l);i.defaultProps={
className:c.a.tertiaryTitle},t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(7),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(5),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=(n.n(g),n(250)),y=n(348),b=(n(735),n(2433)),I=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.state=r._getListState(n),r._keyPool=Object(b.a)("cell"),r._shouldRequestPage=!1,r}return p()(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);Object(m.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.moveIndex!==i.moveIndex)))))))))))
},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.getLandmarks&&e.layout.getLandmarks(),i=e.layout.getRangesForPosition(e.scrollTop,e.scrollLeft,e.size);return{listStyle:t,landmarks:n,visibleStartIndex:i.visibleStartIndex,visibleEndIndex:i.visibleEndIndex,
partiallyVisibleStartIndex:i.partiallyVisibleStartIndex,partiallyVisibleEndIndex:i.partiallyVisibleEndIndex,renderStartIndex:i.renderStartIndex,renderEndIndex:i.renderEndIndex,moveIndex:e.moveIndex}},t.prototype._getListStyle=function(e){var t=e.size,n=e.layout,i=e.viewportWidth,r=e.viewportHeight,a=e.listTop,o=e.listLeft,s={viewportWidth:i,viewportHeight:r,listTop:a,listLeft:o};return n.getListStyle(s,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,r=e.size,a=e.layout,s=e.hasNestedList,l=e.viewportWidth,c=e.viewportHeight,u=e.scrollLeft,d=e.scrollTop,p=e.cellRenderer,h=e.isScrolling,v=e.onPageRequest,g=this.state,m=g.moveIndex,y=g.renderStartIndex,b=g.renderEndIndex,I=g.partiallyVisibleStartIndex,S=g.partiallyVisibleEndIndex,M=r>n.length&&b===n.length-1,D=this._keyPool.getKeys(y,b,n,i,t),C=[];return f.a.each(D,function(e,i){
var v=e.index,g=e.item,y=v>=I&&v<=S,b=a.getPositionForIndex(v,r,n);(null===g||s)&&(M=!0);var D={key:i,keyPropName:t,isVisible:y,isScrolling:h,moveIndex:m,viewportWidth:l,viewportHeight:c,cellIndex:v,cellX:b.cellX,cellY:b.cellY,cellWidth:b.cellWidth,cellHeight:b.cellHeight};s&&(D.scrollLeft=u,D.scrollTop=d),f.a.isString(g)?D[t]=g:D=o()({},g,D),C.push(p(D))}),this._shouldRequestPage=!!v&&(M&&!h),C},t.prototype.render=function(){
var e=this._getListStyle(this.props),t=this.props,n=t.className,i=t.isScrolling,a=t.skipRenderCells,o=t.children;return r()("div",{className:(n||"")+" "+(i&&y.g||""||""),style:e},void 0,!a&&this.renderCells(),o)},t}(g.Component);I.defaultProps={keyPropName:"entityID",items:[],itemsOffset:0,hasNestedList:!1,listTop:0,listLeft:0,isScrolling:!1,skipRenderCells:!1},t.a=I},function(e,t,n){"use strict";var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(1),u=n.n(c),d=n(0),p=n.n(d),h=function(e){
function t(n,i){r()(this,t);var a=o()(this,e.call(this,n,i));return a.metricsContext=n.metricsContext,a}return l()(t,e),t.prototype.getChildContext=function(){return{metricsContext:this.metricsContext}},t.prototype.render=function(){return this.props.children?p.a.Children.only(this.props.children):null},t}(d.Component);h.childContextTypes={metricsContext:u.a.string},t.a=h},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),
n(0)),h=n.n(p),f=n(11),v=n(240),g=n(203),m=n(2675),y={dispatchChangeBackground:g.a,dispatchResetBackground:g.c,dispatchGarbageCollectEntities:v.e},b=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentDidMount=function(){this.props.disableBackgroundPreset||this.props.dispatchChangeBackground({allowLightPreset:this.props.allowBackgroundLightPreset})},t.prototype.componentWillUnmount=function(){this.props.dispatchResetBackground(),
this.props.dispatchGarbageCollectEntities()},t.prototype.render=function(){var e=this.props,t=(e.dispatchChangeBackground,e.dispatchResetBackground,e.dispatchGarbageCollectEntities,r()(e,["dispatchChangeBackground","dispatchResetBackground","dispatchGarbageCollectEntities"]));return h.a.createElement(m.a,t)},t}(p.Component);b.defaultProps={disableBackgroundPreset:!1,allowBackgroundLightPreset:!1},t.a=Object(f.b)(null,y)(b)},function(e,t,n){"use strict";function i(e){
var t=e.children,n=s()(e,["children"]);return u.a.createElement("div",a()({className:p.a.pageHeader},n),t)}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2679),p=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return a()("div",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2680)),c=n.n(l);i.defaultProps={className:c.a.pageHeaderLeft},t.a=i},function(e,t){function n(e){
return encodeURIComponent(e||"")}e.exports=n},,function(e,t,n){"use strict";var i={channelGrid:"1.13.2.5081",typeFirst:"1.12.1",photoTagEdit:"1.11.1",sharedUserNotifications:"1.11.1",adaptiveBitrateFallback:"1.9.5",multiplePlaylistTypes:"1.7.1",itemClusters:"1.5.4",optimizeDatabaseActivity:"1.4.2",asyncCheckFiles:"1.4.0",json:"1.8.0",libraryDeleteActivity:"1.2.1",cleanBundlesActivity:"1.2.1",allowBlacklistedMethodHeaders:"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"};t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.key,n=e.actionSuffix,i=e.fetchActionType,o=e.getModel,s=Object(r.a)(n||t),l=Object(a.a)(t),c="is"+l+"Populated";return function(e,t,n){o(e,t).get(c)||n({type:i||"FETCH_"+s,payload:t})}}t.a=i;var r=(n(33),n(1586)),a=n(326)},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(170)),a=Object(i.createSelector)(r.a,function(e){return e.providers});t.a=a},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(250)),a=Object(i.createSelectorCreator)(i.defaultMemoize,r.a);t.a=a},,function(e,t,n){
"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r});var i="full",r="mini"},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(o.a,Object(a.a)(),function(e,t){return e[t.liveTVSession]})}t.a=i;var r=n(6),a=(n.n(r),n(44)),o=n(1793)},function(e,t,n){"use strict";function i(e){for(var t=e.className,n=e.component,i=e.tags,r=e.message,o=[r],l=i.length-1,u=0;l>=0;){
for(var d=i[l],f=d.open,v=d.close,g=d.component,m=c()(d,["open","close","component"]),y=new RegExp("(^.*)"+Object(h.a)("{"+f+"}")+"(.*)"+Object(h.a)("{"+v+"}")+"(.*$)"),b=[],I=o.length-1;I>=0;I--){var S=o[I];if("string"!=typeof S)b.unshift(S);else{var M=S.match(y);if(M){var D=M[1],C=M[2],O=M[3];b.unshift(D,p.a.createElement(g,s()({key:u},m),C),O),u+=1}else b.unshift(S)}}b.length===o.length?l-=1:o=b}return a()(n,{className:t},void 0,o)}
var r=n(2),a=n.n(r),o=n(7),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(215);n(33);i.defaultProps={component:"span"},t.a=i},function(e,t,n){"use strict";function i(e){return e.user}t.a=i},function(e,t,n){"use strict";function i(e,t,n,i){return Object(F.a)(e,t,n,i)}function r(e,t,n,r){return!!i(e,t,n,r)&&(t.isLibraryProvider&&r.Media&&r.Media.length>1)}function a(e,t,n,r){return i(e,t,n,r)&&!!t.features.playqueue}function o(e,t,n,r){var a=i(e,t,n,r),o=r.isExtra&&r.isPremium
;return a&&!!t.features.playqueue&&!o}function s(e,t,n,i){return!!i.primaryExtraKey}function l(e,t,n,i){return!(!i.related||!i.related.find(function(e){return/similarPlaylist/.test(e)}))}function c(e,t,n,i){return l(e,t,n,i)}function u(e,t,n,i){return d(e,t,n,i)}function d(e,t,n,i){var r=i.isExtra&&i.isPremium;return e.isFullServer&&!!i.isLibraryItem&&!r}function p(e,t,n,i){return!!t.features.actions.save&&null!=i.saved}function h(e,t,n,i){
return!(!t.features.rate||!n[U.g])&&(!B.u(i.type)&&!Object(Q.c)(i))}function f(e,t,n,i){return!(!t.features.rate||!n[U.g])&&(!B.u(i.type)&&Object(Q.c)(i))}function v(e,t,n,i){return!(!(t.features.actions&&t.features.actions.scrobble&&t.features.actions.scrobble.key)||t.protocols.livetv||i.type===B.l&&i.subtype!==V.b||null!=i.saved&&!i.saved&&!i.viewOffset||i.isExtra)&&(B.v(i.type)?i.unviewedLeafCount>0:!i.viewCount||!!i.viewOffset)}function g(e,t,n,i){
return!(!(t.features.actions&&t.features.actions.scrobble&&t.features.actions.scrobble.reverseKey)||t.protocols.livetv||i.type===B.l&&i.subtype!==V.b||null!=i.saved&&!i.saved||i.isExtra)&&(B.v(i.type)?i.viewedLeafCount>0:!!i.viewCount||!!i.viewOffset)}function m(e,t,n,i){var r=i.preferences;return!t.features.manage&&null!=r}function y(e,t,n,i){var r=i.isLibraryItem,a=i.isPlaylist,o=i.isExtra,s=i.isFolder,l=i.readOnly,c=r&&!o&&!s;return a?!l:!(!t.features.manage||!c)}function b(e,t,n,i){
return y(e,t,n,i)}function I(e,t,n,i){return y(e,t,n,i)}function S(e,t,n,i){return!!y(e,t,n,i)&&!(!i.guid||/(local|none)\:\/\//.test(i.guid))}function M(e,t,n,i){return!!y(e,t,n,i)&&(!!i.guid&&!S(e,t,n,i))}function D(e,t,n,i){return S(e,t,n,i)}function C(e,t,n,i){if(!y(e,t,n,i))return!1;var r=void 0;return r=B.v(i.type)?i.Location:R.a.filter(i.Media,function(e){return!e.proxyType}),r.length>1}function O(e,t,n,i){
return!!e.isFullServer&&(!(i.isExtra||!i.isLibraryItem&&!i.isPlaylist)&&!(!e.allowSync||!i.allowSync))}function j(e,t,n,i){return!!y(e,t,n,i)&&!(!e.transcoderVideo||!e.backgroundProcessing)}function P(e,t,n,i){return!!t.protocols.download&&!i.isExtra}function w(e,t,n,i){return!1}function T(e,t,n,i){return!1}function E(e,t,n,i){return!1}function x(e,t,n,i){return!!y(e,t,n,i)&&!(!i.isPlaylist&&i.type!==B.d&&!e.allowMediaDeletion)}function N(e,t,n,i){
return!!y(e,t,n,i)&&(!!e.allowMediaDeletion&&R.a.filter(i.Media,function(e){return!!e.proxyType}).length>0)}function A(e,t,n,i){return t.isLibraryProvider&&!i.isExtra}function L(e,t,n,i){return t.isLibraryProvider&&!i.isFolder}function k(e,t,n,i,r){var a=r&&Y[r]?r:i.type,o=Y[a];return o?o.reduce(function(r,o){var s=H[o];return Object(z.a)(R.a.isFunction(s),"getMetadataActionProps: Invalid action, "+o+", for "+a),r[o]=s(e,t,n,i),r},{}):{}}t.j=i,t.k=o,t.a=u,t.b=d,t.f=h,t.o=f,t.g=v,t.h=g,t.e=y,
t.l=b,t.c=I,t.n=O,t.i=j,t.d=x,t.m=L,t.p=k;var _=n(5),R=n.n(_),z=n(33),U=n(52),B=n(28),V=n(143),F=n(972),Q=n(498),H={showPlay:i,showPlayVersion:r,showPlayAll:i,showShuffle:a,showQueue:o,showPlayTrailer:s,showPlayPlexMix:l,showQueuePlexMix:c,showPlayMusicVideo:s,showAddToAlbum:u,showAddToPlaylist:d,showAddToSaved:p,showFavorite:h,showUnfavorite:f,showMarkPlayed:v,showMarkUnplayed:g,showSettings:m,showEdit:y,showRefresh:b,showAnalyze:I,showFixMatch:S,showMatch:M,showUnmatch:D,showSplitApart:C,
showSync:O,showOptimize:j,showDownload:P,showWatchLater:w,showShare:T,showRecommend:E,showDelete:x,showDeleteVersion:N,showGetInfo:A,showSelect:L},Y={
movie:["showPlay","showPlayVersion","showQueue","showPlayTrailer","showAddToPlaylist","showMarkPlayed","showMarkUnplayed","showEdit","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo","showSelect"],
show:["showPlay","showPlayAll","showShuffle","showQueue","showPlayTrailer","showAddToPlaylist","showAddToSaved","showMarkPlayed","showMarkUnplayed","showEdit","showSettings","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDelete","showSelect"],
season:["showPlay","showPlayAll","showShuffle","showQueue","showAddToPlaylist","showMarkPlayed","showMarkUnplayed","showEdit","showAnalyze","showSync","showOptimize","showDelete","showSelect"],episode:["showPlay","showPlayVersion","showQueue","showAddToPlaylist","showMarkPlayed","showMarkUnplayed","showEdit","showRefresh","showAnalyze","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo","showSelect"],
artist:["showPlay","showShuffle","showQueue","showAddToPlaylist","showEdit","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showDelete","showSelect"],album:["showPlay","showShuffle","showQueue","showAddToPlaylist","showEdit","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showDelete","showSelect"],
track:["showPlay","showQueue","showPlayPlexMix","showQueuePlexMix","showPlayMusicVideo","showAddToPlaylist","showAddToSaved","showMarkPlayed","showMarkUnplayed","showEdit","showAnalyze","showSync","showDownload","showDelete","showGetInfo","showSelect"],photoalbum:["showPlay","showShuffle","showAddToAlbum","showEdit","showAnalyze","showSync","showSelect"],
photo:["showPlay","showAddToAlbum","showFavorite","showUnfavorite","showEdit","showAnalyze","showSync","showDownload","showDelete","showGetInfo","showSelect"],
clip:["showPlay","showPlayVersion","showQueue","showPlayTrailer","showAddToPlaylist","showMarkPlayed","showMarkUnplayed","showEdit","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo","showSelect"],playlist:["showDelete","showEdit","showPlay","showQueue","showShuffle","showSync","showSelect","showEdit"],
collection:["showPlay","showQueue","showShuffle","showAddToPlaylist","showEdit","showSync","showDelete"]}},function(e,t,n){"use strict";function i(e){var t=e.identifiers;for(var n in t)if(t[n]!==e[n])return!1;return!0}function r(e,t,n,r){var a=Object(I.a)(t,function(e){return{identifiers:e}}),s=function(t){function a(e,n){u()(this,a);var i=p()(this,t.call(this,e,n));return i.onRepopulate=function(){i._repopulate()},i._isPopulated=!1,i._component=null,i}return f()(a,t),
a.prototype.componentDidMount=function(){this._populate()},a.prototype.componentDidUpdate=function(){this._isPopulated||this._populate()},a.prototype._populate=function(){var e=this.props,t=(e.identifiers,e.dispatch),i=l()(e,["identifiers","dispatch"]);Object(b.a)(function(){n(t,i)})},a.prototype._repopulate=function(){if(!r)return this._populate();var e=this.props,t=(e.identifiers,e.dispatch),n=l()(e,["identifiers","dispatch"]);r(t,n)},a.prototype.render=function(){
if(this._isPopulated=i(this.props),this._isPopulated){var t=this.props,n=(t.identifiers,t.dispatch,l()(t,["identifiers","dispatch"]));this._component=m.a.createElement(e,o()({onRepopulate:this.onRepopulate},n))}return this._component},a}(g.Component);return s.displayName="Populatable("+Object(S.a)(e)+")",s.WrappedComponent=e,Object(y.b)(function(e){return a})(s)}var a=n(7),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),
n(0)),m=n.n(g),y=n(11),b=(n(392),n(33),n(34)),I=n(195),S=n(153);t.a=r},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return s});var i=n(36),r=n(82),a=Object(i.a)(r.a),o=Object(i.a)(r.d),s=Object(i.a)(r.Z)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return a()("div",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2681)),c=n.n(l);i.defaultProps={
className:c.a.pageHeaderRight},t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(24),b=n(22),I=n(291),S=n(2710),M=n.n(S),D=function(e){function t(){return u()(this,t),p()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.render=function(){
var e=this.props,t=e.linkClassName,n=e.buttonClassName,i=e.title,a=e.to,s=e.hasMenu,c=e.isMenuOpen,u=e.isSelected,d=e.isDisabled,p=l()(e,["linkClassName","buttonClassName","title","to","hasMenu","isMenuOpen","isSelected","isDisabled"]);return s||a?s?m.a.createElement(I.a,r()({className:n,"data-qa-id":"typeDropdownButton",isSelected:u,isDisabled:d,direction:c?y.a.UP:y.a.DOWN},p),i):o()(b.a,{className:t,to:a,isDisabled:d},void 0,i):o()("span",{className:t},void 0,i)},t}(g.Component)
;D.defaultProps={linkClassName:M.a.link,buttonClassName:M.a.button,hasMenu:!1,isMenuOpen:!1,isSelected:!1,isDisabled:!1},t.a=D},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.selectedDirectory},function(e){if(e){var t=e.key;return"/"===t.charAt(0)?t:"/library/sections/"+t}})}t.a=i;var r=n(6);n.n(r)},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.metricsPage,i=e.metricsPane;return a()(l.a,{metricsPage:n,metricsProperties:{pane:i}
},void 0,a()("div",{className:u.a.content},void 0,t))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(187)),c=n(3043),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){return a()("h2",{className:e.className},void 0,e.children)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3044)),c=n.n(l);i.defaultProps={className:c.a.header},t.a=i},function(e,t,n){"use strict";function i(e){return e.ui.authCodeExchange}t.a=i},,function(e,t,n){"use strict"
;var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(15),l=n(19),c=n(69),u=n(30),d=n(837),p=c.a.extend({initialize:function(){r.a.bindAll(this,"onAjaxSend","onAjaxComplete"),this.requests=[],this.byId={}},startListening:function(){var e=o()(document);e.on("ajaxSend",this.onAjaxSend),e.on("ajaxComplete",this.onAjaxComplete)},stopListening:function(){var e=o()(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=r.a.isString(e)?this.byId[e]:e;t&&(t.xhr.aborting=!0,t.xhr.abort(),this.remove(t))},store:function(e,t){var n=r.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=r.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 r=this.store(t,n);t.always(function(){t.aborting||i.remove(r)})}},onAjaxComplete:function(e,t,n){var i=Object(d.a)(t);if(!t.aborting&&i){var a=Object(l.parseUrl)(n.url);if(!i||"/log"!==a.pathname){var o=Object(s.d)("appModel").get("servers").find(function(e){var t=e.get("activeConnection"),i=t&&t.get("isConnected"),a=r.a.result(t,"url");return!!i&&0===n.url.indexOf(a)})
;o&&(Object(u.a)('[Connections] Active connection to "%s" lost authorization',o.get("debugName")),o.trigger("error:connection",o))}}}});t.a=new p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=n.n(i),a=n(17),o=n(94),s=n(19),l=n(468),c=n(326),u=n(97),d=n(51),p=n(23),h=n(613),f=p.a.extend({name:"HubCollection",
context:["server","provider","section","identifier","hubKey","hubCount","count","includeEmpty","libraryHubsOnly","includeFeaturedTags","includeLibraryPlaylists","includeTypeFirst","excludes","excludeFields","excludeElements","allowSync","maxLength"],responseContext:["identifier","allowSync"],model:h.a,cache:new l.a,responseType:function(){return Object(u.a)(this.server)},url:function(){var e="/hubs";this.hubKey?e=this.hubKey:this.section&&(e="/hubs/sections/"+encodeURIComponent(this.section.id))
;var t={excludeFields:this.excludeFields||"summary"};return this.excludeElements&&(t.excludeElements=this.excludeElements),this.count&&(t.count=this.count),this.hubCount&&(t.hubCount=this.hubCount),this.includeEmpty&&(t.includeEmpty=1),this.libraryHubsOnly&&(t.libraryHubsOnly=1),this.includeFeaturedTags&&(t.includeFeaturedTags=1),this.includeLibraryPlaylists&&(t.includeLibraryPlaylists=1),this.includeTypeFirst&&(t.includeTypeFirst=1),
this.excludes&&this.excludes.length&&this.excludes.forEach(function(e){t["exclude"+Object(c.a)(e)]=1}),s.join(e,t)},initialize:function(){this.section&&this.listenTo(a.a,"clear:sections:hubs",this.clear)},fetch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.a.clone(e);return e.onlyTransient&&this.populatePromise&&(t.remove=!1,t.url=s.join(r.a.result(this,"url"),{onlyTransient:1})),p.a.prototype.fetch.call(this,t)},augmentResponseText:function(e,t){
return t===d.a.xml?Object(o.b)(e):e},augmentResponse:function(e){var t=this,n=this.model.prototype.rootPropertyName;if(e&&n){if(Array.isArray(e)){var i;i={},i[n]=e,e=i}else if(e[n]&&!Array.isArray(e[n])){var r;r={},r[n]=[e[n]],e=r}var a=e[n],o=a&&a.length;if(o){if(!this.includeEmpty)for(;o&&o--;)a[o].size<=0&&a.splice(o,1);this.maxLength&&a.splice(this.maxLength),e.size>a.length&&(e.size=String(a.length))}}return this.responseContext.forEach(function(n){var i=e[n];void 0!==i&&t.setContext(n,i)
}),e}});t.default=f},function(e,t,n){"use strict";function i(e,t,n){return"#!/settings/server/"+encodeURIComponent(e)+"/"+t+"/"+n}t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"c",function(){return r}),n.d(t,"b",function(){return a});var i="audio",r="video",a="photo"},function(e,t,n){"use strict";function i(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}t.a=i},,function(e,t,n){function i(e){if(!o(e)||r(e)!=s)return!1;var t=a(e);if(null===t)return!0
;var n=d.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==p}var r=n(481),a=n(1638),o=n(408),s="[object Object]",l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,p=u.call(Object);e.exports=i},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(170)),a=Object(i.createSelector)(r.a,function(e){return e.servers});t.a=a},,function(e,t,n){"use strict";function i(){return Object(r.createSelector)(a.a,Object(o.a)(),function(e,t){
return e[t.providerEntityID]})}t.a=i;var r=n(6),a=(n.n(r),n(194)),o=n(44)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Object(r.createSelector)(Object(o.a)(e),a.a,function(e,t){if(e)return t[e.metadataItem]})}t.a=i;var r=n(6),a=(n.n(r),n(110)),o=n(119)},function(e,t,n){"use strict";function i(e,t){var n=Object(m.c)(t);return e.get("ui").get(n+"Player")}function r(e,t){
var n=e.appModel,i=e.serverModel,r=e.providerModel,a=e.playerModel,o=e.playQueueModel,l=e.openState,c=e.mediaIndex,u=e.bitrate,d=e.initialState,p=e.requestOptions;if(!a.get("isPlayQueueLoading")){var f=o.get("type");a.restoreDefaults({serverEntityID:i.entityID(),providerEntityID:r.entityID(),isOpen:!0,openState:l||f===v.a?C.b:C.a,isPlayQueueLoading:!0,playQueue:o}),Object(A.a)(s()({serverModel:i,providerModel:r,playQueueModel:o},p)).done(function(){a.set(s()({isPlayQueueLoading:!1},d)),t(U({
playQueueType:f,mediaIndex:c,bitrate:u}))}).fail(function(){var e=n.get("remotePlayer");if(e){var t=e.get("friendlyName");a.restoreDefaults({hasError:!0,errorMessage:Object(h.default)('An error occurred loading the media being played on "{playerName}".',{playerName:t})})}})}}n.d(t,"a",function(){return k}),n.d(t,"l",function(){return _}),n.d(t,"m",function(){return R}),n.d(t,"k",function(){return z}),n.d(t,"n",function(){return U}),n.d(t,"o",function(){return B}),n.d(t,"b",function(){return V}),
n.d(t,"j",function(){return F}),n.d(t,"g",function(){return Q}),n.d(t,"e",function(){return H}),n.d(t,"f",function(){return Y}),n.d(t,"i",function(){return W}),n.d(t,"d",function(){return G}),n.d(t,"c",function(){return K}),n.d(t,"h",function(){return q})
;var a,o=n(7),s=n.n(o),l=n(5),c=n.n(l),u=n(12),d=n.n(u),p=n(15),h=n(4),f=n(30),v=n(214),g=n(659),m=n(85),y=n(28),b=n(59),I=n(129),S=n(78),M=n(130),D=n(422),C=n(197),O=n(36),j=n(343),P=n(344),w=n(172),T=n(55),E=n(496),x=n(675),N=n(1847),A=n(1848),L=n(282),k=Object(O.a)("ui/player/remotePlayer/changeRemotePlayer"),_=Object(O.a)("ui/player/remotePlayer/syncRemotePlayerCurrentItem"),R=Object(O.a)("ui/player/remotePlayer/syncRemotePlayerState"),z=Object(O.a)("ui/player/remotePlayer/syncRemotePlayQueueState"),U=Object(O.a)("ui/player/remotePlayer/syncRemoteQuality"),B=Object(O.a)("ui/player/remotePlayer/syncRemoteStreams"),V=Object(O.a)("ui/player/remotePlayer/changeRemotePlayerVolume"),F=Object(O.a)("ui/player/remotePlayer/showRemotePlayerError"),Q=Object(O.a)("ui/player/remotePlayer/mirrorDetails"),H=Object(O.a)("ui/player/remotePlayer/discoverRemotePlayers"),Y=Object(O.a)("ui/player/remotePlayer/idleRemotePlayer"),W=Object(O.a)("ui/player/remotePlayer/removeRemotePlayer"),G=Object(O.a)("ui/player/remotePlayer/confirmRemoteToLocal"),K=Object(O.a)("ui/player/remotePlayer/confirmLocalToRemote"),q=(a={},
a["ui/player/remotePlayer/changeRemotePlayer"]=function(e,t){var n=e.get("players").get(t);e.set("remotePlayer",n)},a["ui/player/remotePlayer/syncRemotePlayerCurrentItem"]=function(e,t,n){var a=t.playQueueType,o=t.options,s=o.machineIdentifier,l=o.providerIdentifier,c=o.containerKey,u=o.key,p=o.mediaIndex,v=o.bitrate,g=o.playQueueItemID,m=o.didPlayQueueItemChange,y=o.initialState;if(c&&u){var b=i(e,a);if(b){var I="node"===s,S=I?w.a:s,M=void 0,D=void 0
;e.get("servers").populateServer(S).then(function(t){M=t;var n=e.get("user");return(M.get("isCloud")?n.get("desktop").get("providers"):M.get("desktop").get("providers")).populate()}).then(function(e){return D=e.get(l),D||(D=Object(x.a)(c)?e.get(T.c.LIBRARY_PROVIDER_IDENTIFIER):e.get(T.c.CHANNEL_PROVIDER_IDENTIFIER)),D?Object(N.a)({providerModel:D,currentPlayQueueModel:b.get("playQueue"),metadataKey:u,containerKey:c,playQueueOptions:{playQueueType:a,playQueueOwn:!1}
}):d.a.Deferred().reject().promise()}).then(function(t){if(b.get("playQueue")!==t)return void r({appModel:e,serverModel:M,providerModel:D,playerModel:b,playQueueModel:t,openState:b.get("isOpen")?null:C.b,mediaIndex:p,bitrate:v,initialState:y,requestOptions:{metadataKey:I?M.swizzleNodeUrl(u):u,containerKey:I?M.swizzleNodeUrl(c):c}},n);if(!b.get("isPlayQueueLoading")&&!t.get("isUpdatePending")&&m){var i=t.get("playQueueItems"),a=null!=g?i.get(g):i.find(function(e){
return u===e.get("metadataItem").get("key")});if(b.set({isLyricsVisible:!1}),a){var o=t.get("playQueueSelectedItemID"),s=i.get(o),l=t.get("playQueueSelectedItemOffset"),d=i.indexOf(s),h=i.indexOf(a),S=a.get("metadataItem"),O=a.get("playQueueItemID");Object(f.a)("[Cast] The current metadata item on the remote player changed to "+S.get("title")),Object(j.a)(t).done(function(){t.set({playQueueSelectedItemID:O,playQueueSelectedItemOffset:l+(h-d)})})}else Object(j.a)(t)}}).fail(function(){
var t=e.get("remotePlayer");if(t){var n=t.get("friendlyName");b.restoreDefaults({hasError:!0,errorMessage:Object(h.default)('"{playerName}" is playing media from an unknown source.',{playerName:n})})}})}}},a["ui/player/remotePlayer/syncRemotePlayerState"]=function(e,t){var n=t.playQueueType,r=t.playerState,a=i(e,n);a&&a.get("isOpen")&&a.set(r)},a["ui/player/remotePlayer/syncRemotePlayQueueState"]=function(e,t){var n=t.playQueueType,r=t.playQueueVersion,a=t.repeatAll,o=t.repeatOne,s=i(e,n)
;if(s&&s.get("isOpen")){var l=s.get("playQueue");if(s.set({repeatAll:a,repeatOne:o}),l){var c=l.get("playQueueVersion");l.set("repeat",a),!l.get("isUpdatePending")&&c<r&&l.fetch()}}},a["ui/player/remotePlayer/syncRemoteQuality"]=function(e,t){var n=t.playQueueType,r=t.mediaIndex,a=void 0===r?0:r,o=t.bitrate,s=i(e,n);if(s&&s.get("isOpen")&&!s.get("isPlayQueueLoading")){
var l=s.get("playQueue"),c=l.get("playQueueItems"),u=c.get(l.get("playQueueSelectedItemID")),d=u.get("metadataItem"),p=Object(y.r)(u.get("type"));if(p&&p.mediaType===b.d){var h=d.get("Media")[a],f=D.a.prop("video"),v=M.a.getAvailableQualitiesFor(h,d.server,{lowestQualityIndex:f.lowestQualityIndex}),g=null==o?E.b:M.a.getNearestIndexToBitrate(o);if(M.a.isExplicitQuality(g)){var m=v[0],I=v[v.length-1];m&&g<m.index?g=m.index:I&&g>I.index&&(g=M.a.ORIGINAL)}s.set({qualityIndex:g,availableQualities:v})
}}},a["ui/player/remotePlayer/syncRemoteStreams"]=function(e,t,n){var r=t.playQueueType,a=t.key,o=t.mediaIndex,s=void 0===o?0:o,l=t.partIndex,u=void 0===l?0:l,d=t.audioStreamID,p=t.subtitleStreamID,h=i(e,r);if(h&&h.get("isOpen")&&!h.get("isPlayQueueLoading")){var f=h.get("playQueue"),v=f.get("playQueueItems"),g=v.get(f.get("playQueueSelectedItemID")),m=g.get("metadataItem"),y=m.get("Media")[s],b=y&&y.Part[u];if(a===m.get("key")&&b){var S=c.a.findWhere(b.Stream,{streamType:I.a.get("audio").id,
selected:!0}),M=c.a.findWhere(b.Stream,{streamType:I.a.get("subtitles").id,selected:!0}),D=parseInt(d,10),C=parseInt(p||0,10);null!=d&&S&&S.id!==D&&n(Object(L.e)({metadataItemEntityID:m.entityID(),mediaIndex:s,streamTypeString:"audio",streamID:D})),M&&M.id!==C&&n(Object(L.e)({metadataItemEntityID:m.entityID(),mediaIndex:s,streamTypeString:"subtitles",streamID:C}))}}},a["ui/player/remotePlayer/changeRemotePlayerVolume"]=function(e,t){e.get("remotePlayer").set("volume",t)},
a["ui/player/remotePlayer/showRemotePlayerError"]=function(e,t){var n=t.playQueueType,r=t.errorMessage,a=i(e,n);a&&a.restoreDefaults({hasError:!0,errorMessage:r})},a["ui/player/remotePlayer/mirrorDetails"]=function(e,t){var n=Object(P.a)(e),i=Object(S.h)(e,t),r=Object(S.d)(e,t);i.get("allowRemotePlayer")&&n.mirrorDetails(r)},a["ui/player/remotePlayer/discoverRemotePlayers"]=function(e){var t=e.get("players");t.server&&t.fetch()},a["ui/player/remotePlayer/idleRemotePlayer"]=function(e,t){
i(e,t.playQueueType).restoreDefaults()},a["ui/player/remotePlayer/removeRemotePlayer"]=function(e){var t=e.get("remotePlayer");if(t){var n=e.get("ui"),i=n.get("audioVideoPlayer"),r=n.get("photoPlayer");i.get("isOpen")&&i.set({confirmRemoteToLocal:!0,controllable:null}),r.get("isOpen")&&r.set({confirmRemoteToLocal:!0,controllable:null});var a=t.get("protocol");a===g.a?Object(p.d)("remoteCastPlayerManager").endSession():a===g.b&&Object(p.d)("remotePlexPlayerManager").endSession(),
e.unset("remotePlayer")}},a["ui/player/remotePlayer/confirmRemoteToLocal"]=function(e,t){var n=t.playerType,i=e.get("ui").get(n+"Player"),r=i.get("playQueue"),a=r.get("playQueueItems"),o=r.get("playQueueSelectedItemID"),s=a.get(o),l=s.get("metadataItem");r.set("own",!0),Object(j.a)(r),i.set({confirmRemoteToLocal:!1,startMetadataItemEntityID:l.entityID(),startOffsetMilliseconds:1e3*i.get("positionSeconds")})},a["ui/player/remotePlayer/confirmLocalToRemote"]=function(e,t){
var n=t.playerType,i=e.get("ui").get(n+"Player");Object(P.a)(e).startPlayback(i),i.set("confirmLocalToRemote",!1)},a)},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){var t=e.onErrorDismiss,n=e.errorMessage;return a()("div",{className:p.a.sectionError},void 0,a()(c.a,{name:"plex-icon-alert-560",className:p.a.sectionErrorIcon}),n||Object(l.default)("There was a problem saving your changes."),t&&a()(u.a,{
className:p.a.sectionErrorDismiss,onPress:t},void 0,h))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(26),u=n(22),d=n(2002),p=n.n(d),h=a()(c.a,{name:"plex-icon-remove-560"});t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(5),g=n.n(v),m=n(1),y=(n.n(m),n(0)),b=n.n(y),I=n(61),S=n(2006),M=n.n(S),D=function(e){function t(){var n,i,r;u()(this,t)
;for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=p()(this,e.call.apply(e,[this].concat(o))),i.onChange=function(e){i.props.onChange(e.target.value)},r=n,p()(i,r)}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.errorClassName,i=e.disabledClassName,a=e.isDisabled,s=e.size,c=e.name,u=(e.initialValue,e.value),d=e.values,p=e.hasError,h=(e.errors,e.validations,
l()(e,["className","errorClassName","disabledClassName","isDisabled","size","name","initialValue","value","values","hasError","errors","validations"]));return o()("div",{className:(t||"")+" "+(M.a[s]||"")+" "+(a&&i||"")+" "+(p&&n||""||"")},void 0,b.a.createElement("select",r()({},h,{disabled:a,className:M.a.select,id:c,name:c,value:u,onChange:this.onChange}),d.map(function(e){if(g.a.isString(e))return o()("option",{value:e},e,e);var t=g.a.keys(e),n=t[0];return o()("option",{value:n},n,e[n])})))
},t}(y.Component);D.defaultProps={className:M.a.input,errorClassName:M.a.hasError,disabledClassName:M.a.isDisabled,isDisabled:!1,size:I.LARGE,hasError:!1},t.a=D},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(61),m=n(2007),y=n.n(m),b=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s]
;return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onChange=function(e){i.props.onChange(e.target.value)},i.onFocus=function(){i._select()},i.onRef=function(e){i.inputElement=e},r=n,u()(i,r)}return p()(t,e),t.prototype.componentDidMount=function(){this.props.focusOnMount&&(this.inputElement.focus(),this._select())},t.prototype._select=function(){if(this.inputElement&&this.props.selectTextOnFocus){var e=this.inputElement.value,t=e?e.length:0;this.inputElement.selectionStart=0,
this.inputElement.selectionEnd=t}},t.prototype.render=function(){var e=this.props,t=e.className,n=e.errorClassName,i=e.disabledClassName,a=e.isDisabled,s=(e.initialValue,e.value),l=e.size,c=e.type,u=e.name,d=e.placeholder,p=e.hasError,h=(e.errors,e.validations,e.focusOnMount),f=(e.selectTextOnFocus,o()(e,["className","errorClassName","disabledClassName","isDisabled","initialValue","value","size","type","name","placeholder","hasError","errors","validations","focusOnMount","selectTextOnFocus"]))
;return v.a.createElement("input",r()({},f,{id:u,name:u,type:c,disabled:a,value:s,placeholder:d,className:(t||"")+" "+(y.a[l]||"")+" "+(a&&i||"")+" "+(p&&n||""||""),ref:h?this.onRef:null,onChange:this.onChange,onFocus:this.onFocus}))},t}(f.Component);b.defaultProps={className:y.a.input,errorClassName:y.a.hasError,disabledClassName:y.a.isDisabled,isDisabled:!1,size:g.LARGE,type:"text",hasError:!1,focusOnMount:!1,selectTextOnFocus:!1},t.a=b},function(e,t,n){"use strict";function i(e){
return e&&e.__esModule?e.default:e}t.__esModule=!0;var r=n(2083);t.DragDropContext=i(r);var a=n(2150);t.DragLayer=i(a);var o=n(2151);t.DragSource=i(o);var s=n(2161);t.DropTarget=i(s)},function(e,t,n){"use strict";function i(e){return e.thumb||e.parentThumb||e.grandparentThumb}function r(e){return e.art||e.parentArt||e.grandparentArt}function a(e,t,n){if(n)switch(n){case s.h:switch(e){case"season":case"episode":case"album":case"track":return t.thumb}break;case s.a:case s.d:switch(e){case"movie":
return r(t);case"episode":return r(t)||t.thumb}break;case s.e:switch(e){case"movie":return r(t);case"episode":return t.thumb||r(t)}break;case s.g:case s.f:switch(e){case"episode":return t.thumb}}switch(e){case"movie":case"show":return t.thumb;case"season":return i(t);case"episode":return t.grandparentThumb;case"artist":return t.thumb;case"album":case"track":return i(t);case"photo":case"photoalbum":case"clip":return t.thumb;case"playlist":return t.thumb||t.composite;default:return t.thumb}}
function o(e,t,n,i,r,o){var s=null==e?Object(l.e)(t,n,i,o):e,c=null==t?Object(l.d)(e,n,i,o):t;return{url:a(n,r,o),width:s,height:c}}t.a=o;var s=n(31),l=n(121)},function(e,t,n){"use strict";n.d(t,"d",function(){return r}),n.d(t,"e",function(){return a}),n.d(t,"f",function(){return o});var i=n(28);n.d(t,"i",function(){return i.j}),n.d(t,"c",function(){return i.e}),n.d(t,"a",function(){return i.a}),n.d(t,"j",function(){return i.l}),n.d(t,"b",function(){return i.c}),n.d(t,"g",function(){return i.g
}),n.d(t,"h",function(){return i.i});var r="extra",a="mixed",o="musicVideo"},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.metricsContext},o.a,s.a,Object(l.a)(),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={};return e&&(r.context=e),{grandparentTitle:i.grandparentTitle,grandparentRoute:Object(c.a)(t,n,i.grandparentKey,r)}})}var r=n(6),a=(n.n(r),n(57)),o=n(48),s=n(37),l=n(21),c=n(134),u=n(2205)
;t.a=Object(a.a)(i)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.onModalClose,r=c()(e,["isOpen","metricsProperties","onModalClose"]);return s()(f.a,{isOpen:t,metricsPage:h.H,metricsProperties:n,onModalClose:i},void 0,p.a.createElement(v.a,a()({},r,{onModalClose:i})))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(35),f=n(132),v=n(2278);t.a=i},function(e,t,n){"use strict";function i(e){
var t=o[e]||Object(r.createSelector)(a.a,function(t){return!!t[e]});return o[e]=t,t}var r=n(6),a=(n.n(r),n(144)),o={};t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID;return a()(u.a,{className:p.a.ratingRightTitle},void 0,a()(c.a,{className:p.a.starRating,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(l.a,{className:p.a.criticRating,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(719)),c=n(435),u=n(365),d=n(2470),p=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){return{isWaitingForPrimaryServer:e.isWaitingForPrimaryServer,primaryServerEntityID:e.primaryServer}}var r=n(8),a=n.n(r),o=n(9),s=n.n(o),l=n(10),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(11),f=n(114),v=n(34),g=n(240),m=n(2655),y=function(e){function t(){return a()(this,t),s()(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;Object(v.a)(function(){e.machineIdentifier&&e.changePrimaryServer({machineIdentifier:e.machineIdentifier,metricsProperties:{context:f.g}})})},t.prototype.render=function(){
return p.a.createElement(m.a,this.props)},t}(d.Component);t.a=Object(h.b)(i,{changePrimaryServer:g.d})(y)},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(function(e,t){return t.providerEntityID},Object(D.a)(),function(e,t){
var n=t.desktop,i=n.providers,r=n.isProvidersPending,a=n.isProvidersPopulated,o=n.providersError,s=n.libraries,l=n.isLibrariesPending,c=n.isLibrariesPopulated,u=n.librariesError,d=t.isPersonalCloudServer,p=!a&&!o,h=!c&&!u,f=e||Object(I.a)(b.PROVIDER,M.c.LIBRARY_PROVIDER_IDENTIFIER,t.entityID);return{providerEntityID:f,hasProvider:i.indexOf(f)>-1,isPersonalCloudServer:d,isRetrying:r||l,showSpinner:p||h,showError:!!u&&!s.length}})}
var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(287)),I=n(40),S=n(34),M=n(55),D=n(42),C=n(113),O=n(1129),j={dispatchFetchLibraries:C.g,dispatchPopulateLibraries:C.k,dispatchFetchProviders:C.h,dispatchPopulateProviders:C.l},P=function(e){function t(){var n,i,r;c()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=d()(this,e.call.apply(e,[this].concat(o))),
i.onPopulate=function(e){var t=e.serverEntityID;Object(S.a)(function(){i.props.dispatchPopulateProviders({serverEntityID:t}),i.props.dispatchPopulateLibraries({serverEntityID:t})})},i.onRepopulate=function(e){var t=e.serverEntityID;Object(S.a)(function(){i.props.dispatchFetchProviders({serverEntityID:t}),i.props.dispatchFetchLibraries({serverEntityID:t})})},r=n,d()(i,r)}return h()(t,e),t.prototype.componentWillMount=function(){this.onPopulate({serverEntityID:this.props.serverEntityID})},
t.prototype.componentWillReceiveProps=function(e){e.serverEntityID!==this.props.serverEntityID&&this.onRepopulate({serverEntityID:e.serverEntityID})},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchLibraries,e.dispatchPopulateLibraries,e.dispatchFetchProviders,e.dispatchPopulateProviders,s()(e,["dispatchFetchLibraries","dispatchPopulateLibraries","dispatchFetchProviders","dispatchPopulateProviders"]));return g.a.createElement(O.a,a()({},t,{onRetry:this.onRepopulate}))},t
}(v.Component);t.a=Object(m.b)(i,j)(P)},function(e,t,n){"use strict";function i(e,t){var n=Object(h.a)(e);return n.set({isBusy:!0}),Object(u.a)(e).then(function(e){var i=e.id,r=e.code,a=e.expiresIn,o=setTimeout(function(){t(y())},1e3*a);n.set({code:r,pinID:i,pinTimeout:o,isBusy:!1})}).fail(function(){n.set({fatalErrorMessage:Object(s.default)("An error occurred"),isBusy:!1})})}n.d(t,"d",function(){return f}),n.d(t,"c",function(){return v}),n.d(t,"e",function(){return g}),n.d(t,"b",function(){
return m}),n.d(t,"g",function(){return y}),n.d(t,"f",function(){return b}),n.d(t,"a",function(){return I})
;var r,a=n(12),o=n.n(a),s=n(4),l=n(36),c=n(34),u=n(1204),d=n(1205),p=n(3064),h=n(479),f=Object(l.a)("user/authCodeExchange/readStoredPIN"),v=Object(l.a)("user/authCodeExchange/preloadPIN"),g=Object(l.a)("user/authCodeExchange/resetAuthCodeExchange"),m=Object(l.a)("user/authCodeExchange/beginPolling"),y=Object(l.a)("user/authCodeExchange/stopPolling"),b=Object(l.a)("user/authCodeExchange/skipSignIn"),I=(r={},r["user/authCodeExchange/resetAuthCodeExchange"]=function(e,t,n){var i=Object(h.a)(e)
;Object(c.a)(function(){i.set({code:null,pinID:null,authToken:null,errorMessage:null})})},r["user/authCodeExchange/readStoredPIN"]=function(e,t,n){var r=Object(h.a)(e),a=r.get("pinIDInitial"),l=a?o.a.Deferred().resolve(a).promise():o.a.Deferred().reject().promise(),c=l.then(function(){return Object(d.a)(e,a).fail(function(){r.set({errorMessage:Object(s.default)("There was an error signing in")})})}).then(function(e){var t=e.authToken;return t?o.a.Deferred().resolve(t).promise():(r.set({
errorMessage:Object(s.default)("There was an error signing in")}),o.a.Deferred().reject().promise())}).then(function(e){r.set({authToken:e})});t.shouldCreatePIN&&c.fail(function(){return i(e,n)})},r["user/authCodeExchange/preloadPIN"]=function(e,t,n){Object(h.a)(e).set({isBusy:!0,code:null,pinID:null}),i(e,n)},r["user/authCodeExchange/beginPolling"]=Object(p.a)(),r["user/authCodeExchange/stopPolling"]=function(e,t,n){var i=Object(h.a)(e),r=i.get("pinTimeout");r&&clearTimeout(r),i.set({
pinID:null,pinTimeout:null,code:null})},r["user/authCodeExchange/skipSignIn"]=function(e,t,n){e.set({skipSignIn:!0})},r)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityIDs,n=e.selectedKey,i=e.isPlexCloudVisible,r=e.isWebhooksVisible,o=e.isUserSignedIn,s=e.isUserUnrestricted,l=e.showAdvancedSettings,c=e.hasTypeFirstSettings,u=e.myPlexUrl,d=e.userTitle;return a()(v.a,{serverEntityIDs:t,selectedKey:n,isPlexCloudVisible:i,isWebhooksVisible:r,isUserSignedIn:o,isUserUnrestricted:s,
showAdvancedSettings:l,hasTypeFirstSettings:c,myPlexUrl:u,userTitle:d})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3428)),c=n(11),u=n(6),d=(n.n(u),n(52)),p=n(200),h=n(754),f=n(232),v=n(3430),g=Object(u.createSelector)(function(e){return e.experienceSettings.showAdvancedSettings},p.a,h.a,l.a,Object(f.a)(d.i),Object(f.a)(d.j),function(e,t,n,i,r,a){return{serverEntityIDs:i,isPlexCloudVisible:!!n.cpms,isWebhooksVisible:a,isUserSignedIn:t.isSignedIn,isUserUnrestricted:!t.restricted,
showAdvancedSettings:e,hasTypeFirstSettings:r,myPlexUrl:"https://plex.tv",userTitle:t.title}});t.a=Object(c.b)(g)(i)},,function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(69),l=n(89),c=s.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),r.a.each(this.interface,function(t){e[t]=r.a.bind(e._proxy,e,t)})},_proxy:function(e){
for(var t=this.getInstance(),n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];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=o.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(r.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";n.d(t,"b",function(){return c}),n.d(t,"a",function(){return u}),n.d(t,"g",function(){return d}),n.d(t,"d",function(){return p}),n.d(t,"e",function(){return h}),n.d(t,"f",function(){return f}),n.d(t,"c",function(){return v})
;var i,r=n(50),a=n.n(r),o=n(36),s=n(1401),l=n(34),c="app/resetPrimaryServer",u="app/changePrimaryServer",d=Object(o.a)(c),p=Object(o.a)(u),h=Object(o.a)("app/garbageCollectEntities"),f=(Object(o.a)("app/navigate"),Object(o.a)("app/navigateBack"),Object(o.a)("app/navigateForward"),Object(o.a)("app/navigateHome")),v=(Object(o.a)("app/navigateSearch"),Object(o.a)("app/navigatePrePlay"),i={},i["app/garbageCollectEntities"]=function(e,t){Object(l.a)()
;var n=Object(s.a)(e.getState(),t),i=e.get("entities");for(var r in n){var o=n[r];i.get(r).remove(o)}t&&t.budget===1/0&&a()(n).length&&Object(l.a)()},i[u]=function(e,t){},i[c]=function(e,t){},i["app/navigate"]=function(e,t){},i["app/navigateBack"]=function(e){},i["app/navigateForward"]=function(e){},i["app/navigateHome"]=function(e,t,n){},i["app/navigateSearch"]=function(e,t,n){},i["app/navigatePrePlay"]=function(e,t,n){},i)},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(68),u=n(1406),d=n.n(u),p=n(15),h=n(163),f=n(30),v=n(606),g=n(151),m=n(607),y=n(62),b=n(16),I=n(608),S=n(18),M=n(164),D=n(837),C=n(848),O=n(849),j=n(851),P=n(852),w=n(853),T=n(854),E=n(1420),x=n(1421),N={PENDING:"pending",LOCKED:"locked",UNLOCKED:"unlocked"},A={EMPTY:"",UNSUBSCRIBED:"unsubscribed",ACTIVE:"active",ERROR:"error",REMOVED:"removed"},L=S.a.extend({mixins:[m.a],name:"UserModel",context:["server"],url:"/api/v2/user",
sessionAttrs:{isRemote:b.a.boolean,isSignedIn:b.a.boolean.isRequired,hasInvalidToken:b.a.boolean.isRequired,lastPrimaryServerID:b.a.string,lockState:b.a.oneOf(N.PENDING,N.LOCKED,N.UNLOCKED).isRequired,homeUsers:b.a.instanceOf(T.a).isRequired,homeDetails:b.a.instanceOf(E.a).isRequired},syncedAttrs:{id:b.a.integer,uuid:b.a.string,authToken:b.a.string,username:b.a.string,email:b.a.string,emailOnlyAuth:b.a.boolean,title:b.a.string,locale:b.a.string,thumb:b.a.string,pin:b.a.string,home:b.a.boolean,
restricted:b.a.boolean,guest:b.a.boolean,homeSize:b.a.integer,maxHomeSize:b.a.integer,queueUid:b.a.string,queueEmail:b.a.string,hasAllEntitlements:b.a.boolean,mailingListActive:b.a.boolean,hasPassword:b.a.boolean,mailingListStatus:b.a.oneOf(A.EMPTY,A.UNSUBSCRIBED,A.ACTIVE,A.ERROR,A.REMOVED)},sessionRelations:{features:{relationClass:C.a}},syncedRelations:{subscription:{relationClass:O.a},roles:{relationClass:j.a},entitlements:{relationClass:P.a},providers:{relationClass:w.a},profile:{
relationClass:x.a}},derivedAttrs:{isLocked:function(){return this.get("lockState")===N.LOCKED},isUnlocked:function(){return this.get("lockState")===N.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===N.LOCKED||e!==N.UNLOCKED&&null}},defaults:function(){var e={server:this.server,parent:this};return{isRemote:!1,isSignedIn:!1,hasInvalidToken:!1,hasPassword:!0,lockState:N.PENDING,homeUsers:new T.a([],e),homeDetails:new E.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 c.c.Model.prototype.fetch.apply(this,arguments)},augmentResponse:function(e){var t=e.roles,n=e.entitlements,i=e.providers
;return o.a.extend({},e,{roles:t&&t.role,hasAllEntitlements:n&&n.all,entitlements:n&&n.entitlement,providers:i&&i.provider})},_getTokenPromise:function(){return y.a.get("allowSSO")?this._getSSOThenStorageTokenPromise():this._getStorageTokenPromise()},_getSSOThenStorageTokenPromise:function(){var e=this,t=this._getStorageTokenPromise(),n=this._getSSOTokenPromise(),i=function(){return Object(f.a)("[User] SSO status is signed-out"),t.then(function(){return Object(g.a)(e.signOutDueToInvalidToken())
})},r=function(n){return t.then(function(t){return n===t?(Object(f.a)("[User] SSO status is signed-in, storage token matches SSO token"),n):e.clearAccessToken().then(function(){return Object(f.a)("[User] SSO status is signed-in, storage token and SSO token differ, so storage token was cleared"),n},function(){return Object(f.a)("[User] SSO status is signed-in, storage token and SSO token differ, but storage token could not be cleared"),Object(g.a)(e.signOutDueToInvalidToken())})},function(){
return Object(f.a)("[User] SSO status is signed-in, storage token is not present"),Object(g.a)(n)})},a=function(){return Object(f.a)("[User] SSO status is not available"),t},o=function(e){return e?r(e):i()};return n.then(o,a)},_getStorageTokenPromise:function(){return h.a.get("myPlexAccessToken")},_getSSOTokenPromise:function(){return Object(v.a)(this.server.getXHROptions("/api/v2/users/signin",{method:"POST",xhrFields:{withCredentials:!0},data:{skipAuthentication:!0},dataType:"json"
})).then(function(e){return e.authToken},function(e){return e&&400===e.status?l.a.Deferred().resolve(null).promise():l.a.Deferred().reject().promise()})},_getManualUserPromise:function(e){return l.a.ajax(this.server.getXHROptions(o.a.result(this,"url"),{headers:{"X-Plex-Token":e}}))},signInUnsupervised:function(){var e=this;if(!this._isSigningIn){this._isSigningIn=!0;var t=this._getTokenPromise();t.done(function(t){Object(f.a)("[User] Token promise succeeded, accessToken="+t)
;var n=t?e._getManualUserPromise(t):l.a.Deferred().reject().promise();n.done(function(n){Object(f.a)("[User] userPromise succeeded");var i=e.get("homeDetails");i.fetch({headers:{"X-Plex-Token":t}}).always(function(){var t=e.parse(n),r=e.get("lockState");if(r!==N.UNLOCKED){var a=Object(p.d)("appModel").get("settings"),o=y.a.get("proxied")||a.get("autoLogin"),s=!!t.guest&&!i.get("guestEnabled");r=!t.home||o&&!s?N.UNLOCKED:N.LOCKED}e.signIn(t,{lockState:r}),e._isSigningIn=!1})}),n.fail(function(t){
if(Object(f.a)("[User] userPromise failed"),t&&t.aborting)return void(e._isSigningIn=!1);var n=Object(D.a)(t);n?e.signOutDueToInvalidToken():e.signOut({hasInvalidToken:n,features:e.get("features")}),e.server.testAllConnections(),e._isSigningIn=!1})}),t.fail(function(){Object(f.a)("[User] tokenPromise failed"),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=o.a.isString(e)?this.parse(e):e,a=i.authToken,s=r()({isSignedIn:!0},i,t);return this._resolve(s,n),h.a.set("myPlexAccessToken",a)},signOut:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._reject(e),l.a.Deferred().resolve().promise()},signOutDueToInvalidToken:function(){return l.a.when(Object(g.a)(this.signOut({hasInvalidToken:!0
})),Object(g.a)(this.clearAccessToken()))},activateStoredUser:function(e){M.a.set("activeUserID",e);var t=M.a.getActiveUser();if(t){var n=t.get("lastPrimaryServerID");this.set("lastPrimaryServerID",n),this.get("features").set(t.get("features").models)}},clearAccessToken:function(){window.PLEXWEB&&window.PLEXWEB.myPlexAccessToken&&delete window.PLEXWEB.myPlexAccessToken;var e=h.a.remove("myPlexAccessToken");return e=e.then(function(){return M.a.clearActiveUser()})},hashPIN:function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.get("authToken");return d.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.signInUnsupervised()},onServerUnavailableChange:function(e,t){
t&&this.signOut({lockState:this.get("lockState"),features:this.get("features")})}},{lockStates:N,mailingListStates:A});Object(I.a)(L,function(){return{relationClass:Object(p.d)("UserFlexModel")}}),t.a=L},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(610),o=a.a.extend({maxCycles:5,maxSize:100,getItemCacheKey:function(e,t){if(r.a.isFunction(e.cacheKey))return t||(t=e.toJSON()),e.cacheKey(t)}});t.a=o},function(e,t,n){"use strict";function i(e,t){var n=[];if(e){var i=a.a.first(e.Part)
;i&&i.Stream&&n.push.apply(n,a.a.where(i.Stream,t))}return n}var r=n(5),a=n.n(r);t.a=i},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(858),l=n(19),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();return["change:"+e+".update","change:"+e+".reset"].join(" ")},startPopulatedRangeMonitor:function(){var e=this.getCollectionName();this.updatePopulatedRange(),this.on(this.getCollectionChangeEvents(),this.updatePopulatedRange,this),this.on("change:"+e+".destroy",this.decrementTotalSize,this)},
stopPopulatedRangeMonitor:function(){var e=this.getCollectionName();this.off(this.getCollectionChangeEvents(),this.updatePopulatedRange,this),this.off("change:"+e+".destroy",this.decrementTotalSize,this)},fetchRange:function(e){var t=r.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=s.a.difference(e,n)[0]
;if(!i)return o.a.Deferred().resolve().promise();if(i=s.a.degap(i,n),this.isPopulating()){var a=this.get("currentPageStart")!==i.start,l=this.get("currentPageSize")!==i.size;if(!a&&!l)return this.populatePromise;this.abortPendingPopulate()}if(e.reloadThreshold&&i.size>e.reloadThreshold)return t.reset(),this.populateRange(r.a.omit(e,"reloadThreshold"));var c=r.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,r=void 0;r=i?n?Math.min(t,null==e?1/0:e):e||t:0,this.set("populatedRange",{start:r,end:r+i,size:i})},
decrementTotalSize:function(){var e=this.get("totalSize");e>0&&this.set("totalSize",e-1)}};t.a=c},function(e,t,n){"use strict";var i=n(23),r=n(1462),a=i.a.extend({name:"ServerSettingCollection",context:["server"],url:"/:/prefs",model:r.a,augmentResponse:function(e){return e.Setting?(Array.isArray(e.Setting)?e.Setting:[e.Setting]).filter(function(e){return e.id}):[]}});t.a=a},function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"b",function(){return s}),n.d(t,"c",function(){return l
});var i,r=n(625),a=n(36),o="ui/showAlert",s=Object(a.a)(o,function(e){return"string"==typeof e?{type:r.a,message:e}:e}),l=(i={},i[o]=function(e,t){},i)},function(e,t,n){"use strict";var i=n(19),r=n(332),a=n(167),o=a.a.extend({getUrl:function(e){if(e){var t=Object(r.a)();return i.join(e,{size:Math.round(this.width*t)})}return e}});t.a=o},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(68),o=n(20),s=n(15),l=n(17),c=o.a.AppRouter.extend({initialize:function(){
this.uniqueRoutes=r.a.uniq(r.a.values(this.appRoutes)),this.fragments=r.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&&r.a.each(n,function(n){var i=n.slice(1),r=t[i];if(null==r){var a=new RegExp("\\([^\\)]*"+n+"[^\\)]*\\)","g");e=e.replace(a,"")}else e=e.replace(n,encodeURIComponent(r))}),e.replace(/\(|\)/g,"")},onRoute:function(e){
var t=s.d("appModel"),n=t.get("history"),i=t.get("forwardHistory"),o=a.c.history.getFragment();o===i[0]?n.push(i.shift()):o!==r.a.last(n)&&(n.push(o),i.splice(0)),t.trigger("change:history",t,n)},onNavigate:function(e,t){if(-1!==r.a.indexOf(this.uniqueRoutes,e)){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,r.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";var i,r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(20),c=n(15),u=n(17),d=n(211),p=n(151),h=n(1602),f=n(77),v=n(881),g=n(241),m=(n(212),!1),y=l.a.Controller.extend({populateView:function(e){e||(e={}),!1!==e.showLoading&&u.a.trigger("show:loading",{navigating:!0}),this.abortPendingPopulate();var t={options:e},n=s.a.Deferred().resolve(t).promise(),r=this.populateUser(n,t);return r=this.populateServer(r,e.serverID,t),
e.primaryServer&&(r=this.populatePrimaryServer(r,t)),r=this.populateUserFeatures(r,t),e.sectionID&&(r=this.populateSection(e,r,t)),e.key&&(r=this.populateMetadata(e,r,t)),e.channelID&&(r=this.populateChannel(e,r,t)),e.channelKey&&(r=this.populateChannelMetadata(e,r,t)),r=r.then(function(){return s.a.Deferred().resolve(t).promise()},function(e){return m?m=!1:u.a.trigger("navigate","unauthorized",{result:t,silent:!0}),s.a.Deferred().reject(t).promise()}),i=r,r},abortPendingPopulate:function(){
i&&"pending"===i.state()&&(m=!0),d.a.abortAll("page")},populateUser:function(e,t){var n=c.d("appModel"),i=n.get("user"),r=i.get("lockState")===g.a.lockStates.PENDING?i.server.populate():s.a.Deferred().resolve().promise(),a=function(){return i.get("isLocked")?s.a.Deferred().reject(t).promise():s.a.Deferred().resolve(t).promise()};return r.then(a,a)},populateUserFeatures:function(e,t){function n(){if(!r.get("isConnected"))return s.a.Deferred().resolve().promise()
;var e=a.get("features"),t=!!e.failedPopulatePromise,n=a.get("features").populate({timeout:5e3});return t?void 0:n}var i=c.d("appModel"),r=i.get("cloudServer"),a=i.get("user");return e.then(function(){return Object(p.a)(n())},function(){return Object(h.a)(n())})},populateServer:function(e,t,n){var i=c.d("appModel");return e=e.then(function(){var e=i.get("servers"),r=void 0;if(!t)return e.populateAnyServer();if(/^transient/.test(t)){var a=i.get("transientServer")
;if(!a||a.id!==t)return u.a.trigger("navigate:refresh:dashboard"),s.a.Deferred().reject().promise();r=s.a.Deferred().resolve(a).promise()}else r=e.populateServer(t);return r.done(function(e){n.server=e}),r.fail(function(){n.server=e.get(t)}),r})},populatePrimaryServer:function(e,t){var n=c.d("appModel");return e=e.then(function(){function e(a,o){o||(n.off("change:isWaitingForPrimaryServer",e),r=n.get("primaryServer"),r?(t.server=r,r.populate().done(i.resolve).fail(i.reject)):i.reject())}
var i=s.a.Deferred(),r=n.get("primaryServer");return r?(t.server=r,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");return e.find(function(e){return e.isNew()})?e.fetch():e.populate()}),t=t.then(function(t){var i=n.item,r=e.sectionID
;if(i&&(!(r=i.get("librarySectionID"))||!n.server.get("isFullServer")))return s.a.Deferred().resolve();var a=t.get(r);return a?(n.section=a,i&&i.setContext("section",a),s.a.Deferred().resolve(a)):s.a.Deferred().reject()})},populateMetadata:function(e,t,n){return t=t.then(function(){var t=new f.a({key:e.key},{server:n.server,relatedOptions:e.relatedOptions});return n.item=t,t.fetch({scope:"page",data:a.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 r=new v.a(i,{server:n.server});return n.channel=r,e.channelKey?s.a.Deferred().resolve().promise():r.fetch({scope:"page"})})},populateChannelMetadata:function(e,t,n){return t=t.then(function(){var t=new v.a({key:e.channelKey},{server:n.server,channel:n.channel})
;return n.channelItem=t,t.fetch({scope:"page"})})}});t.a=y},function(e,t,n){"use strict";function i(e,t){if(e===t)return!0;var n=a()(e),i=a()(t);if(n.length!==i.length)return!1;for(var r=Object.prototype.hasOwnProperty,o=0;o<n.length;o++)if(!r.call(t,n[o])||e[n[o]]!==t[n[o]])return!1;return!0}t.a=i;var r=n(50),a=n.n(r)},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(){return Object(r.createSelector)(Object(o.a)(),Object(a.a)(),function(e,t){var n=e&&e.currentDecision;if(n&&n.playQueueItemID===t.playQueueItemID)return n})}var r=n(6),a=(n.n(r),n(119)),o=n(44);t.a=i},function(e,t,n){"use strict";function i(e){return o.a.createElement(s.a,e)}var r=n(1),a=(n.n(r),n(0)),o=n.n(a),s=n(352),l=n(1879),c=n.n(l);i.defaultProps={className:c.a.playerButton},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?a()(e).format(t):""}Object.defineProperty(t,"__esModule",{value:!0});var r=n(41),a=n.n(r);t.default=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.metricsContext},o.a,s.a,Object(l.a)(),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={};return e&&(r.context=e),{title:i.title,index:i.index,route:Object(c.a)(t,n,i.key,r),
parentTitle:i.parentTitle,parentIndex:i.parentIndex,parentRoute:i.skipParent?null:Object(c.a)(t,n,i.parentKey,r),originallyAvailableAt:i.originallyAvailableAt}})}var r=n(6),a=(n.n(r),n(57)),o=n(48),s=n(37),l=n(21),c=n(134),u=n(713);t.a=Object(a.a)(i)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.type,r=e.isOffscreen,o=e.url,s=e.width,u=e.height,d=e.isFolder,p=e.transitionProps,h=e.onLoad,f=e.onError;return r?null:o?a()(l.a,{serverEntityID:t,
providerEntityID:n,url:o,width:s,height:u,backgroundPosition:"artist"===i?"center top":"center",transitionProps:p,onLoad:h,onError:f}):a()(c.a,{type:i,width:s,height:u,isFolder:d})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(723)),c=n(1060);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.component,i=e.isSecondary,r=e.isDoubleLine,o=e.isSplitLine,l=s()(e,["className","component","isSecondary","isDoubleLine","isSplitLine"]);return u.a.createElement(n,a()({
className:(t||"")+" "+((r?p.a.doubleLineTitle:p.a.singleLineTitle)||"")+" "+(i&&p.a.isSecondary||"")+" "+(o&&p.a.isSplitLine||""||"")},l))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2260),p=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e,t){Object(p.d)("metrics").trackClick({page:t,action:e,context:S.i})}n.d(t,"k",function(){return z}),n.d(t,"p",function(){return U}),n.d(t,"a",function(){return B}),n.d(t,"o",function(){return V}),n.d(t,"n",function(){
return F}),n.d(t,"h",function(){return Q}),n.d(t,"j",function(){return H}),n.d(t,"d",function(){return Y}),n.d(t,"g",function(){return W}),n.d(t,"e",function(){return G}),n.d(t,"l",function(){return K}),n.d(t,"f",function(){return q}),n.d(t,"c",function(){return Z}),n.d(t,"i",function(){return X}),n.d(t,"b",function(){return J}),n.d(t,"m",function(){return $})
;var r,a=n(7),o=n.n(a),s=n(12),l=n.n(s),c=n(41),u=n.n(c),d=n(4),p=n(15),h=n(90),f=n(193),v=n(36),g=n(17),m=n(439),y=n(151),b=n(19),I=n(73),S=n(114),M=n(104),D=n(625),C=n(396),O=n(175),j=n(1068),P=n(99),w=n(2282),T=n(528),E=n(364),x=n(2349),N=n(2351),A=n(246),L=n(106),k=n(2364),_=n(299),R=n(113),z=(Object(v.a)("server/fetchSettings"),
Object(v.a)("server/populateSettings")),U=Object(v.a)("server/updateSetting"),B=Object(v.a)("server/addLibrary"),V=Object(v.a)("server/startLibrariesRefresh"),F=Object(v.a)("server/shareLibraries"),Q=Object(v.a)("server/enableHttpFallback"),H=Object(v.a)("server/optimizeDatabase"),Y=Object(v.a)("server/cleanbundles"),W=Object(v.a)("server/emptyTrash"),G=Object(v.a)("server/deleteServer"),K=Object(v.a)("server/restartPersonalCloudServer"),q=Object(v.a)("server/discoverMediaGrabberDevice"),Z=Object(v.a)("server/checkiTunes"),X=Object(v.a)("server/importPlaylists"),J=Object(v.a)("server/startLibrariesRefresh",function(e){
return o()({},e,{cancel:!0})}),$=o()({},R.m,(r={},r["server/fetchSettings"]=Object(h.a)({key:"settings",getModel:M.g}),r["server/populateSettings"]=Object(f.a)({key:"settings",fetchActionType:"server/fetchSettings",getModel:M.g}),r["server/updateSetting"]=function(e,t){var n=Object(M.h)(e,t),i=Object(M.g)(e,t),r=i.get("settings").get(t.setting.id);if(r){var a=r.parse(t.setting);r.set("value",a.value),
"FriendlyName"===a.id&&a.value?n.set("friendlyName",a.value):"allowMediaDeletion"===a.id&&n.set("allowMediaDeletion",a.value)}},r[R.a]=function(e,t,n){var i=t.machineIdentifier,r=t.serverName,a=e.get("experienceSettings"),o=a.get("relayReminders"),s=o[i]||{},l=s.remindAfter;if(!l||!u.a.unix(l).isAfter(u()())){var c=new w.a({serverName:r});g.a.trigger("show:modal",c),n(Object(R.n)(i))}},r["server/addLibrary"]=function(e,t){var n=Object(M.h)(e,t),r=t.options,a=void 0===r?{}:r,s=new T.a(o()({
server:n,redirect:!0},a));g.a.trigger("show:modal",s),i(I.a,t.metricsPage)},r["server/startLibrariesRefresh"]=function(e,t,n){var i=t.cancel,r=t.force,a=t.metricsPage,o=Object(M.h)(e,t),s={serverModel:o,libraryID:"all",cancel:i,force:r,allowMetrics:!!a,metricsProperties:{page:a}};if(t.cancel){Object(M.g)(e,t).get("libraries").each(function(e){return e.set("refreshing",!1)})}Object(j.a)(o,s).fail(function(){
var e=t.cancel?Object(d.default)("There was a problem canceling the update."):Object(d.default)("There was a problem updating libraries.");n(Object(A.b)(e))}).always(function(){n(Object(R.g)({serverEntityID:t.serverEntityID}))})},r["server/shareLibraries"]=function(e,t){var n=Object(M.h)(e,t);g.a.trigger("show:modal",new E.a({defaultPaneType:"ownedServer",defaultPaneID:n.id})),i(I.T,t.metricsPage)},r["server/enableHttpFallback"]=function(e,t,n){var i=Object(M.h)(e,t),r=new x.a({server:i})
;r.promise.then(function(){var t=i.get("publicAddressMatches")?C.a.SAME_NETWORK:C.a.ALWAYS;return e.get("settings").save("allowHttpFallback",t)}).done(function(){n(Object(R.q)({serverEntityID:t.serverEntityID}))}),g.a.trigger("show:modal",r)},r["server/optimizeDatabase"]=function(e,t,n){var r=Object(M.h)(e,t),a=r.supports("optimizeDatabaseActivity"),o=b.join("/library/optimize",a?{async:1}:{}),s=r.getXHROptions(o,{type:"PUT"});n(Object(R.p)({serverEntityID:t.serverEntityID,
activityType:O.a.OPTIMIZE_DATABASE})),l.a.ajax(s).done(function(){a||n(Object(R.j)({serverEntityID:t.serverEntityID,activityType:O.a.OPTIMIZE_DATABASE}))}).fail(function(e){n(Object(R.j)({serverEntityID:t.serverEntityID,activityType:O.a.OPTIMIZE_DATABASE})),n(Object(A.b)(Object(d.default)("There was a problem optimizing the database.")))}),i(I.F,t.metricsPage)},r["server/cleanbundles"]=function(e,t,n){
var r=Object(M.h)(e,t),a=r.supports("cleanBundlesActivity"),o=b.join("/library/clean/bundles",a?{async:1}:{}),s=r.getXHROptions(o,{type:"PUT"});n(Object(R.p)({serverEntityID:t.serverEntityID,activityType:O.a.CLEAN_BUNDLES})),l.a.ajax(s).done(function(){a||n(Object(R.j)({serverEntityID:t.serverEntityID,activityType:O.a.CLEAN_BUNDLES}))}).fail(function(e){n(Object(R.j)({serverEntityID:t.serverEntityID,activityType:O.a.CLEAN_BUNDLES})),
n(Object(A.b)(Object(d.default)("There was a problem removing unused bundles.")))}),i(I.i,t.metricsPage)},r["server/emptyTrash"]=function(e,t,n){var r=Object(M.h)(e,t),a=Object(M.g)(e,t),o=a.get("libraries"),s=t.libraryID,c=s?[s]:o.map(function(e){return e.id}),u=c.map(function(e){var t=r.getXHROptions("/library/sections/"+e+"/emptyTrash",{type:"PUT"});return l.a.ajax(t)});l.a.when.apply(l.a,u).done(function(){n(Object(A.b)({type:D.b,message:Object(d.default)("The trash was emptied.")}))
}).fail(function(e){n(Object(A.b)(Object(d.default)("There was a problem emptying the trash.")))}),i(I.t,t.metricsPage)},r["server/deleteServer"]=function(e,t,n){var r=Object(M.h)(e,t),a=e.get("cloudServer");if(r){if(a.get("isResolved")){var o=a.getXHROptions("/api/servers/"+r.id,{type:"DELETE"});l.a.ajax(o)}var s=a.get("resources"),c=s.get(r.id);if(c&&c.trigger("destroy",c,c.collection),r.get("isFullOwnedServer")&&r.get("isConnected")){
r.get("desktop").get("cloudAccount").destroy().done(function(){r.set({myPlexSigninState:P.a,myPlexSubscription:!1})}).always(function(){n(Object(R.q)({serverEntityID:t.serverEntityID})),r.populate().fail(function(){r.trigger("destroy",r,r.collection),n(Object(L.f)({route:"dashboard"}))})})}else r.trigger("destroy",r,r.collection),n(Object(L.f)({route:"dashboard"}));i(I.n,t.metricsPage)}},r["server/restartPersonalCloudServer"]=function(e){var t=e.get("cloudServer"),n=t.get("desktop")
;n.set("isPersonalCloudServerRestarting",!0);var i=t.populate().then(function(){return Object(y.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"}))});Object(m.a)(i,1e3).fail(function(e){n.set("personalCloudServerRestartError",e)}).always(function(){n.set("isPersonalCloudServerRestarting",!1)})},r["server/discoverMediaGrabberDevice"]=function(e,t){
var n=Object(M.h)(e,t),i=e.get("ui").get("dvrSettingsUI"),r=t.device;if(!i.get("isUIPopulated")){var a=new k.a({model:new _.a(r,{parse:!0}),serverEntityID:t.serverEntityID,machineIdentifier:n.get("machineIdentifier")});g.a.trigger("show:bar","alertbar",a)}},r["server/checkiTunes"]=function(e,t){var n=Object(M.h)(e,t),i=Object(M.g)(e,t);if(n.get("isPersonalCloudServer"))return void i.set("hasiTunes",!1);var r=b.join("/music/iTunes"),a=n.getXHROptions(r);l.a.ajax(a).done(function(){
i.set("hasiTunes",!0)}).fail(function(){i.set("hasiTunes",!1)})},r["server/importPlaylists"]=function(e,t){var n=Object(M.h)(e,t),i=Object(M.g)(e,t),r=i.get("libraries"),a=new N.a({server:n,libraries:r});g.a.trigger("show:modal",a)},r))},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(29),b=n(1095),I=(n(735),n(72)),S=n(185),M=n(80),D=n(101),C=n(2434),O=n.n(C),j=function(e){
function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r.onScrollPositionChange=function(e){var t=e.scrollTop,n=e.scrollLeft;r.setState({scrollTop:t,scrollLeft:n})},r.onListUpdate=function(e){var t=e.visibleStartIndex,n=r.props,i=n.scrollIndex,a=n.onListScrollIndexChange,o=n.onListUpdate;r._currentScrollIndex=t,r.state.isRestoringScrollPosition&&r.setState({isRestoringScrollPosition:!1}),a&&i!==t&&a(t),o&&o(e)},r.onMeasure=function(e){
var t=Math.round(e.width),n=Math.round(e.height),i=r.props.onMeasure;r.setState({isMeasured:!0,width:t,height:n}),i&&i(e)},r.state={isRestoringScrollPosition:!1,isMeasured:!1,width:null,height:null,scrollTop:0,scrollLeft:0},r._currentScrollIndex=0,n.scrollPositionStorageKey&&(r._scrollPositionKey=b.a.getPageKey()+"!scrollPosition!"+n.scrollPositionStorageKey),r}return f()(t,e),t.prototype.componentWillMount=function(){this.props.scrollIndex||this._restoreScrollPosition()},
t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.componentDidUpdate=function(e,t){var n=this.props.scrollIndex,i=this.state.isMeasured,r=i&&!t.isMeasured&&n>0,a=n!==e.scrollIndex;(r||a)&&this._scrollToIndex(n)},t.prototype.componentWillUnmount=function(){this._scrollPositionKey&&b.a.set(this._scrollPositionKey,{scrollTop:this.state.scrollTop,scrollLeft:this.state.scrollLeft})},t.prototype._restoreScrollPosition=function(){if(this._scrollPositionKey){
var e=b.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,r=i(Math.max(e,0)),a=n.outerPaddingTop||0,o=n.outerPaddingLeft||0,s=this.props.scrollDirection===D.VERTICAL?0:r.cellX-o,l=this.props.scrollDirection===D.HORIZONTAL?0:r.cellY-a;this.setState({scrollLeft:s,scrollTop:l})}},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.children,i=e.scrollerClassName,a=e.ignoreWidth,s=e.ignoreHeight,c=e.scrollDirection,u=(e.scrollIndex,e.scrollPositionStorageKey,e.onListUpdate,e.onMeasure,o()(e,["className","children","scrollerClassName","ignoreWidth","ignoreHeight","scrollDirection","scrollIndex","scrollPositionStorageKey","onListUpdate","onMeasure"])),d=this.state,p=d.isMeasured,h=d.isRestoringScrollPosition,f=d.width,v=d.height,g=d.scrollTop,y=d.scrollLeft;return r()(I.a,{className:t,
ignoreWidth:a,ignoreHeight:s,ignorePosition:!0,onMeasure:this.onMeasure},void 0,p&&r()(M.a,{className:i,smoothScroll:!h,scrollDirection:c,scrollTop:g,scrollLeft:y,enableChildrenProps:!0,onScrollPositionChange:this.onScrollPositionChange},void 0,m.a.createElement(S.a,l()({viewportWidth:f,viewportHeight:v,skipRenderCells:h,onListUpdate:this.onListUpdate},u)),n))},t}(g.Component);j.defaultProps={scrollDirection:D.VERTICAL,scrollerClassName:O.a.scroller},t.a=j},function(e,t,n){"use strict"
;function i(e){return s.a.createElement(l.a,a()({},e,{textClassName:h.a.circularProgressBarText}))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(2489),c=n(1029),u=n.n(c),d=n(1108),p=n(2491),h=n.n(p);i.defaultProps=a()({},l.a.defaultProps,{backgroundClassName:h.a.circularProgressBarBackground,strokeColor:u.a.primaryColor,easing:d.b}),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 p.a.createElement(v.a,a()({
className:f.a.pageContent},i),s()("div",{className:n},void 0,t))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(2677),f=n.n(h),v=n(1131);i.defaultProps={innerClassName:f.a.innerPageContent},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=s()(e,["children"]);return u.a.createElement(p.a,a()({className:f.a.innerEmptyPage,contentClassName:f.a.innerEmptyPageContent,scrollDirection:d.NONE},n),t)}
var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(101),p=n(302),h=n(1083),f=n.n(h);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(11),v=n(6),g=(n.n(v),n(34)),m=(n(31),n(100)),y=n(106),b=n(554),I=n(2703),S=Object(v.createSelector)(m.a,function(e){return{columnAdjustment:e.columnAdjustment,listStyles:e.listStyles}}),M=function(e){function t(){var n,i,a;o()(this,t)
;for(var s=arguments.length,c=Array(s),u=0;u<s;u++)c[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(c))),i.onColumnAdjustmentChange=function(e){Object(g.a)(function(){i.props.saveExperienceSettings({columnAdjustment:e})})},i.onListStyleChange=function(e){var t,n,a=i.props,o=a.listStyles,s=a.listType,l=a.listSubtype,c=a.listContext,u=Object(b.a)(s,l),d=r()({},o,(n={},n[c]=r()({},o[c]||{},(t={},t[u]=e,t)),n));Object(g.a)(function(){i.props.saveExperienceSettings({listStyles:d})})
},a=n,l()(i,a)}return u()(t,e),t.prototype.render=function(){return h.a.createElement(I.a,r()({},this.props,{onColumnAdjustmentChange:this.onColumnAdjustmentChange,onListStyleChange:this.onListStyleChange}))},t}(p.Component);t.a=Object(f.b)(function(e){return S},{saveExperienceSettings:y.h})(M)},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?s.parseParams(n):{};return c=e,u={url:t[0],params:i}}function r(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.hash,n=i(t);return s.join(n.url,o()({},n.params,{type:void 0,typeKey:e.typeKey,filters:Object(l.a)(e.filters),limit:e.limit,filterLabel:e.filterLabel,customFilter:e.customFilter?1:void 0,sort:e.sort,folderKey:e.folderKey,folderTitle:e.folderTitle,parentFolderKey:e.parentFolderKey,parentFolderTitle:e.parentFolderTitle,save:1}))}t.a=r;var a=n(7),o=n.n(a),s=n(19),l=n(1154),c=void 0,u=void 0},function(e,t,n){"use strict"
;n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r});var i="boolean",r="other"},function(e,t,n){"use strict";function i(e){return e.get("ui").get("channelGridPage")}function r(e,t){for(var n=Math.floor(e/m)*m,i=[],r=0;r<=t;r++)i.push(n+r*m);return i}n.d(t,"b",function(){return D}),n.d(t,"c",function(){return C}),n.d(t,"i",function(){return O}),n.d(t,"h",function(){return j}),n.d(t,"e",function(){return P}),n.d(t,"d",function(){return w}),n.d(t,"j",function(){return T}),
n.d(t,"k",function(){return E}),n.d(t,"f",function(){return x}),n.d(t,"g",function(){return N}),n.d(t,"a",function(){return A});var a,o=n(2918),s=n(36),l=n(140),c=n(105),u=n(90),d=n(193),p=n(34),h=n(1184),f=n(1185),v=n(45),g=(n.n(v),
n(104)),m=1800,y=parseInt(v.channelGridChannelOverflowWidth,10),b=parseInt(v.channelGridChannelColumnWidth,10),I=parseInt(v.channelGridTitleColumnWidth,10),S=2*m*12,M=6*m,D=Object(s.a)("ui/channelGridPage/initChannelsGridPage"),C=Object(s.a)("ui/channelGridPage/initMetadataList"),O=Object(s.a)("ui/channelGridPage/setStartTime"),j=Object(s.a)("ui/channelGridPage/resetStartTime"),P=Object(s.a)("ui/channelGridPage/navigateTimeFoward"),w=Object(s.a)("ui/channelGridPage/navigateTimeBack"),T=Object(s.a)("ui/channelGridPage/setViewportSize"),E=Object(s.a)("ui/channelGridPage/updateAiredProgress"),x=Object(s.a)("ui/channelGridPage/populateChannelPrograms"),N=Object(s.a)("ui/channelGridPage/populateChannelsList"),A=(Object(s.a)("ui/channelGridPage/fetchChannelsList"),
Object(c.a)((a={},a["ui/channelGridPage/initChannelsGridPage"]=function(e,t,n){var r=i(e),a=t.serverEntityID,s=t.providerEntityID,l=t.directoryKey,c=Object(g.h)(e,{serverEntityID:a}),u=Object(g.e)(e,{providerEntityID:s}),d=new f.a(null,{server:c,provider:u,type:o.a.CHANNEL}),p={serverEntityID:a,providerEntityID:s,directoryKey:l,channelsList:d};r.set(p),n(j())},a["ui/channelGridPage/initMetadataList"]=function(e,t,n){
var r=t.containerKey,a=t.serverEntityID,o=t.providerEntityID,s=i(e),l=Object(g.h)(e,{serverEntityID:a}),c=Object(g.e)(e,{providerEntityID:o});if(r!==s.get("containerKey")){var u=new h.a({containerKey:r},{server:l,provider:c});s.set({containerKey:r,metadataList:u})}},a["ui/channelGridPage/resetStartTime"]=function(e,t,n){var i=Math.floor(Date.now()/1e3);n(O(i))},a["ui/channelGridPage/setStartTime"]=function(e,t,n){var a=i(e),o=a.get("visibleColumns"),s=r(t,o);Object(p.a)(function(){a.set({
startTime:t,columnTimes:s})})},a["ui/channelGridPage/navigateTimeFoward"]=function(e,t,n){var r=i(e),a=r.get("columnTimes"),o=a[0]+m;n(O(o))},a["ui/channelGridPage/navigateTimeBack"]=function(e,t,n){var r=i(e),a=r.get("columnTimes"),o=a[0]-m,s=Math.floor(Date.now()/1e3)-M;o+m>s&&n(O(o))},a["ui/channelGridPage/setViewportSize"]=function(e,t,n){var a=t.width,o=t.height,s=i(e),l=Math.floor(a+y),c=Math.max(Math.floor((a-I)/b),1)+1,u=Math.floor((l-I)/c),d=r(s.get("startTime"),c)
;Object(p.a)(function(){s.set({visibleColumns:c,columnTimes:d,columnWidth:u,viewportWidth:l,viewportHeight:Math.floor(o)})})},a["ui/channelGridPage/updateAiredProgress"]=function(e){var t=i(e),n=t.get("columnTimes"),r=n[0],a=n[n.length-1],o=a-r,s=Math.floor(Date.now()/1e3),l=Math.min(100,Math.max(0,(s-r)/o*100));Object(p.a)(function(){t.set({airedProgress:l})})},a["ui/channelGridPage/populateChannelPrograms"]=function(e,t,n){
var r=i(e),a=r.get("metadataList"),o=r.get("columnTimes"),s=r.get("viewportWidth");a&&s>0&&(a.set({isPending:!0,error:null}),a.populateRange({start:o[0],end:o[o.length-1],reloadThreshold:S}).done(function(){a.set({isPending:!1,isPopulated:!0,error:null})}).fail(function(e,t){t.aborting||a.set({isPending:!1,error:Object(l.a)(t)})}))},a["ui/channelGridPage/populateChannelsList"]=Object(d.a)({key:"channelsList",fetchActionType:"ui/channelGridPage/fetchChannelsList",getModel:i}),
a["ui/channelGridPage/fetchChannelsList"]=Object(u.a)({key:"channelsList",getModel:i}),a)))},function(e,t,n){"use strict";function i(e){var t=e.message,n=e.children;return a()("div",{},void 0,a()("p",{className:c.a.sidebarMessage},void 0,t),n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(1195)),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(o.a,s.a,Object(l.a)(),function(e,t,n){var i=n.librarySectionKey
;return!i&&n.librarySectionID&&(i="/library/sections/"+n.librarySectionID),{server:e,provider:t,librarySectionKey:i,roles:n.Role}})}var r=n(11),a=n(6),o=(n.n(a),n(48)),s=n(37),l=n(21),c=n(3200);t.a=Object(r.b)(i)(c.a)},,function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},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){"use strict"
;function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(1336),a=i(r),o=n(832),s=i(o),l="function"==typeof s.default&&"symbol"==typeof a.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};t.default="function"==typeof s.default&&"symbol"===l(a.default)?function(e){return void 0===e?"undefined":l(e)}:function(e){
return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":void 0===e?"undefined":l(e)}},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(33),o=n(600),s=n(19),l=n(839),c=n(16),u=n(18),d=n(1385),p={UNTESTED:"untested",PENDING:"pending",CONNECTED:"connected",UNAUTHORIZED:"unauthorized",UNAVAILABLE:"unavailable",ABORTED:"aborted"},h=c.a.boolean.isRequired,f=u.a.extend({name:"ConnectionModel",context:["server"],idAttribute:"uri",sessionAttrs:{
currentTest:c.a.custom(function(e){return r.a.isFunction(e.abort)}),testState:c.a.oneOf(p.UNTESTED,p.PENDING,p.CONNECTED,p.UNAUTHORIZED,p.UNAVAILABLE,p.ABORTED).isRequired,isBundled:h,isFallback:h,serverAttrs:c.a.object,currentReachabilityTest:c.a.custom(function(e){return r.a.isFunction(e.abort)}),isPossiblyCrossNetworkProtected:c.a.boolean.isRequired},sessionRelations:{sources:{relationClass:d.a}},syncedAttrs:{uri:c.a.string,scheme:c.a.string,address:c.a.string,port:c.a.string,
relay:c.a.boolean},derivedAttrs:{isUntested:function(){return this.get("testState")===p.UNTESTED},isPending:function(){return this.get("testState")===p.PENDING},isConnected:function(){return this.get("testState")===p.CONNECTED},isUnauthorized:function(){return this.get("testState")===p.UNAUTHORIZED},isUnavailable:function(){return this.get("testState")===p.UNAVAILABLE},isFailed:function(){return this.get("isUnauthorized")||this.get("isUnavailable")},isAborted:function(){
return this.get("testState")===p.ABORTED},isLoopback:function(){var e=this.get("address");return"localhost"===e||o.a.isLoopbackAddress(e)},isPrivate:function(){return this.get("isLoopback")||o.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:p.UNTESTED,isBundled:!1,isFallback:!1,relay:!1,
isPossiblyCrossNetworkProtected:!1},url:function(){return this.get("uri")},constructor:function(e,t){var n=r.a.clone(e);r.a.isObject(e)&&!e.uri&&(Object(a.a)(e.scheme&&e.address,"A server connection requires either a uri or a scheme and address. "+e.scheme+"://"+e.address),n.uri=e.scheme+"://"+e.address,e.port&&(n.uri+=":"+e.port)),u.a.prototype.constructor.call(this,n,t)},initialize:function(){this.listenTo(this.get("sources"),"remove reset",this.onSourcesChange)},augmentResponse:function(e){
var t=e.protocol;return t?r.a.extend({},e,{scheme:t}):e},getAddressFromUri:function(){return Object(s.parseUrl)(this.get("uri")).hostname},getIpAddressFromPlexDirectAddress:function(){return Object(l.a)(this.get("address"))},getLoopbackAttributes:function(){return{scheme:"http",address:"127.0.0.1",port:this.get("port")}},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:p});t.a=f},function(e,t,n){"use strict";function i(e){var t=o.a.clone(e);return t.hasOwnProperty("title")?(t.title=o.a.result(t,"title"),t.hasOwnProperty("shortTitle")&&(t.shortTitle=o.a.result(t,"shortTitle")),t.hasOwnProperty("plural")&&(t.plural=o.a.result(t,"plural")),t):t}function r(e,t){function n(e){for(var t in o)if(o[t][e])return!0;return!1}function r(e){for(var t in o){var n=o[t],r=n[e]
;if(r)return i(r)}s.a.warn("No type was found for "+e)}function a(){return t.map(function(e){return i(e)})}var o={};return e.forEach(function(e){o[e]=t.reduceRight(function(t,n){var i=n[e];return null!=i&&(t[i]=n),t},{})}),{contains:n,get:r,getAll:a}}t.a=r;var a=n(5),o=n.n(a),s=n(30)},function(e,t,n){"use strict";var i=n(23),r=n(857),a=i.a.extend({name:"MediaSettingCollection",context:["server"],model:r.a,getSaveParams:function(){return this.reduce(function(e,t){return e[t.id]=t.get("value"),e
},{})}});t.a=a},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";var i=n(5),r=n.n(i),a=n(19),o=n(68),s=n(399),l=n(328),c=n(28),u=n(866),d=n(613),p={uri:function(e,t){var n=t&&t.items;if(n&&n.length){if(n.length>1)return this.getBatchLibraryMetadataURI(n,t);e||(e=r.a.first(n))}if(e instanceof o.c.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=r.a.result(e,"url"),o=e.get("currentSubset"),s=e.get("currentFolderKey"),l=e.get("currentType");if("folder"===o.id)n=s||a.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){d[Object(c.q)(e.get("type")).typeString+".unwatched"]=1,delete d.unwatchedLeaves}l&&(d.sourceType=l.id),n=a.join([i,o.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(r.a.first(e)),i=r.a.map(e,function(e){return e.get("ratingKey")}),a="/library/metadata/"+i.join(",");return this._resolveURI({prefix:"library",
parts:[n.sectionUUID,"directory",a]})},getLibraryMetadataURI:function(e,t){t||(t={});var n,i=this._getSectionInfo(e),o=r.a.result(e,"url");return t.excludeSeedItem&&(o=a.join(o,{excludeSeedItem:1})),n=e.models||e.collectionName||e instanceof d.a?"directory":"item",this._resolveURI({prefix:"library",parts:[i.sectionUUID,n,o]})},getMetadataListURI:function(e,t){t||(t={});var n=this._getSectionInfo(e);return this._resolveURI({prefix:"library",
parts:[n.sectionUUID,"directory",a.join(e.get("containerKey"),{sourceType:t.sourceType})]})},getPlaylistURI:function(e,t){return this._resolveURI({prefix:"playlist",parts:["",e.get("guid")]})},getChannelURI:function(e,t){t||(t={});var n=r.a.result(e,"url"),i=e.get("items"),a=i&&i.length?"directory":"item";return this._resolveURI({prefix:"channel",parts:[e.channel.get("identifier"),a,n]})},title:function(e,t){var n=t&&t.items;if(n&&n.length){
if(n.length>1)return this.getBatchLibraryMetadataTitle(n,t);e=r.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");return"all"!==n.id?t+": "+n.get("title"):i.length?t+": "+r.a.flatten(r.a.map(i,function(e){return e.titles})).join(", "):t},getMetadataListTitle:function(e){
return e.get("containerTitle")||e.get("title")},getBatchLibraryMetadataTitle:function(e){var t=r.a.map(e,function(e){return e.get("title")});return Object(u.a)(t)},getLibraryMetadataTitle:function(e){var t=e.get("grandparentTitle")||e.get("parentTitle"),n=e.get("title");if(t&&(n=t+" - "+n),"episode"===e.get("type")){n+=" ("+Object(s.a)({seasonIndex:e.get("parentIndex"),episodeIndex:e.get("index"),date:e.get("originallyAvailableAt"),noLeadingZero:!0,separator:" "})+")"}return n},
_resolveURI:function(e){var t=e.parts,n=r.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=Object(l.a)(e);r.a.isEmpty(i)||(t=i.get("uuid"),n=i.id)}return{sectionUUID:t,sectionID:n}}};t.a=p},function(e,t,n){"use strict";var i={NORMAL:0,LOCAL:42,CLOUD:43};t.a=i},function(e,t,n){"use strict";var i=n(1516),r=n.n(i),a=n(20),o=n(17),s={success:!0,
error:!0,notify:!0},l=a.a.ItemView.extend({className:"alert-bar",template:r.a,events:{"click .close-btn":"onCloseClick"},initialize:function(e){var t=e.alert;if(this.alert=t,t){var n=t.type;n&&s[n]&&this.$el.addClass(n)}},hide:function(){o.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";function i(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}
;Object(c.d)("metrics").trackClick(o()({page:n,action:e,type:t.get("type")},i))}n.d(t,"a",function(){return I}),n.d(t,"e",function(){return S}),n.d(t,"f",function(){return M}),n.d(t,"d",function(){return D}),n.d(t,"c",function(){return C}),n.d(t,"b",function(){return O})
;var r,a=n(7),o=n.n(a),s=n(12),l=n.n(s),c=n(15),u=n(19),d=n(4),p=n(937),h=n(73),f=n(78),v=n(36),g=n(1788),m=n(246),y=n(76),b=n(324),I="metadata/repopulateMetadataItem",S=Object(v.a)("metadata/selectMetadataItemStream"),M=Object(v.a)("metadata/updateMetadataItemFollowMute"),D=Object(v.a)(I),C=Object(v.a)("metadata/removeMetadataItem"),O=(r={},r[I]=function(e,t){var n=Object(f.l)(e,t);n&&n.fetch({data:{skipRefresh:1},usePopulatedParams:!0})},r["metadata/removeMetadataItem"]=function(e,t){
var n=Object(f.l)(e,t);n&&n.trigger("destroy",n,n.collection)},r["metadata/selectMetadataItemStream"]=function(e,t,n){var i=t.mediaIndex,r=t.streamTypeString,a=t.streamID,o=t.allParts,s=t.metricsPage,l=Object(f.d)(e,t),c={mediaIndex:i,streamTypeString:r,streamID:a,allParts:o,allowMetrics:!!s,metricsProperties:{page:s}};Object(g.a)(l,c).fail(function(e){e.aborting||n(Object(m.b)(Object(d.default)("There was a problem selecting this stream.")))})},
r["metadata/updateMetadataItemFollowMute"]=function(e,t){var n=t.ratingKey,r=t.actionID,a=t.tagElement,s=t.value,c=Object(f.h)(e,t),d=Object(f.d)(e,t),v=void 0,g=d.get(a),m=g.find(function(e){return e.ratingKey===n}),I=o()({},m);r===b.b.FOLLOW&&(I.followed=s,I.muted=s&&m.muted?!m.muted:m.muted,v=h.v),r===b.b.MUTE&&(I.muted=s,I.followed=s&&m.followed?!m.followed:m.followed,v=h.D)
;var S=Object(p.a)(g,m,I),M=c.get("features").get(y.b.ACTIONS).get("actions").get(r),D=s?M.get("key"):M.get("reverseKey"),C=u.join(D,{ratingKey:n});d.set(a,S);var O=c.getXHROptions(C,{type:"PUT"});l.a.ajax(O).then(null,function(){d.set(a,g)}),i(v,d,t.metricsPage,{identifier:c.get("metricsIdentifier"),context:m.tag,value:s})},r)},function(e,t,n){"use strict";function i(e,t){var n=a.a.invert(e);return a.a.reduce(e,function(e,i){return e[i]=t[n[i]],e},{})}var r=n(5),a=n.n(r),o=n(69),s={
playing:"playing",paused:"paused",stopped:"paused",error:"paused",buffering:"playing"},l=o.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 s[e]}}),c=new l;t.a=c},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=n.n(d),h=n(0),f=n.n(h),v=n(15),g=(n(33),
n(250)),m=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.page=n.page,r}return u()(t,e),t.prototype.getChildContext=function(){return{metricsPage:this.page}},t.prototype.componentDidMount=function(){var e=this.props,t=(e.children,e.isDelegated),n=r()(e,["children","isDelegated"]);t||window.requestAnimationFrame(function(){Object(v.d)("metrics").trackView(n)})},t.prototype.componentWillReceiveProps=function(e){},t.prototype.componentDidUpdate=function(e){
var t=(e.children,e.isDelegated),n=r()(e,["children","isDelegated"]),i=this.props,a=(i.children,i.isDelegated),o=r()(i,["children","isDelegated"]),s=t!==a||!Object(g.a)(n,o);!a&&s&&Object(v.d)("metrics").trackView(o)},t.prototype.render=function(){return this.props.children?f.a.Children.only(this.props.children):null},t}(h.Component);m.childContextTypes={metricsPage:p.a.string.isRequired},t.a=m},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=Object(a.a)(1e3*e)
;return t?Object(r.default)("{1} left",t):""}var r=n(4),a=n(351);t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(5),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(33),m=n(1869),y=n(29),b=n(22),I=n(1870),S=n.n(I),M=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onMouseDown=function(e){e.preventDefault(),0===e.button&&r._startDrag(e.pageX)},r.onMouseMove=function(e){var t=e.pageX;if(!r.state.isDragging){
var n=r._getValueForPosition(t),i=r.refs.track,a=i.getBoundingClientRect();r.props.onMove({position:{x:t,y:a.top},positionValue:n,steppedValue:r._getSteppedValue(n)})}},r.onTouchStart=function(e){e.preventDefault();var t=p.a.first(e.touches);t&&r._startDrag(t.pageX,!0)},r.onDocumentMouseMove=function(e){r._drag(e.pageX)},r.onDocumentTouchMove=function(e){var t=p.a.first(e.touches);t&&r._drag(t.pageX)},r.onDocumentMouseUp=function(e){r._stopDrag(e.pageX)},r.onDocumentTouchEnd=function(e){
var t=p.a.first(e.changedTouches);t&&r._stopDrag(t.pageX)},r.state={isDragging:!1},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this._stopListeningForDrag()},t.prototype._listenForDrag=function(e){e?(document.addEventListener("touchmove",this.onDocumentTouchMove),document.addEventListener("touchcancel",this.onDocumentTouchEnd),
document.addEventListener("touchend",this.onDocumentTouchEnd)):(document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp))},t.prototype._stopListeningForDrag=function(){document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("touchmove",this.onDocumentTouchMove),document.removeEventListener("mouseup",this.onDocumentMouseUp),document.removeEventListener("touchcancel",this.onDocumentTouchEnd),
document.removeEventListener("touchend",this.onDocumentTouchEnd)},t.prototype._startDrag=function(e,t){this._changeValue(this._getValueForPosition(e)),this._listenForDrag(t),this.props.onDragStart&&this.props.onDragStart()},t.prototype._drag=function(e){this.state.isDragging||(document.body.classList.add(S.a.isDragging),this.setState({isDragging:!0})),this._changeValue(this._getValueForPosition(e))},t.prototype._stopDrag=function(e){document.body.classList.remove(S.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,n=t.min,i=t.max;Object(g.a)(i>n,"The max, "+i+", must be greater than the min, "+n);var r=this.refs.track,a=r.getBoundingClientRect(),o=a.left+document.body.scrollLeft,s=e-o,l=s/r.offsetWidth
;return l=Math.min(Math.max(l,0),1),(i-n)*l+n},t.prototype._getSteppedValue=function(e){var t=this.props,n=t.min,i=t.max,r=t.stepSize;if(!r)return e;var a=Math.round(e/r)*r;return Math.min(Math.max(a,n),i)},t.prototype._getStickyValue=function(e){var t=this.props,n=t.max,i=t.min,r=t.stepSize,a=t.stickiness;if(!r||!a)return e;var o=this._getSteppedValue(e);return Math.abs(o-e)/(n-i)<a/100?o:e},t.prototype._changeValue=function(e){e!==this.props.value&&this.props.onChange({positionValue:e,
steppedValue:this._getSteppedValue(e)})},t.prototype.render=function(){
var e=this.props,t=e.style,n=e.className,i=e.trackClassName,a=e.secondaryFillClassName,o=e.fillClassName,s=e.thumbClassName,l=e.label,c=e.value,u=e.min,d=e.max,p=e.secondaryMin,h=e.secondaryMax,f=e.showSecondaryFill,g=e.showFill,y=e.autoHideThumb,I=e.isDisabled,M=e.onMove,D=this.state.isDragging,C=Object(m.a)(this._getStickyValue(c),u,d),O="translateX(-"+(100-C)+"%)",j=p?Object(m.a)(this._getStickyValue(p),u,d):0,P=h?Object(m.a)(this._getStickyValue(h),u,d):0,w="scaleX("+(C-j)/100+")",T="scaleX("+(P-j)/100+")"
;return r()("div",{style:t,className:(n||"")+" "+(I&&S.a.isDisabled||"")+" "+(D&&S.a.isDragging||"")+" "+(y&&S.a.hasAutoHideThumb||""||""),onMouseDown:this.onMouseDown,onMouseMove:M&&this.onMouseMove,onTouchStart:this.onTouchStart},void 0,v.a.createElement("div",{className:i,ref:"track"},f&&r()("div",{className:a,style:{left:p?j+"%":void 0,WebkitTransform:T,msTransform:T,transform:T}}),g&&r()("div",{className:o,style:{left:p?j+"%":void 0,WebkitTransform:w,msTransform:w,transform:w}
})),r()("div",{className:S.a.thumbTrack,style:{WebkitTransform:O,msTransform:O,transform:O}},void 0,r()(b.a,{className:s,role:"slider","aria-labelledby":l,"aria-valuemin":u,"aria-valuemax":d,"aria-valuenow":c})))},t}(f.Component);M.defaultProps={className:S.a.slider,trackClassName:S.a.track,fillClassName:S.a.fill,secondaryFillClassName:S.a.secondaryFill,thumbClassName:S.a.thumb,min:0,max:100,stepSize:0,stickiness:10,showFill:!1,showSecondaryFill:!1,autoHideThumb:!1,isDisabled:!1},t.a=M
},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"BACKGROUND_TRANSCODE_JOBS",function(){return r}),n.d(t,"SEARCH_RESULT",function(){return a}),n.d(t,"SYNC_METADATA_ITEM",function(){return o});var i=n(43);n.d(t,"SERVER",function(){return i.m}),n.d(t,"PROVIDER",function(){return i.k}),n.d(t,"LIBRARY",function(){return i.c}),n.d(t,"HUB",function(){return i.b}),n.d(t,"USER",function(){return i.o}),n.d(t,"RESOURCE",function(){return i.l}),
n.d(t,"FRIEND",function(){return i.a}),n.d(t,"METADATA_LIST",function(){return i.h}),n.d(t,"METADATA_DIRECTORY",function(){return i.f}),n.d(t,"METADATA_ITEM",function(){return i.g}),n.d(t,"SESSION",function(){return i.n}),n.d(t,"USER_PLAYLIST_ITEM",function(){return i.p}),n.d(t,"MEDIA_SUBSCRIPTION",function(){return i.e}),n.d(t,"LIVE_TV_SESSION",function(){return i.d}),n.d(t,"PLAY_QUEUE_ITEM",function(){return i.j}),n.d(t,"PLAYLIST_ITEM",function(){return i.i})
;var r="backgroundTranscodeJobs",a="searchResults",o="syncMetadataItems"},function(e,t,n){"use strict";function i(e,t,n){return a()({},e,n,t)}t.a=i;var r=n(7),a=n.n(r)},function(e,t,n){"use strict";function i(){return a()("div",{className:l.a.separator})}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(1998)),l=n.n(s);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),
n(0)),m=n.n(g),y=n(61),b=n(2010),I=n.n(b),S=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r.setRef=function(e){r._checkbox=e},r.onChange=function(e){var t=e.target.checked,n=t?r.props.checkedValue:r.props.uncheckedValue;r.props.value!==n&&r.props.onChange(n)},r._checkbox=null,r}return f()(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,a=e.disabledClassName,s=e.isDisabled,c=e.size,u=e.checkboxText,d=e.name,p=(e.initialValue,e.value),h=e.checkedValue,f=(e.uncheckedValue,e.showErrors,e.hasError),v=(e.errors,e.validations,
l()(e,["className","inputClassName","errorClassName","disabledClassName","isDisabled","size","checkboxText","name","initialValue","value","checkedValue","uncheckedValue","showErrors","hasError","errors","validations"]));return o()("label",{className:(t||"")+" "+(I.a[c]||"")+" "+(s&&a||"")+" "+(f&&i||""||""),htmlFor:d},void 0,m.a.createElement("input",r()({},v,{id:d,type:"checkbox",disabled:s,className:n,checked:p===h,ref:this.setRef,onChange:this.onChange})),u)},t}(g.Component);S.defaultProps={
className:I.a.label,inputClassName:I.a.input,errorClassName:I.a.hasError,disabledClassName:I.a.isDisabled,isDisabled:!1,size:y.LARGE,uncheckedValue:!1,checkedValue:!0,value:!1,hasError:!1},t.a=S},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(419),b=(n(65),n(61)),I=n(22),S=n(506),M=n(2039),D=n.n(M),C=function(e){function t(){return u()(this,t),p()(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,a=e.direction,s=e.kind,c=e.size,u=e.isSelected,d=l()(e,["className","arrowClassName","children","direction","kind","size","isSelected"]),p=c||b.MEDIUM;return m.a.createElement(I.a,r()({className:(t||"")+" "+(D.a[p]||"")+" "+(u&&D.a.isSelected||""||""),"aria-haspopup":!0,kind:s,size:c,isSelected:u},d),i,o()(S.a,{className:(n||"")+" "+(D.a[a]||"")+" "+(D.a[p]||""),direction:a,kind:s,size:p,
isSelected:u}))},t}(g.Component);C.defaultProps={className:D.a.disclosureArrowButton,arrowClassName:D.a.disclosureArrow,direction:y.DOWN,isSelected:!0},t.a=C},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"c",function(){return r}),n.d(t,"b",function(){return a}),n.d(t,"a",function(){return o});var i="RECORDING_PRIORITY_SUBSCRIPTION",r="PLAY_QUEUE_ITEM",a="PLAYLIST_ITEM",o="ALBUM_ITEM"},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(Object(o.a)(),function(){return{year:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).year}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(1030);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e,t){return Object(r.a)(e,{limit:"past"},t)}var r=n(2218);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.component,r=e.width,o=e.height,l=e.url,u=c()(e,["className","children","component","width","height","url"])
;return s()("div",{className:t,style:{width:r,height:o}},void 0,p.a.createElement(i,a()({width:r,height:o,url:l},u)),n)}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(2255),f=n.n(h);i.defaultProps={className:f.a.card},t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),
n(0)),m=n.n(g),y=n(29),b=n(251),I=n(720),S=n.n(I),M=n(2270),D=n(2405),C=n.n(D),O="faceFront",j=Object(b.a)(S.a.posterFlipSpeed),P={transitionName:{appear:"appear",enter:"enter",leave:"leave"},transitionAppear:!1,transitionEnter:!1,transitionLeave:!1},w=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r.onImageLoad=function(){r.state.isLoadingFace&&r._flipCard()},r.onImageError=function(){r.state.isLoadingFace&&r._flipCard()},r.onFlipComplete=function(){r.setState({
isFlippingFace:!1,previousImageUrl:null})},r.state={visibleFace:O,isLoadingFace:!1,isFlippingFace:!1,previousImageUrl:null},r}return f()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.props.imageUrl,n=e.imageUrl&&t!==e.imageUrl;this.props.metadataKey===e.metadataKey&&n&&this._prepareFlip(t)},t.prototype.shouldComponentUpdate=function(e,t){return Object(y.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(){var e=this;this.setState(function(t){return{isLoadingFace:!1,visibleFace:e._getInverseFace(t.visibleFace)}},function(){e._flipTimeoutID=setTimeout(e.onFlipComplete,j)})},t.prototype._cancelFlip=function(){this._flipTimeoutID&&(this._flipTimeoutID=clearTimeout(this._flipTimeoutID))},t.prototype._getInverseFace=function(e){return e===O?"faceBack":O},
t.prototype.render=function(){var e=this.props,t=e.className,n=e.cardClassName,i=e.cardFaceClassName,a=e.metadataKey,s=e.imageWidth,c=e.imageHeight,u=e.imageUrl,d=l()(e,["className","cardClassName","cardFaceClassName","metadataKey","imageWidth","imageHeight","imageUrl"]),p=this.state,h=p.visibleFace,f=p.isLoadingFace,v=p.isFlippingFace,g=p.previousImageUrl,y=this._getInverseFace(h),b={width:s,height:c};return o()("div",{className:t,"data-qa-id":"metadataPosterCard--"+a},a,o()("div",{
className:(n||"")+" "+("faceBack"===h&&C.a.isFlipped||""||""),style:b},void 0,m.a.createElement(M.a,r()({key:h,className:i,visibleFace:h,imageWidth:s,imageHeight:c,imageUrl:f?g:u,imageTransitionProps:v?P:void 0,onImageLoad:this.onImageLoad,onImageError:this.onImageError},d)),v&&m.a.createElement(M.a,r()({key:y,className:i,visibleFace:y,imageWidth:s,imageHeight:c,imageUrl:f?u:g,imageTransitionProps:v?P:void 0,onImageLoad:this.onImageLoad,onImageError:this.onImageError},d))))},t}(g.Component)
;w.defaultProps={className:C.a.cardContainer,cardClassName:C.a.card},t.a=w},function(e,t,n){"use strict";function i(e,t){if(!e)return t;var n=r.a.parseXML(e.responseText);return n&&n.message?n.message:t}t.a=i;var r=n(58)},function(e,t,n){"use strict";n.d(t,"b",function(){return l});var i=n(18),r=n(16),a=n(276),o=n(1074),s=n(2367),l={DEAD:"dead",ALIVE:"alive"},c=i.a.extend({name:"MediaGrabberDeviceModel",context:["server"],rootPropertyName:"Device",idAttribute:"key",sessionAttrs:{
isChannelsPending:r.a.boolean,isChannelsPopulated:r.a.boolean,channelsError:r.a.object,selectedSource:r.a.string,isSaving:r.a.boolean,saveError:r.a.object},sessionRelations:{channels:{relationClass:s.a}},syncedAttrs:{key:r.a.integer,uuid:r.a.string,parentID:r.a.integer,uri:r.a.string,protocol:r.a.string,status:r.a.string,state:r.a.string,lastSeenAt:r.a.integer,make:r.a.string,model:r.a.string,modelNumber:r.a.string,source:r.a.integer,sources:r.a.list,tuners:r.a.integer,thumb:r.a.string,
unsupported:r.a.boolean},syncedRelations:{channelMappings:{rootPropertyName:"ChannelMapping",relationClass:o.a},prefs:{relationClass:a.a,rootPropertyName:"Setting",deferred:!0,save:!0}},defaults:{isChannelsPending:!1,isChannelsPopulated:!1,channelsError:null,isSaving:!1,saveError:null,unsupported:!1}});t.a=c},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(o.a,s.a,Object(l.a)(),Object(c.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}
;return{server:e,provider:t,librarySectionKey:arguments[3],Director:n.Director,Writer:n.Writer,studio:n.studio}})}var r=n(11),a=n(6),o=(n.n(a),n(48)),s=n(37),l=n(21),c=n(443),u=n(2471);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e){return e.desktop.activities})}var r=n(6),a=(n.n(r),n(42));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=c()(e,["children"]);return p.a.createElement(m.a,a()({
title:Object(h.default)("There was an unexpected error"),description:Object(h.default)("Please visit our forums if you continue to experience problems")},n),s()(g.a,{to:f.a,target:"_blank",kind:v.b.PRIMARY},void 0,Object(h.default)("Go to Forums")),t)}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(4),f=n(755),v=n(24),g=n(22),m=n(126);t.a=i},function(e,t,n){"use strict";function i(){return Object(h.a)(Object(p.a)(),Object(v.a)(),Object(f.a)(),function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],i=s.a.findWhere(t.features,{type:d.b.CONTENT});if(i&&i.directories)return i.directories.reduce(function(e,i){var r=i;return t.isLibraryProvider&&"/hubs"===i.hubKey&&(r=a()({isHomeDirectory:!0},r)),t.protocols&&t.protocols.length>0&&(r=a()({type:t.protocols[0]},r)),n&&g.test(i.key)?e.unshift(n):e.push(r),e},[]);if(t.identifier===u.c.LIBRARY_PROVIDER_IDENTIFIER){var r=[{hubKey:"/hubs",isHomeDirectory:!0,
title:Object(l.default)("Home")},{key:"/playlists",title:Object(l.default)("Playlists"),type:c.i}];return e.forEach(function(e){var t=e.key,n=e.title,i=e.type;r.push({key:"/library/sections/"+t,hubKey:"/hubs/sections/"+t,title:n,type:i})}),r}return[]})}t.a=i;var r=n(7),a=n.n(r),o=n(5),s=n.n(o),l=n(4),c=n(28),u=n(55),d=n(76),p=n(725),h=n(424),f=n(2669),v=n(79),g=/\/watchnow$/i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(l.a)(),Object(c.a)(),function(e,t){
return a.a.find(t,function(t){return t.type===s.a.PROVIDER_EPG_LOAD&&t.Context.identifier===e.identifier})})}var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),n(175)),l=n(79),c=n(301);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.children,i=e.errorMessage,r=e.onModalClose;return a()(u.a,{onModalClose:r},void 0,a()(d.a,{},void 0,t||Object(l.default)("DVR Setup")),i&&a()("div",{className:h.a.errorMessage},void 0,a()(c.a,{name:"plex-icon-alert-560",className:h.a.errorIcon}),i),n)}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(26),u=n(103),d=n(111),p=n(2723),h=n.n(p);t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(function(e,t){return t.activeType},function(e,t){return t.typeKey},l.a,function(e,t,n){var i=void 0;return t?i=a.a.find(n,function(e){return e.key===t}):e&&(i=a.a.find(n,function(t){var n=Object(s.r)(t.type),i=Object(s.r)(e);return!!n&&!!i&&n.id===i.id})),i||(i=a.a.first(n)),i})}t.a=i
;var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),n(28)),l=n(377)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"initLibraryPage",function(){return a}),n.d(t,"initLibraryPageMetadataList",function(){return o}),n.d(t,"initLibraryPageDirectoryList",function(){return s}),n.d(t,"fetchLibraryDetails",function(){return l}),n.d(t,"populateLibraryDetails",function(){return c}),n.d(t,"fetchLibraryFirstCharacters",function(){return u}),
n.d(t,"populateLibraryFirstCharacters",function(){return d}),n.d(t,"fetchQueryParse",function(){return p}),n.d(t,"populateQueryParse",function(){return h}),n.d(t,"selectLibraryFilter",function(){return f}),n.d(t,"deselectLibraryFilter",function(){return v}),n.d(t,"fetchLibraryFilterOptions",function(){return g}),n.d(t,"populateLibraryFilterOptions",function(){return m}),n.d(t,"searchLibraryFilterOptions",function(){return y}),n.d(t,"selectLibraryTableColumn",function(){return b}),
n.d(t,"deselectLibraryTableColumn",function(){return I});var i=n(36),r=n(82),a=Object(i.a)(r.B),o=Object(i.a)(r.D),s=Object(i.a)(r.C),l=Object(i.a)(r.p),c=Object(i.a)(r.M),u=Object(i.a)(r.r),d=Object(i.a)(r.O),p=Object(i.a)(r.v),h=Object(i.a)(r.S),f=Object(i.a)(r._6),v=Object(i.a)(r.i),g=Object(i.a)(r.q),m=Object(i.a)(r.N),y=Object(i.a)(r._2),b=Object(i.a)(r._7),I=Object(i.a)(r.j)},function(e,t,n){"use strict";function i(e){
var t=e.children,n=e.closedNode,i=e.title,r=e.errorMessage,o=e.isDirty,s=e.isOpen,v=e.isUpdating,g=e.showButton,m=e.showSpinner,I=e.onDirtyChange,S=e.onSubmit,M=e.onErrorDismiss,D=e.onTogglePress;return a()(p.a,{isOpen:s,errorMessage:r,closedNode:a()(h.a,{className:y.a.sectionDetails},void 0,a()(d.a,{className:y.a.label},void 0,i),n),onErrorDismiss:M,onTogglePress:D},void 0,m&&a()(d.a,{className:y.a.label},void 0,i),m&&a()("div",{className:y.a.spinnerContainer},void 0,b),!m&&g&&a()(u.b,{
onSubmit:S,onChange:I},void 0,t,a()("div",{className:y.a.submitButton},void 0,a()(f.a,{type:"submit",isDisabled:!o,isSpinning:v,kind:c.PRIMARY},void 0,Object(l.default)("Save Changes")))),!m&&!g&&t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(65),u=n(145),d=n(133),p=n(1201),h=n(792),f=n(102),v=n(553),g=n(39),m=n(3050),y=n.n(m),b=a()(g.a,{});i.defaultProps={showButton:!0},t.a=Object(v.a)(i,{isUpdatingPropName:"isUpdating",errorPropName:"updateError",
clearDirtyOnChangePropName:"isOpen"})},function(e,t,n){"use strict";n.d(t,"d",function(){return a}),n.d(t,"c",function(){return o}),n.d(t,"b",function(){return s}),n.d(t,"f",function(){return l}),n.d(t,"i",function(){return c}),n.d(t,"j",function(){return u}),n.d(t,"a",function(){return d}),n.d(t,"e",function(){return p}),n.d(t,"g",function(){return h}),n.d(t,"h",function(){return f})
;var i=n(36),r=n(82),a=Object(i.a)(r.G),o=Object(i.a)(r.F),s=Object(i.a)(r.t),l=Object(i.a)(r.Q),c=Object(i.a)(r.Y),u=Object(i.a)(r._8),d=Object(i.a)(r.k),p=Object(i.a)(r.J),h=Object(i.a)(r.W),f=Object(i.a)(r.X)},function(e,t,n){"use strict";function i(e){switch(e){case h.b:return b.a;case h.f:return I.a;case h.e:return M.a;case h.a:return m.a;case h.d:return S.a;default:return y.a}}function r(e){
var t=e.serverEntityID,n=e.providerEntityID,r=e.metadataListEntityID,a=e.metadataItemEntityIDs,s=e.containerKey,l=e.listType,m=e.listStyle,y=e.populatedRange,b=e.isPopulated,I=e.isPending,S=e.error,M=e.listTitle,C=e.titleButtonTitle,O=e.titleButtonRoute,P=e.totalSize,x=e.previewSize,N=e.showArtwork,A=e.viewportWidth,L=e.viewportHeight,k=e.contentHeight,_=e.scrollTop,R=e.columnAdjustment,z=e.onPageRequest,U=P||a.length,B=null!=x&&U>x?x:U,V=null!=x&&U>x,F=i(m),Q=M||Object(d.a)(l,U),H=m===h.f||m===h.e||m===h.d||m===h.a
;return o()(j.a,{listType:l,isPopulated:b,isPending:I,error:S,size:B},void 0,!!Q&&o()(v.a,{className:w.a.descendantHubCellHeader},void 0,o()(g.a,{},void 0,Object(u.a)(Q)),(V||null!=C)&&o()(f.a,{className:w.a.titleButton,to:O},void 0,Object(u.a)(C||Object(c.default)("See all")))),H&&T,o()(D.a,{showArtwork:N,contentHeight:k,scrollTop:_},void 0,o()(F,{serverEntityID:t,providerEntityID:n,metadataListEntityID:r,containerKey:s,listType:l,listContext:p.h,keyPropName:"metadataItemEntityID",items:a,
itemsOffset:y.start,size:B,viewportWidth:A,viewportHeight:L,columnAdjustment:R,onPageRequest:z})),H&&E)}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(4)),u=n(367),d=n(1223),p=n(31),h=n(81),f=(n(441),n(22)),v=n(442),g=n(368),m=n(3215),y=n(3219),b=n(3220),I=n(3221),S=n(3222),M=n(3223),D=n(571),C=n(572),O=n(573),j=n(1225),P=n(3229),w=n.n(P),T=o()(C.a,{}),E=o()(O.a,{});t.a=r},function(e,t,n){"use strict";var i=n(3449),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(4),c=s.a.Layout.extend({
className:"form-group",template:r.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 o.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(){o.a.isEmpty(this.changes)||this.enable()},onInputChange:function(e){var t=e.currentTarget,n=t.name,i=t.value,r=t.value;if(n){"checkbox"===t.type&&((r=t.checked)||(i="0"));this.updateModel(n,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=Object(l.default)("Your changes have been saved.")):t=Object(l.default)("Your changes could not be saved."),this.ui.message.text(t)}});t.a=c},,,,,,function(e,t,n){var i=n(318),r=n(458);e.exports=n(319)?function(e,t,n){return i.f(e,t,r(1,n))
}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var i=n(389),r=n(821),a=n(584),o=Object.defineProperty;t.f=n(319)?Object.defineProperty:function(e,t,n){if(i(e),t=a(t,!0),i(n),r)try{return o(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){e.exports=!n(271)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(824),r=n(459);e.exports=function(e){
return i(r(e))}},,function(e,t,n){var i=n(587)("wks"),r=n(460),a=n(179).Symbol,o="function"==typeof a;(e.exports=function(e){return i[e]||(i[e]=o&&a[e]||(o?a:r)("Symbol."+e))}).store=i},function(e,t,n){"use strict";n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c});var i=n(16),r=n(58),a=n(18),o=n(1434),s=n(1436),l={ONBOARDED:"onboarded",PLAYBACK_SPEED:"playbackSpeed"},c={BOOL:"bool",GROUP:"group",LOCATION:"location",SELECT:"select",DOUBLE:"double"},u={bool:r.a.parseBoolean,
double:r.a.parseFloat},d=a.a.extend({name:"ProviderSettingModel",context:["server","provider"],rootPropertyName:"Setting",url:function(){return this.get("key")},sessionAttrs:{isOptionsPending:i.a.boolean,isOptionsPopulated:i.a.boolean,optionsError:i.a.object,isLocationsPending:i.a.boolean,isLocationsPopulated:i.a.boolean,locationsError:i.a.object},syncedAttrs:{country:i.a.string,countryLabel:i.a.string,hidden:i.a.boolean,id:i.a.string,key:i.a.string,label:i.a.string,multiselect:i.a.boolean,
postalCode:i.a.string,required:i.a.boolean,selectedCount:i.a.integer,summary:i.a.string,type:i.a.string,value:i.a.oneOfType(i.a.string,i.a.boolean,i.a.float),min:i.a.float,max:i.a.float,step:i.a.float},sessionRelations:{locations:{relationClass:s.a}},syncedRelations:{settings:function(){return{relationClass:n(856).default,rootPropertyName:"Setting",deferred:!0}},options:{relationClass:o.a,options:function(e){return{url:e.key}}}},defaults:{isOptionsPending:!0,isOptionsPopulated:!1,
optionsError:null,isLocationsPending:!0,isLocationsPopulated:!1,locationsError:null},augmentResponse:function(e){var t=u[e.type];return t&&(e.value=t(e.value)),e}});t.a=d},function(e,t,n){"use strict";n.d(t,"b",function(){return a});var i=n(16),r=n(18),a={SCROBBLE:"scrobble",SAVE:"save",ADD_TO_CATALOG:"addToCatalog",FOLLOW:"follow",MUTE:"mute"},o=r.a.extend({name:"ProviderActionModel",context:["server","provider"],syncedAttrs:{id:i.a.string,key:i.a.string,reverseKey:i.a.string}});t.a=o
},function(e,t,n){"use strict";var i=n(94),r=n(612),a=n(51),o=n(23),s=n(77),l=o.a.extend({name:"MetadataCollection",context:["server","provider","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey"],model:s.a,responseType:function(){return Object(r.a)(this.server,this.provider,this.channel)},url:function(){return this.containerKey},augmentResponseText:function(e,t){return t===a.a.xml?Object(i.b)(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=l},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";var i=n(16),r=n(18),a={ASCENDING:"asc",DESCENDING:"desc"},o=r.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||a.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!==a.ASCENDING?a.ASCENDING:a.DESCENDING,this.set("direction",e)}},{directions:a});t.a=o},function(e,t,n){"use strict"
;function i(e){if(e){if(e.section)return e.section;if(e.get("isSection"))return e;if(e.get("librarySectionID")){var t=new o.a({key:e.get("librarySectionID")},{server:e.server,onlyIfCached:!0});return a.a.isEmpty(t)?void 0:t}return e.parent?i(e.parent):void 0}}t.a=i;var r=n(5),a=n.n(r),o=n(397)},function(e,t,n){"use strict";function i(e,t){switch(t){case o.SUBSCRIPTION:switch(e){case"1003":
return Object(a.default)("Subscriptions have been temporarily disabled: too many failed attempts. Please try again later.")}}switch(e){case"1001":return Object(a.default)("The username or password is incorrect");case"1003":return Object(a.default)("Sign in has been temporarily disabled: too many failed attempts. Please try again later.");case"1010-login":return Object(a.default)("Login is required");case"1010-password":return Object(a.default)("Password is required");case"1010-email":
return Object(a.default)("Email is required");case"1011-username":return Object(a.default)("Username has already been taken");case"1011-email":return Object(a.default)("Email has already been taken");case"1030":return Object(a.default)("This account only allows signing in with an email address");case"1031":return Object(a.default)("The username or password is incorrect. Repeated attempts may temporarily disable sign in.");case"1032-password":
return Object(a.default)("Password must be at least 8 characters");case"1033-password":return Object(a.default)("Password is too weak");case"1034-password":return Object(a.default)("Password must be different from username or email address");case"1035-email":return Object(a.default)("Email is not a valid email address");case"1036-username":return Object(a.default)("Username must not be an email address");case"1037-username":return Object(a.default)("Username contains invalid characters")
;case"1038-pin":return Object(a.default)("Pin must be 4 digits");case"1039-passwordConfirmation":return Object(a.default)("Confirm Password must match Password");case"1040":case"1044":return Object(a.default)("Invalid Password")}}function r(e,t){if(e){var n=String(e.code);return i(e.code+"-"+e.field,t)||i(n,t)||e.message||Object(a.default)("An unknown error occurred")}}t.a=r;var a=n(4),o={SUBSCRIPTION:"subscription"}},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a={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(r.a.isFunction(i.onExit)){if(!1===i.onExit.call(this))return}}if(this.currentState=e,r.a.isFunction(n.onEnter)){if(!1===n.onEnter.apply(this,r.a.rest(arguments)))return void(this.currentState=t)}this.triggerMethod("stateMachineChange",{from:t,to:e})}},enterNextState:function(){var e
;if(this.currentState){e=this.states[this.currentState].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=a},function(e,t,n){"use strict";function i(e,t){if(!e)return"";if(/^\d+$/.test(e)){return e+(t&&t.length?t[0]:"p")}return e.toUpperCase()}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function i(){
return window.viewport&&window.viewport.pixelRatio||window.devicePixelRatio||1}t.a=i},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=n(15),c=n(83),u=n(876),d=n(877),p=n(332),h=n(62),f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",v=s.a.ItemView.extend({tagName:"img",background:!1,backgroundSize:"",cache:new d.a,initialize:function(e){e||(e={}),r.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),r.a.isFunction(e.getUrl)&&(this.getUrl=e.getUrl),
this.allowBaseImageBlobs=h.a.get("allowBaseImageBlobs"),this.allowBaseImagePreloading=h.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){s.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.d("appModel"),n=Object(p.a)()
;return u.a.image(this.server,e,{fallbackServer:t.get("primaryServer"),width:this.width*n,height:this.height*n,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){if(this.background)return void this.showBackgroundImage(e)
;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 o.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):o.a.Deferred().resolve(e).promise()},loadBlob:function(e){var t=o.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 a=new window.XMLHttpRequest;return a.open("GET",e,!0),a.responseType="arraybuffer",this.xhr=a,a.onreadystatechange=r.a.bind(function(){if(4===a.readyState)if(a.onreadystatechange=null,this.xhr=null,200===a.status){
var n=new window.Blob([a.response],{type:"image/jpeg"}),i=window.URL.createObjectURL(n);this.cache.store({url:e,blobUrl:i}),t.resolve(i)}else t.reject()},this),a.send(),t.promise()},loadImage:function(e,t){var n=o.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){if(t=this.getUrl(t),this.url===t)return this;this.url=t,this.src=null,this.render()}});t.a=v},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";n.d(t,"a",function(){return l}),n.d(t,"c",function(){return c}),n.d(t,"b",function(){return u}),n.d(t,"d",function(){return d}),
n.d(t,"e",function(){return p});var i,r=n(36),a=n(193),o=n(90),s=n(78),l=Object(r.a)("provider/fetchCloudProviders"),c=Object(r.a)("provider/populateCloudProviders"),u=Object(r.a)("providers/fetchProvider"),d=Object(r.a)("providers/populateProvider"),p=(i={},i["provider/fetchCloudProviders"]=Object(o.a)({key:"providers",getModel:s.k}),i["provider/populateCloudProviders"]=Object(a.a)({key:"providers",fetchActionType:"provider/fetchCloudProviders",getModel:s.k}),
i["providers/fetchProvider"]=Object(o.a)({getModel:s.h}),i["providers/populateProvider"]=Object(a.a)({getModel:s.h,fetchActionType:"providers/fetchProvider"}),i)},,,,function(e,t,n){"use strict";var i=n(251),r=n(482),a=n.n(r),o=n(1663),s=n.n(o),l=Object(i.a)(a.a.slowSpeed),c={appear:s.a.appear,appearActive:s.a.appearActive,enter:s.a.enter,enterActive:s.a.enterActive,leave:s.a.leave,leaveActive:s.a.leaveActive},u={transitionName:c,transitionAppear:!0,transitionAppearTimeout:l,
transitionEnterTimeout:l,transitionLeaveTimeout:2*l};t.a=u},,,,function(e,t,n){"use strict";function i(e){return d.a.Deferred().resolve(e).promise()}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.urlPath,i=void 0===n?"":n,r=t.params,a=void 0===r?{}:r,o=t.type,l=void 0===o?"GET":o,u=p.join([c.a.result(e,"url"),i]),h=p.join(u,s()({},a,{repeat:e.get("repeat")?1:0,own:e.get("own")?1:0,includeChapters:1,includeGeolocation:1})),f=e.provider,v=f.getXHROptions(h,{
type:l}),g=e.get("playQueueSelectedItemID");return e.set("isUpdatePending",!0),d.a.ajax(v).promise().then(function(t){return e.get("own")&&"shuffle"!==i&&"unshuffle"!==i&&g&&(g!==e.get("playQueueSelectedItemID")||g!==e.parseResponse(t).playQueueSelectedItemID)||e.set(e.parse(t)),e.get("playQueueItems").length?d.a.Deferred().resolve(e).promise():d.a.Deferred().reject().promise()}).always(function(){e.set("isUpdatePending",!1)})}function a(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.get("isLocal")?i(e):r(e,t)}t.a=a;var o=n(7),s=n.n(o),l=n(5),c=n.n(l),u=n(12),d=n.n(u),p=n(19)},function(e,t,n){"use strict";function i(e){var t=e.get("remotePlayer");return t?t.get("protocol")===r.a?o:s:a}t.a=i;var r=n(659),a=n(488),o=n(1777),s=n(1778)},function(e,t,n){"use strict";function i(e){return u[e]}function r(e){for(var t in u){if(e===u[t])return t}}n.d(t,"c",function(){return s}),n.d(t,"a",function(){return l}),
n.d(t,"b",function(){return c}),t.d=i,t.e=r;var a,o=n(214),s="video",l="music",c="photo",u=(a={},a[o.c]=s,a[o.a]=l,a[o.b]=c,a)},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"c",function(){return r}),n.d(t,"d",function(){return a}),n.d(t,"b",function(){return o}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return l});var i=5,r=10,a=30,o=5,s=600,l=600},function(e,t,n){"use strict";function i(e){return Object(r.createSelector)(Object(a.a)(),function(t){return t[e]})}
t.a=i;var r=n(6),a=(n.n(r),n(44))},function(e,t,n){"use strict";n.d(t,"g",function(){return i}),n.d(t,"a",function(){return r}),n.d(t,"f",function(){return a}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"d",function(){return c});var i="isScrolling",r="isActive",a="isFocused",o="isDisabled",s="isDragging",l="isDraggingBefore",c="isDraggingAfter"},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"j",function(){return r}),
n.d(t,"d",function(){return a}),n.d(t,"i",function(){return o}),n.d(t,"b",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"k",function(){return c}),n.d(t,"c",function(){return u}),n.d(t,"f",function(){return d}),n.d(t,"g",function(){return p}),n.d(t,"h",function(){return h});var i=8,r=9,a=13,o=16,s=17,l=27,c=38,u=40,d=91,p=93,h=224},function(e,t,n){"use strict";function i(e){if(e<=0||!a.a.isNumber(e))return"0:00"
;var t=s.a.duration(e),n=t.seconds(),i=t.minutes(),r=t.hours()+24*t.days(),o="";return o=n<10?":0"+n:":"+n,o=i<10&&r>0?"0"+i+o:i+o,r>0&&(o=r+":"+o),o}var r=n(5),a=n.n(r),o=n(41),s=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){return e?(0,a.a.find(u,function(t){var n=t[0];return e<=n})[1])(e):""}var r=n(5),a=n.n(r),o=n(1861),s=n(677),l=n(1862),c=n(1863),u=[[54e5,o.a],[864e5,s.a],[6048e5,l.a],[1/0,c.a]];t.a=i},function(e,t,n){"use strict";function i(e){return o.a.createElement(s.a,e)}
var r=n(1),a=(n.n(r),n(0)),o=n.n(a),s=n(1877),l=n(26);i.defaultProps={iconComponent:l.a},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=s()(e,["children","className"]);return u.a.createElement("p",a()({},i,{className:n}),t)}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2005),p=n.n(d);i.defaultProps={className:p.a.help},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?a.a.unix(e).format(t):""}Object.defineProperty(t,"__esModule",{value:!0});var r=n(41),a=n.n(r);t.default=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(29),b=n(54),I=n(420),S=n(2190),M=n(2191),D=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i))
;return r.onMouseEnter=function(e){r.props.showOnHover&&(r._isHovered=!0,r.setState({isOpen:!0}))},r.onMouseLeave=function(e){r.props.showOnHover&&(r._isHovered=!1,r.setState({isOpen:r._isFocused}))},r.onFocus=function(e){r.props.showOnFocus&&(r._isFocused=!0,r.setState({isOpen:!0}))},r.onBlur=function(e){r.props.showOnFocus&&(r._isFocused=!1,r.setState({isOpen:r._isHovered}))},r.onPress=function(e){r.props.hideOnPress&&(r._isHovered=!1,r._isFocused=!1,r.setState({isOpen:!1}))},r.state={
isOpen:!1},r._isHovered=!1,r._isFocused=!1,r._targetID=Object(b.a)(),r}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.id,n=e.children,i=e.component,a=e.tooltip,s=e.tooltipClassName,c=e.tooltipAttachment,u=e.tooltipTarget,d=e.tooltipOptions,p=(e.showOnHover,e.showOnFocus,e.hideOnPress,
e.onMouseEnter),h=e.onMouseLeave,f=e.onFocus,v=e.onBlur,g=e.onPress,y=l()(e,["id","children","component","tooltip","tooltipClassName","tooltipAttachment","tooltipTarget","tooltipOptions","showOnHover","showOnFocus","hideOnPress","onMouseEnter","onMouseLeave","onFocus","onBlur","onPress"]),b=this.state.isOpen;return m.a.createElement(i,r()({id:t||this._targetID,onMouseEnter:Object(I.a)(this.onMouseEnter,p),onMouseLeave:Object(I.a)(this.onMouseLeave,h),onFocus:Object(I.a)(this.onFocus,f),
onBlur:Object(I.a)(this.onBlur,v),onPress:Object(I.a)(this.onPress,g)},y),o()(M.a,{className:s,attachment:c,options:d,target:u||t||this._targetID,isOpen:!!a&&b},void 0,a),n)},t}(g.Component);D.defaultProps={component:S.a,showOnHover:!0,showOnFocus:!0,hideOnPress:!0},t.a=D},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.containerKey},function(e,t){return t.containerTitle},function(e,t){return t.metricsContext
},Object(a.a)(),o.a,s.a,Object(l.a)(),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments[4],a=arguments[5],o=arguments[6];if(i.isFolder){var s=e.match(/(.*?)\/folder/)[1],l={folderKey:o,folderTitle:i.title,parentFolderKey:e,parentFolderTitle:t};return n&&(l.context=n),Object(c.a)(r,a,s,l,i.type)}var d={};return n&&(d.context=n),Object(u.a)(r,a,o,d,i.type)})}t.a=i;var r=n(6),a=(n.n(r),n(21)),o=n(48),s=n(37),l=n(2202),c=n(122),u=n(134)},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.title,r=e.route;return i?r?a()(l.a,{className:t,"data-qa-id":"metadataTitleLink",tabIndex:n,title:i,to:r},void 0,i):a()("span",{className:t,title:i},void 0,i):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(22));t.a=i},function(e,t,n){"use strict";function i(e){if(e){var t=e.split("?"),n=t[1];return n?d.a.parseQueryString(n):void 0}}function r(e){if("now"===e)return{};var t=e.match(/([-+]?\d+)([smhdwMy])/);if(t){
var n=t[1],i=t[2];if(n&&i){var r;return r={},r[v[i]]=parseInt(n,10),r}}else{var a=parseInt(e,10);if(c.a.isNumber(a))return a}return{}}function a(e,t){return!(!c.a.isObject(t)||!Object(p.a)(e,t))||e>=t}function o(e,t){return!(!c.a.isObject(t)||!Object(h.a)(e,t))||e<=t}function s(){return Object(u.createSelector)(function(e,t){return t.containerKey},Object(f.a)(),function(e,t){if(t&&t.Media){for(var n=i(e),s=c.a.sortBy(t.Media,"endsAt"),l=Date.now()/1e3,u=0,d=s.length;u<d;u++){var p=s[u];if(n){
var h=n["beginsAt>"],f=n["beginsAt<"],v=n["endsAt>"],g=n["endsAt<"];if(h){var m=r(h);if(o(p.beginsAt,m))continue}if(f){var y=r(f);if(a(p.beginsAt,y))continue}if(v){var b=r(v);if(o(p.endsAt,b))continue}if(g){var I=r(g);if(a(p.endsAt,I))continue}}if(p.endsAt>l)return p}return c.a.first(s)}})}t.a=s;var l=n(5),c=n.n(l),u=n(6),d=(n.n(u),n(58)),p=n(1041),h=n(1042),f=n(21),v={s:"seconds",m:"minutes",h:"hours",d:"days",w:"weeks",M:"months",y:"years"}},function(e,t,n){"use strict";function i(e){
if(null==e)return!1;var t=a.a.unix(e);return a()().isSame(t,"day")}t.a=i;var r=n(41),a=n.n(r)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(a.a,function(e,t){return t.searchResultEntityID},function(e,t){return e[t]})}t.a=i;var r=n(6),a=(n.n(r),n(2233))},function(e,t,n){"use strict";var i=n(4),r=n(275),a=["id","typeString"],o=Object(r.a)(a,[{id:0,typeString:"tag",title:function(){return Object(i.default)("Tag")}},{id:1,typeString:"genre",title:function(){
return Object(i.default)("Genre")}},{id:2,typeString:"collection",title:function(){return Object(i.default)("Collection")}},{id:3,typeString:"bookmark",title:function(){return Object(i.default)("Bookmark")}},{id:4,typeString:"director",title:function(){return Object(i.default)("Director")},isPerson:!0},{id:5,typeString:"writer",title:function(){return Object(i.default)("Writer")},isPerson:!0},{id:6,typeString:"actor",title:function(){return Object(i.default)("Actor")},isPerson:!0},{id:7,
typeString:"producer",title:function(){return Object(i.default)("Producer")},isPerson:!0},{id:8,typeString:"country",title:function(){return Object(i.default)("Country")}},{id:9,typeString:"chapter",title:function(){return Object(i.default)("Chapter")}},{id:10,typeString:"review",title:function(){return Object(i.default)("Review")}},{id:11,typeString:"label",title:function(){return Object(i.default)("Label")}},{id:42,typeString:"versionBackgroundProcessingTarget",title:function(){
return Object(i.default)("Version Background Processing Target")}},{id:200,typeString:"make",title:function(){return Object(i.default)("Make")}},{id:201,typeString:"model",title:function(){return Object(i.default)("Model")}},{id:202,typeString:"aperture",title:function(){return Object(i.default)("Aperture")}},{id:203,typeString:"exposure",title:function(){return Object(i.default)("Exposure")}},{id:204,typeString:"iso",title:function(){return Object(i.default)("ISO")}},{id:205,typeString:"lens",
title:function(){return Object(i.default)("Lens")}},{id:206,typeString:"device",title:function(){return Object(i.default)("Device")}},{id:207,typeString:"autotag",title:function(){return Object(i.default)("Autotag")}},{id:400,typeString:"place",title:function(){return Object(i.default)("Place")}},{id:300,typeString:"mood",title:function(){return Object(i.default)("Mood")}},{id:301,typeString:"bpm",title:function(){return Object(i.default)("BPM")}},{id:302,typeString:"composer",title:function(){
return Object(i.default)("Composer")}},{id:303,typeString:"featuring",title:function(){return Object(i.default)("Featuring")}},{id:304,typeString:"trackArtist",title:function(){return Object(i.default)("Track Artist")}},{id:305,typeString:"similarArtist",title:function(){return Object(i.default)("Similar Artist")}},{id:306,typeString:"concert",title:function(){return Object(i.default)("Concert")}}]);t.a=o},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.selectedClassName,i=e.circleClassName,r=e.iconClassName,o=e.title,l=e.isSelected,u=c()(e,["className","selectedClassName","circleClassName","iconClassName","title","isSelected"]);return p.a.createElement(h.a,a()({className:(t||"")+" "+(l&&n||""||""),"aria-label":l?Object(f.default)("Deselect {title}",{title:o}):Object(f.default)("Select {title}",{title:o})},u),s()("div",{className:i,"data-qa-id":"multipleSelectButton"},void 0,s()(v.a,{name:"plex-icon-selected-560",
className:r})))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(22),f=n(4),v=n(26),g=n(2274),m=n.n(g);i.defaultProps={className:m.a.selectButton,selectedClassName:m.a.isSelected,circleClassName:m.a.selectCircle,iconClassName:m.a.selectedIcon},t.a=i},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=n(4),c=n(19),u=n(166),d=n(500),p=n(2287),h=n(989),f=n(2289),v=n(245),g=s.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"),r.a.each(e,function(e){t.filter("."+e+"-group").addClass("has-error")}),this.trigger(e.length?"invalid":"valid")},createMenuOptions:function(e,t){return r.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})):o.a.Deferred().reject().promise()},populateScanners:function(){var e=this.getSectionType();return e?(this.model.scanners||(this.model.scanners=new p.a([],{server:this.model.server,sectionTypeID:e.typeID})),this.model.scanners.populate().then(function(e){return e})):o.a.Deferred().reject().promise()},populateAgentsProxy:function(){var e=this.getSectionType().exclusiveAgents,t=new h.a(this.model.agents,e,this.model.get("agent"))
;return this.model.agentsProxy=t,o.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,o.a.Deferred().resolve(t).promise()},populateSectionSettings:function(){var e=this;if(!this.model.server.supports("sectionSettings"))return o.a.Deferred().resolve().promise();if(!this.model.settings){var t=new v.a([],{server:this.model.server})
;if(this.model.isNew()){var n=this.getSectionType(),i=this.model.server.hasOwnerFeature("photo_autotags");"photos"===n.key&&i&&this.model.set("enableAutoPhotoTags",!0);var r={type:n.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(){
return!(!e.model.isNew()||"music"!==e.model.get("type")||!e.model.server.supports("premiumMusic")||e.model.settings.findWhere({id:"importFromiTunes"})||!e.model.server.get("desktop").get("settings").findWhere({id:"iTunesLibraryXmlPath"}))&&e.model.settings.unshift({type:"bool",id:"importFromiTunes",value:!1,label:Object(l.default)("Import from iTunes"),
summary:Object(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 v.a([],{server:this.model.server,url:c.join(["/:/plugins/",this.model.get("agent"),"/prefs"])});this.model.agentSettings=e}return this.model.agentSettings.populate()},
onModalClose:function(){this.model.scanners=null,this.model.scannersProxy=null,this.model.agents=null,this.model.agentsProxy=null,this.model.settings=null}});t.a=g},function(e,t,n){"use strict";var i=n(2322),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(15),u=n(4),d=n(17),p=n(67),h=n(32),f=n(1071),v=n(611),g=n(2325),m=n(70),y=n(2329),b=n(2334),I=n(2336),S=n(2338),M=n(2344),D=n(2347),C=n(247),O=m.a.extend({name:"editFriendModal",className:"edit-friend-modal modal modal-lg fade",template:r.a,
panes:{username:b.a,general:I.a,ownedServer:S.a,sharedServer:M.a,restrictions:D.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:o.a.extend({"submit #share-server-form":"onSubmit"},m.a.prototype.events),initialize:function(e){m.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.d("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 v.a({admin:!1},{server:t.get("user").server})},initModel:function(e){var t=c.d("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.d("appModel"),n=t.get("servers"),i=t.get("user"),r=this.tempModel.get("serverOverviews");r||(r=new g.a([],{server:i.server,parent:this.tempModel}),
this.tempModel.set("serverOverviews",r));var a=n.filter(function(e){var t=!e.get("shared")&&!e.get("cloud"),n=e.get("isFullServer")||e.get("isCloudSyncServer");return e.id&&t&&n});o.a.each(a,function(e){r.add({machineIdentifier:e.id,name:e.get("friendlyName")}).populate()})},initServerShares:function(e){this.tempModel.get("serverShares").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,r;if("ownedServer"===e?(i=this.tempModel.get("serverOverviews"),r="serverOverview"):(i=this.tempModel.get("serverShares"),r="serverShare"),i.length){var a;this.defaultPaneID&&(a=i.findWhere({machineIdentifier:this.defaultPaneID})),a||(a=i.first()),t=a.id,n[r]=a}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],r=new i(o.a.extend({paneID:t,model:this.tempModel,homeUser:this.tempHomeUser,type:this.type,isAdmin:this.isAdmin},n));return this.listenTo(r,{"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=r,this.nav.currentView.selectItem(t),this.body.show(r),r},getSubmitBtn:function(){return this.currentPane&&"username"===this.currentPane.paneID?this.ui.nextBtn:this.ui.submitBtn},findExistingFriend:function(){
var e,t=c.d("appModel"),n=t.get("user"),i=n.get("desktop").get("friends"),r=this.tempModel.get("username");if(this.tempModel.get("restricted")?e=i.findWhere({restricted:!0,title:r}):(e=i.findWhere({username:r}))||(e=i.findWhere({email:r})),e){var a=this.tempModel.get("serverOverviews");this.model=e,this.tempModel=e.cloneDeep(),this.tempModel.set("serverOverviews",a),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(),n=[];n.push(this.sendFriendInvite()),n.push(this.sendHomeInvite());var i=l.a.when.apply(l.a,n);return i=i.then(o.a.bind(function(){return Array.prototype.push.apply(n,this.sendServerShareInvites()),this.tempModel.isNew()||n.push(this.tempModel.save({},{parse:!1})),this.tempHomeUser&&!e&&n.push(this.tempHomeUser.save()),l.a.when.apply(l.a,n)},this)),i.done(o.a.bind(function(){
var e=c.d("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)),i.fail(o.a.bind(function(n){var i=p.a.parseXML(n.responseText),r=i&&i.status
;o.a.isString(r)||(r=e?Object(u.default)("This user could not be added to your home."):t?Object(u.default)("An invite could not be sent to this user."):Object(u.default)("Your changes could not be saved.")),d.a.trigger("show:alert",{type:"error",message:r})},this)),i},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(o.a.bind(function(){if(this.tempHomeUser.get("restricted")){this.tempModel.set("id",this.tempHomeUser.id);c.d("appModel").get("user").set("home",!0)}this.showHomeWarnings()},this)),e}},showHomeWarnings:function(){h.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"):[],r=o.a.union(n,i),a=[];return o.a.each(r,function(n){var i=e&&e.findWhere({machineIdentifier:n}),r=t&&t.findWhere({machineIdentifier:n}),o=i&&i.isActive();r&&r.isActive()?a.push(h.a.execute("shareServer",{user:this.tempModel,serverShare:r})):o&&a.push(i.destroy({wait:!0}))},this),a},onRender:function(){
m.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){h.a.execute("removeHomeUser",{homeUser:this.homeUser}).done(o.a.bind(this.hide,this))}},onFriendDestroy:function(){if(this.model){h.a.execute("removeFriend",{friend:this.model}).done(o.a.bind(this.hide,this))}},onServerShareDestroy:function(e){h.a.execute("removeServerShare",{serverShare:e}).done(o.a.bind(function(){
this.model.get("serverShares").remove(e.id),this.showNextPane("general")},this))},onGuestDisable:function(){var e=c.d("appModel");h.a.execute("toggleGuest",{user:e.get("user"),enable:!1}).done(o.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(o.a.bind(function(){
this.ui.submitBtn.removeClass("active")},this))}}});t.a=O},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return a()("div",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2415)),c=n.n(l);i.defaultProps={className:c.a.rightTitle},t.a=i},function(e,t,n){"use strict";function i(e,t,n){Object(v.d)("metrics").trackClick(l()({page:n,action:e},r(t)))}function r(e){return{context:I.h,selectionType:e.get("activeSelectionType"),
selectionCount:e.get("activeSelectionItems").length}}function a(e){return e.get("multiSelect").get("activeSelectionItems").map(function(e){return e.get("model").entityID()})}n.d(t,"r",function(){return k}),n.d(t,"s",function(){return _}),n.d(t,"e",function(){return R}),n.d(t,"g",function(){return z}),n.d(t,"f",function(){return U}),n.d(t,"o",function(){return F}),n.d(t,"i",function(){return Q}),n.d(t,"v",function(){return H}),n.d(t,"a",function(){return Y}),n.d(t,"h",function(){return W}),
n.d(t,"q",function(){return G}),n.d(t,"c",function(){return K}),n.d(t,"u",function(){return q}),n.d(t,"n",function(){return Z}),n.d(t,"l",function(){return X}),n.d(t,"d",function(){return J}),n.d(t,"t",function(){return $}),n.d(t,"j",function(){return ee}),n.d(t,"k",function(){return te}),n.d(t,"b",function(){return ne}),n.d(t,"p",function(){return ie}),n.d(t,"m",function(){return re})
;var o,s=n(7),l=n.n(s),c=n(13),u=n.n(c),d=n(5),p=n.n(d),h=n(12),f=n.n(h),v=n(15),g=n(4),m=n(17),y=n(858),b=n(73),I=n(114),S=n(78),M=n(498),D=n(32),C=n(36),O=n(976),j=n(978),P=n(974),w=n(975),T=n(499),E=n(980),x=n(502),N=n(60),A=n(246),L=n(139),k=Object(C.a)("multiSelect/selectItem"),_=Object(C.a)("multiSelect/selectModels"),R=Object(C.a)("multiSelect/deselectAllItems"),z=Object(C.a)("multiSelect/deselectModels"),U=Object(C.a)("multiSelect/deselectCollection"),B=Object(C.a)("multiSelect/selectRange"),V=Object(C.a)("multiSelect/deselectRange"),F=Object(C.a)("multiSelect/playSelectedItems"),Q=Object(C.a)("multiSelect/favoriteSelectedItems"),H=Object(C.a)("multiSelect/unfavoriteSelectedItems"),Y=Object(C.a)("multiSelect/addSelectedItemsToPlaylist"),W=(Object(C.a)("multiSelect/updateSelectedItemsPlayedStatus"),
Object(C.a)("multiSelect/editSelectedItems")),G=Object(C.a)("multiSelect/refreshSelectedItems"),K=Object(C.a)("multiSelect/analyzeSelectedItems"),q=Object(C.a)("multiSelect/syncMetadataItems"),Z=Object(C.a)("multiSelect/optimizeMetadataItems"),X=Object(C.a)("multiSelect/mergeSelectedItems"),J=Object(C.a)("multiSelect/deleteSelectedItems"),$=Object(C.a)("multiSelect/playSelectedItems",function(e){var t=e.options,n=void 0===t?{}:t,i=u()(e,["options"]);return l()({},i,{options:l()({},n,{shuffle:!0
})})}),ee=Object(C.a)("multiSelect/updateSelectedItemsPlayedStatus",function(e){return l()({},e,{played:!0})}),te=Object(C.a)("multiSelect/updateSelectedItemsPlayedStatus",function(e){return l()({},e,{played:!1})}),ne=Object(C.a)("multiSelect/queueSelectedItems",function(e){var t=e.options,n=void 0===t?{}:t,i=u()(e,["options"]);return l()({},i,{options:l()({},n,{next:!1})})}),ie=Object(C.a)("multiSelect/queueSelectedItems",function(e){var t=e.options,n=void 0===t?{}:t,i=u()(e,["options"])
;return l()({},i,{options:l()({},n,{next:!0})})}),re=(o={},o["multiSelect/selectItem"]=function(e,t,n){var i=t.type,r=t.model,a=t.collection,o=t.isRangeSelect,s=void 0!==o&&o,l=e.get("multiSelect"),c=l.get("activeSelectionType"),u=l.get("activeSelectionRange");if(!c||c===i){if(l.listenToCollection(a),!s||!u||u.collection!==a)return l.set("activeSelectionRange",{collection:a,startModel:r}),void n(_([{id:r.id,type:i,model:r}]));var d=u.startModel,p=u.endModel,h=a.indexOf(d),f=a.indexOf(r);if(p){
var v=a.indexOf(p);n(V({collection:a,range:{start:h,end:v}}))}l.set("activeSelectionRange",{collection:a,startModel:d,endModel:r}),n(B({type:i,collection:a,range:{start:h,end:f}}))}},o["multiSelect/selectModels"]=function(e,t){e.get("multiSelect").get("activeSelectionItems").add(t)},o["multiSelect/deselectAllItems"]=function(e){e.get("multiSelect").get("activeSelectionItems").reset()},o["multiSelect/deselectModels"]=function(e,t){e.get("multiSelect").get("activeSelectionItems").remove(t)},
o["multiSelect/deselectCollection"]=function(e,t,n){var i=e.get("multiSelect"),r=i.get("activeSelectionItems"),a=[];i.stopListening(t),t.each(function(e){r.get(e.id)&&a.push(e.id)}),a.length&&n(z(a))},o["multiSelect/selectRange"]=function(e,t,n){var i=t.type,r=t.collection,a=t.range,o=e.get("multiSelect"),s=o.get("activeSelectionItems"),l=[];y.a.each(a,function(e){var t=r.at(e);t&&!s.get(t.id)&&l.push({id:t.id,type:i,model:t})}),l.length&&n(_(l))},o["multiSelect/deselectRange"]=function(e,t,n){
var i=t.collection,r=t.range,a=e.get("multiSelect"),o=a.get("activeSelectionItems"),s=[];y.a.each(r,function(e){var t=i.at(e);t&&o.get(t.id)&&s.push(t.id)}),s.length&&n(z(s))},o["multiSelect/playSelectedItems"]=function(e,t,n){var i=e.get("multiSelect"),o=a(e);n(Object(N.m)(l()({},t,{metadataItemEntityIDs:o,metricsProperties:r(i)})))},o["multiSelect/queueSelectedItems"]=function(e,t,n){var i=e.get("multiSelect"),o=a(e);n(Object(N.h)(l()({},t,{metadataItemEntityIDs:o,metricsProperties:r(i)})))},
o["multiSelect/addSelectedItemsToPlaylist"]=function(e,t){var n=e.get("multiSelect"),r=n.get("activeSelectionItems").pluck("model"),a=new T.a({model:p.a.first(r),items:r});m.a.trigger("show:modal",a),i(b.b,n,t.metricsPage)},o["multiSelect/favoriteSelectedItems"]=function(e,t,n){var r=Object(S.h)(e,t),a=e.get("multiSelect"),o=a.get("activeSelectionItems").pluck("model"),s=f.a.Deferred().resolve().promise();o.forEach(function(e){s=s.then(function(){return Object(w.a)(r,e,{rating:M.a})})}),
s.fail(function(){n(Object(A.b)(Object(g.default)("There was an unexpected error favoriting an item.")))}),i(b.N,a,t.metricsPage)},o["multiSelect/unfavoriteSelectedItems"]=function(e,t,n){var r=Object(S.h)(e,t),a=e.get("multiSelect"),o=a.get("activeSelectionItems").pluck("model"),s=f.a.Deferred().resolve().promise();o.forEach(function(e){s=s.then(function(){return Object(w.a)(r,e,{rating:M.b})})}),s.fail(function(){
n(Object(A.b)(Object(g.default)("There was an unexpected error unfavoriting an item.")))}),i(b.N,a,t.metricsPage)},o["multiSelect/updateSelectedItemsPlayedStatus"]=function(e,t,n){var r=e.get("multiSelect"),a=r.get("activeSelectionItems").pluck("model"),o=f.a.Deferred().resolve().promise();a.forEach(function(n){o=o.then(function(){return Object(P.a)(e,l()({},t,{metadataItemEntityID:n.entityID()}))})}),o.fail(function(){
var e=t.played?Object(g.default)("There was an unexpected error marking an item played."):Object(g.default)("There was an unexpected error marking an item unplayed.");n(Object(A.b)(e))}),o.always(function(){var e={};a.forEach(function(t){var i=t.server.entityID();e[i]||(e[i]=!0,n(Object(L.b)({serverEntityID:i})))})}),i(t.played?b.B:b.A,r,t.metricsPage)},o["multiSelect/editSelectedItems"]=function(e,t){var n=e.get("multiSelect"),r=n.get("activeSelectionItems").pluck("model"),a=new E.a({items:r})
;m.a.trigger("show:modal",a),i(b.r,n,t.metricsPage)},o["multiSelect/refreshSelectedItems"]=function(e,t,n){var r=e.get("multiSelect"),a=r.get("activeSelectionItems").pluck("model"),o=f.a.Deferred().resolve().promise();a.forEach(function(e){o=o.then(function(){return Object(O.a)(e)})}),o.fail(function(){n(Object(A.b)(Object(g.default)("There was an unexpected error refreshing an item.")))}),i(b.P,r,t.metricsPage)},o["multiSelect/analyzeSelectedItems"]=function(e,t,n){
var r=e.get("multiSelect"),a=r.get("activeSelectionItems").pluck("model"),o=f.a.Deferred().resolve().promise();a.forEach(function(e){o=o.then(function(){return Object(j.a)(e)})}),o.fail(function(){n(Object(A.b)(Object(g.default)("There was an unexpected error analyzing an item.")))}),i(b.d,r,t.metricsPage)},o["multiSelect/syncMetadataItems"]=function(e,t){var n=e.get("multiSelect"),r=n.get("activeSelectionItems").pluck("model");D.a.execute("showSyncModal",{item:p.a.first(r),items:r}),
i(b.Y,n,t.metricsPage)},o["multiSelect/optimizeMetadataItems"]=function(e,t){var n=e.get("multiSelect"),r=n.get("activeSelectionItems").pluck("model"),a=new x.a({item:p.a.first(r),items:r});m.a.trigger("show:modal",a),i(b.E,n,t.metricsPage)},o["multiSelect/mergeSelectedItems"]=function(e,t){var n=e.get("multiSelect"),r=n.get("activeSelectionItems").pluck("model"),a=r[0],o=r.slice(1);D.a.execute("merge",{item:a,items:o}),i(b.C,n,t.metricsPage)},
o["multiSelect/deleteSelectedItems"]=function(e,t,n){var r=e.get("multiSelect"),a=r.get("activeSelectionItems").pluck("model"),o=f.a.Deferred().resolve().promise();a.forEach(function(e){o=o.then(function(){return e.destroy({wait:!0})})}),o.fail(function(e){var t=403===e.status?Object(g.default)("Ensure that media deletion is enabled for library content in your server settings."):Object(g.default)("There was an unexpected error deleting an item.");n(Object(A.b)(t))}),i(b.l,r,t.metricsPage)},o)
},function(e,t,n){"use strict";function i(e){if(!e)return"";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 i(e){var t=e.children,n=e.className;return a()("div",{className:n,"data-qa-id":"hubCellTitle"},void 0,t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2436)),c=n.n(l);i.defaultProps={className:c.a.hubCellTitle},t.a=i},function(e,t,n){"use strict";function i(e){
return e.get("ui").get("prePlayPage")}function r(e,t){var n=t.metadataItemEntityID;if(t.containerKeyPattern)return!1;var r=Object(f.h)(e,t),a=i(e),o=a.get("metadataItem");return!(!o||o.server!==r)&&(!n||o.entityID()===n)}function a(e,t,n){var r=i(e),a=r.get("siblingList"),o=r.get("descendantList"),s=r.get("relatedHubs");a&&n(Object(P.i)({metadataListEntityID:a.entityID()})),o&&n(Object(P.i)({metadataListEntityID:o.entityID()})),s&&n(A())}function o(e,t){
var n=Object(f.h)(e,t),r=i(e),a=r.get("metadataItem");if(a&&a.server===n){var o=t.activity.Context;if(o&&o.key===a.get("key")&&(null!=o.exists||null!=o.accessible)){var s=!o.exists||!o.accessible;r.set("isFileUnavailable",s),s&&setTimeout(function(){a.set("isPreFetched",!1)},0)}}}n.d(t,"d",function(){return w}),n.d(t,"c",function(){return T}),n.d(t,"e",function(){return E}),n.d(t,"g",function(){return x}),n.d(t,"a",function(){return N}),n.d(t,"b",function(){return A}),n.d(t,"f",function(){
return L}),n.d(t,"h",function(){return k})
;var s,l=n(7),c=n.n(l),u=n(15),d=n(19),p=n(949),h=n(130),f=n(104),v=n(140),g=n(77),m=n(98),y=n(212),b=n(175),I=n(36),S=n(105),M=n(90),D=n(954),C=n(113),O=n(282),j=n(139),P=n(137),w=Object(I.a)("INIT_PRE_PLAY_PAGE"),T=Object(I.a)("INIT_PRE_PLAY_DESCENDANT_LIST"),E=Object(I.a)("INIT_PRE_PLAY_SIBLING_LIST"),x=Object(I.a)("PRE_FETCH_PRE_PLAY_METADATA_ITEM"),N=Object(I.a)("FETCH_PRE_PLAY_METADATA_ITEM"),A=Object(I.a)("FETCH_PRE_PLAY_RELATED_HUBS"),L=Object(I.a)("MAKE_PRE_PLAY_VIDEO_DECISION"),k=Object(S.a)((s={},
s.INIT_PRE_PLAY_PAGE=function(e,t){var n=i(e),r=Object(f.h)(e,t),a=Object(f.e)(e,t),o=t.providerEntityID,s=t.metadataKey;if(o!==n.get("providerEntityID")||s!==n.get("metadataKey")){var l=new g.a({key:s},{server:r,provider:a}),c=d.join([s.replace(/(\/library)?\/metadata/,"/hubs/metadata"),"related"]),u=new y.default([],{server:r,provider:a,metadataItem:l,hubKey:c,count:12});u.reset(),u.abortPendingPopulate(),u.resetPopulatePromise(null),n.restoreDefaults({providerEntityID:o,metadataKey:s,
metadataItem:l,siblingKey:n.get("siblingKey"),siblingList:n.get("siblingList"),relatedHubs:u})}},s.INIT_PRE_PLAY_DESCENDANT_LIST=function(e,t){var n=i(e),r=Object(f.h)(e,t),a=Object(f.e)(e,t),o=Object(f.b)(e,t),s=t.providerEntityID,l=t.descendantKey;if(!l)return void n.set({descendantKey:l,descendantList:void 0});if(s!==n.get("providerEntityID")||l!==n.get("descendantKey")){var c=new m.default({containerKey:l},{server:r,provider:a,excludeAllLeaves:!0,
includeRelated:"album"===o.get("type")||"artist"===o.get("type")&&o.get("skipChildren")});n.set({descendantKey:l,descendantList:c})}},s.INIT_PRE_PLAY_SIBLING_LIST=function(e,t){var n=i(e),r=Object(f.h)(e,t),a=Object(f.e)(e,t),o=t.providerEntityID,s=t.siblingKey;if(!s)return void n.set({siblingKey:s,siblingList:void 0});if(o!==n.get("providerEntityID")||s!==n.get("siblingKey")){var l=new m.default({containerKey:s},{server:r,provider:a,excludeAllLeaves:!0});n.set({siblingKey:s,siblingList:l})}},
s.PRE_FETCH_PRE_PLAY_METADATA_ITEM=function(e,t){var n=Object(f.b)(e,t);Object(D.a)(n)},s.FETCH_PRE_PLAY_METADATA_ITEM=function(e){var t=i(e),n=t.get("metadataItem"),r=t.get("isMetadataItemPending");t.set("isMetadataItemPending",!0),Object(D.a)(n).done(function(){t.set({isMetadataItemPending:!1,isMetadataItemPopulated:!0,metadataItemError:null})}).fail(function(e,n){if(n.aborting)return void t.set("isMetadataItemPending",r);t.set({isMetadataItemPending:!1,metadataItemError:Object(v.a)(n)})})},
s.FETCH_PRE_PLAY_RELATED_HUBS=Object(M.a)({key:"relatedHubs",getModel:i}),s.MAKE_PRE_PLAY_VIDEO_DECISION=function(e){var t=i(e),n=t.get("metadataItem"),r=e.get("settings"),a=Object(u.d)("getDecisionOptions")(n),o=p.a.getMediaDecision(c()({item:n,transcodeServer:n.server,quality:h.a.getCurrentQuality(n,r)},a));t.set("decisionMediaItem",o.media)},s[C.c]=function(e,t){t.activity.type===b.a.LIBRARY_REFRESH_ITEMS&&o(e,t)},s[C.b]=function(e,t){t.activity.type===b.a.LIBRARY_REFRESH_ITEMS&&o(e,t)},
s[O.a]=function(e,t,n){r(e,t)&&a(e,t,n)},s[j.a]=function(e,t,n){var o=i(e),s=o.get("metadataItem");if(r(e,t))s.fetch({data:{skipRefresh:1},usePopulatedParams:!0}),a(e,t,n);else{var l=Object(f.h)(e,t),c=o.get("siblingList"),u=t.parentMetadataKey;s&&s.server===l&&c&&u&&s.get("parentKey")===u&&n(Object(P.i)({metadataListEntityID:c.entityID()}))}},s))},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(o.a,s.a,Object(l.a)(),Object(c.a)(),function(e,t){
var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{server:e,provider:t,librarySectionKey:arguments[3],Genre:n.Genre}})}var r=n(11),a=n(6),o=(n.n(a),n(48)),s=n(37),l=n(21),c=n(443),u=n(2486);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return u}),n.d(t,"c",function(){return d}),n.d(t,"b",function(){return p})
;var i,r=n(12),a=n.n(r),o=n(439),s=n(36),l=n(90),c=n(106),u=Object(s.a)("oauth/fetchOauthProviders"),d=Object(s.a)("oauth/unlinkOauthProvider"),p=(i={},i["oauth/fetchOauthProviders"]=Object(l.a)({key:"oauthProviders",getModel:function(e){return e.get("cloudServer").get("desktop")}}),i["oauth/unlinkOauthProvider"]=function(e,t,n){var i=e.get("cloudServer"),r=i.get("desktop").get("oauthProviders").findWhere(t);r.set("isUnlinking",!0);var s=i.populate().then(function(){
return a.a.ajax(i.getXHROptions(t.url,{type:"DELETE"}))});Object(o.a)(s,1e3).done(function(){r.set("unlinkError",null)}).fail(function(e){r.set("unlinkError",e)}).always(function(){n(Object(c.b)()),n(u()),r.set("isUnlinking",!1)})},i)},function(e,t,n){"use strict";n.d(t,"f",function(){return a}),n.d(t,"e",function(){return o}),n.d(t,"a",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"b",function(){return c}),n.d(t,"c",function(){return u})
;var i=n(36),r=n(82),a=Object(i.a)(r._11),o=Object(i.a)(r.V),s=Object(i.a)(r.h),l=Object(i.a)(r.P),c=Object(i.a)(r.s),u=Object(i.a)(r.z)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(o.a,function(e){return{selectedItemsCount:e.activeSelectionItems.length}})}function r(e,t){var n={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metricsPage:t.metricsPage};return{onDeselectAllPress:function(){e(s.e(n))}}}var a=n(6),o=(n.n(a),
n(88)),s=n(366),l=n(57),c=n(2678);t.a=Object(l.a)(i,r)(c.a)},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),Object(i.createSelector)(function(e){return e.ui.dvrSettingsUI},function(e){var t=e.dvrSetup.setupErrorMessages;return t.length?t[0].message:null}));t.a=r},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className;return a()(l.a,{className:n},void 0,t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(112)),c=n(2724),u=n.n(c);i.defaultProps={className:u.a.footer},
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.kind;return a()("span",{className:(t||"")+" "+(u.a.badge||"")+" "+(u.a[i]||"")+" "+(!n&&u.a.isHidden||""||""),"data-qa-id":"badgeElement"},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(65)),c=n(2737),u=n.n(c);i.defaultProps={kind:l.DEFAULT},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.ui.libraryPage.details;return t?t.types:void 0}t.a=i},function(e,t,n){"use strict"
;n.d(t,"b",function(){return i}),n.d(t,"h",function(){return r}),n.d(t,"a",function(){return a}),n.d(t,"g",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"d",function(){return c}),n.d(t,"f",function(){return u});var i="=",r="!=",a="==",o="!==",s=">>=",l="<<=",c=">>=-",u="<<=-",d=[i,r,a,o,">=","<=",s,l,c,u];t.i=d},function(e,t,n){"use strict";function i(e){return o.a.createElement(s.a,e)}var r=n(1),a=(n.n(r),n(0)),o=n.n(a),s=n(376),l=n(2805),c=n.n(l)
;i.defaultProps={className:c.a.badge},t.a=i},function(e,t,n){"use strict";function i(){return Object(h.createSelector)(Object(f.a)(),function(e){return{serviceAuthUrl:e}})}function r(e){var t=e.component,n=e.serviceAuthUrl,i=l()(e,["component","serviceAuthUrl"]);return d.a.createElement(t,o()({to:n},i))}var a=n(7),o=n.n(a),s=n(13),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(11),h=n(6),f=(n.n(h),n(3061));t.a=Object(p.b)(i,{})(r)},function(e,t,n){var i=n(14)
;e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){var i,r,a="";return a+=' <h2 class="text-muted">',(r=n.subtitle)?i=r.call(e,{hash:{},data:t}):(r=e&&e.subtitle,i=typeof r===u?r.call(e,{hash:{},data:t}):r),(i||0===i)&&(a+=i),a+="</h2> "}function o(e,t){var i,r,a="";return a+=" <p>",(r=n.message)?i=r.call(e,{hash:{},data:t}):(r=e&&e.message,i=typeof r===u?r.call(e,{hash:{},data:t}):r),(i||0===i)&&(a+=i),a+="</p> "}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
r=r||{};var s,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)?s=l.call(t,{hash:{},data:r}):(l=t&&t.title,s=typeof l===u?l.call(t,{hash:{},data:r}):l),(s||0===s)&&(c+=s),c+="</h1> ",s=n.if.call(t,t&&t.subtitle,{hash:{},inverse:d.noop,fn:d.program(1,a,r),data:r}),(s||0===s)&&(c+=s),c+=" ",s=n.if.call(t,t&&t.message,{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(s||0===s)&&(c+=s),c+=" </div> </div>"})
},function(e,t,n){"use strict";var i=n(20),r=i.a.Layout.extend({regions:{content:".content"}});t.a=r},function(e,t,n){"use strict";var i=n(381),r=n.n(i),a=n(3085),o=a.a.extend({className:"container",template:r.a});t.a=o},function(e,t,n){"use strict";var i=n(19),r=n(97),a=n(16),o=n(18),s=n(3147),l=n(3149),c=n(3153),u=o.a.extend({name:"LibraryDetailsModel",context:["server","provider","includeAdvanced","includeCollections"],responseType:function(){return Object(r.a)(this.server)},url:function(){
var e={includeDetails:1};return this.includeAdvanced&&(e.includeAdvanced=1),this.includeCollections&&(e.includeCollections=1),i.join(this.get("key"),e)},sessionAttrs:{key:a.a.string.isRequired},syncedAttrs:{librarySectionID:a.a.string},syncedRelations:{directories:{relationClass:s.a,rootPropertyName:"Directory"},types:{relationClass:l.a,rootPropertyName:"Type"},fieldTypes:{relationClass:c.a,rootPropertyName:"FieldType"}}});t.a=u},function(e,t,n){"use strict";function i(e,t){
var n=e.get("user"),i=t.authToken;return s.a.ajax(n.server.getXHROptions("/api/v2/user",{headers:{"X-Plex-Token":i}})).then(function(e){return n.signIn(e,{})})}function r(e,t,n){var i=t.authToken,r=Object(h.j)(e,t),a=Object(I.a)(e);a.set({errorMessage:null,isBusy:!0});var o=Object(d.d)("metrics");return Object(m.a)(e,r,i,function(){n(Object(f.d)({machineIdentifier:r.id,metricsProperties:{context:u.k}}))}).done(function(){o.trackEvent({event:S.CLAIM_SERVER,interaction:!0})}).fail(function(){
o.trackEvent({event:S.CLAIM_SERVER_FAILURE,interaction:!1}),a.set({errorMessage:Object(l.default)("There was a problem claiming this server."),isBusy:!1})})}n.d(t,"a",function(){return M}),n.d(t,"d",function(){return D}),n.d(t,"e",function(){return C}),n.d(t,"c",function(){return O}),n.d(t,"b",function(){return j});var a,o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(114),d=n(15),p=n(36),h=n(78),f=n(240),v=n(1207),g=n(1208),m=n(3454),y=n(3456),b=n(1204),I=n(479),S={CLAIM_SERVER:"client:claimServer",
CLAIM_SERVER_FAILURE:"client:claimServerFailure"},M=Object(p.a)("server/claim/claimServer"),D=Object(p.a)("server/claim/signInThenClaimServer"),C=Object(p.a)("server/claim/signOutServer"),O=Object(p.a)("server/claim/createPIN"),j=(a={},a["server/claim/claimServer"]=function(e,t,n){r(e,t,n).then(function(){Object(I.a)(e).set({errorMessage:null,isBusy:!1})})},a["server/claim/signInThenClaimServer"]=function(e,t,n){i(e,t).then(function(){return r(e,t,n)}).then(function(){Object(I.a)(e).set({
errorMessage:null,isBusy:!1})}).fail(function(t){var n=Object(v.a)(t);c.a.trigger("show:alert",{message:Object(g.a)(n)}),Object(I.a)(e).set({errorMessage:Object(l.default)("There was a problem claiming this server."),isBusy:!1})})},a["server/claim/signOutServer"]=function(e,t,n){var i=Object(h.j)(e,t),r=i.get("desktop").get("cloudAccount"),a=Object(I.a)(e);a.set({errorMessage:null,isBusy:!0}),Object(y.a)(r).done(function(){a.set({errorMessage:null,isBusy:!1})}).fail(function(){a.set({
errorMessage:Object(l.default)("There was a problem signing the server out."),isBusy:!1})})},a["server/claim/createPIN"]=function(e,t,n){var i=Object(b.a)(e),r=Object(I.a)(e);i.then(function(e){r.set({pinID:e.id,code:e.code,isBusy:!0})}),i.fail(function(){r.set({fatalErrorMessage:Object(l.default)("An error occurred"),isBusy:!1})})},a)},,,,function(e,t,n){var i=n(270);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var i=n(823),r=n(588)
;e.exports=Object.keys||function(e){return i(e,r)}},function(e,t,n){"use strict";var i=n(239),r=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=r},function(e,t,n){"use strict";function i(e){if(!e||"object"!==(void 0===e?"undefined":s()(e)))return!1;var t="function"==typeof e.constructor?a()(e):Object.prototype
;if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&l(n)===c}t.a=i;var r=n(1402),a=n.n(r),o=n(273),s=n.n(o),l=function(e){return Function.prototype.toString.call(e)},c=l(Object)},function(e,t,n){"use strict";function i(e){var t=o.a.get("video").id,n=Object(s.a)(e,{streamType:t});return a.a.first(n)}var r=n(5),a=n.n(r),o=n(129),s=n(243);t.a=i},function(e,t,n){"use strict"
;var i=n(1450),r=n.n(i),a=n(5),o=n.n(a),s=n(15),l=n(99),c=n(52),u=n(213),d=n(70),p=d.a.extend({name:"libraryFailureModal",className:"confirm-modal modal modal-sm fade",template:r.a,events:o.a.extend({"click .confirm-btn":"hide"},d.a.prototype.events),serializeData:function(){var e=Object(s.d)("appModel"),t=e.get("user"),n=t.get("features").get(c.i),i=n?Object(u.a)(this.model.id,"settings","general"):"#!/settings/server/"+encodeURIComponent(this.model.id);return{
isSignedIn:this.model.get("myPlexSigninState")===l.b,hasPlexPass:this.model.get("myPlexSubscription"),serverSettingsRoute:i}}});t.a=p},function(e,t,n){"use strict";function i(e,t){if(Object(r.a)(null!=t,"No `minVersion` supplied to `isVersionOrNewer`. Have you misspelled a constant?"),!e)return!0;for(var n=t.split("."),i=e.split("."),a=0,o=n.length;a<o;a++)if(a<i.length){var s=parseInt(n[a],10),l=parseInt(i[a],10);if(s<l)return!0;if(s>l)return!1}return!0}t.a=i;var r=n(33)},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=n(5),r=n.n(i),a=n(19),o=n(166),s=n(1453),l=n(28),c=n(43),u=n(40),d=n(16),p=n(18),h=n(242),f=n(1454),v=n(860),g=n(1455),m=n(1456),y=n(861),b=n(862),I=n(1458),S=n(398),M=n(327),D=n(621),C=n(863),O=n(1460),j=n(245),P=p.a.extend({name:"SectionModel",
context:["server"],entityType:c.c,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(u.a)(this.entityType,e.key,this.server.entityID())},idAttribute:"key",rootPropertyName:"Directory",cache:new h.a,persistInCache:!0,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.key)},url:function(){
return this.isNew()?r.a.result(this,"urlRoot")||r.a.result(this.collection,"url"):r.a.isNaN(parseInt(this.id,10))?this.id:"/library/sections/"+this.id},sessionAttrs:{isSection:d.a.boolean,currentFilters:d.a.array,currentFolderKey:d.a.string,settings:d.a.instanceOf(j.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}},derivedAttrs:{serverEntityID:function(){return this.state?this.server.entityID():""}},syncedRelations:{locations:function(){return{relationClass:O.a,rootPropertyName:"Location",options:{section:this},save:!0}}},
sessionRelations:{items:function(){return{relationClass:f.a,options:{section:this}}},currentSubset:function(){return{relationClass:v.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:m.a,options:{section:this}}},subsets:function(){return{relationClass:g.a,options:{section:this}}},
filters:function(){return{relationClass:this.get("allowAdvancedFilters")?b.a:I.a,options:{section:this}}},sorts:function(){return{relationClass:S.a,options:{section:this}}},firstCharacters:function(){return{relationClass:D.a,options:{section:this}}}},defaults:function(){var e=this;return{isSection:!0,currentType:null,currentFilters:[],currentSort:null,currentFirstCharacter:null,currentFolderKey:null,currentSubset:s.a.get("all"),settings:new j.a([],{server:this.server,url:function(){
return a.join(["/library/sections/",e.get("key"),"/prefs"])}})}},initialize:function(e){this.updateMediaTypes(this,e.type),this.set({currentType:this.get("types").findWhere({typeString:e.type})}),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 o.a.get(e)
},getSaveParams:function(e){var t=p.a.prototype.getSaveParams.apply(this,arguments);if("type"in t){var n=o.a.get(t.type);n&&(t.type=n.typeString)}return"title"in t&&(t.name=t.title,delete t.title),r.a.isObject(t.type)&&(t.type=t.type.typeString),"Location"in t&&(t.location=r.a.pluck(t.Location,"path"),delete t.Location),t},getSyncTitle:function(e){var t=this.get("title"),n=[],i=this.get("currentSubset"),a=this.get("currentFilters");return e?(r.a.each(e,function(e){n.push(e.get("title"))}),
t+": "+n.join(", ")):"all"!==i.id?t+": "+i.get("title"):a.length?(r.a.each(a,function(e){n.push(e.titles.join(", "))}),t+": "+n.join(",")):t},setAgentAndScanner:function(e,t,n,i){var r=e.defaultAgent,a=e.defaultScanner;if(i){var o=e.exclusiveAgents,s=e.exclusiveScanners,l=t.hasExclusiveAgent(o),c=n.hasExclusiveScanner(s);l&&(r=o[0]),c&&(a=s[0])}this.set({agent:r,scanner:a})},updateMediaTypes:function(e,t){var n=Object(l.s)(t);this.get("types").reset(n)}});t.a=P},function(e,t,n){"use strict"
;var i=n(5),r=n.n(i),a=n(19),o=n(23),s=n(327),l=o.a.extend({name:"SortCollection",context:["server","section","typeID"],model:s.a,url:function(){var e=r.a.result(this.section,"url"),t=this.typeID||this.section.get("currentType").id,n=t?{type:t}:{};return a.join([e,"/sorts"],n)}});t.a=l},function(e,t,n){"use strict";function i(e){var t=e.seasonIndex,n=e.episodeIndex;if((n>0||0===n)&&t<1e3){e.noLeadingZero||(t=Object(s.a)(t),n=Object(s.a)(n));var i=e.separator;if(e.useLongName){
var r=Object(o.default)("Season {seasonNumber}",{seasonNumber:t}),l=Object(o.default)("Episode {episodeNumber}",{episodeNumber:n});return""+r+(i||" ")+l}var c=Object(o.default)("S{seasonNumber}",{seasonNumber:t}),u=Object(o.default)("E{episodeNumber}",{episodeNumber:n});return""+c+(i||"")+u}if(e.date){var d=a()(e.date);return Object(o.default)("{monthNumber}/{dayNumber}/{shortYear}",{monthNumber:d.month()+1,dayNumber:d.date(),shortYear:d.format("YY")})}return""}
var r=n(41),a=n.n(r),o=n(4),s=n(623);t.a=i},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(70),l=s.a.extend({className:"select-modal modal modal-sm fade",events:r.a.extend({"click a":"onClick"},s.a.prototype.events),initialize:function(){s.a.prototype.initialize.apply(this,arguments),this.promise=o.a.Deferred()},onRender:function(){s.a.prototype.onRender.apply(this,arguments)},onHide:function(e){s.a.prototype.onHide.apply(this,arguments),this.promise.reject()},
onClick:function(e){e.preventDefault(),this.promise.resolve(o()(e.currentTarget).data("value")),this.hide()}});t.a=l},function(e,t,n){"use strict";var i,r,a=n(59),o=n(242),s=n(16),l=n(18),c=n(1524),u=n(1525),d=n(1526),p=n(1527),h=l.a.extend({name:"VersionGeneratorModel",context:["server","section","playlistID"],rootPropertyName:"Item",cache:new o.a,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.id)},urlRoot:function(){
return"/playlists/"+(this.playlistID||this.parent.id)+"/items"},syncedAttrs:{id:s.a.integer,clientIdentifier:s.a.string,contentType:s.a.string,composite:s.a.string,type:{type:s.a.integer,save:!0},title:{type:s.a.string,save:!0},target:{type:s.a.string,save:!0},targetTagID:{type:s.a.integer,save:!0},locationID:{type:s.a.integer,save:!0},Location:{type:s.a.object,save:!0},Device:{type:s.a.object,save:!0}},sessionRelations:{children:{relationClass:p.a,options:function(){return{generator:this}}}},
syncedRelations:{status:{relationClass:c.a,rootPropertyName:"Status"},policy:{relationClass:u.a,rootPropertyName:"Policy",save:!0},mediaSettings:{relationClass:d.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:(i={},i[a.d]=5,i[a.a]=50,i[a.c]=50,i),warningCounts:(r={},
r[a.d]=10,r[a.a]=100,r[a.c]=100,r),getSaveParams:function(e,t){var n=l.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=h},function(e,t,n){var i=n(1533).default,r=n(152);e.exports=r(i)},function(e,t,n){"use strict";function i(e){return e>=100?Object(a.a)(e):Object(r.a)(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=n(871),a=n(1534);t.default=i},function(e,t,n){"use strict";var i=n(1546),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(15),u=n(62),d=n(70),p=n(1547),h=n(1553),f=n(1556),v=d.a.extend({name:"userSelectModal",
className:"user-select-modal modal modal-transparent fade",template:r.a,transparent:!0,panes:{users:p.a,pin:h.a},regions:{content:".modal-content",alertBar:".modal-alert"},initialize:function(e){d.a.prototype.initialize.apply(this,arguments);var t=c.d("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(o.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:o.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){if(u.a.has("continueUrl")&&!this.options.isEditing)return void(window.location=u.a.get("continueUrl"));this.promise.resolve(e),this.hide()},onReject:function(){this.promise.reject(),this.hide()}});t.a=v},function(e,t,n){"use strict";function i(e){return e?e.toUpperCase():""}t.a=i},,function(e,t,n){
var i=n(890),r="object"==typeof self&&self&&self.Object===Object&&self,a=i||r||Function("return this")();e.exports=a},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(457),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(5),f=n.n(h),v=n(12),g=n.n(v),m=n(1),y=(n.n(m),n(0)),b=n.n(y),I=n(19),S=n(332),M=n(83),D=n(1664),C=n(1665),O=n(877),j=n(29),P=n(339),w=(n(410),
n(926)),T=n(927),E=n(1753),x=new O.a,N="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",A=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.preloadImage=function(e){if(!r.props.allowImagePreloading)return g.a.Deferred().resolve(e).promise();var t=g.a.Deferred(),n=new window.Image,i=e.url,a=e.isPlaceholder;return n.onload=function(){n.onload=n.onabort=n.onerror=null,a?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()},r.onLoad=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url;r.setState({isLoaded:!0,src:t}),r.props.onLoad(r.state.url,t)},r.onError=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=e.isCanceled;void 0!==n&&n||(r.setState({isLoaded:!0,src:r.props.fallbackSrc}),r.props.onError(r.state.url,t))},r.state={isLoaded:!1,url:r.getImageUrl(n),src:N,prevSrc:N},r}
return p()(t,e),t.prototype.componentDidMount=function(){this.loadImage(this.props,this.state.url)},t.prototype.componentWillReceiveProps=function(e){var t=this.getImageUrl(e);if(this.state.url!==t){var n=this.state.src;this.setState({isLoaded:!1,url:t,prevSrc:n}),this.loadImage(e,t)}},t.prototype.shouldComponentUpdate=function(e,t){return Object(j.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=e.allowPixelRatioSize?Object(S.a)():1,n={width:Math.round(e.width*t),height:Math.round(e.height*t)};e.filters&&!e.useClientFilters&&o()(n,e.filters),e.minSize&&(n.minSize=1),e.format&&(n.format=e.format),e.quality&&(n.quality=e.quality),e.upscale&&(n.upscale=1);var i=f.a.result(e,"url"),r=i.indexOf("?"),a=i;return r>-1?(a=I.join(i.substring(0,r),n),a+=-1===a.indexOf("?")?"?":"&",
a+=i.substring(r+1)):a=I.join(a,n),a}},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.backgroundRepeat,o=e.width,s=e.height,l=e.style,c=e.useClientFilters,u=e.filters,d=e.className,p=this.state,h=p.src,v=p.url,g=l;if(c&&u){var m=[];if(f.a.isNumber(u.blur)&&m.push("blur("+u.blur+"px)"),f.a.isNumber(u.saturation)&&m.push("saturate("+u.saturation+"%)"),
f.a.isNumber(u.opacity)&&m.push("opacity("+u.opacity+"%)"),m.length){var y=m.join(" ");g=g?r()({},g,{filter:y}):{filter:y}}}var b={};return e.background&&(b={backgroundSize:n,backgroundPosition:i,backgroundRepeat:a}),r()({"data-image-url":t?v:void 0,src:h,style:g,className:d,width:o,height:s},b)},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:N})
;var n=e.src?this.preloadImage({url:t}):this.loadBlob({url:t});this._cancelable=Object(C.a)(e.loadedDelayMilliseconds?Object(D.a)(n,e.loadedDelayMilliseconds):n),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=g.a.Deferred(),r=x.getBlobUrl(n);if(r)return i.resolve({url:r}),i.promise();var a=x.getPlaceholder(n);a&&i.notify({url:a,isPlaceholder:!0})
;var o=new window.XMLHttpRequest;return o.open("GET",n,!0),o.responseType="arraybuffer",this._xhr=o,o.onreadystatechange=function(){if(4===o.readyState)if(o.onreadystatechange=null,t._xhr=null,200===o.status){var e=new window.Blob([o.response],{type:"image/jpeg"}),r=window.URL.createObjectURL(e);x.store({url:n,blobUrl:r}),i.resolve({url:r})}else i.reject({url:n})},o.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,i=e.transitionComponent,a=e.transitionProps,o=this.state,s=o.isLoaded,l=o.prevSrc,c=t?w.a:T.a,u=this.getImageProps();return n?b.a.createElement(i,r()({component:c,isLoaded:s,prevSrc:l,transitionProps:a},u)):b.a.createElement(c,r()({},u,{src:s?u.src:l}))},t}(y.Component);A.defaultProps={
fallbackSrc:N,exposeUrl:!1,transition:!1,transitionComponent:E.a,background:!1,minSize:!1,upscale:!1,transitionProps:r()({},P.a,{style:{position:"relative"}}),filters:{},useClientFilters:!1,allowImageBlobs:M.a.hasBlob&&M.a.hasObjectUrl,allowImagePreloading:!0,allowPixelRatioSize:!0,onLoad:function(){},onError:function(){}},t.a=A},function(e,t,n){"use strict";var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(1666),h=n.n(p),f=n(29),v=function(e){function t(){
return r()(this,t),o()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.render=function(){return d.a.createElement(h.a,this.props)},t}(u.Component);v.defaultProps={component:"div",transitionName:{appear:"appear",enter:"enter",leave:"leave"},transitionAppear:!0,transitionEnter:!0,transitionLeave:!0},t.a=v},,,,,function(e,t,n){"use strict";function i(e){
var t=e.metadataItemModel,n=e.listType,i=t.get("playlistType");if(i)return i;var r=t.get("subtype");if(r===u.b)return d.a;var o=t.get("type");return o===c.d?a(null,r):a(n,o)}function r(e){var t=e.metadataListModel,n=e.listType;return t.get("firstItemSubtype")===u.b?d.a:a(n,t.get("firstItemType"))}function a(e,t){var n=void 0;return e&&(n=c.q(e)),n||(n=c.q(t)),n&&n.mediaType}function o(e){var t=e.type,n=e.metadataType,o=e.metadataItemModel,s=e.metadataItemModels,c=e.metadataListModel
;return t||(n?a(n):o?i(e):s&&s.length?i(l()({},e,{metadataItemModel:s[0]})):c?r(e):void 0)}t.a=o;var s=n(7),l=n.n(s),c=n(28),u=n(143),d=n(59)},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"c",function(){return r}),n.d(t,"a",function(){return a});var i=0,r=1,a=2},function(e,t,n){"use strict";function i(e,t){var n=Object(C.a)(e),i=n.get("metadataItem");if(n.get("playQueueItemID")===t.playQueueItemID){var r={currentDecision:t,availableQualities:t.availableQualities,
qualityIndex:t.qualityIndex,mediaIndex:t.mediaIndex,partIndex:t.partIndex,positionSeconds:t.positionSeconds,durationSeconds:t.durationSeconds};null!=e.get("startMetadataItemEntityID")&&e.get("startMetadataItemEntityID")!==i.entityID()||(r.startMetadataItemEntityID=null,r.startOffsetMilliseconds=null,r.startMediaIndex=null),e.set(r)}}n.d(t,"a",function(){return P}),n.d(t,"b",function(){return w}),n.d(t,"d",function(){return T}),n.d(t,"e",function(){return E}),n.d(t,"c",function(){return x})
;var r,a=n(7),o=n.n(a),s=n(5),l=n.n(s),c=n(12),u=n.n(c),d=n(15),p=(n(33),n(283)),h=n(1794),f=n(59),v=n(953),g=n(130),m=n(34),y=n(78),b=n(171),I=n(36),S=n(664),M=n(489),D=n(1797),C=n(666),O=n(490),j=n(954),P=Object(I.a)("ui/player/playerDecision/makeDecision"),w=Object(I.a)("ui/player/playerDecision/makeNextDecision"),T=Object(I.a)("ui/player/playerDecision/removeDecision"),E=Object(I.a)("ui/player/playerDecision/retryDecision"),x=(r={},r["ui/player/playerDecision/makeDecision"]=function(e,t){
var n=t.playerType,r=t.playQueueItemEntityID,a=t.mediaIndex,s=t.partIndex,c=t.qualityIndex,m=t.transcodeSessionID,I=t.options,C=void 0===I?{}:I,P=Object(b.b)(e,n),w=y.f(e,{playQueueItemEntityID:r});if(w.get("type")!==f.c){var T=P.get("decisions"),E=T[r];if(E)return void i(P,E);var x=w.get("metadataItem"),N=null==a?Object(D.a)(P,x):a,A=x.get("Media")[N],L=Object(d.d)("getDecisionOptions")(x,c,A),k=u.a.extend(!0,{},L,C),_=void 0,R=[],z=g.a.ORIGINAL
;L.type===p.a.types.VIDEO&&(R=L.availableQualities,z=L.qualityIndex),Object(j.a)(x,{forceSyncCheckFiles:!0}).always(function(){var t=x.get("Media")[N],n=t&&t.Part[s];C.offset,h.a.getPlayerDecision(o()({playbackSessionID:S.a,transcodeSessionID:m,item:x,media:t,part:n,offset:Object(M.a)(P,x),fallbackServer:e.get("primaryServer")},k)).done(Object(O.a)(P,function(e){var t,n=e.transcodeServer,a=e.media,s=e.part,c=P.get("decisions"),u=x.get("Media"),d=a.Part,p=l.a.findIndex(u,function(e){
return null!=e.id?e.id===a.id:null==e.uuid||e.uuid===a.uuid}),h=l.a.findIndex(d,function(e){return null!=e.id?e.id===s.id:null==e.key||e.key===s.key});e.abr&&(z=g.a.CONVERT_AUTOMATICALLY),_={playQueueItemID:w.get("playQueueItemID"),availableQualities:R,qualityIndex:z,mediaIndex:p,partIndex:h,partCount:d.length,url:e.url,subtitlesUrl:e.subtitlesUrl,protocol:e.protocol,isDirectPlay:e.canDirectPlay,useSoftSubtitles:e.useSoftSubtitles,canDirectStreamVideo:e.canDirectStreamVideo,
canDirectStreamAudio:e.canDirectStreamAudio,canPlayOriginalQuality:e.canPlayOriginalQuality,positionSeconds:Math.floor(e.offset/1e3),durationSeconds:Math.floor((s.duration||0)/1e3),playbackSessionID:e.playbackSessionID},e.canDirectPlay||(_.transcodeSessionID=e.transcodeSessionID),_.transcodeServerEntityID=n&&n.entityID(),P.set("decisions",o()({},c,(t={},t[r]=_,t))),i(P,_)})).fail(Object(O.a)(P,function(e){x.set({isPreFetched:!1})
;var t=P.get("playQueue"),n=t.get("playQueueItems").at(t.get("currentIndex"));w.id===n.id&&P.set({isMediaLoading:!1,hasError:!0,errorMessage:Object(v.a)(e)})}))})}},r["ui/player/playerDecision/makeNextDecision"]=function(e,t,n){var i=t.playerType,r=Object(b.b)(e,i),a=r.get("playQueue"),o=a.get("playQueueItems"),s=a.get("currentIndex"),l=r.get("repeatOne")?s:s+1;if(r.get("repeatAll")&&l>o.length-1&&(l=0),l!==s&&l<o.length){var c=o.at(l).entityID();n(P({playerType:i,playQueueItemEntityID:c}))}},
r["ui/player/playerDecision/removeDecision"]=function(e,t){var n=t.playerType,i=t.playQueueItemEntityID,r=Object(b.b)(e,n);Object(m.a)(function(){var e,t=r.get("decisions"),n=r.get("currentDecision"),a={decisions:o()({},t,(e={},e[i]=null,e))};t[i]===n&&(a.currentDecision=null),r.set(a)})},r["ui/player/playerDecision/retryDecision"]=function(e,t,n){
var i=t.playerType,r=t.decisionOptions,a=Object(b.b)(e,i),s=a.get("playQueue"),l=s.get("playQueueItems"),c=a.get("currentDecision"),u=s.get("currentIndex"),d=l.at(u),p=d.entityID();c&&n(T({playerType:i,playQueueItemEntityID:p})),n(c?P({playerType:i,playQueueItemEntityID:p,mediaIndex:c.mediaIndex,partIndex:c.partIndex,qualityIndex:a.get("qualityIndex"),options:o()({offset:1e3*a.get("positionSeconds")},r)}):P({playerType:i,playQueueItemEntityID:p,qualityIndex:a.get("qualityIndex")}))},r)
},function(e,t,n){"use strict";function i(){return"pmp"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"desktop")}t.a=i},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 r}),n.d(t,"DOWN",function(){return a}),n.d(t,"LEFT",function(){return o}),n.d(t,"all",function(){return s});var i="up",r="right",a="down",o="left",s=[i,r,a,o]},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){try{e.focus()}catch(e){}}function r(){var e=document.activeElement;e&&e.blur()}function a(e){v=document.activeElement,g=e,r()}function o(e){Object(h.a)(g,"Call `startScopedFocus(element)` before `scopeTabEvent`");var t=Object(f.a)(g);if(t.length){e.preventDefault()
;var n=document.activeElement,r=n?t.indexOf(n):-1,a=t.length-1,o=void 0;-1===r?o=e.shiftKey?a:0:(o=e.shiftKey?r-1:r+1,o<0?o=a:o>a&&(o=0)),i(t[o])}}function s(){Object(h.a)(g,"Call `startScopedFocus(element)` before `scopeAutoFocus`");var e=Object(f.a)(g),t=d.a.find(e,function(e){return Object(p.a)(e.getAttribute("data-autofocus"))});t&&i(t)}function l(){g=null}function c(){v&&(i(v),v=null)}t.a=r,t.f=a,t.e=o,t.d=s,t.b=l,t.c=c;var u=n(5),d=n.n(u),p=n(602),h=n(33),f=n(1816),v=void 0,g=void 0
},function(e,t,n){"use strict";var i=n(239),r=new i.a({props:["capabilities","video","music","photo"]});t.a=r},function(e,t,n){"use strict";function i(e){if(o[e])return o[e];var t=Object(r.createSelector)(a.a,function(t){return t[e]});return o[e]=t,t}t.a=i;var r=n(6),a=(n.n(r),n(200)),o={}},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(6),o=(n.n(a),Object(a.createSelectorCreator)(a.defaultMemoize,r.a.isEqual));t.a=o},function(e,t,n){"use strict";function i(e,t){
var n=t.constructor.prototype.validate;return n?n(e):[]}function r(e){var t=this.panes[e],n=s.call(this,t);return 0===i.call(this,n,t).length}function a(e,t){var n=this.panes[t].dependentPanes;return"function"==typeof n&&(n=n.call(this)),e.concat(n||[])}function o(){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 s(e){return this[e.model]||this[this.panesModel]||this.model}var l=n(5),c=n.n(l),u={showPane:function(e){if(e!==this.selectedPane){var t=this.paneRegion.currentView;t&&(this.stopListening(t,"valid",o),this.stopListening(t,"invalid",o),this.$el.removeClass("pane-"+this.selectedPane),this.onPaneHide&&this.onPaneHide(this.selectedPane,t)),this.selectedPane=e
;var n=this.panes[e],i=n.constructor,r=this.paneConstructorArg?this.paneConstructorArg():{},a=new i(c.a.extend(r,{model:s.call(this,n)}));if(a.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([a,a.onModalClose]),this._paneOnModalCloseCallbacks=c.a.uniq(l,function(e){return e[1]})}
this.listenTo(a,"valid",o),this.listenTo(a,"invalid",o),o.call(this),this.onPaneShow&&this.onPaneShow(e,a),this.$el.addClass("pane-"+e),this.paneRegion.show(a),o.call(this)}},getReachablePanes:function(){for(var e,t,n=c.a.reduce(this.panes,function(e,t){var n=t.dependentPanes;return"function"==typeof n&&(n=n.call(this)),c.a.union(e,n||[])},[],this),i=c.a.filter(c.a.keys(this.panes),function(e){return!c.a.contains(n,e)}),o=i;o.length;)e=c.a.filter(o,r,this),t=t||e.length!==o.length,
o=c.a.reduce(e,a,[],this),i=i.concat(o);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";n.d(t,"a",function(){return a});var i,r=(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"},i.xx="Unknown",i.xn="None",i),a=["xx","xn"];t.b=r},function(e,t,n){"use strict";function i(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){var t,n=e.label,i=e.value;return t={},t[i]=n,t})}
function r(e){var t=e.id,n=e.type,r=e.label,a=e.summary,s=e.value,l=e.initialValueModifier,g=e.enumValues,m=e.min,y=e.max,b=e.step,I={name:t,helpText:a,initialValue:l(s)};if(Array.isArray(g))return c.a.createElement(d.a,o()({labelText:r},I,{values:i(g)}));switch(n){case u.b.TEXT:return c.a.createElement(p.a,o()({labelText:r},I));case u.b.BOOL:return c.a.createElement(f.a,o()({checkboxText:r},I));case u.b.INT:return c.a.createElement(h.a,o()({labelText:r},I));case u.b.DOUBLE:
return c.a.createElement(v.a,o()({labelText:r,min:m,max:y,stepSize:b},I));default:return null}}var a=n(7),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(857),d=n(428),p=n(503),h=n(2008),f=n(504),v=n(997);r.defaultProps={initialValueModifier:function(e){return e}},t.a=r},function(e,t,n){"use strict";function i(e){var t=e.name,n=e.labelText,i=e.helpText,r=e.showErrors,o=e.errors,l=c()(e,["name","labelText","helpText","showErrors","errors"]);return s()(f.a,{},void 0,s()(v.a,{showErrors:r,errors:o,
name:t,labelText:n}),p.a.createElement(m.a,a()({name:t,hasError:r},l)),i&&s()(g.a,{},void 0,i))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(146),f=n(181),v=n(429),g=n(353),m=n(225);t.a=Object(h.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.name,i=e.labelText,r=e.showErrors,o=e.errors,s=o[0];return a()(l.a,{className:t,hasError:r,name:n},void 0,i,r&&s&&" \u2014 "+s)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(133))
;t.a=i},function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){function i(e,t){return o(a(e,t,r),e+"")}var r=n(1011),a=n(2122),o=n(2124);e.exports=i},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e){return new o.default(e)}t.__esModule=!0,t.default=r;var a=n(2166),o=i(a),s=n(2187),l=i(s),c=n(705),u=function(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}(c);t.NativeTypes=u,t.getEmptyImage=l.default},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.metricsContext},o.a,s.a,Object(l.a)(),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={};return e&&(r.context=e),{parentTitle:i.parentTitle,parentRoute:Object(c.a)(t,n,i.parentKey,r)}})}var r=n(6),a=(n.n(r),
n(57)),o=n(48),s=n(37),l=n(21),c=n(134),u=n(2204);t.a=Object(a.a)(i)(u.a)},function(e,t,n){"use strict";function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.includeMinuteZero,r=void 0===i||i,o=n.timeFormat,s=void 0===o?"h:mma":o,l=n.separator,c=void 0===l?"-":l,u=a.a.unix(e),d=a.a.unix(t),p=u.format("a")===d.format("a"),h=u.minutes(),f=d.minutes(),v=s,g=s;return r||0!==h||(v=v.replace("h:mm","h")),p&&(v=v.replace("a","")),r||0!==f||(g=g.replace("h:mm","h")),
""+u.format(v)+c+d.format(g)}var r=n(41),a=n.n(r);t.a=i},function(e,t,n){"use strict";function i(e,t){return Object(p.createSelector)(h.a,Object(f.a)(),function(e,t){return t.hideUnrated},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],i=e.features[g.b.RATE],r=i&&!t.isFolder,a=(t.userRating||0)/2,o=n&&0===a;return{showRating:!(!r||o),value:a}})}function r(e,t){return{onRatingChange:function(n){e(Object(v.rateMetadataItem)({
metadataItemEntityID:t.metadataItemEntityID,providerEntityID:t.providerEntityID,rating:0===n?-1:2*n,metricsPage:t.metricsPage}))}}}function a(e){var t=e.showRating,n=s()(e,["showRating"]);return t?d.a.createElement(y.a,n):null}var o=n(13),s=n.n(o),l=n(1),c=n.n(l),u=n(0),d=n.n(u),p=n(6),h=(n.n(p),n(37)),f=n(21),v=n(120),g=n(76),m=n(57),y=n(2244),b=Object(m.a)(i,r)(a);b.propTypes={hideUnrated:c.a.bool},t.a=b},function(e,t,n){"use strict";function i(e){var t=function(t){function n(e,i){u()(this,n)
;var r=p()(this,t.call(this,e,i));return r.onKeyDown=function(e){var t=r.state.pressedModifierKeys;S[e.which]&&-1===t.indexOf(e.which)&&r.setState({pressedModifierKeys:t.concat(e.which)})},r.onKeyUp=function(e){var t=r.state.pressedModifierKeys,n=t.indexOf(e.which);n>-1&&r.setState({pressedModifierKeys:t.slice(0,n).concat(t.slice(n+1))})},r.onMouseDown=function(e){r._isMouseDown=!0},r.onMouseUp=function(e){r._isMouseDown=!1},r.onFocusChange=function(e){
r.state.pressedModifierKeys.length&&r.setState({pressedModifierKeys:[]}),r._isMouseDown=!1},r.onMouseEnter=function(e){var t=r.props,n=t.selectionType,i=t.activeSelectionType;r._isMouseDown&&i&&i===n&&r.onSelectPress(e)},r.onSelectPress=function(e){var t=r.props,n=t.selectionID,i=t.selectionType,a=t.isSelected,o=t.onSelectItem;a||o({id:n,type:i,isRangeSelect:e.shiftKey})},r.onDeselectPress=function(e){var t=r.props,n=t.selectionID,i=t.isSelected,a=t.onDeselectItem;i&&a({id:n})},r.state={
pressedModifierKeys:[]},r}return f()(n,t),n.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)},
n.prototype.shouldComponentUpdate=function(e,t){return Object(b.a)(this,e,t)},n.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)},n.prototype.render=function(){var t=this.props,n=t.selectionType,i=t.activeSelectionType,r=t.isSelected,a=l()(t,["selectionType","activeSelectionType","isSelected"]),s=this.state.pressedModifierKeys,c=!!i;return m.a.createElement(e,o()({hasActiveSelection:c,isSelected:r,isOtherItemSelected:c&&!r,isConflictingTypeSelected:c&&i!==n,isModifierKeyPressed:s.length>0,onMouseEnter:this.onMouseEnter,onSelectPress:this.onSelectPress,
onDeselectPress:this.onDeselectPress},a))},n}(g.Component);return t.displayName="Selectable("+Object(I.a)(e)+")",t.WrappedComponent=e,t.defaultProps={disableSelection:!1},t}var r,a=n(7),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(349),b=n(29),I=n(153),S=(r={},r[y.i]=!0,r[y.b]=!0,r[y.f]=!0,r[y.g]=!0,r[y.h]=!0,r);t.a=i},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(4),b=n(54),I=n(26),S=n(22),M=n(684),D=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r.onActionsPress=function(e){r.props.onMenuOpenChange(!r.props.isMenuOpen)},r.onActionsMenuClose=function(){r.props.onMenuOpenChange(!1)},r._moreButtonID=Object(b.a)(),r}return f()(t,e),t.prototype.render=function(){
var e=this.props,t=e["data-qa-id"],n=e.className,i=e.iconClassName,a=e.tabIndex,s=e.serverEntityID,c=e.providerEntityID,u=e.metadataItemEntityID,d=e.containerKey,p=e.listType,h=e.isMenuOpen,f=(e.onMenuOpenChange,l()(e,["data-qa-id","className","iconClassName","tabIndex","serverEntityID","providerEntityID","metadataItemEntityID","containerKey","listType","isMenuOpen","onMenuOpenChange"]));return o()(S.a,{"data-qa-id":t,id:this._moreButtonID,className:n,tabIndex:a,
"aria-label":Object(y.default)("More Actions"),"aria-haspopup":!0,onPress:this.onActionsPress},void 0,o()(I.a,{clasName:i,name:"plex-icon-more-560"}),m.a.createElement(M.a,r()({serverEntityID:s,providerEntityID:c,metadataItemEntityID:u,containerKey:d,listType:p,target:this._moreButtonID,isOpen:h,onMenuClose:this.onActionsMenuClose},f)))},t}(g.Component);t.a=D},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.type;return Object(l.u)(n)?a()(c.a,{className:t,
name:"plex-icon-dvr-series-560"}):a()(c.a,{className:t,name:"plex-icon-dvr-single-560"})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(28)),c=n(26);t.a=i},function(e,t,n){"use strict";function i(e,t){function n(){var e=(new Date).getTime(),t=Math.max(r-e,0);setTimeout(o,t)}var i=a.a.Deferred(),r=(new Date).getTime()+t,o=void 0;return e.then(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o=function(){return i.resolve.apply(i,t)}},function(){
for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o=function(){return i.reject.apply(i,t)}}),e.then(n,n),i.promise()}var r=n(12),a=n.n(r);t.a=i},function(e,t,n){"use strict";n.d(t,"d",function(){return I}),n.d(t,"i",function(){return S}),n.d(t,"h",function(){return M}),n.d(t,"j",function(){return D}),n.d(t,"b",function(){return C}),n.d(t,"e",function(){return O}),n.d(t,"a",function(){return j}),n.d(t,"g",function(){return P}),n.d(t,"c",function(){return w}),
n.d(t,"f",function(){return T}),n.d(t,"k",function(){return E});var i,r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(5),c=n.n(l),u=n(12),d=n.n(u),p=n(58),h=n(78),f=n(36),v=n(1086),g=n(90),m=n(193),y=n(732),b=n(2419),I=Object(f.a)("user/fetchPlans"),S=(Object(f.a)("user/populatePlans"),
Object(f.a)("user/repopulateUnwatchedWatchLaterList")),M=Object(f.a)("user/repopulateUnwatchedRecommendedList"),D=Object(f.a)("user/updateUser"),C=Object(f.a)("user/clearUpdateUserError"),O=Object(f.a)("user/fetchWebhooks"),j=Object(f.a)("user/addWebhook"),P=Object(f.a)("user/replaceWebhook"),w=Object(f.a)("user/clearUpdateWebhookError"),T=Object(f.a)("user/removeWebhook"),E=s()({},v.b,(i={},i["user/fetchPlans"]=Object(g.a)({key:"plans",getModel:h.k}),i["user/populatePlans"]=Object(m.a)({
key:"plans",getModel:h.k}),i["user/repopulateUnwatchedWatchLaterList"]=Object(y.a)({key:"unwatchedWatchLaterList",getModel:h.k}),i["user/repopulateUnwatchedRecommendedList"]=Object(y.a)({key:"unwatchedRecommendedList",getModel:h.k}),i["user/clearUpdateUserError"]=function(e){Object(h.k)(e).set("updateUserError",null)},i["user/updateUser"]=function(e,t,n){var i=Object(h.k)(e),r=e.get("user"),o=t.avatar,s=a()(t,["avatar"]);if(i.set({isUpdatingUser:!0,updateUserError:null}),o){
for(var l=o.split(","),u=l[0],f=l[1],v=u.substr(5),g=window.atob(f),m=[],y=0;y<g.length;y++)m.push(g.charCodeAt(y));var b=new Uint8Array(m),I=new window.Blob([b],{type:v});s.avatar=I}var S=new window.FormData;c.a.each(s,function(e,t){S.append(t,e)});var M=r.server.getXHROptions(c.a.result(r,"url"),{type:"PUT",processData:!1,contentType:!1,data:S});d.a.ajax(M).done(function(e){!t.avatar&&r.get("hasPassword")||r.fetch();var n=c.a.reduce(t,function(e,t,n){return r.hasAttr(n)&&(e[n]=t),e},{})
;r.set(n),i.set({isUpdatingUser:!1,updateUserError:null})}).fail(function(e){var t=p.a.parseXML(e.responseText),n=Array.isArray(t)?t:[t.error],r=c.a.groupBy(n,function(e){return e&&e.field?e.field:"request"});i.set({isUpdatingUser:!1,updateUserError:r})})},i["user/fetchWebhooks"]=Object(g.a)({key:"webhooks",getModel:h.k}),i["user/addWebhook"]=function(e){var t=Object(h.k)(e);t.get("webhooks").add({}),t.set("updateWebhooksError",null)},i["user/replaceWebhook"]=function(e,t){
var n=t.oldUrl,i=t.newUrl,r=Object(h.k)(e),a=r.get("webhooks");if(a.findWhere({url:n})){var o=a.map(function(e){var t=e.get("url");return t===n?i:t});r.set({isUpdatingWebhooks:!0,updateWebhooksError:null}),Object(b.a)(a,o).always(function(){r.set("isUpdatingWebhooks",!1)}).fail(function(e){r.set("updateWebhooksError",e[0])})}},i["user/clearUpdateWebhookError"]=function(e){Object(h.k)(e).set("updateWebhooksError",null)},i["user/removeWebhook"]=function(e,t){
var n=Object(h.k)(e),i=n.get("webhooks");if(!t){var r=i.filter(function(e){return e.get("url")!==t});return void i.reset(r)}n.set({isRemovingWebhooks:!0,updateWebhooksError:null});var a=i.map(function(e){return e.get("url")}).filter(function(e){return e!==t});Object(b.a)(i,a).always(function(){n.set("isRemovingWebhooks",!1)}).fail(function(e){n.set("updateWebhooksError",e[0])})},i))},function(e,t,n){"use strict";var i=n(1),r=n.n(i);r.a.shape({start:r.a.number.isRequired,
end:r.a.number.isRequired,size:r.a.number.isRequired})},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className;return a()("div",{className:n},void 0,t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2435)),c=n.n(l);i.defaultProps={className:c.a.hubCellHeader},t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e){if(e){var t=e.librarySectionKey,n=e.librarySectionID;return t||(n?"/library/sections/"+n:void 0)}})}t.a=i
;var r=n(6),a=(n.n(r),n(21))},function(e,t,n){"use strict";function i(e,t){return t&&r[e]?r[e]:e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r={"#!/settings":"#!/settings/web/general","#!/account":"#!/settings/account","#!/account/plex-cloud":"#!/settings/plex-cloud","#!/account/webhooks":"#!/settings/webhooks","#!/account/online-media-sources":"#!/settings/online-media-sources","#!/account/audio-subtitle":"#!/settings/audio-subtitle"}},function(e,t,n){"use strict"
;function i(){return Object(g.createSelector)(Object(y.a)(),Object(m.a)(),b.a,function(e,t,n){var i=e.isHubKey,r=e.directory,a=t.desktop,o=a.isProvidersPending,s=a.isLibrariesPending,l=!r&&(o||s);return{isHubKey:i,isChannelsGrid:r&&M.test(r.key),selectedDirectory:r,libraryRoutes:n,showSpinner:l}})}var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(42)),y=n(2668),b=n(757),I=n(106),S=n(2671),M=/\/grid$/i,D=function(e){
function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentDidMount=function(){this.props.shouldSaveRoute&&this._saveRoute()},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.shouldSaveRoute,i=t.selectedDirectory,r=n!==e.shouldSaveRoute,a=i!==e.selectedDirectory;n&&(r||a)&&this._saveRoute()},t.prototype._saveRoute=function(){var e,t=this.props,n=t.serverEntityID,i=t.isHubKey,r=t.selectedDirectory,o=t.libraryRoutes;if(!i&&r){
var s=n+"!"+r.key,l=window.location.hash;if(o[s]!==l&&-1!==l.indexOf(encodeURIComponent(r.key))){var c=a()({},o,(e={},e[s]=l,e));this.props.saveExperienceSettings({libraryRoutes:c})}}},t.prototype.render=function(){return f.a.createElement(S.a,this.props)},t}(h.Component);t.a=Object(v.b)(i,{saveExperienceSettings:I.h})(D)},function(e,t,n){"use strict";function i(e,t,n){var i=Object(h.a)(t,n),r=encodeURIComponent(e);return n.isLibraryProvider?"#!"+i+"/dashboard?key="+r:"#!"+i+"?key="+r}
function r(e){var t=e.server,n=e.provider,r=e.directories,a=e.selectedDirectory,s=l()(e,["server","provider","directories","selectedDirectory"]),c=a&&(a.hubKey||a.key);return d.a.createElement(f.a,s,r&&r.map(function(e){var r=e.key,a=e.hubKey,s=e.title,l=e.isHomeDirectory;if((t.isCloud||n.isLibraryProvider)&&!a)return null;var u=a||r,d=i(u,t,n);return o()(v.a,{"data-qa-id":"directoriesMenuItem--"+u,to:d,isSelected:c===u},u,l?Object(p.default)("All Libraries"):s)}))}
var a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(4),h=n(507),f=(n(95),n(87),n(75)),v=n(108);t.a=r},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(function(e,t){return t.deviceID},Object(s.a)(),function(e,t){if(t)return a.a.find(t.devices,{key:e})})}var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),n(557));t.a=i},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;return Object(r.c)({direction:r.b,columns:1,overscan:t,getCellWidth:function(e){return e.innerViewportWidth},getCellHeight:function(){return e}})}t.a=i;var r=n(534)},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(Object(I.a)(),function(e){return e?{isProvidersPopulated:!0,hasProvider:!0,isPersonalCloudServer:!1,isPersonalCloudProvider:!1,
providerEntityID:e.entityID,isRetrying:!!e.isPending,showSpinner:!e.isPopulated&&!e.error,showError:!!e.error}:{isProvidersPopulated:!1,isPersonalCloudServer:!1,isPersonalCloudProvider:!1,hasProvider:!1,isRetrying:!0,showSpinner:!0,showError:!1}})}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(34)),I=n(79),S=n(335),M=n(1129),D={dispatchFetchProvider:S.b,dispatchPopulateProvider:S.d},C=function(e){
function t(){var n,i,r;c()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=d()(this,e.call.apply(e,[this].concat(o))),i.onPopulate=function(e){var t=(e.serverEntityID,e.providerEntityID);Object(b.a)(function(){i.props.dispatchPopulateProvider({providerEntityID:t,options:{merge:!0}})})},i.onRepopulate=function(e){var t=(e.serverEntityID,e.providerEntityID);Object(b.a)(function(){i.props.dispatchFetchProvider({providerEntityID:t,options:{merge:!0}})})},r=n,
d()(i,r)}return h()(t,e),t.prototype.componentDidMount=function(){this.props.isProvidersPopulated&&this.onPopulate({providerEntityID:this.props.providerEntityID})},t.prototype.componentWillReceiveProps=function(e){e.providerEntityID===this.props.providerEntityID&&e.isProvidersPopulated===this.props.isProvidersPopulated||this.onRepopulate({providerEntityID:e.providerEntityID})},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchProvider,e.dispatchPopulateProvider,
s()(e,["dispatchFetchProvider","dispatchPopulateProvider"]));return g.a.createElement(M.a,a()({},t,{onRetry:this.onRepopulate}))},t}(v.Component);t.a=Object(m.b)(i,D)(C)},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.onPress;return s()(u.a,{className:(h.a.sectionWrapper||"")+" "+(n||""),component:"div",onPress:i},void 0,t)}function r(e){var t=e.children,n=e.className;return s()("div",{className:(h.a.sectionWrapper||"")+" "+(n||"")},void 0,t)}function a(e){
var t=e.errorMessage,n=e.children,a=e.className,o=e.onErrorDismiss,l=e.onPress,c=l?i:r;return s()(c,{className:a,onPress:l},void 0,t&&s()(d.a,{errorMessage:t,onErrorDismiss:o}),s()("div",{className:h.a.section},void 0,n))}var o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(22)),d=n(224),p=n(3046),h=n.n(p);t.a=a},function(e,t,n){"use strict";function i(){return Object(r.a)()||Object(a.a)()}var r=n(745),a=n(1203);t.a=i},function(e,t,n){"use strict"
;var i=n(3444),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=n(15),c=s.a.ItemView.extend({id:"primary-server-dropdown",tagName:"span",className:"dropdown",template:r.a,events:{"click .dropdown-menu a":"onServerClick"},initialize:function(e){e||(e={});var t=l.d("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){if(!t.get("isPrimaryEligible"))return e;var n=t.get("shared"),i=t.get("sections");if(n&&!(this.showSharedServers&&i&&i.findWhere({allowSync:!0})))return e;var r=t.toJSON();return r.authorized&&!(r.cloud||r.synced||r.isOutOfDate)&&e.push(r),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.d("appModel"),n=o()(e.currentTarget).data("id"),i=this.collection.get(n);i&&t.set("primaryServer",i)}});t.a=c},function(e,t,n){"use strict";function i(e){return e.get("ui").get("recordingSchedulePage")}function r(e){return i(e).get("calendar")}function a(e,t,n){var r=i(e),a=Object(c.j)(e,t);if(r.get("isPagePopulated")){var o=r.get("calendar"),s=r.get("mediaSubscriptions")
;o&&o.server===a&&n(U()),s&&s.server===a&&n(A())}}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"INIT_RECORDING_SCHEDULE_PAGE",function(){return S}),n.d(t,"CLEAR_RECORDING_SCHEDULE_PAGE",function(){return M}),n.d(t,"FETCH_MEDIA_SUBSCRIPTIONS",function(){return D}),n.d(t,"MOVE_MEDIA_SUBSCRIPTION",function(){return C}),n.d(t,"SET_VISIBLE_DAYS",function(){return O}),n.d(t,"GO_TO_TODAY",function(){return j}),n.d(t,"GO_TO_PREVIOUS_RANGE",function(){return P}),
n.d(t,"GO_TO_NEXT_RANGE",function(){return w}),n.d(t,"FETCH_CALENDAR",function(){return T}),n.d(t,"PLAY_RECORDING",function(){return E}),n.d(t,"initRecordingSchedulePage",function(){return x}),n.d(t,"clearRecordingSchedulePage",function(){return N}),n.d(t,"fetchMediaSubscriptions",function(){return A}),n.d(t,"moveMediaSubscription",function(){return L}),n.d(t,"setVisibleDays",function(){return k}),n.d(t,"goToToday",function(){return _}),n.d(t,"goToPreviousRange",function(){return R}),
n.d(t,"goToNextRange",function(){return z}),n.d(t,"fetchCalendar",function(){return U}),n.d(t,"playRecording",function(){return B}),n.d(t,"recordingSchedulePageActionHandlers",function(){return V})
;var o,s=n(41),l=n.n(s),c=n(78),u=n(36),d=n(105),p=n(90),h=n(1066),f=n(77),v=n(1271),g=n(175),m=n(1272),y=n(113),b=n(60),I=n(35),S="ui/recordingSchedulePage/initRecordingSchedulePage",M="ui/recordingSchedulePage/clearRecordingSchedulePage",D="ui/recordingSchedulePage/fetchMediaSubscriptions",C="ui/recordingSchedulePage/moveMediaSubscription",O="ui/recordingSchedulePage/setVisibleDays",j="ui/recordingSchedulePage/goToToday",P="ui/recordingSchedulePage/goToPreviousRange",w="ui/recordingSchedulePage/goToNextRange",T="ui/recordingSchedulePage/fetchCalendar",E="ui/recordingSchedulePage/playRecording",x=Object(u.a)(S),N=Object(u.a)(M),A=Object(u.a)(D),L=Object(u.a)(C),k=Object(u.a)(O),_=Object(u.a)(j),R=Object(u.a)(P),z=Object(u.a)(w),U=Object(u.a)(T),B=Object(u.a)(E),V=Object(d.a)((o={},
o[S]=function(e,t){var n=i(e),r=n.get("mediaSubscriptions"),a=n.get("calendar"),o=Object(c.j)(e,t),s={isPagePopulated:!0,isCalendarPending:!1,isCalendarPopulated:!1,calendarError:null};r&&r.server===o||(s.mediaSubscriptions=new v.a([],{server:o})),a&&a.server===o?a.restoreDefaults():s.calendar=new m.a({},{server:o}),n.set(s)},o[M]=function(e){i(e).set("isPagePopulated",!1)},o[D]=Object(p.a)({key:"mediaSubscriptions",getModel:i}),o[C]=function(e,t){
var n=i(e),r=n.get("mediaSubscriptions"),a=Object(c.c)(e,t),o=a&&r.indexOf(a),s=t.moveIndex;if(o!==s&&o!==s-1){var l=s>o?s-1:s;r.remove(a),r.add(a,{at:l});var u=l>0?r.at(l-1).id:void 0;Object(h.a)(a,u).fail(function(){r.remove(a),r.add(a,{at:o})})}},o[O]=function(e,t,n){r(e).set("visibleDays",t.visibleDays)},o[j]=function(e,t,n){r(e).set("time",l()().unix())},o[P]=function(e,t,n){var i=r(e),a=i.get("visibleDays"),o=l.a.unix(i.get("time")).subtract(a,"days").unix();i.set("time",o)},
o[w]=function(e,t,n){var i=r(e),a=i.get("visibleDays"),o=l.a.unix(i.get("time")).add(a,"days").unix();i.set("time",o)},o[T]=Object(p.a)({key:"calendar",getModel:i}),o[E]=function(e,t,n){var i=t.serverEntityID,r=t.providerEntityID,a=t.linkedKey,o=Object(c.j)(e,t),s=new f.a({key:a},{server:o});s.populate().done(function(){n(Object(b.m)({serverEntityID:i,providerEntityID:r,metadataItemEntityID:s.entityID(),metricsPage:I._1}))})},o[y.b]=function(e,t,n){var i=t.activity
;if(i.type===g.a.PROVIDER_SUBSCRIPTION_PROCESS&&a(e,t,n),i.type===g.a.GRABBER_GRAB){"error"===i.Response.status&&a(e,t,n)}},o))},,,,function(e,t,n){e.exports={default:n(1317),__esModule:!0}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return 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){t.f={}.propertyIsEnumerable},function(e,t,n){var i=n(459);e.exports=function(e){return Object(i(e))}},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];var i=Array.isArray(t[0])?t[0]:t;return a.a.when.apply(a.a,i.map(o.a))}var r=n(12),a=n.n(r),o=n(151);t.a=i},function(e,t,n){"use strict";function i(e){return null==e||""===e?0:parseInt(e,10)}t.a=i
},function(e,t,n){"use strict";function i(){return l||(l=new o.a(!1,"",!0))}function r(e){if(!e)return s.a.warn("[Parser] Empty XML source"),{};var t=i(),n=t.parseXmlString(e);if(!n)return s.a.warn("[Parser] No XML document created"),{};if(n.getElementsByTagName("parsererror").length)return s.a.warn("[Parser] Errors found while parsing XML document"),{};try{return t.xml2json(n)}catch(e){return s.a.warn("[Parser] Unable to parse XML: "+e.message),{}}}var a=n(599),o=n.n(a),s=n(30),l=void 0;t.a=r
},function(e,t,n){"use strict";var i=n(12),r=n.n(i),a=n(68),o=n(211),s={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=r.a.Deferred(),n=void 0;if(this.isPopulating())return this.populatePromise
;n=this._fetch?this._fetch.apply(this,arguments):this instanceof a.c.Collection?a.c.Collection.prototype.fetch.apply(this,arguments):a.c.Model.prototype.fetch.apply(this,arguments);var i=t.promise();return i.rid=n.rid,this.populatePromise=i,this.failedPopulatePromise=null,n.done(function(n){e.populatePromise=r.a.Deferred().resolveWith(e,[e]).promise(),t.resolveWith(e,[e,n])}),n.fail(function(n){e.populatePromise=null,e.failedPopulatePromise=i,t.rejectWith(e,[e,n])}),i},
abortPendingPopulate:function(){return this.isPopulating()&&o.a.abort(this.populatePromise.rid),this.populatePromise},resetPopulatePromise:function(e){return this.isPopulating()||(this.populatePromise=e,this.failedPopulatePromise=null),this.populatePromise}};t.a=s},function(e,t,n){"use strict";var i=n(239),r=new i.a({interface:["getLanguages","load","t"]});t.a=r},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(610),o=a.a.extend({maxCycles:3,maxSize:20,get:function(e){
var t=a.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=r.a.result(e,"url");return e.server&&(t=e.server.getScopedKey(t)),e.provider&&(t=e.provider.getScopedKey(t)),t}});t.a=o},function(e,t,n){"use strict";function i(e){return/^\w+:\/\//.test(e)}t.a=i},function(e,t,n){"use strict";function i(e,t,n){return void 0===n?t:a.a.isObject(t)?t:n}t.a=i;var r=n(5),a=n.n(r)
},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(23),o=n(1457),s=a.a.extend({name:"FilterOptionCollection",context:["server","provider","section","type","standalone"],model:o.a,url:function(){var e=r.a.result(this.section,"url"),t=e+"/"+this.parent.id;return this.type?t+="?type="+this.type:this.standalone||(t+="?"+this.getUrlParams()),t},getUrlParams:function(){var e=this,t={},n=[],i=this.section.get("currentType"),a=this.section.get("currentFilters");return i&&(t.type=i.id),
r.a.each(a,function(n){n.key!==e.parent.id&&n.values.length&&(t[n.key]=n.values.join(","))}),r.a.each(t,function(e,t){"unviewedLeafCount"===t?n.push(t+">="+e):n.push(t+"="+e)}),n.join("&")},augmentResponse:function(e){return e.Directory&&!Array.isArray(e.Directory)&&(e.Directory=[e.Directory]),e.Directory=r.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=s},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i=n(5),r=n.n(i),a=n(23),o=n(274),s=n(62),l=n(600),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)},u=a.a.extend({
name:"ConnectionCollection",context:["server"],model:o.a,getBestConnection:function(){var e=s.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 r.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.b=u},function(e,t,n){"use strict";n.d(t,"b",function(){return o
}),n.d(t,"c",function(){return s}),n.d(t,"a",function(){return l}),n.d(t,"f",function(){return c}),n.d(t,"d",function(){return u}),n.d(t,"e",function(){return d}),n.d(t,"h",function(){return p}),n.d(t,"g",function(){return h});var i=n(16),r=n(51),a=n(18),o="unknown",s="waiting",l="mapped",c="ok",u="connecting",d="disconnecting",p="unreachable",h="",f=a.a.extend({context:["server"],url:"/myplex/account",responseType:r.a.json,sessionAttrs:{remoteAccessState:i.a.oneOf(u,d,p,c,h)},syncedAttrs:{
username:i.a.string,mappingState:i.a.oneOf(o,s,"failed",l),mappingError:i.a.oneOf("badauth","unreachable","myplexgone","publisherror","doublenat","jumboframes",""),signInState:i.a.oneOf("none","unknown","invalid","ok"),publicAddress:i.a.string,publicPort:i.a.integer,privateAddress:i.a.string,privatePort:i.a.integer,subscriptionActive:i.a.boolean,subscriptionState:i.a.string},derivedAttrs:{signedIn:function(){return"ok"===this.get("signInState")},isWaiting:function(){
var e=this.get("remoteAccessState");return e===u||e===d}},defaults:{signedIn:!1,mappingState:null,mappingError:null,signInState:null,publicAddress:null,publicPort:null,privateAddress:null,privatePort:null},isNew:function(){return!this.get("signedIn")},augmentResponse:function(e){var t=e.MyPlex,n="ok"===t.signInState;n||(t.username=null);var i=!n||t.mappingError,r=!i&&t.mappingState===l;return i?t.remoteAccessState=p:r&&(t.remoteAccessState=c),t}});t.i=f},function(e,t,n){"use strict"
;var i=n(239),r=new i.a({interface:["get","set","remove","clear"]});t.a=r},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(30),o=n(476),s={ORIGINAL:-1,CONVERT_AUTOMATICALLY:-2,qualities:{},getQualityByIndex:function(e){if(e===this.CONVERT_AUTOMATICALLY)return{index:this.CONVERT_AUTOMATICALLY};if(e<0)return{index:this.ORIGINAL};var t={index:e};return r.a.each(this.qualities,function(n,i){t[i]=r.a.result(this.qualities,i)[e]},this),t},getQualityCount:function(){
var e=r.a.first(r.a.keys(this.qualities));return r.a.result(this.qualities,e).length},getQualityAttribute:function(e){var t=Object(o.a)(e,e.server.get("isPrivateConnection"));return"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()&&(a.a.warn("Quality index "+i+" is out of bounds"),i=t.defaults[n],t.save(n,i)),
r.a.extend(this.getQualityByIndex(i),{attribute:n})},getAvailableQualities:function(e){e||(e={});var t=e.lowestQualityIndex,n=e.highestQualityIndex,i=e.comparator,r=[];n===this.ORIGINAL&&(n=void 0);for(var a=0,o=this.getQualityCount();a<o;a++)if(!(t&&a<t)){if(n&&a>n)return r;if(i&&i.call(this,a))return r;r.push(this.getQualityByIndex(a))}return r},getResolutionFromSize:function(e){var t=e.split("x"),n=parseInt(t[1],10);return this.getResolutionFromHeight(n)},getResolutionFromHeight:function(e){
return e>2560?"8k":e>1100?"4k":e>720?"1080":e>576?"720":e>480?"576":e>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":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,r=e.length;i<r;i++){if(e[i]>t)break;n=i}}return n}};t.a=s},function(e,t,n){"use strict";function i(e,t){
return Object(r.a)(e,t)?"localQuality":"remoteQuality"}t.a=i;var r=n(628)},function(e,t,n){"use strict";var i="placeholder-standard",r="placeholder-square",a="placeholder-widescreen",o={movie:i,show:i,season:i,episode:a,artist:r,album:r,track:r,photo:r,photoalbum:r,clip:a,userPlaylistItem:a,playlist:r,playlistFolder:r,channel:r,channelDirectory:r,folder:"placeholder-folder",friend:"placeholder-friend",device:r,poster:i,art:a,banner:a,collection:i};t.a=o},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";function i(e){return e.get("ui").get("authCodeExchange")}t.a=i},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 r=n(889),a=i(r),o=n(1640),s=i(o),l=n(1641),c=i(l),u=n(1642),d=i(u),p=n(892),h=i(p),f=n(891);i(f);t.createStore=a.default,t.combineReducers=s.default,
t.bindActionCreators=c.default,t.applyMiddleware=d.default,t.compose=h.default},function(e,t,n){function i(e){return null==e?void 0===e?l:s:c&&c in Object(e)?a(e):o(e)}var r=n(638),a=n(1636),o=n(1637),s="[object Null]",l="[object Undefined]",c=r?r.toStringTag:void 0;e.exports=i},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)",modalSpeed:"0.2s",menuSpeed:"0.15s",tooltipSpeed:"0.15s"}},,,,,,function(e,t,n){"use strict"
;function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.get("playQueue"),r=i.get("currentIndex"),a=i.get("playQueueSelectedItemOffset");if(r!==t){var o=Object(D.a)(e,t);if(o){var s=o.get("metadataItem"),l=Math.floor(Object(C.a)(e,s)/1e3),c=Math.floor((s.get("duration")||0)/1e3),u={isMediaLoading:!0,isBuffering:!1,isLyricsVisible:!1,positionSeconds:l,durationSeconds:c,metricsAutoPlay:n,hasError:!1,errorMessage:null,errorCode:null,errorCategory:null,qualityIndex:null}
;i.get("type")!==M.b&&(u.isPaused=!1),e.set(u),i.set({playQueueSelectedItemID:o.id,playQueueSelectedItemOffset:a+(t-r)}),Object(O.a)()}}}function r(e,t){var n=e.get("playQueue"),i=n.get("currentIndex"),r=i+t,a=n.get("playQueueTotalCount");return n.get("repeat")?(r+a)%a:Math.min(Math.max(0,r),a-1)}function a(e){i(e,e.get("playQueue").get("currentIndex"))}function o(e){e.restoreDefaults()}function s(e,t){i(e,r(e,1),t)}function l(e){i(e,r(e,-1))}function c(e,t){i(e,t)}function u(e){
arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.set({isPaused:!1}),Object(O.a)()}function d(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.set({isPaused:!0}),Object(O.a)()}function p(e,t){e.set({lastSeekPositionSeconds:t}),Object(O.a)()}function h(e,t,n){t.save("volume",n)}function f(e,t){e.set("qualityIndex",t)}function v(e,t,n){}function g(e,t,n){t.save("subtitleSize",n)}function m(e,t,n){t.save("autoPlay",n)}function y(e,t){e.set("playbackSpeed",t)}function b(e,t){
var n=e.get("playQueue");e.set({repeatAll:t.repeatAll,repeatOne:t.repeatOne}),n.set("repeat",t.repeatAll)}function I(e){}function S(e){}Object.defineProperty(t,"__esModule",{value:!0}),t.startPlayback=a,t.endPlayback=o,t.playNextItem=s,t.playPreviousItem=l,t.playItem=c,t.play=u,t.pause=d,t.seek=p,t.changeVolume=h,t.changeQualityIndex=f,t.changeStream=v,t.changeSubtitleSize=g,t.changeAutoPlay=m,t.changePlaybackSpeed=y,t.setRepeat=b,t.refreshRemotePlayQueue=I,t.mirrorDetails=S
;var M=n(214),D=n(171),C=n(489),O=n(929)},function(e,t,n){"use strict";function i(e,t){return null==e.get("startMetadataItemEntityID")&&null!=e.get("startOffsetMilliseconds")?e.get("startOffsetMilliseconds"):e.get("startMetadataItemEntityID")===t.entityID()?e.get("startOffsetMilliseconds"):t.get("viewOffset")||0}t.a=i},function(e,t,n){"use strict";function i(e,t){var n=e.get("playQueue");return function(){if(e.get("isOpen")&&n&&n===e.get("playQueue"))return t.apply(void 0,arguments)
;r.a.warn("[Player] Player was closed or a new playback session was started; ignoring callback")}}t.a=i;var r=n(30)},function(e,t,n){"use strict";n.d(t,"e",function(){return i}),n.d(t,"d",function(){return r}),n.d(t,"c",function(){return a}),n.d(t,"a",function(){return o}),n.d(t,"b",function(){return s});var i="stopped",r="playing",a="paused",o="buffering",s="error"},function(e,t,n){"use strict";function i(e){var t=e.remotePlayer;return t?t.volume:Object(r.a)(e)}t.a=i;var r=n(896)
},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=n.n(h),v=n(0),g=n.n(v),m=n(15),y=n(29),b=n(420),I=function(e){function t(){var n,i,a;l()(this,t);for(var s=arguments.length,c=Array(s),d=0;d<s;d++)c[d]=arguments[d];return n=i=u()(this,e.call.apply(e,[this].concat(c))),i.onPress=function(e){var t=i.props,n=(t.children,o()(t,["children"])),a=i.context.metricsPage;Object(m.d)("metrics").trackClick(r()({},n,{page:a}))},a=n,
u()(i,a)}return p()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.render=function(){var e=g.a.Children.only(this.props.children);return g.a.cloneElement(e,{onPress:Object(b.a)(this.onPress,e.props.onPress)})},t}(v.Component);I.contextTypes={metricsPage:f.a.string.isRequired},t.a=I},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.containerClassName,i=e.labelClassName,r=e.size,o=e.label,s=e.loadingLabel,l=(t||"")+" "+(u.a[r]||"")
;return o?a()("div",{className:(n||"")+" "+(u.a.spinnerContainer||"")},void 0,a()("div",{className:l}),a()("div",{className:(i||"")+" "+(u.a.spinnerLabel||"")},void 0,o)):a()("div",{className:l,"aria-label":s})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(61)),c=n(1813),u=n.n(c);i.defaultProps={size:l.MEDIUM},t.a=i},function(e,t,n){(function(n){var i,r;/*!
 * VERSION: 1.20.0
 * DATE: 2017-06-13
 * UPDATES AND DOCS AT: http://greensock.com
 *
 * @license Copyright (c) 2008-2017, 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(n,a){"use strict";var o={},s=n.document,l=n.GreenSockGlobals=n.GreenSockGlobals||n;if(!l.TweenLite){var c,u,d,p,h,f=function(e){var t,n=e.split("."),i=l;for(t=0;t<n.length;t++)i[n[t]]=i=i[n[t]]||{};return i},v=f("com.greensock"),g=function(e){var t,n=[],i=e.length;for(t=0;t!==i;n.push(e[t++]));return n},m=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={},I=function(n,a,s,c){this.sc=b[n]?b[n].sc:[],b[n]=this,this.gsClass=null,this.func=s;var u=[];this.check=function(d){for(var p,h,v,g,m=a.length,y=m;--m>-1;)(p=b[a[m]]||new I(a[m],[])).gsClass?(u[m]=p.gsClass,y--):d&&p.sc.push(this);if(0===y&&s){if(h=("com.greensock."+n).split("."),v=h.pop(),g=f(h.join("."))[v]=this.gsClass=s.apply(s,u),c)if(l[v]=o[v]=g,void 0!==e&&e.exports)if("TweenLite"===n){e.exports=o.TweenLite=g;for(m in o)g[m]=o[m]}else o.TweenLite&&(o.TweenLite[v]=g);else i=[],
void 0!==(r=function(){return g}.apply(t,i))&&(e.exports=r);for(m=0;m<this.sc.length;m++)this.sc[m].check()}},this.check(!0)},S=n._gsDefine=function(e,t,n,i){return new I(e,t,n,i)},M=v._class=function(e,t,n){return t=t||function(){},S(e,[],function(){return t},n),t};S.globals=l;var D=[0,0,1,1],C=M("easing.Ease",function(e,t,n,i){this._func=e,this._type=n||0,this._power=i||0,this._params=t?D.concat(t):D},!0),O=C.map={},j=C.register=function(e,t,n,i){
for(var r,a,o,s,l=t.split(","),c=l.length,u=(n||"easeIn,easeOut,easeInOut").split(",");--c>-1;)for(a=l[c],r=i?M("easing."+a,null,!0):v.easing[a]||{},o=u.length;--o>-1;)s=u[o],O[a+"."+s]=O[s+a]=r[s]=e.getRatio?e:e[s]||new e};for(d=C.prototype,d._calcEnd=!1,d.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},c=["Linear","Quad","Cubic","Quart","Quint,Strong"],u=c.length;--u>-1;)d=c[u]+",Power"+u,j(new C(null,null,1,u),d,"easeOut",!0),j(new C(null,null,2,u),d,"easeIn"+(0===u?",easeNone":"")),j(new C(null,null,3,u),d,"easeInOut");O.linear=v.easing.Linear.easeIn,O.swing=v.easing.Quad.easeInOut;var P=M("events.EventDispatcher",function(e){this._listeners={},this._eventTarget=e||this});d=P.prototype,d.addEventListener=function(e,t,n,i,r){r=r||0
;var a,o,s=this._listeners[e],l=0;for(this!==p||h||p.wake(),null==s&&(this._listeners[e]=s=[]),o=s.length;--o>-1;)a=s[o],a.c===t&&a.s===n?s.splice(o,1):0===l&&a.pr<r&&(l=o+1);s.splice(l,0,{c:t,s:n,up:i,pr:r})},d.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)},d.dispatchEvent=function(e){var t,n,i,r=this._listeners[e];if(r)for(t=r.length,t>1&&(r=r.slice(0)),
n=this._eventTarget;--t>-1;)(i=r[t])&&(i.up?i.c.call(i.s||n,{type:e,target:n}):i.c.call(i.s||n))};var w=n.requestAnimationFrame,T=n.cancelAnimationFrame,E=Date.now||function(){return(new Date).getTime()},x=E();for(c=["ms","moz","webkit","o"],u=c.length;--u>-1&&!w;)w=n[c[u]+"RequestAnimationFrame"],T=n[c[u]+"CancelAnimationFrame"]||n[c[u]+"CancelRequestAnimationFrame"];M("Ticker",function(e,t){var n,i,r,a,o,l=this,c=E(),u=!(!1===t||!w)&&"auto",d=500,f=33,v=function(e){var t,s,u=E()-x
;u>d&&(c+=u-f),x+=u,l.time=(x-c)/1e3,t=l.time-o,(!n||t>0||!0===e)&&(l.frame++,o+=t+(t>=a?.004:a-t),s=!0),!0!==e&&(r=i(v)),s&&l.dispatchEvent("tick")};P.call(l),l.time=l.frame=0,l.tick=function(){v(!0)},l.lagSmoothing=function(e,t){d=e||1e10,f=Math.min(t,d,0)},l.sleep=function(){null!=r&&(u&&T?T(r):clearTimeout(r),i=m,r=null,l===p&&(h=!1))},l.wake=function(e){null!==r?l.sleep():e?c+=-x+(x=E()):l.frame>10&&(x=E()-d+5),i=0===n?m:u&&w?w:function(e){return setTimeout(e,1e3*(o-l.time)+1|0)},
l===p&&(h=!0),v(2)},l.fps=function(e){if(!arguments.length)return n;n=e,a=1/(n||60),o=this.time+a,l.wake()},l.useRAF=function(e){if(!arguments.length)return u;l.sleep(),u=e,l.fps(n)},l.fps(e),setTimeout(function(){"auto"===u&&l.frame<5&&"hidden"!==s.visibilityState&&l.useRAF(!1)},1500)}),d=v.Ticker.prototype=new v.events.EventDispatcher,d.constructor=v.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=!0===t.immediateRender,this.data=t.data,this._reversed=!0===t.reversed,J){h||p.wake();var n=this.vars.useFrames?X:J;n.add(this,n._time),this.vars.paused&&this.paused(!0)}});p=N.ticker=new v.Ticker,d=N.prototype,d._dirty=d._gc=d._initted=d._paused=!1,d._totalTime=d._time=0,d._rawPrevTime=-1,d._next=d._last=d._onUpdate=d._timeline=d.timeline=null,d._paused=!1;var A=function(){h&&E()-x>2e3&&"hidden"!==s.visibilityState&&p.wake();var e=setTimeout(A,2e3)
;e.unref&&e.unref()};A(),d.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},d.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},d.resume=function(e,t){return null!=e&&this.seek(e,t),this.paused(!1)},d.seek=function(e,t){return this.totalTime(Number(e),!1!==t)},d.restart=function(e,t){return this.reversed(!1).paused(!1).totalTime(e?-this._delay:0,!1!==t,!0)},d.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),
this.reversed(!0).paused(!1)},d.render=function(e,t,n){},d.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},d.isActive=function(){var e,t=this._timeline,n=this._startTime;return!t||!this._gc&&!this._paused&&t.isActive()&&(e=t.rawTime(!0))>=n&&e<n+this.totalDuration()/this._timeScale-1e-7},d._enabled=function(e,t){return h||p.wake(),this._gc=!e,this._active=this.isActive(),
!0!==t&&(e&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!e&&this.timeline&&this._timeline._remove(this,!0)),!1},d._kill=function(e,t){return this._enabled(!1,!1)},d.kill=function(e,t){return this._kill(e,t),this},d._uncache=function(e){for(var t=e?this:this.timeline;t;)t._dirty=!0,t=t.timeline;return this},d._swapSelfInParams=function(e){for(var t=e.length,n=e.concat();--t>-1;)"{self}"===e[t]&&(n[t]=this);return n},d._callback=function(e){
var t=this.vars,n=t[e],i=t[e+"Params"],r=t[e+"Scope"]||t.callbackScope||this;switch(i?i.length:0){case 0:n.call(r);break;case 1:n.call(r,i[0]);break;case 2:n.call(r,i[0],i[1]);break;default:n.apply(r,i)}},d.eventCallback=function(e,t,n,i){if("on"===(e||"").substr(0,2)){var r=this.vars;if(1===arguments.length)return r[e];null==t?delete r[e]:(r[e]=t,r[e+"Params"]=y(n)&&-1!==n.join("").indexOf("{self}")?this._swapSelfInParams(n):n,r[e+"Scope"]=i),"onUpdate"===e&&(this._onUpdate=t)}return this},
d.delay=function(e){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+e-this._delay),this._delay=e,this):this._delay},d.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)},d.totalDuration=function(e){return this._dirty=!1,
arguments.length?this.duration(e):this._totalDuration},d.time=function(e,t){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(e>this._duration?this._duration:e,t)):this._time},d.totalTime=function(e,t,n){if(h||p.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,r=this._timeline;if(e>i&&!n&&(e=i),
this._startTime=(this._paused?this._pauseTime:r._time)-(this._reversed?i-e:e)/this._timeScale,r._dirty||this._uncache(!1),r._timeline)for(;r._timeline;)r._timeline._time!==(r._startTime+r._totalTime)/r._timeScale&&r.totalTime(r._totalTime,!0),r=r._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===e&&0!==this._duration||(z.length&&ee(),this.render(e,t,!1),z.length&&ee())}return this},d.progress=d.totalProgress=function(e,t){var n=this.duration()
;return arguments.length?this.totalTime(n*e,t):n?this._time/n:this.ratio},d.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},d.endTime=function(e){return this._startTime+(0!=e?this.totalDuration():this.duration())/this._timeScale},d.timeScale=function(e){if(!arguments.length)return this._timeScale;if(e=e||1e-10,
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)},d.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},d.paused=function(e){
if(!arguments.length)return this._paused;var t,n,i=this._timeline;return e!=this._paused&&i&&(h||e||p.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 L=M("core.SimpleTimeline",function(e){N.call(this,0,e),this.autoRemoveChildren=this.smoothChildTiming=!0});d=L.prototype=new N,d.constructor=L,d.kill()._gc=!1,d._first=d._last=d._recent=null,d._sortChildren=!1,d.add=d.insert=function(e,t,n,i){var r,a;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),r=this._last,
this._sortChildren)for(a=e._startTime;r&&r._startTime>a;)r=r._prev;return r?(e._next=r._next,r._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=r,this._recent=e,this._timeline&&this._uncache(!0),this},d._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},d.render=function(e,t,n){var i,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=e;r;)i=r._next,(r._active||e>=r._startTime&&!r._paused&&!r._gc)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,n):r.render((e-r._startTime)*r._timeScale,t,n)),r=i},d.rawTime=function(){return h||p.wake(),this._totalTime};var k=M("TweenLite",function(e,t,i){
if(N.call(this,t,i),this.render=k.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:k.selector(e)||e;var r,a,o,s=e.jquery||e.length&&e!==n&&e[0]&&(e[0]===n||e[0].nodeType&&e[0].style&&!e.nodeType),l=this.vars.overwrite;if(this._overwrite=l=null==l?Z[k.defaultOverwrite]:"number"==typeof l?l>>0:Z[l],(s||e instanceof Array||e.push&&y(e))&&"number"!=typeof e[0])for(this._targets=o=g(e),this._propLookup=[],this._siblings=[],r=0;r<o.length;r++)a=o[r],
a?"string"!=typeof a?a.length&&a!==n&&a[0]&&(a[0]===n||a[0].nodeType&&a[0].style&&!a.nodeType)?(o.splice(r--,1),this._targets=o=o.concat(g(a))):(this._siblings[r]=te(a,this,!1),1===l&&this._siblings[r].length>1&&ie(a,this,null,1,this._siblings[r])):"string"==typeof(a=o[r--]=k.selector(a))&&o.splice(r+1,1):o.splice(r--,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&&!1!==this.vars.immediateRender)&&(this._time=-1e-10,this.render(Math.min(0,-this._delay)))},!0),_=function(e){return e&&e.length&&e!==n&&e[0]&&(e[0]===n||e[0].nodeType&&e[0].style&&!e.nodeType)},R=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||!(!W[n]||W[n]&&W[n]._autoCSS)||(i[n]=e[n],delete e[n]);e.css=i};d=k.prototype=new N,d.constructor=k,
d.kill()._gc=!1,d.ratio=0,d._firstPT=d._targets=d._overwrittenProps=d._startAt=null,d._notifyPluginsOfEnabled=d._lazy=!1,k.version="1.20.0",k.defaultEase=d._ease=new C(null,null,1,1),k.defaultOverwrite="auto",k.ticker=p,k.autoSleep=120,k.lagSmoothing=function(e,t){p.lagSmoothing(e,t)},k.selector=n.$||n.jQuery||function(e){var t=n.$||n.jQuery;return t?(k.selector=t,t(e)):void 0===s?e:s.querySelectorAll?s.querySelectorAll(e):s.getElementById("#"===e.charAt(0)?e.substr(1):e)}
;var z=[],U={},B=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,V=/[\+-]=-?[\.\d]/,F=function(e){for(var t,n=this._firstPT;n;)t=n.blob?1===e&&this.end?this.end:e?this.join(""):this.start:n.c*e+n.s,n.m?t=n.m(t,this._target||n.t):t<1e-6&&t>-1e-6&&!n.blob&&(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},Q=function(e,t,n,i){var r,a,o,s,l,c,u,d=[],p=0,h="",f=0;for(d.start=e,d.end=t,e=d[0]=e+"",t=d[1]=t+"",n&&(n(d),e=d[0],t=d[1]),d.length=0,r=e.match(B)||[],a=t.match(B)||[],
i&&(i._next=null,i.blob=1,d._firstPT=d._applyPT=i),l=a.length,s=0;s<l;s++)u=a[s],c=t.substr(p,t.indexOf(u,p)-p),h+=c||!s?c:",",p+=c.length,f?f=(f+1)%5:"rgba("===c.substr(-5)&&(f=1),u===r[s]||r.length<=s?h+=u:(h&&(d.push(h),h=""),o=parseFloat(r[s]),d.push(o),d._firstPT={_next:d._firstPT,t:d,p:d.length-1,s:o,c:("="===u.charAt(1)?parseInt(u.charAt(0)+"1",10)*parseFloat(u.substr(2)):parseFloat(u)-o)||0,f:0,m:f&&f<4?Math.round:0}),p+=u.length;return h+=t.substr(p),h&&d.push(h),d.setRatio=F,
V.test(t)&&(d.end=0),d},H=function(e,t,n,i,r,a,o,s,l){"function"==typeof i&&(i=i(l||0,e));var c,u=typeof e[t],d="function"!==u?"":t.indexOf("set")||"function"!=typeof e["get"+t.substr(3)]?t:"get"+t.substr(3),p="get"!==n?n:d?o?e[d](o):e[d]():e[t],h="string"==typeof i&&"="===i.charAt(1),f={t:e,p:t,s:p,f:"function"===u,pg:0,n:r||t,m:a?"function"==typeof a?a:Math.round:0,pr:0,c:h?parseInt(i.charAt(0)+"1",10)*parseFloat(i.substr(2)):parseFloat(i)-p||0}
;if(("number"!=typeof p||"number"!=typeof i&&!h)&&(o||isNaN(p)||!h&&isNaN(i)||"boolean"==typeof p||"boolean"==typeof i?(f.fp=o,c=Q(p,h?parseFloat(f.s)+f.c:i,s||k.defaultStringFilter,f),f={t:c,p:"setRatio",s:0,c:1,f:2,pg:0,n:r||t,pr:0,m:0}):(f.s=parseFloat(p),h||(f.c=parseFloat(i)-f.s||0))),f.c)return(f._next=this._firstPT)&&(f._next._prev=f),this._firstPT=f,f},Y=k._internals={isArray:y,isSelector:_,lazyTweens:z,blobDif:Q},W=k._plugins={},G=Y.tweenLookup={},K=0,q=Y.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,id:1,yoyoEase:1},Z={none:0,all:1,auto:2,
concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},X=N._rootFramesTimeline=new L,J=N._rootTimeline=new L,$=30,ee=Y.lazyRender=function(){var e,t=z.length;for(U={};--t>-1;)(e=z[t])&&!1!==e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0),e._lazy=!1);z.length=0};J._startTime=p.time,X._startTime=p.frame,J._active=X._active=!0,setTimeout(ee,1),N._updateRoot=k.render=function(){var e,t,n;if(z.length&&ee(),J.render((p.time-J._startTime)*J._timeScale,!1,!1),
X.render((p.frame-X._startTime)*X._timeScale,!1,!1),z.length&&ee(),p.frame>=$){$=p.frame+(parseInt(k.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._paused)&&k.autoSleep&&!X._first&&1===p._listeners.tick.length){for(;n&&n._paused;)n=n._next;n||p.sleep()}}},p.addEventListener("tick",N._updateRoot);var te=function(e,t,n){var i,r,a=e._gsTweenID;if(G[a||(e._gsTweenID=a="t"+K++)]||(G[a]={target:e,tweens:[]}),
t&&(i=G[a].tweens,i[r=i.length]=t,n))for(;--r>-1;)i[r]===t&&i.splice(r,1);return G[a].tweens},ne=function(e,t,n,i){var r,a,o=e.vars.onOverwrite;return o&&(r=o(e,t,n,i)),o=k.onOverwrite,o&&(a=o(e,t,n,i)),!1!==r&&!1!==a},ie=function(e,t,n,i,r){var a,o,s,l;if(1===i||i>=4){for(l=r.length,a=0;a<l;a++)if((s=r[a])!==t)s._gc||s._kill(null,e,t)&&(o=!0);else if(5===i)break;return o}var c,u=t._startTime+1e-10,d=[],p=0,h=0===t._duration
;for(a=r.length;--a>-1;)(s=r[a])===t||s._gc||s._paused||(s._timeline!==t._timeline?(c=c||re(t,0,h),0===re(s,c,h)&&(d[p++]=s)):s._startTime<=u&&s._startTime+s.totalDuration()/s._timeScale>u&&((h||!s._initted)&&u-s._startTime<=2e-10||(d[p++]=s)));for(a=p;--a>-1;)if(s=d[a],2===i&&s._kill(n,e,t)&&(o=!0),2!==i||!s._firstPT&&s._initted){if(2!==i&&!ne(s,t))continue;s._enabled(!1,!1)&&(o=!0)}return o},re=function(e,t,n){for(var i=e._timeline,r=i._timeScale,a=e._startTime;i._timeline;){
if(a+=i._startTime,r*=i._timeScale,i._paused)return-100;i=i._timeline}return a/=r,a>t?a-t:n&&a===t||!e._initted&&a-t<2e-10?1e-10:(a+=e.totalDuration()/e._timeScale/r)>t+1e-10?0:a-t-1e-10};d._init=function(){var e,t,n,i,r,a,o=this.vars,s=this._overwrittenProps,l=this._duration,c=!!o.immediateRender,u=o.ease;if(o.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),r={};for(i in o.startAt)r[i]=o.startAt[i];if(r.overwrite=!1,r.immediateRender=!0,r.lazy=c&&!1!==o.lazy,
r.startAt=r.delay=null,r.onUpdate=o.onUpdate,r.onUpdateScope=o.onUpdateScope||o.callbackScope||this,this._startAt=k.to(this.target,0,r),c)if(this._time>0)this._startAt=null;else if(0!==l)return}else if(o.runBackwards&&0!==l)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(c=!1),n={};for(i in o)q[i]&&"autoCSS"!==i||(n[i]=o[i]);if(n.overwrite=0,n.data="isFromStart",n.lazy=c&&!1!==o.lazy,n.immediateRender=c,
this._startAt=k.to(this.target,0,n),c){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=u=u?u instanceof C?u:"function"==typeof u?new C(u,o.easeParams):O[u]||k.defaultEase:k.defaultEase,o.easeParams instanceof Array&&u.config&&(this._ease=u.config.apply(u,o.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(a=this._targets.length,
e=0;e<a;e++)this._initProps(this._targets[e],this._propLookup[e]={},this._siblings[e],s?s[e]:null,e)&&(t=!0);else t=this._initProps(this.target,this._propLookup,this._siblings,s,0);if(t&&k._onPluginEvent("_onInitAllProps",this),s&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),o.runBackwards)for(n=this._firstPT;n;)n.s+=n.c,n.c=-n.c,n=n._next;this._onUpdate=o.onUpdate,this._initted=!0},d._initProps=function(e,t,i,r,a){var o,s,l,c,u,d;if(null==e)return!1
;U[e._gsTweenID]&&ee(),this.vars.css||e.style&&e!==n&&e.nodeType&&W.css&&!1!==this.vars.autoCSS&&R(this.vars,e);for(o in this.vars)if(d=this.vars[o],q[o])d&&(d instanceof Array||d.push&&y(d))&&-1!==d.join("").indexOf("{self}")&&(this.vars[o]=d=this._swapSelfInParams(d,this));else if(W[o]&&(c=new W[o])._onInitTween(e,this.vars[o],this,a)){for(this._firstPT=u={_next:this._firstPT,t:c,p:"setRatio",s:0,c:1,f:1,n:o,pg:1,pr:c._priority,m:0},
s=c._overwriteProps.length;--s>-1;)t[c._overwriteProps[s]]=this._firstPT;(c._priority||c._onInitAllProps)&&(l=!0),(c._onDisable||c._onEnable)&&(this._notifyPluginsOfEnabled=!0),u._next&&(u._next._prev=u)}else t[o]=H.call(this,e,o,"get",d,o,0,null,this.vars.stringFilter,a);return r&&this._kill(r,e)?this._initProps(e,t,i,r,a):this._overwrite>1&&this._firstPT&&i.length>1&&ie(e,this,t,this._overwrite,i)?(this._kill(t,e),
this._initProps(e,t,i,r,a)):(this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration)&&(U[e._gsTweenID]=!0),l)},d.render=function(e,t,n){var i,r,a,o,s=this._time,l=this._duration,c=this._rawPrevTime;if(e>=l-1e-7&&e>=0)this._totalTime=this._time=l,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(i=!0,r="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||1e-10===c&&"isPause"!==this.data)&&c!==e&&(n=!0,c>1e-10&&(r="onReverseComplete")),this._rawPrevTime=o=!t||e||c===e?e:1e-10);else if(e<1e-7)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==s||0===l&&c>0)&&(r="onReverseComplete",i=this._reversed),e<0&&(this._active=!1,
0===l&&(this._initted||!this.vars.lazy||n)&&(c>=0&&(1e-10!==c||"isPause"!==this.data)&&(n=!0),this._rawPrevTime=o=!t||e||c===e?e:1e-10)),(!this._initted||this._startAt&&this._startAt.progress())&&(n=!0);else if(this._totalTime=this._time=e,this._easeType){var u=e/l,d=this._easeType,p=this._easePower;(1===d||3===d&&u>=.5)&&(u=1-u),3===d&&(u*=2),1===p?u*=u:2===p?u*=u*u:3===p?u*=u*u*u:4===p&&(u*=u*u*u*u),this.ratio=1===d?1-u:2===d?u:e/l<.5?u/2:1-u/2}else this.ratio=this._ease.getRatio(e/l)
;if(this._time!==s||n){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!n&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=s,this._rawPrevTime=c,z.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(!1!==this._lazy&&(this._lazy=!1),
this._active||!this._paused&&this._time!==s&&e>=0&&(this._active=!0),0===s&&(this._startAt&&(e>=0?this._startAt.render(e,t,n):r||(r="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==l||t||this._callback("onStart"))),a=this._firstPT;a;)a.f?a.t[a.p](a.c*this.ratio+a.s):a.t[a.p]=a.c*this.ratio+a.s,a=a._next;this._onUpdate&&(e<0&&this._startAt&&-1e-4!==e&&this._startAt.render(e,t,n),t||(this._time!==s||i||n)&&this._callback("onUpdate")),
r&&(this._gc&&!n||(e<0&&this._startAt&&!this._onUpdate&&-1e-4!==e&&this._startAt.render(e,t,n),i&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[r]&&this._callback(r),0===l&&1e-10===this._rawPrevTime&&1e-10!==o&&(this._rawPrevTime=0)))}},d._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:k.selector(t)||t
;var i,r,a,o,s,l,c,u,d,p=n&&this._time&&n._startTime===this._startTime&&this._timeline===n._timeline;if((y(t)||_(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]){s=this._propLookup[i]||{},this._overwrittenProps=this._overwrittenProps||[],r=this._overwrittenProps[i]=e?this._overwrittenProps[i]||{}:"all";break}}else{if(t!==this.target)return!1;s=this._propLookup,
r=this._overwrittenProps=e?this._overwrittenProps||{}:"all"}if(s){if(c=e||s,u=e!==r&&"all"!==r&&e!==s&&("object"!=typeof e||!e._tempKill),n&&(k.onOverwrite||this.vars.onOverwrite)){for(a in c)s[a]&&(d||(d=[]),d.push(a));if((d||!e)&&!ne(this,n,t,d))return!1}for(a in c)(o=s[a])&&(p&&(o.f?o.t[o.p](o.s):o.t[o.p]=o.s,l=!0),o.pg&&o.t._kill(c)&&(l=!0),o.pg&&0!==o.t._overwriteProps.length||(o._prev?o._prev._next=o._next:o===this._firstPT&&(this._firstPT=o._next),o._next&&(o._next._prev=o._prev),
o._next=o._prev=null),delete s[a]),u&&(r[a]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},d.invalidate=function(){return this._notifyPluginsOfEnabled&&k._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=-1e-10,this.render(Math.min(0,-this._delay))),this},
d._enabled=function(e,t){if(h||p.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)&&k._onPluginEvent(e?"_onEnable":"_onDisable",this)},k.to=function(e,t,n){return new k(e,t,n)},k.from=function(e,t,n){return n.runBackwards=!0,n.immediateRender=0!=n.immediateRender,new k(e,t,n)},k.fromTo=function(e,t,n,i){
return i.startAt=n,i.immediateRender=0!=i.immediateRender&&0!=n.immediateRender,new k(e,t,i)},k.delayedCall=function(e,t,n,i,r){return new k(t,0,{delay:e,onComplete:t,onCompleteParams:n,callbackScope:i,onReverseComplete:t,onReverseCompleteParams:n,immediateRender:!1,lazy:!1,useFrames:r,overwrite:0})},k.set=function(e,t){return new k(e,0,t)},k.getTweensOf=function(e,t){if(null==e)return[];e="string"!=typeof e?e:k.selector(e)||e;var n,i,r,a;if((y(e)||_(e))&&"number"!=typeof e[0]){for(n=e.length,
i=[];--n>-1;)i=i.concat(k.getTweensOf(e[n],t));for(n=i.length;--n>-1;)for(a=i[n],r=n;--r>-1;)a===i[r]&&i.splice(n,1)}else if(e._gsTweenID)for(i=te(e).concat(),n=i.length;--n>-1;)(i[n]._gc||t&&!i[n].isActive())&&i.splice(n,1);return i||[]},k.killTweensOf=k.killDelayedCallsTo=function(e,t,n){"object"==typeof t&&(n=t,t=!1);for(var i=k.getTweensOf(e,t),r=i.length;--r>-1;)i[r]._kill(n,e)};var ae=M("plugins.TweenPlugin",function(e,t){this._overwriteProps=(e||"").split(","),
this._propName=this._overwriteProps[0],this._priority=t||0,this._super=ae.prototype},!0);if(d=ae.prototype,ae.version="1.19.0",ae.API=2,d._firstPT=null,d._addTween=H,d.setRatio=F,d._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},d._mod=d._roundProps=function(e){for(var t,n=this._firstPT;n;)t=e[this._propName]||null!=n.n&&e[n.n.split(this._propName+"_").join("")],t&&"function"==typeof t&&(2===n.f?n.t._applyPT.m=t:n.m=t),n=n._next},k._onPluginEvent=function(e,t){var n,i,r,a,o,s=t._firstPT;if("_onInitAllProps"===e){for(;s;){for(o=s._next,i=r;i&&i.pr>s.pr;)i=i._next;(s._prev=i?i._prev:a)?s._prev._next=s:r=s,(s._next=i)?i._prev=s:a=s,s=o}s=t._firstPT=r}
for(;s;)s.pg&&"function"==typeof s.t[e]&&s.t[e]()&&(n=!0),s=s._next;return n},ae.activate=function(e){for(var t=e.length;--t>-1;)e[t].API===ae.API&&(W[(new e[t])._propName]=e[t]);return!0},S.plugin=function(e){if(!(e&&e.propName&&e.init&&e.API))throw"illegal plugin definition.";var t,n=e.propName,i=e.priority||0,r=e.overwriteProps,a={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"
},o=M("plugins."+n.charAt(0).toUpperCase()+n.substr(1)+"Plugin",function(){ae.call(this,n,i),this._overwriteProps=r||[]},!0===e.global),s=o.prototype=new ae(n);s.constructor=o,o.API=e.API;for(t in a)"function"==typeof e[t]&&(s[a[t]]=e[t]);return o.version=e.version,ae.activate([o]),o},c=n._gsQueue){for(u=0;u<c.length;u++)c[u]();for(d in b)b[d].func||n.console.log("GSAP encountered missing dependency: "+d)}h=!1}}(void 0!==e&&e.exports&&void 0!==n?n:this||window)}).call(t,n(191))},function(e,t,n){
"use strict";n.d(t,"b",function(){return u});var i=n(16),r=n(334),a=n(130),o=n(609),s=n(24),l=n(31),c=n(81),u=a.a.ORIGINAL,d=o.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,showPrePlayArtwork:i.a.boolean,playThemeMusic:i.a.boolean,libraryRoutes:i.a.object,libraryTableColumns:i.a.object,listStyles:i.a.object,
isNotInterestedInPersonalCloud:i.a.boolean,hasDismissedPersonalCloudScanAlert:i.a.boolean,hasDismissedDVRUpsell:i.a.boolean,volume:i.a.integer,extrasPrefixCount:i.a.integer,restorePlayQueue:i.a.object,autoPlay:i.a.boolean,autoAdjustQuality:i.a.boolean,remoteSmallVideoAtOriginalQuality:i.a.boolean,useHomeStreamingRecommendedSettings:i.a.boolean,localQuality:i.a.integer,remoteQuality:i.a.integer,subtitlesBurnLevel:i.a.string,subtitleSize:i.a.integer,audioForceMultiChannel:i.a.boolean,
debugVideoQualityOverlay:i.a.boolean,showAdvancedSettings:i.a.boolean},defaults:function(){var e;return{columnAdjustment:0,searchAllServers:!1,relayReminders:{},calendarViewType:s.c.CALENDAR,timeFormat:"h:mma",showPrePlayArtwork:!1,playThemeMusic:!1,libraryRoutes:{},libraryTableColumns:{},listStyles:(e={},e[l.b]={episode:c.f,track:c.f},e[l.h]={track:c.f},e),isNotInterestedInPersonalCloud:!1,hasDismissedPersonalCloudScanAlert:!1,hasDismissedDVRUpsell:!1,volume:90,extrasPrefixCount:0,
restorePlayQueue:null,autoPlay:!0,autoAdjustQuality:!1,remoteSmallVideoAtOriginalQuality:!0,useHomeStreamingRecommendedSettings:!0,localQuality:u,remoteQuality:6,subtitlesBurnLevel:r.a.AUTO,subtitleSize:100,audioForceMultiChannel:!1,debugVideoQualityOverlay:!1,showAdvancedSettings:!1}}});t.a=d},function(e,t,n){"use strict";n.d(t,"b",function(){return d}),n.d(t,"a",function(){return p}),n.d(t,"c",function(){return h})
;var i,r=n(7),a=n.n(r),o=n(197),s=n(34),l=n(171),c=n(36),u="ui/player/playerControls/togglePlayerOpenState",d=(Object(c.a)(u),Object(c.a)(u,function(e){return a()({},e,{openState:o.a})})),p=Object(c.a)(u,function(e){return a()({},e,{openState:o.b})}),h=(i={},i[u]=function(e,t){var n=t.playerType,i=t.openState,r=Object(l.b)(e,n);Object(s.a)(function(){r.set({openState:i,isSettingsVisible:!1,isPlayQueueVisible:!1,isLyricsVisible:!1})})},i)},function(e,t,n){"use strict";function i(e){
return e.userRating===a}n.d(t,"b",function(){return r}),n.d(t,"a",function(){return a});var r=-1,a=10;t.c=i},function(e,t,n){"use strict";var i=n(1889),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(68),u=n(4),d=n(17),p=n(59),h=n(28),f=n(328),v=n(864),g=n(865),m=n(1890),y=n(400),b=y.a.extend({name:"addToPlaylistModal",className:"add-to-playlist-modal select-modal modal modal-sm fade",template:r.a,ui:{addBtn:".add-btn",newPlaylist:".message"},regions:{list:".playlists-container"},
events:o.a.extend({"click .playlist":"onPlaylistClick","keyup .message":"onNewPlaylistKeyUp","click .message":"onNewPlaylistClick","click .add-btn":"onAddClick"},y.a.prototype.events),initialize:function(e){y.a.prototype.initialize.apply(this,arguments),this.items=e.items,this.title=e.title,this.smart=e.smart,this.selectedType=e.type&&Object(h.r)(e.type).id,(!this.items||1===this.items.length&&this.items[0]===this.model)&&(this.ignoreTargets=!0);var t=Object(f.a)(this.model)
;this.model.get("isMetadataList")?this.mediaType=Object(h.q)(this.model.get("firstItemType")).mediaType:this.model.get("playQueueID")?this.mediaType=this.model.get("type"):o.a.isEmpty(t)||this.model.get("isExtra")?this.mediaType=Object(h.q)(this.model.get("type")).mediaType:this.mediaType=Object(h.q)(t.get("type")).mediaType,this.playlistList=new v.a({},{server:this.model.server,section:new c.c.Model({currentType:this.mediaType,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,isAlbums:this.mediaType===p.c}},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,n=this.model.server;this.ignoreTargets||(t=n.supports("playItemsBatchAdd")?this.items:o.a.first(this.items));var i=e.addContent(this.model,{items:t,sourceType:this.selectedType});return i.done(this.whenRendered(this.hide)),i.fail(this.whenRendered(function(){this.ui.addBtn.removeClass("active"),d.a.trigger("show:alert",{type:"error",message:Object(u.default)("There was a problem adding to the playlist.")})})),i},
_createPlaylist:function(){var e=this.ui.newPlaylist.val().trim();if(e){var t=new g.a({title:e,playlistType:this.mediaType,smart:this.smart},{server:this.model.server});this._addToPlaylist(t).then(o.a.bind(function(){d.a.trigger("navigate","playlist",{serverID:t.server.id,key:t.get("key").replace("/items","")})},this))}},onRender:function(){y.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 m.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=b},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(468),o=n(23),s=n(1943),l=o.a.extend({name:"AgentCollection",context:["server","mediaTypeID","primaryAgentID","relatedAgentID"],model:s.a,cache:new a.a,cacheKey:function(){var e=r.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!!r.a.intersection(this.pluck("identifier"),e).length}});t.a=l},function(e,t,n){!function(t,i){e.exports=i(n(5),n(321))}(0,function(e,t){function n(n){return{underscore:e,backbone:t}[n]}return 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 r(e,t){this._superset=e,this._filtered=new s(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,g),d.call(this,this._paginated,y),this.initialize(t)}var a=n("underscore"),o=n("backbone"),s=t(2),l=t(5),c=t(4),u=t(1),d=t(7),p={
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")}
},h=["filterBy","removeFilter","resetFilters","refilter","hasFilter","getFilters"],f=["filtered:add","filtered:remove","filtered:reset"],v=["setSort","reverseSort","removeSort"],g=["sorted:add","sorted:remove"],m=["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"]
;a.each(h,function(e){p[e]=function(){var t=s.prototype[e].apply(this._filtered,arguments);return t===this._filtered?this:t}}),a.each(m,function(e){p[e]=function(){var t=c.prototype[e].apply(this._paginated,arguments);return t===this._paginated?this:t}}),a.each(v,function(e){p[e]=function(){var t=l.prototype[e].apply(this._sorted,arguments);return t===this._sorted?this:t}}),a.each(b,function(e){p[e]=function(){
throw new Error("Backbone.Obscura: Unsupported method: "+e+"called on read-only proxy")}}),a.extend(r.prototype,p,o.Events),r=o.Collection.extend(r.prototype),r.FilteredCollection=s,r.SortedCollection=l,r.PaginatedCollection=c,e.exports=r},function(e,t){function i(e,t){function n(){t.length=e.length}function i(n){var i=r.toArray(arguments),a="change"===n||"change:"===n.slice(0,7);"reset"===n&&(t.models=e.models),
r.contains(s,n)?(r.contains(["add","remove","destroy"],n)?i[2]=t:r.contains(["reset","sort"],n)&&(i[1]=t),t.trigger.apply(this,i)):a&&t.contains(i[1])&&t.trigger.apply(this,i)}var l={};return r.each(r.functions(a.Collection.prototype),function(t){r.contains(o,t)||(l[t]=function(){return e[t].apply(e,arguments)})}),r.extend(t,a.Events,l),t.listenTo(e,"all",n),t.listenTo(e,"all",i),t.models=e.models,n(),t}
var r=n("underscore"),a=n("backbone"),o=["_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"],s=["add","remove","reset","sort","destroy","sync","request","error"];e.exports=i},function(e,i){function r(){this._filterResultCache={}}function a(e){
for(var t in this._filterResultCache)this._filterResultCache.hasOwnProperty(t)&&delete this._filterResultCache[t][e]}function o(e,t){this._filters[e]&&a.call(this,e),this._filters[e]=t,this.trigger("filtered:add",e)}function s(e){delete this._filters[e],a.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(m.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 p(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 h(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)&&h.call(this,arguments[1])}function v(e){this.contains(e)&&this._collection.remove(e),this.length=this._collection.length}function g(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",p),this.listenTo(this._superset,"remove",v),this.listenTo(this._superset,"all",f)}
var m=n("underscore"),y=n("backbone"),b=t(1),I=t(3),S={defaultFilterName:"__default",filterBy:function(e,t){return t||(t=e,e=this.defaultFilterName),o.call(this,e,I(t)),c.call(this),this},removeFilter:function(e){return e||(e=this.defaultFilterName),s.call(this,e),c.call(this),this},resetFilters:function(){return this._filters={},r.call(this),this.trigger("filtered:reset"),c.call(this),this},superset:function(){return this._superset},refilter:function(e){
return"object"==typeof e&&e.cid?p.call(this,e):(r.call(this),c.call(this)),this},getFilters:function(){return m.keys(this._filters)},hasFilter:function(e){return m.contains(this.getFilters(),e)},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this.length=0,this.trigger("filtered:destroy")}};m.extend(g.prototype,S,y.Events),e.exports=g},function(e,t){function i(e,t){return function(n){return n.get(e)===t}}function r(e,t){return function(n){
return t(n.get(e))}}function a(e,t){return l.isArray(t)||(t=null),{fn:e,keys:t}}function o(e){var t=l.keys(e),n=l.map(t,function(t){var n=e[t];return l.isFunction(n)?r(t,n):i(t,n)});return a(function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0},t)}function s(e,t){return l.isFunction(e)?a(e,t):l.isObject(e)?o(e):void 0}var l=n("underscore");e.exports=s},function(e,i){function r(){var e=this.getPage()*this.getPerPage();return[e,e+this.getPerPage()]}function a(){var e=r.call(this)
;this._collection.reset(this.superset().slice(e[0],e[1]))}function o(){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 s(){o.call(this)||a.call(this)}function l(e,t){for(var n=d.max([e.length,t.length]),i=0,r=0;i<n;i+=1,r+=1)if(e[i]!==t[r])if(t[i-1]===e[i])r-=1;else{
if(t[i+1]!==e[i])return e[i];r+=1}}function c(e,t,n){if(!o.call(this)){var i=r.call(this),a=i[0],s=i[1],c=l(this.superset().slice(a,s),this._collection.toArray()),u=l(this._collection.toArray(),this.superset().slice(a,s));u&&this._collection.remove(u),c&&this._collection.add(c,{at:this.superset().indexOf(c)-a})}}function u(e,t){this._superset=e,this._collection=new p.Collection(e.toArray()),this._page=0,this.setPerPage(t&&t.perPage?t.perPage:null),h(this._collection,this),
this.listenTo(this._superset,"add remove",c),this.listenTo(this._superset,"reset sort",s)}var d=n("underscore"),p=n("backbone"),h=t(1),f={removePagination:function(){return this.setPerPage(null),this},setPerPage:function(e){return this._perPage=e,s.call(this),this.setPage(0),this.trigger("paginated:change:perPage",{perPage:e,numPages:this.getNumPages()}),this},setPage:function(e){var t=this.getNumPages()-1;return e=e>0?e:0,e=e<t?e:t,e=e<0?0:e,this._page=e,a.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,p.Events),e.exports=u},function(e,i){function r(e){return d.isFunction(e)?e:function(t){return t.get(e)}}function a(e){
return this._comparator?this._reverse?f(this._collection.toArray(),e,r(this._comparator)):d.sortedIndex(this._collection.toArray(),e,r(this._comparator)):this._superset.indexOf(e)}function o(e){var t=a.call(this,e);this._collection.add(e,{at:t})}function s(e){this.contains(e)&&this._collection.remove(e)}function l(e){this.contains(e)&&this._collection.indexOf(e)!==a.call(this,e)&&(this._collection.remove(e),o.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 p.Collection(e.toArray()),h(this._collection,this),this.listenTo(this._superset,"add",o),this.listenTo(this._superset,"remove",s),this.listenTo(this._superset,"change",l),this.listenTo(this._superset,"reset",c)}
var d=n("underscore"),p=n("backbone"),h=t(1),f=t(6),v={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,v,p.Events),e.exports=u},function(e,t){function i(e){return a.isFunction(e)?e:function(t){return t[e]}}function r(e,t,n,r){n=null==n?a.identity:i(n);for(var o=n.call(r,t),s=0,l=e.length;s<l;){var c=s+l>>>1;n.call(r,e[c])<o?l=c:s=c+1}return s}var a=n("underscore");e.exports=r},function(e,t){function i(e,t){r.each(t,function(t){this.listenTo(e,t,function(){var e=r.toArray(arguments);e.unshift(t),this.trigger.apply(this,e)})},this)}
var r=n("underscore");e.exports=i}],t(0)}()})},function(e,t,n){"use strict";var i=n(1959),r=n.n(i),a=n(12),o=n.n(a),s=n(330),l=n(687),c=n(1963),u=n(1965),d=n(70),p=n(1967),h=n(1969),f=n(1975),v=n(1977),g=d.a.extend({mixins:[s.a],name:"convertModal",className:"convert-modal modal fade",template:r.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 p.a),this.listenForStateRequests();var e=this.options.item,t=e&&!e.get("isMetadataList"),n=o.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 h.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 v.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=g
},function(e,t,n){"use strict";function i(e){var t=e.formGroupClassName,n=e.formLabelClassName,i=e.name,r=e.labelText,o=e.helpText,l=e.showErrors,u=e.errors,d=e.children,h=c()(e,["formGroupClassName","formLabelClassName","name","labelText","helpText","showErrors","errors","children"]);return s()(f.a,{className:t},void 0,d,s()(v.a,{className:n,showErrors:l,errors:u,name:i,labelText:r}),p.a.createElement(m.a,a()({name:i,hasError:l},h)),o&&s()(g.a,{},void 0,o))}
var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(146),f=n(181),v=n(429),g=n(353),m=n(226);t.a=Object(h.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.formGroupClassName,n=e.labelText,i=e.checkboxText,r=e.helpText,o=e.showErrors,l=e.errors,u=c()(e,["formGroupClassName","labelText","checkboxText","helpText","showErrors","errors"]),d=l[0];return s()(f.a,{className:t},void 0,n&&s()(v.a,{},void 0,n),p.a.createElement(m.a,a()({hasError:o,
checkboxText:s()("span",{},void 0,i,o&&d&&" \u2014 "+d)},u)),r&&s()(g.a,{},void 0,r))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(146),f=n(181),v=n(133),g=n(353),m=n(290);i.defaultProps={showErrors:!1,errors:[]},t.a=Object(h.a)(i)},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"b",function(){return c}),n.d(t,"c",function(){return u})
;var i,r=n(15),a=n(36),o=n(2035),s=Object(a.a)("ui/player/remoteCastPlayer/changeCastApiAvailability"),l=Object(a.a)("ui/player/remoteCastPlayer/requestCastSession"),c=Object(a.a)("ui/player/remoteCastPlayer/changeRemoteCastPlayer"),u=(i={},i["ui/player/remoteCastPlayer/changeCastApiAvailability"]=function(e,t){e.set("isCastApiAvailable",t)},i["ui/player/remoteCastPlayer/requestCastSession"]=function(e){Object(r.d)("remoteCastPlayerManager").requestSession()},
i["ui/player/remoteCastPlayer/changeRemoteCastPlayer"]=function(e,t){var n=e.get("ui"),i=n.get("audioVideoPlayer"),r=n.get("photoPlayer");i.get("isOpen")&&i.set("confirmLocalToRemote",!0),r.get("isOpen")&&r.set("confirmLocalToRemote",!0),e.set("remotePlayer",new o.a(t,{parse:!0}))},i)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.kind,i=e.size,r=e.direction,o=e.isSelected;return a()("div",{
className:(t||"")+" "+(p.a[r]||"")+" "+(p.a[n]||"")+" "+(p.a[i]||"")+" "+(o&&p.a.isSelected||""||"")})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(419)),c=n(65),u=n(61),d=n(2038),p=n.n(d);i.defaultProps={className:p.a.disclosureArrow,direction:l.DOWN,kind:c.DEFAULT,size:u.MEDIUM,isSelected:!1},t.a=i},function(e,t,n){"use strict";function i(e,t){var n=encodeURIComponent(e.machineIdentifier),i=encodeURIComponent(t.identifier),r="/server/"+n
;return t.isLibraryProvider?r:(e.isCloud?"":r)+"/provider/"+i}t.a=i},function(e,t,n){"use strict";var i=n(227),r=(n.n(i),n(432)),a=n.n(r);t.a=Object(i.DragDropContext)(a.a)},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0,clientOffset:null},n=t.publishSource,i=t.clientOffset,r=t.getSourceClientOffset;(0,d.default)((0,h.default)(e),"Expected sourceIds to be an array.")
;var a=this.getMonitor(),o=this.getRegistry();(0,d.default)(!a.isDragging(),"Cannot call beginDrag while dragging.");for(var s=0;s<e.length;s++)(0,d.default)(o.getSource(e[s]),"Expected sourceIds to be registered.");for(var l=null,c=e.length-1;c>=0;c--)if(a.canDragSource(e[c])){l=e[c];break}if(null!==l){var u=null;i&&((0,d.default)("function"==typeof r,"When clientOffset is provided, getSourceClientOffset must be a function."),u=r(l));var p=o.getSource(l),f=p.beginDrag(a,l);(0,d.default)((0,
v.default)(f),"Item must be an object."),o.pinSource(l);var g=o.getSourceType(l);return{type:y,itemType:g,item:f,sourceId:l,clientOffset:i,sourceClientOffset:u,isSourcePublic:n}}}function a(){if(this.getMonitor().isDragging())return{type:b}}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.clientOffset,i=void 0===n?null:n;(0,d.default)((0,h.default)(e),"Expected targetIds to be an array.");var r=e.slice(0),a=this.getMonitor(),o=this.getRegistry();(0,
d.default)(a.isDragging(),"Cannot call hover while not dragging."),(0,d.default)(!a.didDrop(),"Cannot call hover after drop.");for(var s=0;s<r.length;s++){var l=r[s];(0,d.default)(r.lastIndexOf(l)===s,"Expected targetIds to be unique in the passed array.");var c=o.getTarget(l);(0,d.default)(c,"Expected targetIds to be registered.")}for(var u=a.getItemType(),p=r.length-1;p>=0;p--){var f=r[p],v=o.getTargetType(f);(0,m.default)(v,u)||r.splice(p,1)}for(var g=0;g<r.length;g++){var y=r[g]
;o.getTarget(y).hover(a,y)}return{type:I,targetIds:r,clientOffset:i}}function s(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.getMonitor(),i=this.getRegistry();(0,d.default)(n.isDragging(),"Cannot call drop while not dragging."),(0,d.default)(!n.didDrop(),"Cannot call drop twice during one drag operation.");var r=n.getTargetIds().filter(n.canDropOnTarget,n);r.reverse(),r.forEach(function(r,a){var o=i.getTarget(r),s=o.drop(n,r);(0,d.default)(void 0===s||(0,
v.default)(s),"Drop result must either be an object or undefined."),void 0===s&&(s=0===a?{}:n.getDropResult()),e.store.dispatch({type:S,dropResult:c({},t,s)})})}function l(){var e=this.getMonitor(),t=this.getRegistry();(0,d.default)(e.isDragging(),"Cannot call endDrag while not dragging.");var n=e.getSourceId();return t.getSource(n,!0).endDrag(e,n),t.unpinSource(),{type:M}}Object.defineProperty(t,"__esModule",{value:!0}),t.END_DRAG=t.DROP=t.HOVER=t.PUBLISH_DRAG_SOURCE=t.BEGIN_DRAG=void 0
;var c=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.beginDrag=r,t.publishDragSource=a,t.hover=o,t.drop=s,t.endDrag=l;var u=n(141),d=i(u),p=n(292),h=i(p),f=n(430),v=i(f),g=n(1006),m=i(g),y=t.BEGIN_DRAG="dnd-core/BEGIN_DRAG",b=t.PUBLISH_DRAG_SOURCE="dnd-core/PUBLISH_DRAG_SOURCE",I=t.HOVER="dnd-core/HOVER",S=t.DROP="dnd-core/DROP",M=t.END_DRAG="dnd-core/END_DRAG"},function(e,t,n){
var i=n(511),r=i(Object,"create");e.exports=r},function(e,t,n){function i(e,t){var n=a(e,t);return r(n)?n:void 0}var r=n(2095),a=n(2099);e.exports=i},function(e,t,n){function i(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}var r=n(696);e.exports=i},function(e,t,n){function i(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}var r=n(2112);e.exports=i},function(e,t,n){function i(e){return a(e)&&r(e)}var r=n(702),a=n(408);e.exports=i},function(e,t,n){
"use strict";function i(e){return{type:s,sourceId:e}}function r(e){return{type:l,targetId:e}}function a(e){return{type:c,sourceId:e}}function o(e){return{type:u,targetId:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.addSource=i,t.addTarget=r,t.removeSource=a,t.removeTarget=o;var s=t.ADD_SOURCE="dnd-core/ADD_SOURCE",l=t.ADD_TARGET="dnd-core/ADD_TARGET",c=t.REMOVE_SOURCE="dnd-core/REMOVE_SOURCE",u=t.REMOVE_TARGET="dnd-core/REMOVE_TARGET"},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";function i(e){var t=e.className,n=e.title;return a()("span",{className:t,title:n},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0));n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),Object(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return{title:e.title,route:t}})}var r=n(6),a=(n.n(r),
n(57)),o=n(21),s=n(356),l=n(357);t.a=Object(a.a)(i)(l.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.leafCount,i=void 0;return null!=n&&(i=1===n?Object(l.default)("{episodeCount} episode",{episodeCount:n}):Object(l.default)("{episodeCount} episodes",{episodeCount:n})),a()("span",{className:t},void 0,i)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.duration;return n?a()("span",{className:t
},void 0,Object(l.a)(n)):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(351));t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return!1;var t=a.a.unix(e);return a()().subtract(1,"day").isSame(t,"day")}t.a=i;var r=n(41),a=n.n(r)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e){return e&&e.currentPosition})}t.a=i;var r=n(6),a=(n.n(r),n(198))},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(Object(a.a)(),Object(o.a)(),function(e,t){if(null!=e)for(var n=0;n<t.length;n++)for(var i=t[n],r=0;r<i.Media.length;r++){var a=i.Media[r],o=a.beginsAt,s=a.endsAt;if(o<=e&&s>e)return i}})}t.a=i;var r=n(6),a=(n.n(r),n(522)),o=n(676)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.circleClassName,i=e.iconClassName,r=e.title,o=c()(e,["className","circleClassName","iconClassName","title"]);return p.a.createElement(h.a,a()({className:t,
"aria-label":Object(f.default)("Record {title}",{title:r})},o),s()(v.a,{circleClassName:n,iconClassName:i}))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(22),f=n(4),v=n(1059),g=n(2254),m=n.n(g);i.defaultProps={className:m.a.recordButton},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=a()(e,["children"]);return l.a.createElement("div",n,t)}var r=n(13),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(2265),u=n.n(c);i.defaultProps={
className:u.a.dragLayer},t.a=i},function(e,t,n){"use strict";function i(e,t){return e>t?50:e<=0||t<=0?0:parseFloat((e/t*100).toFixed(2))}t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(94),l=n(43),c=n(40),u=n(16),d=n(51),p=n(470),h=n(18),f=n(325),v=n(673),g=n(2281),m=n(276),y=h.a.extend({name:"MediaSubscriptionModel",context:["server"],entityType:l.e,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state
;return Object(c.a)(this.entityType,e.key||this.cid,this.server.entityID())},idAttribute:"key",rootPropertyName:"MediaSubscription",urlRoot:"/media/subscriptions",mergeStrategy:p.a,syncedAttrs:{key:u.a.string,type:u.a.integer,provider:u.a.string,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:v.default,rootPropertyName:"MediaGrabOperation",deferred:!0},prefs:{relationClass:m.a,rootPropertyName:"Setting",deferred:!0,save:!0},timeline:{relationClass:f.a,rootPropertyName:"Timeline",deferred:!0}},augmentResponseText:function(e,t){return t===d.a.xml?Object(s.b)(e):e},augmentResponse:function(e){var t=e[this.rootPropertyName]||e,n=t.Timeline;return n&&(t.Timeline=n.Metadata),e},getSaveParams:function(){
var e=h.a.prototype.getSaveParams.apply(this,arguments),t=e.Setting,n=o()(e,["Setting"]);return r()({prefs:t},n)}});t.a=y},function(e,t,n){"use strict";var i=n(2284),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(15),u=n(4),d=n(17),p=n(67),h=n(19),f=n(166),v=n(28),g=n(397),m=n(55),y=n(76),b=n(113),I=n(122),S=n(2285),M=n(2294),D=n(2312),C=n(2318),O=n(2320),j=n(70),P=n(394),w=n(425),T=j.a.extend({mixins:[w.a],name:"editSectionModal",className:"edit-section-modal modal modal-lg fade",template:r.a,
panes:{type:{constructor:C.a,nextPane:"folders",dependentPanes:function(){return this.showFolders?["folders"]:["options","advanced"]}},folders:{constructor:M.a,nextPane:"options",dependentPanes:["options","advanced"]},options:{constructor:D.a,nextPane:"advanced"},advanced:{constructor:S.a},error:{constructor:O.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:o.a.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onSaveClick","submit .edit-section-type-form":"onGeneralFormSubmit"},j.a.prototype.events),onlyAfterRender:["showPane","updateMessage","updateSectionTitle","updateSectionTitleDestabilized","updateSaveBtn"],paneConstructorArg:function(){return{isDefaultSection:this.isDefaultSection}},initialize:function(e){var t=this;j.a.prototype.initialize.apply(this,arguments),this.server=e.server,
this.redirect=e.redirect,this.isDefaultSection=e.isDefaultSection,this.isLoading=!0,this.model?(this.tempModel=this.model.clone(),this.tempModel.collection=this.model.collection):this.tempModel=new g.a({},{server:this.server,collection:this.server.get("sections")}),this.listenTo(this.tempModel,"change:type",this.onSectionTypeChange),this.tempModel.isNew()&&e.seedAttrs&&this.tempModel.set(this.tempModel.parse(e.seedAttrs)),this._deferred=l.a.Deferred(),this.promise=this._deferred.promise()
;var n=this.server.get("desktop").get("providers");n.populate().done(this.whenRendered(function(){var i=n.get(m.c.LIBRARY_PROVIDER_IDENTIFIER),r=i.get("features").get(y.b.MANAGE),a=r.get("automaticLibraryFolders");t.showFolders=!a,t.isLoading=!1,t.render(),t.showPane(e.selectedPane||"type")}))},serializeData:function(){var e=this.tempModel,t=e.isNew();return{isLoading:this.isLoading,add:t,edit:!t,section:e&&e.toJSON(),selectedPane:this.selectedPane,showFolders:this.showFolders}},
updateMessage:function(e){this.ui.message.text(e||"")},updateSaveBtn:function(){var e=this.ui.saveBtn,t=this.panes[this.selectedPane],n=o.a.bind(function(n){var i=t.nextPane,r=this.tempModel.isNew(),a=!t.constructor.prototype.validate||0===t.constructor.prototype.validate(this.tempModel).length,o=!this.getReachablePanes().isAnyInvalid;this.ui.optionsBtn.toggleClass("hidden",!n.showOptions);var s,l=o||r&&a;s=i,n.showOptions||"options"!==i||(s=!1),o&&(s=!1),n.showOptions&&"options"===i&&(s=!0),
n.showAdvanced&&"advanced"===i&&(s=!0),e.toggleClass("save",!s),e.toggleClass("next",!!s),e.toggleClass("disabled",!l)},this),i=this.tempModel.server,r=this.tempModel.sectionType,a=r&&"music"===r.key,s=r&&"photos"===r.key,l=a&&i.supports("premiumMusic"),c=s&&i.get("photoAutoTag")&&i.hasOwnerFeature("photo_autotags"),u=this.tempModel.isNew();l?this.paneRegion.currentView.populateAgents().then(function(e){var t=e.findWhere({identifier:"com.plexapp.agents.plexmusic"}),i=u&&t;n({showOptions:i,
showAdvanced:i})}):c?this.paneRegion.currentView.populateSectionSettings().then(function(){n({showOptions:!0,showAdvanced:!1})}):n({})},updateSectionTitle:function(){var e=f.a.get(this.tempModel.get("type"));if(e){this.updateSectionTitleDestabilized();var t=o.a.escape(e.title);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(o.a.bind(function(e){503===e.status?d.a.trigger("show:modal",new P.a({model:this.server})):this.updateMessage(Object(u.default)("Your changes could not be saved."))},this)),t.then(o.a.bind(function(){var e=this.model.server.entityID(),t=Object(c.d)("appStore").dispatch
;if(t(Object(b.h)({serverEntityID:e})),t(Object(b.g)({serverEntityID:e})),!this.redirect)return this._deferred.resolve(),void this.hide();var n={machineIdentifier:this.model.server.id},i={isLibraryProvider:!0},r={};this.model.get("type")===v.b&&(r.type=Object(v.r)(v.a).id,r.sort="addedAt:desc"),window.location.hash=Object(I.a)(n,i,this.model.id,r),this._deferred.resolve(),this.hide()},this))},saveModel:function(){var e;return this.tempModel.isNew()?(e=this.tempModel.save(),
e=e.then(o.a.bind(function(e,t,n){var i=p.a.parseXML(e);if(201===n.status){if(i.Directory&&(i=i.Directory),!i.key){var r=n.getResponseHeader("Location");r&&(i.key=r.substring(r.lastIndexOf("/")+1))}var a=this.server;return a.supports("advancedFilters")&&(i.filters=!0),this.model=new g.a(i,{parse:!0,server:this.server}),a.get("sections").add(this.model),n}},this))):(this.model.copy(this.tempModel),e=this.model.save()),e=e.then(o.a.bind(this.saveSettings,this)),
e=e.then(o.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(o.a.isEmpty(n))return e;var i=t.first(),r=i.getSaveParams(n),a=h.join(["/library/sections/",this.model.id,"/prefs"],r),s=o.a.extend(this.server.getXHROptions(a),{type:"PUT"});return l.a.ajax(s).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(o.a.isEmpty(n))return e;var i=t.first(),r=i.getSaveParams(n),a=o.a.result(t,"url"),s=h.join([a,"/set"],r),c=i.server.getXHROptions(s);return l.a.ajax(c).promise().then(function(){return e})},getSettingsChanges:function(e){return 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},{})},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;"folders"!==n||this.showFolders||(n=this.ui.sidebar.find(".options-btn").isDisabled()?"advanced":"options"),n&&!this.ui.sidebar.find("."+n+"-btn").isDisabled()&&this.showPane(n)}else this.save()},onGeneralFormSubmit:function(e){this.onSaveClick(e)},onSectionTypeChange:function(){this.updateSaveBtn()}});t.a=T},function(e,t,n){"use strict"
;n.d(t,"b",function(){return v});var i=n(18),r=n(16),a=n(276),o=n(728),s=n(299),l=n(1074),c=n(2369),u=n(729),d=n(2371),p=n(1077),h=n(2378),f=n(1078),v={DEVICE:"device",UNSUPPORTED_DEVICE:"unsupportedDevice",DEVICE_CHANNELS:"deviceChannels",EPG:"epg",EPG_MAPPING:"epgMapping",CHANNEL_MAPPING:"channelMapping",EPG_DOWNLOAD:"epgDownload"},g=i.a.extend({name:"DVRSetupModel",context:["server"],sessionAttrs:{isDevicesPending:r.a.boolean,isDevicesPopulated:r.a.boolean,devicesError:r.a.object,
isDiscoveringDevices:r.a.boolean,isChannelMappingsPending:r.a.boolean,isChannelMappingsPopulated:r.a.boolean,channelMappingsError:r.a.object,isChannelMappingsSaving:r.a.boolean,channelMappingsSaveError:r.a.object,isLineupChannelsPending:r.a.boolean,isLineupChannelsPopulated:r.a.boolean,lineupChannelsError:r.a.object,epgLineupActivityID:r.a.string,epgDownloadActivityID:r.a.string,step:r.a.string,selectedLineupUUID:r.a.string,addDevicePending:r.a.boolean,isSavingDVR:r.a.boolean,
hasScannedChannels:r.a.boolean},sessionRelations:{devices:{relationClass:o.a},lineupChannels:{relationClass:c.a},epgSettings:{relationClass:d.a},channelMappings:{relationClass:l.a},selectedDVR:{relationClass:p.a,deferred:!0},selectedDevice:{relationClass:s.a,deferred:!0},selectedLanguage:{relationClass:u.a,deferred:!0},setupErrorMessages:{relationClass:h.a},scanPrefs:{relationClass:a.a,deferred:!0},scanNetworks:{relationClass:f.a,deferred:!0}},defaults:{step:v.DEVICE,isDevicesPending:!1,
isDevicesPopulated:!1,isDiscoveringDevices:!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,hasScannedChannels:!1}});t.a=g},function(e,t,n){"use strict";function i(e,t){if(e===t)return 0
;for(var n=e.split("."),i=t.split("."),r=0;r<n.length;r++){if(!i[r])return 1;var a=parseInt(n[r],10),o=parseInt(i[r],10);if(a>o)return 1;if(a<o)return-1}return 0}t.a=i},function(e,t,n){"use strict";function i(e){switch(e){case"movie":case"show":return[g.a];case"episode":return[m.a,y.a];case"playlist":default:return[g.a]}}function r(e){
var t=e.serverEntityID,n=e.providerEntityID,r=e.target,a=e.useStaticHeight,s=e.children,c=r.type,u=r.subtype,g=r.thumb,m=r.grandparentThumb,y="playlist"===c?"show":c;return l()("div",{className:S.a.container},void 0,l()("div",{className:S.a.left},void 0,l()(f.a,{serverEntityID:t,providerEntityID:n,component:v.a,type:y,width:M,height:Object(h.d)(M,y,u),url:m||g},void 0,l()("div",{className:S.a.subscriptionBadge},void 0,l()(p.a,{type:c})))),l()("div",{className:S.a.right},void 0,l()("div",{
className:a?S.a.staticHeightTitleContainer:S.a.titleContainer},void 0,i(c).map(function(e,t){return d.a.createElement(b.a,o()({key:t,component:e,isSecondary:t>0},r))})),s))}var a=n(7),o=n.n(a),s=n(2),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(438),h=n(121),f=n(296),v=n(256),g=n(517),m=n(730),y=n(713),b=n(2385),I=n(2387),S=n.n(I),M=130;r.defaultProps={useStaticHeight:!1},t.a=r},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(7),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(15)),g=n(35),m=n(73),y=n(24),b=n(29),I=n(132),S=n(2418),M=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onModalClose=function(){Object(v.d)("metrics").trackClick(o()({},i.props.metricsProperties,{page:g.P,action:m.V})),i.props.onModalClose()},r=n,
u()(i,r)}return p()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(b.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.isOpen,n=e.metricsProperties;return r()(I.a,{size:y.e.LARGE,isOpen:t,metricsPage:g.P,metricsProperties:n,onModalClose:this.onModalClose},void 0,r()(S.a,{metricsProperties:n,onModalClose:this.onModalClose}))},t}(f.Component);t.a=M},function(e,t,n){"use strict";function i(e,t,n){
var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;Object(s.a)(n)&&i<0&&i++;var l=e+n+i+r;if(h.hasOwnProperty(l))return h[l];var f=Object(u.c)(e,t,n),v=parseInt(c.a.posterTitleHeight,10),g=parseInt(c.a.posterTitlePadding,10),m=void 0,y=void 0,b=void 0,I=void 0;Object(s.a)(n)?(m=Math.max(2,r-1),y=300,b=1,I=4,g*=2):(m="mixed"===e?r+3:r,y=f>1?180:120,b=2,I=11);var S=m*v+g,M=Object(o.c)({direction:o.a,rows:1,overscan:0,
innerHorizontalPadding:30,innerVerticalPadding:30,outerPaddingTop:10,outerPaddingRight:5,outerPaddingBottom:5,outerPaddingLeft:5,getCellWidth:function(e){return Object(d.a)(a()({},e,{minCellWidth:y,minColumns:b,maxColumns:I,columnAdjustment:i,aspectRatio:f}))},getCellHeight:function(e){return Object(p.a)(a()({},e,{aspectRatio:f,titleHeight:S}))}});return M.cellOptions={minCellWidth:y,minColumns:b,maxColumns:I,columnAdjustment:i,aspectRatio:f,titleHeight:S},h[l]=M,M}t.a=i
;var r=n(7),a=n.n(r),o=n(534),s=n(1093),l=n(45),c=n.n(l),u=n(121),d=n(734),p=n(1094),h={}},function(e,t,n){"use strict";function i(){function e(e,t){var n=[j,w,E,N,t];for(var i in e)n.push(e[i]);var r=n.join(":");if(r===F)return Q;k=e.listTop,_=e.listLeft;var s=(e.viewportWidth||0)-w-N,l=(e.viewportHeight||0)-j-E;g===a?s-=_:l-=k,s=Math.max(0,s),l=Math.max(0,l),R=A({innerViewportWidth:s,innerViewportHeight:l,innerHorizontalPadding:M,innerVerticalPadding:C}),z=L({cellWidth:R,innerViewportWidth:s,
innerViewportHeight:l,innerHorizontalPadding:M,innerVerticalPadding:C}),U=Math.max(0,m||Math.floor((l+C)/(z+C))),B=Math.max(0,y||Math.floor((s+M)/(R+M))),V=B*U;var c=0,u=0;return g===a&&B?(c=B*(R+M)-M,u=Math.ceil(t/B)*(z+C)-C):g===o&&U&&(c=Math.ceil(t/U)*(R+M)-M,u=U*(z+C)-C),H={},F=r,Q={width:c+w+N,height:u+j+E}}function t(e){var t=e;if(H[t])return H[t];var n=l(e),i=s(e),r={column:n,row:i,cellX:n*(R+M)+_+N,cellY:i*(z+C)+k+j,cellWidth:R,cellHeight:z};return H[t]=r,r}function n(e,t,n){
var i=z+C,o=R+M,s=e-k,l=t-_,c=g===a?B:U,u=g===a?s/i:l/o,d=V+2*c+I*c*2,p=Math.ceil(u)*c,h=p+V-1,f=Math.floor(u)*c,v=p+V+c-1,m=f-c*I,y=Object(r.a)(m,n)+d-1;return y>=n&&(m=n-d),{visibleStartIndex:Object(r.a)(p,n),visibleEndIndex:Object(r.a)(h,n),partiallyVisibleStartIndex:Object(r.a)(f,n),partiallyVisibleEndIndex:Object(r.a)(v,n),renderStartIndex:Object(r.a)(m,n),renderEndIndex:Object(r.a)(y,n)}}function i(e,t,n,i){var s=g===n,l=g===a&&1===B||g===o&&1===U;if(s&&l)return Object(r.a)(e+t,i)
;var h=void 0,f=void 0,v=void 0;n===a&&(h=s?B*t:t,f=u(e,i),v=p(e,i)),n===o&&(h=s?U*t:t,f=c(e,i),v=d(e,i));var m=e+h;return f||v?Math.max(Math.min(m,v),f):e}function s(e){return g===a?Math.floor(e/B):e%U}function l(e){return g===a?e%B:Math.floor(e/U)}function c(e,t){var n=s(e);return g===a?n*B:n}function u(e,t){var n=l(e);return g===a?n:n*U}function d(e,t){if(g===a){var n=c(e,t);return Object(r.a)(n+(B-1),t)}var i=t-1,o=s(e),u=l(i),d=(u+1)*U-(U-o);return d<t?d:i-t%U-(U-1-o)}function p(e,t){
if(g===a){var n=t-1,i=l(e),o=s(n),c=(o+1)*B-(B-i);return c<t?c:n-t%B-(B-1-i)}var d=u(e,t);return Object(r.a)(d+(U-1),t)}function h(e,t){var n=s(e),i=s(t),r=l(e),a=l(t);return Math.sqrt(Math.pow(i-n,2)+Math.pow(a-r,2))}
var f=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},v=f.direction,g=void 0===v?a:v,m=f.rows,y=f.columns,b=f.overscan,I=void 0===b?0:b,S=f.innerHorizontalPadding,M=void 0===S?0:S,D=f.innerVerticalPadding,C=void 0===D?0:D,O=f.outerPaddingTop,j=void 0===O?0:O,P=f.outerPaddingRight,w=void 0===P?0:P,T=f.outerPaddingBottom,E=void 0===T?0:T,x=f.outerPaddingLeft,N=void 0===x?0:x,A=f.getCellWidth,L=f.getCellHeight,k=void 0,_=void 0,R=void 0,z=void 0,U=void 0,B=void 0,V=void 0,F=void 0,Q=void 0,H=void 0
;return{options:f,getListStyle:e,getRelativeIndex:i,getCoordinateDistance:h,getPositionForIndex:t,getRangesForPosition:n}}n.d(t,"b",function(){return a}),n.d(t,"a",function(){return o}),t.c=i;var r=(n(33),n(2432)),a="vertical",o="horizontal"},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(4),v=n(367),g=n(101),m=n(29),y=(n(735),n(31),n(26)),b=n(22),I=n(259),S=n(442),M=n(368),D=n(2437),C=n.n(D),O=function(e){
function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onListUpdate=function(e){var t=e.visibleStartIndex,n=e.visibleEndIndex,i=e.renderEndIndex,a=e.listStyle,o=r.props.onListReady,s=r._isReady?void 0:o;r._isReady=!0,r._visibleStartIndex=t,r._visibleEndIndex=n,r._pageSize=r._visibleEndIndex-r._visibleStartIndex;var l=t>0,c=i>n;r.setState({showActions:l||c,enablePrevious:l,enableNext:c,listHeight:a.height},s)},r.onListScrollIndexChange=function(e){r.setState({scrollIndex:e})},
r.onPreviousPress=function(e){r.setState({scrollIndex:r._visibleStartIndex-r._pageSize-1})},r.onNextPress=function(e){r.setState({scrollIndex:r._visibleEndIndex+1})},r.state={showActions:!1,enablePrevious:!1,enableNext:!1,listHeight:"auto",scrollIndex:0},r._isReady=!1,r}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 Object(m.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.hubIdentifier,i=e.title,a=e.hubLink,o=e.listType,s=e.listContext,l=e.size,c=e.more,u=e.random,d=e.totalSize,p=e.keyPropName,m=e.itemsOffset,D=e.items,O=e.layout,j=e.cellRenderer,P=e.onPageRequest,w=this.state,T=w.showActions,E=w.enablePrevious,x=w.enableNext,N=w.listHeight;if(!l&&!d)return null
;var A=Object(v.a)(i),L=c?l+1:l,k={visibility:"auto"===N?"hidden":"visible"},_={height:N,overflow:"hidden"};return r()("div",{className:t,style:k,"data-qa-id":"hub--"+n},void 0,r()(S.a,{},void 0,r()(M.a,{},void 0,a&&A?r()(b.a,{to:a},void 0,A):A),T&&r()("div",{className:C.a.hubActions},void 0,r()(b.a,{className:C.a.hubScrollButton,"data-qa-id":"hubPreviousButton",isDisabled:!E,onPress:this.onPreviousPress},void 0,r()(y.a,{name:"plex-icon-hub-prev-560",
"aria-label":Object(f.default)("Previous Page")})),r()(b.a,{className:C.a.hubScrollButton,"data-qa-id":"hubNextButton",isDisabled:!x,onPress:this.onNextPress},void 0,r()(y.a,{name:"plex-icon-hub-next-560","aria-label":Object(f.default)("Next Page")})))),r()("div",{style:_},void 0,h.a.createElement(I.a,{scrollerClassName:C.a.hubScroller,ignoreHeight:!0,keyPropName:p,items:D,itemsOffset:m,listType:o,listContext:s,scrollDirection:g.HORIZONTAL,scrollIndex:this.state.scrollIndex,size:u?l:d||L,
layout:O,cellRenderer:j,ref:"list",onListUpdate:this.onListUpdate,onListScrollIndexChange:this.onListScrollIndexChange,onPageRequest:P})))},t}(p.Component);O.defaultProps={className:C.a.hubCell},t.a=O},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(function(e,t){return t.listContext},function(e,t){return t.cellWidth},Object(d.a)(),Object(p.a)(),Object(h.a)(),Object(f.a)(),Object(v.a)(),g.a,function(e,t){
var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],r=arguments[4],a=arguments[5],o=arguments[6],s=arguments[7],l=Object(c.a)(t,null,i,r,n,e);return{isFeaturedHub:Object(u.a)(e),metadataKey:n.key,type:i,selectionType:a,activeSelectionType:s.activeSelectionType,isSelected:o,imageWidth:l.width,imageHeight:l.height,imageUrl:l.url,isFolder:n.isFolder}})}function r(e,t){var n=t.metadataListEntityID;return{onSelectItem:function(t){e(Object(m.k)(o()({metadataListEntityID:n
},t)))},onDeselectItem:function(t){e(Object(m.c)(o()({metadataListEntityID:n},t)))}}}var a=n(7),o=n.n(a),s=n(11),l=n(6),c=(n.n(l),n(228)),u=n(1093),d=n(21),p=n(537),h=n(1096),f=n(538),v=n(539),g=n(88),m=n(137),y=n(2438);t.a=Object(s.b)(i,r)(y.a)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.listType},Object(s.a)(),function(e,t){if(!t)return e;var n=e===o.g&&t.type===a.c,i=e===o.b&&t.type===a.f;return n||i?e:t.extraType?o.d:t.type})}t.a=i
;var r=n(6),a=(n.n(r),n(28)),o=n(229),s=n(21)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.listType},Object(s.a)(),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type;if(n){if(n===a.i)return a.i;if(n===a.d)return a.d;if(e===o.g)return a.g;var i=a.q(n);return i&&i.mediaType}})}t.a=i;var r=n(6),a=(n.n(r),n(28)),o=n(229),s=n(21)},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(Object(a.a)(),o.a,function(e,t){return!!e&&Object(s.a)(t,e.ratingKey)})}t.a=i;var r=n(6),a=(n.n(r),n(21)),o=n(540),s=n(541)},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(6),o=(n.n(a),n(88)),s=void 0,l=Object(a.createSelector)(o.a,function(e){var t=r.a.pluck(e.activeSelectionItems,"id");return s&&r.a.isEqual(s,t)?s:(s=t,t)});t.a=l},function(e,t,n){"use strict";function i(e,t){if(!e||null==t)return!1;if(e===a&&r.hasOwnProperty(t))return r[t];e!==a&&(a=e,
r={});var n=-1!==e.indexOf(t);return r[t]=n,n}t.a=i;var r={},a=void 0},function(e,t,n){"use strict";function i(e){var t=e.imageWidth,n=e.imageHeight,i=e.activeSelectionType,r=e.isSelected,o={width:t,height:n};return a()("div",{className:(c.a.placeholder||"")+" "+(r&&c.a.isSelected||"")+" "+(!!i&&!r&&c.a.isOtherItemSelected||""||""),style:o})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2440)),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(o.a,s.a,Object(l.a)(),Object(c.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{server:e,provider:t,librarySectionKey:arguments[3],contentRating:n.contentRating}})}var r=n(11),a=n(6),o=(n.n(a),n(48)),s=n(37),l=n(21),c=n(443),u=n(2464);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.labelClassName,r=e.contentClassName,o=e.label;return a()("div",{className:n
},void 0,a()("div",{className:i},void 0,o),a()("div",{className:r},void 0,t))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2474)),c=n.n(l);i.defaultProps={className:c.a.groupItem,labelClassName:c.a.label,contentClassName:c.a.content},t.a=i},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 r="undefined"!=typeof window
;i.prototype={constructor:i,tests:[{id:"ee",name:"EE",predicate:function(e){return/^Netbox-/.test(e.userAgent)}},{id:"libertyglobal",name:"Liberty Global",tv:!0,predicate:function(e){return/WPE-Horizon$/.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=r&&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",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 r=e[n];if(r.predicate(t))return r}},toJSON:function(){var e={};for(var t in this)this.hasOwnProperty(t)&&this[t]&&(e[t]=this[t]);return e}},t.a=new i},function(e,t,n){"use strict";function i(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a;return"opera"===e.id&&!e.presto}t.a=i;var r=n(38)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a;return"opera"===e.id&&e.presto}t.a=i;var r=n(38)},function(e,t,n){"use strict";var i=n(218),r=n(6),a=(n.n(r),Object(r.createSelector)(i.a,function(e){return e.cloudServer},function(e,t){return e[t]}));t.a=a},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),
n(218)),a=Object(i.createSelector)(r.a,function(e){return e.servers},function(e,t){return t?t.map(function(t){return e[t]}):[]});t.a=a},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(753)),a=n(754),o=Object(i.createSelector)(a.a,r.a,function(e,t){return!(!e.cpms||t)});t.a=o},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(29),b=n(26),I=n(127),S=function(e){function t(){
return u()(this,t),p()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.icon,i=e.label,a=e.isMenuOpen,s=l()(e,["children","icon","label","isMenuOpen"]);return m.a.createElement(I.a,r()({"aria-haspopup":!0,"data-qa-id":"toolbarMore",tooltip:a?void 0:i,hideOnPress:!1},s),o()(b.a,{name:n}),t)},t}(g.Component);t.a=S},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(o.a,function(e){return{provider:e.epgSource}})}var r=n(11),a=n(6),o=(n.n(a),n(37)),s=n(2691);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e,t){var n=t.isUpdatingPropName,i=t.errorPropName,r=t.clearDirtyOnChangePropName,o=function(t){function o(e,n){s()(this,o);var i=c()(this,t.call(this,e,n));return i.onDirtyChange=function(){i.state.isDirty||i.setState({isDirty:!0})},i.state={isDirty:!1},i}return d()(o,t),
o.prototype.componentWillReceiveProps=function(e){var t=!1;r&&(t=this.props[r]!==e[r]);var a=this.props[n]&&!e[n]&&null===e[i];this.state.isDirty&&(t||a)&&this.setState({isDirty:!1})},o.prototype.render=function(){return h.a.createElement(e,a()({isDirty:this.state.isDirty,onDirtyChange:this.onDirtyChange},this.props))},o}(p.Component);return o.displayName="DirtyAware("+Object(f.a)(e)+")",o.WrappedComponent=e,o}
var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(0),h=n.n(p),f=(n(33),n(153));t.a=i},function(e,t,n){"use strict";function i(e,t){return t?e+"-"+t:e}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className;return a()("div",{className:t})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2711)),c=n.n(l);i.defaultProps={className:c.a.pageHeaderDivider},t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
n.d(t,"resetEPGSettings",function(){return a}),n.d(t,"fetchEPGCountries",function(){return o}),n.d(t,"fetchEPGLanguages",function(){return s}),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 p})
;var i=n(36),r=n(82),a=Object(i.a)(r._0),o=Object(i.a)(r.l),s=Object(i.a)(r.m),l=Object(i.a)(r._3),c=Object(i.a)(r._4),u=Object(i.a)(r._5),d=Object(i.a)(r._10),p=Object(i.a)(r.n)},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(function(e){return e.ui.dvrSettingsUI},function(e,t){return t.dvrID},function(e,t){var n=e.dvrs;return a.a.find(n,{key:t})})}var r=n(5),a=n.n(r),o=n(6);n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.serverEntityID,i=e.providerEntityID,r=e.model,o=e.thumb,s=e.width,c=e.height,d=void 0;switch(r){case"HDHomeRun CONNECT":d=u.a;break;case"HDHomeRun EXPAND":d=p.a;break;case"HDHomeRun EXTEND":d=f.a;break;case"HDHomeRun PRIME":d=g.a}var h={width:s,height:c};return a()(l.a,{serverEntityID:n,providerEntityID:i,className:t,style:h,url:o,src:o?void 0:d,background:!0,width:s,height:c,minSize:!0})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(169)),c=n(2750),u=n.n(c),d=n(2751),p=n.n(d),h=n(2752),f=n.n(h),v=n(2753),g=n.n(v),m=n(2754),y=n.n(m);i.defaultProps={className:y.a.image},t.a=i},function(e,t,n){"use strict";function i(e){return Object(r.createSelector)(Object(o.a)(),function(e,t){return t.activeFilters},function(e,t){return t.activeSort},function(e,t){return t.activeLimit},function(e,t){return t.selectedType},function(e,t){return t.selectedDirectory},function(t,n,i,r,o,s){if(t){var l={filters:n,sort:i,limit:r}
;return!(s&&"photo"===s.type)&&o&&o.key?Object(a.a)([o.key.replace("/all?","/"+e+"?")],l):Object(a.a)([t,e],l)}})}t.a=i;var r=n(6),a=(n.n(r),n(1153)),o=n(206)},function(e,t,n){"use strict";function i(e,t,n){if(n)switch(n){case s.h:return[l.a]}switch(e){case"show":case"episode":case"movie":return[l.c]}return r(e,t,n)}function r(e,t,n){if(n)switch(n){case s.h:switch(t){case"podcast":switch(e){case"track":return[l.d]}}switch(e){case"track":return[l.f]}}switch(t){case"podcast":switch(e){case"show":
return[l.c,l.f,l.e];case"track":return[l.f,l.d]}}switch(e){case"movie":case"show":return[l.c,l.f,l.e];case"season":return[l.c,l.f];case"episode":case"artist":case"album":return[l.c,l.f,l.e];case"track":return[l.c,l.f];case"photo":case"photoalbum":return[l.b];case"clip":return[l.c,l.f];case"collection":return[l.c,l.f,l.e];default:return[l.c]}}function a(e,t,n,a){return o.c.EPG_IDENTIFIER.test(a.identifier)?i(e,t,n):r(e,t,n)}t.a=a;var o=n(55),s=n(31),l=n(81)},function(e,t,n){"use strict"
;function i(e){var t=e.type,n=e.server,i=e.provider,r=e.libraryKey,d=e.libraryDirectories,p=void 0===d?[]:d,h=[],f=t===s.c,v=a.a.some(p,function(e){return"cluster"===e.key}),g=a.a.some(p,function(e){return"folder"===e.key}),m=n.ownerFeatures&&-1!==n.ownerFeatures.indexOf("photos-v5");return f&&v&&h.push({key:"timeline",title:Object(o.default)("Timeline"),route:Object(c.a)(n,i,r,{save:1})}),f&&m&&h.push({key:"albums",title:Object(o.default)("Albums"),route:Object(u.a)(n,i,r,t,{save:1})}),
g&&h.push({key:"folder",title:Object(o.default)("Folders"),route:Object(l.a)(n,i,r,{folderKey:r+"/folder",save:1})}),h}t.a=i;var r=n(5),a=n.n(r),o=n(4),s=n(59),l=n(122),c=n(1163),u=n(776)},function(e,t,n){"use strict";function i(e){
var t=e.types,n=e.pseudoTypes,i=e.selectedType,r=e.libraryRoute,o=e.activeSort,l=e.activeLimit,c=e.activeFilters,h=e.customFilter,g=s()(e,["types","pseudoTypes","selectedType","libraryRoute","activeSort","activeLimit","activeFilters","customFilter"]),m=t.length>0,y=n.length>0;return u.a.createElement(p.a,g,m&&t.map(function(e){var t=e.key,n=e.title;return a()(f.a,{to:Object(d.a)({typeKey:t,filters:h?c:void 0,sort:h?o:void 0,limit:h?l:void 0,customFilter:h},r),isSelected:i.key===t},t,n)
}),m&&y&&v,n.map(function(e){var t=e.key,n=e.title,r=e.route;return a()(f.a,{to:r,isSelected:i.key===t},r,n)}))}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=(n(115),n(264)),p=n(75),h=n(289),f=n(108),v=a()(h.a,{});t.a=i},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return o});var i="string",r="boolean",a="date",o="rating"},function(e,t,n){"use strict";function i(){
return Object(g.createSelector)(Object(m.a)(),D.a,C.a,y.a,Object(O.a)(),Object(b.a)(),Object(I.a)(),Object(S.a)(),Object(M.a)(),Object(j.a)(),function(e){return e.ui.audioVideoPlayer.isPaused},P.a,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=arguments[2],i=arguments[3],r=arguments[4],a=arguments[5],o=arguments[6],s=arguments[7],l=arguments[8],c=arguments[9],u=arguments[10],d=arguments[11];return{activeTableColumns:r,metadataKey:e.key,type:a,
title:e.title,selectionID:e.entityID,selectionType:s,activeSelectionType:d.activeSelectionType,isSelected:l,isPlaying:c,isPlayerPaused:u,route:o,showLink:!!o,showPlay:Object(A.j)(t,n,i,e),showEdit:Object(A.e)(t,n,i,e),showSelect:Object(A.m)(t,n,i,e),showMore:!e.isFolder}})}function r(e,t){var n=t.serverEntityID,i=t.providerEntityID,r=t.metadataListEntityID,a=t.metadataItemEntityID,o=t.containerKey,s=t.listType,l=t.metricsPage;return{onPlayPress:function(){e(Object(T.m)({serverEntityID:n,
providerEntityID:i,metadataItemEntityID:a,metricsPage:l,options:{containerKey:o,listType:s}}))},onEditPress:function(){e(Object(E.editMetadataItem)({serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,metricsPage:l}))},onSelectItem:function(t){e(Object(w.k)(p()({metadataListEntityID:r,id:a},t)))},onDeselectItem:function(t){e(Object(w.c)(p()({metadataListEntityID:r},t)))},onDeselectAllItems:function(){e(Object(w.b)({metadataListEntityID:r}))}}}
var a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(7),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(6),m=(n.n(g),n(21)),y=n(144),b=n(537),I=n(356),S=n(538),M=n(539),D=n(48),C=n(37),O=n(1157),j=n(1174),P=n(88),w=n(137),T=n(60),E=n(120),x=n(436),N=n(288),A=n(201),L=n(57),k=n(2873),_=n(2875),R=Object(x.a)(_.a),z=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),
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))},r=n,l()(i,r)}return u()(t,e),t.prototype._isDoubleClick=function(){return this._firstClickTime&&Date.now()-this._firstClickTime<300},t.prototype._doubleClick=function(){
var e=this.props,t=e.selectionType,n=e.showPlay,i=e.onPlayPress,r=e.onSelectItem,a=e.onDeselectAllItems;this._firstClickTime=0,a(),r({type:t}),n&&i()},t.prototype.render=function(){return this.props.metadataKey?this.props.showSelect?v.a.createElement(R,p()({},this.props,{onSelectItem:this.onSelectItem,onDeselectItem:this.onDeselectItem})):v.a.createElement(_.a,this.props):v.a.createElement(k.a,this.props)},t}(f.Component);t.a=Object(L.a)(i,r,N.a)(z)},function(e,t,n){"use strict";function i(e){
var t=function(t){function n(e,i){s()(this,n);var r=c()(this,t.call(this,e,i));return r.onMouseMove=function(e){r._setHoveredState(!0),r.props.onMouseMove&&r.props.onMouseMove(e)},r.onMouseLeave=function(e){r._setHoveredState(!1),r.props.onMouseLeave&&r.props.onMouseLeave(e)},r.onFocus=function(e){r._setHoveredState(!0),r.props.onFocus&&r.props.onFocus(e)},r.onBlur=function(e){r._setHoveredState(!1),r.props.onBlur&&r.props.onBlur(e)},r.state={isHovered:!1},r._hoverableProps={
onMouseMove:r.onMouseMove,onMouseLeave:r.onMouseLeave,onFocus:r.onFocus,onBlur:r.onBlur},r}return d()(n,t),n.prototype._setHoveredState=function(e){this.state.isHovered!==e&&this.setState({isHovered:e})},n.prototype.render=function(){return v.a.createElement(e,a()({},this.props,{isHovered:this.state.isHovered,hoverableProps:this._hoverableProps}))},n}(f.Component);return t.displayName="Hoverable("+Object(g.a)(e)+")",t.WrappedComponent=e,t}
var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=n.n(p),f=n(0),v=n.n(f),g=n(153);h.a.shape({onMouseMove:h.a.func.isRequired,onMouseLeave:h.a.func.isRequired,onFocus:h.a.func.isRequired,onBlur:h.a.func.isRequired}).isRequired,h.a.bool.isRequired;t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.Media;n=void 0===n?[]:n
;var i=n[0],a=void 0===i?{}:i,o=a.width,s=a.height,l=a.Part;l=void 0===l?[]:l;var c=l[0],u=void 0===c?{}:c;return o&&s?Object(r.a)(u.orientation)?s/o:o/s:t}t.a=i;var r=n(2910)},function(e,t,n){"use strict";function i(e){return Object(o.createSelector)(Object(s.a)(),function(t){if(t)return a.a.findWhere(t.features,{type:e})})}t.a=i;var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),n(79))},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.title,r=e.icon,o=e.onRef
;return l.a.createElement("div",{className:t,role:"navigation",ref:o},a()("div",{className:u.a.sidebarListHeaderContainer},void 0,a()("div",{className:u.a.sidebarListHeader,role:"header"},void 0,i),r&&a()("div",{className:u.a.sidebarListHeaderIcon},void 0,r)),n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(2987),u=n.n(c);t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(4)),f=n(376),v=n(568),g=n(176),m=n(3008),y=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.machineIdentifier,n=e.showChannels,i=e.showUserPlaylists,a=e.unwatchedWatchLaterCount,o=e.unwatchedRecommendedCount,s=e.cloudProviderEntityIDs,l=encodeURIComponent(t);return n||i||s.length?r()(v.a,{title:Object(h.default)("Online Content")},void 0,n&&t&&r()(g.a,{to:"#!/server/"+l+"/channels",
icon:"plex-icon-channels-560",title:Object(h.default)("Plugins"),"data-qa-id":"sidebarPlugins"},"channels"),i&&r()(g.a,{to:"#!/playlist/queue",icon:"plex-icon-watch-later-560",title:Object(h.default)("Watch Later"),"data-qa-id":"sidebarWatchLater"},"watchLater",r()(f.a,{},void 0,a)),i&&r()(g.a,{to:"#!/playlist/recommendations",icon:"plex-icon-recommended-560",title:Object(h.default)("Recommended"),"data-qa-id":"sidebarRecommended"},"recommended",r()(f.a,{},void 0,o)),s.map(function(e){
return r()(m.a,{providerEntityID:e},e)})):null},t}(p.Component);y.defaultProps={showChannels:!0,showUserPlaylists:!0},t.a=y},function(e,t,n){"use strict";n.d(t,"c",function(){return a}),n.d(t,"b",function(){return o}),n.d(t,"a",function(){return s});var i=n(36),r=n(82),a=Object(i.a)(r.T),o=Object(i.a)(r.x),s=Object(i.a)(r.e)},function(e,t,n){"use strict";var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=function(e){function t(n,i){r()(this,t)
;var a=o()(this,e.call(this,n,i));return a.onListContainerRef=function(e){a._setOffsetTop(e)},a._hasOffsetChanged=!1,a.state={listOffsetTop:null},a}return l()(t,e),t.prototype.componentWillUpdate=function(e){this._hasOffsetChanged=e.showArtwork!==this.props.showArtwork||e.contentHeight!==this.props.contentHeight},t.prototype._setOffsetTop=function(e){e&&e.offsetTop!==this.state.listOffsetTop&&this.setState({listOffsetTop:e.offsetTop})},t.prototype.render=function(){
var e=this.props,t=e.children,n=e.scrollTop,i=this.state.listOffsetTop,r=d.a.Children.only(t);return d.a.createElement("div",{ref:this._hasOffsetChanged?this._setOffsetTop.bind(this):this.onListContainerRef},null!=i&&d.a.cloneElement(r,{scrollTop:n-i}))},t}(u.Component);t.a=p},function(e,t,n){"use strict";function i(){return a()(s.a,{className:c.a.topDivider})}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(125)),l=n(3224),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(){return a()(s.a,{
className:c.a.bottomDivider})}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(125)),l=n(3225),c=n.n(l);t.a=i},function(e,t,n){"use strict";var i=n(3316),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(4),u=n(17),d=n(19),p=n(70),h=p.a.extend({name:"channelSettingsModal",className:"channel-settings-modal modal fade",template:r.a,ui:{submitBtn:".submit-btn"},events:o.a.extend({"change input[name]":"onInputChange","change select[name]":"onInputChange","submit #channel-settings-form":"onSubmit"
},p.a.prototype.events),initialize:function(){p.a.prototype.initialize.apply(this,arguments),this.changes={}},serializeData:function(){var e=this.model.get("title")||this.model.get("name");return{title: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(),o.a.isEmpty(this.changes))return void this.hide();var t=this.ui.submitBtn
;if(!t.hasClass("active")){t.addClass("active");var n=this.collection.first(),i=n.getSaveParams(this.changes),r=o.a.result(this.collection,"url"),a=d.join([r,"/set"],i),s=l.a.ajax(n.server.getXHROptions(a));s.done(o.a.bind(function(){this.hide()},this)),s.fail(o.a.bind(function(){u.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem saving these settings.")})},this)),s.always(function(){t.removeClass("active")})}}});t.a=h},function(e,t,n){"use strict"
;var i=n(3321),r=n.n(i),a=n(12),o=n.n(a),s=n(5),l=n.n(s),c=n(20),u=n(15),d=n(4),p=n(399),h=n(801),f=n(60),v=n(686),g=n(3322),m=n(3324),y=c.a.Layout.extend({tagName:"li",className:"striped-list-item media-list-item",template:r.a,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 .more-btn":"onMoreClick","hide.bs.dropdown .media-actions-dropdown":"onDropdownHide"},initialize:function(e){var t=this.model,n=t.get("type");this.type=n,this.$el.addClass(n),this.mediaActions=new h.a({},{item:t,type:n,server:t.server}),this.listenTo(this.mediaActions,{"change:showPlay":this.onActionsChange,"change:showListDropdown":this.onActionsChange})},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(this.model.channel){var n=this.model.channel,i=n.id?n.id:n.get("identifier");t+="/channel/"+encodeURIComponent(i),"clip"===e.type?t+="/details/"+encodeURIComponent(e.key):t+="/"+encodeURIComponent(e.key)
}else if("userPlaylistItem"===e.type)t="#!/playlist/"+this.model.userPlaylistKey+"/details/"+e.id;else if(e.isLibraryItem){var r=e.key;"track"===e.type&&(r=e.skipParent?e.grandparentKey:e.parentKey),t+="/details?key="+encodeURIComponent(r)}return{item:e,url:t,showActions:this.showActions()}},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.get("showPlay")||this.mediaActions.get("showEdit")||this.mediaActions.get("showListDropdown")},bindings:{".play-btn":{model:"mediaActions",modelAttribute:"showPlay",manual:!0,autohide:!0},".more-btn":{model:"mediaActions",modelAttribute:"showListDropdown",manual:!0,autohide:!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;return/^(season|episode|album|track)$/.test(this.model.get("type"))&&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=Object(d.default)("from {1}",this.model.get("recommender")));else{t=this.model.get("grandparentTitle")||this.model.get("parentTitle")?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?Object(p.a)({seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "}):void 0}}},onRender:function(){this.image&&this.image.setElement(this.ui.poster),("rating"===this.sort||this.showRating)&&this.rating.show(new v.a({model:this.model,disabled:!0})),this.progress&&this.progress.show(new g.a({model:this.model}))},onClose:function(){
this.image&&this.image.close(),this.dropdown&&this.dropdown.close()},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){var t=this.model.get("type"),n=/^(track|photo)$/;if(this.isPhotoSection&&(n=/^(track|photo|clip)$/),n.test(t)){e.preventDefault();Object(u.d)("appStore").dispatch(Object(f.k)({serverModel:this.model.server,metadataItemModel:this.model}))}},
onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),Object(u.d)("appStore").dispatch(Object(f.k)({serverModel:this.model.server,metadataItemModel:this.model}))},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),o()(".media-actions-dropdown").trigger("hide.bs.dropdown"),this.dropdown=new m.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"),this.ui.dropdown.css(this.ui.actions.position())},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.$el.removeClass("force-hover on-top"))}});t.a=y},function(e,t,n){"use strict";function i(e){return!e.isShared}function r(e){return!!e.desktop.isSettingsPopulated}function a(e){return e.desktop.sessions.length>0}function o(e){return e.desktop.backgroundTranscodeJobs.length>0}function s(e){var t=e.desktop.cloudAccount
;return t&&t.remoteAccessState}var l=n(2),c=n.n(l),u=n(0),d=(n.n(u),n(4)),p=n(35),h=n(3362),f=n(3363),v=n(3365),g=n(1233),m=[{key:"status",title:function(){return Object(d.default)("Status")},isVisible:!0,metricsPage:p._0,metricsPanePrefix:"",createStatusIndicator:function(e){return c()(h.a,{isActive:a(e)||o(e)})},groups:[{key:"now-playing",title:function(){return Object(d.default)("Now Playing")},isVisible:i,metricsPage:p.K,createStatusIndicator:function(e){return c()(h.a,{isActive:a(e)})}},{
key:"alerts",title:function(){return Object(d.default)("Alerts")},isVisible:i},{key:"sync",title:function(){return Object(d.default)("Sync")},isVisible:!0},{key:"conversion",title:function(){return Object(d.default)("Conversions")},isVisible:i,createStatusIndicator:function(e){return c()(h.a,{isActive:o(e)})}}]},{key:"settings",title:function(){return Object(d.default)("Settings")},isVisible:i,metricsPage:p.W,metricsPanePrefix:"server:",groups:[{key:"general",title:function(){
return Object(d.default)("General")},isVisible:r,createStatusIndicator:function(e){return c()(v.a,{isClaimed:!!e.isClaimed})}},{key:"remoteAccess",title:function(){return Object(d.default)("Remote Access")},isVisible:function(e){return!e.isPersonalCloudServer&&r(e)},createStatusIndicator:function(e){return c()(f.a,{remoteAccessState:s(e)})}},{key:"agents",title:function(){return Object(d.default)("Agents")},isVisible:r},{key:"library",title:function(){return Object(d.default)("Library")}},{
key:"channels",title:function(){return Object(d.default)("Plugins")},isVisible:r},{key:"network",title:function(){return Object(d.default)("Network")}},{key:"transcoder",title:function(){return Object(d.default)("Transcoder")}},{key:"languages",title:function(){return Object(d.default)("Languages")},isVisible:r},{key:"dlna",title:function(){return Object(d.default)("DLNA")}},{key:"butler",title:function(){return Object(d.default)("Scheduled Tasks")}},{key:"extras",title:function(){
return Object(d.default)("Extras")}}]},{key:"manage",title:function(){return Object(d.default)("Manage")},isVisible:i,groups:[{key:"versions",title:function(){return Object(d.default)("Optimized Versions")},isVisible:function(e){return!e.isPersonalCloudServer&&r(e)},metricsPage:p._0,metricsPane:"versions"},{key:"dvr",title:function(){return Object(d.default)("Live TV & DVR")},isVisible:function(e){return e.livetv>=1&&r(e)},metricsPage:p.W,metricsPane:"server:dvr",paneComponent:g.a},{key:"help",
title:function(){return Object(d.default)("Troubleshooting")},isVisible:r,metricsPage:p.W,metricsPane:"server:help"}]}];t.a=m},function(e,t,n){"use strict";var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentDidMount=function(){var e=this.props.view;this._view=new e(this.props.viewOptions),this._view.render(),this._el.appendChild(this._view.el),
this._view.triggerMethod("show")},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.componentWillUnmount=function(){this._view.close&&this._view.close()},t.prototype.render=function(){var e=this;return d.a.createElement("div",{ref:function(t){return e._el=t}})},t}(d.a.Component);t.a=p},,,,,,,function(e,t,n){var i=n(270);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r
;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},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(587)("keys"),r=n(460);e.exports=function(e){return i[e]||(i[e]=r(e))}},function(e,t,n){var i=n(179),r=i["__core-js_shared__"]||(i["__core-js_shared__"]={});e.exports=function(e){
return r[e]||(r[e]={})}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var i=n(1324),r=n(1325);e.exports={stringify:i,parse:r}},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){e.exports=!0},function(e,t){e.exports={}
},function(e,t,n){var i=n(389),r=n(1341),a=n(588),o=n(586)("IE_PROTO"),s=function(){},l=function(){var e,t=n(822)("iframe"),i=a.length;for(t.style.display="none",n(1342).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;i--;)delete l.prototype[a[i]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=i(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:r(n,t)}
},function(e,t,n){var i=n(318).f,r=n(272),a=n(322)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,a)&&i(e,a,{configurable:!0,value:t})}},function(e,t,n){t.f=n(322)},function(e,t,n){var i=n(179),r=n(116),a=n(592),o=n(596),s=n(318).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=a?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},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){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 r(a){var o,s,l;if(a.nodeType==m.DOCUMENT_NODE){var c,u;for(s=a.firstChild,c=0,u=a.childNodes.length;c<u;c+=1)if(a.childNodes[c].nodeType!==m.COMMENT_NODE){s=a.childNodes[c];break}return n?o=r(s):(o={},l=i(s),o[l]=r(s)),o}if(a.nodeType==m.ELEMENT_NODE){var d=0,p=a.childNodes;o=new Object
;for(var h=0;h<p.length;h++)if(s=p.item(h),l=i(s),d++,null==o[l])o[l]=r(s);else{if(null!=o[l]&&!(o[l]instanceof Array)){var f=o[l];o[l]=[],o[l].push(f)}for(var v=0;null!=o[l][v];)v++;o[l][v]=r(s)}for(var g=0;g<a.attributes.length;g++){var y=a.attributes.item(g);d++;for(var b=y.value,I=0,S=e.length;I<S;I++){var M=e[I];M.test.call(this,y.value)&&(b=M.converter.call(this,y.value))}o[t+y.name]=b}if(null!=o["#text"]){var D=o["#text"];"string"==typeof D?(D=D.replace(/[\r\n]/g,""),o["#text"]=D,
1==d&&(o=D)):delete o["#text"]}return o}return a.nodeType==m.TEXT_NODE||a.nodeType==m.CDATA_SECTION_NODE?a.nodeValue:a.nodeType==m.COMMENT_NODE?null:void 0}function a(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 o(e){var t="";return null!=e.__cdata&&(t+="<![CDATA["+e.__cdata+"]]>"),null!=e.__text&&(t+=g?a(e.__text):e.__text),t}function s(e){var t=""
;return e instanceof Object?t+=o(e):null!=e&&(t+=g?a(e):e),t}function l(e,t){return-1!==e.indexOf(t,e.length-t.length)}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(),r=i.charAt(0);-1==n.indexOf("__")&&("_"===r||r===r.toLowerCase()&&r!==r.toUpperCase())&&t.push(n)}return t}
function p(e,t,n){var i="";if(0==e.length)i+=h(e,t,n,!0);else for(var r=0;r<e.length;r++)i+=h(e[r],t,d(e[r]),!1),i+=v(e[r]),i+=f(e[r],t);return i}function h(e,t,n,i){var r="<"+(null!=e&&null!=e.__prefix?e.__prefix+":":"")+t;if(null!=n)for(var o=0;o<n.length;o++){var s=n[o],l=a(e[s]);r+=" "+s.substr(1)+"='"+l+"'"}return r+=i?"/>":">"}function f(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function v(e){var t="";if(u(e)>0)for(var n in e)if(!c(e,n)){var i=e[n],r=d(i)
;if(null==i||void 0==i)t+=h(i,n,r,!0);else if(i instanceof Object)if(i instanceof Array)t+=p(i,n,r);else{var a=u(i);a>0||null!=i.__text||null!=i.__cdata?(t+=h(i,n,r,!1),t+=v(i),t+=f(i,n)):t+=h(i,n,r,!0)}else t+=h(i,n,r,!1),t+=s(i),t+=f(i,n)}return t+=s(e)}null!==t&&void 0!==t||(t="_"),null!==n&&void 0!==n||(n=!1);var g=!1,m={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){
t=(new window.DOMParser).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 r(e.documentElement||e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return this.xml2json(t.documentElement||t)},this.getVersion=function(){return"1.0.11"},this.escapeMode=function(e){g=e},this.json2xml_str=function(e){return v(e)}}e.exports=n},function(e,t,n){
"use strict";function i(e){var t=l.exec(e);if(null!=t)return{octets:o.a.map(o.a.rest(t),function(e){return parseInt(e,10)})}}function r(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=o.a.map(n,function(e){return parseInt(e,16)})}if(t.length>1){var r=t[1].match(u),a=o.a.map(r,function(e){return parseInt(e,16)}),s=8-i.parts.length-a.length;if(s<0||8===s)return;o.a.times(s,function(){i.parts.push(0)}),i.parts=i.parts.concat(a)}return i}}
var a=n(5),o=n.n(a),s=/^([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 s.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||!o.a.all(t.octets,function(e){return e>=0&&e<=255}))},
isLoopbackV4Address:function(e){var t=i(e);return!(!t||127!==t.octets[0]&&!o.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=r(e);return!(!t||!o.a.all(t.parts,function(e){return e>=0&&e<=65535}))},isLoopbackV6Address:function(e){var t=r(e);if(t){
return o.a.all(o.a.take(t.parts,7),function(e){return 0===e})&&1===o.a.last(t.parts)}return!1},isPrivateV6Address:function(e){var t=r(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";function i(e){return e?Array.isArray(e)?e:[e]:[]}var r=n(5);n.n(r);t.a=i},function(e,t,n){"use strict";function i(e){return 1===Number(e)||"true"===e}t.a=i},function(e,t,n){
"use strict";var i=n(30),r=n(1384),a=!1;t.a=function(){function e(e){return e&&!n[e]&&(n[e]=/^(client|playback):/.test(e)||!!t()),!!e&&n[e]}var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a,n={},o={startPeriod:function(e){return o.mark(e+"-start")},endPeriod:function(e,t){return o.measure(e,t||e+"-start")},mark:function(t){var n=null;if(e(t)){window.performance.mark(t);var r=window.performance.getEntriesByName(t);n=r[r.length-1]
}else a&&Object(i.a)('[Performance] Ignoring mark "%s"',t);return n},measure:function(t,n,r){var o=null;if(e(t))try{window.performance.measure(t,n,r),window.performance.clearMarks(n);var s=window.performance.getEntriesByName(t);o=s[s.length-1]}catch(e){}else a&&Object(i.a)('[Performance] Ignoring measure "%s"',t);return o}};return o}()},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(69),o=n(30),s=a.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;r.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,n=this._serversBeingRetried[e.id],i=Math.min(this.maximumDelay,n.attempt);Object(o.a)(this.logFormat,e.get("debugName"),i),n.timeout=setTimeout(function(){t.callback(e),n.attempt++,t._scheduleRetry(e)},1e3*i)}});t.a=s},function(e,t,n){"use strict";var i=n(239),r=i.a.extend({interface:["publish","subscribe","unsubscribe","registerPlayer","unregisterPlayer","debugStatus","getDeepLink"]});t.a=new r},function(e,t,n){
"use strict";function i(e){return e&&e.statusText||""}function r(e){var t=c.a.Deferred();return Object(p.a)({url:Object(h.a)(window.location.origin,"https:")+"/"+f,data:e,timeout:5e3,onMessage:function(e){!0===e.success?t.resolve(e.data,i(e.xhr),e.xhr):!1===e.success&&t.reject(e.xhr,i(e.xhr))}}),t.promise()}function a(e){var t=e.xhrFields&&e.xhrFields.withCredentials,n=t&&!1&&!d.a.isHostedHttps;return e.headers=s()({},u.a.getInstance(),e.headers||{}),n?r(e):c.a.ajax(e)}
var o=n(7),s=n.n(o),l=n(12),c=n.n(l),u=n(391),d=n(83),p=n(1407),h=n(846),f="service-reflector";t.a=a},function(e,t,n){"use strict";var i=n(12),r=n.n(i),a=n(33),o={fetch:function(){return Object(a.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=r.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=o},function(e,t,n){"use strict";function i(e,t){if(o.a.get("shouldCreateFlexModels")){var n;e.prototype.sessionRelations=a()({},e.prototype.sessionRelations,(n={},n.desktop=t,n))}return e}t.a=i;var r=n(7),a=n.n(r),o=n(62)},function(e,t,n){"use strict";var i=n(178),r=n.n(i),a=n(5),o=n.n(a),s=n(33),l=n(163),c=n(51),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]:{},r=this.attributes,a=void 0;if(null==e||o.a.isObject(e)?(a=e,i=t):(a={})[e]=t,i=o.a.extend({validate:!0},i),a&&!i.wait){if(!this.set(a,i))return!1}else if(!this._validate(a,i))return!1;a&&i.wait&&(this.attributes=o.a.extend({},r,a));var s=l.a.getInstance().excludeDefaults,c=this.toJSON({syncedOnly:!0,excludeDefaults:!1!==s}),u=this._serialize(c),d=l.a.set(this._getStorageKey(),u);return d.done(function(){n.attributes=r,
n.trigger("sync",n,r,i)}),d.fail(function(e){n.trigger("error",n,e,i)}),a&&i.wait&&(this.attributes=r),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=o.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=r()(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"}
Object(s.a)(!1,this.name+" ("+t+") "+e)}});t.a=d},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(69),o=n(17),s=n(30),l=n(89),c=a.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(o.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,r.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,r.a.first(this.cycles)))},getItemCacheKey:function(e){return r.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&&(s.a.warn("Cache overflow, size: "+this.size),r.a.each(this.cycles.slice(1),this.removeCycle,this)),this.cycles.unshift({}),this.cycles.length>Math.max(this.maxCycles,1)&&this.removeCycle(r.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){
r.a.each(r.a.values(e),this.remove,this);var t=r.a.indexOf(this.cycles,e);this.cycles.splice(t,1)},clearWhere:function(e){var t=r.a.where(r.a.values(this._cache),e);r.a.each(t,this.remove,this)},clearAll:function(){r.a.each(r.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(5),r=n.n(i),a=n(67),o=n(117),s=o.a.extend({urlRoot:"/api/home/users",whitelistedAttrs:["id","uuid","admin","protected","restricted","guest","title","username","email","thumb"],convert:function(e){var t=r.a.isObject(e)?e:a.a.parseXML(e);return t.User&&(t=t.User),a.a.parseInteger(t,"id"),a.a.parseBoolean(t,["admin","protected","restricted","guest"]),t},parse:function(e){var t=this.convert(e);return t=r.a.pick(t,this.whitelistedAttrs)},getSaveParams:function(e,t){if(r.a.isEmpty(e)){
var n={};return this.get("restricted")?n.title=this.get("title"):this.isNew()&&(n.invitedEmail=this.get("username")),n}return o.a.prototype.getSaveParams.apply(this,arguments)}});t.a=s},function(e,t,n){"use strict";function i(e,t,n){return n?r.a.xml:t&&t.get("identifier")===a.c.CHANNEL_PROVIDER_IDENTIFIER?r.a.xml:Object(o.a)(e)}t.a=i;var r=n(51),a=n(55),o=n(97)},function(e,t,n){"use strict";var i=n(58),r=n(94),a=n(43),o=n(40),s=n(97),l=n(16),c=n(51),u=n(18),d=n(98),p=n(614),h=u.a.extend({
name:"HubModel",context:["server","provider","section","identifier","allowSync"],entityType:a.b,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(o.a)(this.entityType,e.key||e.hubKey||e.hubIdentifier,this.provider.entityID())},idAttribute:"hubIdentifier",rootPropertyName:"Hub",responseType:function(){return Object(s.a)(this.server)},url:function(){return this.get("key")||this.get("hubKey")},syncedAttrs:{key:l.a.string,hubKey:l.a.string,
hubIdentifier:l.a.string,source:l.a.string,title:l.a.string,summary:l.a.string,icon:l.a.string,thumb:l.a.string,type:l.a.string,subtype:l.a.string,style:l.a.string,size:l.a.integer,totalSize:l.a.integer,more:l.a.boolean,random:l.a.boolean,browse:l.a.boolean,upNext:l.a.boolean,context:l.a.string,promoted:l.a.boolean},syncedRelations:{metadataList:{relationClass:d.default,deferred:!0},directoryList:{relationClass:p.a,deferred:!0}},initialize:function(){
this.listenTo(this.get("metadataList"),"change:populatedRange",this.onPopulatedRangeChange),this.listenTo(this.get("directoryList"),"change:populatedRange",this.onPopulatedRangeChange)},augmentResponseText:function(e,t){return t===c.a.xml?Object(r.b)(e):e},augmentResponse:function(e){var t=null==e.totalSize?void 0:i.a.parseInteger(e.totalSize),n=i.a.parseInteger(e.size)||0,r=e.key||e.hubKey;return e.Directory?e.directoryList={containerKey:r,Directory:e.Directory,size:n,totalSize:t
}:e.metadataList={containerKey:r,Metadata:e.Metadata,size:n,totalSize:t},e},onPopulatedRangeChange:function(e,t){var n=t.size,i=e.get("totalSize"),r={size:n};null!=i&&(r.more=i>n),this.set(r)}});t.a=h},function(e,t,n){"use strict";var i=n(43),r=n(40),a=n(97),o=n(244),s=n(16),l=n(18),c=n(1447),u=l.a.extend({mixins:[o.a],name:"MetadataDirectoryListModel",context:["server","provider"],entityType:i.h,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state
;return Object(r.a)(this.entityType,e.containerKey||this.cid,this.provider.entityID())},idAttribute:"containerKey",collectionName:"metadataItems",responseType:function(){return Object(a.a)(this.server)},url:function(){return this.getPaginatedUrl(this.get("containerKey"))},sessionAttrs:{containerKey:s.a.string,containerTitle:s.a.string,currentPageStart:s.a.integer,currentPageSize:s.a.integer,populatedRange:s.a.object,isPending:s.a.boolean,isPopulated:s.a.boolean,error:s.a.object},syncedAttrs:{
totalSize:s.a.integer},syncedRelations:{metadataItems:{relationClass:c.a,rootPropertyName:"Directory",setOptions:function(e){return{remove:e.remove,at:e.at}}}},defaults:function(){return{populatedRange:{start:0,end:0,size:0},isPending:!0,isPopulated:!1,error:null}},initialize:function(){this.startPopulatedRangeMonitor()}});t.a=u},function(e,t,n){"use strict";function i(e,t){this.helpers=e||{},this.partials=t||{},r(this)}function r(e){e.registerHelper("helperMissing",function(e){
if(2!==arguments.length)throw new s("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var i=n.inverse||function(){},r=n.fn;return u(t)&&(t=t.call(this)),!0===t?r(this):!1===t||null==t?i(this):c(t)?t.length>0?e.helpers.each(t,n):i(this):r(t)}),e.registerHelper("each",function(e,t){var n,i=t.fn,r=t.inverse,a=0,o="";if(u(e)&&(e=e.call(this)),t.data&&(n=h(t.data)),e&&"object"==typeof e)if(c(e))for(var s=e.length;a<s;a++)n&&(n.index=a,n.first=0===a,
n.last=a===e.length-1),o+=i(e[a],{data:n});else for(var l in e)e.hasOwnProperty(l)&&(n&&(n.key=l,n.index=a,n.first=0===a),o+=i(e[l],{data:n}),a++);return 0===a&&(o=r(this)),o}),e.registerHelper("if",function(e,t){return u(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||o.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(u(e)&&(e=e.call(this)),
!o.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 a(e,t){p.log(e,t)}var o=n(616),s=n(617).default;t.VERSION="1.3.0";t.COMPILER_REVISION=4;var l={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};t.REVISION_CHANGES=l;var c=o.isArray,u=o.isFunction,d=o.toString;t.HandlebarsEnvironment=i,i.prototype={constructor:i,logger:p,log:a,registerHelper:function(e,t,n){
if("[object Object]"===d.call(e)){if(n||t)throw new s("Arg not supported with multiple helpers");o.extend(this.helpers,e)}else n&&(t.not=n),this.helpers[e]=t},registerPartial:function(e,t){"[object Object]"===d.call(e)?o.extend(this.partials,e):this.partials[e]=t}};var p={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(p.level<=e){var n=p.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}};t.logger=p,
t.log=a;var h=function(e){var t={};return o.extend(t,e),t};t.createFrame=h},function(e,t,n){"use strict";function i(e){return l[e]||"&amp;"}function r(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function a(e){return e instanceof s?e.toString():e||0===e?(e=""+e,u.test(e)?e.replace(c,i):e):""}function o(e){return!e&&0!==e||!(!h(e)||0!==e.length)}var s=n(859).default,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"
},c=/[&<>"'`]/g,u=/[&<>"'`]/;t.extend=r;var d=Object.prototype.toString;t.toString=d;var p=function(e){return"function"==typeof e};p(/x/)&&(p=function(e){return"function"==typeof e&&"[object Function]"===d.call(e)});var p;t.isFunction=p;var h=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===d.call(e)};t.isArray=h,t.escapeExpression=a,t.isEmpty=o},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),a=0;a<r.length;a++)this[r[a]]=i[r[a]];n&&(this.lineNumber=n,this.column=t.firstColumn)}var r=["description","fileName","lineNumber","message","name","number","stack"];i.prototype=new Error,t.default=i},function(e,t,n){"use strict";function i(e){var t=/(\d+\.){2,3}\d+/.exec(e);return a.a.first(t)||e}var r=n(5),a=n.n(r);t.a=i},function(e,t,n){"use strict";var i=n(97),r=n(23),a=n(397),o=r.a.extend({name:"SectionCollection",context:["server"],
model:a.a,url:"/library/sections",responseType:function(){return Object(i.a)(this.server)}});t.a=o},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(471),o=r.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:a.a}}});t.a=o
},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(23),o=n(97),s=n(863),l=a.a.extend({name:"FirstCharacterCollection",context:["server","provider","section"],model:s.a,responseType:function(){return Object(o.a)(this.server)},url:function(){var e=r.a.result(this.section,"url")+"/firstCharacter",t=this.getUrlParams();return t?e+"?"+t:e},getUrlParams:function(){var e={},t=[],n=this.section.get("currentType");n&&(e.type=n.id);var i=this.section.get("currentFilters")
;return r.a.each(i,function(t){t.values.length&&(e[t.key]=t.values.join(","))}),r.a.each(e,function(n,i){"unviewedLeafCount"===i?t.push(i+">="+e[i]):t.push(i+"="+e[i])}),t.join("&")}});t.a=l},,function(e,t,n){"use strict";function i(e){return e=parseInt(e,10),a.a.isNaN(e)?"":(e<10?"0":"")+e}var r=n(5),a=n.n(r);t.a=i},function(e,t,n){"use strict";var i=n(94),r=n(244),a=n(16),o=n(51),s=n(18),l=n(1465),c=s.a.extend({mixins:[r.a],name:"PlaylistItemListModel",context:["server","playlist"],
idAttribute:"key",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(this.get("containerKey"))},sessionAttrs:{containerKey:a.a.string,currentPageStart:a.a.integer,currentPageSize:a.a.integer,populatedRange:a.a.object},syncedAttrs:{totalSize:a.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===o.a.xml?Object(i.b)(e):e}});t.a=c},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r});var i="error",r="success"},function(e,t,n){"use strict";var i=n(1520),r=n.n(i),a=n(15),o=n(70),s=o.a.extend({name:"plexPassModal",template:r.a,serializeData:function(){return{plexPassUrl:a.d("appModel").get("user").server.get("plexPassUrl"),
friendlyName:this.model.get("friendlyName"),isClaimed:this.model.get("isClaimed")}}});t.a=s},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(277),o=n(16),s=n(401),l=s.a.extend({name:"SyncItemModel",context:["server","device"],urlRoot:function(){return"/devices/"+(this.device?this.device.get("clientIdentifier"):this.get("clientIdentifier"))+"/sync_items"},syncedAttrs:r.a.extend({},s.a.prototype.syncedAttrs,{version:{type:o.a.integer,save:!0},metadataType:{type:o.a.string,save:!0},rootTitle:{
type:o.a.string,save:!0},machineIdentifier:{type:o.a.string,save:!0},Server:o.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=a.a.addVersionHeaderForDevice(this.device,n);return s.a.prototype.sync.call(this,e,t,i)},getSaveParams:function(e,t){var n=s.a.prototype.getSaveParams.apply(this,arguments),i=n.Item;return r.a.each(i,function(e,t){
""===e&&delete i[t]}),{SyncItem:i}}});t.a=l},function(e,t,n){"use strict";function i(e,t){var n=e.toJSON?e.toJSON():e,i=n.isChannelItem,r=n.isExtra,a=n.guid,o=r&&!/^file:\/\//.test(a);return!i&&!o&&t}t.a=i},function(e,t,n){var i=n(874).default,r=n(152);e.exports=r(i)},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",collection:"portrait"},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";var i=n(12),r=n.n(i),a=n(69),o=n(30),s=a.a.extend({getStorage:function(){},get:function(e){var t=this;return this._catchStorageError(function(n){var i=window.PLEXWEB,r=i&&e in i?i[e]:n.getItem(e);if(null==r)throw new Error(e+" is not in "+t.name);return r})},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=r.a.Deferred();try{
t.resolve(e(this.getStorage()))}catch(e){o.a.warn(e.message),t.reject(e)}return t.promise()}});t.a=s},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")}}function r(e,t,n){var r=i(e,t,n);return r||a.a.warn('An entity does not exist with the type "%s" and id "%s"',t,n),r}t.b=i,t.a=r;var a=n(30)},function(e,t,n){"use strict";function i(e,t){var n=t&&!s,i=o[e]
;return n&&i&&i.length?(Object(a.a)("[MediaElement] Found existing media element to use. type: %s",e),i.shift()):(Object(a.a)("[MediaElement] Creating new media element. type: %s",e),document.createElement(e))}function r(e){var t=e.nodeName.toLowerCase();Object(a.a)("[MediaElement] Releasing media element to pool. type: %s",t),o[t]||(o[t]=[]),o[t].push(e)}t.a=i,t.b=r;var a=(n(33),n(30)),o={},s=!1},function(e,t,n){"use strict";var i=n(239),r=new i.a({props:["shortcuts"]});t.a=r
},,,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){var i=n(407),r=i.Symbol;e.exports=r},,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),a.a,function(e,t){return t[e.serverEntityID]})}t.a=i;var r=n(6),a=(n.n(r),n(218)),o=n(44)},function(e,t,n){"use strict";function i(e,t){var n=t.options?a()({},t.options):{}
;return n.providerModel=o.h(e,t),t.metadataItemEntityID&&(n.metadataItemModel=o.d(e,t)),t.playlistMetadataItemEntityID&&(n.playlistModel=o.d(e,{metadataItemEntityID:t.playlistMetadataItemEntityID})),t.metadataItemEntityIDs&&(n.metadataItemModels=t.metadataItemEntityIDs.map(function(t){return o.d(e,{metadataItemEntityID:t})})),t.metadataListEntityID&&(n.metadataListModel=o.e(e,t)),t.listType&&(n.type=Object(s.a)({metadataType:t.listType})),n}t.a=i;var r=n(7),a=n.n(r),o=n(78),s=n(415)
},function(e,t,n){"use strict";var i=n(23),r=n(931),a=i.a.extend({name:"PlayQueueItemCollection",context:["server","provider","identifier","mediaTagPrefix","mediaTagVersion"],model:r.a});t.a=a},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r});var i="cast",r="plex"},function(e,t,n){"use strict";var i=n(4),r=n(55),a=n(76),o=r.a.extend({name:"LegacyChannelProviderModel",defaults:function(){return{identifier:r.c.CHANNEL_PROVIDER_IDENTIFIER,
title:Object(i.default)("Channel"),types:["video","audio","photo"],protocols:["stream"],features:[{type:a.b.ACTIONS,actions:[]}]}}});t.a=o},function(e,t,n){"use strict";function i(e,t,n){var i=e.get("previousOpenState"),r=e.get("openState");return i&&!t?r=i:i&&t&&(r=void 0),a()({previousOpenState:r,openState:i&&t?i:o.a},n)}t.a=i;var r=n(7),a=n.n(r),o=n(197)},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(170)),a=Object(i.createSelector)(r.a,function(e){return e.playQueueItems});t.a=a
},function(e,t,n){"use strict";function i(e){var t=o.a.get("audio").id,n=Object(s.a)(e,{streamType:t,selected:!0});return a.a.first(n)}var r=n(5),a=n.n(r),o=n(129),s=n(243);t.a=i},function(e,t,n){"use strict";var i=n(598),r=Object(i.a)();t.a=r},function(e,t,n){"use strict";function i(e){return e.get("isOpen")?e.get("hasError")?r.b:e.get("isPaused")?r.c:e.get("isBuffering")?r.a:r.d:r.e}t.a=i;var r=n(491)},function(e,t,n){"use strict";function i(e){var t=e.get("playQueue");if(t){
var n=t.get("currentIndex");return Object(r.a)(e,n)}}t.a=i;var r=n(171)},function(e,t,n){"use strict";function i(e){var t=e.component,n=s()(e,["component"]);return u.a.createElement(t,a()({},n,{type:d.b,allowRecycleElement:!0}))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(938),p=n(939),h=n(941),f=n(1799),v=n.n(f);i.defaultProps={className:v.a.videoElement,containerClassName:v.a.videoContainer,component:h.a},t.a=Object(p.a)(i)},function(e,t,n){"use strict"
;var i=n(1),r=n.n(i),a=r.a.shape({subscribe:r.a.func.isRequired,dispatch:r.a.func.isRequired,getState:r.a.func.isRequired});t.a=a},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),Object(s.a)(),a.a,function(e,t,n){return t&&t.transcodeServerEntityID?n[t.transcodeServerEntityID]:e&&e.serverEntityID?n[e.serverEntityID]:void 0})}var r=n(6),a=(n.n(r),n(218)),o=n(44),s=n(252);t.a=i},function(e,t,n){"use strict"
;var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(84),h=n.n(p),f=(n(33),n(29)),v=function(e){function t(n,i){r()(this,t);var a=o()(this,e.call(this,n,i));return a.removePortal=function(){var e=a.props.onPortalRef,t=a._portal;t&&(h.a.unmountComponentAtNode(t),document.body.removeChild(t)),a._portal=null,a._portalRef=null,e&&e(null),a._closeTimeoutID=clearTimeout(a._closeTimeoutID)},a._portal=null,a._portalRef=null,a._closeTimeoutID=null,a}return l()(t,e),
t.prototype.componentDidMount=function(){this.props.isOpen&&this.renderPortal(this.props)},t.prototype.shouldComponentUpdate=function(e,t){return Object(f.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)},t.prototype._setClassName=function(e,t){null!=t&&(e.className=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=d.a.Children.only(e.children);this._portal=n;var r=h.a.unstable_renderSubtreeIntoContainer(this,i,n)
;this._portalRef!==r&&(this._portalRef=r,t&&(t(null),t(this._portalRef)))},t.prototype.render=function(){return null},t}(u.Component);v.defaultProps={isOpen:!0,closeTimeout:0},t.a=v},function(e,t,n){"use strict";function i(e,t,n){var i=0;return a.a.Children.map(e,function(e){if(a.a.isValidElement(e)){var r=i;return i++,t.call(n,e,r)}return e})}t.a=i;var r=n(0),a=n.n(r)},function(e,t,n){"use strict";n.d(t,"b",function(){return o});var i=n(16),r=n(18),a=n(77),o={INACTIVE:"inactive",
SCHEDULED:"scheduled",IN_PROGRESS:"inprogress",COMPLETE:"complete",CANCELLED:"cancelled",ERROR:"error"},s=r.a.extend({name:"MediaGrabOperationModel",context:["server","provider"],rootPropertyName:"MediaGrabOperation",syncedAttrs:{mediaSubscriptionID:i.a.string,provider:i.a.string,identifier:i.a.string,mediaIndex:i.a.integer,channelTitle:i.a.string,status:i.a.string,error:i.a.string,linkedKey:i.a.string,key:i.a.string,rolling:i.a.boolean},sessionAttrs:{isLibraryMetadataItemPending:i.a.boolean,
isLibraryMetadataItemPopulated:i.a.boolean,libraryMetadataItemError:i.a.object},syncedRelations:{metadataItem:{relationClass:a.a,rootPropertyName:"Metadata"},conflicts:function(){return{relationClass:n(673).default,deferred:!0}}},sessionRelations:{libraryMetadataItem:{relationClass:a.a,deferred:!0}},derivedAttrs:{mediaItem:function(){var e=this.get("mediaIndex");return(this.get("metadataItem").get("Media")||[])[e]},beginsAt:function(){var e=this.get("mediaItem");return e&&e.beginsAt},
endsAt:function(){var e=this.get("mediaItem");return e&&e.endsAt}},defaults:{rolling:!1,isLibraryMetadataItemPending:!0,isLibraryMetadataItemPopulated:!1,libraryMetadataItemError:null},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.a=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),r=n(672),a=i.a.extend({
name:"MediaGrabOperationCollection",context:["server","provider"],model:r.a,comparator:function(e){var t=e.get("mediaItem");if(t){return t.beginsAt-(t.startOffsetSeconds||0)}}});t.default=a},function(e,t,n){"use strict";function i(e){var t=e.iconClassName,n=e.messageClassName,i=e.kind,r=e.message,o=s()(e,["iconClassName","messageClassName","kind","message"]);return u.a.createElement(h.a,o,a()(p.a,{name:"plex-icon-alert-560",className:(v.a[i]||"")+" "+(t||"")}),a()("div",{className:n},void 0,r))}
var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(24),p=n(26),h=n(965),f=n(1838),v=n.n(f);i.defaultProps={iconClassName:v.a.icon,messageClassName:v.a.message,kind:d.b.DEFAULT},t.a=i},function(e,t,n){"use strict";function i(e){var t=/^\/playQueues\/([^\/?]+)/.exec(e);return t&&t[1]||void 0}t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),a.a,function(e,t){return e&&e.timeline?e.timeline.map(function(e){return t[e]}):[]})}t.a=i
;var r=n(6),a=(n.n(r),n(110)),o=n(198)},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=a.a.duration(e),n=t.hours()+24*t.days(),i=t.minutes(),r=t.seconds();return n&&i?Object(o.default)("{1} hr {2} min",n,i):n?Object(o.default)("{1} hr",n):i?Object(o.default)("{1} min",i):r>0?Object(o.default)("{1} sec",r):""}var r=n(41),a=n.n(r),o=n(4);t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(7),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),
n(0)),v=n.n(f),g=n(15),m=n(73),y=n(24),b=n(671),I=n(132),S=n(103),M=n(111),D=n(74),C=n(1855),O=n.n(C),j=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onItemSelect=function(e){Object(g.d)("metrics").trackClick(o()({},i.props.metricsProperties,{page:i.props.metricsPage,action:m.Q,value:e})),i.props.onItemSelect(e)},i.onCancel=function(){
Object(g.d)("metrics").trackClick(o()({},i.props.metricsProperties,{page:i.props.metricsPage,action:m.f})),i.props.onCancel()},r=n,u()(i,r)}return p()(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.children,i=t.isOpen,a=t.metricsPage,o=t.metricsProperties,s=t.title;return r()(I.a,{size:y.e.SMALL,isOpen:i,metricsPage:a,metricsProperties:o,onModalClose:this.onCancel},void 0,r()(S.a,{onModalClose:this.onCancel},void 0,r()(M.a,{},void 0,s),r()(D.a,{
innerClassName:O.a.listModalInnerBody},void 0,Object(b.a)(n,function(t){return v.a.cloneElement(t,{onSelect:e.onItemSelect})}))))},t}(f.Component);t.a=j},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(22),m=n(1856),y=n.n(m),b=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),
i.onPress=function(e){var t=i.props,n=t.value,r=t.onSelect,a=t.onPress;r&&r(n),a&&a(e)},r=n,u()(i,r)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=(e.value,e.onSelect,o()(e,["value","onSelect"]));return v.a.createElement(g.a,r()({},t,{onPress:this.onPress}))},t}(f.Component);b.defaultProps={className:y.a.listModalItem},t.a=b},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(l.a)(),Object(s.a)(),function(e,t){
var n=e.serverEntityID,i=e.positionSeconds,r=e.durationSeconds,a=e.mediaIndex,o=e.partIndex,s=e.controllable,l={serverEntityID:n,metadataItemEntityID:t.metadataItem,canSeek:!!r,positionSeconds:i,durationMilliseconds:1e3*r,mediaIndex:a,partIndex:o};return s&&!s.seekTo&&(l.canSeek=!1),l})}var r=n(6),a=(n.n(r),n(11)),o=n(681),s=n(119),l=n(44),c=n(131),u=n(682),d={onSeek:c.m},p=Object(o.a)(u.a);t.a=Object(a.b)(i,d)(p)},function(e,t,n){"use strict";function i(e){function t(t){
var n=t.positionSeconds,i=t.positionMilliseconds,r=s()(t,["positionSeconds","positionMilliseconds"]),o=i;if(null!=n){Math.abs(n-Math.floor(i/1e3))>1&&(o=1e3*n)}return u.a.createElement(e,a()({positionSeconds:n,positionMilliseconds:o},r))}var n=Object(p.createSelector)(function(e){return e.positionMilliseconds},function(e){return{positionMilliseconds:e}});return t.displayName="WithPositionMilliseconds("+Object(h.a)(e)+")",t.WrappedComponent=e,Object(d.b)(n,null,null,{storeKey:"playerStore"})(t)}
var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(11),p=n(6),h=(n.n(p),n(153));t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(683),b=n(967),I=n(418),S=n(670),M=n(286),D=n(1871),C=n(1875),O=n.n(C),j=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r.onChange=function(e){var t=e.positionValue
;r.props.onSeek&&r.props.onSeek({playerType:r.props.playerType,positionSeconds:Math.floor(t/1e3)})},r.onMove=function(e){var t=e.positionValue,n=e.position;r.setState({hoverValue:t,portalPosition:n})},r.onMouseLeave=function(){r.setState({hoverValue:null})},r.state={hoverValue:null,portalPosition:{x:0,y:0}},r}return f()(t,e),t.prototype.render=function(){
var e=this.props,t=e.className,n=e.trackClassName,i=e.bufferClassName,a=e.fillClassName,s=e.canSeek,c=e.positionMilliseconds,u=e.offsetMilliseconds,d=e.durationMilliseconds,p=e.bufferStartMilliseconds,h=e.bufferEndMilliseconds,f=e.showBuffer,v=e.noFillTransition,g=e.isDisabled,y=l()(e,["className","trackClassName","bufferClassName","fillClassName","canSeek","positionMilliseconds","offsetMilliseconds","durationMilliseconds","bufferStartMilliseconds","bufferEndMilliseconds","showBuffer","noFillTransition","isDisabled"])
;if(!s)return null;var b=this.state,I=b.hoverValue,C=b.portalPosition;return o()("div",{onMouseLeave:this.onMouseLeave},void 0,o()(M.a,{className:t,trackClassName:n,secondaryFillClassName:(i||"")+" "+(v&&O.a.noFillTransition||""||""),fillClassName:(a||"")+" "+(v&&O.a.noFillTransition||""||""),value:c,min:u,max:d,secondaryMin:p,secondaryMax:h,showFill:!0,showSecondaryFill:f,autoHideThumb:!0,isDisabled:g,onChange:this.onChange,onMove:g?null:this.onMove
}),null!=I&&o()(S.a,{},void 0,m.a.createElement(D.a,r()({},y,{position:C,hoverValue:I}))))},t}(g.Component);j.defaultProps={className:O.a.seekBar,trackClassName:O.a.seekBarTrack,fillClassName:O.a.seekBarFill,bufferClassName:O.a.seekBarBuffer,canSeek:!0,showBuffer:!1,noFillTransition:Object(y.a)()||Object(b.a)()||Object(I.a)(),isDisabled:!1},t.a=j},function(e,t,n){"use strict";function i(){return"edge"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a).id}t.a=i;var r=n(38)
},function(e,t,n){"use strict";function i(e){var t=e.target,n=e.isOpen,i=e.onMenuClose,r=s()(e,["target","isOpen","onMenuClose"]);return a()(d.a,{target:t,isOpen:n,onMenuClose:i},void 0,u.a.createElement(p.a,r))}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(75),p=n(1886);i.defaultProps={allowRedirectOnDelete:!1},t.a=i},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=n(4),c=s.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 n=this.model.toJSON(),i=this.model.get("mixedFields"),r={originallyAvailableAt:Object(l.default)("YYYY-MM-DD"),capturedTime:"YYYY-MM-DD HH:mm:ss"};return i&&i.forEach(function(e){
r[e]=Object(l.default)("MIXED")}),{item:n,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=o()(n),r=i.data("field");i.hasClass("locked")?t[r]=!0:r in t&&(t[r]=!1)}),
r.a.map(t,function(e,t){return{name:t,locked:e}})},onLockClick:function(e){e.preventDefault(),o()(e.currentTarget).hasClass("disabled")||o()(e.currentTarget).toggleClass("locked")},onLockableFieldChange:function(e){var t=e instanceof o.a?e:o()(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(1910),r=n.n(i),a=n(12),o=n.n(a),s=n(5),l=n.n(s),c=n(1911),u=n(32),d=c.a.extend({tagName:"span",className:"rating star-rating",template:r.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);this.$(".star-icon").each(function(e){var n=t>e;o()(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(279),r=n(165),a=n(1960),o=r.a.extend({model:a.a,url:"/playlists?type="+i.a.LOCAL,parse:function(e){return this.convert(e,"Playlist")}});t.a=o},function(e,t,n){"use strict"
;var i=n(1983),r=n.n(i),a=n(12),o=n.n(a),s=n(5),l=n.n(s),c=n(15),u=n(32),d=n(70),p=n(400),h=n(1984),f=p.a.extend({name:"recommendModal",className:"recommend-modal select-modal modal modal-sm fade",template:r.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(){p.a.prototype.initialize.apply(this,arguments);var e=c.d("appModel"),t=e.get("user");this.collection=t.get("desktop").get("friends").filterByUnrestricted(),this.playlistIDs=[]},serializeData:function(){return{hasFriends:!!this.collection.length}},onRender:function(){p.a.prototype.onRender.apply(this,arguments),this.list.show(new h.a({collection:this.collection}))},onClose:function(){this.collection.destroy()},onFriendClick:function(e){e.preventDefault()
;var t=o()(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";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 P(e,"streamType")})}function r(e){return l.a.map(e.get("Media"),function(e){return l.a.extend(P(e,"Part"),{Part:l.a.map(e.Part,function(e){return l.a.extend(P(e,"Stream"),{file:e.file,exists:!1!==e.exists,accessible:!1!==e.accessible,Stream:i(e.Stream)})})})})}
var a=n(1987),o=n.n(a),s=n(5),l=n.n(s),c=n(12),u=n.n(c),d=n(15),p=n(350),h=n(991),f=n(331),v=n(690),g=n(1989),m=n(405),y=n(993),b=n(1995),I=n(19),S=n(70),M=n(32),D=["id","key","index","videoCodec","audioCodec","audioChannels","default","selected","languageCode","codecID","accessible","exists","provider","lines","minLines","follow","requiredBandwidths","deepAnalysisVersion","deepAnalysisDate"],C={size:h.a,duration:p.a,codec:m.a,format:m.a,container:m.a,videoResolution:f.default,channels:v.a,
bitrateMode:m.a,accessible:y.default,exists:y.default,optimizedForStreaming:y.default,timed:y.default,file:I.getLastSegment},O={optimizedForStreaming:"Web Optimized",has64bitOffsets:"Has 64bit Offsets",cabac:"CABAC",postURL:"URL"},j={frameRate:" fps",dialogNorm:" dB",bitrate:" kbps",samplingRate:" Hz"},P=function(e,t){var n={properties:[]};for(var i in e)if(i!==t&&-1===l.a.indexOf(D,i)){var r=O[i],a=e[i];"level"===i&&(a=Object(g.a)(a,e.codec)),C[i]&&(a=C[i](a)),a&&(j[i]&&(a+=j[i]),
r||(r=Object(b.a)(i)),n.properties.push({name:r,value:a}))}return t&&e&&(n[t]=e[t]),n},w=S.a.extend({name:"mediaInfoModal",className:"media-info-modal modal modal-lg fade",template:o.a,ui:{scroller:".modal-body-scroll",files:".files > ul",stickyProps:".media > .props, .part > .props"},events:l.a.extend({"click .delete-btn":"onDeleteClick"},S.a.prototype.events),modelEvents:{"change:Media":"onMediaChange"},initialize:function(e){S.a.prototype.initialize.apply(this,arguments),
this.bindAllWhenRendered("onMediaChange","onScroll"),this.loading=!1,this.media=r(this.model),this.loading=!0,this.model.fetch({usePopulatedParams:!0,data:{checkFiles:1,asyncCheckFiles:0}}).always(this.whenRendered(function(){this.model.changed.hasOwnProperty("Media")||this.updateMedia()}))},serializeData:function(){var e=this.model.get("key"),t=d.d("appModel"),n=t.get("user"),i=this.model.server;return this.model.get("isLibraryItem")&&(e=I.join(e,{checkFiles:1,includeExtras:1,
includeBandwidths:1})),{key:e,url:this.model.server.resolveUrl(e,{appendToken:!0}),media:this.media,hasFiles:this.hasFiles(),hasStreams:this.hasStreams()||this.loading,showDeleteFile:i.get("isFullOwnedServer")&&i.get("allowMediaDeletion")&&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=r(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()},onRender:function(){S.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(),M.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;if(this.ui.files.length&&(t+=parseInt(this.ui.files.css("margin-bottom"),10)),t<0)return void setTimeout(this.onScroll,500);this.ui.stickyProps.each(function(){
var n=u()(this),i=n.parent().height()-n.height(),r=e-this.parentNode.offsetTop,a=Math.min(Math.max(r,0),i);a&&a===r?(n.addClass("sticky"),n.css("top",t)):(n.removeClass("sticky"),n.css("top",a))})}});t.a=w},function(e,t,n){"use strict";function i(e){return e=parseInt(e,10),e?e<2?Object(r.default)("Mono"):e<3?Object(r.default)("Stereo"):(e-1).toString()+".1":""}var r=n(4);t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.playQueueItemEntityID
},a.a,function(e,t){return t[e]})}t.a=i;var r=n(6),a=(n.n(r),n(662))},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.hubEntityID},a.a,function(e,t){return t[e]})}t.a=i;var r=n(6),a=(n.n(r),n(1004))},function(e,t,n){"use strict";function i(e,t,n){var i=n.key,o=n.title,s=n.type,l=n.subtype,c=n.content,u=n.context,d=Object(a.a)(e,t);return c?r.join(["#!",d],{key:i,context:u}):r.join(["#!",d,"list"],{key:i,type:s,subtype:l,title:o,context:u})}t.a=i
;var r=n(19),a=n(507)},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"}],i.ALL=[i.TINY,i.SMALL,i.NORMAL,i.LARGE,i.HUGE],t.a=i},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}var r=n(1009),a=n(2116),o=n(2117);i.prototype.add=i.prototype.push=a,
i.prototype.has=o,e.exports=i},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t,n){function i(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}var r=n(2118);e.exports=i},function(e,t){function n(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)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,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}e.exports=n},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){function i(e){return null!=e&&a(e.length)&&!r(e)}var r=n(1010),a=n(1012);e.exports=i},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 r=Object.prototype.hasOwnProperty,a=0;a<n.length;a++){if(!r.call(t,n[a])||e[n[a]]!==t[n[a]])return!1;if(e[n[a]]!==t[n[a]])return!1}return!0}t.__esModule=!0,t.default=i,
e.exports=t.default},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){"use strict";t.__esModule=!0;t.FILE="__NATIVE_FILE__";t.URL="__NATIVE_URL__";t.TEXT="__NATIVE_TEXT__"},function(e,t,n){"use strict";n.d(t,"c",function(){return p}),n.d(t,"b",function(){return h}),n.d(t,"a",function(){return f})
;var i,r=n(7),a=n.n(r),o=n(344),s=n(17),l=n(171),c=n(36),u=n(499),d=n(118),p=Object(c.a)("ui/player/playQueue/toggleAutoPlay"),h=Object(c.a)("ui/player/playQueue/savePlayQueueToPlaylist"),f=a()({},d.j,(i={},i[d.b]=function(e,t){var n,i=t.playerType,r=e.get("user").id,o=Object(l.b)(e,i),s=o.get("playQueue"),c=e.get("experienceSettings"),u={providerEntityID:o.get("providerEntityID"),serverEntityID:o.get("serverEntityID"),playQueueOffset:o.get("positionSeconds"),playQueueType:s.get("type"),
playQueueRepeat:s.get("repeat"),playQueueID:s.get("playQueueID")},d=c.get("restorePlayQueue");c.save("restorePlayQueue",a()({},d,(n={},n[r]=u,n)))},i[d.a]=function(e){var t=e.get("user").id,n=e.get("experienceSettings").get("restorePlayQueue"),i=a()({},n);delete i[t],e.get("experienceSettings").save("restorePlayQueue",i)},i["ui/player/playQueue/toggleAutoPlay"]=function(e,t){var n=t.playerType,i=Object(l.b)(e,n),r=e.get("experienceSettings"),a=r.get("autoPlay")
;Object(o.a)(e).changeAutoPlay(i,r,!a)},i["ui/player/playQueue/savePlayQueueToPlaylist"]=function(e,t){var n=t.playerType,i=Object(l.b)(e,n),r=i.get("playQueue");s.a.trigger("show:modal",new u.a({model:r}))},i))},function(e,t,n){"use strict";function i(e){return s.a.createElement(l.a,a()({},e,{barColor:u.a.equalizerBarColor}))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(2197),c=n(1029),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){
return{title:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).title}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(517);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.metricsContext},o.a,s.a,Object(l.a)(),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={};return e&&(r.context=e),{skipParent:i.skipParent,parentTitle:i.parentTitle,parentRoute:Object(c.a)(t,n,i.parentKey,r),
grandparentTitle:i.originalTitle||i.grandparentTitle,grandparentRoute:Object(c.a)(t,n,i.grandparentKey,r)}})}var r=n(6),a=(n.n(r),n(57)),o=n(48),s=n(37),l=n(21),c=n(134),u=n(2206);t.a=Object(a.a)(i)(u.a)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{skipChildren:e.skipChildren,childCount:e.childCount,leafCount:e.leafCount}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2210)
;t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){return{leafCount:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).leafCount}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(519);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.metricsContext},o.a,s.a,Object(l.a)(),function(e,t,n){
var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={};return e&&(r.context=e),{title:i.title,index:i.index,route:Object(c.a)(t,n,i.key,r),parentTitle:i.parentTitle,parentIndex:i.parentIndex,parentRoute:i.skipParent?null:Object(c.a)(t,n,i.parentKey,r),originallyAvailableAt:i.originallyAvailableAt}})}var r=n(6),a=(n.n(r),n(57)),o=n(48),s=n(37),l=n(21),c=n(134),u=n(1033);t.a=Object(a.a)(i)(u.a)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.tabIndex,i=e.title,r=e.index,o=e.route,s=e.parentTitle,l=e.parentIndex,p=e.parentRoute,h=e.originallyAvailableAt;return a()("span",{className:t},void 0,a()(u.a,{tabIndex:n,title:i,index:r,route:o,parentTitle:s,parentIndex:l,parentRoute:p,originallyAvailableAt:h}),i&&d,i&&a()(c.a,{tabIndex:n,title:i,route:o}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(86)),c=n(357),u=n(1033),d=a()(l.a,{});t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.duration,i=e.viewOffset,r=void 0;if(n&&i){var o=(n-i)/1e3;o&&(r=Object(l.a)(o))}return a()("span",{className:t},void 0,r)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(285));t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){return{addedAt:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).addedAt}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2215);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict"
;function i(e){var t=[Object(c.default)("January"),Object(c.default)("February"),Object(c.default)("March"),Object(c.default)("April"),Object(c.default)("May"),Object(c.default)("June"),Object(c.default)("July"),Object(c.default)("August"),Object(c.default)("September"),Object(c.default)("October"),Object(c.default)("November"),Object(c.default)("December")],n=t[e];return Object(l.a)(n,"Unknown month"),n}function r(e){
var t=[Object(c.default)("Jan"),Object(c.default)("Feb"),Object(c.default)("Mar"),Object(c.default)("Apr"),Object(c.default)("May"),Object(c.default)("Jun"),Object(c.default)("Jul"),Object(c.default)("Aug"),Object(c.default)("Sep"),Object(c.default)("Oct"),Object(c.default)("Nov"),Object(c.default)("Dec")],n=t[e];return Object(l.a)(n,"Unknown month"),n}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.abbreviate,a=void 0!==n&&n;if(!e)return""
;var o=s.a.unix(e).month();return a?r(o):i(o)}var o=n(41),s=n.n(o),l=n(33),c=n(4);t.a=a},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),Object(o.a)(),function(e,t){if(null!=e&&t){return t.Media.find(function(t){var n=t.beginsAt,i=t.endsAt;return n<=e&&i>e})}})}t.a=i;var r=n(6),a=(n.n(r),n(522)),o=n(523)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.duration;return n?a()("span",{className:t},void 0,Object(l.a)(n)):null}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(350));t.a=i},function(e,t,n){"use strict";function i(e,t){return Object(a.createSelector)(Object(o.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 r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2239);t.a=Object(r.b)(i)(s.a)},function(e,t,n){var i=n(71),r=n(2246);e.exports=i({},r,{
starSpeed:"0.3s",starPulseSpeed:"0.15s",posterFlipSpeed:"0.8s",overlaySpeed:"0.3s"})},function(e,t,n){"use strict";function i(e){if(!e)return"";var t=e.indexOf("/");return-1!==t?e.substr(t+1):e}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.playButtonClassName,i=e.playCircleClassName,r=e.serverEntityID,o=e.providerEntityID,s=e.imageWidth,p=e.imageHeight,f=e.imageUrl,v=e.title,g=e.isLiveTVItem,m=e.recordLink,y=e.onRecordPress,b=e.onPlayPress;return a()(u.a,{className:t,
serverEntityID:r,providerEntityID:o,component:d.a,width:s,height:p,url:f},void 0,g?a()(c.a,{className:h.a.recordButton,"data-qa-id":"metadataPosterRecordButton",circleClassName:h.a.recordCircle,tabIndex:"-1",title:v,to:m,onPress:y}):a()(l.a,{className:n,"data-qa-id":"metadataPosterPlayButton",circleClassName:i,tabIndex:"-1",title:v,onPress:b}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(173)),c=n(524),u=n(296),d=n(256),p=n(2259),h=n.n(p);i.defaultProps={className:h.a.card,
playButtonClassName:h.a.playButton,playCircleClassName:h.a.playCircle,isLiveTVItem:!1},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.transitionProps,n=s()(e,["transitionProps"]);return u.a.createElement(p.a,a()({style:v,background:!0,minSize:!0,transition:!0,transitionProps:a()({className:f.a.imageContainer},d.a,t)},n))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(339),p=n(169),h=n(2256),f=n.n(h),v={width:"100%",height:"100%"};t.a=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(){return Object(a.createSelector)(Object(o.a)(),function(e){return e?e.desktop.libraries:void 0})}
function r(){return Object(a.createSelector)(s.a,i(),function(e,t){return t?t.map(function(t){return e[t]}):[]})}t.a=r;var a=n(6),o=(n.n(a),n(42)),s=n(1064)},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(170)),a=Object(i.createSelector)(r.a,function(e){return e.mediaSubscriptions});t.a=a},function(e,t,n){"use strict";function i(e){function t(){i<0||e().done(function(){s&&clearTimeout(s),o.resolve.apply(o,arguments)}).fail(function(){i-=1,i<0?(s&&clearTimeout(s),
o.reject.apply(o,arguments)):"pending"===o.state()&&setTimeout(t,r)})}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Math.floor(Math.max(n.times||0,0)),r=Math.floor(Math.max(n.delay||0,0));n.cancel&&n.cancel.always(function(){i=-1});var o=a.a.Deferred(),s=void 0;return n.maxDuration&&(s=setTimeout(function(){o.reject("maxDuration")},n.maxDuration)),t(),o.promise()}t.a=i;var r=n(12),a=n.n(r)},function(e,t,n){"use strict";var i=n(23),r=n(299),a=i.a.extend({
name:"MediaGrabberDeviceCollection",context:["server"],model:r.a,url:"/media/grabbers/devices"});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({name:"EPGLanguageModel",context:["server"],rootPropertyName:"Language",idAttribute:"code",syncedAttrs:{code:r.a.string,title:r.a.string}});t.a=a},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.grandparentTitle;return a()(l.a,{className:t,title:n})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(517));t.a=i
},function(e,t,n){"use strict";function i(e){return s.a.createElement(l.a,a()({iconClassName:u.a.icon,icon:"plex-icon-alert-560"},e))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(182),c=n(2410),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.key,n=e.getModel,i=Object(r.a)(t),o="is"+i+"Pending",s="is"+i+"Populated",l=t?t+"Error":"error";return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.count,c=n(e,i),u=t?c.get(t):c,d=(c.sessionAttrs,c.get(o))
;c.set(o,!0),u.repopulateRange(r).done(function(){var e;c.set((e={},e[o]=!1,e[s]=!0,e[l]=null,e))}).fail(function(e,t){var n;if(t.aborting)return void c.set(o,d);c.set((n={},n[o]=!1,n[l]=Object(a.a)(t),n))})}}t.a=i;var r=(n(33),n(326)),a=n(140)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(29)),f=n(1090),v=n(2453),g={opacity:0,pointerEvents:"none"},m={opacity:1,pointerEvents:"auto"},y=function(e){
function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onListReady=function(){++r._readyCount===r._initialCount&&r.setState({isReady:!0})},r.state={isReady:!1},r._readyCount=0,r}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 Object(h.a)(this,e,t)},t.prototype.render=function(){var e=this,t=this.props,n=t.className,i=t.serverEntityID,a=t.providerEntityID,o=t.hubEntityIDs,s=t.isPromoted,l=t.columnAdjustment,c=this.state.isReady,u=s?v.a:f.a;return r()("div",{className:n,style:c?m:g},void 0,o.map(function(t){return r()(u,{serverEntityID:i,providerEntityID:a,hubEntityID:t,columnAdjustment:l,onListReady:e.onListReady},t)}))},t}(p.Component);t.a=y
},function(e,t,n){"use strict";function i(e){var t=e.innerViewportWidth,n=e.innerHorizontalPadding,i=void 0===n?0:n,r=e.minCellWidth,a=e.minColumns,o=void 0===a?0:a,s=e.maxColumns,l=void 0===s?1/0:s,c=e.columnAdjustment,u=void 0===c?0:c,d=Math.floor((t+i)/(r+i)),p=void 0;return p=d<o?o:d>l?l:d,p=Math.max(p+u,1),Math.max(Math.floor((t+i)/p)-i,0)}t.a=i},function(e,t,n){"use strict";var i=n(1),r=n.n(i);r.a.shape({getListStyle:r.a.func.isRequired,getPositionForIndex:r.a.func.isRequired,
getRangesForPosition:r.a.func.isRequired,getRelativeIndex:r.a.func.isRequired})},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.metadataDirectoryEntityID},a.a,function(e,t){return t[e]})}t.a=i;var r=n(6),a=(n.n(r),n(2445))},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(Object(c.a)(),Object(u.a)(),Object(d.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=arguments[2]
;return o()({duration:e.duration,saved:e.saved,viewCount:e.viewCount,viewOffset:e.viewOffset,type:e.type,subtype:e.subtype,isFileUnavailable:n},t)})}function r(e,t){return{onGetInfoPress:function(n){e(Object(p.getMetadataItemInfo)({metadataItemEntityID:t.metadataItemEntityID}))}}}var a=n(7),o=n.n(a),s=n(11),l=n(6),c=(n.n(l),n(21)),u=n(2458),d=n(2459),p=n(120),h=n(2460);t.a=Object(s.b)(i,r)(h.a)},function(e,t,n){"use strict";function i(e){return o.a.createElement(l.a,e)}var r=n(1),a=(n.n(r),
n(0)),o=n.n(a),s=n(24),l=n(47),c=n(2465),u=n.n(c);i.defaultProps={className:u.a.statusButton,size:s.e.SMALL},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.linkClassName,i=e.server,r=e.provider,o=e.librarySectionKey,s=e.fallbackFilterKey,d=e.type,p=e.tags,h=e.limit;if(!p||!p.length)return null;var f=d&&Object(l.r)(d);return a()("span",{className:t},void 0,p.map(function(e,t){if(!(t>=h)){var l={filters:e.filter,filterLabel:e.tag}
;return!l.filter&&s&&e.id&&(l.filters=s+"="+e.id),f&&(l.type=f.id),e.context&&(l.context=e.context),a()("span",{},t,a()(u.a,{className:n,to:Object(c.a)(i,r,o,l)},void 0,e.tag),t+1<h&&t+1<p.length&&", ")}}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(28)),c=(n(95),n(87),n(122)),u=n(22),d=n(2472),p=n.n(d);i.defaultProps={linkClassName:p.a.tagsListLink,limit:1/0},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className;return a()("div",{className:n,
"data-qa-id":"preplayDetailsContainer"},void 0,t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2473)),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.audioStream;if(!t)return a()("span",{},void 0,Object(l.default)("None"));var n=[];return t.codec&&n.push(Object(c.a)(t.codec)),t.channels&&n.push(Object(u.a)(t.channels)),a()("span",{"data-qa-id":"audioStream"
},void 0,t.language||Object(l.default)("Unknown"),!!n.length&&p,n.join(" "))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(1104),u=n(690),d=n(86),p=a()(d.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.subtitlesStream;if(!t)return a()("span",{},void 0,Object(l.default)("None"));var n=[];return t.codec&&n.push(Object(c.a)(t.codec)),t.key&&n.push(Object(l.default)("External")),t.forced&&n.push(Object(l.default)("Forced")),a()("span",{},void 0,a()("span",{
"data-qa-id":"subtitleStream"},void 0,t.language||Object(l.default)("Unknown"),!!n.length&&d,n.join(" ")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(405),u=n(86),d=a()(u.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,n=e.provider,i=e.librarySectionKey,r=e.type,o=e.Genre;return a()(l.a,{server:t,provider:n,librarySectionKey:i,fallbackFilterKey:"genre",type:r,tags:o,limit:2})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(95),n(87),n(739));t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return a()("div",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2518)),c=n.n(l);i.defaultProps={className:c.a.container},t.a=i},function(e,t,n){"use strict";function i(){return"konvergo"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a).id}t.a=i;var r=n(38)},function(e,t,n){"use strict";function i(){
return"tivo"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a).platformID}t.a=i;var r=n(38)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a;return"viziomtk"===e.platformID&&Object(a.a)(e)}t.a=i;var r=n(38),a=n(546)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a;return"viziosigma"===e.platformID&&Object(a.a)(e)}t.a=i;var r=n(38),a=n(546)},function(e,t,n){
"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a;return"viziomtk"===e.platformID&&Object(a.a)(e)}t.a=i;var r=n(38),a=n(547)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a;return"viziosigma"===e.platformID&&Object(a.a)(e)}t.a=i;var r=n(38),a=n(547)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.imageWidth,i=e.imageHeight,r=e.imageUrl,o=e.tagType,l=s()(e,["className","imageWidth","imageHeight","imageUrl","tagType"]),c=d.a.get(o),f=!!c&&c.isPerson;return u.a.createElement(p.a,a()({className:(t||"")+" "+(f&&v.a.isPerson||""||""),component:h.a,width:n,height:i,url:r,tagType:o},l))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(361),p=n(296),h=n(2628),f=n(2631),v=n.n(f);i.defaultProps={className:v.a.card},t.a=i},function(e,t,n){"use strict"
;function i(e,t){var n=e.match(/(^[^#]+)?/),i=n[1];return""+(i=i||"")+t}t.a=i},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(6),o=(n.n(a),n(2656)),s=Object(a.createSelector)(o.a,function(e){return r.a.find(e,function(e){return e.isFullOwnedServer})});t.a=s},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(195)),a=n(200),o=Object(r.a)(Object(i.createSelector)(a.a,function(e){return e.entitlements.reduce(function(e,t){return e[t.id]=!0,e},{})}),function(e){return e});t.a=o
},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r});var i="https://forums.plex.tv",r="https://status.plex.tv"},function(e,t,n){"use strict";function i(){return a()(u.a,{title:Object(s.default)("You must be lost"),description:Object(s.default)("We can't find the page you're looking for")},void 0,a()(c.a,{to:"#",kind:l.b.PRIMARY},void 0,Object(s.default)("Go Home")))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(4)),l=n(24),c=n(22),u=n(126);t.a=i
},function(e,t,n){"use strict";function i(e){return e.experienceSettings.libraryRoutes}t.a=i},function(e,t,n){"use strict";function i(e,t){return e.filter(function(e){return!!t[e]})}function r(e,t,n,i){var r=Math.floor(n/i),a={showOverflow:r<e.length||t.length>0},o=r-(a.showOverflow?1:0);return e.forEach(function(e){a[e]=o-- >0,a[e]||(a[e+"Overflow"]=!0)}),a}function a(e,t,n){var a=function(a){function o(e,t){d()(this,o);var n=h()(this,a.call(this,e,t));return n.onMeasure=function(e){
var t=e.width;n.setState({isMeasured:!0,width:t})},n.state={isMeasured:!1},n}return v()(o,a),o.prototype.render=function(){var a=this.state,o=a.isMeasured,l=a.width,u={};if(o){u=r(i(t,this.props),i(n,this.props),l,C)}return c()(S.a,{className:D.a.toolbarContainer,ignoreHeight:!0,ignorePosition:!0,onMeasure:this.onMeasure},void 0,o&&m.a.createElement(e,s()({className:D.a.toolbar},this.props,u)))},o}(g.Component);return a.displayName="PageHeaderToolbar("+Object(y.a)(e)+")",a.WrappedComponent=e,a}
var o=n(7),s=n.n(o),l=n(2),c=n.n(l),u=n(8),d=n.n(u),p=n(9),h=n.n(p),f=n(10),v=n.n(f),g=n(0),m=n.n(g),y=n(153),b=n(45),I=n.n(b),S=n(72),M=n(2685),D=n.n(M),C=parseInt(I.a.toolbarButtonWidth,10);t.a=a},function(e,t,n){"use strict";function i(e){var t=e.playLabel,n=void 0===t?Object(h.default)("Play"):t,i=c()(e,["playLabel"]);return p.a.createElement(v.a,s()({tooltip:n,"data-qa-id":"toolbarPlay"},i),g)}var r=n(2),a=n.n(r),o=n(7),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),
n(0)),p=n.n(d),h=n(4),f=n(26),v=n(127),g=a()(f.a,{name:"plex-icon-toolbar-play-560"});t.a=i},function(e,t,n){"use strict";function i(e){return c.a.createElement(p.a,s()({tooltip:Object(u.default)("Shuffle"),"data-qa-id":"toolbarShuffle"},e),h)}var r=n(2),a=n.n(r),o=n(7),s=n.n(o),l=n(0),c=n.n(l),u=n(4),d=n(26),p=n(127),h=a()(d.a,{name:"plex-icon-toolbar-shuffle-560"});t.a=i},function(e,t,n){"use strict";function i(e){return c.a.createElement(p.a,s()({"data-qa-id":"toolbarAddToAlbum",
tooltip:Object(u.default)("Add to Album")},e),h)}var r=n(2),a=n.n(r),o=n(7),s=n.n(o),l=n(0),c=n.n(l),u=n(4),d=n(26),p=n(127),h=a()(d.a,{name:"plex-icon-toolbar-add-to-album-560"});t.a=i},function(e,t,n){"use strict";function i(e){return c.a.createElement(p.a,s()({tooltip:Object(u.default)("Add to Playlist"),"data-qa-id":"toolbarPlaylist"},e),h)}var r=n(2),a=n.n(r),o=n(7),s=n.n(o),l=n(0),c=n.n(l),u=n(4),d=n(26),p=n(127),h=a()(d.a,{name:"plex-icon-toolbar-add-to-playlist-560"});t.a=i
},function(e,t,n){"use strict";function i(e){return s.a.createElement(l.a,a()({className:u.a.toolbarMenu},e))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(75),c=n(2688),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){return c.a.createElement(p.a,s()({tooltip:Object(u.default)("Sync"),"data-qa-id":"toolbarSync"},e),h)}var r=n(2),a=n.n(r),o=n(7),s=n.n(o),l=n(0),c=n.n(l),u=n(4),d=n(26),p=n(127),h=a()(d.a,{name:"plex-icon-toolbar-sync-560"});t.a=i},function(e,t,n){"use strict";function i(){
return Object(c.createSelector)(Object(u.a)(),Object(d.a)(),Object(p.a)(h.i),function(e,t,n){return{machineIdentifier:e.machineIdentifier,isRefreshing:!!t,hasTypeFirstSettings:n}})}function r(e){return s.a.createElement(f.a,e)}var a=n(1),o=(n.n(a),n(0)),s=n.n(o),l=n(11),c=n(6),u=(n.n(c),n(42)),d=n(304),p=n(232),h=n(52),f=n(2697);t.a=Object(l.b)(i)(r)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return a()("div",{className:t},void 0,n)}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2708)),c=n.n(l);i.defaultProps={className:c.a.pageHeaderCenter},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=s()(e,["className"]);return u.a.createElement(d.a,a()({className:t},n))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(86),p=n(2709),h=n.n(p);i.defaultProps={className:h.a.pageHeaderSeparator},t.a=i},function(e,t,n){"use strict";function i(){
return Object(g.createSelector)(function(e){return e.ui.dvrSettingsUI},Object(b.a)(),function(e,t){var n=e.isDvrsPending,i=e.dvrs;return{isUIPopulated:e.isUIPopulated,isDvrsPending:n,hasDVRs:!(!i||!i.length),hasDVRFeature:!!t.ownerFeatures&&t.ownerFeatures.indexOf("dvr")>-1}})}var r=n(13),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(34)),y=n(769),b=n(42),I=n(2718),S={dispatchInitDVRSettingsUI:y.d,
dispatchClearDVRSettingsUI:y.b},M=function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentDidMount=function(){var e=this;Object(m.a)(function(){e.props.dispatchInitDVRSettingsUI({serverEntityID:e.props.serverEntityID})})},t.prototype.componentWillUnmount=function(){this.props.dispatchClearDVRSettingsUI()},t.prototype.render=function(){var e=this.props,t=(e.dispatchInitDVRSettingsUI,e.dispatchClearDVRSettingsUI,
a()(e,["dispatchInitDVRSettingsUI","dispatchClearDVRSettingsUI"]));return this.props.isUIPopulated?f.a.createElement(I.a,t):null},t}(h.Component);t.a=Object(v.b)(i,S)(M)},function(e,t,n){"use strict";function i(e){return e.get("ui").get("dvrSettingsUI")}function r(e,t,n){var i=Object(v.h)(e,t),r=u.join(["/livetv/dvrs",t.dvrID,"reloadGuide"]),a=i.getXHROptions(r,{method:n});s.a.ajax(a)}n.d(t,"d",function(){return m}),n.d(t,"b",function(){return y}),n.d(t,"f",function(){return I}),
n.d(t,"e",function(){return S}),n.d(t,"a",function(){return M}),n.d(t,"c",function(){return D});var a,o=n(12),s=n.n(o),l=n(4),c=n(36),u=n(19),d=n(1138),p=n(529),h=n(105),f=n(90),v=n(104),g=n(246),m=Object(c.a)("ui/dvrSettings/initDVRSettingsUI"),y=Object(c.a)("ui/dvrSettings/clearDVRSettingsUI"),b=Object(c.a)("ui/dvrSettings/fetchDVRs"),I=Object(c.a)("ui/dvrSettings/removeDVR"),S=Object(c.a)("ui/dvrSettings/reloadGuide"),M=Object(c.a)("ui/dvrSettings/cancelReloadGuide"),D=Object(h.a)((a={},
a["ui/dvrSettings/fetchDVRs"]=Object(f.a)({key:"dvrs",getModel:i}),a["ui/dvrSettings/initDVRSettingsUI"]=function(e,t,n){var r=i(e),a=r.get("dvrSetup"),o=r.get("dvr"),s=Object(v.h)(e,t),l=s.get("machineIdentifier"),c={isUIPopulated:!0};o&&o.server.get("machineIdentifier")===l||(c.dvrs=new d.a([],{server:s})),a&&a.server.get("machineIdentifier")===l?a.restoreDefaults():c.dvrSetup=new p.a({},{server:s}),r.set(c),s.hasOwnerFeature("dvr")&&n(b(t))},a["ui/dvrSettings/clearDVRSettingsUI"]=function(e){
i(e).set("isUIPopulated",!1)},a["ui/dvrSettings/removeDVR"]=function(e,t,n){var r=i(e),a=r.get("dvrs"),o=a.get(t.dvrID);o&&o.destroy().fail(function(){return n(Object(g.b)(Object(l.default)("There was a problem removing your DVR")))})},a["ui/dvrSettings/reloadGuide"]=function(e,t,n){r(e,t,"POST")},a["ui/dvrSettings/cancelReloadGuide"]=function(e,t,n){r(e,t,"DELETE")},a))},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),
n(0)),h=(n.n(p),n(11)),f=n(4),v=n(24),g=n(135),m=n(47),y=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onPreviousStepPress=function(){i.props.dvrSetupPreviousStep({dvrID:i.props.dvrID})},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){return r()(m.a,{kind:v.b.DEFAULT,size:v.e.MEDIUM,onPress:this.onPreviousStepPress},void 0,Object(f.default)("Previous"))},t
}(p.Component);t.a=Object(h.b)(null,{dvrSetupPreviousStep:g.m})(y)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e){return e?e.desktop.providers:void 0})}t.a=i;var r=n(6),a=(n.n(r),n(42))},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(11)),f=n(4),v=n(24),g=n(135),m=n(47),y=function(e){function t(){var n,i,r;o()(this,t)
;for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onNextStepPress=function(){i.props.dvrSetupNextStep({dvrID:i.props.dvrID})},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=void 0===t?Object(f.default)("Continue"):t,i=e.isDisabled;return r()(m.a,{kind:v.b.PRIMARY,size:v.e.MEDIUM,isDisabled:i,onPress:this.onNextStepPress},void 0,n)},t}(p.Component);y.defaultProps={isDisabled:!1},
t.a=Object(h.b)(null,{dvrSetupNextStep:g.l})(y)},function(e,t,n){"use strict";function i(e){return e.experienceSettings.listStyles}t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e){return e.some(function(e){return e.refreshing})})}t.a=i;var r=n(6),a=(n.n(r),n(725))},function(e,t,n){"use strict";function i(e,t,n,i,o){if(n){var s=Object(a.a)(n,i,t,o);if(1===s.length)return s[0];var l=void 0,c=Object(r.a)(n,i);return e[t]&&(l=e[t][c]),
l&&s.indexOf(l)>-1?l:s[0]}}t.a=i;var r=n(554),a=n(560)},function(e,t,n){"use strict";function i(e,t,n,i,r){if(e&&t&&t.isLibraryProvider){var l={},c=encodeURIComponent(e.machineIdentifier);if(n){var u="/"===String(n).charAt(0);l.key=u?n:"/library/sections/"+n}var d=e.ownerFeatures&&-1!==e.ownerFeatures.indexOf("photos-v5"),p=i===o.c&&d?"albums":"playlists";return s.join("#!/server/"+c+"/"+p,a()({},l,r))}}t.a=i;var r=n(7),a=n.n(r),o=n(59),s=n(19)},function(e,t,n){"use strict";function i(){
return Object(s.createSelector)(function(e,t){return t.listType},d.a,p.a,u.a,Object(c.a)(),function(e,t,n,i,r){return Object(m.a)(t,n,i,r,e)})}function r(e,t){var n={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataListEntityID:t.metadataListEntityID,listType:t.listType,metricsPage:t.metricsPage,metricsProperties:{context:l.e}};return{onPlayAllPress:function(){e(h.m(n))},onShufflePress:function(){e(h.p(n))},onPlayNextPress:function(){e(h.h(o()({},n,{options:{
playAll:!0,next:!0}})))},onAddToQueuePress:function(){e(h.h(o()({},n,{options:{playAll:!0,next:!1}})))},onAddToPlaylistPress:function(){var i=t.isLibraryList,r=t.selectedType,a=void 0===r?{}:r;e(f.a(o()({},n,{options:{smart:i,type:a.type}})))},onSyncPress:function(){e(f.m(n))},onOptimizePress:function(){e(f.f(n))}}}var a=n(7),o=n.n(a),s=n(6),l=(n.n(s),n(114)),c=n(159),u=n(144),d=n(48),p=n(37),h=n(60),f=n(137),v=n(57),g=n(288),m=n(2809),y=n(2810);t.a=Object(v.a)(i,r,g.a)(y.a)},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.selectedListStyle,i=e.allListStyles;return Object(l.g)(i,n)?a()(c.a,{className:t}):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(81)),c=n(555);i.defaultProps={selectedListStyle:l.c,allListStyles:[l.c]},t.a=i},function(e,t,n){"use strict";function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!0;var o={},s=void 0,l=void 0
;for(s=0,l=n.length;s<l;s++)o[n[s]]=!0;for(s=0,l=i.length;s<l;s++){var c=i[s],u=e[c],d=t[c];if(u!==d){if(!o[c]||null===u||null===d||"object"!==(void 0===u?"undefined":r(u))||"object"!==(void 0===d?"undefined":r(d)))return!0;var p=Object.keys(u),h=Object.keys(d);if(p.length!==h.length)return!0;for(var f=0,v=p.length;f<v;f++){var g=p[f];if(u[g]!==d[g])return!0}}}return!1}Object.defineProperty(t,"__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};t.default=i},function(e,t,n){"use strict";function i(e){return e===s.h?o()({},y,{outerPaddingTop:10,outerPaddingRight:g,outerPaddingBottom:5,outerPaddingLeft:g}):y}function r(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=e+n+r+a;if(m.hasOwnProperty(s))return m[s]
;var c=Object(d.c)(e,t,n),u="mixed"===e?a+3:a,g=u*f+v,y=c>1?180:120,b=i(n),I=Object(l.c)(o()({direction:l.b},b,{getCellWidth:function(e){return Object(p.a)(o()({},e,{minCellWidth:y,minColumns:2,maxColumns:11,columnAdjustment:r,aspectRatio:c}))},getCellHeight:function(e){return Object(h.a)(o()({},e,{aspectRatio:c,titleHeight:g}))}}));return I.cellOptions={minCellWidth:y,minColumns:2,maxColumns:11,columnAdjustment:r,aspectRatio:c,titleHeight:g},m[s]=I,I}t.a=r
;var a=n(7),o=n.n(a),s=n(31),l=n(534),c=n(45),u=n.n(c),d=n(121),p=n(734),h=n(1094),f=parseInt(u.a.posterTitleHeight,10),v=parseInt(u.a.posterTitlePadding,10),g=parseInt(u.a.prePlayContentPadding,10),m={},y={innerHorizontalPadding:30,innerVerticalPadding:30,outerPaddingTop:30,outerPaddingRight:60,outerPaddingBottom:30,outerPaddingLeft:60}},function(e,t,n){"use strict";var i=n(448),r=n(45),a=n.n(r),o=parseInt(a.a.tableRowHeight,10),s=Object(i.a)(o);t.a=s},function(e,t,n){"use strict"
;function i(e){var t=e.className,n=e.index;return null==n?null:a()("span",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0));n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){function t(e){var t=e.viewportHeight+":"+e.viewportWidth;if(t===O)return j;I=e.viewportHeight,S=e.viewportWidth-(b+v),M=c(S),C=[];var n=h;return M.forEach(function(e){C.push(n),n+=e}),D=M.reduce(function(e,t){return e+t},h+m),O=t,j={height:D,width:S}}function n(){
Object(o.a)(void 0!==I,"`getListStyle` must be called before `getLandmarks`");var e=I+":"+D;return e===P?w:(P=e,w=C.map(function(e,t){return{index:t,position:e/D}}))}function i(e){return Object(o.a)(void 0!==I,"`getListStyle` must be called before `getPositionForIndex`"),{cellX:b,cellY:C[e],cellWidth:S,cellHeight:M[e]}}function r(){Object(o.a)(!1,"Stacked layouts do not support relative indexing")}function s(e){var t=a.a.findIndex(C,function(t){return t>e}),n=C.length-1
;return-1===t?n:Math.min(Math.max(0,t-1),n)}function l(e){Object(o.a)(void 0!==I,"`getListStyle` must be called before `getPositionForIndex`");var t=e+I-1,n=s(e-d*I),i=s(e),r=s(t);return{renderStartIndex:n,renderEndIndex:s(t+d*I),visibleStartIndex:i,visibleEndIndex:r,partiallyVisibleStartIndex:i,partiallyVisibleEndIndex:r}}
var c=e.getCellHeights,u=e.overscan,d=void 0===u?0:u,p=e.outerPaddingTop,h=void 0===p?0:p,f=e.outerPaddingRight,v=void 0===f?0:f,g=e.outerPaddingBottom,m=void 0===g?0:g,y=e.outerPaddingLeft,b=void 0===y?0:y,I=void 0,S=void 0,M=void 0,D=void 0,C=void 0,O=void 0,j=void 0,P=void 0,w=void 0;return{getListStyle:t,getLandmarks:n,getPositionForIndex:i,getRelativeIndex:r,getRangesForPosition:l}}t.a=i;var r=n(5),a=n.n(r),o=n(33)},function(e,t,n){"use strict";function i(e){var t=e.className
;return a()(c.a,{className:t},void 0,Object(l.default)("New"))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(376),u=n(2954),d=n.n(u);i.defaultProps={className:d.a.badge},t.a=i},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),Object(i.createSelector)(function(e){return e.user},function(e){return e.desktop.providers}));t.a=r},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(4)),f=n(29),v=n(26),g=n(2979),m=n.n(g),y=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.allowSectureIcon,i=e.isConnected,a=e.isUnavailable,o=e.isSecure;return e.isRelayed?r()(v.a,{className:(t||"")+" "+(m.a.warningIcon||""),name:"plex-icon-alert-round-560","aria-label":Object(h.default)("Indirect")
}):a?r()(v.a,{className:(t||"")+" "+(m.a.alertIcon||""),name:"plex-icon-alert-560","aria-label":Object(h.default)("Unavailable")}):o&&i&&n?r()(v.a,{className:(t||"")+" "+(m.a.secureIcon||""),name:"plex-icon-lock-560","aria-label":Object(h.default)("Secure")}):null},t}(p.Component);y.defaultProps={allowSectureIcon:!0},t.a=y},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return a()("div",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(2988)),c=n.n(l);i.defaultProps={className:c.a.sidebarListItem},t.a=i},function(e,t,n){"use strict";function i(e){return s.a.createElement(c.a,a()({},e,{iconComponent:l.a}))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(26),c=n(2989);t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(22),m=n(26),y=n(2996),b=n.n(y),I=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}
return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.icon,n=e.title,i=o()(e,["icon","title"]);return v.a.createElement(g.a,i,r()(m.a,{name:t,label:n}))},t}(f.Component);I.defaultProps={className:b.a.sidebarIconButton},t.a=I},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(29),v=n(26),g=n(156),m=n(1198),y=n.n(m),b=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}
return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,i=e.to,a=e.isDisabled,o=e.isSelected,s=e.identifier,l=e.title,c=e.details,u=e.onPress;return r()(g.a,{className:(n||"")+" "+(y.a.serverMenuItem||"")+" "+(o&&y.a.selectedServerMenuItem||""||""),"data-qa-id":"serverMenuItem--"+s,to:i,isDisabled:a,onPress:u},void 0,r()("div",{className:y.a.serverMenuItemContainer},void 0,r()("div",{
className:y.a.serverMenuTitle},void 0,r()("div",{className:y.a.serverMenuFriendlyName},void 0,l),r()("div",{className:y.a.serverMenuDetails},void 0,c)),r()("div",{className:y.a.serverMenuIconContainer},void 0,o&&r()(v.a,{name:"plex-icon-selected-560",className:(y.a.serverMenuIcon||"")+" "+(y.a.selectedIcon||""),"aria-label":Object(h.default)("Selected")}),t)))},t}(p.Component);t.a=b},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className;return a()("div",{className:n
},void 0,t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3047)),c=n.n(l);i.defaultProps={className:c.a.actionLinks},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return a()("div",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3049)),c=n.n(l);i.defaultProps={className:c.a.sectionDetails},t.a=i},function(e,t,n){"use strict";var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=(n.n(u),
n(11)),p=n(106),h={dispatchRedirectToUrl:p.g},f=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchRedirectToUrl({url:this.props.to})},t.prototype.render=function(){return null},t}(u.Component);t.a=Object(d.b)(null,h)(f)},function(e,t,n){var i=n(993).default,r=n(152);e.exports=r(i)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),Object(s.a)(),function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=t.metadataItems.length,i=1===n&&!!e.primaryExtraKey;return{metadataItemEntityIDs:t.metadataItems,containerKey:t.containerKey,size:i?0:n,populatedRange:t.populatedRange}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(159),l=n(3204);t.a=Object(r.b)(i)(l.a)},function(e,t,n){"use strict";function i(e){var t=e.posterTop,n=e.pageHeight,i=e.providerEntityID,r=t+n-2*h-v*f;return a()(p.a,{style:{position:"fixed",top:r},
providerEntityID:i})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(45)),c=n.n(l),u=n(3209),d=n.n(u),p=n(552),h=parseInt(c.a.pagePadding,10),f=parseInt(d.a.defaultFontSize,10),v=parseFloat(d.a.lineHeightComputed,10);t.a=i},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(170)),a=Object(i.createSelector)(r.a,function(e){return e.playlistItems});t.a=a},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.playlistItemEntityID
},a.a,function(e,t){return t[e]})}t.a=i;var r=n(6),a=(n.n(r),n(797))},function(e,t,n){"use strict";function i(e,t){return Object(o.createSelector)(function(e,t){return t.playlistItemEntityID},Object(s.a)(),Object(l.a)(),d.a,p.a,function(e,t,n,i,r){var a=t.playlistItemID,o=n.entityID,s=n.key,l=n.type;return{metadataKey:s,metadataItemEntityID:o,title:n.title,selectionID:e,selectionType:l,activeSelectionType:r.activeSelectionType,isSelected:Object(h.a)(i,a)}})}function r(e,t){var n={
playlistItemEntityID:t.playlistItemEntityID};return{onSelectItem:function(t){e(Object(c.j)(t))},onDeselectItem:function(t){e(Object(c.a)(t))},onRemovePress:function(){e(Object(c.g)(n))}}}var a=n(11),o=n(6),s=(n.n(o),n(798)),l=n(1226),c=n(309),u=n(436),d=n(540),p=n(88),h=n(541),f=n(3287),v=Object(a.b)(i,r)(Object(u.a)(f.a));t.a=v},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(function(e){return e.ui.prePlayPage},f,u.a,l.a,function(e,t,n,i){
var r=e.metadataItem,a=e.descendantList,o=e.isMetadataItemPending,s=e.metadataItemError;return{metadataItemEntityID:r,metadataListEntityID:a,showSpinner:o&&!t,showError:!o&&!!s,activeSelectionType:n.activeSelectionType,columnAdjustment:i.columnAdjustment}})}function r(e){var t=e.ui.prePlayPage;return{providerEntityID:t.providerEntityID,metadataKey:t.metadataKey}}function a(e,t){e(d.d({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataKey:t.metadataKey})),e(d.a()),
e(d.b())}var o=n(11),s=n(6),l=(n.n(s),n(100)),c=n(110),u=n(88),d=n(369),p=n(202),h=n(1214),f=Object(s.createSelector)(function(e){return e.ui.prePlayPage.metadataItem},c.a,function(e,t){var n=t[e]||{};return!(!n||!n.isPreFetched)}),v=Object(p.a)(h.a,r,a),g=Object(o.b)(i)(v);t.a=g},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(15),o=n(117),s={movie:{showInfo:!0,showPlay:!0,showShare:!0,showWatchLater:!0},episode:{showInfo:!0,showPlay:!0,showShare:!0,showWatchLater:!0},clip:{showInfo:!0,
showPlay:!0,showShare:!0,showWatchLater:!0},userPlaylistItem:{showDeleteFromUserPlaylist:!0,showInfo:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlay:!0,showShare:!0,showWatchLater:!0}},l={showListDropdown:["showWatchLater","showShare","showInfo"]},c=o.a.extend({initialize:function(e,t){if(t||(t={}),t.item){var n=a.d("appModel");this.item=t.item,this.user=n.get("user"),this.signedIn=this.user.get("signedIn"),this.setDefaults(this.item.get("type")),this.updateAll(),this.listenTo(this.user,{
"change:signedIn":this.onSignedInChange}),this.listenTo(this.item,{"change:unviewedLeafCount":this.onViewStateChange,"change:viewOffset":this.onViewStateChange,"change:viewCount":this.onViewStateChange})}},setDefaults:function(e){e&&e!==this.type&&(this.type=e,this.defaults=r.a.clone(s[e]||{}),this.clear().set(this.defaults))},updateAll:function(){this.updateAction("showPlay",this.canPlay),this.updateAction("showWatchLater",this.canWatchLater),this.updateAction("showShare",this.canShare),
this.updateAction("showInfo",this.canGetInfo),this.updateAction("showMarkWatched",this.canMarkWatched),this.updateAction("showMarkUnwatched",this.canMarkUnwatched),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=l[e],n=r.a.map(t,function(e){return this.get(e)},this);this.set(e,r.a.some(n))},canPlay:function(e,t){return!!e&&!this.item.get("hasInvalidKey")},
canMarkWatched:function(e){return!!e&&0===this.item.get("viewCount")},canMarkUnwatched:function(e){return!!e&&this.item.get("viewCount")>0},canWatchLater:function(e){if(!e)return!1;var t=!!this.item.get("url"),n=!this.item.userPlaylistKey||"queue"!==this.item.userPlaylistKey;return this.signedIn&&this.user.get("queueUid")&&t&&n},canShare:function(e){return!!e&&(this.signedIn&&!this.user.get("restricted"))},canGetInfo:function(e){return!!e},onSignedInChange:function(e,t){this.signedIn=t,
this.updateAction("showWatchLater",this.canWatchLater),this.updateAction("showShare",this.canShare),this.updateDropdown("showListDropdown")},onViewStateChange:function(){this.updateAction("showMarkWatched",this.canMarkWatched),this.updateAction("showMarkUnwatched",this.canMarkUnwatched)}});t.a=c},function(e,t,n){var i=n(3356).default,r=n(152);e.exports=r(i)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.children,i=e.selectableKey,r=e.selectedKey,o=e.to,s=e.title,u=r&&r===i,p=void 0;return/^#/.test(o)||(Object(l.a)(),p="_blank"),a()(c.a,{className:t,target:p,to:o,iconClassName:u?d.a.selectedIcon:d.a.icon,title:s,isSelected:u},i,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(1203)),c=n(176),u=n(3436),d=n.n(u);t.a=i},function(e,t,n){"use strict";function i(e){return s.a.createElement(d.a,a()({className:h.a.button,kind:c.DEFAULT,size:u.MEDIUM,target:"_blank"
},e),Object(l.default)("Claim Server"))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(4),c=n(65),u=n(61),d=n(102),p=n(3466),h=n.n(p);t.a=i},function(e,t,n){var i,r;/**!
 * Sortable
 * @author	RubaXa   <trash@rubaxa.org>
 * @license MIT
 */
!function(a){"use strict";i=a,void 0!==(r="function"==typeof i?i.call(t,n,t,e):i)&&(e.exports=r)}(function(){"use strict";function e(e,t){this.el=e,this.options=t=g({},t),e[A]=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 r in i)!(r in t)&&(t[r]=i[r]);var o=t.group;o&&"object"==typeof o||(o=t.group={name:o}),["pull","put"].forEach(function(e){e in o||(o[e]=!0)}),t.groups=" "+o.name+(o.put.join?" "+o.put.join(" "):"")+" ";for(var s in this)"_"===s.charAt(0)&&(this[s]=n(this,this[s]));a(e,"mousedown",this._onTapStart),a(e,"touchstart",this._onTapStart),a(e,"dragover",this),a(e,"dragenter",this),F.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&&I.insertBefore(b,m),b.state=e)}function n(e,t){var n=V.call(arguments,2);return t.bind?t.bind.apply(t,[e].concat(n)):function(){return t.apply(e,n.concat(V.call(arguments)))}}function i(e,t,n){if(e){n=n||k,t=t.split(".");var i=t.shift().toUpperCase(),r=new RegExp("\\s("+t.join("|")+")\\s","g");do{if(">*"===i&&e.parentNode===n||(""===i||e.nodeName.toUpperCase()==i)&&(!t.length||((" "+e.className+" ").match(r)||[]).length==t.length))return e
}while(e!==n&&(e=e.parentNode))}return null}function r(e){e.dataTransfer.dropEffect="move",e.preventDefault()}function a(e,t,n){e.addEventListener(t,n,!1)}function o(e,t,n){e.removeEventListener(t,n,!1)}function s(e,t,n){if(e)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(N," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(N," ")}}function l(e,t,n){var i=e&&e.style;if(i){
if(void 0===n)return k.defaultView&&k.defaultView.getComputedStyle?n=k.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),r=0,a=i.length;if(n)for(;r<a;r++)n(i[r],r);return i}return[]}function u(e){e.draggable=!1}function d(){z=!1}function p(e,t){var n=e.lastElementChild,i=n.getBoundingClientRect();return t.clientY-(i.top+i.height)>5&&n}
function h(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 v(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 g(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}
var m,y,b,I,S,M,D,C,O,j,P,w,T,E,x={},N=/\s+/g,A="Sortable"+(new Date).getTime(),L=window,k=L.document,_=L.parseInt,R=!!("draggable"in k.createElement("div")),z=!1,U=function(e,t,n,i,r,a,o){var s=k.createEvent("Event"),l=(e||t[A]).options,c="on"+n.charAt(0).toUpperCase()+n.substr(1);s.initEvent(n,!0,!0),s.item=i||t,s.from=r||t,s.clone=b,s.oldIndex=a,s.newIndex=o,l[c]&&l[c].call(e,s),t.dispatchEvent(s)},B=Math.abs,V=[].slice,F=[],Q=v(function(e,t,n){if(n&&t.scroll){
var i,r,a,o,s=t.scrollSensitivity,l=t.scrollSpeed,c=e.clientX,u=e.clientY,d=window.innerWidth,p=window.innerHeight;if(D!==n&&(M=t.scroll,D=n,!0===M)){M=n;do{if(M.offsetWidth<M.scrollWidth||M.offsetHeight<M.scrollHeight)break}while(M=M.parentNode)}M&&(i=M,r=M.getBoundingClientRect(),a=(B(r.right-c)<=s)-(B(r.left-c)<=s),o=(B(r.bottom-u)<=s)-(B(r.top-u)<=s)),a||o||(a=(d-c<=s)-(c<=s),o=(p-u<=s)-(u<=s),(a||o)&&(i=L)),x.vx===a&&x.vy===o&&x.el===i||(x.el=i,x.vx=a,x.vy=o,clearInterval(x.pid),
i&&(x.pid=setInterval(function(){i===L?L.scrollTo(L.pageXOffset+a*l,L.pageYOffset+o*l):(o&&(i.scrollTop+=o*l),a&&(i.scrollLeft+=a*l))},24)))}},30);return e.prototype={constructor:e,_onTapStart:function(e){var t=this,n=this.el,r=this.options,a=e.type,o=e.touches&&e.touches[0],s=(o||e).target,l=s,c=r.filter;if(!("mousedown"===a&&0!==e.button||r.disabled)&&(s=i(s,r.draggable,n))){if(j=f(s),"function"==typeof c){if(c.call(this,e,s,this))return U(t,l,"filter",s,n,j),void e.preventDefault()
}else if(c&&(c=c.split(",").some(function(e){if(e=i(l,e.trim(),n))return U(t,e,"filter",s,n,j),!0})))return void e.preventDefault();r.handle&&!i(l,r.handle,n)||this._prepareDragStart(e,o,s)}},_prepareDragStart:function(e,t,n){var i,r=this,o=r.el,s=r.options,l=o.ownerDocument;n&&!m&&n.parentNode===o&&(T=e,I=o,m=n,S=m.nextSibling,w=s.group,i=function(){r._disableDelayedDrag(),m.draggable=!0,s.ignore.split(",").forEach(function(e){c(m,e.trim(),u)}),r._triggerDragStart(t)},a(l,"mouseup",r._onDrop),
a(l,"touchend",r._onDrop),a(l,"touchcancel",r._onDrop),s.delay?(a(l,"mousemove",r._disableDelayedDrag),a(l,"touchmove",r._disableDelayedDrag),r._dragStartTimer=setTimeout(i,s.delay)):i())},_disableDelayedDrag:function(){var e=this.el.ownerDocument;clearTimeout(this._dragStartTimer),o(e,"mousemove",this._disableDelayedDrag),o(e,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(e){e?(T={target:m,clientX:e.clientX,clientY:e.clientY},
this._onDragStart(T,"touch")):R?(a(m,"dragend",this),a(I,"dragstart",this._onDragStart)):this._onDragStart(T,!0);try{k.selection?k.selection.empty():window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(){I&&m&&(s(m,this.options.ghostClass,!0),e.active=this,U(this,I,"start",m,I,j))},_emulateDragOver:function(){if(E){l(y,"display","none");var e=k.elementFromPoint(E.clientX,E.clientY),t=e,n=" "+this.options.group.name,i=F.length;if(t)do{
if(t[A]&&t[A].options.groups.indexOf(n)>-1){for(;i--;)F[i]({clientX:E.clientX,clientY:E.clientY,target:e,rootEl:t});break}e=t}while(t=t.parentNode);l(y,"display","")}},_onTouchMove:function(e){if(T){var t=e.touches?e.touches[0]:e,n=t.clientX-T.clientX,i=t.clientY-T.clientY,r=e.touches?"translate3d("+n+"px,"+i+"px,0)":"translate("+n+"px,"+i+"px)";E=t,l(y,"webkitTransform",r),l(y,"mozTransform",r),l(y,"msTransform",r),l(y,"transform",r),e.preventDefault()}},_onDragStart:function(e,t){
var n=e.dataTransfer,i=this.options;if(this._offUpEvents(),"clone"==w.pull&&(b=m.cloneNode(!0),l(b,"display","none"),I.insertBefore(b,m)),t){var r,o=m.getBoundingClientRect(),s=l(m);y=m.cloneNode(!0),l(y,"top",o.top-_(s.marginTop,10)),l(y,"left",o.left-_(s.marginLeft,10)),l(y,"width",o.width),l(y,"height",o.height),l(y,"opacity","0.8"),l(y,"position","fixed"),l(y,"zIndex","100000"),I.appendChild(y),r=y.getBoundingClientRect(),l(y,"width",2*o.width-r.width),l(y,"height",2*o.height-r.height),
"touch"===t?(a(k,"touchmove",this._onTouchMove),a(k,"touchend",this._onDrop),a(k,"touchcancel",this._onDrop)):(a(k,"mousemove",this._onTouchMove),a(k,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,150)}else n&&(n.effectAllowed="move",i.setData&&i.setData.call(this,n,m)),a(k,"drop",this);setTimeout(this._dragStarted,0)},_onDragOver:function(e){var n,r,a,o=this.el,s=this.options,c=s.group,u=c.put,h=w===c,f=s.sort;if(void 0!==e.preventDefault&&(e.preventDefault(),
!s.dragoverBubble&&e.stopPropagation()),w&&!s.disabled&&(h?f||(a=!I.contains(m)):w.pull&&u&&(w.name===c.name||u.indexOf&&~u.indexOf(w.name)))&&(void 0===e.rootEl||e.rootEl===this.el)){if(Q(e,s,this.el),z)return;if(n=i(e.target,s.draggable,o),r=m.getBoundingClientRect(),a)return t(!0),void(b||S?I.insertBefore(m,b||S):f||I.appendChild(m));if(0===o.children.length||o.children[0]===y||o===e.target&&(n=p(o,e))){if(n){if(n.animated)return;g=n.getBoundingClientRect()}t(h),o.appendChild(m),
this._animate(r,m),n&&this._animate(g,n)}else if(n&&!n.animated&&n!==m&&void 0!==n.parentNode[A]){C!==n&&(C=n,O=l(n));var v,g=n.getBoundingClientRect(),M=g.right-g.left,D=g.bottom-g.top,j=/left|right|inline/.test(O.cssFloat+O.display),P=n.offsetWidth>m.offsetWidth,T=n.offsetHeight>m.offsetHeight,E=(j?(e.clientX-g.left)/M:(e.clientY-g.top)/D)>.5,x=n.nextElementSibling;z=!0,setTimeout(d,30),t(h),v=j?n.previousElementSibling===m&&!P||E&&P:x!==m&&!T||E&&T,
v&&!x?o.appendChild(m):n.parentNode.insertBefore(m,v?x:n),this._animate(r,m),this._animate(g,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;o(k,"touchmove",this._onTouchMove),o(e,"mouseup",this._onDrop),o(e,"touchend",this._onDrop),o(e,"touchcancel",this._onDrop)},_onDrop:function(t){var n=this.el,i=this.options;clearInterval(this._loopId),clearInterval(x.pid),clearTimeout(this.dragStartTimer),o(k,"drop",this),o(k,"mousemove",this._onTouchMove),o(n,"dragstart",this._onDragStart),this._offUpEvents(),t&&(t.preventDefault(),!i.dropBubble&&t.stopPropagation(),
y&&y.parentNode.removeChild(y),m&&(o(m,"dragend",this),u(m),s(m,this.options.ghostClass,!1),I!==m.parentNode?(P=f(m),U(null,m.parentNode,"sort",m,I,j,P),U(this,I,"sort",m,I,j,P),U(null,m.parentNode,"add",m,I,j,P),U(this,I,"remove",m,I,j,P)):(b&&b.parentNode.removeChild(b),m.nextSibling!==S&&(P=f(m),U(this,I,"update",m,I,j,P),U(this,I,"sort",m,I,j,P))),e.active&&U(this,I,"end",m,I,j,P)),I=m=y=S=b=M=D=T=E=C=O=w=e.active=null,this.save())},handleEvent:function(e){var t=e.type
;"dragover"===t||"dragenter"===t?m&&(this._onDragOver(e),r(e)):"drop"!==t&&"dragend"!==t||this._onDrop(e)},toArray:function(){for(var e,t=[],n=this.el.children,r=0,a=n.length,o=this.options;r<a;r++)e=n[r],i(e,o.draggable,this.el)&&t.push(e.getAttribute(o.dataIdAttr)||h(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach(function(e,r){var a=n.children[r];i(a,this.options.draggable,n)&&(t[e]=a)},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;if(void 0===t)return n[e];n[e]=t},destroy:function(){var e=this.el;e[A]=null,o(e,"mousedown",this._onTapStart),o(e,"touchstart",this._onTapStart),o(e,"dragover",this),o(e,"dragenter",this),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),
F.splice(F.indexOf(this._onDragOver),1),this._onDrop(),this.el=e=null}},e.utils={on:a,off:o,css:l,find:c,bind:n,is:function(e,t){return!!i(e,t,e)},extend:g,throttle:v,closest:i,toggleClass:s,index:f},e.version="1.2.0",e.create=function(t,n){return new e(t,n)},e})},function(e,t,n){"use strict";var i=n(1),r=n.n(i);r.a.shape({url:r.a.string.isRequired})},function(e,t,n){"use strict";function i(e,t){return c.join(["/pms/playlists",e,t])}
var r=n(4),a=n(43),o=n(40),s=n(28),l=n(94),c=n(19),u=n(3619),d=n(3620),p=n(244),h=n(16),f=n(51),v=n(18),g=n(3621),m=v.a.extend({mixins:[p.a],name:"UserPlaylistModel",entityType:a.h,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(o.a)(this.entityType,i(e.key,e.subset),this.server.entityID())},context:["server"],idAttribute:"key",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(i(this.get("key"),this.get("subset")))
},sessionAttrs:{firstItemType:h.a.string,isUserPlaylist:h.a.boolean,isMetadataList:h.a.boolean,key:h.a.oneOf(d.WATCH_LATER,d.RECOMMENDED).isRequired,subset:h.a.oneOf(u.ALL,u.UNWATCHED,u.WATCHED).isRequired,currentPageStart:h.a.integer,currentPageSize:h.a.integer,populatedRange:h.a.object},syncedAttrs:{totalSize:h.a.integer,identifier:h.a.string,mediaTagPrefix:h.a.string,mediaTagVersion:h.a.string,viewGroup:h.a.string,title:h.a.string},syncedRelations:{metadataItems:{relationClass:g.a,
rootPropertyName:"Metadata",options:function(e){return{identifier:e.identifier,mediaTagPrefix:e.mediaTagPrefix,mediaTagVersion:e.mediaTagVersion,containerKey:i(e.key,e.subset),userPlaylistKey:e.key}},setOptions:function(e){return{remove:e.remove,at:e.at}}}},derivedAttrs:{label:function(){var e=this.get("key");return e===d.WATCH_LATER?Object(r.default)("Watch Later"):e===d.RECOMMENDED?Object(r.default)("Recommended"):void 0},playlistRoute:function(){return"#!/playlist/"+this.get("key")}},
defaults:function(){return{firstItemType:s.m,isUserPlaylist:!0,isMetadataList:!0,subset:u.ALL,populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},augmentResponseText:function(e,t){return t===f.a.xml?Object(l.b)(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:d,subsets:u});t.a=m},function(e,t,n){"use strict";var i=n(19),r=n(97),a=n(16),o=n(51),s=n(94),l=n(18),c=n(3733),u=l.a.extend({name:"SearchModel",context:["server","provider","includeCollections"],responseType:function(){return Object(r.a)(this.server)},url:function(){var e={};return this.includeCollections&&(e.includeCollections=1),i.join(this.get("key"),e)},idAttribute:"providerEntityID",sessionAttrs:{providerEntityID:a.a.string,serverEntityID:a.a.string,
key:a.a.string,isSearchPending:a.a.boolean,isSearchPopulated:a.a.boolean,searchError:a.a.object},syncedRelations:{hubs:{relationClass:c.a,rootPropertyName:"Hub"}},defaults:{isSearchPending:!0,isSearchPopulated:!1},augmentResponseText:function(e,t){return t===o.a.xml?Object(s.b)(e):e},augmentResponse:function(e){if(!e.Hub)return e;var t=Array.isArray(e.Hub)?e.Hub:[e.Hub];return e.Hub=t.filter(function(e){return parseInt(e.size,10)>0}),e}});t.a=u},,,,,,,,,,,,function(e,t,n){var i=n(1319)
;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,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){e.exports=!n(319)&&!n(271)(function(){return 7!=Object.defineProperty(n(822)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(270),r=n(179).document,a=i(r)&&i(r.createElement);e.exports=function(e){
return a?r.createElement(e):{}}},function(e,t,n){var i=n(272),r=n(320),a=n(1321)(!1),o=n(586)("IE_PROTO");e.exports=function(e,t){var n,s=r(e),l=0,c=[];for(n in s)n!=o&&i(s,n)&&c.push(n);for(;t.length>l;)i(s,n=t[l++])&&(~a(c,n)||c.push(n));return c}},function(e,t,n){var i=n(825);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},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,r=e.length;i<r;++i)void 0!==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 r=Object.keys(n),a=0,o=r.length;a<o;++a){var s=r[a],l=n[s];Object.prototype.hasOwnProperty.call(e,s)?e[s]=t.merge(e[s],l,i):e[s]=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,r=e.length;i<r;++i){var a=e.charCodeAt(i)
;45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?t+=e[i]:a<128?t+=n.hexTable[a]:a<2048?t+=n.hexTable[192|a>>6]+n.hexTable[128|63&a]:a<55296||a>=57344?t+=n.hexTable[224|a>>12]+n.hexTable[128|a>>6&63]+n.hexTable[128|63&a]:(++i,a=65536+((1023&a)<<10|1023&e.charCodeAt(i)),t+=n.hexTable[240|a>>18]+n.hexTable[128|a>>12&63]+n.hexTable[128|a>>6&63]+n.hexTable[128|63&a])}return t},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;n=n||[];var i=n.indexOf(e)
;if(-1!==i)return n[i];if(n.push(e),Array.isArray(e)){for(var r=[],a=0,o=e.length;a<o;++a)void 0!==e[a]&&r.push(e[a]);return r}var s=Object.keys(e);for(a=0,o=s.length;a<o;++a){var l=s[a];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&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,n){
var i=n(162),r=n(459),a=n(271),o=n(591),s="["+o+"]",l="\u200b\x85",c=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),d=function(e,t,n){var r={},s=a(function(){return!!o[e]()||l[e]()!=l}),c=r[e]=s?t(p):o[e];n&&(r[n]=c),i(i.P+i.F*s,"String",r)},p=d.trim=function(e,t){return e=String(r(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(u,"")),e};e.exports=d},function(e,t,n){var i=n(162),r=n(116),a=n(271);e.exports=function(e,t){var n=(r.Object||{})[e]||Object[e],o={};o[e]=t(n),i(i.S+i.F*a(function(){n(1)
}),"Object",o)}},function(e,t,n){"use strict";var i=n(592),r=n(162),a=n(830),o=n(317),s=n(593),l=n(1340),c=n(595),u=n(831),d=n(322)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,f,v,g,m){l(n,t,f);var y,b,I,S=function(e){if(!p&&e in O)return O[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}
},M=t+" Iterator",D="values"==v,C=!1,O=e.prototype,j=O[d]||O["@@iterator"]||v&&O[v],P=j||S(v),w=v?D?S("entries"):P:void 0,T="Array"==t?O.entries||j:j;if(T&&(I=u(T.call(new e)))!==Object.prototype&&I.next&&(c(I,M,!0),i||"function"==typeof I[d]||o(I,d,h)),D&&j&&"values"!==j.name&&(C=!0,P=function(){return j.call(this)}),i&&!m||!p&&!C&&O[d]||o(O,d,P),s[t]=P,s[M]=h,v)if(y={values:D?P:S("values"),keys:g?P:S("keys"),entries:w},m)for(b in y)b in O||a(O,b,y[b]);else r(r.P+r.F*(p||C),t,y);return y}
},function(e,t,n){e.exports=n(317)},function(e,t,n){var i=n(272),r=n(462),a=n(586)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),i(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){e.exports={default:n(1347),__esModule:!0}},function(e,t,n){"use strict"
;var i=n(179),r=n(272),a=n(319),o=n(162),s=n(830),l=n(1348).KEY,c=n(271),u=n(587),d=n(595),p=n(460),h=n(322),f=n(596),v=n(597),g=n(1349),m=n(1350),y=n(389),b=n(270),I=n(320),S=n(584),M=n(458),D=n(594),C=n(1351),O=n(835),j=n(318),P=n(390),w=O.f,T=j.f,E=C.f,x=i.Symbol,N=i.JSON,A=N&&N.stringify,L=h("_hidden"),k=h("toPrimitive"),_={}.propertyIsEnumerable,R=u("symbol-registry"),z=u("symbols"),U=u("op-symbols"),B=Object.prototype,V="function"==typeof x,F=i.QObject,Q=!F||!F.prototype||!F.prototype.findChild,H=a&&c(function(){
return 7!=D(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=w(B,t);i&&delete B[t],T(e,t,n),i&&e!==B&&T(B,t,i)}:T,Y=function(e){var t=z[e]=D(x.prototype);return t._k=e,t},W=V&&"symbol"==typeof x.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof x},G=function(e,t,n){return e===B&&G(U,t,n),y(e),t=S(t,!0),y(n),r(z,t)?(n.enumerable?(r(e,L)&&e[L][t]&&(e[L][t]=!1),n=D(n,{enumerable:M(0,!1)})):(r(e,L)||T(e,L,M(1,{})),e[L][t]=!0),
H(e,t,n)):T(e,t,n)},K=function(e,t){y(e);for(var n,i=g(t=I(t)),r=0,a=i.length;a>r;)G(e,n=i[r++],t[n]);return e},q=function(e,t){return void 0===t?D(e):K(D(e),t)},Z=function(e){var t=_.call(this,e=S(e,!0));return!(this===B&&r(z,e)&&!r(U,e))&&(!(t||!r(this,e)||!r(z,e)||r(this,L)&&this[L][e])||t)},X=function(e,t){if(e=I(e),t=S(t,!0),e!==B||!r(z,t)||r(U,t)){var n=w(e,t);return!n||!r(z,t)||r(e,L)&&e[L][t]||(n.enumerable=!0),n}},J=function(e){
for(var t,n=E(I(e)),i=[],a=0;n.length>a;)r(z,t=n[a++])||t==L||t==l||i.push(t);return i},$=function(e){for(var t,n=e===B,i=E(n?U:I(e)),a=[],o=0;i.length>o;)!r(z,t=i[o++])||n&&!r(B,t)||a.push(z[t]);return a};V||(x=function(){if(this instanceof x)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(U,n),r(this,L)&&r(this[L],e)&&(this[L][e]=!1),H(this,e,M(1,n))};return a&&Q&&H(B,e,{configurable:!0,set:t}),Y(e)},
s(x.prototype,"toString",function(){return this._k}),O.f=X,j.f=G,n(834).f=C.f=J,n(461).f=Z,n(589).f=$,a&&!n(592)&&s(B,"propertyIsEnumerable",Z,!0),f.f=function(e){return Y(h(e))}),o(o.G+o.W+o.F*!V,{Symbol:x});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)h(ee[te++]);for(var ne=P(h.store),ie=0;ne.length>ie;)v(ne[ie++]);o(o.S+o.F*!V,"Symbol",{for:function(e){return r(R,e+="")?R[e]:R[e]=x(e)
},keyFor:function(e){if(!W(e))throw TypeError(e+" is not a symbol!");for(var t in R)if(R[t]===e)return t},useSetter:function(){Q=!0},useSimple:function(){Q=!1}}),o(o.S+o.F*!V,"Object",{create:q,defineProperty:G,defineProperties:K,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:$}),N&&o(o.S+o.F*(!V||c(function(){var e=x();return"[null]"!=A([e])||"{}"!=A({a:e})||"{}"!=A(Object(e))})),"JSON",{stringify:function(e){
for(var t,n,i=[e],r=1;arguments.length>r;)i.push(arguments[r++]);if(n=t=i[1],(b(t)||void 0!==e)&&!W(e))return m(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!W(t))return t}),i[1]=t,A.apply(N,i)}}),x.prototype[k]||n(317)(x.prototype,k,x.prototype.valueOf),d(x,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)},function(e,t,n){var i=n(823),r=n(588).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},function(e,t,n){
var i=n(461),r=n(458),a=n(320),o=n(584),s=n(272),l=n(821),c=Object.getOwnPropertyDescriptor;t.f=n(319)?c:function(e,t){if(e=a(e),t=o(t,!0),l)try{return c(e,t)}catch(e){}if(s(e,t))return r(!i.f.call(e,t),e[t])}},,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";var i=n(239),r=new i.a({interface:["init","enable","disable","set","capture"]});t.a=r},function(e,t,n){"use strict";function i(e){
if(/\.plex\.direct$/.test(e)){var t=e.indexOf(".");t>0&&(e=e.substring(0,t),e=e.replace(/\-/g,"."))}return e}t.a=i},function(e,t,n){"use strict";function i(e,t){if(t||(t={}),a.a.isObject(e))return e;if(!a.a.isString(e))return{};if(!(e=e.trim().replace(/^(\?|#)/,"")))return{};var n=t.separator||"&";return e.split(n).reduce(function(e,t){var n=t.split("="),i=n[0],r=n[1];try{i=decodeURIComponent(i),r=void 0===r?null:decodeURIComponent(r),
e.hasOwnProperty(i)?Array.isArray(e[i])?e[i].push(r):e[i]=[e[i],r]:e[i]=r}catch(e){o.a.warn("[Parser] Unable to decode query string at "+i)}return e},{})}var r=n(5),a=n.n(r),o=n(30);t.a=i},function(e,t,n){"use strict";function i(e,t){return a()(e||{}).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join(t&&t.separator||"&")}var r=n(50),a=n.n(r);t.a=i},function(e,t,n){"use strict";function i(e,t){return e?a.a.reduce(t,function(t,n,i){return e[i]!==n&&(t[i]=n),t},{}):t}
var r=n(5),a=n.n(r);t.a=i},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(4),o=n(17),s=n(69),l=n(83),c=n(844),u=n(30),d=n(89),p=s.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(o.a,"timeline",this.onTimeline)},stop:function(){
this.stopListening(),this._serverRetryManager.stopAll(),this.connections={}},connect:function(e){var t=e.server,n=this.connections[t.id];n||(n=new this.ServerEventConnection({server:t}),this.connections[t.id]=n,this.listenTo(n,{open:this.onOpen,close:this.onClose,error:this.onClose}));var i=n.open(),r=n.socket?n.socket.url:n.pollUrl;return Object(u.a)("["+this.name+"] Opening server event connection to "+t.get("debugName")+" at "+r),i},disconnectAll:function(){var e=this
;r.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 n=t.socket?t.socket.url:t.pollUrl,i=t.server;Object(u.a)("["+this.name+"] Closing server event connection to "+i.get("debugName")+" at "+n),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;r.a.each(i,function(t){e.contains(t)||n.disconnect({server:t})})},onTimeline:function(e){var t=void 0,n={item:e.title||Object(a.default)("an item"),serverName:e.server.get("friendlyName")};switch(e.state){case c.a.CREATED:t=Object(a.default)("Created {item} on {serverName}",n);break;case c.a.MATCHING:t=Object(a.default)("Matching {item} on {serverName}",n);break;case c.a.DOWNLOADING_METADATA:
t=Object(a.default)("Downloading metadata for {item} on {serverName}",n);break;case c.a.LOADING_METADATA:t=Object(a.default)("Loading metadata for {item} on {serverName}",n);break;case c.a.PROCESSED:t=Object(a.default)("Finished processing {item} on {serverName}",n);break;case c.a.DELETED:t=Object(a.default)("Deleted {item} on {serverName}",n)}t&&e.sectionID>0&&o.a.trigger("show:status",e.server,t)},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=p},function(e,t,n){"use strict";var i={CREATED:0,PROGRESS:1,MATCHING:2,DOWNLOADING_METADATA:3,LOADING_METADATA:4,PROCESSED:5,DELETED:9};t.a=i},function(e,t,n){"use strict";var i=n(604),r=i.a.extend({
supportsRetry:function(e){return e.get("isCloud")}});t.a=r},function(e,t,n){"use strict";function i(e,t){return e.replace(/^\w+:\/\//,t+"//")}t.a=i},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(16),o=n(18),s=n(1411),l=o.a.extend({name:"StoredServerModel",idAttribute:"machineIdentifier",syncedAttrs:{machineIdentifier:a.a.string,friendlyName:a.a.string,accessToken:a.a.string,sourceTitle:a.a.string,home:a.a.boolean,synced:a.a.boolean,serverClass:a.a.string,isShared:a.a.boolean,
version:a.a.string,publicAddressMatches:a.a.boolean,ownerId:a.a.integer,mediaProviders:a.a.integer},syncedRelations:{connections:{relationClass:s.a}},copyFromServer:function(e){var t={};r.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(19),r=n(51),a=n(23),o=n(1415),s=a.a.extend({name:"UserFeatureCollection",context:["server"],model:o.a,url:i.join(["https://plex.tv","/api/v2/features"]),responseType:r.a.json});t.a=s
},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(850),o=n(1416),s=r.a.extend({name:"UserSubscriptionModel",syncedAttrs:{active:i.a.boolean,status:i.a.oneOf.apply(i.a,o.a),plan:i.a.oneOf.apply(i.a,a.b)}});t.a=s},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="lite",r=["","lifetime","yearly","monthly",i,"comped","pro"];t.b=r},function(e,t,n){"use strict";var i=n(23),r=n(1417),a=i.a.extend({name:"UserRoleCollection",model:r.a});t.a=a},function(e,t,n){"use strict"
;var i=n(23),r=n(1418),a=i.a.extend({name:"UserEntitlementCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(1419),a=i.a.extend({name:"UserProviderCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(165),r=n(611),a=i.a.extend({model:r.a,url:"/api/home/users",parse:function(e){return this.convert(e,"User")}});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(76),a=n(324),o=i.a.extend({name:"ProviderFeatureCollection",context:["server","provider"],
model:r.a,modelId:function(e){return e.type===r.b.ACTION?e.id:e.type},augmentResponse:function(e){Array.isArray(e)||(e=[e]);var t=e.find(function(e){return e.type===r.b.ACTIONS});return null==t||Array.isArray(t.Action)||(t.Action=[t.Action]),null==t&&(t={Action:[],type:r.b.ACTIONS},e.push(t)),e.forEach(function(e){if(e.type===r.b.TIMELINE&&(null!=e.scrobbleKey||null!=e.unscrobbleKey)){var n=e.scrobbleKey,i=e.unscrobbleKey;t.Action.push({id:a.b.SCROBBLE,key:n,reverseKey:i}),delete e.scrobbleKey,
delete e.unscrobbleKey}if(e.type===r.b.ACTION&&(null!=e.key||null!=e.reverseKey)){var o=e.key,s=e.reverseKey;t.Action.push({id:e.id,key:o,reverseKey:s}),delete e.key,delete e.reverseKey}}),e}});t.a=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),r=n(323),a=i.a.extend({name:"ProviderSettingCollection",context:["server","provider"],url:"/settings",model:r.a});t.default=a},function(e,t,n){"use strict";function i(e,t){switch(e){case s.INT:case s.ENUM:
return r.a.parseInteger(t);case s.BOOL:return r.a.parseBoolean(t);case s.DOUBLE:return r.a.parseFloat(t);default:return t}}n.d(t,"b",function(){return s});var r=n(58),a=n(16),o=n(18),s={INT:"int",TEXT:"text",BOOL:"bool",DOUBLE:"double"},l=o.a.extend({name:"MediaSettingModel",context:["server"],idAttribute:"id",rootPropertyName:"Setting",syncedAttrs:{id:a.a.string,advanced:a.a.boolean,default:a.a.oneOfType(a.a.integer,a.a.string,a.a.boolean),hidden:a.a.boolean,group:a.a.string,label:a.a.string,
summary:a.a.string,type:a.a.oneOf(s.INT,s.TEXT,s.BOOL,s.ENUM,s.DOUBLE),value:a.a.oneOfType(a.a.integer,a.a.float,a.a.string,a.a.boolean),min:a.a.float,max:a.a.float,step:a.a.float,enumValues:a.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("|").map(function(t){var n=t.split(":"),r=n[0],a=n[1],o=void 0===a?r:a;return{label:decodeURIComponent(o),value:i(e.type,r)}})),e},parseAndSetValue:function(e){
this.set("value",i(this.get("type"),e))}});t.a=l},function(e,t,n){"use strict";function i(e){var t=o.a.clone(e);return void 0!==t.last?(t.end=t.last+1,t.size=t.end-t.start):void 0!==t.size?(t.end=t.start+t.size,t.last=t.end-1):void 0!==t.end&&(t.last=t.end-1,t.size=t.end-t.start),t}function r(e,t){return o.a.filter(o.a.map(e,i),function(e){return t?e.size>=0:e.size>0})}var a=n(5),o=n.n(a),s={augment:i,difference:function(e,t,n){return e=i(e),t=i(t),r([{start:e.start,
last:Math.min(e.last,t.start-1)},{start:Math.max(e.start,t.end),last:e.last}],n)},union:function(e,t,n){if(e=i(e),t=i(t),e.start>t.start){var a=e;e=t,t=a}var o=[e];return t.start<=e.end?o[0].last=Math.max(t.last,e.last):o.push(t),r(o,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 r=Math.min(e.start,e.end),a=Math.max(e.start,e.end);r<=a;r++)t.call(n,r)},
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=s},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,n){"use strict";var i=n(5),r=n.n(i),a=n(4),o=n(16),s=n(18),l=["all","recentlyAdded","recentlyViewed","recentlyViewedShows","onDeck","newest","folder"],c=s.a.extend({name:"SectionSubsetModel",context:["server","section"],idAttribute:"key",
rootPropertyName:"Directory",sessionAttrs:{selected:o.a.boolean},syncedAttrs:{key:o.a.string,title:o.a.string,secondary:o.a.boolean},derivedAttrs:{primary:function(){return!this.get("secondary")&&r.a.contains(l,this.get("key"))}},defaults:{selected:!1},augmentResponse:function(e){return"all"===e.key&&(e.title=Object(a.default)("All")),e}},{whitelistedPrimaryKeySubsets:l});t.a=c},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"MediaTypeModel",context:["server","section"],
sessionAttrs:{id:i.a.integer,typeString:i.a.string,title:i.a.string,plural:i.a.string,mediaType:i.a.string,child:i.a.string,parent:i.a.string,selected:i.a.boolean},defaults:{selected:!1}});t.a=a},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(19),o=n(23),s=n(620),l=o.a.extend({name:"FilterCollection",context:["server","section","includeAdvanced"],model:s.a,comparator:"filterType",includeAdvanced:!0,url:function(){var e=r.a.result(this.section,"url"),t=this.section.get("currentType"),n={
includeAdvanced:this.includeAdvanced?1:0};return t&&(n.type=t.id),a.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),r=n(18),a=r.a.extend({name:"FirstCharacterModel",context:["server","provider","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=a},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(277),o=n(19),s=n(97),l=n(244),c=n(16),u=n(18),d=n(1464),p=u.a.extend({mixins:[l.a],name:"PlaylistListModel",context:["server","section"],idAttribute:"key",collectionName:"playlists",responseType:function(){return Object(s.a)(this.server)},url:function(){return this.getPaginatedUrl(r.a.result(this,"containerKey"))},containerKey:function(){
var e=this.section.get("currentType"),t=this.section.get("currentSort"),n={type:15};return n.sort=t?t.id+":"+(t.get("direction")||"asc"):"titleSort:asc",e&&(n.playlistType=e),this.section.get("onlyDumb")&&(n.smart=0),o.join("/playlists/all",n)},sessionAttrs:{isPlaylistList:c.a.boolean,currentPageStart:c.a.integer,currentPageSize:c.a.integer,populatedRange:c.a.object},syncedAttrs:{totalSize:c.a.integer},syncedRelations:{playlists:{relationClass:d.a,rootPropertyName:"Playlist",options:function(e){
return{containerKey:r.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=a.a.addVersionHeader(2,n);return u.a.prototype.sync.call(this,e,t,i)},augmentResponse:function(e){return e.Metadata&&(e.Playlist=e.Metadata,delete e.Metadata),e}});t.a=p},function(e,t,n){"use strict"
;var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(19),l=n(278),c=n(16),u=n(18),d=n(624),p=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:s.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=s.join([r.a.result(this,"url"),"/items/",e,"/move"],n),a=r.a.extend(this.server.getXHROptions(i),{type:"PUT"}),l=o.a.ajax(a),c=this.get("children").getCollection(),u=this.findItem(e);c.remove(u);var d=this.findItem(t),p=d?c.indexOf(d)+1:0;return c.add(u,{at:p}),l}},removeItem:function(e){var t=this;if(void 0!==e){
var n=s.join([r.a.result(this,"url"),"/items/",e]),i=r.a.extend(this.server.getXHROptions(n),{type:"DELETE"}),a=o.a.ajax(i);a.then(function(e){t.set(t.parse(e))});var l=this.get("children").getCollection(),c=this.findItem(e);return l.remove(c),l.trigger("destroy",c,l),a}},addContent:function(e,t){var n=this,i=this.isNew()?"POST":"PUT",a=[r.a.result(this,"url")],c={};this.isNew()?(c.type=this.get("playlistType"),c.title=this.get("title"),c.smart=this.get("smart")?1:0):a.push("/items"),
e.get("playQueueID")?c.playQueueID=e.get("playQueueID"):c.uri=l.a.uri(e,t);var u=s.join(a,c),d=r.a.extend(e.server.getXHROptions(u),{type:i}),p=o.a.ajax(d);return p.then(function(e){n.set(n.parse(e))}),p.promise()},isLibraryItem:function(e,t){return!0},isPlexMusicItem:function(){return!1}});t.a=p},function(e,t,n){"use strict";function i(e){if(e&&e.length){var t=e.length
;return 1===t?e[0]:2===t?Object(r.default)("{1} and {2}",e[0],e[1]):3===t?Object(r.default)("{1}, {2}, and {3}",e[0],e[1],e[2]):Object(r.default)("{1}, {2}, and {3} others",e[0],e[1],e.length-2)}}var r=n(4);t.a=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(1521),r=n.n(i),a=n(330),o=n(70),s=n(1522),l=n(1539),c=n(1541),u=o.a.extend({mixins:[a.a],name:"syncModal",className:"convert-modal modal fade",template:r.a,regions:{bodyRegion:".modal-body-region"},initialize:function(e){o.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 s.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(){o.a.prototype.onRender.apply(this,arguments),this.enterNextState()},onStateMachineComplete:function(){this.hide()}});t.a=u},function(e,t,n){"use strict";var i=n(1530),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(59),c=n(28),u=s.a.ItemView.extend({className:"convert-policy-container",template:r.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=Object(c.r)(this.model.get("metadataType")||"movie"),this.leafMediaType=Object(c.q)(this.type.typeString).mediaType,this.model.setPolicyDefaultsFor(this.leafMediaType)},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.leafMediaType,e.policy.value),e.showUnwatched=e.isDirectory&&this.leafMediaType===l.d,e},updatePolicyValue:function(){var e=this.model.get("policy"),t=Math.abs(parseInt(this.ui.policyValueInput.val(),10));this.ui.policyValueInput.val(o.a.isNaN(t)?"":t),o.a.isNaN(t)&&(t=0),
e.set("value","all"===e.scope?null:t);var n=this.model.shouldShowPolicyWarning(this.leafMediaType,t);this.ui.policyWarning.toggleClass("hidden",!n)},onPolicyUnwatchedChange:function(e){this.model.get("policy").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";function i(e,t){var n=t?8*Math.round(t/8):0,i=e?8*Math.round(e/8*(9/16)):0;return Math.max(n,i)}t.a=i},function(e,t,n){"use strict";function i(e){return e>0?e+" kbps":""}t.a=i},function(e,t,n){"use strict";function i(e){return Object(r.a)(e)}t.a=i;var r=n(871)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=2},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);!1===/\S/.test(n.charAt(n.length-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";var i=n(1550),r=n.n(i),a=n(20),o=n(15),s=n(247),l=a.a.ItemView.extend({tagName:"li",className:"user-select-list-item",template:r.a,ui:{container:".user-select-container",poster:".user-poster"},events:{"click a":"onClick"},initialize:function(e){this.disabled=e.disabled,
this.posterImage=new s.a({model:this.model,type:"friend",width:80});var t=o.d("appModel"),n=t.get("primaryServer");n&&n.supports("imageFilters")&&(this.backgroundImage=new s.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(5),r=n.n(i),a=n(19),o=n(30),s=n(274),l=n(1551),c=n(1552),u={extensions:{
dash:".mpd",hls:".m3u8",http:""},logParams:function(e,t,n){o.a.group("[Transcoder] %s (%s) options",e,t),r.a.forEach(n,function(e,t){return o.a.info("%s: %s",t,e)}),o.a.groupEnd()},serializeParams:function(e,t){var n={},i={},o=/^X-Plex/;return r.a.each(e,function(e,t){o.test(t)?i[t]=e:n[t]=e}),n=a.stringifyParams(n),i=a.stringifyParams(i),n&&i?n+"&"+i:n||i},image:function(e,t,n){if(!t)return"";var i,a=n.fallbackServer,o=!1;if(a&&a.get("isConnected")){
var l=a.get("isFullServer"),c=a.get("activeConnection").get("isPossiblyCrossNetworkProtected");i=l&&!c?a:null}if(i)if(e.get("cloud"))o=!0;else if(!e.get("isFullServer")){var u=!e.get("activeConnection").get("isPrivate"),d=i.get("activeConnection").get("isPrivate");o=u||d}var p=o?i:e,h=p.id===e.id;e.get("cloud")&&(t=o?i.resolveUrl(t,{appendToken:!0}):e.resolveUrl(t,{appendToken:!0,connection:new s.a({scheme:"https",address:"node.plexapp.com",port:"32443"})}));var f={url:e.resolveUrl(t,{
useRelativeUrl:h,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&&r.a.each(n.filters,function(e,t){void 0!==e&&(f[t]=e)});var v="/photo/:/transcode?"+this.serializeParams(f,p);return p.resolveUrl(v,{appendToken:!0})},music:function(e,t,n,i){i||(i="start");var a=r.a.first(t.get("Media"));if(a){var o=r.a.first(a.Part);if(o){var s,l
;e.supports("universalMusicTranscoder")?(s=r.a.extend({hasMDE:1,path:e.resolveUrl(t.get("key"),{useRelativeUrl:!0}),mediaIndex:0,partIndex:0},n),l="/music/:/transcode/universal/"+i):(s={identifier:t.get("identifier"),url:e.resolveUrl(o.key,{useRelativeUrl:!0}),format:"mp3",audioCodec:"libmp3lame",audioBitrate:320,audioSamples:44100},l="/music/:/transcode/generic.mp3"),this.logParams("Music",i,s),s=r.a.extend(s,e.getHeaders());var c=this.extensions[s.protocol];return"start"===i&&c&&(l+=c),
e.resolveUrl(l+"?"+this.serializeParams(s,e))}}},video:function(e,t,n,i,a,o){a||(a={}),o||(o="start");var s=e.id===t.server.id,u=t.server.get("cloud")?e:t.server,d=e.get("activeConnection"),p=d.get("isPrivate"),h=r.a.extend({hasMDE:1,path:u.resolveUrl(t.get("key"),{useRelativeUrl:s,appendToken:!s}),mediaIndex:Object(l.a)(t,n.id),partIndex:Object(c.a)(n,i.key),protocol:"hls",fastSeek:1,directPlay:0,directStream:1,subtitleSize:100,audioBoost:100,location:p?"lan":"wan"},a)
;h.path=h.path.replace(/^http[s]?:\/\/node.plexapp.com:[\d]+\//,e.url()),this.logParams("Video",o,h);var f=t.get("indirectHttpHeaders");f&&(h.httpCookies=f.Cookie,h.userAgent=f["User-Agent"]),h=r.a.extend(h,e.getHeaders());var v=this.extensions[h.protocol],g="/video/:/transcode/universal/"+o;return"start"===o&&v&&(g+=v),e.resolveUrl(g+"?"+this.serializeParams(h,e))}};t.a=u},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(83),o=n(610),s=o.a.extend({maxCycles:3,maxSize:50,
imageParamsRegex:/&?(width|height|minSize)=([^&]+)/g,initialize:function(){o.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),a={url:n,blobUrl:e.blobUrl,size:i.size},o=this.get(t);if(o){if(!o.images.hasOwnProperty(n)){var s=o.sizes;o.images[n]=a;var l=r.a.sortedIndex(s,a,"size");s.splice(l,0,a)}}else o={images:{},sizes:[a]},o.images[n]=a,this.startListening(),o._cacheKey=t,this._cache[t]=o,
this.size++,e.persistInCache||this.setItemCycle(o,t,r.a.first(this.cycles))}},getItemCacheKey:function(e){return this.getImageInfo(e.url).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;return r.a.last(n.sizes).blobUrl}},remove:function(e,t){o.a.prototype.remove.apply(this,arguments),r.a.each(e.sizes,function(e){this.removeImageInfo(e.url),a.a.hasObjectUrl&&window.URL.revokeObjectURL(e.blobUrl)},this)}})
;t.a=s},function(e,t,n){"use strict";var i=n(1555),r=n.n(i),a=n(5),o=n.n(a),s=n(4),l=n(15),c=n(109),u=n(70),d=u.a.extend({name:"homeWarningModal",template:r.a,events:o.a.extend({"click .server-settings-btn":"onServerSettingsClick"},u.a.prototype.events),initialize:function(e){u.a.prototype.initialize.apply(this,arguments),this.type=e.type},serializeData:function(){var e;return e="pin"===this.type?Object(s.default)("You've added a PIN restriction"):Object(s.default)("You've joined a Plex Home"),{
intro:e}},onServerSettingsClick:function(e){e.preventDefault(),this.hide();var t=Object(l.d)("appModel"),n=t.get("primaryServer");Object(c.a)("serverSettings",{serverID:n.id,group:"general"})}});t.a=d},function(e,t,n){"use strict";function i(e){var t=e.match(/(^[^#]+)(?:#(.*$))?/),n=t[1],i=t[2],r=void 0===i?"":i,a=n.match(/(^[^\?]+)(\?.*$)?/),o=a[1],s=a[2],l=void 0===s?"":s,c=r.match(/(^[^\?]*)(\?.*$)?/),u=c[1],d=c[2];return{base:o,searchParams:l,hashPath:u,hashParams:void 0===d?"":d}}t.a=i
},function(e,t,n){"use strict";function i(e){return e?a()("<p>"+e+"<p>").text():""}var r=n(12),a=n.n(r);t.a=i},function(e,t,n){"use strict";var i=n(58),r=n(94),a=n(16),o=n(51),s=n(18),l=n(98),c=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:l.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===o.a.xml?Object(r.b)(e,{includeDirectories:!0}):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),r=n.length-1;r>=0;r--){var a=n[r];if(a.settings||a.search){
e[a.settings?"prefsKey":"searchKey"]=a.key,n.splice(r,1)}}return e.Metadata=n,e.metadataList=e,e}});t.a=c},function(e,t,n){"use strict";var i=n(1605),r=n.n(i),a=n(20),o=a.a.ItemView.extend({className:"loading",template:r.a,initialize:function(e){e&&e.inline&&this.$el.addClass("loading-inline")}});t.a=o},,,,,function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return o});var i=n(1),r=n.n(i),a=r.a.shape({trySubscribe:r.a.func.isRequired,
tryUnsubscribe:r.a.func.isRequired,notifyNestedSubs:r.a.func.isRequired,isSubscribed:r.a.func.isRequired}),o=r.a.shape({subscribe:r.a.func.isRequired,dispatch:r.a.func.isRequired,getState:r.a.func.isRequired})},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 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 a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(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 s(){}function l(e,t){var n={run:function(i){try{
var r=e(t.getState(),i);(r!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=r,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}function c(e){var t,n,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=c.getDisplayName,p=void 0===u?function(e){return"ConnectAdvanced("+e+")"
}:u,I=c.methodName,S=void 0===I?"connectAdvanced":I,M=c.renderCountProp,D=void 0===M?void 0:M,C=c.shouldHandleStateChanges,O=void 0===C||C,j=c.storeKey,P=void 0===j?"store":j,w=c.withRef,T=void 0!==w&&w,E=o(c,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),x=P+"Subscription",N=y++,A=(t={},t[P]=g.a,t[x]=g.b,t),L=(n={},n[x]=g.b,n);return function(t){
h()("function"==typeof t,"You must pass a component to the function returned by connect. Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",o=p(n),c=m({},E,{getDisplayName:p,methodName:S,renderCountProp:D,shouldHandleStateChanges:O,storeKey:P,withRef:T,displayName:o,wrappedComponentName:n,WrappedComponent:t}),u=function(n){function u(e,t){i(this,u);var a=r(this,n.call(this,e,t));return a.version=N,a.state={},a.renderCount=0,a.store=e[P]||t[P],
a.propsMode=Boolean(e[P]),a.setWrappedInstance=a.setWrappedInstance.bind(a),h()(a.store,'Could not find "'+P+'" in either the context or props of "'+o+'". Either wrap the root component in a <Provider>, or explicitly pass "'+P+'" as a prop to "'+o+'".'),a.initSelector(),a.initSubscription(),a}return a(u,n),u.prototype.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return e={},e[x]=t||this.context[x],e},u.prototype.componentDidMount=function(){
O&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},u.prototype.componentWillReceiveProps=function(e){this.selector.run(e)},u.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},u.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=s,this.store=null,this.selector.run=s,
this.selector.shouldComponentUpdate=!1},u.prototype.getWrappedInstance=function(){return h()(T,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+S+"() call."),this.wrappedInstance},u.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},u.prototype.initSelector=function(){var t=e(this.store.dispatch,c);this.selector=l(t,this.store),this.selector.run(this.props)},u.prototype.initSubscription=function(){if(O){
var e=(this.propsMode?this.props:this.context)[x];this.subscription=new v.a(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},u.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(b)):this.notifyNestedSubs()},u.prototype.notifyNestedSubsOnComponentDidUpdate=function(){
this.componentDidUpdate=void 0,this.notifyNestedSubs()},u.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},u.prototype.addExtraProps=function(e){if(!(T||D||this.propsMode&&this.subscription))return e;var t=m({},e);return T&&(t.ref=this.setWrappedInstance),D&&(t[D]=this.renderCount++),this.propsMode&&this.subscription&&(t[x]=this.subscription),t},u.prototype.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,
e.error)throw e.error;return Object(f.createElement)(t,this.addExtraProps(e.props))},u}(f.Component);return u.WrappedComponent=t,u.displayName=o,u.childContextTypes=L,u.contextTypes=A,u.propTypes=A,d()(u,t)}}t.a=c;var u=n(1631),d=n.n(u),p=n(141),h=n.n(p),f=n(0),v=(n.n(f),n(1632)),g=n(887),m=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},y=0,b={}},function(e,t,n){"use strict"
;function i(e,t,n){function r(){f===h&&(f=h.slice())}function s(){return p}function l(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return r(),f.push(e),function(){if(t){t=!1,r();var n=f.indexOf(e);f.splice(n,1)}}}function c(e){if(!(0,a.default)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.")
;if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(v)throw new Error("Reducers may not dispatch actions.");try{v=!0,p=d(p,e)}finally{v=!1}for(var t=h=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&&void 0===n&&(n=t,t=void 0),void 0!==n){
if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(i)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var d=e,p=t,h=[],f=h,v=!1;return c({type:o.INIT}),{dispatch:c,subscribe:l,getState:s,replaceReducer:u}}t.__esModule=!0,t.ActionTypes=void 0,t.default=i;var r=n(217),a=function(e){return e&&e.__esModule?e:{default:e}}(r),o=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t,n){(function(t){
var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(191))},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){"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]
;return t.slice(0,-1).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){return function(t,n){function i(){return r}var r=e(t,n);return i.dependsOnOwnProps=!1,i}}function r(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function a(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=!0,i.mapToProps=function(t,n){i.mapToProps=e,i.dependsOnOwnProps=r(e);var a=i(t,n);return"function"==typeof a&&(i.mapToProps=a,i.dependsOnOwnProps=r(a),a=i(t,n)),a},i}}t.a=i,t.b=a;n(894)},function(e,t,n){"use strict";n(1643),n(637)},function(e,t,n){"use strict";var i=n(1645),r=i.a.Symbol;t.a=r},function(e,t,n){"use strict";function i(e){return e.experienceSettings.volume}t.a=i},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(7),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(29)),g=n(339),m=n(169),y=n(1754),b=n.n(y),I=n(1755),S=n.n(I),M=n(1756),D=n.n(M),C={position:"absolute",width:"100%",height:"100%"},O=p()({},C,{background:"url("+b.a+")",zIndex:2}),j={opacity:30,background:"36383b"},P=p()({},j,{format:"png"}),w=r()("div",{style:O}),T=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return Object(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.url,a=e.allowPreset,o=e.allowLightPreset,s=e.allowBlur,l=window.innerWidth,c=window.innerHeight,u=s?P:j,d=void 0,h=void 0,f=void 0,v=void 0;if(s){var y=l/c;d=y>1?640:640*y,h=y>1?640/y:640;var b=Math.max(l/d,c/h);f=Math.round(100/b)}else d=Math.min(window.innerWidth,1920),h=Math.min(window.innerHeight,1080)
;return!i&&a&&(v=o?S.a:D.a),r()("div",{},void 0,r()(m.a,{serverEntityID:t,providerEntityID:n,url:i,src:v,width:d,height:h,minSize:!0,upscale:s,style:C,background:!0,transition:!0,transitionProps:g.a,filters:v?null:p()({},u,{blur:f}),allowPixelRatioSize:!1}),w)},t}(f.Component);T.defaultProps={allowBlur:!0},t.a=T},function(e,t,n){"use strict";function i(e,t){var n=t.serverEntityID,i=t.providerEntityID,r=n+":"+i
;return v[r]||(v[r]=Object(h.a)(Object(s.createSelector)(Object(d.a)(),Object(p.a)(),function(e,t){var n=e&&e.activeConnection&&e.activeConnection.uri;if(!n)return f;var i="/photo/:/transcode",r=!1,a=!1,s=void 0;if(t){var l=o.a.findWhere(t.features,{type:u.b.IMAGE_TRANSCODER});l&&(i=l.key,r=Object(c.a)(i),a=l.public)}return s=r?t&&t.baseURL?t.baseURL:n:"",{accessToken:e.accessToken,baseUrl:s,isAbsoluteTranscodeKey:r,isPublicTranscoder:a,transcodeKey:i,uri:n}}),function(e){return e})),v[r](e,t)}
function r(){return Object(s.createSelector)(function(e,t){return t.url},i,function(e,t){if(e&&t!==f){var n=t.accessToken,i=t.baseUrl,r=t.isAbsoluteTranscodeKey,a=t.isPublicTranscoder,o=t.transcodeKey,s=t.uri,u=Object(c.a)(e)?e:l.join([i,e],{"X-Plex-Token":n}),d=r?o:[s,o];return l.join(d,{url:u,"X-Plex-Token":a?void 0:n})}})}t.a=r;var a=n(5),o=n.n(a),s=n(6),l=(n.n(s),n(19)),c=n(469),u=n(76),d=n(42),p=n(79),h=n(195),f={},v={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{
value:!0}),t.default=!("undefined"==typeof window||!window.document||!window.document.createElement),e.exports=t.default},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(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 CSSTransitionGroup: 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)")}return null}}t.__esModule=!0,t.nameShape=void 0,t.transitionTimeout=r;var a=n(0),o=(i(a),n(1)),s=i(o);t.nameShape=s.default.oneOfType([s.default.string,s.default.shape({
enter:s.default.string,leave:s.default.string,active:s.default.string}),s.default.shape({enter:s.default.string,enterActive:s.default.string,leave:s.default.string,leaveActive:s.default.string,appear:s.default.string,appearActive:s.default.string})])},function(e,t,n){"use strict";function i(e){
var t=e.src,n=e.style,i=e.width,r=e.height,o=e.backgroundSize,l=e.backgroundPosition,c=e.backgroundRepeat,d=s()(e,["src","style","width","height","backgroundSize","backgroundPosition","backgroundRepeat"]),p=a()({backgroundImage:"url("+t+")",backgroundSize:o,backgroundPosition:l,backgroundRepeat:c,width:i,height:r},n);return u.a.createElement("div",a()({style:p},d))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c);i.defaultProps={backgroundSize:"cover",
backgroundPosition:"center",backgroundRepeat:"no-repeat"},t.a=i},function(e,t,n){"use strict";function i(e){return a.a.createElement("img",e)}t.a=i;var r=n(0),a=n.n(r)},function(e,t,n){"use strict";function i(){return Object(v.createSelector)(function(e){return!!e.remotePlayer},Object(I.a)(),Object(S.a)(),Object(M.a)(),b.a,function(e,t,n,i,r){var a=t.isOpen,o=t.openState,s=o===m.b;return{isOpen:a,isServerlessPlayer:a&&(!n||!i),isMiniPlayer:s,isRemotePlayer:e,restorePlayQueuePayload:r}})}
var r=n(13),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(6),g=(n.n(v),n(11)),m=n(197),y=n(85),b=n(1763),I=n(44),S=n(656),M=n(220),D=n(60),C=n(118),O={dispatchRestorePlayQueue:C.m,dispatchEndPlayback:D.f},j=function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentDidMount=function(){this._restorePlayQueue(),this.props.isServerlessPlayer&&this.props.dispatchEndPlayback({
playerType:this.props.playerType})},t.prototype.componentDidUpdate=function(e){this._restorePlayQueue(),this.props.isServerlessPlayer&&!e.isServerlessPlayer&&this.props.dispatchEndPlayback({playerType:this.props.playerType})},t.prototype._restorePlayQueue=function(){var e=this.props,t=e.playerType,n=e.isOpen,i=e.restorePlayQueuePayload,r=e.dispatchRestorePlayQueue;if(!n&&i){t===Object(y.c)(i.playQueueType)&&r(i)}},t.prototype.render=function(){
var e=this.props,t=e.component,n=e.isServerlessPlayer,i=(e.restorePlayQueuePayload,e.dispatchRestorePlayQueue,e.dispatchEndPlayback,a()(e,["component","isServerlessPlayer","restorePlayQueuePayload","dispatchRestorePlayQueue","dispatchEndPlayback"]));return n?null:f.a.createElement(t,i)},t}(h.Component);t.a=Object(g.b)(i,O)(j)},function(e,t,n){"use strict";function i(){var e=Date.now(),t=Object(r.d)("sessionStats");a.a.debug("[Metrics] Updating session last interaction time"),
t.save("lastInteractionTime",e)}var r=n(15),a=n(30);t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=n.path,r=n.model,a=n.attr,o=void 0===a?"key":a;return Object(h.a)(i||r,"A path or a model is required to build a source URI"),t.get("isUniversal")?""+e.get("sourceBaseURI")+(i||r.get(o)):i||f.a.uri(r)}function r(e){return e.metadataItemModel?a(e):e.metadataItemKey?o(e):e.metadataItemModels&&e.metadataItemModels.length?s(e):e.metadataListModel?l(e):p.a.Deferred().reject().promise()}
function a(e){var t=e.playQueueModel,n=e.providerModel,r=e.playlistModel,a=e.metadataItemModel,o=e.containerKey,s=e.shuffle,l=e.playAll,u=t.get("isUniversal"),d=a.get("type"),h=a.get("subtype"),f=d===v.k,y=d===v.j,b=d===v.e,I=d===v.g,S=d===v.c,M=d===v.l,D=!!r||d===v.i,C=a.get("isExtra"),O=c(e);if((f||y||b||h===g.b)&&(O.continuous=1),(f||y)&&!l&&!s){var j=f?a:new m.a({key:a.get("parentKey")},{server:a.server,provider:a.providerModel});return j.fetch({merge:!0,data:{includeOnDeck:"1"}
}).then(function(){var e=j.get("onDeck"),r=e&&f,o=e&&y&&e.get("parentRatingKey")===a.get("ratingKey");return r||o?(O.uri=i(n,t,{model:e}),O):y?a.get("children").populate().then(function(){var e=a.get("children").get("metadataItems"),r=e.findWhere(function(e){return!e.get("viewCount")});return O.uri=i(n,t,{model:r||e.first()}),O}):(O.uri=i(n,t,{model:a}),O)})}return D?r?(O.playlistID=r.get("ratingKey"),
O.key=a.get("key")):O.playlistID=a.get("ratingKey"):(M||I||S&&!C)&&o&&!O.continuous?(O.uri=i(n,t,{path:u?o:"library:///directory/"+encodeURIComponent(o)}),O.key=a.get("key")):O.uri=i(n,t,{model:a}),p.a.Deferred().resolve(O).promise()}function o(e){var t=e.providerModel,n=e.playQueueModel,r=e.metadataItemKey,a=n.get("isUniversal"),o=c(e);return o.uri=i(t,n,{path:a?r:"library:///item/"+encodeURIComponent(r)}),p.a.Deferred().resolve(o).promise()}function s(e){
var t=e.playQueueModel.get("isUniversal");Object(h.a)(!t,"Universal Play Queue does not support multi-selection");var n=c(e);return n.uri=f.a.uri(null,{items:e.metadataItemModels}),p.a.Deferred().resolve(n).promise()}function l(e){var t=e.providerModel,n=e.playQueueModel,r=e.metadataListModel,a=c(e);return a.uri=i(t,n,{model:r,attr:"containerKey"}),p.a.Deferred().resolve(a).promise()}function c(e){return{type:e.playQueueModel.get("type"),shuffle:e.shuffle?1:void 0,next:e.next?1:void 0,
extrasPrefixCount:e.extrasPrefixCount}}function u(e){var t=e.playQueueModel;if(t.get("isLocal"))return Object(y.a)(e).then(function(){return Object(b.a)(t)});var n=t.isNew()?"POST":"PUT";return r(e).then(function(e){return Object(b.a)(t,{params:e,type:n}).then(null,function(){return p.a.Deferred().reject().promise()})})}t.a=u;var d=n(12),p=n.n(d),h=n(33),f=n(278),v=n(28),g=n(143),m=n(77),y=n(1765),b=n(343)},function(e,t,n){"use strict"
;var i=n(50),r=n.n(i),a=n(5),o=n.n(a),s=n(58),l=n(129),c=n(43),u=n(40),d=n(242),p=n(16),h=n(18),f=n(77),v=n(212),g=n(1767),m=n(1774),y=h.a.extend({name:"PlayQueueItemModel",context:["server","provider","identifier","mediaTagPrefix","mediaTagVersion"],entityType:c.j,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(u.a)(this.entityType,e.playQueueItemID,this.server.entityID())},idAttribute:"playQueueItemID",cache:new d.a,
cacheKey:function(e){return this.server&&this.server.getScopedKey(e.playQueueItemID)},sessionAttrs:{isPlayQueueItem:p.a.boolean},syncedAttrs:{playQueueItemID:p.a.string,queueIndex:p.a.integer,key:p.a.string,ratingKey:p.a.string,type:p.a.string,subtype:p.a.string,advertisement:p.a.boolean,allowSkipAfter:p.a.integer,librarySectionID:p.a.string,hasPremiumLyrics:p.a.boolean,syncItemId:p.a.integer,generatorID:p.a.integer,generatorType:p.a.integer,clientIdentifier:p.a.string,target:p.a.string},
syncedRelations:{metadataItem:{relationClass:f.a,deferred:!0},lyricsStreams:{relationClass:g.a,deferred:!0},vast:{relationClass:m.a,deferred:!0}},sessionRelations:{postPlay:{relationClass:v.default,options:function(){return{url:"hubs/metadata/"+this.get("metadataItem").id+"/postplay"}}}},defaults:{isPlayQueueItem:!0},augmentResponse:function(e){var t=o.a.pick(e,r()(this.syncedAttrs));e.Vast&&(t.vast=e.Vast),t.metadataItem=e;var n=o.a.first(s.a.parseArray(e.Media));if(n){
var i=o.a.first(s.a.parseArray(n.Part));if(i){var a=s.a.parseArray(i.Stream);if(a){var c=l.a.get("lyrics");t.lyricsStreams=o.a.filter(a,function(e){return s.a.parseInteger(e.streamType)===c.id})}}}return t}});t.a=y},function(e,t,n){"use strict";function i(e){var t=e.providerModel,n=e.playQueueID,i=e.playQueueType,s=e.playQueueRepeat,l=e.playQueueOwn,c=void 0===l||l,u=t&&t.get("features"),d=u&&u.get(o.b.PLAY_QUEUE),p=!!d&&d.get("flavor")===o.c.UNIVERSAL;return d?new r.a({playQueueID:n,
key:d.get("key"),type:i,repeat:s,own:c,isUniversal:p},{server:t.server,provider:t}):new a.a({playQueueID:n,type:i},{server:t.server,provider:t})}t.a=i;var r=(n(33),n(214),n(1775)),a=n(1776),o=n(76)},function(e,t,n){"use strict";n.d(t,"c",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"f",function(){return a}),n.d(t,"n",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"a",function(){return l}),n.d(t,"m",function(){return c}),n.d(t,"l",function(){return u}),
n.d(t,"e",function(){return d}),n.d(t,"i",function(){return p}),n.d(t,"j",function(){return h}),n.d(t,"h",function(){return f}),n.d(t,"k",function(){return v}),n.d(t,"g",function(){return g});var i="PLAY",r="PAUSE",a="SEEK",o="STOP",s="PREVIOUS",l="NEXT",c="SKIPTO",u="SHOWDETAILS",d="REFRESHPLAYQUEUE",p="SETREPEAT",h="SETSTREAM",f="SETQUALITY",v="SETSUBTITLESIZE",g="SETAUTOPLAY"},function(e,t,n){"use strict";function i(e){return e.repeatOne?r.c:e.repeatAll?r.a:r.b}var r=n(416);t.a=i
},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e){return e&&e.playQueue})}var r=n(6),a=(n.n(r),n(44));t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=n;if(e.Part.length>1)for(var r=0,a=e.Part.length;r<a;r++){var o=e.Part[r];if(!o.duration)break;if(t.key===o.key)break;i+=o.duration}return i}t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=e.indexOf(t);if(i<0)return e;var r=e.slice(0);return r[i]=n,r}t.a=i},function(e,t,n){
"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r});var i="audio",r="video"},function(e,t,n){"use strict";function i(e){var t={dispatchUpdatePosition:I.c,dispatchResetPosition:I.b},n=function(t){function n(){var e,i,r;c()(this,n);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return e=i=d()(this,t.call.apply(t,[this].concat(o))),i.onPositionMillisecondsChange=function(e){i.props.dispatchUpdatePosition(e)},r=e,d()(i,r)}return h()(n,t),
n.prototype.shouldComponentUpdate=function(e,t){return Object(b.a)(this,e,t)},n.prototype.componentWillUnmount=function(){this.props.dispatchResetPosition()},n.prototype.render=function(){var t=this.props,n=(t.dispatchUpdatePosition,t.dispatchResetPosition,s()(t,["dispatchUpdatePosition","dispatchResetPosition"]));return g.a.createElement(e,a()({},n,{onPositionMillisecondsChange:this.onPositionMillisecondsChange}))},n}(v.Component);return n.displayName="PositionMonitor("+Object(y.a)(e)+")",
n.WrappedComponent=e,Object(m.b)(null,t,null,{storeKey:"playerStore"})(n)}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(153),b=n(29),I=n(940);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=t.type,i=t.payload;switch(n){case g:return{positionMilliseconds:i};case m:return{positionMilliseconds:0};default:return e}}n.d(t,"c",function(){
return y}),n.d(t,"b",function(){return b});var r=n(8),a=n.n(r),o=n(9),s=n.n(o),l=n(10),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(480),f=(n.n(h),n(668)),v=n(36),g="UPDATE_POSITION",m="RESET_POSITION",y=Object(v.a)(g),b=Object(v.a)(m),I=function(e){function t(n,r){a()(this,t);var o=s()(this,e.call(this,n,r));return o.store=Object(h.createStore)(i,{positionMilliseconds:0}),o}return c()(t,e),t.prototype.getChildContext=function(){return{playerStore:this.store}},t.prototype.render=function(){
return p.a.Children.only(this.props.children)},t}(d.Component);I.childContextTypes={playerStore:f.a},t.a=I},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(l.a)("qualityIndex"),c.a,o.a,Object(s.a)(),function(e,t,n,i){return{qualityIndex:e,subtitleSize:t.subtitleSize,volume:n,playbackSpeed:i}})}var r=n(11),a=n(6),o=(n.n(a),n(492)),s=n(942),l=n(347),c=n(100),u=n(1792);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(function(e){return e.remotePlayer},Object(a.a)("playbackSpeed"),Object(o.a)(),function(e,t,n){return e?1:t||n&&n.playbackSpeed||1})}t.a=i;var r=n(6),a=(n.n(r),n(347)),o=n(943)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Object(r.createSelector)(Object(o.a)(),Object(s.a)(e),a.a,function(e,t,n){if(t&&t.metadataItem)return n[t.metadataItem]})}var r=n(6),a=(n.n(r),n(110)),o=n(44),s=n(119);t.a=i
},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),function(e){if(!e)return{videoStreams:[],selectedVideoStream:null,audioStreams:[],selectedAudioStream:null,subtitlesStreams:[],selectedSubtitlesStream:null};var t=a.a.get("video").id,n=a.a.get("audio").id,i=a.a.get("subtitles").id,r=e.Stream.filter(function(e){return e.streamType===t}),o=e.Stream.filter(function(e){return e.streamType===n}),s=e.Stream.filter(function(e){return e.streamType===i});return{
videoStreams:r,selectedVideoStream:r[0],audioStreams:o,selectedAudioStream:o.find(function(e){return e.selected}),subtitlesStreams:s,selectedSubtitlesStream:s.find(function(e){return e.selected})}})}var r=n(6),a=(n.n(r),n(129)),o=n(945);t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),Object(o.a)(),function(e,t){if(t){var n=e.partIndex,i=void 0===n?0:n;return t.Part[i]}})}var r=n(6),a=(n.n(r),n(44)),o=n(946);t.a=i},function(e,t,n){"use strict"
;function i(){return Object(r.createSelector)(Object(o.a)(),Object(s.a)(),a.a,function(e,t,n){if(t&&t.metadataItem){var i=e.mediaIndex,r=void 0===i?0:i;return n[t.metadataItem].Media[r]}})}var r=n(6),a=(n.n(r),n(110)),o=n(44),s=n(119);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,r=0,o=e.Part.length;r<o&&(n=e.Part[r],n.duration)&&!((i+=n.duration)>t);r++);else n=a.a.first(e.Part);return n}var r=n(5),a=n.n(r);t.a=i},function(e,t,n){"use strict"
;function i(e,t,n){var i=n;if(e.Part.length>1)for(var r=0,a=e.Part.length;r<a;r++){var o=e.Part[r];if(!o.duration)break;if(t.key===o.key)break;i-=o.duration}return i}t.a=i},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(4),l=n(393),c=n(663),u=n(950),d=n(243),p=n(951),h=n(952),f=n(283),v=n(130),g=n(129),m=n(279),y=n(334),b=n(30),I={getMediaDecision:function(e){var t=this.augmentProfile(e);if(b.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(r.a.first(i),t,e);var a=r.a.map(i,function(n){return this.analyzeMedia(n,t,e)},this);return this.getBestDecision(a)},augmentProfile:function(e){var t=e.profile;if(!t)throw new Error("MDE: No player profile provided for "+e.type)
;var n=e.type===f.a.types.VIDEO,i=o.a.extend(!0,{},t.directPlay),a=o.a.extend(!0,{},t.directStream),s=i.generic;s&&delete i.generic;var l=e.allowedAC3Containers,c="*"===l;!c&&l&&(l=Array.isArray(l)?l:[l]);var u=e.allowedEAC3Containers,d="*"===u;!d&&u&&(u=Array.isArray(u)?u:[u]);var p=e.allowedDCAContainers,h="*"===p;!h&&p&&(p=Array.isArray(p)?p:[p]);var v=e.allowedTrueHDContainers,g="*"===v;return!g&&v&&(v=Array.isArray(v)?v:[v]),r.a.each(i,function(t,i){this.mergeGenericOptions(t,s),
this.mergeMaxQualityOptions(t,e),(c||l&&r.a.contains(l,i))&&this.addAudioCodec("ac3",t,e),(d||u&&r.a.contains(u,i))&&this.addAudioCodec("eac3",t,e),(h||p&&r.a.contains(p,i))&&this.addAudioCodec("dca",t,e),(g||v&&r.a.contains(v,i))&&this.addAudioCodec("truehd",t,e);var a=f.a.getStreamByType(e.type),o=t[a];if(o){var m=o.codecs;r.a.each(m,function(t,n){this.mergeMaxQualityOptions(t,e,!0),e.videoCodecOptions&&e.videoCodecOptions[n]&&this.mergeCodecOptions(t,e.videoCodecOptions[n])},this)}
var y=n&&t.audio;if(y&&e.audioCodecOptions){var b=y.codecs;r.a.each(b,function(t,n){e.audioCodecOptions[n]&&this.mergeCodecOptions(t,e.audioCodecOptions[n])},this)}},this),this.mergeMaxQualityOptions(a,e),n&&(e.videoCodecOptions&&a.video&&r.a.each(a.video.codecs,function(t,n){e.videoCodecOptions[n]&&this.mergeCodecOptions(t,e.videoCodecOptions[n])},this),e.audioCodecOptions&&a.audio&&r.a.each(a.audio.codecs,function(t,n){e.audioCodecOptions[n]&&this.mergeCodecOptions(t,e.audioCodecOptions[n])
},this)),{directPlay:i,directStream:a}},mergeGenericOptions:function(e,t){t&&(r.a.defaults(e,r.a.omit(t,"video","audio")),r.a.each(["audio","video"],function(n){var i=t[n],a=e[n];i&&(a||(a={},e[n]=a),r.a.defaults(a,r.a.omit(i,"codecs")),i.codecs&&r.a.each(i.codecs,function(e,t){r.a.defaults(this.ensureCodecs(t,a),e)},this))},this))},mergeCodecOptions:function(e,t){r.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"}];r.a.each(i,function(i){if("videoResolution"!==i.option||t.type===f.a.types.VIDEO){var r=this.getMaxQualityOption(e,i.option,t);if(null!=r){var a=i.setting,o=f.a.getStreamByType(t.type);e.hasOwnProperty(a)?e[a]=r:e.hasOwnProperty(o)?e[o][a]=r:n||(e[o]={},e[o][a]=r)}}},this)},getMaxQualityOption:function(e,t,n){
var i=n.quality||{},r="max"+t.charAt(0).toUpperCase()+t.slice(1),a=i[t],o=this.getPrimaryStreamProperty(e,r,n);if("videoResolution"===t&&a&&(a=v.a.getResolutionFromSize(a)),"bitrate"===t){var s=n.item.server,l=s.get("maxUploadBitrate");l&&(!a||l<a)&&(a=l)}if(a||o){return a&&o?Math.min(a,o):a||o}},addAudioCodec:function(e,t,n){t.audio||(t.audio={}),this.ensureCodecs(e,t.audio)},analyzeMedia:function(e,t,n){b.a.info("[MDE] Starting analysis of",this.getMediaTitle(e)),
Object(b.a)("[MDE] Analyzing direct play");var i=this.canDirectPlay(e,t.directPlay,n),a={finalProfile:t,transcodeServer:n.transcodeServer,item:n.item,media:e,canDirectPlay:i.result,canDirectPlayFailedCheck:i.failedCheck},o=n.transcoderOptions||{};if(r.a.isFunction(o)&&(o=o(a)),n.type===f.a.types.VIDEO){Object(b.a)("[MDE] Analyzing video direct stream");var s=Object(l.a)(e);if(s){var d=this.canDirectStreamVideo(s,t.directStream.video,n,o);a.canDirectStreamVideo=d.result,
a.canDirectStreamVideoFailedCheck=d.failedCheck}}if(n.type!==f.a.types.PHOTO){Object(b.a)("[MDE] Analyzing audio direct stream");var p=Object(c.a)(e);if(p){var h=this.canDirectStreamAudio(p,t.directStream.audio,n,o);a.canDirectStreamAudio=h.result,a.canDirectStreamAudioFailedCheck=h.failedCheck}}var v=Object(u.a)(a.media);return v&&(Object(b.a)("[MDE] Analyzing subtitles"),r.a.extend(a,this.analyzeSubtitles(v,n))),Object(b.a)("[MDE] Analyzing playability"),r.a.extend(a,this.canPlay(a,n)),
r.a.extend(a,this.getEffectiveQuality(e,t.directStream,n)),b.a.group("[MDE] Finished analysis of",this.getMediaTitle(e)),this.getDecisionLogs(a).forEach(function(e){return b.a.info(e)}),b.a.groupEnd(),a},canDirectPlay:function(e,t,n){if(n.forceDirectPlay)return Object(b.a)("[MDE] Direct play forced"),{result:!0};if(!1===n.allowDirectPlay&&!n.transcodeServer.get("isCloud"))return b.a.warn("[MDE] Direct play failed; option is disabled"),{result:!1,failedCheck:"allowDirectPlay"}
;if(n.type===f.a.types.VIDEO&&!this.canDirectPlayVideo(e,n))return{result:!1,failedCheck:"canDirectPlayVideo"};var i=t[e.container];if(!i)return b.a.warn("[MDE] Direct play failed; unsupported container:",e.container),{result:!1,failedCheck:"containerProfile"};var a=r.a.keys(i);if(a&&a.length){for(var o=0,s=a.length;o<s;o++){var u=a[o],p=i[u];if("mimeType"===u){
if(!n.skipCanPlayTypeTest&&!this.canPlayType(f.a.getElementByType(n.type),p))return b.a.warn("[MDE] Direct play failed; canPlayType test, %s: %s",u,p),{result:!1,failedCheck:"canPlayType"}}else if("video"===u||"audio"===u){var h=g.a.get(u),v=Object(d.a)(e,{streamType:h.id}),m="video"===u?Object(l.a)(e):Object(c.a)(e);if(!m){b.a.warn("[MDE] No stream selected; will not be able to analyze stream codecs");continue}var y="audio"===u&&m!==v[0]
;if(y&&!n.allowMultiTrackAudio)return b.a.warn("[MDE] Direct play failed; multi-track audio is required"),{result:!1,failedCheck:"allowMultiTrackAudio"};var I=this.analyzeStream(m,p,n);if(!I.result)return{result:!1,failedCheck:I.failedCheck}}else if("photo"===u){var S=this.analyzeStream(r.a.first(e.Part),p,n);if(!S.result)return{result:!1,failedCheck:S.failedCheck}}else if(!this.validateProfileProperty(u,p,e))return{result:!1,failedCheck:"validateProfileProperty:"+u}}return{result:!0}}return{
result:!0}},canDirectPlayVideo:function(e,t){return t.allowDirectPlay||t.transcodeServer.get("isCloud")?"hls"!==e.protocol||t.hasNativeHLS?"flv"!==e.container||t.hasFlash?!("dash"===e.protocol&&!t.hasDASH)||(b.a.warn("[MDE] Direct play failed; cannot play DASH"),!1):(b.a.warn("[MDE] Direct play failed; cannot play FLV"),!1):(b.a.warn("[MDE] Direct play failed; cannot play HLS"),!1):(b.a.warn("[MDE] Direct play failed; option is disabled"),!1)},canPlayType:function(e,t){
if(e===f.a.elements.PHOTO)return!0;var n=document.createElement(e);return!(!n.canPlayType||!n.canPlayType(t).replace(/^no$/,""))},canDirectStreamVideo:function(e,t,n,i){return i.directStream||n.transcodeServer.get("isCloud")?this.analyzeStream(e,t,n):(b.a.warn("[MDE] Direct stream video failed; option is disabled"),{result:!1,failedCheck:"options:directStream"})},canDirectStreamAudio:function(e,t,n,i){
return i.directStreamAudio||n.transcodeServer.get("isCloud")?this.analyzeStream(e,t,n):(b.a.warn("[MDE] Direct stream audio failed; option is disabled"),{result:!1,failedCheck:"options:directStreamAudio"})},analyzeStream:function(e,t,n){var i=t&&t.codecs&&t.codecs[e.codec];for(var r in t){var a=t[r];if("codecs"===r){var o=a[e.codec];if(!o)return{result:!1,failedCheck:"noCodecInProfile:"+e.codec};var s=this.analyzeStream(e,o,n);if(!s.result)return{result:!1,failedCheck:s.failedCheck}
}else if(!(i&&r in i||this.validateProfileProperty(r,a,e)))return{result:!1,failedCheck:"validateProfileProperty:"+r}}return{result:!0}},validateProfileProperty:function(e,t,n){var i,a=e.match(/^(min|max)(\w)(\w*)/);if(a){var o="min"===a[1],s="max"===a[1];if(e=a[2].toLowerCase()+a[3],i=n[e],null==i&&b.a.warn("[MDE] Unable to validate %s; re-analyze the media if possible",e),null!=i&&"videoResolution"===e&&(i=v.a.getHeightFromResolution(i),t=v.a.getHeightFromResolution(t)),null!=i){
if(o&&i<t)return b.a.warn("[MDE] Invalid profile property; %s: %s < %s",e,i,t),!1;if(s&&i>t)return b.a.warn("[MDE] Invalid profile property; %s: %s > %s",e,i,t),!1}}else if(i=n[e],null==i&&b.a.warn("[MDE] Unable to validate %s; re-analyze the media if possible",e),i!==t&&!r.a.contains(t,i))return b.a.warn("[MDE] Invalid profile property; %s: %s !== %s",e,i,t),!1;return!0},analyzeSubtitles:function(e,t){var n=t.subtitlesBurnLevel||y.a.ALWAYS,i=e.codec
;return Object(b.a)("[MDE] Subtitle codec:",i),Object(b.a)("[MDE] Burn level:",n),n===y.a.NEVER?{useSoftSubtitles:!1}:n===y.a.ALWAYS?(b.a.warn("[MDE] Direct play failed; asked to always burn subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles:burnLevelAlways",canDirectStreamVideo:!1}):t.transcodeServer.supports("softSubtitles")?(b.a.warn("[MDE] Direct play failed; %s subtitles",i),Object(h.a)(i)?(b.a.warn("[MDE] Soft subtitles failed; bitmap subtitles"),{
useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):/^(ass|ssa)$/i.test(i)&&n===y.a.AUTO?(b.a.warn("[MDE] Soft subtitles failed; ASS subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):{useSoftSubtitles:!0,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles"}):(b.a.warn("[MDE] Direct play failed; server support requires burn subtitles"),
b.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 n=Object(p.a)(e.media);if(n.length){b.a.warn("[MDE] Unable to play; missing parts");var i=r.a.first(n)
;return 1===Number(i.exists)?Object(s.default)("Please check the permissions for this file."):Object(s.default)("Please check that the file exists and the necessary drive is mounted.")}},validateTranscoder:function(e,t){if(!e.canDirectPlay){var n,i=t.type,a=i===f.a.types.MUSIC,o=i===f.a.types.VIDEO,l=t.transcodeServer,c=l.get("transcoderAudio"),u=l.get("transcoderVideo");if(a||"track"===t.item.get("type")){if(n=Object(s.default)("This server is not powerful enough to convert audio."),
o&&!u)return b.a.warn("[MDE] Unable to play; server unable to transcode music using video transcoder"),n;if(a&&!c)return b.a.warn("[MDE] Unable to play; server unable to transcode music using audio transcoder"),n}else if(o){
var d=Object(s.default)("This server is not powerful enough to convert video. You may be able to enable playback by increasing your quality setting."),p=Object(s.default)("This server is not powerful enough to convert video. Playback qualities are limited because an indirect connection is being used."),h=e.canDirectStreamVideo||!l.get("transcoderVideoRemuxOnly");if(n=Object(s.default)("This server is not powerful enough to convert video."),!u||!h){
if(b.a.warn("[MDE] Unable to play; server unable to transcode video"),l.get("isCloudSyncServer"))switch(e.canDirectPlayFailedCheck){case"validateProfileProperty:maxLevel":return Object(s.default)("Synced media cannot be converted to a lower H.264 level.");case"validateProfileProperty:maxBitrate":return Object(s.default)("Synced media cannot be converted to a lower quality.");case"allowDirectPlay":default:return Object(s.default)("Converting is not supported for synced media.")}if(t.quality){
if(t.quality.index===v.a.ORIGINAL)return n;var g=r.a.clone(t);return g.quality=r.a.extend({index:v.a.ORIGINAL},r.a.pick(t.quality,"attribute")),this.getMediaDecision(g).canDirectPlay?d:"relay"===l.get("maxUploadBitrateReason")?p:n}return d}}}},getEffectiveQuality:function(e,t,n){var i=n.quality,r={},a={};if(e.bitrate||b.a.warn("[MDE] Unable to determine effective quality; re-analyze the media if possible"),n.type===f.a.types.VIDEO){r.bitrate=e.bitrate,
r.videoResolution=v.a.getHeightFromResolution(e.videoResolution);var o=this.getPrimaryStreamProperty(t,"maxBitrate",n);if(o){var s=Object(l.a)(e),c=s?s.bitrate:e.bitrate;r.bitrate=Math.min(c,o),a.maxVideoBitrate=o}if(i){if(i.videoResolution){var u=v.a.getResolutionFromSize(i.videoResolution),d=v.a.getHeightFromResolution(u);r.videoResolution=Math.min(r.videoResolution,d)}}}else if(n.type===f.a.types.MUSIC){r.bitrate=e.bitrate;var p=this.getPrimaryStreamProperty(t,"maxBitrate",n)
;p&&(r.bitrate=Math.min(e.bitrate,p),a.maxAudioBitrate=p)}return r.transcoderQualityOptions=a,r},getPrimaryStreamProperty:function(e,t,n){var i=f.a.getStreamByType(n.type),r=e[i],a=e[t];return null==a&&r&&(a=r[t]),a},getMediaTitle:function(e){var t=e.title||e.videoResolution||e.bitrate||e.container,n=r.a.compact([e.container,e.videoCodec,e.audioCodec]),i=Object(l.a)(e);return i&&n.push(i.level,i.profile),n.length&&(t+=" ("+n.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 a=e.useSoftSubtitles;null!=a&&t.push("useSoftSubtitles: "+a);var o=e.bitrate;null==o||r.a.isNaN(o)||t.push("bitrate: "+o);var s=e.videoResolution;return null==s||r.a.isNaN(s)||t.push("videoResolution: "+s),t},getBestDecision:function(e){var t=r.a.last(this.sortDecisions(e))
;return b.a.group("[MDE] Selected %s to play",this.getMediaTitle(t.media)),this.getDecisionLogs(t).forEach(function(e){return b.a.info(e)}),b.a.groupEnd(),t},sortDecisions:function(e){
return r.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.get("isPrivateConnection")?!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=I},function(e,t,n){"use strict";function i(e){
var t=o.a.get("subtitles").id,n=Object(s.a)(e,{streamType:t,selected:!0}),i=a.a.first(n);if(i&&i.id>0)return i}var r=n(5),a=n.n(r),o=n(129),s=n(243);t.a=i},function(e,t,n){"use strict";function i(e){var t=[];return Array.isArray(e)||(e=[e]),a.a.each(e,function(e){var n=e.Part;n&&a.a.each(n,function(e){!1!==e.exists&&!1!==e.accessible||t.push(e)})}),t}var r=n(5),a=n.n(r);t.a=i},function(e,t,n){"use strict";function i(e){return/^(pgs|vobsub)$/i.test(e)}t.a=i},function(e,t,n){"use strict"
;function i(e){return e>=2e3}function r(e){return i(e.transcodeDecisionCode)?e.transcodeDecisionText:i(e.generalDecisionCode)?e.generalDecisionText:i(e.mdeDecisionCode)?e.mdeDecisionText:e.errorMessage}t.a=r},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.get("isPreFetched"))return a.a.Deferred().resolve().promise();var n={includeConcerts:1,includeExtras:1,includeOnDeck:1,includePopularLeaves:1,includePreferences:1,
includeChapters:1};return e.get("type")===o.l&&(n.includeRelated=1),!t.forceSyncCheckFiles&&e.server.supports("asyncCheckFiles")?(n.asyncCheckFiles=1,n.asyncRefreshAnalysis=1,n.asyncRefreshLocalMediaAgent=1):n.checkFiles=1,e.fetch({data:n}).done(function(){e.set("isPreFetched",!0)})}t.a=i;var r=n(12),a=n.n(r),o=n(28)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=(n(59),
n(35)),m=n(940),y=n(284),b=n(1800),I=n(1803),S=n(1804),M=n(1807),D=n(1808),C=n(1809),O=n(1826),j=n(1829),P=n(1843),w=n(1850),T=n(1852),E=n(1857),x=n(1859),N=n(1865),A=n(667),L=n(1866),k=n.n(L),_=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onBufferChange=function(e){var t=(e.start,e.end);r.setState({bufferEndMilliseconds:t})},r.onFullscreenChange=function(e){r.setState({isFullscreen:e})},r.onEnterFullscreenPress=function(){r.setState({isFullscreen:!0})},
r.onExitFullscreenPress=function(){r.setState({isFullscreen:!1})},r.onToggleFullscreenShortcut=function(){r.setState(function(e){return{isFullscreen:!e.isFullscreen}})},r.onAdPositionMillisecondsChange=function(e){r.setState({adPositionMilliseconds:e})},r.onAdDurationMillisecondsChange=function(e){r.setState({adDurationMilliseconds:e})},r.onAdResponse=function(){r.setState({isAdLoaded:!0})},r.onAdSkipDelayChange=function(e){r.setState({adSkipDelaySeconds:e})},r.onAdSkipPress=function(){
r.setState({isAdSkipped:!0})},r.onAdEnd=function(){r.setState({isAdVisible:!1,isAdLoaded:!1,isAdSkipped:!1,adSkipDelaySeconds:null,adPositionMilliseconds:0,adDurationMilliseconds:null})},r.state={seekStartMilliseconds:0,seekEndMilliseconds:0,bufferStartMilliseconds:0,bufferEndMilliseconds:0,adPositionMilliseconds:0,adDurationMilliseconds:null,isAdVisible:!!n.vast,isAdLoaded:!1,isAdSkipped:!1,adSkipDelaySeconds:null,isFullscreen:!1},r}return p()(t,e),t.prototype.componentDidMount=function(){
Object(N.a)(this.props.showBackgroundVideoPlayer)},t.prototype.componentWillReceiveProps=function(e){this.props.vast!==e.vast&&this.setState({isAdVisible:!!e.vast,isAdSkipped:!1,isAdLoaded:!1,adSkipDelaySeconds:null,adPositionMilliseconds:0,adDurationMilliseconds:null})},t.prototype.componentDidUpdate=function(e,t){e.showBackgroundVideoPlayer!==this.props.showBackgroundVideoPlayer&&Object(N.a)(this.props.showBackgroundVideoPlayer)},t.prototype.componentWillUnmount=function(){Object(N.a)(!1)},
t.prototype.render=function(){
var e=this.props,t=e.playerType,n=e.mediaStyle,i=e.playbackWidth,a=e.playbackHeight,s=e.isOpen,l=e.isMiniPlayer,c=e.isRemotePlayer,u=e.isPlayQueueLoading,d=e.isPostPlayVisible,p=e.hasError,h=e.hasConflicts,f=e.confirmLiveTVPlayback,N=e.showBackgroundVideoPlayer,L=e.currentMediaType,_=e.confirmPlaybackPayload,R=e.confirmOffsetPayload,z=e.confirmRemoteToLocal,U=e.confirmLocalToRemote,B=e.vast,V=e.mediaComponent,F=e.playerComponent,Q=this.state,H=Q.seekStartMilliseconds,Y=Q.seekEndMilliseconds,W=Q.bufferStartMilliseconds,G=Q.bufferEndMilliseconds,K=Q.adSkipDelaySeconds,q=Q.adPositionMilliseconds,Z=Q.adDurationMilliseconds,X=Q.isFullscreen,J=Q.isAdVisible,$=Q.isAdLoaded,ee=Q.isAdSkipped
;return s?o()(m.a,{},void 0,o()(y.a,{page:g.L},void 0,o()(M.a,{className:((l?k.a.miniPlayerContainer:k.a.fullPlayerContainer)||"")+" "+(!N&&!l&&k.a.fullPlayerContainerBackground||""||""),isFullscreen:X,onFullscreenChange:this.onFullscreenChange},void 0,_&&o()(E.a,{isOpen:!0,playerType:t,confirmPlaybackPayload:_}),R&&o()(x.a,{isOpen:!0,playerType:t,confirmOffsetPayload:R}),z&&o()(P.a,{isOpen:!0,playerType:t}),U&&o()(w.a,{isOpen:!0,playerType:t}),p&&o()(O.a,{isOpen:!0,isRemotePlayer:c,mediaType:L,
playerType:t}),h&&o()(j.a,{isOpen:!0,isPlayerOpen:s,playerType:t}),!J&&!d&&!u&&!c&&!z&&o()("div",{style:n},void 0,o()(V,{playerType:t,mediaType:L,maxWidth:i,maxHeight:a,onBufferChange:this.onBufferChange})),J&&o()("div",{style:n},void 0,o()(A.a,{playerType:t,isMiniPlayer:l,isFullscreen:X,isSkipped:ee,component:S.a,positionSeconds:Math.floor(q/1e3),url:B.url,urlTemplateFilters:B.UrlTemplateFilter,onPositionMillisecondsChange:this.onAdPositionMillisecondsChange,
onDurationMillisecondsChange:this.onAdDurationMillisecondsChange,onResponse:this.onAdResponse,onSkipDelayChange:this.onAdSkipDelayChange,onEnd:this.onAdEnd})),v.a.createElement(F,r()({width:i,height:a,isFullscreen:X,isAdVisible:J&&$,seekStartMilliseconds:H,seekEndMilliseconds:Y,bufferStartMilliseconds:W,bufferEndMilliseconds:G,adPositionMilliseconds:q,adDurationMilliseconds:Z,adSkipDelaySeconds:K,onEnterFullscreenPress:this.onEnterFullscreenPress,onExitFullscreenPress:this.onExitFullscreenPress,
onAdSkipPress:this.onAdSkipPress},this.props)),o()(C.a,{playerType:t,onToggleFullscreenShortcut:this.onToggleFullscreenShortcut}),o()(D.a,{playerType:t}),o()(b.a,{playerType:t,isRemotePlayer:c}),o()(I.a,{playerType:t})))):p?o()(O.a,{isOpen:!0,isRemotePlayer:c,mediaType:L,playerType:t}):h?o()(j.a,{isOpen:!0,isPlayerOpen:s,playerType:t}):f?o()(T.a,{isOpen:!0,isPlayerOpen:s,playerType:t}):null},t}(f.Component);_.defaultProps={confirmLiveTVPlayback:!1},t.a=_},function(e,t,n){"use strict"
;function i(e){if(null!=e){var t=Math.round(e/1e3),n=void 0;return n=t>=3600?300:60,Object(r.a)(t,n)}}t.a=i;var r=n(957)},function(e,t,n){"use strict";function i(e,t){var n=e/t;return n=Math.round(n),n*=t}t.a=i},function(e,t,n){"use strict";function i(e){return e.isCloud?"online":e.isShared?"shared":"owned"}t.a=i},function(e,t,n){"use strict";function i(e){if(e)return e.relay?"relayed":e.isLoopback?"localhost":e.isPrivate?"local":"remote"}t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.mimeType,n=e.codecs,i=o()(e,["mimeType","codecs"]);if(!t)return"";var r=[t];if(n&&r.push('codecs="'+n+'"'),i)for(var a in i)r.push(a+'="'+i[a]+'"');return r.join("; ")}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments[1],i(e)),n=Object(s.a)("video",!0),r=n.canPlayType(t);return Object(s.b)(n),e.codecs?"probably"===r:"probably"===r||"maybe"===r}t.a=r;var a=n(13),o=n.n(a),s=n(633)},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 r}),n.d(t,"TOP_RIGHT",function(){return a}),n.d(t,"BOTTOM_LEFT",function(){return o}),n.d(t,"BOTTOM_CENTER",function(){return s}),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",r="topCenter",a="topRight",o="bottomLeft",s="bottomCenter",l="bottomRight",c="middleLeft",u="middleRight",d=[i,r,a,o,s,l,c,u]},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.loadingLabel,r=e.spinnerSize,o=e.isDisabled,l=e.isSpinning,u=c()(e,["children","className","loadingLabel","spinnerSize","isDisabled","isSpinning"]);return p.a.createElement(v.a,a()({className:(n||"")+" "+(m.a.button||"")+" "+(l&&m.a.isSpinning||""||""),isDisabled:o||l
},u),s()("span",{className:m.a.spinnerContainer},void 0,s()(f.a,{className:m.a.spinner,loadingLabel:i,size:r})),s()("span",{className:m.a.label},void 0,t))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(61),f=n(494),v=n(47),g=n(1814),m=n.n(g);i.defaultProps={isDisabled:!1,isSpinning:!1,spinnerSize:h.SMALL},t.a=i},function(e,t,n){(function(i){var r,a,o,s=void 0!==e&&e.exports&&void 0!==i?i:this||window;(s._gsQueue||(s._gsQueue=[])).push(function(){
"use strict";s._gsDefine("easing.Back",["easing.Ease"],function(e){var t,n,i,r=s.GreenSockGlobals||s,a=r.com.greensock,o=2*Math.PI,l=Math.PI/2,c=a._class,u=function(t,n){var i=c("easing."+t,function(){},!0),r=i.prototype=new e;return r.constructor=i,r.getRatio=n,i},d=e.register||function(){},p=function(e,t,n,i,r){var a=c("easing."+e,{easeOut:new t,easeIn:new n,easeInOut:new i},!0);return d(a,e),a},h=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),r=i.prototype=new e;return r.constructor=i,r.getRatio=n,r.config=function(e){return new i(e)},i},v=p("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)
})),g=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=!0===n},!0),m=g.prototype=new e;return m.constructor=g,m.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},g.ease=new g(.7,.7),
m.config=g.config=function(e,t,n){return new g(e,t,n)},t=c("easing.SteppedEase",function(e,t){e=e||1,this._p1=1/e,this._p2=e+(t?0:1),this._p3=t?1:0},!0),m=t.prototype=new e,m.constructor=t,m.getRatio=function(e){return e<0?e=0:e>=1&&(e=.999999999),((this._p2*e|0)+this._p3)*this._p1},m.config=t.config=function(e,n){return new t(e,n)},n=c("easing.RoughEase",function(t){t=t||{}
;for(var n,i,r,a,o,s,l=t.taper||"none",c=[],u=0,d=0|(t.points||20),p=d,f=!1!==t.randomize,v=!0===t.clamp,g=t.template instanceof e?t.template:null,m="number"==typeof t.strength?.4*t.strength:.4;--p>-1;)n=f?Math.random():1/d*p,i=g?g.getRatio(n):n,"none"===l?r=m:"out"===l?(a=1-n,r=a*a*m):"in"===l?r=n*n*m:n<.5?(a=2*n,r=a*a*.5*m):(a=2*(1-n),r=a*a*.5*m),f?i+=Math.random()*r-.5*r:p%2?i+=.5*r:i-=.5*r,v&&(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}),s=new h(1,1,null),
p=d;--p>-1;)o=c[p],s=new h(o.x,o.y,s);this._prev=new h(0,0,0!==s.t?s:s.next)},!0),m=n.prototype=new e,m.constructor=n,m.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},m.config=function(e){return new n(e)},n.ease=new n,p("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})),p("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 r=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),a=r.prototype=new e;return a.constructor=r,a.getRatio=n,a.config=function(e,t){return new r(e,t)},r},p("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?this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2)*-.5:this._p1*Math.pow(2,-10*(e-=1))*Math.sin((e-this._p3)*this._p2)*.5+1},.45)),p("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)))})),p("Sine",u("SineOut",function(e){return Math.sin(e*l)}),u("SineIn",function(e){return 1-Math.cos(e*l)
}),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,"),v},!0)}),s._gsDefine&&s._gsQueue.pop()(),function(){"use strict";var i=function(){return s.GreenSockGlobals||s};void 0!==e&&e.exports?(n(495),e.exports=i()):(a=[n(495)],r=i,void 0!==(o="function"==typeof r?r.apply(t,a):r)&&(e.exports=o))}()}).call(t,n(191))},function(e,t,n){"use strict"
;var i=n(94),r=n(43),a=n(40),o=n(16),s=n(51),l=n(18),c=n(325),u=n(672),d=l.a.extend({name:"LiveTVSessionModel",context:["server","provider"],entityType:r.d,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(a.a)(this.entityType,e.key||this.cid,this.server.entityID())},idAttribute:"key",rootPropertyName:"MediaSubscription",sessionAttrs:{dvrID:o.a.integer,channelIdentifier:o.a.string,activityUUID:o.a.string,currentPosition:o.a.integer,
lastSeekPosition:o.a.integer,startedAt:o.a.integer,captureBuffer:o.a.object},syncedAttrs:{key:o.a.string,type:o.a.integer,title:o.a.string},syncedRelations:{grabOperation:{relationClass:u.a,rootPropertyName:"MediaGrabOperation",deferred:!0},timeline:{relationClass:c.a,rootPropertyName:"Timeline",deferred:!0},alsoAiring:{relationClass:c.a,rootPropertyName:"AlsoAiring",deferred:!0}},defaults:{lastSeekPosition:null},augmentResponseText:function(e,t){return t===s.a.xml?Object(i.b)(e):e},
augmentResponse:function(e){var t=e[this.rootPropertyName]||e,n=t.Timeline,i=t.AlsoAiring;return n&&(t.Timeline=n.Metadata),i&&(t.AlsoAiring=i.Metadata),e}});t.a=d},function(e,t,n){"use strict";function i(e){var t=e.children,n=s()(e,["children"]);return u.a.createElement(p.a,n,a()(d.a,{className:f.a.modalScroller,innerClassName:f.a.innerModalBody},void 0,t))}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(74),p=n(103),h=n(1837),f=n.n(h);t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.children,n=e.className,i=e.controlsClassName;return e.isPlayQueueLoading?a()("div",{className:n},void 0,d):a()("div",{className:n},void 0,a()("div",{className:i},void 0,t))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(39)),c=n(1868),u=n.n(c),d=a()(l.a,{});i.defaultProps={className:u.a.miniPlayer,controlsClassName:u.a.controls},t.a=i},function(e,t,n){"use strict";function i(){return"ie"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a).id}
t.a=i;var r=n(38)},function(e,t,n){"use strict";function i(e,t){if(e.indexes){var n=e.indexes.split(",");if(n.length)return a.a.indexOf(n,t)>-1?t:n[0]}}var r=n(5),a=n.n(r);t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(s.a)(),Object(l.a)(),function(e,t){if(!t)return{};var n=e.serverEntityID,i=e.providerEntityID,r=e.isPaused,a=e.playQueue,o=a.playQueueItems,s=a.currentIndex;return{serverEntityID:n,providerEntityID:i,playQueueItemEntityID:t.entityID,
metadataItemEntityID:t.metadataItem,isPaused:r,disablePreviousButton:s<=0,disableNextButton:s>=o.length-1}})}function r(e,t){var n=t.playerType;return{onExpandPress:function(){e(p.b({playerType:n}))},onPreviousPress:function(){e(d.i({playerType:n}))},onPlayPausePress:function(){e(u.t({playerType:n}))},onNextPress:function(){e(d.h({playerType:n}))},onClosePress:function(){e(c.f({playerType:n}))}}}var a=n(11),o=n(6),s=(n.n(o),n(44)),l=n(119),c=n(60),u=n(131),d=n(118),p=n(497),h=n(1876)
;t.a=Object(a.b)(i,r)(h.a)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{metadataActionProps:e}})}var r=n(11),a=n(6),o=(n.n(a),n(971)),s=n(1880);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(function(e,t){return t.listType},Object(r.a)(),l.a,s.a,a.a,function(e,t,n,i,r){var a=t.type,s=a===o.d?a:e;return Object(u.p)(n,i,r,t,s)})}t.a=i
;var r=n(21),a=n(144),o=n(28),s=n(37),l=n(48),c=n(6),u=(n.n(c),n(201))},function(e,t,n){"use strict";function i(e,t,n,i){if(!(e&&t&&n&&i))return!1;var o=i.type,s=i.hasInvalidKey,l=i.deletedAt,c=i.isFolder,u=i.isMetadataList,d=i.firstItemType,p=i.onAir,h=s||l||c;if(!u&&h)return!1;if(!t.protocols.stream&&!p)return!1;if(t.features.playqueue)return!0;if(u&&!d)return!1;var f=!!n[r.e];if(t.protocols.livetv&&(e.livetv<4||!f))return!1;var v=u?d:o,g=Object(a.q)(v),m=Object(a.p)(v)
;return v===g.typeString||m.id===g.id}t.a=i;var r=n(52),a=n(28)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(84),v=n.n(f),g=n(1882),m=n(29),y=n(670),b=function(e){function t(n,i){o()(this,t);var a=l()(this,e.call(this,n,i));return a.onPortalRef=function(e){if(!e)return void a._destroy();var t=a.props,n=t.options,i=t.onPortalRef,o=t.target,s=document.getElementById(o)||document.getElementsByName(o)[0]
;a._popper=new g.a(s,v.a.findDOMNode(e).parentNode,r()({},n,{onUpdate:a.onPopperUpdate})),a._popper.scheduleUpdate(),i&&i(e)},a.onPopperUpdate=function(e){var t=a.props.onReposition;if(t){t(e.placement.split("-")[0])}},a._popper=null,a}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(m.a)(this,e,t)},t.prototype.componentDidUpdate=function(){this._popper&&this._popper.scheduleUpdate()},t.prototype._destroy=function(){this._popper&&(this._popper.destroy(),
this._popper=null)},t.prototype.render=function(){return h.a.createElement(y.a,r()({},this.props,{onPortalRef:this.onPortalRef}))},t}(p.Component);b.defaultProps={options:{placement:"bottom-start"}},t.a=b},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.played,i=t.providerEntityID,o=t.serverEntityID,s=t.metadataItemEntityID,l=Object(f.h)(e,t);if(null==l){return c.a.Deferred().reject({
errorMessage:"Could not find providerModel with provided `providerEntityID`"}).promise()}var u=Object(f.j)(e,t);if(null==u){return c.a.Deferred().reject({errorMessage:"Could not find serverModel with provided `serverEntityID`"}).promise()}var p=Object(f.l)(e,{metadataItemEntityID:s});if(null==p){return c.a.Deferred().reject({errorMessage:"Could not find metadataModel with provided `metadataItemEntityID`"}).promise()}
var h=l.get("features").get(v.b.ACTIONS).get("actions").get(g.b.SCROBBLE),m=n?h.get("key"):h.get("reverseKey"),y={identifier:p.get("identifier")||"com.plexapp.plugins.library"};u.get("isCloudSyncServer")?(y.key=p.get("key"),y.ratingKey=p.get("ratingKey")):y.key=p.get("ratingKey");var b=d.join(m,y),I=c.a.ajax(l.getXHROptions(b));return I.then(function(){var t={providerEntityID:i,serverEntityID:o,metadataItemEntityID:p.entityID()};a(e,t,n),r(e,t,n)}),I}function r(e,t,n){var i=Object(f.l)(e,t)
;if(i)if(Object(u.u)(i.get("type"))){i.set({viewedLeafCount:n?i.get("leafCount"):0});var a=Object(h.a)(p.h,i.get("childrenKey"),t.serverEntityID),o=Object(f.m)(e,{metadataListEntityID:a});o&&o.get("metadataItems").forEach(function(i){var a=s()({},t,{metadataItemEntityID:i.entityID()});r(e,a,n)})}else i.set({viewOffset:0,viewCount:n?1:0})}function a(e,t,n,i){var r=Object(f.l)(e,t);if(r){var o=Object(u.r)(r.get("type")),l=Object(h.a)(p.g,r.get("parentKey"),t.serverEntityID),c=Object(f.l)(e,{
metadataItemEntityID:l}),d=void 0;if(c&&(d=Object(u.r)(c.get("type"))),d&&d.typeString===o.parent){var v=void 0,g=Object(u.u)(r.get("type"));n?v=g?r.get("unviewedLeafCount"):1:(v=g?r.get("viewedLeafCount"):1,v*=-1);var m=null!=i?i:v;c.set({viewedLeafCount:c.get("viewedLeafCount")+m});a(e,s()({},t,{metadataItemEntityID:l}),n,m)}}}t.a=i;var o=n(7),s=n.n(o),l=n(12),c=n.n(l),u=(n(33),n(28)),d=n(19),p=n(43),h=n(40),f=n(78),v=n(76),g=n(324)},function(e,t,n){"use strict";function i(e,t,n){
var i=n.rating,r=n.allowMetrics,o=n.metricsProperties,p=void 0===o?{}:o,h=t.server,f=e.get("features").get(d.b.RATE);if(!f)return s.a.Deferred().reject().promise();var v={key:t.get("ratingKey"),identifier:t.get("identifier"),rating:i},g=c.join(f.get("key"),v),m=h.getXHROptions(g),y=t.get("userRating"),b=-1===i?void 0:i;t.set("userRating",b);var I=s.a.ajax(m).fail(function(e){t.get("userRating")===b&&t.set("userRating",y)});return r&&Object(l.d)("metrics").trackClick(a()({},p,{action:u.N,
type:t.get("type"),rating:i})),I.promise()}t.a=i;var r=n(7),a=n.n(r),o=n(12),s=n.n(o),l=n(15),c=n(19),u=n(73),d=n(76)},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.allowMetrics,i=t.metricsProperties,r=void 0===i?{}:i,o=e.server,d="/library/metadata/"+e.get("ratingKey")+"/refresh",p=o.getXHROptions(d,{type:"PUT"}),h=e.get("metadataState"),f=c.d;e.set("metadataState",f);var v=s.a.ajax(p).fail(function(t){
e.get("metadataState")===f&&e.set("metadataState",h)});return n&&Object(l.d)("metrics").trackClick(a()({},r,{action:u.P,type:e.get("type")})),v.promise()}t.a=i;var r=n(7),a=n.n(r),o=n(12),s=n.n(o),l=n(15),c=n(977),u=n(73)},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return a}),n.d(t,"a",function(){return o});var i="queued",r="matching",a="processing",o="loading"},function(e,t,n){"use strict";function i(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.allowMetrics,i=t.metricsProperties,r=void 0===i?{}:i,o=e.server,p="/library/metadata/"+e.get("ratingKey")+"/analyze",h=o.getXHROptions(p,{type:"PUT"}),f=e.get("mediaState"),v=c.a,g=Object(d.u)(e.get("type"));g||e.set("mediaState",v);var m=s.a.ajax(h).fail(function(t){g||e.get("mediaState")!==v||e.set("mediaState",f)});return n&&Object(l.d)("metrics").trackClick(a()({},r,{action:u.d,type:e.get("type")})),m.promise()}t.a=i
;var r=n(7),a=n.n(r),o=n(12),s=n.n(o),l=n(15),c=n(1888),u=n(73),d=n(28)},function(e,t,n){"use strict";var i=n(19),r=n(332),a=n(333),o=n(477),s=a.a.extend({background:!0,setup:function(e){this.model=e.model,e.noPlaceholder||(this.placeholderClass=o.a.playlist);var t=Object(r.a)(),n={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},a=this.model.get("composite")
;a&&(this.url=this.model.server.resolveUrl(i.join(a,n),{appendToken:!0}))}});t.a=s},function(e,t,n){"use strict";var i=n(981),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(41),u=n.n(c),d=n(15),p=n(4),h=n(17),f=n(19),v=n(328),g=n(32),m=n(139),y=n(1893),b=n(983),I=n(985),S=n(1921),M=n(1923),D=n(1930),C=n(1934),O=n(70),j=n(49),P=n(425),w={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","tags","info","advanced"],clip:["general","info","advanced"],collection:["general","sharing","poster","art","info","advanced"]
},T=["poster","art","banner","info","advanced"],E=O.a.extend({mixins:[P.a],name:"editMetadataModal",className:"edit-metadata-modal modal modal-lg fade",template:r.a,panes:{general:{constructor:b.a},tags:{constructor:I.a},poster:{constructor:M.a},art:{constructor:M.a},banner:{constructor:M.a},sharing:{constructor:S.a},info:{constructor:D.a},advanced:{constructor:C.a}},events:o.a.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit",
"submit .edit-metadata-form":"onFormSubmit"},O.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){O.a.prototype.initialize.apply(this,arguments);var t=e.items||[this.model],n=t[0],i=n.fetch({usePopulatedParams:!0,data:{includePreferences:"1"}});this.model=new y.a({},{server:n.server,
metadataItems:t}),i=i.then(o.a.bind(function(){return this.model.setContext("section",Object(v.a)(n)),this.model.populate()},this)),i.done(o.a.bind(function(){this.model.set("originalSaveParams",this.model.getSaveParams()),this.render(),this.showNav(),this.showPane(e.selectedPane||"general"),this.listenTo(h.a,"shortcut:save",this.saveChanges)},this)),i.fail(o.a.bind(function(){this.ui.message.text(Object(p.default)("There was an error editing this item")),
this.ui.loadingIndicator.addClass("hidden")},this))},serializeData:function(){var e=this.model.get("type"),t=w[e]||w.movie;this.model.get("isSingleMetadataItem")||(t=o.a.difference(t,T)),this.model.getSingleMetadataItem().has("preferences")||(t=o.a.difference(t,["advanced"])),"photo"!==e||this.model.server.supports("photoTagEdit")||(t=o.a.difference(t,["tags"]));var n=o.a.reduce(t,function(e,t){return e[t]=!0,e},{}),i=Object(p.default)("Edit {1}",this.model.get("aggregateTitle"),{escape:!0})
;return{item:this.model.toJSON(),panes:n,selectedPane:this.selectedPane,paneTitle:i}},paneConstructorArg:function(){return{type:this.selectedPane}},invalidChangedAttrs:function(e){var t=[],n=this.model.get("type");if("track"===n){var i=o.a.has(e,"artist.id.value")||o.a.has(e,"artist.title.value")||o.a.has(e,"album.id.value")||o.a.has(e,"album.title.value"),r=e["album.id.value"]||e["album.title.value"],a=e["artist.id.value"]||e["artist.title.value"];!i||a&&r||(a||t.push("grandparentTitle"),
r||t.push("parentTitle"))}else if("album"===n&&!this.model.get("isSingleMetadataItem")){var s=this.model.get("mixedFields"),l=o.a.has(e,"artist.title.value")||o.a.has(e,"artist.id.value"),c=o.a.includes(s,"ratingKey"),d=o.a.has(e,"title.value");c&&d&&!l&&t.push("parentTitle")}if(o.a.has(e,"originallyAvailableAt.value")){var p=e["originallyAvailableAt.value"];if(/^\d{4}$/.test(p)&&(e["originallyAvailableAt.value"]+="-01-01",p=e["originallyAvailableAt.value"]),""!==p){
var h=u()(p,"YYYY-MM-DD",!0).isValid(),f=u()(p,"YYYY-MM-DD HH:mm:ss",!0).isValid();h||f||t.push("originallyAvailableAt")}else this.model.set("originallyAvailableAt",p)}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 n=[],i=this.model.getSaveParams(),r=this.invalidChangedAttrs(i);if(r.length)return void this.markInvalid(r);e.addClass("active");var a=this.showAdvancedConfirmModal({saving:!0});a.done(o.a.bind(function(){o.a.each(["poster","banner","art"],function(e){var t=this.model.get(e);t&&n.push(g.a.execute("changeArtwork",{item:this.model.getSingleMetadataItem(),artworkType:e,artworkRatingKey:t}))},this),n.push(this.savePreferences()),n.push(this.model.save());var i=l.a.when.apply(l.a,n)
;i.done(o.a.bind(function(){var e=d.d("appStore").dispatch,t=this.model.server.entityID();t&&e(m.b({serverEntityID:t})),this.hide()},this)),i.fail(function(){t.text(Object(p.default)("Your changes could not be saved."))}),i.always(function(){e.removeClass("active")})},this)),a.fail(o.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=f.join(["/library/metadata",t.get("ratingKey"),"prefs"],e.getSaveParams()),i=this.model.server.getXHROptions(n,{type:"PUT"}),r=l.a.ajax(i);return r.done(function(){var n=t.get("preferences");e.forEach(function(e){n.get(e.id).set("value",e.get("value"))})}),r},showAdvancedConfirmModal:function(){if(!this.model.get("preferences").some(function(e){return/^autoDeletion/.test(e.id)}))return l.a.Deferred().resolve().promise();var e=new j.a({
title:Object(p.default)("Confirm Deletion Settings"),message:Object(p.default)("Deletion settings will take effect immediately! Files may be deleted and this can't be undone. Are you sure?"),confirmLabel:Object(p.default)("Yes"),cancelLabel:Object(p.default)("Cancel"),requireDoubleConfirm:!0,doubleConfirmMessage:Object(p.default)("Multiple files may be deleted."),doubleConfirmLabel:Object(p.default)("Yes, I'm sure"),hasDanger:!0});return h.a.trigger("show:modal",e),e.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=E},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r=""
;return r+=' <li><a class="btn-gray change-pane-btn general-btn" data-pane="general" href="#"> <i class="modal-nav-icon glyphicon align-center"></i> '+m(i(n(3)).call(e,"General",{hash:{},data:t}))+" </a></li> "}function l(e,t){var r="";return r+=' <li><a class="btn-gray change-pane-btn tags-btn" data-pane="tags" href="#"> <i class="modal-nav-icon glyphicon tags"></i> '+m(i(n(3)).call(e,"Tags",{hash:{},data:t}))+" </a></li> "}function c(e,t){var r=""
;return r+=' <li><a class="btn-gray change-pane-btn sharing-btn" data-pane="sharing" href="#"> <i class="modal-nav-icon glyphicon parents"></i> '+m(i(n(3)).call(e,"Sharing",{hash:{},data:t}))+" </a></li> "}function u(e,t){var r="";return r+=' <li><a class="btn-gray change-pane-btn poster-btn" data-pane="poster" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+m(i(n(3)).call(e,"Poster",{hash:{},data:t}))+" </a></li> "}function d(e,t){var r=""
;return r+=' <li><a class="btn-gray change-pane-btn banner-btn" data-pane="banner" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+m(i(n(3)).call(e,"Banner",{hash:{},data:t}))+" </a></li> "}function p(e,t){var r="";return r+=' <li><a class="btn-gray change-pane-btn art-btn" data-pane="art" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+m(i(n(3)).call(e,"Background",{hash:{},data:t}))+" </a></li> "}function h(e,t){var r=""
;return r+=' <li><a class="btn-gray change-pane-btn info-btn" data-pane="info" href="#"> <i class="modal-nav-icon glyphicon circle-info"></i> '+m(i(n(3)).call(e,"Info",{hash:{},data:t}))+" </a></li> "}function f(e,t){var r="";return r+=' <li><a class="btn-gray change-pane-btn advanced-btn" data-pane="advanced" href="#"> <i class="modal-nav-icon glyphicon cogwheel"></i> '+m(i(n(3)).call(e,"Advanced",{hash:{},data:t}))+" </a></li> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),
o=o||{};var v,g="",m=this.escapeExpression,y=this;return g+='<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> '+m((v=t&&t.paneTitle,
"function"==typeof v?v.apply(t):v))+'</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"> ',v=r.if.call(t,(v=t&&t.panes,null==v||!1===v?v:v.general),{hash:{},inverse:y.noop,fn:y.program(1,s,o),data:o}),(v||0===v)&&(g+=v),g+=" ",v=r.if.call(t,(v=t&&t.panes,null==v||!1===v?v:v.tags),{hash:{},inverse:y.noop,fn:y.program(3,l,o),data:o}),(v||0===v)&&(g+=v),g+=" ",v=r.if.call(t,(v=t&&t.panes,
null==v||!1===v?v:v.sharing),{hash:{},inverse:y.noop,fn:y.program(5,c,o),data:o}),(v||0===v)&&(g+=v),g+=" ",v=r.if.call(t,(v=t&&t.panes,null==v||!1===v?v:v.poster),{hash:{},inverse:y.noop,fn:y.program(7,u,o),data:o}),(v||0===v)&&(g+=v),g+=" ",v=r.if.call(t,(v=t&&t.panes,null==v||!1===v?v:v.banner),{hash:{},inverse:y.noop,fn:y.program(9,d,o),data:o}),(v||0===v)&&(g+=v),g+=" ",v=r.if.call(t,(v=t&&t.panes,null==v||!1===v?v:v.art),{hash:{},inverse:y.noop,fn:y.program(11,p,o),data:o}),
(v||0===v)&&(g+=v),g+=" ",v=r.if.call(t,(v=t&&t.panes,null==v||!1===v?v:v.info),{hash:{},inverse:y.noop,fn:y.program(13,h,o),data:o}),(v||0===v)&&(g+=v),g+=" ",v=r.if.call(t,(v=t&&t.panes,null==v||!1===v?v:v.advanced),{hash:{},inverse:y.noop,fn:y.program(15,f,o),data:o}),(v||0===v)&&(g+=v),
g+=' </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">'+m(i(n(3)).call(t,"Cancel",{hash:{},data:o}))+'</button> <button type="button" class="save-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+m(i(n(3)).call(t,"Save Changes",{
hash:{},data:o}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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,context:i.a.string}});t.a=a},function(e,t,n){"use strict";function i(e){
return P.a.reduce(e,function(e,t){return e[t]=!0,e},{})}var r=n(1897),a=n.n(r),o=n(1898),s=n.n(o),l=n(1899),c=n.n(l),u=n(1900),d=n.n(u),p=n(1901),h=n.n(p),f=n(1902),v=n.n(f),g=n(1903),m=n.n(g),y=n(1904),b=n.n(y),I=n(1905),S=n.n(I),M=n(1906),D=n.n(M),C=n(1907),O=n.n(C),j=n(5),P=n.n(j),w=n(12),T=n.n(w),E=n(4),x=n(28),N=n(685),A=n(1908),L=n(686),k={movie:d.a,show:b.a,season:m.a,episode:c.a,artist:s.a,album:a.a,track:S.a,photoalbum:h.a,photo:v.a,playlist:D.a,collection:O.a},_=N.a.extend({regions:{
ratingRegion:".rating-region"},ui:P.a.extend({selectizeInputs:".selectize input[type=text]"},N.a.prototype.ui),initialize:function(e){var t=this.model.get("type");this.template=k[t]||k.movie;var n=Object(x.r)(t);this.canSelectize=this.model.server.supports("batchEdit")&&n,this.canReparent=this.model.server.supports("batchEdit")},serializeData:function(){var e=N.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(P.a.pluck(t,"name")),r=i(P.a.pluck(e.find("[type=number]"),"name")),a=P()(e.serializeArray()).reject(function(e){return n[e.name]},this),o=P.a.reduce(a,function(e,t){if(r[t.name]){var n=t.value.trim();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);P.a.each(t,function(e){
var t=T()(e),n=t.data("updateAttr"),i=t.data("altUpdateAttr"),r=t.data("isText"),a=e.selectize.getValue();if(i)if(r)o[n]=a,o[i]=null;else{var s=e.selectize.options[a];if(s){var l=s[t.data("autocompleteAttr")];o[n]=l,o[i]=a}}else o[n]=a});var s=this.model.get("lockedFields");s&&s.set(this.getLockedFieldsArray(),{parse:!0}),this.model.set(o)},markInvalid:function(e){this.$(".form-group").removeClass("has-error"),P()(e).each(function(e){var t=this.$('.form-group[data-attr="'+e+'"]')
;t.addClass("has-error"),t.find(".control-error").text(Object(E.default)("Required"))},this)},onRender:function(){if(this.$(".rating-region").length>0&&this.ratingRegion.show(new L.a({model:this.model,passive:!0})),this.canSelectize){var e=this;this.ui.selectizeInputs.each(function(t,n){Object(A.a)(e,n)})}}});t.a=_},function(e,t,n){"use strict";function i(e,t,n){var i=/!$/.test(n),r=/\.id$/.test(n);if(i||r)return e[n]=t,e;var a=n.match(/^(.+)\.(.+)/);return a&&(e.type=Object(l.r)(a[1]).id,
n=a[2]),e[n+".query"]=t,e}var r=n(5),a=n.n(r),o=n(94),s=n(19),l=n(28),c=n(51),u=n(23),d=n(1909),p=u.a.extend({name:"MetadataAutocompleteResultCollection",context:["server","section","multiMetadataItem","query"],model:d.a,url:function(){var e={type:Object(l.r)(this.multiMetadataItem.get("type")).id,limit:10};return e=a.a.reduce(this.query,i,e),s.join([this.multiMetadataItem.sectionUrl(),"autocomplete"],e)},augmentResponseText:function(e,t){return t===c.a.xml?Object(o.b)(e):e}});t.a=p
},function(e,t,n){"use strict";var i=n(1913),r=n.n(i),a=n(1914),o=n.n(a),s=n(1915),l=n.n(s),c=n(1916),u=n.n(c),d=n(1917),p=n.n(d),h=n(1918),f=n.n(h),v=n(1919),g=n.n(v),m=n(5),y=n.n(m),b=n(12),I=n.n(b),S=n(397),M=n(685),D=n(1920),C=n(986),O=(n.n(C),M.a.extend({templatesByType:{movie:r.a,show:o.a,episode:l.a,artist:u.a,album:p.a,track:f.a,photo:g.a},ui:y.a.extend({tagInputs:".tag-input-hidden"},M.a.prototype.ui),events:y.a.extend({"change .lockable-field":"onLockableFieldChange"
},M.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 S.a({key:t},{server:this.model.server})}this.section=e},flushChanges:function(){
var e=this.ui.form,t=y.a.reduce(e.serializeArray(),function(e,t){return e[t.name]=t.value,e},{}),n=y.a.reduce(this.ui.tagInputs,function(e,t){var n=t.selectize,i=I()(t).data("name");return e[I()(t).data("attr")]=y.a.map(n.items,function(e){var t=n.options[e];return{tag:t.tag,id:t.id}}),this.model["original.tag."+i]=y.a.toArray(n.options),e},{},this);y.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,n){Object(D.a)(e,n)})}}));t.a=O},function(e,t,n){(function(i){var r,a,o,s,l,c,u,d,p;!function(e,t){a=t,o={id:"sifter",exports:{},loaded:!1},r="function"==typeof a?a.call(o.exports,n,o.exports,o):a,o.loaded=!0,void 0===r&&(r=o.exports)}(0,function(){var e=function(e,t){this.items=e,this.settings=t||{diacritics:!0}};e.prototype.tokenize=function(e){if(!(e=r(String(e||"").toLowerCase()))||!e.length)return[]
;var t,n,i,o,l=[],c=e.split(/ +/);for(t=0,n=c.length;t<n;t++){if(i=a(c[t]),this.settings.diacritics)for(o in s)s.hasOwnProperty(o)&&(i=i.replace(new RegExp(o,"g"),s[o]));l.push({string:c[t],regex:new RegExp(i,"i")})}return l},e.prototype.iterator=function(e,t){var n;n=o(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,r,a;n=this,e=n.prepareSearch(e,t),r=e.tokens,i=e.options.fields,a=r.length;var o=function(e,t){var n,i;return e?(e=String(e||""),-1===(i=e.search(t.regex))?0:(n=t.string.length/e.length,0===i&&(n+=.5),n)):0},s=function(){var e=i.length;return e?1===e?function(e,t){return o(t[i[0]],e)}:function(t,n){for(var r=0,a=0;r<e;r++)a+=o(n[i[r]],t);return a/e}:function(){return 0}}();return a?1===a?function(e){return s(r[0],e)}:"and"===e.options.conjunction?function(e){for(var t,n=0,i=0;n<a;n++){
if((t=s(r[n],e))<=0)return 0;i+=t}return i/a}:function(e){for(var t=0,n=0;t<a;t++)n+=s(r[t],e);return n/a}:function(){return 0}},e.prototype.getSortFunction=function(e,n){var i,r,a,o,s,l,c,u,d,p,h;if(a=this,e=a.prepareSearch(e,n),h=!e.query&&n.sort_empty||n.sort,d=function(e,t){return"$score"===e?t.score:a.items[t.id][e]},s=[],h)for(i=0,r=h.length;i<r;i++)(e.query||"$score"!==h[i].field)&&s.push(h[i]);if(e.query){for(p=!0,i=0,r=s.length;i<r;i++)if("$score"===s[i].field){p=!1;break}p&&s.unshift({
field:"$score",direction:"desc"})}else for(i=0,r=s.length;i<r;i++)if("$score"===s[i].field){s.splice(i,1);break}for(u=[],i=0,r=s.length;i<r;i++)u.push("desc"===s[i].direction?-1:1);return l=s.length,l?1===l?(o=s[0].field,c=u[0],function(e,n){return c*t(d(o,e),d(o,n))}):function(e,n){var i,r,a;for(i=0;i<l;i++)if(a=s[i].field,r=u[i]*t(d(a,e),d(a,n)))return r;return 0}:null},e.prototype.prepareSearch=function(e,t){if("object"==typeof e)return e;t=n({},t);var i=t.fields,r=t.sort,a=t.sort_empty
;return i&&!o(i)&&(t.fields=[i]),r&&!o(r)&&(t.sort=[r]),a&&!o(a)&&(t.sort_empty=[a]),{options:t,query:String(e||"").toLowerCase(),tokens:this.tokenize(e),total:0,items:[]}},e.prototype.search=function(e,t){var n,i,r,a,o=this;return i=this.prepareSearch(e,t),t=i.options,e=i.query,a=t.score||o.getScoreFunction(i),e.length?o.iterator(o.items,function(e,r){n=a(e),(!1===t.filter||n>0)&&i.items.push({score:n,id:r})}):o.iterator(o.items,function(e,t){i.items.push({score:1,id:t})}),
r=o.getSortFunction(i,t),r&&i.items.sort(r),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,r,a;for(n=1,i=arguments.length;n<i;n++)if(a=arguments[n])for(r in a)a.hasOwnProperty(r)&&(e[r]=a[r]);return e},r=function(e){return(e+"").replace(/^\s+|\s+$|/g,"")},a=function(e){
return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},o=Array.isArray||i&&i.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s={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,r="",a={};for(n in s)if(s.hasOwnProperty(n))for(i=s[n].substring(2,s[n].length-1),r+=i,e=0,t=i.length;e<t;e++)a[i.charAt(e)]=n
;var o=new RegExp("["+r+"]","g");return function(e){return e.replace(o,function(e){return a[e]}).toLowerCase()}}();return e}),function(e,t){l=t,c={id:"microplugin",exports:{},loaded:!1},s="function"==typeof l?l.call(c.exports,n,c.exports,c):l,c.loaded=!0,void 0===s&&(s=c.exports)}(0,function(){var e={};e.mixin=function(e){e.plugins={},e.prototype.initializePlugins=function(e){var n,i,r,a=this,o=[];if(a.plugins={names:[],settings:{},requested:{},loaded:{}},t.isArray(e))for(n=0,
i=e.length;n<i;n++)"string"==typeof e[n]?o.push(e[n]):(a.plugins.settings[e[n].name]=e[n].options,o.push(e[n].name));else if(e)for(r in e)e.hasOwnProperty(r)&&(a.plugins.settings[r]=e[r],o.push(r));for(;o.length;)a.require(o.shift())},e.prototype.loadPlugin=function(t){var n=this,i=n.plugins,r=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');i.requested[t]=!0,i.loaded[t]=r.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,a){d=[n(12),r,s],u=a,void 0!==(p="function"==typeof u?u.apply(t,d):u)&&(e.exports=p)}(0,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 r=e.data.search(n);if(r>=0&&e.data.length>0){var a=e.data.match(n),o=document.createElement("span");o.className="highlight";var s=e.splitText(r),l=(s.splitText(a[0].length),s.cloneNode(!0));o.appendChild(l),s.parentNode.replaceChild(o,s),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)})}},r=function(){};r.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))}},r.mixin=function(e){for(var t=["on","off","trigger"],n=0;n<t.length;n++)e.prototype[t[n]]=r.prototype[t[n]]}
;var a=/Mac/.test(navigator.userAgent),o=a?91:17,s=a?18:17,l=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("form").validity,c=function(e){return void 0!==e},u=function(e){return void 0===e||null===e?null:"boolean"==typeof e?e?"1":"0":e+""},d=function(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},p=function(e){return(e+"").replace(/\$/g,"$$$$")},h={};h.before=function(e,t,n){var i=e[t];e[t]=function(){
return n.apply(e,arguments),i.apply(e,arguments)}},h.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 f=function(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}},v=function(e,t){var n;return function(){var i=this,r=arguments;window.clearTimeout(n),n=window.setTimeout(function(){e.apply(i,r)},t)}},g=function(e,t,n){var i,r=e.trigger,a={};e.trigger=function(){var n=arguments[0]
;if(-1===t.indexOf(n))return r.apply(e,arguments);a[n]=arguments},n.apply(e,[]),e.trigger=r;for(i in a)a.hasOwnProperty(i)&&r.apply(e,a[i])},m=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])})},y=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},b=function(e,t,n){var i,r,a={};if(n)for(i=0,r=n.length;i<r;i++)a[n[i]]=e.css(n[i]);else a=e.css();t.css(a)},I=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")
;b(n,i,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var r=i.width();return i.remove(),r},S=function(e){var t=null,n=function(n,i){var r,a,o,s,l,c,u,d;n=n||window.event||{},i=i||{},n.metaKey||n.altKey||(i.force||!1!==e.data("grow"))&&(r=e.val(),n.type&&"keydown"===n.type.toLowerCase()&&(a=n.keyCode,o=a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||32===a,46===a||8===a?(d=y(e[0]),
d.length?r=r.substring(0,d.start)+r.substring(d.start+d.length):8===a&&d.start?r=r.substring(0,d.start-1)+r.substring(d.start+1):46===a&&void 0!==d.start&&(r=r.substring(0,d.start)+r.substring(d.start+1))):o&&(c=n.shiftKey,u=String.fromCharCode(n.keyCode),u=c?u.toUpperCase():u.toLowerCase(),r+=u)),s=e.attr("placeholder"),!r&&s&&(r=s),(l=I(r,e)+4)!==t&&(t=l,e.width(l),e.triggerHandler("resize")))};e.on("keydown keyup update blur",n),n()},M=function(n,i){var r,a,o,s,l=this;s=n[0],s.selectize=l
;var c=window.getComputedStyle&&window.getComputedStyle(s,null);if(o=c?c.getPropertyValue("direction"):s.currentStyle&&s.currentStyle.direction,o=o||n.parents("[dir]:first").attr("dir")||"",e.extend(l,{order:0,settings:i,$input:n,tabIndex:n.attr("tabindex")||"",tagType:"select"===s.tagName.toLowerCase()?1:2,rtl:/rtl/i.test(o),eventNS:".selectize"+ ++M.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:v(l.onSearchChange,i.loadThrottle)}),l.sifter=new t(this.options,{diacritics:i.diacritics}),l.settings.options){for(r=0,
a=l.settings.options.length;r<a;r++)l.registerOption(l.settings.options[r]);delete l.settings.options}if(l.settings.optgroups){for(r=0,a=l.settings.optgroups.length;r<a;r++)l.registerOptionGroup(l.settings.optgroups[r]);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 r.mixin(M),n.mixin(M),e.extend(M.prototype,{setup:function(){var t,n,i,r,c,u,d,p,h,f=this,v=f.settings,g=f.eventNS,y=e(window),b=e(document),I=f.$input;if(d=f.settings.mode,p=I.attr("class")||"",t=e("<div>").addClass(v.wrapperClass).addClass(p).addClass(d),n=e("<div>").addClass(v.inputClass).addClass("items").appendTo(t),i=e('<input type="text" autocomplete="off" />').appendTo(n).attr("tabindex",I.is(":disabled")?"-1":f.tabIndex),u=e(v.dropdownParent||t),
r=e("<div>").addClass(v.dropdownClass).addClass(d).hide().appendTo(u),c=e("<div>").addClass(v.dropdownContentClass).appendTo(r),f.settings.copyClassesToDropdown&&r.addClass(p),t.css({width:I[0].style.width}),f.plugins.names.length&&(h="plugin-"+f.plugins.names.join(" plugin-"),t.addClass(h),r.addClass(h)),(null===v.maxItems||v.maxItems>1)&&1===f.tagType&&I.attr("multiple","multiple"),f.settings.placeholder&&i.attr("placeholder",v.placeholder),!f.settings.splitOn&&f.settings.delimiter){
var M=f.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");f.settings.splitOn=new RegExp("\\s*"+M+"+\\s*")}I.attr("autocorrect")&&i.attr("autocorrect",I.attr("autocorrect")),I.attr("autocapitalize")&&i.attr("autocapitalize",I.attr("autocapitalize")),f.$wrapper=t,f.$control=n,f.$control_input=i,f.$dropdown=r,f.$dropdown_content=c,r.on("mouseenter","[data-selectable]",function(){return f.onOptionHover.apply(f,arguments)}),r.on("mousedown click","[data-selectable]",function(){
return f.onOptionSelect.apply(f,arguments)}),m(n,"mousedown","*:not(input)",function(){return f.onItemSelect.apply(f,arguments)}),f.settings.manualInputWidth||S(i),n.on({mousedown:function(){return f.onMouseDown.apply(f,arguments)},click:function(){return f.onClick.apply(f,arguments)}}),i.on({mousedown:function(e){e.stopPropagation()},keydown:function(){return f.onKeyDown.apply(f,arguments)},keyup:function(){return f.onKeyUp.apply(f,arguments)},keypress:function(){
return f.onKeyPress.apply(f,arguments)},resize:function(){f.positionDropdown.apply(f,[])},blur:function(){return f.onBlur.apply(f,arguments)},focus:function(){return f.ignoreBlur=!1,f.onFocus.apply(f,arguments)},paste:function(){return f.onPaste.apply(f,arguments)}}),I.parents().last().find('label[for="'+I.attr("id")+'"]').on("click",function(){f.onClick.apply(f,arguments)}),b.on("keydown"+g,function(e){f.isCmdDown=e[a?"metaKey":"ctrlKey"],f.isCtrlDown=e[a?"altKey":"ctrlKey"],
f.isShiftDown=e.shiftKey}),b.on("keyup"+g,function(e){e.keyCode===s&&(f.isCtrlDown=!1),16===e.keyCode&&(f.isShiftDown=!1),e.keyCode===o&&(f.isCmdDown=!1)}),b.on("mousedown"+g,function(e){if(f.isFocused){if(e.target===f.$dropdown[0]||e.target.parentNode===f.$dropdown[0])return!1;f.$control.has(e.target).length||e.target===f.$control[0]||f.blur(e.target)}}),y.on(["scroll"+g,"resize"+g].join(" "),function(){f.isOpen&&f.positionDropdown.apply(f,arguments)}),y.on("mousemove"+g,function(){
f.ignoreHover=!1}),this.revertSettings={$children:I.children().detach(),tabindex:I.attr("tabindex")},I.attr("tabindex",-1).hide().after(f.$wrapper),e.isArray(v.items)&&(f.setValue(v.items),delete v.items),l&&I.on("invalid"+g,function(e){e.preventDefault(),f.isInvalid=!0,f.refreshState()}),f.updateOriginalInput(),f.refreshItems(),f.refreshState(),f.updatePlaceholder(),f.isSetup=!0,I.is(":disabled")&&f.disable(),f.on("change",this.onChange),I.data("selectize",f),I.addClass("selectized"),
f.trigger("initialize"),!0===v.preload&&f.onSearchChange("")},setupTemplates:function(){var t=this,n=t.settings.labelField,i=t.settings.optgroupLabelField,r={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({},r,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]])&&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,r=t.length;i<r;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(9!==e.keyCode&&e.preventDefault());switch(e.keyCode){case 65:if(t.isCmdDown)return void t.selectAll();break;case 27:return void(t.isOpen&&(e.preventDefault(),e.stopPropagation(),t.close()));case 78:if(!e.ctrlKey||e.altKey)break;case 40:
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 80:if(!e.ctrlKey||e.altKey)break;case 38: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 13:return void(t.isOpen&&t.$activeOption&&(t.onOptionSelect({currentTarget:t.$activeOption}),
e.preventDefault()));case 37:return void t.advanceSelection(-1,e);case 39:return void t.advanceSelection(1,e);case 9: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 8:return void t.deleteSelection(e,!0);case 46:return void t.deleteSelection(e)}
return!t.isFull()&&!t.isInputHidden||(a?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
;if(t.isDisabled)return t.blur(),e&&e.preventDefault(),!1;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,r=this;t.preventDefault&&(t.preventDefault(),t.stopPropagation()),i=e(t.currentTarget),i.hasClass("create")?r.createItem(null,function(){r.settings.closeAfterSelect&&r.close()}):void 0!==(n=i.attr("data-value"))&&(r.lastQuery=null,r.setTextboxValue(""),r.addItem(n),r.settings.closeAfterSelect?r.close():!r.settings.hideSelected&&t.type&&/mouse/.test(t.type)&&r.setActiveOption(r.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
;t.val()!==e&&(t.val(e).triggerHandler("update"),this.lastValue=e)},getValue:function(){return 1===this.tagType&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(e,t){g(this,t?[]:["change"],function(){this.clear(t),this.addItems(e,t)})},setActiveItem:function(t,n){var i,r,a,o,s,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("mousedown"===(i=n&&n.type.toLowerCase())&&d.isShiftDown&&d.$activeItems.length){for(u=d.$control.children(".active:last"),o=Array.prototype.indexOf.apply(d.$control[0].childNodes,[u[0]]),s=Array.prototype.indexOf.apply(d.$control[0].childNodes,[t[0]]),o>s&&(c=o,o=s,s=c),r=o;r<=s;r++)l=d.$control[0].childNodes[r],-1===d.$activeItems.indexOf(l)&&(e(l).addClass("active"),d.$activeItems.push(l));n.preventDefault()
}else"mousedown"===i&&d.isCtrlDown||"keydown"===i&&this.isShiftDown?t.hasClass("active")?(a=d.$activeItems.indexOf(t[0]),d.$activeItems.splice(a,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 r,a,o,s,l,u=this;u.$activeOption&&u.$activeOption.removeClass("active"),u.$activeOption=null,t=e(t),
t.length&&(u.$activeOption=t.addClass("active"),!n&&c(n)||(r=u.$dropdown_content.height(),a=u.$activeOption.outerHeight(!0),n=u.$dropdown_content.scrollTop()||0,o=u.$activeOption.offset().top-u.$dropdown_content.offset().top+n,s=o,l=o-r+a,o+a>r+n?u.$dropdown_content.stop().animate({scrollTop:l},i?u.settings.scrollDuration:0):o<n&&u.$dropdown_content.stop().animate({scrollTop:s},i?u.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,r,a=this,o=a.settings,s=this.getSearchOptions();if(o.score&&"function"!=typeof(r=a.settings.score.apply(this,[t])))throw new Error('Selectize "score" setting must be a function that returns a function');if(t!==a.lastQuery?(a.lastQuery=t,i=a.sifter.search(t,e.extend(s,{score:r})),a.currentResults=i):i=e.extend(!0,{},a.currentResults),
o.hideSelected)for(n=i.items.length-1;n>=0;n--)-1!==a.items.indexOf(u(i.items[n].id))&&i.items.splice(n,1);return i},refreshOptions:function(t){var n,r,a,o,s,l,c,d,p,h,f,v,g,m,y,b;void 0===t&&(t=!0);var I=this,S=e.trim(I.$control_input.val()),M=I.search(S),D=I.$dropdown_content,C=I.$activeOption&&u(I.$activeOption.attr("data-value"));for(o=M.items.length,"number"==typeof I.settings.maxOptions&&(o=Math.min(o,I.settings.maxOptions)),s={},l=[],n=0;n<o;n++)for(c=I.options[M.items[n].id],
d=I.render("option",c),p=c[I.settings.optgroupField]||"",h=e.isArray(p)?p:[p],r=0,a=h&&h.length;r<a;r++)p=h[r],I.optgroups.hasOwnProperty(p)||(p=""),s.hasOwnProperty(p)||(s[p]=[],l.push(p)),s[p].push(d);for(this.settings.lockOptgroupOrder&&l.sort(function(e,t){return(I.optgroups[e].$order||0)-(I.optgroups[t].$order||0)}),f=[],n=0,o=l.length;n<o;n++)p=l[n],I.optgroups.hasOwnProperty(p)&&s[p].length?(v=I.render("optgroup_header",I.optgroups[p])||"",v+=s[p].join(""),
f.push(I.render("optgroup",e.extend({},I.optgroups[p],{html:v})))):f.push(s[p].join(""));if(D.html(f.join("")),I.settings.highlight&&M.query.length&&M.tokens.length)for(n=0,o=M.tokens.length;n<o;n++)i(D,M.tokens[n].regex);if(!I.settings.hideSelected)for(n=0,o=I.items.length;n<o;n++)I.getOption(I.items[n]).addClass("selected");g=I.canCreate(S),g&&(D.prepend(I.render("option_create",{input:S})),b=e(D[0].childNodes[0])),I.hasOptions=M.items.length>0||g,
I.hasOptions?(M.items.length>0?(y=C&&I.getOption(C),y&&y.length?m=y:"single"===I.settings.mode&&I.items.length&&(m=I.getOption(I.items[0])),m&&m.length||(m=b&&!I.settings.addPrecedence?I.getAdjacentOption(b,1):D.find("[data-selectable]:first"))):m=b,I.setActiveOption(m),t&&!I.isOpen&&I.open()):(I.setActiveOption(null),t&&I.isOpen&&I.close())},addOption:function(t){var n,i,r,a=this;if(e.isArray(t))for(n=0,i=t.length;n<i;n++)a.addOption(t[n]);else(r=a.registerOption(t))&&(a.userOptions[r]=!0,
a.lastQuery=null,a.trigger("option_add",r,t))},registerOption:function(e){var t=u(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=u(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,r,a,o,s,l,c,d=this;if(t=u(t),a=u(n[d.settings.valueField]),null!==t&&d.options.hasOwnProperty(t)){if("string"!=typeof a)throw new Error("Value must be set in option data");c=d.options[t].$order,a!==t&&(delete d.options[t],
-1!==(o=d.items.indexOf(t))&&d.items.splice(o,1,a)),n.$order=n.$order||c,d.options[a]=n,s=d.renderCache.item,l=d.renderCache.option,s&&(delete s[t],delete s[a]),l&&(delete l[t],delete l[a]),-1!==d.items.indexOf(a)&&(i=d.getItem(t),r=e(d.render("item",n)),i.hasClass("active")&&r.addClass("active"),i.replaceWith(r)),d.lastQuery=null,d.isOpen&&d.refreshOptions(!1)}},removeOption:function(e,t){var n=this;e=u(e);var i=n.renderCache.item,r=n.renderCache.option;i&&delete i[e],r&&delete r[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]"),r=i.index(t)+n
;return r>=0&&r<i.length?i.eq(r):e()},getElementWithValue:function(t,n){if(void 0!==(t=u(t))&&null!==t)for(var i=0,r=n.length;i<r;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],r=0,a=i.length;r<a;r++)this.isPending=r<a-1,this.addItem(i[r],n)},addItem:function(t,n){g(this,n?[]:["change"],function(){var i,r,a,o,s,l=this,c=l.settings.mode
;if(t=u(t),-1!==l.items.indexOf(t))return void("single"===c&&l.close());l.options.hasOwnProperty(t)&&("single"===c&&l.clear(n),"multi"===c&&l.isFull()||(i=e(l.render("item",l.options[t])),s=l.isFull(),l.items.splice(l.caretPos,0,t),l.insertAtCaret(i),(!l.isPending||!s&&l.isFull())&&l.refreshState(),l.isSetup&&(a=l.$dropdown_content.find("[data-selectable]"),l.isPending||(r=l.getOption(t),o=l.getAdjacentOption(r,1).attr("data-value"),l.refreshOptions(l.isFocused&&"single"!==c),
o&&l.setActiveOption(l.getOption(o))),!a.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,r,a=this;n="object"==typeof e?e:a.getItem(e),e=u(n.attr("data-value")),-1!==(i=a.items.indexOf(e))&&(n.remove(),n.hasClass("active")&&(r=a.$activeItems.indexOf(n[0]),a.$activeItems.splice(r,1)),a.items.splice(i,1),a.lastQuery=null,
!a.settings.persist&&a.userOptions.hasOwnProperty(e)&&a.removeOption(e,t),i<a.caretPos&&a.setCaret(a.caretPos-1),a.refreshState(),a.updatePlaceholder(),a.updateOriginalInput({silent:t}),a.positionDropdown(),a.trigger("item_remove",e,n))},createItem:function(t,n){var i=this,r=i.caretPos;t=t||e.trim(i.$control_input.val()||"");var a=arguments[arguments.length-1];if("function"!=typeof a&&(a=function(){}),"boolean"!=typeof n&&(n=!0),!i.canCreate(t))return a(),!1;i.lock()
;var o="function"==typeof i.settings.create?this.settings.create:function(e){var t={};return t[i.settings.labelField]=e,t[i.settings.valueField]=e,t},s=f(function(e){if(i.unlock(),!e||"object"!=typeof e)return a();var t=u(e[i.settings.valueField]);if("string"!=typeof t)return a();i.setTextboxValue(""),i.addOption(e),i.setCaret(r),i.addItem(t),i.refreshOptions(n&&"single"!==i.settings.mode),a(e)}),l=o.apply(this,[t,s]);return void 0!==l&&s(l),!0},refreshItems:function(){this.lastQuery=null,
this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){var e=this;e.isRequired&&(e.items.length&&(e.isInvalid=!1),e.$control_input.prop("required",void 0)),e.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,r,a=this;if(e=e||{},1===a.tagType){for(i=[],t=0,n=a.items.length;t<n;t++)r=a.options[a.items[t]][a.settings.labelField]||"",i.push('<option value="'+d(a.items[t])+'" selected="selected">'+d(r)+"</option>");i.length||this.$input.attr("multiple")||i.push('<option value="" selected="selected"></option>'),a.$input.html(i.join(""))}else a.$input.val(a.getValue()),
a.$input.attr("value",a.$input.val());a.isSetup&&(e.silent||a.trigger("change",a.$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||e.settings.hideDropdown||"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,r,a,o,s,l,c,u,d,p=this;if(a=n||void 0===n&&t&&8===t.keyCode?-1:1,o=y(p.$control_input[0]),p.$activeOption&&!p.settings.hideSelected&&(c=p.getAdjacentOption(p.$activeOption,-1).attr("data-value")),s=[],p.$activeItems.length){for(d=p.$control.children(".active:"+(a>0?"last":"first")),l=p.$control.children(":not(input)").index(d),a>0&&l++,i=0,r=p.$activeItems.length;i<r;i++)s.push(e(p.$activeItems[i]).attr("data-value"));t&&(t.preventDefault(),
t.stopPropagation())}else(p.isFocused||"single"===p.settings.mode)&&p.items.length&&(a<0&&0===o.start&&0===o.length?s.push(p.items[p.caretPos-1]):a>0&&o.start===p.$control_input.val().length&&s.push(p.items[p.caretPos]));if(!s.length||"function"==typeof p.settings.onDelete&&!1===p.settings.onDelete.apply(p,[s]))return!1;for(void 0!==l&&p.setCaret(l);s.length;)p.removeItem(s.pop());return p.showInput(),p.positionDropdown(),p.refreshOptions(!0),c&&(u=p.getOption(c),u.length&&p.setActiveOption(u)),
!0},advanceSelection:function(e,t){var n,i,r,a,o,s=this;0!==e&&(s.rtl&&(e*=-1),n=e>0?"last":"first",i=y(s.$control_input[0]),s.isFocused&&!s.isInputHidden?(a=s.$control_input.val().length,(e<0?0===i.start&&0===i.length:i.start===a)&&!a&&s.advanceCaret(e,t)):(o=s.$control.children(".active:"+n),o.length&&(r=s.$control.children(":not(input)").index(o),s.setActiveItem(null),s.setCaret(e>0?r+1:r))))},advanceCaret:function(e,t){var n,i,r=this;0!==e&&(n=e>0?"next":"prev",
r.isShiftDown?(i=r.$control_input[n](),i.length&&(r.hideInput(),r.setActiveItem(i),t&&t.preventDefault())):r.setCaret(r.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,r,a,o;for(a=n.$control.children(":not(input)"),i=0,r=a.length;i<r;i++)o=e(a[i]).detach(),i<t?n.$control_input.before(o):n.$control.append(o)}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,r="",a=!1,o=this,s=/^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;return"option"!==e&&"item"!==e||(n=u(t[o.settings.valueField]),a=!!n),
a&&(c(o.renderCache[e])||(o.renderCache[e]={}),o.renderCache[e].hasOwnProperty(n))?o.renderCache[e][n]:(r=o.settings.render[e].apply(this,[t,d]),"option"!==e&&"option_create"!==e||(r=r.replace(s,"<$1 data-selectable")),"optgroup"===e&&(i=t[o.settings.optgroupValueField]||"",r=r.replace(s,'<$1 data-group="'+p(d(i))+'"')),"option"!==e&&"item"!==e||(r=r.replace(s,'<$1 data-value="'+p(d(n||""))+'"')),a&&(o.renderCache[e][n]=r),r)},clearCache:function(e){var t=this
;void 0===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))}}),M.count=0,M.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),r=i.dataAttr,a=i.labelField,o=i.valueField,s=i.optgroupField,l=i.optgroupLabelField,c=i.optgroupValueField,d=function(t,n){var s,l,c,u,d=t.attr(r);if(d)for(n.options=JSON.parse(d),s=0,
l=n.options.length;s<l;s++)n.items.push(n.options[s][o]);else{var p=e.trim(t.val()||"");if(!i.allowEmptyOption&&!p.length)return;for(c=p.split(i.delimiter),s=0,l=c.length;s<l;s++)u={},u[a]=c[s],u[o]=c[s],n.options.push(u);n.items=c}},p=function(t,n){var d,p,h,f,v=n.options,g={},m=function(e){var t=r&&e.attr(r);return"string"==typeof t&&t.length?JSON.parse(t):null},y=function(t,r){t=e(t);var l=u(t.attr("value"));if(l||i.allowEmptyOption)if(g.hasOwnProperty(l)){if(r){var c=g[l][s]
;c?e.isArray(c)?c.push(r):g[l][s]=[c,r]:g[l][s]=r}}else{var d=m(t)||{};d[a]=d[a]||t.text(),d[o]=d[o]||l,d[s]=d[s]||r,g[l]=d,v.push(d),t.is(":selected")&&n.items.push(l)}};for(n.maxItems=t.attr("multiple")?null:1,f=t.children(),d=0,p=f.length;d<p;d++)h=f[d].tagName.toLowerCase(),"optgroup"===h?function(t){var i,r,a,o,s;for(t=e(t),a=t.attr("label"),a&&(o=m(t)||{},o[l]=a,o[c]=a,n.optgroups.push(o)),s=e("option",t),i=0,r=s.length;i<r;i++)y(s[i],a)}(f[d]):"option"===h&&y(f[d])}
;return this.each(function(){if(!this.selectize){var r=e(this),a=this.tagName.toLowerCase(),o=r.attr("placeholder")||r.attr("data-placeholder");o||i.allowEmptyOption||(o=r.children('option[value=""]').text());var s={placeholder:o,options:[],optgroups:[],items:[]};"select"===a?p(r,s):d(r,s),new M(r,e.extend(!0,{},n,s,t))}})},e.fn.selectize.defaults=M.defaults,e.fn.selectize.support={validity:l},M.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="'+d(t.title)+'">'+t.label+"</a>",r=function(e,t){var n=e.search(/(<\/[^>]+>\s*)$/);return e.substring(0,n)+t+e.substring(n)};this.setup=function(){var a=n.setup;return function(){if(t.append){var o=n.settings.render.item;n.settings.render.item=function(e){return r(o.apply(this,arguments),i)}}a.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)}})}}()}}),M.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,r
;return 8===t.keyCode&&""===this.$control_input.val()&&!this.$activeItems.length&&(i=this.caretPos-1)>=0&&i<this.items.length?(r=this.options[this.items[i]],this.deleteSelection(t,!0)&&(this.setTextboxValue(e.text.apply(this,[r])),this.refreshOptions(!0)),void t.preventDefault()):n.apply(this,arguments)}}()}),M.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 r=this.options[this.items[i]],a=e.text.call(this,r);this.removeItem(r[this.settings.valueField]),this.setTextboxValue(a),this.refreshOptions(!0)}return n.apply(this,arguments)}}()}),M})}).call(t,n(12))},function(e,t,n){var i=n(867).default,r=n(152);e.exports=r(i)},function(e,t,n){"use strict";function i(e){return r.b[e]||""}t.a=i;var r=n(426)},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(501),o=n.n(a),s=o.a.extend({
constructor:function(e,t,n,i){this.exclusiveAgents=t,this.agentIdentifier=n,o.a.call(this,e,i),this.filterBy(r.a.bind(this.filterExclusiveAgent,this))},filterExclusiveAgent:function(e){var t=e.get("identifier"),n=this.exclusiveAgents;if(!n)return!0;var i=this.agentIdentifier,r=-1!==n.indexOf(i),a=-1!==n.indexOf(t);return r?t===i:!a}});t.a=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),r=n(1949),a=i.a.extend({name:"MatchResultCollection",
context:["server"],model:r.a,url:function(){return"/library/metadata/"+this.parent.id+"/matches"}});t.default=a},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)+" "+r[t]}var r=["B","KB","MB","GB","TB"];t.a=i},function(e,t,n){e.exports={default:n(1990),__esModule:!0}},function(e,t,n){"use strict";function i(e){return e&&a.a.parseBoolean(e)?Object(r.default)("Yes"):Object(r.default)("No")}
Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),a=n(58);t.default=i},function(e,t,n){"use strict";function i(e){return e!==m.k&&e!==m.j}function r(e){var t=e.title,n=e.leafCount;return 1===n?Object(g.default)('Are you sure you want to mark 1 episode in "{showTitle}" as unplayed?',{showTitle:t}):Object(g.default)('Are you sure you want to mark {numEpisodes} episodes in "{showTitle}" as unplayed?',{numEpisodes:n,showTitle:t})}function a(e){var t=e.title,n=e.leafCount
;return 1===n?Object(g.default)('Are you sure you want to mark 1 episode in "{showTitle}" as played?',{showTitle:t}):Object(g.default)('Are you sure you want to mark {numEpisodes} episodes in "{showTitle}" as played?',{numEpisodes:n,showTitle:t})}var o=n(2),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=(n.n(v),n(4)),m=n(28),y=n(35),b=n(154),I=function(e){function t(){return c()(this,t),d()(this,e.apply(this,arguments))}return h()(t,e),
t.prototype.componentDidMount=function(){this._checkAutoConfirm()},t.prototype.componentDidUpdate=function(){this._checkAutoConfirm()},t.prototype._checkAutoConfirm=function(){i(this.props.type)&&this.props.isOpen&&this.props.onConfirm()},t.prototype.render=function(){var e=this.props,t=e.isOpen,n=e.type,o=e.markUnplayed,l=e.onConfirm,c=e.onCancel;return i(n)?null:s()(b.a,{isOpen:t,metricsPage:o?y.n:y.o,title:o?Object(g.default)("Mark Unplayed"):Object(g.default)("Mark Played"),
message:o?r(this.props):a(this.props),onConfirm:l,onCancel:c})},t}(v.Component);t.a=I},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.isOpen,o=e.metricsProperties,s=e.onModalClose;return a()(u.a,{size:c.e.SMALL,isOpen:r,metricsPage:l.J,metricsProperties:o,onModalClose:s},void 0,a()(d.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,onModalClose:s}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(35)),c=n(24),u=n(132),d=n(2e3);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(226),v=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onChange=function(e){var t=e?parseInt(e,10):null;i.props.onChange(t)},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){
return h.a.createElement(f.a,r()({type:"number"},this.props,{selectTextOnFocus:!1,onChange:this.onChange}))},t}(p.Component);t.a=v},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(146)),f=n(181),v=n(429),g=n(286),m=n(2011),y=n.n(m),b=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),
i.onChange=function(e){var t=e.steppedValue,n=String(i.props.stepSize),r=n.split("."),a=r[1],o=null!=a?parseFloat(t.toFixed(a.length)):t;i.props.onChange(o)},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.name,n=e.value,i=e.min,a=e.max,o=e.stepSize,s=e.labelText,l=e.showErrors,c=e.errors;return r()(f.a,{},void 0,r()(v.a,{showErrors:l,errors:c,name:t,labelText:s}),r()("div",{className:y.a.sliderContainer},void 0,r()(g.a,{className:y.a.slider,value:n,min:i,max:a,
stepSize:o,onChange:this.onChange}),r()("div",{className:y.a.sliderValue},void 0,n)))},t}(p.Component);t.a=Object(h.a)(b)},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(s.a)(),function(e){return{metadataItemEntityID:e.metadataItem}})}function r(){return Object(o.createSelector)(Object(l.a)(),function(e){return{url:e.url}})}var a=n(11),o=n(6),s=(n.n(o),n(691)),l=n(999),c=n(2022),u=Object(a.b)(r)(c.a);t.a=Object(a.b)(i)(u)},function(e,t,n){"use strict"
;function i(){return Object(r.createSelector)(Object(a.a)(),function(e){if(!e||!e.Media)return{};var t=e.entityID,n=e.type,i=e.thumb,r=e.Media,a=r[0],o="clip"===n,s=a&&a.Part&&a.Part[0],l=s&&s.key;return{entityID:t,url:o||!l?i:l,isVideo:o}})}t.a=i;var r=n(6),a=(n.n(r),n(21))},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.imageUrl,i=e.allowBlur;return a()("div",{className:u.a.backgroundContainer},void 0,a()(l.a,{serverEntityID:t,url:n,allowBlur:i}))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(897)),c=n(2028),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(s.a)(),function(e){return{isPaused:e.isPaused}})}function r(e,t){var n={playerType:t.playerType};return{onTogglePlayPress:function(t){e(Object(l.t)(n))}}}var a=n(6),o=(n.n(a),n(11)),s=n(44),l=n(131),c=n(2030);t.a=Object(o.b)(i,r)(c.a)},function(e,t,n){"use strict";function i(e,t){var n={playerType:t.playerType};return{
onCollapsePress:function(i){t.isFullscreen&&t.onExitFullscreenPress(i),e(Object(s.a)(n))}}}var r=n(6),a=(n.n(r),n(11)),o=n(15),s=n(497),l=n(220),c=n(2033),u=Object(r.createSelector)(function(e){return e.remotePlayer?e.remotePlayer.friendlyName:null},function(e){return e.remotePlayer?e.remotePlayer.product:null},Object(l.a)(),function(e,t,n){return{remotePlayerName:e,remotePlayerProduct:t,showRemotePlayer:n.allowRemotePlayer,hasFullscreen:Object(o.d)("fullscreenManager").hasFullscreen}})
;t.a=Object(a.b)(u,i)(c.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return c}),n.d(t,"b",function(){return u});var i,r=n(36),a=n(19),o=n(212),s=n(105),l=n(171),c=Object(r.a)("ui/player/photoPlayer/fetchRelatedPhotos"),u=Object(s.a)((i={},i["ui/player/photoPlayer/fetchRelatedPhotos"]=function(e){
var t=Object(l.b)(e,"photo"),n=t.get("playQueue"),i=n.get("currentIndex"),r=Object(l.a)(t,i),s=r.get("metadataItem"),c=s.get("key"),u=Object(a.join)([c.replace("/library/","/hubs/"),"related"]),d=new o.default([],{server:s.server,metadataItem:s,hubKey:u,hubCount:8});t.set({relatedHubs:d}),s.get("isLibraryItem")&&d.fetch()},i))},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(170)),a=Object(i.createSelector)(r.a,function(e){return e.hubs});t.a=a},function(e,t,n){"use strict";function i(e,t){
return e===t||e&&t&&e.x===t.x&&e.y===t.y}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1];switch(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:s({},e,{clientOffset:t.clientOffset});case l.END_DRAG:case l.DROP:return c;default:return e}}function a(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 o(e){var t=e.clientOffset,n=e.initialClientOffset;return t&&n?{x:t.x-n.x,y:t.y-n.y}:null}Object.defineProperty(t,"__esModule",{value:!0});var s=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=r,t.getSourceClientOffset=a,
t.getDifferenceFromInitialOffset=o;var l=n(509),c={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null}},function(e,t,n){"use strict";function i(e,t){return(0,a.default)(e)?e.some(function(e){return e===t}):e===t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(292),a=function(e){return e&&e.__esModule?e:{default:e}}(r)},function(e,t,n){var i=n(1008),r=n(431),a=n(514),o=r(function(e,t){return a(e)?i(e,t):[]});e.exports=o},function(e,t,n){
function i(e,t,n,i){var d=-1,p=a,h=!0,f=e.length,v=[],g=t.length;if(!f)return v;n&&(t=s(t,l(n))),i?(p=o,h=!1):t.length>=u&&(p=c,h=!1,t=new r(t));e:for(;++d<f;){var m=e[d],y=null==n?m:n(m);if(m=i||0!==m?m:0,h&&y===y){for(var b=g;b--;)if(t[b]===y)continue e;v.push(m)}else p(t,y,i)||v.push(m)}return v}var r=n(695),a=n(697),o=n(698),s=n(699),l=n(700),c=n(701),u=200;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 r=n(2092),a=n(2111),o=n(2113),s=n(2114),l=n(2115);i.prototype.clear=r,i.prototype.delete=a,i.prototype.get=o,i.prototype.has=s,i.prototype.set=l,e.exports=i},function(e,t,n){function i(e){if(!a(e))return!1;var t=r(e);return t==s||t==l||t==o||t==c}var r=n(481),a=n(430),o="[object AsyncFunction]",s="[object Function]",l="[object GeneratorFunction]",c="[object Proxy]";e.exports=i},function(e,t){function n(e){return e}e.exports=n},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 r(){var e=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],arguments[1]),t=arguments[2];switch(e.type){case u.HOVER:break;case d.ADD_SOURCE:case d.ADD_TARGET:case d.REMOVE_TARGET:case d.REMOVE_SOURCE:return p;case u.BEGIN_DRAG:case u.PUBLISH_DRAG_SOURCE:case u.END_DRAG:case u.DROP:default:return h}
var n=e.targetIds,i=t.targetIds,r=(0,s.default)(n,i),a=!1;if(0===r.length){for(var o=0;o<n.length;o++)if(n[o]!==i[o]){a=!0;break}}else a=!0;if(!a)return p;var l=i[i.length-1],c=n[n.length-1];return l!==c&&(l&&r.push(l),c&&r.push(c)),r}function a(e,t){return e!==p&&(e===h||void 0===t||(0,c.default)(t,e).length>0)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,t.areDirty=a;var o=n(2130),s=i(o),l=n(2138),c=i(l),u=n(509),d=n(515),p=[],h=[]},function(e,t,n){function i(e,t,n,o,s){
var l=-1,c=e.length;for(n||(n=a),s||(s=[]);++l<c;){var u=e[l];t>0&&n(u)?t>1?i(u,t-1,n,o,s):r(s,u):o||(s[s.length]=u)}return s}var r=n(2133),a=n(2134);e.exports=i},function(e,t,n){var i=n(2135),r=n(408),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return r(e)&&o.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},function(e,t,n){function i(e,t,n){var i=-1,d=a,p=e.length,h=!0,f=[],v=f;if(n)h=!1,d=o;else if(p>=u){var g=t?null:l(e)
;if(g)return c(g);h=!1,d=s,v=new r}else v=t?[]:f;e:for(;++i<p;){var m=e[i],y=t?t(m):m;if(m=n||0!==m?m:0,h&&y===y){for(var b=v.length;b--;)if(v[b]===y)continue e;t&&v.push(y),f.push(m)}else d(v,y,n)||(v!==f&&v.push(y),f.push(m))}return f}var r=n(695),a=n(697),o=n(698),s=n(701),l=n(2136),c=n(1018),u=200;e.exports=i},function(e,t){function n(){}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,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 r=Object.prototype.hasOwnProperty,a=0;a<n.length;a++){if(!r.call(t,n[a]))return!1;var o=e[n[a]],s=t[n[a]];if(o!==s||"object"==typeof o||"object"==typeof s)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 r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e){
var t=e.DecoratedComponent,n=e.createHandler,i=e.createMonitor,o=e.createConnector,p=e.registerHandler,f=e.containerDisplayName,g=e.getType,m=e.collect,b=e.options,I=b.arePropsEqual,S=void 0===I?v.default:I,M=t.displayName||t.name||"Component";return function(e){function v(t,a){r(this,v),e.call(this,t,a),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=o(this.manager.getBackend()),this.handler=n(this.handlerMonitor),
this.disposable=new d.SerialDisposable,this.receiveProps(t),this.state=this.getCurrentState(),this.dispose()}return a(v,e),v.prototype.getHandlerId=function(){return this.handlerId},v.prototype.getDecoratedComponentInstance=function(){return this.decoratedComponentInstance},v.prototype.shouldComponentUpdate=function(e,t){return!S(e,this.props)||!h.default(t,this.state)},l(v,null,[{key:"DecoratedComponent",value:t,enumerable:!0},{key:"displayName",value:f+"("+M+")",enumerable:!0},{
key:"contextTypes",value:{dragDropManager:c.PropTypes.object.isRequired},enumerable:!0}]),v.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0,this.disposable=new d.SerialDisposable,this.currentType=null,this.receiveProps(this.props),this.handleChange()},v.prototype.componentWillReceiveProps=function(e){S(e,this.props)||(this.receiveProps(e),this.handleChange())},v.prototype.componentWillUnmount=function(){this.dispose(),this.isCurrentlyMounted=!1},
v.prototype.receiveProps=function(e){this.handler.receiveProps(e),this.receiveType(g(e))},v.prototype.receiveType=function(e){if(e!==this.currentType){this.currentType=e;var t=p(e,this.handler,this.manager),n=t.handlerId,i=t.unregister;this.handlerId=n,this.handlerMonitor.receiveHandlerId(n),this.handlerConnector.receiveHandlerId(n);var r=this.manager.getMonitor(),a=r.subscribeToStateChange(this.handleChange,{handlerIds:[n]})
;this.disposable.setDisposable(new d.CompositeDisposable(new d.Disposable(a),new d.Disposable(i)))}},v.prototype.handleChange=function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();h.default(e,this.state)||this.setState(e)}},v.prototype.dispose=function(){this.disposable.dispose(),this.handlerConnector.receiveHandlerId(null)},v.prototype.handleChildRef=function(e){this.decoratedComponentInstance=e,this.handler.receiveComponent(e)},v.prototype.getCurrentState=function(){
var e=m(this.handlerConnector.hooks,this.handlerMonitor);return e},v.prototype.render=function(){return u.default.createElement(t,s({},this.props,this.state,{ref:this.handleChildRef}))},v}(c.Component)}t.__esModule=!0;var s=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=o;var c=n(0),u=i(c),d=n(2152),p=n(703),h=i(p),f=n(1019),v=i(f),g=n(217),m=(i(g),n(141)),y=i(m);e.exports=t.default},function(e,t,n){"use strict";function i(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(!l.isValidElement(t)){return void e(t,n)}var r=t;i(r);var a=n?function(t){return e(t,n)}:e;return s.default(r,a)}}function a(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=a;var o=n(2160),s=function(e){return e&&e.__esModule?e:{default:e}}(o),l=n(0);e.exports=t.default},function(e,t,n){"use strict";function i(e,t){return t===e||null!==t&&null!==e&&a.default(t,e)}t.__esModule=!0,t.default=i;var r=n(703),a=function(e){return e&&e.__esModule?e:{default:e}}(r);e.exports=t.default},function(e,t,n){"use strict";function i(e,t){
return"string"==typeof e||"symbol"==typeof e||t&&a.default(e)&&e.every(function(e){return i(e,!1)})}t.__esModule=!0,t.default=i;var r=n(292),a=function(e){return e&&e.__esModule?e:{default:e}}(r);e.exports=t.default},function(e,t){function n(e,t){var n=typeof e;return!!(t=null==t?i:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}var i=9007199254740991,r=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t,n){"use strict";t.__esModule=!0;var i=n(2183),r=function(e){return e&&e.__esModule?e:{
default:e}}(i),a=r.default(function(){return/firefox/i.test(navigator.userAgent)});t.isFirefox=a;var o=r.default(function(){return Boolean(window.safari)});t.isSafari=o},function(e,t,n){"use strict";function i(e){var t=e.children;return a()("div",{className:c.a.headingContainer},void 0,t,a()("div",{className:c.a.divider}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2193)),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.title;return a()("div",{className:c.a.heading
},void 0,t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2194)),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(s.a)(),function(e){var t=Object(l.r)(e.type),n=t&&t.mediaType;return{metadataItemEntityID:e.metadataItem,mediaType:n}})}function r(e,t){return{onRemovePress:function(n){e(Object(c.k)({playerType:t.playerType,playQueueItemEntityID:t.playQueueItemEntityID}))}}}var a=n(6),o=(n.n(a),n(11)),s=n(691),l=n(28),c=n(118),u=n(2196)
;t.a=Object(o.b)(i,r)(u.a)},function(e,t,n){var i=n(71),r=n(2199);e.exports=i({},r,{dragPreviewBackgroundColor:"rgba(76, 76, 76, 0.7)",dragPreviewOpacity:"0.9",dropLocationColor:"#f9be03",sliderTrackBackgroundColor:"rgba(255, 255, 255, 0.2)",sliderThumbBackgroundColor:"#ddd",sliderThumbHoverBackgroundColor:"#fff",avatarBackgroundColor:"#999",badgeBackgroundColor:"rgba(0, 0, 0, 0.15)",defaultBadgeColor:"rgba(255, 255, 255, 0.7)",detailsBackgroundColor:"rgba(0, 0, 0, 0.15)",
detailsShadowColor:"#000",playerBackgroundColor:"#232426",playerTopControlsBackgroundColor:"rgba(35, 36, 38, 0.45)",playerBottomControlsBackgroundColor:"rgba(35, 36, 38, 0.8)",miniPlayerBackgroundColor:"rgba(0, 0, 0, 0.3)",playerPlaceholderColor:"rgba(0, 0, 0, 0.3)",playerOverlayColor:"rgba(0, 0, 0, 0.8)",playerSecondaryOverlayColor:"rgba(0, 0, 0, 0.4)",playerPosterActionColor:"rgba(0, 0, 0, 0.15)",playerPanelColor:"rgba(0, 0, 0, 0.6)",playerDisabledLinkColor:"rgba(255, 255, 255, 0.15)",
playerShadowColor:"rgba(0, 0, 0, 0.45)",seekBarTrackColor:"rgba(0, 0, 0, 0.75)",seekBarTrackColorHover:"rgba(255, 255, 255, 0.15)",seekBarFillColor:"#cc7b19",seekBarBufferColor:"rgba(204, 123, 25, 0.3)",seekBarThumbnailBackgroundColor:"rgba(0, 0, 0, 0.45)",seekBarThumbnailShadowColor:"rgba(0, 0, 0, 0.45)",seekBarTooltipBackgroundColor:"#000",seekBarTooltipShadowColor:"rgba(0, 0, 0, 0.5)",adSeekBarFillColor:"#f9be03",equalizerBarColor:"#f9be03",posterBackgroundColor:"rgba(0, 0, 0, 0.45)",
posterHoverBackgroundColor:"radial-gradient(farthest-corner at 50% 50%, rgba(50, 50, 50, 0.5) 50%, rgb(50, 50, 50) 100%)",posterSelectedBackgroundColor:"rgba(30, 30, 30, 0.5)",posterBlendedSelectedBackgroundColor:"rgba(19, 19, 19, 0.78);",posterPlaceholderIconColor:"rgba(255, 255, 255, 0.15)",posterCenterCircleBackgroundColor:"rgba(0, 0, 0, 0.45)",posterBadgeShadowColor:"rgba(0, 0, 0, 0.6)",posterProgressTrackBackgroundColor:"rgba(0, 0, 0, 0.75)",posterVersionBadgeColor:"#556688",
posterSmartBadgeColor:"rgb(142, 97, 145)",posterFavoriteBadgeColor:"rgb(229, 172, 182)",recordColor:"#f53",recordHoverColor:"color(#f53 lightness(+5%))",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)",channelGridSelectedItemDetailsBackgroundColor:"rgba(0, 0, 0, 0.2)",
channelGridBorderColor:"rgb(43, 57, 70)",channelGridHoverColor:"rgba(255, 255, 255, 0.2)",channelGridOnAirBackgroundColor:"rgba(255, 255, 255, 0.1)",channelGridMissingItemBackgroundColor:"rgba(0, 0, 0, 0)",channelGridProgressColor:"rgba(255, 255, 255, 0.15)",channelGridChannelThumbBackgroundColor:"rgba(255, 255, 255, 0.4)",channelGridChannelIdentifierBackroundColor:"rgba(255, 255, 255, 0.05)",channelGridNewBadgeColor:"rgba(84, 84, 84)",filterBuilderInputBackgroundColor:"rgba(0, 0, 0, 0.6)",
altFilterBuilderInputBackgroundColor:"rgba(0, 0, 0, 0.3)",dvrBackgroundColor:"rgba(0, 0, 0, 0.15)",preplayUnavailableButtonBackgroundColor:"rgba(255, 84, 50, 0.6)",preplayPartialButtonBackgroundColor:"rgba(204, 123, 25, 0.6)"})},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.year;return a()("span",{className:t,"data-qa-id":"metadataYear"},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0));n.n(s);t.a=i},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{childCount:e.childCount,subtype:e.subtype}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2207);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{skipChildren:e.skipChildren,childCount:e.childCount,leafCount:e.leafCount}})}
var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2208);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.title,r=e.index,o=e.route,s=e.parentTitle,u=e.parentIndex,f=e.parentRoute,v=e.originallyAvailableAt,g=Object(l.a)({seasonIndex:u,noLeadingZero:!0}),m=Object(c.a)({episodeIndex:r,date:v,noLeadingZero:!0});return o&&f?a()("span",{className:t},void 0,r>0&&!!g&&a()(d.a,{tabIndex:n,title:s,to:f},void 0,g),r>0&&!!g&&h,a()(d.a,{tabIndex:n,title:i,to:o
},void 0,m)):a()("span",{className:t},void 0,r>0&&!!g&&a()("span",{},void 0,g),r>0&&!!g&&p,a()("span",{},void 0,m))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2211)),c=n(1034),u=n(86),d=n(22),p=a()(u.a,{separator:"\xb7"}),h=a()(u.a,{separator:"\xb7"});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.episodeIndex;if(t>0||0===t)return e.noLeadingZero||(t=Object(s.a)(t)),e.useLongName?Object(o.default)("Episode {episodeNumber}",{episodeNumber:t
}):Object(o.default)("E{episodeNumber}",{episodeNumber:t});if(e.date){var n=a()(e.date);return Object(o.default)("{monthNumber}/{dayNumber}/{shortYear}",{monthNumber:n.month()+1,dayNumber:n.date(),shortYear:n.format("YY")})}return""}var r=n(41),a=n.n(r),o=n(4),s=n(623);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{index:e.index,
originallyAvailableAt:e.originallyAvailableAt}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2212);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.leafCount,i=void 0;return null!=n&&(i=1===n?Object(l.default)("{itemCount} item",{itemCount:n}):Object(l.default)("{itemCount} items",{itemCount:n})),a()("span",{className:t},void 0,i)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4));t.a=i},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{duration:e.duration,viewOffset:e.viewOffset}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(714);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e,t){return Object(a.createSelector)(Object(o.a)(),function(){return{addedAt:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).addedAt}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2217)
;t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e,t){var n=Math.abs(Date.now()-1e3*e);return n<36e5?setTimeout(t,6e4):n<864e5?setTimeout(t,36e5):void 0}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),n(295)),v=function(e){function t(n,r){s()(this,t);var a=c()(this,e.call(this,n,r));g.call(a);var o=a.props.timestamp,l=Object(f.a)(o);return a.state={title:l},a.timeoutID=i(o,a.trackTime),a}return d()(t,e),
t.prototype.componentWillReceiveProps=function(e){if(e.timestamp!==this.props.timestamp){var t=Object(f.a)(e.timestamp);this.setState({title:t})}},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 a()("span",{className:e},void 0,t)},t}(h.Component),g=function(){var e=this;this.trackTime=function(){var t=e.props.timestamp,n=Object(f.a)(t);e.setState({title:n
}),e.timeoutID=i(t,e.trackTime)}};t.a=v},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e){return e.experienceSettings.timeFormat},Object(o.a)(),Object(s.a)(),function(e,t,n){return{beginsAt:t&&t.beginsAt,endsAt:t&&t.endsAt,channel:n&&n.tag,timeFormat:e}})}var r=n(11),a=n(6),o=(n.n(a),n(358)),s=n(1043),l=n(1044);t.a=Object(r.b)(i)(l.a)},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=s()();return a()(t).forEach(function(e){n.add(t[e],e)}),n.unix()<=e}t.a=i;var r=n(50),a=n.n(r),o=n(41),s=n.n(o)},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=s()();return a()(t).forEach(function(e){n.add(t[e],e)}),n.unix()>=e}t.a=i;var r=n(50),a=n.n(r),o=n(41),s=n.n(o)},function(e,t,n){"use strict";function i(){
return Object(o.createSelector)(Object(s.a)(),Object(l.a)(),function(e,t){if(e&&t)return a.a.findWhere(e.Channel,{id:t.channelID})})}t.a=i;var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),n(21)),l=n(358)},function(e,t,n){"use strict";function i(e){var t=e.beginsAt,n=e.endsAt,i=e.channel,r=e.showChannel,a=e.showFullTime,o=e.timeFormat;if(!t)return Object(f.default)("No upcoming airings");if(Object(m.a)(t,n)){var s=n-Date.now()/1e3;return s<=60?Object(f.default)("About to end"):Object(I.a)(s)}
if(Object(v.a)(t)&&Object(g.a)(t,{minutes:60})){var l=1e3*t-Date.now();if(l<=j)return r&&i?Object(f.default)("Starting now on {channel}",{channel:i}):Object(f.default)("Starting now");var c=Object(S.a)(l);return r&&i?Object(f.default)("Starting in {duration} on {channel}",{duration:c,channel:i}):Object(f.default)("Starting in {duration}",{duration:c})}return(a?y.a:b.a)(t,r&&i,{timeFormat:o})}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),
n(4)),v=n(1041),g=n(1042),m=n(1045),y=n(1046),b=n(2220),I=n(285),S=n(351),M=n(29),D=n(86),C=n(2221),O=n.n(C),j=6e4,P=function(e){function t(n,i){s()(this,t);var r=c()(this,e.call(this,n,i));return r.onTickTimeout=function(){r.setState(r.getState(r.props)),r.setTickTimeout()},r.state=r.getState(n),r}return d()(t,e),t.prototype.componentDidMount=function(){this.setTickTimeout()},t.prototype.componentWillReceiveProps=function(e){var t=this.getState(e);t.title!==this.state.title&&this.setState(t)},
t.prototype.shouldComponentUpdate=function(e,t){return Object(M.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.onTickTimeout,j-Date.now()%j)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.beginsAt,i=e.endsAt,r=e.channel,o=e.showChannel,s=this.state.title,l=o&&!!r&&Object(m.a)(n,i)
;return a()("span",{className:t},void 0,l?a()("span",{},void 0,Object(f.default)("Now on {channel}",{channel:r}),a()(D.a,{className:O.a.separator}),s):s)},t}(h.Component);P.defaultProps={showFullTime:!1,showChannel:!1},t.a=P},function(e,t,n){"use strict";function i(e,t){if(null==e||null==t)return!1;var n=a()().unix();return n>=e&&n<=t}t.a=i;var r=n(41),a=n.n(r)},function(e,t,n){"use strict";function i(e,t){
var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.timeFormat,a=void 0===i?"h:mma":i;if(null==e)return"";var v=Object(p.default)(e,a),g=void 0;return g=Object(s.a)(e)?Object(r.default)("Yesterday"):Object(l.a)(e)?Object(c.a)(e)?Object(r.default)("Tonight"):Object(r.default)("Today"):Object(u.a)(e)?Object(r.default)("Tomorrow"):Object(d.a)(e)?Object(h.a)(e):Object(r.default)("{dayOfWeekAbbreviated}, {monthAbbreviated} {dayNumber}",{dayOfWeekAbbreviated:Object(h.a)(e,{
abbreviate:!0}),monthAbbreviated:Object(f.a)(e,{abbreviate:!0}),dayNumber:o.a.unix(e).date()}),t?Object(r.default)("{1} at {2} on {3}",g,v,t):Object(r.default)("{1} at {2}",g,v)}t.a=i;var r=n(4),a=n(41),o=n.n(a),s=n(521),l=n(359),c=n(1047),u=n(1048),d=n(1049),p=n(354),h=n(1050),f=n(716)},function(e,t,n){"use strict";function i(e){return!(null==e||!Object(r.a)(e))&&parseInt(Object(a.default)(e,"HH"),10)>16}t.a=i;var r=n(359),a=n(354)},function(e,t,n){"use strict";function i(e){if(null==e)return!1
;var t=a.a.unix(e);return a()().add(1,"day").isSame(t,"day")}t.a=i;var r=n(41),a=n.n(r)},function(e,t,n){"use strict";function i(e){if(null==e)return!1;var t=a.a.unix(e);return a()().isSame(t,"week")}t.a=i;var r=n(41),a=n.n(r)},function(e,t,n){"use strict";function i(e){var t=[Object(c.default)("Sunday"),Object(c.default)("Monday"),Object(c.default)("Tuesday"),Object(c.default)("Wednesday"),Object(c.default)("Thursday"),Object(c.default)("Friday"),Object(c.default)("Saturday")],n=t[e]
;return Object(l.a)(n,"Unknown day of the week"),n}function r(e){var t=[Object(c.default)("Sun"),Object(c.default)("Mon"),Object(c.default)("Tue"),Object(c.default)("Wed"),Object(c.default)("Thu"),Object(c.default)("Fri"),Object(c.default)("Sat")],n=t[e];return Object(l.a)(n,"Unknown day of the week"),n}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.abbreviate,a=void 0!==n&&n;if(!e)return"";var o=s.a.unix(e).day();return a?r(o):i(o)}
var o=n(41),s=n.n(o),l=n(33),c=n(4);t.a=a},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(o.a,s.a,Object(l.a)(),Object(c.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],r=i||n.tagItem;return{server:e,provider:t,reasonID:n.reasonID,reason:n.reason,reasonTitle:n.reasonTitle,originalTitle:r.originalTitle,filter:r.filter,librarySectionID:r.librarySectionID,librarySectionKey:r.librarySectionKey,
librarySectionType:r.librarySectionType}})}var r=n(11),a=n(6),o=(n.n(a),n(48)),s=n(37),l=n(360),c=n(21),u=n(2234);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";function i(){return Object(h.createSelector)(f.a,v.a,Object(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 o()({server:e,provider:t,reasonID:n.reasonID},i)})}function r(e){return d.a.createElement(m.a,e)
}var a=n(7),o=n.n(a),s=n(5),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(11),h=n(6),f=(n.n(h),n(48)),v=n(37),g=n(360),m=n(2237);t.a=Object(p.b)(i)(r)},function(e,t,n){"use strict";function i(e,t){return Object(a.createSelector)(Object(o.a)(),function(){return{duration:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).duration}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(520);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e,t){
return Object(a.createSelector)(Object(o.a)(),function(){return{lastViewedAt:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).lastViewedAt}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2242);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e,t){return Object(a.createSelector)(Object(o.a)(),function(){return{originallyAvailableAt:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).originallyAvailableAt}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2243)
;t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(o.r)(e.type),n=e.Media&&e.Media[0];return{type:t&&t.mediaType,bitrate:n&&n.bitrate}})}var r=n(11),a=n(6),o=(n.n(a),n(28)),s=n(21),l=n(2250);t.a=Object(r.b)(i)(l.a)},function(e,t,n){"use strict";function i(e,t){return Object(a.createSelector)(Object(o.a)(),function(){return{
contentRating:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).contentRating}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2251);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.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 r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2252);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict"
;function i(e){var t=e.circleClassName,n=e.iconClassName;return a()("div",{className:t},void 0,a()("span",{className:n}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2253)),c=n.n(l);i.defaultProps={circleClassName:c.a.recordCircle,iconClassName:c.a.recordIcon},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.type,i=e.width,r=e.height,o=e.isFolder;return a()(l.a,{className:(t||"")+" "+(u.a.placeholderIcon||""),type:n,width:i,height:r,isFolder:o})}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2257)),c=n(2258),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.type,n=e.isLibraryItem,i=e.isExtra,o=e.Media,s=Object(a.r)(t);if(!s)return!1;var l=o.length;return n&&!i&&s.mediaType===r.d&&l>1}t.a=i;var r=n(59),a=n(28)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(4)),f=n(24),v=n(54),g=n(26),m=n(39),y=n(22),b=n(355),I=n(173),S=n(362),M=n(437),D=n(1063),C=n(2276),O=n.n(C),j=r()(g.a,{name:"plex-icon-edit-560"}),P=r()(g.a,{name:"plex-icon-favorite-empty-560"}),w=r()(g.a,{name:"plex-icon-favorite-full-560"}),T=r()(g.a,{name:"plex-icon-remove-560"}),E=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onActionsMenuOpenChange=function(e){r.setState({isActionsMenuOpen:e})},r.state={isActionsMenuOpen:!1},
r._selectButtonID=Object(v.a)(),r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.className,n=e.serverEntityID,i=e.providerEntityID,a=e.metadataItemEntityID,o=e.containerKey,s=e.listType,l=e.route,c=e.title,u=e.viewPercent,d=e.unviewedLeafCount,p=e.mediaCount,v=e.isMultiVersion,C=e.isSmart,E=e.isFavorite,x=e.isMatching,N=e.isProcessing,A=e.isAnalyzing,L=e.isRefreshing,k=e.isTrash,_=e.showUnplayedBadge,R=e.showUnplayedNumberBadge,z=e.showLink,U=e.showLinkOnly,B=e.showPlay,V=e.showEdit,F=e.showSelect,Q=e.showMore,H=e.showFavorite,Y=e.showUnfavorite,W=e.showRemove,G=e.canDrag,K=e.hasActiveSelection,q=e.isSelected,Z=e.isOtherItemSelected,X=e.isConflictingTypeSelected,J=e.isModifierKeyPressed,$=e.isDragging,ee=e.onMouseEnter,te=e.onPlayPress,ne=e.onEditPress,ie=e.onFavoritePress,re=e.onUnfavoritePress,ae=e.onRemovePress,oe=e.onSelectPress,se=e.onDeselectPress,le=this.state.isActionsMenuOpen,ce=F&&(J||Z)
;return U?r()("div",{className:(t||"")+" "+(O.a.overlay||"")},void 0,z&&r()(y.a,{className:O.a.link,to:l})):r()("div",{className:(t||"")+" "+(O.a.overlay||"")+" "+(K&&O.a.hasActiveSelection||"")+" "+(q&&O.a.isSelected||"")+" "+(Z&&O.a.isOtherItemSelected||"")+" "+(X&&O.a.isConflictingTypeSelected||"")+" "+(F&&J&&O.a.isModifierKeyPressed||"")+" "+($&&O.a.isDragging||"")+" "+(L&&O.a.isRefreshing||"")+" "+(k&&O.a.isTrash||"")+" "+(le&&O.a.isActionsMenuOpen||""||""),onMouseEnter:ee
},void 0,r()("div",{className:O.a.background}),_&&r()("div",{className:O.a.unplayedTagContainer,"data-qa-id":"metadataPosterUnwatchedBadge"},void 0,r()("div",{className:O.a.unplayedTag})),R&&r()("div",{"data-qa-id":"metadataPosterUnwatchedNumberBadge",className:O.a.unplayedBadge},void 0,d),v&&r()("div",{className:O.a.versionBadge,"data-qa-id":"metadataPosterMultipleVersionBadge"},void 0,r()(g.a,{name:"plex-icon-files-560",className:O.a.versionBadgeIcon}),p),C&&!E&&r()("div",{
className:O.a.smartBadge,"data-qa-id":"metadataPosterSmartBadge"},void 0,r()(g.a,{name:"plex-icon-settings-560",className:O.a.smartBadgeIcon})),C&&E&&r()("div",{className:O.a.favoriteBadge,"data-qa-id":"metadataPosterFavoriteBadge"},void 0,r()(g.a,{name:"plex-icon-favorite-full-560",className:O.a.favoriteBadgeIcon})),!!u&&r()(D.a,{className:O.a.progress,progress:u}),L&&r()("div",{className:O.a.refreshingSpinnerContainer},void 0,r()(m.a,{className:O.a.refreshingSpinner})),x&&r()("div",{
className:O.a.refreshingCircle},void 0,r()(g.a,{name:"plex-icon-search-560","aria-label":Object(h.default)("Matching")})),N&&r()("div",{className:O.a.refreshingCircle},void 0,r()(g.a,{name:"plex-icon-tagging-560","aria-label":Object(h.default)("Downloading Metadata")})),A&&r()("div",{className:O.a.refreshingCircle},void 0,r()(g.a,{name:"plex-icon-analyzing-560","aria-label":Object(h.default)("Analyzing")})),k&&r()("div",{className:O.a.trashCircle},void 0,r()(g.a,{name:"plex-icon-trash-560",
"aria-label":Object(h.default)("In Trash")})),z&&r()(y.a,{className:O.a.link,to:l}),ce&&!X&&r()(y.a,{className:O.a.selectCoverButton,onPress:oe}),ce&&X&&r()(b.a,{className:O.a.selectCoverButton,component:y.a,tooltip:Object(h.default)("A different type is selected"),tooltipAttachment:f.f.TOP_CENTER,tooltipTarget:this._selectButtonID,showOnFocus:!1,hideOnPress:!1}),B&&r()(I.a,{className:z?O.a.playButton:O.a.playCoverButton,circleClassName:O.a.playCircle,component:G?"div":"button",tabIndex:"-1",
title:c,"data-qa-id":"metadataPosterPlayButton",onPress:te}),V&&r()(y.a,{className:O.a.editButton,tabIndex:"-1","aria-label":Object(h.default)("Edit {title}",{title:c}),"data-qa-id":"metadataPosterEditButton",onPress:ne},void 0,j),H&&r()(y.a,{className:O.a.favoriteButton,tabIndex:"-1","aria-label":Object(h.default)("Add {title} to favorites",{title:c}),"data-qa-id":"metadataPosterFavoriteButton",onPress:ie},void 0,P),Y&&r()(y.a,{className:O.a.favoriteButton,tabIndex:"-1",
"aria-label":Object(h.default)("Remove {title} from favorites",{title:c}),"data-qa-id":"metadataPosterUnfavoriteButton",onPress:re},void 0,w),W&&r()(y.a,{className:O.a.removeButton,tabIndex:"-1","aria-label":Object(h.default)("Remove {title}",{title:c}),onPress:ae},void 0,T),Q&&r()(M.a,{"data-qa-id":"metadataPosterMoreButton",className:O.a.moreButton,tabIndex:"-1",serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,containerKey:o,listType:s,showPlay:!1,showQueuePlexMix:!1,showEdit:!1,
isMenuOpen:le,onMenuOpenChange:this.onActionsMenuOpenChange}),F&&r()(S.a,{id:this._selectButtonID,className:O.a.selectButton,circleClassName:O.a.selectCircle,tabIndex:"-1",title:c,isSelected:q,isDisabled:X,onPress:oe}),q&&r()(y.a,{className:O.a.deselectCoverButton,onPress:se}))},t}(p.Component);t.a=E},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(2275)),f=n.n(h),v=function(e){function t(n,i){o()(this,t)
;var r=l()(this,e.call(this,n,i));return r.state={progress:n.progress},r}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 r()("div",{className:e},void 0,r()("div",{className:f.a.progressTrack}),r()("div",{style:{transform:"translate3d(-"+(100-t)+"%, 0, 0)"},className:f.a.progressBar}))},t}(p.Component);v.defaultProps={progress:f.a.progress},t.a=v
},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(170)),a=Object(i.createSelector)(r.a,function(e){return e.libraries});t.a=a},function(e,t,n){"use strict";function i(e){return e.get("ui").get("mediaSubscriptionModal")}n.d(t,"e",function(){return b}),n.d(t,"b",function(){return I}),n.d(t,"h",function(){return M}),n.d(t,"a",function(){return D}),n.d(t,"c",function(){return C}),n.d(t,"g",function(){return O}),n.d(t,"d",function(){return j}),n.d(t,"f",function(){return P})
;var r,a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(19),u=n(28),d=n(78),p=n(34),h=n(1066),f=n(36),v=n(105),g=n(90),m=n(1067),y=n(527),b=Object(f.a)("ui/modal/initMediaSubscriptionModal"),I=Object(f.a)("ui/modal/clearMediaSubscriptionModal"),S=Object(f.a)("ui/modal/fetchMediaSubscription"),M=Object(f.a)("ui/modal/saveMediaSubscription"),D=Object(f.a)("ui/modal/changeMediaSubscriptionTemplateMode"),C=Object(f.a)("ui/modal/clearMediaSubscriptionModalError"),O=Object(f.a)("ui/modal/moveMediaSubscriptionModal"),j=Object(f.a)("ui/modal/deleteMediaSubscriptionModal"),P=Object(v.a)((r={},
r["ui/modal/initMediaSubscriptionModal"]=function(e,t,n){var r=i(e);r.set("isMediaSubscriptionPending",!0);var a={};if(t.showConflicts&&(a.options={data:{includeGrabs:1}}),t.mediaSubscriptionEntityID)return r.set({mediaSubscription:Object(d.c)(e,t)}),void n(S(a));var o=Object(d.j)(e,t),s=Object(d.d)(e,t),u=s.get("grandparentSubscriptionID")||s.get("subscriptionID");if(u)return r.set({mediaSubscription:new y.a({key:u},{server:o})}),void n(S(a));var p=c.join("/media/subscriptions/template",{
guid:s.get("guid")}),h=o.getXHROptions(p);l.a.ajax(h).done(function(e){var t=new m.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})})},r["ui/modal/clearMediaSubscriptionModal"]=function(e){i(e).restoreDefaults()},r["ui/modal/fetchMediaSubscription"]=Object(g.a)({
key:"mediaSubscription",getModel:i}),r["ui/modal/saveMediaSubscription"]=function(e,t){var n=i(e),r=Object(d.j)(e,t),a=n.get("mediaSubscription"),s=t.targetLibrarySectionID,h=t.targetSectionLocationID,f=void 0===h?null:h,v=t.prefs;Object(p.a)(function(){n.set({isMediaSubscriptionSaving:!0,mediaSubscriptionSaveError:null})});var g=a.get("key"),m=a.getSaveParams(),y=l.a.extend(!0,{},m,{includeGrabs:1,targetLibrarySectionID:s,targetSectionLocationID:f,prefs:v}),b=c.join(o.a.result(a,"url"),y)
;if(!g){var I=Object(u.r)(a.get("target").get("type"));b=b+"&"+a.get("parameters")+"&type="+I.id}var S=r.getXHROptions(b,{type:g?"PUT":"POST"});l.a.ajax(S).done(function(i){if(a.set(a.parse(i)),n.set({templates:void 0,isMediaSubscriptionSaving:!1}),t.metadataItemEntityID){var r=Object(d.d)(e,t);if(r){var o,s=a.get("target").get("type"),l=Object(u.v)(s),c=l?"grandparentSubscriptionID":"subscriptionID",p=l?"grandparentSubscriptionType":"subscriptionType";r.set((o={},o[c]=a.id,o[p]=s,o))}}
}).fail(function(e){n.set({isMediaSubscriptionSaving:!1,mediaSubscriptionSaveError:e})})},r["ui/modal/changeMediaSubscriptionTemplateMode"]=function(e,t){var n=i(e),r=n.get("templates"),a=t.modeIndex;n.set("mediaSubscription",r.at(a))},r["ui/modal/clearMediaSubscriptionModalError"]=function(e,t){i(e).set({mediaSubscriptionSaveError:null,mediaSubscriptionError:null,mediaSubscriptionMoveError:null,mediaSubscriptionDeleteError:null})},r["ui/modal/moveMediaSubscriptionModal"]=function(e,t){
var n=i(e),r=n.get("mediaSubscription");Object(p.a)(function(){n.set({isMediaSubscriptionMoving:!0,mediaSubscriptionMoveError:null})}),Object(h.a)(r).done(function(){n.set({isMediaSubscriptionMoving:!1})}).fail(function(e){n.set({isMediaSubscriptionMoving:!1,mediaSubscriptionMoveError:e})})},r["ui/modal/deleteMediaSubscriptionModal"]=function(e,t,n){var r=i(e),a=r.get("mediaSubscription");Object(p.a)(function(){r.set({isMediaSubscriptionDeleting:!0,mediaSubscriptionDeleteError:null})}),
a.destroy({wait:!0}).done(function(){if(r.set({isMediaSubscriptionDeleting:!1}),t.metadataItemEntityID){var n=Object(d.d)(e,t),i=a.get("key");n.get("subscriptionID")===i?(n.unset("subscriptionID"),n.unset("subscriptionType")):n.get("grandparentSubscriptionID")===i&&(n.unset("grandparentSubscriptionID"),n.unset("grandparentSubscriptionType"))}}).fail(function(e){r.set({isMediaSubscriptionDeleting:!1,mediaSubscriptionDeleteError:e})})},r))},function(e,t,n){"use strict";function i(e,t){
var n=e.server,i=a.a.result(e,"url"),r=n.getXHROptions(l.join([i,"move"],{after:t}),{type:"PUT"});return s.a.ajax(r).promise()}t.a=i;var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(19)},function(e,t,n){"use strict";var i=n(94),r=n(51),a=n(23),o=n(527),s=a.a.extend({name:"MediaSubscriptionTemplateCollection",context:["server"],url:"/media/subscriptions/template",model:o.a,augmentResponseText:function(e,t){return t===r.a.xml?Object(i.b)(e):e},augmentResponse:function(e){return e.SubscriptionTemplate}})
;t.a=s},function(e,t,n){"use strict";function i(e,t){var n=t.libraryID,i=t.libraryType,r=t.cancel,o=t.force,d=t.allowMetrics,p=t.metricsProperties,h=void 0===p?{}:p,f=o?{force:1}:void 0,v=Object(u.join)(["/library/sections",n,"refresh"],f),g=e.getXHROptions(v,{type:r?"DELETE":"GET"});if(d){var m=void 0;m=r?c.g:o?c.w:c._0,Object(l.d)("metrics").trackClick(a()({},h,{action:m,type:"all"===n?"all":i}))}return s.a.ajax(g).promise()}t.a=i;var r=n(7),a=n.n(r),o=n(12),s=n.n(o),l=n(15),c=n(73),u=n(19)
},function(e,t,n){"use strict";var i=n(12),r=n.n(i),a=n(16),o=n(18),s=o.a.extend({name:"CloudDriveUpdateStatusModel",context:["server"],url:"/services/clouddrive/updatestatus",syncedAttrs:{updating:a.a.boolean},fetchAndNotUpdating:function(){var e=this;return this.fetch().then(function(){return e.get("updating")?r.a.Deferred().rejectWith(e,[e]).promise():e})}});t.a=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var i=n(19),r=n(51),a=n(18),o=n(16),s=n(2301),l=n(2303),c=a.a.extend({name:"FilePathListModel",responseType:r.a.json,context:["server","includeFiles","url"],url:function(){var e={};return this.includeFiles&&(e.includeFiles=1),i.join(["/services/browse"],e)},sessionAttrs:{truncatedFilesCount:o.a.integer},syncedRelations:{paths:{relationClass:s.a,rootPropertyName:"Path"},files:{relationClass:l.a,rootPropertyName:"File"}},augmentResponse:function(e){
return e.File&&(e.truncatedFilesCount=Math.max(0,e.File.length-500),e.File=e.File.slice(0,500)),e}});t.default=c},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(67),l=n(117),c=n(2323),u=l.a.extend({whitelistedAttrs:["id","home","protected","restricted","title","username","email","thumb","recommendationsPlaylistId","allowSync","allowCameraUpload","allowChannels","allowTuners","filterMovies","filterTelevision","filterMusic","filterPhotos"],
saveAttrs:["allowSync","allowCameraUpload","allowChannels","allowTuners","filterMovies","filterTelevision","filterMusic","filterPhotos"],filterAttrs:["filterMovies","filterTelevision","filterMusic","filterPhotos"],urlRoot:function(){return this.get("home")?"/api/users":"/api/friends"},convert:function(e){var t=r.a.isObject(e)?e:s.a.parseXML(e);return t.User&&(t=t.User),s.a.parseInteger(t,"id"),
s.a.parseBoolean(t,["home","protected","restricted","allowSync","allowCameraUpload","allowChannels","allowTuners"]),s.a.parseQueryString(t,["filterMovies","filterTelevision","filterMusic","filterPhotos"],"|"),s.a.parseArray(t,"Server"),t},parse:function(e){var t=this.convert(e);return this.parseServers(t),t=r.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(o.a.extend(!0,{},e),t)||null},getSaveParams:function(e,t){var n=this;if(r.a.isEmpty(e)){var i=this.pick(this.saveAttrs);return r.a.map(i,function(e,t,i){
r.a.isBoolean(e)?i[t]=e?"1":"0":r.a.contains(n.filterAttrs,t)&&(i[t]=n.stringifyFilter(e))},this),i}return l.a.prototype.getSaveParams.apply(this,arguments)},stringifyFilter:function(e){return r.a.map(r.a.keys(e),function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("|")}});t.a=u},function(e,t,n){"use strict";function i(e){a.a.flushDebouncedSave(),r.a.set("main.webMode",e)}t.a=i;var r=n(163),a=n(164)},function(e,t,n){var i=n(254).default,r=n(152);e.exports=r(i)
},function(e,t,n){"use strict";var i=n(23),r=n(2366),a=i.a.extend({name:"ChannelMappingCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({name:"EPGCountryModel",context:["server"],idAttribute:"code",rootPropertyName:"Country",syncedAttrs:{key:r.a.string,type:r.a.string,title:r.a.string,code:r.a.string,example:r.a.string,flavor:r.a.integer,language:r.a.string,languageTitle:r.a.string}});t.a=a},function(e,t,n){"use strict"
;var i=n(18),r=n(16),a=i.a.extend({name:"EPGCountryRegionModel",context:["server"],idAttribute:"key",rootPropertyName:"Region",syncedAttrs:{key:r.a.string,type:r.a.string,title:r.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(16),a=n(276),o=n(728),s=i.a.extend({name:"DVRModel",context:["server"],rootPropertyName:"Dvr",idAttribute:"key",sessionAttrs:{isSaving:r.a.boolean,saveError:r.a.object},syncedAttrs:{key:r.a.integer,epgIdentifier:r.a.string,country:r.a.string,
language:r.a.string,lineup:r.a.string,lineupTitle:r.a.string,uuid:r.a.string},syncedRelations:{devices:{relationClass:o.a,rootPropertyName:"Device"},prefs:{relationClass:a.a,rootPropertyName:"Setting",deferred:!0,save:!0}},defaults:{isSaving:!1,saveError:null}});t.a=s},function(e,t,n){"use strict";var i=n(23),r=n(2380),a=i.a.extend({name:"DVRNetworkCollection",model:r.a});t.a=a},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=s()(e,["className","children"])
;return a()("div",{className:(d.a.grid||"")+" "+(t||""),style:i},void 0,n)}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(2384)),d=n.n(u);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.className,n=e.children,i=s()(e,["className","children"]);return a()("div",{className:t,style:i},void 0,n)}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0))
;n.n(c);i.defaultProps={flexGrow:1,flexShrink:0},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.name,n=(e.initialValue,e.labelText),i=(e.showErrors,e.errors,e.validations,c()(e,["name","initialValue","labelText","showErrors","errors","validations"]));return s()("div",{},void 0,s()(v.a,{name:t},void 0,n),p.a.createElement(g.a,a()({name:t,size:h.e.SMALL},i)))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(24),f=n(146),v=n(133),g=n(225)
;t.a=Object(f.a)(i)},function(e,t,n){"use strict";function i(e,t){var n=-1*t+1,i=n/30+o,r=e*i;return Math.max(Math.min(r,l+30*n),s)}var r=n(45),a=n.n(r),o=parseFloat(a.a.prePlayPosterWidthRatio,10),s=parseInt(a.a.prePlayPosterMinWidth,10),l=parseInt(a.a.prePlayPosterMaxWidth,10);t.a=i},function(e,t){e.exports={innerEmptyPage:"InnerEmptyPage-innerEmptyPage-1MHKZ EmptyPage-emptyPage-2AM9u",innerEmptyPageContent:"InnerEmptyPage-innerEmptyPageContent-3kRFW EmptyPage-content-10PgB"}},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.icon,i=e.title,r=e.text;return a()("div",{className:t},void 0,a()("div",{className:u.a.iconContainer},void 0,a()(l.a,{className:u.a.icon,name:n})),a()("div",{className:u.a.title},void 0,i),a()("div",{className:u.a.text},void 0,r))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(26)),c=n(2416),u=n.n(c);i.defaultProps={className:u.a.upsell},t.a=i},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(function(e){
return e.user},Object(u.a)(),Object(d.a)(p.i),function(e,t,n){return{machineIdentifier:t.machineIdentifier,isClaimed:t.isClaimed,isSignedIn:!!e&&e.signedIn,hasPlexPass:!!e&&e.hasPlexPass,hasTypeFirstSettings:n}})}var r=n(7),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(6),u=(n.n(c),n(42)),d=n(232),p=n(52),h=n(2417),f=Object(l.b)(i)(h.a);f.propTypes=a()({},f.propTypes,{serverEntityID:s.a.string.isRequired}),t.a=f},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return l})
;var i,r=n(241),a=n(36),o=n(34),s=Object(a.a)("user/lockUser"),l=(i={},i["user/lockUser"]=function(e){Object(o.a)(function(){e.get("user").set("lockState",r.a.lockStates.LOCKED)})},i)},function(e,t,n){"use strict";function i(e){var t=e.img,n=e.title,i=e.description;return a()("div",{className:c.a.feature},void 0,a()("div",{className:c.a.featurePadding},void 0,a()("img",{className:c.a.featureImage,src:t}),a()("div",{className:c.a.featureContainer},void 0,a()("div",{className:c.a.featureTitle
},void 0,n),a()("div",{className:c.a.featureDescription},void 0,i))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2421)),c=n.n(l);t.a=i},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8ZyBmaWxsPSIjQ0M3QjE5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMCA0KSI+CiAgICA8cGF0aCBkPSJNMTUuOTUxLDE2LjQ0NCBDMTUuODUsMTYuMTkzIDE1LjYwOCwxNi4wMjkgMTUuMzM5LDE2LjAyOCBMMTIuNjY3LDE2LjAwNSBMMTIuNjY3LDEwIEMxMi42NjcsOS42MzIgMTIuMzY4LDkuMzMzIDEyLDkuMzMzIEw4LDkuMzMzIEM3LjYzMiw5LjMzMyA3LjMzMyw5LjYzMiA3LjMzMywxMCBMNy4zMzMsMTYgTDQuNjEsMTYgQzQuMzQxLDE2IDQuMDk3LDE2LjE2MyAzLjk5NCwxNi40MTIgQzMuODksMTYuNjYxIDMuOTQ3LDE2Ljk0OCA0LjEzOCwxNy4xMzkgTDkuNDcxLDIyLjQ3MiBDOS42MDIsMjIuNjAxIDkuNzcyLDIyLjY2NyA5Ljk0MywyMi42NjcgQzEwLjExMSwyMi42NjcgMTAuMjgsMjIuNjAzIDEwLjQxMSwyMi40NzUgTDE1LjgsMTcuMTcgQzE1Ljk5MiwxNi45ODEgMTYuMDUyLDE2LjY5NSAxNS45NDksMTYuNDQ1IEwxNS45NTEsMTYuNDQ0IFogTTkuOTQ4LDIxLjA2MSBMNi4yMiwxNy4zMzMgTDgsMTcuMzMzIEM4LjM2OCwxNy4zMzMgOC42NjcsMTcuMDM0IDguNjY3LDE2LjY2NiBMOC42NjcsMTAuNjY2IEwxMS4zMzQsMTAuNjY2IEwxMS4zMzQsMTYuNjY2IEMxMS4zMzQsMTcuMDMxIDExLjYyOSwxNy4zMyAxMS45OTUsMTcuMzMzIEwxMy43MTksMTcuMzQ4IEw5Ljk0OCwyMS4wNjEgWiIvPgogICAgPHBhdGggZD0iTTE2LDcuODg4NjA5MDVlLTMxIEw0LDcuODg4NjA5MDVlLTMxIEMyLjE2Myw3Ljg4ODYwOTA1ZS0zMSAwLjY2NywxLjQ5NSAwLjY2NywzLjMzMyBMMC42NjcsMjguNjY2IEMwLjY2NywzMC41MDUgMi4xNjMsMzEuOTk5IDQsMzEuOTk5IEwxNiwzMS45OTkgQzE3LjgzNywzMS45OTkgMTkuMzMzLDMwLjUwNCAxOS4zMzMsMjguNjY2IEwxOS4zMzMsMy4zMzMgQzE5LjMzMywxLjQ5NCAxNy44MzcsLTEuNzc2MzU2ODRlLTE1IDE2LDcuODg4NjA5MDVlLTMxIFogTTIsNi42NjcgTDE4LDYuNjY3IEwxOCwyNS4zMzQgTDIsMjUuMzM0IEwyLDYuNjY3IFogTTQsMS4zMzMgTDE2LDEuMzMzIEMxNy4xMDMsMS4zMzMgMTgsMi4yMyAxOCwzLjMzMyBMMTgsNS4zMzMgTDIsNS4zMzMgTDIsMy4zMzMgQzIsMi4yMyAyLjg5NywxLjMzMyA0LDEuMzMzIFogTTE2LDMwLjY2NyBMNCwzMC42NjcgQzIuODk3LDMwLjY2NyAyLDI5Ljc3IDIsMjguNjY3IEwyLDI2LjY2NyBMMTgsMjYuNjY3IEwxOCwyOC42NjcgQzE4LDI5Ljc3IDE3LjEwMywzMC42NjcgMTYsMzAuNjY3IFoiLz4KICAgIDxwYXRoIGQ9Ik02LjY2NyA0TDEzLjMzNCA0QzEzLjcwMiA0IDE0LjAwMSAzLjcwMSAxNC4wMDEgMy4zMzMgMTQuMDAxIDIuOTY1IDEzLjcwMiAyLjY2NiAxMy4zMzQgMi42NjZMNi42NjcgMi42NjZDNi4yOTkgMi42NjYgNiAyLjk2NSA2IDMuMzMzIDYgMy43MDEgNi4yOTkgNCA2LjY2NyA0ek0xMS4zMzMgMjguNjY3QzExLjMzMyAyOS40MDMgMTAuNzM2IDMwIDEwIDMwIDkuMjY0IDMwIDguNjY3IDI5LjQwMyA4LjY2NyAyOC42NjcgOC42NjcgMjcuOTMxIDkuMjY0IDI3LjMzNCAxMCAyNy4zMzQgMTAuNzM2IDI3LjMzNCAxMS4zMzMgMjcuOTMxIDExLjMzMyAyOC42Njd6Ii8+CiAgPC9nPgo8L3N2Zz4K"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8ZyBmaWxsPSIjQ0M3QjE5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1IDUpIj4KICAgIDxwYXRoIGQ9Ik0xNS4zMzMsMTcuNjY3IEMxNC45NjUsMTcuNjY3IDE0LjY2NiwxNy45NjYgMTQuNjY2LDE4LjMzNCBMMTQuNjY2LDI0LjMzNCBMMS4zMzMsMjQuMzM0IEwxLjMzMywxMS4wMDEgTDcuMzMzLDExLjAwMSBDNy43MDEsMTEuMDAxIDgsMTAuNzAyIDgsMTAuMzM0IEM4LDkuOTY2IDcuNzAxLDkuNjY3IDcuMzMzLDkuNjY3IEwxLjMzMyw5LjY2NyBMMS4zMzMsNy42NjcgQzEuMzMzLDYuNTY0IDIuMjMsNS42NjcgMy4zMzMsNS42NjcgTDcuMzMzLDUuNjY3IEM3LjcwMSw1LjY2NyA4LDUuMzY4IDgsNSBDOCw0LjYzMiA3LjcwMSw0LjMzMyA3LjMzMyw0LjMzMyBMMy4zMzMsNC4zMzMgQzEuNDk2LDQuMzMzIDAsNS44MjggMCw3LjY2NiBMMCwyNy42NjYgQzAsMjkuNTA1IDEuNDk2LDMwLjk5OSAzLjMzMywzMC45OTkgTDEyLjY2NiwzMC45OTkgQzE0LjUwMywzMC45OTkgMTUuOTk5LDI5LjUwNCAxNS45OTksMjcuNjY2IEwxNS45OTksMTguMzMzIEMxNS45OTksMTcuOTY1IDE1LjcsMTcuNjY2IDE1LjMzMiwxNy42NjYgTDE1LjMzMywxNy42NjcgWiBNMTIuNjY3LDI5LjY2NyBMMy4zMzQsMjkuNjY3IEMyLjIzMSwyOS42NjcgMS4zMzQsMjguNzcgMS4zMzQsMjcuNjY3IEwxLjMzNCwyNS42NjcgTDE0LjY2NywyNS42NjcgTDE0LjY2NywyNy42NjcgQzE0LjY2NywyOC43NyAxMy43NywyOS42NjcgMTIuNjY3LDI5LjY2NyBaIi8+CiAgICA8cGF0aCBkPSJNNy4zMzMgN0w2IDdDNS42MzIgNyA1LjMzMyA3LjI5OSA1LjMzMyA3LjY2NyA1LjMzMyA4LjAzNSA1LjYzMiA4LjMzNCA2IDguMzM0TDcuMzMzIDguMzM0QzcuNzAxIDguMzM0IDggOC4wMzUgOCA3LjY2NyA4IDcuMjk5IDcuNzAxIDcgNy4zMzMgN3pNOS4zMzMgMjcuNjY3QzkuMzMzIDI4LjQwMyA4LjczNiAyOSA4IDI5IDcuMjY0IDI5IDYuNjY3IDI4LjQwMyA2LjY2NyAyNy42NjcgNi42NjcgMjYuOTMxIDcuMjY0IDI2LjMzNCA4IDI2LjMzNCA4LjczNiAyNi4zMzQgOS4zMzMgMjYuOTMxIDkuMzMzIDI3LjY2N3pNMjcuMzMzLjMzM0wxNCAuMzMzQzEyLjE2My4zMzMgMTAuNjY3IDEuODI4IDEwLjY2NyAzLjY2NkwxMC42NjcgMTEuNjY2QzEwLjY2NyAxMy41MDUgMTIuMTYzIDE0Ljk5OSAxNCAxNC45OTlMMjcuMzMzIDE0Ljk5OUMyOS4xNyAxNC45OTkgMzAuNjY2IDEzLjUwNCAzMC42NjYgMTEuNjY2TDMwLjY2NiAzLjY2NkMzMC42NjYgMS44MjcgMjkuMTcuMzMzIDI3LjMzMy4zMzN6TTE1LjY0OCAxMy42NjdMMTcuNDM5IDEwLjY4NCAyMC40ODYgMTEuODM2QzIwLjc5MSAxMS45NDkgMjEuMTM3IDExLjgyNyAyMS4zMDEgMTEuNTQzTDI0LjA4NSA2LjY2NyAyNi4wODkgMTMuNjY3IDE1LjY0OSAxMy42NjcgMTUuNjQ4IDEzLjY2N3pNMjkuMzMzIDExLjY2N0MyOS4zMzMgMTIuNzIzIDI4LjUwOSAxMy41ODIgMjcuNDcyIDEzLjY1MkwyNC45MzIgNC43NzlDMjQuODU5IDQuNTIyIDI0LjYzNyA0LjMzMiAyNC4zNzIgNC4zMDIgMjQuMDkzIDQuMjYzIDIzLjg0NSA0LjM5OSAyMy43MTMgNC42MzNMMjAuNDI0IDEwLjM4OCAxNy4zODkgOS4yNDFDMTcuMDg4IDkuMTI5IDE2Ljc0OSA5LjI0NiAxNi41ODIgOS41MjJMMTQuMDk0IDEzLjY2NyAxMy45OTkgMTMuNjY3QzEyLjg5NiAxMy42NjcgMTEuOTk5IDEyLjc3IDExLjk5OSAxMS42NjdMMTEuOTk5IDMuNjY3QzExLjk5OSAyLjU2NCAxMi44OTYgMS42NjcgMTMuOTk5IDEuNjY3TDI3LjMzMiAxLjY2N0MyOC40MzUgMS42NjcgMjkuMzMyIDIuNTY0IDI5LjMzMiAzLjY2N0wyOS4zMzIgMTEuNjY3IDI5LjMzMyAxMS42Njd6Ii8+CiAgICA8cGF0aCBkPSJNMTcuMTQ1LDMuODMzIEMxNi4wMzcsMy44MzMgMTUuMTM3LDQuNzM0IDE1LjEzNyw1Ljg0MSBDMTUuMTM3LDYuOTQ4IDE2LjAzNyw3Ljg0OSAxNy4xNDUsNy44NDkgQzE4LjI1Myw3Ljg0OSAxOS4xNTMsNi45NDggMTkuMTUzLDUuODQxIEMxOS4xNTMsNC43MzQgMTguMjUzLDMuODMzIDE3LjE0NSwzLjgzMyBaIE0xNy4xNDUsNi41MTYgQzE2Ljc3Myw2LjUxNiAxNi40Nyw2LjIxMyAxNi40Nyw1Ljg0MSBDMTYuNDcsNS40NjkgMTYuNzczLDUuMTY2IDE3LjE0NSw1LjE2NiBDMTcuNTE3LDUuMTY2IDE3LjgyLDUuNDY5IDE3LjgyLDUuODQxIEMxNy44Miw2LjIxMyAxNy41MTcsNi41MTYgMTcuMTQ1LDYuNTE2IFoiLz4KICA8L2c+Cjwvc3ZnPgo="
},function(e,t,n){"use strict";function i(){return Object(d.createSelector)(m.a,y.a,Object(p.a)(),function(e,t,n){return{metadataListEntityID:n.metadataList,directoryListEntityID:n.directoryList,server:e,provider:t,hubIdentifier:n.hubIdentifier,metricsContext:n.context,title:n.title,type:n.type,subtype:n.subtype,style:n.style,size:n.size,more:n.more,random:n.random,containerKey:n.key}})}function r(e){
var t=e.metadataListEntityID,n=e.directoryListEntityID,i=e.title,r=e.hubIdentifier,a=e.type,s=e.subtype,l=e.hubContext,u=e.metricsContext,d=e.containerKey,p=e.server,m=e.provider,y=r.indexOf("music.video")>-1?h.f:a,M=l||Object(f.a)(r),D=void 0;return d&&l!==g.a&&(D=Object(v.a)(p,m,{key:d,title:i,type:y,subtype:s,context:u})),c.a.createElement(b.a,o()({},e,{metadataListEntityID:t||n,component:t?I.a:S.a,listType:y,listSubtype:s,listContext:M,hubLink:D}))}var a=n(7),o=n.n(a),s=n(1),l=(n.n(s),
n(0)),c=n.n(l),u=n(11),d=n(6),p=(n.n(d),n(692)),h=n(229),f=n(2430),v=n(693),g=n(31),m=n(48),y=n(37),b=(n(95),n(87),n(158)),I=n(1092),S=n(2442);t.a=Object(u.b)(i)(r)},function(e,t,n){"use strict";function i(e){var t=e.key,n=e.getModel,i=Object(r.a)(t),o="is"+i+"Pending",s="is"+i+"Populated",l=t?t+"Error":"error";return function(e,i){
var r=i.startIndex,c=i.endIndex,u=i.pages,d=void 0===u?3:u,p=i.reloadThreshold,h=void 0===p?6:p,f=i.disableReloadThreshold,v=c-r+1,g=n(e,i),m=t?g.get(t):g,y=(g.sessionAttrs,m.get("populatedRange")),b=r,I=c;if(r<y.start?b=Math.max(0,r-v*d):I=r+v*d,!(b>=y.start&&I<=y.end)){var S=g.get(o);g.set(o,!0),m.populateRange({start:b,end:I,reloadThreshold:f?null:v*h}).done(function(){var e;g.set((e={},e[o]=!1,e[s]=!0,e[l]=null,e))}).fail(function(e,t){var n;if(t.aborting)return void g.set(o,S);g.set((n={},
n[o]=!1,n[l]=Object(a.a)(t),n))})}}}t.a=i;var r=(n(33),n(326)),a=n(140)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.metadataItemEntityIDs,o=e.containerKey,l=e.listType,c=e.listSubtype,g=e.listContext,m=e.columnAdjustment,y=e.populatedRange,b=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","metadataItemEntityIDs","containerKey","listType","listSubtype","listContext","columnAdjustment","populatedRange"]),I=Object(d.b)(l,g,{providerEntityID:n,subtype:c});return u.a.createElement(f.a,a()({},b,{containerKey:o,listType:l,
listContext:g,keyPropName:"metadataItemEntityID",items:r,itemsOffset:y.start,layout:Object(p.a)(l,c,g,m,I.length),cellRenderer:Object(h.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,containerKey:o,listType:l,listSubtype:c,listContext:g,titleComponents:I,metricsContext:e.metricsContext||e.hubIdentifier},v.a)}))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=(n(441),n(31),n(174)),p=n(533),h=n(123),f=n(535),v=n(536);t.a=i},function(e,t,n){"use strict"
;function i(e){return e===r.a||e===r.d}t.a=i;var r=n(31)},function(e,t,n){"use strict";function i(e){var t=e.cellWidth,n=e.aspectRatio,i=e.titleHeight,r=void 0===i?0:i;return Math.floor(t/n+r)}t.a=i},function(e,t,n){"use strict";var i={},r={getPageKey:function(){return window.location.hash},getKey:function(e){return r.getPageKey()+"!"+e},get:function(e){return i[e]},set:function(e,t){i[e]=t},remove:function(e){delete i[e]},clear:function(){i={}}};t.a=r},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(function(e,t){return t.listSubtype},Object(a.a)(),function(e,t){return t?t.subtype:e})}t.a=i;var r=n(6),a=(n.n(r),n(21))},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="list"},function(e,t,n){"use strict";function i(e){switch(e){case c.a:return u.a;default:return d.a}}function r(e){var t=i(e.hubStyle);return function(n){return l.a.createElement(t,o()({},e,n))}}t.a=r;var a=n(7),o=n.n(a),s=n(0),l=n.n(s),c=n(1097),u=n(2444),d=n(2448)
},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.metricsContext},Object(a.a)(),o.a,s.a,function(e,t,n,i){if(t){var r={key:t.key,title:t.title,content:t.content,context:t.context||e};return Object(l.a)(n,i,r)}})}t.a=i;var r=n(6),a=(n.n(r),n(736)),o=n(48),s=n(37),l=n(693)},function(e,t,n){"use strict";function i(e){if(e){var t=void 0,n=void 0,i=e.match(/^server:\/\/(.*)\/(.*)/);if(i)t=i[1],n=i[2];else{var s=e.match(/^provider:\/\/(.*)/)
;if(!s)return;t=r.a,n=s[1]}var l=Object(a.a)(o.m,t);return{serverEntityID:l,providerEntityID:Object(a.a)(o.k,n,l)}}}t.a=i;var r=n(172),a=n(40),o=n(43)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.type,o=e.summary,s=e.showStreams;return a()("div",{},void 0,a()(u.a,{},void 0,a()(p.a,{},void 0,a()(v.a,{},void 0,a()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),a()(h.a,{},void 0,a()(v.a,{},void 0,a()(c.a,{
serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),a()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),a()(f.a,{},void 0,a()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(S.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),M,a()(u.a,{},void 0,a()(y.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,type:r}),s&&a()(b.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(I.a,{},void 0,o)))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(230)),c=n(255),u=n(107),d=n(125),p=n(136),h=n(183),f=n(184),v=n(96),g=n(737),m=n(233),y=n(300),b=n(1103),I=n(147),S=n(1106),M=a()(d.a,{});i.defaultProps={showStreams:!0},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return a()("span",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2463)),c=n.n(l);i.defaultProps={className:c.a.tertiaryTitleSpacer},t.a=i},function(e,t,n){
"use strict";function i(){return Object(m.createSelector)(function(e){return e.ui.prePlayPage.decisionMediaItem},Object(y.a)(),function(e,t){return{mediaItem:e,mediaItems:t.Media}})}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(6),y=(n.n(m),n(21)),b=n(282),I=n(369),S=n(57),M=n(2475),D={dispatchMakePrePlayVideoDecision:I.f,dispatchSelectMetadataItemStream:b.e},C=function(e){function t(){var n,i,r;c()(this,t)
;for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=d()(this,e.call.apply(e,[this].concat(o))),i.onAudioStreamSelect=function(e){i.props.dispatchSelectMetadataItemStream({metadataItemEntityID:i.props.metadataItemEntityID,streamTypeString:"audio",streamID:e,allParts:!0,metricsPage:i.props.metricsPage})},i.onSubtitlesStreamSelect=function(e){i.props.dispatchSelectMetadataItemStream({metadataItemEntityID:i.props.metadataItemEntityID,streamTypeString:"subtitles",
streamID:e,allParts:!0,metricsPage:i.props.metricsPage})},r=n,d()(i,r)}return h()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchMakePrePlayVideoDecision()},t.prototype.componentDidUpdate=function(e){e.mediaItems!==this.props.mediaItems&&e.dispatchMakePrePlayVideoDecision()},t.prototype.render=function(){var e=this.props,t=(e.metricsPage,e.dispatchMakePrePlayVideoDecision,e.dispatchSelectMetadataItemStream,
s()(e,["metricsPage","dispatchMakePrePlayVideoDecision","dispatchSelectMetadataItemStream"]));return g.a.createElement(M.a,a()({},t,{onAudioStreamSelect:this.onAudioStreamSelect,onSubtitlesStreamSelect:this.onSubtitlesStreamSelect}))},t}(v.Component);t.a=Object(S.a)(i,D)(C)},function(e,t,n){"use strict";function i(e){return e?"dca"===e?"DTS":e.toUpperCase():""}t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),
n(0)),h=(n.n(p),n(108)),f=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onPress=function(e){i.props.onStreamSelect(i.props.stream.id),i.props.onMenuClose()},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.stream;return r()(h.a,{isSelected:!!n.selected,onPress:this.onPress},void 0,t)},t}(p.Component);t.a=f},function(e,t,n){
"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){return{originallyAvailableAt:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).originallyAvailableAt}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2485);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.title,o=e.year,s=e.summary,c=e.showStreams
;return a()("div",{},void 0,a()(l.a,{},void 0,a()(u.a,{},void 0,a()(h.a,{},void 0,r)),a()(d.a,{},void 0,a()(h.a,{},void 0,o),a()(v.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),a()(p.a,{},void 0,a()(f.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),I,a()(l.a,{},void 0,a()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),c&&a()(y.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i}),a()(b.a,{},void 0,s)))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(107)),c=n(125),u=n(136),d=n(183),p=n(184),h=n(96),f=n(737),v=n(233),g=n(370),m=n(300),y=n(1103),b=n(147),I=a()(c.a,{});i.defaultProps={showStreams:!0},t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return o});var i=n(963),r=n.n(i),a=r.a.Power0.easeInOut,o=r.a.Power3.easeOut},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.playerType,i=e.isPostPlayVisible,r=e.isVideo,o=e.isMusic,s=e.isAdVisible,f=e.hasLiveTVProtocol,g=e.currentSubType,m=e.seekStartMilliseconds,y=e.seekEndMilliseconds,b=e.bufferStartMilliseconds,I=e.bufferEndMilliseconds,S=e.adPositionMilliseconds,M=e.adDurationMilliseconds,D=e.adSkipDelaySeconds,C=e.onAdSkipPress,O=e.onControlsMenuChange,j=e.onFollowMuteMenuChange,P=g===l.a,w=f||s||P;return a()("div",{className:t},void 0,!i&&a()(u.a,{className:v.a.seekBar,playerType:n,
isAdVisible:s,seekStartMilliseconds:m,seekEndMilliseconds:y,bufferStartMilliseconds:b,bufferEndMilliseconds:I,adPositionMilliseconds:S,adDurationMilliseconds:M}),w&&f&&a()(p.a,{playerType:n}),w&&s&&a()(d.a,{skipDelaySeconds:D,positionSeconds:Math.floor(S/1e3),onSkipPress:C}),w&&!s&&P&&a()(h.a,{playerType:n,onFollowMuteMenuChange:j}),a()(c.a,{playerType:n,isVideo:r,isMusic:o,isAdVisible:s,onControlsMenuChange:O}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(85),
n(143)),c=n(2494),u=n(2511),d=n(2517),p=n(2520),h=n(2529),f=n(2537),v=n.n(f);i.defaultProps={className:v.a.controlsContainer},t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)("seekStartSeconds"),Object(a.a)("seekEndSeconds"),Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments[2],i=n&&n.captureBuffer,r=0;return n&&i?(r=i.startedAt,
e=i.seekStartSeconds,t=i.seekEndSeconds):n&&(r=n.startedAt),{seekRangeStartedAtSeconds:r,seekStartSeconds:e,seekEndSeconds:t}})}t.a=i;var r=n(6),a=(n.n(r),n(347)),o=n(198)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,o=e.playerType,s=e.isVideo,m=e.isMusic,b=e.hasLiveTVProtocol,I=e.showDuration,S=e.durationSeconds,M=e.positionSeconds,D=e.volume,C=e.showRecordButton,O=e.showRepeatButton,j=e.disableRepeatButton,P=e.activateRepeatButton,w=e.showRepeatOneButton,T=e.disableRepeatOneButton,E=e.activateRepeatOneButton,x=e.showPreviousButton,N=e.disablePreviousButton,A=e.showSkipBackButton,L=e.disableSkipBackButton,k=e.showPlayButton,_=e.disablePlayButton,R=e.showPauseButton,z=e.disablePauseButton,U=e.showSkipForwardButton,B=e.disableSkipForwardButton,V=e.showNextButton,F=e.disableNextButton,Q=e.showShuffleButton,H=e.disableShuffleButton,Y=e.activateShuffleButton,W=e.showMenuButton,G=e.disableMenuButton,K=e.showLyricsButton,q=e.disableLyricsButton,Z=e.activateLyricsButton,X=e.showSettingsButton,J=e.disableSettingsButton,$=e.activateSettingsButton,ee=e.showChaptersButton,te=e.disableChaptersButton,ne=e.showQueueButton,ie=e.activateQueueButton,re=e.disableQueueButton,ae=e.showVolume,oe=e.showCloseButton,se=e.disableCloseButton,le=e.onRepeatPress,ce=e.onRepeatOnePress,ue=e.onPreviousPress,de=e.onSkipBackPress,pe=e.onPlayPress,he=e.onPausePress,fe=e.onSkipForwardPress,ve=e.onNextPress,ge=e.onShufflePress,me=e.onControlsMenuChange,ye=e.onLyricsPress,be=e.onSettingsPress,Ie=e.onQueuePress,Se=e.onVolumeChange,Me=e.onVolumeIconPress,De=e.onClosePress,Ce=b?v.a:f.a
;return a()("div",{className:t,"data-qa-id":"playerControlsContainer"},void 0,a()("div",{className:y.a.buttonGroupLeft},void 0,a()("div",{className:y.a.titlesButtonGroup},void 0,a()(Ce,{className:y.a.metadataContainer,metadataItemEntityID:r,playerType:o,isVideo:s,isMusic:m,positionSeconds:M})),a()("div",{className:y.a.durationContainer},void 0,I&&!!S&&null!=M&&a()(u.a,{durationSeconds:S,positionSeconds:M,"data-qa-id":"mediaDuration"})),C&&a()(g.a,{playerType:o,"data-qa-id":"recordButton",
serverEntityID:n,providerEntityID:i,positionSeconds:M})),a()("div",{className:y.a.buttonGroupCenter},void 0,O&&a()(p.a,{icon:"plex-icon-player-repeat-560","data-qa-id":"repeatButton",isDisabled:j,isActive:P,title:Object(l.default)("Repeat"),onPress:le}),w&&a()(p.a,{icon:"plex-icon-player-repeat-one-560","data-qa-id":"repeatOneButton",isDisabled:T,isActive:E,title:Object(l.default)("Repeat One"),onPress:ce}),x&&a()(p.a,{icon:"plex-icon-player-prev-560","data-qa-id":"previousButton",isDisabled:N,
title:Object(l.default)("Previous"),onPress:ue}),A&&a()(p.a,{icon:"plex-icon-player-skip-back-560","data-qa-id":"skipBackButton",isDisabled:L,title:Object(l.default)("Skip Back 10 Seconds"),onPress:de}),k&&a()(p.a,{icon:"plex-icon-player-play-560","data-qa-id":"resumeButton",isDisabled:_,title:Object(l.default)("Play"),onPress:pe}),R&&a()(p.a,{icon:"plex-icon-player-pause-560","data-qa-id":"pauseButton",isDisabled:z,title:Object(l.default)("Pause"),onPress:he}),U&&a()(p.a,{
icon:"plex-icon-player-skip-forward-560","data-qa-id":"skipForwardButton",isDisabled:B,title:Object(l.default)("Skip Forward 30 Seconds"),onPress:fe}),V&&a()(p.a,{icon:"plex-icon-player-next-560","data-qa-id":"nextButton",isDisabled:F,title:Object(l.default)("Next"),onPress:ve}),Q&&a()(p.a,{icon:"plex-icon-player-shuffle-560","data-qa-id":"shuffleButton",isDisabled:H,isActive:Y,title:Object(l.default)("Shuffle"),onPress:ge})),a()("div",{className:y.a.buttonGroupRight},void 0,a()("div",{
className:y.a.auxButtons},void 0,W&&a()(h.a,{serverEntityID:n,"data-qa-id":"moreButton",providerEntityID:i,metadataItemEntityID:r,isDisabled:G,onMenuChange:me}),K&&a()(c.a,{className:y.a.textButton,"data-qa-id":"lyricsButton",isDisabled:q,isSelected:Z,onPress:ye},void 0,Object(l.default)("Lyrics")),X&&a()(p.a,{icon:"plex-icon-player-video-settings-560","data-qa-id":"videoSettingsButton",isDisabled:J,isActive:$,title:Object(l.default)("Settings"),onPress:be}),ee&&a()(p.a,{
icon:"plex-icon-player-chapters-560","data-qa-id":"chaptersButton",isDisabled:te,title:Object(l.default)("Chapters")})),a()("div",{},void 0,ne&&a()(p.a,{icon:"plex-icon-player-queue-560","data-qa-id":"playQueueButton",isDisabled:re,isActive:ie,title:Object(l.default)("Play Queue"),onPress:Ie}),ae&&null!=D&&a()(d.a,{volume:D,"data-qa-id":"volumeButton",onVolumeIconPress:Me,onVolumeChange:Se}),oe&&a()(p.a,{className:y.a.closeButton,"data-qa-id":"closeButton",isDisabled:se,
icon:"plex-icon-close-560",title:Object(l.default)("Close Player"),onPress:De}))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(22),u=n(2497),d=n(2499),p=n(253),h=n(970),f=n(2501),v=n(2503),g=n(2504),m=n(2510),y=n.n(m);i.defaultProps={className:y.a.controls},t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.playerType,i=e.serverEntityID,r=e.providerEntityID,o=e.metadataItemEntityID,s=e.type,d=e.subtype,h=e.positionSeconds,f=e.context,v=e.showStarRating,g=e.hasUserRating;if(!o||!s)return null;var m=Object(l.b)(s,f,{subtype:d,providerEntityID:r});return a()("div",{className:(t||"")+" "+(g&&p.a.hasUserRating||""||"")},void 0,a()("div",{className:p.a.titlesContainer},void 0,m.map(function(e,t){return a()(c.a,{playerType:n,serverEntityID:i,providerEntityID:r,metadataItemEntityID:o,
positionSeconds:h,component:e,isSecondary:t>0},t)}),v&&a()(u.a,{className:p.a.ratingContainer,serverEntityID:i,providerEntityID:r,metadataItemEntityID:o})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(31),n(174)),c=n(257),u=n(435),d=n(2502),p=n.n(d);i.defaultProps={className:p.a.container},t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(c.a)(),Object(l.a)(),function(e,t){return a.a.find(e,function(e){
return e.type===s.a.GRABBER_GRAB&&e.Context.itemKey&&e.Context.itemKey===t.key})})}var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),n(175)),l=n(21),c=n(301);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.bottom,n=e.children,i=e.onDimensionsChange;return a()(c.a,{className:d.a.container,bottom:t,onDimensionsChange:i},void 0,a()("div",{className:d.a.title},void 0,Object(l.default)("Playback Settings")),a()("div",{className:d.a.menusContainer,"data-qa-id":"playbackSettingsContainer"},void 0,n))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(2540),u=n(2542),d=n.n(u);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.label,n=e.children,i=e.isDisabled;return a()("div",{className:(c.a.row||"")+" "+(i&&c.a.isDisabled||""||"")},void 0,a()("div",{className:c.a.label},void 0,t),a()("div",{className:c.a.cell},void 0,n))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2543)),c=n.n(l);t.a=i},function(e,t,n){var i=n(444).default,r=n(152);e.exports=r(i)
},function(e,t,n){"use strict";var i=(n(2574),n(683),n(967),n(745));n.d(t,"a",function(){return i.a});var r=(n(2575),n(2576),n(2577),n(2578));n.d(t,"b",function(){return r.a});n(2579),n(2580),n(2581),n(2582),n(2583),n(546),n(547),n(2584),n(2585),n(418),n(1118),n(1119),n(2586),n(2587),n(2588),n(2589),n(2590),n(746),n(2591),n(2592),n(2593),n(2594),n(2595),n(2596),n(2597),n(747),n(749),n(2598),n(2599),n(748),n(750),n(2600),n(2601),n(2602)},function(e,t,n){"use strict";function i(){
return"ps3"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a).platformID}t.a=i;var r=n(38)},function(e,t,n){"use strict";function i(){return"ps4"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a).platformID}t.a=i;var r=n(38)},function(e,t,n){"use strict";function i(){return Object(d.createSelector)(Object(p.a)(),function(e){var t=e.metadataItem;return{metadataItemEntityID:t,isMetadataItem:!!t}})}function r(e){var t=e.component,n=o()(e,["component"])
;return c.a.createElement(t,n)}var a=n(13),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(6),p=(n.n(d),n(360));t.a=Object(u.b)(i)(r)},function(e,t,n){"use strict";function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],s=n.type,l=n.key;if(!n.skipDetails&&s!==r.g)return s===r.l&&(l=n.skipParent?n.grandparentKey:n.parentKey),!l&&n.librarySectionID?Object(o.a)(e,t,n.librarySectionID,i):Object(a.a)(e,t,l,i,s)}t.a=i;var r=n(28),a=n(134),o=n(122)
},function(e,t,n){"use strict";var i=n(1123);t.a=Object(i.a)("plexCloud")},function(e,t,n){"use strict";function i(e){return Object(r.createSelector)(a.a,function(t){if(!t)return{};var n=t.desktop;return{oauthProviders:n.oauthProviders.filter(function(t){return t.usage&&t.usage[e]}),isOauthProvidersPending:n.isOauthProvidersPending,isOauthProvidersPopulated:n.isOauthProvidersPopulated,oauthProvidersError:n.oauthProvidersError}})}var r=n(6),a=(n.n(r),n(548));t.a=i},function(e,t,n){"use strict"
;function i(e){return l.a.reduce(e,function(e,t,n){var i=r(t);if(0===n)return e.concat(i);var a=i.length>1;return e.concat({plain:!0,split:a,s:"or"},i)},[])}function r(e){var t=e.match(/(.+) (.+)/);if(t)return r(t[1]).concat({plain:!0,s:"then"}).concat(r(t[2]));var n=e.match(/(.+)\+(\S+)/);return n?r(n[1]).concat({plain:!0,s:"+"}).concat(r(n[2])):[{s:l.a.reduce([[/command/,"\u2318"],[/up/,"\u2191"],[/down/,"\u2193"],[/left/,"\u2190"],[/right/,"\u2192"]],function(e,t){return e.replace(t[0],t[1])
},e)}]}var a=n(2648),o=n.n(a),s=n(5),l=n.n(s),c=n(70),u=c.a.extend({name:"keyboardShortcutsModal",className:"keyboard-shortcuts-modal modal fade",template:o.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={};return l.a.each(this.shortcuts,function(t){var n=t.group;e[n]||(e[n]=[]),
e[n].push(this.humanizeShortcut(t))},this),{groups:l.a.map(this.orderedGroups,function(t){var n=l.a.clone(t);return n.shortcuts=e[t.group],n},this)}},humanizeShortcut:function(e){return e=l.a.clone(e),e.keys=i(e.keys),e}});t.a=u},function(e,t,n){"use strict";function i(){return Object(l.createStructuredSelector)({server:Object(u.a)(),outOfDateServers:d.a,isDownForMaintenance:g,hasFailedResources:m,hasPlexPass:function(e){return e.user.hasPlexPass},isUserRestricted:function(e){
return!!e.user.restricted},canProvisionPersonalCloudServer:p.a})}function r(e){return{onDownloadServer:function(t){e(Object(h.c)(t))},onLinkPersonalCloudServerPress:function(t){e(Object(f.f)({open:!0}))}}}var a=n(5),o=n.n(a),s=n(11),l=n(6),c=(n.n(l),n(549)),u=n(42),d=n(1126),p=n(550),h=n(106),f=n(372),v=n(2657),g=Object(l.createSelector)(c.a,function(e){return!!o.a.findWhere(e,{isDownForMaintenance:!0})}),m=Object(l.createSelector)(c.a,function(e){return!!o.a.findWhere(e,{hasFailedResources:!0})
});t.a=Object(s.b)(i,r)(v.a)},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(6),o=(n.n(a),n(549)),s=Object(a.createSelector)(o.a,function(e){return r.a.where(e,{isOutOfDate:!0})});t.a=s},function(e,t,n){"use strict";function i(e){return c.a.createElement(f.a,a()({title:Object(u.default)("Plex is down for maintenance"),description:Object(u.default)("Don't worry, it will be back soon")},e),s()(h.a,{to:d.b,target:"_blank",kind:p.b.PRIMARY},void 0,"status.plex.tv"))}
var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(0),c=n.n(l),u=n(4),d=n(755),p=n(24),h=n(22),f=n(126);t.a=i},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBzdHlsZT0ic3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPGNpcmNsZSBpZD0iMCIgY3g9IjUwIiBjeT0iNTAiIHI9IjUwIiBzdHlsZT0iZmlsbDp1cmwoIzMpIi8+CiA8Y2lyY2xlIGlkPSIxIiBjeD0iNTAiIGN5PSI1MCIgcj0iNDciIHN0eWxlPSJmaWxsOnVybCgjNCkiLz4KIDxwYXRoIGlkPSIyIiBkPSJtMzIuOSAxOC44bDE4LjE2MSAwIDIwLjAzOSAzMS4yNS0yMC4wMzkgMzEuMjUtMTguMTYxIDAgMjAuMDM5LTMxLjI1LTIwLjAzOS0zMS4yNSIgc3R5bGU9ImZpbGw6dXJsKCM1KSIvPgogPGRlZnM+CiAgPGxpbmVhckdyYWRpZW50IGlkPSIzIiB4MT0iMTAwIiB4Mj0iMCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICA8c3RvcCBvZmZzZXQ9IjAlIiBzdHlsZT0ic3RvcC1jb2xvcjojZjliZTAzIi8+CiAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3R5bGU9InN0b3AtY29sb3I6I2NjN2IxOSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPGxpbmVhckdyYWRpZW50IGlkPSI0IiB4MT0iOTciIHgyPSIzIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgIDxzdG9wIG9mZnNldD0iMCUiIHN0eWxlPSJzdG9wLWNvbG9yOiMyODI4MjgiLz4KICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdHlsZT0ic3RvcC1jb2xvcjojMWYxZjFmIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmFkaWFsR3JhZGllbnQgaWQ9IjUiIGN4PSI2NyIgY3k9IjQ5LjkiIHI9IjU3LjgxMjMiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4bGluazpocmVmPSIjMyIvPgogPC9kZWZzPgo8L3N2Zz4K"
},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(4),m=n(65),y=n(22),b=n(39),I=n(157),S=n(302),M=n(756),D=r()(I.a,{},void 0,r()(b.a,{})),C=r()(M.a,{}),O=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onRetry=function(e){i.props.onRetry({
serverEntityID:i.props.serverEntityID})},r=n,u()(i,r)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.hasProvider,i=e.isPersonalCloudServer,a=e.isRetrying,s=e.showSpinner,l=e.showError,c=o()(e,["children","hasProvider","isPersonalCloudServer","isRetrying","showSpinner","showError"]);if(s)return D;if(l)return i?r()(S.a,{title:Object(g.default)("There was an unexpected error"),
description:Object(g.default)("Please retry, or visit our forums if you continue to experience problems")},void 0,a?Object(g.default)("Retrying\u2026"):r()(y.a,{kind:m.PRIMARY,onPress:this.onRetry},void 0,Object(g.default)("Retry"))):r()(S.a,{title:Object(g.default)("There was an unexpected error")});if(!n)return C;var u=v.a.Children.only(t);return v.a.cloneElement(u,c)},t}(f.Component);t.a=O},function(e,t,n){"use strict";n.d(t,"c",function(){return a}),n.d(t,"a",function(){return o}),
n.d(t,"b",function(){return s}),n.d(t,"d",function(){return l});var i=n(36),r=n(82),a=Object(i.a)(r.A),o=Object(i.a)(r.o),s=Object(i.a)(r.u),l=Object(i.a)(r.R)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(1095),m=n(80),y=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onScrollPositionChange=function(e){var t=e.scrollTop
;r.state.isScrolling||(r._currentScrollTop=t)},r.state={isScrolling:!1},r._positionKey=g.a.getPageKey()+"!scrollPosition",r._currentScrollTop=0,r._restoreScrollDelay=n.smoothScroll?n.smoothScrollDuration:n.restoreScrollDelay,r._restoreScroll=!1,r._restoreScrollTimeoutID=null,r}return p()(t,e),t.prototype.componentDidMount=function(){this._restoreScrollPosition()},t.prototype.componentWillUnmount=function(){this._storeScrollPosition(),
this._restoreScrollTimeoutID&&clearTimeout(this._restoreScrollTimeoutID)},t.prototype._restoreScrollPosition=function(){var e=this,t=g.a.get(this._positionKey);t&&(this.setState({isScrolling:!0}),this._currentScrollTop=t.scrollTop,this._restoreScroll=!0,this._restoreScrollTimeoutID=setTimeout(function(){e.setState({isScrolling:!1}),e._restoreScroll=!1},this._restoreScrollDelay))},t.prototype._storeScrollPosition=function(){g.a.set(this._positionKey,{scrollTop:this._currentScrollTop})},
t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,i=o()(e,["children","className"]);return v.a.createElement(m.a,r()({className:n,scrollTop:this._currentScrollTop,restoreScroll:this._restoreScroll,onScrollPositionChange:this.onScrollPositionChange},i),t)},t}(f.Component);y.defaultProps={restoreScrollDelay:100,smoothScroll:!0,smoothScrollDuration:400},t.a=y},function(e,t,n){"use strict";function i(e){return c.a.createElement(p.a,s()({tooltip:Object(u.default)("Edit"),
"data-qa-id":"toolbarEdit"},e),h)}var r=n(2),a=n.n(r),o=n(7),s=n.n(o),l=n(0),c=n.n(l),u=n(4),d=n(26),p=n(127),h=a()(d.a,{name:"plex-icon-toolbar-edit-560"});t.a=i},function(e,t,n){"use strict";function i(){return Object(f.createSelector)(Object(v.a)(),function(e){return{isRefreshing:!!e}})}function r(e,t){var n=t.serverEntityID;return{dispatchFetchProviders:function(){e(Object(g.h)({serverEntityID:n}))},dispatchRepopulatePage:function(){e(Object(m.b)({serverEntityID:n}))}}}
var a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(11)),f=n(6),v=(n.n(f),n(304)),g=n(113),m=n(139),y=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i._repopulateProgramGuide=function(){var e=i.props,t=e.dispatchFetchProviders,n=e.dispatchRepopulatePage;t(),n(),i._setRepopulateTimeout()},r=n,l()(i,r)}return u()(t,e),
t.prototype.componentDidMount=function(){this._setRepopulateTimeout()},t.prototype.componentDidUpdate=function(){this._setRepopulateTimeout()},t.prototype.componentWillUnmount=function(){this._clearRepopulateTimeout()},t.prototype._setRepopulateTimeout=function(){this.props.isRefreshing&&(this._clearRepopulateTimeout(),this._repopulateTimeoutID=setTimeout(this._repopulateProgramGuide,15e3))},t.prototype._clearRepopulateTimeout=function(){
this._repopulateTimeoutID&&clearTimeout(this._repopulateTimeoutID)},t.prototype.render=function(){return null},t}(p.Component);t.a=Object(h.b)(i,r)(y)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(4),b=n(26),I=n(127),S=n(1135),M=o()(b.a,{name:"plex-icon-toolbar-add-podcast-560"}),D=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i))
;return r.onButtonPress=function(){r.setState({isModalOpen:!0})},r.onModalClose=function(){r.setState({isModalOpen:!1})},r.state={isModalOpen:!1},r}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.providerEntityID,n=l()(e,["providerEntityID"]);return m.a.createElement(I.a,r()({tooltip:Object(y.default)("Add Podcast by URL"),"data-qa-id":"toolbarAddCustomPodcast",onPress:this.onButtonPress},n),M,o()(S.a,{providerEntityID:t,isOpen:this.state.isModalOpen,
onModalClose:this.onModalClose}))},t}(g.Component);t.a=D},function(e,t,n){"use strict";function i(e){var t=e.providerEntityID,n=e.isOpen,i=e.onModalClose;return a()(c.a,{providerEntityID:t,isOpen:n,title:Object(l.default)("Add a Podcast"),message:Object(l.default)("Want to add a podcast we haven\u2019t listed? If you know the URL for the podcast, you can enter it below."),textInputLabel:Object(l.default)("Podcast Feed"),onModalClose:i})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(4)),c=n(2700);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return g}),n.d(t,"b",function(){return m}),n.d(t,"c",function(){return y});var i,r=n(7),a=n.n(r),o=n(12),s=n.n(o),l=n(19),c=n(34),u=n(140),d=n(36),p=n(335),h=n(78),f=n(77),v=n(134),g=Object(d.a)("providers/addToCatalog"),m=Object(d.a)("providers/clearAddToCatalogError"),y=a()({},p.e,(i={},i["providers/clearAddToCatalogError"]=function(e,t){e.get("ui").get("addToCatalogModal").set("error",null)},
i["providers/addToCatalog"]=function(e,t,n){var i=e.get("ui").get("addToCatalogModal"),r=Object(h.h)(e,t),a=r.get("features").get("actions").get("actions").get("addToCatalog"),o=l.join(a.get("key"),{url:t.data.channelURL}),d=r.getXHROptions(o,{method:"PUT",dataType:"json"}),p=s.a.ajax(d);Object(c.a)(function(){i.set({isUpdating:!0,error:null})}),p.then(function(e,t,n){i.set("isUpdating",!1);var a=new f.a(e,{server:r.server,provider:r,parse:!0});if(!a.get("key"))return void i.set({isUpdating:!1,
error:Object(u.a)(n)});var o=Object(v.a)(r.server.state,r.state,a.get("key"),null,a.get("type"));window.location.hash=o},function(e){i.set({isUpdating:!1,error:Object(u.a)(e)})})},i))},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{isEPGRefreshing:!!e,epgActivityProgress:e?e.progress:0,epgActivityTitle:e?e.title:""}})}var r=n(11),a=n(6),o=(n.n(a),n(304)),s=n(2706);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict"
;var i=n(23),r=n(1077),a=i.a.extend({name:"DVRCollection",context:["server"],model:r.a,url:"/livetv/dvrs"});t.a=a},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(7),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(15)),g=n(35),m=n(73),y=n(29),b=n(132),I=n(2719),S=n(2770),M=n.n(S),D=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c]
;return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onModalClose=function(){Object(v.d)("metrics").trackClick(o()({},i.props.metricsProperties,{page:g.C,action:m.o})),i.props.onModalClose()},r=n,u()(i,r)}return p()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.dvrID,i=e.isOpen,a=e.metricsProperties;return r()(b.a,{className:M.a.modal,isOpen:i,metricsPage:g.C,metricsProperties:a,
preventCloseOnBackdropPress:!0,onModalClose:this.onModalClose},void 0,r()(I.a,{serverEntityID:t,dvrID:n,onModalClose:this.onModalClose}))},t}(f.Component);t.a=D},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(function(e,t){return t.dvrID},Object(l.a)(),c.a,function(e,t,n){return e?a.a.find(t,function(t){return t.type===s.a.PROVIDER_EPG_LOAD&&parseInt(t.Context.dvrID,10)===e}):a.a.find(t,{uuid:n.epgDownloadActivityID})})}var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),
n(175)),l=n(301),c=n(160);t.a=i},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(195)),a=n(160),o=Object(i.createSelector)(a.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},{})}),s=Object(r.a)(o,function(e){return e});t.a=s},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(u.a,Object(d.a)(),function(e,t){
var n=t?t.channels:e.selectedDevice.channels,i=t?t.channelMappings:e.channelMappings,r=e.lineupChannels,a=o.a.pluck(n,"key"),s=o.a.pluck(i,"deviceIdentifier"),c=a.concat(s);return o.a.uniq(c).map(function(e){var t=o.a.find(n,{key:e}),a=o.a.findWhere(i,{deviceIdentifier:e}),s=a&&a.lineupIdentifier?a.lineupIdentifier:"",l=s&&o.a.find(r,{identifier:s
}),c=!(!t||g||!a||!a.enabled),u=t||{},d=u.name,p=void 0===d?"":d,h=u.identifier,f=void 0===h?"":h,v=u.drm,g=void 0!==v&&v,m=u.signalStrength,y=u.signalQuality,b=u.hd,I=void 0!==b&&b;return{key:e,name:p,deviceIdentifier:f,enabled:c,drm:g,isChannelMissing:!t,lineupIdentifier:a&&a.lineupIdentifier?a.lineupIdentifier:"",signalStrength:m,signalQuality:y,isDeviceChannelHD:I,isLineupChannelHD:!!l&&l.hd}}).sort(function(e,t){return Object(l.a)(e.deviceIdentifier,t.deviceIdentifier)})})}function r(){
return Object(c.a)(i(),function(e){return e})}t.a=r;var a=n(5),o=n.n(a),s=n(6),l=(n.n(s),n(530)),c=n(195),u=n(160),d=n(447)},function(e,t,n){"use strict";function i(e){var t=function(t){function n(e,i){c()(this,n);var r=d()(this,t.call(this,e,i));return r.onFormStateChange=function(e){var t=!0,n=!0;s()(e).forEach(function(i){e[i].value.enabled?n=!1:t=!1}),r.setState({formState:e,allChannelMappingsEnabled:t,allChannelMappingsDisabled:n})},r.onAllChannelMappingsEnabledChange=function(e){
r.setState(function(t){var n={};return s()(t.formState).forEach(function(i){var r=t.formState[i].value;r.enable===e?n[i]=t.formState[i]:n[i]=a()({},t.formState[i],{value:{enabled:e,lineupIdentifier:r.lineupIdentifier}})}),{formState:n,allChannelMappingsEnabled:e,allChannelMappingsDisabled:!e}})},r.state={formState:{},allChannelMappingsEnabled:!1,allChannelMappingsDisabled:!1},r}return h()(n,t),n.prototype.render=function(){
var t=this.state,n=t.allChannelMappingsEnabled,i=t.allChannelMappingsDisabled;return v.a.createElement(e,a()({formState:this.state.formState,allChannelMappingsEnabled:n,allChannelMappingsDisabled:i,onFormStateChange:this.onFormStateChange,onAllChannelMappingsEnabledChange:this.onAllChannelMappingsEnabledChange},this.props))},n}(f.Component);return t.displayName="DeviceChannelMappingsForm("+Object(g.a)(e)+")",t.WrappedComponent=e,t}
var r=n(7),a=n.n(r),o=n(50),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(0),v=n.n(f),g=n(153);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.showSignalStrength,n=e.allChannelMappingsEnabled,i=e.allChannelMappingsDisabled,r=e.onAllChannelMappingsEnabledChange,o=null;return n?o=!0:i&&(o=!1),a()("div",{className:d.a.container},void 0,a()("div",{className:d.a.deviceChannelsContainer},void 0,a()(c.a,{name:"toggleAll",value:o,onChange:r}),a()("div",{
className:d.a.deviceChannelsPadding}),a()("div",{className:d.a.deviceChannels},void 0,Object(l.default)("Device Channels")),t&&a()("div",{className:d.a.signalStrength},void 0,Object(l.default)("Strength"))),a()("div",{className:d.a.guideChannels},void 0,Object(l.default)("Guide Channels")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(290),u=n(2736),d=n.n(u);t.a=i},function(e,t,n){"use strict";function i(e){return h()(e).sort(y.a).reduce(function(t,n){var i;return t.push((i={},
i[n]=e[n],i)),t},[{"":Object(m.default)("Select Channel")}])}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(50),h=n.n(p),f=n(1),v=n.n(f),g=n(0),m=(n.n(g),n(4)),y=n(530),b=n(146),I=n(290),S=n(225),M=n(24),D=n(376),C=n(2738),O=n(1146),j=n(2746),P=n.n(j),w=a()(C.a,{}),T=function(e){function t(n,i){s()(this,t);var r=c()(this,e.call(this,n,i));return r.onSelectPress=function(e){r.setState({showSelectOptions:!0})},r.onEnabledChange=function(e){r.setState({enabled:e
},function(){r.props.onChange({enabled:e,lineupIdentifier:r.state.lineupIdentifier})})},r.onLineupChannelChange=function(e){r.setState({lineupIdentifier:e},function(){r.props.onChange({enabled:r.state.enabled,lineupIdentifier:e})})},r.state={enabled:n.initialValue.enabled,lineupIdentifier:n.initialValue.lineupIdentifier,showSelectOptions:!1},r}return d()(t,e),t.prototype.componentWillReceiveProps=function(e){
var t=this.state,n=t.enabled,i=t.lineupIdentifier,r=e.value,a=r.enabled,o=r.lineupIdentifier;n===a&&i===o||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,n=t.name,r=t.deviceIdentifier,o=t.channelName,s=t.drm,l=t.signalStrength,c=t.isDeviceChannelHD,u=t.isLineupChannelHD,d=t.isChannelMissing,p=t.showResolution,h=t.lineupChannels,f=this.state,v=f.enabled,g=f.lineupIdentifier;return d?null:a()("div",{className:P.a.channelMapping},void 0,a()("div",{className:P.a.deviceInfo},void 0,a()("div",{className:P.a.channelEnabled},void 0,!s&&a()(I.a,{name:n+"Check",value:v,onChange:this.onEnabledChange
})),a()("label",{className:(P.a.deviceIdentifier||"")+" "+(!v&&P.a.mappingDisabled||""||""),htmlFor:n+"Check"},void 0,r),a()("div",{className:(P.a.channelName||"")+" "+(!v&&P.a.mappingDisabled||""||"")},void 0,o),a()(O.a,{className:P.a.signalStrength,signalStrength:l})),s?a()("div",{className:P.a.drmChannel},void 0,a()(D.a,{className:P.a.drmChannelBadge},void 0,Object(m.default)("Protected"))):a()("div",{className:P.a.epgChannel},void 0,a()(S.a,{name:n+"Select",value:g,
values:this.state.showSelectOptions?i(h):[(e={},e[g]=h[g],e)],size:M.e.SMALL,isDisabled:!v,onMouseDown:this.onSelectPress,onTouchStart:this.onSelectPress,onChange:this.onLineupChannelChange}),p&&a()("div",{className:P.a.resolutionContainer},void 0,(c||u)&&w)))},t}(g.Component);v.a.shape({enabled:v.a.bool.isRequired,lineupIdentifier:v.a.string});t.a=Object(b.a)(T)},function(e,t,n){"use strict";function i(e){return e<=20?d.a:e<=40?h.a:e<=60?v.a:e<=80?m.a:e<=100?b.a:void 0}function r(e){
var t=e.className,n=e.width,r=e.height,a=e.signalStrength;if(null==a)return null;var s=i(a);return o()("div",{className:t},void 0,o()(c.a,{src:s,width:n,height:r}))}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(409)),u=n(2740),d=n.n(u),p=n(2741),h=n.n(p),f=n(2742),v=n.n(f),g=n(2743),m=n.n(g),y=n(2744),b=n.n(y),I=n(2745),S=n.n(I);r.defaultProps={className:S.a.signalStrength,width:23,height:18},t.a=r},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(45),v=n.n(f),g=n(22),m=n(362),y=n(558),b=n(1148),I=n(1149),S=n(2756),M=n.n(S),D=parseInt(v.a.dvrSetupImageWidth,10),C=r()(I.a,{}),O=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onSelectDevicePress=function(){i.props.onSelectDevice(i.props.deviceID)},r=n,
l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.serverEntityID,i=e.make,a=e.model,o=e.uri,s=e.thumb,l=e.channelCount,c=e.unsupported,u=e.isSelectable,d=e.isSelected,p=e.includeUri,f=e.includeChannelCount,v=void 0;return v=1===l?Object(h.default)("1 channel"):l>1?Object(h.default)("{channelCount} channels",{channelCount:l}):Object(h.default)("No channels"),r()("div",{className:t},void 0,u&&r()(g.a,{onPress:this.onSelectDevicePress},void 0,r()("div",{
className:M.a.deviceImageContainer},void 0,r()(y.a,{serverEntityID:n,model:a,thumb:s,width:D,height:100}),d&&r()(m.a,{className:M.a.selectButton,component:"div",title:a,isSelected:!0,isDisabled:!0}))),!u&&r()(y.a,{serverEntityID:n,model:a,thumb:s,width:D,height:100}),r()("div",{className:M.a.details},void 0,r()("div",{className:M.a.make},void 0,i),r()("div",{className:M.a.modelContainer},void 0,r()("div",{className:M.a.model},void 0,a),c&&C),p&&r()(b.a,{className:M.a.uri,uri:o}),f&&r()("div",{
className:M.a.channelCount},void 0,v)))},t}(p.Component);O.defaultProps={includeUri:!1,includeChannelCount:!1,isSelectable:!1},t.a=O},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.uri,i=n.replace(/^https?\:\/\//,"");return a()("div",{className:t},void 0,i)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0));n.n(s);t.a=i},function(e,t,n){"use strict";function i(){var e=Object(s.default)("This tuner isn't officially supported by Plex, click for more information");return a()(d.a,{
className:h.a.unsupported,component:u.a,tooltip:e,tooltipClassName:h.a.unsupportedTooltip,tooltipAttachment:l.f.BOTTOM_CENTER,target:"_blank",to:"https://support.plex.tv/articles/community-supported-tuners/"},void 0,a()(c.a,{className:h.a.unsupportedIcon,name:"plex-icon-alert-560","aria-label":e}))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(4)),l=n(24),c=n(26),u=n(22),d=n(355),p=n(2755),h=n.n(p);t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(function(e,t){
return t.deviceID},Object(l.a)(),c.a,function(e,t,n){var i=n.selectedDevice&&n.selectedDevice.key;return a.a.find(t,function(t){return t.type===s.a.PROVIDER_DEVICE_CHANNELSCAN&&parseInt(t.Context.deviceID,10)===(e||i)})})}var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),n(175)),l=n(301),c=n(160);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.prefs;return s()("div",{className:t},void 0,n.map(function(e){var t=e.id,n=e.value,i=e.enumValues,r=e.label,o=Array.isArray(i)?[{
label:Object(l.default)("Select {label}",{label:r}),value:""}].concat(i):void 0;return d.a.createElement(p.a,a()({key:t},e,{value:null==n?"":n,enumValues:o}))}))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(4),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(427);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.networks,i=n.reduce(function(e,t){var n;return e.push((n={},n[t.key]=t.title,n)),e},[{"":Object(o.default)("Select Network")}]);return a()("div",{className:t},void 0,a()(c.a,{
name:"network",labelText:"Network",initialValue:"",values:i}))}var r=n(2),a=n.n(r),o=n(4),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(428));t.a=i},function(e,t,n){"use strict";function i(e,t){var n=Object(a.a)(t,!0);if(!n)return e;var i=e.indexOf("?"),r=e.length;return(e+=i>-1?i<r-1?"&":"":"?")+n}function r(e,t){var n=t.type,r=t.filters,a=t.sort,s=t.limit,l=o.join(e),c={};return n&&(c.type=n),a&&(c.sort=a),s&&(c.limit=s),o.join(i(l,r),c)}t.a=r;var a=n(1154),o=n(19)},function(e,t,n){"use strict"
;function i(e){if(!a.a.isEmpty(e)){if(e===l)return c;var t=e.map(function(e){var t=e.key,n=e.value,i=e.operator,r=void 0===i?o.b:i,a=Array.isArray(n)?n.map(encodeURIComponent).join(s.b):encodeURIComponent(n),l=r.lastIndexOf(o.b),c=r.substr(0,l),u=r.substr(l+1,r.lastIndexOf(o.b));return encodeURIComponent(t)+encodeURIComponent(c)+o.b+encodeURIComponent(u)+a},[]);return l=e,c=t.join(s.a)}}t.a=i;var r=n(5),a=n.n(r),o=n(378),s=n(1155),l=(n(33),void 0),c=void 0},function(e,t,n){"use strict"
;n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r});var i="&",r=","},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(function(e,t){return t.activeSort},Object(s.a)(),function(e,t){if(t){var n=e&&a.a.first(e.split(":")),i=a.a.find(t.sorts,function(t){return e?t.key===n||t.descKey===e:t.isDefault});return i||(i=a.a.first(t.sorts)),i}})}t.a=i;var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),n(306))},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(function(e,t){return t.listType},function(e,t){return t.listSubtype},function(e,t){return t.listContext},Object(l.a)(),c.a,function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments[4],l=n===a.b,c=Object(o.a)(e,t);return Object(s.b)(e,t,n,{keys:l?r[c]:void 0,sorts:l?i.sorts:void 0})})}t.a=i;var r=n(6),a=(n.n(r),n(31)),o=n(554),s=n(1158),l=n(306),c=n(2799)},function(e,t,n){"use strict";function i(e){return oe[e]}function r(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.reduce(function(e,t){return e[t.key]=!0,e},{});return se.reduce(function(e,n){return t[n.ascKey]&&e.push(n),e},[])}function a(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=a.keys,u=a.sorts;if(o&&o.length){return(u&&u.length?r(u):i(e)).reduce(function(e,t){return-1!==o.indexOf(t.key)&&e.push(t),e},[])}switch(n){case s.h:switch(e){case l.j:return[k,Q,J,Y];case l.e:return[Z,L,Y];case l.a:return[L,Q,Y]
;case l.l:return[V,W]}}switch(t){case c.b:switch(e){case l.k:return[L];case l.l:return[L,K]}}switch(e){case l.f:return[L,Q,K,q];case l.k:return[L,Q,X,$];case l.j:return[k,_];case l.e:return[L,R,q];case l.b:return[L];case l.a:return[L,z,Q];case l.l:return[L,U,F,K];case l.g:case l.h:case l.c:case l.d:return[L]}return[]}t.a=r,t.b=a
;var o=n(4),s=n(31),l=n(28),c=n(143),u=n(2781),d=n(433),p=n(230),h=n(2785),f=n(2787),v=n(294),g=n(719),m=n(435),y=n(1057),b=n(1053),I=n(1161),S=n(2790),M=n(1162),D=n(710),C=n(711),O=n(2795),j=n(2797),P=n(715),w=n(1054),T=n(1055),E=n(1058),x=n(1056),N={flex:"2 1 350px"},A={flex:"0 1 200px"},L={key:"title",ascKey:"titleSort",descKey:"titleSort:desc",title:function(e){switch(e){case l.f:return Object(o.default)("Movie Title");case l.k:return Object(o.default)("Show Title");case l.e:
return Object(o.default)("Episode Title");case l.b:return Object(o.default)("Artist Title");case l.a:return Object(o.default)("Album Title");case l.l:return Object(o.default)("Track Title");default:return Object(o.default)("Title")}},component:function(){return u.a},style:N},k={key:"season",ascKey:"season.index,season.titleSort",descKey:"season.index:desc,season.titleSort",title:function(){return Object(o.default)("Season")},component:function(){return u.a},style:N},_={key:"seasonShow",
ascKey:"show.titleSort,index",descKey:"show.titleSort:desc,index",title:function(){return Object(o.default)("Show")},component:function(){return d.a},style:N},R={key:"episodeShow",ascKey:"show.titleSort,season.index:nullsLast,episode.index:nullsLast,episode.originallyAvailableAt:nullsLast,episode.titleSort,episode.id",descKey:"show.titleSort:desc,season.index:nullsLast,episode.index:nullsLast,episode.originallyAvailableAt:nullsLast,episode.titleSort,episode.id",title:function(){
return Object(o.default)("Show")},component:function(){return p.a},style:N},z={key:"albumArtist",ascKey:"artist.titleSort,album.titleSort,album.index,album.id,album.originallyAvailableAt",descKey:"artist.titleSort:desc,album.titleSort,album.index,album.id,album.originallyAvailableAt",title:function(){return Object(o.default)("Album Artist")},component:function(){return d.a},style:N},U={key:"trackAlbumArtist",
ascKey:"artist.titleSort,album.titleSort,album.year,track.absoluteIndex,track.index,track.titleSort,track.id",descKey:"artist.titleSort:desc,album.titleSort,album.year,track.absoluteIndex,track.index,track.titleSort,track.id",title:function(){return Object(o.default)("Album Artist")},component:function(){return p.a},style:N},B={key:"trackArtist",title:function(){return Object(o.default)("Artist")},ascKey:"originalTitle",descKey:"originalTitle:desc",component:function(){return h.a},style:N},V={
key:"combinedTitleTrackArtist",ascKey:"titleSort",descKey:"titleSort:desc",title:function(){return Object(o.default)("Track Title")},component:function(){return f.a},style:N},F={key:"trackAlbum",ascKey:"album.titleSort",descKey:"album.titleSort:desc",title:function(){return Object(o.default)("Album")},component:function(){return d.a},style:N},Q={key:"year",ascKey:"year",descKey:"year:desc",title:function(){return Object(o.default)("Year")},component:function(){return v.a},style:{flex:"0 1 150px"
}},H={key:"criticRating",ascKey:"rating",descKey:"rating:desc",title:function(){return Object(o.default)("Critic Rating")},component:function(){return g.a},style:{flex:"0 0 150px"}},Y={key:"userRating",ascKey:"userRating",descKey:"userRating:desc",title:function(){return Object(o.default)("Rating")},component:function(){return m.a},style:{flex:"0 0 115px"}},W={key:"miniUserRating",ascKey:"userRating",descKey:"userRating:desc",title:function(){return Object(o.default)("Rating")},
component:function(){return m.a},style:{flex:"0 0 75px",padding:0}},G={key:"contentRating",ascKey:"contentRating",descKey:"contentRating:desc",title:function(){return Object(o.default)("Content Rating")},component:function(){return y.a},style:{flex:"0 0 150px"}},K={key:"duration",ascKey:"duration",descKey:"duration:desc",title:function(){return Object(o.default)("Duration")},component:function(e){switch(e){case l.l:return I.a;default:return b.a}},style:{flex:"0 1 150px"}},q={key:"progress",
ascKey:"viewOffset",descKey:"viewOffset:desc",title:function(){return Object(o.default)("Progress")},component:function(){return S.a},style:{flex:"0 1 150px"}},Z={key:"miniProgress",ascKey:"viewOffset",descKey:"viewOffset:desc",title:function(){return Object(o.default)("Progress")},component:function(){return M.a},style:{flex:"0 0 25px",paddingLeft:"10px",paddingRight:0}},X={key:"seasonCount",ascKey:"childCount",descKey:"childCount:desc",title:function(){return Object(o.default)("Seasons")},
component:function(){return D.a},style:{flex:"0 1 150px"}},J={key:"seasonCount",ascKey:"childCount",descKey:"childCount:desc",title:function(){return Object(o.default)("Episodes")},component:function(){return C.a},style:{flex:"0 1 150px"}},$={key:"unwatchedCount",ascKey:"unviewedLeafCount",descKey:"unviewedLeafCount:desc",title:function(){return Object(o.default)("Unplayed")},component:function(){return O.a},style:{flex:"0 1 150px"}},ee={key:"playCount",ascKey:"viewCount",
descKey:"viewCount:desc",title:function(){return Object(o.default)("Plays")},component:function(){return j.a},style:{flex:"0 1 150px"}},te={key:"dateAdded",ascKey:"addedAt",descKey:"addedAt:desc",title:function(){return Object(o.default)("Date Added")},component:function(){return P.a},style:A},ne={key:"dateViewed",ascKey:"lastViewedAt",descKey:"lastViewedAt:desc",title:function(){return Object(o.default)("Date Viewed")},component:function(){return w.a},style:A},ie={key:"releaseDate",
ascKey:"originallyAvailableAt",descKey:"originallyAvailableAt:desc",title:function(e){switch(e){case"movie":return Object(o.default)("Release Date");case"show":case"episode":return Object(o.default)("Air Date");case"album":default:return Object(o.default)("Release Date")}},component:function(){return T.a},style:A},re={key:"resolution",ascKey:"mediaHeight",descKey:"mediaHeight:desc",title:function(){return Object(o.default)("Resolution")},component:function(){return E.a},style:{flex:"0 1 150px"}
},ae={key:"bitrate",ascKey:"mediaBitrate",descKey:"mediaBitrate:desc",title:function(){return Object(o.default)("Bitrate")},component:function(){return x.a},style:{flex:"0 1 150px"}},oe={movie:[L,Q,H,Y,G,K,q,ee,te,ne,ie,re,ae],show:[L,Q,H,Y,G,X,$,te,ne,ie],season:[k,_,Y,te],episode:[L,R,Q,H,Y,K,q,ee,te,ne,ie,re,ae],artist:[L,Y,te],album:[L,z,Q,H,Y,te,ie],track:[L,U,B,F,Q,Y,K,q,ee,te,ae],collection:[L,Y]},se=[L,k,_,R,z,U,B,F,Q,H,Y,G,K,q,X,J,$,ee,te,ne,ie,re,ae]},function(e,t,n){"use strict"
;function i(e){var t=e.type,n=e.primaryExtraKey;return"track"===t&&!!n}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.iconClassName,i=e.name;return a()("span",{className:t},void 0,a()(l.a,{className:n,name:i}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(26)),c=n(2783),u=n.n(c);i.defaultProps={className:u.a.decoratorIconContainer,iconClassName:u.a.decoratorIcon},t.a=i},function(e,t,n){"use strict";function i(e,t){
return Object(a.createSelector)(Object(o.a)(),function(){return{duration:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).duration}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(718);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{saved:e.saved,viewOffset:e.viewOffset,viewCount:e.viewCount}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2793)
;t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e,t,n,i){if(e&&t&&t.isLibraryProvider&&n){var a=encodeURIComponent(e.machineIdentifier),o="/"===String(n).charAt(0),s=o?n:"/library/sections/"+n,l=encodeURIComponent(s);return r.join("#!/server/"+a+"/timeline?key="+l,i)}}t.a=i;var r=n(19)},function(e,t,n){"use strict";function i(e,t){if(!e)return!1;var n="string"==typeof t?decodeURIComponent(t):t;return!!a.a.find(e,function(e){var t=e.value
;return Array.isArray(t)?t.indexOf(n)>-1:t===n})}t.a=i;var r=n(5),a=n.n(r)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.typeKey,i=e.activeFilters,r=e.activeFilterLabel,o=e.activeSort,l=e.filters,c=e.selectedFilter,v=e.showSpinner,y=e.showCustomFilter,M=e.onFilterSelect,D=s.a.groupBy(l,function(e){var t=e.filterType;return t===d.a?t:d.b}),C=D[d.a],O=D[d.b];return a()(h.a,{className:(t||"")+" "+(b.a.filtersScroller||""),autoScroll:!0},void 0,a()(f.a,{to:Object(p.a)({typeKey:n,
sort:o}),isSelected:s.a.isEmpty(i)},"all",Object(u.default)("All")),!!C&&C.map(function(e){return a()(g.a,{typeKey:n,activeFilters:i,activeFilterLabel:r,activeSort:o,filter:e.filter,title:e.title},e.filter)}),!!O&&I,!!O&&O.map(function(e){var t=!(!c||c.filter!==e.filter);return a()(m.a,{typeKey:n,activeFilters:i,activeSort:o,filter:e.filter,filterKey:e.key,title:e.title,showSpinner:v&&t,onFilterSelect:M},e.filter)}),y&&S,y&&a()(f.a,{to:Object(p.a)({typeKey:n,customFilter:!0})
},"customFilter",Object(u.default)("Custom Filter...")))}var r=n(2),a=n.n(r),o=n(5),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(4)),d=n(265),p=(n(115),n(264)),h=(n(33),n(80)),f=n(108),v=n(289),g=n(2816),m=n(2817),y=n(2819),b=n.n(y),I=a()(v.a,{}),S=a()(v.a,{});t.a=i},function(e,t,n){"use strict";function i(e,t,n){for(var i=[].concat(e),r=i.length-1;r>=0;r--){var o=i[r],l=o.type===s.a,c=n.type===s.a;o&&l!==c||i.splice(r,1)}return i.push(a()({key:t},n)),i}t.a=i;var r=n(7),a=n.n(r),o=n(5),s=(n.n(o),
n(33),n(265))},function(e,t,n){"use strict";function i(e,t,n){if(null==n)return e.filter(function(e){return e.key!==t});for(var i=[].concat(e),r=i.length;r-- >0;){var o=i[r],s=o.key,l=o.value;if(t===s&&n===l)i.splice(r,1);else if(t===s&&Array.isArray(l)){var c=l.indexOf(n);c>-1&&(l.splice(c,1),1===l.length?i.splice(r,1,a()({},o,{value:l[0]})):l.length||i.splice(r,1))}}return i}t.a=i;var r=n(7),a=n.n(r),o=n(5);n.n(o),n(33)},function(e,t,n){"use strict";function i(e){var t=e.ui.libraryPage.details
;return t?t.fieldTypes:void 0}t.a=i},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(377)),a=Object(i.createSelector)(r.a,function(e){return e.reduce(function(e,t){return e.push.apply(e,t.fields),e},[])});t.a=a},function(e,t,n){"use strict";function i(e){return r.d===e||r.f===e}var r=n(378);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(2856),m=(n.n(g),
n(61)),y=n(2857),b=n.n(y),I=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.setInputRef=function(e){i.inputRef=e},i.onChange=function(e){i.textMaskInputElement.update(),i.props.onChange(i.textMaskInputElement.state.previousConformedValue)},r=n,u()(i,r)}return p()(t,e),t.prototype.componentDidMount=function(){
var e=this.props.value,t=this.props,n=t.mask,i=t.guide,r=t.pipe,a=t.placeholderChar,o=t.keepCharPositions;this.textMaskInputElement=Object(g.createTextMaskInputElement)({inputElement:this.inputRef,mask:n,guide:i,pipe:r,placeholderChar:a,keepCharPositions:o}),this.textMaskInputElement.update(e)},t.prototype.componentDidUpdate=function(){this.textMaskInputElement.update(this.props.value)},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.errorClassName,i=e.disabledClassName,a=e.isDisabled,s=e.type,l=e.name,c=(e.initialValue,e.value),u=e.size,d=(e.mask,e.guide,e.pipe,e.placeholderChar,e.keepCharPositions,e.hasError),p=(e.errors,e.validations,e.onChange,o()(e,["className","errorClassName","disabledClassName","isDisabled","type","name","initialValue","value","size","mask","guide","pipe","placeholderChar","keepCharPositions","hasError","errors","validations","onChange"]))
;return v.a.createElement("input",r()({},p,{className:(t||"")+" "+(b.a[u]||"")+" "+(a&&i||"")+" "+(d&&n||""||""),id:l,name:l,type:s,disabled:a,defaultValue:c,ref:this.setInputRef,onChange:this.onChange}))},t}(f.Component);I.defaultProps={className:b.a.input,errorClassName:b.a.hasError,disabledClassName:b.a.isDisabled,isDisabled:!1,size:m.LARGE,type:"text",hasError:!1},t.a=I},function(e,t,n){"use strict";function i(e,t){if(e)return m.a;switch(t){case d.f:return f.a;case d.e:return v.a;case d.d:
return g.a;default:return h.a}}function r(e){
var t=e.children,n=e.serverEntityID,r=e.providerEntityID,a=e.metadataListEntityID,s=e.containerKey,l=e.containerTitle,u=e.listTitle,d=e.listType,p=e.listSubtype,h=e.listContext,f=e.listStyle,v=e.typeKey,g=e.activeSort,m=e.selectedSort,S=e.isDirectoryList,C=e.metadataItemEntityIDs,O=e.totalSize,j=e.populatedRange,P=e.firstItemType,w=e.firstItemSubtype,T=e.isPending,E=e.isPopulated,x=e.error,N=e.columnAdjustment,A=e.hasGutter,L=e.onPageRequest,k=e.onListScrollIndexChange,_=e.onListUpdate,R=e.onMeasure,z=e.scrollIndex,U=O||C.length
;if(E&&U){var B=d||P,V=p||w,F=i(S,f);return o()(F,{className:M.a.metadataListPageContent,scrollerClassName:(M.a.metadataListScroller||"")+" "+(A&&M.a.hasGutter||""||""),serverEntityID:n,providerEntityID:r,metadataListEntityID:a,containerKey:s,containerTitle:l,listType:B,listSubtype:V,listContext:h,typeKey:v,activeSort:g,selectedSort:m,scrollIndex:z,scrollPositionStorageKey:"MetadataListPageContent",keyPropName:S?"metadataDirectoryEntityID":"metadataItemEntityID",items:C,itemsOffset:j.start,
size:U,columnAdjustment:N,onPageRequest:L,onListScrollIndexChange:k,onListUpdate:_,onMeasure:R},void 0,t)}return T?D:x?o()(y.a,{},void 0,o()(I.a,{title:u?Object(c.default)("There was an unexpected error loading {listTitle}",{listTitle:u}):Object(c.default)("There was an unexpected error loading this list")})):o()(y.a,{},void 0,o()(b.a,{title:Object(c.default)("Nothing to see here"),description:u?Object(c.default)("There are no items in {listTitle}",{listTitle:u
}):Object(c.default)("There are no items in this list")}))}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(4)),u=(n(441),n(31)),d=n(81),p=n(39),h=n(1173),f=n(2872),v=n(2881),g=n(2886),m=n(2891),y=n(261),b=n(182),I=n(262),S=n(2892),M=n.n(S),D=o()(y.a,{},void 0,o()(b.a,{},void 0,o()(p.a,{})));r.defaultProps={listContext:u.b,listStyle:d.c},t.a=r},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.containerKey,o=e.containerTitle,l=e.activeSort,c=e.listType,g=e.listSubtype,m=e.listContext,y=e.columnAdjustment,b=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","containerTitle","activeSort","listType","listSubtype","listContext","columnAdjustment"]),I=Object(h.b)(c,m,{providerEntityID:n,subtype:g,activeSort:l});return u.a.createElement(f.a,a()({listType:c,listContext:m,
layout:Object(d.a)(c,g,m,y,I.length),cellRenderer:Object(p.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listType:c,listSubtype:g,listContext:m,titleComponents:I,containerKey:r,containerTitle:o},v.a)},b))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(780),p=(n(31),n(123)),h=n(174),f=n(259),v=n(536);t.a=i},function(e,t,n){"use strict";function i(e,t){return t[e.playQueueItems[e.currentIndex]].metadataItem}function r(){
return Object(a.createSelector)(function(e){return e.ui.audioVideoPlayer},function(e){return e.ui.photoPlayer},function(e,t){return t.metadataItemEntityID},o.a,function(e,t,n,r){if(!n)return!1;var a=void 0,o=void 0;return e.playQueue&&(a=i(e.playQueue,r)),t.playQueue&&(o=i(t.playQueue,r)),a===n||o===n})}t.a=r;var a=n(6),o=(n.n(a),n(662))},function(e,t,n){"use strict";var i=n(448),r=n(45),a=n.n(r),o=parseInt(a.a.summaryCellHeight,10),s=Object(i.a)(o,5);t.a=s},function(e,t,n){"use strict"
;function i(){return Object(g.createSelector)(function(e,t){return t.listContext},function(e,t){return t.cellHeight},Object(m.a)(),O.a,j.a,y.a,Object(b.a)(),Object(I.a)(),Object(S.a)(),Object(M.a)(),Object(D.a)(),Object(C.a)(),P.a,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],r=arguments[4],a=arguments[5],o=arguments[6],s=arguments[7],l=arguments[8],c=arguments[9],u=arguments[10],d=arguments[11],p=arguments[12],h=t-2*U,f=Object(k.a)(null,h,o,s,n,e)
;return{metadataKey:n.key,grandparentKey:n.grandparentKey,type:o,index:n.index,title:n.title,summary:c,isFolder:n.isFolder,selectionID:n.entityID,selectionType:u,activeSelectionType:p.activeSelectionType,isSelected:d,route:l,showLink:!!l,showEdit:Object(L.e)(i,r,a,n),showSelect:Object(L.m)(i,r,a,n),showMore:!n.isFolder,imageWidth:f.width,imageHeight:f.height,imageUrl:f.url}})}function r(e,t){
var n=t.serverEntityID,i=t.providerEntityID,r=t.metadataListEntityID,a=t.metadataItemEntityID,o=t.metricsPage;return{onEditPress:function(){e(Object(T.editMetadataItem)({serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,metricsPage:o}))},onSelectItem:function(t){e(Object(w.k)(p()({metadataListEntityID:r,id:a},t)))},onDeselectItem:function(t){e(Object(w.c)(p()({metadataListEntityID:r},t)))}}}var a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(7),p=n.n(d),h=n(1),f=(n.n(h),
n(0)),v=n.n(f),g=n(6),m=(n.n(g),n(21)),y=n(144),b=n(537),I=n(1096),S=n(356),M=n(1177),D=n(538),C=n(539),O=n(48),j=n(37),P=n(88),w=n(137),T=n(120),E=n(45),x=n.n(E),N=n(436),A=n(288),L=n(201),k=n(228),_=n(57),R=n(2882),z=n(2884),U=parseInt(x.a.summaryCellPadding,10),B=Object(N.a)(R.a),V=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.render=function(){
return this.props.metadataKey?this.props.showSelect?v.a.createElement(B,this.props):v.a.createElement(R.a,this.props):v.a.createElement(z.a,this.props)},t}(f.Component);t.a=Object(_.a)(i,r,A.a)(V)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.subtype,n=e.summary;return t===o.b?Object(a.a)(n):n})}t.a=i;var r=n(6),a=(n.n(r),n(880)),o=n(143),s=n(21)},function(e,t,n){"use strict"
;var i=n(448),r=n(45),a=n.n(r),o=parseInt(a.a.simpleSummaryCellHeight,10),s=Object(i.a)(o,5);t.a=s},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(function(e,t){return t.listContext},function(e,t){return t.cellHeight},Object(u.a)(),g.a,v.a,d.a,Object(p.a)(),Object(h.a)(),Object(f.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(arguments[3],arguments[4],arguments[5],arguments[6]),r=arguments[7],a=arguments[8];return{
metadataKey:n.key,grandparentKey:n.grandparentKey,type:i,index:n.index,title:n.title,summary:a,tagline:n.tagline,route:r,showLink:!!r,showMore:!n.isFolder}})}function r(e,t){var n=t.serverEntityID,i=t.providerEntityID,r=t.metadataItemEntityID,a=t.containerKey,o=t.listType,s=t.metricsPage,l=t.metricsContext;return{onPlayPress:function(){e(Object(m.m)({serverEntityID:n,providerEntityID:i,metadataItemEntityID:r,metricsPage:s,metricsContext:l,options:{containerKey:a,listType:o}}))}}}function a(e){
return e.metadataKey?l.a.createElement(I.a,e):l.a.createElement(S.a,e)}var o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(6),u=(n.n(c),n(21)),d=n(144),p=n(537),h=n(356),f=n(1177),v=n(37),g=n(48),m=n(60),y=n(288),b=n(57),I=n(2887),S=n(2889);t.a=Object(b.a)(i,r,y.a)(a)},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return r});var i="minor",r="major"},function(e,t,n){"use strict";function i(e){function t(e){var t=e.viewportWidth+":"+e.viewportHeight;if(t===j)return P
;w=e.viewportHeight;var n=e.viewportWidth-2*g,i=p.reduce(function(e,t){return e+t.height},0);T=n/u,E=I?(I-g)/i:T;var r=E*i;return j=t,P={height:r,width:n}}function n(e){Object(l.a)(void 0!==w,"`getListStyle` must be called before `getPositionForIndex`");var t=s.a.find(D,function(t){var n=t.last;return e<=n}),n=s.a.find(t.cellLayouts,function(t){return t.cellIndex===e});return{cellX:Math.round(n.left*T)+y+g,cellY:Math.round(t.top*E)+y+g,cellWidth:Math.round(n.width*T)-2*y,
cellHeight:Math.round(t.height*E)-2*y}}function i(){Object(l.a)(!1,"Mosaic layouts do not support relative indexing")}function r(e){return e<0?D[0]:s.a.find(D,function(t){var n=t.bottom;return e<g+(n+1)*E})||s.a.last(D)}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;Object(l.a)(void 0!==w,"`getListStyle` must be called before `getRangesForPosition`");var t=e+w-1,n=e-f*w,i=t+f*w,a=r(n).first,o=r(i).last,s=r(e).first,c=r(t).last;return{renderStartIndex:a,
renderEndIndex:o,visibleStartIndex:s,visibleEndIndex:c,partiallyVisibleStartIndex:s,partiallyVisibleEndIndex:c}}var c=e.columns,u=void 0===c?1:c,d=e.rows,p=void 0===d?[]:d,h=e.overscan,f=void 0===h?0:h,v=e.outerPadding,g=void 0===v?0:v,m=e.innerPadding,y=void 0===m?0:m,b=e.maximumHeight,I=void 0===b?0:b,S=e.offset,M=void 0===S?0:S,D=[],C=0,O=M;p.forEach(function(e){var t=C;C+=e.height;var n=C-1,i=O;O+=e.widths.length;var r=O-1,o=[],s=0;e.widths.forEach(function(e,t){var n=s;s+=e,o.push({width:e,
left:n,cellIndex:i+t})}),D.push(a()({},e,{top:t,bottom:n,first:i,last:r,cellLayouts:o}))});var j=void 0,P=void 0,w=void 0,T=void 0,E=void 0;return{getListStyle:t,getPositionForIndex:n,getRangesForPosition:o,getRelativeIndex:i}}t.a=i;var r=n(7),a=n.n(r),o=n(5),s=n.n(o),l=n(33)},function(e,t,n){"use strict";function i(e){return Math.abs(e.actual-e.desired)/e.actual}function r(e){return 0===e.cells.length?1/0:e.cells.reduce(function(e,t){return e+i(t)},0)/e.cells.length+Math.abs(e.scale-1)}
function a(e,t){var n=e.cells,i=n.reduce(function(e,t){return e+t.desired},0),r=t/i;return{scale:r,cells:n.map(function(e){var t=e.desired;return{desired:t,actual:t*r}})}}function o(e){var t=e.aspectRatios,n=e.columns,i=void 0===n?4:n,o=e.minAspectRatio,s=void 0===o?.4:o,l=e.maxAspectRatio,c=void 0===l?5:l,u=t.map(function(e){return Math.max(s,Math.min(c,e))}),d=[],p={scale:null,cells:[]};u.forEach(function(e){var t={desired:e},n={scale:0,cells:p.cells.slice(0)};n.cells.push(t),n=a(n,i),
r(n)<=r(p)?p=n:(d.push(p),p=a({scale:0,cells:[t]},i))});var h=1/Math.max(1,p.scale);return p.scale=Math.min(1,p.scale),p.cells=p.cells.map(function(e){return{desired:e.desired,actual:e.actual*h}}),d.push(p),d.map(function(e){return{height:e.scale,widths:e.cells.map(function(e){return e.actual})}})}t.a=o},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(Object(u.a)(),Object(c.a)(),Object(p.a)(),Object(h.a)(),f.a,function(e){
var t=e.machineIdentifier,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[2],r=arguments[3],a=arguments[4];return{machineIdentifier:t,metadataKey:n.key,type:n.type,title:n.title,thumb:n.thumb,selectionType:i,activeSelectionType:a.activeSelectionType,isSelected:r}})}function r(e,t){return{onSelectItem:function(n){e(Object(d.k)(o()({metadataListEntityID:t.metadataListEntityID},n)))},onDeselectItem:function(n){e(Object(d.c)(o()({metadataListEntityID:t.metadataListEntityID
},n)))}}}var a=n(7),o=n.n(a),s=n(11),l=n(6),c=(n.n(l),n(21)),u=n(42),d=n(137),p=n(538),h=n(539),f=n(88),v=n(2912);t.a=Object(s.b)(i,r)(v.a)},function(e,t,n){"use strict";var i=n(16),r=n(2919),a=n(98),o=a.default.extend({mixins:[r.a],name:"ChannelGridMetadataListModel",sessionAttrs:{isMetadataList:i.a.boolean,containerKey:i.a.string,containerTitle:i.a.string,beginsAt:i.a.integer,endsAt:i.a.integer,populatedRange:i.a.object,isPending:i.a.boolean,isPopulated:i.a.boolean,error:i.a.object},
defaults:function(){return{isMetadataList:!0,populatedRange:{start:0,end:0,size:0},isPending:!0,isPopulated:!1,error:null}}});t.a=o},function(e,t,n){"use strict";var i=n(19),r=n(23),a=n(468),o=n(2920),s=r.a.extend({name:"ProviderTagCollection",context:["server","provider","type"],model:o.a,cache:new a.a,url:function(){var e={type:this.type};return i.join([this.provider.get("identifier"),"tags"],e)}});t.a=s},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(Object(o.a)(),function(){return[{key:"/"+(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).identifier+"/grid?channel.value=1",filter:"hdonly",filterKey:"channel.value",filterType:"boolean",title:Object(a.default)("HD Channels Only")}]})}t.a=i;var r=n(6),a=(n.n(r),n(4)),o=n(79)},function(e,t,n){"use strict";function i(e){if(!e)return"";var t=a()(e).startOf("day"),n=a()().startOf("day")
;return 0===t.diff(n,"days")?Object(o.default)("Today"):t.format("dddd")}t.a=i;var r=n(41),a=n.n(r),o=n(4)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(108)),f=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onPress=function(){var e=i.props,t=e.option;(0,e.onPress)(t)},r=n,l()(i,r)}
return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.option,i=e.isDisabled,a=e.isSelected;return r()(h.a,{className:t,isDisabled:i,isSelected:a,onPress:this.onPress},void 0,n.title)},t}(p.Component);t.a=f},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(l.a)(),function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type,n=e.title,i=e.grandparentTitle,r=e.subscriptionID,a=e.grandparentSubscriptionID,o=e.subscriptionType,s=e.grandparentSubscriptionType;return{type:t,title:i||n,subscriptionType:s||o||t,isSubscribed:!(!a&&!r)}})}function r(e,t){var n={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,metricsPage:t.metricsPage};return{dispatchStartLiveTVPlayback:function(){
e(Object(s.l)(n))}}}var a=n(11),o=n(6),s=(n.n(o),n(155)),l=n(21),c=n(2955);t.a=Object(a.b)(i,r)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return a()("div",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2975)),c=n.n(l);i.defaultProps={className:c.a.sidebarContainer},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className;return l.a.createElement(c.a,a()({className:t,autoScroll:!0},e))}
var r=n(7),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(80),u=n(2976),d=n.n(u);i.defaultProps={className:d.a.scroller},t.a=i},function(e,t,n){"use strict";function i(e){return s.a.createElement(l.a,a()({spinnerComponent:c.a},e))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(2980),c=n(39);t.a=i},function(e,t,n){"use strict";function i(e){return!0}function r(e,t){return Object(l.createSelector)(u.a,Object(d.a)(),function(n,i){return i?i.reduce(function(i,r){var a=n[r]
;return a&&t(a)&&s.a.findWhere(a.features,{type:e})&&i.push(r),i},[]):[]})}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return Object(c.a)(r(e,t),function(e){return e})}t.a=a;var o=n(5),s=n.n(o),l=n(6),c=(n.n(l),n(195)),u=n(194),d=n(771)},function(e,t,n){"use strict";function i(e){return Object(c.createSelector)(Object(d.a)(),function(t){return l.a.find(t,{type:e})})}function r(){return i(u.a.OPTIMIZE_DATABASE)}function a(){return i(u.a.CLEAN_BUNDLES)}
function o(){return i(u.a.LIBRARY_DELETE)}t.c=r,t.a=a,t.b=o;var s=n(5),l=n.n(s),c=n(6),u=(n.n(c),n(175)),d=n(301)},function(e,t){e.exports={sidebarMessage:"SidebarMessage-sidebarMessage-3O-De"}},function(e,t,n){"use strict";function i(e,t,n){Object(c.d)("metrics").trackClick({page:n,action:e,type:t.get("type"),context:f.d})}n.d(t,"g",function(){return P}),n.d(t,"i",function(){return w}),n.d(t,"d",function(){return T}),n.d(t,"a",function(){return E}),n.d(t,"e",function(){return x}),
n.d(t,"c",function(){return N}),n.d(t,"h",function(){return A}),n.d(t,"b",function(){return L}),n.d(t,"f",function(){return k})
;var r,a=n(7),o=n.n(a),s=n(12),l=n.n(s),c=n(15),u=n(4),d=n(17),p=n(625),h=n(73),f=n(114),v=n(19),g=n(104),m=n(175),y=n(36),b=n(246),I=n(113),S=n(1068),M=n(139),D=n(528),C=n(364),O=n(394),j=n(106),P=Object(y.a)("library/shareLibrary"),w=Object(y.a)("library/startLibraryRefresh"),T=Object(y.a)("library/editLibrary"),E=Object(y.a)("library/analyzeLibrary"),x=Object(y.a)("library/emptyTrashLibrary"),N=Object(y.a)("library/deleteLibrary"),A=Object(y.a)("library/startLibraryRefresh",function(e){
return o()({},e,{force:!0})}),L=Object(y.a)("library/startLibraryRefresh",function(e){return o()({},e,{cancel:!0})}),k=(r={},r["library/shareLibrary"]=function(e,t){var n=Object(g.h)(e,t),r=Object(g.a)(e,t);d.a.trigger("show:modal",new C.a({defaultPaneType:"ownedServer",defaultPaneID:n.id})),i(h.T,r,t.metricsPage)},r["library/startLibraryRefresh"]=function(e,t,n){var i=t.cancel,r=t.force,a=t.metricsPage,o=Object(g.h)(e,t),s=Object(g.a)(e,t),l={libraryID:s.id,libraryType:s.get("type"),cancel:i,
force:r,allowMetrics:!!a,metricsProperties:{page:a}};s.set("refreshing",!i),Object(S.a)(o,l).fail(function(e){if(503===e.status)d.a.trigger("show:modal",new O.a({model:o}));else{var i=t.cancel?Object(u.default)("There was a problem canceling the update."):Object(u.default)("There was a problem updating the library.");n(Object(b.b)(i))}}).always(function(e){n(I.g({serverEntityID:t.serverEntityID}))})},r["library/editLibrary"]=function(e,t){var n=Object(g.h)(e,t),r=Object(g.a)(e,t)
;d.a.trigger("show:modal",new D.a({server:n,model:r})),i(h.s,r,t.metricsPage)},r["library/analyzeLibrary"]=function(e,t,n){var r=Object(g.h)(e,t),a=Object(g.a)(e,t),o=r.getXHROptions("/library/sections/"+a.id+"/analyze",{type:"PUT"});l.a.ajax(o).fail(function(e){n(Object(b.b)(Object(u.default)("There was a problem analyzing the library.")))}),i(h.e,a,t.metricsPage)},r["library/emptyTrashLibrary"]=function(e,t,n){
var r=Object(g.h)(e,t),a=Object(g.a)(e,t),o=r.getXHROptions("/library/sections/"+a.id+"/emptyTrash",{type:"PUT"});l.a.ajax(o).done(function(){n(Object(b.b)({type:p.b,message:Object(u.default)("The trash was emptied.")}))}).fail(function(e){n(Object(b.b)(Object(u.default)("There was a problem emptying the trash.")))}),i(h.t,a,t.metricsPage)},r["library/deleteLibrary"]=function(e,t,n){var r=Object(g.h)(e,t),a=Object(g.a)(e,t);if(a.isNew())return void a.destroy()
;var o=r.supports("libraryDeleteActivity"),s=v.join(a.url(),o?{async:1}:{}),c=r.getXHROptions(s,{type:"DELETE"});n(I.p({serverEntityID:t.serverEntityID,activityType:m.a.LIBRARY_DELETE})),l.a.ajax(c).done(function(){o||(n(I.j({serverEntityID:t.serverEntityID,activityType:m.a.LIBRARY_DELETE})),n(Object(j.f)({route:"dashboard"})))}).fail(function(e){n(I.j({serverEntityID:t.serverEntityID,activityType:m.a.LIBRARY_DELETE})),
n(Object(b.b)(Object(u.default)("There was a problem deleting the library.")))}),i(h.m,a,t.metricsPage)},r[I.b]=function(e,t,n){t.activity.type===m.a.LIBRARY_DELETE&&(n(Object(M.b)({serverEntityID:t.serverEntityID})),n(Object(j.f)({route:"dashboard"})))},r)},function(e,t,n){"use strict";function i(e){var t=e.className;return a()("div",{className:t},void 0,d)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(39)),c=n(3011),u=n.n(c),d=a()(l.a,{});i.defaultProps={className:u.a.spinnerContainer
},t.a=i},function(e,t){e.exports={serverMenuItem:"ServerMenuItem-serverMenuItem-2djO5",disabledServerMenuItem:"ServerMenuItem-disabledServerMenuItem-22OGf",selectedServerMenuItem:"ServerMenuItem-selectedServerMenuItem-jaUTX",serverMenuItemContainer:"ServerMenuItem-serverMenuItemContainer-1DS9V",serverMenuTitle:"ServerMenuItem-serverMenuTitle-1s5qR",serverMenuFriendlyName:"ServerMenuItem-serverMenuFriendlyName-37Gt7",serverMenuDetails:"ServerMenuItem-serverMenuDetails-1-Rfq",
serverMenuIconContainer:"ServerMenuItem-serverMenuIconContainer-2WtBG",serverMenuIcon:"ServerMenuItem-serverMenuIcon-2zKCW",selectedIcon:"ServerMenuItem-selectedIcon-dhK05",secureIcon:"ServerMenuItem-secureIcon-3-O-_"}},function(e,t,n){"use strict";function i(e){var t=e.ui.metadataListPage;return{providerEntityID:t.providerEntityID,listKey:t.listKey}}function r(e,t){e(Object(l.a)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,listKey:t.listKey,listTitle:t.listTitle})),
e(Object(c.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,providerIdentifier:t.providerIdentifier,sectionID:null}))}var a=n(11),o=n(6),s=(n.n(o),n(88)),l=n(3034),c=n(148),u=n(202),d=n(3035),p=Object(o.createSelector)(function(e){return e.ui.metadataListPage},s.a,function(e,t){return{metadataListEntityID:e.metadataList,activeSelectionType:t.activeSelectionType}}),h=Object(u.a)(d.a,i,r),f=Object(a.b)(p)(h);t.a=f},function(e,t,n){"use strict"
;function i(e,t){return Object(y.h)(e,t).get("features").get(b.b.SETTINGS)}function r(e,t){return i(e,t).get("settings").get(t.settingID)}function a(e,t){switch(e.get("type")){case I.c.LOCATION:var n=e.get("locations").get(t.country);e.set({country:t.country,countryLabel:n.get("title"),postalCode:t.postalCode});break;case I.c.SELECT:c.a.each(t,function(t,n){e.get("options").get(n).set({selected:t})}),e.set("selectedCount",c.a.values(t).filter(function(e){return e}).length);break;default:
e.set("value",t[e.id])}}function o(e,t,n){var i=c.a.mapObject(t,function(e,t){return!0===e?"1":!1===e?"0":e}),r=p.join(c.a.result(e,"url"),{prefs:i}),o=n.getXHROptions(r,{type:"PUT"});return d.a.ajax(o).then(function(){a(e,t)})}n.d(t,"c",function(){return S}),n.d(t,"a",function(){return D}),n.d(t,"f",function(){return O}),n.d(t,"b",function(){return j}),n.d(t,"d",function(){return P}),n.d(t,"e",function(){return w})
;var s,l=n(5),c=n.n(l),u=n(12),d=n.n(u),p=n(19),h=n(140),f=n(36),v=n(90),g=n(193),m=n(34),y=n(78),b=n(76),I=n(323),S=Object(f.a)("provider/providerSettings/fetchProviderSettings"),M=Object(f.a)("provider/providerSettings/fetchProviderSettingSelectOptions"),D=Object(f.a)("provider/provderSettings/clearProviderSettingFetchError"),C=(Object(f.a)("provider/providerSettings/fetchProviderSettingLocationOptions"),
Object(f.a)("provider/providerSettings/populateProviderSettingLocationOptions")),O=Object(f.a)("provider/providerSettings/updateProviderSetting"),j=Object(f.a)("provider/providerSettings/clearProviderSettingUpdateError"),P=Object(f.a)("provider/providerSettings/populateProviderSettingOptions"),w=(s={},s["provider/providerSettings/fetchProviderSettings"]=Object(v.a)({key:"settings",getModel:i}),s["provider/providerSettings/fetchProviderSettingSelectOptions"]=Object(v.a)({key:"options",getModel:r
}),s["provider/providerSettings/fetchProviderSettingLocationOptions"]=Object(v.a)({key:"locations",getModel:r}),s["provider/providerSettings/populateProviderSettingLocationOptions"]=Object(g.a)({key:"locations",fetchActionType:"provider/providerSettings/fetchProviderSettingLocationOptions",getModel:r}),s["provider/providerSettings/updateProviderSetting"]=function(e,t){
var n=t.settingID,i=t.values,r=Object(y.h)(e,t),a=r.get("features").get(b.b.SETTINGS),s=e.get("ui").get("providerSettingsPage"),l=a.get("settings").get(n);s.set({isUpdatePending:!0,updateError:null});var c=[];l.get("type")===I.c.GROUP?l.get("settings").forEach(function(e){var t,n=(t={},t[e.id]=i[e.id],t);c.push(o(e,n,r))}):c.push(o(l,i,r)),d.a.when.apply(d.a,c).then(function(){s.set({isUpdatePending:!1,updateError:null})},function(e){s.set({isUpdatePending:!1,updateError:Object(h.a)(e)})})},
s["provider/providerSettings/clearProviderSettingUpdateError"]=function(e,t){e.get("ui").get("providerSettingsPage").set("updateError",null)},s["provider/provderSettings/clearProviderSettingFetchError"]=function(e,t){Object(y.h)(e,t).get("features").get(b.b.SETTINGS).get("settings").get(t.settingID).set({optionsError:null,locationsError:null})},s["provider/providerSettings/populateProviderSettingOptions"]=function(e,t,n){
var i=Object(y.h)(e,t),r=i.get("features"),a=r.get(b.b.SETTINGS),o=a.get("settings").get(t.settingID),s=o.get("type");s===I.c.SELECT&&Object(m.a)(function(){n(M(t))}),s===I.c.LOCATION&&n(C(t))},s)},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.closedNode,r=e.errorMessage,o=e.isOpen,s=e.onErrorDismiss,h=e.onTogglePress;return a()(u.a,{className:((o?f.a.isOpen:f.a.isClosed)||"")+" "+(n||""),errorMessage:o?r:null,onErrorDismiss:s,onPress:o?null:h
},void 0,a()(d.a,{},void 0,o&&a()(p.a,{kind:c.PRIMARY,onPress:h},void 0,Object(l.default)("Cancel")),!o&&a()(p.a,{kind:c.PRIMARY},void 0,Object(l.default)("Edit"))),o?t:i)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(65),u=n(450),d=n(791),p=n(22),h=n(3048),f=n.n(h);t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(56)),s=n(3060),l=n(66),c=r()(l.a,{},void 0,r()(s.a,{})),u=o.a.extend({component:function(){return c}});t.a=u},function(e,t,n){"use strict"
;function i(){return window!==window.top}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.get("cloudServer");return a.a.ajax(t.getXHROptions("/api/v2/pins",{method:"POST",dataType:"json",data:{strong:!0}})).then(function(e){return e})}var r=n(12),a=n.n(r);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=e.get("cloudServer");return a.a.ajax(n.getXHROptions("/api/v2/pins/"+t,{dataType:"json"})).promise().then(function(e){return e})}var r=n(12),a=n.n(r);t.a=i},function(e,t,n){
"use strict";function i(e,t){var n=t.authToken,i=e.get("cloudServer"),r=e.get("user");return o.a.ajax(i.getXHROptions("/api/v2/user",{headers:{"X-Plex-Token":n}})).then(function(e){return r.signIn(e)}).then(function(){s.a.trigger("navigate:refresh")}).fail(function(e){var t=Object(c.a)(e);s.a.trigger("show:alert",{message:Object(u.a)(t)})})}n.d(t,"b",function(){return d}),n.d(t,"a",function(){return p})
;var r,a=n(12),o=n.n(a),s=n(17),l=n(36),c=n(1207),u=n(1208),d=Object(l.a)("user/signIn/signInWithAuthToken"),p=(r={},r["user/signIn/signInWithAuthToken"]=function(e,t,n){i(e,{authToken:t.authToken})},r)},function(e,t,n){"use strict";function i(e){var t=e&&e.responseJSON,n=!t&&e&&e.responseText&&r.a.parseXML(e.responseText),i=t&&t.errors||n&&n.error;return i?Array.isArray(i)?i:[i]:[]}var r=n(58);t.a=i},function(e,t,n){"use strict";function i(e){var t=e&&e[0]
;return t?a.a.isObject(t)?Object(s.a)(t):t:Object(o.default)("There was a problem signing in to Plex.")}t.a=i;var r=n(5),a=n.n(r),o=n(4),s=n(329)},function(e,t,n){"use strict";function i(e){return e.get("desktop").get("settings").populate().then(function(e){return e.get("AcceptedEULA").save({AcceptedEULA:!0})})}t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(4)),f=n(29),v=n(54),g=n(24),m=n(39),y=n(263),b=n(188),I=n(189),S=n(766),M=n(204),D=n(205),C=n(767),O=n(3126),j=n(3127),P=n.n(j),w=r()(C.a,{}),T=r()(M.a,{},void 0,r()(y.a,{})),E=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onSearchMenuButtonPress=function(e){r.setState({isSearchMenuOpen:!r.state.isSearchMenuOpen})},r.onSearchMenuClose=function(){r.setState({isSearchMenuOpen:!1})},r.state={isSearchMenuOpen:!1},r._searchMenuButtonID=Object(v.a)(),r}
return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.isSearchPending,n=e.query,i=e.allowSearchAllServers,a=e.searchAllServers,o=e.onSearchAllChange,s=this.state.isSearchMenuOpen;return r()(b.a,{},void 0,r()(I.a,{},void 0,Object(h.default)("Search"),i&&w,i&&r()(D.a,{id:this._searchMenuButtonID,title:a?Object(h.default)("All Servers"):Object(h.default)("This Server"),hasMenu:!0,isMenuOpen:s,isSelected:!0,
onPress:this.onSearchMenuButtonPress}),i&&r()(O.a,{target:this._searchMenuButtonID,isOpen:s,isSearchAll:a,onMenuClose:this.onSearchMenuClose,onSearchAllChange:o})),r()(S.a,{},void 0,r()("span",{},void 0,t?Object(h.default)('Searching for "{query}"',{query:n}):Object(h.default)('Results for "{query}"',{query:n})),t&&r()(m.a,{className:P.a.spinner,size:g.e.SMALL})),T)},t}(p.Component);t.a=E},function(e,t,n){"use strict";function i(e){
var t=e.isSearchCapable,n=e.providers,i=e.searchAllServers,r=e.columnAdjustment;return t?s()(h.a,{innerClassName:g.a.searchPageContent},void 0,n.map(function(e){return u.a.createElement(p.a,a()({key:e.providerEntityID,columnAdjustment:r,searchAllServers:i},e))})):s()(f.a,{title:Object(d.default)("This server does not support search"),description:Object(d.default)("Browse libraries using the sidebar")})}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(1),c=(n.n(l),
n(0)),u=n.n(c),d=n(4),p=n(3129),h=n(261),f=n(126),v=n(3136),g=n.n(v);i.defaultProps={searchAllServers:!1},t.a=i},function(e,t,n){"use strict";function i(e){if(!e)return[];var t=decodeURIComponent(e).match(h);return t?t.reduce(function(e,t){var n=t.match(f),i=n[1],r=n[2],o=n[3],s=o?a.a.uniq(o.split(l.b)):"";return 1===s.length&&(s=s[0]),Object(u.a)(e,i,{value:s,type:v[i]?c.a:c.b,operator:r})},[]):[]}t.a=i;var r=n(5),a=n.n(r),o=n(215),s=n(378),l=n(1155),c=n(265),u=n(3142),d=s.i.sort(function(e,t){
return e.length<t.length}).map(o.a).join("|"),p="([^&!=<>]+)("+d+")([^&!=<>]+)?",h=new RegExp(p,"g"),f=new RegExp(p),v={unwatched:!0,unwatchedLeaves:!0,duplicate:!0,hdonly:!0}},function(e,t,n){"use strict";function i(e){return e.get("ui").get("playlistsPage")}n.d(t,"b",function(){return v}),n.d(t,"d",function(){return g}),n.d(t,"c",function(){return m})
;var r,a=n(36),o=n(90),s=n(193),l=n(98),c=n(384),u=n(398),d=n(104),p=n(139),h=n(137),f="ui/playlistsPage/fetchSorts",v=Object(a.a)("ui/playlistsPage/initPlaylistPage"),g=(Object(a.a)(f),Object(a.a)("ui/playlistsPage/populateSorts")),m=(Object(a.a)("ui/playlistsPage/fetchLibraryDetails"),Object(a.a)("ui/playlistsPage/populateLibraryDetails")),y=(r={},r["ui/playlistsPage/initPlaylistPage"]=function(e,t){
var n=i(e),r=Object(d.h)(e,t),a=t.serverEntityID,o=t.libraryKey,s=t.containerKey,p=a===n.get("serverEntityID"),h=o===n.get("libraryKey"),f=s===n.get("containerKey");if(!(p&&h&&f)){var v=new l.default({containerKey:s},{server:r}),g=n.get("libraryDetails"),m=n.get("sorts");p&&h||(g=o&&new c.a({key:o},{server:r}),m=new u.a([],{url:"/playlists/sorts",server:r})),n.restoreDefaults({serverEntityID:a,libraryKey:o,containerKey:s,playlists:v,libraryDetails:g,sorts:m})}},
r["ui/playlistsPage/fetchLibraryDetails"]=Object(o.a)({key:"libraryDetails",getModel:i}),r["ui/playlistsPage/populateLibraryDetails"]=Object(s.a)({key:"libraryDetails",fetchActionType:"ui/playlistsPage/fetchLibraryDetails",getModel:i}),r[f]=Object(o.a)({key:"sorts",getModel:i}),r["ui/playlistsPage/populateSorts"]=Object(s.a)({key:"sorts",fetchActionType:f,getModel:i}),r[p.a]=function(e,t,n){var r=t.metadataItemEntityID,a=t.containerKeyPattern,o=Object(d.h)(e,t),s=i(e),l=s.get("playlists")
;r||l&&l.server===o&&a&&l.get("containerKey").match(a)&&n(Object(h.i)({metadataListEntityID:l.entityID()}))},r);t.a=y},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataListEntityID,o=e.showSpinner,s=e.showError,d=e.activeSelectionType,h=e.columnAdjustment,b=e.record,I=e.allEpisodes,S=e.multiSelectToolbarComponent;return o?y:s?a()(f.a,{title:Object(l.default)("There was an unexpected error loading this item")}):a()(p.a,{
metricsPage:c.R,isMetricsDelegated:!0,disableBackgroundPreset:!0,scrollDirection:u.NONE},void 0,d?a()(v.a,{serverEntityID:t,providerEntityID:n,toolbarComponent:S}):a()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataListEntityID:r,columnAdjustment:h,record:b,allEpisodes:I}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(4)),c=n(35),u=n(101),d=n(39),p=n(187),h=n(157),f=n(302),v=n(373),g=n(3168),m=n(3186),y=a()(h.a,{},void 0,a()(d.a,{}));t.a=i},function(e,t,n){"use strict";function i(e){return e.experienceSettings.showPrePlayArtwork}t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type,n=e.subtype,i=e.skipChildren;if(t===a.d)return n;if(t===a.k&&n===o.b)return a.l;var r=i?a.q(t):a.p(t)
;return r&&r.typeString})}t.a=i;var r=n(6),a=(n.n(r),n(28)),o=n(143),s=n(21)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(s.a,Object(o.a)(),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:t.type,duration:t.duration,isSubscribed:null!=t.subscriptionID||null!=t.grandparentSubscriptionID,subscriptionType:t.subscriptionType,grandparentSubscriptionType:t.grandparentSubscriptionType,showRecord:!!e.features.subscribe}})}
var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(37),l=n(3211);t.a=Object(r.b)(i)(l.a)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(29),v=n(438),g=n(24),m=n(47),y=n(231),b=n(3212),I=n.n(b),S=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onRecordPress=function(e){r.setState({isSubscribeModalOpen:!0})},r.onSubscribeModalClose=function(){r.setState({isSubscribeModalOpen:!1})},
r.state={isSubscribeModalOpen:n.isSubscribeModalOpen},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.type,o=e.isSubscribed,s=e.subscriptionType,l=e.grandparentSubscriptionType,c=this.state.isSubscribeModalOpen;return r()(m.a,{"data-qa-id":"preplayRecordButton",className:I.a.recordButton,size:g.e.SMALL,onPress:this.onRecordPress
},void 0,r()(v.a,{className:o?I.a.recordingIcon:I.a.recordIcon,type:l||s||a}),o?Object(h.default)("Recording Scheduled"):Object(h.default)("Record"),r()(y.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,isOpen:c,subscriptionType:a,onModalClose:this.onSubscribeModalClose}))},t}(p.Component);S.defaultProps={isSubscribeModalOpen:!1},t.a=S},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{mediaItem:e}})}
var r=n(11),a=n(6),o=(n.n(a),n(358)),s=n(1220);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.mediaItem,i=n&&n.videoResolution,r=!1,o=void 0;if(i){var s=parseInt(i,10);r=!0,o=s>=720||4===s||8===s}return t||r?a()(c.a,{},void 0,t,r&&a()(u.a,{label:Object(l.default)("Video")},void 0,o?Object(l.default)("HD"):Object(l.default)("SD"))):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(740),u=n(544);t.a=i},function(e,t,n){"use strict"
;function i(){return Object(s.createSelector)(function(e){return e.experienceSettings.timeFormat},Object(l.a)(),Object(c.a)(),function(e,t,n){return{beginsAt:t&&t.beginsAt,endsAt:t&&t.endsAt,channel:n&&n.tag,timeFormat:e}})}var r=n(1),a=(n.n(r),n(0)),o=(n.n(a),n(11)),s=n(6),l=(n.n(s),n(358)),c=n(1043),u=n(1222);t.a=Object(o.b)(i)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.beginsAt,i=e.endsAt,r=e.channel,o=e.timeFormat;if(!n||!i)return null;var s=Date.now()/1e3,d=void 0
;return d=i<s?Object(l.default)("Aired"):n<=s&&i>=s?Object(l.default)("Airing"):Object(l.default)("Airs"),a()(u.a,{label:d},void 0,a()(c.a,{beginsAt:n,endsAt:i,channel:r,showFullTime:!0,showChannel:!0,timeFormat:o}),t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(1044),u=n(544);t.a=i},function(e,t,n){"use strict";function i(e,t){switch(e){case a.i:return Object(r.default)("Seasons");case a.c:
return 1===t?Object(r.default)("1 Episode"):Object(r.default)("{episodeCount} Episodes",{episodeCount:t});case a.a:return 1===t?Object(r.default)("1 Album"):Object(r.default)("{albumCount} Albums",{albumCount:t});case a.j:return 1===t?Object(r.default)("1 Track"):Object(r.default)("{trackCount} Tracks",{trackCount:t})}}t.a=i;var r=n(4),a=n(229)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),
n(0)),v=n.n(f),g=n(1181),m=n(1182),y=n(185),b=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.state={layout:r._createLayout(n)},r}return p()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.props.aspectRatios!==e.aspectRatios,n=this.props.viewportWidth!==e.viewportWidth,i=this.props.columnAdjustment!==e.columnAdjustment;(t||n||i)&&this.setState({layout:this._createLayout(e)})},t.prototype._createLayout=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.viewportWidth,n=e.columnAdjustment,i=e.aspectRatios,r=Math.ceil(t/400),a=Math.max(1,r+n),o=Object(m.a)({aspectRatios:i,columns:a});return Object(g.a)({columns:a,rows:o})},t.prototype.render=function(){if(!this.state)return null;var e=this.props,t=e.cellRenderer,n=o()(e,["cellRenderer"]),i=this.state.layout;return v.a.createElement(y.a,r()({layout:i,cellRenderer:t},n))},t}(f.Component);b.defaultProps={columnAdjustment:0},
t.a=b},function(e,t,n){"use strict";function i(e){var t=e.listType,n=e.isPopulated,i=e.isPending,r=e.error,o=e.size,s=e.children;return n&&o?a()("div",{className:p.a.container,"data-qa-id":"preplayContainer--"+[t]},void 0,s):i?a()("div",{className:p.a.emptyContainer},void 0,h):r?a()("div",{className:p.a.emptyMessage},void 0,Object(c.a)(t)):a()("div",{className:p.a.emptyMessage},void 0,Object(l.a)(t))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(3226)),c=n(3227),u=n(39),d=n(3228),p=n.n(d),h=a()(u.a,{});t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),a.a,function(e,t){return t[e.metadataItem]})}t.a=i;var r=n(6),a=(n.n(r),n(110)),o=n(798)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(28)),f=n(26),v=n(296),g=n(256),m=n(1062),y=n(3273),b=n.n(y),I=r()(f.a,{name:"plex-icon-clips-560"}),S=function(e){
function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onPlayPress=function(){i.props.onPlayPress(i.props.metadataItemEntityID)},i.onEditPress=function(){i.props.onEditPress(i.props.metadataItemEntityID)},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.playlistItemID,o=e.metadataKey,s=e.type,l=e.thumb,c=e.title,u=e.width,d=e.height,p=e.hasActiveSelection,f=e.isSelected,y=e.isOtherItemSelected,S=e.isModifierKeyPressed,M=e.isDragging,D=e.isSmart,C=e.canDrag,O=e.connectDragSource,j=e.onSelectPress,P=e.onDeselectPress,w=e.onRemovePress,T=s===h.c,E=!o;return O(r()("div",{className:b.a.photoContainer},void 0,r()("div",{
className:(b.a.photo||"")+" "+(f&&b.a.isSelected||"")+" "+(y&&b.a.isOtherItemSelected||""||"")},void 0,r()("div",{className:b.a.image},void 0,!E&&r()(v.a,{serverEntityID:t,providerEntityID:n,component:g.a,url:l,width:u,height:d},a||o),r()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,title:c,showPlay:!0,showEdit:!0,showSelect:!D,showRemove:!D,hasActiveSelection:p,isSelected:f,isOtherItemSelected:y,isModifierKeyPressed:S,isDragging:M,canDrag:C,onPlayPress:this.onPlayPress,
onEditPress:this.onEditPress,onSelectPress:j,onDeselectPress:P,onRemovePress:w}),T&&r()("div",{className:b.a.badge},void 0,I)))))},t}(p.Component);S.defaultProps={connectDragSource:function(e){return e}},t.a=S},function(e,t,n){"use strict";function i(e,t){var n=e.x,i=e.y,r="translate3d("+n+"px, "+i+"px, 0)";return{WebkitTransform:r,msTransform:r,transform:r,width:t?t+"px":"100%"}}t.a=i},function(e,t,n){"use strict";var i=n(19),r=n(244),a=n(16),o=n(18),s=n(3310),l=o.a.extend({mixins:[r.a],
name:"ChannelListModel",context:["server"],idAttribute:"key",collectionName:"channels",url:function(){var e=this.get("key"),t=e||i.join(["/channels",this.get("subset")]);return this.getPaginatedUrl(t)},sessionAttrs:{key:a.a.string,subset:a.a.oneOf("all","recentlyViewed"),currentPageStart:a.a.integer,currentPageSize:a.a.integer,populatedRange:a.a.object},syncedAttrs:{totalSize:a.a.integer,viewGroup:a.a.string,title1:a.a.string,title2:a.a.string},syncedRelations:{channels:{relationClass:s.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(3327),r=n.n(i),a=n(5),o=n.n(a),s=n(575),l=n(167),c=s.a.extend({className:"striped-list-item media-list-item media-details-list-item",template:r.a,ui:o.a.extend({poster:".media-poster"},s.a.prototype.ui),initialize:function(e){
s.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:o.a.extend({},s.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(3344),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(801),c=n(3345),u=n(3347),d=n(3358),p={movie:u.a,episode:u.a,clip:u.a,userPlaylistItem:u.a},h=s.a.Layout.extend({
className:"details-container legacy-page",template:r.a,regions:{actionBar:".legacy-action-bar",scroller:".legacy-content-scroller"},initialize:function(){var e=this.model.get("type");this.mediaActions=new l.a({},{item:this.model,type:e})},onRender:function(){var e,t=this.model.get("type");if(o()(p).has(t)){e=new(0,p[t])({model:this.model,mediaActions:this.mediaActions})}else e=new d.a({model:this.model});this.scroller.show(e),this.actionBar.show(new c.a({model:this.model,
mediaActions:this.mediaActions}))}});t.a=h},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(526),o=n(951),s=n(254),l=n(677),c=n(3350),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 n=this.model.get("duration"),i=Object(a.a)(e,n);i&&t.css("width",i+"%"),t.parent().toggleClass("hidden",!i)}},".item-duration":{
modelAttribute:"duration",autohide:!0,formatter:function(e){return e?Object(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){return!!Object(o.a)(e).length}},".item-available-at":{modelAttribute:"originallyAvailableAt",autohide:!0,
formatter:function(e){return Object(s.default)(e)}},".item-tagline":{modelAttribute:"tagline",autohide:!0},".item-genre":{modelAttribute:"Genre",autohide:!0,isHtml:!0,formatter:function(e){return e&&e.length?this.tagsRenderer(r.a.extend({},this.tagsRendererOptions,{model:this.model,key:"genre",tags:e,maxLen:50,maxTags:2})):""}},".item-director":{modelAttribute:"Director",manual:!0,autohide:!0,formatter:function(e,t){if(!e||!e.length)return""
;var n=this.tagsRenderer(r.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(r.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(r.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";function i(e){var t=e.serverEntityID;return a()(g.a,{className:y.a.container,serverEntityID:t},void 0,function(e){var n=e.noDVRs,i=e.hasDVRFeature,r=e.onOpen
;return a()("div",{},void 0,n&&a()("div",{className:y.a.info},void 0,a()(h.a,{className:y.a.upsell,icon:"plex-icon-marketing-dvr-560",title:Object(l.default)("Introducing Live TV & DVR"),text:Object(l.default)("With Plex Pass and a digital tuner, you can record over-the-air broadcast TV and watch your favorite shows, movies, news, and sports on any device, anywhere in the world. Cut the cord and love TV again.")}),a()("div",{className:y.a.moreInfo},void 0,a()(c.a,{
message:Object(l.default)("To get started recording TV, connect a tuner device to your network. Here's a {openLinkSupported}list of supported devices{closeLinkSupported}. However, some tuners not officially supported {openLinkUnsupported}work as well{closeLinkUnsupported}!"),tags:[{open:"openLinkSupported",close:"closeLinkSupported",component:u.a,kind:p.b.PRIMARY,to:"https://support.plex.tv/articles/225877427-supported-dvr-tuners-and-antennas/",target:"_blank"},{open:"openLinkUnsupported",
close:"closeLinkUnsupported",component:u.a,kind:p.b.PRIMARY,to:"https://support.plex.tv/articles/community-supported-tuners/",target:"_blank"}]})),i?a()(d.a,{kind:p.b.PRIMARY,size:p.e.LARGE,onPress:r},void 0,Object(l.default)("Set Up Plex DVR")):a()(f.a,{serverEntityID:t,modalMetricsProperties:{context:"dvrSetup"}})),i&&a()(v.a,{serverEntityID:t,hasDVRFeature:i}))})}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(1)),l=(n.n(s),
n(4)),c=n(199),u=n(22),d=n(47),p=n(24),h=n(1084),f=n(1085),v=n(3367),g=n(768),m=n(3390),y=n.n(m);t.a=i},function(e,t,n){"use strict";var i=n(3395),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(109),d=n(3396),p=c.a.Layout.extend({className:"devices-container",template:r.a,regions:{list:".device-list-container"},events:{"click .dropdown-menu a":"onDeviceTypeDropdownClick","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","Plex Cloud 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(e){this.hideNavLinks=e.hideNavLinks,this.products=this.collection.products(),this.addOtherIds(),this.filteredDeviceTypes=this.getFilteredDeviceTypes(),this.selectedDeviceType=this.getDeviceType(e.deviceTypeID),this.selectedDevices=this.getSelectedDevices(),this.hideNavLinks?Object(u.a)("devices",{deviceTypeID:this.selectedDeviceType.id,replace:!0,trigger:!1
}):this.el.className=this.className+" row"},serializeData:function(){return{showNavLinks:!this.hideNavLinks,selectedDeviceType:this.selectedDeviceType,deviceTypes:this.filteredDeviceTypes}},sortDeviceTypes:function(e){return o.a.sortBy(e,function(e){return"all"===e.id?"":e.title.toLowerCase()})},getDeviceType:function(e){var t=this.deviceTypes[0];return e?this.filteredDeviceTypes.find(function(t){return t.id===e})||t:t},getSelectedDevices:function(){
return"all"===this.selectedDeviceType.id?this.collection:this.collection.filterByProducts(this.selectedDeviceType.ids)},getFilteredDeviceTypes:function(){var e=this.deviceTypes.filter(function(e){return"all"===e.id||o.a.intersection(this.products,e.ids).length>0},this);return this.sortDeviceTypes(e)},addOtherIds:function(){var e=o.a.flatten(o.a.map(this.deviceTypes,function(e){return e.ids})),t=o.a.difference(this.products,e),n=o.a.find(this.deviceTypes,function(e){return"other"===e.id})
;o.a.each(t,function(e){n.ids.push(e)})},onRender:function(){this.list.show(new d.a({collection:this.selectedDevices}))},onDeviceTypeDropdownClick:function(e){e.preventDefault();var t=l()(e.currentTarget).data("id");this.selectedDeviceType=this.getDeviceType(t),this.selectedDevices=this.getSelectedDevices(),Object(u.a)("devices",{deviceTypeID:this.selectedDeviceType.id,replace:!0,trigger:!1}),this.render()},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 r=o.a.findWhere(this.deviceTypes,{id:n});i=this.collection.filterByProducts(r.ids)}this.list.show(new d.a({collection:i}))}});t.a=p},function(e,t,n){"use strict";function i(e,t){if(e=parseInt(e,10),t=t||1,a.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)+" "+o[n]}
var r=n(5),a=n.n(r),o=["Bytes","KB","MB","GB","TB"];t.a=i},function(e,t,n){"use strict";function i(e){for(var t=0,n=ce.length;t<n;t++){var i=ce[t],r=i[0];if(i[1].test(e))return r}}function r(e,t){var n=ue[e]||ue[t];return n||((n=e&&i(e))?(ue[e]=n,n):(n=t&&i(t),n?(ue[t]=n,n):b.a))}t.a=r
;var a,o=n(5),s=n.n(o),l=n(3399),c=n.n(l),u=n(3400),d=n.n(u),p=n(3401),h=n.n(p),f=n(3402),v=n.n(f),g=n(3403),m=n.n(g),y=n(3404),b=n.n(y),I=n(3405),S=n.n(I),M=n(3406),D=n.n(M),C=n(3407),O=n.n(C),j=n(3408),P=n.n(j),w=n(3409),T=n.n(w),E=n(3410),x=n.n(E),N=n(3411),A=n.n(N),L=n(3412),k=n.n(L),_=n(3413),R=n.n(_),z=n(3414),U=n.n(z),B=n(3415),V=n.n(B),F=n(3416),Q=n.n(F),H=n(3417),Y=n.n(H),W=n(3418),G=n.n(W),K=n(3419),q=n.n(K),Z=n(3420),X=n.n(Z),J=n(3421),$=n.n(J),ee=n(3422),te=n.n(ee),ne=n(3423),ie=n.n(ne),re=n(3424),ae=n.n(re),oe=n(3425),se=n.n(oe),le=(a={},
a[c.a]=/alexa/i,a[d.a]=/android/i,a[h.a]=/plex.*atv|tvos/i,a[v.a]=/chrome/i,a[m.a]=/cloudsync/i,a[S.a]=/dlna/i,a[D.a]=/edge/i,a[O.a]=/firefox/i,a[P.a]=/google.*tv/i,a[T.a]=/internet.*explorer|explorer.*windows/i,a[x.a]=/ios/i,a[A.a]=/linux/i,a[k.a]=/opera/i,a[R.a]=/macosx/i,a[U.a]=/konvergo|plex.*home.*theater|plex.*media.*center/i,a[V.a]=/plexamp/i,a[Q.a]=/plex.*media.*server/i,a[Y.a]=/roku/i,a[G.a]=/safari/i,a[q.a]=/samsung/i,a[X.a]=/sonos/i,a[$.a]=/plex.*vr/i,a[te.a]=/wii.*u/i,
a[ie.a]=/windows/i,a[ae.a]=/windows.*phone|wince/i,a[se.a]=/xbox|mystery.*5/i,a),ce=s.a.pairs(le),ue={}},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(Object(d.a)(),function(e){return e.reduce(function(e,t){return!t.group||e.includes(t.group)||t.hidden||e.push(t.group),e},[])})}function r(e,t){return!0===e||s.a.isFunction(e)&&e(t)}function a(){return Object(l.createSelector)(Object(u.a)(),i(),function(e,t){return!e||e.isUnavailable?[]:c.a.reduce(function(n,i){
if(!r(i.isVisible,e))return n;var a=i.groups.reduce(function(n,i){return(r(i.isVisible,e)||!1!==i.isVisible&&t.includes(i.key))&&n.push({key:i.key,title:i.title(),statusIndicator:i.createStatusIndicator&&i.createStatusIndicator(e),paneComponent:i.paneComponent}),n},[]);return a.length>0&&n.push({key:i.key,title:i.title(),statusIndicator:i.createStatusIndicator&&i.createStatusIndicator(e),groups:a}),n},[])})}t.a=a;var o=n(5),s=n.n(o),l=n(6),c=(n.n(l),n(576)),u=n(42),d=n(3433)},function(e,t,n){
"use strict";function i(e,t,n){var i=["server",e];return t&&i.push(t),n&&i.push(n),i.join("--")}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.selectableKey,n=e.selectedKey,i=e.to,r=e.title,l=e.children,u=e.closedIcon,p=n&&0===n.indexOf(t),h=a()(o.a,{direction:p?s.a.DOWN:s.a.RIGHT,isSelected:p});return a()("div",{},void 0,a()(c.a,{to:i,iconClassName:d.a.icon,iconNode:h,title:r,isSelected:p},t,!p&&u),p&&l)}var r=n(2),a=n.n(r),o=n(506),s=n(24),l=n(0),c=(n.n(l),n(176)),u=n(3435),d=n.n(u)
;t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className;return l.a.createElement(c.a,a()({className:t},e))}var r=n(7),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(803),u=n(3437),d=n.n(u);i.defaultProps={className:d.a.secondarySidebarLink},t.a=i},function(e,t,n){"use strict"
;var i=n(3441),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(15),d=n(4),p=n(17),h=n(83),f=n(988),v=n(422),g=n(130),m=n(1242),y=n(52),b=n(334),I=n(396),S=n(694),M=n(1117),D=n(467),C=n(62),O=n(1243),j=n(3442),P=[{value:0,title:"None"},{value:1,title:"1"},{value:2,title:"2"},{value:3,title:"3"},{value:4,title:"4"},{value:5,title:"5"}],w=c.a.ItemView.extend({className:"web-settings-container",template:r.a,ui:{chromecastCustomGroup:"#chromecast-custom-group",
customHomeStreamingSettings:".custom-home-streaming-settings",recommendedHomeStreamingSettings:".recommended-home-streaming-settings",submitBtn:".submit-btn",message:".form-message"},events:{"click .toggle-advanced-btn":"onToggleAdvancedClick","click .settings-nav a":"onSettingsGroupClick","change #chromecastAppID":"onChromecastAppIDChange","change #useHomeStreamingRecommendedSettings":"onUseHomeStreamingRecommendedSettingsChange","change input[id]":"onInputChange",
"input input[type=text]":"onInputChange","change select[id]":"onInputChange","submit #web-settings-form":"onSubmit"},onlyAfterRender:["saveChanges","displayHomeStreamingSettings"],initialize:function(e){this.changes={};var t=Object(u.d)("appModel"),n=Object(u.d)("appModel").get("experienceSettings"),i=t.get("user");this.hideNavLinks=e.hideNavLinks,this.settingsGroup=e.settingsGroup,this.listenTo(i,"change:signedIn",this.onSignedInChange),this.listenTo(t,"change:primaryServer",this.render),
this.listenTo(p.a,"shortcut:save",this.saveChanges);var r=n.get("showAdvancedSettings");this.$el.toggleClass("show-advanced",r),this.displayHomeStreamingSettings(n.get("useHomeStreamingRecommendedSettings"))},serializeData:function(){var e=[],t=[{value:"h:mma",title:Object(d.default)("12 Hour")},{value:"HH:mm",title:Object(d.default)("24 Hour")
}],n=this.model.toJSON(),i=Object(u.d)("appModel"),r=i.get("experienceSettings").toJSON(),a=i.get("user"),s=a.hasPlexPass(),l=a.hasHome(),c=a.isNinja(),p=!!a.get("features").get(y.a);o.a.each(o.a.keys(D.a.getLanguages()),function(t){e.push({value:t,title:Object(f.a)(t)})});var w=v.a.prop("video");return{settings:n,experienceSettings:r,showNavLinks:!this.hideNavLinks,hasPlexPass:s,hasHome:l,hasAdaptiveBitrate:p,canDebugAdaptiveBitrate:p&&c,isNinja:c,isPMPDesktop:Object(M.a)(),
showExperimentalPlayer:h.a.hasMediaSource&&C.a.get("allowFlash"),version:"3.53.7",languages:e,debugLevels:m.a.settings,subtitlesBurnLevels:b.a.settings,chromecastAppIDs:O.a.settings,availableQualities:g.a.getAvailableQualities({lowestQualityIndex:w.lowestQualityIndex}).reverse(),subtitleSizes:S.a.settings,audioBoostLevels:j.a.settings,httpFallbackOptions:I.a.settings,extrasPrefixCounts:P,timeFormats:t}},saveChanges:function(){var e=this.ui.submitBtn,t=this.ui.message;if(!e.isDisabled()){
e.addClass("active");var n=!!this.changes.language,i=Object(u.d)("appModel"),r=i.get("experienceSettings"),a=l.a.when(this.saveSettings(r),this.saveAbstractSettings(r));a.done(o.a.bind(function(){this.changes={},n||(e.addClass("disabled"),t.text(Object(d.default)("Your changes have been saved.")))},this)),a.fail(o.a.bind(function(){t.text(Object(d.default)("Your changes could not be saved."))},this)),a.always(o.a.bind(function(){n||e.removeClass("active")},this))}},saveSettings:function(e){
var t=o.a.omit(this.changes,function(t,n){return e.hasAttr(n)});return this.model.save(t)},saveAbstractSettings:function(e){var t=o.a.reduce(this.changes,function(t,n,i){return e.hasAttr(i)&&(t[i]=n),t},{});return o.a.isEmpty(t)?l.a.Deferred().resolve().promise():e.save(t)},displayHomeStreamingSettings:function(e){this.ui.customHomeStreamingSettings.toggleClass("hidden",e),this.ui.recommendedHomeStreamingSettings.toggleClass("hidden",!e)},onRender:function(){
this.hideNavLinks&&this.$("#"+this.settingsGroup+"-web-group").addClass("active")},onSignedInChange:function(e,t){null!=t&&this.render()},onToggleAdvancedClick:function(e){e.preventDefault();var t=this.$el.hasClass("show-advanced");!this.hideNavLinks&&t&&this.$(".advanced-setting > .selected").length&&this.$(".nav a:first").click();var n=Object(u.d)("appModel").get("experienceSettings");this.$el.toggleClass("show-advanced",!t),n.save("showAdvancedSettings",!t),
this.hideNavLinks&&t&&"debug"===this.settingsGroup&&(window.location.hash="#!/settings/web/general")},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")},onChromecastAppIDChange:function(e){var t=e.currentTarget.value===O.a.CUSTOM;this.ui.chromecastCustomGroup.toggleClass("hidden",!t)},
onUseHomeStreamingRecommendedSettingsChange:function(e){this.displayHomeStreamingSettings(!!e.currentTarget.checked)},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=w},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";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";function i(e){if(!e.hasOwnProperty("isVisible"))return null;var t=e.isVisible;if(c.a.isFunction(t)){
for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.apply(void 0,i)}return t}var r=n(50),a=n.n(r),o=n(3443),s=n.n(o),l=n(5),c=n.n(l),u=n(12),d=n.n(u),p=n(68),h=n(20),f=n(15),v=n(4),g=n(32),m=n(17),y=n(19),b=n(109),I=n(452),S=n(3445),M=n(3448),D=n(3474),C=n(3476),O=n(3478),j=n(3496),P=n(3506),w=n(3507),T=n(3508),E=n(311),x=n(383),N=h.a.Layout.extend({className:"server-settings-container",template:s.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:M.a,group:"general",title:"General",isVisible:!0},remoteAccess:{constructor:C.a,group:"remoteAccess",title:"Remote Access",isVisible:function(e){return!e.get("isPersonalCloudServer")}},versions:{constructor:O.a,group:"versions",title:"Optimized Versions",
isVisible:function(e){return!e.get("isPersonalCloudServer")}},agents:{constructor:j.a,group:"agents",title:"Agents",isVisible:!0},library:{constructor:E.a,group:"library",title:"Library"},channels:{constructor:P.a,group:"channels",title:"Plugins",isVisible:!0},network:{constructor:E.a,group:"network",title:"Network"},transcoder:{constructor:E.a,group:"transcoder",title:"Transcoder"},languages:{constructor:w.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:T.a,group:"dvr",title:"Live TV & DVR",isVisible:function(e){return e.get("livetv")>=1}},help:{constructor:D.a,group:"help",title:"Help",isVisible:!0}},initialize:function(e){this.hideNavLinks=e.hideNavLinks,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=Object(f.d)("appModel"),n=t.get("experienceSettings"),i=n.get("showAdvancedSettings");if(this.$el.toggleClass("show-advanced",i),this.initGroups(),this.model.supports("reachability")){var r=c.a.extend(this.model.getXHROptions("/myplex/refreshReachability"),{
type:"PUT"});d.a.ajax(r)}this.hideNavLinks||(t.set("primaryServer",this.model),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(this.cloudAccount,"change:remoteAccessState",this.onRemoteAccessStatusChange),this.listenTo(this.model,"change:isClaimed",this.onClaimedChange)),this.listenTo(m.a,"shortcut:save",this.saveChanges),this.listenTo(this.collection,"change:value",this.onSettingValueChange)},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 p.c.Collection,t.forEach(function(t){var r=e.panes[t],a=i(r,e.model,e.tempSettings);(!0===a||!1!==a&&c.a.contains(n,t))&&e.addGroup(t,r)}),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)},serializeData:function(){return{showNavLinks:!this.hideNavLinks}},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=a()(this.panes)[0];if(this.hideNavLinks)return void Object(b.a)("serverSettings",{serverID:this.model.id,group:"general"});e=n,t=this.panes[n]}
var i=t.constructor,r=new i({model:this.model,collection:this.tempSettings,account:this.tempAccount,cloudAccount:this.cloudAccount,channelSettings:this.tempChannelSettings,group:t.group,changes:this.changes,hideNavLinks:this.hideNavLinks});if(this.currentPane=r,this.pane.show(r),this.hideNavLinks)this.listenTo(this.currentPane,"save",this.saveChanges);else{this.nav.currentView.selectGroup(e),this.listenTo(this.currentPane,{"change:pane":this.showPane,save:this.saveChanges});var o={
serverID:this.model.id,group:e,replace:!0,trigger:!1};"dvr"===e||"versions"===e||"help"===e?Object(b.a)("manage",o):Object(b.a)("serverSettings",o)}return r},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),r=c.a.result(this.channelSettings,"url"),a=y.join([r,"/set"],i);e.push(d.a.ajax(this.model.getXHROptions(a)))}c.a.isEmpty(n)||e.push(this.account.save(n)),c.a.isEmpty(this.changes)||e.push(this.collection.first().save(this.changes));var o=d.a.when.apply(d.a,e);o.done(c.a.bind(function(){var e=c.a.keys(this.changes);c.a.each(e,function(e){var t=this.tempSettings.get(e);this.collection.get(e).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)),o.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){0===i.lastIndexOf(e,0)&&(t[i.substring(e.length)]=n,delete this.changes[i])},this),t},
onRender:function(){if(!this.hideNavLinks){this.serverDropdown.append(new I.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 n=this.model.get("desktop").get("update");return e.get("ui").get("authCodeExchange").get("isBusy")||"installing"===n.get("state")?void this.listenTo(this.model,"change:connected",this.onServerConnectedChange):t?void Object(b.a)("serverSettings",{serverID:t.id,group:"general"}):void m.a.trigger("show:view",new x.a({
title:Object(v.default)("Server settings are unavailable because the server could not be reached.")}))},onSettingValueChange:function(e,t){this.tempSettings.get(e.id).set("value",t)},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);Object(f.d)("appModel").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"),n=Object(f.d)("appModel").get("experienceSettings");this.$el.toggleClass("show-advanced",!t),n.save("showAdvancedSettings",!t)},onButlerUpdateChannelChange:function(){var e=this.collection.get("ButlerTaskCheckForUpdates")
;e&&e.get("value")&&g.a.execute("checkForServerUpdates",{server:this.model,download:!1})}});t.a=N},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e){return e?e.desktop.cloudAccount:null})}var r=n(6),a=(n.n(r),n(42));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.avatarUrl;return a()("div",{className:d.a.avatar},void 0,!n&&a()(l.a,{className:d.a.icon,name:"plex-icon-alert-560"}),a()(c.a,{serverEntityID:t,url:n,
width:p,height:p}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(26)),c=n(1247),u=n(3460),d=n.n(u),p=60;t.a=i},function(e,t,n){"use strict";function i(e){return s()("div",{className:p.a.avatar},void 0,c.a.createElement(u.a,a()({},e,{background:!0})))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(0),c=n.n(l),u=n(169),d=n(3459),p=n.n(d);t.a=i},function(e,t,n){"use strict";var i=n(3490),r=n.n(i),a=n(68),o=n(20),s=n(4),l=n(285),c=n(330),u=n(1249),d=o.a.Layout.extend({mixins:[c.a],
className:"conversion-status",template:r.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 a.c.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?Object(s.default)("Paused"):Object(s.default)("Converting")}},".conversion-status-pending-label":{model:"pausedSetting",modelAttribute:"value",formatter:function(e){return e?Object(s.default)("Paused"):Object(s.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 Object(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"),r=t&&t===e.get("ratingKey"),a=n&&n===e.get("generatorID"),o=i&&i===e.get("syncItemId");return r&&(a||o)},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(3491),r=n.n(i),a=n(20),o=a.a.ItemView.extend({className:"circle-progress",template:r.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 r=this.model.get("progress"),a=(100-r)/100*i;this.ui.svgCircle.css("stroke-dashoffset",a)},onRender:function(){this.drawProgressBar()},onProgressChange:function(){this.drawProgressBar()}});t.a=o},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(3511),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(15),d=n(4),p=n(17),h=n(30),f=n(52),v=n(32),g=n(3512),m=n(1251),y=n(364),b=n(404),I={home:g.a,friends:m.a},S=c.a.Layout.extend({className:"users-container",template:o.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("features").get(f.d);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.d("appModel")
;this.subset=e.usersSubset,this.hideNavLinks=e.hideNavLinks,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&&p.a.trigger("show:modal",new b.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(),showNavLinks:!this.hideNavLinks,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=I[this.subset];t?this.container.append(new t({hideNavLinks:this.hideNavLinks})):h.a.warn("Invalid subset: "+this.subset)},updateBadges:function(){var e={home:this.proxies.home.length,friends:this.proxies.friends.length};r.a.each(r.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(),v.a.execute("toggleGuest",{user:this.user,enable:t})},onRender:function(){this.showSubset(),this.updateBadges()},onClose:function(){r.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(r.a.last(e.currentTarget.href.split("/"))),p.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?p.a.trigger("show:modal",new y.a({type:"home"})):p.a.trigger("show:alert",{type:"error",message:Object(d.default)("You have reached the {1} person home limit.",t)})},onLeaveHomeClick:function(e){e.preventDefault(),v.a.execute("removeHomeUser",{homeUser:this.signedInHomeUser,isSignedInUser:!0})},onInviteFriendClick:function(e){e.preventDefault(),
p.a.trigger("show:modal",new y.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(3514),r=n.n(i),a=n(20),o=n(15),s=n(17),l=n(1252),c=n(3517),u=a.a.Layout.extend({className:"friends-container col-sm-8 col-md-9",template:r.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(e){var t=o.d("appModel"),n=t.get("user");if(n.get("restricted"))return void s.a.trigger("navigate","users",{usersSubset:"home"});this.collection=n.get("desktop").get("friends").filterByUnrestricted(),this.invites=n.get("desktop").get("invites").filterByFriends(),this.sentInvites=n.get("desktop").get("sentInvites").filterByFriends(),this.hideNavLinks=e.hideNavLinks,
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)},setContainerClass:function(){this.hideNavLinks&&this.$el.removeClass("col-sm-8 col-md-9").addClass("col-sm-12 col-md-12")},onRender:function(){this.setContainerClass(),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(63),r=n(3515),a=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:r.a,sorted:!0});t.a=a},function(e,t,n){"use strict";var i=n(3520),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(15),d=n(4),p=n(17),h=n(478),f=n(364),v=c.a.ItemView.extend({className:"friend-server-status-container",template:r.a,events:{
"click .server-share-edit-btn":"onEditClick"},initialize:function(){var e=u.d("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.d("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")?Object(d.default)("user"):Object(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=Object(h.a)(Object(d.default)("library"),t.numLibraries,Object(d.default)("libraries")),t},getServerStatus:function(e){for(var t,n=0,i=this.collection.length;n<i;n++){var r=this.collection.at(n);if(r.get("owned")===e.owned){var a=this.servers.get(r.get("machineIdentifier")),o=a&&a.get("connected");if(!1===o)return"unavailable";o&&(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=o.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"),r=this.collection.findWhere({owned:i});r&&(n=r.get("machineIdentifier")),p.a.trigger("show:modal",new f.a({model:this.model,defaultPaneType:i?"ownedServer":"sharedServer",defaultPaneID:n}))}}});t.a=v},function(e,t,n){"use strict"
;var i=n(3524),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=n(15),c=n(4),u=n(17),d=n(32),p=n(247),h=n(1253),f=n(364),v=n(404),g=s.a.Layout.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:r.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.d("appModel"),n=t.get("user"),i=n.get("desktop").get("friends"),r=i.get(this.model.id)
;this.isAdmin=e.isAdmin,this.isSignedInUser=this.model.id===n.id,this.image=new p.a({model:this.model,type:"friend",width:80}),r?this.friend=r: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 h.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")?Object(c.default)("Guest User"):e?Object(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.d("appModel"),n=t.get("user");return(this.isAdmin||!n.get("restricted")&&!this.model.get("restricted"))&&!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(),o()(e.currentTarget).isDisabled()||u.a.trigger("show:modal",new v.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=g},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(0),u=n.n(c),d=n(43),p=n(40),h=n(1238),f=n(56),v=n(66),g=n(126),m=n(3527),y=n(237),b=f.a.extend({component:function(e){
var t=e.machineIdentifier,n=e.settingsSection,i=e.settingsGroup,a=e.hasError,s=e.errorMessage,c=l()(e,["machineIdentifier","settingsSection","settingsGroup","hasError","errorMessage"]),f=Object(p.a)(d.m,t),b=Object(h.a)(t,n,i);return o()(v.a,{},void 0,o()(y.a,{selectedKey:b}),a&&o()(g.a,{title:s}),!a&&u.a.createElement(m.a,r()({serverEntityID:f,settingsSection:n,settingsGroup:i},c)))}});t.a=b},function(e,t,n){"use strict";var i=n(279),r=n(165),a=n(3536),o=r.a.extend({model:a.a,
url:"/playQueues?type="+i.a.LOCAL,parse:function(e){return this.convert(e,"PlayQueue")}});t.a=o},function(e,t,n){"use strict";var i=n(3539),r=n.n(i),a=n(20),o=n(15),s=n(4),l=n(109),c=n(452),u=n(3540),d=a.a.Layout.extend({className:"alerts-container",template:r.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(e){var t=o.d("appModel");this.hideNavLinks=e.hideNavLinks,this.shared=this.model.get("shared"),this.page=1,this.listCollection=this.collection.clone(this.collection.page(this.page,{reverse:!0})),this.listCollection.stopListening(),this.hideNavLinks||(t.set("primaryServer",this.model),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange))},
serializeData:function(){var e=this.collection.pages();return{showNavLinks:!this.hideNavLinks,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(Object(s.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.hideNavLinks||this.serverDropdown.append(new c.a),this.shared||this.list.append(new u.a({collection:this.listCollection}))},onPrimaryServerChange:function(e,t){t&&Object(l.a)("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(3543),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(15),d=n(4),p=n(109),h=n(83),f=n(32),v=n(99),g=n(52),m=n(213),y=n(452),b=n(3544),I=c.a.Layout.extend({className:"sync-container",template:r.a,transcodeJobDelay:2e3,ui:{devices:".nav a"},regions:{filterBar:".filter-bar",
container:".sync-device-container"},modelEvents:{"change:shared":"onSharedChange"},events:{"click .dropdown-menu a":"onDeviceDropdownClick","click .nav a":"onDeviceClick","click .edit-btn":"onEditClick","click .refresh-btn":"onRefreshClick","click .cloud-sync-settings-btn":"onCloudSyncSettingsClick"},initialize:function(e){var t=u.d("appModel");this.hideNavLinks=e.hideNavLinks,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=this.model.get("myPlexSigninState")===v.b,this.hideNavLinks||(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{showNavLinks:!this.hideNavLinks,
showDeviceDropdown:this.collection.length>0&&this.hideNavLinks,showCloudSyncFilterBarButton:this.hideNavLinks&&this.selectedDevice&&this.selectedDevice.get("isCloudSync"),shared:this.shared,hasTouchScreen:h.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(o.a.bind(this.fetchTranscodeJobs,this),this.transcodeJobDelay)},showList:function(){this.selectedDevice?this.container.show(new b.a({model:this.selectedDevice,server:this.model})):this.container.close()},getPlexPassInfo:function(){return this.signedIn||this.shared?{url:this.user.server.get("plexPassUrl"),message:Object(d.default)("The server needs a Plex Pass to use sync."),buttonText:Object(d.default)("Learn More"),target:"_blank",
showButton:!this.shared}:{url:this.user.get("features").get(g.i)?Object(m.a)(this.model.id,"settings","general"):"#!/settings/server",message:Object(d.default)("The server needs to be signed in with a Plex Pass to use sync."),buttonText:Object(d.default)("Sign In"),target:"_self",showButton:!0}},onRender:function(){this.hideNavLinks||this.filterBar.append(new y.a({showSharedServers:!0})),this.allowSync&&this.showList()},onClose:function(){clearTimeout(this.transcodeJobTimeout)},
onPrimaryServerChange:function(e,t){t&&Object(p.a)("sync",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()},onDeviceDropdownClick:function(e){e.preventDefault();var t=l()(e.currentTarget).data("id");this.selectedDevice=this.collection.get(t),Object(p.a)("sync",{serverID:this.model.id,deviceID:t,replace:!0,trigger:!1}),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(){this.selectedDevice.get("syncList").fetch({reset:!0,scope:"page"})}))},onCloudSyncSettingsClick:function(e){e.preventDefault(),
e.stopImmediatePropagation();var t=u.d("appModel"),n=t.get("user");window.open(n.server.get("cloudSyncUrl"))}});t.a=I},function(e,t,n){"use strict";var i=n(287),r=n(40),a=n(242),o=n(77),s=o.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 Object(r.a)(this.entityType,e.ratingKey,this.syncItemId,this.server.entityID())},context:["server","device","syncItemId"],cache:new a.a,
cacheKey:function(){return o.a.prototype.cacheKey.apply(this,arguments)+"!"+this.syncItemId}});t.a=s},function(e,t,n){"use strict";var i=n(3555),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(15),c=n(4),u=n(109),d=n(192),p=n(52),h=n(213),f=n(1261),v=n(3557),g=n(452),m=n(3558),y=n(3561),b=s.a.Layout.extend({className:"conversion-container",template:r.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.d("appModel");this.hideNavLinks=e.hideNavLinks,this.playQueue=e.playQueue,this.transcodeJobs=e.transcodeJobs,this.generators=e.generators,this.items=this.playQueue.get("collection"),this.upNextItems=new f.a(this.items,{
playQueue:this.playQueue,includeSelectedItem:!0}),this.afterUpNextItems=new v.a(this.items,{playQueue:this.playQueue}),this.settings=this.model.get("desktop").get("settings"),this.pausedSetting=this.settings.get("BackgroundQueueIdlePaused"),this.hideNavLinks||(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(){var e=l.d("appModel"),t=e.get("user"),n=t.get("features").get(p.i),i=n?Object(h.a)(this.model.id,"manage","versions"):"#!/settings/server/"+encodeURIComponent(this.model.id)+"/versions";return{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(),manageVersionsRoute:i}},toggleEmptyView:function(){var e=this.upNextItems.length+this.afterUpNextItems.length>0;e?this.emptyRegion.close():this.emptyRegion.show(new y.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?Object(c.default)("There was a problem converting 1 item."):Object(c.default)("There were problems converting {1} items.",e)},onRender:function(){this.hideNavLinks||this.filterBar.append(new g.a);var e={playQueue:this.playQueue},t={playQueue:this.playQueue,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}
;this.upNextList.show(new m.a(o.a.extend({},e,{collection:this.upNextItems,itemViewOptions:t,sortableOptions:{sort:!0,group:{name:"upNext",pull:!1,put:["afterUpNext"]}}}))),this.afterUpNextList.show(new m.a(o.a.extend({},e,{collection:this.afterUpNextItems,itemViewOptions:o.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&&Object(u.a)("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=b},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(3556),o=a.a.extend({initialize:function(e){this.playQueue=e.playQueue,this.includeSelectedItem=e.includeSelectedItem,this.addFilter(r.a.bind(this.filterUpNext,this)),this.listenForUpNextChanges()},listenForUpNextChanges:function(){var e=r.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,r=n.end;return this.includeSelectedItem||(i+=1),t>=i&&t<=r},onPlayQueueChange:function(){this.refilter()}});t.a=o},function(e,t,n){"use strict";var i=n(3563),r=n.n(i),a=n(20),o=n(15),s=n(109),l=n(192),c=n(452),u=n(3564),d=a.a.Layout.extend({className:"now-playing-container",
template:r.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=o.d("appModel");this.hideNavLinks=e.hideNavLinks,this.shared=this.model.get("shared"),this.synced=!this.model.get("isFullServer"),this.supported=this.model.supports("publicNowPlaying")||this.model.get("myPlexSubscription"),
this.hideNavLinks||(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}},poll:function(){this.pollTimeoutID=setTimeout(this.whenRendered(this.refreshList),5e3)},refreshList:function(){this.collection.length&&this.collection.fetch(),this.poll()},onRender:function(){clearTimeout(this.pollTimeoutID),
this.hideNavLinks||this.filterBar.append(new c.a),this.shouldShowList()&&(this.list.show(new u.a({collection:this.collection})),this.refreshList())},onPrimaryServerChange:function(e,t){t&&Object(s.a)("nowPlaying",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()}});t.a=d},function(e,t,n){"use strict";function i(e){if(!e)return Object(d.default)("Username is required")}function r(e){if(!e)return Object(d.default)("Email address is required")}function a(e){
if(!e)return Object(d.default)("Password is required")}function o(e){if(!e)return Object(d.default)("Password confirmation is required")}function s(e){if(!e)return Object(d.default)("Current password is required")}function l(e){if(e&&e.length<8)return Object(d.default)("Password must be at least 8 characters")}function c(e,t){if(e!==t.password.value)return Object(d.default)("Passwords must match")}function u(e){if(!e)return Object(d.default)("URL is required")}t.g=i,t.d=r,t.e=a,t.b=o,t.c=s,
t.h=l,t.a=c,t.f=u;var d=n(4)},function(e,t,n){"use strict";var i=n(1123);t.a=Object(i.a)("federatedAuth")},function(e,t,n){"use strict";function i(e,t){var n=Object(a.a)(window.location.href,t);return r.join([e],{origin:n})}var r=n(19),a=n(752);t.a=i},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return s});var i,r=n(17),a=n(36),o=Object(a.a)("user/linkAccount/navigateRefresh"),s=(i={},i["user/linkAccount/navigateRefresh"]=function(e,t,n){
r.a.trigger("navigate:refresh")},i)},function(e,t,n){"use strict";function i(e){return a()("div",{className:c.a.spinnerContainer},void 0,u)}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(39)),l=n(3594),c=n.n(l),u=a()(s.a,{});t.a=i},function(e,t,n){"use strict";function i(e){return e.get("ui").get("onlineMediaSourcesPage")}function r(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.get("cloudServer"),r=e.get("user").get("uuid"),a=p.join(["/api/v2/user",r,"settings/opt_outs"],t);return i.getXHROptions(a,c()({dataType:"json"},n))}n.d(t,"b",function(){return y}),n.d(t,"d",function(){return S}),n.d(t,"a",function(){return M}),n.d(t,"c",function(){return D})
;var a,o=n(50),s=n.n(o),l=n(7),c=n.n(l),u=n(12),d=n.n(u),p=n(19),h=n(140),f=n(36),v=n(90),g=n(1269),m=n(335),y=Object(f.a)("ui/onlineMediaSourcePage/initOnlineMediaSourcesPage"),b=Object(f.a)("ui/onlineMediaSourcePage/fetchAvailableProviders"),I=Object(f.a)("ui/onlineMediaSourcePage/fetchOptOutStatuses"),S=Object(f.a)("ui/onlineMediaSourcePage/updateOptOutStatuses"),M=Object(f.a)("ui/onlineMediaSourcePage/clearOnlineMediaSourcesUpdateError"),D=(a={},
a["ui/onlineMediaSourcePage/initOnlineMediaSourcesPage"]=function(e,t,n){var r=i(e),a=e.get("cloudServer");r.restoreDefaults({availableProviders:new g.a([],{server:a})}),n(b()),n(I())},a["ui/onlineMediaSourcePage/fetchAvailableProviders"]=Object(v.a)({key:"availableProviders",getModel:i}),a["ui/onlineMediaSourcePage/fetchOptOutStatuses"]=function(e,t){var n=i(e);n.set({isOptOutStatusesPending:!0,optOutStatusesError:null});var a=r(e);d.a.ajax(a).then(function(e){n.set({optOutStatuses:e,
isOptOutStatusesPending:!1,optOutStatusesError:null})},function(e){n.set({isOptOutStatusesPending:!1,optOutStatusesError:Object(h.a)(e)})})},a["ui/onlineMediaSourcePage/updateOptOutStatuses"]=function(e,t,n){var a=i(e);a.set({isUpdatePending:!0,updateError:null});var o=s()(t.optOutStatuses)[0],l=t.optOutStatuses[o],u=r(e,{key:o,value:l},{type:"POST"});d.a.ajax(u).then(function(){var e,t=a.get("optOutStatuses");a.set({optOutStatuses:c()({},t,(e={},e[o]=l,e)),isUpdatePending:!1,updateError:null}),
n(Object(m.a)())},function(e){a.set({isUpdatePending:!1,updateError:Object(h.a)(e)})})},a["ui/onlineMediaSourcePage/clearOnlineMediaSourcesUpdateError"]=function(e,t){i(e).set("updateError",null)},a)},function(e,t,n){"use strict";var i=n(23),r=n(3601),a=i.a.extend({name:"AvailableProvidersCollection",context:["server"],model:r.a,url:"/media/providers?ignore_opt_outs=true"});t.a=a},function(e,t,n){"use strict"
;var i=n(5),r=n.n(i),a=n(19),o=n(40),s=n(51),l=n(16),c=n(77),u=c.a.prototype,d=c.a.extend({name:"UserPlaylistItemModel",context:["server","section","channel","identifier","mediaTagPrefix","mediaTagVersion","containerKey","userPlaylistKey"],idAttribute:"id",cache:null,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(o.a)(this.entityType,this.userPlaylistKey+e.id,this.server.entityID())},url:function(){
return a.join(["/pms/playlists/",this.userPlaylistKey,"items",this.id])},responseType:function(){return s.a.xml},sessionAttrs:r.a.extend({},u.sessionAttrs,{isUserPlaylistItem:l.a.boolean}),syncedAttrs:r.a.extend({},u.syncedAttrs,{id:l.a.integer,sourceTitle:l.a.string,recommender:l.a.string,message:l.a.string}),defaults:r.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(94),r=n(51),a=n(23),o=n(527),s=a.a.extend({name:"MediaSubscriptionCollection",context:["server"],model:o.a,url:"/media/subscriptions",augmentResponseText:function(e,t){return t===r.a.xml?Object(i.b)(e):e}});t.a=s},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(41),o=n.n(a),s=n(94),l=n(16),c=n(51),u=n(18),d=n(673),p=u.a.extend({name:"CalendarModel",context:["server"],
url:"/media/subscriptions/scheduled",sessionAttrs:{visibleDays:l.a.integer,time:l.a.integer},syncedRelations:{scheduled:{relationClass:d.default,rootPropertyName:"MediaGrabOperation"}},derivedAttrs:{startTime:function(){var e=this.get("visibleDays"),t=o.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=o.a.unix(this.get("time")),n=t.endOf("day");return e>1?n.add(e-2,"days").unix():n.unix()},
daysOfWeek:function(){var e=o.a.unix(this.get("startTime")),t=o.a.unix(this.get("endTime")),n=t.diff(e,"days");return r.a.times(Math.min(n+1,7),function(t){return e.clone().add(t,"days").unix()})},days:function(){var e=o.a.unix(this.get("startTime")),t=o.a.unix(this.get("endTime")),n=t.diff(e,"days");return r.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&&o.a.unix(e.get("beginsAt")).isBefore(o.a.unix(this.get("startTime")))},hasFutureEvents:function(){var e=this.get("lastEvent");return!!e&&o.a.unix(e.get("beginsAt")).isAfter(o.a.unix(this.get("endTime")))}},defaults:function(){return{visibleDays:7,time:o()().unix()}},augmentResponseText:function(e,t){return t===c.a.xml?Object(s.b)(e):e}});t.a=p},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){
return t.providerID},Object(a.a)(),o.a,function(e,t,n){if(e)return t.find(function(t){var i=n[t];return i&&i.identifier===e})})}t.a=i;var r=n(6),a=(n.n(r),n(771)),o=n(194)},function(e,t,n){"use strict";function i(){return Object(f.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar.scheduled},Object(v.a)(),function(e,t){return s.a.find(e,function(e){return c.a.unix(e.beginsAt).isAfter()&&e.mediaSubscriptionID===t.key})})}function r(){
return Object(f.createSelector)(function(e){return e.experienceSettings.timeFormat},Object(v.a)(),i(),function(e,t,n){var i=s.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 a(e){return p.a.createElement(g.a,e)}var o=n(5),s=n.n(o),l=n(41),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(11),f=n(6),v=(n.n(f),n(3649)),g=n(3650)
;t.a=Object(h.b)(r)(a)},function(e,t,n){"use strict";function i(e){var t=c.a.unix(e);return Object(p.default)("{month} {dayNumber}",{month:Object(h.a)(e),dayNumber:t.date()})}function r(e){var t=c.a.unix(e);return Object(p.default)("{month} {dayNumber}, {year}",{month:Object(h.a)(e),dayNumber:t.date(),year:t.year()})}function a(e){var t=e.startTime,n=e.endTime,a=c.a.unix(t),o=c.a.unix(n),l=a.isSame(o,"day")?r(t):i(t)+" \u2013 "+r(n);return s()("span",{className:v.a.title},void 0,l)}
var o=n(2),s=n.n(o),l=n(41),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=(n.n(d),n(4)),h=n(716),f=n(3665),v=n.n(f);t.a=a},function(e,t,n){"use strict";function i(){return Object(I.createSelector)(function(e,t){return t.linkedKey},function(e,t){return t.metricsContext},D.a,function(e,t,n){var i={isLibraryProvider:!0},r={};return t&&(r.context=t),Object(w.a)(n,i,e,r)})}function r(){return Object(I.createSelector)(function(e,t){return t.mediaSubscriptionID},function(e,t){return t.status},function(e){
return e.experienceSettings.timeFormat},i(),Object(C.a)(),Object(P.a)(),Object(O.a)(),function(e,t,n,i,r,a,o){var s=t===M.b.COMPLETE,l=t===M.b.ERROR,c=g.a.pick(r,"type","title","grandparentTitle","index","parentIndex","originallyAvailableAt");return f()({providerEntityID:o,prePlayRoute:i,isRecording:!!a,recordingProgress:a&&a.progress,isComplete:s,hasError:l,hasSubscription:!!e,showPlay:s&&!!i,timeFormat:n},c)})}
var a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(7),f=n.n(h),v=n(5),g=n.n(v),m=n(1),y=(n.n(m),n(0)),b=n.n(y),I=n(6),S=(n.n(I),n(57)),M=n(672),D=n(48),C=n(21),O=n(1273),j=n(453),P=n(1113),w=n(134),T={dispatchPlayRecording:j.playRecording},E=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onPlayPress=function(e){
var t=i.props,n=t.serverEntityID,r=t.providerEntityID,a=t.linkedKey;(0,t.dispatchPlayRecording)({serverEntityID:n,providerEntityID:r,linkedKey:a})},r=n,u()(i,r)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.component,n=(e.mediaSubscriptionID,e.status,e.linkedKey,o()(e,["component","mediaSubscriptionID","status","linkedKey"]));return b.a.createElement(t,f()({},n,{onPlayPress:this.onPlayPress}))},t}(y.Component);t.a=Object(S.a)(r,T)(E)},function(e,t,n){"use strict"
;function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.metadataItemEntityID,r=e.onRecordingModify,o=e.onModalClose,l=c()(e,["isOpen","metricsProperties","metadataItemEntityID","onRecordingModify","onModalClose"]);return s()(f.a,{isOpen:t,metricsPage:h.b,metricsProperties:n,onModalClose:o},void 0,p.a.createElement(v.a,a()({metadataItemEntityID:i,onRecordingModify:r,onModalClose:o},l)))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(35),f=n(132),v=n(3678)
;t.a=i},function(e,t,n){"use strict";function i(e){var t=e.error,n=e.onPress;return a()(d.a,{className:h.a.errorButton,component:u.a,tooltip:t,tooltipClassName:h.a.errorTooltip,tooltipAttachment:l.f.BOTTOM_CENTER,onPress:n},void 0,a()(c.a,{name:"plex-icon-alert-560","aria-label":t}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(24)),c=n(26),u=n(22),d=n(355),p=n(3681),h=n.n(p);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.subscriptionCount;return a()(c.a,{
icon:"plex-icon-calendar-560",title:Object(l.default)("You have no recordings scheduled"),description:1===t?Object(l.default)("There are no upcoming airings of the item in your list"):Object(l.default)("There are no upcoming airings of the {subscriptionCount} items in your list",{subscriptionCount:t})})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(182);t.a=i},function(e,t,n){"use strict";var i=n(599),r=n.n(i),a=new r.a(!1,"_",!0),o={writeXml:function(e){
return'<?xml version="1.0"?>'+a.json2xml_str(e)}};t.a=o},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(16),o=n(99),s=o.c.extend({name:"TransientServerModel",cache:null,persistInCache:!1,sessionAttrs:r.a.extend({},o.c.prototype.sessionAttrs,{isTransient:a.a.boolean,originalMachineIdentifier:a.a.string}),defaults:function(){var e=o.c.prototype.defaults.apply(this,arguments);return r.a.extend({},e,{friendlyName:"Transient Server",isTransient:!0})},updateCacheKey:function(){}});t.a=s
},function(e,t,n){"use strict";n.d(t,"a",function(){return c}),n.d(t,"d",function(){return u}),n.d(t,"e",function(){return d}),n.d(t,"c",function(){return p}),n.d(t,"b",function(){return h});var i,r=n(7),a=n.n(r),o=n(85),s=n(345),l=n(36),c="ui/player/localCompanionPlayer/mirrorLocalDetails",u=Object(l.a)("ui/player/localCompanionPlayer/runLocalCompanionPlaybackAction"),d=Object(l.a)("ui/player/localCompanionPlayer/setTransientServer"),p=Object(l.a)(c),h=(i={},
i["ui/player/localCompanionPlayer/runLocalCompanionPlaybackAction"]=function(e,t,n){var i=t.type,r=t.action,l=r.type,c=r.payload,u=void 0===c?{}:c,d=e.get("ui"),p=i===s.b?o.b:o.a,h=d.get(p+"Player");h.get("isOpen")&&h.get("playQueue")&&n({type:l,payload:a()({},u,{playerType:p})})},i["ui/player/localCompanionPlayer/setTransientServer"]=function(e,t){e.set("transientServer",t)},i[c]=function(e,t){},i)},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(1284),o=n(3724),s=r.a.extend({
name:"QueryParseModel",context:["server"],url:function(){return this.get("key")},sessionAttrs:{key:i.a.string},syncedAttrs:{type:i.a.string},syncedRelations:{rule:{relationClass:a.a,rootPropertyName:"Rule",deferred:!0},limits:{relationClass:o.a,rootPropertyName:"Limit",deferred:!0}}});t.a=s},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"QueryRuleModel",syncedAttrs:{field:i.a.string,fieldTitle:i.a.string,value:i.a.string,valueTitle:i.a.string,operator:i.a.string,
type:i.a.string},syncedRelations:{rules:function(){return{relationClass:n(3723).default,rootPropertyName:"Rule",deferred:!0}}}});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(16),a=n(3727),o=i.a.extend({name:"MomentListModel",context:["server"],url:function(){return this.get("momentKey")},sessionAttrs:{momentKey:r.a.string},syncedAttrs:{key:r.a.string},syncedRelations:{moments:{relationClass:a.a,rootPropertyName:"Directory"}}});t.a=o},function(e,t,n){"use strict"
;var i=n(23),r=n(808),a=i.a.extend({name:"SearchCollection",context:["server","provider"],model:r.a});t.a=a},function(e,t,n){"use strict";function i(e,t){return e?u.a.reduce(t,function(t,n,i){return-1===e.indexOf(i)&&(t[i]=n),t},{}):t}function r(e,t){var n;try{n=e._getStorageKey()}catch(e){n="no storageKey"}h.a.error("StorageModel ("+n+") "+t)}var a=n(178),o=n.n(a),s=n(273),l=n.n(s),c=n(5),u=n.n(c),d=n(68),p=n(842),h=n(30),f=n(163),v=n(33),g=d.c.Model.extend({sessionAttrs:[],
save:function(e,t,n){var r,a=this.attributes;if(null==e||"object"===(void 0===e?"undefined":l()(e))?(r=e,n=t):(r={})[e]=t,n=u.a.extend({validate:!0},n),r&&!n.wait){if(!this.set(r,n))return!1}else if(!this._validate(r,n))return!1;r&&n.wait&&(this.attributes=u.a.extend({},a,r)),void 0===n.parse&&(n.parse=!0);var o=this,s=n.success;n.success=function(){o.attributes=a,s&&s(o,a,n),o.trigger("sync",o,a,n)},d.c.wrapError(this,n);var c=this._getStorage(),h=this._getStorageKey(),f=this.attributes
;if(!1!==c.getInstance().excludeDefaults){var v=u.a.result(this,"defaults");f=Object(p.a)(v,f)}f=i(u.a.result(this,"sessionAttrs"),f);var g=this.serialize(f),m=c.set(h,g);return m.done(n.success).fail(n.error),r&&n.wait&&(this.attributes=a),m},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){
if(!t.set(t.parse(i,e),e))return!1;n&&n(t,i,e),t.trigger("sync",t,i,e)},d.c.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){e=e?u.a.clone(e):{};var t=this,n=e.success,i=function(){t.trigger("destroy",t,t.collection,e)};e.success=function(r){e.wait&&i(),n&&n(t,r,e),t.trigger("sync",t,r,e)},d.c.wrapError(this,e);var r=this._getStorage().remove(this._getStorageKey())
;return r.done(e.success).fail(e.error),e.wait||i(),r},serialize:function(e){var t="";try{t=o()(e)}catch(e){r(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);t=i(u.a.result(this,"sessionAttrs"),t)}catch(t){var n=u.a.isString(e)?e.substring(0,50):"no response";r(this,"parse error: "+t.message+" ("+n+")")}return t},sync:function(){throw new Error("storage model doesn`t allow syncing to server")},
startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void Object(v.a)(!1,"This model is already capturing events");var e=this.set,t={};this.set=function(n,i,r){var a;"object"===(void 0===n?"undefined":l()(n))?(a=n,r=i):(a={})[n]=i;var o=u.a.extend({},r,{silent:!0}),s=e.call(this,a,o);return u.a.extend(t,this.changed),s},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=g},function(e,t,n){"use strict";var i=n(12),r=n.n(i),a=n(97),o=n(23),s=n(55),l=n(3783),c=n(660),u=o.a.extend({name:"ProviderCollection",context:["server"],model:s.a,url:"/media/providers",responseType:function(){
return Object(a.a)(this.server)},fetch:function(){var e=this.server,t=void 0;return t=e.get("mediaProviders")||e.get("isCloud")?o.a.prototype.fetch.apply(this,arguments):r.a.Deferred().resolve(this,"").promise(),t.then(function(t){e.get("isCloud")||t.forEach(function(e){e.set({isPending:!1,isPopulated:!0})}),e.get("isCloud")||t.get(s.c.LIBRARY_PROVIDER_IDENTIFIER)||t.add(new l.a({isPending:!1,isPopulated:!0},{server:e})),t.get(s.c.CHANNEL_PROVIDER_IDENTIFIER)||t.add(new c.a({isPending:!1,
isPopulated:!0},{server:e}))}),t}});t.a=u},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var i=n(5),r=n.n(i),a=n(15),o=n(69),s=n(17),l=n(618),c=n(89),u=n(32),d=n(3834),p="unknown",h=o.a.extend({mixins:[c.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=r.a.last(t);return!(!n||!n.indexOf("fragment"))},isDismissedUpdate:function(e){return(Object(l.a)(e.get("version"))||p)===Object(a.d)("appModel").get("settings").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(){u.a.execute("checkForServerUpdates",{server:e,
download:!1})}):this.isDismissedUpdate(t)||s.a.trigger("show:bar","alertbar",new d.a({model:t}))}},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");if(n&&this.stopListening(n.get("desktop").get("update")),!t||!t.get("isFullOwnedServer"))return void clearTimeout(this.bundleUpdatesTimeout);this.listenTo(t.get("desktop").get("update"),"change:state",this.onServerUpdateStateChange),this.checkForServerUpdates(t)},onPrimaryServerConnectedChange:function(e,t){
this.checkForServerUpdates(e)},onServerUpdateStateChange:function(e,t){this.isDismissedUpdate(e)||this.isLastHistoryEntry("/settings/server")||/^(available|downloaded|notify)$/.test(t)&&s.a.trigger("show:bar","alertbar",new d.a({model:e}))}});t.b=h},function(e,t,n){"use strict";function i(e){var t=Object(u.a)(e);return t?e.get("isCloud")?s.a.Deferred().resolve(a()({},t,{transcoderVideo:!1,transcoderVideoRemuxOnly:!1,transcoderAudio:!1})).promise():(t.transcoderVideo=e.get("transcoderVideo")||!1,
t.transcoderVideoRemuxOnly=e.get("transcoderVideoRemuxOnly")||!1,t.transcoderAudio=e.get("transcoderAudio")||!1,t.version=e.get("shortVersion"),t.myPlexSubscription=e.get("myPlexSubscription"),t.isVerifiedHostname="https"===t.protocol&&!l.a.isValidAddress(t.address),Object(c.a)(e).then(function(e){return t.accessToken=e,t})):s.a.Deferred().reject().promise()}t.a=i;var r=n(7),a=n.n(r),o=n(12),s=n.n(o),l=n(600),c=n(3837),u=n(1291)},function(e,t,n){"use strict";function i(e){
if(e.get("isCloud"))return{machineIdentifier:"node",protocol:"https",address:"node.plexapp.com",port:"32443"};var t=e.get("connections"),n=t.filter(function(e){return e.get("isConnected")&&!e.get("isLoopback")}),i=n.length?n.reduce(r.a):null;return i?{machineIdentifier:e.get("originalMachineIdentifier")||e.get("machineIdentifier"),protocol:i.get("scheme"),address:i.getAddressFromUri(),port:i.get("port")}:void 0}t.a=i;var r=n(472)},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),
n.d(t,"c",function(){return r}),n.d(t,"a",function(){return a}),n.d(t,"b",function(){return o});var i="stopped",r="paused",a="buffering",o="error"},function(e,t,n){"use strict";var i=n(3844),r=window.Raven,a=new i;a.noConflict=function(){return window.Raven=r,a},a.afterLoad(),e.exports=a},function(e,t,n){"use strict";function i(e){return void 0===e}function r(e){return"function"==typeof e}function a(e){return"[object String]"===g.toString.call(e)}function o(e){return"object"==typeof e&&null!==e}
function s(e){for(var t in e)return!1;return!0}function l(e){return o(e)&&"[object Error]"===g.toString.call(e)||e instanceof Error}function c(e,t){var n,r;if(i(e.length))for(n in e)p(e,n)&&t.call(null,n,e[n]);else if(r=e.length)for(n=0;n<r;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 p(e,t){return g.hasOwnProperty.call(e,t)}function h(e){for(var t,n=[],i=0,r=e.length;i<r;i++)t=e[i],
a(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 v(){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;return("x"===e?t:3&t|8).toString(16)})}var g=Object.prototype;e.exports={isUndefined:i,isFunction:r,isString:a,isObject:o,isEmptyObject:s,isError:l,each:c,objectMerge:u,truncate:d,hasKey:p,joinRegExp:h,urlencode:f,uuid4:v}},function(e,t,n){"use strict";function i(e){switch(e){case 1:return Object(I.default)("Abort");case 2:
return Object(I.default)("Network");case 3:return Object(I.default)("Decode");case 4:return Object(I.default)("Codec")}}var r=n(2),a=n.n(r),o=n(50),s=n.n(o),l=n(992),c=n.n(l),u=n(8),d=n.n(u),p=n(9),h=n.n(p),f=n(10),v=n.n(f),g=n(1),m=(n.n(g),n(0)),y=(n.n(m),n(84)),b=n.n(y),I=n(4),S=n(33),M=n(30),D=n(633),C=n(3863),O=2,j=function(e){function t(n,r){d()(this,t);var a=h()(this,e.call(this,n,r));return a.onMetadataLoad=function(){var e=a.props,t=e.positionSeconds,n=e.onDurationMillisecondsChange
;t&&(a._mediaEl.currentTime=t),a._canNativelySelectAudioTrack()&&a._selectAudioTrack(),a.setState({isStarted:!0},function(){if(n){var e=a._mediaEl.duration;n(c()(e)?Math.floor(1e3*e):0)}})},a.onCanPlay=function(){if(a.props.onCanPlay){var e;(e=a.props).onCanPlay.apply(e,arguments)}},a.onPositionUpdate=function(){var e=Math.floor(1e3*a._mediaEl.currentTime);if(e!==a._lastPositionMilliseconds)a._lastPositionMilliseconds=e,a._lastPositionChangeTime=Date.now(),a._isBuffering&&(a._isBuffering=!1,
a.props.onBufferingChange&&a.props.onBufferingChange(!1));else if(!a._isBuffering&&!a.props.paused){var t=Date.now()-a._lastPositionChangeTime;t>500&&(M.a.warn("[Player] Buffering detected, last position change was "+t+"ms ago"),a._isBuffering=!0,a.props.onBufferingChange&&a.props.onBufferingChange(!0))}a.props.onPositionMillisecondsChange(e)},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&&a.props.onBufferChange({start:t,end:n})}},a.onEnded=function(){a.props.onEnd&&a.props.onEnd()},a.onError=function(e){var t=e.target.error.code,n=i(t),r=t+" ("+(n||"Unknown")+")";t===O?M.a.warn("[Player] An HTML media error occurred: "+r+"; the player will attempt to recover"):(M.a.warn("[Player] A critical HTML media error occurred: "+r+"; the player cannot recover"),a.props.onError&&a.props.onError({code:"h"+t,category:n}))},a.onSeek=function(e){
var t=a.props.onSeek,n=a._mediaEl.ended;t?t(e):a._mediaEl.currentTime=e,!a.props.paused&&n&&a._play()},a.state={isStarted:!1},a._mediaListeners={loadedmetadata:a.onMetadataLoad,canplay:a.onCanPlay,progress:a.onProgress,ended:a.onEnded,error:a.onError},a._mediaEl=Object(D.a)(n.mediaType,n.allowRecycleElement),a._lastPositionMilliseconds=null,a._lastPositionChangeTime=0,a._isBuffering=!1,a._isUnmounting=!1,a}return v()(t,e),t.prototype.componentDidMount=function(){var e=this,t=this._mediaEl
;t.className=this.props.className,t.volume=Math.max(0,Math.min(this.props.volume/100,1)),s()(this._mediaListeners).forEach(function(n){t.addEventListener(n,e._mediaListeners[n])}),this._node=b.a.findDOMNode(this),this._node.appendChild(t),this.props.onElementChange?this.props.onElementChange(t):t.src=this.props.src,this.props.isReadyToPlay&&!this.props.paused&&this.props.src&&this._play(),this._mediaEl.playbackRate=this.props.playbackSpeed},t.prototype.componentDidUpdate=function(e,t){
Object(S.a)(this.props.src===e.src,"Use a new `key` when changing `src`")
;var n=this.props,i=n.className,r=n.lastSeekPositionSeconds,a=n.paused,o=n.volume,s=n.playbackSpeed,l=n.isReadyToPlay,c=n.audioStream,u=n.subtitleStream,d=n.subtitleSize,p=n.hasBurnedSubtitles,h=n.isStreamChangeInProgress,f=n.onStreamChange,v=this._mediaEl,g=null!=r&&r!==e.lastSeekPositionSeconds,m=(!!e.audioStream&&e.audioStream.id)!==(!!c&&c.id),y=(!!e.subtitleStream&&e.subtitleStream.id)!==(!!u&&u.id),b=e.isStreamChangeInProgress&&!h,I=e.subtitleSize!==d;g&&this.onSeek(r),
a===e.paused||v.ended||(a?this._pause():this._play()),o!==e.volume&&(v.volume=Math.max(0,Math.min(o/100,1))),s!==e.playbackSpeed&&(v.playbackRate=s),i!==e.className&&(v.className=i),!l||e.isReadyToPlay||a||this._play(),f&&(m&&!h||y&&!h||b||I&&p)&&f()},t.prototype.componentWillUnmount=function(){var e=this;this._isUnmounting=!0,this.props.onBufferChange&&this.props.onBufferChange({start:0,end:0}),this._node.removeChild(this._mediaEl),this._mediaEl.src="",this._mediaEl.removeAttribute("src"),
s()(this._mediaListeners).forEach(function(t){e._mediaEl.removeEventListener(t,e._mediaListeners[t])}),this.props.allowRecycleElement&&Object(D.b)(this._mediaEl)},t.prototype._play=function(){var e=this,t=this._mediaEl.play();t&&t.then&&t.then(null,function(t){if(!e._isUnmounting){("AbortError"===t.name||"NotAllowedError"===t.name)&&e.props.onPause&&e.props.onPause(),M.a.warn(t.name+": "+t.message)}})},t.prototype._pause=function(){this._mediaEl.pause()},
t.prototype._canNativelySelectAudioTrack=function(){var e=this.props,t=e.audioStreams,n=e.isDecisionDirectPlay;return!!(t&&t.length&&n&&this._mediaEl.audioTracks)},t.prototype._selectAudioTrack=function(){var e=this.props,t=e.audioStreams,n=e.audioStream,i=this._mediaEl.audioTracks;if(i)for(var r=t.findIndex(function(e){return e.id===n.id}),a=0;a<i.length;a++)i[a].enabled=a===r},t.prototype.render=function(){var e=this.props,t=e.containerClassName,n=e.children,i=e.onTick,r=this.state.isStarted
;return a()("div",{className:t},void 0,n,r&&a()(C.a,{onPositionUpdate:this.onPositionUpdate,onTick:i}))},t}(m.Component);j.defaultProps={className:"",mediaType:"video",positionSeconds:0,volume:100,playbackSpeed:1,allowRecycleElement:!1,isReadyToPlay:!0},t.a=j},function(e,t,n){(function(i){var r;!function(){var a={};(function(e){function t(){t=function(){},Qs.Symbol||(Qs.Symbol=Hs)}function n(){t();var e=Qs.Symbol.iterator;e||(e=Qs.Symbol.iterator=Qs.Symbol("iterator")),
"function"!=typeof Array.prototype[e]&&Fs(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return r(this)}}),n=function(){}}function r(e){var t=0;return a(function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}})}function a(e){return n(),e={next:e},e[Qs.Symbol.iterator]=function(){return this},e}function o(e){n();var t=e[Symbol.iterator];return t?t.call(e):r(e)}function s(e,t){if(t){for(var n=Qs,i=e.split("."),r=0;r<i.length-1;r++){var a=i[r];a in n||(n[a]={}),n=n[a]}
i=i[i.length-1],r=n[i],a=t(r),a!=r&&null!=a&&Fs(n,i,{configurable:!0,writable:!0,value:a})}}function l(e,t){var n=e.split("."),i=Ys;n[0]in i||!i.execScript||i.execScript("var "+n[0]);for(var r;n.length&&(r=n.shift());)n.length||void 0===t?i=i[r]?i[r]:i[r]={}:i[r]=t}function c(e,t){function n(){}n.prototype=t.prototype,e.df=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.bf=function(e,n,i){return t.prototype[n].apply(e,Array.prototype.slice.call(arguments,2))}}function u(e){
this.c=Math.exp(Math.log(.5)/e),this.b=this.a=0}function d(e,t,n){var i=Math.pow(e.c,t);n=n*(1-i)+i*e.a,isNaN(n)||(e.a=n,e.b+=t)}function p(e){return e.a/(1-Math.pow(e.c,e.b))}function h(){this.b=new u(2),this.c=new u(5),this.a=0}function f(){}function v(){}function g(e,t,n,i){this.severity=e,this.category=t,this.code=n,this.data=Array.prototype.slice.call(arguments,3),this.handled=!1}function m(e){var t;e instanceof m?(y(this,e.fa),this.Aa=e.Aa,this.ja=e.ja,b(this,e.Oa),this.Y=e.Y,
I(this,O(e.a)),this.va=e.va):e&&(t=String(e).match(Ws))?(y(this,t[1]||"",!0),this.Aa=S(t[2]||""),this.ja=S(t[3]||"",!0),b(this,t[4]),this.Y=S(t[5]||"",!0),I(this,t[6]||"",!0),this.va=S(t[7]||"")):this.a=new C(null)}function y(e,t,n){e.fa=n?S(t,!0):t,e.fa&&(e.fa=e.fa.replace(/:$/,""))}function b(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Oa=t}else e.Oa=null}function I(e,t,n){t instanceof C?e.a=t:(n||(t=M(t,Zs)),e.a=new C(t))}function S(e,t){
return e?t?decodeURI(e):decodeURIComponent(e):""}function M(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,D),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function D(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(15&e).toString(16)}function C(e){this.b=e||null}function O(e){var t=new C;if(t.b=e.b,e.a){var n,i={};for(n in e.a)i[n]=e.a[n].concat();t.a=i,t.c=e.c}return t}function j(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}
function P(e,t,n){var i=T();this.j=null==e.maxAttempts?i.maxAttempts:e.maxAttempts,this.f=null==e.baseDelay?i.baseDelay:e.baseDelay,this.i=null==e.fuzzFactor?i.fuzzFactor:e.fuzzFactor,this.h=null==e.backoffFactor?i.backoffFactor:e.backoffFactor,this.a=0,this.b=this.f,this.c=t||!1,this.g=n||null,this.c&&(this.a=1)}function w(e){if(e.a>=e.j){if(!e.c)return Promise.reject();e.a=1,e.b=e.f}var t=new j;return e.a?(E(e,t.resolve,e.b*(1+(2*Math.random()-1)*e.i)),e.b*=e.h):t.resolve(),e.a++,t}
function T(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0}}function E(e,t,n){if(e.g)if(e.g()||0==n)t();else{var i=Math.min(200,n);x(function(){E(this,t,n-i)}.bind(e),i)}else x(t,n)}function x(t,n){e.setTimeout(t,n)}function N(e,t,n,i,r){var a,o=r in i;for(a in t){var s=r+"."+a,l=o?i[r]:n[a];(o||a in e)&&(void 0===t[a]?void 0===l||o?delete e[a]:e[a]=l:l.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=l),
N(e[a],t[a],l,i,s)):typeof t[a]==typeof l&&null!=t[a]&&t[a].constructor==l.constructor&&(e[a]=t[a]))}}function A(e){function t(e){switch(typeof e){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return e;default:if(!e)return e;if(0<=n.indexOf(e))return null;var i=e.constructor==Array;if(e.constructor!=Object&&!i)return null;n.push(e);var r,a=i?[]:{};for(r in e)a[r]=t(e[r]);return i&&(a.length=e.length),a}}var n=[];return t(e)}function L(e,t){
return e.reduce(function(e,t,n){return t.catch(e.bind(null,n))}.bind(null,t),Promise.reject())}function k(e,t){return e.concat(t)}function _(){}function R(e){return null!=e}function z(e,t,n){return n.indexOf(e)==t}function U(e){this.f=!1,this.a=[],this.b=[],this.c=[],this.g=e||null}function B(e,t,n){n=n||3;var i=Js[e];(!i||n>=i.je)&&(Js[e]={je:n,he:t})}function V(e,t){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t}}function F(e,t,n,i,r,a,o){
if(e.f||o())return Promise.reject();var s=new m(n.uris[r]),l=s.fa;if(l||(l=location.protocol,l=l.slice(0,-1),y(s,l),n.uris[r]=s.toString()),!(l=(l=Js[l])?l.he:null))return Promise.reject(new g(2,1,1e3,s));var c=Date.now();return l(n.uris[r],n,t).then(function(e){void 0==e.timeMs&&(e.timeMs=Date.now()-c);var n=Date.now(),i=Promise.resolve();return this.c.forEach(function(n){i=i.then(function(){return Promise.resolve(n(t,e))}.bind(this))}.bind(this)),i=i.catch(function(e){var t=2
;throw e instanceof g&&(t=e.severity),new g(t,1,1007,e)}),i.then(function(){return e.timeMs+=Date.now()-n,e.timeMs+=a,e})}.bind(e)).catch(function(e){if(e&&1==e.severity)return r=(r+1)%n.uris.length,o()?Promise.reject():w(i).then(function(){return F(this,t,n,i,r,a,o)}.bind(this),function(){throw e});throw e}.bind(e))}function Q(e,t){for(var n=[],i=0;i<e.length;++i){for(var r=!1,a=0;a<n.length&&!(r=t?t(e[i],n[a]):e[i]===n[a]);++a);r||n.push(e[i])}return n}function H(e,t,n){
for(var i=0;i<e.length;++i)if(n(e[i],t))return i;return-1}function Y(e,t){var n=e.indexOf(t);-1<n&&e.splice(n,1)}function W(e,t){var n=0;return e.forEach(function(e){n+=t(e)?1:0}),n}function G(){this.a={}}function K(){this.a=new G}function q(e,t,n,i){e.a&&(t=new J(t,n,i),e.a.push(n,t))}function Z(e,t,n,i){q(e,t,n,function(e){this.ia(t,n),i(e)}.bind(e))}function X(e){if(e.a){var t,n=e.a,i=[];for(t in n.a)i.push.apply(i,n.a[t]);for(n=0;n<i.length;++n)i[n].ia();e.a.a={}}}function J(e,t,n){
this.target=e,this.type=t,this.a=n,this.target.addEventListener(t,n,!1)}function $(t,n){var i,r=n||{};for(i in r)this[i]=r[i];this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.a=!1}function ee(e,t){if(0==t.length)return e;var n=t.map(function(e){return new m(e)});return e.map(function(e){return new m(e)}).map(function(e){
return n.map(e.resolve.bind(e))}).reduce(k,[]).map(function(e){return e.toString()})}function te(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:t||[],keyIds:[]}}function ne(e){return!e||0==Object.keys(e).length}function ie(e){return Object.keys(e).map(function(t){return e[t]})}function re(e,t){return Object.keys(e).every(function(n){return t(n,e[n])})}function ae(e,t){
Object.keys(e).forEach(function(n){t(n,e[n])})}function oe(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function se(e){if(!e)return"";e=new Uint8Array(e),239==e[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),e=escape(de(e));try{return decodeURIComponent(e)}catch(e){throw new g(2,2,2004)}}function le(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new g(2,2,2004);if(e instanceof ArrayBuffer)var i=e;else n=new Uint8Array(e.byteLength),n.set(new Uint8Array(e)),i=n.buffer
;e=Math.floor(e.byteLength/2),n=new Uint16Array(e),i=new DataView(i);for(var r=0;r<e;r++)n[r]=i.getUint16(2*r,t);return de(n)}function ce(e){var t=new Uint8Array(e);if(239==t[0]&&187==t[1]&&191==t[2])return se(t);if(254==t[0]&&255==t[1])return le(t.subarray(2),!1);if(255==t[0]&&254==t[1])return le(t.subarray(2),!0);var n=function(e,t){return e.byteLength<=t||32<=e[t]&&126>=e[t]}.bind(null,t);if(0==t[0]&&0==t[2])return le(e,!1);if(0==t[1]&&0==t[3])return le(e,!0)
;if(n(0)&&n(1)&&n(2)&&n(3))return se(e);throw new g(2,2,2003)}function ue(e){e=encodeURIComponent(e),e=unescape(e);for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t.buffer}function de(e){for(var t="",n=0;n<e.length;n+=16e3)t+=String.fromCharCode.apply(null,e.subarray(n,n+16e3));return t}function pe(e){this.a=null,this.b=function(){this.a=null,e()}.bind(this)}function he(e,t){e.cancel(),e.a=setTimeout(e.b,1e3*t)}function fe(e,t){e.cancel();var n=function(){
this.b(),this.a=setTimeout(n,1e3*t)}.bind(e);e.a=setTimeout(n,1e3*t)}function ve(t,n){var i=void 0==n||n,r=e.btoa(String.fromCharCode.apply(null,t)).replace(/\+/g,"-").replace(/\//g,"_");return i?r:r.replace(/=*$/,"")}function ge(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}function me(t){for(var n=new Uint8Array(t.length/2),i=0;i<t.length;i+=2)n[i/2]=e.parseInt(t.substr(i,2),16);return n}function ye(e){
for(var t="",n=0;n<e.length;++n){var i=e[n].toString(16);1==i.length&&(i="0"+i),t+=i}return t}function be(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var n=0;n<e.length;++n)if(e[n]!=t[n])return!1;return!0}function Ie(e){for(var t=0,n=0;n<arguments.length;++n)t+=arguments[n].length;t=new Uint8Array(t);var i=0;for(n=0;n<arguments.length;++n)t.set(arguments[n],i),i+=arguments[n].length;return t}function Se(e){this.s=e,this.l=this.j=this.u=null,this.L=!1,this.b=null,
this.g=new K,this.a=[],this.m=[],this.i=new j,this.f=null,this.h=function(t){this.i.reject(t),e.onError(t)}.bind(this),this.A={},this.I=new pe(this.ke.bind(this)),this.da=this.c=!1,this.K=[],this.ca=!1,this.w=new pe(this.ie.bind(this)),fe(this.w,1),this.i.catch(function(){})}function Me(e,t){if(!e.j)return Z(e.g,t,"encrypted",function(){this.h(new g(2,6,6010))}.bind(e)),Promise.resolve();e.l=t,Z(e.g,e.l,"play",e.Nd.bind(e));var n=e.l.setMediaKeys(e.j);n=n.catch(function(e){
return Promise.reject(new g(2,6,6003,e.message))});var i=null;return e.b.serverCertificate&&e.b.serverCertificate.length&&(i=e.j.setServerCertificate(e.b.serverCertificate).then(function(){}).catch(function(e){return Promise.reject(new g(2,6,6004,e.message))})),Promise.all([n,i]).then(function(){if(this.c)return Promise.reject();Ce(this),this.b.initData.length||this.m.length||q(this.g,this.l,"encrypted",this.Cd.bind(this))}.bind(e)).catch(function(e){
return this.c?Promise.resolve():Promise.reject(e)}.bind(e))}function De(e,t){return Promise.all(t.map(function(e){return Ae(this,e).then(function(e){if(e){for(var t=new j,n=0;n<this.a.length;n++)if(this.a[n].ga==e){this.a[n].na=t;break}return Promise.all([e.remove(),t])}}.bind(this))}.bind(e)))}function Ce(e){var t=e.b?e.b.initData:[];return t.forEach(function(e){Le(this,e.initDataType,e.initData)}.bind(e)),e.m.forEach(function(e){Ae(this,e)}.bind(e)),t.length||e.m.length||e.i.resolve(),e.i}
function Oe(e){return e.a.map(function(e){return e.ga.sessionId})}function je(t,n,i,r,a){var o=Te(t),s=Ee(t,n);n.periods.forEach(function(t){t.variants.forEach(function(t){o&&(t.drmInfos=[o]),s&&(t.drmInfos=s),t.drmInfos.forEach(function(n){we(this,n),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==n.keySystem&&(n.keySystem="com.chromecast.playready");var o=r[n.keySystem];o||(o={audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",
persistentState:i?"required":"optional",sessionTypes:[i?"persistent-license":"temporary"],label:n.keySystem,drmInfos:[]},r[n.keySystem]=o,a.push(n.keySystem)),o.drmInfos.push(n),n.distinctiveIdentifierRequired&&(o.distinctiveIdentifier="required"),n.persistentStateRequired&&(o.persistentState="required");var s=[];t.video&&s.push(t.video),t.audio&&s.push(t.audio),s.forEach(function(e){("video"==e.type?o.videoCapabilities:o.audioCapabilities).push({
robustness:("video"==e.type?n.videoRobustness:n.audioRobustness)||"",contentType:oe(e.mimeType,e.codecs)})}.bind(this))}.bind(this))}.bind(this))}.bind(t))}function Pe(e,t,n){if(1==n.length&&""==n[0])return Promise.reject(new g(2,6,6e3));var i=new j,r=i;return[!0,!1].forEach(function(e){n.forEach(function(n){var i=t[n];i.drmInfos.some(function(e){return!!e.licenseServerUri})==e&&(0==i.audioCapabilities.length&&delete i.audioCapabilities,0==i.videoCapabilities.length&&delete i.videoCapabilities,
r=r.catch(function(){return this.c?Promise.reject():navigator.requestMediaKeySystemAccess(n,[i])}.bind(this)))}.bind(this))}.bind(e)),r=r.catch(function(){return Promise.reject(new g(2,6,6001))}),r=r.then(function(e){if(this.c)return Promise.reject();var n=0<=navigator.userAgent.indexOf("Edge/"),i=e.getConfiguration();return this.u=(i.audioCapabilities||[]).concat(i.videoCapabilities||[]).map(function(e){return e.contentType}),n&&(this.u=null),n=t[e.keySystem],xe(this,e.keySystem,n,n.drmInfos),
this.b.licenseServerUri?e.createMediaKeys():Promise.reject(new g(2,6,6012))}.bind(e)).then(function(e){if(this.c)return Promise.reject();this.j=e,this.L=!0}.bind(e)).catch(function(e){return this.c?Promise.resolve():(this.u=this.b=null,e instanceof g?Promise.reject(e):Promise.reject(new g(2,6,6002,e.message)))}.bind(e)),i.reject(),r}function we(e,t){var n=t.keySystem;if(n){if(!t.licenseServerUri){var i=e.f.servers[n];i&&(t.licenseServerUri=i)}t.keyIds||(t.keyIds=[]),
(n=e.f.advanced[n])&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=n.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=n.persistentStateRequired),t.videoRobustness||(t.videoRobustness=n.videoRobustness),t.audioRobustness||(t.audioRobustness=n.audioRobustness),t.serverCertificate||(t.serverCertificate=n.serverCertificate))}}function Te(t){if(ne(t.f.clearKeys))return null;var n,i=[],r=[];for(n in t.f.clearKeys){var a=t.f.clearKeys[n],o=me(n)
;a=me(a),o={kty:"oct",kid:ve(o,!1),k:ve(a,!1)},i.push(o),r.push(o.kid)}return t=JSON.stringify({keys:i}),r=JSON.stringify({kids:r}),r=[{initData:new Uint8Array(ue(r)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:r,keyIds:[]}}function Ee(e,t){var n=e.f,i=Object.keys(n.servers)
;return!i.length||t.periods.some(function(e){return e.variants.some(function(e){return e.drmInfos.length})})?null:i.map(function(e){return{keySystem:e,licenseServerUri:n.servers[e],distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]}})}function xe(e,t,n,i){var r=[],a=[],o=[],s=[];Ne(i,r,a,o,s),e.b={keySystem:t,licenseServerUri:r[0],distinctiveIdentifierRequired:"required"==n.distinctiveIdentifier,
persistentStateRequired:"required"==n.persistentState,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:"",serverCertificate:a[0],initData:o,keyIds:s}}function Ne(e,t,n,i,r){function a(e,t){return!(!e.keyId||e.keyId!=t.keyId)||e.initDataType==t.initDataType&&be(e.initData,t.initData)}e.forEach(function(e){if(-1==t.indexOf(e.licenseServerUri)&&t.push(e.licenseServerUri),
e.serverCertificate&&-1==H(n,e.serverCertificate,be)&&n.push(e.serverCertificate),e.initData&&e.initData.forEach(function(e){-1==H(i,e,a)&&i.push(e)}),e.keyIds)for(var o=0;o<e.keyIds.length;++o)-1==r.indexOf(e.keyIds[o])&&r.push(e.keyIds[o])})}function Ae(e,t){try{var n=e.j.createSession("persistent-license")}catch(t){var i=new g(2,6,6005,t.message);return e.h(i),Promise.reject(i)}q(e.g,n,"message",e.Cc.bind(e)),q(e.g,n,"keystatuseschange",e.yc.bind(e));var r={initData:null,ga:n,loaded:!1,
Sb:1/0,na:null};return e.a.push(r),n.load(t).then(function(e){if(!this.c){if(e)return r.loaded=!0,this.a.every(function(e){return e.loaded})&&this.i.resolve(),n;this.a.splice(this.a.indexOf(r),1),this.h(new g(2,6,6013))}}.bind(e),function(e){this.c||(this.a.splice(this.a.indexOf(r),1),this.h(new g(2,6,6005,e.message)))}.bind(e))}function Le(e,t,n){try{var i=e.da?e.j.createSession("persistent-license"):e.j.createSession()}catch(t){return void e.h(new g(2,6,6005,t.message))}
q(e.g,i,"message",e.Cc.bind(e)),q(e.g,i,"keystatuseschange",e.yc.bind(e)),e.a.push({initData:n,ga:i,loaded:!1,Sb:1/0,na:null}),i.generateRequest(t,n.buffer).catch(function(e){if(!this.c){for(var t=0;t<this.a.length;++t)if(this.a[t].ga==i){this.a.splice(t,1);break}this.h(new g(2,6,6006,e.message))}}.bind(e))}function ke(e,t){for(var n,i=t.target,r=0;r<e.a.length;r++)if(e.a[r].ga==i){n=e.a[r];break}r=V([e.b.licenseServerUri],e.f.retryParameters),r.body=t.message,r.method="POST",
"com.microsoft.playready"!=e.b.keySystem&&"com.chromecast.playready"!=e.b.keySystem||_e(r),e.s.Ya.request(2,r).then(function(e){return this.c?Promise.reject():i.update(e.data).then(function(){this.s.onEvent(new $("drmsessionupdate")),n&&(n.na&&n.na.resolve(),setTimeout(function(){n.loaded=!0,this.a.every(function(e){return e.loaded})&&this.i.resolve()}.bind(this),5e3))}.bind(this))}.bind(e),function(e){if(this.c)return Promise.resolve();e=new g(2,6,6007,e),this.h(e),n&&n.na&&n.na.reject(e)
}.bind(e)).catch(function(e){if(this.c)return Promise.resolve();e=new g(2,6,6008,e.message),this.h(e),n&&n.na&&n.na.reject(e)}.bind(e))}function _e(e){var t=le(e.body,!0,!0);if(-1==t.indexOf("PlayReadyKeyMessage"))e.headers["Content-Type"]="text/xml; charset=utf-8";else{t=(new DOMParser).parseFromString(t,"application/xml");for(var n=t.getElementsByTagName("HttpHeader"),i=0;i<n.length;++i)e.headers[n[i].querySelector("name").textContent]=n[i].querySelector("value").textContent
;e.body=ge(t.querySelector("Challenge").textContent).buffer}}function Re(){var e=[],t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],n=[{videoCapabilities:t,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:t}],i={};return"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").forEach(function(t){
var r=navigator.requestMediaKeySystemAccess(t,n).then(function(e){var n=e.getConfiguration().sessionTypes;return n=!!n&&0<=n.indexOf("persistent-license"),0<=navigator.userAgent.indexOf("Tizen 3")&&(n=!1),i[t]={persistentState:n},e.createMediaKeys()}).catch(function(){i[t]=null});e.push(r)}),Promise.all(e).then(function(){return i})}function ze(e,t){var n=e.keySystem();return 0==t.drmInfos.length||t.drmInfos.some(function(e){return e.keySystem==n})}function Ue(e,t){if(!e.length)return t
;if(!t.length)return e;for(var n=[],i=0;i<e.length;i++)for(var r=0;r<t.length;r++)if(e[i].keySystem==t[r].keySystem){var a=e[i];r=t[r];var o=[];o=o.concat(a.initData||[]),o=o.concat(r.initData||[]);var s=[];s=s.concat(a.keyIds),s=s.concat(r.keyIds),n.push({keySystem:a.keySystem,licenseServerUri:a.licenseServerUri||r.licenseServerUri,distinctiveIdentifierRequired:a.distinctiveIdentifierRequired||r.distinctiveIdentifierRequired,
persistentStateRequired:a.persistentStateRequired||r.persistentStateRequired,videoRobustness:a.videoRobustness||r.videoRobustness,audioRobustness:a.audioRobustness||r.audioRobustness,serverCertificate:a.serverCertificate||r.serverCertificate,initData:o,keyIds:s});break}return n}function Be(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Ve(e,t){return!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))&&(t>=e.start(0)&&t<=e.end(e.length-1))}
function Fe(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var n=0,i=e.length-1;0<=i&&e.end(i)>t;--i)n+=e.end(i)-Math.max(e.start(i),t);return n}function Qe(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function He(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.b=null,this.c=[],this.a.on("data",this.g.bind(this)),this.a.on("done",this.f.bind(this))}function Ye(e,t){var n=t.replace("mp2t","mp4")
;"audio"==e&&(n=n.replace("video","audio"));var i=/avc1\.(66|77|100)\.(\d+)/.exec(n);if(i){var r="avc1.",a=i[1],o=Number(i[2]);r=("66"==a?r+"4200":"77"==a?r+"4d00":r+"6400")+(o>>4).toString(16),r+=(15&o).toString(16),n=n.replace(i[0],r)}return n}function We(e,t){e.b=new j,e.c=[];var n=new Uint8Array(t);return e.a.push(n),e.a.flush(),e.b}function Ge(e){this.c=null,this.f=e,this.i=this.g=0,this.h=1/0,this.b=this.a=null}function Ke(e,t,n,i){return Promise.resolve().then(function(){
if(this.c&&this.f)if(null==n||null==i)this.c.parseInit(new Uint8Array(t));else{var e={periodStart:this.g,segmentStart:this.g+n,segmentEnd:this.g+i};e=this.c.parseMedia(new Uint8Array(t),e).filter(function(e){return e.startTime>=this.i&&e.startTime<this.h}.bind(this)),this.f.append(e),null==this.a&&(this.a=Math.max(n,this.i)),this.b=Math.min(i,this.h)}}.bind(e))}function qe(e,t,n){this.g=e,this.f=t,this.l=n,this.b={},this.a=null,this.c={},this.i=new K,this.j=!1,this.h={}}function Ze(){var e={}
;return'video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="av1",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").forEach(function(t){
e[t]=!!tl[t]||MediaSource.isTypeSupported(t);var n=t.split(";")[0];e[n]=e[n]||e[t]}),e}function Xe(e,t){e.a||(e.a=new Ge(e.l)),e.a.c=new tl[t]}function Je(e,t){if("text"==t)var n=e.a.a;else n=$e(e,t),n=!n||1==n.length&&1e-6>n.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function $e(e,t){try{return e.b[t].buffered}catch(e){return null}}function et(e,t,n,i,r){return"text"==t?Ke(e.a,n,i,r):e.h[t]?We(e.h[t],n).then(function(e){
return it(this,t,this.Rc.bind(this,t,e.buffer))}.bind(e)):it(e,t,e.Rc.bind(e,t,n))}function tt(e,t){return"text"==t?e.a?e.a.remove(0,1/0):Promise.resolve():it(e,t,e.Sc.bind(e,t,0,e.f.duration))}function nt(e,t,n,i,r){return"text"==t?(e.a.g=n,e=e.a,e.i=i,e.h=r,Promise.resolve()):Promise.all([it(e,t,e.Yc.bind(e,t)),it(e,t,e.Be.bind(e,t,n)),it(e,t,e.ye.bind(e,t,i,r))])}function it(e,t,n){if(e.j)return Promise.reject();if(n={start:n,p:new j},e.c[t].push(n),1==e.c[t].length)try{n.start()}catch(i){
"QuotaExceededError"==i.name?n.p.reject(new g(2,3,3017,t)):n.p.reject(new g(2,3,3015,i)),at(e,t)}return n.p}function rt(e,t){if(e.j)return Promise.reject();var n,i=[];for(n in e.b){var r=new j,a={start:function(e){e.resolve()}.bind(null,r),p:r};e.c[n].push(a),i.push(r),1==e.c[n].length&&a.start()}return Promise.all(i).then(function(){var e;try{t()}catch(e){var n=Promise.reject(new g(2,3,3015,e))}for(e in this.b)at(this,e);return n}.bind(e),function(){return Promise.reject()}.bind(e))}
function at(e,t){e.c[t].shift();var n=e.c[t][0];if(n)try{n.start()}catch(i){n.p.reject(new g(2,3,3015,i)),at(e,t)}}function ot(e,t,n){return n==t||e>=nl&&n==t.split("-")[0]||e>=il&&n.split("-")[0]==t.split("-")[0]}function st(e){e=e.toLowerCase().split("-");var t=rl[e[0]];return t&&(e[0]=t),e.join("-")}function lt(e,t,n){var i=e.video
;return!(i&&(i.width<t.minWidth||i.width>t.maxWidth||i.width>n.width||i.height<t.minHeight||i.height>t.maxHeight||i.height>n.height||i.width*i.height<t.minPixels||i.width*i.height>t.maxPixels)||e.bandwidth<t.minBandwidth||e.bandwidth>t.maxBandwidth)}function ct(e,t,n){var i=!1;return e.variants.forEach(function(e){var r=e.allowedByApplication;e.allowedByApplication=lt(e,t,n),r!=e.allowedByApplication&&(i=!0)}),i}function ut(e,t,n,i){i.variants=i.variants.filter(function(i){
return!(e&&e.L&&!ze(e,i))&&(dt(i.audio,e,t)&&dt(i.video,e,n))}),i.textStreams=i.textStreams.filter(function(e){return!!tl[oe(e.mimeType,e.codecs)]})}function dt(t,n,i){if(!t)return!0;var r=null;n&&n.L&&(r=n.u),n=oe(t.mimeType,t.codecs);var a,o=oe(t.mimeType,t.codecs),s=t.mimeType;for(a in el){var l=t[a],c=el[a];l&&(s+="; "+c+'="'+l+'"')}
return!(!(tl[o]||MediaSource.isTypeSupported(s)||e.muxjs&&"mp2t"==o.split(";")[0].split("/")[1]&&MediaSource.isTypeSupported(Ye(t.type,o)))||r&&t.encrypted&&0>r.indexOf(n)||i&&(t.mimeType!=i.mimeType||t.codecs.split(".")[0]!=i.codecs.split(".")[0]))}function pt(e){var t=e.audio,n=e.video,i=t?t.codecs:null,r=n?n.codecs:null,a=[];r&&a.push(r),i&&a.push(i);var o=[];n&&o.push(n.mimeType),t&&o.push(t.mimeType),o=o[0]||null;var s=[];t&&s.push(t.kind),n&&s.push(n.kind),s=s[0]||null;var l=[]
;return t&&l.push.apply(l,t.roles),n&&l.push.apply(l,n.roles),l=Q(l),e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:s,width:null,height:null,frameRate:null,mimeType:o,codecs:a.join(", "),audioCodec:i,videoCodec:r,primary:e.primary,roles:l,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null},n&&(e.videoId=n.id,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,
e.videoBandwidth=n.bandwidth||null),t&&(e.audioId=t.id,e.channelsCount=t.channelsCount,e.audioBandwidth=t.bandwidth||null,e.label=t.label),e}function ht(e){return{id:e.id,active:!1,type:"text",bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,mimeType:e.mimeType,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null}}
function ft(e){var t=[],n=It(e.variants);return e=e.textStreams,n.forEach(function(e){t.push(pt(e))}),e.forEach(function(e){t.push(ht(e))}),t}function vt(e,t,n){return It(e.variants).map(function(e){var i=pt(e);return e.video&&e.audio?i.active=n==e.video.id&&t==e.audio.id:e.video?i.active=n==e.video.id:e.audio&&(i.active=t==e.audio.id),i})}function gt(e,t){return e.textStreams.map(function(e){var n=ht(e);return n.active=t==e.id,n})}function mt(e,t){
for(var n=0;n<e.variants.length;n++)if(e.variants[n].id==t.id)return e.variants[n];return null}function yt(e,t){for(var n=0;n<e.textStreams.length;n++)if(e.textStreams[n].id==t.id)return e.textStreams[n];return null}function bt(e){return e.allowedByApplication&&e.allowedByKeySystem}function It(e){return e.filter(function(e){return bt(e)})}function St(e,t,n,i){var r=It(e),a=r;e=r.filter(function(e){return e.primary}),e.length&&(a=e);var o=a.length?a[0].language:"";if(a=a.filter(function(e){
return e.language==o}),t){var s=st(t);[il,nl,0].forEach(function(e){var t=!1;r.forEach(function(n){s=st(s);var r=st(n.language);ot(e,s,r)&&(t?a.push(n):(a=[n],t=!0),i&&(i.audio=!0))})})}return n&&(t=Dt(a,n),t.length)?t:(t=a.map(function(e){return(e.audio?e.audio.roles:[]).concat(e.video?e.video.roles:[])}).reduce(k,[]),t.length?Dt(a,t[0]):a)}function Mt(e,t,n,i){var r=e,a=e.filter(function(e){return e.primary});a.length&&(r=a);var o=r.length?r[0].language:"";if(r=r.filter(function(e){
return e.language==o}),t){var s=st(t);[il,nl,0].forEach(function(t){var n=!1;e.forEach(function(e){var a=st(e.language);ot(t,s,a)&&(n?r.push(e):(r=[e],n=!0),i&&(i.text=!0))})})}return t=n?Ct(r,n):r.filter(function(e){return 0==e.roles.length}),t.length?t:(t=r.map(function(e){return e.roles}).reduce(k,[]),t.length?Ct(r,t[0]):r)}function Dt(e,t){return e.filter(function(e){return e.audio&&0<=e.audio.roles.indexOf(t)||e.video&&0<=e.video.roles.indexOf(t)})}function Ct(e,t){
return e.filter(function(e){return 0<=e.roles.indexOf(t)})}function Ot(e,t,n){for(var i=0;i<n.length;i++)if(n[i].audio==e&&n[i].video==t)return n[i];return null}function jt(e,t,n){function i(e,t){return null==e?null==t:t.id==e}for(var r=0;r<n.length;r++)if(i(e,n[r].audio)&&i(t,n[r].video))return n[r];return null}function Pt(e,t){for(var n=e.periods.length-1;0<n;--n)if(t+$s>=e.periods[n].startTime)return n;return 0}function wt(e,t){for(var n=0;n<e.periods.length;++n){var i=e.periods[n]
;if("text"==t.type){for(var r=0;r<i.textStreams.length;++r)if(i.textStreams[r]==t)return n}else for(r=0;r<i.variants.length;++r){var a=i.variants[r];if(a.audio==t||a.video==t||a.video&&a.video.trickModeVideo==t)return n}}return-1}function Tt(){this.h=null,this.c=!1,this.b=new h,this.g=[],this.i=!1,this.a=this.f=null}function Et(e,t){return t.filter(function(t){return lt(t,e,{width:1/0,height:1/0})}).sort(function(e,t){return e.bandwidth-t.bandwidth})}function xt(e){
return JSON.stringify(e,function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof $){var n,i={};for(n in t){var r=t[n];r&&"object"==typeof r?"detail"==n&&(i[n]=r):n in Event||(i[n]=r)}return i}if(t instanceof TimeRanges)for(i={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=0;n<t.length;++n)i.start.push(t.start(n)),i.end.push(t.end(n));else i="number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return i}})}function Nt(e){
return JSON.parse(e,function(e,t){return"NaN"==t?NaN:"-Infinity"==t?-1/0:"Infinity"==t?1/0:t&&"object"==typeof t&&"TimeRanges"==t.__type__?At(t):t})}function At(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}function Lt(e,t,n,i,r,a){this.K=e,this.g=t,this.L=n,this.j=!1,this.A=i,this.I=r,this.u=a,this.b=this.h=!1,this.w="",this.i=null,this.l=this.wc.bind(this),this.m=this.Jd.bind(this),this.a={video:{},player:{}},this.s=0,this.c={},this.f=null}
function kt(e){var t=ml;t.removeUpdateListener(e.l),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.m)}function _t(e){for(var t in e.c){var n=e.c[t];delete e.c[t],n.reject(new g(1,7,7e3))}}function Rt(e){e=xt(e),ml.sendMessage("urn:x-cast:com.google.shaka.v2",e,function(){},v)}function zt(){this.Bb=new G,this.jb=this}function Ut(e,t,n){zt.call(this),this.c=e,this.b=t,this.i=this.g=this.f=this.j=this.h=null,
this.a=new Lt(n,this.Ge.bind(this),this.He.bind(this),this.Ie.bind(this),this.Je.bind(this),this.oc.bind(this)),Bt(this)}function Bt(e){e.a.init(),e.i=new K,al.forEach(function(e){q(this.i,this.c,e,this.Ue.bind(this))}.bind(e)),cl.forEach(function(e){q(this.i,this.b,e,this.ge.bind(this))}.bind(e)),e.h={};for(var t in e.c)Object.defineProperty(e.h,t,{configurable:!1,enumerable:!0,get:e.Te.bind(e,t),set:e.Ve.bind(e,t)});e.j={};for(t in e.b)Object.defineProperty(e.j,t,{configurable:!1,
enumerable:!0,get:e.fe.bind(e,t)});e.f=new zt,e.f.jb=e.h,e.g=new zt,e.g.jb=e.j}function Vt(e,t,n,i){zt.call(this),this.a=e,this.b=t,this.s={video:e,player:t},this.u=n||function(){},this.w=i||function(e){return e},this.m=!1,this.g=!0,this.f=0,this.l=!1,this.i=!0,this.j=this.h=this.c=null,Ft(this)}function Ft(t){var n=cast.receiver.CastReceiverManager.getInstance();n.onSenderConnected=t.Bc.bind(t),n.onSenderDisconnected=t.Bc.bind(t),n.onSystemVolumeChanged=t.fd.bind(t),
t.h=n.getCastMessageBus("urn:x-cast:com.google.cast.media"),t.h.onMessage=t.Ed.bind(t),t.c=n.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),t.c.onMessage=t.Td.bind(t),n.start(),al.forEach(function(e){this.a.addEventListener(e,this.Fc.bind(this,"video"))}.bind(t)),cl.forEach(function(e){this.b.addEventListener(e,this.Fc.bind(this,"player"))}.bind(t)),
cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?t.b.ac(3840,2160):t.b.ac(1920,1080),t.a.addEventListener("loadeddata",function(){this.l=!0}.bind(t)),t.b.addEventListener("loading",function(){this.g=!1,Qt(this)}.bind(t)),t.a.addEventListener("playing",function(){this.g=!1,Qt(this)}.bind(t)),t.a.addEventListener("pause",function(){Qt(this)}.bind(t)),t.b.addEventListener("unloading",function(){this.g=!0,Qt(this)}.bind(t)),
t.a.addEventListener("ended",function(){e.setTimeout(function(){this.a&&this.a.ended&&(this.g=!0,Qt(this))}.bind(this),5e3)}.bind(t))}function Qt(e){Promise.resolve().then(function(){this.dispatchEvent(new $("caststatuschanged")),Yt(this)||Kt(this,0)}.bind(e))}function Ht(e,t,n){for(var i in t.player)e.b[i](t.player[i]);e.u(n),n=Promise.resolve();var r=e.a.autoplay;t.manifest&&(e.a.autoplay=!1,n=e.b.load(t.manifest,t.startTime),n.catch(function(e){this.b.dispatchEvent(new $("error",{detail:e}))
}.bind(e))),n.then(function(){for(var e in t.video){var n=t.video[e];this.a[e]=n}for(e in t.playerAfterLoad)n=t.playerAfterLoad[e],this.b[e](n);this.a.autoplay=r,t.manifest&&(this.a.play(),Kt(this,0))}.bind(e))}function Yt(e){return!(!e.i||!e.a.duration&&!e.b.P())&&(Wt(e),e.i=!1,!0)}function Wt(e){Kt(e,0,{contentId:e.b.Ib(),streamType:e.b.P()?"LIVE":"BUFFERED",duration:e.a.duration,contentType:""})}function Gt(e,t,n,i){e.m&&(e=xt(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}
function Kt(e,t,n){var i=e.a.playbackRate,r=yl;r=e.g?r.IDLE:e.b.sc()?r.Tc:e.a.paused?r.Vc:r.Wc,i={mediaSessionId:0,playbackRate:i,playerState:r,currentTime:e.a.currentTime,supportedMediaCommands:15,volume:{level:e.a.volume,muted:e.a.muted}},n&&(i.media=n),Gt(e,{requestId:t,type:"MEDIA_STATUS",status:[i]},e.h)}function qt(e,t){var n=Zt(e,t);return 1!=n.length?null:n[0]}function Zt(e,t){return Array.prototype.filter.call(e.childNodes,function(e){return e instanceof Element&&e.tagName==t})}
function Xt(e){var t=e.firstChild;return t&&t.nodeType==Node.TEXT_NODE?e.textContent.trim():null}function Jt(e,t,n,i){var r=null;return e=e.getAttribute(t),null!=e&&(r=n(e)),null==r?void 0!=i?i:null:r}function $t(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:Math.floor(e/1e3)):null}function en(e){
return e&&(e=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(e))?(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null):null}function tn(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null}function nn(e){return e=Number(e),0==e%1?e:null}function rn(e){
return e=Number(e),0==e%1&&0<e?e:null}function an(e){return e=Number(e),0==e%1&&0<=e?e:null}function on(e){var t;return e=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1]/t[2]):Number(e),isNaN(e)?null:e}function sn(e,t,n){e=un(e);var i=null,r=[],a=[],o=e.map(function(e){return e.keyId}).filter(R);if(o.length&&1<o.filter(z).length)throw new g(2,4,4010);n||(a=e.filter(function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.Lc||(i=e.init||i,!1)}),a.length&&(r=cn(i,t,a),0==r.length&&(r=[te("",i)]))),
!e.length||!n&&a.length||(r=ie(bl).map(function(e){return te(e,i)}));var s=o[0]||null;return s&&r.forEach(function(e){e.initData.forEach(function(e){e.keyId=s})}),{kc:s,cf:i,drmInfos:r,nc:!0}}function ln(e,t,n,i){var r=sn(e,t,i);if(n.nc)e=1==n.drmInfos.length&&!n.drmInfos[0].keySystem,t=0==r.drmInfos.length,(0==n.drmInfos.length||e&&!t)&&(n.drmInfos=r.drmInfos),n.nc=!1;else if(0<r.drmInfos.length&&(n.drmInfos=n.drmInfos.filter(function(e){return r.drmInfos.some(function(t){
return t.keySystem==e.keySystem})}),0==n.drmInfos.length))throw new g(2,4,4008);return r.kc||n.kc}function cn(e,t,n){return n.map(function(n){var i=bl[n.Lc];return i?[te(i,n.init||e)]:t(n.node)||[]}).reduce(k,[])}function un(e){return e.map(function(e){var t=e.getAttribute("schemeIdUri"),n=e.getAttribute("cenc:default_KID"),i=Zt(e,"cenc:pssh").map(Xt);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase(),0<=n.indexOf(" ")))throw new g(2,4,4009);var r=[];try{
r=i.map(function(e){return{initDataType:"cenc",initData:ge(e),keyId:null}})}catch(e){throw new g(2,4,4007)}return{node:e,Lc:t,keyId:n,init:0<r.length?r:null}}).filter(R)}function dn(t,n,i,r,a){null!=a&&(a=Math.round(a));var o={RepresentationID:n,Number:i,Bandwidth:r,Time:a};return t.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)d)?\$/g,function(t,n,i){if("$$"==t)return"$";var r=o[n];return null==r?t:("RepresentationID"==n&&i&&(i=void 0),t=r.toString(),i=e.parseInt(i,10)||1,
Array(Math.max(0,i-t.length)+1).join("0")+t)})}function pn(e,t){var n=hn(e,t,"timescale"),i=1;n&&(i=rn(n)||1),n=hn(e,t,"duration"),(n=rn(n||""))&&(n/=i);var r=hn(e,t,"startNumber"),a=Number(hn(e,t,"presentationTimeOffset"))||0,o=an(r||"");null!=r&&null!=o||(o=1);var s=fn(e,t,"SegmentTimeline");if(r=null,s){r=i;var l=e.M.duration||1/0;s=Zt(s,"S");for(var c=[],u=0,d=0;d<s.length;++d){var p=s[d],h=Jt(p,"t",an),f=Jt(p,"d",an);if(p=Jt(p,"r",nn),null!=h&&(h-=a),!f)break;if(h=null!=h?h:u,
0>(p=p||0))if(d+1<s.length){if(null==(p=Jt(s[d+1],"t",an)))break;if(h>=p)break;p=Math.ceil((p-h)/f)-1}else{if(1/0==l)break;if(h/r>=l)break;p=Math.ceil((l*r-h)/f)-1}0<c.length&&h!=u&&(c[c.length-1].end=h/r);for(var v=0;v<=p;++v)u=h+f,c.push({start:h/r,end:u/r,Re:h}),h=u}r=c}return{timescale:i,R:n,za:o,aa:a/i||0,gc:a,H:r}}function hn(e,t,n){return[t(e.v),t(e.T),t(e.Z)].filter(R).map(function(e){return e.getAttribute(n)}).reduce(function(e,t){return e||t})}function fn(e,t,n){
return[t(e.v),t(e.T),t(e.Z)].filter(R).map(function(e){return qt(e,n)}).reduce(function(e,t){return e||t})}function vn(e,t){var n=new DOMParser;try{var i=se(e),r=n.parseFromString(i,"text/xml")}catch(e){}if(r&&r.documentElement.tagName==t)var a=r.documentElement;return a&&0<a.getElementsByTagName("parsererror").length?null:a}function gn(e,t,n,i,r,a){for(var o=e.getAttribute("xlink:href"),s=e.getAttribute("xlink:actuate")||"onRequest",l=0;l<e.attributes.length;l++){var c=e.attributes[l].nodeName
;-1!=c.indexOf("xlink:")&&(e.removeAttribute(c),--l)}if(5<=a)return Promise.reject(new g(2,4,4028));if("onLoad"!=s)return Promise.reject(new g(2,4,4027));var u=ee([i],[o]);return r.request(0,V(u,t)).then(function(i){if(!(i=vn(i.data,e.tagName)))return Promise.reject(new g(2,4,4001,o));for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);for(;i.childNodes.length;){var s=i.childNodes[0];i.removeChild(s),e.appendChild(s)}for(s=0;s<i.attributes.length;s++){
var l=i.attributes[s].nodeName,c=i.getAttribute(l);e.setAttribute(l,c)}return mn(e,t,n,u[0],r,a+1)}.bind(e))}function mn(e,t,n,i,r,a){if(a=a||0,e.getAttribute("xlink:href")){var o=gn(e,t,n,i,r,a);return n&&(o=o.catch(function(){return mn(e,t,n,i,r,a)})),o}for(o=0;o<e.childNodes.length;o++){var s=e.childNodes[o];s instanceof Element&&"urn:mpeg:dash:resolve-to-zero:2013"==s.getAttribute("xlink:href")&&(e.removeChild(s),--o)}var l=[];for(o=0;o<e.childNodes.length;o++)s=e.childNodes[o],
s.nodeType==Node.ELEMENT_NODE&&(s=mn(s,t,n,i,r,a),l.push(s));return Promise.all(l).then(function(){return e})}function yn(e,t,n){this.a=e,this.O=t,this.D=n}function bn(e,t,n,i,r,a){this.position=e,this.startTime=t,this.endTime=n,this.a=i,this.O=r,this.D=a}function In(e,t){this.G=e,this.b=t==Il,this.a=0}function Sn(){throw new g(2,3,3e3)}function Mn(){this.c=[],this.b=[],this.a=!1}function Dn(e){for(;e.o.ea()&&!e.la.a;)e.la.xb(e.start,e.o,e.Dc)}function Cn(e){
for(var t=e.o.C();0<t&&!e.la.a;--t)e.la.xb(e.start,e.o,e.Dc)}function On(e){return function(t){e(t.o.Pa(t.o.G.byteLength-t.o.U()))}}function jn(e){for(var t=0,n=0;n<e.length;n++)t=t<<8|e.charCodeAt(n);return t}function Pn(e,t,n,i){var r,a=(new Mn).W("sidx",function(e){r=wn(t,i,n,e)});if(e&&a.parse(e),r)return r;throw new g(2,3,3004)}function wn(e,t,n,i){var r=[];i.o.F(4);var a=i.o.C();if(0==a)throw new g(2,3,3005);if(0==i.version)var o=i.o.C(),s=i.o.C();else o=i.o.Qa(),s=i.o.Qa();i.o.F(2)
;var l=i.o.ab();for(e=e+i.size+s,s=0;s<l;s++){var c=i.o.C(),u=(2147483648&c)>>>31;c&=2147483647;var d=i.o.C();if(i.o.F(4),1==u)throw new g(2,3,3006);r.push(new bn(r.length,o/a-t,(o+d)/a-t,function(){return n},e,e+c-1)),o+=d,e+=c}return i.la.stop(),r}function Tn(e){this.a=e}function En(e,t){for(;e.a.length;){var n=e.a[e.a.length-1];if(!(n.startTime>=t))break;e.a.pop()}for(;e.a.length&&(n=e.a[0],0>=n.endTime);)e.a.shift();0!=e.a.length&&(n=e.a[0],
n.startTime<$s&&(e.a[0]=new bn(n.position,0,n.endTime,n.a,n.O,n.D)),n=e.a[e.a.length-1],e.a[e.a.length-1]=new bn(n.position,n.startTime,t,n.a,n.O,n.D))}function xn(e){this.b=e,this.a=new In(e,0),Sl||(Sl=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function Nn(e){
var t=An(e);if(7<t.length)throw new g(2,3,3002);for(var n=0,i=0;i<t.length;i++)n=256*n+t[i];t=n,n=An(e);e:{for(i=0;i<Sl.length;i++)if(be(n,Sl[i])){i=!0;break e}i=!1}if(i)n=e.b.byteLength-e.a.U();else{if(8==n.length&&224&n[1])throw new g(2,3,3001);i=n[0]&(1<<8-n.length)-1;for(var r=1;r<n.length;r++)i=256*i+n[r];n=i}return n=e.a.U()+n<=e.b.byteLength?n:e.b.byteLength-e.a.U(),i=new DataView(e.b.buffer,e.b.byteOffset+e.a.U(),n),e.a.F(n),new Ln(t,i)}function An(e){var t,n=e.a.$()
;for(t=1;8>=t&&!(n&1<<8-t);t++);if(8<t)throw new g(2,3,3002);var i=new Uint8Array(t);for(i[0]=n,n=1;n<t;n++)i[n]=e.a.$();return i}function Ln(e,t){this.id=e,this.a=t}function kn(e){if(8<e.a.byteLength)throw new g(2,3,3002);if(8==e.a.byteLength&&224&e.a.getUint8(0))throw new g(2,3,3001);for(var t=0,n=0;n<e.a.byteLength;n++){t=256*t+e.a.getUint8(n)}return t}function _n(){}function Rn(e,t,n,i,r,a){function o(){return r}var s=[];e=new xn(e.a);for(var l=null,c=null;e.ea();){var u=Nn(e);if(187==u.id){
var d=zn(u);d&&(u=n*d.Se,d=t+d.ne,null!=l&&s.push(new bn(s.length,l-a,u-a,o,c,d-1)),l=u,c=d)}}return null!=l&&s.push(new bn(s.length,l-a,i-a,o,c,null)),s}function zn(e){var t=new xn(e.a);if(e=Nn(t),179!=e.id)throw new g(2,3,3013);if(e=kn(e),t=Nn(t),183!=t.id)throw new g(2,3,3012);t=new xn(t.a);for(var n=0;t.ea();){var i=Nn(t);if(241==i.id){n=kn(i);break}}return{Se:e,ne:n}}function Un(e,t){var n=fn(e,t,"Initialization");if(!n)return null;var i=e.v.ba,r=n.getAttribute("sourceURL")
;r&&(i=ee(e.v.ba,[r])),r=0;var a=null;return(n=Jt(n,"range",tn))&&(r=n.start,a=n.end),new yn(function(){return i},r,a)}function Bn(e,t){var n=Number(hn(e,Fn,"presentationTimeOffset"))||0,i=hn(e,Fn,"timescale"),r=1;i&&(r=rn(i)||1),n=n/r||0,i=Un(e,Fn);var a=e.v.contentType;if(r=e.v.mimeType.split("/")[1],"text"!=a&&"mp4"!=r&&"webm"!=r)throw new g(2,4,4006);if("webm"==r&&!i)throw new g(2,4,4005);a=fn(e,Fn,"RepresentationIndex");var o=hn(e,Fn,"indexRange"),s=e.v.ba;if(o=tn(o||""),a){
var l=a.getAttribute("sourceURL");l&&(s=ee(e.v.ba,[l])),o=Jt(a,"range",tn,o)}if(!o)throw new g(2,4,4002);return r=Vn(e,t,i,s,o.start,o.end,r,n),{createSegmentIndex:r.createSegmentIndex,findSegmentPosition:r.findSegmentPosition,getSegmentReference:r.getSegmentReference,initSegmentReference:i,aa:n}}function Vn(e,t,n,i,r,a,o,s){var l=e.presentationTimeline,c=!e.Ea||!e.M.Lb,u=e.M.index,d=e.M.duration,p=t,h=null;return{createSegmentIndex:function(){var e=[p(i,r,a),"webm"==o?p(n.a(),n.O,n.D):null]
;return p=null,Promise.all(e).then(function(e){var t=e[0];e=e[1]||null,t="mp4"==o?Pn(t,r,i,s):(new _n).parse(t,e,i,s),l.Za(t,0==u),h=new Tn(t),c&&En(h,d)})},findSegmentPosition:function(e){return h.find(e)},getSegmentReference:function(e){return h.get(e)}}}function Fn(e){return e.bb}function Qn(e,t){var n=Un(e,Hn),i=Wn(e),r=pn(e,Hn),a=r.za;0==a&&(a=1);var o=0;if(r.R?o=r.R*(a-1):r.H&&0<r.H.length&&(o=r.H[0].start),i={R:r.R,startTime:o,za:a,aa:r.aa,H:r.H,La:i},
!i.R&&!i.H&&1<i.La.length)throw new g(2,4,4002);if(!i.R&&!e.M.duration&&!i.H&&1==i.La.length)throw new g(2,4,4002);if(i.H&&0==i.H.length)throw new g(2,4,4002);return a=r=null,e.Z.id&&e.v.id&&(a=e.Z.id+","+e.v.id,r=t[a]),o=Yn(e.M.duration,i.za,e.v.ba,i),r?(r.Pb(o),a=e.presentationTimeline.Ja(),r.Fb(a-e.M.start)):(e.presentationTimeline.Za(o,0==e.M.index),r=new Tn(o),a&&e.Ea&&(t[a]=r)),e.Ea&&e.M.Lb||En(r,e.M.duration),{createSegmentIndex:Promise.resolve.bind(Promise),
findSegmentPosition:r.find.bind(r),getSegmentReference:r.get.bind(r),initSegmentReference:n,aa:i.aa}}function Hn(e){return e.qa}function Yn(e,t,n,i){var r=i.La.length;i.H&&i.H.length!=i.La.length&&(r=Math.min(i.H.length,i.La.length));for(var a=[],o=i.startTime,s=0;s<r;s++){var l=i.La[s],c=ee(n,[l.zd]),u=null!=i.R?o+i.R:i.H?i.H[s].end:o+e;a.push(new bn(s+t,o,u,function(e){return e}.bind(null,c),l.start,l.end)),o=u}return a}function Wn(e){return[e.v.qa,e.T.qa,e.Z.qa].filter(R).map(function(e){
return Zt(e,"SegmentURL")}).reduce(function(e,t){return 0<e.length?e:t}).map(function(t){t.getAttribute("indexRange")&&!e.rc&&(e.rc=!0);var n=t.getAttribute("media");return t=Jt(t,"mediaRange",tn,{start:0,end:null}),{zd:n,start:t.start,end:t.end}})}function Gn(e,t,n,i){var r=Xn(e),a=pn(e,Kn),o=hn(e,Kn,"media"),s=hn(e,Kn,"index");if(a={R:a.R,timescale:a.timescale,za:a.za,aa:a.aa,gc:a.gc,H:a.H,Ob:o,Xa:s},o=0+(a.Xa?1:0),o+=a.H?1:0,0==(o+=a.R?1:0))throw new g(2,4,4002);if(1!=o&&(a.Xa&&(a.H=null),
a.R=null),!a.Xa&&!a.Ob)throw new g(2,4,4002);if(a.Xa){if("mp4"!=(n=e.v.mimeType.split("/")[1])&&"webm"!=n)throw new g(2,4,4006);if("webm"==n&&!r)throw new g(2,4,4005);i=dn(a.Xa,e.v.id,null,e.bandwidth||null,null),i=ee(e.v.ba,[i]),e=Vn(e,t,r,i,0,null,n,a.aa)}else a.R?(i||e.presentationTimeline.wb(a.R),e=qn(e,a)):(i=t=null,e.Z.id&&e.v.id&&(i=e.Z.id+","+e.v.id,t=n[i]),o=Zn(e,a),t?(t.Pb(o),n=e.presentationTimeline.Ja(),t.Fb(n-e.M.start)):(e.presentationTimeline.Za(o,0==e.M.index),t=new Tn(o),
i&&e.Ea&&(n[i]=t)),e.Ea&&e.M.Lb||En(t,e.M.duration),e={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:t.find.bind(t),getSegmentReference:t.get.bind(t)});return{createSegmentIndex:e.createSegmentIndex,findSegmentPosition:e.findSegmentPosition,getSegmentReference:e.getSegmentReference,initSegmentReference:r,aa:a.aa}}function Kn(e){return e.eb}function qn(e,t){var n=e.M.duration,i=t.R,r=t.za,a=t.timescale,o=t.Ob,s=e.bandwidth||null,l=e.v.id,c=e.v.ba;return{
createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(e){return 0>e||n&&e>=n?null:Math.floor(e/i)},getSegmentReference:function(e){var t=e*i,u=t+i;return n&&(u=Math.min(u,n)),0>u||n&&t>=n?null:new bn(e,t,u,function(){var n=dn(o,l,e+r,s,t*a);return ee(c,[n])},0,null)}}}function Zn(e,t){for(var n=[],i=0;i<t.H.length;i++){var r=i+t.za;n.push(new bn(r,t.H[i].start,t.H[i].end,function(e,t,n,i,r,a){return e=dn(e,t,r,n,a),ee(i,[e]).map(function(e){return e.toString()})
}.bind(null,t.Ob,e.v.id,e.bandwidth||null,e.v.ba,r,t.H[i].Re+t.gc),0,null))}return n}function Xn(e){var t=hn(e,Kn,"initialization");if(!t)return null;var n=e.v.id,i=e.bandwidth||null,r=e.v.ba;return new yn(function(){var e=dn(t,n,null,i,null);return ee(r,[e])},0,null)}function Jn(){var e,t={};for(e in Ml)t[e]=!0;for(e in Dl)t[e]=!0;return["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"].forEach(function(e){t[e]=!!Ml[e]}),
["mpd","m3u8","ism"].forEach(function(e){t[e]=!!Dl[e]}),t}function $n(e,t,n,i){var r=i;return r||(i=new m(e).Y.split("/").pop().split("."),1<i.length&&(i=i.pop().toLowerCase(),r=Dl[i])),r?Promise.resolve(r):(n=V([e],n),n.method="HEAD",t.request(0,n).then(function(t){return(t=t.headers["content-type"])&&(t=t.toLowerCase()),(r=Ml[t])?r:Promise.reject(new g(2,4,4e3,e))},function(e){return e.severity=2,Promise.reject(e)}))}function ei(e,t){this.c=e,this.l=t,this.f=this.a=1/0,this.b=1,
this.j=this.g=0,this.i=!0,this.h=0}function ti(){this.a=this.b=null,this.g=[],this.c=null,this.i=[],this.h=1,this.j={},this.l=0,this.f=null}function ni(e){return e.a.networkingEngine.request(0,V(e.g,e.b.retryParameters),function(){return!this.a}.bind(e)).then(function(e){if(this.a)return ii(this,e.data,e.uri)}.bind(e))}function ii(e,t,n){if(!(t=vn(t,"MPD")))throw new g(2,4,4001,n);return mn(t,e.b.retryParameters,e.b.dash.xlinkFailGracefully,n,e.a.networkingEngine).then(function(e){
return ri(this,e,n)}.bind(e))}function ri(e,t,n){n=[n];var i=Zt(t,"Location").map(Xt).filter(R);0<i.length&&(n=e.g=i),i=Zt(t,"BaseURL").map(Xt),n=ee(n,i);var r=Jt(t,"minBufferTime",en);e.l=Jt(t,"minimumUpdatePeriod",en,-1);var a=Jt(t,"availabilityStartTime",$t);i=Jt(t,"timeShiftBufferDepth",en);var o=Jt(t,"suggestedPresentationDelay",en),s=Jt(t,"maxSegmentDuration",en),l=t.getAttribute("type")||"static";if(e.c)var c=e.c.presentationTimeline;else{
var u=Math.max(e.b.dash.defaultPresentationDelay,1.5*r);c=new ei(a,null!=o?o:u)}a=ai(e,{Ea:"static"!=l,presentationTimeline:c,Z:null,M:null,T:null,v:null,bandwidth:0,rc:!1},n,t),o=a.duration;var d=a.periods;return c.yb("static"==l),"static"!=l&&a.lc||c.ha(o||1/0),c.bc(null!=i?i:1/0),c.wb(s||1),e.c?Promise.resolve():(t=Zt(t,"UTCTiming"),i=c.P(),fi(e,n,t,i).then(function(e){this.a&&(c.Oc(e),this.c={presentationTimeline:c,periods:d,offlineSessionIds:[],minBufferTime:r||0})}.bind(e)))}
function ai(e,t,n,i){var r=Jt(i,"mediaPresentationDuration",en),a=[],o=0;i=Zt(i,"Period");for(var s=0;s<i.length;s++){var l=i[s];o=Jt(l,"start",en,o);var c=Jt(l,"duration",en),u=null;if(s!=i.length-1){var d=Jt(i[s+1],"start",en);null!=d&&(u=d-o)}else null!=r&&(u=r-o);if(null==u&&(u=c),l=oi(e,t,n,{start:o,duration:u,node:l,index:s,Lb:null==u||s==i.length-1}),a.push(l),c=t.Z.id,-1==e.i.indexOf(c)&&(e.i.push(c),e.c&&(e.a.filterNewPeriod(l),e.c.periods.push(l))),null==u){o=null;break}o+=u}
return null==e.c&&e.a.filterAllPeriods(a),null!=r?{periods:a,duration:r,lc:!1}:{periods:a,duration:o,lc:!0}}function oi(e,t,n,i){t.Z=ui(i.node,null,n),t.M=i,t.Z.id||(t.Z.id="__shaka_period_"+i.start),Zt(i.node,"EventStream").forEach(e.de.bind(e,i.start,i.duration)),n=Zt(i.node,"AdaptationSet").map(e.be.bind(e,t)).filter(R);var r=n.map(function(e){return e.pe}).reduce(k,[]),a=r.filter(z);if(t.Ea&&r.length!=a.length)throw new g(2,4,4018);var o=n.filter(function(e){return!e.fc})
;if(n.filter(function(e){return e.fc}).forEach(function(e){var t=e.streams[0],n=e.fc;o.forEach(function(e){e.id==n&&e.streams.forEach(function(e){e.trickModeVideo=t})})}),r=si(o,"video"),a=si(o,"audio"),!r.length&&!a.length)throw new g(2,4,4004);for(a.length||(a=[null]),r.length||(r=[null]),t=[],n=0;n<a.length;n++)for(var s=0;s<r.length;s++)li(e,a[n],r[s],t);for(e=si(o,"text"),r=[],n=0;n<e.length;n++)r.push.apply(r,e[n].streams);return{startTime:i.start,textStreams:r,variants:t}}
function si(e,t){return e.filter(function(e){return e.contentType==t})}function li(e,t,n,i){if(t||n)if(t&&n){var r=t.drmInfos,a=n.drmInfos;if(r.length&&a.length?0<Ue(r,a).length:1){var o=Ue(t.drmInfos,n.drmInfos);for(r=0;r<t.streams.length;r++)for(var s=0;s<n.streams.length;s++)a=(n.streams[s].bandwidth||0)+(t.streams[r].bandwidth||0),a={id:e.h++,language:t.language,primary:t.Nb||n.Nb,audio:t.streams[r],video:n.streams[s],bandwidth:a,drmInfos:o,allowedByApplication:!0,allowedByKeySystem:!0},
i.push(a)}}else for(o=t||n,r=0;r<o.streams.length;r++)a=o.streams[r].bandwidth||0,a={id:e.h++,language:o.language||"und",primary:o.Nb,audio:t?o.streams[r]:null,video:n?o.streams[r]:null,bandwidth:a,drmInfos:o.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},i.push(a)}function ci(t,n){0>t.l||(t.f=e.setTimeout(t.Ke.bind(t),1e3*Math.max(Math.max(3,t.l)-n,0)))}function ui(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",containsEmsgBoxes:!1,frameRate:void 0,Rb:null},n=n||t.ba
;var i=Zt(e,"BaseURL").map(Xt),r=e.getAttribute("contentType")||t.contentType,a=e.getAttribute("mimeType")||t.mimeType,o=e.getAttribute("codecs")||t.codecs,s=Jt(e,"frameRate",on)||t.frameRate,l=!!Zt(e,"InbandEventStream").length,c=Zt(e,"AudioChannelConfiguration");return c=di(c)||t.Rb,r||(r=vi(a,o)),{ba:ee(n,i),bb:qt(e,"SegmentBase")||t.bb,qa:qt(e,"SegmentList")||t.qa,eb:qt(e,"SegmentTemplate")||t.eb,width:Jt(e,"width",an)||t.width,height:Jt(e,"height",an)||t.height,contentType:r,mimeType:a,
codecs:o,frameRate:s,containsEmsgBoxes:l||t.containsEmsgBoxes,id:e.getAttribute("id"),Rb:c}}function di(e){for(var t=0;t<e.length;++t){var n=e[t],i=n.getAttribute("schemeIdUri");if(i&&(n=n.getAttribute("value")))switch(i){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(i=parseInt(n,10)))continue;return i
;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(i=parseInt(n,16)){for(e=0;i;)1&i&&++e,i>>=1;return e}}}return null}function pi(e){var t=0+(e.bb?1:0);return t+=e.qa?1:0,0==(t+=e.eb?1:0)?"text"==e.contentType||"application"==e.contentType:(1!=t&&(e.bb&&(e.qa=null),e.eb=null),!0)}function hi(e,t,n,i){return t=ee(t,[n]),t=V(t,e.b.retryParameters),t.method=i,e.a.networkingEngine.request(0,t).then(function(e){if("HEAD"==i){
if(!e.headers||!e.headers.date)return 0;e=e.headers.date}else e=se(e.data);return e=Date.parse(e),isNaN(e)?0:e-Date.now()})}function fi(e,t,n,i){n=n.map(function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}});var r=e.b.dash.clockSyncUri;return i&&!n.length&&r&&n.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),L(n,function(e){var n=e.value;switch(e.scheme){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":
return hi(this,t,n,"HEAD");case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return hi(this,t,n,"GET");case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return e=Date.parse(n),isNaN(e)?0:e-Date.now();case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:return Promise.reject()}}.bind(e)).catch(function(){
return 0})}function vi(e,t){return tl[oe(e,t)]?"text":e.split("/")[0]}function gi(e,t,n,i){this.uri=e,this.type=t,this.a=n,this.segments=i||null}function mi(e,t,n,i){this.id=e,this.name=t,this.a=n,this.value=i||null}function yi(e,t){this.name=e,this.value=t}function bi(e,t,n){return n=n||null,(e=e.getAttribute(t))?e.value:n}function Ii(e,t){this.a=t,this.uri=e}function Si(e,t){return e.filter(function(e){return e.name==t})}function Mi(e,t){var n=Si(e,t);return n.length?n[0]:null}
function Di(e,t,n){return e.filter(function(e){var i=e.getAttribute("TYPE");return e=e.getAttribute("GROUP-ID"),i.value==t&&e.value==n})}function Ci(e,t){return ee([e],[t])[0]}function Oi(e){this.b=e,this.a=0}function ji(e,t){t.lastIndex=e.a;var n=t.exec(e.b);return n=null==n?null:{position:n.index,length:n[0].length,se:n},e.a==e.b.length||null==n||n.position!=e.a?null:(e.a+=n.length,n.se)}function Pi(e){return e.a==e.b.length?null:(e=ji(e,/[^ \t\n]*/gm))?e[0]:null}function wi(){this.a=0}
function Ti(e,t,n){t=se(t),t=t.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var i=t.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(i[0]))throw new g(2,4,4015);t=0;for(var r=[],a=1;a<i.length;)if(/^#(?!EXT)/m.test(i[a]))a+=1;else{var o=i[a];if(o=xi(e.a++,o),0<=Cl.indexOf(o.name))t=1;else if(0<=Ol.indexOf(o.name)){if(1!=t)throw new g(2,4,4017);return i=i.splice(a,i.length-a),e=Ei(e,i,r),new gi(n,t,r,e)}r.push(o),a+=1,"EXT-X-STREAM-INF"==o.name&&(o.a.push(new yi("URI",i[a])),a+=1)}
return new gi(n,t,r)}function Ei(e,t,n){var i=[],r=[];return t.forEach(function(e){if(/^(#EXT)/.test(e))e=xi(this.a++,e),0<=Cl.indexOf(e.name)?n.push(e):r.push(e);else{if(/^#(?!EXT)/m.test(e))return[];i.push(new Ii(e.trim(),r)),r=[]}}.bind(e)),i}function xi(e,t){var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new g(2,4,4016);var i=n[1],r=n[2];if(n=[],r&&0<=r.indexOf("=")){r=new Oi(r);for(var a,o=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;a=ji(r,o);)n.push(new yi(a[1],a[2]||a[3]))
}else if(r)return new mi(e,i,n,r);return new mi(e,i,n)}function Ni(e){return new Promise(function(t){var n=Ni.parse(e);t({uri:e,data:n.data,headers:{"content-type":n.contentType}})})}function Ai(){this.h=this.c=null,this.I=1,this.u={},this.A={},this.L={},this.a={},this.b=null,this.l="",this.s=new wi,this.j=this.i=null,this.f=Tl,this.m=null,this.g=0,this.w=1/0}function Li(e,t,n){ir(e,n).then(function(e){var i=El,r=Ti(this.s,e.data,n);if(1!=r.type)throw new g(2,4,4017)
;e=Mi(r.a,"EXT-X-MEDIA-SEQUENCE");var a=t.stream;Ki(this,r,e?Number(e.value):0,a.mimeType,a.codecs).then(function(e){t.cb.a=e,e=e[e.length-1],Mi(r.a,"EXT-X-ENDLIST")&&(ar(this,i.oa),this.b.ha(e.endTime))}.bind(this))}.bind(e))}function ki(e,t,n){if(t=Ti(e.s,t,n),0!=t.type)throw new g(2,4,4022);return _i(e,t).then(function(e){this.c.filterAllPeriods([e]);var t,n=1/0,i=0,r=0,a=1/0;for(t in this.a){var o=this.a[t];n=Math.min(n,o.Qb),i=Math.max(i,o.Qb),r=Math.max(r,o.yd),
"text"!=o.stream.type&&(a=Math.min(a,o.duration))}o=null;var s=0;if(this.f!=El.oa&&(o=Date.now()/1e3-r,s=3*this.g),this.b=new ei(o,s),this.b.yb(this.f==El.oa),this.b.wb(this.g),this.f!=El.oa){for(n=3*this.g,this.b.Pc(n),this.i=this.w,this.f==El.hc&&this.b.bc(n),n=0;95443.7176888889<=i;)n+=95443.7176888889,i-=95443.7176888889;if(n)for(t in this.a)o=this.a[t],95443.7176888889>o.Qb&&(o.stream.presentationTimeOffset=-n,o.cb.offset(n))}else for(t in this.b.ha(a),this.a)o=this.a[t],
o.stream.presentationTimeOffset=n,o.cb.offset(-n),En(o.cb,a);this.m={presentationTimeline:this.b,periods:[e],offlineSessionIds:[],minBufferTime:0}}.bind(e))}function _i(e,t){var n=t.a,i=Si(t.a,"EXT-X-MEDIA").filter(function(e){return"SUBTITLES"==tr(e,"TYPE")}.bind(e)).map(function(e){return Vi(this,e)}.bind(e));return Promise.all(i).then(function(e){var i=Si(n,"EXT-X-STREAM-INF").map(function(e){return Ri(this,e,t)}.bind(this));return Promise.all(i).then(function(t){return{startTime:0,
variants:t.reduce(k,[]),textStreams:e}}.bind(this))}.bind(e))}function Ri(e,t,n){var i=bi(t,"CODECS","avc1.42E01E,mp4a.40.2").split(","),r=t.getAttribute("RESOLUTION"),a=null,o=null,s=bi(t,"FRAME-RATE"),l=Number(tr(t,"BANDWIDTH"));if(r){var c=r.value.split("x");a=c[0],o=c[1]}n=Si(n.a,"EXT-X-MEDIA");var u=bi(t,"AUDIO"),d=bi(t,"VIDEO");if(u?n=Di(n,"AUDIO",u):d&&(n=Di(n,"VIDEO",d)),c=$i("text",i)){var p=bi(t,"SUBTITLES");p&&(p=Di(n,"SUBTITLES",p),p.length&&(e.u[p[0].id].stream.codecs=c)),
i.splice(i.indexOf(c),1)}n=n.map(function(e){return Fi(this,e,i)}.bind(e));var h=[],f=[];return Promise.all(n).then(function(e){if(u?h=e:d&&(f=e),e=!1,h.length||f.length)if(h.length)if(tr(t,"URI")==h[0].Zb){var n="audio";e=!0}else n="video";else n="audio";else 1==i.length?(n=$i("video",i),n=r||s||n?"video":"audio"):(n="video",i=[i.join(",")]);return e?Promise.resolve():Hi(this,t,i,n)}.bind(e)).then(function(e){return e&&("audio"==e.stream.type?h=[e]:f=[e]),f&&zi(f),h&&zi(h),Ui(this,h,f,l,a,o,s)
}.bind(e))}function zi(e){e.forEach(function(e){var t=e.stream.codecs.split(",");t=t.filter(function(e){return"mp4a.40.34"!=e}),e.stream.codecs=t.join(",")})}function Ui(e,t,n,i,r,a,o){n.forEach(function(e){(e=e.stream)&&(e.width=Number(r)||void 0,e.height=Number(a)||void 0,e.frameRate=Number(o)||void 0)}.bind(e)),t.length||(t=[null]),n.length||(n=[null]);for(var s=[],l=0;l<t.length;l++)for(var c=0;c<n.length;c++){
var u=t[l]?t[l].stream:null,d=n[c]?n[c].stream:null,p=t[l]?t[l].drmInfos:null,h=n[c]?n[c].drmInfos:null;if(u&&d){if(!(p.length&&h.length?0<Ue(p,h).length:1))continue;var f=Ue(p,h)}else u?f=p:d&&(f=h);p=(n[l]?n[l].Zb:"")+" - "+(t[l]?t[l].Zb:""),e.A[p]||(u=Bi(e,u,d,i,f),s.push(u),e.A[p]=u)}return s}function Bi(e,t,n,i,r){return{id:e.I++,language:t?t.language:"und",primary:!!t&&t.primary||!!n&&n.primary,audio:t,video:n,bandwidth:i,drmInfos:r,allowedByApplication:!0,allowedByKeySystem:!0}}
function Vi(e,t){return tr(t,"TYPE"),Fi(e,t,[]).then(function(e){return e.stream})}function Fi(e,t,n){var i=tr(t,"URI");if(i=Ci(e.l,i),e.a[i])return Promise.resolve(e.a[i]);var r=tr(t,"TYPE").toLowerCase();"subtitles"==r&&(r="text");var a=st(bi(t,"LANGUAGE","und")),o=bi(t,"NAME"),s=t.getAttribute("DEFAULT"),l=t.getAttribute("AUTOSELECT"),c=bi(t,"CHANNELS");return Yi(e,i,n,r,a,!!s||!!l,o,"audio"==r?Qi(c):null).then(function(e){return this.a[i]?this.a[i]:(this.u[t.id]=e,this.a[i]=e)}.bind(e))}
function Qi(e){return e?(e=e.split("/")[0],parseInt(e,10)):null}function Hi(e,t,n,i){var r=tr(t,"URI");return r=Ci(e.l,r),e.a[r]?Promise.resolve(e.a[r]):Yi(e,r,n,i,"und",!1,null,null).then(function(e){return this.a[r]?this.a[r]:this.a[r]=e}.bind(e))}function Yi(e,t,n,i,r,a,o,s){var l=t;t=Ci(e.l,t);var c,u,d="";return ir(e,t).then(function(e){if(c=Ti(this.s,e.data,t),1!=c.type)throw new g(2,4,4017);e=c;var r=El,a=Mi(e.a,"EXT-X-PLAYLIST-TYPE"),o=Mi(e.a,"EXT-X-ENDLIST");if(o=a&&"VOD"==a.value||o,
a=a&&"EVENT"==a.value&&!o,a=!o&&!a,o?ar(this,r.oa):(a?ar(this,r.hc):ar(this,r.Uc),e=nr(e.a,"EXT-X-TARGETDURATION"),e=Number(e.value),this.g=Math.max(e,this.g),this.w=Math.min(e,this.w)),1==n.length)d=n[0];else{if(null==(e=$i(i,n)))throw new g(2,4,4025,n);d=e}return er(this,i,d,c)}.bind(e)).then(function(e){return u=e,e=Mi(c.a,"EXT-X-MEDIA-SEQUENCE"),Ki(this,c,e?Number(e.value):0,u,d)}.bind(e)).then(function(e){var t=e[0].startTime,n=e[e.length-1].endTime,p=n-t;e=new Tn(e);var h=Wi(c),f=void 0
;"text"==i&&(f="subtitle");var v=[];c.segments.forEach(function(e){e=Si(e.a,"EXT-X-KEY"),v.push.apply(v,e)});var m=!1,y=[],b=null;if(v.forEach(function(e){if("NONE"!=tr(e,"METHOD")){m=!0;var t=tr(e,"KEYFORMAT");(e=(t=wl[t])?t(e):null)&&(e.keyIds.length&&(b=e.keyIds[0]),y.push(e))}}),m&&!y.length)throw new g(2,4,4026);return h={id:this.I++,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:e.find.bind(e),getSegmentReference:e.get.bind(e),initSegmentReference:h,
presentationTimeOffset:0,mimeType:u,codecs:d,kind:f,encrypted:m,keyId:b,language:r,label:o||null,type:i,primary:a,trickModeVideo:null,containsEmsgBoxes:!1,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:s},this.L[h.id]=e,{stream:h,cb:e,drmInfos:y,Zb:l,Qb:t,yd:n,duration:p}}.bind(e))}function Wi(e){var t=Si(e.a,"EXT-X-MAP");if(!t.length)return null;if(1<t.length)throw new g(2,4,4020);t=t[0];var n=tr(t,"URI"),i=Ci(e.uri,n);return e=0,n=null,
(t=bi(t,"BYTERANGE"))&&(e=t.split("@"),t=Number(e[0]),e=Number(e[1]),n=e+t-1),new yn(function(){return[i]},e,n)}function Gi(e,t,n,i,r){var a=n.a,o=Ci(e.uri,n.uri);e=nr(a,"EXTINF").value.split(","),e=r+Number(e[0]),n=0;var s=null;return(a=Mi(a,"EXT-X-BYTERANGE"))&&(n=a.value.split("@"),a=Number(n[0]),n=n[1]?Number(n[1]):t.D+1,s=n+a-1),new bn(i,r,e,function(){return[o]},n,s)}function Ki(e,t,n,i,r){var a=t.segments,o=[],s=Ci(t.uri,a[0].uri),l=Gi(t,null,a[0],n,0),c=Wi(t)
;return Zi(e,t.uri,c,l,i,r).then(function(e){s.split("/").pop();for(var i=0;i<a.length;++i){var r=o[o.length-1];r=Gi(t,r,a[i],n+i,0==i?e:r.endTime),o.push(r)}return o}.bind(e))}function qi(e,t){var n=e.c.networkingEngine,i=V(t.a(),e.h.retryParameters),r={},a=t.O;r.Range="bytes="+a+"-"+(a+2048-1);var o={};return 0==a&&null==t.D||(a="bytes="+a+"-",null!=t.D&&(a+=t.D),o.Range=a),i.headers=r,n.request(1,i).catch(function(){
return f("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive!  Your server should support Range requests and CORS preflights.",i.uris[0]),i.headers=o,n.request(1,i)})}function Zi(e,t,n,i,r,a){return e.m&&(t=e.a[t].cb.get(i.position))?Promise.resolve(t.startTime):(i=[qi(e,i)],"video/mp4"!=r&&"audio/mp4"!=r||(n?i.push(qi(e,n)):i.push(i[0])),Promise.all(i).then(function(e){if("video/mp4"==r||"audio/mp4"==r)return Xi(e[0].data,e[1].data)
;if("audio/mpeg"==r)return 0;if("video/mp2t"==r)return Ji(e[0].data);if("application/mp4"==r||0==r.indexOf("text/")){e=e[0].data;var t=oe(r,a);if(tl[t]){var n=new Ge(null);n.c=new tl[t],e=n.Kb(e)}else e=0;return e}throw new g(2,4,4030)}.bind(e)))}function Xi(e,t){var n=0;if((new Mn).B("moov",Dn).B("trak",Dn).B("mdia",Dn).W("mdhd",function(e){e.o.F(0==e.version?8:16),n=e.o.C(),e.la.stop()}).parse(t,!0),!n)throw new g(2,4,4030);var i=0,r=!1
;if((new Mn).B("moof",Dn).B("traf",Dn).W("tfdt",function(e){i=(0==e.version?e.o.C():e.o.Qa())/n,r=!0,e.la.stop()}).parse(e,!0),!r)throw new g(2,4,4030);return i}function Ji(e){function t(){throw new g(2,4,4030)}e=new In(new DataView(e),0);for(var n=0,i=0;;){if(n=e.U(),i=e.$(),71!=i&&t(),16384&e.ab()||t(),i=(48&e.$())>>4,0!=i&&2!=i||t(),3==i&&(i=e.$(),e.F(i)),1==e.C()>>8)return e.F(3),n=e.$()>>6,0!=n&&1!=n||t(),0==e.$()&&t(),n=e.$(),i=e.ab(),e=e.ab(),
(1073741824*((14&n)>>1)+((65534&i)<<14|(65534&e)>>1))/9e4;e.seek(n+188),i=e.$(),71!=i&&(e.seek(n+192),i=e.$()),71!=i&&(e.seek(n+204),i=e.$()),71!=i&&t(),e.Kc(1)}}function $i(e,t){for(var n=jl[e],i=0;i<n.length;i++)for(var r=0;r<t.length;r++)if(n[i].test(t[r].trim()))return t[r].trim();return"text"==e?"":null}function er(e,t,n,i){i=Ci(i.uri,i.segments[0].uri);var r=new m(i).Y.split(".").pop(),a=Pl[t][r]
;return a?Promise.resolve(a):"text"==t?n&&"vtt"!=n?Promise.resolve("application/mp4"):Promise.resolve("text/vtt"):(t=V([i],e.h.retryParameters),t.method="HEAD",e.c.networkingEngine.request(1,t).then(function(e){if(!(e=e.headers["content-type"]))throw new g(2,4,4021,r);return e.split(";")[0]}))}function tr(e,t){var n=e.getAttribute(t);if(!n)throw new g(2,4,4023,t);return n.value}function nr(e,t){var n=Mi(e,t);if(!n)throw new g(2,4,4024,t);return n}function ir(e,t){
return e.c.networkingEngine.request(0,V([t],e.h.retryParameters),function(){return!this.c}.bind(e))}function rr(t,n){null!=t.i&&null!=n&&(t.j=e.setTimeout(t.K.bind(t),1e3*n))}function ar(t,n){t.f=n,t.b&&t.b.yb(t.f==El.oa),t.f==El.oa&&null!=t.j&&(e.clearTimeout(t.j),t.j=null,t.i=null)}function or(e,t,n,i){this.a=e,this.u=t,this.s=n,this.w=i,this.h=new K,this.b=null,this.g=!1,this.m=e.readyState,this.c=!1,this.j=this.A=-1,this.f=this.i=!1,t=this.l.bind(this),q(this.h,e,"waiting",t),
this.b=new pe(t),fe(this.b,.25)}function sr(e,t,n){this.a=e,this.j=t,this.i=n,this.b=new K,this.g=1,this.h=!1,this.c=null,this.f=new pe(this.Bd.bind(this)),0<e.readyState?this.zc():(Z(this.b,e,"loadedmetadata",this.zc.bind(this)),q(this.b,e,"timeupdate",function(){he(this.f,.1)}.bind(this))),q(this.b,e,"ratechange",this.Pd.bind(this))}function lr(e){return 0<e.a.readyState?e.a.currentTime:e.i}function cr(e,t){0<e.a.readyState?dr(e,e.a.currentTime,t):(e.i=t,setTimeout(e.j,0))}function ur(e,t){
null!=e.c&&(e.c.cancel(),e.c=null),e.g=t,e.a.playbackRate=e.h||0>t?0:t,!e.h&&0>t&&(e.c=new pe(function(){this.a.currentTime+=t/4}.bind(e)),fe(e.c,.25))}function dr(e,t,n){e.a.currentTime=n;var i=0,r=function(){!this.a||10<=i++||this.a.currentTime!=t||(this.a.currentTime=n,setTimeout(r,100))}.bind(e);setTimeout(r,100)}function pr(e,t,n,i,r,a){this.b=e,this.c=t,this.h=n,this.i=r,this.f=null,this.g=new or(e,t,n,a),t=this.Rd.bind(this),null==i&&(i=this.c.presentationTimeline,
i=1/0>i.S()?i.Va():i.Ha()),i=fr(this,gr(this,i)),this.a=new sr(e,t,i),this.f=new pe(this.Od.bind(this)),fe(this.f,.25)}function hr(e){var t=lr(e.a);return 0<e.b.readyState&&(e.b.paused||(t=gr(e,t))),t}function fr(e,t){var n=e.c.presentationTimeline.S();return t>=n?n-e.h.durationBackoff:t}function vr(e,t){var n=Ve.bind(null,e.b.buffered),i=1*Math.max(e.c.minBufferTime||0,e.h.rebufferingGoal),r=e.c.presentationTimeline,a=r.Ga(0),o=r.Ha(),s=r.S(),l=r.Ga(i),c=r.Ga(5);return i=r.Ga(i+5),
t>=s?fr(e,t):t>o?o:t<a?n(c)?c:i:t>=l||n(t)?t:i}function gr(e,t){var n=e.c.presentationTimeline.Va();return t<n?n:(n=e.c.presentationTimeline.Ha(),t>n?n:t)}function mr(e,t,n,i,r,a,o){this.a=e,this.w=t,this.g=n,this.u=i,this.l=r,this.h=a,this.A=o,this.c=[],this.j=new K,this.b=!1,this.i=-1,this.f=null,br(this)}function yr(e){var t=A(e);return t.eventElement=e.eventElement,t}function br(t){Ir(t),t.f=e.setTimeout(t.I.bind(t),250)}function Ir(t){t.f&&(e.clearTimeout(t.f),t.f=null)}function Sr(e,t){
this.a=t,this.b=e,this.h=null,this.i=1,this.m=Promise.resolve(),this.g=[],this.j={},this.c={},this.s=!1,this.A=null,this.w=this.f=this.l=!1,this.u=0}function Mr(e){var t=hr(e.a.Na);return e.b.periods[Pt(e.b,t)]}function Dr(e){var t=e.c.video||e.c.audio;return t?e.b.periods[t.xa]:null}function Cr(e){return jr(e,"audio")}function Or(e){return jr(e,"video")}function jr(e,t){var n=e.c[t];return n?n.pa||n.stream:null}function Pr(e,t){tt(e.a.J,"text"),e.u++,e.w=!1;var n=e.u;return e.a.J.init({text:t
}),_r(e,[t]).then(function(){if(this.u==n&&!this.c.text&&!this.w){var e=hr(this.a.Na);this.c.text=Lr(t,Pt(this.b,e)),Zr(this,this.c.text,0)}}.bind(e))}function wr(e,t){var n=e.c.video;if(n){var i=n.stream;if(i)if(t){var r=i.trickModeVideo;if(r){var a=n.pa;a||(Er(e,r,!1),n.pa=i)}}else(a=n.pa)&&(n.pa=null,Er(e,a,!0))}}function Tr(e,t,n){t.video&&Er(e,t.video,n),t.audio&&Er(e,t.audio,n)}function Er(e,t,n){var i=e.c[t.type];if(!i&&"text"==t.type&&e.h.ignoreTextStreamFailures)Pr(e,t);else if(i){
var r=wt(e.b,t);n&&r!=i.xa?Nr(e):(i.pa&&(t.trickModeVideo?(i.pa=t,t=t.trickModeVideo):i.pa=null),(r=e.g[r])&&r.Ra&&(r=e.j[t.id])&&r.Ra&&i.stream!=t&&("text"==t.type&&Xe(e.a.J,oe(t.mimeType,t.codecs)),i.stream=t,i.vb=!0,n&&(i.ua?i.Ab=!0:i.ya?(i.sa=!0,i.Ab=!0):(Xr(i),qr(e,i,!0)))))}}function xr(e){var t=hr(e.a.Na);Object.keys(e.c).every(function(e){var n=this.a.J;return"text"==e?(e=n.a,e=t>=e.a&&t<e.b):(e=$e(n,e),e=Ve(e,t)),e}.bind(e))||Nr(e)}function Nr(e){for(var t in e.c){var n=e.c[t]
;n.ua||n.sa||(n.ya?n.sa=!0:null==Je(e.a.J,t)?null==n.ra&&Zr(e,n,0):(Xr(n),qr(e,n,!1)))}}function Ar(e,t,n){var i=hr(e.a.Na),r=Pt(e.b,i),a={};return i=[],t.variant&&t.variant.audio&&(a.audio=t.variant.audio,i.push(t.variant.audio)),t.variant&&t.variant.video&&(a.video=t.variant.video,i.push(t.variant.video)),t.text&&(a.text=t.text,i.push(t.text)),e.a.J.init(a),Rr(e),_r(e,i).then(function(){if(!this.f)for(var e in a){var t=a[e];this.c[e]||(this.c[e]=Lr(t,r,n),Zr(this,this.c[e],0))}}.bind(e))}
function Lr(e,t,n){return{stream:e,type:e.type,Ka:null,ka:null,pa:null,vb:!0,xa:t,endOfStream:!1,ya:!1,ra:null,sa:!1,Ab:!1,ua:!1,Yb:!1,Wa:!1,Ic:n||0}}function kr(e,t){var n=e.g[t];if(n)return n.N;n={N:new j,Ra:!1},e.g[t]=n;var i=e.b.periods[t].variants.map(function(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),e.video&&e.video.trickModeVideo&&t.push(e.video.trickModeVideo),t}).reduce(k,[]).filter(z);return i.push.apply(i,e.b.periods[t].textStreams),e.m=e.m.then(function(){
if(!this.f)return _r(this,i)}.bind(e)).then(function(){this.f||(this.g[t].N.resolve(),this.g[t].Ra=!0)}.bind(e)).catch(function(e){this.f||(this.g[t].N.reject(),delete this.g[t],this.a.onError(e))}.bind(e)),n.N}function _r(e,t){t.map(function(e){return e.id}).filter(z);for(var n=[],i=0;i<t.length;++i){var r=t[i],a=e.j[r.id];a?n.push(a.N):(e.j[r.id]={N:new j,Ra:!1},n.push(r.createSegmentIndex()))}return Promise.all(n).then(function(){if(!this.f)for(var e=0;e<t.length;++e){var n=this.j[t[e].id]
;n.Ra||(n.N.resolve(),n.Ra=!0)}}.bind(e)).catch(function(e){if(!this.f){for(var n=0;n<t.length;n++)this.j[t[n].id].N.reject(),delete this.j[t[n].id];return Promise.reject(e)}}.bind(e))}function Rr(e){var t=e.b.presentationTimeline.S();1/0>t?e.a.J.ha(t):e.a.J.ha(Math.pow(2,32))}function zr(e,t){var n=hr(e.a.Na),i=t.Ka&&t.ka?e.b.periods[wt(e.b,t.Ka)].startTime+t.ka.endTime:Math.max(n,t.Ic),r=wt(e.b,t.stream),a=Pt(e.b,i),o=e.a.J,s=t.type;return"text"==s?(o=o.a,
o=null==o.b||o.b<n?0:o.b-Math.max(n,o.a)):(o=$e(o,s),o=Fe(o,n)),s=Math.max(e.i*Math.max(e.b.minBufferTime||0,e.h.rebufferingGoal),e.i*e.h.bufferingGoal),i>=e.b.presentationTimeline.S()?(t.endOfStream=!0,null):(t.endOfStream=!1,t.xa=a,a!=r?null:o>=s?.5:(i=e.a.J,a=t.type,i="text"==a?i.a.b:Be($e(i,a)),t.ka&&t.stream==t.Ka?(a=t.ka.position+1,
i=Ur(e,t,r,a)):(a=t.ka?t.stream.findSegmentPosition(Math.max(0,e.b.periods[wt(e.b,t.Ka)].startTime+t.ka.endTime-e.b.periods[r].startTime)):t.stream.findSegmentPosition(Math.max(0,(i||n)-e.b.periods[r].startTime)),null==a?i=null:(o=null,null==i&&(o=Ur(e,t,r,Math.max(0,a-1))),i=o||Ur(e,t,r,a))),i?(t.Ic=0,Br(e,t,n,r,i),null):1))}function Ur(e,t,n,i){return n=e.b.periods[n],(t=t.stream.getSegmentReference(i))?(i=e.b.presentationTimeline,e=i.Ja(),i=i.Ia(),
n.startTime+t.endTime<e||n.startTime+t.startTime>i?null:t):null}function Br(e,t,n,i,r){var a=e.b.periods[i],o=t.stream,s=e.b.presentationTimeline.S(),l=e.b.periods[i+1];i=Fr(e,t,i,Math.max(0,a.startTime-.1),l?l.startTime:s),t.ya=!0,t.vb=!1,s=Kr(e,r),Promise.all([i,s]).then(function(e){if(!this.f&&!this.l)return Qr(this,t,n,a,o,r,e[1])}.bind(e)).then(function(){this.f||this.l||(t.ya=!1,t.Yb=!1,t.sa||this.a.$a(),Zr(this,t,0),Yr(this,o))}.bind(e)).catch(function(e){this.f||this.l||(t.ya=!1,
"text"==t.type&&this.h.ignoreTextStreamFailures?delete this.c.text:3017==e.code?Vr(this,t,e):(t.Wa=!0,e.severity=2,Jr(this,e)))}.bind(e))}function Vr(e,t,n){if(!ie(e.c).some(function(e){return e!=t&&e.Yb})){var i=Math.round(100*e.i);if(20<i)e.i-=.2;else{if(!(4<i))return t.Wa=!0,e.l=!0,void e.a.onError(n);e.i-=.04}t.Yb=!0}Zr(e,t,4)}function Fr(e,t,n,i,r){return t.vb?(n=nt(e.a.J,t.type,e.b.periods[n].startTime-t.stream.presentationTimeOffset,i,r),
t.stream.initSegmentReference?(e=Kr(e,t.stream.initSegmentReference).then(function(e){if(!this.f)return et(this.a.J,t.type,e,null,null)}.bind(e)).catch(function(e){return t.vb=!0,Promise.reject(e)}),Promise.all([n,e])):n):Promise.resolve()}function Qr(e,t,n,i,r,a,o){return r.containsEmsgBoxes&&(new Mn).W("emsg",e.ce.bind(e,i,a)).parse(o),Hr(e,t,n).then(function(){if(!this.f)return et(this.a.J,t.type,o,a.startTime,a.endTime)}.bind(e)).then(function(){if(!this.f)return t.Ka=r,t.ka=a,
Promise.resolve()}.bind(e))}function Hr(e,t,n){var i=Math.max(e.h.bufferBehind,e.b.presentationTimeline.b),r=Je(e.a.J,t.type);return null==r?Promise.resolve():(n=n-r-i,0>=n?Promise.resolve():e.a.J.remove(t.type,r,r+n).then(function(){}.bind(e)))}function Yr(e,t){if(!e.s&&(e.s=ie(e.c).every(function(e){return"text"==e.type||!e.sa&&!e.ua&&e.ka}),e.s)){var n=wt(e.b,t);for(e.g[n]||kr(e,n).then(function(){this.a.tc()}.bind(e)).catch(_),n=0;n<e.b.periods.length;++n)kr(e,n).catch(_);e.a.Ud&&e.a.Ud()}}
function Wr(e,t){if(t.xa!=wt(e.b,t.stream)){var n=t.xa,i=ie(e.c);i.every(function(e){return e.xa==n})&&i.every(Gr)&&kr(e,n).then(function(){if(!this.f&&i.every(function(e){var t=wt(this.b,e.stream);return Gr(e)&&e.xa==n&&t!=n}.bind(this))){var e=this.b.periods[n],t=this.a.uc(e),r={};t.variant&&t.variant.video&&(r.video=t.variant.video),t.variant&&t.variant.audio&&(r.audio=t.variant.audio),t.text&&(r.text=t.text);for(var a in this.c)if(!r[a]&&"text"!=a)return void this.a.onError(new g(2,5,5005))
;for(a in r)if(!this.c[a]){if("text"!=a)return void this.a.onError(new g(2,5,5005));Ar(this,{text:r.text},e.startTime),delete r[a]}for(a in this.c)(e=r[a])?(Er(this,e,!1),Zr(this,this.c[a],0)):delete this.c[a];this.a.tc()}}.bind(e)).catch(_)}}function Gr(e){return!e.ya&&null==e.ra&&!e.sa&&!e.ua}function Kr(e,t){var n=V(t.a(),e.h.retryParameters);if(0!=t.O||null!=t.D){var i="bytes="+t.O+"-";null!=t.D&&(i+=t.D),n.headers.Range=i}return e.a.Ya.request(1,n).then(function(e){return e.data})}
function qr(e,t,n){t.sa=!1,t.Ab=!1,t.ua=!0,tt(e.a.J,t.type).then(function(){if(!this.f&&n){var e=this.a.J,i=t.type;return"text"==i?Promise.resolve():it(e,i,e.gd.bind(e,i))}}.bind(e)).then(function(){this.f||(t.Ka=null,t.ka=null,t.ua=!1,t.endOfStream=!1,Zr(this,t,0))}.bind(e))}function Zr(t,n,i){n.ra=e.setTimeout(t.Me.bind(t,n),1e3*i)}function Xr(t){null!=t.ra&&(e.clearTimeout(t.ra),t.ra=null)}function Jr(e,t){w(e.A).then(function(){this.a.onError(t),t.handled||this.h.failureCallback(t)}.bind(e))
}function $r(e,t){return new Promise(function(n,i){var r=new $r.c;r.open(t.method,e,!0),r.responseType="arraybuffer",r.timeout=t.retryParameters.timeout,r.withCredentials=t.allowCrossSiteCredentials,r.onload=function(t){t=t.target;var r=t.getAllResponseHeaders().trim().split("\r\n").reduce(function(e,t){var n=t.split(": ");return e[n[0].toLowerCase()]=n.slice(1).join(": "),e},{});if(200<=t.status&&299>=t.status&&202!=t.status)t.responseURL&&(e=t.responseURL),n({uri:e,data:t.response,headers:r,
fromCache:!!r["x-shaka-from-cache"]});else{var a=null;try{a=ce(t.response)}catch(e){}i(new g(401==t.status||403==t.status?2:1,1,1001,e,t.status,a,r))}},r.onerror=function(){i(new g(1,1,1002,e))},r.ontimeout=function(){i(new g(1,1,1003,e))};for(var a in t.headers)r.setRequestHeader(a,t.headers[a]);r.send(t.body)})}function ea(){this.b=null,this.a=[]}function ta(){if(!e.indexedDB)return Promise.resolve();var t=e.indexedDB.deleteDatabase("shaka_offline_db"),n=new j;return t.onsuccess=function(){
n.resolve()},t.onerror=ua.bind(null,t,n),n}function na(e,t){return ra(e,t)}function ia(e,t,n){var i;return la(e,t,"readonly",function(e){i=e.get(n)}).then(function(){return i.result})}function ra(e,t){return la(e,"manifest-v3","readonly",function(e){e.openCursor().onsuccess=function(e){(e=e.target.result)&&(t(e.key,e.value),e.continue())}})}function aa(e,t,n){return la(e,"manifest-v3","readwrite",function(e){e.put(n,t)})}function oa(e,t,n){var i;return la(e,t,"readwrite",function(e){
e.add(n).onsuccess=function(e){i=e.target.result}}).then(function(){return i})}function sa(e,t,n,i){return la(e,t,"readwrite",function(e){n.forEach(function(t){e.delete(t).onsuccess=function(){i&&i(t)}})})}function la(e,t,n,i){var r={transaction:e.b.transaction([t],n),N:new j};return r.transaction.oncomplete=function(){e.a.splice(e.a.indexOf(r),1),r.N.resolve()},r.transaction.onabort=function(t){e.a.splice(e.a.indexOf(r),1),ua(r.transaction,r.N,t)},r.transaction.onerror=ha(),
t=r.transaction.objectStore(t),i(t),e.a.push(r),r.N}function ca(e,t,n){function i(){var t=a.pop();t?r(t,i):(e.reject(new g(1,9,9010,o)),n.abort())}function r(e,t){n.objectStore(e).openCursor().onsuccess=function(e){(e=e.target.result)?(o.push(e.value.originalManifestUri),e.continue()):t()}}var a=["manifest","manifest-v2"].filter(function(e){return t.objectStoreNames.contains(e)}),o=[];i()}function ua(e,t,n){t.reject(e.error?new g(2,9,9001,e.error):new g(2,9,9002)),n.preventDefault()}
function da(e){function t(){return new Promise(function(e){setTimeout(e,1e3)})}var n=e||0,i=0<n;e=pa(i);for(var r=0;r<n;r++)e=e.then(function(e){return e||t().then(function(){return pa(i)})});return e.then(function(e){return e||Promise.reject(new g(2,9,9001,"Failed to issue upgrade after "+n+" retries"))})}function pa(t){var n=new j,i=!1,r=e.indexedDB.open("shaka_offline_db",3);return r.onupgradeneeded=function(e){var t=e.target.transaction,r=t.db,a={autoIncrement:!0}
;0==e.oldVersion?(r.createObjectStore("manifest-v3",a),r.createObjectStore("segment-v3",a)):ca(n,r,t),i=!0},r.onsuccess=function(e){e=e.target.result,t&&!i?(e.close(),n.resolve(null)):n.resolve(e)},r.onerror=ha(function(){n.reject(new g(2,9,9001,"Failed to open IndexedDB Connection",r.error.message))}),n}function ha(e){return function(t){t.preventDefault(),e&&e(t)}}function fa(e,t,n){this.b={},this.i=[],this.h=e,this.j=t,this.m=n,this.g=this.a=null,this.f=this.c=0,this.l=[]}function va(e,t){
e.l.push(t)}function ga(e,t,n,i,r){e.b[t]=e.b[t]||[],e.b[t].push({uris:n.a(),O:n.O,D:n.D,jc:i,Vd:r})}function ma(e,t){e.c=0,e.f=0,ie(e.b).forEach(function(e){e.forEach(this.s.bind(this))}.bind(e)),e.a=t;var n=ie(e.b).map(function(e){var t=0,n=function(){return this.a?t>=e.length?Promise.resolve():ya(this,e[t++]).then(n):Promise.reject(new g(2,9,9002))}.bind(this);return n()}.bind(e));return e.b={},e.g=Promise.all(n).then(function(){return oa(this.h,"manifest-v3",t)}.bind(e)).then(function(e){
return this.i=[],e}.bind(e)),e.g}function ya(e,t){var n=V(t.uris,e.m);0==t.O&&null==t.D||(n.headers.Range="bytes="+t.O+"-"+(null==t.D?"":t.D));var i;return e.j.request(1,n).then(function(e){return this.a?(i=e.data.byteLength,oa(this.h,"segment-v3",{data:e.data})):Promise.reject(new g(2,9,9002))}.bind(e)).then(function(e){if(!this.a)return Promise.reject(new g(2,9,9002));this.a.size+=i,this.f+=null==t.D?t.jc:t.D-t.O+1,this.i.push(e),t.Vd(e),ba(this)}.bind(e))}function ba(e){
var t=0==e.c?0:e.f/e.c,n=e.a.size;e.l.forEach(function(e){e(t,n)})}function Ia(e){return(e=/^offline:manifest\/([0-9]+)$/.exec(e))?Number(e[1]):null}function Sa(e,t,n){var i=void 0==t.expiration?1/0:t.expiration,r=t.presentationTimeline.S();return t=ft(t.periods[0]),{offlineUri:null,originalManifestUri:e,duration:r,size:0,expiration:i,tracks:t,appMetadata:n}}function Ma(e,t){var n=Da(t.periods[0],[],new ei(null,0)),i=t.appMetadata||{};return n=ft(n),{offlineUri:e,
originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:i}}function Da(e,t,n){var i=e.streams.filter(wa);return t=Oa(i,e.streams.filter(Ta),t),i=e.streams.filter(Ea).map(ja),e.streams.forEach(function(e,t){var i=e.segments.map(function(e,t){return Ca(t,e)});n.Za(i,0==t)}),{startTime:e.startTime,variants:t,textStreams:i}}function Ca(e,t){var n="offline:segment/"+t.dataKey;return new bn(e,t.startTime,t.endTime,function(){return[n]
},0,null)}function Oa(e,t,n){var i={},r=[];return r.push.apply(r,e),r.push.apply(r,t),r.forEach(function(e){e.variantIds.forEach(function(e){i[e]||(i[e]={id:e,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:n,allowedByApplication:!0,allowedByKeySystem:!0})})}),e.forEach(function(e){var t=ja(e);e.variantIds.forEach(function(e){e=i[e],e.language=t.language,e.primary=e.primary||t.primary,e.audio=t})}),t.forEach(function(e){var t=ja(e);e.variantIds.forEach(function(e){e=i[e],
e.primary=e.primary||t.primary,e.video=t})}),ie(i)}function ja(e){var t=e.segments.map(function(e,t){return Ca(t,e)});return t=new Tn(t),t={id:e.id,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:t.find.bind(t),getSegmentReference:t.get.bind(t),initSegmentReference:null,presentationTimeOffset:e.presentationTimeOffset,mimeType:e.mimeType,codecs:e.codecs,width:e.width||void 0,height:e.height||void 0,frameRate:e.frameRate||void 0,kind:e.kind,encrypted:e.encrypted,keyId:e.keyId,
language:e.language,label:e.label||null,type:e.contentType,primary:e.primary,trickModeVideo:null,containsEmsgBoxes:!1,roles:[],channelsCount:null},null!=e.initSegmentKey&&(t.initSegmentReference=Pa(e.initSegmentKey)),t}function Pa(e){var t="offline:segment/"+e;return new yn(function(){return[t]},0,null)}function wa(e){return"audio"==e.contentType}function Ta(e){return"video"==e.contentType}function Ea(e){return"text"==e.contentType}function xa(){return Aa().then(function(){var e=new ea
;return e.init().then(function(){return e})})}function Na(){return Aa().then(function(){return ta()})}function Aa(){return null!=e.indexedDB?Promise.resolve():Promise.reject(new g(2,9,9e3))}function La(){this.a=-1}function ka(e){var t=new ei(null,0);t.ha(e.duration);var n=e.drmInfo?[e.drmInfo]:[];return{presentationTimeline:t,minBufferTime:2,offlineSessionIds:e.sessionIds,periods:e.periods.map(function(e){return Da(e,n,t)})}}function _a(e){if(null!=Ia(e))return _a.a(e)
;var t=(t=/^offline:segment\/([0-9]+)$/.exec(e))?Number(t[1]):null;return null!=t?_a.b(t,e):Promise.reject(new g(2,1,9004,e))}function Ra(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region={x:0,y:0,width:100,height:100},this.position=null,this.positionAlign=xl,this.size=100,this.textAlign=Nl,this.writingDirection=_l,this.lineInterpretation=Rl,this.line=null,this.lineHeight="",this.lineAlign=zl,this.displayAlign=Ll,this.fontSize=this.backgroundColor=this.color="",
this.fontWeight=Bl,this.fontStyle=Vl,this.fontFamily="",this.textDecoration=[],this.wrapLine=!0,this.id=""}function za(e){this.a=null;for(var t=0;t<e.textTracks.length;++t){var n=e.textTracks[t];n.mode="disabled","Shaka Player TextTrack"==n.label&&(this.a=n)}this.a||(this.a=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.a.mode="hidden",this.b=this.a.cues}function Ua(e){if(e.startTime>=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,
t.positionAlign=e.positionAlign,t.size=e.size;try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),2==e.writingDirection?t.vertical="lr":3==e.writingDirection&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function Ba(e,t){for(var n=e.b,i=[],r=0;r<n.length;++r)t(n[r])&&i.push(n[r]);for(r=0;r<i.length;++r)e.a.removeCue(i[r])}function Va(){
this.a=Promise.resolve(),this.b=this.c=this.f=!1,this.i=new Promise(function(e){this.g=e}.bind(this)),this.l=[],this.j=[]}function Fa(e){return e.f||(e.a=e.a.then(function(e){return this.c=!0,this.l.forEach(function(e){e()}),Promise.resolve(e)}.bind(e),function(e){return this.c=!0,this.b?(this.g(),Promise.reject(this.h)):Promise.reject(e)}.bind(e))),e.f=!0,e.a}function Qa(e,t){zt.call(this),this.L=!1,this.f=e,this.qb=!1,this.u=null,this.m=new K,
this.h=this.Cb=this.b=this.i=this.a=this.w=this.g=this.nb=this.ca=this.da=this.l=this.s=null,this.Xc=1e9,this.lb=[],this.pb=!1,this.ta=!0,this.K=this.Ta=this.Da=null,this.ic=!1,this.A=null,this.ob=[],this.I={},this.c=to(this),this.mb={width:1/0,height:1/0},this.j=no(),this.kb=0,this.Ba=this.c.preferredAudioLanguage,this.Ca=this.c.preferredTextLanguage,this.hb=this.ib="",t&&t(this),this.s=new U(this.Ee.bind(this)),this.nb=Wa(this),q(this.m,this.f,"error",this.Xd.bind(this))}function Ha(e){
if(!e.Da)return Promise.resolve();var t=Promise.resolve();return e.i&&(t=e.i.stop(),e.i=null),e=e.Da.cancel(new g(2,7,7e3)),Promise.all([t,e])}function Ya(e){function t(e){return(e.video?e.video.codecs.split(".")[0]:"")+"-"+(e.audio?e.audio.codecs.split(".")[0]:"")}var n={};e.b.periods.forEach(function(e){e.variants.forEach(function(e){var i=t(e);i in n||(n[i]=[]),n[i].push(e)})});var i=null,r=1/0;ae(n,function(e,t){var n=0,a=0;t.forEach(function(e){n+=e.bandwidth||0,++a});var o=n/a;o<r&&(i=e,
r=o)}),e.b.periods.forEach(function(e){e.variants=e.variants.filter(function(e){return t(e)==i})})}function Wa(t){t.da=new MediaSource;var n=new j;return q(t.m,t.da,"sourceopen",n.resolve),t.f.src=e.URL.createObjectURL(t.da),n}function Ga(e){if(e.i&&e.i.configure(e.c.manifest),e.l&&e.l.configure(e.c.drm),e.a){e.a.configure(e.c.streaming);try{e.b.periods.forEach(e.sb.bind(e))}catch(t){e.Sa(t)}var t=Cr(e.a),n=Or(e.a),i=Mr(e.a)
;(t=Ot(t,n,i.variants))&&t.allowedByApplication&&t.allowedByKeySystem||so(e,i)}e.h&&(e.h.configure(e.c.abr),e.c.abr.enabled&&!e.ta?e.h.enable():e.h.disable())}function Ka(e){var t=[];return e.forEach(function(e){if(e){var n=e.language;e.roles.length?e.roles.forEach(function(e){t.push({language:n,role:e})}):t.push({language:n,role:""})}else t.push({language:"und",role:""})}),Q(t,function(e,t){return e.language==t.language&&e.role==t.role})}function qa(e,t,n){t.video&&Xa(e,t.video),
t.audio&&Xa(e,t.audio);var i=Dr(e.a);t!=Ot(Cr(e.a),Or(e.a),i?i.variants:[])&&e.j.switchHistory.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})}function Za(e,t,n){Xa(e,t),e.j.switchHistory.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null})}function Xa(e,t){var n=wt(e.b,t);e.I[n]||(e.I[n]={}),e.I[n][t.type]=t.id}function Ja(e){e.m&&(e.m.ia(e.da,"sourceopen"),e.m.ia(e.f,"loadeddata"),e.m.ia(e.f,"playing"),
e.m.ia(e.f,"pause"),e.m.ia(e.f,"ended")),e.f&&(e.f.removeAttribute("src"),e.f.load());var t=Promise.all([e.h?e.h.stop():null,e.l?e.l.destroy():null,e.ca?e.ca.destroy():null,e.g?e.g.destroy():null,e.w?e.w.destroy():null,e.a?e.a.destroy():null,e.i?e.i.stop():null,e.u?e.u.destroy():null]);return e.ta=!0,e.l=null,e.ca=null,e.g=null,e.w=null,e.a=null,e.i=null,e.u=null,e.b=null,e.Cb=null,e.nb=null,e.da=null,e.ob=[],e.I={},e.j=no(),t}function $a(e){return e.i?Ja(e).then(function(){this.L||(this.Qc(!1),
this.nb=Wa(this))}.bind(e)):Promise.resolve()}function eo(){return{".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0)}}}function to(e){var t=5e5;return navigator.connection&&navigator.connection.type&&(t=1e6*navigator.connection.downlink),{drm:{retryParameters:T(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},manifest:{
retryParameters:T(),dash:{customScheme:function(e){if(e)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10}},streaming:{retryParameters:T(),failureCallback:e.dd.bind(e),rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1},abrFactory:Tt,textDisplayFactory:function(e){return new za(e)}.bind(null,e.f),abr:{enabled:!0,defaultBandwidthEstimate:t,
switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0}}function no(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,
droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:0,bufferingTime:0,switchHistory:[],stateHistory:[]}}function io(e,t,n){e.ta?(e.K=t,e.ic=n||!1):Tr(e.a,t,n||!1)}function ro(e){if(e.b){var t=Date.now()/1e3;e.pb?e.j.bufferingTime+=t-e.kb:e.j.playTime+=t-e.kb,e.kb=t}}function ao(e,t){function n(e,t){if(!e)return null;var n=e.findSegmentPosition(t-a.startTime);return null==n?null:(n=e.getSegmentReference(n))?n.startTime+a.startTime:null}var i=Cr(e.a),r=Or(e.a),a=Mr(e.a)
;return i=n(i,t),r=n(r,t),null!=r&&null!=i?Math.max(r,i):null!=r?r:null!=i?i:t}function oo(e,t){return t&&t.length?(e.h.setVariants(t),e.h.chooseVariant()):(e.Sa(new g(2,4,4012)),null)}function so(e,t){var n=St(t.variants,e.Ba,e.ib),i=Mt(t.textStreams,e.Ca,e.hb);(n=oo(e,n))&&(qa(e,n,!0),io(e,n,!0)),(i=i[0])&&e.Mb()&&(Za(e,i,!0),e.ta?e.A=i:Er(e.a,i,!0)),lo(e)}function lo(e){Promise.resolve().then(function(){this.L||this.dispatchEvent(new $("adaptation"))}.bind(e))}function co(e){
Promise.resolve().then(function(){this.L||this.dispatchEvent(new $("trackschanged"))}.bind(e))}function uo(e){e.dispatchEvent(new $("texttrackvisibility"))}function po(e){if(!e||e.constructor!=Qa)throw new g(2,9,9008);this.g=null,this.a=e,this.b=yo(this),this.f=null,this.l=!1,this.c=this.s=this.h=this.i=null}function ho(){return null!=e.indexedDB}function fo(e,t,n,i,r){if(n.presentationTimeline.P()||n.presentationTimeline.wa())throw new g(2,9,9005,t);e.h=n,e.f=r,e.j(n.periods),e.s=Sa(t,n,i)
;var a=Mo(e,t,i);return ma(e.c,a).then(function(e){return Ma("offline:manifest/"+e,a)})}function vo(e,t){function n(e){6013!=e.code&&(o=e)}var i=Ia(t);if(null==i)return Promise.reject(new g(2,9,9004,t));var r,a,o=null;return bo(e).then(function(){return Oo(this),this.g.Fa(i)}.bind(e)).then(function(e){if(Oo(this),!e)throw new g(2,9,9003,t);return r=e,e=ka(r),a=new Se({Ya:this.a.s,onError:n,Tb:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),
a.configure(this.a.getConfiguration().drm),a.init(e,this.b.usePersistentLicense||!1)}.bind(e)).then(function(){return De(a,r.sessionIds)}.bind(e)).then(function(){return a.destroy()}.bind(e)).then(function(){if(Oo(this),o)throw o;return go(this,t,i,r)}.bind(e))}function go(e,t,n,i){function r(){l++,a(o,l/c)}var a=e.b.progressCallback,o=Ma(t,i),s=jo(i),l=0,c=s.length+1;return Promise.resolve().then(function(){return Oo(this),sa(this.g,"segment-v3",s,r)}.bind(e)).then(function(){return Oo(this),
sa(this.g,"manifest-v3",[n],r)}.bind(e))}function mo(e,t,n,i){function r(){}var a,o,s,l=e.a.s,c=e.a.getConfiguration();return $n(t,l,c.manifest.retryParameters,i).then(function(e){return Oo(this),s=new e,s.configure(c.manifest),s.start(t,{networkingEngine:l,filterAllPeriods:this.j.bind(this),filterNewPeriod:this.m.bind(this),onTimelineRegionAdded:function(){},onEvent:function(){},onError:n})}.bind(e)).then(function(e){return Oo(this),a=e,o=new Se({Ya:l,onError:n,Tb:r,
onExpirationUpdated:function(){},onEvent:function(){}}),o.configure(c.drm),o.init(a,this.b.usePersistentLicense||!1)}.bind(e)).then(function(){return Oo(this),So(a)}.bind(e)).then(function(){return Oo(this),Ce(o)}.bind(e)).then(function(){return Oo(this),s.stop()}.bind(e)).then(function(){return Oo(this),{manifest:a,ed:o}}.bind(e)).catch(function(e){if(s)return s.stop().then(function(){throw e});throw e})}function yo(e){return{trackSelectionCallback:e.u.bind(e),progressCallback:function(e,t){
if(e||t)return null},usePersistentLicense:!0}}function bo(t){if(null==e.indexedDB)return Promise.reject(new g(2,9,9e3));if(t.g)return Promise.resolve();var n=t.a.s,i=t.a.getConfiguration().streaming.retryParameters;return xa().then(function(e){this.g=e,this.c=new fa(e,n,i),va(this.c,function(e,t){var n=this.s;n.size=t,this.b.progressCallback(n,e)}.bind(this))}.bind(t))}function Io(e){var t=e.f?e.f.destroy():Promise.resolve();return e.f=null,e.h=null,e.l=!1,e.i=null,t}function So(e){
var t=e.periods.map(function(e){return e.variants}).reduce(k,[]).map(function(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t}).reduce(k,[]).filter(z);return e=e.periods.map(function(e){return e.textStreams}).reduce(k,[]),t.push.apply(t,e),Promise.all(t.map(function(e){return e.createSegmentIndex()}))}function Mo(e,t,n){var i=e.h.periods.map(e.w.bind(e)),r=e.f.b,a=Oe(e.f);if(r&&e.b.usePersistentLicense){if(!a.length)throw new g(2,9,9007,t);r.initData=[]}return{
originalManifestUri:t,duration:e.h.presentationTimeline.S(),size:0,expiration:e.f.ub(),periods:i,sessionIds:e.b.usePersistentLicense?a:[],drmInfo:r,appMetadata:n}}function Do(e,t,n,i){var r={id:t.id,primary:t.primary,presentationTimeOffset:t.presentationTimeOffset||0,contentType:t.type,mimeType:t.mimeType,codecs:t.codecs,frameRate:t.frameRate,kind:t.kind,language:t.language,label:t.label,width:t.width||null,height:t.height||null,initSegmentKey:null,encrypted:t.encrypted,keyId:t.keyId,
segments:[],variantIds:[]};return null!=i&&r.variantIds.push(i),i=e.h.presentationTimeline.Ja(),Co(t,i,function(e){var i=e.startTime,a=e.endTime;ga(this.c,t.type,e,(a-i)*n/8,function(e){r.segments.push({startTime:i,endTime:a,dataKey:e})})}.bind(e)),(i=t.initSegmentReference)&&ga(e.c,t.contentType,i,0,function(e){r.initSegmentKey=e}),r}function Co(e,t,n){t=e.findSegmentPosition(t);for(var i=null==t?null:e.getSegmentReference(t);i;)n(i),i=e.getSegmentReference(++t)}function Oo(e){
if(!e.a)throw new g(2,9,9002)}function jo(e){var t=[];return e.periods.forEach(function(e){e.streams.forEach(function(e){null!=e.initSegmentKey&&t.push(e.initSegmentKey),e.segments.forEach(function(e){t.push(e.dataKey)})})}),t}function Po(e){Hl.push(e)}function wo(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"==typeof Event)var n=new Event(t,e);else n=document.createEvent("Event"),n.initEvent(t,e.bubbles,e.cancelable);e.target.dispatchEvent(n)}function To(e,t,n){
if("input"==e)switch(this.type){case"range":e="change"}Yl.call(this,e,t,n)}function Eo(e){this.f=[],this.b=[],this.a=[],(new Mn).W("pssh",this.c.bind(this)).parse(e.buffer)}function xo(e,t){try{var n=new No(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function No(e,t){this.keySystem=e;for(var n=!1,i=0;i<t.length;++i){var r=t[i],a={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:r.initDataTypes,
sessionTypes:["temporary"],label:r.label},o=!1;if(r.audioCapabilities)for(var s=0;s<r.audioCapabilities.length;++s){var l=r.audioCapabilities[s];if(l.contentType){o=!0;var c=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,c)&&(a.audioCapabilities.push(l),n=!0)}}if(r.videoCapabilities)for(s=0;s<r.videoCapabilities.length;++s)l=r.videoCapabilities[s],l.contentType&&(o=!0,c=l.contentType.split(";")[0],
MSMediaKeys.isTypeSupported(this.keySystem,c)&&(a.videoCapabilities.push(l),n=!0));if(o||(n=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==r.persistentState&&(n=!1),n)return void(this.a=a)}throw n=Error("Unsupported keySystem"),n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Ao(e){var t=this.mediaKeys;return t&&t!=e&&ko(t,null),delete this.mediaKeys,(this.mediaKeys=e)?ko(e,this):Promise.resolve()}function Lo(e){this.a=new MSMediaKeys(e),
this.b=new K}function ko(e,t){function n(){t.msSetMediaKeys(i.a),t.removeEventListener("loadedmetadata",n)}if(X(e.b),!t)return Promise.resolve();q(e.b,t,"msneedkey",Ro);var i=e;try{return 1<=t.readyState?t.msSetMediaKeys(e.a):t.addEventListener("loadedmetadata",n),Promise.resolve()}catch(e){return Promise.reject(e)}}function _o(e){zt.call(this),this.c=null,this.g=e,this.b=this.a=null,this.f=new K,this.sessionId="",this.expiration=NaN,this.closed=new j,this.keyStatuses=new Bo}function Ro(e){
var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="cenc";var n=e.initData;if(n){var i=new Eo(n);if(1>=i.a.length)e=n;else{var r=[];for(e=0;e<i.a.length;e++)r.push(n.subarray(i.a[e].start,i.a[e].end+1));for(n=Q(r,zo),e=i=0;e<n.length;e++)i+=n[e].length;for(i=new Uint8Array(i),e=r=0;e<n.length;e++)i.set(n[e],r),r+=n[e].length;e=i}}else e=n;t.initData=e,this.dispatchEvent(t)}function zo(e,t){return be(e,t)}function Uo(e,t){var n=e.keyStatuses
;n.size=void 0==t?0:1,n.a=t,e.dispatchEvent(new $("keystatuseschange"))}function Bo(){this.size=0,this.a=void 0}function Vo(){return Promise.reject(Error("The key system specified is not supported."))}function Fo(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Qo(){throw new TypeError("Illegal constructor.")}function Ho(){throw new TypeError("Illegal constructor.")}function Yo(t){Gl=t,Kl=new Uint8Array([0]).buffer,
navigator.requestMediaKeySystemAccess=Go,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Ko,e.MediaKeys=Zo,e.MediaKeySystemAccess=qo}function Wo(e){var t=Gl;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function Go(e,t){try{var n=new qo(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Ko(e){var t=this.mediaKeys;return t&&t!=e&&Xo(t,null),delete this.mediaKeys,
(this.mediaKeys=e)&&Xo(e,this),Promise.resolve()}function qo(e,t){this.a=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.a="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video");for(var a=0;a<t.length;++a){var o=t[a],s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},l=!1
;if(o.audioCapabilities)for(var c=0;c<o.audioCapabilities.length;++c){var u=o.audioCapabilities[c];if(u.contentType){l=!0;var d=u.contentType.split(";")[0];r.canPlayType(d,this.a)&&(s.audioCapabilities.push(u),i=!0)}}if(o.videoCapabilities)for(c=0;c<o.videoCapabilities.length;++c)u=o.videoCapabilities[c],u.contentType&&(l=!0,r.canPlayType(u.contentType,this.a)&&(s.videoCapabilities.push(u),i=!0));if(l||(i=r.canPlayType("video/mp4",this.a)||r.canPlayType("video/webm",this.a)),
"required"==o.persistentState&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):i=!1),i)return void(this.b=s)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),n=Error(n),n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Zo(e){this.g=e,this.b=null,this.a=new K,this.c=[],this.f={}}function Xo(e,t){e.b=t,X(e.a);var n=Gl;t&&(q(e.a,t,n+"needkey",e.ae.bind(e)),
q(e.a,t,n+"keymessage",e.$d.bind(e)),q(e.a,t,n+"keyadded",e.Yd.bind(e)),q(e.a,t,n+"keyerror",e.Zd.bind(e)))}function Jo(e,t){var n=e.f[t];return n||((n=e.c.shift())?(n.sessionId=t,e.f[t]=n):null)}function $o(e,t,n){zt.call(this),this.f=e,this.h=!1,this.a=this.b=null,this.c=t,this.g=n,this.sessionId="",this.expiration=NaN,this.closed=new j,this.keyStatuses=new ns}function es(e,t,n){if(e.h)return Promise.reject(Error("The session is already initialized."));e.h=!0;try{
if("persistent-license"==e.g)if(n)var i=new Uint8Array(ue("LOAD_SESSION|"+n));else{var r=ue("PERSISTENT|"),a=new Uint8Array(r.byteLength+t.byteLength);a.set(new Uint8Array(r),0),a.set(new Uint8Array(t),r.byteLength),i=a}else i=new Uint8Array(t)}catch(e){return Promise.reject(e)}e.b=new j;var o=Wo("generateKeyRequest");try{e.f[o](e.c,i)}catch(t){if("InvalidStateError"!=t.name)return e.b=null,Promise.reject(t);setTimeout(function(){try{this.f[o](this.c,i)}catch(e){this.b.reject(e),this.b=null}
}.bind(e),10)}return e.b}function ts(e,t){var n=e.keyStatuses;n.size=void 0==t?0:1,n.a=t,e.dispatchEvent(new $("keystatuseschange"))}function ns(){this.size=0,this.a=void 0}function is(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,arguments);return t.abort=function(){},t}}function rs(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function as(){
var e=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(){for(var t=0,n=0;n<this.sourceBuffers.length;++n){var i=this.sourceBuffers[n];i=i.buffered.end(i.buffered.length-1),t=Math.max(t,i)}if(!isNaN(this.duration)&&t<this.duration)for(this.qc=!0,n=0;n<this.sourceBuffers.length;++n)i=this.sourceBuffers[n],i.mc=!1;return e.apply(this,arguments)};var t=!1,n=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var e=n.apply(this,arguments)
;return e.mediaSource_=this,e.addEventListener("updateend",os,!1),t||(this.addEventListener("sourceclose",ss,!1),t=!0),e}}function os(e){var t=e.target,n=t.mediaSource_;if(n.qc){for(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),t.mc=!0,e=0;e<n.sourceBuffers.length;++e)if(0==n.sourceBuffers[e].mc)return;n.qc=!1}}function ss(e){e=e.target;for(var t=0;t<e.sourceBuffers.length;++t)e.sourceBuffers[t].removeEventListener("updateend",os,!1)
;e.removeEventListener("sourceclose",ss,!1)}function ls(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"mp2t"!=t.split(/ *; */)[0].split("/")[1]&&e(t)}}function cs(){var e=MediaSource.isTypeSupported,t=/^dv(?:he|av)\./;MediaSource.isTypeSupported=function(n){for(var i=n.split(/ *; */),r=i[0],a={},o=1;o<i.length;++o){var s=i[o].split("="),l=s[0];s=s[1].replace(/"(.*)"/,"$1"),a[l]=s}if(!(i=a.codecs))return e(n);var c=!1,u=!1;n=i.split(",").filter(function(e){
return t.test(e)?(u=!0,!1):(/^(hev|hvc)1\.2/.test(e)&&(c=!0),!0)}),u&&(c=!1),a.codecs=n.join(","),c&&(a.eotf="smpte2084");for(l in a)s=a[l],r+="; "+l+'="'+s+'"';return cast.__platform__.canDisplayType(r)}}function us(e){if(this.c=[],this.b=[],this.V=ql,e)try{e(this.ma.bind(this),this.a.bind(this))}catch(e){this.a(e)}}function ds(e){var t=new us;return t.ma(void 0),t.then(function(){return e})}function ps(e){var t=new us;return t.a(e),t}function hs(e){function t(e,t,n){e.V==ql&&(r[t]=n,
++i==r.length&&e.ma(r))}var n=new us;if(!e.length)return n.ma([]),n;for(var i=0,r=Array(e.length),a=n.a.bind(n),o=0;o<e.length;++o)e[o]&&e[o].then?e[o].then(t.bind(null,n,o),a):t(n,o,e[o]);return n}function fs(e){for(var t=new us,n=t.ma.bind(t),i=t.a.bind(t),r=0;r<e.length;++r)e[r]&&e[r].then?e[r].then(n,i):n(e[r]);return t}function vs(e,t,n){Xl.push(function(){if(n&&"function"==typeof n){try{var e=n(this.f)}catch(e){return void t.a(e)}try{var i=e&&e.then}catch(e){return void t.a(e)}
e instanceof us?e==t?t.a(new TypeError("Chaining cycle detected")):e.then(t.ma.bind(t),t.a.bind(t)):i?gs(e,i,t):t.ma(e)}else 1==this.V?t.ma(this.f):t.a(this.f)}.bind(e)),null==Zl&&(Zl=ys(ms))}function gs(e,t,n){try{var i=!1;t.call(e,function(e){if(!i){i=!0;try{var t=e&&e.then}catch(e){return void n.a(e)}t?gs(e,t,n):n.ma(e)}},n.a.bind(n))}catch(e){n.a(e)}}function ms(){for(;Xl.length;){null!=Zl&&(bs(Zl),Zl=null);var e=Xl;Xl=[];for(var t=0;t<e.length;++t)e[t]()}}function ys(){return 0}
function bs(){}function Is(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function Ss(t,n,i){return new e.TextTrackCue(t,n,i)}function Ms(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function Ds(){}function Cs(e){var t=[];if(!e)return t;for(var n=e.childNodes,i=0;i<n.length;i++){var r="span"==n[i].nodeName&&"p"==e.nodeName
;n[i].nodeType!=Node.ELEMENT_NODE||"br"==n[i].nodeName||r||(r=Cs(n[i]),t=t.concat(r))}return t.length||t.push(e),t}function Os(e,t){for(var n=e.childNodes,i=0;i<n.length;i++)if("br"==n[i].nodeName&&0<i)n[i-1].textContent+="\n";else if(0<n[i].childNodes.length)Os(n[i],t);else if(t){var r=n[i].textContent.trim();r=r.replace(/\s+/g," "),n[i].textContent=r}}function js(e,t){for(var n=t.split(" "),i=0;i<n.length;i++)switch(n[i]){case"underline":
0>e.textDecoration.indexOf("underline")&&e.textDecoration.push("underline");break;case"noUnderline":0<=e.textDecoration.indexOf("underline")&&Y(e.textDecoration,"underline");break;case"lineThrough":0>e.textDecoration.indexOf("lineThrough")&&e.textDecoration.push("lineThrough");break;case"noLineThrough":0<=e.textDecoration.indexOf("lineThrough")&&Y(e.textDecoration,"lineThrough");break;case"overline":0>e.textDecoration.indexOf("overline")&&e.textDecoration.push("overline");break;case"noOverline":
0<=e.textDecoration.indexOf("overline")&&Y(e.textDecoration,"overline")}}function Ps(e,t,n,i){return(e=Ts(e,n,i))?e:ws(t,n,i)}function ws(e,t,n){for(var i=Cs(e),r=0;r<i.length;r++){var a=i[r].getAttribute(n);if(a)return a}return(e=Es(e,"style",t))?e.getAttribute(n):null}function Ts(e,t,n){return(e=Es(e,"style",t))?e.getAttribute(n):null}function Es(e,t,n){if(!e||1>n.length)return null;var i=null,r=e;for(e=null;r&&!(e=r.getAttribute(t))&&(r=r.parentNode)instanceof Element;);
if(t=e)for(e=0;e<n.length;e++)if(n[e].getAttribute("xml:id")==t){i=n[e];break}return i}function xs(e,t){var n=null;if(Jl.test(e)){n=Jl.exec(e);var i=Number(n[1]),r=Number(n[2]),a=Number(n[3]),o=Number(n[4]);o+=(Number(n[5])||0)/t.b,a+=o/t.frameRate,n=a+60*r+3600*i}else $l.test(e)?n=Ns($l,e):ec.test(e)?n=Ns(ec,e):tc.test(e)?(n=tc.exec(e),n=Number(n[1])/t.frameRate):nc.test(e)?(n=nc.exec(e),n=Number(n[1])/t.a):ic.test(e)&&(n=Ns(ic,e));return n}function Ns(e,t){var n=e.exec(t)
;return null==n||""==n[0]?null:(Number(n[4])||0)/1e3+(Number(n[3])||0)+60*(Number(n[2])||0)+3600*(Number(n[1])||0)}function As(e,t,n,i){this.frameRate=Number(e)||30,this.b=Number(t)||1,this.a=Number(i),0==this.a&&(this.a=e?this.frameRate*this.b:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=e[1]/e[2])}function Ls(){this.a=new Ds}function ks(){}function _s(e,t){var n;(n=/^align:(start|middle|center|end|left|right)$/.exec(t))?(n=n[1],
e.textAlign="middle"==n?Nl:Al[n.toUpperCase()]):(n=/^vertical:(lr|rl)$/.exec(t))?e.writingDirection="lr"==n[1]?2:3:(n=/^size:([\d.]+)%$/.exec(t))?e.size=Number(n[1]):(n=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(t))?(e.position=Number(n[1]),n[2]&&(n=n[2],e.positionAlign="line-left"==n||"start"==n?"line-left":"line-right"==n||"end"==n?"line-right":"center")):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),
n[2]&&(e.lineAlign=Ul[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=Rl,e.line=Number(n[1]),n[2]&&(e.lineAlign=Ul[n[2].toUpperCase()]))}function Rs(e){if(null==(e=ji(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function zs(){this.a=null}function Us(e,t,n){var i,r,a;return(new Mn).B("payl",On(function(e){i=se(e)
})).B("iden",On(function(e){r=se(e)})).B("sttg",On(function(e){a=se(e)})).parse(e),i?Bs(i,r,a,t,n):null}function Bs(e,t,n,i,r){if(e=new Ra(i,r,e),t&&(e.id=t),n)for(t=new Oi(n),n=Pi(t);n;)_s(e,n),ji(t,/[ \t]+/gm),n=Pi(t);return e}var Vs,Fs="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},Qs=void 0!==e&&e===this?this:void 0!==i&&null!=i?i:this,Hs=function(){var e=0;return function(t){
return"jscomp_symbol_"+(t||"")+e++}}();s("Promise",function(e){function t(e){this.V=0,this.f=void 0,this.a=[];var t=this.c();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.a=null}function i(e){return e instanceof t?e:new t(function(t){t(e)})}if(e)return e;n.prototype.b=function(e){null==this.a&&(this.a=[],this.f()),this.a.push(e)},n.prototype.f=function(){var e=this;this.c(function(){e.h()})};var r=Qs.setTimeout;n.prototype.c=function(e){r(e,0)},n.prototype.h=function(){
for(;this.a&&this.a.length;){var e=this.a;this.a=[];for(var t=0;t<e.length;++t){var n=e[t];delete e[t];try{n()}catch(e){this.g(e)}}}this.a=null},n.prototype.g=function(e){this.c(function(){throw e})},t.prototype.c=function(){function e(e){return function(i){n||(n=!0,e.call(t,i))}}var t=this,n=!1;return{resolve:e(this.l),reject:e(this.b)}},t.prototype.l=function(e){if(e===this)this.b(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.m(e);else{e:switch(typeof e){
case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.j(e):this.g(e)}},t.prototype.j=function(e){var t=void 0;try{t=e.then}catch(e){return void this.b(e)}"function"==typeof t?this.s(t,e):this.g(e)},t.prototype.b=function(e){this.h(2,e)},t.prototype.g=function(e){this.h(1,e)},t.prototype.h=function(e,t){if(0!=this.V)throw Error("Cannot settle("+e+", "+t|"): Promise already settled in state"+this.V);this.V=e,this.f=t,this.i()},t.prototype.i=function(){if(null!=this.a){
for(var e=this.a,t=0;t<e.length;++t)e[t].call(),e[t]=null;this.a=null}};var a=new n;return t.prototype.m=function(e){var t=this.c();e.rb(t.resolve,t.reject)},t.prototype.s=function(e,t){var n=this.c();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function i(e,t){return"function"==typeof e?function(t){try{r(e(t))}catch(e){a(e)}}:t}var r,a,o=new t(function(e,t){r=e,a=t});return this.rb(i(e,r),i(n,a)),o},t.prototype.catch=function(e){
return this.then(void 0,e)},t.prototype.rb=function(e,t){function n(){switch(i.V){case 1:e(i.f);break;case 2:t(i.f);break;default:throw Error("Unexpected state: "+i.V)}}var i=this;null==this.a?a.b(n):this.a.push(function(){a.b(n)})},t.resolve=i,t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=o(e),a=r.next();!a.done;a=r.next())i(a.value).rb(t,n)})},t.all=function(e){var n=o(e),r=n.next();return r.done?i([]):new t(function(e,t){
var a=[],o=0;do{a.push(void 0),o++,i(r.value).rb(function(t){return function(n){a[t]=n,0==--o&&e(a)}}(a.length-1),t),r=n.next()}while(!r.done)})},t}),s("Array.prototype.find",function(e){return e||function(e,t){e:{var n=this;n instanceof String&&(n=String(n));for(var i=n.length,r=0;r<i;r++){var a=n[r];if(e.call(t,a,r,n)){n=a;break e}}n=void 0}return n}});var Ys=this;Ys.Ye=!0,h.prototype.getBandwidthEstimate=function(e){return 128e3>this.a?e:Math.min(p(this.b),p(this.c))},
e.console&&e.console.log.bind&&(f=console.warn.bind(console)),l("shaka.util.Error",g),g.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")},g.Severity={RECOVERABLE:1,CRITICAL:2},g.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9},g.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,
INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,
WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,
DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,
HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,
ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,LOAD_INTERRUPTED:7e3,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,
STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,CONTENT_UNSUPPORTED_BY_BROWSER:9009,UNSUPPORTED_UPGRADE_REQUEST:9010};var Ws=/^(?:([^:\/?#.]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/#?]*?)(?::([0-9]+))?(?=[\/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Vs=m.prototype,Vs.fa="",Vs.Aa="",Vs.ja="",Vs.Oa=null,Vs.Y="",Vs.va="",Vs.toString=function(){var e=[],t=this.fa;if(t&&e.push(M(t,Gs,!0),":"),t=this.ja){e.push("//");var n=this.Aa;n&&e.push(M(n,Gs,!0),"@"),
e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t=this.Oa,null!=t&&e.push(":",String(t))}return(t=this.Y)&&(this.ja&&"/"!=t.charAt(0)&&e.push("/"),e.push(M(t,"/"==t.charAt(0)?qs:Ks,!0))),(t=this.a.toString())&&e.push("?",t),(t=this.va)&&e.push("#",M(t,Xs)),e.join("")},Vs.resolve=function(e){var t=new m(this);"data"===t.fa&&(t=new m);var n=!!e.fa;n?y(t,e.fa):n=!!e.Aa,n?t.Aa=e.Aa:n=!!e.ja,n?t.ja=e.ja:n=null!=e.Oa;var i=e.Y;if(n)b(t,e.Oa);else if(n=!!e.Y){
if("/"!=i.charAt(0))if(this.ja&&!this.Y)i="/"+i;else{var r=t.Y.lastIndexOf("/");-1!=r&&(i=t.Y.substr(0,r+1)+i)}if(".."==i||"."==i)i="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var a=[],o=0;o<i.length;){var s=i[o++];"."==s?r&&o==i.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),r&&o==i.length&&a.push("")):(a.push(s),r=!0)}i=a.join("/")}}return n?t.Y=i:n=""!==e.a.toString(),n?I(t,O(e.a)):n=!!e.va,n&&(t.va=e.va),t}
;var Gs=/[#\/\?@]/g,Ks=/[#\?:]/g,qs=/[#\?]/g,Zs=/[#\?@]/g,Xs=/#/g;C.prototype.a=null,C.prototype.c=null,C.prototype.add=function(e,t){if(!this.a&&(this.a={},this.c=0,this.b))for(var n=this.b.split("&"),i=0;i<n.length;i++){var r=n[i].indexOf("="),a=null;if(0<=r){var o=n[i].substring(0,r);a=n[i].substring(r+1)}else o=n[i];o=decodeURIComponent(o.replace(/\+/g," ")),a=a||"",this.add(o,decodeURIComponent(a.replace(/\+/g," ")))}return this.b=null,
(n=this.a.hasOwnProperty(e)&&this.a[e])||(this.a[e]=n=[]),n.push(t),this.c++,this},C.prototype.toString=function(){if(this.b)return this.b;if(!this.a)return"";var e,t=[];for(e in this.a)for(var n=encodeURIComponent(e),i=this.a[e],r=0;r<i.length;r++){var a=n;""!==i[r]&&(a+="="+encodeURIComponent(i[r])),t.push(a)}return this.b=t.join("&")},j.prototype.resolve=function(){},j.prototype.reject=function(){},l("shaka.net.NetworkingEngine",U),U.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3},
U.PluginPriority={Ze:1,af:2,We:3};var Js={};U.registerScheme=B,U.unregisterScheme=function(e){delete Js[e]},U.prototype.le=function(e){this.b.push(e)},U.prototype.registerRequestFilter=U.prototype.le,U.prototype.Pe=function(e){var t=this.b;0<=(e=t.indexOf(e))&&t.splice(e,1)},U.prototype.unregisterRequestFilter=U.prototype.Pe,U.prototype.bd=function(){this.b=[]},U.prototype.clearAllRequestFilters=U.prototype.bd,U.prototype.me=function(e){this.c.push(e)},
U.prototype.registerResponseFilter=U.prototype.me,U.prototype.Qe=function(e){var t=this.c;0<=(e=t.indexOf(e))&&t.splice(e,1)},U.prototype.unregisterResponseFilter=U.prototype.Qe,U.prototype.cd=function(){this.c=[]},U.prototype.clearAllResponseFilters=U.prototype.cd,U.prototype.destroy=function(){this.f=!0,this.b=[],this.c=[];for(var e=[],t=0;t<this.a.length;++t)e.push(this.a[t].catch(_));return Promise.all(e)},U.prototype.destroy=U.prototype.destroy,U.prototype.request=function(e,t,n){
var i=n||function(){return!1};if(this.f)return Promise.reject();t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?A(t.retryParameters):T(),t.uris=A(t.uris);var r=Date.now(),a=Promise.resolve();return this.b.forEach(function(n){a=a.then(n.bind(null,e,t))}),a=a.catch(function(e){throw new g(2,1,1006,e)}),a=a.then(function(){var a=Date.now()-r,o=new P(t.retryParameters,!1,n);return w(o).then(function(){return F(this,e,t,o,0,a,i)}.bind(this))}.bind(this)),
this.a.push(a),a.then(function(t){return 0<=this.a.indexOf(a)&&this.a.splice(this.a.indexOf(a),1),this.g&&!t.fromCache&&1==e&&this.g(t.timeMs,t.data.byteLength),t}.bind(this)).catch(function(e){return e&&(e.severity=2),0<=this.a.indexOf(a)&&this.a.splice(this.a.indexOf(a),1),Promise.reject(e)}.bind(this))},U.prototype.request=U.prototype.request,G.prototype.push=function(e,t){this.a.hasOwnProperty(e)?this.a[e].push(t):this.a[e]=[t]},G.prototype.get=function(e){return(e=this.a[e])?e.slice():null
},G.prototype.remove=function(e,t){var n=this.a[e];if(n)for(var i=0;i<n.length;++i)n[i]==t&&(n.splice(i,1),--i)},K.prototype.destroy=function(){return X(this),this.a=null,Promise.resolve()},K.prototype.ia=function(e,t){if(this.a)for(var n=this.a.get(t)||[],i=0;i<n.length;++i){var r=n[i];r.target==e&&(r.ia(),this.a.remove(t,r))}},J.prototype.ia=function(){this.target.removeEventListener(this.type,this.a,!1),this.a=this.target=null},$.prototype.preventDefault=function(){
this.cancelable&&(this.defaultPrevented=!0)},$.prototype.stopImmediatePropagation=function(){this.a=!0},$.prototype.stopPropagation=function(){};var $s=1/15,el={codecs:"codecs",frameRate:"framerate",bandwidth:"bitrate",width:"width",height:"height",channelsCount:"channels"};l("shaka.util.StringUtils.fromUTF8",se),l("shaka.util.StringUtils.fromUTF16",le),l("shaka.util.StringUtils.fromBytesAutoDetect",ce),l("shaka.util.StringUtils.toUTF8",ue),pe.prototype.cancel=function(){
null!=this.a&&(clearTimeout(this.a),this.a=null)},l("shaka.util.Uint8ArrayUtils.toBase64",ve),l("shaka.util.Uint8ArrayUtils.fromBase64",ge),l("shaka.util.Uint8ArrayUtils.fromHex",me),l("shaka.util.Uint8ArrayUtils.toHex",ye),l("shaka.util.Uint8ArrayUtils.equal",be),l("shaka.util.Uint8ArrayUtils.concat",Ie),Vs=Se.prototype,Vs.destroy=function(){this.c=!0;var e=[];return this.a.forEach(function(t){t=t.ga.close().catch(_);var n=new Promise(function(e){setTimeout(e,1e3)});e.push(Promise.race([t,n]))
}),this.i.reject(),this.g&&e.push(this.g.destroy()),this.l&&e.push(this.l.setMediaKeys(null).catch(_)),this.w&&(this.w.cancel(),this.w=null),this.I&&(this.I.cancel(),this.I=null),this.g=this.l=this.j=this.u=this.b=null,this.a=[],this.m=[],this.s=this.h=this.f=null,Promise.all(e)},Vs.configure=function(e){this.f=e},Vs.init=function(e,t){var n={},i=[];return this.da=t,this.m=e.offlineSessionIds,je(this,e,t||0<e.offlineSessionIds.length,n,i),i.length?Pe(this,n,i):(this.L=!0,Promise.resolve())},
Vs.keySystem=function(){return this.b?this.b.keySystem:""},Vs.ub=function(){var e=this.a.map(function(e){return e=e.ga.expiration,isNaN(e)?1/0:e});return Math.min.apply(Math,e)},Vs.Cd=function(e){for(var t=new Uint8Array(e.initData),n=0;n<this.a.length;++n)if(be(t,this.a[n].initData))return;Le(this,e.initDataType,t)},Vs.Cc=function(e){this.f.delayLicenseRequestUntilPlayed&&this.l.paused&&!this.ca?this.K.push(e):ke(this,e)},Vs.yc=function(e){e=e.target;var t
;for(t=0;t<this.a.length&&this.a[t].ga!=e;++t);if(t!=this.a.length){var n=!1;e.keyStatuses.forEach(function(e,i){if("string"==typeof i){var r=i;i=e,e=r}if("com.microsoft.playready"==this.b.keySystem&&16==i.byteLength){r=new DataView(i);var a=r.getUint32(0,!0),o=r.getUint16(4,!0),s=r.getUint16(6,!0);r.setUint32(0,a,!1),r.setUint16(4,o,!1),r.setUint16(6,s,!1)}"com.microsoft.playready"==this.b.keySystem&&"status-pending"==e&&(e="usable"),"status-pending"!=e&&(this.a[t].loaded=!0,
this.a.every(function(e){return e.loaded})&&this.i.resolve()),"expired"==e&&(n=!0),r=ye(new Uint8Array(i)),this.A[r]=e}.bind(this));var i=e.expiration-Date.now();(0>i||n&&1e3>i)&&!this.a[t].na&&(this.a.splice(t,1),e.close()),he(this.I,.5)}},Vs.ke=function(){function e(e,t){return"expired"==t}!ne(this.A)&&re(this.A,e)&&this.h(new g(2,6,6014)),this.s.Tb(this.A)},Vs.Nd=function(){for(var e=0;e<this.K.length;e++)ke(this,this.K[e]);this.ca=!0,this.K=[]},Vs.ie=function(){this.a.forEach(function(e){
var t=e.Sb,n=e.ga.expiration;isNaN(n)&&(n=1/0),n!=t&&(this.s.onExpirationUpdated(e.ga.sessionId,n),e.Sb=n)}.bind(this))},He.prototype.destroy=function(){return this.a.dispose(),this.a=null,Promise.resolve()},He.prototype.g=function(e){var t=new Uint8Array(e.data.byteLength+e.initSegment.byteLength);t.set(e.initSegment,0),t.set(e.data,e.initSegment.byteLength),this.c.push(t)},He.prototype.f=function(){var e=Ie.apply(null,this.c);this.b.resolve(e)};var tl={}
;l("shaka.text.TextEngine.registerParser",function(e,t){tl[e]=t}),l("shaka.text.TextEngine.unregisterParser",function(e){delete tl[e]}),Ge.prototype.destroy=function(){return this.f=this.c=null,Promise.resolve()},Ge.prototype.ze=function(e){this.f=e},Ge.prototype.setDisplayer=Ge.prototype.ze,Ge.prototype.Kb=function(e){var t={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.c.parseMedia(new Uint8Array(e),t)[0].startTime}catch(e){throw new g(2,2,2009,e)}},
Ge.prototype.remove=function(e,t){return Promise.resolve().then(function(){!this.f||!this.f.remove(e,t)||null==this.a||t<=this.a||e>=this.b||(e<=this.a&&t>=this.b?this.a=this.b=null:e<=this.a&&t<this.b?this.a=t:e>this.a&&t>=this.b&&(this.b=e))}.bind(this))},Vs=qe.prototype,Vs.destroy=function(){this.j=!0;var e,t=[];for(e in this.c){var n=this.c[e],i=n[0];for(this.c[e]=n.slice(0,1),i&&t.push(i.p.catch(_)),i=1;i<n.length;++i)n[i].p.catch(_),n[i].p.reject()}this.a&&t.push(this.a.destroy())
;for(e in this.h)t.push(this.h[e].destroy());return Promise.all(t).then(function(){this.i.destroy(),this.l=this.a=this.f=this.g=this.i=null,this.b={},this.h={},this.c={}}.bind(this))},Vs.init=function(t){for(var n in t){var i=t[n];i=oe(i.mimeType,i.codecs),"text"==n?Xe(this,i):(!MediaSource.isTypeSupported(i)&&e.muxjs&&"mp2t"==i.split(";")[0].split("/")[1]&&MediaSource.isTypeSupported(Ye(n,i))&&(this.h[n]=new He,i=Ye(n,i)),i=this.f.addSourceBuffer(i),q(this.i,i,"error",this.Le.bind(this,n)),
q(this.i,i,"updateend",this.Ma.bind(this,n)),this.b[n]=i,this.c[n]=[])}},Vs.Gb=function(){var e=this.a&&null!=this.a.a?[{start:this.a.a,end:this.a.b}]:[];return{total:Qe(this.g.buffered),audio:Qe($e(this,"audio")),video:Qe($e(this,"video")),text:e}},Vs.remove=function(e,t,n){return"text"==e?this.a.remove(t,n):it(this,e,this.Sc.bind(this,e,t,n))},Vs.endOfStream=function(e){return rt(this,function(){e?this.f.endOfStream(e):this.f.endOfStream()}.bind(this))},Vs.ha=function(e){
return rt(this,function(){this.f.duration=e}.bind(this))},Vs.S=function(){return this.f.duration},Vs.Rc=function(e,t){this.b[e].appendBuffer(t)},Vs.Sc=function(e,t,n){n<=t?this.Ma(e):this.b[e].remove(t,n)},Vs.Yc=function(e){var t=this.b[e].appendWindowStart,n=this.b[e].appendWindowEnd;this.b[e].abort(),this.b[e].appendWindowStart=t,this.b[e].appendWindowEnd=n,this.Ma(e)},Vs.gd=function(e){this.g.currentTime-=.001,this.Ma(e)},Vs.Be=function(e,t){0>t&&(t+=.001),this.b[e].timestampOffset=t,
this.Ma(e)},Vs.ye=function(e,t,n){this.b[e].appendWindowStart=0,this.b[e].appendWindowEnd=n,this.b[e].appendWindowStart=t,this.Ma(e)},Vs.Le=function(e){this.c[e][0].p.reject(new g(2,3,3014,this.g.error?this.g.error.code:0))},Vs.Ma=function(e){var t=this.c[e][0];t&&(t.p.resolve(),at(this,e))};var nl=1,il=2,rl={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",
bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",
ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",
nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",
tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};l("shaka.abr.SimpleAbrManager",Tt),Tt.prototype.stop=function(){this.h=null,this.c=!1,this.g=[],this.f=null},Tt.prototype.stop=Tt.prototype.stop,Tt.prototype.init=function(e){this.h=e},Tt.prototype.init=Tt.prototype.init,Tt.prototype.chooseVariant=function(){
var e=Et(this.a.restrictions,this.g),t=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);if(this.g.length&&!e.length)throw new g(2,4,4012);for(var n=e[0]||null,i=0;i<e.length;++i){var r=e[i],a=(e[i+1]||{bandwidth:1/0}).bandwidth/this.a.bandwidthUpgradeTarget;t>=r.bandwidth/this.a.bandwidthDowngradeTarget&&t<=a&&(n=r)}return this.f=Date.now(),n},Tt.prototype.chooseVariant=Tt.prototype.chooseVariant,Tt.prototype.enable=function(){this.c=!0},Tt.prototype.enable=Tt.prototype.enable,
Tt.prototype.disable=function(){this.c=!1},Tt.prototype.disable=Tt.prototype.disable,Tt.prototype.segmentDownloaded=function(e,t){var n=this.b;if(!(16e3>t)){var i=8e3*t/e,r=e/1e3;n.a+=t,d(n.b,r,i),d(n.c,r,i)}if(null!=this.f&&this.c)e:{if(this.i){if(Date.now()-this.f<1e3*this.a.switchInterval)break e}else{if(!(128e3<=this.b.a))break e;this.i=!0}n=this.chooseVariant(),this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate),this.h(n)}},
Tt.prototype.segmentDownloaded=Tt.prototype.segmentDownloaded,Tt.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},Tt.prototype.getBandwidthEstimate=Tt.prototype.getBandwidthEstimate,Tt.prototype.setVariants=function(e){this.g=e},Tt.prototype.setVariants=Tt.prototype.setVariants,Tt.prototype.configure=function(e){this.a=e},Tt.prototype.configure=Tt.prototype.configure
;var al="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ol="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),sl=["loop","playbackRate"],ll=["pause","play"],cl="adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading".split(" "),ul={drmInfo:20,getAudioLanguages:2,
getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getManifestUri:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1},dl={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20
},pl=[["getConfiguration","configure"]],hl=[["isTextTrackVisible","setTextTrackVisibility"]],fl="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),vl=["load","unload"],gl=!1,ml=null;Vs=Lt.prototype,Vs.destroy=function(){return _t(this),ml&&kt(this),this.I=this.A=this.g=null,this.b=this.h=!1,this.m=this.l=this.f=this.c=this.a=this.i=null,Promise.resolve()},
Vs.X=function(){return this.b},Vs.Xb=function(){return this.w},Vs.init=function(){if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){delete e.__onGCastApiAvailable,this.h=!0,this.g();var t=new chrome.cast.SessionRequest(this.K);t=new chrome.cast.ApiConfig(t,this.xc.bind(this),this.Qd.bind(this),"origin_scoped"),chrome.cast.initialize(t,function(){},function(){}),gl&&setTimeout(this.g.bind(this),20),(t=ml)&&t.status!=chrome.cast.SessionStatus.STOPPED?this.xc(t):ml=null
}else e.__onGCastApiAvailable=function(e){e&&this.init()}.bind(this)},Vs.$b=function(e){this.i=e,this.b&&Rt({type:"appData",appData:this.i})},Vs.cast=function(e){return this.h?gl?this.b?Promise.reject(new g(1,8,8002)):(this.f=new j,chrome.cast.requestSession(this.Ub.bind(this,e),this.vc.bind(this)),this.f):Promise.reject(new g(1,8,8001)):Promise.reject(new g(1,8,8e3))},Vs.tb=function(){this.b&&(_t(this),ml&&(kt(this),ml.stop(function(){},function(){}),ml=null))},Vs.get=function(e,t){
if("video"==e){if(0<=ll.indexOf(t))return this.Hc.bind(this,e,t)}else if("player"==e){if(dl[t]&&!this.get("player","isLive")())return function(){};if(0<=fl.indexOf(t))return this.Hc.bind(this,e,t);if(0<=vl.indexOf(t))return this.oe.bind(this,e,t);if(ul[t])return this.Ec.bind(this,e,t)}return this.Ec(e,t)},Vs.set=function(e,t,n){this.a[e][t]=n,Rt({type:"set",targetName:e,property:t,value:n})},Vs.Ub=function(e,t){ml=t,t.addUpdateListener(this.l),
t.addMessageListener("urn:x-cast:com.google.shaka.v2",this.m),this.wc(),Rt({type:"init",initState:e,appData:this.i}),this.f.resolve()},Vs.vc=function(e){var t=8003;switch(e.code){case"cancel":t=8004;break;case"timeout":t=8005;break;case"receiver_unavailable":t=8006}this.f.reject(new g(2,8,t,e))},Vs.Ec=function(e,t){return this.a[e][t]},Vs.Hc=function(e,t){Rt({type:"call",targetName:e,methodName:t,args:Array.prototype.slice.call(arguments,2)})},Vs.oe=function(e,t){
var n=Array.prototype.slice.call(arguments,2),i=new j,r=this.s.toString();return this.s++,this.c[r]=i,Rt({type:"asyncCall",targetName:e,methodName:t,args:n,id:r}),i},Vs.xc=function(e){var t=this.u();this.f=new j,this.j=!0,this.Ub(t,e)},Vs.Qd=function(e){gl="available"==e,this.g()},Vs.wc=function(){var e=!!ml&&"connected"==ml.status;if(this.b&&!e){this.I();for(var t in this.a)this.a[t]={};_t(this)}this.w=(this.b=e)?ml.receiver.friendlyName:"",this.g()},Vs.Jd=function(e,t){var n=Nt(t)
;switch(n.type){case"event":var i=n.targetName,r=n.event;this.A(i,new $(r.type,r));break;case"update":r=n.update;for(i in r){n=this.a[i]||{};for(var a in r[i])n[a]=r[i][a]}this.j&&(this.L(),this.j=!1);break;case"asyncComplete":if(i=n.id,a=n.error,n=this.c[i],delete this.c[i],n)if(a){i=new g(a.severity,a.category,a.code);for(r in a)i[r]=a[r];n.reject(i)}else n.resolve()}},zt.prototype.addEventListener=function(e,t){this.Bb.push(e,t)},zt.prototype.removeEventListener=function(e,t){
this.Bb.remove(e,t)},zt.prototype.dispatchEvent=function(e){for(var t=this.Bb.get(e.type)||[],n=0;n<t.length;++n){e.target=this.jb,e.currentTarget=this.jb;var i=t[n];try{i.handleEvent?i.handleEvent(e):i.call(this,e)}catch(e){}if(e.a)break}return e.defaultPrevented},c(Ut,zt),l("shaka.cast.CastProxy",Ut),Ut.prototype.destroy=function(e){return e&&this.a&&this.a.tb(),e=[this.i?this.i.destroy():null,this.b?this.b.destroy():null,this.a?this.a.destroy():null],
this.a=this.i=this.j=this.h=this.b=this.c=null,Promise.all(e)},Ut.prototype.destroy=Ut.prototype.destroy,Ut.prototype.vd=function(){return this.h},Ut.prototype.getVideo=Ut.prototype.vd,Ut.prototype.nd=function(){return this.j},Ut.prototype.getPlayer=Ut.prototype.nd,Ut.prototype.Zc=function(){return!!this.a&&(this.a.h&&gl)},Ut.prototype.canCast=Ut.prototype.Zc,Ut.prototype.X=function(){return!!this.a&&this.a.X()},Ut.prototype.isCasting=Ut.prototype.X,Ut.prototype.Xb=function(){
return this.a?this.a.Xb():""},Ut.prototype.receiverName=Ut.prototype.Xb,Ut.prototype.cast=function(){var e=this.oc();return this.a.cast(e).then(function(){return this.b.zb()}.bind(this))},Ut.prototype.cast=Ut.prototype.cast,Ut.prototype.$b=function(e){this.a.$b(e)},Ut.prototype.setAppData=Ut.prototype.$b,Ut.prototype.Ne=function(){var e=this.a;if(e.b){var t=e.u();chrome.cast.requestSession(e.Ub.bind(e,t),e.vc.bind(e))}},Ut.prototype.suggestDisconnect=Ut.prototype.Ne,Ut.prototype.tb=function(){
this.a.tb()},Ut.prototype.forceDisconnect=Ut.prototype.tb,Vs=Ut.prototype,Vs.oc=function(){var e={video:{},player:{},playerAfterLoad:{},manifest:this.b.Ib(),startTime:null};return this.c.pause(),sl.forEach(function(t){e.video[t]=this.c[t]}.bind(this)),this.c.ended||(e.startTime=this.c.currentTime),pl.forEach(function(t){var n=t[1];t=this.b[t[0]](),e.player[n]=t}.bind(this)),hl.forEach(function(t){var n=t[1];t=this.b[t[0]](),e.playerAfterLoad[n]=t}.bind(this)),e},Vs.Ge=function(){
this.dispatchEvent(new $("caststatuschanged"))},Vs.He=function(){this.f.dispatchEvent(new $(this.h.paused?"pause":"play"))},Vs.Je=function(){pl.forEach(function(e){var t=e[1];e=this.a.get("player",e[0])(),this.b[t](e)}.bind(this));var e=this.a.get("player","getManifestUri")(),t=this.a.get("video","ended"),n=Promise.resolve(),i=this.c.autoplay,r=null;t||(r=this.a.get("video","currentTime")),e&&(this.c.autoplay=!1,n=this.b.load(e,r),n.catch(function(e){this.b.dispatchEvent(new $("error",{detail:e
}))}.bind(this)));var a={};sl.forEach(function(e){a[e]=this.a.get("video",e)}.bind(this)),n.then(function(){sl.forEach(function(e){this.c[e]=a[e]}.bind(this)),hl.forEach(function(e){var t=e[1];e=this.a.get("player",e[0])(),this.b[t](e)}.bind(this)),this.c.autoplay=i,e&&this.c.play()}.bind(this))},Vs.Te=function(e){if("addEventListener"==e)return this.f.addEventListener.bind(this.f);if("removeEventListener"==e)return this.f.removeEventListener.bind(this.f)
;if(this.a.X()&&0==Object.keys(this.a.a.video).length){var t=this.c[e];if("function"!=typeof t)return t}return this.a.X()?this.a.get("video",e):(t=this.c[e],"function"==typeof t&&(t=t.bind(this.c)),t)},Vs.Ve=function(e,t){this.a.X()?this.a.set("video",e,t):this.c[e]=t},Vs.Ue=function(e){this.a.X()||this.f.dispatchEvent(new $(e.type,e))},Vs.fe=function(e){
return"addEventListener"==e?this.g.addEventListener.bind(this.g):"removeEventListener"==e?this.g.removeEventListener.bind(this.g):"getMediaElement"==e?function(){return this.h}.bind(this):"getNetworkingEngine"==e?this.b.pc.bind(this.b):"getManifest"==e?this.a.X()?function(){return null}:this.b.Fa.bind(this.b):this.a.X()&&0==Object.keys(this.a.a.video).length&&ul[e]||!this.a.X()?(e=this.b[e],e.bind(this.b)):this.a.get("player",e)},Vs.ge=function(e){this.a.X()||this.g.dispatchEvent(e)},
Vs.Ie=function(e,t){this.a.X()&&("video"==e?this.f.dispatchEvent(t):"player"==e&&this.g.dispatchEvent(t))},c(Vt,zt),l("shaka.cast.CastReceiver",Vt),Vt.prototype.isConnected=function(){return this.m},Vt.prototype.isConnected=Vt.prototype.isConnected,Vt.prototype.xd=function(){return this.g},Vt.prototype.isIdle=Vt.prototype.xd,Vt.prototype.destroy=function(){var t=this.b?this.b.destroy():Promise.resolve();return null!=this.j&&e.clearTimeout(this.j),this.u=this.s=this.b=this.a=null,this.m=!1,
this.g=!0,this.j=this.h=this.c=null,t.then(function(){cast.receiver.CastReceiverManager.getInstance().stop()})},Vt.prototype.destroy=Vt.prototype.destroy,Vs=Vt.prototype,Vs.Bc=function(){this.f=0,this.i=!0,this.m=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Qt(this)},Vs.Fc=function(e,t){this.b&&(this.Vb(),Gt(this,{type:"event",targetName:e,event:t},this.c))},Vs.Vb=function(){null!=this.j&&e.clearTimeout(this.j),this.j=e.setTimeout(this.Vb.bind(this),500);var t={
video:{},player:{}};if(ol.forEach(function(e){t.video[e]=this.a[e]}.bind(this)),this.b.P())for(var n in dl){var i=dl[n];0==this.f%i&&(t.player[n]=this.b[n]())}for(n in ul)i=ul[n],0==this.f%i&&(t.player[n]=this.b[n]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),this.l&&(this.f+=1),Gt(this,{type:"update",update:t},this.c),Yt(this)},Vs.fd=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume()
;e&&Gt(this,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},this.c),Gt(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.c)},Vs.Td=function(e){var t=Nt(e.data);switch(t.type){case"init":this.f=0,this.l=!1,this.i=!0,Ht(this,t.initState,t.appData),this.Vb();break;case"appData":this.u(t.appData);break;case"set":var n=t.targetName,i=t.property,r=t.value;if("video"==n){if(t=cast.receiver.CastReceiverManager.getInstance(),"volume"==i){t.setSystemVolumeLevel(r);break
}if("muted"==i){t.setSystemVolumeMuted(r);break}}this.s[n][i]=r;break;case"call":n=t.targetName,i=t.methodName,r=t.args;var a=this.s[n];a[i].apply(a,r);break;case"asyncCall":n=t.targetName,i=t.methodName,"player"==n&&"load"==i&&(this.f=0,this.l=!1),r=t.args,t=t.id,e=e.senderId,a=this.s[n],r=a[i].apply(a,r),"player"==n&&"load"==i&&(r=r.then(function(){this.i=!0}.bind(this))),r.then(this.Mc.bind(this,e,t,null),this.Mc.bind(this,e,t))}},Vs.Ed=function(e){var t=Nt(e.data);switch(t.type){case"PLAY":
this.a.play(),Kt(this,0);break;case"PAUSE":this.a.pause(),Kt(this,0);break;case"SEEK":e=t.currentTime;var n=t.resumeState;null!=e&&(this.a.currentTime=Number(e)),n&&"PLAYBACK_START"==n?(this.a.play(),Kt(this,0)):n&&"PLAYBACK_PAUSE"==n&&(this.a.pause(),Kt(this,0));break;case"STOP":this.b.zb().then(function(){Kt(this,0)}.bind(this));break;case"GET_STATUS":Kt(this,Number(t.requestId));break;case"VOLUME":n=t.volume,e=n.level,n=n.muted;var i=this.a.volume,r=this.a.muted
;null!=e&&(this.a.volume=Number(e)),null!=n&&(this.a.muted=n),i==this.a.volume&&r==this.a.muted||Kt(this,0);break;case"LOAD":this.f=0,this.i=this.l=!1,n=t.media.contentId,e=t.currentTime,n=this.w(n),this.a.autoplay=!0,this.b.load(n,e).then(function(){Wt(this)}.bind(this)).catch(function(e){var n="LOAD_FAILED";7==e.category&&7e3==e.code&&(n="LOAD_CANCELLED"),Gt(this,{requestId:Number(t.requestId),type:n},this.h)}.bind(this));break;default:Gt(this,{requestId:Number(t.requestId),
type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.h)}},Vs.Mc=function(e,t,n){Gt(this,{type:"asyncComplete",id:t,error:n},this.c,e)};var yl={IDLE:"IDLE",Wc:"PLAYING",Tc:"BUFFERING",Vc:"PAUSED"},bl={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"}
;l("shaka.media.InitSegmentReference",yn),yn.prototype.Eb=function(){return this.a()},yn.prototype.createUris=yn.prototype.Eb,yn.prototype.Jb=function(){return this.O},yn.prototype.getStartByte=yn.prototype.Jb,yn.prototype.Hb=function(){return this.D},yn.prototype.getEndByte=yn.prototype.Hb,l("shaka.media.SegmentReference",bn),bn.prototype.U=function(){return this.position},bn.prototype.getPosition=bn.prototype.U,bn.prototype.Kb=function(){return this.startTime},
bn.prototype.getStartTime=bn.prototype.Kb,bn.prototype.kd=function(){return this.endTime},bn.prototype.getEndTime=bn.prototype.kd,bn.prototype.Eb=function(){return this.a()},bn.prototype.createUris=bn.prototype.Eb,bn.prototype.Jb=function(){return this.O},bn.prototype.getStartByte=bn.prototype.Jb,bn.prototype.Hb=function(){return this.D},bn.prototype.getEndByte=bn.prototype.Hb,l("shaka.util.DataViewReader",In);var Il=1;In.Endianness={Xe:0,$e:Il},In.prototype.ea=function(){
return this.a<this.G.byteLength},In.prototype.hasMoreData=In.prototype.ea,In.prototype.U=function(){return this.a},In.prototype.getPosition=In.prototype.U,In.prototype.ld=function(){return this.G.byteLength},In.prototype.getLength=In.prototype.ld,In.prototype.$=function(){try{var e=this.G.getUint8(this.a);return this.a+=1,e}catch(e){Sn()}},In.prototype.readUint8=In.prototype.$,In.prototype.ab=function(){try{var e=this.G.getUint16(this.a,this.b);return this.a+=2,e}catch(e){Sn()}},
In.prototype.readUint16=In.prototype.ab,In.prototype.C=function(){try{var e=this.G.getUint32(this.a,this.b);return this.a+=4,e}catch(e){Sn()}},In.prototype.readUint32=In.prototype.C,In.prototype.Gc=function(){try{var e=this.G.getInt32(this.a,this.b);return this.a+=4,e}catch(e){Sn()}},In.prototype.readInt32=In.prototype.Gc,In.prototype.Qa=function(){try{if(this.b)var e=this.G.getUint32(this.a,!0),t=this.G.getUint32(this.a+4,!0);else t=this.G.getUint32(this.a,!1),e=this.G.getUint32(this.a+4,!1)
}catch(e){Sn()}if(2097151<t)throw new g(2,3,3001);return this.a+=8,t*Math.pow(2,32)+e},In.prototype.readUint64=In.prototype.Qa,In.prototype.Pa=function(e){this.a+e>this.G.byteLength&&Sn();var t=new Uint8Array(this.G.buffer,this.G.byteOffset+this.a,e);return this.a+=e,new Uint8Array(t)},In.prototype.readBytes=In.prototype.Pa,In.prototype.F=function(e){this.a+e>this.G.byteLength&&Sn(),this.a+=e},In.prototype.skip=In.prototype.F,In.prototype.Kc=function(e){this.a<e&&Sn(),this.a-=e},
In.prototype.rewind=In.prototype.Kc,In.prototype.seek=function(e){(0>e||e>this.G.byteLength)&&Sn(),this.a=e},In.prototype.seek=In.prototype.seek,In.prototype.Wb=function(){for(var e=this.a;this.ea()&&0!=this.G.getUint8(this.a);)this.a+=1;return e=new Uint8Array(this.G.buffer,this.G.byteOffset+e,this.a-e),this.a+=1,se(e)},In.prototype.readTerminatedString=In.prototype.Wb,l("shaka.util.Mp4Parser",Mn),Mn.prototype.B=function(e,t){var n=jn(e);return this.c[n]=0,this.b[n]=t,this},
Mn.prototype.box=Mn.prototype.B,Mn.prototype.W=function(e,t){var n=jn(e);return this.c[n]=1,this.b[n]=t,this},Mn.prototype.fullBox=Mn.prototype.W,Mn.prototype.stop=function(){this.a=!0},Mn.prototype.stop=Mn.prototype.stop,Mn.prototype.parse=function(e,t){var n=new Uint8Array(e);for(n=new In(new DataView(n.buffer,n.byteOffset,n.byteLength),0),this.a=!1;n.ea()&&!this.a;)this.xb(0,n,t)},Mn.prototype.parse=Mn.prototype.parse,Mn.prototype.xb=function(e,t,n){var i=t.U(),r=t.C(),a=t.C();switch(r){
case 0:r=t.G.byteLength-i;break;case 1:r=t.Qa()}var o=this.b[a];if(o){var s=null,l=null;1==this.c[a]&&(l=t.C(),s=l>>>24,l&=16777215),a=i+r,n&&a>t.G.byteLength&&(a=t.G.byteLength),a-=t.U(),t=0<a?t.Pa(a):new Uint8Array(0),t=new In(new DataView(t.buffer,t.byteOffset,t.byteLength),0),o({la:this,Dc:n||!1,version:s,flags:l,o:t,size:r,start:i+e})}else t.F(i+r-t.U())},Mn.prototype.parseNext=Mn.prototype.xb,Mn.children=Dn,Mn.sampleDescription=Cn,Mn.allData=On,l("shaka.media.SegmentIndex",Tn),
Tn.prototype.destroy=function(){return this.a=null,Promise.resolve()},Tn.prototype.destroy=Tn.prototype.destroy,Tn.prototype.find=function(e){for(var t=this.a.length-1;0<=t;--t){var n=this.a[t];if(e>=n.startTime&&e<n.endTime)return n.position}return this.a.length&&e<this.a[0].startTime?this.a[0].position:null},Tn.prototype.find=Tn.prototype.find,Tn.prototype.get=function(e){return 0==this.a.length?null:(e-=this.a[0].position,0>e||e>=this.a.length?null:this.a[e])},
Tn.prototype.get=Tn.prototype.get,Tn.prototype.offset=function(e){for(var t=0;t<this.a.length;++t)this.a[t].startTime+=e,this.a[t].endTime+=e},Tn.prototype.offset=Tn.prototype.offset,Tn.prototype.Pb=function(e){for(var t=[],n=0,i=0;n<this.a.length&&i<e.length;){var r=this.a[n],a=e[i];r.startTime<a.startTime?(t.push(r),n++):(r.startTime>a.startTime?0==n&&t.push(a):(.1<Math.abs(r.endTime-a.endTime)?(a=new bn(r.position,a.startTime,a.endTime,a.a,a.O,a.D),t.push(a)):t.push(r),n++),i++)}
for(;n<this.a.length;)t.push(this.a[n++]);if(t.length)for(n=t[t.length-1].position+1;i<e.length;)a=e[i++],a=new bn(n++,a.startTime,a.endTime,a.a,a.O,a.D),t.push(a);else t=e;this.a=t},Tn.prototype.merge=Tn.prototype.Pb,Tn.prototype.Fb=function(e){for(var t=0;t<this.a.length;++t)if(this.a[t].endTime>e)return void this.a.splice(0,t);this.a=[]},Tn.prototype.evict=Tn.prototype.Fb;var Sl;xn.prototype.ea=function(){return this.a.ea()},_n.prototype.parse=function(e,t,n,i){var r
;if(t=new xn(new DataView(t)),440786851!=Nn(t).id)throw new g(2,3,3008);var a=Nn(t);if(408125543!=a.id)throw new g(2,3,3009);for(t=a.a.byteOffset,a=new xn(a.a),r=null;a.ea();){var o=Nn(a);if(357149030==o.id){r=o;break}}if(!r)throw new g(2,3,3010);for(a=new xn(r.a),r=1e6,o=null;a.ea();){var s=Nn(a);if(2807729==s.id)r=kn(s);else if(17545==s.id)if(o=s,4==o.a.byteLength)o=o.a.getFloat32(0);else{if(8!=o.a.byteLength)throw new g(2,3,3003);o=o.a.getFloat64(0)}}if(null==o)throw new g(2,3,3011)
;if(a=r/1e9,r=o*a,e=Nn(new xn(new DataView(e))),475249515!=e.id)throw new g(2,3,3007);return Rn(e,t,a,r,n,i)};var Ml={},Dl={};l("shaka.media.ManifestParser.registerParserByExtension",function(e,t){Dl[e]=t}),l("shaka.media.ManifestParser.registerParserByMime",function(e,t){Ml[e]=t}),l("shaka.media.PresentationTimeline",ei),ei.prototype.S=function(){return this.a},ei.prototype.getDuration=ei.prototype.S,ei.prototype.ha=function(e){this.a=e},ei.prototype.setDuration=ei.prototype.ha,
ei.prototype.pd=function(){return this.c},ei.prototype.getPresentationStartTime=ei.prototype.pd,ei.prototype.Oc=function(e){this.j=e},ei.prototype.setClockOffset=ei.prototype.Oc,ei.prototype.yb=function(e){this.i=e},ei.prototype.setStatic=ei.prototype.yb,ei.prototype.bc=function(e){this.f=e},ei.prototype.setSegmentAvailabilityDuration=ei.prototype.bc,ei.prototype.Pc=function(e){this.l=e},ei.prototype.setDelay=ei.prototype.Pc,ei.prototype.Za=function(e,t){
0!=e.length&&(t&&(this.g=Math.max(this.g,e[0].startTime)),this.b=e.reduce(function(e,t){return Math.max(e,t.endTime-t.startTime)},this.b))},ei.prototype.notifySegments=ei.prototype.Za,ei.prototype.wb=function(e){this.b=Math.max(this.b,e)},ei.prototype.notifyMaxSegmentDuration=ei.prototype.wb,ei.prototype.P=function(){return 1/0==this.a&&!this.i},ei.prototype.isLive=ei.prototype.P,ei.prototype.wa=function(){return 1/0!=this.a&&!this.i},ei.prototype.isInProgress=ei.prototype.wa,
ei.prototype.Ja=function(){if(1/0==this.f)return this.h;var e=this.Ia()-this.f;return Math.max(this.h,e)},ei.prototype.getSegmentAvailabilityStart=ei.prototype.Ja,ei.prototype.Nc=function(e){this.h=e},ei.prototype.setAvailabilityStart=ei.prototype.Nc,ei.prototype.Ia=function(){return this.P()||this.wa()?Math.min(Math.max(0,(Date.now()+this.j)/1e3-this.b-this.c),this.a):this.a},ei.prototype.getSegmentAvailabilityEnd=ei.prototype.Ia,ei.prototype.Ga=function(e){1/0==this.f&&(e=0);var t=this.Ia()
;return e=Math.min(this.g+e,t),Math.max(this.Ja(),e)},ei.prototype.getSafeSeekRangeStart=ei.prototype.Ga,ei.prototype.Va=function(){return this.Ga(0)},ei.prototype.getSeekRangeStart=ei.prototype.Va,ei.prototype.Ha=function(){var e=this.P()||this.wa()?this.l:0;return Math.max(0,this.Ia()-e)},ei.prototype.getSeekRangeEnd=ei.prototype.Ha,l("shaka.dash.DashParser",ti),Vs=ti.prototype,Vs.configure=function(e){this.b=e},Vs.start=function(e,t){return this.g=[e],this.a=t,ni(this).then(function(){
return this.a&&ci(this,0),this.c}.bind(this))},Vs.stop=function(){return this.b=this.a=null,this.g=[],this.c=null,this.i=[],this.j={},null!=this.f&&(e.clearTimeout(this.f),this.f=null),Promise.resolve()},Vs.update=function(){ni(this).catch(function(e){this.a&&this.a.onError(e)}.bind(this))},Vs.onExpirationUpdated=function(){},Vs.be=function(e,t){e.T=ui(t,e.Z,null);var n=!1,i=Zt(t,"Role"),r=i.map(function(e){return e.getAttribute("value")}).filter(R),a=void 0
;"text"==e.T.contentType&&(a="subtitle");for(var o=0;o<i.length;o++){var s=i[o].getAttribute("schemeIdUri");if(null==s||"urn:mpeg:dash:role:2011"==s)switch(s=i[o].getAttribute("value")){case"main":n=!0;break;case"caption":case"subtitle":a=s}}var l=null,c=!1;if(Zt(t,"EssentialProperty").forEach(function(e){"http://dashif.org/guidelines/trickmode"==e.getAttribute("schemeIdUri")?l=e.getAttribute("value"):c=!0}),c)return null;i=Zt(t,"ContentProtection")
;var u=sn(i,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo);if(i=st(t.getAttribute("lang")||"und"),s=t.getAttribute("label"),o=Zt(t,"Representation"),r=o.map(this.ee.bind(this,e,u,a,i,s,n,r)).filter(function(e){return!!e}),0==r.length)throw new g(2,4,4003);return e.T.contentType&&"application"!=e.T.contentType||(e.T.contentType=vi(r[0].mimeType,r[0].codecs),r.forEach(function(t){t.type=e.T.contentType})),r.forEach(function(e){u.drmInfos.forEach(function(t){e.keyId&&t.keyIds.push(e.keyId)})
}),a=o.map(function(e){return e.getAttribute("id")}).filter(R),{id:e.T.id||"__fake__"+this.h++,contentType:e.T.contentType,language:i,Nb:n,streams:r,drmInfos:u.drmInfos,fc:l,pe:a}},Vs.ee=function(e,t,n,i,r,a,o,s){if(e.v=ui(s,e.T,null),!pi(e.v))return null;e.bandwidth=Jt(s,"bandwidth",rn)||0;var l=this.qe.bind(this);if(e.v.bb)l=Bn(e,l);else if(e.v.qa)l=Qn(e,this.j);else if(e.v.eb)l=Gn(e,l,this.j,!!this.c);else{var c=e.v.ba,u=e.M.duration||0;l={createSegmentIndex:Promise.resolve.bind(Promise),
findSegmentPosition:function(e){return 0<=e&&e<u?1:null},getSegmentReference:function(e){return 1!=e?null:new bn(1,0,u,function(){return c},0,null)},initSegmentReference:null,aa:0}}return s=Zt(s,"ContentProtection"),s=ln(s,this.b.dash.customScheme,t,this.b.dash.ignoreDrmInfo),{id:this.h++,createSegmentIndex:l.createSegmentIndex,findSegmentPosition:l.findSegmentPosition,getSegmentReference:l.getSegmentReference,initSegmentReference:l.initSegmentReference,presentationTimeOffset:l.aa,
mimeType:e.v.mimeType,codecs:e.v.codecs,frameRate:e.v.frameRate,bandwidth:e.bandwidth,width:e.v.width,height:e.v.height,kind:n,encrypted:0<t.drmInfos.length,keyId:s,language:i,label:r,type:e.T.contentType,primary:a,trickModeVideo:null,containsEmsgBoxes:e.v.containsEmsgBoxes,roles:o,channelsCount:e.v.Rb}},Vs.Ke=function(){this.f=null;var e=Date.now();ni(this).then(function(){this.a&&ci(this,(Date.now()-e)/1e3)}.bind(this)).catch(function(e){this.a&&(e.severity=1,this.a.onError(e),ci(this,0))
}.bind(this))},Vs.de=function(e,t,n){var i=n.getAttribute("schemeIdUri")||"",r=n.getAttribute("value")||"",a=Jt(n,"timescale",an)||1;Zt(n,"Event").forEach(function(n){var o=Jt(n,"presentationTime",an)||0,s=Jt(n,"duration",an)||0;o=o/a+e,s=o+s/a,null!=t&&(o=Math.min(o,e+t),s=Math.min(s,e+t)),n={schemeIdUri:i,value:r,startTime:o,endTime:s,id:n.getAttribute("id")||"",eventElement:n},this.a.onTimelineRegionAdded(n)}.bind(this))},Vs.qe=function(e,t,n){return e=V(e,this.b.retryParameters),
null!=t&&(e.headers.Range="bytes="+t+"-"+(null!=n?n:"")),this.a.networkingEngine.request(1,e).then(function(e){return e.data})},Dl.mpd=ti,Ml["application/dash+xml"]=ti,mi.prototype.toString=function(){function e(e){return e.name+'="'+e.value+'"'}return this.value?"#"+this.name+":"+this.value:0<this.a.length?"#"+this.name+":"+this.a.map(e).join(","):"#"+this.name},mi.prototype.getAttribute=function(e){var t=this.a.filter(function(t){return t.name==e});return t.length?t[0]:null}
;var Cl="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Ol="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");l("shaka.net.DataUriPlugin",Ni),Ni.parse=function(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw new g(2,1,1004,t);if(n=n.slice(1).join(":").split(","),2>n.length)throw new g(2,1,1004,t);var i=n[0]
;n=e.decodeURIComponent(n.slice(1).join(",")),i=i.split(";");var r=null;if(1<i.length&&(r=i[1]),"base64"==r)t=ge(n).buffer;else{if(r)throw new g(2,1,1005,t);t=ue(n)}return{data:t,contentType:i[0]}},B("data",Ni),l("shaka.hls.HlsParser",Ai),Vs=Ai.prototype,Vs.configure=function(e){this.h=e},Vs.start=function(e,t){return this.c=t,this.l=e,ir(this,e).then(function(t){return ki(this,t.data,e).then(function(){return rr(this,this.i),this.m}.bind(this))}.bind(this))},Vs.stop=function(){
return this.h=this.c=null,this.u={},this.A={},this.m=null,Promise.resolve()},Vs.update=function(){if(this.f!=El.oa){var e,t=[];for(e in this.a)t.push(Li(this,this.a[e],e));return Promise.all(t)}},Vs.onExpirationUpdated=function(){};var jl={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Pl={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",
m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};Ai.prototype.K=function(){this.c&&(this.j=null,this.update().then(function(){rr(this,this.i)}.bind(this)).catch(function(e){this.c&&(e.severity=1,this.c.onError(e),rr(this,0))}.bind(this)))};var wl={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=tr(e,"METHOD")
;return"SAMPLE-AES-CENC"!=t&&"SAMPLE-AES-CTR"!=t?null:(t=tr(e,"URI"),t=Ni.parse(t),t=new Uint8Array(t.data),t=te("com.widevine.alpha",[{initDataType:"cenc",initData:t}]),(e=bi(e,"KEYID"))&&(t.keyIds=[e.substr(2).toLowerCase()]),t)}},Tl="VOD",El={oa:Tl,Uc:"EVENT",hc:"LIVE"};Dl.m3u8=Ai,Ml["application/x-mpegurl"]=Ai,Ml["application/vnd.apple.mpegurl"]=Ai,or.prototype.destroy=function(){var e=this.h.destroy();return this.w=this.u=this.a=this.h=null,null!=this.b&&(this.b.cancel(),this.b=null),e},
or.prototype.$a=function(){this.f=!0,this.l()},or.prototype.l=function(){if(0!=this.a.readyState){if(this.a.seeking){if(!this.g)return}else this.g=!1;if(!this.a.paused){this.a.readyState!=this.m&&(this.c=!1,this.m=this.a.readyState);var e=this.s.smallGapLimit,t=this.a.currentTime,n=this.a.buffered;e:{if(n&&n.length&&!(1==n.length&&1e-6>n.end(0)-n.start(0))){var i=.1;/(Edge\/|Trident\/|Tizen)/.test(navigator.userAgent)&&(i=.5);for(var r=0;r<n.length;r++)if(n.start(r)>t&&(0==r||n.end(r-1)-t<=i)){
i=r;break e}}i=null}if(null==i){if(n=this.a.currentTime,t=this.a.buffered,3>this.a.readyState&&0<this.a.playbackRate)if(this.j!=n)this.j=n,this.A=Date.now(),this.i=!1;else if(!this.i&&this.A<Date.now()-1e3)for(i=0;i<t.length;i++)if(n>=t.start(i)&&n<t.end(i)-.5){this.a.currentTime+=.1,this.j=this.a.currentTime,this.i=!0;break}}else if(0!=i||this.f){r=n.start(i);var a=this.u.presentationTimeline.Ha();if(!(r>=a)){a=r-t,e=a<=e;var o=!1;.001>a||(e||this.c||(this.c=!0,t=new $("largegap",{
currentTime:t,gapSize:a}),t.cancelable=!0,this.w(t),this.s.jumpLargeGaps&&!t.defaultPrevented&&(o=!0)),!e&&!o)||(0!=i&&n.end(i-1),this.a.currentTime=r)}}}}},Vs=sr.prototype,Vs.destroy=function(){var e=this.b.destroy();return this.b=null,null!=this.c&&(this.c.cancel(),this.c=null),null!=this.f&&(this.f.cancel(),this.f=null),this.j=this.a=null,e},Vs.Ua=function(){return this.g},Vs.Pd=function(){var e=this.h||0>this.g?0:this.g
;this.a.playbackRate&&this.a.playbackRate!=e&&ur(this,this.a.playbackRate)},Vs.zc=function(){this.b.ia(this.a,"timeupdate"),this.f.cancel(),.001>Math.abs(this.a.currentTime-this.i)?this.Ac():(Z(this.b,this.a,"seeking",this.Ac.bind(this)),this.a.currentTime=this.i)},Vs.Ac=function(){q(this.b,this.a,"seeking",this.j.bind(this))},Vs.Bd=function(){this.i=this.a.currentTime,this.j()},Vs=pr.prototype,Vs.destroy=function(){var e=Promise.all([this.a.destroy(),this.g.destroy()])
;return this.g=this.a=null,null!=this.f&&(this.f.cancel(),this.f=null),this.i=this.h=this.c=this.b=null,e},Vs.Ua=function(){return this.a.Ua()},Vs.$a=function(){this.g.$a()},Vs.Od=function(){if(0!=this.b.readyState&&!this.b.seeking&&!this.b.paused){var e=this.b.currentTime;e<this.c.presentationTimeline.Va()&&(e=vr(this,e),this.b.currentTime=e)}},Vs.Rd=function(){var e=this.g;e.g=!0,e.f=!1,e.c=!1,e=lr(this.a);var t=vr(this,e);.001<Math.abs(t-e)?cr(this.a,t):this.i()},
mr.prototype.destroy=function(){var e=this.j?this.j.destroy():Promise.resolve();return this.j=null,Ir(this),this.A=this.h=this.l=this.u=this.g=this.w=this.a=null,this.c=[],e},mr.prototype.s=function(e){if(!this.c.some(function(t){return t.info.schemeIdUri==e.schemeIdUri&&t.info.startTime==e.startTime&&t.info.endTime==e.endTime})){var t={info:e,status:1};this.c.push(t);var n=new $("timelineregionadded",{detail:yr(e)});this.h(n),this.m(!0,t)}},mr.prototype.m=function(e,t){
var n=t.info.startTime>this.a.currentTime?1:t.info.endTime<this.a.currentTime?3:2,i=2==t.status,r=2==n;n!=t.status&&((!e||i||r)&&(i||this.h(new $("timelineregionenter",{detail:yr(t.info)})),r||this.h(new $("timelineregionexit",{detail:yr(t.info)}))),t.status=n)},mr.prototype.I=function(){this.f=null,br(this);var e=Pt(this.g,this.a.currentTime);e!=this.i&&(-1!=this.i&&this.A(),this.i=e),e=Fe(this.a.buffered,this.a.currentTime);var t=Be(this.a.buffered),n=this.g.presentationTimeline,i=n.Ia()
;t=n.P()&&t>=i,n="ended"==this.w.readyState,t=t||this.a.ended||n,this.b?(n=1*Math.max(this.g.minBufferTime||0,this.u.rebufferingGoal),(t||e>=n)&&0!=this.b&&(this.b=!1,this.l(!1))):!t&&.5>e&&1!=this.b&&(this.b=!0,this.l(!0)),this.c.forEach(this.m.bind(this,!1))},Vs=Sr.prototype,Vs.destroy=function(){for(var e in this.c)Xr(this.c[e]);return this.h=this.c=this.j=this.g=this.m=this.b=this.a=null,this.f=!0,Promise.resolve()},Vs.configure=function(e){this.h=e,this.A=new P({
maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0},!0)},Vs.init=function(){var e=hr(this.a.Na);return e=this.a.uc(this.b.periods[Pt(this.b,e)]),e.variant||e.text?Ar(this,e).then(function(){this.a&&this.a.Fd&&this.a.Fd()}.bind(this)):Promise.reject(new g(2,5,5005))},Vs.Me=function(e){if(!this.f&&!e.ya&&null!=e.ra&&!e.ua)if(e.ra=null,e.sa)qr(this,e,e.Ab);else{
try{var t=zr(this,e);null!=t&&(Zr(this,e,t),e.Wa=!1)}catch(e){return void Jr(this,e)}t=ie(this.c),Wr(this,e),t.every(function(e){return e.endOfStream})&&this.a.J.endOfStream().then(function(){var e=this.a.J.S();e<this.b.presentationTimeline.S()&&this.b.presentationTimeline.ha(e)}.bind(this))}},Vs.ce=function(e,t,n){var i=n.o.Wb(),r=n.o.Wb(),a=n.o.C(),o=n.o.C(),s=n.o.C(),l=n.o.C(),c=n.o.Pa(n.o.G.byteLength-n.o.U());e=e.startTime+t.startTime+o/a,
"urn:mpeg:dash:event:2012"==i?this.a.Hd():this.a.onEvent(new $("emsg",{detail:{startTime:e,endTime:e+s/a,schemeIdUri:i,value:r,timescale:a,presentationTimeDelta:o,eventDuration:s,id:l,messageData:c}})),n.la.stop()},l("shaka.net.HttpPlugin",$r),$r.c=e.XMLHttpRequest,B("http",$r,1),B("https",$r,1),ea.prototype.init=function(e){return da(e).then(function(e){this.b=e}.bind(this))},ea.prototype.destroy=function(){return Promise.all(this.a.map(function(e){try{e.transaction.abort()}catch(e){}
return e.N.catch(_)})).then(function(){this.b&&(this.b.close(),this.b=null)}.bind(this))},ea.prototype.Fa=function(e){return ia(this,"manifest-v3",e)},fa.prototype.destroy=function(){var e=this.h,t=this.i,n=this.g||Promise.resolve();return t.length&&(n=n.then(function(){return sa(e,"segment-v3",t,null)})),this.b={},this.i=[],this.g=this.a=this.m=this.j=this.h=null,n},fa.prototype.s=function(e){this.c+=null==e.D?e.jc:e.D-e.O+1},Vs=La.prototype,Vs.configure=function(){},Vs.start=function(e){
var t=Ia(e);if(null==t)return Promise.reject(new g(2,1,9004,e));this.a=t;var n;return xa().then(function(e){return n=e,n.Fa(t)}.bind(this)).then(function(e){if(!e)throw new g(2,9,9003,t);return ka(e)}).then(function(e){return n.destroy().then(function(){return e})},function(e){return n.destroy().then(function(){throw e})})},Vs.stop=function(){return Promise.resolve()},Vs.update=function(){},Vs.onExpirationUpdated=function(e,t){var n,i=this.a;xa().then(function(e){return n=e,n.Fa(i)
}).then(function(r){if(r&&!(0>r.sessionIds.indexOf(e))&&(void 0==r.expiration||r.expiration>t))return r.expiration=t,aa(n,i,r)}).catch(function(){}).then(function(){return n.destroy()})},Ml["application/x-offline-manifest"]=La,l("shaka.offline.OfflineScheme",_a),_a.a=function(e){return e={uri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},Promise.resolve(e)},_a.b=function(e,t){var n,i;return xa().then(function(t){return n=t,ia(n,"segment-v3",e)
}).then(function(e){return i=e,n.destroy()}).then(function(){if(!i)throw new g(2,9,9003,e);return{uri:t,data:i.data,headers:{}}})},B("offline",_a),l("shaka.text.Cue",Ra);var xl="auto";Ra.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:xl};var Nl="center",Al={LEFT:"left",RIGHT:"right",CENTER:Nl,START:"start",END:"end"};Ra.textAlign=Al;var Ll="before",kl={BEFORE:Ll,CENTER:"center",AFTER:"after"};Ra.displayAlign=kl;var _l=0;Ra.writingDirection={HORIZONTAL_LEFT_TO_RIGHT:_l,
HORIZONTAL_RIGHT_TO_LEFT:1,VERTICAL_LEFT_TO_RIGHT:2,VERTICAL_RIGHT_TO_LEFT:3};var Rl=0;Ra.lineInterpretation={LINE_NUMBER:Rl,PERCENTAGE:1};var zl="center",Ul={CENTER:zl,START:"start",END:"end"};Ra.lineAlign=Ul;var Bl=400;Ra.fontWeight={NORMAL:Bl,BOLD:700};var Vl="normal",Fl={NORMAL:Vl,ITALIC:"italic",OBLIQUE:"oblique"};Ra.fontStyle=Fl,Ra.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},l("shaka.text.SimpleTextDisplayer",za),za.prototype.remove=function(e,t){
return!!this.a&&(Ba(this,function(n){return!(n.startTime>=t||n.endTime<=e)}),!0)},za.prototype.remove=za.prototype.remove,za.prototype.append=function(e){for(var t=[],n=0;n<e.length;n++){var i=Ua(e[n]);i&&t.push(i)}t.slice().sort(function(e,n){return e.startTime!=n.startTime?e.startTime-n.startTime:e.endTime!=n.endTime?e.endTime-n.startTime:t.indexOf(n)-t.indexOf(e)}).forEach(function(e){this.a.addCue(e)}.bind(this))},za.prototype.append=za.prototype.append,za.prototype.destroy=function(){
return this.a&&Ba(this,function(){return!0}),this.a=null,Promise.resolve()},za.prototype.destroy=za.prototype.destroy,za.prototype.isTextVisible=function(){return"showing"==this.a.mode},za.prototype.isTextVisible=za.prototype.isTextVisible,za.prototype.setTextVisibility=function(e){this.a.mode=e?"showing":"hidden"},za.prototype.setTextVisibility=za.prototype.setTextVisibility,Va.prototype.then=function(e){return this.a=this.a.then(e).then(function(e){return this.b?(this.g(),
Promise.reject(this.h)):Promise.resolve(e)}.bind(this)),this},Va.prototype.cancel=function(e){return this.c?Promise.resolve():(this.b=!0,this.h=e,this.j.forEach(function(e){e()}),this.i)},c(Qa,zt),l("shaka.Player",Qa),Qa.prototype.destroy=function(){return this.L=!0,Ha(this).then(function(){var e=Promise.all([this.Ta,Ja(this),this.m?this.m.destroy():null,this.s?this.s.destroy():null]);return this.f=null,this.qb=!1,this.c=this.s=this.h=this.m=null,e}.bind(this))},
Qa.prototype.destroy=Qa.prototype.destroy,Qa.version="v2.3.3";var Ql={};Qa.registerSupportPlugin=function(e,t){Ql[e]=t},Qa.isBrowserSupported=function(){return!!(e.Promise&&e.Uint8Array&&Array.prototype.forEach&&e.MediaSource&&MediaSource.isTypeSupported&&e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration)},Qa.probeSupport=function(){return Re().then(function(e){e={manifest:Jn(),media:Ze(),drm:e}
;for(var t in Ql)e[t]=Ql[t]();return e})},Qa.prototype.load=function(e,t,n){var i=this.zb(),r=new Va;this.Da=r,this.dispatchEvent(new $("loading"));var a=Date.now();return Fa(r.then(function(){return i}).then(function(){return this.j=no(),q(this.m,this.f,"playing",this.gb.bind(this)),q(this.m,this.f,"pause",this.gb.bind(this)),q(this.m,this.f,"ended",this.gb.bind(this)),this.h=new this.c.abrFactory,this.h.configure(this.c.abr),this.u=new this.c.textDisplayFactory,
this.u.setTextVisibility(this.qb),$n(e,this.s,this.c.manifest.retryParameters,n)}.bind(this)).then(function(t){return this.i=new t,this.i.configure(this.c.manifest),this.i.start(e,{networkingEngine:this.s,filterNewPeriod:this.sb.bind(this),filterAllPeriods:this.cc.bind(this),onTimelineRegionAdded:this.Wd.bind(this),onEvent:this.fb.bind(this),onError:this.Sa.bind(this)})}.bind(this)).then(function(t){if(t.periods.some(function(e){return e.variants.some(function(e){return e.video&&e.audio})
})&&t.periods.forEach(function(e){e.variants=e.variants.filter(function(e){return e.video&&e.audio})}),0==t.periods.length)throw new g(2,4,4014);return this.b=t,this.Cb=e,this.l=new Se({Ya:this.s,onError:this.Sa.bind(this),Tb:this.Gd.bind(this),onExpirationUpdated:this.Dd.bind(this),onEvent:this.fb.bind(this)}),this.l.configure(this.c.drm),this.l.init(t,!1)}.bind(this)).then(function(){this.cc(this.b.periods),this.kb=Date.now()/1e3,this.Ba=this.c.preferredAudioLanguage,
this.Ca=this.c.preferredTextLanguage;var e=this.b.presentationTimeline.S(),t=this.c.playRangeEnd,n=this.c.playRangeStart;return 0<n&&(this.P()||this.b.presentationTimeline.Nc(n)),t<e&&(this.P()||this.b.presentationTimeline.ha(t)),Promise.all([Me(this.l,this.f),this.nb])}.bind(this)).then(function(){return this.h.init(this.Fe.bind(this)),this.g=new pr(this.f,this.b,this.c.streaming,void 0==t?null:t,this.De.bind(this),this.fb.bind(this)),
this.w=new mr(this.f,this.da,this.b,this.c.streaming,this.Qc.bind(this),this.fb.bind(this),this.Ce.bind(this)),this.ca=new qe(this.f,this.da,this.u),this.a=new Sr(this.b,{Na:this.g,J:this.ca,Ya:this.s,uc:this.Ad.bind(this),tc:this.$c.bind(this),onError:this.Sa.bind(this),onEvent:this.fb.bind(this),Hd:this.Id.bind(this),$a:this.Sd.bind(this),filterNewPeriod:this.sb.bind(this),filterAllPeriods:this.cc.bind(this)}),this.a.configure(this.c.streaming),Ya(this),this.dispatchEvent(new $("streaming")),
this.a.init()}.bind(this)).then(function(){if(this.c.streaming.startAtSegmentBoundary){var e=ao(this,hr(this.g));cr(this.g.a,e)}this.b.periods.forEach(this.sb.bind(this)),co(this),lo(this),e=Mr(this.a);var t=St(e.variants,this.Ba,this.ib);this.h.setVariants(t),e.variants.some(function(e){return e.primary}),this.ob.forEach(this.w.s.bind(this.w)),this.ob=[],Z(this.m,this.f,"loadeddata",function(){this.j.loadLatency=(Date.now()-a)/1e3}.bind(this)),this.Da=null}.bind(this))).catch(function(e){
return this.Da==r&&(this.Da=null,this.dispatchEvent(new $("unloading"))),Promise.reject(e)}.bind(this))},Qa.prototype.load=Qa.prototype.load,Qa.prototype.configure=function(e){N(this.c,e,to(this),eo(),""),Ga(this)},Qa.prototype.configure=Qa.prototype.configure,Qa.prototype.getConfiguration=function(){var e=to(this);return N(e,this.c,to(this),eo(),""),e},Qa.prototype.getConfiguration=Qa.prototype.getConfiguration,Qa.prototype.re=function(){this.c=to(this),Ga(this)},
Qa.prototype.resetConfiguration=Qa.prototype.re,Qa.prototype.md=function(){return this.f},Qa.prototype.getMediaElement=Qa.prototype.md,Qa.prototype.pc=function(){return this.s},Qa.prototype.getNetworkingEngine=Qa.prototype.pc,Qa.prototype.Ib=function(){return this.Cb},Qa.prototype.getManifestUri=Qa.prototype.Ib,Qa.prototype.P=function(){return!!this.b&&this.b.presentationTimeline.P()},Qa.prototype.isLive=Qa.prototype.P,Qa.prototype.wa=function(){return!!this.b&&this.b.presentationTimeline.wa()},
Qa.prototype.isInProgress=Qa.prototype.wa,Qa.prototype.wd=function(){if(!this.b||!this.b.periods.length)return!1;var e=this.b.periods[0].variants;return!!e.length&&!e[0].video},Qa.prototype.isAudioOnly=Qa.prototype.wd,Qa.prototype.te=function(){var e=0,t=0;return this.b&&(t=this.b.presentationTimeline,e=t.Va(),t=t.Ha()),{start:e,end:t}},Qa.prototype.seekRange=Qa.prototype.te,Qa.prototype.keySystem=function(){return this.l?this.l.keySystem():""},Qa.prototype.keySystem=Qa.prototype.keySystem,
Qa.prototype.drmInfo=function(){return this.l?this.l.b:null},Qa.prototype.drmInfo=Qa.prototype.drmInfo,Qa.prototype.ub=function(){return this.l?this.l.ub():1/0},Qa.prototype.getExpiration=Qa.prototype.ub,Qa.prototype.sc=function(){return this.pb},Qa.prototype.isBuffering=Qa.prototype.sc,Qa.prototype.zb=function(){return this.L?Promise.resolve():(this.dispatchEvent(new $("unloading")),Ha(this).then(function(){return this.Ta||(this.Ta=$a(this).then(function(){this.Ta=null}.bind(this))),this.Ta
}.bind(this)))},Qa.prototype.unload=Qa.prototype.zb,Qa.prototype.Ua=function(){return this.g?this.g.Ua():0},Qa.prototype.getPlaybackRate=Qa.prototype.Ua,Qa.prototype.Oe=function(e){this.g&&ur(this.g.a,e),this.a&&wr(this.a,1!=e)},Qa.prototype.trickPlay=Qa.prototype.Oe,Qa.prototype.ad=function(){this.g&&ur(this.g.a,1),this.a&&wr(this.a,!1)},Qa.prototype.cancelTrickPlay=Qa.prototype.ad,Qa.prototype.ud=function(){if(!this.b||!this.g)return[];var e=Pt(this.b,hr(this.g)),t=this.I[e]||{}
;return vt(this.b.periods[e],t.audio,t.video)},Qa.prototype.getVariantTracks=Qa.prototype.ud,Qa.prototype.td=function(){if(!this.b||!this.g)return[];var e=Pt(this.b,hr(this.g));return gt(this.b.periods[e],(this.I[e]||{}).text).filter(function(e){return 0>this.lb.indexOf(e.id)}.bind(this))},Qa.prototype.getTextTracks=Qa.prototype.td,Qa.prototype.we=function(e){if(this.a){(e=yt(Mr(this.a),e))&&(Za(this,e,!1),this.ta?this.A=e:Er(this.a,e,!0),this.Ca=e.language)}},
Qa.prototype.selectTextTrack=Qa.prototype.we,Qa.prototype.xe=function(e,t){if(this.a){this.c.abr.enabled&&f("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var n=Mr(this.a);(n=mt(n,e))&&bt(n)&&(qa(this,n,!1),io(this,n,t),this.Ba=n.language)}},Qa.prototype.selectVariantTrack=Qa.prototype.xe,Qa.prototype.jd=function(){if(!this.a)return[];var e=Mr(this.a)
;return e=It(e.variants).map(function(e){return e.audio}).filter(z),Ka(e)},Qa.prototype.getAudioLanguagesAndRoles=Qa.prototype.jd,Qa.prototype.sd=function(){return this.a?Ka(Mr(this.a).textStreams):[]},Qa.prototype.getTextLanguagesAndRoles=Qa.prototype.sd,Qa.prototype.hd=function(){return this.a?It(Mr(this.a).variants).map(function(e){return e.language}).filter(z):[]},Qa.prototype.getAudioLanguages=Qa.prototype.hd,Qa.prototype.rd=function(){return this.a?Mr(this.a).textStreams.map(function(e){
return e.language}).filter(z):[]},Qa.prototype.getTextLanguages=Qa.prototype.rd,Qa.prototype.ue=function(e,t){if(this.a){var n=Mr(this.a);this.Ba=e,this.ib=t||"",so(this,n)}},Qa.prototype.selectAudioLanguage=Qa.prototype.ue,Qa.prototype.ve=function(e,t){if(this.a){var n=Mr(this.a);this.Ca=e,this.hb=t||"",so(this,n)}},Qa.prototype.selectTextLanguage=Qa.prototype.ve,Qa.prototype.Mb=function(){return this.u?this.u.isTextVisible():this.qb},Qa.prototype.isTextTrackVisible=Qa.prototype.Mb,
Qa.prototype.Ae=function(e){this.u&&this.u.setTextVisibility(e),this.qb=e,uo(this),this.a&&(e?(e=Mr(this.a),e=Mt(e.textStreams,this.Ca,this.hb)[0],Pr(this.a,e)):(e=this.a,e.w=!0,e.c.text&&(Xr(e.c.text),delete e.c.text)))},Qa.prototype.setTextTrackVisibility=Qa.prototype.Ae,Qa.prototype.od=function(){return this.b?new Date(1e3*this.b.presentationTimeline.c+1e3*this.f.currentTime):null},Qa.prototype.getPlayheadTimeAsDate=Qa.prototype.od,Qa.prototype.qd=function(){
return this.b?new Date(1e3*this.b.presentationTimeline.c):null},Qa.prototype.getPresentationStartTimeAsDate=Qa.prototype.qd,Qa.prototype.Gb=function(){return this.ca?this.ca.Gb():{total:[],audio:[],video:[],text:[]}},Qa.prototype.getBufferedInfo=Qa.prototype.Gb,Qa.prototype.getStats=function(){ro(this),this.gb();var e=null,t=null,n=this.f;if(n=n&&n.getVideoPlaybackQuality?n.getVideoPlaybackQuality():{},this.g&&this.b){var i=Pt(this.b,hr(this.g)),r=this.b.periods[i]
;(i=this.I[i])&&(t=jt(i.audio,i.video,r.variants),e=t.video||{})}return e||(e={}),t||(t={}),{width:e.width||0,height:e.height||0,streamBandwidth:t.bandwidth||0,decodedFrames:Number(n.totalVideoFrames),droppedFrames:Number(n.droppedVideoFrames),estimatedBandwidth:this.h?this.h.getBandwidthEstimate():NaN,loadLatency:this.j.loadLatency,playTime:this.j.playTime,bufferingTime:this.j.bufferingTime,switchHistory:A(this.j.switchHistory),stateHistory:A(this.j.stateHistory)}},
Qa.prototype.getStats=Qa.prototype.getStats,Qa.prototype.addTextTrack=function(e,t,n,i,r,a){if(!this.a)return Promise.reject();for(var o,s=Mr(this.a),l=0;l<this.b.periods.length;l++)if(this.b.periods[l]==s){if(l==this.b.periods.length-1){if(o=this.b.presentationTimeline.S()-s.startTime,1/0==o)return Promise.reject()}else o=this.b.periods[l+1].startTime-s.startTime;break}var c={id:this.Xc++,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},
getSegmentReference:function(t){return 1!=t?null:new bn(1,0,o,function(){return[e]},0,null)},initSegmentReference:null,presentationTimeOffset:0,mimeType:i,codecs:r||"",kind:n,encrypted:!1,keyId:null,language:t,label:a||null,type:"text",primary:!1,trickModeVideo:null,containsEmsgBoxes:!1,roles:[],channelsCount:null};return this.lb.push(c.id),s.textStreams.push(c),Pr(this.a,c).then(function(){if(!this.L){var e=this.b.periods.indexOf(s),i=jr(this.a,"text");return i&&(this.I[e].text=i.id),
this.lb.splice(this.lb.indexOf(c.id),1),so(this,s),co(this),{id:c.id,active:!1,type:"text",bandwidth:0,language:t,label:a||null,kind:n,width:null,height:null}}}.bind(this))},Qa.prototype.addTextTrack=Qa.prototype.addTextTrack,Qa.prototype.ac=function(e,t){this.mb.width=e,this.mb.height=t},Qa.prototype.setMaxHardwareResolution=Qa.prototype.ac,Qa.prototype.Jc=function(){if(this.a){var e=this.a;if(e.f)e=!1;else if(e.l)e=!1;else{for(var t in e.c){var n=e.c[t];n.Wa&&(n.Wa=!1,Zr(e,n,.1))}e=!0}
}else e=!1;return e},Qa.prototype.retryStreaming=Qa.prototype.Jc,Qa.prototype.Fa=function(){return this.b},Qa.prototype.getManifest=Qa.prototype.Fa,Vs=Qa.prototype,Vs.dd=function(e){var t=[1001,1002,1003];this.P()&&0<=t.indexOf(e.code)&&(e.severity=1,this.Jc())},Vs.cc=function(e){e.forEach(ut.bind(null,this.l,this.a?Cr(this.a):null,this.a?Or(this.a):null));var t=W(e,function(e){return e.variants.some(bt)});if(0==t)throw new g(2,4,9009);if(t<e.length)throw new g(2,4,4011);e.forEach(function(e){
if(ct(e,this.c.restrictions,this.mb)&&this.a&&Mr(this.a)==e&&co(this),!e.variants.some(bt))throw new g(2,4,4012)}.bind(this))},Vs.sb=function(e){ut(this.l,this.a?Cr(this.a):null,this.a?Or(this.a):null,e);var t=e.variants,n=t.some(bt);if(ct(e,this.c.restrictions,this.mb)&&this.a&&Mr(this.a)==e&&co(this),e=t.some(bt),!n)throw new g(2,4,4011);if(!e)throw new g(2,4,4012)},Vs.Ee=function(e,t){this.h&&this.h.segmentDownloaded(e,t)},Vs.Qc=function(e){if(ro(this),this.pb=e,this.gb(),this.g){
var t=this.g.a;e!=t.h&&(t.h=e,ur(t,t.g))}this.dispatchEvent(new $("buffering",{buffering:e}))},Vs.Ce=function(){co(this)},Vs.gb=function(){if(!this.L){var e=this.pb?"buffering":this.f.ended?"ended":this.f.paused?"paused":"playing",t=Date.now()/1e3;if(this.j.stateHistory.length){var n=this.j.stateHistory[this.j.stateHistory.length-1];if(n.duration=t-n.timestamp,e==n.state)return}this.j.stateHistory.push({timestamp:t,state:e,duration:0})}},Vs.De=function(){if(this.w){var e=this.w
;e.c.forEach(e.m.bind(e,!0))}this.a&&xr(this.a)},Vs.Ad=function(e){this.ta=!0,this.h.disable();var t={audio:!1,text:!1},n=St(e.variants,this.Ba,this.ib,t),i=Mt(e.textStreams,this.Ca,this.hb,t);if(n=oo(this,n),i=i[0]||null,this.K){e:{for(var r=this.b,a=0;a<r.periods.length;++a)for(var o=r.periods[a],s=0;s<o.variants.length;++s)if(o.variants[s]==this.K){r=a;break e}r=-1}r=this.b.periods[r],r==e&&(n=this.K),this.K=null}return this.A&&(r=wt(this.b,this.A),r=this.b.periods[r],r==e&&(i=this.A),
this.A=null),n&&qa(this,n,!0),i&&(Za(this,i,!0),!Dr(this.a)&&n&&n.audio&&t.text&&i.language!=n.audio.language&&(this.u.setTextVisibility(!0),uo(this))),this.Mb()?{variant:n,text:i}:{variant:n,text:null}},Vs.$c=function(){this.ta=!1,this.c.abr.enabled&&this.h.enable(),this.K&&(Tr(this.a,this.K,this.ic),this.K=null),this.A&&(Er(this.a,this.A,!0),this.A=null)},Vs.Id=function(){this.i&&this.i.update&&this.i.update()},Vs.Sd=function(){this.g&&this.g.$a()},Vs.Fe=function(e,t){qa(this,e,!0),
this.a&&(Tr(this.a,e,t||!1),lo(this))},Vs.Sa=function(e){if(!this.L){var t=new $("error",{detail:e});this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)}},Vs.Wd=function(e){this.w?this.w.s(e):this.ob.push(e)},Vs.fb=function(e){this.dispatchEvent(e)},Vs.Xd=function(){if(this.f.error){var e=this.f.error.code;if(1!=e){var t=this.f.error.msExtendedCode;t&&(0>t&&(t+=Math.pow(2,32)),t=t.toString(16)),this.Sa(new g(2,3,3016,e,t,this.f.error.message))}}},Vs.Gd=function(e){
var t=["output-restricted","internal-error"],n=Mr(this.a),i=!1,r=Object.keys(e),a=1==r.length&&"00"==r[0];r.length&&n.variants.forEach(function(n){var r=[];n.audio&&r.push(n.audio),n.video&&r.push(n.video),r.forEach(function(r){var o=n.allowedByKeySystem;r.keyId&&(r=e[a?"00":r.keyId],n.allowedByKeySystem=!!r&&0>t.indexOf(r)),o!=n.allowedByKeySystem&&(i=!0)})}),(r=Ot(Cr(this.a),Or(this.a),n.variants))&&!r.allowedByKeySystem&&so(this,n),i&&co(this)},Vs.Dd=function(e,t){
this.i&&this.i.onExpirationUpdated&&this.i.onExpirationUpdated(e,t),this.dispatchEvent(new $("expirationupdated"))},l("shaka.offline.Storage",po),po.support=ho,po.prototype.destroy=function(){var e=this.g,t=this.c?this.c.destroy().catch(function(){}).then(function(){if(e)return e.destroy()}):Promise.resolve();return this.b=this.a=this.c=this.g=null,t},po.prototype.destroy=po.prototype.destroy,po.prototype.configure=function(e){N(this.b,e,yo(this),{},"")},
po.prototype.configure=po.prototype.configure,po.prototype.store=function(e,t,n){function i(e){a=e}if(this.l)return Promise.reject(new g(2,9,9006));this.l=!0;var r=t||{},a=null;return bo(this).then(function(){return Oo(this),mo(this,e,i,n)}.bind(this)).then(function(t){if(Oo(this),a)throw a;return fo(this,e,t.manifest,r,t.ed)}.bind(this)).then(function(e){return Oo(this),Io(this).then(function(){return e})}.bind(this)).catch(function(e){return a=a||e,Io(this).then(function(){throw a})
}.bind(this))},po.prototype.store=po.prototype.store,po.prototype.remove=function(e){return e.offlineUri?(f("Removing downloaded content using shakaExtern.StoredContent is deprecated. Please remove using the offline uri."),vo(this,e.offlineUri)):vo(this,e)},po.prototype.remove=po.prototype.remove,po.prototype.list=function(){var e=[];return bo(this).then(function(){return Oo(this),na(this.g,function(t,n){var i=Ma("offline:manifest/"+t,n);e.push(i)})}.bind(this)).then(function(){return e})},
po.prototype.list=po.prototype.list,po.prototype.u=function(e){var t=[],n=st(this.a.getConfiguration().preferredAudioLanguage),i=[0,nl,il],r=e.filter(function(e){return"variant"==e.type});i=i.map(function(e){return r.filter(function(t){return t=st(t.language),ot(e,n,t)})});for(var a,o=0;o<i.length;o++)if(i[o].length){a=i[o];break}a||(i=r.filter(function(e){return e.primary}),i.length&&(a=i)),a||(a=r,r.map(function(e){return e.language}).filter(z));var s=a.filter(function(e){
return e.height&&480>=e.height});return s.length&&(s.sort(function(e,t){return t.height-e.height}),a=s.filter(function(e){return e.height==s[0].height})),a.sort(function(e,t){return e.bandwidth-t.bandwidth}),a.length&&t.push(a[Math.floor(a.length/2)]),t.push.apply(t,e.filter(function(e){return"text"==e.type})),t},po.prototype.j=function(e){e.forEach(this.m.bind(this))},po.prototype.m=function(e){var t=null;if(this.i){var n=this.i.filter(function(e){return"variant"==e.type})[0];n&&(t=mt(e,n))}
var i=n=null;t&&(t.audio&&(n=t.audio),t.video&&(i=t.video)),ut(this.f,n,i,e),ct(e,this.a.getConfiguration().restrictions,{width:1/0,height:1/0})},po.prototype.w=function(e){var t=vt(e,null,null),n=gt(e,null);for(t=this.b.trackSelectionCallback(t.concat(n)),null==this.i&&(this.i=t,this.j(this.h.periods)),n=t.length-1;0<n;--n){for(var i=!1,r=n-1;0<=r;--r)if(t[n].type==t[r].type&&t[n].kind==t[r].kind&&t[n].language==t[r].language){i=!0;break}if(i)break}for(i=[],n=0;n<t.length;n++){var a=mt(e,t[n])
;a?(a.audio&&((r=i.filter(function(e){return e.id==a.audio.id})[0])?r.variantIds.push(a.id):(r=a.video?a.bandwidth/2:a.bandwidth,i.push(Do(this,a.audio,r,a.id)))),a.video&&((r=i.filter(function(e){return e.id==a.video.id})[0])?r.variantIds.push(a.id):(r=a.audio?a.bandwidth/2:a.bandwidth,i.push(Do(this,a.video,r,a.id))))):i.push(Do(this,yt(e,t[n]),0))}return{startTime:e.startTime,streams:i}},po.deleteAll=function(){return Na()},Ql.offline=ho,l("shaka.polyfill.installAll",function(){
for(var e=0;e<Hl.length;++e)Hl[e]()});var Hl=[];l("shaka.polyfill.register",Po),Po(function(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,t=Document.prototype,t.exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitExitFullscreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){
return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",wo),document.addEventListener("webkitfullscreenerror",wo),document.addEventListener("mozfullscreenchange",wo),document.addEventListener("mozfullscreenerror",wo),
document.addEventListener("MSFullscreenChange",wo),document.addEventListener("MSFullscreenError",wo)}}),Po(function(){var t=navigator.userAgent;t&&0<=t.indexOf("CrKey")&&delete e.indexedDB});var Yl;Po(function(){0>navigator.userAgent.indexOf("Trident/")||HTMLInputElement.prototype.addEventListener==To||(Yl=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=To)}),Po(function(){if(4503599627370497!=Math.round(4503599627370497)){var e=Math.round
;Math.round=function(t){var n=t;return 4503599627370496>=t&&(n=e(t)),n}}}),Eo.prototype.c=function(e){if(!(1<e.version)){var t=ye(e.o.Pa(16)),n=[];if(0<e.version)for(var i=e.o.C(),r=0;r<i;++r){var a=ye(e.o.Pa(16));n.push(a)}i=e.o.C(),e.o.F(i),this.b.push.apply(this.b,n),this.f.push(t),this.a.push({start:e.start,end:e.start+e.size-1})}},No.prototype.createMediaKeys=function(){var e=new Lo(this.keySystem);return Promise.resolve(e)},No.prototype.getConfiguration=function(){return this.a},
Lo.prototype.createSession=function(e){var t=e||"temporary";if("temporary"!=t)throw new TypeError("Session type "+e+" is unsupported on this platform.");return new _o(this.a,t)},Lo.prototype.setServerCertificate=function(){return Promise.resolve(!1)},c(_o,zt),Vs=_o.prototype,Vs.generateRequest=function(e,t){this.a=new j;try{this.c=this.g.createSession("video/mp4",new Uint8Array(t),null),q(this.f,this.c,"mskeymessage",this.Md.bind(this)),q(this.f,this.c,"mskeyadded",this.Kd.bind(this)),
q(this.f,this.c,"mskeyerror",this.Ld.bind(this)),Uo(this,"status-pending")}catch(e){this.a.reject(e)}return this.a},Vs.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},Vs.update=function(e){this.b=new j;try{this.c.update(new Uint8Array(e))}catch(e){this.b.reject(e)}return this.b},Vs.close=function(){try{this.c.close(),this.closed.resolve(),X(this.f)}catch(e){this.closed.reject(e)}return this.closed},Vs.remove=function(){
return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},Vs.Md=function(e){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new $("message",{messageType:void 0==this.keyStatuses.a?"licenserequest":"licenserenewal",message:e.message.buffer}))},Vs.Kd=function(){this.a?(Uo(this,"usable"),this.a.resolve(),this.a=null):this.b&&(Uo(this,"usable"),this.b.resolve(),this.b=null)},Vs.Ld=function(){
var e=Error("EME PatchedMediaKeysMs key error");if(e.errorCode=this.c.error,null!=this.a)this.a.reject(e),this.a=null;else if(null!=this.b)this.b.reject(e),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Uo(this,"output-not-allowed");break;default:Uo(this,"internal-error")}};var Wl;Vs=Bo.prototype,Vs.forEach=function(e){this.a&&e(this.a,Wl)},Vs.get=function(e){if(this.has(e))return this.a},
Vs.has=function(e){var t=Wl;return!(!this.a||!be(new Uint8Array(e),new Uint8Array(t)))},Vs.entries=function(){},Vs.keys=function(){},Vs.values=function(){},Qo.prototype.createSession=function(){},Qo.prototype.setServerCertificate=function(){},Ho.prototype.getConfiguration=function(){},Ho.prototype.createMediaKeys=function(){};var Gl="";qo.prototype.createMediaKeys=function(){var e=new Zo(this.a);return Promise.resolve(e)},qo.prototype.getConfiguration=function(){return this.b},Vs=Zo.prototype,
Vs.createSession=function(e){var t=e||"temporary";if("temporary"!=t&&"persistent-license"!=t)throw new TypeError("Session type "+e+" is unsupported on this platform.");return e=this.b||document.createElement("video"),e.src||(e.src="about:blank"),t=new $o(e,this.g,t),this.c.push(t),t},Vs.setServerCertificate=function(){return Promise.resolve(!1)},Vs.ae=function(e){var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="webm",t.initData=e.initData,
this.b.dispatchEvent(t)},Vs.$d=function(e){var t=Jo(this,e.sessionId);t&&(e=new $("message",{messageType:void 0==t.keyStatuses.a?"licenserequest":"licenserenewal",message:e.message}),t.b&&(t.b.resolve(),t.b=null),t.dispatchEvent(e))},Vs.Yd=function(e){(e=Jo(this,e.sessionId))&&(ts(e,"usable"),e.a&&e.a.resolve(),e.a=null)},Vs.Zd=function(e){var t=Jo(this,e.sessionId);if(t){var n=Error("EME v0.1b key error");n.errorCode=e.errorCode,n.errorCode.systemCode=e.systemCode,
!e.sessionId&&t.b?(n.method="generateRequest",45==e.systemCode&&(n.message="Unsupported session type."),t.b.reject(n),t.b=null):e.sessionId&&t.a?(n.method="update",t.a.reject(n),t.a=null):(n=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?ts(t,"output-restricted"):1==n?ts(t,"expired"):ts(t,"internal-error"))}},c($o,zt),Vs=$o.prototype,Vs.dc=function(e,t){if(this.a)this.a.then(this.dc.bind(this,e,t)).catch(this.dc.bind(this,e,t));else{if(this.a=e,
"webkit-org.w3.clearkey"==this.c){var n=se(t),i=JSON.parse(n);"oct"!=i.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null),n=ge(i.keys[0].k),i=ge(i.keys[0].kid)}else n=new Uint8Array(t),i=null;var r=Wo("addKey");try{this.f[r](this.c,n,i,this.sessionId)}catch(e){this.a.reject(e),this.a=null}}},Vs.generateRequest=function(e,t){return es(this,t,null)},Vs.load=function(e){
return"persistent-license"==this.g?es(this,null,e):Promise.reject(Error("Not a persistent session."))},Vs.update=function(e){var t=new j;return this.dc(t,e),t},Vs.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Wo("cancelKeyRequest");try{this.f[e](this.c,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},Vs.remove=function(){
return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};var Kl;Vs=ns.prototype,Vs.forEach=function(e){this.a&&e(this.a,Kl)},Vs.get=function(e){if(this.has(e))return this.a},Vs.has=function(e){var t=Kl;return!(!this.a||!be(new Uint8Array(e),new Uint8Array(t)))},Vs.entries=function(){},Vs.keys=function(){},Vs.values=function(){},Po(function(){
!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(HTMLMediaElement.prototype.webkitGenerateKeyRequest?Yo("webkit"):HTMLMediaElement.prototype.generateKeyRequest?Yo(""):e.MSMediaKeys?(Wl=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Ao,e.MediaKeys=Lo,e.MediaKeySystemAccess=No,
navigator.requestMediaKeySystemAccess=xo):(navigator.requestMediaKeySystemAccess=Vo,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Fo,e.MediaKeys=Qo,e.MediaKeySystemAccess=Ho))}),Po(function(){if(e.MediaSource)if(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType)cs();else if(navigator.vendor&&0<=navigator.vendor.indexOf("Apple")){var t=navigator.appVersion;ls(),
0<=t.indexOf("Version/8")?e.MediaSource=null:0<=t.indexOf("Version/9")?is():0<=t.indexOf("Version/10")?(is(),as()):0<=t.indexOf("Version/11")&&(is(),rs())}});var ql=0;us.prototype.then=function(e,t){var n=new us;switch(this.V){case 1:vs(this,n,e);break;case 2:vs(this,n,t);break;case ql:this.c.push({N:n,Db:e}),this.b.push({N:n,Db:t})}return n},us.prototype.catch=function(e){return this.then(void 0,e)},us.prototype.ma=function(e){if(this.V==ql){for(this.f=e,this.V=1,
e=0;e<this.c.length;++e)vs(this,this.c[e].N,this.c[e].Db);this.c=[],this.b=[]}},us.prototype.a=function(e){if(this.V==ql){for(this.f=e,this.V=2,e=0;e<this.b.length;++e)vs(this,this.b[e].N,this.b[e].Db);this.c=[],this.b=[]}};var Zl=null,Xl=[];Po(function(t){e.setImmediate?(ys=function(t){return e.setImmediate(t)},bs=function(t){e.clearImmediate(t)}):(ys=function(t){return e.setTimeout(t,0)},bs=function(t){e.clearTimeout(t)}),e.Promise&&!t||(e.Promise=us,e.Promise.resolve=ds,e.Promise.reject=ps,
e.Promise.all=hs,e.Promise.race=fs,e.Promise.prototype.then=us.prototype.then,e.Promise.prototype.catch=us.prototype.catch)}),Po(function(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this,arguments);return e&&e.catch(function(){}),e}}}),Po(function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=Is)}}),Po(function(){
if(!e.VTTCue&&e.TextTrackCue){var t=TextTrackCue.length;if(3==t)e.VTTCue=Ss;else if(6==t)e.VTTCue=Ms;else{try{var n=!!Ss(1,2,"")}catch(e){n=!1}n&&(e.VTTCue=Ss)}}}),Ds.prototype.parseInit=function(){},Ds.prototype.parseMedia=function(e,t){var n=se(e),i=[],r=new DOMParser,a=null;try{a=r.parseFromString(n,"text/xml")}catch(e){throw new g(2,2,2005)}if(a){var o=a.getElementsByTagName("tt")[0];if(!o)throw new g(2,2,2005);r=o.getAttribute("ttp:frameRate"),a=o.getAttribute("ttp:subFrameRate")
;var s=o.getAttribute("ttp:frameRateMultiplier"),l=o.getAttribute("ttp:tickRate");if("default"!=(n=o.getAttribute("xml:space")||"default")&&"preserve"!=n)throw new g(2,2,2005);for(n="default"==n,r=new As(r,a,s,l),a=Cs(o.getElementsByTagName("styling")[0]),s=Cs(o.getElementsByTagName("layout")[0]),o=Cs(o.getElementsByTagName("body")[0]),l=0;l<o.length;l++){var c=o[l],u=t.periodStart,d=r,p=a,h=s,f=n;if(c.hasAttribute("begin")||c.hasAttribute("end")||!/^\s*$/.test(c.textContent)){Os(c,f),
f=xs(c.getAttribute("begin"),d);var v=xs(c.getAttribute("end"),d);d=xs(c.getAttribute("dur"),d);var m=c.textContent;if(null==v&&null!=d&&(v=f+d),null==f||null==v)throw new g(2,2,2001);u=new Ra(f+u,v+u,m),f=Es(c,"region",h),h=u,"rtl"==Ps(c,f,p,"tts:direction")&&(h.writingDirection=1),v=Ps(c,f,p,"tts:writingMode"),"tb"==v||"tblr"==v?h.writingDirection=2:"tbrl"==v?h.writingDirection=3:"rltb"==v||"rl"==v?h.writingDirection=1:v&&(h.writingDirection=_l),
(v=Ps(c,f,p,"tts:origin"))&&null!=(v=rc.exec(v))&&(h.region.x=Number(v[1]),h.region.y=Number(v[2])),(v=Ps(c,f,p,"tts:extent"))&&null!=(v=rc.exec(v))&&(h.region.width=Number(v[1]),h.region.height=Number(v[2])),(v=Ps(c,f,p,"tts:textAlign"))&&(h.positionAlign=sc[v],h.lineAlign=oc[v],h.textAlign=Al[v.toUpperCase()]),(v=Ps(c,f,p,"tts:displayAlign"))&&(h.displayAlign=kl[v.toUpperCase()]),(v=Ps(c,f,p,"tts:color"))&&(h.color=v),(v=Ps(c,f,p,"tts:backgroundColor"))&&(h.backgroundColor=v),
(v=Ps(c,f,p,"tts:fontFamily"))&&(h.fontFamily=v),(v=Ps(c,f,p,"tts:fontWeight"))&&"bold"==v&&(h.fontWeight=700),(v=Ps(c,f,p,"tts:wrapOption"))&&"noWrap"==v&&(h.wrapLine=!1),(v=Ps(c,f,p,"tts:lineHeight"))&&v.match(ac)&&(h.lineHeight=v),(v=Ps(c,f,p,"tts:fontSize"))&&v.match(ac)&&(h.fontSize=v),(v=Ps(c,f,p,"tts:fontStyle"))&&(h.fontStyle=Fl[v.toUpperCase()]),(f=ws(f,p,"tts:textDecoration"))&&js(h,f),(c=Ts(c,p,"tts:textDecoration"))&&js(h,c)}else u=null;u&&i.push(u)}}return i}
;var Jl=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,$l=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ec=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,tc=/^(\d*(?:\.\d*)?)f$/,nc=/^(\d*(?:\.\d*)?)t$/,ic=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,rc=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,ac=/^(\d+px|\d+em)$/,oc={left:"start",center:zl,right:"end",start:"start",end:"end"},sc={left:"line-left",center:"center",right:"line-right"};tl["application/ttml+xml"]=Ds,
Ls.prototype.parseInit=function(e){var t=!1;if((new Mn).B("moov",Dn).B("trak",Dn).B("mdia",Dn).B("minf",Dn).B("stbl",Dn).W("stsd",Cn).B("stpp",function(e){t=!0,e.la.stop()}).parse(e),!t)throw new g(2,2,2007)},Ls.prototype.parseMedia=function(e,t){var n=!1,i=[];if((new Mn).B("mdat",On(function(e){n=!0,i=i.concat(this.a.parseMedia(e,t))}.bind(this))).parse(e),!n)throw new g(2,2,2007);return i},tl['application/mp4; codecs="stpp"']=Ls,tl['application/mp4; codecs="stpp.TTML.im1t"']=Ls,
ks.prototype.parseInit=function(){},ks.prototype.parseMedia=function(e,t){var n=se(e);if(n=n.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n"),n=n.split(/\n{2,}/m),!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new g(2,2,2e3);var i=t.segmentStart;if(null==i&&(i=0,0<=n[0].indexOf("X-TIMESTAMP-MAP"))){var r=n[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),a=n[0].match(/MPEGTS:(\d+)/m);r&&a&&(i=Rs(new Oi(r[1])),i=t.periodStart+(Number(a[1])/9e4-i))}for(a=[],r=1;r<n.length;r++){var o=n[r].split("\n"),s=i
;if(1==o.length&&!o[0]||/^NOTE($|[ \t])/.test(o[0])||"STYLE"==o[0])var l=null;else{l=null,0>o[0].indexOf("--\x3e")&&(l=o[0],o.splice(0,1));var c=new Oi(o[0]),u=Rs(c),d=ji(c,/[ \t]+--\x3e[ \t]+/g),p=Rs(c);if(null==u||null==d||null==p)throw new g(2,2,2001);for(o=new Ra(u+s,p+s,o.slice(1).join("\n").trim()),ji(c,/[ \t]+/gm),s=Pi(c);s;)_s(o,s),ji(c,/[ \t]+/gm),s=Pi(c);null!=l&&(o.id=l),l=o}l&&a.push(l)}return a},tl["text/vtt"]=ks,tl['text/vtt; codecs="vtt"']=ks,zs.prototype.parseInit=function(e){
var t=!1;if((new Mn).B("moov",Dn).B("trak",Dn).B("mdia",Dn).W("mdhd",function(e){0==e.version?(e.o.F(4),e.o.F(4),this.a=e.o.C(),e.o.F(4)):(e.o.F(8),e.o.F(8),this.a=e.o.C(),e.o.F(8)),e.o.F(4)}.bind(this)).B("minf",Dn).B("stbl",Dn).W("stsd",Cn).B("wvtt",function(){t=!0}).parse(e),!this.a)throw new g(2,2,2008);if(!t)throw new g(2,2,2008)},zs.prototype.parseMedia=function(e,t){if(!this.a)throw new g(2,2,2008);var n=0,i=[],r=[],a=[],o=!1,s=!1,l=!1,c=null
;if((new Mn).B("moof",Dn).B("traf",Dn).W("tfdt",function(e){o=!0,n=0==e.version?e.o.C():e.o.Qa()}).W("tfhd",function(e){var t=e.flags;e=e.o,e.F(4),1&t&&e.F(8),2&t&&e.F(4),c=8&t?e.C():null}).W("trun",function(e){s=!0;var t=e.version,n=e.flags;e=e.o;var r=e.C();1&n&&e.F(4),4&n&&e.F(4);for(var a=[],o=0;o<r;o++){var l={duration:null,ec:null};256&n&&(l.duration=e.C()),512&n&&e.F(4),1024&n&&e.F(4),2048&n&&(l.ec=0==t?e.C():e.Gc()),a.push(l)}i=a}).B("vtte",function(){r.push(null)
}).B("vttc",On(function(e){r.push(e)})).B("mdat",function(e){l=!0,Dn(e)}).parse(e),!l&&!o&&!s)throw new g(2,2,2008);for(var u=n,d=0;d<i.length;d++){var p=i[d],h=r[d],f=p.duration||c;f&&(p=p.ec?n+p.ec:u,u=p+f,h&&a.push(Us(h,t.periodStart+p/this.a,t.periodStart+u/this.a)))}return a.filter(R)},tl['application/mp4; codecs="wvtt"']=zs}).call(a,this),void 0!==e&&e.exports?e.exports=a.shaka:void 0!==(r=function(){return a.shaka}.call(t,n,t,e))&&(e.exports=r)}()}).call(t,n(191))
},,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1314);n.n(i);n(1315).a.start()},function(e,t){},function(e,t,n){"use strict";var i=n(20),r=n(1361),a=n(3701),o=(n(3870),new i.a.Application);o.addInitializer(function(){return Object(a.a)().then(function(){return Object(r.a)()})}),t.a=o},function(e,t,n){var i=n(116),r=i.JSON||(i.JSON={stringify:JSON.stringify});e.exports=function(e){return r.stringify.apply(r,arguments)}},function(e,t,n){
n(1318),e.exports=n(116).Object.assign},function(e,t,n){var i=n(162);i(i.S+i.F,"Object",{assign:n(1320)})},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";var i=n(390),r=n(589),a=n(461),o=n(462),s=n(824),l=Object.assign;e.exports=!l||n(271)(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=o(e),l=arguments.length,c=1,u=r.f,d=a.f;l>c;)for(var p,h=s(arguments[c++]),f=u?i(h).concat(u(h)):i(h),v=f.length,g=0;v>g;)d.call(h,p=f[g++])&&(n[p]=h[p]);return n}:l},function(e,t,n){var i=n(320),r=n(1322),a=n(1323);e.exports=function(e){return function(t,n,o){var s,l=i(t),c=r(l.length),u=a(o,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)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(585),r=Math.min
;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},function(e,t,n){var i=n(585),r=Math.max,a=Math.min;e.exports=function(e,t){return e=i(e),e<0?r(e+t,0):a(e,t)}},function(e,t,n){var i=n(826),r={delimiter:"&",arrayPrefixGenerators:{brackets:function(e,t){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e,t){return e}},strictNullHandling:!1};r.stringify=function(e,t,n,a,o){
if("function"==typeof o)e=o(t,e);else if(i.isBuffer(e))e=e.toString();else if(e instanceof Date)e=e.toISOString();else if(null===e){if(a)return i.encode(t);e=""}if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return[i.encode(t)+"="+i.encode(e)];var s=[];if(void 0===e)return s;for(var l=Array.isArray(o)?o:Object.keys(e),c=0,u=l.length;c<u;++c){var d=l[c];s=Array.isArray(e)?s.concat(r.stringify(e[d],n(t,d),n,a,o)):s.concat(r.stringify(e[d],t+"["+d+"]",n,a,o))}return s},
e.exports=function(e,t){t=t||{};var n,i,a=void 0===t.delimiter?r.delimiter:t.delimiter,o="boolean"==typeof t.strictNullHandling?t.strictNullHandling:r.strictNullHandling;"function"==typeof t.filter?(i=t.filter,e=i("",e)):Array.isArray(t.filter)&&(n=i=t.filter);var s=[];if("object"!=typeof e||null===e)return"";var l;l=t.arrayFormat in r.arrayPrefixGenerators?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":"indices";var c=r.arrayPrefixGenerators[l];n||(n=Object.keys(e))
;for(var u=0,d=n.length;u<d;++u){var p=n[u];s=s.concat(r.stringify(e[p],p,c,o,i))}return s.join(a)}},function(e,t,n){var i=n(826),r={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1};r.parseValues=function(e,t){for(var n={},r=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),a=0,o=r.length;a<o;++a){var s=r[a],l=-1===s.indexOf("]=")?s.indexOf("="):s.indexOf("]=")+1;if(-1===l)n[i.decode(s)]="",
t.strictNullHandling&&(n[i.decode(s)]=null);else{var c=i.decode(s.slice(0,l)),u=i.decode(s.slice(l+1));Object.prototype.hasOwnProperty.call(n,c)?n[c]=[].concat(n[c]).concat(u):n[c]=u}}return n},r.parseObject=function(e,t,n){if(!e.length)return t;var i,a=e.shift();if("[]"===a)i=[],i=i.concat(r.parseObject(e,t,n));else{i=n.plainObjects?Object.create(null):{};var o="["===a[0]&&"]"===a[a.length-1]?a.slice(1,a.length-1):a,s=parseInt(o,10),l=""+s
;!isNaN(s)&&a!==o&&l===o&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(i=[],i[s]=r.parseObject(e,t,n)):i[o]=r.parseObject(e,t,n)}return i},r.parseKeys=function(e,t,n){if(e){n.allowDots&&(e=e.replace(/\.([^\.\[]+)/g,"[$1]"));var i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,o=i.exec(e),s=[];if(o[1]){if(!n.plainObjects&&Object.prototype.hasOwnProperty(o[1])&&!n.allowPrototypes)return;s.push(o[1])}for(var l=0;null!==(o=a.exec(e))&&l<n.depth;)++l,
(n.plainObjects||!Object.prototype.hasOwnProperty(o[1].replace(/\[|\]/g,""))||n.allowPrototypes)&&s.push(o[1]);return o&&s.push("["+e.slice(o.index)+"]"),r.parseObject(s,t,n)}},e.exports=function(e,t){if(t=t||{},t.delimiter="string"==typeof t.delimiter||i.isRegExp(t.delimiter)?t.delimiter:r.delimiter,t.depth="number"==typeof t.depth?t.depth:r.depth,t.arrayLimit="number"==typeof t.arrayLimit?t.arrayLimit:r.arrayLimit,t.parseArrays=!1!==t.parseArrays,
t.allowDots="boolean"==typeof t.allowDots?t.allowDots:r.allowDots,t.plainObjects="boolean"==typeof t.plainObjects?t.plainObjects:r.plainObjects,t.allowPrototypes="boolean"==typeof t.allowPrototypes?t.allowPrototypes:r.allowPrototypes,t.parameterLimit="number"==typeof t.parameterLimit?t.parameterLimit:r.parameterLimit,t.strictNullHandling="boolean"==typeof t.strictNullHandling?t.strictNullHandling:r.strictNullHandling,""===e||null===e||void 0===e)return t.plainObjects?Object.create(null):{}
;for(var n="string"==typeof e?r.parseValues(e,t):e,a=t.plainObjects?Object.create(null):{},o=Object.keys(n),s=0,l=o.length;s<l;++s){var c=o[s],u=r.parseKeys(c,n[c],t);a=i.merge(a,u,t)}return i.compact(a)}},function(e,t,n){e.exports={default:n(1327),__esModule:!0}},function(e,t,n){n(1328),e.exports=n(116).Number.parseFloat},function(e,t,n){var i=n(162),r=n(1329);i(i.S+i.F*(Number.parseFloat!=r),"Number",{parseFloat:r})},function(e,t,n){var i=n(179).parseFloat,r=n(827).trim
;e.exports=1/i(n(591)+"-0")!=-1/0?function(e){var t=r(String(e),3),n=i(t);return 0===n&&"-"==t.charAt(0)?-0:n}:i},function(e,t,n){e.exports={default:n(1331),__esModule:!0}},function(e,t,n){n(1332),e.exports=n(116).Number.parseInt},function(e,t,n){var i=n(162),r=n(1333);i(i.S+i.F*(Number.parseInt!=r),"Number",{parseInt:r})},function(e,t,n){var i=n(179).parseInt,r=n(827).trim,a=n(591),o=/^[-+]?0[xX]/;e.exports=8!==i(a+"08")||22!==i(a+"0x16")?function(e,t){var n=r(String(e),3)
;return i(n,t>>>0||(o.test(n)?16:10))}:i},function(e,t,n){n(1335),e.exports=n(116).Object.keys},function(e,t,n){var i=n(462),r=n(390);n(828)("keys",function(){return function(e){return r(i(e))}})},function(e,t,n){e.exports={default:n(1337),__esModule:!0}},function(e,t,n){n(1338),n(1343),e.exports=n(596).f("iterator")},function(e,t,n){"use strict";var i=n(1339)(!0);n(829)(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){var i=n(585),r=n(459);e.exports=function(e){return function(t,n){var a,o,s=String(r(t)),l=i(n),c=s.length;return l<0||l>=c?e?"":void 0:(a=s.charCodeAt(l),a<55296||a>56319||l+1===c||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536)}}},function(e,t,n){"use strict";var i=n(594),r=n(458),a=n(595),o={};n(317)(o,n(322)("iterator"),function(){return this}),
e.exports=function(e,t,n){e.prototype=i(o,{next:r(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var i=n(318),r=n(389),a=n(390);e.exports=n(319)?Object.defineProperties:function(e,t){r(e);for(var n,o=a(t),s=o.length,l=0;s>l;)i.f(e,n=o[l++],t[n]);return e}},function(e,t,n){var i=n(179).document;e.exports=i&&i.documentElement},function(e,t,n){n(1344)
;for(var i=n(179),r=n(317),a=n(593),o=n(322)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){
var c=s[l],u=i[c],d=u&&u.prototype;d&&!d[o]&&r(d,o,c),a[c]=a.Array}},function(e,t,n){"use strict";var i=n(1345),r=n(1346),a=n(593),o=n(320);e.exports=n(829)(Array,"Array",function(e,t){this._t=o(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,r(1)):"keys"==t?r(0,n):"values"==t?r(0,e[n]):r(0,[n,e[n]])},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e,t){e.exports=function(){}},function(e,t){
e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){n(833),n(1352),n(1353),n(1354),e.exports=n(116).Symbol},function(e,t,n){var i=n(460)("meta"),r=n(270),a=n(272),o=n(318).f,s=0,l=Object.isExtensible||function(){return!0},c=!n(271)(function(){return l(Object.preventExtensions({}))}),u=function(e){o(e,i,{value:{i:"O"+ ++s,w:{}}})},d=function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,i)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[i].i
},p=function(e,t){if(!a(e,i)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[i].w},h=function(e){return c&&f.NEED&&l(e)&&!a(e,i)&&u(e),e},f=e.exports={KEY:i,NEED:!1,fastKey:d,getWeak:p,onFreeze:h}},function(e,t,n){var i=n(390),r=n(589),a=n(461);e.exports=function(e){var t=i(e),n=r.f;if(n)for(var o,s=n(e),l=a.f,c=0;s.length>c;)l.call(e,o=s[c++])&&t.push(o);return t}},function(e,t,n){var i=n(825);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){
var i=n(320),r=n(834).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return r(e)}catch(e){return o.slice()}};e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?s(e):r(i(e))}},function(e,t){},function(e,t,n){n(597)("asyncIterator")},function(e,t,n){n(597)("observable")},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a={bindToModel:function(){
this.bindings&&r.a.each(r.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];r.a.each(i,function(i){var a={obj:t,name:"change:"+i,callback:r.a.bind(this.renderBinding,this,e,n,t)};this._bindingListeners||(this._bindingListeners=[]),this._bindingListeners.push(a),this.listenTo(a.obj,a.name,a.callback)},this),this.renderBinding(e,n,t)}},this)},unbindFromModel:function(){
this.bindings&&(r.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),a=t.formatter,o=!!t.isHtml,s=t.autohide,l=t.hiddenClass||"hidden",c=n.get(t.modelAttribute);if(a&&(c=a.call(this,c,i)),s){var u=r.a.isFunction(s)?s.call(this,c):c;i.toggleClass(l,!u)}t.manual||(!o&&r.a.isString(c)&&(c=r.a.escape(c)),i.html(c))}};t.a=a},,,function(e,t,n){"use strict";var i=n(12)
;n.n(i).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(12);n.n(i).a.fn.isDisabled=function(){return this.hasClass("disabled")||this.hasClass("active")||this.hasClass("hidden")}},function(e,t,n){"use strict";var i=n(12)
;n.n(i).a.fn.triggerReflow=function(){var e=this[0];return e&&e.offsetHeight,this}},function(e,t,n){"use strict";function i(){r.a.trigger("initialize:app");var e=Object(l.a)();return e=e.then(h.a),e=e.then(f.a),e=e.then(v.a),e=e.then(m.a),e=e.then(o.a),e=e.then(s.a),e=e.then(y.a),e=e.then(b.a),a.a.get("allowCloudPubSub")&&(e=e.then(function(){return Object(u.a)()})),e=e.then(p.a),e=e.then(I.a),e=e.then(S.a),e=e.then(d.a),e=e.then(M.a),e=e.then(g.a),e=e.then(c.a),e=e.then(D.a)}t.a=i
;var r=n(17),a=n(62),o=n(1363),s=n(1364),l=n(1366),c=n(1368),u=n(1370),d=n(1387),p=n(1389),h=n(1391),f=n(1394),v=n(1573),g=n(1577),m=n(1579),y=n(1580),b=n(1582),I=n(1591),S=n(1593),M=n(1595),D=n(1597),C=n(3696),O=(n.n(C),n(3697)),j=(n.n(O),n(3698)),P=(n.n(j),n(3699)),w=(n.n(P),n(3700));n.n(w)},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,allowLoopbackDiscovery:"http:"===window.location.protocol,allowSSO:!1};t.default=i},function(e,t,n){"use strict";function i(e){return c.a.isString(e)&&e.trim().length>0}function r(e,t){var n=Object(f.a)();return Object(p.a)("[appModelInitializer] Generating new %s [%s]",t,n),e.set(t,n),d.a.set(t,n)}function a(e,t){var n=void 0,a=e.get(t);return i(a)?n=d.a.set(t,a):(n=d.a.get(t),n=n.then(function(n){
if(!i(n))return p.a.error("[appModelInitializer] Invalid %s found in storage [%s]",t,a),r(e,t);e.set(t,n)},function(){return Object(p.a)("[appModelInitializer] Failed to read %s from storage",t),r(e,t)})),n}function o(e){var t=d.a.get("skipSignIn");return t.always(function(t){e.set("skipSignIn","1"===t)}),t}function s(){var e=Object(u.d)("appModel");return Object(h.a)(a(e,"clientID"),a(e,"anonymousClientID"),o(e))}t.a=s;var l=n(5),c=n.n(l),u=n(15),d=n(163),p=n(30),h=n(463),f=n(598)
},function(e,t,n){"use strict";function i(){return a.a.ajaxPrefilter(o.a),s.a.startListening(),a.a.Deferred().resolve().promise()}t.a=i;var r=n(12),a=n.n(r),o=n(1365),s=n(211)},function(e,t,n){"use strict";function i(e){var t=e.type,n=e.contentType,i=e.headers,r=e.allowHeadersInUrl,h=e.allowBlacklistedMethodHeaders;if(r&&(!l[t]||h)){var f={},v=!1;if(a.a.each(i,function(e,t){c[t]||(d.test(t)?(v=!0,f[t]=e,
delete i[t]):s.a.warn('Did not move header "%s" to query string. This can result in an unnecessary OPTIONS preflight request.',t))}),v){var g=e.url.match(p),m=g||[null,e.url,null],y=m[1],b=m[2],I=b?b.split("&"):[],S=a.a.partition(I,function(e){return d.test(e)}),M=S[0],D=S[1],C=e.data;"GET"===t&&C&&(D.push(a.a.isString(C)?C:o.stringifyParams(C)),delete e.data),M.forEach(function(e){var t=e.match(d);t&&delete f[t[1]]});var O=o.stringifyParams(f);O&&M.push(O),e.url=y+"?"+D.concat(M).join("&")}
n&&!u.test(n)&&s.a.warn('Sending %s request with Content-Type "%s". This can result in an unnecessary OPTIONS preflight request.',t,n)}}t.a=i;var r=n(5),a=n.n(r),o=n(19),s=n(30),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,p=/(^[^\?]+)\?(.+$)/},function(e,t,n){"use strict";function i(){
s.a.init("https://540fa70dba644b8dbd34d61a56bd1e72@sentry.io/160686");var e={lifecycle:"started",release:"3.53.7-1c80782",version:o.a.prop("X-Plex-Version")};return o.a.props.forEach(function(t){var n=o.a.prop(t);n&&(e[t]=n)}),s.a.set(e),s.a.enable(),a.a.Deferred().resolve().promise()}t.a=i;var r=n(12),a=n.n(r),o=n(391),s=n(838);n(1367)},function(e,t,n){"use strict";n(30)},function(e,t,n){"use strict";function i(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(o.d)("metrics"),n=e.context,i=void 0===n?{}:n;return t.set({deviceIdentifier:l.a.prop("X-Plex-Client-Identifier"),context:a()({},i,{device:{product:l.a.prop("X-Plex-Product"),version:l.a.prop("X-Plex-Version"),platform:l.a.prop("X-Plex-Platform"),platformVersion:l.a.prop("X-Plex-Platform-Version"),device:l.a.prop("X-Plex-Device"),model:l.a.prop("X-Plex-Model"),screenResolution:l.a.prop("X-Plex-Device-Screen-Resolution"),
layout:"desktop",environment:Object(c.a)()}})}),Object(s.a)(t.start())}t.a=i;var r=n(7),a=n.n(r),o=n(15),s=n(151),l=n(391),c=n(1369)},function(e,t,n){"use strict";function i(){return"bundled"}t.a=i},function(e,t,n){"use strict";function i(e){return e.get("isCloud")}function r(){if(l.a.hasWebSocket){new u.a({name:"CloudServerEventManager",appModel:Object(s.d)("appModel"),isValidServer:i,supportsLongPolling:!0,showTimelineStatus:!1,ServerEventConnection:c.a,ServerRetryManager:d.a}).start()}
return o.a.Deferred().resolve().promise()}t.a=r;var a=n(12),o=n.n(a),s=n(15),l=n(83),c=n(1371),u=n(843),d=n(845)},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(15),l=n(17),c=n(69),u=n(83),d=n(211),p=n(67),h=n(19),f=n(89),v=n(274),g=c.a.extend({lastModified:null,eTag:null,mixins:f.a,url:function(){var e=s.d("appModel"),t=e.get("user"),n="/sub/"+this.requestType+"/"+t.id+"/"+e.get("clientID"),i=new v.a({scheme:"websockets"===this.requestType?"wss":"https",
address:"pubsub.plex.tv"});return this.server.resolveUrl(n,{connection:i,appendToken:!0})},initialize:function(e){r.a.bindAll(this,"onSocketOpen","onSocketClose","onSocketError","onSocketMessage","onPingTimeout","onPollSuccess","onPollError"),this.server=e.server},open:function(){return(this.socket||this.pollRequest)&&this.close(),u.a.hasWebSocket?(this._deferred=o.a.Deferred(),this.requestType="websockets",this.socket=new window.WebSocket(r.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.cancelPing(),this.socket.onopen=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,
this.socket.close(),this.socket=null)},schedulePing:function(){this.cancelPing(),this._pingTimeoutID=setTimeout(this.onPingTimeout,3e4)},cancelPing:function(){this._pingTimeoutID&&(clearTimeout(this._pingTimeoutID),this._pingTimeoutID=null)},poll:function(){this.requestType="longpolling",this.pollUrl=h.join(r.a.result(this,"url"),{ttl:String(30)+"s"});var e=this.server.getXHROptions(this.pollUrl,{timeout:35e3})
;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=o.a.ajax(e).done(this.onPollSuccess).fail(this.onPollError),this.pollRequest.promise()},handleResponse:function(e){if(e){var t=p.a.parseXML(e);if(r.a.isObject(t)){var n=t.command;l.a.trigger("cloudServer:"+n,t)}}},onSocketOpen:function(e){this.server.set("hasEventConnection",!0),this.trigger("open",this.server,e),
this._deferred.resolve(this.server,e),this.schedulePing()},onSocketClose:function(e){this.close(),this.server.set("hasEventConnection",!1),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)},onPingTimeout:function(){this._pingTimeoutID=null,this.socket.send("hello"),this.schedulePing()},
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,t){"abort"===t?this.poll():this.pollRequest.aborting||this.trigger("error",this.server,e)}});t.a=g},function(e,t,n){e.exports={default:n(1373),__esModule:!0}},function(e,t,n){n(1374),e.exports=n(116).Number.isInteger},function(e,t,n){var i=n(162);i(i.S,"Number",{isInteger:n(1375)})
},function(e,t,n){var i=n(270),r=Math.floor;e.exports=function(e){return!i(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){"use strict";function i(e){if(null==e)return"";try{return decodeURIComponent(e)}catch(t){return r.a.warn("[Parser] Unable to parse encoded string"),e}}var r=n(30);t.a=i},function(e,t,n){"use strict";function i(e){return null==e||""===e?0:window.parseFloat(e)}t.a=i},function(e,t,n){"use strict";function i(e){try{return JSON.parse(e)}catch(n){
var t=Object(r.a)(e)?e.substring(0,50):"no response";return a.a.warn("[Parser] Unable to parse JSON: "+n.message+" ("+t+")"),{}}}var r=n(1379),a=n(30);t.a=i},function(e,t,n){"use strict";function i(e){return"[object String]"===toString.call(e)}t.a=i},function(e,t,n){"use strict";function i(e){return e?Array.isArray(e)?e:e.split(","):[]}var r=n(5);n.n(r);t.a=i},function(e,t,n){"use strict";function i(e){return null==e?"":e.toString()}t.a=i},function(e,t,n){"use strict";function i(e){
return e?"1":"0"}t.a=i},function(e,t,n){"use strict";function i(e){return e.join(",")}t.a=i},function(e,t,n){"use strict";function i(){if(void 0===a){var e="performanceReportingHost",t=window.location.search.match(new RegExp(e+"=([^&=]+)"));a=t&&t[1]?decodeURIComponent(t[1]):r.a.get(e),a=a||null}return a}t.a=i;var r=n(62),a=void 0},function(e,t,n){"use strict";var i=n(23),r=n(1386),a=i.a.extend({name:"ConnectionSourceCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict"
;var i=n(16),r=n(18),a=r.a.extend({name:"ConnectionSourceModel",context:["server"],sessionAttrs:{id:i.a.string}});t.a=a},function(e,t,n){"use strict";function i(){if(Object(c.d)("appModel").get("settings").get("companion")){var e=Object(c.d)("appModel"),t=e.get("cloudServer"),n=e.get("clientID");t&&t.get("authorized")&&n&&n!==f&&(f=n,u.a.info('[Companion] Registering player with plex.tv, clientID="%s"',n),p.a.registerPlayer(t,n).done(function(){
u.a.info('[Companion] Registered player with plex.tv, clientID="%s"',n)}).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 r(){var e=Object(c.d)("appModel"),t=e.get("cloudServer"),n=e.get("clientID");if(t.get("authorized")&&n)return u.a.info('[Companion] Unregistering player with plex.tv, clientID="%s"',n),p.a.unregisterPlayer(t,n).done(function(){
return u.a.info('[Companion] Unregistered player with plex.tv, clientID="%s"',n)}).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 a(){var e=Object(c.d)("appModel").get("settings"),t=e.get("companion");if(v!==t)return v=t,t?(h.a.subscribe(),
l.a.when(p.a.subscribe(Object(c.d)("localCompanionCommandHandler")))):(h.a.unsubscribe(),l.a.when(p.a.unsubscribe(),r()))}function o(){var e=Object(c.d)("appModel"),t=e.get("cloudServer");i(),e.on("change:clientID",i),t.on("change:authorized",i);var n=Object(c.d)("appModel").get("settings");return n.on("change:companion",a),n.get("companion")?a().then(function(){var e=p.a.getDeepLink();return e.fail(function(){u.a.warn("[Companion] Ignoring error getting deep link")}),Object(d.a)(e)
}):l.a.Deferred().resolve().promise()}t.a=o;var s=n(12),l=n.n(s),c=n(15),u=n(30),d=n(151),p=n(605),h=n(1388),f=null,v=null},function(e,t,n){"use strict";var i=n(15),r=n(17),a={subscribe:function(){r.a.on("cloudServer:processRemoteControlCommand",this.onCloudServerCommand,this)},unsubscribe:function(){r.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],mediaIndex:[t.queryMediaIndex],containerKey:[t.queryContainerKey],playQueueID:[t.queryPlayqueueid],type:[t.queryType],volume:[t.queryVolume],repeat:[t.queryRepeat],audioStreamID:[t.queryAudioStreamID],subtitleStreamID:[t.querySubtitleStreamID],token:[t.queryToken],machineIdentifier:[t.queryMachineIdentifier],protocol:[t.queryProtocol],address:[t.queryAddress],port:[t.queryPort],text:[t.queryText],field:[t.queryField]}}
;Object(i.d)("localCompanionCommandHandler")(n)}};t.a=a},function(e,t,n){"use strict";function i(e){return e.get("isFullOwnedServer")||e.get("isFullServer")&&e.supports("sharedUserNotifications")}function r(){if(l.a.hasWebSocket){new c.a({name:"MediaServerEventManager",appModel:Object(s.d)("appModel"),isValidServer:i,supportsLongPolling:!1,showTimelineStatus:!0,ServerEventConnection:Object(s.d)("mediaServerEventConnection"),ServerRetryManager:u.a}).start()}
return o.a.Deferred().resolve().promise()}t.a=r;var a=n(12),o=n.n(a),s=n(15),l=n(83),c=n(843),u=n(1390)},function(e,t,n){"use strict";var i=n(89),r=n(604),a=r.a.extend({mixins:[i.a],initialize:function(e){var t=e.appModel;r.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!(e.get("isPersonalCloudServer")&&(!t||t.id!==e.id))},
onPrimaryServerChange:function(e,t){t&&!t.get("hasEventConnection")&&(this.stop(t),this.start(t))}});t.a=a},function(e,t,n){"use strict";function i(){return new o.a,a.a.Deferred().resolve().promise()}t.a=i;var r=n(12),a=n.n(r),o=n(1392)},function(e,t,n){"use strict";var i,r=n(1393),a=n(83),o=n(30),s=(i={},i[o.a.LEVEL_LOG]={method:"log",color:"black"},i[o.a.LEVEL_DEBUG]={method:"debug",color:"#d500ff"},i[o.a.LEVEL_INFO]={method:"info",color:"blue"},i[o.a.LEVEL_WARN]={method:"warn",color:"#ff6600"
},i[o.a.LEVEL_ERROR]={method:"error",color:"red"},i),l=r.a.extend({name:"ConsoleReporter",hasSupport:function(){return a.a.hasConsole},onLogMessage:function(e){var t=e.message,n=s[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){(window.console.group||window.console.log).call(window.console,e.message)},onLogGroupCollapsed:function(e){
(window.console.groupCollapsed||window.console.log).call(window.console,e.message)},onLogGroupEnd:function(){window.console.groupEnd&&window.console.groupEnd()}});t.a=l},function(e,t,n){"use strict";var i=n(178),r=n.n(i),a=n(69),o=n(17),s=n(89),l=n(83),c=a.a.extend({mixins:s.a,name:"AbstractReporter",enabled:!1,destroyed:!1,_suspended:!1,initialize:function(){!1!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).enabled&&this.enable()},hasSupport:function(){return!0},
enable:function(){this.enabled||this.destroyed||!this.hasSupport()||(this.enabled=!0,this.listenTo(o.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:",r()(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";function i(){return o.a.registerAll(s),a.a.Deferred().resolve().promise()}t.a=i;var r=n(12),a=n.n(r),o=n(32),s=n(1395)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396)
;n.d(t,"testServerConnection",function(){return i.j}),n.d(t,"abortServerConnectionTest",function(){return i.a}),n.d(t,"populateServerIdentity",function(){return i.f}),n.d(t,"resetUser",function(){return i.g}),n.d(t,"switchUser",function(){return i.i}),n.d(t,"authenticateWithServer",function(){return i.c}),n.d(t,"authenticateWithHash",function(){return i.b}),n.d(t,"selectStream",function(){return i.h}),n.d(t,"updateWatchedStatus",function(){return i.k}),n.d(t,"deleteFile",function(){return i.d}),
n.d(t,"deleteItem",function(){return i.e});var r=n(1449);n.d(t,"refreshMetadata",function(){return r.a});var a=n(1467);n.d(t,"analyzeItems",function(){return a.a});var o=n(1468);n.d(t,"analyzeSection",function(){return o.a});var s=n(1470);n.d(t,"markWatched",function(){return s.a});var l=n(1471);n.d(t,"markUnwatched",function(){return l.a});var c=n(1472);n.d(t,"unmatch",function(){return c.a});var u=n(1473);n.d(t,"splitApart",function(){return u.a});var d=n(1474);n.d(t,"merge",function(){
return d.a});var p=n(1475);n.d(t,"deleteItems",function(){return p.a});var h=n(1476);n.d(t,"deleteMediaItem",function(){return h.a});var f=n(1481);n.d(t,"deleteVersions",function(){return f.a});var v=n(1482);n.d(t,"deleteSection",function(){return v.a});var g=n(1483);n.d(t,"deleteSectionThumbnails",function(){return g.a});var m=n(1484);n.d(t,"deletePlaylist",function(){return m.a});var y=n(1485);n.d(t,"updateLibrary",function(){return y.a});var b=n(1486);n.d(t,"optimize",function(){return b.a})
;var I=n(1487);n.d(t,"cleanBundles",function(){return I.a});var S=n(1488);n.d(t,"emptyTrash",function(){return S.a});var M=n(1489);n.d(t,"match",function(){return M.a});var D=n(1490);n.d(t,"autoMatch",function(){return D.a});var C=n(1491);n.d(t,"changeArtwork",function(){return C.a});var O=n(1492);n.d(t,"rate",function(){return O.a});var j=n(1493);n.d(t,"enableVersionGenerator",function(){return j.a});var P=n(1494);n.d(t,"disableVersionGenerator",function(){return P.a});var w=n(1495)
;n.d(t,"reprocessVersionGenerator",function(){return w.a});var T=n(1496);n.d(t,"deleteVersionGenerator",function(){return T.a});var E=n(1497);n.d(t,"deleteAllVersionGenerators",function(){return E.a});var x=n(1498);n.d(t,"installChannel",function(){return x.a});var N=n(1499);n.d(t,"updateChannel",function(){return N.a});var A=n(1500);n.d(t,"restartChannel",function(){return A.a});var L=n(1501);n.d(t,"resetChannel",function(){return L.a});var k=n(1502);n.d(t,"uninstallChannel",function(){
return k.a});var _=n(1503);n.d(t,"watchLater",function(){return _.a});var R=n(1504);n.d(t,"stopMedia",function(){return R.a});var z=n(1507);n.d(t,"connectServer",function(){return z.a});var U=n(1508);n.d(t,"reconnectServer",function(){return U.a});var B=n(1509);n.d(t,"signInServer",function(){return B.a});var V=n(1510);n.d(t,"removeServer",function(){return V.a});var F=n(1511);n.d(t,"checkForServerUpdates",function(){return F.a});var Q=n(1512);n.d(t,"installServerUpdates",function(){return Q.a})
;var H=n(1513);n.d(t,"showClaimServerAlertBar",function(){return H.a});var Y=n(1517);n.d(t,"signIn",function(){return Y.a});var W=n(1518);n.d(t,"signUp",function(){return W.a});var G=n(1519);n.d(t,"showSyncModal",function(){return G.a});var K=n(1545);n.d(t,"showHomeWarningsModal",function(){return K.a});var q=n(1558);n.d(t,"deleteSyncItem",function(){return q.a});var Z=n(1559);n.d(t,"refreshSyncLists",function(){return Z.a});var X=n(1560);n.d(t,"removeDevice",function(){return X.a})
;var J=n(1561);n.d(t,"removeFriend",function(){return J.a});var $=n(1562);n.d(t,"acceptInvite",function(){return $.a});var ee=n(1563);n.d(t,"rejectInvite",function(){return ee.a});var te=n(1564);n.d(t,"shareServer",function(){return te.a});var ne=n(1565);n.d(t,"removeServerShare",function(){return ne.a});var ie=n(1566);n.d(t,"removeHomeUser",function(){return ie.a});var re=n(1567);n.d(t,"validateUsername",function(){return re.a});var ae=n(1568);n.d(t,"toggleGuest",function(){return ae.a})
;var oe=n(1569);n.d(t,"lockUser",function(){return oe.a});var se=n(1570);n.d(t,"signOut",function(){return se.a});var le=n(1571);n.d(t,"recommend",function(){return le.a});var ce=n(1572);n.d(t,"remotePlaybackUnlock",function(){return ce.a})},function(e,t,n){"use strict";var i=n(1397);n.d(t,"j",function(){return i.a});var r=n(1398);n.d(t,"a",function(){return r.a});var a=n(1399);n.d(t,"f",function(){return a.a});var o=n(1400);n.d(t,"g",function(){return o.a});var s=n(1405);n.d(t,"i",function(){
return s.a});var l=n(1422);n.d(t,"c",function(){return l.a});var c=n(1423);n.d(t,"b",function(){return c.a});var u=n(1424);n.d(t,"h",function(){return u.a});var d=n(1426);n.d(t,"k",function(){return d.a});var p=n(1427);n.d(t,"d",function(){return p.a});var h=n(1428);n.d(t,"e",function(){return h.a})},function(e,t,n){"use strict";function i(e){return Object(r.d)("serverConnectionTestManager").queueConnectionTest(e)}var r=n(15);t.a=i},function(e,t,n){"use strict";function i(e){
return Object(r.d)("serverConnectionTestManager").abortConnectionTest(e)}var r=n(15);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,n=e.connection;if(t.id)return s.a.Deferred().resolve(t.id).promise();var i=t.resolveUrl("/identity",{connection:n}),r=a.a.extend(t.getXHROptions(i),{timeout:t.connectionTestTimeout});Object(c.a)("[Identity] Requesting the machine identifier of "+t.get("debugName")+" at "+i);var o=s.a.ajax(r).promise();return o=o.then(function(e){
var n=s.a.Deferred(),i=l.a.parseXML(e),r=i&&i.machineIdentifier;return r?(Object(c.a)("[Identity] Machine identifier found for "+t.get("debugName")+": "+r),!t.collection||t.collection.get(r)?n.resolve(r):(t.collection.populateServer({isCloud:!0}).done(function(e){e.get("resources").populate().always(function(){n.resolve(r)})}),t.collection.findServer({isCloud:!0}).done(function(e){e.populate().fail(function(){n.resolve(r)})}).fail(function(){n.resolve(r)}))):n.reject(),n.promise()}),
o.fail(function(){c.a.warn("[Identity] Machine identifier not found for "+t.get("debugName")+" at "+i)}),o}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(58),c=n(30);t.a=i},function(e,t,n){"use strict";function i(){var e=Object(r.d)("appStore"),t=Object(r.d)("appModel"),n=t.get("ui"),i=t.get("user"),u=t.get("fakeRouter"),d=i.server,p=i.clearAccessToken();return p.fail(function(){s.a.warn("Failed to clear the access token and user storage")}).always(function(){t.set("history",[]),
n&&n.restoreDefaults(),u&&u.restoreDefaults(),c.a.abortAll(),i.signOut(),i.uninitialize(),i.initialize(),e.dispatch(Object(l.e)({budget:1/0})),a.a.trigger("clearAll:cache"),d.cache.store(d)}),Object(o.a)(p)}var r=n(15),a=n(17),o=n(151),s=n(30),l=n(240),c=n(211);t.a=i},function(e,t,n){"use strict";function i(e,t){return Object(u.a)(e)?r(e,t):Array.isArray(e)?a(e,t):e===t}function r(e,t){for(var n=e.possibleEntityContainers,r=n?n.length:0,a=0;a<r;a++){if(i(e[n[a]],t))return!0}return!1}
function a(e,t){for(var n=0,r=e.length;n<r;n++){if(i(e[n],t))return!0}return!1}function o(e,t){return e+1>=t?0:e+1}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null!=t.budget?t.budget:d,r=window.performance.now(),a=e.entities,s=c()(a),l=s.length,u={},g=s[p],m=a[g];for(f=p,v=Math.max(Math.min(h,c()(m).length-1),0);p<l;){for(var y=s[p],b=a[y],I=c()(b),S=I.length,M=o(p,l);h<S;){var D=I[h],C=o(h,S);if(i(e,D)||(u[y]||(u[y]=[]),u[y].push(D)),M===f&&C===v)return p=M,
h=C,u;if(window.performance.now()-r>=n)return p=M,h=C,u;h++}if(p=M,h=0,p===f&&h===v)return u}return u}t.a=s;var l=n(50),c=n.n(l),u=n(392),d=1e3/60,p=0,h=0,f=void 0,v=void 0},function(e,t,n){e.exports={default:n(1403),__esModule:!0}},function(e,t,n){n(1404),e.exports=n(116).Object.getPrototypeOf},function(e,t,n){var i=n(462),r=n(831);n(828)("getPrototypeOf",function(){return function(e){return r(i(e))}})},function(e,t,n){"use strict";function i(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(a.d)("appModel").get("user"),n=t.get("signedIn"),i=t.id!==e.homeUser.id,o=e.allowGuestLock,c=!!e.isRemoteUser,u=i||o,d=n?s.a.execute("authenticateWithServer",e):s.a.execute("authenticateWithHash",e);return n&&u?d=d.then(function(t){return r(t,e)}):d.done(function(){t.set({isRemote:c,lockState:l.a.lockStates.UNLOCKED})}),d}function r(e,t){var n=Object(a.d)("appModel").get("user"),i=s.a.execute("resetUser")
;return i=i.then(function(){return n.activateStoredUser(t.homeUser.id),o.a.trigger("reset:servers"),n.signIn(e,{lockState:l.a.lockStates.UNLOCKED})}),i.done(function(){Object(a.d)("metrics").trackEvent({event:"client:switchuser",interaction:!0})}),i}var a=n(15),o=n(17),s=n(32),l=n(241);t.a=i},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 r(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}function a(){SHA256_H=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),SHA256_buf=new Array,SHA256_len=0}function o(e){SHA256_buf="string"==typeof e?SHA256_buf.concat(n(e)):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 s(){
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 SHA256_H=null,SHA256_buf=null,SHA256_len=null,t}function l(e){var t;return a(),o(e),t=s(),i(t)}function c(e){HMAC_SHA256_key="string"==typeof e?n(e):(new Array).concat(e),HMAC_SHA256_key.length>64&&(a(),o(HMAC_SHA256_key),HMAC_SHA256_key=s());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;a(),o(HMAC_SHA256_key)}function u(e){o(e)}function d(){
for(var e=s(),t=0;t<64;t++)HMAC_SHA256_key[t]^=106;a(),o(HMAC_SHA256_key),o(e);for(var t=0;t<64;t++)HMAC_SHA256_key[t]=0;return HMAC_SHA256_key=null,s()}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function h(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 v(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function g(e,t,n){return n^e&(t^n)}function m(e,t,n){return e&t^n&(e^t)}function y(e,t){
for(var n=16;n<64;n++)t[n]=h(t[n-2])+t[n-7]+p(t[n-15])+t[n-16]&4294967295;for(var i=(new Array).concat(e),n=0;n<64;n++){var r=i[7]+v(i[4])+g(i[4],i[5],i[6])+SHA256_K[n]+t[n],a=f(i[0])+m(i[0],i[1],i[2]);i.pop(),i.unshift(r+a&4294967295),i[4]=i[4]+r&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=r,t.SHA256_hash=l,t.HMAC_SHA256_init=c,t.HMAC_SHA256_write=u,t.HMAC_SHA256_finalize=d},function(e,t,n){"use strict";function i(e){function t(){window.document.body.removeChild(c),window.removeEventListener("message",n),clearTimeout(l)}function n(e){if(e.source===c.contentWindow){var n=void 0;try{n=JSON.parse(e.data)}catch(e){}n&&(o(n),t())}}var i=e.url,r=e.data,o=e.onMessage,s=e.timeout,l=setTimeout(function(){o({success:!1}),t()},s);window.addEventListener("message",n)
;var c=window.document.createElement("iframe");c.style.display="none",c.src=i+"#"+encodeURIComponent(a()({data:r})),window.document.body.appendChild(c)}var r=n(178),a=n.n(r);t.a=i},function(e,t,n){"use strict";var i=n(23),r=n(1409),a=i.a.extend({name:"StoredUserCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(16),o=n(18),s=n(1410),l=n(848),c=n(849),u=n(851),d=n(852),p=n(853),h=o.a.extend({name:"StoredUserModel",additionalRelations:["servers"],syncedAttrs:{
id:a.a.integer,authToken:a.a.string,username:a.a.string,email:a.a.string,title:a.a.string,thumb:a.a.string,pin:a.a.string,home:a.a.boolean,restricted:a.a.boolean,guest:a.a.boolean,hasAllEntitlements:a.a.boolean,lastPrimaryServerID:a.a.string},syncedRelations:{subscription:{relationClass:c.a},roles:{relationClass:u.a},entitlements:{relationClass:d.a},providers:{relationClass:p.a},servers:{relationClass:s.a},features:{relationClass:l.a}},copyFromUser:function(e){var t=this,n={}
;r.a.each(this.syncedAttrs,function(t,i){n[i]=e.get(i)}),r.a.each(this.syncedRelations,function(n,i){if(!r.a.contains(t.additionalRelations,i)){var a=t.get(i),o=e.get(i);if(o){var s=o.toJSON();a.set(a.parse(s))}}}),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(23),r=n(847),a=i.a.extend({name:"StoredServerCollection",model:r.a});t.a=a},function(e,t,n){"use strict"
;var i=n(23),r=n(1412),a=i.a.extend({name:"StoredConnectionCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(1413),o=r.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:a.a}}});t.a=o},function(e,t,n){"use strict";var i=n(23),r=n(1414),a=i.a.extend({name:"StoredConnectionSourceCollection",model:r.a});t.a=a
},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"StoredConnectionSourceModel",syncedAttrs:{id:i.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"UserFeatureModel",idAttribute:"uuid",syncedAttrs:{uuid:i.a.string.isRequired}});t.a=a},function(e,t,n){"use strict";var i=["Active","Inactive","Canceled"];t.a=i},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"UserRoleModel",syncedAttrs:{id:i.a.string}});t.a=a
},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"UserEntitlementModel",syncedAttrs:{id:i.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"UserProviderModel",syncedAttrs:{id:i.a.string,territory:i.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(67),o=n(117),s=o.a.extend({url:"/api/home",whitelistedAttrs:["id","guestUserID","guestEnabled","name"],convert:function(e){var t=r.a.isObject(e)?e:a.a.parseXML(e)
;return a.a.parseInteger(t,"id"),a.a.parseBoolean(t,["guestEnabled"]),t},parse:function(e){var t=this.convert(e);return t=r.a.pick(t,this.whitelistedAttrs)},getSaveParams:function(e,t){return r.a.isEmpty(e)?{guestEnabled:this.get("guestEnabled")?"1":"0"}:o.a.prototype.getSaveParams.apply(this,arguments)}});t.a=s},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"UserProfileModel",context:["server"],url:"/api/v2/user/profile",syncedAttrs:{autoSelectAudio:i.a.boolean,
autoSelectSubtitle:i.a.integer,defaultAudioLanguage:i.a.string,defaultSubtitleLanguage:i.a.string}});t.a=a},function(e,t,n){"use strict";function i(e){var t=e.homeUser,n=r.d("appModel"),i=n.get("user"),l=t.get("uuid")||i.get("uuid"),c={pin:e.pin},u=a.join(["/api/v2/home/users/",l,"/switch"],c),d=t.server.getXHROptions(u,{type:"POST",xhrFields:{withCredentials:s.a.get("allowSSO")}});return Object(o.a)(d)}var r=n(15),a=n(19),o=n(606),s=n(62);t.a=i},function(e,t,n){"use strict";function i(e){
var t=a.a.Deferred().resolve().promise(),n=a.a.Deferred().reject().promise(),i=s.a.getActiveUser();if(!i)return n;var r=i.get("pin"),l=i.get("authToken");return r||e.pin?r===Object(o.d)("appModel").get("user").hashPIN(e.pin,l)?t:n:t}var r=n(12),a=n.n(r),o=n(15),s=n(164);t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a.Deferred(),n=e.item,i=n.server,r=e.media||a.a.first(n.get("Media")),o=e.part||r&&a.a.first(r.Part),p=e.streamType,h=e.streamID;if(!r||!o)return t.reject().promise()
;var f={};f[p.key]=h,!e.media&&i.supports("allPartsStreamSelection")&&(f.allParts=1);var v=d.join(["/library/parts/",o.id],f),g=a.a.extend(i.getXHROptions(v),{type:"PUT"}),m=s.a.ajax(g);return m.done(function(){Object(u.a)(r,p,h),n.trigger("change:streams"),t.resolve()}),m.fail(function(e){c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem selecting the stream for this item.")}),t.reject(e)}),t.promise()}
var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(1425),d=n(19);t.a=i},function(e,t,n){"use strict";function i(e,t,n){if(e){var i=Object(o.a)(e,{streamType:t.id});a.a.each(i,function(e){e.selected=e.id===n})}}var r=n(5),a=n.n(r),o=n(243);t.a=i},function(e,t,n){"use strict";function i(e){var t,n,i=e.watched;e.item?(t=e.item,n=[t]):e.items&&(n=e.items,t=n[0]);var o=s.a.map(n,function(e){var t=i?"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 o=h.join(["/:/",t],n),s=c.a.ajax(e.server.getXHROptions(o));return s.done(function(){a(e,i),r(e,i)}),s}),l=c.a.when.apply(c.a,o);return l.fail(function(){var e;e=i?Object(u.default)("There was a problem marking this item as watched."):Object(u.default)("There was a problem marking this item as unwatched."),d.a.trigger("show:alert",{type:"error",message:e})}),l}function r(e,t){
if(Object(p.u)(e.get("type"))){e.set({unviewedLeafCount:t?0:e.get("leafCount"),viewedLeafCount:t?e.get("leafCount"):0});var n=e.get("children")||e.get("items");n&&n.getCollection().each(function(e){r(e,t)})}else e.set({viewOffset:0,viewCount:t?1:0})}function a(e,t){var n,i=Object(p.r)(e.get("type")),r=e.parent;if(r&&r.get("isMetadataList")&&(r=r.parent),r&&(n=Object(p.r)(r.get("type"))),n&&n.typeString===i.parent){var o,s=Object(p.u)(e.get("type"))
;t?o=s?e.get("unviewedLeafCount"):1:(o=s?e.get("viewedLeafCount"):1,o*=-1),r.set({unviewedLeafCount:r.get("unviewedLeafCount")-o,viewedLeafCount:r.get("viewedLeafCount")+o}),a(r,t)}}var o=n(5),s=n.n(o),l=n(12),c=n.n(l),u=n(4),d=n(17),p=n(28),h=n(19);t.a=i},function(e,t,n){"use strict";function i(e){var t,n=e.item,i=e.media,r=n.server;if(i){var o="/library/metadata/"+n.id+"/media/"+i.id,u=a.a.extend(r.getXHROptions(o),{type:"DELETE"});t=s.a.ajax(u),t.done(function(){var t=e.item.get("Media")
;t.splice(a.a.indexOf(t,i),1),n.trigger("change:Media",n,n.get("Media"))})}else t=n.destroy({wait:!0});return t.fail(function(e){var t=403===e.status?Object(l.default)("Ensure that media deletion is enabled for library content in your server settings."):Object(l.default)("There was a problem deleting this item.");c.a.trigger("show:alert",{type:"error",message:t})}),t}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17);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=r(t.get("parentKey"),e);if(!n)return void a(e);if(n.get("children").getCollection().length)return void o(n.get("key"),e);n.trigger("destroy",n,n.collection);var i=r(t.get("grandparentKey"),e);if(!i)return void a(e);i.get("children").getCollection().length?o(i.get("key"),e):a(e)}),t}function r(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 a(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 o(e,t){if(!t.skipRedirect){var n=t.item;c.a.trigger("navigate","details",{serverID:n.server.id,key:e,replace:!0})}}var s=n(5),l=n.n(s),c=n(17),u=n(32),d=n(77);t.a=i},function(e,t,n){"use strict";function i(e,t,n){Array.isArray(t)||(t=[t]);var i=t.join("|"),r=new RegExp("<("+i+")","g"),a=new RegExp("</("+i+")>","g")
;return e.replace(r,"<"+n+' elementName="$1"').replace(a,"</"+n+">")}t.a=i},function(e,t,n){"use strict";function i(e){a||(a=Object(r.o)().map(function(e){return e.typeString}).join("|"));var t=new RegExp('<Directory([^>]*?)type="('+a+')"([\\s\\S]*?)</Directory>',"gm"),n=new RegExp('<Directory([^>]*?)type="('+a+')"([\\s\\S]*?)/>',"gm");return e.replace(t,'<Metadata$1type="$2" elementName="Directory"$3</Metadata>').replace(n,'<Metadata$1type="$2" elementName="Directory"$3/>')}var r=n(28),a=void 0
;t.a=i},function(e,t,n){"use strict";function i(e,t){return e?e===r.c.LIBRARY_PROVIDER_IDENTIFIER:/^(\/sync\/[\w\d-\/]*)?\/library\//.test(t)}t.a=i;var r=n(55)},function(e,t,n){"use strict";var i=n(23),r=n(1433),a=i.a.extend({name:"ProviderDirectoryCollection",context:["server","provider"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"ProviderDirectoryModel",context:["server","provider"],syncedAttrs:{key:i.a.string,hubKey:i.a.string,title:i.a.string,
icon:i.a.string,type:i.a.string,subtype:i.a.string,agent:i.a.string,updatedAt:i.a.integer,scannedAt:i.a.integer,context:i.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(1435),a=i.a.extend({name:"ProviderSettingOptionsCollection",context:["server","provider"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"ProviderSettingOptionsModel",context:["server","provider"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:i.a.string,
title:i.a.string,type:i.a.string,selected:i.a.boolean}});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(1437),a=i.a.extend({name:"ProviderCountryCollection",context:["server","provider"],url:"https://services.provider.plex.tv/location/countries",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({name:"ProviderCountryModel",context:["server","provider"],idAttribute:"code",rootPropertyName:"Country",syncedAttrs:{code:r.a.string,title:r.a.string,
postalCodeFormat:r.a.string,flavor:r.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(324),a=i.a.extend({name:"ProviderActionCollection",context:["server","provider"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"TranscodeSessionModel",context:["server"],url:function(){return"/transcode/sessions/"+this.id},syncedAttrs:{key:i.a.string,progress:i.a.float,throttled:i.a.boolean,speed:i.a.float,duration:i.a.integer,videoDecision:i.a.string,
audioDecision:i.a.string,protocol:i.a.string,container:i.a.string,videoCodec:i.a.string,audioCodec:i.a.string,audioChannels:i.a.integer,width:i.a.string,height:i.a.string,transcodeHwDecoding:i.a.string,transcodeHwEncoding:i.a.string,timeStamp:i.a.integer,minOffsetAvailable:i.a.integer,maxOffsetAvailable:i.a.integer}});t.a=a},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 r=e[n],a=r.Part;if(a)for(var o=0,s=a.length;o<s;o++){
var l=a[o],c=l.Stream;c&&(t+=c.length)}}return t}function r(e){var t=0;if(!e)return t;for(var n=0,i=e.length;n<i;n++){var r=e[n],a=r.Part;if(a)for(var o=0,s=a.length;o<s;o++){var l=a[o];null!=l.exists&&null!=l.accessible&&t++}}return t}function a(e){return e&&e.some(function(e){return e.protocol===f.b.LIVE_TV})}function o(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t){return e[t.id]=t,e},{})}function s(e,t){if(!t)return null
;var n=o(e),i=o(t),r=h()({},n,i);return d()(r).map(function(e){return r[e]})}function l(e,t){var n=i(t),a=i(e);if(n>a)return t;if(n===a){if(r(t)>=r(e))return t}return null}function c(e,t,n){if(g.hasOwnProperty(e))return n;if(m.hasOwnProperty(e)&&n&&n.length){if(!t||n.length>t.length)return n;if(n.length===t.length){var i=t&&t[0],r=n&&n[0];if(!i&&r)return n;if(!r&&i)return t;var o=d()(i).length;if(d()(r).length>o)return n}}if("Media"===e){if(n&&!t)return n;var c=a(n||t)?s(t,n):l(t,n)
;if(c)return c}return Object(v.a)(e,t,n)}t.a=c;var u=n(50),d=n.n(u),p=n(7),h=n.n(p),f=n(55),v=n(470),g={viewedLeafCount:!0,viewCount:!0,viewOffset:!0,subscriptionID:!0,grandparentSubscriptionID:!0,subscriptionType:!0,grandparentSubscriptionType:!0},m={Director:!0,Producer:!0,Writer:!0,Genre:!0,Mood:!0,Country:!0,Label:!0,Role:!0,Location:!0,Tag:!0,Autotag:!0}},function(e,t,n){"use strict";var i=n(23),r=n(1442),a=i.a.extend({name:"ChapterCollection",context:["server","section"],model:r.a,
modelId:function(e){return e.id+"_"+e.index}});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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=a},function(e,t,n){"use strict";var i=n(23),r=n(1444),a=i.a.extend({name:"OverlayCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){"use strict"
;var i=n(16),r=n(18),a=r.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=a},function(e,t,n){"use strict";var i=n(23),r=n(1446),a=i.a.extend({name:"ConcertCollection",context:["server","section"],
model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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=a},function(e,t,n){"use strict";var i=n(97),r=n(23),a=n(1448),o=r.a.extend({name:"MetadataDirectoryCollection",context:["server","provider"],model:a.a,responseType:function(){return Object(i.a)(this.server)}});t.a=o},function(e,t,n){
"use strict";var i=n(43),r=n(40),a=n(28),o=n(97),s=n(16),l=n(18),c=l.a.extend({name:"MetadataDirectoryModel",context:["server","provider"],entityType:i.f,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(r.a)(this.entityType,e.key,this.provider.entityID())},idAttribute:"key",responseType:function(){return Object(o.a)(this.server)},syncedAttrs:{key:s.a.string,title:s.a.string,containerKey:s.a.string,typeKey:s.a.string,type:s.a.string,
subtype:s.a.string,thumb:s.a.string,icon:s.a.string,content:s.a.boolean,context:s.a.string},augmentResponse:function(e){var t=e.key;if(/\/library\/sections\/\d+\/collection/.test(t)){var n=t.match(/\d+/g)[0],i=Object(a.r)(a.d).id,r="/library/sections/"+n,o=r+"/all?type="+i;e.containerKey=r,e.typeKey=o,e.content=!0}return e}});t.a=c},function(e,t,n){"use strict";function i(e){var t,n;return e.item?(t=e.item,n=[t]):(n=e.items,t=n[0]),s.a.when.apply(s.a,a.a.map(n,function(e){
var n="/library/metadata/"+e.id+"/refresh",i=a.a.extend(t.server.getXHROptions(n),{type:"PUT"});return s.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:Object(l.default)("There was a problem refreshing.")})})}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(394);t.a=i},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=" "+m(i(n(3)).call(e,"Internet Required",{hash:{},data:t}))+" "}function l(e,t){var r="";return r+=" "+m(i(n(3)).call(e,"Plex Pass Required",{hash:{},data:t}))+" "}function c(e,t){var r="";return r+=" "+m(i(n(3)).call(e,"This server cannot reach the Internet. Please verify connectivity and try again.",{hash:{},data:t}))+" "}function u(e,t){var r=""
;return r+=" "+m(i(n(3)).call(e,"This library requires your server be signed in to a Plex Pass account.",{hash:{},data:t}))+" "}function d(e,t){var r="";return r+=' <button type="button" class="confirm-btn btn btn-lg btn-primary">'+m(i(n(3)).call(e,"OK",{hash:{},data:t}))+"</button> "}function p(e,t){var n,i="";return i+=' <a class="confirm-btn btn btn-lg btn-primary" href="'+m((n=e&&e.serverSettingsRoute,typeof n===y?n.apply(e):n))+'"> ',n=r.if.call(e,e&&e.isSignedIn,{hash:{},
inverse:b.program(14,f,t),fn:b.program(12,h,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> "}function h(e,t){var r="";return r+=" "+m(i(n(3)).call(e,"Settings",{hash:{},data:t}))+" "}function f(e,t){var r="";return r+=" "+m(i(n(3)).call(e,"Sign In",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var v,g="",m=this.escapeExpression,y="function",b=this
;return g+='<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> ',v=r.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:b.program(3,l,o),fn:b.program(1,s,o),data:o}),(v||0===v)&&(g+=v),g+=' </h4> </div> <div class="modal-body"> <p class="confirm-message"> ',
v=r.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:b.program(7,u,o),fn:b.program(5,c,o),data:o}),(v||0===v)&&(g+=v),g+=' </p> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+m(i(n(3)).call(t,"Ignore",{hash:{},data:o}))+"</button> ",v=r.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:b.program(11,p,o),fn:b.program(9,d,o),data:o}),(v||0===v)&&(g+=v),g+=" </div> </div> </div> "})},function(e,t,n){"use strict"
;var i=n(615),r=n(859).default,a=n(617).default,o=n(616),s=n(1452),l=function(){var e=new i.HandlebarsEnvironment;return o.extend(e,i),e.SafeString=r,e.Exception=a,e.Utils=o,e.VM=s,e.template=function(t){return s.template(t,e)},e},c=l();c.create=l,t.default=c,e.exports=c},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=p[n],r=p[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 ("+r+").")}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 r(e,t){if(!t)throw new u("No environment passed to template");var n=function(e,n,i,r,a,o){
var s=t.VM.invokePartial.apply(this,arguments);if(null!=s)return s;if(t.compile){var l={helpers:r,partials:a,data:o};return a[n]=t.compile(e,{data:void 0!==o},t),a[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=o(e,t,n):i||(i=this.programs[e]=o(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,r){r=r||{};var a,o,s=r.partial?r:t;r.partial||(a=r.helpers,o=r.partials);var l=e.call(i,s,n,a,o,r.data);return r.partial||t.VM.checkRevision(i.compilerInfo),l}}function a(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=function(e,r){return r=r||{},t.apply(this,[e,r.data||n].concat(i))};return r.program=e,r.depth=i.length,r}function o(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 s(e,t,n,i,r,a){var o={partial:!0,helpers:i,partials:r,data:a};if(void 0===e)throw new u("The partial "+t+" could not be found");if(e instanceof Function)return e(n,o)}function l(){return""}var c=n(616),u=n(617).default,d=n(615).COMPILER_REVISION,p=n(615).REVISION_CHANGES;t.checkRevision=i,t.template=r,t.programWithDepth=a,t.program=o,t.invokePartial=s,t.noop=l},function(e,t,n){"use strict"
;var i=n(4),r=n(275),a=["key"],o=Object(r.a)(a,[{key:"all",title:function(){return Object(i.default)("All")}},{key:"unwatched",title:function(){return Object(i.default)("Unplayed")}},{key:"newest",title:function(){return Object(i.default)("Recently Released")}},{key:"recentlyAdded",title:function(){return Object(i.default)("Recently Added")}},{key:"recentlyViewed",title:function(){return Object(i.default)("Recently Viewed")}},{key:"recentlyViewedShows",title:function(){
return Object(i.default)("Recently Viewed Shows")}},{key:"onDeck",title:function(){return Object(i.default)("On Deck")}},{key:"folder",title:function(){return Object(i.default)("By Folder")}}]);t.a=o},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(19),o=n(28),s=n(327),l=n(98),c={unviewedLeafCount:">="},u=l.default.extend({name:"SectionMetadataListModel",context:["server","section","identifier","mediaTagPrefix","mediaTagVersion","allowSync"],url:function(){
var e=[],t=void 0,n=void 0,i=this.section.get("currentFolderKey");if(i)e.push(i);else if(e.push(r.a.result(this.section,"url")),t=this.section.get("currentSubset").id,this.section.get("allowAdvancedFilters"))"recentlyAdded"!==t&&"newest"!==t||(t="all"),e.push(t),n=this.getParams();else{var o=this.section.get("currentFilters");o.length?e=[o[0].values[0]]:e.push(t)}var s=a.join(e,n);return s=this.replaceSpecialFilterOperators(s),this.set("containerKey",s),
this.server.get("isFullServer")?this.getPaginatedUrl(s):s},getParams:function(){var e=this.getFilterParams(),t=this.getMetadataTypeID(),n=this.getSort();return t&&t!==Object(o.r)("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 r.a.each(e,function(e){e.values.length&&(t[e.key]=e.values.map(decodeURIComponent).join(","))}),t},
getMetadataTypeID:function(){var e=this.section.get("currentSubset").id,t=this.section.get("currentType").id||Object(o.r)(this.section.get("type")).id;return/^(onDeck|recentlyAdded|recentlyViewed|newest)$/.test(e)?t===Object(o.r)("show").id||t===Object(o.r)("season").id?t=Object(o.r)("episode").id:t!==Object(o.r)("artist").id&&t!==Object(o.r)("track").id||(t=Object(o.r)("album").id):/^recentlyViewedShows$/.test(e)&&(t=Object(o.r)("show").id),t},getSort:function(){
var e=this.section.get("currentSort"),t=this.section.get("currentSubset").id;if("recentlyAdded"===t)return"addedAt:desc";if("newest"===t)return"originallyAvailableAt:desc";if(e){return(e.get("direction")||e.get("defaultDirection"))===s.a.directions.DESCENDING?e.get("descKey"):e.get("key")}},replaceSpecialFilterOperators:function(e){return r.a.each(c,function(t,n){e=e.replace(n+"=",n+t)}),e}});t.a=u},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(23),o=n(860),s=a.a.extend({
name:"SectionSubsetCollection",context:["server","section"],model:o.a,url:function(){return r.a.result(this.section,"url")},filterPrimaries:function(){var e=this.filter(function(e){return e.get("primary")});return this.clone(e)}});t.a=s},function(e,t,n){"use strict";var i=n(23),r=n(861),a=i.a.extend({name:"MediaTypeCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"FilterOptionModel",
context:["server","section","type","standalone"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:i.a.encodedString,type:i.a.string,field:i.a.string,value:i.a.string,title:i.a.string},augmentResponse:function(e){return e.fastKey?(e.value=e.key,e.key=e.fastKey,e.field=e.type,delete e.type,delete e.fastKey):e.fastKey||e.value||(e.value=e.key),e}});t.a=a},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(23),o=n(1459),s=a.a.extend({name:"LinearFilterCollection",
context:["server","section"],model:o.a,url:function(){return r.a.result(this.section,"url")},filterBySecondary:function(){var e=this.filter(function(e){return e.get("secondary")});return this.clone(e)}});t.a=s},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(471),o=r.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:a.a}},
defaults:{secondary:!1}});t.a=o},function(e,t,n){"use strict";var i=n(23),r=n(1461),a=i.a.extend({name:"LocationCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"LocationModel",context:["server","section"],rootPropertyName:"Location",syncedAttrs:{id:i.a.integer,path:{type:i.a.string,save:!0}}});t.a=a},function(e,t,n){"use strict";function i(e,t){switch(e){case c.INT:case c.ENUM:return s.a.parseInteger(t);case c.BOOL:
return s.a.parseBoolean(t);default:return t}}var r=n(50),a=n.n(r),o=n(16),s=n(58),l=n(18),c={INT:"int",TEXT:"text",BOOL:"bool",ENUM:"enum",DOUBLE:"double"},u=l.a.extend({idAttribute:"id",url:"/:/prefs",context:["server"],syncedAttrs:{id:o.a.string,label:o.a.string,default:o.a.oneOfType(o.a.integer,o.a.string,o.a.boolean,o.a.array),summary:o.a.string,value:{type:o.a.oneOfType(o.a.integer,o.a.string,o.a.boolean,o.a.array),save:!0},type:o.a.oneOf(c.INT,c.TEXT,c.BOOL,c.ENUM,c.DOUBLE),
group:o.a.string,advanced:o.a.boolean,option:o.a.string,hidden:o.a.boolean,enumValues:o.a.array,values:o.a.string},defaults:{type:"string",summary:"",label:"",group:""},augmentResponse:function(e){if(e.value=i(e.type,e.value),e.advanced=i(c.BOOL,e.advanced),e.hidden=i(c.BOOL,e.hidden),e.enumValues&&!Array.isArray(e.enumValues)&&(e.enumValues=e.enumValues.split("|").map(function(t){var n=t.split(":"),r=n[0],a=n[1];return{label:void 0===a?r:a,value:i(e.type,r)}})),
e.type===c.ENUM&&e.values&&!Array.isArray(e.values)){var t=0;e.enumValues=e.values.split("|").map(function(e){return{label:e,value:t++}})}return e},getSaveParams:function(e){var t=l.a.prototype.getSaveParams.apply(this,arguments);if(e&&!e.hasOwnProperty("value"))return a()(t).forEach(function(t){return delete e[t]}),t;var n;return n={},n[this.get("id")]=t.value,n}});t.a=u},function(e,t,n){"use strict";var i=n(117),r=n(398),a=n(864),o=i.a.extend({name:"PlaylistsSectionModel",defaults:function(){
return{pseudo:!0,currentType:0,sorts:new r.a([],{section:this,server:this.server}),items:new a.a({},{section:this,server:this.server})}},url:function(){return"/playlists"}});t.a=o},function(e,t,n){"use strict";var i=n(23),r=n(865),a=i.a.extend({name:"PlaylistCollection",context:["server","containerKey"],model:r.a,url:function(){return this.containerKey}});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(1466),a=i.a.extend({name:"PlaylistItemCollection",context:["server","playlist"],model:r.a
});t.a=a},function(e,t,n){"use strict";var i=n(43),r=n(40),a=n(16),o=n(18),s=n(77),l=o.a.extend({name:"PlaylistItemModel",context:["server","playlist"],entityType:i.i,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(r.a)(this.entityType,e.playlistItemID||e.key,this.server.entityID())},idAttribute:"playlistItemID",syncedAttrs:{playlistItemID:a.a.string,key:a.a.string,type:a.a.string},syncedRelations:{metadataItem:{relationClass:s.a,
deferred:!0}},augmentResponse:function(e){return{playlistItemID:e.playlistItemID,key:e.key,type:e.type,metadataItem:e}}});t.a=l},function(e,t,n){"use strict";function i(e){var t=e.items;return s.a.when.apply(s.a,a.a.map(t,function(e){var t="/library/metadata/"+e.id+"/analyze",n=a.a.extend(e.server.getXHROptions(t),{type:"PUT"});return s.a.ajax(n).promise()}))}var r=n(5),a=n.n(r),o=n(12),s=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=s.a.ajax(o);e.done(function(){
n.resolve()}),e.fail(function(e){c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem analyzing the library.")}),n.reject(e)}),e.always(function(e){d.hide()})}var n=s.a.Deferred(),i=e.section,r="/library/sections/"+i.id+"/analyze",o=a.a.extend(i.server.getXHROptions(r),{type:"PUT"}),d=new u.a({title:Object(l.default)("Analyze Library"),
message:Object(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:Object(l.default)("Analyze"),cancelLabel:Object(l.default)("Cancel"),async:!0}),p=d.promise;return p.done(t),p.fail(function(){n.reject()}),c.a.trigger("show:modal",d),n.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(49);t.a=i},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=' <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+p(i(n(3)).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"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p=this.escapeExpression,h=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> '+p((u=t&&t.title,"function"==typeof u?u.apply(t):u))+'</h4> </div> <div class="modal-body"> <p class="confirm-message">'+p((u=t&&t.message,
"function"==typeof u?u.apply(t):u))+'</p> <p class="double-confirm-message text-warning"></p> </div> <div class="modal-footer"> ',u=r.unless.call(t,t&&t.hideCancel,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+=' <button type="button" class="confirm-btn btn btn-lg ',u=r.if.call(t,t&&t.hasDanger,{hash:{},inverse:h.program(5,c,o),fn:h.program(3,l,o),data:o}),(u||0===u)&&(d+=u),
d+=' btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+p(i(n(3)).call(t,t&&t.confirmLabel,{hash:{},data:o}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){"use strict";function i(e){var t,n,i;e.item?(n=e.item,i=[n]):e.items&&(i=e.items,n=i[0]);var r=a.a.extend({},e,{watched:!0}),d=n.get("type"),p=Object(l.u)(d),h=(p||i.length>1)&&!e.force,f=1===i.length,v=f&&n.get("isSection")?n.getSyncTitle():n.get("title");if(h){var g;switch(d){case"movie":
g=f?Object(o.default)("Are you sure you want to mark {1} as watched?",v):Object(o.default)("Are you sure you want to mark these movies as watched?");break;case"show":case"season":case"episode":g=f?Object(o.default)("Are you sure you want to mark all episodes of {1} as watched?",v):Object(o.default)("Are you sure you want to mark these episodes as watched?");break;default:
g=f?Object(o.default)("Are you sure you want to mark {1} as watched?",v):Object(o.default)("Are you sure you want to mark these items as watched?")}var m=new u.a({title:Object(o.default)("Mark as Watched"),message:g});t=m.promise.then(function(){return c.a.execute("updateWatchedStatus",r)}),s.a.trigger("show:modal",m)}else t=c.a.execute("updateWatchedStatus",r);return t}var r=n(5),a=n.n(r),o=n(4),s=n(17),l=n(28),c=n(32),u=n(49);t.a=i},function(e,t,n){"use strict";function i(e){var t,n,i
;e.item?(n=e.item,i=[n]):e.items&&(i=e.items,n=i[0]);var r=a.a.extend({},e,{watched:!1}),d=n.get("type"),p=Object(l.u)(d),h=(p||i.length>1)&&!e.force,f=1===i.length,v=f&&n.get("isSection")?n.getSyncTitle():n.get("title");if(h){var g;switch(d){case"movie":g=f?Object(o.default)("Are you sure you want to mark {1} as unwatched?",v):Object(o.default)("Are you sure you want to mark these movies as unwatched?");break;case"show":case"season":case"episode":
g=f?Object(o.default)("Are you sure you want to mark all episodes of {1} as unwatched?",v):Object(o.default)("Are you sure you want to mark these episodes as unwatched?");break;default:g=f?Object(o.default)("Are you sure you want to mark {1} as unwatched?",v):Object(o.default)("Are you sure you want to mark these items as unwatched?")}var m=new u.a({title:Object(o.default)("Mark as Unwatched"),message:g});t=m.promise.then(function(){return c.a.execute("updateWatchedStatus",r)}),
s.a.trigger("show:modal",m)}else t=c.a.execute("updateWatchedStatus",r);return t}var r=n(5),a=n.n(r),o=n(4),s=n(17),l=n(28),c=n(32),u=n(49);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,n="/library/metadata/"+t.id+"/unmatch",i=a.a.extend(t.server.getXHROptions(n),{type:"PUT"}),r=s.a.ajax(i);return r.fail(function(){c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem unmatching this item.")})}),r.promise()}
var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=a.a.extend(i.server.getXHROptions(r),{type:"PUT"}),u=s.a.ajax(t);u.done(function(){var t,r=i.get("type");t="show"===r||"artist"===r||"album"===r?"Location":"Media",i.set(t,i.get(t).slice(0,1)),e.skipNavigate||c.a.trigger("navigate:back"),n.resolve()}),u.fail(function(e){c.a.trigger("show:alert",{type:"error",
message:Object(l.default)("There was a problem splitting this item apart.")}),n.reject(e)}),u.always(function(e){o.hide()})}var n=s.a.Deferred(),i=e.item,r="/library/metadata/"+i.id+"/split",o=new u.a({title:Object(l.default)("Split Apart"),message:Object(l.default)("Are you sure you want to split this item apart?"),async:!0}),d=o.promise;return d.done(t),d.fail(function(){n.reject()}),c.a.trigger("show:modal",o),n.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(49);t.a=i
},function(e,t,n){"use strict";function i(e){function t(){var e=s.a.ajax(d);e.done(function(){n.resolve()}),e.fail(function(e){c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem merging these items.")}),n.reject(e)}),e.always(function(e){p.hide()})}var n=s.a.Deferred(),i=e.item,r=a.a.pluck(e.items,"id").join(","),o="/library/metadata/"+i.id+"/merge?ids="+r,d=a.a.extend(i.server.getXHROptions(o),{type:"PUT"}),p=new u.a({title:Object(l.default)("Merge"),
message:Object(l.default)("Are you sure you want to merge these items together?"),async:!0}),h=p.promise;return h.done(t),h.fail(function(){n.reject()}),c.a.trigger("show:modal",p),n.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(49);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.items,n=e.item;t||(t=[n]),n||(n=o.a.first(t));var i=n.get("Media");if(1===t.length&&i.length>1&&n.server.supports("specificMediaDeletion"))return p.a.execute("deleteMediaItem",{item:n})
;var a=r({item:n,items:t});return a.promise.then(function(){var n=o.a.map(t,function(t){return p.a.execute("deleteItem",{item:t,skipRedirect:e.skipRedirect})});return l.a.when.apply(l.a,n).always(function(){a.hide()})})}function r(e){var t,n,i=e.item,r=e.items,a=r.length>1,o=i.get("type"),s=d.r(o);o===d.d?(t=s.title,n=Object(c.default)("Are you sure you want to delete {1}? This cannot be undone.",i.get("title"))):a?(t=s.plural,
n=Object(c.default)("Are you sure you want to delete {1} items from your filesystem?",r.length)):(t=s.title,n=Object(c.default)("Are you sure you want to delete this item from your filesystem?"));var l={title:Object(c.default)("Delete {1}",t),message:n,confirmLabel:Object(c.default)("Delete"),cancelLabel:Object(c.default)("Cancel"),async:!0,hasDanger:!0};(a||d.v(o))&&(l.requireDoubleConfirm=!0,l.doubleConfirmMessage=Object(c.default)("Multiple files may be deleted."),
l.doubleConfirmLabel=Object(c.default)("Yes, I'm sure"));var p=new h.a(l);return u.a.trigger("show:modal",p),p}var a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(4),u=n(17),d=n(28),p=n(32),h=n(49);t.a=i},function(e,t,n){"use strict";function i(e){var t=r(e);return t=t.then(function(t){var n=a();return n.promise.then(function(){return u.a.execute("deleteFile",{item:e.item,media:t}).always(function(){n.hide()})})})}function r(e){var t=s.a.Deferred(),n=e.item,i=n.get("Media")
;if(e.index in i)return t.resolve(i[e.index]).promise();var r=new d.a({model:n}),a=r.promise;return a.done(function(e){t.resolve(i[e])}),a.fail(function(){t.reject()}),c.a.trigger("show:modal",r),t.promise()}function a(){var e=new p.a({title:Object(l.default)("Delete File"),message:Object(l.default)("Are you sure you want to delete this file from your filesystem?"),confirmLabel:Object(l.default)("Delete"),cancelLabel:Object(l.default)("Cancel"),async:!0,hasDanger:!0})
;return c.a.trigger("show:modal",e),e}var o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(32),d=n(1477),p=n(49);t.a=i},function(e,t,n){"use strict";var i=n(1478),r=n.n(i),a=n(400),o=a.a.extend({name:"SelectMediaFileModal",template:r.a,serializeData:function(){return{medias:this.model.get("Media")}}});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r,a=""
;return a+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+d((r=null==t||!1===t?t:t.index,typeof r===u?r.apply(e):r))+'" href="#"> ',r=i(n(1479)).call(e,(r=e&&e.Part,r=null==r||!1===r?r:r[0],null==r||!1===r?r:r.file),35,{hash:{},data:t}),(r||0===r)&&(a+=r),a+=" </a> </li> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var l,c="",u="function",d=this.escapeExpression,p=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(3)).call(t,"Select a File",{hash:{},data:o}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',l=r.each.call(t,t&&t.medias,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),
(l||0===l)&&(c+=l),c+=" </ul> </div> </div> </div> "})},function(e,t,n){var i=n(1480).default,r=n(152);e.exports=r(i)},function(e,t,n){"use strict";function i(e,t){return Object(r.default)(Object(a.getLastSegment)(e||""),t)}Object.defineProperty(t,"__esModule",{value:!0});var r=n(867),a=n(19);t.default=i},function(e,t,n){"use strict";function i(e){var t=e.item,n=t.server,i=t.get("Media"),a=o.a.filter(i,function(e){return!!e.proxyType}),s=r({item:t,versions:a});return s.promise.then(function(){
var e=d.join(["/library/metadata/",t.id],{proxy:1}),r=o.a.extend(n.getXHROptions(e),{type:"DELETE"}),p=l.a.ajax(r);return p.done(function(){o.a.each(a,function(e){i.splice(o.a.indexOf(i,e),1)}),t.trigger("change:Media",t,t.get("Media"))}),p.fail(function(e){var t=403===e.status?Object(c.default)("Ensure that media deletion is enabled for library content in your server settings."):Object(c.default)("There was a problem deleting these versions.");u.a.trigger("show:alert",{type:"error",message:t})
}),p.always(function(){s.hide()}),p.promise()})}function r(e){var t,n=e.item,i=e.versions,r=i.length>1;if(r)t=Object(c.default)("Are you sure you want to delete {1} versions of {2}?",i.length,n.get("title"));else{var a=o.a.first(i);t=Object(c.default)("Are you sure you want to delete the {1} version of {2}?",a.title,n.get("title"))}var s=new p.a({title:r?Object(c.default)("Delete Versions"):Object(c.default)("Delete Version"),message:t,confirmLabel:Object(c.default)("Delete"),
cancelLabel:Object(c.default)("Cancel"),async:!0,hasDanger:!0});return u.a.trigger("show:modal",s),s}var a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(4),u=n(17),d=n(19),p=n(49);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=i.destroy({wait:!0});if(!e)return void n.resolve();e.done(function(){var e=o.d("appStore").dispatch,t=this.server.entityID();t&&e(c.b({serverEntityID:t})),n.resolve()}),e.fail(function(e){l.a.trigger("show:alert",{type:"error",
message:Object(s.default)("There was a problem deleting the library.")}),n.reject(e)})}var n=a.a.Deferred(),i=e.section,r=new u.a({title:Object(s.default)("Delete Library"),message:Object(s.default)("Are you sure you want to delete {1}?",i.get("title")),confirmLabel:Object(s.default)("Delete"),cancelLabel:Object(s.default)("Cancel"),requireDoubleConfirm:!0,doubleConfirmMessage:Object(s.default)("This cannot be undone."),doubleConfirmLabel:Object(s.default)("Yes, I'm sure"),async:!0,hasDanger:!0
}),d=r.promise;return d.done(t),d.fail(function(){n.reject()}),l.a.trigger("show:modal",r),n.promise().always(function(){r.hide()}),n.promise()}var r=n(12),a=n.n(r),o=n(15),s=n(4),l=n(17),c=n(139),u=n(49);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=s.a.ajax(r);return e.done(function(e){c.a.trigger("show:alert",{type:"success",message:Object(l.default)("The preview thumbnails for items in this library were deleted.")})}),e.fail(function(e){c.a.trigger("show:alert",{
type:"error",message:Object(l.default)("There was a problem deleting the preview thumbnails for items in this library.")})}),e.always(function(e){o.hide()}),e}var n=e.section,i="/library/sections/"+n.id+"/indexes",r=a.a.extend(n.server.getXHROptions(i),{type:"DELETE"}),o=new u.a({title:Object(l.default)("Delete Preview Thumbnails"),message:Object(l.default)("Are you sure you want to delete the preview thumbnails for items in this library? This cannot be undone."),
confirmLabel:Object(l.default)("Delete"),cancelLabel:Object(l.default)("Cancel"),async:!0,hasDanger:!0}),d=o.promise;return d=d.then(function(){return t()}),c.a.trigger("show:modal",o),d}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(49);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=e.item.destroy();t.done(function(){s.a.trigger("navigate","playlists",{serverID:i.id}),n.resolve()}),t.fail(function(e){s.a.trigger("show:alert",{type:"error",
message:r?Object(o.default)("There was a problem deleting the album."):Object(o.default)("There was a problem deleting the playlist.")}),n.reject(e)}),t.always(function(e){c.hide()})}var n=a.a.Deferred(),i=e.item.server,r="photo"===e.item.get("playlistType"),c=new l.a({title:r?Object(o.default)("Delete Album"):Object(o.default)("Delete Playlist"),message:Object(o.default)("Are you sure you want to delete {1}? This cannot be undone.",e.item.get("title")),confirmLabel:Object(o.default)("Delete"),
cancelLabel:Object(o.default)("Cancel"),async:!0,hasDanger:!0}),u=c.promise;return u.done(t),u.fail(function(){n.reject()}),s.a.trigger("show:modal",c),n.promise()}var r=n(12),a=n.n(r),o=n(4),s=n(17),l=n(49);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=s.a.ajax(g);e.done(function(){n.resolve()}),e.fail(function(e){if(503===e.status)c.a.trigger("show:modal",new d.a({model:p}));else{
var t=o?Object(l.default)("There was a problem canceling the update."):Object(l.default)("There was a problem updating the library.");c.a.trigger("show:alert",{type:"error",message:t})}n.reject(e)})}var n=s.a.Deferred(),i=e.section,r=i?i.id:"all",o=e.cancel,p=i?i.server:e.server,h=e.params||{},f={};h.force&&(f.force=1);var v="/library/sections/"+r+"/refresh",g=a.a.extend(p.getXHROptions(v),{data:f});if(o&&(g.type="DELETE",i&&i.set("refreshing",!1)),f.force){var m=new u.a({
title:Object(l.default)("Refresh All"),message:Object(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:Object(l.default)("Refresh"),cancelLabel:Object(l.default)("Cancel")}),y=m.promise;y.done(t),y.fail(function(){n.reject()}),c.a.trigger("show:modal",m)}else t();return n.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(49),d=n(394);t.a=i},function(e,t,n){"use strict"
;function i(e){function t(){var e=s.a.ajax(r);e.done(function(){c.a.trigger("show:alert",{type:"success",message:Object(l.default)("The database was optimized.")}),n.resolve()}),e.fail(function(e){c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem optimizing this database.")}),n.reject(e)}),e.always(function(e){o.hide()})}var n=s.a.Deferred(),i=e.server,r=a.a.extend(i.getXHROptions("/library/optimize"),{type:"PUT"}),o=new u.a({
title:Object(l.default)("Optimize Database"),message:Object(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:Object(l.default)("Optimize"),cancelLabel:Object(l.default)("Cancel"),async:!0}),d=o.promise;return d.done(t),d.fail(function(){n.reject()}),c.a.trigger("show:modal",o),n.promise()}
var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(49);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=s.a.ajax(r);e.done(function(){c.a.trigger("show:alert",{type:"success",message:Object(l.default)("Unused bundles are being removed.")}),n.resolve()}),e.fail(function(e){c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem removing unused bundles.")}),n.reject(e)}),e.always(function(e){o.hide()})}
var n=s.a.Deferred(),i=e.server,r=a.a.extend(i.getXHROptions("/library/clean/bundles"),{type:"PUT"}),o=new u.a({title:Object(l.default)("Clean Bundles"),message:Object(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:Object(l.default)("Clean"),cancelLabel:Object(l.default)("Cancel"),async:!0}),d=o.promise
;return d.done(t),d.fail(function(){n.reject()}),c.a.trigger("show:modal",o),n.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(49);t.a=i},function(e,t,n){"use strict";function i(e){function t(){a.a.each(o,function(e){var t="/library/sections/"+e+"/emptyTrash",n=a.a.extend(r.getXHROptions(t),{type:"PUT"});d.push(s.a.ajax(n))});var e=s.a.when.apply(s.a,d);e.done(function(){c.a.trigger("show:alert",{type:"success",message:Object(l.default)("The trash was emptied.")}),n.resolve()
}),e.fail(function(e){c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem emptying the trash.")}),n.reject(e)}),e.always(function(e){p.hide()})}var n=s.a.Deferred(),i=e.section,r=i?i.server:e.server,o=[],d=[];if(i)o.push(i.id);else{r.get("sections").each(function(e){o.push(e.id)})}var p=new u.a({title:Object(l.default)("Empty Trash"),
message:Object(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:Object(l.default)("Empty"),cancelLabel:Object(l.default)("Cancel"),async:!0}),h=p.promise;return h.done(t),h.fail(function(){n.reject()}),c.a.trigger("show:modal",p),n.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(49)
;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),r=a.a.extend(t.server.getXHROptions(i),{type:"PUT"});return s.a.ajax(r).promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(19);t.a=i},function(e,t,n){"use strict";function i(e){
var t=s.a.Deferred(),n=e.item,i=e.agent,r={agent:i.id,manual:0},o=d.join(["/library/metadata/",n.id,"/matches"],r),p=a.a.extend(n.server.getXHROptions(o)),h=s.a.ajax(p);return h.done(function(e){var i=a.a.isObject(e)?e:u.a.parseXML(e);if(i.SearchResult){var o=i.SearchResult;Array.isArray(i.SearchResult)&&(o=i.SearchResult[0]),r={guid:o.guid,name:o.name};var p=d.join(["/library/metadata/",n.id,"/match"],r),h=a.a.extend(n.server.getXHROptions(p),{type:"PUT"}),f=s.a.ajax(h);f.done(function(){
t.resolve()}),f.fail(function(){c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem matching this item.")}),t.reject()})}else c.a.trigger("show:alert",{type:"error",message:Object(l.default)("No matches were found using this agent.")}),t.reject()}),h.fail(function(e){c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem searching for matches.")}),t.reject(e)}),t.promise()}
var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(67),d=n(19);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),r=a.a.extend(t.server.getXHROptions(i),{type:"PUT"}),o=s.a.ajax(r);return o.done(function(n){t.set(c[e.artworkType],n)}),o.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(19),c={poster:"thumb",art:"art",banner:"banner"};t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.item,n=e.rating,i=t.get("userRating");if(-1===n?t.unset("userRating"):t.set("userRating",n),e.passive)return a.a.Deferred().resolve().promise();var r={key:t.get("ratingKey"),identifier:t.get("identifier"),rating:n},c=l.join("/:/rate",r),u=a.a.ajax(t.server.getXHROptions(c));return u.fail(function(){t.set("userRating",i),s.a.trigger("show:alert",{type:"error",message:Object(o.default)("There was a problem rating this item.")})}),u.promise()}var r=n(12),a=n.n(r),o=n(4),s=n(17),l=n(19)
;t.a=i},function(e,t,n){"use strict";function i(e){var t=e.generator,n=a.a.result(t,"url")+"/"+e.ratingKey+"/enable",i=a.a.extend(t.server.getXHROptions(n),{type:"PUT"}),r=s.a.ajax(i).promise();return r.fail(function(e){c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem enabling this version.")})}),r}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.generator,n=o.a.result(t,"url")+"/"+e.ratingKey+"/disable",i=r();return i.promise.then(function(){var e=o.a.extend(t.server.getXHROptions(n),{type:"PUT"}),r=l.a.ajax(e).promise();return r.fail(function(e){u.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem disabling this version.")})}),r.always(function(){i.hide()}),r})}function r(){var e=new d.a({title:Object(c.default)("Remove Version"),
message:Object(c.default)("Are you sure you want to delete this version? You can enable it again in Optimized Versions Settings."),confirmLabel:Object(c.default)("Remove"),cancelLabel:Object(c.default)("Cancel"),async:!0,hasDanger:!0});return u.a.trigger("show:modal",e),e}var a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(4),u=n(17),d=n(49);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.generator,n=e.ratingKey,i=a.a.result(t,"url");n&&(i+="/"+n),i+="/reprocess"
;var r=a.a.extend(t.server.getXHROptions(i),{type:"PUT"}),o=s.a.ajax(r).promise();return o.fail(function(e){var t=n?Object(l.default)("There was a problem processing this item."):Object(l.default)("There was a problem processing these items.");c.a.trigger("show:alert",{type:"error",message:t})}),o}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.generator,n=r(e);return n.promise.then(function(){var e=t.destroy()
;return e.fail(function(e){o.a.trigger("show:alert",{type:"error",message:Object(a.default)("Unable to stop generating these versions.")})}),e.always(function(){n.hide()}),e})}function r(e){var t=e.generator.get("title"),n=t?Object(a.default)("Removing this item will delete all versions created by {1}. Are you sure you want to continue?",t):Object(a.default)("Removing this item will delete all related versions. Are you sure you want to continue?"),i=new s.a({
title:Object(a.default)("Delete Versions"),message:n,confirmLabel:Object(a.default)("Remove"),cancelLabel:Object(a.default)("Cancel"),async:!0,hasDanger:!0});return o.a.trigger("show:modal",i),i}var a=n(4),o=n(17),s=n(49);t.a=i},function(e,t,n){"use strict";function i(e){var t=r(),n=t.promise;return n=n.then(function(){var n="/playlists/generators?type="+d.a.LOCAL,i=o.a.extend(e.server.getXHROptions(n),{type:"DELETE"}),r=l.a.ajax(i).promise();return r.fail(function(e){u.a.trigger("show:alert",{
type:"error",message:Object(c.default)("There was a problem deleting all versions.")})}),r.always(function(){t.hide()}),r.promise()})}function r(){var e=new p.a({title:Object(c.default)("Delete All Versions"),message:Object(c.default)("Are you sure you want to delete all versions? This cannot be undone."),confirmLabel:Object(c.default)("Delete"),cancelLabel:Object(c.default)("Cancel"),async:!0,hasDanger:!0});return u.a.trigger("show:modal",e),e}
var a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(4),u=n(17),d=n(279),p=n(49);t.a=i},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"),r=i+"/install",o=t.server.getXHROptions(r),s=a.a.ajax(o);return s.done(function(){t.set("installed",!0)}),s.promise()}var r=n(12),a=n.n(r);t.a=i},function(e,t,n){"use strict";function i(e){function t(e){var i=a.a.isObject(e)?e:u.a.parseXML(e);if(!i||!i.message&&!i.Directory)return void n()
;if(i.message)p||c.a.trigger("show:alert",{type:"success",message:i.message}),r.resolve();else{u.a.parseArray(i,"Directory");var o=i.Directory[0].key,l=s.a.ajax(d.getXHROptions(o));l.done(t),l.fail(n)}}function n(e){p||c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem checking for updates.")}),r.reject(e)}var i,r=s.a.Deferred(),o=e.channel,d=o?o.server:e.server,p=e.silent;if(o){var h=o.get("identifier");i=(h?"/system/appstore/apps/"+h:o.get("key"))+"/update"
}else i="/system/appstore/updates";var f=s.a.ajax(d.getXHROptions(i));return f.done(t),f.fail(n),r.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(67);t.a=i},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"),r=i+"/restart",o=t.server.getXHROptions(r),d=s.a.ajax(o);return d.done(function(e){var t,n=a.a.isObject(e)?e:u.a.parseXML(e)
;t=n.message?n.message:Object(l.default)("This plugin was successfully restarted."),c.a.trigger("show:alert",{type:"success",message:t})}),d.fail(function(){c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem restarting this plugin.")})}),d.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(67);t.a=i},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"),r=i+"/reset",o=t.server.getXHROptions(r),d=s.a.ajax(o);return d.done(function(e){var t,n=a.a.isObject(e)?e:u.a.parseXML(e);t=n.message?n.message:Object(l.default)("This plugin was successfully reset."),c.a.trigger("show:alert",{type:"success",message:t})}),d.fail(function(){c.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem resetting this plugin.")})}),d.promise()}
var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(67);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=s.a.ajax(f);t.done(function(t){var r=a.a.isObject(t)?t:u.a.parseXML(t);i.set("installed",!1),r.message&&!e.skipConfirmation&&c.a.trigger("show:alert",{type:"success",message:r.message}),n.resolve()}),t.fail(function(e){if(400===e.status){var t=new p.a({title:Object(l.default)("Unable to Uninstall Plugin"),
message:Object(l.default)("This plugin could not be uninstalled, but you can disable it in the server settings."),confirmLabel:Object(l.default)("OK"),cancelLabel:Object(l.default)("Ignore")});t.promise.done(function(){Object(d.a)("serverSettings",{serverID:i.server.id,group:"channels"})}),c.a.trigger("show:modal",t)}else c.a.trigger("show:alert",{type:"error",message:Object(l.default)("This plugin could not be uninstalled.")});n.reject(e)})}
var n=s.a.Deferred(),i=e.channel,r=i.get("identifier"),o=r?"/system/appstore/apps/"+r:i.get("key"),h=o+"/uninstall",f=i.server.getXHROptions(h);if(e.skipConfirmation)t();else{var v=new p.a({title:Object(l.default)("Uninstall Plugin"),message:Object(l.default)("Are you sure you want to uninstall this plugin?")}),g=v.promise;g.done(t),g.fail(function(){n.reject()}),c.a.trigger("show:modal",v)}return n.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(67),d=n(109),p=n(49);t.a=i
},function(e,t,n){"use strict";function i(e){var t=l.d("appModel"),n=t.get("user"),i=n.server,r={url:e.item.get("url")},o=u.join("/pms/playlists/queue/items",r),p=a.a.extend(i.getXHROptions(o),{type:"POST"}),h=s.a.ajax(p).promise();return h.done(function(){d.a.trigger("show:alert",{type:"success",message:Object(c.default)("{1} added to Watch Later.",e.item.get("title"))})}),h.fail(function(){d.a.trigger("show:alert",{type:"error",
message:Object(c.default)("There was a problem adding to Watch Later.")})}),h}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(15),c=n(4),u=n(19),d=n(17);t.a=i},function(e,t,n){"use strict";function i(e){function t(e){if(i&&i.id){var t="/status/sessions/terminate?sessionId="+i.id+"&reason="+e,l=a.a.ajax(r.getXHROptions(t));l.done(function(e){n.trigger("destroy",n,n.collection),c.resolve(e)}),l.fail(function(e){s.a.trigger("show:alert",{type:"error",
message:Object(o.default)("There was a problem stopping playback")}),c.reject(e)}),l.always(function(){return u.hide()})}}var n=e.model,i=n.get("Session"),r=n.server,c=a.a.Deferred(),u=new l.a,d=u.promise;return d.done(function(e){return t(e)}),d.fail(function(){return c.reject()}),s.a.trigger("show:modal",u),c.promise()}var r=n(12),a=n.n(r),o=n(4),s=n(17),l=n(1505);t.a=i},function(e,t,n){"use strict";var i=n(1506),r=n.n(i),a=n(12),o=n.n(a),s=n(5),l=n.n(s),c=n(70),u=c.a.extend({
name:"stopMediaModal",className:"stop-media-modal select-modal modal modal-sm fade",template:r.a,ui:{stopMediaBtn:".stop-media-btn",messageContainer:".message-container",message:".message"},events:l.a.extend({"click .stop-media-btn":"onStopMediaClick"},c.a.prototype.events),initialize:function(){this.promise=o.a.Deferred()},onHide:function(e){c.a.prototype.onHide.apply(this,arguments),this.promise.reject()},onStopMediaClick:function(e){e.preventDefault();var t=this.ui.message.val()
;this.promise.resolve(t)}});t.a=u},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression
;return s+='<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> '+l(i(n(3)).call(t,"Stop this item",{hash:{},data:o}))+'</h4> </div> <div class="modal-body"> <p class="confirm-message"> '+l(i(n(3)).call(t,"Do you wish to stop this item's playback?",{hash:{},data:o
}))+"<br/> "+l(i(n(3)).call(t,"You can add a message to the user below.",{hash:{},data:o}))+' </p> <div class="message-container"> <textarea class="message form-control"></textarea> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+l(i(n(3)).call(t,"Cancel",{hash:{},data:o
}))+'</button> <button type="button" class="stop-media-btn btn btn-lg btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+l(i(n(3)).call(t,"Stop",{hash:{},data:o}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){"use strict";function i(e){function t(){i.fetch().done(function(){var r=i.get("mappingState"),a=e.value&&r===l.b,o=!e.value&&r===l.a;r===l.c||a||o?n||(n=setInterval(t,d)):(n=clearInterval(n),
i.get("isWaiting")&&i.set("remoteAccessState",l.g),u.resolve())})}var n,i=e.cloudAccount,r=i.server.get("desktop").get("settings"),c=r.get("PublishServerOnPlexOnlineKey"),u=a.a.Deferred(),d=500;if(!i.get("isWaiting")){var p=e.value?l.d:l.e;i.set("remoteAccessState",p)}var h=i.previous("remoteAccessState"),f=c.save({PublishServerOnPlexOnlineKey:e.value},{timeout:0});return f.done(t),f.fail(function(t){var n
;n=e.value?Object(o.default)("There was a problem connecting your server."):Object(o.default)("There was a problem disconnecting your server."),s.a.trigger("show:alert",{type:"error",message:n}),i.set("remoteAccessState",h),u.reject(t)}),u.promise()}var r=n(12),a=n.n(r),o=n(4),s=n(17),l=n(473);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.cloudAccount,n={cloudAccount:t,value:!1},i=o.a.execute("connectServer",n);return i=i.then(function(){return n.value=!0,
o.a.execute("connectServer",n)}),i=i.then(function(){if(t.get("mappingError"))return a.a.Deferred().reject().promise()})}var r=n(12),a=n.n(r),o=n(32);t.a=i},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,r=d.join("/myplex/claim",{token:i}),a=e.getXHROptions(r,{type:"POST"});return c.a.ajax(a).promise()})}function r(e,t,n){var i=d.join("/myplex/account",{username:e,
password:t}),r=n.getXHROptions(i,{type:"PUT"});return c.a.ajax(r).promise()}function a(e){var t=e.cloudAccount,n=e.username,a=e.password,o=e.claim,l=void 0!==o&&o,d=c.a.Deferred(),g=t.server,m=Object(u.d)("appModel"),y=m.get("user"),b=m.get("cloudServer"),I=g.get("accessToken");g.set("accessToken",y.get("authToken"));var S=l?i(g,b):r(n,a,g);return S.done(function(e){var n=s.a.isObject(e)?e:f.a.parseXML(e);n&&"invalid"===n.signInState?(h.a.trigger("show:alert",{type:"error",
message:Object(p.default)("The username or password is incorrect.")}),d.reject()):(g.set({myPlexSigninState:v.b,myPlexUsername:y.get("email")}),t.set({signedIn:!0,username:y.get("email")}),d.resolve())}),S.fail(function(e){g.set("accessToken",I),!0===t.get("signedIn")&&t.set("signedIn",!1);var n=void 0;n=401===e.status?Object(p.default)("The username or password is incorrect."):Object(p.default)("There was a problem signing in to Plex."),h.a.trigger("show:alert",{type:"error",message:n}),
d.reject(e)}),d.promise()}var o=n(5),s=n.n(o),l=n(12),c=n.n(l),u=n(15),d=n(19),p=n(4),h=n(17),f=n(58),v=n(99);t.a=a},function(e,t,n){"use strict";function i(e){var t=new f.c({machineIdentifier:e},{onlyIfCached:!0});if(!l.a.isEmpty(t))return t}function r(e){var t=e.get("desktop").get("cloudAccount"),n=t.destroy();return n.done(function(){e.set({accessToken:void 0,myPlexSigninState:f.a,myPlexSubscription:!1})}),n}function a(e){e.trigger("destroy",e,e.collection),e.cache.remove(e)}function o(e){
function t(){var e;if(c)e=c.destroy({wait:!0});else{var t="/api/servers/"+g.id,n=l.a.extend(s.server.getXHROptions(t),{type:"DELETE"});e=u.a.ajax(n)}if(g){if(g.get("connected")&&g.get("myPlexSigninState")===f.b){var i=g.get("desktop").get("cloudAccount");e=e.then(function(){return i.fetch()}),e=e.then(function(){return r(g)})}!1===g.get("connected")?a(g):e.always(function(){h.a.trigger("test:server",g),g.populate().fail(function(){a(g)})})}return e.always(function(){y.hide()}),e.promise()}
var n,o=d.d("appModel"),s=o.get("user"),c=e.device,g=e.server||i(c.get("clientIdentifier"))
;n=c?c.get("isPersonalCloudServer")?Object(p.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."):Object(p.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."):Object(p.default)("Are you sure you want to remove this server?");var m={
title:Object(p.default)("Remove Server"),message:n,confirmLabel:Object(p.default)("Remove"),cancelLabel:Object(p.default)("Cancel"),async:!0,hasDanger:!0};c&&(m.requireDoubleConfirm=!0,m.doubleConfirmMessage=Object(p.default)("Are you sure you want to remove this server?"),m.doubleConfirmLabel=Object(p.default)("Yes, I'm sure"));var y=new v.a(m),b=y.promise;return b=b.then(function(){return t()}),h.a.trigger("show:modal",y),b}
var s=n(5),l=n.n(s),c=n(12),u=n.n(c),d=n(15),p=n(4),h=n(17),f=n(99),v=n(49);t.a=o},function(e,t,n){"use strict";function i(e){var t=e.server,n={download:!1===e.download?"0":"1"},i=l.join("/updater/check",n),r=a.a.extend(t.getXHROptions(i),{type:"PUT"}),o=e.initialState||"checking",c=t.get("desktop").get("update");c.set("state",o);var u=s.a.ajax(r).promise();return u.fail(function(){c.set("state","error")}),u}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(19);t.a=i},function(e,t,n){"use strict"
;function i(e){function t(){var e=i.get("desktop").get("update");e.set("state","installing");var t=s.a.ajax(r).promise();return t.fail(function(){e.set("state","error")}),t}var n,i=e.server,r=a.a.extend(i.getXHROptions("/updater/apply"),{type:"PUT"});i.get("activeConnection").get("isLoopback")||(n=new u.a({title:Object(l.default)("Remote Installation"),confirmLabel:Object(l.default)("Continue"),cancelLabel:Object(l.default)("Cancel"),
message:Object(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",n));var o=n?n.promise:s.a.Deferred().resolve().promise();return o=o.then(function(){return t()})}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(49);t.a=i},function(e,t,n){"use strict";function i(e){
var t=Object(a.d)("appModel").get("settings"),n=t.get("dismissedUnclaimedServers"),i=n.indexOf(e.id)>-1,l=r.c.history.getFragment();i||/^\!\/setup/.test(l)||o.a.trigger("show:bar","alertbar",new s.a({model:e}))}t.a=i;var r=n(68),a=n(15),o=n(17),s=n(1514)},function(e,t,n){"use strict";var i=n(1515),r=n.n(i),a=n(5),o=n.n(a),s=n(15),l=n(83),c=n(109),u=n(35),d=n(73),p=n(280),h=p.a.extend({name:"ClaimServerAlertBarView",className:"claim-server-alert-bar alert-bar notify",template:r.a,
events:o.a.extend({"click .claim-link":"onClaimClick","click .reload-link":"onReloadClick"},p.a.prototype.events),initialize:function(){p.a.prototype.initialize.apply(this,arguments);var e=Object(s.d)("appModel").get("settings"),t=e.get("viewedUnclaimedServers");this.model.id&&-1===t.indexOf(this.model.id)&&(Object(s.d)("metrics").trackView({page:u._2,mode:"banner"},{interaction:!1}),e.save("viewedUnclaimedServers",t.concat(this.model.id)))},serializeData:function(){return{
showInsecureMessage:l.a.isHostedHttps&&!this.model.get("isSecure")}},onClaimClick:function(e){e.preventDefault(),Object(s.d)("metrics").trackClick({action:d.h,page:u._2,mode:"banner"}),Object(c.a)("serverSettings",{serverID:this.model.id,group:"general"}),this.hide()},onReloadClick:function(e){e.preventDefault(),window.location=this.model.resolveUrl("/web",{connection:this.model.get("connections").first()}),this.hide()},onCloseClick:function(e){p.a.prototype.onCloseClick.apply(this,arguments)
;var t=Object(s.d)("appModel").get("settings"),n=t.get("dismissedUnclaimedServers");this.model.id&&-1===n.indexOf(this.model.id)&&(Object(s.d)("metrics").trackClick({action:d.o,page:u._2,mode:"banner"}),t.save("dismissedUnclaimedServers",n.concat(this.model.id)))}});t.a=h},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r=""
;return r+=' <span class="message">'+d(i(n(3)).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(3)).call(e,"Reload app insecurely",{hash:{},data:t}))+"</a> "}function l(e,t){var r="";return r+=' <span class="message">'+d(i(n(3)).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(3)).call(e,"Claim it now",{hash:{},data:t
}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this.escapeExpression,p=this;return u+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> ',c=r.if.call(t,t&&t.showInsecureMessage,{hash:{},inverse:p.program(3,l,o),fn:p.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+=" "})},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
r=r||{};var a,o,s="",l=this.escapeExpression;return s+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">',(o=n.message)?a=o.call(t,{hash:{},data:r}):(o=t&&t.message,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),s+=l(a)+"</span> "})},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(o.d)("appModel").get("user"),n=void 0,i=void 0
;e.username&&e.password?(n=t.server.getXHROptions("/api/v2/users/signin",{type:"POST",data:{login:e.username,password:e.password},xhrFields:{withCredentials:f.a.get("allowSSO")}}),i="password"):(n=t.server.getXHROptions("/api/v2/user?X-Plex-Token="+e.accessToken),i="code");var r=Object(h.a)(n);return r=r.then(function(n){return e.remember?s.a.restorePrevious():s.a.register(l.a.getInstance()),t.signIn(n)}),r.fail(function(t){var n=void 0;if(!e.silent){
var i=t.responseText&&d.a.parseXML(t.responseText),r=i&&i.error,o=Array.isArray(r)?a.a.first(r):r;n=o?a.a.isObject(o)?Object(p.a)(o):o:Object(c.default)("There was a problem signing in to Plex."),u.a.trigger("show:alert",{type:"error",message:n})}}),r.done(function(){Object(o.d)("metrics").trackEvent({event:"client:signin",interaction:!0,properties:{mode:i,firstRun:!!e.isFirstRun}})}),r}var r=n(5),a=n.n(r),o=n(15),s=n(163),l=n(474),c=n(4),u=n(17),d=n(58),p=n(329),h=n(606),f=n(62);t.a=i
},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(l.d)("appModel").get("user"),n=a.a.pick(e,"username","email","password"),i=t.server.getXHROptions("/api/v2/users",{type:"POST",data:n}),r=s.a.ajax(i).promise();return r=r.then(function(n){return e.remember?c.a.restorePrevious():c.a.register(u.a.getInstance()),t.signIn(n,{lockState:v.a.lockStates.UNLOCKED})}),r.fail(function(e){var t=void 0;if(422===e.status){
var n=e.responseText&&h.a.parseXML(e.responseText),i=n&&n.error,r=Array.isArray(i)?a.a.first(i):i;t=r?a.a.isObject(r)?Object(f.a)(r):r:Object(d.default)("This account information is invalid.")}else t=Object(d.default)("There was a problem connecting to Plex.");p.a.trigger("show:alert",{type:"error",message:t})}),r.done(function(){Object(l.d)("metrics").trackEvent({event:"client:signup",interaction:!0,properties:{firstRun:!!e.isFirstRun}})}),r}
var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(15),c=n(163),u=n(474),d=n(4),p=n(17),h=n(58),f=n(329),v=n(241);t.a=i},function(e,t,n){"use strict";function i(e){var t=o.d("appModel"),n=t.get("user"),i=e.item.server;if(i.get("myPlexSigninState")!==c.b){var r=Object(s.default)("This server needs to be connected to Plex to sync its content.");return void l.a.trigger("show:alert",{type:"error",message:r})}if(!i.get("allowSync"))return void l.a.trigger("show:modal",new u.a({model:i}))
;var h=n.get("desktop").get("devices"),f=h.filterSyncDevices(e.item),v=a.a.clone(e);if(f.length){var g=new p.a({collection:f});g.promise.done(function(e){v.device=f.get(e),l.a.trigger("show:modal",new d.a(v))}),l.a.trigger("show:modal",g)}else l.a.trigger("show:alert",{type:"error",message:Object(s.default)("You are not signed in to any sync capable devices.")})}var r=n(5),a=n.n(r),o=n(15),s=n(4),l=n(17),c=n(99),u=n(626),d=n(868),p=n(1543);t.a=i},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=' <p class="text-muted">'+d(i(n(3)).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 r=""
;return r+=' <p class="text-muted">'+d(i(n(3)).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"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=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 circle-arrow-right"></i> '+d(i(n(3)).call(t,"Go Premium",{hash:{},data:o
}))+' </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(3)).call(t,"This feature requires a Plex Pass subscription.",{hash:{},data:o}))+"</h4> ",c=r.if.call(t,t&&t.isClaimed,{hash:{},inverse:p.program(3,l,o),fn:p.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+=' <p class="text-center"> <a class="btn btn-sm btn-primary" href="'+d((c=t&&t.plexPassUrl,
"function"==typeof c?c.apply(t):c))+'" target="_blank">'+d(i(n(3)).call(t,"Learn More",{hash:{},data:o}))+"</a> </p> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s=""
;return s+='<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> '+(0,this.escapeExpression)(i(n(3)).call(t,"Sync",{hash:{},data:o}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> '})},function(e,t,n){"use strict"
;var i=n(1523),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(15),c=n(278),u=n(28),d=n(32),p=n(627),h=n(869),f=n(1531),v={video:"movie",audio:"track",photo:"photo"},g=s.a.Layout.extend({template:r.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.d("appModel");if(this.device=e.device,this.model)this.tempModel=this.model.clone();else{
var n,i,r=e.item,a=e.items;r.get("isPlaylist")?(n=r,i=v[r.get("playlistType")]):r.get("isMetadataList")?(n=r,i=Object(u.q)(r.get("firstItemType")).typeString):(n=r.has("childrenKey")?r.get("children"):r,i=Object(u.q)(r.get("type")).typeString),this.tempModel=new p.a({metadataType:i,title:c.a.title(r,{items:a}),rootTitle:this.getRootTitle(r),machineIdentifier:r.server.id,clientIdentifier:this.device.get("clientIdentifier"),Location:{uri:c.a.uri(n,{items:a})}},{parent:r.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 h.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(o.a.bind(function(){if(this.model){var e=this.model.get("version")||0,t=o.a.omit(this.tempModel.toJSON(),"children");t.version=e+1,this.model.set(this.model.parse(t))}},this)),n=n.then(o.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=g},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return d(i(n(3)).call(e,"Sync",{hash:{},data:t}))}function l(e,t){return d(i(n(3)).call(e,"Save",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var c,u="",d=this.escapeExpression,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(3)).call(t,"Title",{hash:{},data:o}))+'</label> <input type="text" id="sync-title" name="title" class="form-control" value="'+d((c=t&&t.syncItem,c=null==c||!1===c?c:c.title,"function"==typeof c?c.apply(t):c))+'" placeholder="'+d((c=t&&t.syncItem,c=null==c||!1===c?c:c.title,
"function"==typeof c?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(3)).call(t,"Cancel",{hash:{},data:o}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',c=r.if.call(t,t&&t.isNew,{hash:{},inverse:p.program(3,l,o),fn:p.program(1,s,o),data:o}),
(c||0===c)&&(u+=c),u+="</span> </button> </div> </form> "})},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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=a},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(94),o=n(19),s=n(244),l=n(16),c=n(51),u=n(18),d=n(1528),p=u.a.extend({mixins:[s.a],name:"VersionGeneratorMetadataListModel",context:["server","generator"],collectionName:"metadataItems",url:function(){var e=o.join([r.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?Object(a.b)(e):e}});t.a=p},function(e,t,n){"use strict";var i=n(23),r=n(1529),a=i.a.extend({name:"VersionGeneratorMetadataCollection",context:["server","generator"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(16),o=n(18),s=n(77),l=o.a.extend({name:"VersionGeneratorMetadataModel",context:["server","generator"],idAttribute:"ratingKey",
syncedAttrs:r.a.extend({},s.a.prototype.syncedAttrs,{processingState:a.a.string,processingStateContext:a.a.string})});t.a=l},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"hidden"}function l(e,t){return"checked"}function c(e,t){var n,i="";return i+='value="'+m((n=e&&e.policy,n=null==n||!1===n?n:n.value,typeof n===g?n.apply(e):n))+'"'}function u(e,t){var n,i="";return i+=" ",
n=r.if.call(e,e&&e.isCloudSync,{hash:{},inverse:y.program(10,p,t),fn:y.program(8,d,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function d(e,t){var r="";return r+=" "+m(i(n(3)).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 p(e,t){var r=""
;return r+=" "+m(i(n(3)).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 h(e,t){var r="";return r+=" "+m(i(n(3)).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"],r=this.merge(r,e.helpers),o=o||{}
;var f,v="",g="function",m=this.escapeExpression,y=this;return v+='<div class="form-group ',f=r.unless.call(t,t&&t.showUnwatched,{hash:{},inverse:y.noop,fn:y.program(1,s,o),data:o}),(f||0===f)&&(v+=f),v+='"> <label class="control-label"> <input type="checkbox" id="convert-policy-unwatched" name="policyUnwatched" ',f=r.if.call(t,(f=t&&t.policy,null==f||!1===f?f:f.unwatched),{hash:{},inverse:y.noop,fn:y.program(3,l,o),data:o}),(f||0===f)&&(v+=f),v+="> "+m(i(n(3)).call(t,"Unwatched only",{hash:{},
data:o}))+' </label> </div> <div class="form-group ',f=r.unless.call(t,t&&t.isDirectory,{hash:{},inverse:y.noop,fn:y.program(1,s,o),data:o}),(f||0===f)&&(v+=f),v+='"> <label class="control-label"> <input type="checkbox" id="convert-policy-scope" name="policyScope" value="count" ',f=i(n(25)).call(t,(f=t&&t.policy,null==f||!1===f?f:f.scope),"count",{hash:{},inverse:y.noop,fn:y.program(3,l,o),data:o}),(f||0===f)&&(v+=f),v+="> "+m(i(n(3)).call(t,"Limit to",{hash:{},data:o
}))+' <input type="number" id="convert-policy-value" name="policyValue" class="policy-value-control form-control" ',f=r.if.call(t,(f=t&&t.policy,null==f||!1===f?f:f.value),{hash:{},inverse:y.noop,fn:y.program(5,c,o),data:o}),(f||0===f)&&(v+=f),v+="> "+m(i(n(3)).call(t,"items",{hash:{},data:o}))+' </label> <p class="convert-warning help-block ',f=r.unless.call(t,t&&t.showLimitWarning,{hash:{},inverse:y.noop,fn:y.program(1,s,o),data:o}),(f||0===f)&&(v+=f),
v+='"> <i class="convert-warning-icon glyphicon circle-exclamation-mark"></i> <span class="convert-warning-text"> ',f=r.if.call(t,t&&t.isSync,{hash:{},inverse:y.program(12,h,o),fn:y.program(7,u,o),data:o}),(f||0===f)&&(v+=f),v+=" </span> </p> </div> "})},function(e,t,n){"use strict";var i=n(1532),r=n.n(i),a=n(20),o=n(873),s=n(15),l=n(28),c=n(130),u=n(1537),d=n(1538),p=a.a.ItemView.extend({className:"sync-quality-container form-group",template:r.a,events:{
"change select[name=videoQuality]":"onVideoQualityChange","change select[name=musicQuality]":"onMusicQualityChange","change select[name=photoQuality]":"onPhotoQualityChange"},initialize:function(e){var t=Object(s.d)("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=c.a.getAvailableQualities({lowestQualityIndex:o.a}).reverse();var e=Object(s.d)("appModel").get("settings"),t=this.mediaSettings.get("maxVideoBitrate"),n=t?c.a.getNearestIndexToBitrate(t):e.get(c.a.getSyncQualityAttribute());this.updateVideoQuality(c.a.getQualityByIndex(n))},initMusicQuality:function(){this.availableMusicQualities=u.a.getAvailableQualities().reverse()
;var e=Object(s.d)("appModel").get("settings"),t=this.mediaSettings.get("musicBitrate"),n=t?u.a.getNearestIndexToBitrate(t):e.get(u.a.getSyncQualityAttribute());this.updateMusicQuality(u.a.getQualityByIndex(n))},initPhotoQuality:function(){this.availablePhotoQualities=d.a.getAvailableQualities().reverse();var e=Object(s.d)("appModel").get("settings"),t=this.mediaSettings.get("photoQuality"),n=t?d.a.getNearestIndexToQuality(t):e.get(d.a.getSyncQualityAttribute())
;this.updatePhotoQuality(d.a.getQualityByIndex(n))},serializeData:function(){return{typeElement:Object(l.r)(this.model.get("metadataType")).mediaType,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 n=parseInt(t,10);return Object(s.d)("appModel").get("settings").save(e.getSyncQualityAttribute(),n),e.getQualityByIndex(n)},onVideoQualityChange:function(e){var t=this.saveQualityIndex(c.a,e.currentTarget.value);this.updateVideoQuality(t)},onMusicQualityChange:function(e){var t=this.saveQualityIndex(u.a,e.currentTarget.value);this.updateMusicQuality(t)},onPhotoQualityChange:function(e){var t=this.saveQualityIndex(d.a,e.currentTarget.value)
;this.updatePhotoQuality(t)}});t.a=p},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i="";return i+=' <select class="sync-quality-select" name="videoQuality"> ',n=r.if.call(e,e&&e.supportsOriginalQuality,{hash:{},inverse:m.noop,fn:m.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=r.each.call(e,e&&e.availableVideoQualities,{hash:{},inverse:m.noop,fn:m.programWithDepth(5,u,t,e),data:t}),
(n||0===n)&&(i+=n),i+=" </select> "}function l(e,t){var r,a="";return a+=' <option value="-1" ',r=i(n(25)).call(e,(r=e&&e.selectedVideoQuality,null==r||!1===r?r:r.index),-1,{hash:{},inverse:m.noop,fn:m.program(3,c,t),data:t}),(r||0===r)&&(a+=r),a+="> "+y(i(n(3)).call(e,"Original",{hash:{},data:t}))+" </option> "}function c(e,t){return"selected"}function u(e,t,r){var a,o="";return o+=' <option value="'+y((a=e&&e.index,typeof a===b?a.apply(e):a))+'" ',
a=i(n(25)).call(e,(a=r&&r.selectedVideoQuality,null==a||!1===a?a:a.index),e&&e.index,{hash:{},inverse:m.noop,fn:m.program(3,c,t),data:t}),(a||0===a)&&(o+=a),o+="> "+y(i(n(402)).call(e,e,{hash:{},data:t}))+" </option> "}function d(e,t){var n,i="";return i+=' <select class="sync-quality-select" name="musicQuality"> ',n=r.each.call(e,e&&e.availableMusicQualities,{hash:{},inverse:m.noop,fn:m.programWithDepth(8,p,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function p(e,t,r){var a,o=""
;return o+=' <option value="'+y((a=e&&e.index,typeof a===b?a.apply(e):a))+'" ',a=i(n(25)).call(e,(a=r&&r.selectedMusicQuality,null==a||!1===a?a:a.index),e&&e.index,{hash:{},inverse:m.noop,fn:m.program(3,c,t),data:t}),(a||0===a)&&(o+=a),o+="> "+y(i(n(1535)).call(e,e,{hash:{},data:t}))+" </option> "}function h(e,t){var n,i="";return i+=' <select class="sync-quality-select" name="photoQuality"> ',n=r.each.call(e,e&&e.availablePhotoQualities,{hash:{},inverse:m.noop,fn:m.programWithDepth(11,f,t,e),
data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function f(e,t,r){var a,o="";return o+=' <option value="'+y((a=e&&e.index,typeof a===b?a.apply(e):a))+'" ',a=i(n(25)).call(e,(a=r&&r.selectedPhotoQuality,null==a||!1===a?a:a.index),e&&e.index,{hash:{},inverse:m.noop,fn:m.program(3,c,t),data:t}),(a||0===a)&&(o+=a),o+="> "+y((a=e&&e.title,typeof a===b?a.apply(e):a))+" </option> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var v,g="",m=this,y=this.escapeExpression,b="function"
;return v=i(n(25)).call(t,t&&t.typeElement,"video",{hash:{},inverse:m.noop,fn:m.program(1,s,o),data:o}),(v||0===v)&&(g+=v),g+=" ",v=i(n(25)).call(t,t&&t.typeElement,"audio",{hash:{},inverse:m.noop,fn:m.program(7,d,o),data:o}),(v||0===v)&&(g+=v),g+=" ",v=i(n(25)).call(t,t&&t.typeElement,"photo",{hash:{},inverse:m.noop,fn:m.program(10,h,o),data:o}),(v||0===v)&&(g+=v),
g+=' <p class="help-block">'+y(i(n(3)).call(t,"Plex will convert your media to this quality and transfer the converted media to your device.",{hash:{},data:o}))+"</p> "})},function(e,t,n){"use strict";function i(e){if(e.index===a.a.CONVERT_AUTOMATICALLY)return Object(r.default)("Convert Automatically");if(e.index===a.a.ORIGINAL)return Object(r.default)("Original");var t=e.bitrate||e.maxVideoBitrate,n=e.videoResolution;if(!t&&!n)return Object(r.default)("Unknown");var i=[]
;if(t&&i.push(Object(o.default)(t)),n&&(!t||t>=1e3)){var l=a.a.getResolutionFromSize(n);i.push(Object(s.default)(l))}var c=i.join(", ");return e.description?c+" "+e.description:c}Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),a=n(130),o=n(403),s=n(331);t.default=i},function(e,t,n){"use strict";function i(e){if(!(e>0))return"";var t=e/1e3;return(t=t>=.1?Number(t.toFixed(1)):t)+" Mbps"}t.a=i},function(e,t,n){var i=n(1536).default,r=n(152);e.exports=r(i)},function(e,t,n){"use strict"
;function i(e){return Object(r.a)(e.bitrate)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(872)},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(475),o=r.a.extend({},a.a,{type:"music",qualities:{bitrate:[96,128,192,320]},getNearestIndexToBitrate:function(e){return this.getNearestIndex(this.qualities.bitrate,e)}});t.a=o},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(4),o=n(475),s=r.a.extend({},o.a,{type:"photo",qualities:{
photoResolution:["720x480","1280x720","1920x1080","3840x2160"],photoQuality:[24,49,74,99],title:function(){return[Object(a.default)("Low"),Object(a.default)("Medium"),Object(a.default)("High"),Object(a.default)("Highest")]}},getNearestIndexToQuality:function(e){return this.getNearestIndex(this.qualities.photoQuality,e)}});t.a=s},function(e,t,n){"use strict";var i=n(1540),r=n.n(i),a=n(20),o=n(109),s=a.a.ItemView.extend({className:"modal-body",template:r.a,events:{
"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),this.triggerMethod("request:nextState"),Object(o.a)("sync",{serverID:this.options.server.id,deviceID:this.options.device.id})}});t.a=s},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression
;return s+='<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(3)).call(t,"This media is being synced.",{hash:{},data:o}))+"</h4> <h4>"+l(i(n(3)).call(t,"Watch the status of the sync {1}here{2}.",'<a class="status-link" href="#">',"</a>",{hash:{},data:o}))+"</h4> </div> </div> "})},function(e,t,n){"use strict"
;var i=n(1542),r=n.n(i),a=n(20),o=a.a.ItemView.extend({className:"modal-body",template:r.a,events:{"click .try-again-link":"onTryAgainClick"},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","form")}});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression
;return s+='<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(3)).call(t,"There was a problem syncing this media.",{hash:{},data:o}))+'</h4> <h4><a class="try-again-link" href="#">'+l(i(n(3)).call(t,"Try again",{hash:{},data:o}))+"</a></h4> </div> </div> "})},function(e,t,n){"use strict";var i=n(1544),r=n.n(i),a=n(400),o=a.a.extend({
name:"selectDeviceModal",template:r.a,serializeData:function(){return{devices:this.collection.toJSON()}}});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i="";return i+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+h((n=e&&e.id,typeof n===f?n.apply(e):n))+'" href="#"> ',n=r.if.call(e,e&&e.name,{hash:{},inverse:v.program(4,c,t),fn:v.program(2,l,t),
data:t}),(n||0===n)&&(i+=n),i+=" ",n=r.if.call(e,e&&e.isCloudSync,{hash:{},inverse:v.noop,fn:v.program(6,u,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> </li> "}function l(e,t){var r="";return r+=" "+h(i(n(629)).call(e,e&&e.name,25,{hash:{},data:t}))+" "}function c(e,t){var r="";return r+=" "+h(i(n(629)).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"],r=this.merge(r,e.helpers),o=o||{}
;var d,p="",h=this.escapeExpression,f="function",v=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 iphone"></i> '+h(i(n(3)).call(t,"Choose Destination",{hash:{},data:o}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',
d=r.each.call(t,t&&t.devices,{hash:{},inverse:v.noop,fn:v.program(1,s,o),data:o}),(d||0===d)&&(p+=d),p+=" </ul> </div> </div> </div> "})},function(e,t,n){"use strict";function i(e){var t=Object(o.d)("appModel").get("user"),n=t.get("homeUsers"),i=n.get(t.id);if(i.get("protected")||n.length>1)return a.a.Deferred().reject().promise();var r=new l.a({model:i,isEditing:!0,isEditWarning:!0});return r.promise.always(function(e){e||s.a.trigger("show:modal",new c.a({type:"home"}))}),
s.a.trigger("show:modal",r),r.promise}var r=n(12),a=n.n(r),o=n(15),s=n(17),l=n(404),c=n(878);t.a=i},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="modal-dialog"> <div class="modal-alert"></div> <div class="modal-content"></div> </div> '})},function(e,t,n){"use strict"
;var i=n(1548),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(15),c=n(32),u=n(164),d=n(241),p=n(854),h=n(1549),f=s.a.Layout.extend({className:"user-select-modal-users-container",template:r.a,ui:{loading:".loading"},regions:{body:".modal-body"},onlyAfterRender:["onUserPopulated","onHomeUsersPopulated","onError"],initialize:function(e){var t=l.d("appModel");this.user=t.get("user"),this.homeUsers=this.user.get("homeUsers"),
this.user.server.populate().done(o.a.bind(this.onUserPopulated,this)).fail(o.a.bind(this.onError,this))},showList:function(e){this.ui.loading.addClass("hidden"),this.body.show(new h.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(o.a.bind(function(){this.trigger("resolve")},this)),
t.always(this.whenRendered(function(){this.ui.loading.addClass("hidden")}))},onUserPopulated:function(){this.homeUsers.fetch().done(o.a.bind(this.onHomeUsersPopulated,this)).fail(o.a.bind(this.onError,this))},onHomeUsersPopulated:function(e){c.a.execute("lockUser").always(o.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 p.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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="";return s+='<div class="modal-header"> <h4 class="modal-title"> '+(0,this.escapeExpression)(i(n(3)).call(t,"Select User",{hash:{},data:o}))+' <span class="loading loading-sm"></span> </h4> </div> <div class="modal-body"></div> '})},function(e,t,n){"use strict";var i=n(63),r=n(875),a=i.a.extend({tagName:"ul",className:"tile-list user-select-list",itemView:r.a});t.a=a
},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return' <div class="user-select-container"> '}function o(e,t){return' <a class="user-select-container" href="#"> '}function s(e,t){return" </div> "}function l(e,t){return" </a> "}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var c,u="",d=this;return c=n.if.call(t,t&&t.disabled,{hash:{},inverse:d.program(3,o,r),fn:d.program(1,a,r),data:r}),(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,r),fn:d.program(5,s,r),data:r}),(c||0===c)&&(u+=c),u+=" "})},function(e,t,n){"use strict";function i(e,t){return t?e.get("Media").findIndex(function(e){return e.id===t}):0}t.a=i},function(e,t,n){"use strict"
;function i(e,t){var n=e.Part;return a.a.indexOf(n,a.a.findWhere(n,{key:t}))}var r=n(5),a=n.n(r);t.a=i},function(e,t,n){"use strict";var i=n(1554),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(15),d=n(4),p=n(17),h=n(38),f=n(32),v=n(875),g=n(878),m=c.a.Layout.extend({className:"user-select-modal-pin-container",template:r.a,ui:{digitContainer:".pin-digit-container",input:".pin-input",digits:".pin-digit",loading:".loading",removeBtn:".remove-btn",saveBtn:".save-btn",
pinForgotLink:".pin-forgot-link"},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.d("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(){return{
isEditing:this.isEditing&&!this.isEditConfirmation,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");this.savePIN(e).fail(this.whenRendered(function(){this.ui.saveBtn.removeClass("disabled"),
p.a.trigger("show:alert",{type:"error",message:Object(d.default)("This PIN could not be saved.")})}))}},removePIN:function(){if(!this.ui.removeBtn.isDisabled()){this.ui.removeBtn.addClass("disabled");this.savePIN("").fail(this.whenRendered(function(){this.ui.removeBtn.removeClass("disabled"),p.a.trigger("show:alert",{type:"error",message:Object(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(o.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&&p.a.trigger("show:modal",new g.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(o.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,r){var a=e[i]||"";a&&!n&&(a="&bull;"),l()(r).toggleClass("current",i===t).html(a)})},onRender:function(){this.userList.show(new v.a({model:this.model,disabled:!0})),this.ui.pinForgotLink.toggleClass("hidden",this.model.get("restricted")),
h.a.mobile||setTimeout(o.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;if(!/[0-9]/.test(n.charAt(n.length-1)))return void t.val(n.slice(0,i-1));4===n.length&&(!this.isEditing||this.isEditConfirmation?(t.blur(),this.confirmUser(this.getPIN())):this.ui.saveBtn.focus())},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()
;if(4!==t.length)return void p.a.trigger("show:alert",{type:"error",message:Object(d.default)("Please enter a 4 digit PIN.")});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=m},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return' <a class="back-btn btn-gray" href="#"><i class="glyphicon chevron-left"></i></a> '}function l(e,t){var r="";return r+=' <i class="modal-icon glyphicon pencil"></i> '+b(i(n(3)).call(e,"Edit PIN",{hash:{},data:t}))+" "}function c(e,t){var n;return n=r.if.call(e,e&&e.isEditConfirmation,{hash:{},inverse:I.program(8,d,t),fn:I.program(6,u,t),data:t}),n||0===n?n:""}function u(e,t){var r=""
;return r+=" "+b(i(n(3)).call(e,"Confirm Current PIN",{hash:{},data:t}))+" "}function d(e,t){var r="";return r+=" "+b(i(n(3)).call(e,"Enter PIN",{hash:{},data:t}))+" "}function p(e,t){var r="";return r+=' <p class="help-block"> '+b(i(n(3)).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 h(e,t){var a,o="";return o+=' <div class="modal-footer"> ',a=r.if.call(e,e&&e.hasCurrentPIN,{hash:{},
inverse:I.noop,fn:I.program(13,f,t),data:t}),(a||0===a)&&(o+=a),o+=" ",a=r.if.call(e,e&&e.isEditWarning,{hash:{},inverse:I.program(17,g,t),fn:I.program(15,v,t),data:t}),(a||0===a)&&(o+=a),o+=' <button type="submit" class="save-btn btn-link">'+b(i(n(3)).call(e,"Save",{hash:{},data:t}))+"</button> </div> "}function f(e,t){var r="";return r+=' <button type="button" class="remove-btn btn-gray pull-left">'+b(i(n(3)).call(e,"Remove",{hash:{},data:t}))+"</button> "}function v(e,t){var r=""
;return r+=' <button type="button" class="skip-btn btn-gray" data-dismiss="modal">'+b(i(n(3)).call(e,"Skip",{hash:{},data:t}))+"</button> "}function g(e,t){var r="";return r+=' <button type="button" class="cancel-btn btn-gray" data-dismiss="modal">'+b(i(n(3)).call(e,"Cancel",{hash:{},data:t}))+"</button> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var m,y="",b=this.escapeExpression,I=this
;return y+='<div class="modal-header"> <div class="home-user-dropdown-container pull-right"></div> <h4 class="modal-title"> ',m=r.if.call(t,t&&t.showBackButton,{hash:{},inverse:I.noop,fn:I.program(1,s,o),data:o}),(m||0===m)&&(y+=m),y+=" ",m=r.if.call(t,t&&t.isEditing,{hash:{},inverse:I.program(5,c,o),fn:I.program(3,l,o),data:o}),(m||0===m)&&(y+=m),
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"> <a class="pin-forgot-link btn-gray hidden" href="https://www.plex.tv/pin-reset/" target="_blank">'+b(i(n(3)).call(t,"Forgot?",{hash:{},data:o
}))+'</a> <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> ',m=r.if.call(t,t&&t.isEditWarning,{hash:{},inverse:I.noop,fn:I.program(10,p,o),data:o}),(m||0===m)&&(y+=m),y+=" </div> ",m=r.if.call(t,t&&t.isEditing,{hash:{},inverse:I.noop,fn:I.program(12,h,o),data:o}),(m||0===m)&&(y+=m),y+=" </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}
var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression;return s+='<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(3)).call(t,"Welcome to Plex Home",{hash:{},data:o
}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <p>'+l(i(n(3)).call(t,"{1}, so we've made a few changes to help keep your media safe.",t&&t.intro,{hash:{},data:o}))+"</p> <ol> <li>"+l(i(n(3)).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:o
}))+"</li> <li>"+l(i(n(3)).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:o
}))+"</li> </ol> <p>"+l(i(n(3)).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:o}))+'</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-lg btn-primary" data-dismiss="modal">'+l(i(n(3)).call(t,"OK",{hash:{},data:o}))+"</button> </div> </div> </div> "})},function(e,t,n){"use strict"
;var i=n(1557),r=n.n(i),a=n(280),o=a.a.extend({className:"user-select-alert-bar",template:r.a});t.a=o},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,o,s="",l=this.escapeExpression;return s+='<span class="message">',(o=n.message)?a=o.call(t,{hash:{},data:r}):(o=t&&t.message,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),s+=l(a)+"</span> "})},function(e,t,n){"use strict"
;function i(e){var t=e.syncItem,n=e.server;if(!t.server.get("connected"))return l.a.trigger("show:alert",{type:"error",message:Object(s.default)("Please sign in to remove sync items.")}),o.a.Deferred().reject().promise();var i=r(),a=i.promise.then(function(){var e=t.destroy();return e.fail(function(e){l.a.trigger("show:alert",{type:"error",message:Object(s.default)("There was a problem removing this sync item.")})}),e.always(function(){i.hide()}),e});return a=a.then(function(){
return c.a.execute("refreshSyncLists",{server:n,silent:!0,skipContent:!0})})}function r(){var e=new u.a({title:Object(s.default)("Stop Syncing"),message:Object(s.default)("Are you sure you want to stop syncing this item? All files created by this job will be removed from the device."),confirmLabel:Object(s.default)("Remove"),cancelLabel:Object(s.default)("Cancel"),async:!0,hasDanger:!0});return l.a.trigger("show:modal",e),e}var a=n(12),o=n.n(a),s=n(4),l=n(17),c=n(32),u=n(49);t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.server,n=a.a.extend(t.getXHROptions("/sync/refreshSynclists"),{type:"PUT"}),i=s.a.ajax(n);return e.skipContent||(i=i.then(function(e){var n=a.a.extend(t.getXHROptions("/sync/refreshContent"),{type:"PUT"});return s.a.ajax(n)})),i.done(function(){e.silent||c.a.trigger("show:alert",{type:"success",message:Object(l.default)("Synced items were refreshed.")})}),i.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17);t.a=i},function(e,t,n){
"use strict";function i(e){function t(){var e=i.destroy({wait:!0});return e.fail(function(){a.a.trigger("show:alert",{type:"error",message:Object(r.default)("There was a problem removing this device.")})}),e.always(function(){s.hide()}),e.promise()}var n,i=e.device
;n=i.get("isCloudSync")?Object(r.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."):Object(r.default)("If you remove this device, you will need to sign in again on the device to restore access to Plex.");var s=new o.a({title:Object(r.default)("Remove Device"),message:n,confirmLabel:Object(r.default)("Remove"),cancelLabel:Object(r.default)("Cancel"),async:!0,hasDanger:!0
}),l=s.promise;return l=l.then(function(){return t()}),a.a.trigger("show:modal",s),l}var r=n(4),a=n(17),o=n(49);t.a=i},function(e,t,n){"use strict";function i(e){function t(){i&&n.set("home",!1);var e=n.destroy({wait:!0});return e.done(function(){var e=a.d("appModel"),t=e.get("user"),r=n.get("serverShares");if(t.get("desktop").get("invites").fetch(),t.get("desktop").get("sentInvites").fetch(),i){t.get("homeUsers").fetch()}r.getLibraryCount({owned:!1})&&s.a.trigger("discover:servers")}),
e.fail(function(){i&&n.set("home",!0),s.a.trigger("show:alert",{type:"error",message:Object(o.default)("There was a problem removing this friend.")})}),e.always(function(){l.hide()}),e.promise()}var n=e.friend,i=n.get("home"),l=r(e),c=l.promise;return c=c.then(function(){return t()}),s.a.trigger("show:modal",l),c}function r(e){var t=e.friend,n=t.get("serverShares"),i=n.getLibraryCount({owned:!0}),r=n.getLibraryCount({owned:!1
}),s=i+r,u=t.get("title"),d=Object(o.default)("Are you sure you want to remove {1}?",u),p=Object(l.a)(Object(o.default)("library"),s,Object(o.default)("libraries"));if(i&&r?d+=" "+Object(o.default)("You are sharing {1} {2} with each other.",s,p):i?d+=" "+Object(o.default)("You are sharing {1} {2} with this friend.",i,p):r&&(d+=" "+Object(o.default)("This friend is sharing {1} {2} with you.",r,p)),t.get("home")){var h=a.d("appModel"),f=h.get("user")
;f.get("homeUsers").get(f.id).get("admin")?d+=" "+Object(o.default)("This friend will be removed from your home."):d+=" "+Object(o.default)("You will be leaving your home.")}return new c.a({title:Object(o.default)("Remove Friend"),message:d,confirmLabel:Object(o.default)("Remove"),cancelLabel:Object(o.default)("Cancel"),async:!0,hasDanger:!0})}var a=n(15),o=n(4),s=n(17),l=n(478),c=n(49);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=n.save(null,{force:!0})
;n.trigger("destroy",n,i),e.done(function(){f.fetch(),h.get("desktop").get("friends").fetch(),h.get("desktop").get("sentInvites").fetch(),n.get("server")&&p.a.trigger("discover:servers"),v.resolve()}),e.fail(function(e){p.a.trigger("show:alert",{type:"error",message:Object(d.default)("There was a problem accepting this invite.")}),i.add(n,{at:o}),v.reject(e)})}var n=e.invite,i=n.collection,o=i.indexOf(n),l=u.d("appModel"),h=l.get("user"),f=h.get("homeUsers"),v=c.a.Deferred();s.a.extend(e,{
homeUsers:f,signedInHomeUser:f.get(h.id)});var g=r(e);return g.done(function(){a(e).always(t)}),g.fail(function(){v.reject()}),v.promise}function r(e){if(!e.invite.get("home"))return c.a.Deferred().resolve().promise();var t
;t=e.homeUsers.length>1?e.signedInHomeUser.get("admin")?Object(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."):Object(d.default)("Are you sure you want to join this home? You will leave your current home."):Object(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 n=new h.a({
title:Object(d.default)("Join Home"),message:t,confirmLabel:Object(d.default)("Join"),cancelLabel:Object(d.default)("Cancel"),hasDanger:!0});return p.a.trigger("show:modal",n),n.promise}function a(e){if(e.invite.get("home")&&!e.signedInHomeUser.get("protected")){var t=new f.a({model:e.signedInHomeUser,isEditing:!0,isEditWarning:!0});return p.a.trigger("show:modal",t),t.promise}return c.a.Deferred().resolve().promise()}var o=n(5),s=n.n(o),l=n(12),c=n.n(l),u=n(15),d=n(4),p=n(17),h=n(49),f=n(404)
;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")){o.d("appModel").get("user").get("desktop").get("friends").fetch()}}),t.fail(function(){a(e)}),t.always(function(){i.hide()}),t.promise()}var n=e.invite,i=r(e),s=i.promise;return s=s.then(function(){return t()}),l.a.trigger("show:modal",i),s}function r(e){var t,n;return"requests"===e.subset?(t=Object(s.default)("Reject Invite"),
n=Object(s.default)("Are you sure you want to reject this invite?")):(t=Object(s.default)("Cancel Invite"),n=Object(s.default)("Are you sure you want to cancel this invite?")),new c.a({title:t,message:n,async:!0})}function a(e){var t;t="requests"===e.subset?Object(s.default)("There was a problem rejecting this invite."):Object(s.default)("There was a problem canceling this invite."),l.a.trigger("show:alert",{type:"error",message:t})}var o=n(15),s=n(4),l=n(17),c=n(49);t.a=i},function(e,t,n){
"use strict";function i(e){var t,n=e.user,i=e.serverShare,r=i.get("Section");if(!r||!r.length)return c.a.Deferred().resolve().promise();t=i.get("allLibraries")?[]:s.a.pluck(s.a.where(r,{shared:!0}),"id");var o={server_id:i.get("machineIdentifier"),shared_server:{library_section_ids:t}};n.isNew()&&(o.sharing_settings=n.getSaveParams()),i.isNew()&&(n.isNew()?o.shared_server.invited_email=n.get("username"):o.shared_server.invited_id=n.id);var l=i.url(),u=s.a.extend(n.server.getXHROptions(l),{
type:i.isNew()?"POST":"PUT",contentType:"application/json",data:a()(o)});return c.a.ajax(u).promise()}var r=n(178),a=n.n(r),o=n(5),s=n.n(o),l=n(12),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=l.destroy({wait:!0});return e.done(function(){var e=r.d("appModel"),t=e.get("user");t.get("desktop").get("friends").fetch(),t.get("desktop").get("invites").fetch(),o.a.trigger("discover:servers")}),e.fail(function(){var e
;e=l.get("owned")?Object(a.default)("There was a problem removing this share."):Object(a.default)("There was a problem leaving this server."),o.a.trigger("show:alert",{type:"error",message:e})}),e.always(function(){c.hide()}),e.promise()}var n,i,l=e.serverShare;l.get("owned")?(n=Object(a.default)("Stop Sharing"),i=Object(a.default)("Are you sure you want to stop sharing with this friend?")):(n=Object(a.default)("Leave Server"),
i=Object(a.default)("Are you sure you want to leave this server? You can rejoin at any time."));var c=new s.a({title:n,message:i,async:!0,hasDanger:!0}),u=c.promise;return u=u.then(function(){return t()}),o.a.trigger("show:modal",c),u}var r=n(15),a=n(4),o=n(17),s=n(49);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=s.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=o.hasHome();if(o.set("home",t),!t){o.get("homeDetails").clear()}}),i.fail(function(){a(e)}),i.always(function(){h.hide()}),i.promise()}var n=e.homeUser,i=u.d("appModel"),o=i.get("user"),l=o.get("homeUsers"),d=o.get("desktop").get("friends"),h=r(e),f=h.promise;return f=f.then(function(){return t()}),p.a.trigger("show:modal",h),f}function r(e){
var t,n,i,r=e.homeUser;return e.isSignedInUser?(t=Object(d.default)("Leave Home"),i=Object(d.default)("Leave"),n=r.get("admin")?Object(d.default)("You are the admin in this home. If you leave, the remaining users will be removed and managed users will be deleted."):Object(d.default)("Are you sure you want to leave this home?")):(t=Object(d.default)("Remove User"),i=Object(d.default)("Remove"),
n=r.get("restricted")?Object(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."):Object(d.default)("You will no longer be able to switch to this user.")),new h.a({title:t,message:n,confirmLabel:i,cancelLabel:Object(d.default)("Cancel"),async:!0,hasDanger:!0})}function a(e){var t
;t=e.isSignedInUser?Object(d.default)("There was a problem leaving this home."):Object(d.default)("There was a problem removing this user."),p.a.trigger("show:alert",{type:"error",message:t})}var o=n(5),s=n.n(o),l=n(12),c=n.n(l),u=n(15),d=n(4),p=n(17),h=n(49);t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a.Deferred(),n="/api/users/validate?invited_email="+encodeURIComponent(e.username),i=a.a.extend(e.server.getXHROptions(n),{type:"POST"}),r=s.a.ajax(i);return r.done(function(){
t.resolve()}),r.fail(function(e){var n=e.responseText,i=l.a.parseXML(n);t.reject(e,i&&i.status)}),t.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(67);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.user,n=t.get("homeDetails"),i=t.get("homeSize");n.set("guestEnabled",e.enable);var r=n.save();return r.done(function(){t.get("homeUsers").fetch(),t.get("desktop").get("friends").fetch(),t.hasHome()||c.a.execute("showHomeWarningsModal"),e.enable||2!==i||n.clear()}),r.fail(function(t){
var n=l.a.parseXML(t.responseText),i=n&&n.status;a.a.isString(i)||(i=e.enable?Object(o.default)("Unable to enable guest account"):Object(o.default)("Unable to disable guest account")),s.a.trigger("show:alert",{type:"error",message:i})}),r}var r=n(5),a=n.n(r),o=n(4),s=n(17),l=n(67),c=n(32);t.a=i},function(e,t,n){"use strict";function i(){return r().then(a).then(o)}function r(){var e=l.a.Deferred(),t=c.d("appModel"),n=t.get("user");if(!!n.get("features").get(u.d)||n.get("homeUsers").length>1){
var i=n.get("homeUsers").findWhere({guest:!0}),r=n.get("homeDetails");if(i)e.resolve(i);else{var a=r.populate();a.done(function(){i=new p.a({id:r.get("guestUserID"),guest:!0},{server:n.server}),e.resolve(i)}),a.fail(function(){e.reject()})}}else e.reject();return e.promise()}function a(e){return d.a.execute("authenticateWithServer",{homeUser:e})}function o(e){var t=l.a.Deferred(),n=c.d("appModel"),i=n.get("user");return i.clearAccessToken().always(function(){i.signIn(e).always(function(){
t.resolve()})}),t.promise()}var s=n(12),l=n.n(s),c=n(15),u=n(52),d=n(32),p=n(611);t.a=i},function(e,t,n){"use strict";function i(){Object(o.d)("metrics").trackEvent({event:"client:signout",interaction:!0});var e=u.a.get("allowSSO");return c.a.execute("resetUser").then(function(){return d.a.restoreDefaults(),d.a.save()}).then(function(){if(e){return Object(o.d)("appModel").set({isSigningOut:!0}),Object(l.a)(),s.a.trigger("navigate","login"),a.a.Deferred().reject().promise()}
s.a.trigger("reset:servers")})}var r=n(12),a=n.n(r),o=n(15),s=n(17),l=n(34),c=n(32),u=n(62),d=n(164);t.a=i},function(e,t,n){"use strict";function i(e){var t=l.d("appModel"),n=t.get("user"),i=[],r={url:e.item.get("url"),message:e.message};s.a.each(e.playlistIDs,function(e){var t=d.join(["/pms/playlists/",e,"/items"],r),o=s.a.extend(n.server.getXHROptions(t),{type:"POST"});i.push(a.a.ajax(o))});var o=a.a.when.apply(a.a,i);return o.fail(function(e){u.a.trigger("show:alert",{type:"error",
message:Object(c.default)("There was a problem recommending this item.")})}),o.promise()}var r=n(12),a=n.n(r),o=n(5),s=n.n(o),l=n(15),c=n(4),u=n(17),d=n(19);t.a=i},function(e,t,n){"use strict";function i(){var e=a.a.Deferred();return Object(o.d)("appModel").get("user").get("isLocked")?e.reject():e.resolve(),e.promise()}var r=n(12),a=n.n(r),o=n(15);t.a=i},function(e,t,n){"use strict";function i(){var e=s.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 r(){var e=s.a.Deferred(),t=l.a.set(f,1);return t.done(function(){l.a.remove(f),e.resolve()}),t.fail(function(t){var n=new u.a;d.a.warn("Storage module swapped for "+n.name+' due to exception: "'+t+'"'),c.a.register(n),l.a.register(n,{ignorePrevious:!0}),e.resolve()}),e.promise()}function a(){return i().then(r).then(h.a).then(p.a)}t.a=a
;var o=n(12),s=n.n(o),l=n(163),c=n(474),u=n(1574),d=n(30),p=n(1575),h=n(1576),f="plexTestToken"},function(e,t,n){"use strict";var i=n(631),r=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=r},function(e,t,n){"use strict";function i(){
var e=Object(o.d)("appModel"),t=e.get("experienceSettings"),n=e.get("settings"),i=n.populate().then(function(){var e=a.a.result(t,"defaults"),i=n.get("subtitlesBurnLevel"),r=n.get("subtitleSize"),o=[];if(null!=i&&i!==s.a.ALWAYS){var c=t.save("subtitlesBurnLevel",i);c=c.then(function(){return n.save("subtitlesBurnLevel",void 0)}),o.push(c)}if(null!=r&&r!==e.subtitleSize){var u=t.save("subtitleSize",r);u=u.then(function(){return n.save("subtitleSize",void 0)}),o.push(u)}return Object(l.a)(o)})
;return Object(c.a)(i)}var r=n(5),a=n.n(r),o=n(15),s=n(334),l=n(463),c=n(151);t.a=i},function(e,t,n){"use strict";function i(){var e=Object(u.d)("appModel"),t=e.get("experienceSettings"),n=e.get("settings"),i=n.populate().then(function(){var e=s.a.result(t,"defaults"),i=n.get("extrasPrefixCount"),r=n.get("localQuality"),o=n.get("remoteQuality"),l=d.a.get("resumePlayQueue"),u=[];if(null!=i&&i!==e.extrasPrefixCount){var h=t.save("extrasPrefixCount",i);h=h.then(function(){
return n.save("extrasPrefixCount",void 0)}),u.push(h)}if(null!=r&&r!==e.localQuality){var y=t.save("localQuality",r);y=y.then(function(){return n.save("localQuality",void 0)}),u.push(y)}if(null!=o&&o!==e.remoteQuality){var b=t.save("remoteQuality",o);b=b.then(function(){return n.save("remoteQuality",void 0)}),u.push(b)}return u.push(l.then(function(e){var n=void 0;try{n=JSON.parse(e)}catch(e){n={}}var i=a()(n);if(!i.length)return c.a.Deferred().reject().promise();var r=i.reduce(function(e,t){
var i=n[t],r=Object(v.a)(f.m,i.serverID),a=Object(v.a)(f.k,g.c.LIBRARY_PROVIDER_IDENTIFIER,r);return e[t]={serverEntityID:r,providerEntityID:a,playQueueID:i.playQueueID,playQueueType:m.a,playQueueRepeat:!1,playQueueOffset:Math.floor(i.position/1e3)},e},{});return t.save("restorePlayQueue",r)}).then(function(){return d.a.remove("resumePlayQueue")})),Object(p.a)(u)});return Object(h.a)(i)}
var r=n(50),a=n.n(r),o=n(5),s=n.n(o),l=n(12),c=n.n(l),u=n(15),d=n(163),p=n(463),h=n(151),f=n(43),v=n(40),g=n(55),m=n(214);t.a=i},function(e,t,n){"use strict";function i(){var e=Object(c.a)(window.location.href),t=e.hashParams,n=s.a.parse(t.substr(1)),i=Object(d.a)(n.pinID);if(i){var r=Object(l.d)("appModel");Object(h.a)(r).set({pinIDInitial:i}),Object(p.a)(),window.history.replaceState(null,null,Object(u.a)(window.location.href,"pinID"))}return a.a.Deferred().resolve().promise()}
var r=n(12),a=n.n(r),o=n(590),s=n.n(o),l=n(15),c=n(879),u=n(1578),d=n(464),p=n(34),h=n(479);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=new RegExp("(\\?|&)("+Object(r.a)(t)+"=[^\\?&]+(?:[\\?&]?))","g");return e.replace(n,function(e,t){return"?"===t?"?":""}).replace(/\?$/,"")}var r=n(215);t.a=i},function(e,t,n){"use strict";function i(){if(!s.a.hasReplaceState)return a.a.Deferred().resolve().promise();var e=a.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 r=""+o.join([""+t.origin+t.pathname],n)+t.hash;window.history.replaceState({},"",r)}return e.resolve().promise()}var r=n(12),a=n.n(r),o=n(19),s=n(83),l=n(58),c=n(62);t.a=i},function(e,t,n){"use strict";function i(){var e=Object(r.d)("appModel");return Object(o.a)().then(function(){return Object(a.a)(e.get("experienceSettings").populate())})}t.a=i;var r=n(15),a=n(151),o=n(1581)},function(e,t,n){"use strict"
;function i(){var e=Object(o.d)("appModel").get("settings"),t=a.a.Deferred();return a.a.when(e.populate(),l.a.populate()).always(function(){var n=e.get("language");s.a.load(n).always(function(){t.resolve()})}),t.promise()}t.a=i;var r=n(12),a=n.n(r),o=n(15),s=n(467),l=n(164)},function(e,t,n){"use strict";function i(){var e=Object(r.d)("appModel").get("user"),t=Object(a.a)();return t.done(function(){new o.a(e).start(),(new s.a).start()}),t}t.a=i;var r=n(15),a=n(1583),o=n(1584),s=n(1588)
},function(e,t,n){"use strict";function i(){var e=a.a.Deferred(),t=s.a.get("myPlexAccessToken");return t.done(function(e){var t=Object(o.d)("appModel").get("user"),n=l.a.get("users"),i=n.findWhere({authToken:e});i&&t.activateStoredUser(i.id)}),t.always(function(){e.resolve()}),e.promise()}t.a=i;var r=n(12),a=n.n(r),o=n(15),s=n(163),l=n(164)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(12),o=n.n(a),s=n(17),l=n(4),c=n(1585),u=n(49),d=n(404),p=n(335),h=c.a.prototype,f=c.a.extend({
collectionNames:["homeDetails","homeUsers"],flexCollectionNames:["devices","friends","invites","socialNetworks"],populateActions:[p.c],handleInvalidToken:function(){var e=new u.a({title:Object(l.default)("Invalid Credentials"),message:Object(l.default)("Your credentials have expired. Please sign in again."),confirmLabel:Object(l.default)("OK"),cancelLabel:Object(l.default)("Ignore")});e.promise.done(function(){s.a.trigger("navigate","login",{silent:!0})}),s.a.trigger("show:modal",e)},
onIsSignedInChange:function(e,t){if(h.onIsSignedInChange.apply(this,arguments),e.get("isFullUser")&&t){var n=e.server.getXHROptions("/api/claim/subscribe");o.a.ajax(r()({},n,{type:"POST"}))}},onIsLockedChange:function(e,t){h.onIsLockedChange.apply(this,arguments),t&&s.a.trigger("show:modal",new d.a({isForced:!0}))},onIsUnlockedChange:function(){}});t.a=f},function(e,t,n){"use strict";var i=n(15),r=n(30),a=n(69),o=n(17),s=n(326),l=n(89),c=(n(33),n(164)),u=n(62),d=n(241),p=a.a.extend({mixins:l.a,
collectionNames:[],flexCollectionNames:[],populateActions:[],initialize:function(e){this.user=e},start:function(){var e=this,t=this.user;this.previousUserID=t.id;var n={change:this.onUserChange};["isSignedIn","isLocked","isUnlocked","hasInvalidToken"].forEach(function(i){var r=t.get(i),a=e["on"+Object(s.a)(i)+"Change"];n["change:"+i]=a,r&&a.call(e,t,r)}),this.listenTo(t,n);var a=Object(i.d)("appModel").get("settings"),o=u.a.get("proxied")||a.get("autoLogin")||t.get("isUnlocked")
;Object(r.a)("[UserManager] autoLogin",o),o||this._lockIfInHome()},handleInvalidToken:function(){},_lockIfInHome:function(){var e=c.a.getActiveUser();e&&e.get("home")&&this.user.set("lockState",d.a.lockStates.LOCKED)},onHasInvalidTokenChange:function(e,t){t&&this.handleInvalidToken()},onIsUnlockedChange:function(e,t){},onUserChange:function(e){if(this.user.get("isSignedIn")){var t=c.a.getActiveUser();if(t)t.copyFromUser(e);else{c.a.get("users").add(e.toJSON(),{parse:!0})}c.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},r=e.get("features");r.abortPendingPopulate(),r.fetch(),this.collectionNames.forEach(function(t){return e.get(t).populate(n)}),this.flexCollectionNames.forEach(function(t){return e.get("desktop").get(t).populate(n)});var a=Object(i.d)("appStore").dispatch
;this.populateActions.forEach(function(e){return a(e())})},onIsLockedChange:function(e,t){t&&(this.previousUserID=e.id,this.isPreviousUserRemote=e.get("isRemote"),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";o.a.trigger(t)},0))}});t.a=p
},function(e,t,n){"use strict";function i(e){return Object(a.a)(Object(r.a)(e).join("_"))}var r=n(1587),a=n(405);t.a=i},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";var i=n(5),r=n.n(i),a=n(15),o=n(69),s=n(17),l=n(89),c=n(1589),u=o.a.extend({mixins:l.a,announcementsUpdateDelay:36e5,initialize:function(){this.user=Object(a.d)("appModel").get("user"),
r.a.bindAll(this,"updateAnnouncements","onSignedInChange")},start:function(){var e=r.a.debounce(this.onAnnouncementsChange),t=r.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&&s.a.trigger("show:bar","alertbar",new c.a({model:t}))}}});t.a=u},function(e,t,n){"use strict";var i=n(1590),r=n.n(i),a=n(5),o=n.n(a),s=n(880),l=n(280),c=l.a.extend({className:"alert-bar notify",template:r.a,events:o.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:Object(s.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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r,a="";return a+=' <a class="info-link link" href="'+d((r=e&&e.url,typeof r===u?r.apply(e):r))+'" target="_blank">'+d(i(n(3)).call(e,"More Info",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var l,c="",u="function",d=this.escapeExpression,p=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=r.if.call(t,t&&t.url,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+=" "})},function(e,t,n){"use strict";function i(){var e=Object(a.a)();return e.done(function(){Object(r.d)("serverUpdateManager").start()}),e}t.a=i;var r=n(15),a=n(1592)},function(e,t,n){"use strict";function i(){
Object(f.a)("[Servers] Resetting...");var e=Object(v.d)("appStore"),t=Object(v.d)("appModel"),n=t.get("servers");Object(v.d)("serverManager").stop(),Object(v.d)("primaryServerManager").stop(),Object(v.d)("manualServerManager").stop(),Object(v.d)("serverConnectionManager").stop(),Object(v.d)("serverConnectionTestManager").reset(),n.uninitialize(),n.reset(),n.initialize(),t.unset("primaryServer"),e.dispatch(Object(b.e)({budget:1/0})),r()}function r(){Object(f.a)("[Servers] Initializing..."),a(),
o(),s(),l(),c(),Object(v.d)("serverManager").start(),Object(v.d)("primaryServerManager").start(),Object(v.d)("manualServerManager").start(),Object(v.d)("serverConnectionManager").start(),Object(f.a)("[Servers] Finished initialization")}function a(){var e=Object(v.d)("appModel"),t=e.get("servers"),n=e.get("cloudServer"),i="https://plex.tv".match(/^([^:]+):\/\/(.*)$/),r=i[1],a=i[2];n.addConnection({scheme:r,address:a}),t.add(n)}function o(e){
var t=Object(v.d)("appModel"),n=t.get("servers"),i=m.a.getActiveServers();i&&i.each(function(e){if(e.get("connections").length)try{var i=new y.c(e.toJSON(),{parent:t});n.add(i)}catch(e){f.a.warn(e)}})}function s(){var e=Object(v.d)("appModel"),t=e.get("servers"),n=g.a.get("primaryServer");if(n){var i=new y.c({machineIdentifier:n.machineIdentifier,friendlyName:n.name,isShared:n.shared,superToken:n.superToken,accessToken:n.accessToken,sourceTitle:n.sourceTitle},{parent:e});i.addConnection({
scheme:n.scheme,address:n.address,port:n.port}),t.add(i)}}function l(){var e=Object(v.d)("appModel"),t=e.get("servers"),n=new y.c({isBundled:!0},{parent:e});n.addConnection({scheme:window.location.protocol.replace(":",""),address:window.location.hostname,port:window.location.port,isBundled:!0}),t.add(n)}function c(){if(g.a.get("allowLoopbackDiscovery")){var e=Object(v.d)("appModel"),t=e.get("servers"),n=new y.c({},{parent:e});n.addConnection({scheme:"http",address:"127.0.0.1",port:"32400"}),
t.add(n)}}function u(){return r(),h.a.on("reset:servers",i),p.a.Deferred().resolve().promise()}t.a=u;var d=n(12),p=n.n(d),h=n(17),f=n(30),v=n(15),g=n(62),m=n(164),y=n(99),b=n(240)},function(e,t,n){"use strict";function i(){function e(){function t(){n.removeEventListener("playing",t),n.removeEventListener("error",t),n.src="",n.removeAttribute("src"),Object(o.b)(n)}l.forEach(function(t){document.body.removeEventListener(t,e,!0)});var n=Object(o.a)("audio",!0);n.addEventListener("playing",t),
n.addEventListener("error",t),n.src=s.a,n.play()}return l.forEach(function(t){document.body.addEventListener(t,e,!0)}),a.a.Deferred().resolve().promise()}t.a=i;var r=n(12),a=n.n(r),o=n(633),s=n(1594),l=["touchstart","mousedown","click","keydown","keypress"]},function(e,t,n){"use strict"
;t.a="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uQxAACFEII9ACZ/sJZwWEoEb8w/////N//////JcxjHjf+7/v/H2PzCCFAiDtGeyBCIx7bJJ1mmEEMy6g8mm2c8nrGABB4h2Mkmn//4z/73u773R5qHHu/j/w7Kxkzh5lWRWdsifCkNAnY9Zc1HvDAhjhSHdFkHFzLmabt/AQxSg2wwzLhHIJOBnAWwVY4zrhIYhhc2kvhYDfQ4hDi2Gmh5KyFn8EcGIrHAngNgIwVIEMf5bzbAiTRoAD///8z/KVhkkWEle6IX+d/z4fvH3BShK1e5kmjkCMoxVmXhd4ROlTKo3iipasvTilY21q19ta30/v/0/idPX1v8PNxJL6ramnOVsdvMv2akO0iSYIzdJFirtzWXCZicS9vHqvSKyqm5XJBdqBwPxyfJdykhWTZ0G0ZyTZGpLKxsNwwoRhsx3tZfhwmeOBVISm3impAC/IT/8hP/EKEM1KMdVdVKM2rHV4x7HVXZvbVVKN/qq8CiV9VL9jjH/6l6qf7MBCjZmOqsAibjcP+qqqv0oxqpa/NVW286hPo1nz2L/h8+jXt//uSxCmDU2IK/ECN98KKtE5IYzNoCfbw+u9i5r8PoadUMFPKqWL4LK3T/LCraMSHGkW4bpLXR/E6LlHOVQxmslKVJ8IULktMN06N0FKCpHCoYsjC4F+Z0NVqdNFoGSTjSiyjzLdnZ2fNqTi2eHKONONKLMPMKLONKLMPQRJGlFxZRoKcJFAYEeIFiRQkUWUeYfef//Ko04soswso40UJAgMw8wosososy0EalnZyjQUGBRQGIFggOWUacWUeYmuadrZziQKKEgQsQLAhQkUJAgMQDghltLO1onp0cpkNInSFMqlYeSEJ5AHsqFdOwy1DA2sRmRJKxdKRfLhfLw5BzUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7ksRRA8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU="
},function(e,t,n){"use strict";function i(){function e(e){if(n||arguments[1]instanceof window.KeyboardEvent&&"esc"===arguments[2])return e.apply(t,a.a.toArray(arguments).slice(1))}var t=u.a.getInstance(),n=!0;return d.a.on("anyModalOpen",function(){n=!1}),d.a.on("allModalsClosed",function(){n=!0}),a.a.each(t.shortcuts,function(n){c.a.bind(n.keys,a.a.wrap(t[n.fn],e))}),s.a.Deferred().resolve().promise()}t.a=i;var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(1596),c=n.n(l),u=n(634),d=n(17)
},function(e,t,n){var i;!function(r,a,o){function s(e,t,n){if(e.addEventListener)return void e.addEventListener(t,n,!1);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 S[e.which]?S[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){if(e.preventDefault)return void e.preventDefault();e.returnValue=!1}function p(e){if(e.stopPropagation)return void e.stopPropagation();e.cancelBubble=!0}function h(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function f(){if(!I){I={};for(var e in S)e>95&&e<112||S.hasOwnProperty(e)&&(I[S[e]]=e)}return I}function v(e,t,n){return n||(n=f()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function g(e){
return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus"),e.split("+"))}function m(e,t){var n,i,r,a=[];for(n=g(e),r=0;r<n.length;++r)i=n[r],C[i]&&(i=C[i]),t&&"keypress"!=t&&D[i]&&(i=D[i],a.push("shift")),h(i)&&a.push(i);return t=v(i,a,t),{key:i,modifiers:a,action:t}}function y(e,t){return null!==e&&e!==a&&(e===t||y(e.parentNode,t))}function b(e){function t(e){e=e||{};var t,n=!1;for(t in I)e[t]?n=!0:I[t]=0;n||(D=!1)}function n(e,t,n,i,r,a){var o,s,l=[],u=n.type;if(!g._callbacks[e])return[]
;for("keyup"==u&&h(e)&&(t=[e]),o=0;o<g._callbacks[e].length;++o)if(s=g._callbacks[e][o],(i||!s.seq||I[s.seq]==s.level)&&u==s.action&&("keypress"==u&&!n.metaKey&&!n.ctrlKey||c(t,s.modifiers))){var d=!i&&s.combo==r,p=i&&s.seq==i&&s.level==a;(d||p)&&g._callbacks[e].splice(o,1),l.push(s)}return l}function i(e,t,n,i){g.stopCallback(t,t.target||t.srcElement,n,i)||!1===e(t,n)&&(d(t),p(t))}function r(e){"number"!=typeof e.which&&(e.which=e.keyCode);var t=l(e)
;if(t)return"keyup"==e.type&&S===t?void(S=!1):void g.handleKey(t,u(e),e)}function o(){clearTimeout(y),y=setTimeout(t,1e3)}function f(e,n,r,a){function s(n){i(r,n,e),"keyup"!==a&&(S=l(n)),setTimeout(t,10)}I[e]=0;for(var c=0;c<n.length;++c){var u=c+1===n.length,d=u?s:function(t){return function(){D=t,++I[e],o()}}(a||m(n[c+1]).action);v(n[c],d,a,e,c)}}function v(e,t,i,r,a){g._directMap[e+":"+i]=t,e=e.replace(/\s+/g," ");var o,s=e.split(" ");if(s.length>1)return void f(e,s,t,i);o=m(e,i),
g._callbacks[o.key]=g._callbacks[o.key]||[],n(o.key,o.modifiers,{type:o.action},r,e,a),g._callbacks[o.key][r?"unshift":"push"]({callback:t,modifiers:o.modifiers,action:o.action,seq:r,level:a,combo:e})}var g=this;if(e=e||a,!(g instanceof b))return new b(e);g.target=e,g._callbacks={},g._directMap={};var y,I={},S=!1,M=!1,D=!1;g._handleKey=function(e,r,a){var o,s=n(e,r,a),l={},c=0,u=!1;for(o=0;o<s.length;++o)s[o].seq&&(c=Math.max(c,s[o].level));for(o=0;o<s.length;++o)if(s[o].seq){
if(s[o].level!=c)continue;u=!0,l[s[o].seq]=1,i(s[o].callback,a,s[o].combo,s[o].seq)}else u||i(s[o].callback,a,s[o].combo);var d="keypress"==a.type&&M;a.type!=D||h(e)||d||t(l),M=u&&"keydown"==a.type},g._bindMultiple=function(e,t,n){for(var i=0;i<e.length;++i)v(e[i],t,n)},s(e,"keypress",r),s(e,"keydown",r),s(e,"keyup",r)}for(var I,S={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:"'"},D={"~":"`","!":"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"
},O=1;O<20;++O)S[111+O]="f"+O;for(O=0;O<=9;++O)S[O+96]=O;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(a);for(var t in e)"_"!==t.charAt(0)&&(b[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t))},b.init(),r.Mousetrap=b,void 0!==e&&e.exports&&(e.exports=b),void 0!==(i=function(){return b
}.call(t,n,t,e))&&(e.exports=i)}(window,document)},function(e,t,n){"use strict";function i(){return new s.a,new l.a,new c.a,new u.a,new d.a,new p.a,new h.a,new f.a,o.c.history.start(),a.a.Deferred().resolve().promise()}t.a=i;var r=n(12),a=n.n(r),o=n(68),s=n(1598),l=n(3094),c=n(3121),u=n(3308),d=n(3360),p=n(3534),h=n(3571),f=n(3638)},function(e,t,n){"use strict";var i=n(68),r=n(17),a=n(1599),o=n(1600),s=a.a.extend({controller:new o.a,appRoutes:{"!/dashboard":"dashboard",
"!(/server/:serverID)/dashboard":"dashboard","!/provider/:providerID/list":"providerList","!/provider/:providerID/settings":"providerSettings","!(/server/:serverID)(/provider/:providerID)/list":"list","!(/server/:serverID)/needsUpdate":"needsUpdate","":"dashboard","!/login":"login","!/unauthorized":"unauthorized","!/logs":"logs","!/info":"info","*404":"error"},onNavigateRefreshDashboard:function(){var e=i.c.history.getFragment()
;""===e||"!/dashboard"===e?i.c.history.loadUrl(""):r.a.trigger("navigate","dashboard")}});t.a=s},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(68),o=n(15),s=n(17),l=n(248),c=l.a.extend({initialize:function(){l.a.prototype.initialize.apply(this,arguments),this.listenTo(s.a,{"navigate:back":this.onNavigateBack,"navigate:forward":this.onNavigateForward,"navigate:refresh":this.onNavigateRefresh,"navigate:refresh:dashboard":this.onNavigateRefreshDashboard})},onNavigateBack:function(){
var e=o.d("appModel"),t=e.get("history"),n=e.get("forwardHistory");if(t.length<2)return this.navigate("",{trigger:!0});n.unshift(t.pop()),this.navigate(r.a.last(t),{trigger:!0})},onNavigateForward:function(){var e=o.d("appModel"),t=e.get("forwardHistory");t.length&&this.navigate(t[0],{trigger:!0})},onNavigateRefresh:function(){a.c.history.loadUrl(a.c.history.getFragment())}});t.a=c},function(e,t,n){"use strict"
;var i=n(17),r=n(19),a=n(15),o=n(1601),s=n(1603),l=n(2654),c=n(3033),u=n(3039),d=n(3040),p=n(3059),h=n(1202),f=n(3079),v=n(3081),g=n(3083),m=n(383),y=n(3086),b=n(3088),I=n(3090),S=n(3092),M={signIn:h.a,error:m.a,channelError:g.a,notFound:y.a,serverRequired:b.a,unauthorized:I.a,unavailable:S.a},D=o.a.extend({getViewByType:function(e){return M[e]},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 l.a({selectedServerID:e,params:r.parseParams(t)}))})},list:function(e,t,n){var a=r.parseParams(n);this.populateView().done(function(){i.a.trigger("show:view",new c.a({selectedServerID:e,selectedProviderID:t,params:a}))})},providerList:function(e,t){var n=r.parseParams(t);this.populateView().done(function(){i.a.trigger("show:view",new u.a({selectedProviderID:e,params:n}))})},providerSettings:function(e){
this.populateView().done(function(){i.a.trigger("show:view",new d.a({selectedProviderID:e}))})},needsUpdate:function(e){this.populateView().done(function(){Object(a.d)("appModel").get("servers").findWhere({isOutOfDate:!0})?i.a.trigger("show:view",new p.a({selectedServerID:e})):i.a.trigger("navigate","dashboard",{replace:!0})})},logs:function(){i.a.trigger("show:view",new f.a({collection:Object(a.d)("logs")}))},info:function(){i.a.trigger("show:view",new v.a)},onAppInitialize:function(){
this.appView=new s.a,this.appView.render()}});t.a=D},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(15),o=n(249),s=n(17),l=n(151),c=n(62),u=o.a.extend({initialize:function(){this.viewFor=this.viewFor.bind(this)},viewFor:function(e,t){var n=this.getViewByType(e);if(n)return new n(t);throw new Error("No view defined for "+e)},login:function(){var e=this,t=Object(a.d)("appModel"),n=t.get("cloudServer");s.a.trigger("show:loading"),n.populate().done(function(){
s.a.trigger("navigate","dashboard")}).fail(function(){var i=n.get("available");if(!0!==i&&!1!==i)return void e.listenToOnce(n,"change:available",e.login);var r=t.get("user"),a=r.get("features");Object(l.a)(a.populate()).done(function(){var t=i?e.viewFor("signIn"):e.viewFor("unavailable",{model:n});s.a.trigger("show:view",t)})})},error:function(){s.a.trigger("show:view",this.viewFor("notFound",{type:"404"}))},unauthorized:function(e){var t=this;r.a.some(this.getUnauthorizedHandlers(),function(n){
return n.call(t,e)})||s.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){return Object(a.d)("appModel").get("user").get("isLocked")},handleAuthorized:function(e){var t=Object(a.d)("appModel"),n=t.get("servers").findWhere({authorized:!0}),i=!n&&!t.get("skipSignIn")
;return i&&this.populateServersThenRecover(),i},handlePrimaryServer:function(e){var t=e.server,n=e.options;return!(t||!n.primaryServer)&&(s.a.trigger("show:view",this.viewFor("serverRequired")),!0)},handleServer:function(e){var t=e.server,n=e.options,i=this.viewFor,r=Object(a.d)("appModel"),o=r.get("cloudServer"),l=void 0,c=void 0
;return!(!n.serverID&&!n.primaryServer)&&(t?t.get("available")?t.get("authorized")||"resolved"!==o.populatePromise.state()?t.get("authorized")||(l=this.populateServersThenRecover()):c=i("unauthorized"):c=i("unavailable",{model:t}):c=i("notFound",{type:"server"}),c&&s.a.trigger("show:view",c),!(!c&&!l))},handleChannelError:function(e){var t=e.options,n=!!t.channelID;return n&&s.a.trigger("show:view",this.viewFor("channelError")),n},populateServersThenRecover:function(){
var e=Object(a.d)("appModel"),t=e.get("skipSignIn"),n=e.get("servers"),i=n.findWhere({cloud:!0}),r=this.viewFor;return n.populate().done(function(){var e=n.find(function(e){return e.get("hasManualConnection")});i.get("authorized")?s.a.trigger("navigate:refresh"):e?e.get("authorized")?s.a.trigger("navigate","dashboard"):s.a.trigger("show:view",r("unavailable",{model:e})):t?s.a.trigger("show:view",r("serverRequired")):s.a.trigger("navigate","login",{silent:!0})}).fail(function(){
c.a.get("requiresSignIn")?s.a.trigger("show:view",r("unavailable",{model:i})):s.a.trigger("show:view",r("serverRequired"))})}});t.a=u},function(e,t,n){"use strict";function i(e){var t=a.a.Deferred();return e&&e.then?e.then(t.reject,t.reject):t.reject(e),t.promise()}var r=n(12),a=n.n(r);t.a=i},function(e,t,n){"use strict"
;var i=n(1604),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(15),d=n(17),p=n(62),h=n(882),f=n(1606),v=n(1758),g=n(1760),m=n(1762),y=n(2070),b=n(2572),I=n(280),S=n(2653),M=c.a.Layout.extend({el:"#plex",template:r.a,resizeDelay:200,ui:{content:"#content"},customRegions:{background:{prepend:!0,global:!0},content:{selector:"#content",global:!0,scrollable:!0,channelName:"content"},status:{prepend:!0,global:!0},navbar:{prepend:!0,global:!0},alertbar:{selector:".alert-bar-container"},
audioVideoPlayer:{append:!0,global:!0},photoPlayer:{append:!0,global:!0}},openAlerts:{},initialize:function(){o.a.bindAll(this,"triggerResizeEvent");var e=u.d("appModel");this.user=e.get("user"),this.modals=[],o.a.each(o.a.keys(this.customRegions),function(e){var t=this.customRegions[e],n=t.selector||o.a.uniqueId("r");t.scrollable?this.addRegion(e,new S.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,"update:scrollPosition":this.onUpdateScrollPosition}),l()(window).on("resize",this.onResize)},showCustomRegion:function(e,t){var n=this.customRegions[e],i=this[e]
;if(this.user.get("locked"))return i.lockedView=t,void t.close();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 h.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 v.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 I.a({alert:o.a.first(e)})))},showBar:function(e,t){this.customRegions[e].modifier&&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=o.a.indexOf(this.modals,e);t>-1&&this.modals.splice(t,1)[0].close(),e.transparent&&!o.a.findWhere(this.modals,{transparent:!0})&&l()("body").removeClass("show-modal-transparent")},
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)},lockAll:function(){this._isLocked=!0;var e=o.a.map(o.a.keys(this.customRegions),function(e){return this[e]},this);o.a.each(e,function(e){e.close()},this)},resetContentLockedRegions:function(){
o.a.each(o.a.keys(this.customRegions),function(e){if(!this.customRegions[e].global){var t=this[e];t.lockedView&&(t.lockedView=null)}},this)},restoreAll:function(){this._isLocked=!1;var e=u.d("appModel");e.get("authorized")&&this.showBar("navbar",new b.a({model:e}),{prepend:!0}),this.showCustomRegion("background",this.backgroundView),this.showCustomRegion("status",new g.a),this.showCustomRegion("photoPlayer",new m.a),this.showCustomRegion("audioVideoPlayer",new y.a)},
triggerResizeEvent:function(){d.a.trigger("resize")},onRender:function(){this.backgroundView=new f.a,this.restoreAll()},onAuthorizedChange:function(e,t){if(t){var n=u.d("appModel");this.showBar("navbar",new b.a({model:n}),{prepend:!0});var i=this.user.get("locked");!1!==i&&null!==i||this.showAlertBar()}else this.hideBar("navbar"),d.a.trigger("navigate:refresh")},onFirstRunChange:function(e,t){this.$el.toggleClass("show-first-run",t)},onUserLockedChange:function(e,t){
t?this.lockAll():!this._isLocked||!1!==t&&null!==t||(null===t&&(this.backgroundView=new f.a),this.restoreAll())},onResize:function(){this.resizeTimeout=clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(this.triggerResizeEvent,this.resizeDelay)},onUpdateScrollPosition:function(e){this.ui.content[0].scrollTop=e}});t.a=M},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},
'<div class="alert-bar-container"></div> <div id="content" class="scroll-container dark-scrollbar"></div> '})},function(e,t){e.exports=function(){return""}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(1620)),s=n(1658),l=n(56),c=n(66),u=r()(c.a,{},void 0,r()(s.a,{}),r()(o.a,{})),d=l.a.extend({className:"background-container",component:function(){return u}});t.a=d},function(e,t,n){e.exports={default:n(1608),__esModule:!0}},function(e,t,n){n(833),e.exports=n(116).Symbol.for
},,,,,,,,,,,,function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(11)),f=n(6),v=(n.n(f),n(15)),g=n(896),m=n(1656),y=Object(f.createSelector)(g.a,function(e){return e.ui.background},function(e){return e.ui.audioVideoPlayer.isOpen},function(e,t,n){return{volume:e,isBackgroundPending:t.isBackgroundPending,themeMusicUrl:t.themeMusicUrl,component:Object(v.d)("mediaComponent").getComponent({protocol:"http",isDirectPlay:!0
}),isPlayerOpen:n}}),b=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.shouldComponentUpdate=function(e){var t=this.props,n=t.volume,i=t.isPlayerOpen;return e.volume!==n||e.isPlayerOpen!==i||!e.isBackgroundPending},t.prototype.render=function(){var e=this.props,t=e.component,n=e.isPlayerOpen,i=e.themeMusicUrl,a=e.volume;return n?null:r()(m.a,{themeMusicUrl:i,component:t,volume:a})},t}(p.Component);t.a=Object(h.b)(y)(b)},function(e,t,n){
e.exports={default:n(1622),__esModule:!0}},function(e,t,n){n(1623),e.exports=n(116).Object.setPrototypeOf},function(e,t,n){var i=n(162);i(i.S,"Object",{setPrototypeOf:n(1624).set})},function(e,t,n){var i=n(270),r=n(389),a=function(e,t){if(r(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(820)(Function.call,n(835).f(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(e){t=!0}
return function(e,n){return a(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:a}},function(e,t,n){e.exports={default:n(1626),__esModule:!0}},function(e,t,n){n(1627);var i=n(116).Object;e.exports=function(e,t){return i.create(e,t)}},function(e,t,n){var i=n(162);i(i.S,"Object",{create:n(594)})},function(e,t,n){"use strict";var i=n(168),r=n(46),a=n(1629);e.exports=function(){function e(e,t,n,i,o,s){
s!==a&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=i,n.PropTypes=n,n}},function(e,t,n){"use strict"
;e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},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 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 a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
;e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),s=(n.n(o),n(1)),l=n.n(s),c=n(887);n(637);t.a=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1],s=n||t+"Subscription",u=function(e){function n(a,o){i(this,n);var s=r(this,e.call(this,a,o));return s[t]=a.store,s}return a(n,e),n.prototype.getChildContext=function(){
var e;return e={},e[t]=this[t],e[s]=null,e},n.prototype.render=function(){return o.Children.only(this.props.children)},n}(o.Component);return u.propTypes={store:c.a.isRequired,children:l.a.element.isRequired},u.childContextTypes=(e={},e[t]=c.a.isRequired,e[s]=c.b,e),u}()},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";var e={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0
},t={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n=Object.defineProperty,i=Object.getOwnPropertyNames,r=Object.getOwnPropertySymbols,a=Object.getOwnPropertyDescriptor,o=Object.getPrototypeOf,s=o&&o(Object);return function l(c,u,d){if("string"!=typeof u){if(s){var p=o(u);p&&p!==s&&l(c,p,d)}var h=i(u);r&&(h=h.concat(r(u)));for(var f=0;f<h.length;++f){var v=h[f];if(!(e[v]||t[v]||d&&d[v])){var g=a(u,v);try{n(c,v,g)}catch(e){}}}return c}return c}})},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 r(){var e=[],t=[];return{clear:function(){t=a,e=a},notify:function(){for(var n=e=t,i=0;i<n.length;i++)n[i]()},get:function(){return t},subscribe:function(n){var i=!0;return t===e&&(t=e.slice()),t.push(n),function(){i&&e!==a&&(i=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}}n.d(t,"a",function(){return s});var a=null,o={notify:function(){}},s=function(){function e(t,n,r){
i(this,e),this.store=t,this.parentSub=n,this.onStateChange=r,this.unsubscribe=null,this.listeners=o}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=r())},e.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=o)},e}()},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 r(e,t,n){
for(var i=t.length-1;i>=0;i--){var r=t[i](e);if(r)return r}return function(t,i){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+i.wrappedComponentName+".")}}function a(e,t){return e===t}var o=n(888),s=n(1634),l=n(1635),c=n(1652),u=n(1653),d=n(1654),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=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,n=void 0===t?o.a:t,h=e.mapStateToPropsFactories,f=void 0===h?c.a:h,v=e.mapDispatchToPropsFactories,g=void 0===v?l.a:v,m=e.mergePropsFactories,y=void 0===m?u.a:m,b=e.selectorFactory,I=void 0===b?d.a:b;return function(e,t,o){
var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=l.pure,u=void 0===c||c,d=l.areStatesEqual,h=void 0===d?a:d,v=l.areOwnPropsEqual,m=void 0===v?s.a:v,b=l.areStatePropsEqual,S=void 0===b?s.a:b,M=l.areMergedPropsEqual,D=void 0===M?s.a:M,C=i(l,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),O=r(e,f,"mapStateToProps"),j=r(t,g,"mapDispatchToProps"),P=r(o,y,"mergeProps");return n(I,p({methodName:"connect",getDisplayName:function(e){
return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:O,initMapDispatchToProps:j,initMergeProps:P,pure:u,areStatesEqual:h,areOwnPropsEqual:m,areStatePropsEqual:S,areMergedPropsEqual:D},C))}}()},function(e,t,n){"use strict";function i(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function r(e,t){if(i(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1
;for(var o=0;o<n.length;o++)if(!a.call(t,n[o])||!i(e[n[o]],t[n[o]]))return!1;return!0}t.a=r;var a=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";function i(e){return"function"==typeof e?Object(s.b)(e,"mapDispatchToProps"):void 0}function r(e){return e?void 0:Object(s.a)(function(e){return{dispatch:e}})}function a(e){return e&&"object"==typeof e?Object(s.a)(function(t){return Object(o.bindActionCreators)(e,t)}):void 0}var o=n(480),s=(n.n(o),n(893));t.a=[i,r,a]},function(e,t,n){
function i(e){var t=o.call(e,l),n=e[l];try{e[l]=void 0;var i=!0}catch(e){}var r=s.call(e);return i&&(t?e[l]=n:delete e[l]),r}var r=n(638),a=Object.prototype,o=a.hasOwnProperty,s=a.toString,l=r?r.toStringTag:void 0;e.exports=i},function(e,t){function n(e){return r.call(e)}var i=Object.prototype,r=i.toString;e.exports=n},function(e,t,n){var i=n(1639),r=i(Object.getPrototypeOf,Object);e.exports=r},function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},function(e,t,n){
"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=t&&t.type;return"Given action "+(n&&'"'+n.toString()+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state.'}function a(e){Object.keys(e).forEach(function(t){var n=e[t];if(void 0===n(void 0,{type:s.ActionTypes.INIT
}))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.');if(void 0===n(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")
}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+s.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 o(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++){var o=t[i]
;"function"==typeof e[o]&&(n[o]=e[o])}var s,l=Object.keys(n);try{a(n)}catch(e){s=e}return function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];if(s)throw s;for(var i=!1,a={},o=0;o<l.length;o++){var c=l[o],u=n[c],d=e[c],p=u(d,t);if(void 0===p){var h=r(c,t);throw new Error(h)}a[c]=p,i=i||p!==d}return i?a:e}}t.__esModule=!0,t.default=o;var s=n(889),l=n(217),c=(i(l),n(891));i(c)},function(e,t,n){"use strict";function i(e,t){return function(){
return t(e.apply(void 0,arguments))}}function r(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),r={},a=0;a<n.length;a++){var o=n[a],s=e[o];"function"==typeof s&&(r[o]=i(s,t))}return r}t.__esModule=!0,t.default=r},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(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=i;var a=n(892),o=function(e){return e&&e.__esModule?e:{default:e}}(a)},function(e,t,n){"use strict";function i(e){if(!Object(o.a)(e)||Object(r.a)(e)!=s)return!1;var t=Object(a.a)(e);if(null===t)return!0;var n=d.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==p}
var r=n(1644),a=n(1649),o=n(1651),s="[object Object]",l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,p=u.call(Object);t.a=i},function(e,t,n){"use strict";function i(e){return null==e?void 0===e?l:s:c&&c in Object(e)?Object(a.a)(e):Object(o.a)(e)}var r=n(895),a=n(1647),o=n(1648),s="[object Null]",l="[object Undefined]",c=r.a?r.a.toStringTag:void 0;t.a=i},function(e,t,n){"use strict"
;var i=n(1646),r="object"==typeof self&&self&&self.Object===Object&&self,a=i.a||r||Function("return this")();t.a=a},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(t,n(191))},function(e,t,n){"use strict";function i(e){var t=o.call(e,l),n=e[l];try{e[l]=void 0;var i=!0}catch(e){}var r=s.call(e);return i&&(t?e[l]=n:delete e[l]),r}var r=n(895),a=Object.prototype,o=a.hasOwnProperty,s=a.toString,l=r.a?r.a.toStringTag:void 0;t.a=i
},function(e,t,n){"use strict";function i(e){return a.call(e)}var r=Object.prototype,a=r.toString;t.a=i},function(e,t,n){"use strict";var i=n(1650),r=Object(i.a)(Object.getPrototypeOf,Object);t.a=r},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";function i(e){return null!=e&&"object"==typeof e}t.a=i},function(e,t,n){"use strict";function i(e){return"function"==typeof e?Object(a.b)(e,"mapStateToProps"):void 0}function r(e){
return e?void 0:Object(a.a)(function(){return{}})}var a=n(893);t.a=[i,r]},function(e,t,n){"use strict";function i(e,t,n){return s({},n,e,t)}function r(e){return function(t,n){var i=(n.displayName,n.pure),r=n.areMergedPropsEqual,a=!1,o=void 0;return function(t,n,s){var l=e(t,n,s);return a?i&&r(l,o)||(o=l):(a=!0,o=l),o}}}function a(e){return"function"==typeof e?r(e):void 0}function o(e){return e?void 0:function(){return i}}var s=(n(894),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=[a,o]},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 r(e,t,n,i){return function(r,a){return n(e(r,a),t(i,a),a)}}function a(e,t,n,i,r){function a(r,a){return f=r,v=a,g=e(f,v),m=t(i,v),y=n(g,m,v),h=!0,y}function o(){return g=e(f,v),
t.dependsOnOwnProps&&(m=t(i,v)),y=n(g,m,v)}function s(){return e.dependsOnOwnProps&&(g=e(f,v)),t.dependsOnOwnProps&&(m=t(i,v)),y=n(g,m,v)}function l(){var t=e(f,v),i=!p(t,g);return g=t,i&&(y=n(g,m,v)),y}function c(e,t){var n=!d(t,v),i=!u(e,f);return f=e,v=t,n&&i?o():n?s():i?l():y}var u=r.areStatesEqual,d=r.areOwnPropsEqual,p=r.areStatePropsEqual,h=!1,f=void 0,v=void 0,g=void 0,m=void 0,y=void 0;return function(e,t){return h?c(e,t):a(e,t)}}function o(e,t){
var n=t.initMapStateToProps,o=t.initMapDispatchToProps,s=t.initMergeProps,l=i(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),c=n(e,l),u=o(e,l),d=s(e,l);return(l.pure?a:r)(c,u,d,e,l)}t.a=o;n(1655)},function(e,t,n){"use strict";n(637)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(1657)),f=2e3,v=100,g=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i))
;return r.fadeOut=function(){r.state.currentThemeMusicUrl&&r.props.volume>0?(r.fadeOutStartMilliseconds||(r.fadeOutStartMilliseconds=Date.now()),r.setState(r.updateFrameState)):r.reset()},r.updateFrameState=function(e){var t=e.relativeVolume,n=Date.now()-r.fadeOutStartMilliseconds,i=Object(h.a)(n,t,-t,f);return i=Math.max(0,i),i&&(r.fadeOutTimeoutID=setTimeout(r.fadeOut,v)),{volume:i}},r.onDurationMillisecondsChange=function(e){r._currentDurationMilliseconds=e},
r.onPositionMillisecondsChange=function(e){var t=Math.floor(e/1e3);r.state.positionSeconds!==t&&r.setState({positionSeconds:t}),r._currentDurationMilliseconds-e<=f&&!r.fadeOutTimeoutID&&r.fadeOut()},r.onEnd=function(){r.reset()},r.state=r.getInitialStateFromProps(n),r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.props,n=t.volume,i=t.themeMusicUrl,r=e.volume,a=e.themeMusicUrl;if(n!==r){var o={relativeVolume:this.getRelativeVolume(r)}
;this.fadeOutTimeoutID||(o.volume=o.relativeVolume),this.setState(o)}i!==a&&(a?this.reset(a):this.fadeOutTimeoutID||this.fadeOut())},t.prototype.componentWillUnmount=function(){this.reset()},t.prototype.getRelativeVolume=function(e){return.5*e},t.prototype.getInitialStateFromProps=function(e){var t=e.currentThemeMusicUrl,n=e.volume,i=this.getRelativeVolume(n);return{currentThemeMusicUrl:t,relativeVolume:i,volume:i,positionSeconds:0}},t.prototype.reset=function(e){
this.fadeOutTimeoutID=clearTimeout(this.fadeOutTimeoutID),this.fadeOutStartMilliseconds=null,this.setState(this.getInitialStateFromProps({currentThemeMusicUrl:e,volume:this.props.volume}))},t.prototype.render=function(){var e=this.state,t=e.currentThemeMusicUrl,n=e.positionSeconds,i=e.volume;if(!t)return null;var a=this.props.component;return r()(a,{mediaType:"audio",isBackgroundMedia:!0,src:t,positionSeconds:n,volume:i,allowRecycleElement:!0,
onDurationMillisecondsChange:this.onDurationMillisecondsChange,onPositionMillisecondsChange:this.onPositionMillisecondsChange,onEnd:this.onEnd},t)},t}(p.Component);t.a=g},function(e,t,n){"use strict";function i(e,t,n,i){return n*e/i+t}t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(11)),f=n(6),v=(n.n(f),n(897)),g=Object(f.createSelector)(function(e){return e.ui.background},function(e){return{
serverEntityID:e.server,providerEntityID:e.provider,url:e.imageUrl,allowLightPreset:e.allowLightPreset,isBackgroundPending:e.isBackgroundPending}}),m=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.shouldComponentUpdate=function(e){return!e.isBackgroundPending},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.url,a=e.allowLightPreset;return r()(v.a,{serverEntityID:t,providerEntityID:n,url:i,
allowPreset:!0,allowLightPreset:a})},t}(p.Component);t.a=Object(h.b)(function(e){return g})(m)},function(e,t,n){"use strict";function i(e,t,n){var i=s()({collapsed:!1,name:""},n),r=Object(l.a)(e,t,n);if(a()(r).length){var o=i.name,c=i.collapsed,u="shallowCompare()"+(o?": "+o:""),d=window.console;c&&d.groupCollapsed?d.groupCollapsed(u):d.group(u);for(var p in r){d.group(p);for(var h in r[p]){var f=r[p][h];d.debug(h+":",f.current,"=>",f.next)}d.groupEnd()}d.groupEnd()}}
Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(50),a=n.n(r),o=n(7),s=n.n(o),l=n(1660)},function(e,t,n){"use strict";function i(e,t,n){return e.reduce(function(e,i){return e[i]={current:t[i],next:n[i]},e},{})}function r(e,t){var n=o()(e,t);return s.reduce(function(r,a){return n[a].length&&(r[a]=i(n[a],e,t)),r},{})}t.a=r;var a=n(1661),o=n.n(a),s=["added","deleted","updated"]},function(e,t,n){"use strict";/**
 * @license shallow-diff https://github.com/cosmosio/shallow-diff
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2015 Olivier Scherrer <pode.fr@gmail.com>
 */
function i(e,t){if(e)throw new TypeError("simple-loop: "+t)}var r=n(1662);e.exports=function(e,t){i("object"!=typeof e,"the first object to compare with shallowDiff needs to be an object"),i("object"!=typeof t,"the second object to compare with shallowDiff needs to be an object");var n=[],a=[],o=[],s=[];return r(t,function(t,i){i in e?t!==e[i]?a.push(i):t===e[i]&&n.push(i):s.push(i)}),r(e,function(e,n){n in t||o.push(n)}),{updated:a,unchanged:n,added:s,deleted:o}}},function(e,t,n){"use strict"
;/**
 * @license simple-loop https://github.com/flams/simple-loop
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2015 Olivier Scherrer <pode.fr@gmail.com>
 */
function i(e,t){if(e)throw new TypeError("simple-loop: "+t)}e.exports=function(e,t,n){i("object"!=typeof e,"iterated must be an array/object"),i("function"!=typeof t,"callback must be a function");var r;if(Array.isArray(e))for(r=0;r<e.length;r++)t.call(n,e[r],r,e);else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}},function(e,t){e.exports={appear:"crossFadeTransition-appear-3FC71",enter:"crossFadeTransition-enter-2rg1k",appearActive:"crossFadeTransition-appearActive-3D8kF",
enterActive:"crossFadeTransition-enterActive-V4ARk",leave:"crossFadeTransition-leave-2kwUR",leaveActive:"crossFadeTransition-leaveActive-jKpWB"}},function(e,t,n){"use strict";function i(e,t){function n(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];var r=a.a.Deferred();return setTimeout(function(){return r.resolve.apply(r,n)},t),r.promise()}return e.then(n)}var r=n(12),a=n.n(r);t.a=i},function(e,t,n){"use strict";function i(e){var t=a.a.Deferred()
;return e.then(t.resolve,t.reject,t.notify),{promise:t.promise(),cancel:function(){t.reject({isCanceled:!0})}}}var r=n(12),a=n.n(r);t.a=i},function(e,t,n){"use strict";function i(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")}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 o(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)}t.__esModule=!0;var s=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=n(0),c=i(l),u=n(1),d=i(u),p=n(1667),h=i(p),f=n(1671),v=i(f),g=n(925),m={transitionName:g.nameShape.isRequired,transitionAppear:d.default.bool,transitionEnter:d.default.bool,transitionLeave:d.default.bool,transitionAppearTimeout:(0,g.transitionTimeout)("Appear"),transitionEnterTimeout:(0,g.transitionTimeout)("Enter"),transitionLeaveTimeout:(0,g.transitionTimeout)("Leave")},y={transitionAppear:!1,transitionEnter:!0,transitionLeave:!0},b=function(e){function t(){var n,i,o;r(this,t)
;for(var s=arguments.length,l=Array(s),u=0;u<s;u++)l[u]=arguments[u];return n=i=a(this,e.call.apply(e,[this].concat(l))),i._wrapChild=function(e){return c.default.createElement(v.default,{name:i.props.transitionName,appear:i.props.transitionAppear,enter:i.props.transitionEnter,leave:i.props.transitionLeave,appearTimeout:i.props.transitionAppearTimeout,enterTimeout:i.props.transitionEnterTimeout,leaveTimeout:i.props.transitionLeaveTimeout},e)},o=n,a(i,o)}return o(t,e),
t.prototype.render=function(){return c.default.createElement(h.default,s({},this.props,{childFactory:this._wrapChild}))},t}(c.default.Component);b.displayName="CSSTransitionGroup",b.propTypes=m,b.defaultProps=y,t.default=b,e.exports=t.default},function(e,t,n){"use strict";function i(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")}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 o(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)}t.__esModule=!0
;var s=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=n(1668),c=i(l),u=n(0),d=i(u),p=n(1),h=i(p),f=n(1669),v=(i(f),n(1670)),g={component:h.default.any,childFactory:h.default.func,children:h.default.node},m={component:"span",childFactory:function(e){return e}},y=function(e){function t(n,i){r(this,t);var o=a(this,e.call(this,n,i));return o.performAppear=function(e){
o.currentlyTransitioningKeys[e]=!0;var t=o.childRefs[e];t.componentWillAppear?t.componentWillAppear(o._handleDoneAppearing.bind(o,e)):o._handleDoneAppearing(e)},o._handleDoneAppearing=function(e){var t=o.childRefs[e];t&&t.componentDidAppear&&t.componentDidAppear(),delete o.currentlyTransitioningKeys[e];var n=(0,v.getChildMapping)(o.props.children);n&&n.hasOwnProperty(e)||o.performLeave(e)},o.performEnter=function(e){o.currentlyTransitioningKeys[e]=!0;var t=o.childRefs[e]
;t.componentWillEnter?t.componentWillEnter(o._handleDoneEntering.bind(o,e)):o._handleDoneEntering(e)},o._handleDoneEntering=function(e){var t=o.childRefs[e];t&&t.componentDidEnter&&t.componentDidEnter(),delete o.currentlyTransitioningKeys[e];var n=(0,v.getChildMapping)(o.props.children);n&&n.hasOwnProperty(e)||o.performLeave(e)},o.performLeave=function(e){o.currentlyTransitioningKeys[e]=!0;var t=o.childRefs[e]
;t.componentWillLeave?t.componentWillLeave(o._handleDoneLeaving.bind(o,e)):o._handleDoneLeaving(e)},o._handleDoneLeaving=function(e){var t=o.childRefs[e];t&&t.componentDidLeave&&t.componentDidLeave(),delete o.currentlyTransitioningKeys[e];var n=(0,v.getChildMapping)(o.props.children);n&&n.hasOwnProperty(e)?o.performEnter(e):o.setState(function(t){var n=s({},t.children);return delete n[e],{children:n}})},o.childRefs=Object.create(null),o.state={children:(0,v.getChildMapping)(n.children)},o}
return o(t,e),t.prototype.componentWillMount=function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},t.prototype.componentDidMount=function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t)},t.prototype.componentWillReceiveProps=function(e){var t=(0,v.getChildMapping)(e.children),n=this.state.children;this.setState({children:(0,v.mergeChildMappings)(n,t)});for(var i in t){var r=n&&n.hasOwnProperty(i)
;!t[i]||r||this.currentlyTransitioningKeys[i]||this.keysToEnter.push(i)}for(var a in n){var o=t&&t.hasOwnProperty(a);!n[a]||o||this.currentlyTransitioningKeys[a]||this.keysToLeave.push(a)}},t.prototype.componentDidUpdate=function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},t.prototype.render=function(){var e=this,t=[];for(var n in this.state.children)!function(n){var i=e.state.children[n]
;if(i){var r="string"!=typeof i.ref,a=e.props.childFactory(i),o=function(t){e.childRefs[n]=t};a===i&&r&&(o=(0,c.default)(i.ref,o)),t.push(d.default.cloneElement(a,{key:n,ref:o}))}}(n);var i=s({},this.props);return delete i.transitionLeave,delete i.transitionName,delete i.transitionAppear,delete i.transitionEnter,delete i.childFactory,delete i.transitionLeaveTimeout,delete i.transitionEnterTimeout,delete i.transitionAppearTimeout,delete i.component,
d.default.createElement(this.props.component,i,t)},t}(d.default.Component);y.displayName="TransitionGroup",y.propTypes=g,y.defaultProps=m,t.default=y,e.exports=t.default},function(e,t){e.exports=function(){for(var e=arguments.length,t=[],n=0;n<e;n++)t[n]=arguments[n];if(t=t.filter(function(e){return null!=e}),0!==t.length)return 1===t.length?t[0]:t.reduce(function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}})}},function(e,t,n){"use strict";var i=function(){}
;e.exports=i},function(e,t,n){"use strict";function i(e){if(!e)return e;var t={};return a.Children.map(e,function(e){return e}).forEach(function(e){t[e.key]=e}),t}function r(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var i={},r=[];for(var a in e)t.hasOwnProperty(a)?r.length&&(i[a]=r,r=[]):r.push(a);var o=void 0,s={};for(var l in t){if(i.hasOwnProperty(l))for(o=0;o<i[l].length;o++){var c=i[l][o];s[i[l][o]]=n(c)}s[l]=n(l)}for(o=0;o<r.length;o++)s[r[o]]=n(r[o]);return s
}t.__esModule=!0,t.getChildMapping=i,t.mergeChildMappings=r;var a=n(0)},function(e,t,n){"use strict";function i(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")}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 o(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){return M.length?M.forEach(function(n){return e.addEventListener(n,t,!1)}):setTimeout(t,0),function(){M.length&&M.forEach(function(n){return e.removeEventListener(n,t,!1)})}}
t.__esModule=!0;var l=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},c=n(1672),u=i(c),d=n(1674),p=i(d),h=n(1675),f=i(h),v=n(1676),g=n(0),m=i(g),y=n(1),b=i(y),I=n(84),S=n(925),M=[];v.transitionEnd&&M.push(v.transitionEnd),v.animationEnd&&M.push(v.animationEnd);var D={children:b.default.node,name:S.nameShape.isRequired,appear:b.default.bool,enter:b.default.bool,leave:b.default.bool,
appearTimeout:b.default.number,enterTimeout:b.default.number,leaveTimeout:b.default.number},C=function(e){function t(){var n,i,o;r(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=a(this,e.call.apply(e,[this].concat(l))),i.componentWillAppear=function(e){i.props.appear?i.transition("appear",e,i.props.appearTimeout):e()},i.componentWillEnter=function(e){i.props.enter?i.transition("enter",e,i.props.enterTimeout):e()},i.componentWillLeave=function(e){
i.props.leave?i.transition("leave",e,i.props.leaveTimeout):e()},o=n,a(i,o)}return o(t,e),t.prototype.componentWillMount=function(){this.classNameAndNodeQueue=[],this.transitionTimeouts=[]},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach(function(e){clearTimeout(e)}),this.classNameAndNodeQueue.length=0},t.prototype.transition=function(e,t,n){var i=(0,I.findDOMNode)(this);if(!i)return void(t&&t())
;var r=this.props.name[e]||this.props.name+"-"+e,a=this.props.name[e+"Active"]||r+"-active",o=null,l=void 0;(0,u.default)(i,r),this.queueClassAndNode(a,i);var c=function(e){e&&e.target!==i||(clearTimeout(o),l&&l(),(0,p.default)(i,r),(0,p.default)(i,a),l&&l(),t&&t())};n?(o=setTimeout(c,n),this.transitionTimeouts.push(o)):v.transitionEnd&&(l=s(i,c))},t.prototype.queueClassAndNode=function(e,t){var n=this;this.classNameAndNodeQueue.push({className:e,node:t}),this.rafHandle||(this.rafHandle=(0,
f.default)(function(){return n.flushClassNameAndNodeQueue()}))},t.prototype.flushClassNameAndNodeQueue=function(){this.unmounted||this.classNameAndNodeQueue.forEach(function(e){e.node.scrollTop,(0,u.default)(e.node,e.className)}),this.classNameAndNodeQueue.length=0,this.rafHandle=null},t.prototype.render=function(){var e=l({},this.props);return delete e.name,delete e.appear,delete e.enter,delete e.leave,delete e.appearTimeout,delete e.enterTimeout,delete e.leaveTimeout,delete e.children,
m.default.cloneElement(m.default.Children.only(this.props.children),e)},t}(m.default.Component);C.displayName="CSSTransitionGroupChild",C.propTypes=D,t.default=C,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){e.classList?e.classList.add(t):(0,a.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(1673),a=function(e){
return e&&e.__esModule?e:{default:e}}(r);e.exports=t.default},function(e,t,n){"use strict";function i(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){
e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=i(e.className,t):e.setAttribute("class",i(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";function i(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-d)),i=setTimeout(e,n);return d=t,i}Object.defineProperty(t,"__esModule",{value:!0});var r=n(899),a=function(e){return e&&e.__esModule?e:{default:e}}(r),o=["","webkit","moz","o","ms"],s="clearTimeout",l=i,c=void 0,u=function(e,t){
return e+(e?t[0].toUpperCase()+t.substr(1):t)+"AnimationFrame"};a.default&&o.some(function(e){var t=u(e,"request");if(t in window)return s=u(e,"cancel"),l=function(e){return window[t](e)}});var d=(new Date).getTime();c=function(e){return l(e)},c.cancel=function(e){window[s]&&"function"==typeof window[s]&&window[s](e)},t.default=c,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
t.animationEnd=t.animationDelay=t.animationTiming=t.animationDuration=t.animationName=t.transitionEnd=t.transitionDuration=t.transitionDelay=t.transitionTiming=t.transitionProperty=t.transform=void 0;var i=n(899),r=function(e){return e&&e.__esModule?e:{default:e}}(i),a="transform",o=void 0,s=void 0,l=void 0,c=void 0,u=void 0,d=void 0,p=void 0,h=void 0,f=void 0,v=void 0,g=void 0;if(r.default){var m=function(){for(var e=document.createElement("div").style,t={O:function(e){return"o"+e.toLowerCase()
},Moz:function(e){return e.toLowerCase()},Webkit:function(e){return"webkit"+e},ms:function(e){return"MS"+e}},n=Object.keys(t),i=void 0,r=void 0,a="",o=0;o<n.length;o++){var s=n[o];if(s+"TransitionProperty"in e){a="-"+s.toLowerCase(),i=t[s]("TransitionEnd"),r=t[s]("AnimationEnd");break}}return!i&&"transitionProperty"in e&&(i="transitionend"),!r&&"animationName"in e&&(r="animationend"),e=null,{animationEnd:r,transitionEnd:i,prefix:a}}();o=m.prefix,t.transitionEnd=s=m.transitionEnd,
t.animationEnd=l=m.animationEnd,t.transform=a=o+"-"+a,t.transitionProperty=c=o+"-transition-property",t.transitionDuration=u=o+"-transition-duration",t.transitionDelay=p=o+"-transition-delay",t.transitionTiming=d=o+"-transition-timing-function",t.animationName=h=o+"-animation-name",t.animationDuration=f=o+"-animation-duration",t.animationTiming=v=o+"-animation-delay",t.animationDelay=g=o+"-animation-timing-function"}t.transform=a,t.transitionProperty=c,t.transitionTiming=d,t.transitionDelay=p,
t.transitionDuration=u,t.transitionEnd=s,t.animationName=h,t.animationDuration=f,t.animationTiming=v,t.animationDelay=g,t.animationEnd=l,t.default={transform:a,end:s,property:c,timing:d,delay:p,duration:u}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function i(e){var t=e.component,n=e.transitionProps,i=e.isLoaded,r=e.style,o=e.src,l=e.prevSrc,c=a()(e,["component","transitionProps","isLoaded","style","src","prevSrc"])
;return u.a.createElement(d.a,n,i&&u.a.createElement(t,s()({style:p(2,r)},c,{key:o,src:o})),!i&&l&&u.a.createElement(t,s()({style:p(1,r)},c,{key:l,src:l})))}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=(n(927),n(926),n(410)),p=function(e,t){return s()({position:"absolute",zIndex:e},t)};t.a=i},function(e,t,n){e.exports=n.p+"common/img/backgrounds/noise.8b05ce45d0df59343e206bc9ae78d85d.png"},function(e,t,n){
e.exports=n.p+"common/img/backgrounds/preset-light.770a0981b66e038d3ffffbcc4f5a26a4.png"},function(e,t,n){e.exports=n.p+"common/img/backgrounds/preset-dark.64cc1c942221cd2c153244bd8ecfb67a.png"},function(e,t){e.exports={container:"FullPage-container-17Y0c"}},function(e,t,n){"use strict";var i=n(1759),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(330),c=s.a.ItemView.extend({mixins:[l.a],className:"alert transition-in",template:r.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"]),o.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(){o.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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"circle-ok"}
function l(e,t){return"circle-exclamation-mark"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this;return u+='<button class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <i class="alert-icon glyphicon ',c=i(n(25)).call(t,t&&t.type,"success",{hash:{},inverse:d.program(3,l,o),fn:d.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+='"></i> <h4>',c=t&&t.message,c="function"==typeof c?c.apply(t):c,(c||0===c)&&(u+=c),u+="</h4> "})},function(e,t,n){
"use strict";var i=n(1761),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(17),c=s.a.ItemView.extend({className:"alert alert-status transition-out",template:r.a,coolDown:!1,alertDuration:5e3,coolDownDuration:5e3,ui:{status:".status"},events:{mouseover:"onMouseOver"},onlyAfterRender:["onShowStatus"],initialize:function(e){o.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(o.a.bind(function(){this.coolDown=!1},this),this.coolDownDuration)}});t.a=c},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<i class="alert-icon glyphicon cardio"></i> <span class="status"></span> '})},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(85)),s=n(56),l=n(928),c=n(1779),u=s.a.extend({component:function(){return r()(l.a,{component:c.a,playerType:o.b})}});t.a=u},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(194)),a=Object(i.createSelector)(function(e){return e.experienceSettings.restorePlayQueue},function(e){
return e.user.id},r.a,function(e,t,n){var i=void 0;e&&e[t]&&(i=e[t]);var r=i&&n[i.providerEntityID];if(i&&i.playQueueID&&r&&r.isPopulated)return i});t.a=a},function(e,t,n){"use strict";function i(e){var t=e.get("type"),n="channelDirectory"===t,i=n||Object(r.u)(t)||e.get("isFolder");return void 0===e.length&&!i}var r=n(28);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.get("type"),r=p.r(i),a=p.q(i)
;if(!r)return u.a.Deferred().reject().promise();if(r.id===a.id){var o=e.get("playQueueItems"),s=t.get("containerKey");if(s&&!o.length&&!n.skipSiblings&&(i===p.l||i===p.e||i===p.g)){var l=new f.a([],{server:t.server,provider:t.provider,channel:t.channel});return l.fetch({url:s}).then(function(){var e=l.models.map(d.a);return u.a.Deferred().resolve(e).promise()})}return u.a.Deferred().resolve([Object(d.a)(t)]).promise()}if(p.p(i).id===a.id){var c=h.join([t.get("key"),"children"]),v=new f.a([],{
server:t.server,provider:t.provider,channel:t.channel});return v.fetch({url:c}).then(function(){var e=v.models.map(d.a);return u.a.Deferred().resolve(e).promise()})}return u.a.Deferred().reject().promise()}function r(e,t,n){var r=t.map(function(t){return i(e,t,n)});return u.a.when.apply(u.a,r).then(function(){var t,i=(t=[]).concat.apply(t,arguments);return e.get("playQueueItems").add(i,n),a(e)})}function a(e,t){var n=e.get("playQueueItems")
;if(e.get("playQueueSelectedItemID")||!n.length)return u.a.Deferred().resolve(e).promise();if(t){var i=n.findWhere({metadataItem:t}),r=i?i.id:n.at(0).id;e.set("playQueueSelectedItemID",r)}else{var a=e.get("playQueueSelectedItemOffset"),o=n.at(a);e.set("playQueueSelectedItemID",o.id)}return u.a.Deferred().resolve(e).promise()}function o(e){var t=e.next,n=e.playQueueModel,o=e.metadataItemModel,s=e.metadataItemModels,c=e.metadataListModel,d=t?n.get("playQueueSelectedItemOffset")+1:void 0,p={at:d}
;if(o)return i(n,o).then(function(e){return n.get("playQueueItems").add(e,p),a(n,o)});if(s&&s.length)return r(n,s,p);if(c){var h=c.get("metadataItems").models;return r(n,h,l()({},p,{skipSiblings:!0}))}return u.a.Deferred().reject().promise()}t.a=o;var s=n(7),l=n.n(s),c=n(12),u=n.n(c),d=n(1766),p=n(28),h=n(19),f=n(325)},function(e,t,n){"use strict";function i(e){s+=1;var t=s.toString(),n=a.a.extend({},e.attributes,{playQueueItemID:t});return new o.a(n,{server:e.server,provider:e.provider,
parent:e.parent,parse:!0})}var r=n(5),a=n.n(r),o=n(931),s=0;t.a=i},function(e,t,n){"use strict";var i=n(23),r=n(1768),a=n(1769),o=i.a.extend({mixins:[r.a],name:"LyricsStreamCollection",context:["server","section"],model:a.a,initialize:function(){this.exclusiveBoolAttr("selected")}});t.a=o},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(19),r=n(16),a=n(470),o=n(18),s=n(1770),l=o.a.extend({name:"LyricsStreamModel",context:["server","section"],rootPropertyName:"Lyrics",mergeStrategy:a.a,url:function(){return i.join(this.get("key"),{format:"xml"})},sessionAttrs:{follow:r.a.boolean,lyricsError:r.a.object},syncedAttrs:{id:r.a.integer,key:r.a.string,streamType:r.a.integer,index:r.a.integer,title:r.a.string,selected:r.a.boolean,codec:r.a.string,provider:r.a.string,format:r.a.string,minLines:r.a.integer,timed:r.a.boolean},
syncedRelations:{lines:{relationClass:s.a,rootPropertyName:"Line"}},defaults:{follow:!0,selected:!1,lyricsError:null}});t.a=l},function(e,t,n){"use strict";var i=n(23),r=n(1771),a=i.a.extend({name:"LyricsLineCollection",context:["server","section"],model:r.a,eachSpan:function(e){this.each(function(t){t.get("spans").each(e)})}});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(1772),o=r.a.extend({name:"LyricsLineModel",context:["server","section"],syncedAttrs:{startOffset:i.a.integer,
endOffset:i.a.integer},syncedRelations:{spans:{relationClass:a.a,rootPropertyName:"Span"}},defaults:{startOffset:-1,endOffset:-1}});t.a=o},function(e,t,n){"use strict";var i=n(23),r=n(1773),a=i.a.extend({name:"LyricsSpanCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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:-1,endOffset:-1},isPositionWithin:function(e){var t=this.get("startOffset"),n=this.get("endOffset");if(-1===t)return!1;var i=e>=t,r=e<=n||-1===n;return i&&r}});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"PlayQueueItemModel",context:["server","provider"],syncedAttrs:{url:i.a.string,UrlTemplateFilter:i.a.array},defaults:{UrlTemplateFilter:[]}});t.a=a},function(e,t,n){"use strict"
;var i=n(94),r=n(16),a=n(18),o=n(51),s=n(658),l=a.a.extend({name:"PlayQueueModel",context:["server","provider","identifier","mediaTagPrefix","mediaTagVersion"],responseContext:["identifier","mediaTagPrefix","mediaTagVersion"],idAttribute:"playQueueID",hasResponseOnSave:!0,urlRoot:function(){return this.get("key")},sessionAttrs:{key:r.a.string,type:r.a.string,repeat:r.a.boolean,own:r.a.boolean,isUpdatePending:r.a.boolean,isUniversal:r.a.boolean},syncedAttrs:{playQueueID:r.a.string,
playQueueSelectedItemOffset:r.a.integer,playQueueSelectedItemID:r.a.string,playQueueSelectedMetadataItemID:r.a.string,playQueueLastAddedItemID:r.a.string,playQueueShuffled:r.a.boolean,playQueueSourceURI:r.a.string,playQueueTotalCount:r.a.integer,playQueueVersion:r.a.integer},syncedRelations:{playQueueItems:{relationClass:s.a,rootPropertyName:"Metadata"}},derivedAttrs:{canShuffle:function(){return!this.get("playQueueLastAddedItemID")},currentIndex:function(){
var e=this.get("playQueueItems"),t=this.get("playQueueSelectedItemID"),n=e.get(t);return e.indexOf(n)}},defaults:{repeat:!1,own:!0,isUpdatePending:!1,isUniversal:!1},augmentResponseText:function(e,t){return t===o.a.xml?Object(i.b)(e):e},augmentResponse:function(e,t){var n=this;return this.responseContext.forEach(function(t){var i=e[t];void 0!==i&&n.setContext(t,i)}),e}});t.a=l},function(e,t,n){"use strict";var i=n(12),r=n.n(i),a=n(16),o=n(18),s=n(658),l=o.a.extend({name:"LocalPlayQueueModel",
context:["server","provider"],url:function(){var e=this.get("playQueueItems"),t=this.get("playQueueSelectedItemID"),n=e.get(t);if(n)return n.get("metadataItem").get("key")},sessionAttrs:{playQueueID:a.a.string,isLocal:a.a.boolean,type:a.a.string,repeat:a.a.boolean,own:a.a.boolean,isUpdatePending:a.a.boolean,playQueueShuffled:a.a.boolean,playQueueSelectedItemID:a.a.string},sessionRelations:{playQueueItems:{relationClass:s.a}},derivedAttrs:{playQueueTotalCount:function(){
return this.get("playQueueItems").length},playQueueSelectedItemOffset:function(){var e=this.get("playQueueItems"),t=this.get("playQueueSelectedItemID");if(!t)return 0;var n=e.get(t);return e.indexOf(n)},currentIndex:function(){return this.get("playQueueSelectedItemOffset")},canShuffle:function(){return!1}},defaults:{isLocal:!0,repeat:!1,own:!0,isUpdatePending:!1,playQueueShuffled:!1,playQueueSelectedItemOffset:0},fetch:function(){return r.a.Deferred().resolve(this).promise()}});t.a=l
},function(e,t,n){"use strict";function i(e){C.startPlayback(e);var t=Object(I.d)("remoteCastPlayerManager");e.get("playQueue").set("own",!1),t.startPlayback(e),e.set({startMetadataItemEntityID:null,startOffsetMilliseconds:null,startMediaIndex:null})}function r(e){C.endPlayback(e),Object(I.d)("remoteCastPlayerManager").sendMessage({type:S.n})}function a(e){Object(I.d)("remoteCastPlayerManager").sendMessage({type:S.a})}function o(e){Object(I.d)("remoteCastPlayerManager").sendMessage({type:S.d})}
function s(e,t){C.playItem(e,t);var n=Object(I.d)("remoteCastPlayerManager"),i=e.get("playQueue"),r=i.get("playQueueItems"),a=i.get("playQueueSelectedItemID"),o=r.get(a),s=o.get("metadataItem");n.sendMessage({type:S.m,playQueueItemID:a,key:s.get("key")})}function l(e){C.play(e),Object(I.d)("remoteCastPlayerManager").sendMessage({type:S.c})}function c(e){C.pause(e),Object(I.d)("remoteCastPlayerManager").sendMessage({type:S.b})}function u(e,t){C.seek(e,t),
Object(I.d)("remoteCastPlayerManager").sendMessage({type:S.f,currentTime:t})}function d(e,t,n){Object(I.d)("remoteCastPlayerManager").setVolume(n)}function p(e,t){C.changeQualityIndex(e,t);var n=M.a.getQualityByIndex(t);Object(I.d)("remoteCastPlayerManager").sendMessage({type:S.h,bitrate:n.bitrate})}function h(e,t,n){Object(I.d)("remoteCastPlayerManager").sendMessage({type:S.j,stream:{type:t,id:n}})}function f(e,t,n){Object(I.d)("remoteCastPlayerManager").sendMessage({type:S.k,subtitleSize:n}),
t.save("subtitleSize",n)}function v(e,t,n){Object(I.d)("remoteCastPlayerManager").sendMessage({type:S.g,autoPlay:n}),t.save("autoPlay",n)}function g(e,t){}function m(e,t){e.set({repeatAll:t.repeatAll,repeatOne:t.repeatOne}),Object(I.d)("remoteCastPlayerManager").sendMessage({type:S.i,repeat:Object(D.a)(t)})}function y(e){Object(I.d)("remoteCastPlayerManager").sendMessage({type:S.e})}function b(e){Object(I.d)("remoteCastPlayerManager").mirrorDetails(e)}Object.defineProperty(t,"__esModule",{
value:!0}),t.startPlayback=i,t.endPlayback=r,t.playNextItem=a,t.playPreviousItem=o,t.playItem=s,t.play=l,t.pause=c,t.seek=u,t.changeVolume=d,t.changeQualityIndex=p,t.changeStream=h,t.changeSubtitleSize=f,t.changeAutoPlay=v,t.changePlaybackSpeed=g,t.setRepeat=m,t.refreshRemotePlayQueue=y,t.mirrorDetails=b;var I=n(15),S=n(933),M=n(130),D=n(934),C=n(488)},function(e,t,n){"use strict";function i(e){var t=e.get("playQueue");return Object(D.d)(t.get("type"))}function r(e){O.startPlayback(e)
;var t=Object(S.d)("remotePlexPlayerManager");e.get("playQueue").set("own",!1),t.startPlayback(e)}function a(e){var t=Object(S.d)("remotePlexPlayerManager"),n={};e.get("playQueue")&&(n.type=i(e)),O.endPlayback(e),t.sendCommand("/player/playback/stop",n)}function o(e){var t=Object(S.d)("remotePlexPlayerManager"),n=i(e);t.sendCommand("/player/playback/skipNext",{type:n})}function s(e){var t=Object(S.d)("remotePlexPlayerManager"),n=i(e);t.sendCommand("/player/playback/skipPrevious",{type:n})}
function l(e,t){O.playItem(e,t);var n=Object(S.d)("remotePlexPlayerManager"),r=i(e),a=e.get("playQueue"),o=a.get("playQueueItems"),s=a.get("playQueueSelectedItemID"),l=o.get(s),c=l.get("metadataItem");n.sendCommand("/player/playback/skipTo",{type:r,key:c.get("key")})}function c(e){O.play(e);var t=Object(S.d)("remotePlexPlayerManager"),n=i(e);t.sendCommand("/player/playback/play",{type:n})}function u(e){O.pause(e);var t=Object(S.d)("remotePlexPlayerManager"),n=i(e)
;t.sendCommand("/player/playback/pause",{type:n})}function d(e,t){O.seek(e,t);var n=Object(S.d)("remotePlexPlayerManager"),r=i(e);n.seek({type:r,offset:1e3*t})}function p(e,t,n){var r=Object(S.d)("remotePlexPlayerManager"),a=i(e);r.changeVolume({type:a,volume:n})}function h(e,t){}function f(e,t,n){var r,a=Object(S.d)("remotePlexPlayerManager"),o=i(e),s=M.a.get(t).key;a.sendCommand("/player/playback/setStreams",(r={type:o},r[s]=n,r))}function v(e,t,n){}function g(e,t,n){}function m(e,t){}
function y(e,t){O.setRepeat(e,t);var n=Object(S.d)("remotePlexPlayerManager"),r=i(e),a=e.get("repeatAll"),o=e.get("repeatOne"),s=C.b;a&&(s=o?C.c:C.a),n.sendCommand("/player/playback/setParameters",{type:r,repeat:s})}function b(e){var t=Object(S.d)("remotePlexPlayerManager"),n=i(e),r=e.get("playQueue"),a=r.get("playQueueID");t.sendCommand("/player/playback/refreshPlayQueue",{type:n,playQueueID:a})}function I(e){Object(S.d)("remotePlexPlayerManager").mirrorDetails(e)}
Object.defineProperty(t,"__esModule",{value:!0}),t.startPlayback=r,t.endPlayback=a,t.playNextItem=o,t.playPreviousItem=s,t.playItem=l,t.play=c,t.pause=u,t.seek=d,t.changeVolume=p,t.changeQualityIndex=h,t.changeStream=f,t.changeSubtitleSize=v,t.changeAutoPlay=g,t.changePlaybackSpeed=m,t.setRepeat=y,t.refreshRemotePlayQueue=b,t.mirrorDetails=I;var S=n(15),M=n(129),D=n(345),C=n(416),O=n(488)},function(e,t,n){"use strict";function i(){return Object(u.createSelector)(function(e,t){
return t.isMiniPlayer},Object(p.a)(),Object(h.a)(),Object(f.a)(),function(e,t,n,i){var r={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,confirmPlaybackPayload:t.confirmPlaybackPayload,confirmOffsetPayload:t.confirmOffsetPayload,confirmRemoteToLocal:t.confirmRemoteToLocal,confirmLocalToRemote:t.confirmLocalToRemote,isPlayQueueLoading:t.isPlayQueueLoading,isMediaLoading:t.isMediaLoading,isPaused:t.isPaused,isBuffering:t.isBuffering,hasError:t.hasError,
errorMessage:t.errorMessage,showBackgroundVideoPlayer:!!n&&!e},a=t.playQueue;if(a&&i){var o=a.currentIndex;r.playQueueItemEntityIDs=a.playQueueItems,r.playQueueItemEntityID=i.entityID,r.canSkipPrevious=o>0,r.canSkipNext=o<a.playQueueItems.length-1,r.size=a.playQueueTotalCount,r.firstIndex=a.playQueueSelectedItemOffset-o,r.currentMediaType=Object(d.r)(i.type).mediaType}return r})}function r(e,t){var n=t.playerType;return{onPlayPreviousItem:function(){e(g.i({playerType:n}))},
onPlayNextItem:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e(g.h({playerType:n,autoPlay:t.autoPlay}))},onPlayItem:function(t){e(g.f({playerType:n,index:t}))},onTogglePlayPause:function(){e(v.t({playerType:n}))}}}var a=n(7),o=n.n(a),s=n(1),l=n.n(s),c=n(11),u=n(6),d=(n.n(u),n(28)),p=n(44),h=n(252),f=n(119),v=n(131),g=n(118),m=n(1791),y=Object(c.b)(i,r)(m.a);y.propTypes=o()({},y.propTypes,{playerType:l.a.string.isRequired}),t.a=y},function(e,t,n){"use strict"
;function i(e,t,n){return(e+t%n+n)%n}t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=5},function(e,t,n){"use strict";function i(e){return{startedAt:Object(v.a)(e.timeStamp),seekStartSeconds:Object(v.a)(e.minOffsetAvailable),seekEndSeconds:Object(v.a)(e.maxOffsetAvailable)}}function r(e,t,n){var r=n.mediaIndex,a=n.partIndex,s=n.partCount,y=n.state,b=n.continuing,I=n.positionSeconds,S=n.durationSeconds,M=e.get("features").get(m.b.TIMELINE)
;if(!M)return l.a.Deferred().reject().promise();var D=t.get("metadataItem"),C={ratingKey:D.get("ratingKey"),key:D.get("key"),playQueueItemID:t.get("playQueueItemID"),state:y,hasMDE:1};if(y===d.e&&b&&(C.continuing=1),null!=S){var O=1e3*I,j=1e3*S;if(s>1){var P=D.get("Media"),w=P[r],T=w.Part[a];C.time=Object(h.a)(w,T,O),C.duration=w.duration}else C.time=O,C.duration=j;C.duration=Math.max(C.time,C.duration)}Object(c.a)("[Player] Timeline, %s",C)
;var E=u.join(M.get("key"),C),x=t.provider.getXHROptions(E,{headers:{"X-Plex-Session-Identifier":n.playbackSessionID}});return l.a.ajax(x).promise().then(function(e){if(!e)return{};var t=Object(g.a)(e);return t.terminationCode&&(t.terminationCode=Object(v.a)(t.terminationCode)),t.generalDecisionCode&&(t.generalDecisionCode=Object(v.a)(t.generalDecisionCode)),t.mdeDecisionCode&&(t.mdeDecisionCode=Object(v.a)(t.mdeDecisionCode)),
t.transcodeDecisionCode&&(t.transcodeDecisionCode=Object(v.a)(t.transcodeDecisionCode)),t.Bandwidths&&t.TranscodeSession&&(t.bandwidthTimeline={bandwidths:Object(f.a)(t.Bandwidths.Bandwidth),transcodeSessionID:o.a.last(t.TranscodeSession.key.split("/"))}),t.CaptureBuffer&&t.CaptureBuffer.TranscodeSession&&(t.captureBuffer=i(t.CaptureBuffer.TranscodeSession)),t.TranscodeSession&&(t.transcodeSession=i(t.TranscodeSession)),
C.time>6e4&&(t.playbackState===p.b?D.set("viewOffset",C.time):t.playbackState===p.a&&D.set({viewOffset:0,viewCount:1})),t})}t.a=r;var a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(30),u=n(19),d=n(491),p=n(1783),h=n(936),f=n(601),v=n(464),g=n(465),m=n(76)},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return r});var i="progress",r="complete"},function(e,t,n){"use strict";function i(e,t){Object(s.a)(t,"A transcoder ping requires a session identifier"),
Object(o.a)("[Player] Transcoder Ping, %s",t);var n="/video/:/transcode/universal/ping?session="+t;return a.a.ajax(e.getXHROptions(n)).promise()}t.a=i;var r=n(12),a=n.n(r),o=n(30),s=n(33)},function(e,t,n){"use strict";function i(e,t){if(e&&e.length){for(var n=e.length-1;n>=0;n--){var i=e.at(n),a=Math.ceil(i.get("startTimeOffset")/1e3);if(a<t-r.a)return a}return 0}}t.a=i;var r=n(346)},function(e,t,n){"use strict";function i(e,t){if(e&&e.length)for(var n=0;n<e.length;n++){
var i=e.at(n),r=Math.ceil(i.get("startTimeOffset")/1e3);if(r>t)return r}}t.a=i},function(e,t,n){"use strict";function i(e){var t=Object(r.a)(e),n=e.get("currentDecision");if(t&&n)return n.playQueueItemID===t.get("playQueueItemID")?n:void 0}t.a=i;var r=n(666)},function(e,t,n){"use strict";function i(e,t,n,i,r){var a=o()({},n);a.Stream=n.Stream.map(function(e){return e.streamType!==i.id?e:e.id!==r||e.selected?e.id!==r&&e.selected?o()({},e,{selected:!1}):e:o()({},e,{selected:!0})});var s=o()({},t,{
Part:Object(h.a)(t.Part,n,a)});return Object(h.a)(e,t,s)}function r(e,t){for(var n,r=t.mediaIndex,a=t.streamTypeString,s=t.streamID,c=t.allParts,h=t.allowMetrics,m=t.metricsProperties,y=void 0===m?{}:m,b=p.a.get(a),I=e.server,S=e.get("Media"),M=void 0,D=void 0,C=0,O=S.length;C<O;C++)if(!(r>=0&&r!==C)){for(var j=S[C],P=j.Part,w=0,T=P.length;w<T;w++){for(var E=P[w],x=E.Stream,N=0,A=x.length;N<A;N++){var L=x[N];if(L.streamType===b.id&&L.id===s){M=j,D=E;break}}if(D)break}if(D)break}
if(!D)return u.a.Deferred().reject().promise();var k=(n={},n[b.key]=s,n);c&&(k.allParts=1);var _=f.join(["/library/parts/",D.id],k),R=l.a.extend(I.getXHROptions(_),{type:"PUT",scope:"selectMetadataItemStream--"+D.id}),z=i(S,M,D,b,s);e.set({Media:z,isStreamChangeInProgress:!0}),g.a.abortAll(R.scope);var U=u.a.ajax(R).done(function(){e.set("isStreamChangeInProgress",!1),c&&e.fetch({usePopulatedParams:!0})}).fail(function(t){if(!t.aborting){var n={isStreamChangeInProgress:!1}
;e.get("Media")===z&&(n.Media=S),e.set(n)}});return h&&Object(d.d)("metrics").trackClick(o()({},y,{action:v.S,type:e.get("type"),streamType:a})),U.promise()}t.a=r;var a=n(7),o=n.n(a),s=n(5),l=n.n(s),c=n(12),u=n.n(c),d=n(15),p=(n(33),n(129)),h=n(937),f=n(19),v=n(73),g=n(211)},function(e,t,n){"use strict";function i(e){var t=e.get("remotePlayer");return t?t.get("volume"):Object(r.a)(e)}t.a=i;var r=n(1790)},function(e,t,n){"use strict";function i(e){return e.get("experienceSettings").get("volume")}
t.a=i},function(e,t,n){"use strict";function i(e){return!!e.playQueueItemEntityID&&!e.isPaused&&!e.isRemotePlayer&&e.currentMediaType===v.c}var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(59),g=n(85),m=n(667),y=n(955),b=n(1867),I=n(2025),S=g.b,M=function(e){function t(n,i){s()(this,t);var r=c()(this,e.call(this,n,i));return r.onSlideShowAdvance=function(){r.props.onPlayNextItem({autoPlay:!0})},r.onEditToggle=function(e){
r.state.isEditing||r.props.isPaused||r.props.onTogglePlayPause(),r.setState({isEditing:!r.state.isEditing})},r.onPlaybackDimensionsChange=function(e){var t=e.width,n=e.height;r.setState({playbackWidth:t,playbackHeight:n})},r.state={isEditing:!1},r}return d()(t,e),t.prototype.componentDidMount=function(){i(this.props)&&this._startSlideshow()},t.prototype.componentDidUpdate=function(e){var t=i(e),n=i(this.props),r=n!==t,a=this.props.playQueueItemEntityID!==e.playQueueItemEntityID
;(r||a)&&(n?e.isPaused?this.props.onPlayNextItem({autoPlay:!0}):this._startSlideshow():this._stopSlideshow())},t.prototype.componentWillUnmount=function(){this._stopSlideshow(),this._playerTimer=clearTimeout(this._playerTimer)},t.prototype._startSlideshow=function(){this._stopSlideshow(),this.setState({isEditing:!1}),this._slideshowTimer=setTimeout(this.onSlideShowAdvance,5e3)},t.prototype._stopSlideshow=function(){this._slideshowTimer&&(this._slideshowTimer=clearTimeout(this._slideshowTimer))},
t.prototype.render=function(){var e=this.state,t=e.isRemotePlayer,n=e.isEditing,i=e.playbackWidth,r=e.playbackHeight,o={display:this.props.isMiniPlayer?"none":"block",width:i||"100%",height:r||"100%",position:"absolute"};return f.a.createElement(y.a,a()({mediaStyle:o,playerType:S,playbackWidth:i,playbackHeight:r,isRemotePlayer:t,isEditing:n,isPostPlayVisible:!1,hasConflicts:!1,mediaComponent:m.a,playerComponent:this.props.isMiniPlayer?b.a:I.a,onEditToggle:this.onEditToggle,
onPlaybackDimensionsChange:this.onPlaybackDimensionsChange},this.props))},t}(h.Component);t.a=M},function(e,t,n){"use strict";function i(){return Object(b.createSelector)(Object(P.a)(),Object(w.a)(),Object(T.a)(),Object(x.a)(),Object(E.a)(),Object(N.a)(),Object(j.a)(),function(e,t,n,i,r,a,o){var s=e.playQueue,l=s.playQueueSelectedItemOffset,c=s.playQueueTotalCount,u=i.entityID,d={providerEntityID:e.providerEntityID,playQueueItemEntityID:u,isDecisionPending:!t,isPaused:e.isPaused,
isBuffering:e.isBuffering,hasError:e.hasError,repeatOne:e.repeatOne,repeatAll:e.repeatAll,totalCount:c,isLastPlayQueueItem:l+1===c&&!e.repeatAll,positionSeconds:e.positionSeconds,durationSeconds:e.durationSeconds,lastSeekPositionSeconds:e.lastSeekPositionSeconds,videoStreams:a.videoStreams,videoStream:a.selectedVideoStream,audioStreams:a.audioStreams,audioStream:a.selectedAudioStream,subtitlesStreams:a.subtitlesStreams,subtitleStream:a.selectedSubtitlesStream,
isStreamChangeInProgress:r.isStreamChangeInProgress};if(o){var p=o.captureBuffer;if(p){var h=p.startedAt,f=o.startedAt,v=h||f;d.liveTVPositionSeconds=o.currentPosition-v}}return t&&(d.decisionMediaIndex=t.mediaIndex,d.decisionPartIndex=t.partIndex,d.decisionPartCount=t.partCount,d.decisionUrl=t.url,d.decisionProtocol=t.protocol,d.decisionError=t.error,d.isDecisionDirectPlay=t.isDirectPlay,d.isDecisionDirectStreamVideo=t.canDirectStreamVideo,d.isDecisionDirectStreamAudio=t.canDirectStreamAudio,
d.canTranscodeServerTranscode=!n.isCloud&&Object(O.a)(n.version,C.a.decisionEndpoint),d.hasBurnedSubtitles=a.selectedSubtitlesStream&&0!==a.selectedSubtitlesStream.id&&!t.subtitlesUrl),d})}function r(e,t,n){var i=t;return f()({},n,e,i)}var a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(7),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),
n(30)),S=n(59),M=n(491),D=n(85),C=n(192),O=n(395),j=n(198),P=n(44),w=n(252),T=n(669),E=n(943),x=n(119),N=n(944),A=n(417),L=n(60),k=n(131),_=n(118),R=n(1798),z={dispatchMakeDecision:A.a,dispatchMakeNextDecision:A.b,dispatchRemoveDecision:A.d,dispatchRetryDecision:A.e,dispatchUpdatePlayerDuration:k.w,dispatchUpdatePlayerPosition:k.y,dispatchUpdatePlayerSeekRange:k.z,dispatchUpdatePlayerBuffering:k.v,dispatchPause:k.j,dispatchUpdatePlayerError:k.x,dispatchSendTimeline:k.n,dispatchTickPlayer:k.s,
dispatchShowPostPlay:_.q,dispatchPlayNextItem:_.h,dispatchEndPlayback:L.f},U=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onDurationMillisecondsChange=function(e){i.props.dispatchUpdatePlayerDuration({playerType:i.props.playerType,durationMilliseconds:e})},i.onPositionMillisecondsChange=function(e){
var t=i.props,n=t.playerType,r=t.dispatchUpdatePlayerPosition,a=t.onPositionMillisecondsChange,o=Math.floor(e/1e3);a&&a(e),o!==i.props.positionSeconds&&r({playerType:n,positionSeconds:o})},i.onTick=function(e){i.props.dispatchTickPlayer({playerType:i.props.playerType,secondsElapsed:e})},i.onBufferingChange=function(e){i.props.dispatchUpdatePlayerBuffering({playerType:i.props.playerType,isBuffering:e})},i.onPause=function(){i.props.dispatchPause({playerType:i.props.playerType,
isApplicationInitiated:!0})},i.onStreamChange=function(){var e=i.props,t=e.playerType,n=e.playQueueItemEntityID,r=e.positionSeconds,a=e.qualityIndex,o=e.decisionMediaIndex,s=e.decisionPartIndex,l=e.dispatchMakeDecision;(0,e.dispatchRemoveDecision)({playerType:t,playQueueItemEntityID:n}),l({playerType:t,playQueueItemEntityID:n,mediaIndex:o,partIndex:s,qualityIndex:a,options:{offset:1e3*r}})},i.onError=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.code,n=e.category,r=e.message,a=i.props,o=a.playerType,s=a.isDecisionDirectPlay,l=a.isDecisionDirectStreamVideo,c=a.isDecisionDirectStreamAudio,u=a.canTranscodeServerTranscode,d=a.dispatchUpdatePlayerError;s&&u?(I.a.warn("[Player] Direct Play failed, but server can transcode. Attempting to fallback to either Direct Stream or transcode..."),i._itemRestarting(i.props,{allowDirectPlay:!1
})):l&&u?(I.a.warn("[Player] Direct Stream failed, but server can transcode. Attempting to fallback to video transcode..."),i._itemRestarting(i.props,{allowDirectPlay:!1,transcoderOptions:{directStream:0}})):c&&u?(I.a.warn("[Player] Video transcode failed. Attempting to fallback to video and audio transcode..."),i._itemRestarting(i.props,{allowDirectPlay:!1,transcoderOptions:{directStream:0,directStreamAudio:0}})):d({playerType:o,errorCode:t,errorCategory:n,errorMessage:r})},i.onEnd=function(){
var e=i.props,t=e.playerType,n=e.playQueueItemEntityID,r=e.minSecondsForPostPlay,a=e.durationSeconds,o=e.qualityIndex,s=e.mediaType,l=e.repeatOne,c=e.repeatAll,u=e.isLastPlayQueueItem,d=e.totalCount,p=e.decisionMediaIndex,h=e.decisionPartIndex,f=e.decisionPartCount,v=e.dispatchMakeDecision,g=e.dispatchRemoveDecision,m=e.dispatchShowPostPlay,y=e.dispatchPlayNextItem,b=e.dispatchEndPlayback,I=l||c&&1===d&&a<r;h+1<f?(g({playerType:t,playQueueItemEntityID:n}),v({playerType:t,playQueueItemEntityID:n,
qualityIndex:o,mediaIndex:p,partIndex:h+1,options:{offset:0}})):I?(g({playerType:t,playQueueItemEntityID:n}),v({playerType:t,playQueueItemEntityID:n,qualityIndex:o,mediaIndex:p,partIndex:0,options:{offset:0}})):u?b({playerType:t}):s===S.d&&t===D.a&&a>=r?m({playerType:t}):y({playerType:t,isApplicationInitiated:!0})},r=n,u()(i,r)}return p()(t,e),t.prototype.componentDidMount=function(){this._itemStarting(this.props),this.props.mediaType===S.c&&this._itemProgressing(this.props)},
t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.playQueueItemEntityID,i=t.playerType,r=t.mediaType,a=t.isDecisionPending,o=t.isPaused,s=t.isBuffering,l=t.hasError,c=t.positionSeconds,u=t.durationSeconds,d=t.preFetchSeconds,p=t.qualityIndex,h=t.dispatchMakeNextDecision,f=t.liveTVPositionSeconds,v=n!==e.playQueueItemEntityID,g=a!==e.isDecisionPending,m=p!==e.qualityIndex,y=o!==e.isPaused,b=s!==e.isBuffering,I=l!==e.hasError,M=u!==e.durationSeconds;if(m&&!v&&!g){
var D=null!=f?1e3*f:1e3*c;return void this._itemRestarting(this.props,{offset:D})}if(v)return this._hasRefreshedPlayQueue=!1,this._hasPreFetched=!1,this._itemStopping(e),this._itemStarting(this.props),void(r===S.c&&(this._itemProgressing(this.props,{shouldRefreshPlayQueue:!0}),this._hasRefreshedPlayQueue=!0));!this._hasPreFetched&&u>0&&u-c<d&&(this._hasPreFetched=!0,h({playerType:i})),!g&&(!this._hasRefreshedPlayQueue||y||b||I||M)&&(this._itemProgressing(this.props,{
shouldRefreshPlayQueue:!this._hasRefreshedPlayQueue}),this._hasRefreshedPlayQueue=!0)},t.prototype.componentWillUnmount=function(){this._itemStopping(this.props,{continuing:!1}),this.props.onPositionMillisecondsChange&&this.props.onPositionMillisecondsChange(0)},t.prototype._itemStarting=function(e){var t=e.mediaType,n=e.playerType,i=e.playQueueItemEntityID,r=e.qualityIndex;t!==S.c&&e.dispatchMakeDecision({playerType:n,playQueueItemEntityID:i,qualityIndex:r})},
t.prototype._itemRestarting=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.mediaType,i=e.playerType;n!==S.c&&e.dispatchRetryDecision({playerType:i,decisionOptions:t})},t.prototype._itemProgressing=function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.shouldRefreshPlayQueue,i=void 0!==n&&n,r=e.playerType,a=e.mediaType,o=e.providerEntityID,s=e.playQueueItemEntityID,l=e.positionSeconds,c=e.durationSeconds,u=e.isPaused,d=e.decisionMediaIndex,p=e.decisionPartIndex,h=e.decisionPartCount,f=e.dispatchSendTimeline,v=a===S.c,g=u&&!v?M.c:M.d;f({playerType:r,providerEntityID:o,playQueueItemEntityID:s,shouldRefreshPlayQueue:i,options:v?{state:g}:{positionSeconds:l,durationSeconds:c,
mediaIndex:d,partIndex:p,partCount:h}})},t.prototype._itemStopping=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.continuing,i=void 0===n||n;e.dispatchSendTimeline({playerType:e.playerType,providerEntityID:e.providerEntityID,playQueueItemEntityID:e.playQueueItemEntityID,options:{state:M.e,continuing:i,positionSeconds:e.positionSeconds,durationSeconds:e.durationSeconds,mediaIndex:e.decisionMediaIndex,partIndex:e.decisionPartIndex,partCount:e.decisionPartCount}}),
e.mediaType!==S.c&&e.dispatchRemoveDecision({playerType:e.playerType,playQueueItemEntityID:e.playQueueItemEntityID})},t.prototype.render=function(){var e=this.props,t=(e.preFetchSeconds,e.minSecondsForPostPlay,e.repeatOne,e.repeatAll,e.totalCount,e.isLastPlayQueueItem,e.canTranscodeServerTranscode,e.qualityIndex,e.decisionMediaIndex,e.decisionPartIndex,e.decisionPartCount,e.dispatchMakeDecision,e.dispatchRemoveDecision,e.dispatchUpdatePlayerDuration,e.dispatchUpdatePlayerPosition,
e.dispatchUpdatePlayerSeekRange,e.dispatchUpdatePlayerBuffering,e.dispatchPause,e.dispatchUpdatePlayerError,e.dispatchTickPlayer,e.dispatchShowPostPlay,e.dispatchPlayNextItem,e.dispatchEndPlayback,
o()(e,["preFetchSeconds","minSecondsForPostPlay","repeatOne","repeatAll","totalCount","isLastPlayQueueItem","canTranscodeServerTranscode","qualityIndex","decisionMediaIndex","decisionPartIndex","decisionPartCount","dispatchMakeDecision","dispatchRemoveDecision","dispatchUpdatePlayerDuration","dispatchUpdatePlayerPosition","dispatchUpdatePlayerSeekRange","dispatchUpdatePlayerBuffering","dispatchPause","dispatchUpdatePlayerError","dispatchTickPlayer","dispatchShowPostPlay","dispatchPlayNextItem","dispatchEndPlayback"]))
;return m.a.createElement(R.a,f()({},t,{onDurationMillisecondsChange:this.onDurationMillisecondsChange,onPositionMillisecondsChange:this.onPositionMillisecondsChange,onTick:this.onTick,onBufferingChange:this.onBufferingChange,onStreamChange:this.onStreamChange,onError:this.onError,onEnd:this.onEnd,onPause:this.onPause}))},t}(g.Component);U.defaultProps={preFetchSeconds:10,minSecondsForPostPlay:300},t.a=Object(y.b)(i,z,r)(U)},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),
n(170)),a=Object(i.createSelector)(r.a,function(e){return e.liveTVSessions});t.a=a},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(4),u=n(1795),d=n(58),p=n(283),h=n(1796),f=n(947),v=n(948),g=n(949),m=n(334),y=n(598),b=n(30),I=n(953),S=n(192),M=n(55),D={getPlayerDecision:function(e){var t=this;return this.resolvePlayerDecision(e).then(null,function(n){return n.canDirectPlay&&n.generalDecisionCode===u.a?(b.a.warn("[PDE] Forcing transcode;",n.mdeDecisionText),
t.resolvePlayerDecision(r()({},e,{allowDirectPlay:!1}))):n})},resolvePlayerDecision:function(e){o.a.defaults(e,{offset:0,minVersionForDASH:S.a.dash,minVersionForStreamingMKV:S.a.streamingMKV,transcoderOptions:{}});var t={playbackSessionID:e.playbackSessionID||Object(y.a)(),transcodeSessionID:e.transcodeSessionID||Object(y.a)(),offset:e.offset},n=this.populateMedia(t,e);return n=n.then(o.a.bind(function(){return this.resolveMedia(t,e)},this)),n=n.then(function(){return l.a.when(t.url)}),
n=n.then(function(e){return t.url=e,t})},populateMedia:function(e,t){var n=l.a.Deferred(),i=o.a.bind(n.resolve,n,e);return t.requireAnalysis&&Object(h.a)(t.item)?t.item.fetch({scope:"player"}).always(i):o.a.defer(i),n.promise()},resolveMedia:function(e,t){var n=o.a.extend({transcodeServer:this.resolveTranscodeServer(t)},t),i=g.a.getMediaDecision(n);if(n.originalQualityDecisionOptions){var a=g.a.getMediaDecision(r()({},n,n.originalQualityDecisionOptions))
;i.canPlayOriginalQuality=a.canDirectPlay||a.canDirectStreamVideo}else i.canPlayOriginalQuality=i.canDirectPlay||i.canDirectStreamVideo;var s=i.media,c=l.a.Deferred();return o.a.extend(e,i),s?e.canPlay?"webkit"===s.protocol?(b.a.warn("[PDE] Webkit videos are not supported"),e.redirect=!0,c.reject(e).promise()):"embed"===s.protocol?(b.a.warn("[PDE] An embed is required"),e.embed=!0,e.part=o.a.first(s.Part),
c.reject(e).promise()):this.resolvePart(e,t):(b.a.warn("[PDE] Unable to play item;",e.errorMessage),c.reject(e).promise()):this.resolveUrls(e,t)},resolveTranscodeServer:function(e){var t=e.item.server,n=e.fallbackServer,i=e.item.provider;if(t===n||!n||!n.get("isConnected"))return t;var r;e.type===p.a.types.VIDEO?r="transcoderVideo":e.type===p.a.types.MUSIC&&(r="transcoderAudio");var a=!i||i.get("identifier")===M.c.LIBRARY_PROVIDER_IDENTIFIER||i.get("identifier")===M.c.CHANNEL_PROVIDER_IDENTIFIER
;return r&&!t.get(r)&&n.get(r)&&a?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=Object(f.a)(e.media,t.offset),e.offset=Object(v.a)(e.media,e.part,t.offset)):e.part=o.a.first(e.media.Part),e.media.indirect?this.resolveIndirect(e,t):this.resolveUrls(e,t)},resolveIndirect:function(e,t){Object(b.a)("[PDE] Resolving indirect item");var n=t.item.resolveIndirect(e.media,e.part),i=o.a.bind(function(){
return this.resolveMedia(e,t)},this),r=o.a.bind(function(){return l.a.Deferred().reject(e).promise()},this);return n=n.then(i,r)},resolveUrls:function(e,t){var n=l.a.Deferred();return this.validatePlayerType(e,t)?(this.validateSoftSubtitles(e,t)?e.subtitlesUrl=this.resolveSubtitlesUrl(e,t):e.useSoftSubtitles&&(e.useSoftSubtitles=!1),b.a.group("[PDE] Player decision"),b.a.info("Player:",e.playerType),b.a.info("Protocol:",e.protocol),b.a.info("Direct Play:",e.canDirectPlay),b.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!==p.a.types.PHOTO?e.canDirectPlay?("hls"===e.media.protocol?(e.protocol="hls",e.playerType=t.hasNativeHLS?"html":"flash"):"dash"===e.media.protocol?(e.protocol="dash",e.playerType="html"):(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 n,i=e.transcodeServer,r=t.transcodeProtocol,a=!0,o=!0,s=!0;if(r&&(a="dash"===r,o="http"===r,s="hls"===r),s&&t.hasNativeHLS)return e.protocol="hls",e.playerType="html",!0;if(o&&t.hasStreamingMKV){if(i.isVersionOrNewer(t.minVersionForStreamingMKV))return e.protocol="http",e.playerType="html",!0;n=t.minVersionForStreamingMKV}if(a&&t.hasDASH){
if(i.isVersionOrNewer(t.minVersionForDASH))return e.protocol="dash",e.playerType="html",!0;n=t.minVersionForDASH}return t.type===p.a.types.MUSIC?(e.protocol="http",e.playerType="html",!0):s&&t.hasFlash?(e.protocol="hls",e.playerType="flash",!0):(e.errorMessage=n?Object(c.default)("Please update Plex Media Server. This feature requires {1} or later.",n):Object(c.default)("Streaming this media is unsupported."),!1)},validateSoftSubtitles:function(e,t){
return e.useSoftSubtitles&&"html"!==e.playerType?(b.a.warn("[PDE] Only the HTML player supports soft subtitles"),!1):e.useSoftSubtitles},resolveDirectPlayUrl:function(e,t){var n=t.item,i=e.part,r={"X-Plex-Session-Identifier":e.playbackSessionID};if(i){var a=/(googlevideo|youtube).com/.test(i.key);return"flv"===i.container&&a&&i.postURL?i.postURL:n.server.resolveUrl(i.key,{appendHeaders:!0,params:r})}return n.server.resolveUrl(n.get("key"),{appendHeaders:!0,params:r})},
resolveTranscoderUrl:function(e,t,n){var i=t.item,r=e.media,a=e.part,s=t.transcoderOptions;o.a.isFunction(s)&&(s=s(e)),s=o.a.extend({},e.transcoderQualityOptions,s,{"X-Plex-Session-Identifier":e.playbackSessionID,session:e.transcodeSessionID,protocol:e.protocol,directPlay:e.canDirectPlay?1:0,offset:e.offset?e.offset/1e3:e.offset});var l=t.subtitlesBurnLevel;t.type===p.a.types.VIDEO&&(l===m.a.NEVER?s.subtitles=e.canDirectPlay?"none":"auto":e.useSoftSubtitles?(s.subtitles="auto",
l===m.a.AVOID&&(s.advancedSubtitles="text")):s.subtitles="burn");var c=t.profileExtra;o.a.isFunction(c)&&(c=c(e)),s["X-Plex-Client-Profile-Extra"]=c;var u=i.get("Media")[0],d=!!u&&"livetv"===u.origin;("hls"===s.protocol&&!t.useOffsetHLS||"dash"===s.protocol&&!d)&&(Object(b.a)("[PDE] DASH and HLS should seek forward by default, offset=0"),delete s.offset),"hls"===s.protocol&&t.useOffsetHLS&&(e.useOffsetHLS=!0,s.offset&&(Object(b.a)("[PDE] HLS started with an offset, copyts=0"),s.copyts=0)),
"dash"===s.protocol&&d&&(s.copyts=0,e.offset=0),"http"===s.protocol&&(t.type===p.a.types.MUSIC?(e.useOffsetHTTP=!0,s.copyts=0):s.copyts=d?0:1),"http"!==s.protocol||e.canDirectPlay||(s["X-Plex-Chunked"]=1),o.a.each(o.a.keys(s),function(e){null==s[e]&&delete s[e]});var h=t.type,f=t.transcoder,v=e.transcodeServer;if(h===p.a.types.VIDEO)return f.video(v,i,r,a,s,n);if(h===p.a.types.MUSIC)return f.music(v,i,s,n);if(h===p.a.types.PHOTO){s.fallbackServer=t.fallbackServer
;var g="photo"===i.get("type")?i.getMediaKey():i.get("thumb");return f.image(v,g,s)}},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 n=e.transcodeServer,i=l.a.Deferred();if(t.type===p.a.types.PHOTO||n.get("isCloud")||!n.supports("decisionEndpoint"))return i.resolve(e).promise();var r=o.a.clone(e)
;this.validatePlayerTranscodeProtocol(r,t);var a=this.resolveTranscoderUrl(r,t,"decision"),s=l.a.ajax(n.getXHROptions(a,{timeout:2e3}));return s.done(function(t){var n=d.a.parseXML(t);n.generalDecisionCode&&(e.generalDecisionCode=d.a.parseInteger(n.generalDecisionCode),e.generalDecisionText=n.generalDecisionText),n.mdeDecisionCode&&(e.mdeDecisionCode=d.a.parseInteger(n.mdeDecisionCode),e.mdeDecisionText=n.mdeDecisionText),
n.transcodeDecisionCode&&(e.transcodeDecisionCode=d.a.parseInteger(n.transcodeDecisionCode),e.transcodeDecisionText=n.transcodeDecisionText),e.abr=d.a.parseBoolean(n.abr),Object(I.a)(e)?i.reject(e):i.resolve(e)}),s.fail(function(){b.a.warn("[PDE] Player decision failed; the transcode server may be a slow or outdated"),i.resolve(e)}),i.promise()}};t.a=D},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=1001},function(e,t,n){"use strict";function i(e){
var t=e?a.a.first(e.get("Media")):null;return!(!t||t.container)}var r=n(5),a=n.n(r);t.a=i},function(e,t,n){"use strict";function i(e,t){return null==e.get("startMetadataItemEntityID")&&null!=e.get("startMediaIndex")?e.get("startMediaIndex"):e.get("startMetadataItemEntityID")===t.entityID()?e.get("startMediaIndex"):null}t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),
n(0)),m=n.n(g),y=n(15),b=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r._mediaComponent=Object(y.d)("mediaComponent"),r}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.containerClassName,n=e.className,i=e.isDecisionPending,a=e.isDecisionDirectPlay,s=e.isPaused,c=e.decisionUrl,u=e.decisionProtocol,d=(e.decisionError,
l()(e,["containerClassName","className","isDecisionPending","isDecisionDirectPlay","isPaused","decisionUrl","decisionProtocol","decisionError"])),p=this._mediaComponent.getComponent({protocol:u,isDirectPlay:a});return i?o()("div",{className:t},void 0,o()("div",{className:n})):m.a.createElement(p,r()({},d,{key:c,containerClassName:t,className:n,src:c,paused:s,isDecisionDirectPlay:a}))},t}(g.Component);t.a=b},function(e,t){e.exports={videoContainer:"VideoContainer-videoContainer-18TW8",
videoElement:"VideoContainer-videoElement-1EaMR"}},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(Object(j.a)(),Object(w.a)(),Object(E.a)(),function(e,t,n){return!(!t||t.type!==S.g)||!(!n||e.confirmRemoteToLocal||e.isPostPlayVisible||e.isMediaLoading||e.isBuffering||e.isPaused||e.hasError)})}function r(){return Object(y.createSelector)(Object(P.a)("positionSeconds"),Object(w.a)(),Object(E.a)(),function(e,t,n){if(t&&t.type===S.g)return!0;if(n){
var i=t.Media[n.mediaIndex],r=i&&i.Part[n.partIndex];if(i&&i.duration&&r){return Object(D.a)(i,r,1e3*e)>.9*i.duration}}return!1})}function a(){return Object(y.createSelector)(Object(T.a)(),Object(w.a)(),Object(E.a)(),Object(x.a)(),i(),r(),Object(P.a)("hasError"),Object(P.a)("errorCode"),Object(P.a)("metricsPage"),Object(P.a)("metricsContext"),Object(P.a)("metricsAutoPlay"),function(e,t,n,i,r,a,o,s,l,c,u){var d={decision:n,isPlaying:r,hasEnded:a,hasError:o,errorCode:s,metricsPage:l,
metricsContext:c,metricsAutoPlay:u};if(e&&(d.metricsServerType=Object(N.a)(e),d.metricsConnectionType=Object(A.a)(e.activeConnection)),i&&(d.playQueueItemID=i.playQueueItemID),t&&(d.metricsType=t.type,d.metricsIdentifier=t.identifier,t.type===S.g&&t.Media.length&&(d.metricsContainer=t.Media[0].container)),n){var p=Object(L.a)(n),h=t.Media[n.mediaIndex],f=h&&h.Part[n.partIndex],g=M.a.get("video").id,m=f&&v.a.findWhere(f.Stream,{streamType:g}),y=M.a.get("audio").id,b=f&&v.a.findWhere(f.Stream,{
streamType:y,selected:!0}),I=M.a.get("subtitles").id,D=f&&v.a.findWhere(f.Stream,{streamType:I,selected:!0});d.metricsProtocol=n.protocol,d.metricsOffset=n.positionSeconds,h&&(d.metricsContainer=h.container,d.metricsDuration=Object(C.a)(h.duration),d.metricsBitrate=Object(O.a)(h.bitrate),d.metricsOrigin=h.origin),m&&(d.metricsVideoCodec=m.codec,d.metricsVideoDecision=p.videoDecision),b&&(d.metricsAudioCodec=b.codec,d.metricsAudioDecision=p.audioDecision),
D&&D.id&&(d.metricsSubtitleFormat=D.codec,d.metricsSubtitleDecision=p.subtitleDecision)}return d})}var o=n(7),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(5),v=n.n(f),g=n(1),m=(n.n(g),n(0)),y=(n.n(m),n(6)),b=(n.n(y),n(11)),I=n(15),S=n(28),M=n(129),D=n(936),C=n(956),O=n(1801),j=n(44),P=n(347),w=n(221),T=n(656),E=n(252),x=n(119),N=n(958),A=n(959),L=n(1802),k={START:"playback:itemstart",RESTART:"playback:itemrestart",END:"playback:itemend",SESSION_END:"playback:sessionend",
FAILURE:"playback:failure"},_={CAST:"cast",FAILED:"failed",COMPLETED:"completed",STOPPED:"stopped",SKIPPED:"skipped"},R={QUALITY:"quality",STREAMS:"streams"},z=function(e){function t(n,i){c()(this,t);var r=d()(this,e.call(this,n,i));return r.itemID=null,r.itemDecision=null,r.itemMetricsProperties=null,r.itemPlaybackTimestamp=null,r.itemPlaybackMilliseconds=0,r.sessionPlaybackMilliseconds=0,r.sessionPlaybackCount=0,r.hasError=!1,r.hasEnded=!1,r.hasStopped=!1,r}return h()(t,e),
t.prototype.componentDidMount=function(){this.update()},t.prototype.componentDidUpdate=function(e){this.update(e)},t.prototype.componentWillUnmount=function(){this.hasStopped=!0,this.trackItemEnd(),this.trackSessionEnd()},t.prototype.update=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.props,n=t.isRemotePlayer,i=t.playQueueItemID,r=t.decision,a=t.isPlaying,o=t.hasError,s=t.metricsType;if(n)return void(e.isRemotePlayer||(this.trackItemEnd(),
this.trackSessionEnd()));!this.hasError&&o&&(this.hasError=!0,this.trackFailure()),this.itemID&&(this.itemID===i?this.updateCurrentItem():this.trackItemEnd()),!this.itemID&&!this.hasError&&a&&i&&(r||s===S.g)&&this.trackItemStart()},t.prototype.updateCurrentItem=function(){var e=this.props,t=e.decision,n=e.isPlaying,i=e.hasEnded;if(n?(this.itemPlaybackTimestamp||(this.itemPlaybackTimestamp=new Date),this.hasEnded=i):this.flushPlaybackTimes(),this.itemDecision&&t&&this.itemDecision!==t){
var r=void 0;if(this.itemDecision.qualityIndex!==t.qualityIndex?r=R.QUALITY:this.itemDecision.partIndex===t.partIndex&&(r=R.STREAMS),r){var a=this.itemMetricsProperties.offset;this.trackItemRestart(r),this.itemMetricsProperties.offset=a}}},t.prototype.getItemMetricsProperties=function(){return{serverType:this.props.metricsServerType,connectionType:this.props.metricsConnectionType,type:this.props.metricsType,identifier:this.props.metricsIdentifier,page:this.props.metricsPage,
context:this.props.metricsContext,auto:this.props.metricsAutoPlay,protocol:this.props.metricsProtocol,offset:this.props.metricsOffset,container:this.props.metricsContainer,duration:this.props.metricsDuration,bitrate:this.props.metricsBitrate,origin:this.props.metricsOrigin,audioCodec:this.props.metricsAudioCodec,audioDecision:this.props.metricsAudioDecision,videoCodec:this.props.metricsVideoCodec,videoDecision:this.props.metricsVideoDecision,subtitleFormat:this.props.metricsSubtitleFormat,
subtitleDecision:this.props.metricsSubtitleDecision}},t.prototype.flushPlaybackTimes=function(){if(this.itemPlaybackTimestamp){var e=new Date-this.itemPlaybackTimestamp;this.itemPlaybackTimestamp=null,this.itemPlaybackMilliseconds+=e,this.sessionPlaybackMilliseconds+=e,Object(I.d)("metrics").addPlaybackTime(e)}},t.prototype.trackItemStart=function(){this.itemID=this.props.playQueueItemID,this.itemDecision=this.props.decision,this.itemMetricsProperties=this.getItemMetricsProperties(),
this.itemPlaybackTimestamp=new Date,this.itemPlaybackMilliseconds=0,this.sessionPlaybackCount+=1,this.hasEnded=this.props.hasEnded,this.hasError=this.props.hasError,Object(I.d)("metrics").trackEvent({event:k.START,interaction:!0,properties:this.itemMetricsProperties}),Object(I.d)("metrics").incrementPlaybackCount()},t.prototype.trackItemRestart=function(e){this.itemDecision=this.props.decision,this.itemMetricsProperties=this.getItemMetricsProperties(),Object(I.d)("metrics").trackEvent({
event:k.RESTART,interaction:!0,properties:s()({},this.itemMetricsProperties,{reason:e})})},t.prototype.trackItemEnd=function(){if(this.itemID){this.flushPlaybackTimes();var e=void 0;e=this.props.isRemotePlayer?_.CAST:this.hasError?_.FAILED:this.hasEnded?_.COMPLETED:this.hasStopped?_.STOPPED:_.SKIPPED,Object(I.d)("metrics").trackEvent({event:k.END,interaction:!0,properties:s()({},this.itemMetricsProperties,{playbackTime:Object(C.a)(this.itemPlaybackMilliseconds),status:e})}),this.itemID=null,
this.itemDecision=null,this.itemMetricsProperties=null,this.itemPlaybackTimestamp=null,this.itemPlaybackMilliseconds=0,this.hasError=!1,this.hasEnded=!1}},t.prototype.trackSessionEnd=function(){this.sessionPlaybackCount&&(this.flushPlaybackTimes(),Object(I.d)("metrics").trackEvent({event:k.SESSION_END,interaction:!0,properties:{serverType:this.props.metricsServerType,connectionType:this.props.metricsConnectionType,type:this.props.metricsType,playbackCount:this.sessionPlaybackCount,
playbackTime:Object(C.a)(this.sessionPlaybackMilliseconds)}}),this.sessionPlaybackMilliseconds=0,this.sessionPlaybackCount=0)},t.prototype.trackFailure=function(){Object(I.d)("metrics").trackEvent({event:k.FAILURE,interaction:!0,properties:{serverType:this.props.metricsServerType,connectionType:this.props.metricsConnectionType,type:this.props.metricsType,error:this.props.errorCode}})},t.prototype.render=function(){return null},t}(m.Component);t.a=Object(b.b)(a)(z)},function(e,t,n){"use strict"
;function i(e){if(null!=e){var t=void 0;return t=e>=10240?512:e>=1024?256:e>=512?128:e>=256?64:32,Object(r.a)(e,t)}}t.a=i;var r=n(957)},function(e,t,n){"use strict";function i(e){var t={};return e.isDirectPlay?(t.videoDecision=r,t.audioDecision=r,t.subtitleDecision=r):(t.videoDecision=e.canDirectStreamVideo?a:o,t.audioDecision=e.canDirectStreamAudio?a:o,t.subtitleDecision=e.useSoftSubtitles?a:o),t}t.a=i;var r="direct",a="copy",o="transcode"},function(e,t,n){"use strict";function i(){
return Object(h.createSelector)(function(e,t){return t.isPausedProp},Object(v.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"isPaused";return{isPaused:arguments[1][e]}})}var r=n(8),a=n.n(r),o=n(9),s=n.n(o),l=n(10),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=(n.n(d),n(11)),h=n(6),f=(n.n(h),n(15)),v=n(44),g=function(e){function t(n,i){a()(this,t);var r=s()(this,e.call(this,n,i))
;return r._screenSaverManager=Object(f.a)("screenSaverManager")?Object(f.d)("screenSaverManager"):null,r}return c()(t,e),t.prototype.componentDidMount=function(){this._toggleScreenSaver(this.props.isPaused)},t.prototype.componentDidUpdate=function(e){e.isPaused!==this.props.isPaused&&this._toggleScreenSaver(this.props.isPaused)},t.prototype.componentWillUnmount=function(){this._toggleScreenSaver(!0)},t.prototype._toggleScreenSaver=function(e){
this._screenSaverManager&&this._screenSaverManager.toggle(e)},t.prototype.render=function(){return null},t}(d.Component);t.a=Object(p.b)(i)(g)},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(Object(b.a)(),I.a,function(e,t){return{volume:t,isPaused:e.isPaused,isBuffering:e.isBuffering}})}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(59),
n(44)),I=n(492),S=n(131),M=n(1805),D={dispatchUpdatePlayerBuffering:S.v},C=function(e){function t(){var n,i,r;c()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=d()(this,e.call.apply(e,[this].concat(o))),i.onBufferingChange=function(e){i.props.dispatchUpdatePlayerBuffering({playerType:i.props.playerType,isBuffering:e})},r=n,d()(i,r)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=(e.dispatchUpdatePlayerBuffering,
s()(e,["dispatchUpdatePlayerBuffering"]));return g.a.createElement(M.a,a()({},t,{onBufferingChange:this.onBufferingChange}))},t}(v.Component);t.a=Object(m.b)(i,D)(C)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(1806),m=n.n(g),y=n(418),b=n(960),I=n(15),S="405",M=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onPositionMillisecondsChange=function(e){
var t=Math.floor(e/1e3);t!==r.props.positionSeconds&&r._vastTracker.setProgress(t),r.props.onPositionMillisecondsChange(e)},r.onCanPlay=function(){r._hasMediaStarted=!0,r._resetPlaybackTimeout(),r._vastTracker.load()},r.onEnd=function(){var e=r.state,t=e.isLoading,n=e.currentAdIndex,i=e.ads;if(!t){r._vastTracker.complete();var a=n+1;if(a>=i.length)return r._hasMediaFinished=!0,void r.props.onEnd();var o=r._pickMedia(i,a);if(!o)return void r.props.onEnd();r._hasMediaFinished=!1,r.setState({
currentAdIndex:a,currentMedia:o})}},r.onError=function(){r._vastTracker.errorWithCode(S),r.onEnd()},r.state={isLoading:!0,ads:null,currentAdIndex:null,currentCreativeIndex:null,currentMedia:null},r._hasMediaStarted=!1,r._hasMediaFinished=!1,r._mediaComponent=Object(I.d)("mediaComponent"),r}return p()(t,e),t.prototype.componentWillMount=function(){this._loadTemplateFilters(this.props.urlTemplateFilters)},t.prototype.componentDidMount=function(){this._loadXML(this.props.url)},
t.prototype.componentDidUpdate=function(e,t){if(this.props.url!==e.url&&(this._hasMediaStarted=!1,this._hasMediaFinished=!1,m.a.parser.clearUrlTemplateFilters(),this._loadTemplateFilters(this.props.urlTemplateFilters),this._loadXML(this.props.url)),this.state.currentAdIndex!==t.currentAdIndex){var n=this.state.ads[this.state.currentAdIndex],i=n.creatives[this.state.currentCreativeIndex];this._vastTracker=new m.a.tracker(n,i),this.props.onSkipDelayChange(i.skipDelay)}
this.state.isLoading||(0===this.props.volume&&0!==e.volume&&this._vastTracker.setMuted(!0),0!==this.props.volume&&0===e.volume&&this._vastTracker.setMuted(!1),this.props.isPaused!==e.isPaused&&this._vastTracker.setPaused(this.props.isPaused),this.props.isFullscreen!==e.isFullscreen&&this._vastTracker.setFullscreen(this.props.isFullscreen),this.props.isMiniPlayer!==e.isMiniPlayer&&this._vastTracker.setExpand(!this.props.isMiniPlayer),this.props.isSkipped&&!e.isSkipped&&(this._vastTracker.skip(),
this.props.onEnd()))},t.prototype.componentWillUnmount=function(){this._resetPlaybackTimeout(),this._vastXHR&&this._vastXHR.abort(),!this._vastTracker||this._hasMediaFinished||this.props.isSkipped||this._vastTracker.close(),m.a.parser.clearUrlTemplateFilters()},t.prototype._loadXML=function(e){var t=this;this._vastXHR&&this._vastXHR.abort(),this._resetPlaybackTimeout(),this.setState({isLoading:!0}),this._vastXHR=m.a.client.get(this.props.url,function(e,n){if(!e||n)return void t.props.onEnd()
;var i=e.ads,r=i[0].creatives.findIndex(function(e){return"linear"===e.type}),a=t._pickMedia(i,0,r);if(!a)return void t.props.onEnd();t._hasMediaStarted=!1,t._hasMediaFinished=!1,t._playbackTimeout=setTimeout(function(){t._hasMediaStarted||(t._vastTracker.errorWithCode("402"),t.props.onEnd()),t._playbackTimeout=null},15e3),t.setState({isLoading:!1,ads:i,currentAdIndex:0,currentCreativeIndex:r,currentMedia:a}),t.props.onResponse(e),t._vastXHR=null})},t.prototype._loadTemplateFilters=function(e){
e.map(function(e){var t=e.template,n=e.value;m.a.parser.addURLTemplateFilter(function(e){return e.replace(t,n)})})},t.prototype._pickMedia=function(e,t,n){var i=this,r=e[t];if(r&&r.creatives&&r.creatives.length){if(r.creatives[n]){var a=r.creatives[n].mediaFiles;if(a.length){var o=a.filter(function(e){return i.props.canPlayType({mimeType:e.mimeType})}).reduce(function(e,t){return e.height<t.height?t:e});return o||this._vastTracker.errorWithCode("403"),o}}}},
t.prototype._resetPlaybackTimeout=function(){this._playbackTimeout&&(clearTimeout(this._playbackTimeout),this._playbackTimeout=null)},t.prototype.render=function(){var e=this.props,t=(e.url,e.urlTemplateFilters,e.isPaused),n=e.positionSeconds,i=o()(e,["url","urlTemplateFilters","isPaused","positionSeconds"]),a=this.state,s=a.isLoading,l=a.currentMedia;if(s)return null;var c=this._mediaComponent.getComponent({protocol:"http",isDirectPlay:!0});return v.a.createElement(c,r()({},i,{
positionSeconds:n,paused:t,src:l.fileURL,mediaType:"video",onPositionMillisecondsChange:this.onPositionMillisecondsChange,onCanPlay:this.onCanPlay,onEnd:this.onEnd,onError:this.onEnd}))},t}(f.Component);M.defaultProps={urlTemplateFilters:[],canPlayType:Object(y.a)()?function(){return!0}:b.a,onResponse:function(){},onSkipDelayChange:function(){},onPositionMillisecondsChange:function(){},onEnd:function(){}},t.a=M},function(e,t,n){var i,i;!function(t){e.exports=t()}(function(){
return function e(t,n,r){function a(s,l){if(!n[s]){if(!t[s]){var c="function"==typeof i&&i;if(!l&&c)return i(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[s]={exports:{}};t[s][0].call(d.exports,function(e){var n=t[s][1][e];return a(n||e)},d,d.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof i&&i,s=0;s<r.length;s++)a(r[s]);return a}({1:[function(e,t,n){function i(){this._events=this._events||{},
this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function a(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(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(!a(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,a,l,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(n=this._events[e],s(n))return!1;if(r(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:
a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,l=0;l<i;l++)c[l].apply(this,a);return!0},i.prototype.addListener=function(e,t){var n;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),
this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&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(!r(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,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,i=-1,
n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;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],r(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){
return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(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;i=function(){function e(){this.id=null,this.sequence=null,this.system=null,this.title=null,this.description=null,this.advertiser=null,this.pricing=null,this.survey=null,
this.errorURLTemplates=[],this.impressionURLTemplates=[],this.creatives=[],this.extensions=[]}return e}(),t.exports=i},{}],3:[function(e,t,n){var i,r,a;r=e("./parser"),a=e("./util"),i=function(){function e(){}return e.cappingFreeLunch=0,e.cappingMinimumTimeInterval=0,e.options={withCredentials:!1,timeout:0},e.get=function(e,t,i){var a,o,s,l;if(o=+new Date,a=n.extend=function(e,t){var n,i;for(n in t)i=t[n],e[n]=i;return e},i||("function"==typeof t&&(i=t),s={}),s=a(this.options,t),
this.totalCallsTimeout<o?(this.totalCalls=1,this.totalCallsTimeout=o+36e5):this.totalCalls++,this.cappingFreeLunch>=this.totalCalls)return void i(null,new Error("VAST call canceled \u2013 FreeLunch capping not reached yet "+this.totalCalls+"/"+this.cappingFreeLunch));if((l=o-this.lastSuccessfullAd)<0)this.lastSuccessfullAd=0;else if(l<this.cappingMinimumTimeInterval)return void i(null,new Error("VAST call canceled \u2013 ("+this.cappingMinimumTimeInterval+")ms minimum interval reached"))
;return r.parse(e,s,function(e){return function(e,t){return i(e,t)}}())},function(){var t,n;n=a.storage,t=Object.defineProperty,["lastSuccessfullAd","totalCalls","totalCallsTimeout"].forEach(function(i){t(e,i,{get:function(){return n.getItem(i)},set:function(e){return n.setItem(i,e)},configurable:!1,enumerable:!0})}),null==e.lastSuccessfullAd&&(e.lastSuccessfullAd=0),null==e.totalCalls&&(e.totalCalls=0),null==e.totalCallsTimeout&&(e.totalCallsTimeout=0)}(),e}(),t.exports=i},{"./parser":12,
"./util":18}],4:[function(e,t,n){var i;i=function(){function e(){this.id=null,this.width=0,this.height=0,this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.altText=null,this.companionClickThroughURLTemplate=null,this.companionClickTrackingURLTemplates=[],this.trackingEvents={}}return e}(),t.exports=i},{}],5:[function(e,t,n){var i,r,a,o,s=function(e,t){function n(){this.constructor=e}for(var i in t)l.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,
e.prototype=new n,e.__super__=t.prototype,e},l={}.hasOwnProperty;i=function(){function e(e){null==e&&(e={}),this.id=e.id||null,this.adId=e.adId||null,this.sequence=e.sequence||null,this.apiFramework=e.apiFramework||null,this.trackingEvents={}}return e}(),a=function(e){function t(){t.__super__.constructor.apply(this,arguments),this.type="linear",this.duration=0,this.skipDelay=null,this.mediaFiles=[],this.videoClickThroughURLTemplate=null,this.videoClickTrackingURLTemplates=[],
this.videoCustomClickURLTemplates=[],this.adParameters=null,this.icons=[]}return s(t,e),t}(i),o=function(e){function t(){t.__super__.constructor.apply(this,arguments),this.type="nonlinear",this.variations=[]}return s(t,e),t}(i),r=function(e){function t(){t.__super__.constructor.apply(this,arguments),this.type="companion",this.variations=[]}return s(t,e),t}(i),t.exports={VASTCreativeLinear:a,VASTCreativeNonLinear:o,VASTCreativeCompanion:r}},{}],6:[function(e,t,n){var i;i=function(){function e(){
this.attributes={},this.children=[]}return e}(),t.exports=i},{}],7:[function(e,t,n){var i;i=function(){function e(){this.name=null,this.value=null,this.attributes={}}return e}(),t.exports=i},{}],8:[function(e,t,n){var i;i=function(){function e(){this.program=null,this.height=0,this.width=0,this.xPosition=0,this.yPosition=0,this.apiFramework=null,this.offset=null,this.duration=0,this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,
this.iconClickThroughURLTemplate=null,this.iconClickTrackingURLTemplates=[],this.iconViewTrackingURLTemplate=null}return e}(),t.exports=i},{}],9:[function(e,t,n){t.exports={client:e("./client"),tracker:e("./tracker"),parser:e("./parser"),util:e("./util")}},{"./client":3,"./parser":12,"./tracker":14,"./util":18}],10:[function(e,t,n){var i;i=function(){function e(){this.id=null,this.fileURL=null,this.deliveryType="progressive",this.mimeType=null,this.codec=null,this.bitrate=0,this.minBitrate=0,
this.maxBitrate=0,this.width=0,this.height=0,this.apiFramework=null,this.scalable=null,this.maintainAspectRatio=null}return e}(),t.exports=i},{}],11:[function(e,t,n){var i;i=function(){function e(){this.id=null,this.width=0,this.height=0,this.expandedWidth=0,this.expandedHeight=0,this.scalable=!0,this.maintainAspectRatio=!0,this.minSuggestedDuration=0,this.apiFramework="static",this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,
this.nonlinearClickThroughURLTemplate=null,this.nonlinearClickTrackingURLTemplates=[],this.adParameters=null}return e}(),t.exports=i},{}],12:[function(e,t,n){var i,r,a,o,s,l,c,u,d,p,h,f,v,g,m,y=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};r=e("./urlhandler"),g=e("./response"),a=e("./ad"),o=e("./extension"),s=e("./extensionchild"),m=e("./util"),u=e("./creative").VASTCreativeLinear,c=e("./creative").VASTCreativeCompanion,
d=e("./creative").VASTCreativeNonLinear,h=e("./mediafile"),p=e("./icon"),l=e("./companionad"),f=e("./nonlinear"),i=e("events").EventEmitter,v=function(){function e(){}var t;return t=[],e.addURLTemplateFilter=function(e){"function"==typeof e&&t.push(e)},e.removeURLTemplateFilter=function(){return t.pop()},e.countURLTemplateFilters=function(){return t.length},e.clearUrlTemplateFilters=function(){return t=[]},e.parse=function(e,t,n){return n||("function"==typeof t&&(n=t),t={}),
this._parse(e,null,t,function(e,t){return n(t,e)})},e.load=function(e,t,n){return n||("function"==typeof t&&(n=t),t={}),this.parseXmlDocument(null,[],t,e,n)},e.vent=new i,e.track=function(e,t){return this.vent.emit("VAST-error",t),m.track(e,t)},e.on=function(e,t){return this.vent.on(e,t)},e.once=function(e,t){return this.vent.once(e,t)},e.off=function(e,t){return this.vent.removeListener(e,t)},e._parse=function(e,n,i,a){var o,s,l;for(a||("function"==typeof i&&(a=i),i={}),s=0,
l=t.length;s<l;s++)o=t[s],e=o(e);return null==n&&(n=[]),n.push(e),r.get(e,i,function(t){return function(r,o){return null!=r?a(r):t.parseXmlDocument(e,n,i,o,a)}}(this))},e.parseXmlDocument=function(t,n,i,r,a){var o,s,l,c,u,d,p,h,f,v,m;if(m=new g,null==(null!=r?r.documentElement:void 0)||"VAST"!==r.documentElement.nodeName)return a(new Error("Invalid VAST XMLDocument"));for(f=r.documentElement.childNodes,l=0,u=f.length;l<u;l++)h=f[l],
"Error"===h.nodeName&&m.errorURLTemplates.push(e.parseNodeText(h));for(v=r.documentElement.childNodes,c=0,d=v.length;c<d;c++)h=v[c],"Ad"===h.nodeName&&(o=e.parseAdElement(h),null!=o?m.ads.push(o):e.track(m.errorURLTemplates,{ERRORCODE:101}));for(s=function(t,n){var i,r,s,l;if(null==t&&(t=null),null==n&&(n=!1),m){for(s=!0,l=m.ads,i=0,r=l.length;i<r;i++){if(o=l[i],null!=o.nextWrapperURL)return;o.creatives.length>0&&(s=!1)}return s&&(n||e.track(m.errorURLTemplates,{ERRORCODE:303})),
0===m.ads.length&&(m=null),a(t,m)}},p=m.ads.length;p--;)o=m.ads[p],null!=o.nextWrapperURL&&function(r){var a;n.length>(null!==i.wrapperLimit?i.wrapperLimit:9)||(a=r.nextWrapperURL,y.call(n,a)>=0)?(e.track(r.errorURLTemplates,{ERRORCODE:302}),m.ads.splice(m.ads.indexOf(r),1),s(new Error("Wrapper limit reached, as defined by the video player"))):(null!=t&&(r.nextWrapperURL=e.resolveVastAdTagURI(r.nextWrapperURL,t)),e._parse(r.nextWrapperURL,n,i,function(t,n){var i,a,o,l,c,u;if(i=!1,
null!=t)e.track(r.errorURLTemplates,{ERRORCODE:301}),m.ads.splice(m.ads.indexOf(r),1),i=!0;else if(null==n)e.track(r.errorURLTemplates,{ERRORCODE:303}),m.ads.splice(m.ads.indexOf(r),1),i=!0;else for(m.errorURLTemplates=m.errorURLTemplates.concat(n.errorURLTemplates),a=m.ads.indexOf(r),m.ads.splice(a,1),c=n.ads,o=0,l=c.length;o<l;o++)u=c[o],e.mergeWrapperAdData(u,r),m.ads.splice(++a,0,u);return delete r.nextWrapperURL,s(t,i)}))}(o);return s()},e.resolveVastAdTagURI=function(e,t){
return 0===e.indexOf("//")?""+location.protocol+e:-1===e.indexOf("://")?t.slice(0,t.lastIndexOf("/"))+"/"+e:e},e.mergeWrapperAdData=function(e,t){var n,i,r,a,o,s,l,c,u,d,p,h,f,v,g,m,y,b,I,S,M;for(e.errorURLTemplates=t.errorURLTemplates.concat(e.errorURLTemplates),e.impressionURLTemplates=t.impressionURLTemplates.concat(e.impressionURLTemplates),e.extensions=t.extensions.concat(e.extensions),h=e.creatives,a=0,c=h.length;a<c;a++)if(i=h[a],null!=(null!=(f=t.trackingEvents)?f[i.type]:void 0)){
v=t.trackingEvents[i.type];for(r in v)M=v[r],(n=i.trackingEvents)[r]||(n[r]=[]),i.trackingEvents[r]=i.trackingEvents[r].concat(M)}if(null!=(g=t.videoClickTrackingURLTemplates)?g.length:void 0)for(m=e.creatives,o=0,u=m.length;o<u;o++)i=m[o],"linear"===i.type&&(i.videoClickTrackingURLTemplates=i.videoClickTrackingURLTemplates.concat(t.videoClickTrackingURLTemplates));if(null!=(y=t.videoCustomClickURLTemplates)?y.length:void 0)for(b=e.creatives,s=0,d=b.length;s<d;s++)i=b[s],
"linear"===i.type&&(i.videoCustomClickURLTemplates=i.videoCustomClickURLTemplates.concat(t.videoCustomClickURLTemplates));if(null!=t.videoClickThroughURLTemplate){for(I=e.creatives,S=[],l=0,p=I.length;l<p;l++)i=I[l],"linear"===i.type&&null==i.videoClickThroughURLTemplate?S.push(i.videoClickThroughURLTemplate=t.videoClickThroughURLTemplate):S.push(void 0);return S}},e.childByName=function(e,t){var n,i,r,a;for(a=e.childNodes,i=0,r=a.length;i<r;i++)if(n=a[i],n.nodeName===t)return n},
e.childsByName=function(e,t){var n,i,r,a,o;for(i=[],o=e.childNodes,r=0,a=o.length;r<a;r++)n=o[r],n.nodeName===t&&i.push(n);return i},e.parseAdElement=function(e){var t,n,i,r,a;for(r=e.childNodes,n=0,i=r.length;n<i;n++)if(t=r[n],"Wrapper"===(a=t.nodeName)||"InLine"===a){if(this.copyNodeAttribute("id",e,t),this.copyNodeAttribute("sequence",e,t),"Wrapper"===t.nodeName)return this.parseWrapperElement(t);if("InLine"===t.nodeName)return this.parseInLineElement(t)}},e.parseWrapperElement=function(e){
var t,n,i,r,a,o,s,l,c,u,d,p,h,f,v,g,m,y,b,I,S,M,D;for(t=this.parseInLineElement(e),D=this.childByName(e,"VASTAdTagURI"),null!=D?t.nextWrapperURL=this.parseNodeText(D):null!=(D=this.childByName(e,"VASTAdTagURL"))&&(t.nextWrapperURL=this.parseNodeText(this.childByName(D,"URL"))),v=t.creatives,a=0,u=v.length;a<u;a++)if(M=v[a],"linear"===(g=M.type)||"nonlinear"===g){if(null!=M.trackingEvents){t.trackingEvents||(t.trackingEvents={}),(n=t.trackingEvents)[f=M.type]||(n[f]={}),m=M.trackingEvents
;for(r in m)for(S=m[r],(i=t.trackingEvents[M.type])[r]||(i[r]=[]),s=0,d=S.length;s<d;s++)I=S[s],t.trackingEvents[M.type][r].push(I)}if(null!=M.videoClickTrackingURLTemplates)for(t.videoClickTrackingURLTemplates||(t.videoClickTrackingURLTemplates=[]),y=M.videoClickTrackingURLTemplates,l=0,p=y.length;l<p;l++)o=y[l],t.videoClickTrackingURLTemplates.push(o);if(null!=M.videoClickThroughURLTemplate&&(t.videoClickThroughURLTemplate=M.videoClickThroughURLTemplate),
null!=M.videoCustomClickURLTemplates)for(t.videoCustomClickURLTemplates||(t.videoCustomClickURLTemplates=[]),b=M.videoCustomClickURLTemplates,c=0,h=b.length;c<h;c++)o=b[c],t.videoCustomClickURLTemplates.push(o)}if(null!=t.nextWrapperURL)return t},e.parseInLineElement=function(e){var t,n,i,r,o,s,l,c,u,d,p,h,f,v,g;for(t=new a,t.id=e.getAttribute("id")||null,t.sequence=e.getAttribute("sequence")||null,f=e.childNodes,s=0,u=f.length;s<u;s++)switch(h=f[s],h.nodeName){case"Error":
t.errorURLTemplates.push(this.parseNodeText(h));break;case"Impression":t.impressionURLTemplates.push(this.parseNodeText(h));break;case"Creatives":for(v=this.childsByName(h,"Creative"),l=0,d=v.length;l<d;l++)for(r=v[l],i={id:r.getAttribute("id")||null,adId:this.parseCreativeAdIdAttribute(r),sequence:r.getAttribute("sequence")||null,apiFramework:r.getAttribute("apiFramework")||null},g=r.childNodes,c=0,p=g.length;c<p;c++)switch(o=g[c],o.nodeName){case"Linear":n=this.parseCreativeLinearElement(o,i),
n&&t.creatives.push(n);break;case"NonLinearAds":n=this.parseNonLinear(o,i),n&&t.creatives.push(n);break;case"CompanionAds":n=this.parseCompanionAd(o,i),n&&t.creatives.push(n)}break;case"Extensions":this.parseExtension(t.extensions,this.childsByName(h,"Extension"));break;case"AdSystem":t.system={value:this.parseNodeText(h),version:h.getAttribute("version")||null};break;case"AdTitle":t.title=this.parseNodeText(h);break;case"Description":t.description=this.parseNodeText(h);break;case"Advertiser":
t.advertiser=this.parseNodeText(h);break;case"Pricing":t.pricing={value:this.parseNodeText(h),model:h.getAttribute("model")||null,currency:h.getAttribute("currency")||null};break;case"Survey":t.survey=this.parseNodeText(h)}return t},e.parseExtension=function(e,t){var n,i,r,a,l,c,u,d,p,h,f,v,g,m,y,b,I,S,M;for(S=[],u=0,f=t.length;u<f;u++){if(l=t[u],i=new o,l.attributes)for(y=l.attributes,d=0,v=y.length;d<v;d++)c=y[d],i.attributes[c.nodeName]=c.nodeValue;for(b=l.childNodes,p=0,
g=b.length;p<g;p++)if(n=b[p],M=this.parseNodeText(n),"#comment"!==n.nodeName&&""!==M){if(r=new s,r.name=n.nodeName,r.value=M,n.attributes)for(I=n.attributes,h=0,m=I.length;h<m;h++)a=I[h],r.attributes[a.nodeName]=a.nodeValue;i.children.push(r)}S.push(e.push(i))}return S},e.parseCreativeLinearElement=function(e,t){var n,i,r,a,o,s,l,c,d,f,v,g,m,y,b,I,S,M,D,C,O,j,P,w,T,E,x,N,A,L,k,_,R,z,U,B,V,F,Q,H,Y,W,G,K,q,Z,X,J,$,ee,te,ne,ie,re,ae,oe,se,le,ce;if(a=new u(t),
a.duration=this.parseDuration(this.parseNodeText(this.childByName(e,"Duration"))),-1===a.duration&&"Wrapper"!==e.parentNode.parentNode.parentNode.nodeName)return null;if(re=e.getAttribute("skipoffset"),null==re?a.skipDelay=null:"%"===re.charAt(re.length-1)?(F=parseInt(re,10),a.skipDelay=a.duration*(F/100)):a.skipDelay=this.parseDuration(re),null!=(ce=this.childByName(e,"VideoClicks"))){for(a.videoClickThroughURLTemplate=this.parseNodeText(this.childByName(ce,"ClickThrough")),
Y=this.childsByName(ce,"ClickTracking"),c=0,M=Y.length;c<M;c++)r=Y[c],a.videoClickTrackingURLTemplates.push(this.parseNodeText(r));for(W=this.childsByName(ce,"CustomClick"),b=0,D=W.length;b<D;b++)o=W[b],a.videoCustomClickURLTemplates.push(this.parseNodeText(o))}for(n=this.childByName(e,"AdParameters"),null!=n&&(a.adParameters=this.parseNodeText(n)),K=this.childsByName(e,"TrackingEvents"),I=0,O=K.length;I<O;I++)for(se=K[I],q=this.childsByName(se,"Tracking"),S=0,j=q.length;S<j;S++)if(oe=q[S],
s=oe.getAttribute("event"),le=this.parseNodeText(oe),null!=s&&null!=le){if("progress"===s){if(!(B=oe.getAttribute("offset")))continue;s="%"===B.charAt(B.length-1)?"progress-"+B:"progress-"+Math.round(this.parseDuration(B))}null==(i=a.trackingEvents)[s]&&(i[s]=[]),a.trackingEvents[s].push(le)}for(Z=this.childsByName(e,"MediaFiles"),A=0,P=Z.length;A<P;A++)for(R=Z[A],X=this.childsByName(R,"MediaFile"),z=0,w=X.length;z<w;z++)_=X[z],k=new h,k.id=_.getAttribute("id"),k.fileURL=this.parseNodeText(_),
k.deliveryType=_.getAttribute("delivery"),k.codec=_.getAttribute("codec"),k.mimeType=_.getAttribute("type"),k.apiFramework=_.getAttribute("apiFramework"),k.bitrate=parseInt(_.getAttribute("bitrate")||0),k.minBitrate=parseInt(_.getAttribute("minBitrate")||0),k.maxBitrate=parseInt(_.getAttribute("maxBitrate")||0),k.width=parseInt(_.getAttribute("width")||0),k.height=parseInt(_.getAttribute("height")||0),ie=_.getAttribute("scalable"),ie&&"string"==typeof ie&&(ie=ie.toLowerCase(),
"true"===ie?k.scalable=!0:"false"===ie&&(k.scalable=!1)),L=_.getAttribute("maintainAspectRatio"),L&&"string"==typeof L&&(L=L.toLowerCase(),"true"===L?k.maintainAspectRatio=!0:"false"===L&&(k.maintainAspectRatio=!1)),a.mediaFiles.push(k);if(null!=(m=this.childByName(e,"Icons")))for(J=this.childsByName(m,"Icon"),U=0,T=J.length;U<T;U++){for(g=J[U],d=new p,d.program=g.getAttribute("program"),d.height=parseInt(g.getAttribute("height")||0),d.width=parseInt(g.getAttribute("width")||0),
d.xPosition=this.parseXPosition(g.getAttribute("xPosition")),d.yPosition=this.parseYPosition(g.getAttribute("yPosition")),d.apiFramework=g.getAttribute("apiFramework"),d.offset=this.parseDuration(g.getAttribute("offset")),d.duration=this.parseDuration(g.getAttribute("duration")),$=this.childsByName(g,"HTMLResource"),V=0,E=$.length;V<E;V++)l=$[V],d.type=l.getAttribute("creativeType")||"text/html",d.htmlResource=this.parseNodeText(l);for(ee=this.childsByName(g,"IFrameResource"),Q=0,
x=ee.length;Q<x;Q++)y=ee[Q],d.type=y.getAttribute("creativeType")||0,d.iframeResource=this.parseNodeText(y);for(te=this.childsByName(g,"StaticResource"),H=0,N=te.length;H<N;H++)ae=te[H],d.type=ae.getAttribute("creativeType")||0,d.staticResource=this.parseNodeText(ae);if(null!=(v=this.childByName(g,"IconClicks")))for(d.iconClickThroughURLTemplate=this.parseNodeText(this.childByName(v,"IconClickThrough")),G=this.childsByName(v,"IconClickTracking"),ne=0,C=G.length;ne<C;ne++)f=G[ne],
d.iconClickTrackingURLTemplates.push(this.parseNodeText(f));d.iconViewTrackingURLTemplate=this.parseNodeText(this.childByName(g,"IconViewTracking")),a.icons.push(d)}return a},e.parseNonLinear=function(e,t){var n,i,r,a,o,s,l,c,u,p,h,v,g,m,y,b,I,S,M,D,C,O,j,P,w,T,E,x,N,A,L,k,_,R;for(a=new d(t),P=this.childsByName(e,"TrackingEvents"),l=0,v=P.length;l<v;l++)for(_=P[l],w=this.childsByName(_,"Tracking"),u=0,g=w.length;u<g;u++)k=w[u],o=k.getAttribute("event"),R=this.parseNodeText(k),
null!=o&&null!=R&&(null==(i=a.trackingEvents)[o]&&(i[o]=[]),a.trackingEvents[o].push(R));for(T=this.childsByName(e,"NonLinear"),p=0,m=T.length;p<m;p++){for(O=T[p],C=new f,C.id=O.getAttribute("id")||null,C.width=O.getAttribute("width"),C.height=O.getAttribute("height"),C.expandedWidth=O.getAttribute("expandedWidth"),C.expandedHeight=O.getAttribute("expandedHeight"),C.scalable=this.parseBoolean(O.getAttribute("scalable")),
C.maintainAspectRatio=this.parseBoolean(O.getAttribute("maintainAspectRatio")),C.minSuggestedDuration=this.parseDuration(O.getAttribute("minSuggestedDuration")),C.apiFramework=O.getAttribute("apiFramework"),E=this.childsByName(O,"HTMLResource"),h=0,y=E.length;h<y;h++)s=E[h],C.type=s.getAttribute("creativeType")||"text/html",C.htmlResource=this.parseNodeText(s);for(x=this.childsByName(O,"IFrameResource"),M=0,b=x.length;M<b;M++)c=x[M],C.type=c.getAttribute("creativeType")||0,
C.iframeResource=this.parseNodeText(c);for(N=this.childsByName(O,"StaticResource"),D=0,I=N.length;D<I;D++)L=N[D],C.type=L.getAttribute("creativeType")||0,C.staticResource=this.parseNodeText(L);for(n=this.childByName(O,"AdParameters"),null!=n&&(C.adParameters=this.parseNodeText(n)),C.nonlinearClickThroughURLTemplate=this.parseNodeText(this.childByName(O,"NonLinearClickThrough")),A=this.childsByName(O,"NonLinearClickTracking"),j=0,S=A.length;j<S;j++)r=A[j],
C.nonlinearClickTrackingURLTemplates.push(this.parseNodeText(r));a.variations.push(C)}return a},e.parseCompanionAd=function(e,t){var n,i,r,a,o,s,u,d,p,h,f,v,g,m,y,b,I,S,M,D,C,O,j,P,w,T,E,x,N,A,L,k,_,R,z,U,B;for(s=new c(t),T=this.childsByName(e,"Companion"),p=0,m=T.length;p<m;p++){for(o=T[p],a=new l,a.id=o.getAttribute("id")||null,a.width=o.getAttribute("width"),a.height=o.getAttribute("height"),a.companionClickTrackingURLTemplates=[],E=this.childsByName(o,"HTMLResource"),f=0,
y=E.length;f<y;f++)d=E[f],a.type=d.getAttribute("creativeType")||"text/html",a.htmlResource=this.parseNodeText(d);for(x=this.childsByName(o,"IFrameResource"),v=0,b=x.length;v<b;v++)h=x[v],a.type=h.getAttribute("creativeType")||0,a.iframeResource=this.parseNodeText(h);for(N=this.childsByName(o,"StaticResource"),g=0,I=N.length;g<I;g++){for(R=N[g],a.type=R.getAttribute("creativeType")||0,A=this.childsByName(o,"AltText"),O=0,S=A.length;O<S;O++)i=A[O],a.altText=this.parseNodeText(i)
;a.staticResource=this.parseNodeText(R)}for(L=this.childsByName(o,"TrackingEvents"),j=0,M=L.length;j<M;j++)for(U=L[j],k=this.childsByName(U,"Tracking"),P=0,D=k.length;P<D;P++)z=k[P],u=z.getAttribute("event"),B=this.parseNodeText(z),null!=u&&null!=B&&(null==(n=a.trackingEvents)[u]&&(n[u]=[]),a.trackingEvents[u].push(B));for(_=this.childsByName(o,"CompanionClickTracking"),w=0,C=_.length;w<C;w++)r=_[w],a.companionClickTrackingURLTemplates.push(this.parseNodeText(r))
;a.companionClickThroughURLTemplate=this.parseNodeText(this.childByName(o,"CompanionClickThrough")),a.companionClickTrackingURLTemplate=this.parseNodeText(this.childByName(o,"CompanionClickTracking")),s.variations.push(a)}return s},e.parseDuration=function(e){var t,n,i,r,a;return null==e?-1:m.isNumeric(e)?parseInt(e):(t=e.split(":"),3!==t.length?-1:(a=t[2].split("."),r=parseInt(a[0]),2===a.length&&(r+=parseFloat("0."+a[1])),i=parseInt(60*t[1]),n=parseInt(60*t[0]*60),
isNaN(n)||isNaN(i)||isNaN(r)||i>3600||r>60?-1:n+i+r))},e.parseXPosition=function(e){return"left"===e||"right"===e?e:parseInt(e||0)},e.parseYPosition=function(e){return"top"===e||"bottom"===e?e:parseInt(e||0)},e.parseBoolean=function(e){return"true"===e||"TRUE"===e||"1"===e},e.parseNodeText=function(e){return e&&(e.textContent||e.text||"").trim()},e.copyNodeAttribute=function(e,t,n){var i;if(i=t.getAttribute(e))return n.setAttribute(e,i)},e.parseCreativeAdIdAttribute=function(e){
return e.getAttribute("AdID")||e.getAttribute("adID")||e.getAttribute("adId")||null},e}(),t.exports=v},{"./ad":2,"./companionad":4,"./creative":5,"./extension":6,"./extensionchild":7,"./icon":8,"./mediafile":10,"./nonlinear":11,"./response":13,"./urlhandler":15,"./util":18,events:1}],13:[function(e,t,n){var i;i=function(){function e(){this.ads=[],this.errorURLTemplates=[]}return e}(),t.exports=i},{}],14:[function(e,t,n){var i,r,a,o,s,l,c,u=function(e,t){function n(){this.constructor=e}
for(var i in t)d.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},d={}.hasOwnProperty;r=e("./client"),c=e("./util"),o=e("./creative").VASTCreativeLinear,s=e("./nonlinear"),a=e("./companionad"),i=e("events").EventEmitter,l=function(e){function t(e,t,n){var i,l,c;this.ad=e,this.creative=t,this.variation=null!=n?n:null,this.muted=!1,this.impressed=!1,this.skipable=!1,this.skipDelayDefault=-1,this.trackingEvents={},
this.emitAlwaysEvents=["creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","resume","pause","rewind","skip","closeLinear","close"],c=this.creative.trackingEvents;for(i in c)l=c[i],this.trackingEvents[i]=l.slice(0);this.creative instanceof o?(this.setDuration(this.creative.duration),this.skipDelay=this.creative.skipDelay,this.linear=!0,this.clickThroughURLTemplate=this.creative.videoClickThroughURLTemplate,
this.clickTrackingURLTemplates=this.creative.videoClickTrackingURLTemplates):(this.skipDelay=-1,this.linear=!1,this.variation&&(this.variation instanceof s?(this.clickThroughURLTemplate=this.variation.nonlinearClickThroughURLTemplate,this.clickTrackingURLTemplates=this.variation.nonlinearClickTrackingURLTemplates):this.variation instanceof a&&(this.clickThroughURLTemplate=this.variation.companionClickThroughURLTemplate,
this.clickTrackingURLTemplates=this.variation.companionClickTrackingURLTemplates))),this.on("start",function(){r.lastSuccessfullAd=+new Date})}return u(t,e),t.off=function(e,t){return this.removeListener(e,t)},t.prototype.setDuration=function(e){return this.assetDuration=e,this.quartiles={firstQuartile:Math.round(25*this.assetDuration)/100,midpoint:Math.round(50*this.assetDuration)/100,thirdQuartile:Math.round(75*this.assetDuration)/100}},t.prototype.setProgress=function(e){var t,n,i,r,a,o,s,l,c
;if(l=null===this.skipDelay?this.skipDelayDefault:this.skipDelay,-1===l||this.skipable||(l>e?this.emit("skip-countdown",l-e):(this.skipable=!0,this.emit("skip-countdown",0))),this.linear&&this.assetDuration>0){if(n=[],e>0){n.push("start"),a=Math.round(e/this.assetDuration*100),n.push("progress-"+a+"%"),n.push("progress-"+Math.round(e)),s=this.quartiles;for(o in s)(c=s[o])<=e&&e<=c+1&&n.push(o)}for(i=0,r=n.length;i<r;i++)t=n[i],this.track(t,!0);e<this.progress&&this.track("rewind")}
return this.progress=e},t.prototype.setMuted=function(e){return this.muted!==e&&this.track(e?"mute":"unmute"),this.muted=e},t.prototype.setPaused=function(e){return this.paused!==e&&this.track(e?"pause":"resume"),this.paused=e},t.prototype.setFullscreen=function(e){return this.fullscreen!==e&&this.track(e?"fullscreen":"exitFullscreen"),this.fullscreen=e},t.prototype.setExpand=function(e){return this.expanded!==e&&this.track(e?"expand":"collapse"),this.expanded=e},
t.prototype.setSkipDelay=function(e){if("number"==typeof e)return this.skipDelay=e},t.prototype.load=function(){if(!this.impressed)return this.impressed=!0,this.trackURLs(this.ad.impressionURLTemplates),this.track("creativeView")},t.prototype.errorWithCode=function(e){return this.trackURLs(this.ad.errorURLTemplates,{ERRORCODE:e})},t.prototype.complete=function(){return this.track("complete")},t.prototype.close=function(){return this.track(this.linear?"closeLinear":"close")},
t.prototype.stop=function(){},t.prototype.skip=function(){return this.track("skip"),this.trackingEvents=[]},t.prototype.click=function(){var e,t,n;if((null!=(t=this.clickTrackingURLTemplates)?t.length:void 0)&&this.trackURLs(this.clickTrackingURLTemplates),null!=this.clickThroughURLTemplate)return this.linear&&(n={CONTENTPLAYHEAD:this.progressFormated()}),e=c.resolveURLTemplates([this.clickThroughURLTemplate],n)[0],this.emit("clickthrough",e)},t.prototype.track=function(e,t){var n,i
;null==t&&(t=!1),"closeLinear"===e&&null==this.trackingEvents[e]&&null!=this.trackingEvents.close&&(e="close"),i=this.trackingEvents[e],n=this.emitAlwaysEvents.indexOf(e),null!=i?(this.emit(e,""),this.trackURLs(i)):-1!==n&&this.emit(e,""),!0===t&&(delete this.trackingEvents[e],n>-1&&this.emitAlwaysEvents.splice(n,1))},t.prototype.trackURLs=function(e,t){var n;return null==t&&(t={}),
this.linear&&(null!=(null!=(n=this.creative.mediaFiles[0])?n.fileURL:void 0)&&(t.ASSETURI=this.creative.mediaFiles[0].fileURL),t.CONTENTPLAYHEAD=this.progressFormated()),c.track(e,t)},t.prototype.progressFormated=function(){var e,t,n,i,r;return r=parseInt(this.progress),e=r/3600,e.length<2&&(e="0"+e),t=r/60%60,t.length<2&&(t="0"+t),i=r%60,i.length<2&&(i="0"+t),n=parseInt(100*(this.progress-r)),e+":"+t+":"+i+"."+n},t}(i),t.exports=l},{"./client":3,"./companionad":4,"./creative":5,
"./nonlinear":11,"./util":18,events:1}],15:[function(e,t,n){var i,r,a;a=e("./urlhandlers/xmlhttprequest"),r=e("./urlhandlers/flash"),i=function(){function t(){}return t.get=function(t,n,i){var o,s;return i||("function"==typeof n&&(i=n),n={}),null!=n.response?(s=n.response,delete n.response,
i(null,s)):(null!=(o=n.urlhandler)?o.supported():void 0)?n.urlhandler.get(t,n,i):"undefined"==typeof window||null===window?e("./urlhandlers/node").get(t,n,i):a.supported()?a.get(t,n,i):r.supported()?r.get(t,n,i):i(new Error("Current context is not supported by any of the default URLHandlers. Please provide a custom URLHandler"))},t}(),t.exports=i},{"./urlhandlers/flash":16,"./urlhandlers/xmlhttprequest":17}],16:[function(e,t,n){var i;i=function(){function e(){}return e.xdr=function(){var e
;return window.XDomainRequest&&(e=new XDomainRequest),e},e.supported=function(){return!!this.xdr()},e.get=function(e,t,n){var i,r;return(r="function"==typeof window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLDOM"):void 0)?(r.async=!1,i=this.xdr(),i.open("GET",e),i.timeout=t.timeout||0,i.withCredentials=t.withCredentials||!1,i.send(),i.onprogress=function(){},i.onload=function(){return r.loadXML(i.responseText),n(null,r)
}):n(new Error("FlashURLHandler: Microsoft.XMLDOM format not supported"))},e}(),t.exports=i},{}],17:[function(e,t,n){var i;i=function(){function e(){}return e.xhr=function(){var e;if("withCredentials"in(e=new window.XMLHttpRequest))return e},e.supported=function(){return!!this.xhr()},e.get=function(e,t,n){var i;if("https:"===window.location.protocol&&0===e.indexOf("http://"))return n(new Error("XHRURLHandler: Cannot go from HTTPS to HTTP."));try{return i=this.xhr(),i.open("GET",e),
i.timeout=t.timeout||0,i.withCredentials=t.withCredentials||!1,i.overrideMimeType&&i.overrideMimeType("text/xml"),i.onreadystatechange=function(){if(4===i.readyState)return 200===i.status?n(null,i.responseXML):n(new Error("XHRURLHandler: "+i.statusText))},i.send(),i}catch(e){return n(new Error("XHRURLHandler: Unexpected error"))}},e}(),t.exports=i},{}],18:[function(e,t,n){var i;i=function(){function e(){}return e.track=function(e,t){var n,i,r,a,o,s;for(i=this.resolveURLTemplates(e,t),s=[],a=0,
o=i.length;a<o;a++)n=i[a],"undefined"!=typeof window&&null!==window&&(r=new Image,s.push(r.src=n));return s},e.resolveURLTemplates=function(e,t){var n,i,r,a,o,s,l,c,u;for(null==t&&(t={}),i=[],null!=t.ASSETURI&&(t.ASSETURI=this.encodeURIComponentRFC3986(t.ASSETURI)),null!=t.CONTENTPLAYHEAD&&(t.CONTENTPLAYHEAD=this.encodeURIComponentRFC3986(t.CONTENTPLAYHEAD)),null==t.ERRORCODE||/^[0-9]{3}$/.test(t.ERRORCODE)||(t.ERRORCODE=900),t.CACHEBUSTING=this.leftpad(Math.round(1e8*Math.random()).toString()),
t.TIMESTAMP=this.encodeURIComponentRFC3986((new Date).toISOString()),t.RANDOM=t.random=t.CACHEBUSTING,r=0,o=e.length;r<o;r++)if(n=e[r],c=n){for(a in t)u=t[a],s="["+a+"]",l="%%"+a+"%%",c=c.replace(s,u),c=c.replace(l,u);i.push(c)}return i},e.encodeURIComponentRFC3986=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16)})},e.leftpad=function(e){return e.length<8?function(){var t,n,i;for(i=[],t=0,
n=8-e.length;0<=n?t<n:t>n;0<=n?t++:t--)i.push("0");return i}().join("")+e:e},e.storage=function(){var e,t,n;try{n="undefined"!=typeof window&&null!==window?window.localStorage||window.sessionStorage:null}catch(e){e,n=null}return t=function(e){var t;try{if(t="__VASTUtil__",e.setItem(t,t),e.getItem(t)!==t)return!0}catch(e){return e,!0}return!1},(null==n||t(n))&&(e={},n={length:0,getItem:function(t){return e[t]},setItem:function(t,n){e[t]=n,this.length=Object.keys(e).length},removeItem:function(t){
delete e[t],this.length=Object.keys(e).length},clear:function(){e={},this.length=0}}),n}(),e.isNumeric=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},e}(),t.exports=i},{}]},{},[9])(9)})},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(15)),f=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c]
;return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onFullscreenChange=function(e){i.props.onFullscreenChange(e)},r=n,l()(i,r)}return u()(t,e),t.prototype.componentDidMount=function(){this._manager=Object(h.d)("fullscreenManager"),this._unsubscribe=this._manager.subscribe(this.onFullscreenChange)},t.prototype.componentWillReceiveProps=function(e){e.isFullscreen&&!this.props.isFullscreen?this._manager.enter():!e.isFullscreen&&this.props.isFullscreen&&this._manager.exit()},
t.prototype.componentWillUnmount=function(){this._unsubscribe(),this.props.isFullscreen&&this._manager.shouldExitOnPlayerClose&&(this._manager.exit(),this.props.onFullscreenChange(!1))},t.prototype.render=function(){return r()("div",{className:this.props.className},void 0,this.props.children)},t}(p.Component);t.a=f},function(e,t,n){"use strict";function i(){return Object(p.createSelector)(Object(v.a)(),Object(g.a)(),function(e,t){return t?{type:t.type,title:t.title,originalTitle:t.originalTitle,
grandparentTitle:t.grandparentTitle,index:t.index,parentIndex:t.parentIndex,originallyAvailableAt:t.originallyAvailableAt,isPaused:e.isPaused}:{}})}var r=n(8),a=n.n(r),o=n(9),s=n.n(o),l=n(10),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=(n.n(d),n(6)),h=(n.n(p),n(11)),f=n(28),v=n(44),g=n(221),m=n(399),y=function(e){function t(n,i){a()(this,t);var r=s()(this,e.call(this,n,i));return r.title=document.title,r}return c()(t,e),t.prototype.componentDidMount=function(){this._updateWindowTitle()},
t.prototype.componentDidUpdate=function(){this._updateWindowTitle()},t.prototype.componentWillUnmount=function(){document.title=this.title},t.prototype._updateWindowTitle=function(){var e=this.props,t=e.type,n=e.title,i=e.originalTitle,r=e.grandparentTitle,a=e.index,o=e.parentIndex,s=e.originallyAvailableAt,l=e.isPaused;if(n&&t){var c=void 0;if(t===f.e){c=r+" - "+Object(m.a)({seasonIndex:o,episodeIndex:a,date:s,noLeadingZero:!0,separator:" \xb7 "})}else if(t===f.l){var u=i||r;c=u?u+" - "+n:n
}else c=n;l||(c="\u25b6 "+c),document.title=c}},t.prototype.render=function(){return null},t}(d.Component);t.a=Object(h.b)(i)(y)},function(e,t,n){"use strict";function i(e,t){var n={playerType:t.playerType};return{onPreviousShortcut:function(){e(C.i(n))},onStepBackShortcut:function(){e(D.q(n))},onSkipBackShortcut:function(){e(D.o(n))},onPlayPauseShortcut:function(){e(D.t(n))},onPlayShortcut:function(){e(D.k(n))},onPauseShortcut:function(){e(D.j(n))},onSkipForwardShortcut:function(){e(D.p(n))},
onStepForwardShortcut:function(){e(D.r(n))},onNextShortcut:function(){e(C.h(n))},onVolumeChange:function(t){e(D.h(h()({},n,{volume:t})))},onCloseConfirm:function(){e(M.f(n))}}}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(7),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=(n.n(v),n(11)),m=n(6),y=(n.n(m),n(4)),b=n(17),I=n(35),S=n(492),M=n(60),D=n(131),C=n(118),O=n(154),j=Object(m.createSelector)(S.a,function(e){return{volume:e}}),P=function(e){function t(n,i){s()(this,t)
;var r=c()(this,e.call(this,n,i));return r.onVolumeIncrease=function(){r.props.onVolumeChange(Math.min(r.props.volume+10,100))},r.onVolumeDecrease=function(){r.props.onVolumeChange(Math.max(r.props.volume-10,0))},r.onCloseShortcut=function(){r.setState({isCloseConfirmModalOpen:!0})},r.onCloseConfirmPress=function(e){r.props.onCloseConfirm()},r.onCloseCancelPress=function(e){r.setState({isCloseConfirmModalOpen:!1})},r.state={isCloseConfirmModalOpen:!1},r}return d()(t,e),
t.prototype.componentDidMount=function(){b.a.on({"shortcut:skipPrevious":this.props.onPreviousShortcut,"shortcut:stepBackward":this.props.onStepBackShortcut,"shortcut:seekBackward":this.props.onSkipBackShortcut,"shortcut:playPause":this.props.onPlayPauseShortcut,"shortcut:play":this.props.onPlayShortcut,"shortcut:pause":this.props.onPauseShortcut,"shortcut:seekForward":this.props.onSkipForwardShortcut,"shortcut:stepForward":this.props.onStepForwardShortcut,
"shortcut:skipNext":this.props.onNextShortcut,"shortcut:increaseVolume":this.onVolumeIncrease,"shortcut:decreaseVolume":this.onVolumeDecrease,"shortcut:toggleFullScreen":this.props.onToggleFullscreenShortcut,"shortcut:stop":this.onCloseShortcut})},t.prototype.componentWillUnmount=function(){b.a.off({"shortcut:skipPrevious":this.props.onPreviousShortcut,"shortcut:stepBackward":this.props.onStepBackShortcut,"shortcut:seekBackward":this.props.onSkipBackShortcut,
"shortcut:playPause":this.props.onPlayPauseShortcut,"shortcut:play":this.props.onPlayShortcut,"shortcut:pause":this.props.onPauseShortcut,"shortcut:seekForward":this.props.onSkipForwardShortcut,"shortcut:stepForward":this.props.onStepForwardShortcut,"shortcut:skipNext":this.props.onNextShortcut,"shortcut:increaseVolume":this.onVolumeIncrease,"shortcut:decreaseVolume":this.onVolumeDecrease,"shortcut:toggleFullScreen":this.props.onToggleFullscreenShortcut,"shortcut:stop":this.onCloseShortcut})},
t.prototype.render=function(){return a()(O.a,{isOpen:this.state.isCloseConfirmModalOpen,metricsPage:I.f,title:Object(y.default)("Stop Playback"),message:Object(y.default)("Closing the player will stop playback. Any changes to the queue will be lost."),onConfirm:this.onCloseConfirmPress,onCancel:this.onCloseCancelPress})},t}(v.Component);t.a=Object(g.b)(j,i)(P)},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 r}),n.d(t,"all",function(){return a});var i="calendar",r="agenda",a=[i,r]},function(e,t){e.exports={link:"Link-link-2n0yJ",default:"Link-default-2XA2b",primary:"Link-primary-1vcAG",success:"Link-success-oE5mZ",danger:"Link-danger-58vt6",small:"Link-small-_K-QD",medium:"Link-medium-3gAfL",large:"Link-large-3a4C4",isSelected:"Link-isSelected-IRm9u",isActiveRoute:"Link-isActiveRoute-2N5cg"}},function(e,t){e.exports={button:"Button-button-2kT68 Link-link-2n0yJ",
default:"Button-default--yDCH",primary:"Button-primary-3fwLz",success:"Button-success-lQICH",danger:"Button-danger-2T8IU",dark:"Button-dark-y17Cm",small:"Button-small-PnnoG",medium:"Button-medium-3g45_",large:"Button-large-3S9Ud"}},function(e,t){e.exports={spinner:"Spinner-spinner-Niere spin-spin-2kLwt",spinnerContainer:"Spinner-spinnerContainer-1dbVI",spinnerLabel:"Spinner-spinnerLabel-3_zR9",small:"Spinner-small-3PStH Spinner-spinner-Niere spin-spin-2kLwt",
medium:"Spinner-medium-31XpH Spinner-spinner-Niere spin-spin-2kLwt",large:"Spinner-large-3AQPy Spinner-spinner-Niere spin-spin-2kLwt"}},function(e,t){e.exports={button:"SpinnerButton-button-1A8Ec Button-button-2kT68 Link-link-2n0yJ",spinnerContainer:"SpinnerButton-spinnerContainer-1NdZW",spinner:"SpinnerButton-spinner-1TgDP Spinner-spinner-Niere spin-spin-2kLwt",label:"SpinnerButton-label-qxG01",isSpinning:"SpinnerButton-isSpinning-bbh-4"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(84),v=n.n(f),g=n(349),m=n(29),y=n(61),b=n(251),I=n(421),S=n(482),M=n.n(S),D=n(670),C=n(410),O=n(1817),j=n.n(O),P=Object(b.a)(M.a.modalSpeed),w={appear:j.a.enter,appearActive:j.a.enterActive,enter:j.a.enter,enterActive:j.a.enterActive,leave:j.a.leave,leaveActive:j.a.leaveActive},T=function(e){function t(){var n,i,r;o()(this,t)
;for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onBackdropBeginPress=function(e){i._isBackdropPressed=i._isBackdropTarget(e)},i.onBackdropEndPress=function(e){!i.props.preventCloseOnBackdropPress&&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===g.j?I.e(e):t===g.e&&(e.preventDefault(),e.stopPropagation(),i.props.onModalClose(),I.c())},r=n,l()(i,r)}return u()(t,e),t.prototype.componentDidMount=function(){this.props.isOpen&&this._openModal()},t.prototype.shouldComponentUpdate=function(e,t){return Object(m.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(){I.f(v.a.findDOMNode(this.refs.modal)),this._autoFocusTimeoutID=setTimeout(I.d,P),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=v.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,a=e.size,o=e.isOpen;return r()(D.a,{isOpen:o,closeTimeout:P},void 0,r()(C.a,{className:j.a.modalContainer,transitionName:w,transitionAppearTimeout:P,transitionEnterTimeout:P,transitionLeaveTimeout:P},void 0,o&&r()("div",{className:n,
onMouseDown:this.onBackdropBeginPress,onMouseUp:this.onBackdropEndPress,onTouchStart:this.onBackdropBeginPress,onTouchEnd:this.onBackdropEndPress,onTouchMove:this.onTouchMove,onTouchCancel:this.onTouchCancel},void 0,h.a.createElement("div",{className:t||j.a[a],ref:"modal"},i))))},t}(p.Component);T.defaultProps={backdropClassName:j.a.modalBackdrop,size:y.MEDIUM,preventCloseOnBackdropPress:!1},t.a=T},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 r(e){var t=e.tabIndex;return null===t&&(t=void 0),!isNaN(t)&&t>=0&&a(e)}function a(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 o(e){if(!e)return[];var t=[].slice.call(e.getElementsByTagName("*"),0).filter(function(e){return r(e)});return l.a.sortBy(t,function(e){return 0===e.tabIndex?1/0:e.tabIndex})}t.a=o;var s=n(5),l=n.n(s)},function(e,t){e.exports={modalContainer:"Modal-modalContainer-tNumM",modalBackdrop:"Modal-modalBackdrop-3-L45",modal:"Modal-modal-3Z1JS",small:"Modal-small-37D0M Modal-modal-3Z1JS",
medium:"Modal-medium-1UIAd Modal-modal-3Z1JS",large:"Modal-large-1fVmO Modal-modal-3Z1JS",enter:"Modal-enter-2jg6A",enterActive:"Modal-enterActive-2u3GY",leave:"Modal-leave-2eoNB",leaveActive:"Modal-leaveActive-3p317"}},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.iconComponent,r=e.onModalClose,o=c()(e,["className","children","iconComponent","onModalClose"]);return p.a.createElement("div",a()({className:t},o),s()(h.a,{className:v.a.closeButton,onPress:r
},void 0,s()(i,{name:"plex-icon-remove-560"})),n)}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(22),f=n(1819),v=n.n(f);i.defaultProps={className:v.a.modalContent},t.a=i},function(e,t){e.exports={modalContent:"ModalContent-modalContent-UQlV4",closeButton:"ModalContent-closeButton-3NY5u Link-link-2n0yJ"}},function(e,t){e.exports={modalHeader:"ModalHeader-modalHeader-1Kf9R"}},function(e,t){e.exports={scroller:"Scroller-scroller-3GqQc",
none:"Scroller-none-3GfKR",vertical:"Scroller-vertical-VScFL",auto:"Scroller-auto-LsWiW",horizontal:"Scroller-horizontal-cOKsq",omni:"Scroller-omni-2Pq3H"}},function(e,t){e.exports={modalBody:"ModalBody-modalBody--5uHS",modalScroller:"ModalBody-modalScroller-1xOMq ModalBody-modalBody--5uHS",innerModalBody:"ModalBody-innerModalBody-36gmb"}},function(e,t){e.exports={modalFooter:"ModalFooter-modalFooter-30WIB"}},function(e,t){e.exports={buttonBar:"ModalFooterButtonBar-buttonBar-3X6qj"}
},function(e,t){e.exports={confirmBody:"ConfirmModal-confirmBody-10ifx ModalBody-modalScroller-1xOMq ModalBody-modalBody--5uHS",accordLabel:"ConfirmModal-accordLabel-2PQCS",accordInput:"ConfirmModal-accordInput-3RjnH",cancelButton:"ConfirmModal-cancelButton-3A26b",confirmButton:"ConfirmModal-confirmButton-1DVQ-"}},function(e,t,n){"use strict";function i(e,t){var n={playerType:t.playerType};return{onModalClose:function(){e(Object(u.f)(n))},onSkipPress:function(t){e(Object(d.h)(n))},
onRetryPress:function(t){e(Object(h.i)(n)),e(Object(p.e)(n))}}}var r=n(6),a=(n.n(r),n(11)),o=n(59),s=n(44),l=n(221),c=n(945),u=n(60),d=n(118),p=n(417),h=n(131),f=n(1827),v=Object(r.createSelector)(Object(s.a)(),Object(l.a)(),Object(c.a)(),function(e,t){return t.mediaType},function(e,t){return t.isRemotePlayer},function(e,t,n,i,r){var a=e.playQueue,s=e.repeatAll,l=e.errorMessage,c=e.errorCode,u=e.errorCategory,d=n&&n.entityID,p=a&&a.currentIndex,h={playQueueItemEntityID:d,
showSkipButton:!!a&&(p<a.playQueueItems.length-1||s),showRetryButton:!!a&&i!==o.c&&!r,errorMessage:l,errorCode:c,errorCategory:u};return t&&(h.title=t.title),h});t.a=Object(a.b)(v,i)(f.a)},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.showSkipButton,i=e.showRetryButton,r=e.errorMessage,o=e.errorCode,s=e.errorCategory,y=e.title,I=e.onSkipPress,S=e.onRetryPress,M=e.onModalClose,D=r||(y?Object(l.default)('An error occurred trying to play "{title}".',{title:y
}):Object(l.default)("An error occurred trying to play this item."));return a()(d.a,{isOpen:t,metricsPage:c.M,size:u.e.SMALL,onModalClose:M},void 0,a()(p.a,{onModalClose:M},void 0,a()(h.a,{className:b.a.modalHeader},void 0,Object(l.default)("Playback Error")),a()(f.a,{},void 0,D,null!=o&&a()("p",{className:b.a.errorCode},void 0,Object(l.default)("Error code: {errorCode}",{errorCode:o}),s&&" ("+s+")")),(n||i)&&a()(v.a,{},void 0,a()(g.a,{},void 0,n&&a()(m.a,{onPress:I
},void 0,Object(l.default)("Skip")),i&&a()(m.a,{kind:u.b.PRIMARY,onPress:S},void 0,Object(l.default)("Retry"))))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(35),u=n(24),d=n(132),p=n(103),h=n(111),f=n(74),v=n(112),g=n(92),m=n(47),y=n(1828),b=n.n(y);t.a=i},function(e,t){e.exports={modalHeader:"PlayerErrorModal-modalHeader-167lt ModalHeader-modalHeader-1Kf9R",errorCode:"PlayerErrorModal-errorCode-2H7W7"}},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(Object(l.a)(),Object(c.a)(),Object(s.a)(),function(e,t,n){var i={serverEntityID:e.serverEntityID,hasSubscribeFeature:!!t.features.find(function(e){return"subscribe"===e.type}),error:e.cancelConflictError,isConflictCancelling:e.isConflictCancelling};return n&&(i.conflicts=n.grabOperation.conflicts),i})}function r(e,t){var n=t.isPlayerOpen,i=t.playerType;return{onModalClose:function(){
var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.showError,a=void 0!==r&&r;e(n?Object(u.e)({playerType:i,showError:a}):Object(u.c)({playerType:i}))}}}var a=n(6),o=(n.n(a),n(11)),s=n(198),l=n(44),c=n(220),u=n(155),d=n(1833);t.a=Object(o.b)(i,r)(d.a)},function(e,t,n){"use strict";function i(e,t,n,i){var r="/livetv/dvrs/"+t+"/channels/"+n+"/tune";return a.a.ajax(e.server.getXHROptions(r,{method:"POST",headers:{"X-Plex-Session-Identifier":i.playbackSessionID},timeout:s.a
})).then(function(r,s,c){e.set(e.parse(r));var u=e.get("grabOperation");if(!u)return a.a.Deferred().reject({errorMessage:Object(o.default)("Unable to tune channel")}).promise();var d=u.get("metadataItem"),p=d.get("Media")[0],h=u.get("conflicts"),f=c.getResponseHeader("X-Plex-Activity"),v=u.get("beginsAt"),g=u.get("metadataItem"),m=g.get("transcodeSession"),y={dvrID:t,channelIdentifier:n,activityUUID:f,currentPosition:v,startedAt:v},b=!1;if(m&&i.currentMediaItem){
var I=m.get("timeStamp"),S=m.get("minOffsetAvailable"),M=m.get("maxOffsetAvailable");if(I&&null!=S&&null!=M){y.captureBuffer={startedAt:I,seekStartSeconds:S,seekEndSeconds:M};var D=I+S,C=i.currentMediaItem.beginsAt,O=Math.max(D,C);Date.now()/1e3-O>l&&(b=!0)}}if(e.set(y),h&&h.length)return a.a.Deferred().reject({hasConflicts:!0,liveTVSession:e}).promise();if(!f)return a.a.Deferred().reject({errorMessage:Object(o.default)("Unable to tune channel (No activity)")}).promise();var j=p&&p.Part
;return j&&j.length?(d.set("isPreFetched",!0),b?a.a.Deferred().reject({confirmPlayback:b,liveTVSession:e}).promise():a.a.Deferred().resolve(e).promise()):a.a.Deferred().reject({errorMessage:Object(o.default)("Unable to tune channel (No parts)")}).promise()},function(e,t){return"abort"===t?a.a.Deferred().reject({errorMessage:Object(o.default)("Unable to tune channel (Timed out)")}).promise():a.a.Deferred().reject({errorMessage:Object(o.default)("Unable to tune channel")}).promise()})}t.a=i
;var r=n(12),a=n.n(r),o=n(4),s=n(68),l=60},function(e,t,n){"use strict";function i(e){var t=e.get("captureBuffer");return t&&t.startedAt}function r(e){return e.get("currentPosition")}function a(e){var t=e.get("liveTVSession");return e.get("liveTVSession")?r(t):0}function o(e){var t=e.get("liveTVSession"),n=t.get("captureBuffer");if(n){var i=n.startedAt;return{seekStartSeconds:i+n.seekStartSeconds,seekEndSeconds:i+n.seekEndSeconds}}var r=t.get("startedAt");return{
seekStartSeconds:r+e.get("seekStartSeconds"),seekEndSeconds:r+e.get("seekEndSeconds")}}function s(e){var t=r(e);if(t)for(var n=e.get("timeline"),i=0;i<n.length;i++)for(var a=n.at(i),o=[].concat(a.get("Media")).sort(function(e,t){return e.endsAt-t.endsAt}),s=0;s<o.length;s++){var l=o[s],c=l.beginsAt,u=l.endsAt;if(c<=t&&u>t)return l}}function l(e){var t=r(e);if(t)for(var n=e.get("timeline"),i=n.length-1;i>=0;i--)for(var a=n.at(i),o=[].concat(a.get("Media")).sort(function(e,t){
return e.endsAt-t.endsAt}),s=o.length-1;s>=0;s--){var l=o[s];if(l.endsAt<=t)return l}}function c(e,t){var n=a(e),i=o(e).seekEndSeconds;return n?Math.min(i,n+t):void 0}function u(e,t){var n=a(e),i=o(e).seekStartSeconds;return n?Math.max(i,n-t):void 0}function d(e){return u(e,S.c)}function p(e){return c(e,S.d)}function h(e){return u(e,S.e)}function f(e){return c(e,S.f)}function v(e){var t=e.get("liveTVSession");if(e.get("liveTVSession")){var n=o(e).seekEndSeconds,i=s(t)
;if(i)return Math.min(n,i.endsAt)}}function g(e){var t=e.get("liveTVSession");if(e.get("liveTVSession")){var n=o(e).seekStartSeconds,i=r(t),a=s(t);if(a){if(i-a.beginsAt>S.a)return Math.max(n,a.beginsAt);var c=l(t);if(c)return Math.max(n,c.beginsAt)}}}function m(e,t){var n=e.get("currentDecision");if(!n||n.isDirectPlay)return!1;var i=e.get("liveTVSession"),r=i.get("startedAt");if(!i.get("captureBuffer"))return!1;if(M.a.get("shouldCreateNewSessionWhenSeekingLiveTV"))return!0
;var a=r+e.get("seekStartSeconds"),o=r+e.get("seekEndSeconds");return!(t>=a&&t<=o)}function y(e,t,n,r){if(null!=n){var a=Object(D.a)(e),o=Object(b.b)(e,t),s=o.get("liveTVSession"),l=s.get("startedAt");Object(I.a)(function(){if(s.set({currentPosition:n,lastSeekPosition:n}),m(o,n)){var e=i(s),c=e||l,u=n-c;r(Object(C.e)({playerType:t,decisionOptions:{offset:1e3*u}}))}else{var d=n-l;a.seek(o,d)}})}}t.c=d,t.d=p,t.e=h,t.f=f,t.a=v,t.b=g,t.g=y;var b=n(171),I=n(34),S=n(346),M=n(62),D=n(344),C=n(417)
},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=l[e]||a.a.last(l);return{times:e+1,remindAfter:s()().add(t,"days").unix()}}var r=n(5),a=n.n(r),o=n(41),s=n.n(o),l=[7,30,60,90,180];t.a=i},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.isPlayerOpen,i=e.playerType,r=e.serverEntityID,o=e.hasSubscribeFeature,s=e.conflicts,p=e.isConflictCancelling,h=e.onModalClose;return a()(u.a,{size:c.e.SMALL,isOpen:t,metricsPage:l.G,
onModalClose:h},void 0,a()(d.a,{isPlayerOpen:n,playerType:i,serverEntityID:r,hasSubscribeFeature:o,conflicts:s,isConflictCancelling:p,onModalClose:h}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(35)),c=n(24),u=n(132),d=n(1834);t.a=i},function(e,t,n){"use strict";function i(e,t){
return e?t?Object(c.default)("A recording is scheduled to start in a few minutes and all tuners are currently in use. Please select from one of the actions below. Selecting OK or taking no action will end this live viewing session once the recording starts."):Object(c.default)("All tuners are in use. Please ask the server owner to free up a tuner to continue watching Live TV."):t?Object(c.default)("Please select from one of the actions below."):Object(c.default)("All tuners are in use. Please ask the server owner to free up a tuner to watch Live TV.")
}function r(e){var t=e.serverEntityID,n=e.hasSubscribeFeature,r=e.isPlayerOpen,a=e.playerType,s=e.isConflictCancelling,l=e.conflicts,I=e.error,M=e.onModalClose,D=i(r,n);return o()(p.a,{onModalClose:M},void 0,o()(f.a,{className:S.a.modalHeader},void 0,Object(c.default)("All Tuners are Currently in Use")),!!I&&o()(h.a,{kind:d.b.DANGER,message:Object(c.default)("There was an error trying to cancel the selected item, please try again")}),o()(v.a,{innerClassName:S.a.innerModalBody},void 0,o()("div",{
className:S.a.message},void 0,D),n&&o()("div",{className:S.a.conflicts},void 0,l.map(function(e){return o()(b.a,{serverEntityID:t,grabOperationKey:e.key,metadataItemEntityID:e.metadataItem,playerType:a,isRolling:e.rolling,isPlayerOpen:r},e.key)}))),o()(g.a,{},void 0,o()("div",{className:S.a.footerMessage},void 0,r&&o()(u.a,{conflicts:l,onModalClose:M})),o()(m.a,{},void 0,o()(y.a,{isSpinning:s,kind:d.b.PRIMARY,onPress:M},void 0,r||!n?Object(c.default)("OK"):Object(c.default)("Cancel")))))}
var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(4)),u=n(1835),d=n(24),p=n(103),h=n(674),f=n(111),v=n(74),g=n(112),m=n(92),y=n(102),b=n(1839),I=n(1842),S=n.n(I);t.a=r},function(e,t,n){"use strict";function i(e){var t=Math.floor(Date.now()/1e3);return e.reduce(function(e,n){var i=n.mediaItem,r=i.beginsAt,a=i.startOffsetSeconds,o=void 0===a?0:a,s=r-o;return s>t&&(!e||s<e)?s:e},0)}function r(e){return Math.max(0,e-Math.floor(Date.now()/1e3))}
var a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(4)),g=n(1836),m=function(e){function t(n,a){l()(this,t);var o=u()(this,e.call(this,n,a));o._tick=function(){o.setState({endSeconds:r(o.state.endsAt)}),o._setTickTimeout()},o._tickTimeout=null;var s=i(n.conflicts);return o.state={endsAt:s,endSeconds:r(s)},o}return p()(t,e),t.prototype.componentDidMount=function(){this._setTickTimeout()},t.prototype.componentDidUpdate=function(e,t){
var n=this.props,i=n.conflicts,r=n.onModalClose;e.conflicts!==i&&this._updateEndSeconds(),t.endSeconds>0&&0===this.state.endSeconds&&r({showError:!0})},t.prototype.componentWillUnmount=function(){this._tickTimeout&&clearTimeout(this._tickTimeout)},t.prototype._setTickTimeout=function(){this.state.endSeconds&&(this._tickTimeout=setTimeout(this._tick,1e3))},t.prototype._updateEndSeconds=function(){var e=i(this.props.conflicts);this.setState({endsAt:e,endSeconds:r(e)})},
t.prototype.render=function(){var e=this.state.endSeconds,t=Object(g.a)(1e3*e);return o()("span",{},void 0,Object(v.default)("This live TV session will end in: {formattedMinutesSeconds}",{formattedMinutesSeconds:t}))},t}(f.Component);t.a=m},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=a.a.duration(e),n=24*t.days()*60,i=60*t.hours(),r=t.minutes()+i+n,s=t.seconds()
;return r&&s?Object(o.default)("{1} min {2} sec",r,s):r?Object(o.default)("{1} min",r):s>0?Object(o.default)("{1} sec",s):""}var r=n(41),a=n.n(r),o=n(4);t.a=i},function(e,t){e.exports={modalScroller:"ModalContentCenter-modalScroller-3cd-b ModalBody-modalScroller-1xOMq ModalBody-modalBody--5uHS",innerModalBody:"ModalContentCenter-innerModalBody-3jQ5I ModalBody-innerModalBody-36gmb"}},function(e,t){e.exports={icon:"ModalContentError-icon-235FF",default:"ModalContentError-default-1xFU8",
primary:"ModalContentError-primary-34blW",success:"ModalContentError-success-2Wv-f",danger:"ModalContentError-danger-22PUT",message:"ModalContentError-message-3J35m"}},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(s.a)(),function(e){return{type:e.type,title:e.title,grandparentTitle:e.grandparentTitle,thumb:e.thumb,grandparentThumb:e.grandparentThumb}})}function r(e,t){var n=t.playerType,i=t.grabOperationKey;return{onCancelConflictPress:function(){
e(Object(l.b)({playerType:n,grabOperationKey:i}))}}}var a=n(11),o=n(6),s=(n.n(o),n(21)),l=n(155),c=n(1840);t.a=Object(a.b)(i,r)(c.a)},function(e,t,n){"use strict";function i(e,t,n,i){var r=e===u.e?n:t;return i?Object(c.default)("Stop watching {openSpan}{title}{closeSpan} and continue",{title:r}):Object(c.default)("Stop recording {openSpan}{title}{closeSpan} and continue",{title:r})}function r(e){
var t=e.serverEntityID,n=e.type,r=e.title,a=e.grandparentTitle,s=e.thumb,l=e.grandparentThumb,c=e.isRolling,u=e.onCancelConflictPress;return o()(h.a,{className:v.a.conflict,onPress:u},void 0,o()(d.a,{className:v.a.thumbnail,serverEntityID:t,url:s||l,width:53,height:80}),o()("div",{className:v.a.title},void 0,o()(p.a,{message:i(n,r,a,c),tags:[{open:"openSpan",close:"closeSpan",component:"span",className:v.a.titleHighlight}]})))}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),
n(4)),u=n(28),d=n(169),p=n(199),h=n(22),f=n(1841),v=n.n(f);t.a=r},function(e,t){e.exports={conflict:"PlayerConflictItemRow-conflict-P0q6Q",thumbnail:"PlayerConflictItemRow-thumbnail-3DnQM",title:"PlayerConflictItemRow-title-1hIqi",titleHighlight:"PlayerConflictItemRow-titleHighlight-EbgLG"}},function(e,t){e.exports={modalHeader:"PlayerConflictModalContent-modalHeader-esgnI ModalHeader-modalHeader-1Kf9R",
innerModalBody:"PlayerConflictModalContent-innerModalBody-2N2K5 ModalBody-innerModalBody-36gmb",message:"PlayerConflictModalContent-message-1A31c",conflicts:"PlayerConflictModalContent-conflicts-2yWT2",footerMessage:"PlayerConflictModalContent-footerMessage-1ptDW"}},function(e,t,n){"use strict";function i(e,t){var n=t.playerType;return{onConfirm:function(){e(Object(o.d)({playerType:n}))},onCancel:function(){e(Object(a.f)({playerType:n}))}}}var r=n(11),a=n(60),o=n(222),s=n(1849)
;t.a=Object(r.b)(null,i)(s.a)},function(e,t,n){"use strict";var i=n(19),r=n(62),a=n(23),o=n(1845),s=a.a.extend({name:"ResourceCollection",model:o.a,context:["server"],url:function(){var e={};return r.a.get("allowHttpsMediaServerConnections")&&(e.includeHttps=1),r.a.get("allowMediaServerRelayConnections")&&(e.includeRelay=1),i.join("/api/resources",e)}});t.a=s},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(472),o=r.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:a.b,rootPropertyName:"Connection"}}});t.a=o},function(e,t,n){"use strict";function i(e){if(!e.length)return s.a.Deferred().reject().promise();var t=s.a.Deferred(),n=e.length;return a.a.each(e,function(e){e.done(function(){n--,t.resolveWith(this,arguments)}).fail(function(){0===--n&&t.reject()})}),t.promise()}var r=n(5),a=n.n(r),o=n(12),s=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.providerModel,n=e.currentPlayQueueModel,i=e.metadataKey,r=e.containerKey,l=e.playQueueOptions,c=Object(o.a)(r),u=c||r||i;return n&&n.get("playQueueID")===u?n:Object(s.a)(a()({providerModel:t,playQueueID:u},l))}t.a=i;var r=n(7),a=n.n(r),o=n(675),s=n(932)},function(e,t,n){"use strict";function i(e){var t=e.serverModel,n=e.providerModel,i=e.playQueueModel,r=e.metadataKey,u=e.containerKey;if(!i.get("isLocal"))return Object(c.a)(i);var d={server:t,provider:n},p=void 0,h=void 0,f=void 0
;return u?(h=new s.default({containerKey:u},d),f=h.fetch()):(p=new o.a({key:r},d),f=p.fetch()),f.then(function(){return h&&!h.get("metadataItems").length?a.a.Deferred().reject().promise():Object(l.a)({providerModel:n,metadataItemModel:p,metadataListModel:h,playQueueModel:i})})}t.a=i;var r=n(12),a=n.n(r),o=n(77),s=n(98),l=n(930),c=n(343)},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.onConfirm,i=e.onCancel;return a()(u.a,{isOpen:t,metricsPage:c.r,
title:Object(l.default)("Continue Playback"),message:Object(l.default)("Would you like to continue playback here?"),confirmLabel:Object(l.default)("Yes"),cancelLabel:Object(l.default)("No"),onConfirm:n,onCancel:i})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(35),u=n(154);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=t.playerType;return{onConfirm:function(){e(Object(s.c)({playerType:n}))},onCancel:function(){e(Object(o.f)({playerType:n}))}}}
var r=n(11),a=n(6),o=(n.n(a),n(60)),s=n(222),l=n(1851),c=Object(a.createSelector)(function(e){return e.remotePlayer},function(e){return{playerName:e&&e.friendlyName}});t.a=Object(r.b)(c,i)(l.a)},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.playerName,i=e.onConfirm,r=e.onCancel;return a()(u.a,{isOpen:t,metricsPage:c.m,title:Object(l.default)("Continue Playback"),message:Object(l.default)("Would you like to continue playback on {playerName}?",{playerName:n}),
confirmLabel:Object(l.default)("Yes"),cancelLabel:Object(l.default)("No"),onConfirm:i,onCancel:r})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(35),u=n(154);t.a=i},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(Object(u.a)(),Object(c.a)(),Object(d.a)(),function(e,t,n){var i=e.serverEntityID,r=e.providerEntityID,a={serverEntityID:i,providerEntityID:r};if(t&&t.captureBuffer){var o=t.captureBuffer.startedAt;a.captureBufferStartedAt=o}
return n&&(a.mediaItemBeginsAt=n.beginsAt),a})}function r(e,t){var n=t.playerType;return{onConfirm:function(t){e(Object(p.d)(o()({},t,{playerType:n})))},onModalClose:function(){e(Object(p.a)({playerType:n}))}}}var a=n(7),o=n.n(a),s=n(6),l=(n.n(s),n(11)),c=n(198),u=n(44),d=n(1853),p=n(155),h=n(1854);t.a=Object(l.b)(i,r)(h.a)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e){
for(var t=Math.floor(Date.now()/1e3),n=0;n<e.length;n++)for(var i=e[n],r=0;r<i.Media.length;r++){var a=i.Media[r],o=a.beginsAt,s=a.endsAt;if(o<=t&&s>t)return a}})}t.a=i;var r=n(6),a=(n.n(r),n(676))},function(e,t,n){"use strict";function i(e,t){var n=Math.max(e,t),i=Date.now()-1e3*n;return Object(g.a)(i)}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),n(4)),v=n(35),g=n(677),m=n(678),y=n(679),b=6e4,I=function(e){function t(n,r){s()(this,t)
;var a=c()(this,e.call(this,n,r));return a.updateTimeAgo=function(){var e=a.props,t=e.captureBufferStartedAt,n=e.mediaItemBeginsAt,r=b-1e3*(new Date).getSeconds(),o=i(t,n);o!==a.state.timeAgo&&a.setState({timeAgo:o}),a._updateTimeAgoTimeout=setTimeout(a.updateTimeAgo,r)},a.onConfirm=function(e){var t=a.props,n=t.serverEntityID,i=t.providerEntityID;(0,t.onConfirm)({serverEntityID:n,providerEntityID:i,offset:e})},a._updateTimeAgoTimeout=null,a.state={
timeAgo:i(n.captureBufferStartedAt,n.mediaItemBeginsAt)},a}return d()(t,e),t.prototype.componentDidMount=function(){this.props.mediaItemBeginsAt||this.onConfirm(),this.updateTimeAgo()},t.prototype.componentWillUnmount=function(){this._updateTimeAgoTimeout&&clearTimeout(this._updateTimeAgoTimeout)},t.prototype.render=function(){var e=this.props,t=e.isOpen,n=e.captureBufferStartedAt,i=e.mediaItemBeginsAt,r=e.onModalClose,o=this.state.timeAgo;return n?a()(m.a,{isOpen:t,metricsPage:v.F,
title:Object(f.default)("Join Session in Progress"),onItemSelect:this.onConfirm,onCancel:r},void 0,a()(y.a,{value:1e3*Math.max(i-n,0)},void 0,Object(f.default)("Watch from start (started {timeAgo} ago)",{timeAgo:o})),a()(y.a,{value:null},void 0,Object(f.default)("Watch Live"))):null},t}(h.Component);t.a=I},function(e,t){e.exports={listModalInnerBody:"ListModal-listModalInnerBody-1mBaL"}},function(e,t){e.exports={listModalItem:"ListModalItem-listModalItem-3SDr-"}},function(e,t,n){"use strict"
;function i(e,t){var n=t.playerType,i=t.confirmPlaybackPayload;return{onConfirm:function(){e(s.m(a()({},i,{confirmPlayback:!0})))},onCancel:function(){e(s.e({playerType:n}))}}}var r=n(7),a=n.n(r),o=n(11),s=n(60),l=n(1858);t.a=Object(o.b)(null,i)(l.a)},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.onConfirm,i=e.onCancel;return a()(u.a,{isOpen:t,metricsPage:c.q,title:Object(l.default)("Play Now"),
message:Object(l.default)("This will clear changes made to the queue and play the selection instead."),confirmLabel:Object(l.default)("Play"),onConfirm:n,onCancel:i})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(35),u=n(154);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=t.playerType,i=t.confirmOffsetPayload;return{onConfirm:function(t){e(c.m(a()({},i,{confirmPlayback:!0,confirmOffset:!0,startOffsetMilliseconds:t})))},onCancel:function(){e(c.d({playerType:n}))}}}
var r=n(7),a=n.n(r),o=n(6),s=(n.n(o),n(11)),l=n(110),c=n(60),u=n(1860),d=Object(o.createSelector)(function(e,t){return t.confirmOffsetPayload},l.a,function(e,t){var n=void 0;if(e){n=t[e.metadataItemEntityID]}return n?{viewOffset:n.viewOffset,duration:n.duration}:{}});t.a=Object(s.b)(d,i)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.viewOffset,i=e.duration,r=e.onConfirm,o=e.onCancel,s=(i-n)/1e3,p=s>0;return a()(h.a,{isOpen:t,metricsPage:c.U,
title:Object(l.default)("Resume Playback"),onItemSelect:r,onCancel:o},void 0,a()(f.a,{value:n},void 0,Object(l.default)("Resume from {time}",{time:Object(u.a)(n)}),p&&v,p&&Object(d.a)(s)),a()(f.a,{value:0},void 0,Object(l.default)("Start from the Beginning")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(35),u=n(350),d=n(285),p=n(86),h=n(678),f=n(679),v=a()(p.a,{});t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return""
;var t=a.a.duration(e),n=24*t.days()*60,i=60*t.hours(),r=t.minutes()+i+n,s=t.seconds();return r?Object(o.default)("{1} min",r):s>0?Object(o.default)("{1} sec",s):""}var r=n(41),a=n.n(r),o=n(4);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=a.a.duration(e),n=t.days(),i=t.hours(),r=1!==n
;return n&&i?r?Object(o.default)("{1} days {2} hr",n,i):Object(o.default)("{1} day {2} hr",n,i):n?r?Object(o.default)("{1} days",n):Object(o.default)("{1} day",n):Object(o.default)("{1} hr",i)}var r=n(41),a=n.n(r),o=n(4);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=a.a.duration(e),n=365*t.years(),i=30*t.months(),r=n+i+t.days();return 1!==r?Object(o.default)("{1} days",r):Object(o.default)("{1} day",r)}var r=n(41),a=n.n(r),o=n(4);t.a=i},function(e,t){e.exports={
separator:"DashSeparator-separator-2a3yn"}},function(e,t,n){"use strict";function i(e){var t=document.getElementById("plex").classList;e?t.add("show-video-player"):t.remove("show-video-player")}t.a=i},function(e,t){e.exports={fullPlayerContainer:"Player-fullPlayerContainer-1-HN7",fullPlayerContainerBackground:"Player-fullPlayerContainerBackground-1rsLD",miniPlayerContainer:"Player-miniPlayerContainer-3S8L9"}},function(e,t,n){"use strict";function i(e){
var t=e.playerType,n=e.bufferStartMilliseconds,i=e.bufferEndMilliseconds,r=e.isPlayQueueLoading,o=e.isEditing,s=e.onEditToggle;return a()(l.a,{playerType:t,isPlayQueueLoading:r},void 0,a()(u.a,{playerType:t,showExpandButton:!0,showThumb:!0,showPreviousButton:!0,showNextButton:!0,isEditing:o,onEditTogglePress:s}),a()(c.a,{className:p.a.seekBar,playerType:t,bufferStartMilliseconds:n,bufferEndMilliseconds:i,showBuffer:!0}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(85),
n(966)),c=n(680),u=n(969),d=n(2024),p=n.n(d);t.a=i},function(e,t){e.exports={miniPlayer:"MiniPlayerContainer-miniPlayer-3qFgJ",controls:"MiniPlayerContainer-controls-3p1H_"}},function(e,t,n){"use strict";function i(e,t,n){return(e-t)/(n-t)*100}t.a=i},function(e,t){e.exports={slider:"Slider-slider-2oLVT",isDisabled:"Slider-isDisabled-1hEOt",thumb:"Slider-thumb-2QGiU Link-link-2n0yJ",isDragging:"Slider-isDragging-3wZpY",hasAutoHideThumb:"Slider-hasAutoHideThumb-tpdhC",track:"Slider-track-28JOS",
fill:"Slider-fill-35GFq",secondaryFill:"Slider-secondaryFill-31_05 Slider-fill-35GFq",thumbTrack:"Slider-thumbTrack-21hGV"}},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.Media;return t&&t.length?{mediaItems:t}:{}})}var r=n(6),a=(n.n(r),n(11)),o=n(21),s=n(1872);t.a=Object(a.b)(i)(s.a)},function(e,t,n){"use strict";function i(e,t,n,i){if(e&&null!=t&&null!=n){
var r=e[t],a=r&&r.Part[n],o=a&&Object(h.a)(a);return null!=o?"/library/parts/"+a.id+"/indexes/"+o+"/"+Math.floor(i):void 0}}function r(e,t){if(!e||null==t)return j;var n=Object(f.a)(e[t]);if(null==n||null==n.width||null==n.height)return j;var i=n.width,r=n.height,a=S,o=S;return i>r?a=Math.round(a*(i/r)):o=Math.round(o*(r/i)),{containerWidth:a,containerHeight:o}}function a(e,t,n){var i=e.x-t/2;return i<0?i=0:i+t>window.innerWidth&&(i=window.innerWidth-t),{left:i,top:e.y-n-M,height:n}}
function o(e,t,n){var i=n===v.e.LARGE?C:D,r=t/2-i/2,a=e.x-t/2;if(a<0){var o=O,s=e.x-i/2;r=Math.max(s,o)}else if(a+t>window.innerWidth){var l=t-i-O,c=t-(window.innerWidth-e.x)-i/2;r=Math.min(c,l)}return{left:r}}function s(e){var t=e.tooltipClassName,n=e.serverEntityID,s=e.size,l=e.position,u=e.hoverValue,d=e.mediaItems,p=e.mediaIndex,h=e.partIndex,f=e.formatValue,v=f(u),m=i(d,p,h,u),y=r(d,p,h),b=y.containerWidth,S=y.containerHeight,M=a(l,b,S),D=o(l,b,s);return c()("div",{className:I.a.container,
style:M},void 0,m&&c()(g.a,{className:I.a.thumbnail,serverEntityID:n,url:m,width:b,height:S}),c()("div",{className:(t||"")+" "+(I.a[s]||""),style:D},void 0,v))}var l=n(2),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=(n.n(d),n(350)),h=n(968),f=n(393),v=n(24),g=n(169),m=n(45),y=n.n(m),b=n(1874),I=n.n(b),S=99,M=10,D=parseInt(y.a.seekBarTooltipSmallWidth,10),C=parseInt(y.a.seekBarTooltipLargeWidth,10),O=4,j={containerWidth:S,containerHeight:S};s.defaultProps={tooltipClassName:I.a.tooltip,size:v.e.SMALL,
formatValue:p.a},t.a=s},function(e,t){e.exports={gapSmall:"15px",gapMedium:"30px",gapLarge:"60px",navigationHeaderHeight:"60px",navigationUserMenuImageSize:"34px",menuSmallWidth:"120px",menuMediumWidth:"180px",menuLargeWidth:"220px",menuPadding:"8px",menuItemTopPadding:"4px",menuItemSidePadding:"20px",searchHubTitleHeight:"18px",searchResultWidth:"346px",searchResultHeight:"50px",sidebarWidth:"240px",sidebarLeftGutterWidth:"25px",tableCellPadding:"20px",tableHeaderHeight:"40px",
tableRowHeight:"40px",tableTitleHeight:"60px",inputBorderRadius:"4px",autosuggestSuggestionRadius:"4px",smallArrowWidth:"6px",mediumArrowWidth:"8px",largeArrowWidth:"10px",tooltipArrowSize:"6px",breakpointMobileNarrow:"320px",breakpointExtraSmall:"480px",breakpointSmall:"768px",breakpointMedium:"992px",breakpointLarge:"1200px"}},function(e,t){e.exports={container:"SeekBarThumbnail-container-1cIDw",thumbnail:"SeekBarThumbnail-thumbnail-2rxzk",tooltip:"SeekBarThumbnail-tooltip-WCnO4",
small:"SeekBarThumbnail-small-21D-m",large:"SeekBarThumbnail-large-1NQZT"}},function(e,t){e.exports={seekBar:"SeekBar-seekBar-2UK3i Slider-slider-2oLVT",seekBarTrack:"SeekBar-seekBarTrack-3Gu5R Slider-track-28JOS",seekBarFill:"SeekBar-seekBarFill-1Lcu0 Slider-fill-35GFq",seekBarBuffer:"SeekBar-seekBarBuffer-3bUz9 Slider-secondaryFill-31_05 Slider-fill-35GFq",noFillTransition:"SeekBar-noFillTransition-2hHzC"}},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.playQueueItemEntityID,r=e.metadataItemEntityID,o=e.isPaused,s=e.isPhotoStripOpen,u=e.isPhotoInformationOpen,d=e.isEditing,y=e.showExpandButton,S=e.showThumb,M=e.showPhotoInformationButton,D=e.showPhotoStripButton,C=e.showPreviousButton,O=e.showNextButton,j=e.disablePreviousButton,P=e.disableNextButton,w=e.onExpandPress,T=e.onPreviousPress,E=e.onPlayPausePress,x=e.onNextPress,N=e.onPhotoStripTogglePress,A=e.onPhotoInformationTogglePress,L=e.onEditTogglePress,k=e.onControlsMenuChange,_=e.onClosePress
;return a()("div",{className:b.a.controls},void 0,a()("div",{className:b.a.container},void 0,a()("div",{className:b.a.thumbContainer},void 0,S&&a()(m.a,{className:b.a.thumb,serverEntityID:t,providerEntityID:n,playQueueItemEntityID:i,dimension:I}),y&&a()(p.a,{"data-qa-id":"expandPlayerButton",className:b.a.expandButton,icon:"plex-icon-player-expand-560",title:Object(l.default)("Expand Player"),onPress:w})),a()(f.a,{playerType:c.b,serverEntityID:t,providerEntityID:n,metadataItemEntityID:r,
isEditing:d}),a()("div",{className:b.a.actions},void 0,C&&a()(p.a,{"data-qa-id":"previousButton",icon:"plex-icon-player-prev-560",isDisabled:j,title:Object(l.default)("Previous"),onPress:T}),a()(p.a,{"data-qa-id":o?"resumeButton":"pauseButton",className:b.a.actionButton,isActive:!o,icon:o?"plex-icon-player-play-560":"plex-icon-player-pause-560",title:o?Object(l.default)("Play"):Object(l.default)("Pause"),onPress:E}),O&&a()(p.a,{"data-qa-id":"nextButton",icon:"plex-icon-player-next-560",
isDisabled:P,title:Object(l.default)("Next"),onPress:x}),a()(v.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r,isEditing:d,onPress:L}),a()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r}),M&&a()(p.a,{"data-qa-id":"photoInfoButton",className:b.a.actionButton,isActive:u,icon:"plex-icon-info-560",title:Object(l.default)("Information"),onPress:A}),D&&a()(p.a,{"data-qa-id":"playQueueButton",className:b.a.actionButton,isActive:s,icon:"plex-icon-player-photo-thumbs-560",
title:Object(l.default)("Show Photo Strip"),onPress:N}),a()(h.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r,onMenuChange:k}),a()(p.a,{"data-qa-id":"closeButton",className:b.a.closeButton,icon:"plex-icon-close-560",title:Object(l.default)("Close Player"),onPress:_}))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(85),u=n(45),d=n.n(u),p=n(253),h=n(970),f=n(2013),v=n(2018),g=n(2020),m=n(998),y=n(2023),b=n.n(y),I=parseInt(d.a.playerPosterHeight,10);t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.iconComponent,i=e.iconClassName,r=e.icon,o=e.isDisabled,l=e.isActive,u=e.label,d=e.labelClassName,f=e.title,g=c()(e,["className","iconComponent","iconClassName","icon","isDisabled","isActive","label","labelClassName","title"]);return p.a.createElement(h.a,a()({className:(t||"")+" "+(o&&v.a.isDisabled||"")+" "+(l&&v.a.isActive||""||""),isDisabled:o,"aria-label":f,title:f},g),s()(n,{className:i,name:r}),u&&s()("span",{className:d
},void 0,u))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(22),f=n(1878),v=n.n(f);i.defaultProps={className:v.a.button,isDisabled:!1,labelClassName:v.a.label},t.a=i},function(e,t){e.exports={button:"IconButton-button-9An-7",isDisabled:"IconButton-isDisabled-2Wi5U",isActive:"IconButton-isActive-1_AJJ",label:"IconButton-label-1cUJa"}},function(e,t){e.exports={playerButton:"PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7"}},function(e,t,n){
"use strict";var i=n(2),r=n.n(i),a=n(7),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(5),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(684),b=n(54),I=n(4),S=n(253),M={showDelete:!1,showDeleteVersion:!1,showEdit:!1,showFixMatch:!1,showMarkUnplayed:!1,showMarkPlayed:!1,showMatch:!1,showOptimize:!1,showPlay:!1,showPlayAll:!1,showPlayMusicVideo:!1,showPlayPlexMix:!1,showPlayTrailer:!1,showPlayVersion:!1,showQueue:!1,showRecommend:!1,showRefresh:!1,showSelect:!1,showShare:!1,
showShuffle:!1,showSplitApart:!1,showUnmatch:!1,showWatchLater:!1},D=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onPress=function(){r.setState(function(e,t){return{isMenuOpen:!e.isMenuOpen}},function(){r.props.onMenuChange&&r.props.onMenuChange(r.state.isMenuOpen)})},r.onMenuClose=function(){r.setState({isMenuOpen:!1},function(){r.props.onMenuChange&&r.props.onMenuChange(!1)})},r.state={isMenuOpen:!1},r._menuButtonID=Object(b.a)(),r}return p()(t,e),
t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataActionProps,s=e.isDisabled,l=o()({},a,M);return f.a.values(l).some(function(e){return e})?r()("span",{},void 0,r()(S.a,{id:this._menuButtonID,"data-qa-id":"moreButton",icon:"plex-icon-player-more-560",isDisabled:s,title:Object(I.default)("More Actions"),onPress:this.onPress}),m.a.createElement(y.a,o()({serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,
target:this._menuButtonID,isOpen:this.state.isMenuOpen},M,{onMenuClose:this.onMenuClose}))):null},t}(g.Component);t.a=D},function(e,t){e.exports={gapSmall:"15px",gapMedium:"30px",gapLarge:"60px",navigationHeaderHeight:"60px",navigationUserMenuImageSize:"34px",menuSmallWidth:"120px",menuMediumWidth:"180px",menuLargeWidth:"220px",menuPadding:"8px",menuItemTopPadding:"4px",menuItemSidePadding:"20px",searchHubTitleHeight:"18px",searchResultWidth:"346px",searchResultHeight:"50px",
sidebarWidth:"240px",sidebarLeftGutterWidth:"25px",tableCellPadding:"20px",tableHeaderHeight:"40px",tableRowHeight:"40px",tableTitleHeight:"60px",inputBorderRadius:"4px",autosuggestSuggestionRadius:"4px",smallArrowWidth:"6px",mediumArrowWidth:"8px",largeArrowWidth:"10px",tooltipArrowSize:"6px",breakpointMobileNarrow:"320px",breakpointExtraSmall:"480px",breakpointSmall:"768px",breakpointMedium:"992px",breakpointLarge:"1200px"}},function(e,t,n){"use strict";(function(e){function n(e){
var t=!1,n=0,i=document.createElement("span");return new MutationObserver(function(){e(),t=!1}).observe(i,{attributes:!0}),function(){t||(t=!0,i.setAttribute("x-index",n),n+=1)}}function i(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},le))}}function r(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function a(e,t){Object.keys(t).forEach(function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&r(t[n])&&(i="px"),e.style[n]=t[n]+i})}
function o(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function s(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function l(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function c(e){if(!e||-1!==["HTML","BODY","#document"].indexOf(e.nodeName))return window.document.body;var t=s(e),n=t.overflow,i=t.overflowX;return/(auto|scroll)/.test(n+t.overflowY+i)?e:c(l(e))}function u(e){var t=e.nodeName
;return"BODY"!==t&&("HTML"===t||e.firstElementChild.offsetParent===e)}function d(e){return null!==e.parentNode?d(e.parentNode):e}function p(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?t:window.document.documentElement}function h(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?e:t,r=n?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(r,0)
;var o=a.commonAncestorContainer;if(e!==o&&t!==o||i.contains(r))return u(o)?o:p(o);var s=d(e);return s.host?h(s.host,t):h(e,d(t).host)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",i=e.nodeName;if("BODY"===i||"HTML"===i){var r=window.document.documentElement;return(window.document.scrollingElement||r)[n]}return e[n]}function v(e,t){
var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=f(t,"top"),r=f(t,"left"),a=n?-1:1;return e.top+=i*a,e.bottom+=i*a,e.left+=r*a,e.right+=r*a,e}function g(e,t){var n="x"===t?"Left":"Top",i="Left"===n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+i+"Width"].split("px")[0]}function m(e,t,n,i){return Math.max(t["offset"+e],n["client"+e],n["offset"+e],he()?n["offset"+e]+i["margin"+("Height"===e?"Top":"Left")]+i["margin"+("Height"===e?"Bottom":"Right")]:0)}
function y(){var e=window.document.body,t=window.document.documentElement,n=he()&&window.getComputedStyle(t);return{height:m("Height",e,t,n),width:m("Width",e,t,n)}}function b(e){return me({},e,{right:e.left+e.width,bottom:e.top+e.height})}function I(e){var t={};if(he())try{t=e.getBoundingClientRect();var n=f(e,"top"),i=f(e,"left");t.top+=n,t.left+=i,t.bottom+=n,t.right+=i}catch(e){}else t=e.getBoundingClientRect();var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top
},a="HTML"===e.nodeName?y():{},o=a.width||e.clientWidth||r.right-r.left,l=a.height||e.clientHeight||r.bottom-r.top,c=e.offsetWidth-o,u=e.offsetHeight-l;if(c||u){var d=s(e);c-=g(d,"x"),u-=g(d,"y"),r.width-=c,r.height-=u}return b(r)}function S(e,t){var n=he(),i="HTML"===t.nodeName,r=I(e),a=I(t),o=c(e),l=b({top:r.top-a.top,left:r.left-a.left,width:r.width,height:r.height});if(i||"BODY"===t.nodeName){
var u=s(t),d=n&&i?0:+u.borderTopWidth.split("px")[0],p=n&&i?0:+u.borderLeftWidth.split("px")[0],h=n&&i?0:+u.marginTop.split("px")[0],f=n&&i?0:+u.marginLeft.split("px")[0];l.top-=d-h,l.bottom-=d-h,l.left-=p-f,l.right-=p-f,l.marginTop=h,l.marginLeft=f}return(n?t.contains(o):t===o&&"BODY"!==o.nodeName)&&(l=v(l,t)),l}function M(e){var t=window.document.documentElement,n=S(e,t),i=Math.max(t.clientWidth,window.innerWidth||0),r=Math.max(t.clientHeight,window.innerHeight||0),a=f(t),o=f(t,"left")
;return b({top:a-n.top+n.marginTop,left:o-n.left+n.marginLeft,width:i,height:r})}function D(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===s(e,"position")||D(l(e)))}function C(e,t,n,i){var r={top:0,left:0},a=h(e,t);if("viewport"===i)r=M(a);else{var o=void 0;"scrollParent"===i?(o=c(l(e)),"BODY"===o.nodeName&&(o=window.document.documentElement)):o="window"===i?window.document.documentElement:i;var s=S(o,a);if("HTML"!==o.nodeName||D(a))r=s;else{var u=y(),d=u.height,p=u.width
;r.top+=s.top-s.marginTop,r.bottom=d+s.top,r.left+=s.left-s.marginLeft,r.right=p+s.left}}return r.left+=n,r.top+=n,r.right-=n,r.bottom-=n,r}function O(e){return e.width*e.height}function j(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var o=C(n,i,a,r),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}
},l=Object.keys(s).map(function(e){return me({key:e},s[e],{area:O(s[e])})}).sort(function(e,t){return t.area-e.area}),c=l.filter(function(e){var t=e.width,i=e.height;return t>=n.clientWidth&&i>=n.clientHeight}),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function P(e,t,n){return S(n,h(t,n))}function w(e){var t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{
width:e.offsetWidth+i,height:e.offsetHeight+n}}function T(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function E(e,t,n){n=n.split("-")[0];var i=w(e),r={width:i.width,height:i.height},a=-1!==["right","left"].indexOf(n),o=a?"top":"left",s=a?"left":"top",l=a?"height":"width",c=a?"width":"height";return r[o]=t[o]+t[l]/2-i[l]/2,r[s]=n===s?t[s]-i[c]:t[T(s)],r}function x(e,t){
return Array.prototype.find?e.find(t):e.filter(t)[0]}function N(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var i=x(e,function(e){return e[t]===n});return e.indexOf(i)}function A(e,t,n){return(void 0===n?e:e.slice(0,N(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t=n(t,e))}),t}function L(){if(!this.state.isDestroyed){var e={instance:this,
styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=P(this.state,this.popper,this.reference),e.placement=j(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=E(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=A(this.modifiers,e),
this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function k(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function _(e){for(var t=[!1,"ms","webkit","moz","o"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length-1;i++){var r=t[i],a=r?""+r+n:e;if(void 0!==window.document.body.style[a])return a}return null}function R(){return this.state.isDestroyed=!0,
k(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[_("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function z(e,t,n,i){var r="BODY"===e.nodeName,a=r?window:e;a.addEventListener(t,n,{passive:!0}),r||z(c(a.parentNode),t,n,i),i.push(a)}function U(e,t,n,i){n.updateBound=i,
window.addEventListener("resize",n.updateBound,{passive:!0});var r=c(e);return z(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function B(){this.state.eventsEnabled||(this.state=U(this.reference,this.options,this.state,this.scheduleUpdate))}function V(e,t){return window.removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,
t.eventsEnabled=!1,t}function F(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=V(this.reference,this.state))}function Q(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function H(e,t){var n={position:e.offsets.popper.position},i={"x-placement":e.placement},r=Math.round(e.offsets.popper.left),o=Math.round(e.offsets.popper.top),s=_("transform")
;return t.gpuAcceleration&&s?(n[s]="translate3d("+r+"px, "+o+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=r,n.top=o,n.willChange="top, left"),a(e.instance.popper,me({},n,e.styles)),Q(e.instance.popper,me({},i,e.attributes)),e.offsets.arrow&&a(e.arrowElement,e.offsets.arrow),e}function Y(e,t,n,i,r){var a=P(r,t,e),o=j(n.placement,a,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",o),n}function W(e,t,n){var i=x(e,function(e){
return e.name===t}),r=!!i&&e.some(function(e){return e.name===n&&e.enabled&&e.order<i.order});if(!r){var a="`"+t+"`",o="`"+n+"`";console.warn(o+" modifier is required by "+a+" modifier in order to work, be sure to include it before "+a+"!")}return r}function G(e,t){if(!W(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(!(n=e.instance.popper.querySelector(n)))return e
}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],r=b(e.offsets.popper),a=e.offsets.reference,o=-1!==["left","right"].indexOf(i),s=o?"height":"width",l=o?"top":"left",c=o?"left":"top",u=o?"bottom":"right",d=w(n)[s];a[u]-d<r[l]&&(e.offsets.popper[l]-=r[l]-(a[u]-d)),a[l]+d>r[u]&&(e.offsets.popper[l]+=a[l]+d-r[u]);var p=a[l]+a[s]/2-d/2,h=p-b(e.offsets.popper)[l]
;return h=Math.max(Math.min(r[s]-d,h),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[l]=Math.floor(h),e.offsets.arrow[c]="",e}function K(e){return"end"===e?"start":"start"===e?"end":e}function q(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=be.indexOf(e),i=be.slice(n+1).concat(be.slice(0,n));return t?i.reverse():i}function Z(e,t){if(k(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e
;var n=C(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split("-")[0],r=T(i),a=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case Ie.FLIP:o=[i,r];break;case Ie.CLOCKWISE:o=q(i);break;case Ie.COUNTERCLOCKWISE:o=q(i,!0);break;default:o=t.behavior}return o.forEach(function(s,l){if(i!==s||o.length===l+1)return e;i=e.placement.split("-")[0],r=T(i)
;var c=b(e.offsets.popper),u=e.offsets.reference,d=Math.floor,p="left"===i&&d(c.right)>d(u.left)||"right"===i&&d(c.left)<d(u.right)||"top"===i&&d(c.bottom)>d(u.top)||"bottom"===i&&d(c.top)<d(u.bottom),h=d(c.left)<d(n.left),f=d(c.right)>d(n.right),v=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),m="left"===i&&h||"right"===i&&f||"top"===i&&v||"bottom"===i&&g,y=-1!==["top","bottom"].indexOf(i),I=!!t.flipVariations&&(y&&"start"===a&&h||y&&"end"===a&&f||!y&&"start"===a&&v||!y&&"end"===a&&g)
;(p||m||I)&&(e.flipped=!0,(p||m)&&(i=o[l+1]),I&&(a=K(a)),e.placement=i+(a?"-"+a:""),e.offsets.popper=me({},e.offsets.popper,E(e.instance.popper,e.offsets.reference,e.placement)),e=A(e.instance.modifiers,e,"flip"))}),e}function X(e){var t=b(e.offsets.popper),n=e.offsets.reference,i=e.placement.split("-")[0],r=Math.floor,a=-1!==["top","bottom"].indexOf(i),o=a?"right":"bottom",s=a?"left":"top",l=a?"width":"height";return t[o]<r(n[s])&&(e.offsets.popper[s]=r(n[s])-t[l]),
t[s]>r(n[o])&&(e.offsets.popper[s]=r(n[o])),e}function J(e,t,n,i){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+r[1],o=r[2];if(!a)return e;if(0===o.indexOf("%")){var s=void 0;switch(o){case"%p":s=n;break;case"%":case"%r":default:s=i}return b(s)[t]/100*a}if("vh"===o||"vw"===o){return("vh"===o?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*a}return a}function $(e,t,n,i){
var a=[0,0],o=-1!==["right","left"].indexOf(i),s=e.split(/(\+|\-)/).map(function(e){return e.trim()}),l=s.indexOf(x(s,function(e){return-1!==e.search(/,|\s/)}));s[l]&&-1===s[l].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,u=-1!==l?[s.slice(0,l).concat([s[l].split(c)[0]]),[s[l].split(c)[1]].concat(s.slice(l+1))]:[s];return u=u.map(function(e,i){var r=(1===i?!o:o)?"height":"width",a=!1;return e.reduce(function(e,t){
return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return J(e,r,t,n)})}),u.forEach(function(e,t){e.forEach(function(n,i){r(n)&&(a[t]+=n*("-"===e[i-1]?-1:1))})}),a}function ee(e,t){var n=t.offset,i=e.placement,a=e.offsets,o=a.popper,s=a.reference,l=i.split("-")[0],c=void 0;return c=r(+n)?[+n,0]:$(n,o,s,l),"left"===l?(o.top+=c[0],o.left-=c[1]):"right"===l?(o.top+=c[0],o.left+=c[1]):"top"===l?(o.left+=c[0],
o.top-=c[1]):"bottom"===l&&(o.left+=c[0],o.top+=c[1]),e.popper=o,e}function te(e,t){var n=t.boundariesElement||p(e.instance.popper),i=C(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=i;var r=t.priority,a=b(e.offsets.popper),o={primary:function(e){var n=a[e];return a[e]<i[e]&&!t.escapeWithReference&&(n=Math.max(a[e],i[e])),ge({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=a[n]
;return a[e]>i[e]&&!t.escapeWithReference&&(r=Math.min(a[n],i[e]-("right"===e?a.width:a.height))),ge({},n,r)}};return r.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";a=me({},a,o[t](e))}),e.offsets.popper=a,e}function ne(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var r=e.offsets.reference,a=b(e.offsets.popper),o=-1!==["bottom","top"].indexOf(n),s=o?"left":"top",l=o?"width":"height",c={start:ge({},s,r[s]),end:ge({},s,r[s]+r[l]-a[l])}
;e.offsets.popper=me({},a,c[i])}return e}function ie(e){if(!W(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=x(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function re(e){
var t=e.placement,n=t.split("-")[0],i=b(e.offsets.popper),r=b(e.offsets.reference),a=-1!==["left","right"].indexOf(n),o=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=r[t]-(o?i[a?"width":"height"]:0),e.placement=T(t),e.offsets.popper=b(i),e}for(var ae=["native code","[object MutationObserverConstructor]"],oe="undefined"!=typeof window,se=["Edge","Trident","Firefox"],le=0,ce=0;ce<se.length;ce+=1)if(oe&&navigator.userAgent.indexOf(se[ce])>=0){le=1;break}var ue=oe&&function(e){
return ae.some(function(t){return(e||"").toString().indexOf(t)>-1})}(window.MutationObserver),de=ue?n:i,pe=void 0,he=function(){return void 0===pe&&(pe=-1!==navigator.appVersion.indexOf("MSIE 10")),pe},fe=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ve=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}}(),ge=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},me=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
},ye=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],be=ye.slice(3),Ie={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},Se={shift:{order:100,enabled:!0,fn:ne},offset:{order:200,enabled:!0,fn:ee,offset:0},preventOverflow:{order:300,enabled:!0,fn:te,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,
enabled:!0,fn:X},arrow:{order:500,enabled:!0,fn:G,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Z,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:re},hide:{order:800,enabled:!0,fn:ie},applyStyle:{order:900,enabled:!0,fn:H,onLoad:Y,gpuAcceleration:!0}},Me={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Se},De=function(){function e(t,n){
var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};fe(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=de(this.update.bind(this)),this.options=me({},e.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t.jquery?t[0]:t,this.popper=n.jquery?n[0]:n,a(this.popper,{position:"absolute"}),this.options.modifiers={},Object.keys(me({},e.Defaults.modifiers,r.modifiers)).forEach(function(t){
i.options.modifiers[t]=me({},e.Defaults.modifiers[t]||{},r.modifiers?r.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return me({name:e},i.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&o(e.onLoad)&&e.onLoad(i.reference,i.popper,i.options,e,i.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return ve(e,[{key:"update",
value:function(){return L.call(this)}},{key:"destroy",value:function(){return R.call(this)}},{key:"enableEventListeners",value:function(){return B.call(this)}},{key:"disableEventListeners",value:function(){return F.call(this)}}]),e}();De.Utils=("undefined"!=typeof window?window:e).PopperUtils,De.placements=ye,De.Defaults=Me,t.a=De}).call(t,n(191))},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.size,r=e.isDisabled;return a()("div",{role:"menu",
className:(n||"")+" "+(u.a[i]||"")+" "+(r&&u.a.isDisabled||""||"")},void 0,t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(61)),c=n(1884),u=n.n(c);i.defaultProps={className:u.a.menu,size:l.MEDIUM,isDisabled:!1},t.a=i},function(e,t){e.exports={menu:"MenuContainer-menu-2OAQT",isDisabled:"MenuContainer-isDisabled-3FK4r",small:"MenuContainer-small-3kO2H",medium:"MenuContainer-medium-3u4Aw",large:"MenuContainer-large-1Mm6B"}},function(e,t){e.exports={menuPortal:"Menu-menuPortal-AbMPT",
menuScroller:"Menu-menuScroller-1TF6o Scroller-vertical-VScFL",enter:"Menu-enter-3RnFj",enterActive:"Menu-enterActive-37dAF",leave:"Menu-leave-17vQv",leaveActive:"Menu-leaveActive-2T7IF"}},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(Object(u.a)(),Object(d.a)(),function(e,t){return o()({type:e.type,subtype:e.subtype,saved:e.saved,title:e.title,viewedLeafCount:e.viewedLeafCount,unviewedLeafCount:e.unviewedLeafCount,isRefreshing:!!e.metadataState,
isAnalyzing:!!e.mediaState,downloadUrl:e.downloadUrl,mediaItems:e.Media},t)})}function r(e,t){var n={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,metricsPage:t.metricsPage};return{onPlayPress:function(){e(c.m(o()({},n,{options:{containerKey:t.containerKey,listType:t.listType}}))),t.onPress()},onPlayVersionPress:function(i){e(c.m(o()({},n,{startMediaIndex:i,options:{containerKey:t.containerKey,listType:t.listType}}))),t.onPress()
},onPlayAllPress:function(){e(c.l(n)),t.onPress()},onShufflePress:function(){e(c.p(n)),t.onPress()},onPlayNextPress:function(){e(c.h(o()({},n,{options:{playAll:!0,next:!0}}))),t.onPress()},onAddToQueuePress:function(){e(c.h(o()({},n,{options:{playAll:!0,next:!1}}))),t.onPress()},onPlayPlexMixPress:function(){e(c.o(n)),t.onPress()},onQueuePlexMixPress:function(){e(c.i(n)),t.onPress()},onPlayPrimaryExtraPress:function(){e(c.n(n)),t.onPress()},onAddToPlaylistPress:function(){
e(l.addMetadataItemToPlaylist(n)),t.onPress()},onAddToSavedPress:function(){e(l.toggleMetadataItemSave(n)),t.onPress()},onMarkPlayedConfirm:function(){e(l.markMetadataItemPlayed(o()({},n,{skipConfirm:!0}))),t.onPress()},onMarkUnplayedConfirm:function(){e(l.markMetadataItemUnplayed(o()({},n,{skipConfirm:!0}))),t.onPress()},onEditPress:function(){e(l.editMetadataItem(n)),t.onPress()},onRefreshPress:function(){e(l.refreshMetadataItem(n)),t.onPress()},onAnalyzePress:function(){
e(l.analyzeMetadataItem(n)),t.onPress()},onFixMatchPress:function(){e(l.fixMetadataItemMatch(n)),t.onPress()},onUnmatchPress:function(){e(l.unmatchMetadataItem(n)),t.onPress()},onSplitApartPress:function(){e(l.splitMetadataItemApart(n)),t.onPress()},onSyncPress:function(){e(l.syncMetadataItem(n)),t.onPress()},onOptimizePress:function(){e(l.optimizeMetadataItem(n)),t.onPress()},onDownloadVersionPress:function(){e(l.downloadMetadataItemVersion(n)),t.onPress()},onWatchLaterPress:function(){
e(l.watchMetadataItemLater(n)),t.onPress()},onRecommendPress:function(){e(l.recommendMetadataItem(n)),t.onPress()},onDeletePress:function(){e(l.deleteMetadataItem(o()({},n,{options:{skipRedirect:!t.allowRedirectOnDelete}}))),t.onPress()},onDeleteVersionPress:function(){e(l.deleteMetadataItemVersion(n)),t.onPress()},onGetInfoPress:function(){e(l.getMetadataItemInfo(n)),t.onPress()}}}var a=n(7),o=n.n(a),s=n(6),l=(n.n(s),n(120)),c=n(60),u=n(21),d=n(971),p=n(288),h=n(57),f=n(1996)
;t.a=Object(h.a)(i,r,p.a)(f.a)},function(e,t,n){"use strict";function i(e,t,n){var i=t.get("key"),r=o.join([i,"prefs"],n),l=e.getXHROptions(r,{type:"PUT"});t.set({isSettingsUpdating:!0,settingsUpdateError:null});var c=a.a.ajax(l);return c.then(function(){t.set("isSettingsUpdating",!1)},function(e){t.set({isSettingsUpdating:!1,settingsUpdateError:Object(s.a)(e)})}),c}var r=n(12),a=n.n(r),o=n(19),s=n(140);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="analyzing"
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i="";return i+=" ",n=r.if.call(e,e&&e.isAlbums,{hash:{},inverse:j.program(4,c,t),fn:j.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function l(e,t){var r="";return r+=" "+O(i(n(3)).call(e,"Select an Album",{hash:{},data:t}))+" "}function c(e,t){var r="";return r+=" "+O(i(n(3)).call(e,"Select a Playlist",{hash:{},data:t}))+" "}
function u(e,t){var n,i="";return i+=" ",n=r.if.call(e,e&&e.isAlbums,{hash:{},inverse:j.program(9,p,t),fn:j.program(7,d,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function d(e,t){var r="";return r+=" "+O(i(n(3)).call(e,"Create Album",{hash:{},data:t}))+" "}function p(e,t){var r="";return r+=" "+O(i(n(3)).call(e,"Create Playlist",{hash:{},data:t}))+" "}function h(e,t){var n,i="";return i+=" ",n=r.if.call(e,e&&e.hasPlaylists,{hash:{},inverse:j.program(14,v,t),fn:j.program(12,f,t),data:t}),
(n||0===n)&&(i+=n),i+=" "}function f(e,t){return' <div class="playlists-container"></div> '}function v(e,t){var n,i="";return i+=" ",n=r.if.call(e,e&&e.loading,{hash:{},inverse:j.program(17,m,t),fn:j.program(15,g,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function g(e,t){return' <div class="loading-container"> <div class="loading loading-inline"></div> </div> '}function m(e,t){var n,i="";return i+=' <div class="empty-message"> ',n=r.if.call(e,e&&e.isAlbums,{hash:{},inverse:j.program(20,b,t),
fn:j.program(18,y,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> "}function y(e,t){var r="";return r+=" "+O(i(n(3)).call(e,"There are no albums on this server.",{hash:{},data:t}))+" "}function b(e,t){var r="";return r+=" "+O(i(n(3)).call(e,"There are no playlists on this server.",{hash:{},data:t}))+" "}function I(e,t){return"only-control"}function S(e,t){return O(i(n(3)).call(e,"New album...",{hash:{},data:t}))}function M(e,t){return O(i(n(3)).call(e,"New playlist...",{hash:{},data:t}))}
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var D,C="",O=this.escapeExpression,j=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 plex-icon-add-to-playlist"></i> ',D=r.if.call(t,t&&t.showExisting,{hash:{},inverse:j.program(6,u,o),fn:j.program(1,s,o),data:o}),(D||0===D)&&(C+=D),
C+=' </h4> </div> <div class="modal-body modal-body-scroll minimal-scroll"> ',D=r.if.call(t,t&&t.showExisting,{hash:{},inverse:j.noop,fn:j.program(11,h,o),data:o}),(D||0===D)&&(C+=D),C+=' <div class="message-container ',D=r.unless.call(t,t&&t.showExisting,{hash:{},inverse:j.noop,fn:j.program(22,I,o),data:o}),(D||0===D)&&(C+=D),C+='"> <input class="message form-control" placeholder="',D=r.if.call(t,t&&t.isAlbums,{hash:{},inverse:j.program(26,M,o),fn:j.program(24,S,o),data:o}),(D||0===D)&&(C+=D),
C+='" > </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">'+O(i(n(3)).call(t,"Add",{hash:{},data:o}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(63),r=n(1891),a=i.a.extend({tagName:"ul",className:"list select-list select-playlist-list minimal-scroll",itemView:r.a});t.a=a},function(e,t,n){"use strict"
;var i=n(1892),r=n.n(i),a=n(20),o=n(979),s=a.a.ItemView.extend({tagName:"li",className:"striped-list-item select-list-item",template:r.a,ui:{poster:".playlist-poster"},initialize:function(){this.image=new o.a({model:this.model,width:40})},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()}});t.a=s},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{}
;var a,o,s="",l=this.escapeExpression;return s+='<a class="playlist" data-id="',(o=n.ratingKey)?a=o.call(t,{hash:{},data:r}):(o=t&&t.ratingKey,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),s+=l(a)+'" href="#"> <span class="media-poster playlist-poster"></span> ',(o=n.title)?a=o.call(t,{hash:{},data:r}):(o=t&&t.title,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),s+=l(a)+" </a>"})},function(e,t,n){"use strict"
;var i=n(5),r=n.n(i),a=n(278),o=n(19),s=n(28),l=n(16),c=n(18),u=n(1894),d=n(276),p=n(1895),h={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 o.join([this.sectionUrl(),"common"],this.getUrlParams())},
saveUrl:function(){return o.join([this.sectionUrl(),"all"],this.getUrlParams())},sectionUrl:function(){return r.a.result(this.section,"url")},tagRelations:["Collection","Director","Producer","Writer","Genre","Mood","Country","Label","Similar","Role","Tag","Autotag"],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},tags:{relationClass:u.a,rootPropertyName:"Tag",save:!0},autotags:{relationClass:u.a,rootPropertyName:"Autotag",save:!0},lockedFields:{
relationClass:p.a,rootPropertyName:"Field",save:!0}},derivedAttrs:{type:function(){var e=this.getSingleMetadataItem();if(e)return e.get("type")},aggregateTitle:function(){if(this.get("metadataItems").length)return a.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",r.a.clone(t.metadataItems))},
getSingleMetadataItem:function(){return r.a.first(this.get("metadataItems"))},getUrlParams:function(){var e=Object(s.r)(this.get("type")),t=r.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(r.a.each(t,function(t,a){var o=n[a];r.a.isEqual(t,o)||r.a.extend(i,e.getSaveParam(a,t,o))}),
i.isReparenting){delete i.isReparenting;var a=h[this.get("type")];r.a.each(a,function(t,n){var a=t+".value",o=e.getQueryAttrSibling(t),s=o+".value",l=r.a.has(i,a),c=r.a.has(i,s);if(l&&c&&a!==s&&delete i[s],!l&&!c){var u=e.get(n);u&&(i[a]=u)}})}return i},getSaveParam:function(e,t,n){var i;if("Field"===e)return this.getFieldSaveParams(e,t,n);if(-1!==this.tagRelations.indexOf(e))return this.getTagSaveParams(e,t,n);var a=h[this.get("type")];{if(!a||!r.a.has(a,e))return i={},i[e+".value"]=t,i
;var o=a[e];if(t){var s;return s={isReparenting:!0},s[o+".value"]=t,s}}},getFieldSaveParams:function(e,t,n){return t.reduce(function(e,t){return e[t.name+".locked"]=t.locked,e},{})},getTagSaveParams:function(e,t,n){var i=r.a.map(t,function(e){return e.tag}),a=r.a.map(n,function(e){return e.tag}),o=r.a.without.apply(r.a,[a].concat(i)),s=e.toLowerCase(),l={};return i.forEach(function(e,t){l[s+"["+t+"].tag.tag"]=e}),o.length&&(l[s+"[].tag.tag-"]=r.a.map(o,encodeURIComponent).join(",")),l},
getQueryAttr:function(e){var t=this.get("type"),n=h[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(23),r=n(982),a=i.a.extend({name:"TagCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(1896),a=i.a.extend({name:"LockedFieldCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){
"use strict";var i=n(16),r=n(18),a=r.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=a},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r,a="";return a+=' <div class="row"> <div class="col-md-12 selectize"> '+h(i(n(27)).call(e,"autocompleteTextInput",{hash:{label:"Artist",
name:"parentTitle",placeholder:(r=e&&e.placeholders,null==r||!1===r?r:r.parentTitle),ratingKey:(r=e&&e.item,null==r||!1===r?r:r.parentRatingKey),title:(r=e&&e.item,null==r||!1===r?r:r.parentTitle)},data:t}))+" </div> </div> "}function l(e,t){var r,a="";return a+=' <div class="col-md-4"> '+h(i(n(27)).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(r=e&&e.item,null==r||!1===r?r:r.year),placeholder:(r=e&&e.placeholders,null==r||!1===r?r:r.year),locked:(r=e&&e.locked,
null==r||!1===r?r:r.year),ratingKey:(r=e&&e.item,null==r||!1===r?r:r.ratingKey)},data:t}))+" </div> "}function c(e,t){return"9"}function u(e,t){return"5"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var d,p="",h=this.escapeExpression,f=this;return p+='<form class="edit-metadata-form"> ',d=r.if.call(t,t&&t.canReparent,{hash:{},inverse:f.noop,fn:f.program(1,s,o),data:o}),(d||0===d)&&(p+=d),
p+=' <div class="row"> <div class="col-md-12 selectize"> '+h(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Album",name:"title",value:(d=t&&t.item,null==d||!1===d?d:d.title),placeholder:(d=t&&t.placeholders,null==d||!1===d?d:d.title),locked:(d=t&&t.locked,null==d||!1===d?d:d.title),ratingKey:(d=t&&t.item,null==d||!1===d?d:d.ratingKey),scopeToAttr:"parentRatingKey",scopeToParam:"artist.id"},data:o
}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+h(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Sort Album",name:"titleSort",value:(d=t&&t.item,null==d||!1===d?d:d.titleSort),placeholder:(d=t&&t.placeholders,null==d||!1===d?d:d.titleSort),locked:(d=t&&t.locked,null==d||!1===d?d:d.titleSort),ratingKey:(d=t&&t.item,null==d||!1===d?d:d.ratingKey)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-3"> <label>'+h(i(n(3)).call(t,"Rating",{hash:{},data:o
}))+'</label> <div class="rating-region"></div> </div> ',d=r.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:f.noop,fn:f.program(3,l,o),data:o}),(d||0===d)&&(p+=d),p+=' <div class="col-md-',d=r.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:f.program(7,u,o),fn:f.program(5,c,o),data:o}),(d||0===d)&&(p+=d),p+=' "> '+h(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(d=t&&t.item,null==d||!1===d?d:d.originallyAvailableAt),
placeholder:(d=t&&t.placeholders,null==d||!1===d?d:d.originallyAvailableAt),locked:(d=t&&t.locked,null==d||!1===d?d:d.originallyAvailableAt)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+h(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Record Label",name:"studio",value:(d=t&&t.item,null==d||!1===d?d:d.studio),placeholder:(d=t&&t.placeholders,null==d||!1===d?d:d.studio),locked:(d=t&&t.locked,null==d||!1===d?d:d.studio),ratingKey:(d=t&&t.item,
null==d||!1===d?d:d.ratingKey)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+h(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Review",name:"summary",value:(d=t&&t.item,null==d||!1===d?d:d.summary),placeholder:(d=t&&t.placeholders,null==d||!1===d?d:d.summary),type:"textarea",rows:"5",locked:(d=t&&t.locked,null==d||!1===d?d:d.summary),ratingKey:(d=t&&t.item,null==d||!1===d?d:d.ratingKey)},data:o}))+" </div> </div> </form> "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Artist",name:"title",value:(s=t&&t.item,null==s||!1===s?s:s.title),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.title),
locked:(s=t&&t.locked,null==s||!1===s?s:s.title),ratingKey:(s=t&&t.item,null==s||!1===s?s:s.ratingKey)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Sort Artist",name:"titleSort",value:(s=t&&t.item,null==s||!1===s?s:s.titleSort),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.titleSort),locked:(s=t&&t.locked,null==s||!1===s?s:s.titleSort),ratingKey:(s=t&&t.item,null==s||!1===s?s:s.ratingKey)},data:o
}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Biography",name:"summary",value:(s=t&&t.item,null==s||!1===s?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||!1===s?s:s.summary)},data:o}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||!1===s?s:s.title),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.title),locked:(s=t&&t.locked,null==s||!1===s?s:s.title)},data:o
}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(s=t&&t.item,null==s||!1===s?s:s.titleSort),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.titleSort),locked:(s=t&&t.locked,null==s||!1===s?s:s.titleSort)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-6"> '+c(i(n(27)).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(s=t&&t.item,
null==s||!1===s?s:s.rating),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.rating),locked:(s=t&&t.locked,null==s||!1===s?s:s.rating)},data:o}))+' </div> <div class="col-md-6"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(s=t&&t.item,null==s||!1===s?s:s.originallyAvailableAt),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.originallyAvailableAt),locked:(s=t&&t.locked,null==s||!1===s?s:s.originallyAvailableAt)},data:o
}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(s=t&&t.item,null==s||!1===s?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||!1===s?s:s.summary)},data:o}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){
function s(e,t){var r,a="";return a+=" "+f(i(n(27)).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(r=e&&e.item,null==r||!1===r?r:r.originallyAvailableAt),placeholder:(r=e&&e.placeholders,null==r||!1===r?r:r.originallyAvailableAt),locked:(r=e&&e.locked,null==r||!1===r?r:r.originallyAvailableAt)},data:t}))+" "}function l(e,t){var r,a="";return a+=" "+f(i(n(27)).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(r=e&&e.item,
null==r||!1===r?r:r.year),placeholder:(r=e&&e.placeholders,null==r||!1===r?r:r.year),locked:(r=e&&e.locked,null==r||!1===r?r:r.year)},data:t}))+" "}function c(e,t){return"12"}function u(e,t){return"6"}function d(e,t){var r,a="";return a+=' <div class="col-md-6"> '+f(i(n(27)).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(r=e&&e.item,null==r||!1===r?r:r.originallyAvailableAt),placeholder:(r=e&&e.placeholders,
null==r||!1===r?r:r.originallyAvailableAt),locked:(r=e&&e.locked,null==r||!1===r?r:r.originallyAvailableAt)},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var p,h="",f=this.escapeExpression,v=this;return h+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(p=t&&t.item,null==p||!1===p?p:p.title),placeholder:(p=t&&t.placeholders,
null==p||!1===p?p:p.title),locked:(p=t&&t.locked,null==p||!1===p?p:p.title),ratingKey:(p=t&&t.item,null==p||!1===p?p:p.ratingKey)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(p=t&&t.item,null==p||!1===p?p:p.titleSort),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.titleSort),locked:(p=t&&t.locked,null==p||!1===p?p:p.titleSort),ratingKey:(p=t&&t.item,
null==p||!1===p?p:p.ratingKey)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Original Title",name:"originalTitle",value:(p=t&&t.item,null==p||!1===p?p:p.originalTitle),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.originalTitle),locked:(p=t&&t.locked,null==p||!1===p?p:p.originalTitle),ratingKey:(p=t&&t.item,null==p||!1===p?p:p.ratingKey)},data:o
}))+' </div> </div> <div class="row"> <div class="col-md-4"> ',p=r.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:v.program(3,l,o),fn:v.program(1,s,o),data:o}),(p||0===p)&&(h+=p),h+=' </div> <div class="col-md-4"> '+f(i(n(27)).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(p=t&&t.item,null==p||!1===p?p:p.rating),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.rating),locked:(p=t&&t.locked,null==p||!1===p?p:p.rating)},data:o
}))+' </div> <div class="col-md-4 selectize"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Content Rating",name:"contentRating",value:(p=t&&t.item,null==p||!1===p?p:p.contentRating),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.contentRating),locked:(p=t&&t.locked,null==p||!1===p?p:p.contentRating),ratingKey:(p=t&&t.item,null==p||!1===p?p:p.ratingKey)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-',p=r.if.call(t,t&&t.supportsLinkedYears,{hash:{},
inverse:v.program(7,u,o),fn:v.program(5,c,o),data:o}),(p||0===p)&&(h+=p),h+=' selectize"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Studio",name:"studio",value:(p=t&&t.item,null==p||!1===p?p:p.studio),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.studio),locked:(p=t&&t.locked,null==p||!1===p?p:p.studio),ratingKey:(p=t&&t.item,null==p||!1===p?p:p.ratingKey)},data:o}))+" </div> ",p=r.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:v.noop,fn:v.program(9,d,o),data:o}),
(p||0===p)&&(h+=p),h+=' </div> <div class="row"> <div class="col-md-12"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Tagline",name:"tagline",value:(p=t&&t.item,null==p||!1===p?p:p.tagline),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.tagline),locked:(p=t&&t.locked,null==p||!1===p?p:p.tagline)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(p=t&&t.item,
null==p||!1===p?p:p.summary),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.summary),type:"textarea",rows:"5",locked:(p=t&&t.locked,null==p||!1===p?p:p.summary)},data:o}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression
;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-6"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||!1===s?s:s.title),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.title),locked:(s=t&&t.locked,null==s||!1===s?s:s.title)},data:o}))+' </div> <div class="col-md-6"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(s=t&&t.item,null==s||!1===s?s:s.titleSort),
placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.titleSort),locked:(s=t&&t.locked,null==s||!1===s?s:s.titleSort)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(s=t&&t.item,null==s||!1===s?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||!1===s?s:s.summary)},data:o}))+" </div> </div> </form> "})
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||!1===s?s:s.title),placeholder:(s=t&&t.placeholders,
null==s||!1===s?s:s.title),locked:(s=t&&t.locked,null==s||!1===s?s:s.title)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(s=t&&t.item,null==s||!1===s?s:s.titleSort),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.titleSort),locked:(s=t&&t.locked,null==s||!1===s?s:s.titleSort)},data:o
}))+' </div> </div> <div class="row"> <div class="col-md-9"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Captured Time",name:"originallyAvailableAt",value:(s=t&&t.item,null==s||!1===s?s:s.originallyAvailableAt),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.capturedTime),locked:(s=t&&t.locked,null==s||!1===s?s:s.originallyAvailableAt)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",
value:(s=t&&t.item,null==s||!1===s?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||!1===s?s:s.summary)},data:o}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l=""
;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+(0,this.escapeExpression)(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(s=t&&t.item,null==s||!1===s?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||!1===s?s:s.summary)},data:o}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r,a="";return a+=" "+f(i(n(27)).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(r=e&&e.item,null==r||!1===r?r:r.originallyAvailableAt),placeholder:(r=e&&e.placeholders,null==r||!1===r?r:r.originallyAvailableAt),locked:(r=e&&e.locked,null==r||!1===r?r:r.originallyAvailableAt)},data:t}))+" "}function l(e,t){var r,a="";return a+=" "+f(i(n(27)).call(e,"lockableTextInput",{
hash:{label:"Year",name:"year",value:(r=e&&e.item,null==r||!1===r?r:r.year),placeholder:(r=e&&e.placeholders,null==r||!1===r?r:r.year),locked:(r=e&&e.locked,null==r||!1===r?r:r.year)},data:t}))+" "}function c(e,t){return"12"}function u(e,t){return"6"}function d(e,t){var r,a="";return a+=' <div class="col-md-6"> '+f(i(n(27)).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(r=e&&e.item,null==r||!1===r?r:r.originallyAvailableAt),
placeholder:(r=e&&e.placeholders,null==r||!1===r?r:r.originallyAvailableAt),locked:(r=e&&e.locked,null==r||!1===r?r:r.originallyAvailableAt)},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var p,h="",f=this.escapeExpression,v=this;return h+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(p=t&&t.item,null==p||!1===p?p:p.title),
placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.title),locked:(p=t&&t.locked,null==p||!1===p?p:p.title),ratingKey:(p=t&&t.item,null==p||!1===p?p:p.ratingKey)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(p=t&&t.item,null==p||!1===p?p:p.titleSort),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.titleSort),locked:(p=t&&t.locked,null==p||!1===p?p:p.titleSort),
ratingKey:(p=t&&t.item,null==p||!1===p?p:p.ratingKey)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-4"> ',p=r.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:v.program(3,l,o),fn:v.program(1,s,o),data:o}),(p||0===p)&&(h+=p),h+=' </div> <div class="col-md-4"> '+f(i(n(27)).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(p=t&&t.item,null==p||!1===p?p:p.rating),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.rating),locked:(p=t&&t.locked,
null==p||!1===p?p:p.rating)},data:o}))+' </div> <div class="col-md-4 selectize"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Content Rating",name:"contentRating",value:(p=t&&t.item,null==p||!1===p?p:p.contentRating),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.contentRating),locked:(p=t&&t.locked,null==p||!1===p?p:p.contentRating),ratingKey:(p=t&&t.item,null==p||!1===p?p:p.ratingKey)},data:o
}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Original Title",name:"originalTitle",value:(p=t&&t.item,null==p||!1===p?p:p.originalTitle),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.originalTitle),locked:(p=t&&t.locked,null==p||!1===p?p:p.originalTitle),ratingKey:(p=t&&t.item,null==p||!1===p?p:p.ratingKey)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-',
p=r.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:v.program(7,u,o),fn:v.program(5,c,o),data:o}),(p||0===p)&&(h+=p),h+=' selectize"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Studio",name:"studio",value:(p=t&&t.item,null==p||!1===p?p:p.studio),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.studio),locked:(p=t&&t.locked,null==p||!1===p?p:p.studio),ratingKey:(p=t&&t.item,null==p||!1===p?p:p.ratingKey)},data:o}))+" </div> ",p=r.unless.call(t,t&&t.supportsLinkedYears,{hash:{},
inverse:v.noop,fn:v.program(9,d,o),data:o}),(p||0===p)&&(h+=p),h+=' </div> <div class="row"> <div class="col-md-12"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Tagline",name:"tagline",value:(p=t&&t.item,null==p||!1===p?p:p.tagline),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.tagline),locked:(p=t&&t.locked,null==p||!1===p?p:p.tagline)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+f(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Summary",
name:"summary",value:(p=t&&t.item,null==p||!1===p?p:p.summary),placeholder:(p=t&&t.placeholders,null==p||!1===p?p:p.summary),type:"textarea",rows:"5",locked:(p=t&&t.locked,null==p||!1===p?p:p.summary)},data:o}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r,a=""
;return a+=' <div class="row"> <div class="col-md-12 selectize"> '+u(i(n(27)).call(e,"autocompleteTextInput",{hash:{label:"Album Artist",name:"grandparentTitle",placeholder:(r=e&&e.placeholders,null==r||!1===r?r:r.grandparentTitle),ratingKey:(r=e&&e.item,null==r||!1===r?r:r.grandparentRatingKey),title:(r=e&&e.item,null==r||!1===r?r:r.grandparentTitle)},data:t}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+u(i(n(27)).call(e,"autocompleteTextInput",{hash:{label:"Album",
name:"parentTitle",placeholder:(r=e&&e.placeholders,null==r||!1===r?r:r.parentTitle),ratingKey:(r=e&&e.item,null==r||!1===r?r:r.parentRatingKey),title:(r=e&&e.item,null==r||!1===r?r:r.parentTitle),scopeToAttr:"grandparentRatingKey",scopeToParam:"artist.id"},data:t}))+" </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var l,c="",u=this.escapeExpression,d=this;return c+='<form class="edit-metadata-form"> ',l=r.if.call(t,t&&t.canReparent,{hash:{},inverse:d.noop,
fn:d.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+=' <div class="row"> <div class="col-md-12"> '+u(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(l=t&&t.item,null==l||!1===l?l:l.title),placeholder:(l=t&&t.placeholders,null==l||!1===l?l:l.title),locked:(l=t&&t.locked,null==l||!1===l?l:l.title)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-4"> <label>'+u(i(n(3)).call(t,"Rating",{hash:{},data:o
}))+'</label> <div class="rating-region"></div> </div> <div class="col-md-4"> '+u(i(n(27)).call(t,"lockableNumericInput",{hash:{label:"Track",name:"index",value:(l=t&&t.item,null==l||!1===l?l:l.index),placeholder:(l=t&&t.placeholders,null==l||!1===l?l:l.index),locked:(l=t&&t.locked,null==l||!1===l?l:l.index),disabled:t&&t.disableIndices},data:o}))+' </div> <div class="col-md-4"> '+u(i(n(27)).call(t,"lockableNumericInput",{hash:{label:"Disc",name:"parentIndex",value:(l=t&&t.item,
null==l||!1===l?l:l.parentIndex),placeholder:(l=t&&t.placeholders,null==l||!1===l?l:l.parentIndex),locked:(l=t&&t.locked,null==l||!1===l?l:l.parentIndex),disabled:t&&t.disableIndices},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+u(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Artist",name:"originalTitle",value:(l=t&&t.item,null==l||!1===l?l:l.originalTitle),placeholder:(l=t&&t.placeholders,null==l||!1===l?l:l.originalTitle),locked:(l=t&&t.locked,
null==l||!1===l?l:l.originalTitle),ratingKey:(l=t&&t.item,null==l||!1===l?l:l.ratingKey)},data:o}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"textInput",{hash:{
label:"Title",name:"title",value:(s=t&&t.item,null==s||!1===s?s:s.title)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"textInput",{hash:{label:"Summary",name:"summary",value:(s=t&&t.item,null==s||!1===s?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.summary),type:"textarea",rows:"5"},data:o}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||!1===s?s:s.title),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.title),locked:(s=t&&t.locked,null==s||!1===s?s:s.title),
ratingKey:(s=t&&t.item,null==s||!1===s?s:s.ratingKey)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-8 selectize"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(s=t&&t.item,null==s||!1===s?s:s.titleSort),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.titleSort),locked:(s=t&&t.locked,null==s||!1===s?s:s.titleSort),ratingKey:(s=t&&t.item,null==s||!1===s?s:s.ratingKey)},data:o
}))+' </div> <div class="col-md-4 selectize"> '+c(i(n(27)).call(t,"lockableTextInput",{hash:{label:"Content Rating",name:"contentRating",value:(s=t&&t.item,null==s||!1===s?s:s.contentRating),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.contentRating),locked:(s=t&&t.locked,null==s||!1===s?s:s.contentRating),ratingKey:(s=t&&t.item,null==s||!1===s?s:s.ratingKey)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"textInput",{hash:{label:"Summary",
name:"summary",value:(s=t&&t.item,null==s||!1===s?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||!1===s?s:s.summary),type:"textarea",rows:"5"},data:o}))+" </div> </div> </form> "})},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(4),l=n(984),c=function(e,t){var n=o()(t),i=n.attr("name"),a=i.replace(/parentTitle$/,"parentRatingKey");a===i&&(a=null)
;var c,u=e.model.getQueryAttr(i),d=e.model.getQueryAttrSibling(i),p=u!==i,h=p?"title":i,f=p?"ratingKey":h,v=e.model.get("type");c=p?u.match(/(^.*)\./)[1]:"title"===h?v:null;var g=n.data("scopeToAttr"),m=n.data("scopeToParam"),y=n.data("ratingKey"),b=!y;y&&(y=y.toString());var I=!p,S={};m&&e.listenTo(e,"reset_selectize:"+m,function(){E.loadedSearches={}});var M,D,C=e.model["original.updateValues."+i];C?(M=C.updateAttr,D=C.altUpdateAttr):(M=e.model.get(i),a&&(D=parseInt(e.model.get(a),10)),
e.model["original.updateValues."+i]={updateAttr:M,altUpdateAttr:D});var O=e.model["original.general."+i];if(!O){O=[];var j={};j[h]=M,j.ratingKey=y,O=[j],e.model["original.general."+i]=O}var P=[e.model.get(a)||e.model.get(i)],w=function(){var e=E.$dropdown_content.children();E.$dropdown.toggleClass("hidden",e.length<=1)},T=function(){r.a.defer(w)};n.data("autocompleteAttr",h),n.data("updateAttr",i),a&&n.data("altUpdateAttr",a);var E=n.selectize({options:O,items:P,plugins:["restore_on_focus"],
delimiter:null,create:!0,maxItems:1,labelField:h,valueField:f,sortField:h,searchField:[h],selectOnTab:!0,hideSelected:!1,highlight:!1,openOnFocus:!0,selectOnBlur:!0,createOnBlur:!0,persist:!0,addPrecedence:!0,allowEmptyOption:!0,allowCreateEmpty:I,manualInputWidth:!0,loadingClass:"",onFocus:function(){E.preloaded||(E.preloaded=!0,E.onSearchChange(E.$control_input.val()))},createFilter:function(e){return S[h]=e,!r()(this.options).findWhere(S)},load:function(t,n){if(!t.length)return void n()
;var i={};if(i[u]=t,g){var r=e.model.get(g);if(!r)return void n();i[m]=r}new l.a([],{server:e.model.server,multiMetadataItem:e.model,query:i}).fetch().done(function(e){n(e.map(function(e){return e.toJSON()})),w()})},render:{option:function(e,t){var n,i=a?e.ratingKey===String(D):e[h]===M;return n=i?'<small class="autocomplete-annotate pull-right">('+(c&&!b?Object(s.default)("this {1}",c):Object(s.default)("original value"))+")</small>":"","<div>"+t(e[h])+n+"</div>"},option_create:function(e,t){
return e.input?'<div class="create">'+t(e.input)+"</div>":'<div class="create hidden"></div>'}},onDropdownClose:function(){E.$dropdown.addClass("hidden")},onDropdownOpen:function(){E.$dropdown.addClass("hidden"),T()},onType:r.a.bind(function(e){if(E.canCreate(e)){var t=o()(E.$dropdown_content[0].childNodes[0]);E.setActiveOption(t)}T(),this.onLockableFieldChange({currentTarget:E.$input,force:!0})},e),onOptionAdd:function(e,t){var n=r.a.pick(t,h,"ratingKey")
;r.a.findWhere(O,n)||O.splice(O.length,0,t)},onChange:function(t){var a=this.options[t];if(a){if(p){var o=a.ratingKey===a[h];n.data("isText",o)}e.flushChanges();var s=e.model.changedAttributes();r.a.has(s,u)||r.a.has(s,d)?e.trigger("focusSubmit"):r.a.defer(function(){E.onBlur()}),e.trigger("reset_selectize:"+i),w()}}})[0].selectize;E.$dropdown.addClass("hidden")};t.a=c},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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=a},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){var i,r=""
;return r+='<span class="star"><i class="star-icon glyphicon ',i=n.if.call(e,e,{hash:{},inverse:u.program(4,s,t),fn:u.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='"></i><span class="empty-icon"></span></span>'}function o(e,t){return"star"}function s(e,t){return"dislikes"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var l,c="",u=this;return l=n.each.call(t,t&&t.stars,{hash:{},inverse:u.noop,fn:u.program(1,a,r),data:r}),(l||0===l)&&(c+=l),c+=" "})},function(e,t,n){
"use strict";var i=n(1912),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=c.a.ItemView.extend({className:"player-slider",template:r.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){o.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){
var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="player-slider-track"> <div class="player-slider-progress"></div> </div> <div class="player-slider-thumb"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var s,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-6"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Directors",name:"director",attribute:"directors",locked:(s=t&&t.locked,null==s||!1===s?s:s.director)},data:o}))+' </div> <div class="col-md-6"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Country",name:"country",attribute:"countries",locked:(s=t&&t.locked,null==s||!1===s?s:s.country)},data:o
}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(s=t&&t.locked,null==s||!1===s?s:s.genre)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Writers",name:"writer",attribute:"writers",locked:(s=t&&t.locked,null==s||!1===s?s:s.writer)},data:o
}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(s=t&&t.locked,null==s||!1===s?s:s.collection)},data:o}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression
;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(s=t&&t.locked,null==s||!1===s?s:s.genre)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(s=t&&t.locked,null==s||!1===s?s:s.collection)},data:o}))+" </div> </div> </form> "})
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Writers",name:"writer",attribute:"writers",locked:(s=t&&t.locked,null==s||!1===s?s:s.writer)},data:o
}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Directors",name:"director",attribute:"directors",locked:(s=t&&t.locked,null==s||!1===s?s:s.director)},data:o}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r,a=""
;return a+=' <div class="row"> <div class="col-md-12"> '+u(i(n(27)).call(e,"lockableTagInput",{hash:{label:"Similar Artists",name:"similar",attribute:"similar",query:"title",locked:(r=e&&e.locked,null==r||!1===r?r:r.similar)},data:t}))+" </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};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(27)).call(t,"lockableTagInput",{hash:{
label:"Genres",name:"genre",attribute:"genres",locked:(l=t&&t.locked,null==l||!1===l?l:l.genre)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Country",name:"country",attribute:"countries",locked:(l=t&&t.locked,null==l||!1===l?l:l.country)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",
locked:(l=t&&t.locked,null==l||!1===l?l:l.collection)},data:o}))+" </div> </div> ",l=r.if.call(t,t&&t.canEditSimilarArtists,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+=" </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression
;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(s=t&&t.locked,null==s||!1===s?s:s.genre)},data:o}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(s=t&&t.locked,null==s||!1===s?s:s.collection)},data:o}))+" </div> </div> </form> "})
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="";return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+(0,this.escapeExpression)(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Moods",name:"mood",attribute:"moods",locked:(s=t&&t.locked,null==s||!1===s?s:s.mood)},data:o}))+" </div> </div> </form> "})
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{label:"Tags",name:"tag",attribute:"tags",locked:(s=t&&t.locked,null==s||!1===s?s:s.tag)},data:o
}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(27)).call(t,"lockableTagInput",{hash:{onlyDelete:!0,label:"Autotags",name:"autotag",attribute:"autotags",locked:(s=t&&t.locked,null==s||!1===s?s:s.autotag)},data:o}))+" </div> </div> </form> "})},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(4),l=n(28),c=n(620),u=n(984),d=function(e,t){
var n=o()(t),i=n.data("name"),a=n.data("query")||n.data("name"),d=n.data("attr"),p=!!n.data("only-delete"),h=e.model.get(d).toJSON(),f=r.a.pluck(h,"tag"),v=e.model["original.tag."+i];v||(v=r.a.clone(h),e.model["original.tag."+i]=v);var g=r.a.difference(f,r.a.pluck(v,"tag"));if(g.length){var m=r.a.map(g,function(e){return{tag:e}});m.unshift(v.length,0),v.splice.apply(v,m)}var y=function(t){e.model["original.allTagsRequested."+i]=!0,new c.a({filter:i,filterType:"string"},{server:e.model.server,
section:e.section,type:Object(l.r)(e.model.get("type")).id}).get("options").populate().then(r.a.bind(function(n){e.model["original.allTagsAvailable."+i]=!0,t(n.map(function(e){return{tag:e.attributes.title}}))},e))};n.data("original-value",n.val()),n.selectize({options:v,items:f,plugins:["remove_button"],create:!0,hideDropdown:p,labelField:"tag",valueField:"tag",sortField:"tag",searchField:["tag"],highlight:!1,createFilter:function(e){return!r()(this.options).findWhere({tag:e})},
onInitialize:function(){p&&(this.$control.off("click mousedown"),this.$control.addClass("no-input"),this.$control_input.prop("disabled",!0))},onChange:function(){e.onLockableFieldChange(n)},onFocus:function(){this.onSearchChange("")},loadingClass:"",load:function(t,n){if(!(a!==i||t.length&&e.canAutocomplete))return void(e.model["original.allTagsRequested."+i]?n():y.call(e,n));if(e.model["original.allTagsAvailable."+i]||0===t.length)return void n();var r={};r[a]=t;var o=a===i?function(e){
return e.toJSON()}:function(e){return{tag:e.get(a)}};new u.a([],{server:e.model.server,multiMetadataItem:e.model,query:r}).fetch().done(function(e){var t=e.map(o);n(t)}).fail(function(){n()})},render:{item:function(e,t){return'<div class="item">'+(e.tag?t(e.tag):'<span class="autocomplete-annotate">('+Object(s.default)("blank")+")</span>")+"</div>"},option:function(e,t){
return'<div class="item">'+(e.tag?t(e.tag):'<small class="autocomplete-annotate">('+Object(s.default)("blank")+")</small>")+"</div>"}}})};t.a=d},function(e,t,n){"use strict";var i=n(1922),r=n.n(i),a=n(5),o=n.n(a),s=n(15),l=n(52),c=n(192),u=n(985),d=u.a.extend({templatesByType:{movie:r.a,show:r.a,album:r.a,photo:r.a},serializeData:function(){var e=s.d("appModel"),t=e.get("user"),n=u.a.prototype.serializeData.apply(this,arguments),i=t.get("features").get(l.c);return o.a.extend(n,{
showLabels:this.model.server.supports("labels"),labelsMinVersion:c.a.labels,hasContentFilterFeature:i,plexPassUrl:t.server.get("plexPassUrl")}),n}});t.a=d},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i="";return i+=' <form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> ',n=r.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 r,a="";return a+=" "+h(i(n(27)).call(e,"lockableTagInput",{hash:{label:"Labels",name:"label",attribute:"labels",locked:(r=e&&e.locked,null==r||!1===r?r:r.label)},data:t}))+" "}function c(e,t){var r="";return r+=' <div class="form-group"> <label>'+h(i(n(3)).call(e,"Labels",{hash:{},data:t}))+"</label> <p>"+h(i(n(3)).call(e,"Labels require Plex Media Server {1} or later.",e&&e.labelsMinVersion,{hash:{},data:t}))+"</p> </div> "}
function u(e,t){var r,a="";return a+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+h(i(n(3)).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="'+h((r=e&&e.plexPassUrl,typeof r===v?r.apply(e):r))+'" target="_blank">'+h(i(n(3)).call(e,"Learn More",{hash:{},data:t}))+"</a> </p> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var d,p="",h=this.escapeExpression,f=this,v="function";return d=r.if.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:f.program(6,u,o),fn:f.program(1,s,o),data:o}),(d||0===d)&&(p+=d),p+=" "})},function(e,t,n){"use strict";var i=n(1924),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(83),d=n(77),p=n(1925),h=n(1927),f=c.a.Layout.extend({template:r.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 p.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=o.a.extend(this.model.server.getXHROptions(t),{type:"POST",processData:!1}),i=[],r=o.a.bind(function(e){/image\//.test(e.type)&&(n.data=e,i.push(l.a.ajax(n)))},this);if(o.a.each(e,r),!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=o.a.extend(this.model.server.getXHROptions(e),{type:"POST"});this.monitorUpload(l.a.ajax(t))},monitorUpload:function(e){e.done(o.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);o.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 h.a({collection:this.collection,itemViewOptions:{artworkType:this.type}}))},onDragEnter:function(e){this.dragStatus++,this.ui.upload.addClass("drag-hover")},onDragLeave:function(e){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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var a,o="";return o+=' <div class="upload-artwork-container"> <div class="upload-prompt"> ',a=r.if.call(e,e&&e.showFileUpload,{hash:{},inverse:p.noop,fn:p.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+=' <a class="upload-url-btn" href="#">'+d(i(n(3)).call(e,"enter a url",{hash:{},data:t
}))+'</a> </div> <div class="upload-progress"> '+d(i(n(3)).call(e,"Uploading artwork...",{hash:{},data:t}))+' </div> <div class="upload-success"> '+d(i(n(3)).call(e,"this artwork was uploaded successfully",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '+d(i(n(3)).call(e,"{1}upload another{2}",'<a class="upload-back-btn" href="#">',"</a>",{hash:{},data:t}))+' </div> <div class="upload-error"> '+d(i(n(3)).call(e,"there was an error uploading this artwork",{hash:{},data:t
}))+' <span class="upload-prompt-divider">&middot;</span> '+d(i(n(3)).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(3)).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(3)).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(3)).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 r=""
;return r+=' <span class="artwork-file-container"> <input type="file" class="artwork-file-control" multiple> <a href="#">'+d(i(n(3)).call(e,"choose an image",{hash:{},data:t}))+'</a> </span> <span class="upload-prompt-divider">&middot;</span> '+d(i(n(3)).call(e,"drag and drop",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this.escapeExpression,p=this;return c=r.if.call(t,t&&t.showUpload,{
hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+=' <div class="artwork-list-container"></div> '})},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(23),o=n(1926),s=a.a.extend({name:"ArtworkCollection",context:["server","artworkType"],model:o.a,url:function(){return r.a.result(this.parent,"url")+"/"+this.artworkType+"s"}});t.a=s},function(e,t,n){"use strict";var i=n(16),r=n(18),a={POSTER:"poster",ART:"art",BANNER:"banner"},o=r.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:a});t.a=o},function(e,t,n){"use strict";var i=n(63),r=n(1928),a=i.a.extend({className:"artwork-options-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(1929),r=n.n(i),a=n(20),o=n(630),s=n(477),l=n(333),c=a.a.Layout.extend({tagName:"span",template:r.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:s.a[t],width:n,height:o.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){var i=n(14)
;e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,o,s="",l=this.escapeExpression;return s+='<a class="artwork-option media-poster-container" data-rating-key="',(o=n.ratingKey)?a=o.call(t,{hash:{},data:r}):(o=t&&t.ratingKey,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),s+=l(a)+'" href="#"> <div class="media-poster"></div> </a> '})},function(e,t,n){"use strict"
;var i=n(1931),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(165),d=n(1932),p=c.a.CompositeView.extend({template:r.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 o.a.each(n,t),n}function t(e){o.a.each(e.Part,n)}function n(e){i.push(e)}
var i=this.collection,r=this.model.getSingleMetadataItem();return e(r)?l.a.Deferred().resolve():r.populate().then(function(){if(!e(r)&&r.has("childrenKey")){var t=r.get("children"),n=t.get("metadataItems");if(!n.length)return t.populate().then(function(){n.each(e)});n.each(e)}})},flushChanges:function(){}});t.a=p},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),o=o||{};var s="";return s+="<h4>"+(0,this.escapeExpression)(i(n(3)).call(t,"Files",{hash:{},data:o}))+'</h4> <ul class="media-info-file-list"></ul> <div class="loading-container"><div class="loading"></div></div> '})},function(e,t,n){"use strict";var i=n(1933),r=n.n(i),a=n(20),o=a.a.ItemView.extend({template:r.a,tagName:"li",className:"well",serializeData:function(){return{file:this.model.get("file")}}});t.a=o},function(e,t,n){var i=n(14)
;e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,o,s="",l=this.escapeExpression;return(o=n.file)?a=o.call(t,{hash:{},data:r}):(o=t&&t.file,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),s+=l(a)+" "})},function(e,t,n){"use strict";var i=n(1935),r=n.n(i),a=n(685),o=a.a.extend({template:r.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),r=t.clone();r.parseAndSetValue(e.value),r.get("value")!==t.get("value")&&i.add(r,{merge:!0})})}});t.a=o},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=" "+u(i(n(27)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var l,c="",u=this.escapeExpression,d=this;return c+='<form class="edit-metadata-form"> ',l=r.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+=" </form> "})},function(e,t,n){"use strict"
;var i=n(981),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(4),u=n(17),d=n(983),p=n(70),h=n(425),f={playlist:["general"]},v=p.a.extend({mixins:[h.a],name:"editPlaylistModal",className:"edit-metadata-modal modal modal-lg fade",template:r.a,panes:{general:{constructor:d.a}},panesModel:"tempModel",events:o.a.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit","submit .edit-metadata-form":"onFormSubmit"},p.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){p.a.prototype.initialize.apply(this,arguments);var t,n=e.model,i=[n];if(this.model=n,this.tempModel=n.clone(),!t){var r=l.a.Deferred();r.resolve(),t=r.promise()}t=t.done(o.a.bind(function(){this.tempModel.set(n.attributes),1===i.length&&this.tempModel.set("key",i[0].get("key")),
this.showNav(),this.showPane(e.selectedPane||"general"),this.listenTo(u.a,"shortcut:save",this.saveChanges)},this)),t.fail(o.a.bind(function(){this.ui.message.text(Object(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=o.a.reduce(e,function(e,t){return e[t]=!0,e},{}),n=o.a.escape(Object(c.default)("Edit {1}",this.model.get("title")));return{item:this.model.toJSON(),
panes:t,selectedPane:this.selectedPane,paneTitle:n}},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 n=o.a.reduce(this.model.changedAttributes(this.tempModel.attributes),function(e,t,n){return e[n]=t,e},{});e.addClass("active");var i=[];o.a.isEmpty(n)||i.push(this.model.save(n))
;var r=l.a.when.apply(l.a,i);r.done(o.a.bind(function(){this.hide()},this)),r.fail(function(){t.text(Object(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=v},function(e,t,n){"use strict"
;var i=n(1938),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(4),u=n(70),d=n(1939),p=n(425),h=n(1941),f=n(1947),v=u.a.extend({mixins:[p.a],name:"fixIncorrectMatch",className:"fix-incorrect-match-modal modal modal-lg fade",template:r.a,panes:{form:{constructor:h.a},results:{constructor:f.a}},ui:{searchBtn:".search-btn"},regions:{paneRegion:".pane-region",autoMatchDropdownRegion:".auto-match-dropdown-region"},events:o.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),h.a.prototype.setupAgents.apply(this),f.a.prototype.setupResults.apply(this),this.showPane("results")},serializeData:function(){return{location:this.model.getLocation(),
showNavigation:!this.model.isPlexMusicItem()}},updateSearchBtn:function(e){this.ui.searchBtn.toggleClass("disabled","form"!==e)},fetchResults:function(e){var t=o.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)?Object(c.default)("Match"):Object(c.default)("Fix 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);t.find("search-btn").isDisabled()||(this.fetchResults(t),this.showPane("results"))}});t.a=v},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=' <div class="match-location"> '+p(i(n(3)).call(e,"Location",{hash:{},data:t
}))+": "+p(i(n(987)).call(e,e&&e.location,60,12,{hash:{},data:t}))+" </div> "}function l(e,t){var r="";return r+=' <ul class="list modal-list"> <li class="modal-list-item"><a class="search-options-btn" href="#">'+p(i(n(3)).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 r=""
;return r+=' <button type="submit" class="search-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+p(i(n(3)).call(e,"Search",{hash:{},data:t}))+"</span> </button> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p=this.escapeExpression,h=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=r.if.call(t,t&&t.location,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),(u||0===u)&&(d+=u),
d+=' </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',u=r.if.call(t,t&&t.showNavigation,{hash:{},inverse:h.noop,fn:h.program(3,l,o),data:o}),(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">'+p(i(n(3)).call(t,"Cancel",{hash:{},data:o}))+"</button> ",u=r.if.call(t,t&&t.showNavigation,{hash:{},inverse:h.noop,fn:h.program(5,c,o),data:o}),
(u||0===u)&&(d+=u),d+=" </div> </div> </form> </div> </div> "})},function(e,t,n){"use strict";var i=n(1940),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=n(32),c=s.a.ItemView.extend({id:"auto-match-dropdown",tagName:"span",className:"dropdown",template:r.a,collectionEvents:{reset:"render"},events:{"click .auto-match-agent":"onClick"},serializeData:function(){return{agents:this.collection.toJSON()}},onClick:function(e){e.preventDefault();var t=o()(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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(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"],r=this.merge(r,e.helpers),o=o||{}
;var l,c="",u="function",d=this.escapeExpression,p=this;return c+='<a class="dropdown-toggle" href="#auto-match-dropdown" data-toggle="dropdown">'+d(i(n(3)).call(t,"Auto Match",{hash:{},data:o}))+' <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu"> ',l=r.each.call(t,t&&t.agents,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+=" </ul> "})},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 r(e,t){return e.map(function(e){return{label:e.get("name"),value:e.get("identifier"),selected:t===e.get("identifier")}})}function a(e,t){return e?e.get("languages").map(function(e){return{label:e.get("name"),value:e.id,selected:e.id===t}}):[]}var o=n(1942),s=n.n(o),l=n(20),c=n(5),u=n.n(c),d=n(328),p=n(500),h=n(989),f=l.a.ItemView.extend({template:s.a,ui:{
agentSelect:"#match-search-agent",languageSelect:"#match-search-language"},events:{"change #match-search-agent":"onAgentSelectChange"},onlyAfterRender:["updateAgents","updateLanguages"],initialize:function(){var e=Object(d.a)(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=Object(d.a)(this.model),t=e.get("agent"),n=this.model.agentsProxy.findWhere({identifier:t});return{
item:this.model.toJSON(),agents:r(this.model.agentsProxy,t),languages:a(n)}},setupAgents:function(e){if(this.model.agentsPromise)return this.model.agentsPromise;var t=Object(d.a)(this.model),n=t.getSectionType(),i=new p.a([],{server:this.model.server,mediaTypeID:n.typeID}),r=n.exclusiveAgents,a=new h.a(i,r,e);return this.model.agents=i,this.model.agentsProxy=a,this.model.agentsPromise=this.model.agents.populate({reset:!0,cancelable:!0}),this.model.agentsPromise},updateAgents:function(e){
this.ui.agentSelect.html(i(r(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=Object(d.a)(this.model),r=n.get("language");this.ui.languageSelect.html(i(a(t,r)))},onAgentSelectChange:function(e){this.updateLanguages(e.currentTarget.value)},onModalClose:function(){this.model.agents=null,this.model.agentsProxy=null,this.model.agentsPromise=null}});t.a=f},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i="";return i+=' <option value="'+f((n=e&&e.value,typeof n===h?n.apply(e):n))+'" ',n=r.if.call(e,e&&e.selected,{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=">"+f((n=e&&e.label,typeof n===h?n.apply(e):n))+"</option> "}function l(e,t){return"selected"}function c(e,t){var r=""
;return r+=' <option value="">'+f(i(n(3)).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===h?n.apply(e):n))+'">'+f((n=e&&e.label,typeof n===h?n.apply(e):n))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var d,p="",h="function",f=this.escapeExpression,v=this
;return p+='<div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-title">'+f(i(n(3)).call(t,"Title",{hash:{},data:o}))+'</label> <input type="text" id="match-search-title" name="title" class="form-control" value="'+f((d=t&&t.item,d=null==d||!1===d?d:d.title,typeof d===h?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(3)).call(t,"Agent",{
hash:{},data:o}))+'</label> <select id="match-search-agent" name="agent"> ',d=r.each.call(t,t&&t.agents,{hash:{},inverse:v.program(4,c,o),fn:v.program(1,s,o),data:o}),(d||0===d)&&(p+=d),p+=' </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(3)).call(t,"Year",{hash:{},data:o}))+'</label> <input type="text" id="match-search-year" name="year" class="form-control" value="'+f((d=t&&t.item,
d=null==d||!1===d?d:d.year,typeof d===h?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(3)).call(t,"Language",{hash:{},data:o}))+'</label> <select id="match-search-language" name="language"> ',d=r.each.call(t,t&&t.languages,{hash:{},inverse:v.program(4,c,o),fn:v.program(6,u,o),data:o}),(d||0===d)&&(p+=d),p+=" </select> </div> </div> </div> "})},function(e,t,n){"use strict"
;var i=n(16),r=n(18),a=n(1944),o=n(1945),s=r.a.extend({name:"AgentModel",context:["server"],idAttribute:"identifier",rootPropertyName:"Agent",sessionAttrs:{isPrimary:i.a.boolean,selected:i.a.boolean},sessionRelations:{attribution:{relationClass:a.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:o.a,rootPropertyName:"Language"}}});t.a=s},function(e,t,n){"use strict"
;var i=n(16),r=n(51),a=n(18),o=a.a.extend({name:"AgentAttributionModel",context:["server"],responseType:r.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=o},function(e,t,n){"use strict";var i=n(23),r=n(1946),a=i.a.extend({name:"LanguageCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(988),r=n(16),a=n(18),o=a.a.extend({
name:"LanguageModel",context:["server"],idAttribute:"code",rootPropertyName:"Language",syncedAttrs:{code:r.a.string},derivedAttrs:{name:function(){return Object(i.a)(this.get("code"))}}});t.a=o},function(e,t,n){"use strict";var i=n(1948),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(328),c=n(990),u=n(1950),d=s.a.Layout.extend({template:r.a,regions:{resultRegion:".result-region"},onlyAfterRender:["updateResults"],initialize:function(){this.setupResults();var e=Object(l.a)(this.model),t={manual:1},n={
reset:!0,timeout:0,data:t};/com\.plexapp\.agents\.none\:\/\//.test(this.model.get("guid"))&&o.a.extend(n,{data:o.a.extend(t,{agent:e.get("agent"),language:e.get("language")}),processData:!0}),this.model.results.populate(n).then(o.a.bind(this.updateResults,this))},setupResults:function(){if(!this.model.results){var e=this.model.results||new c.default([],{server:this.model.server,parent:this.model});this.model.results=e}},updateResults:function(){this.resultRegion.show(new u.a({
collection:this.model.results,itemViewOptions:{item:this.model}}))},onModalClose:function(){this.model.results=null}});t.a=d},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="result-region"> <div class="loading loading-inline"></div> </div> '})},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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(990).default,rootPropertyName:"SearchResult"}}},derivedAttrs:{normalizedScore:function(){var e=this.get("score");if(null!=e)return Math.min(Math.max(e,0),100)}}});t.a=a},function(e,t,n){
"use strict";var i=n(63),r=n(1951),a=n(1957),o=i.a.extend({tagName:"ul",className:"list match-result-list",itemView:r.a,emptyView:a.a});t.a=o},function(e,t,n){"use strict";var i=n(1952),r=n.n(i),a=n(20),o=n(32),s=n(1953),l=a.a.Layout.extend({tagName:"li",className:"striped-list-item match-result-list-item row",template:r.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 s.a({collection:e})))}},onClick:function(e){e.preventDefault(),o.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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i="";return i+=' <span class="match-name">'+h((n=e&&e.parentName,typeof n===p?n.apply(e):n))+'</span> &ndash; <span class="match-name">'+h((n=e&&e.name,typeof n===p?n.apply(e):n))+"</span> "}function l(e,t){var n,i="";return i+=' <span class="match-name">'+h((n=e&&e.name,typeof n===p?n.apply(e):n))+"</span> "}function c(e,t){var n,i="";return i+=' <span class="match-year">'+h((n=e&&e.year,
typeof n===p?n.apply(e):n))+'</span> <span class="match-separator">&middot;</span> '}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p="function",h=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=r.if.call(t,t&&t.parentName,{hash:{},inverse:f.program(3,l,o),fn:f.program(1,s,o),data:o}),(u||0===u)&&(d+=u),
d+=' </div> <div class="col-xs-3 match-score-info" title="'+h(i(n(3)).call(t,"Score {1}",t&&t.normalizedScore,{hash:{},data:o}))+'"> ',u=r.if.call(t,t&&t.year,{hash:{},inverse:f.noop,fn:f.program(5,c,o),data:o}),(u||0===u)&&(d+=u),d+=' <span class="match-score"><i class="match-score-icon glyphicon certificate"></i>'+h((u=t&&t.normalizedScore,
typeof u===p?u.apply(t):u))+'</span> </div> </div> <div class="row match-extended-info hidden"> <div class="col-xs-4"> <img class="match-art" src="'+h((u=t&&t.thumb,typeof u===p?u.apply(t):u))+'"/> </div> <div class="col-xs-8 children-region"></div> </div> </a> '})},function(e,t,n){"use strict";var i=n(63),r=n(1954),a=n(1956),o=i.a.extend({mixins:[a.a],tagName:"ul",itemView:r.a,className:"list"});t.a=o},function(e,t,n){"use strict";var i=n(1955),r=n.n(i),a=n(20),o=a.a.ItemView.extend({
tagName:"li",template:r.a,className:"striped-list-item",initialize:function(e){this.item=e.item}});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"missing"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var l,c="",u=this.escapeExpression,d=this;return c+='<div class="row disc-number hidden"> '+u(i(n(3)).call(t,"Disc {1}",t&&t.parentIndex,{hash:{},data:o
}))+' </div> <div class="row striped-list-inner-item"> <span class="col-xs-1 match-index"> '+u((l=t&&t.index,"function"==typeof l?l.apply(t):l))+'. </span> <span class="col-xs-11 match-track-name ',l=r.unless.call(t,t&&t.matched,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+='"> '+u((l=t&&t.name,"function"==typeof l?l.apply(t):l))+" </span> </div> "})},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a={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(){1!==this.markDiscNumbers()&&r.a.each(this.discMarkers,r.a.bind(function(e,t){this.$("li:eq("+t+") .disc-number").removeClass("hidden")},this))},
onTracksUpdate:function(){this.render()}};t.a=a},function(e,t,n){"use strict";var i=n(1958),r=n.n(i),a=n(20),o=a.a.ItemView.extend({template:r.a});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="";return s+='<div class="match-empty-message">'+(0,this.escapeExpression)(i(n(3)).call(t,"No matches found.",{hash:{},data:o}))+"</div> "})
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="";return s+='<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> '+(0,
this.escapeExpression)(i(n(3)).call(t,"Optimize",{hash:{},data:o}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> '})},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(19),l=n(1961),c=n(1962),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=[r.a.result(this,"url"),"items",e.id],n=s.join(t,e.getSaveParams()),i=r.a.extend(e.server.getXHROptions(n),{type:"PUT"}),a=o.a.ajax(i);return a.then(r.a.bind(function(e){this.set(this.parse(e))},this)),a.promise()}});t.a=u},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(19),l=n(278),c=n(277),u=n(117),d=n(325),p=n(67),h=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}),s.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),p.a.parseInteger(t,["duration","leafCount","addedAt"]),p.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=s.join([r.a.result(this,"url"),"/items/",e,"/move"],n),a=r.a.extend(this.server.getXHROptions(i),{type:"PUT"}),l=o.a.ajax(a),c=this.get("children"),u=this.findItem(e);c.remove(u);var d=this.findItem(t),p=d?c.indexOf(d)+1:0;return c.add(u,{at:p}),l},removeItem:function(e){e=e.toString();var t=s.join([r.a.result(this,"url"),"/items/",e]),n=r.a.extend(this.server.getXHROptions(t),{type:"DELETE"
}),i=o.a.ajax(n);i.then(r.a.bind(function(e){this.set(this.parse(e))},this));var a=this.get("children"),l=this.findItem(e);return a.remove(l),i},addContent:function(e,t){var n=this.isNew()?"POST":"PUT",i=[r.a.result(this,"url")],a={};this.isNew()?(a.type=this.get("playlistType"),a.title=this.get("title"),a.smart=this.get("smart")?1:0):i.push("/items"),e.get("playQueueID")?a.playQueueID=e.get("playQueueID"):a.uri=l.a.uri(e,t);var c=s.join(i,a),u=r.a.extend(e.server.getXHROptions(c),{type:n
}),d=o.a.ajax(u);return d.then(r.a.bind(function(e){this.set(this.parse(e))},this)),d.promise()},isLibraryItem:function(){return!0},isPlexMusicItem:function(){return!1}});t.a=h},function(e,t,n){"use strict";var i=n(19),r=n(279),a=n(23),o=n(401),s=a.a.extend({name:"VersionGeneratorCollection",context:["server"],model:o.a,url:function(){return i.join(["playlists",this.parent.id,"items"],{type:r.a.LOCAL})}});t.a=s},function(e,t,n){"use strict";var i=n(279),r=n(165),a=n(1964),o=r.a.extend({
model:a.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=o},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(67),o=n(117),s=o.a.extend({name:"VersionTargetModel",whitelistedAttrs:["id","tag","tagType","MediaSettings","Device"],convert:function(e){var t=r.a.isObject(e)?e:a.a.parseXML(e);return a.a.parseInteger(t,"id"),t},parse:function(e,t){var n=this.convert(e)
;return n=r.a.pick(n,this.whitelistedAttrs)}});t.a=s},function(e,t,n){"use strict";var i=n(279),r=n(165),a=n(1966),o=r.a.extend({model:a.a,url:"/clients/profiles?type="+i.a.LOCAL,parse:function(e){return this.convert(e,"Profile")}});t.a=o},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(67),o=n(117),s=o.a.extend({idAttribute:"title",whitelistedAttrs:["title","selected"],convert:function(e){var t=r.a.isObject(e)?e:a.a.parseXML(e);return a.a.parseBoolean(t,"selected"),t},parse:function(e,t){
var n=this.convert(e);return n=r.a.pick(n,this.whitelistedAttrs)}});t.a=s},function(e,t,n){"use strict";var i=n(1968),r=n.n(i),a=n(20),o=a.a.ItemView.extend({className:"modal-body loading-container",template:r.a});t.a=o},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="loading loading-inline"></div> '})},function(e,t,n){"use strict"
;var i=n(1970),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(4),c=n(67),u=n(278),d=n(328),p=n(397),h=n(401),f=n(869),v=n(1971),g=n(1973),m=s.a.Layout.extend({template:r.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 p.a({key:t},{server:this.model.server,onlyIfCached:!0});o.a.isEmpty(n)||(this.tempModel.section=n)}}else{var i,r=e.item,a=e.items,s=r.has("childrenKey")?r.get("children"):r,l=r.server;if(r.get("isSection"))i=r;else{var c=Object(d.a)(r);o.a.isEmpty(c)||(i=c)}this.tempModel=new h.a({title:u.a.title(r,{items:a}),targetTagID:this.targets.first().id,Location:{uri:u.a.uri(s,{items:a})}},{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 f.a({model:this.tempModel,isSync:!1,isCloudSync:!1})),this.targetsRegion.show(new v.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 n=this.tempModel.get("Device");this.tempModel.set("target",Object(l.default)("Custom: {1}",n.profile))}var i=this.playlist.addContent(this.tempModel);i.done(this.whenRendered(function(){if(this.model){var e=o.a.omit(this.tempModel.toJSON(),"children")
;this.model.set(this.model.parse(e))}this.trigger("request:nextState")})),i.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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"hidden"}function l(e,t){return p(i(n(3)).call(e,"Optimize",{hash:{},data:t}))}function c(e,t){return p(i(n(3)).call(e,"Save",{
hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p=this.escapeExpression,h=this;return d+='<form id="convert-form" class="settings-container"> <div class="modal-body"> <div class="form-group ',u=r.unless.call(t,t&&t.showRemuxOnlyWarning,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),(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"> '+p(i(n(3)).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:o}))+' </span> </p> </div> <div class="form-group"> <label class="control-label" for="convert-title">'+p(i(n(3)).call(t,"Title",{hash:{},data:o
}))+'</label> <input type="text" id="convert-title" name="title" class="form-control" value="'+p((u=t&&t.conversionItem,u=null==u||!1===u?u:u.title,"function"==typeof u?u.apply(t):u))+'" placeholder="'+p((u=t&&t.conversionItem,u=null==u||!1===u?u:u.title,
"function"==typeof u?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">'+p(i(n(3)).call(t,"Cancel",{hash:{},data:o}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',u=r.if.call(t,t&&t.isNew,{hash:{},
inverse:h.program(5,c,o),fn:h.program(3,l,o),data:o}),(u||0===u)&&(d+=u),d+="</span> </button> </div> </form> "})},function(e,t,n){"use strict";var i=n(1972),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(873),c=n(130),u=s.a.ItemView.extend({className:"convert-target-container form-group",template:r.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;this.selectedProfile=t?this.profiles.get(t):this.profiles.findWhere({selected:!0}),this.availableCustomQualities=c.a.getAvailableQualities({lowestQualityIndex:l.a}).reverse();var n=this.model.get("mediaSettings").get("maxVideoBitrate");if(n){var i=c.a.getNearestIndexToBitrate(n)
;this.selectedCustomQuality=c.a.getQualityByIndex(i)}else this.selectedCustomQuality=o.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){this.model.get("Device").profile=this.selectedProfile.get("title")},updateMediaSettings:function(e){this.model.get("mediaSettings").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",-1===t)},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=c.a.getQualityByIndex(t),this.updateMediaSettings(this.selectedCustomQuality)}});t.a=u},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"disabled"}function l(e,t,a){
var o,s="";return s+=' <option value="'+v((o=e&&e.id,typeof o===g?o.apply(e):o))+'" ',o=i(n(25)).call(e,(o=a&&a.item,null==o||!1===o?o:o.targetTagID),e&&e.id,{hash:{},inverse:m.noop,fn:m.program(4,c,t),data:t}),(o||0===o)&&(s+=o),s+="> "+v((o=e&&e.tag,typeof o===g?o.apply(e):o)),o=r.if.call(e,(o=e&&e.mediaSettings,null==o||!1===o?o:o.videoResolution),{hash:{},inverse:m.noop,fn:m.program(6,u,t),data:t}),(o||0===o)&&(s+=o),s+=" </option> "}function c(e,t){return"selected"}function u(e,t){var r=""
;return r+=" - "+v(i(n(402)).call(e,e&&e.mediaSettings,{hash:{},data:t}))}function d(e,t,r){var a,o="";return o+=' <option value="'+v((a=e&&e.title,typeof a===g?a.apply(e):a))+'" ',a=i(n(25)).call(e,(a=r&&r.selectedProfile,null==a||!1===a?a:a.title),e&&e.title,{hash:{},inverse:m.noop,fn:m.program(4,c,t),data:t}),(a||0===a)&&(o+=a),o+="> "+v((a=e&&e.title,typeof a===g?a.apply(e):a))+" </option> "}function p(e,t,r){var a,o="";return o+=' <option value="'+v((a=e&&e.index,
typeof a===g?a.apply(e):a))+'" ',a=i(n(25)).call(e,(a=r&&r.selectedCustomQuality,null==a||!1===a?a:a.index),e&&e.index,{hash:{},inverse:m.noop,fn:m.program(4,c,t),data:t}),(a||0===a)&&(o+=a),o+="> "+v(i(n(402)).call(e,e,{hash:{},data:t}))+" </option> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var h,f="",v=this.escapeExpression,g="function",m=this;return f+='<select class="convert-target-select" name="target" ',h=r.if.call(t,t&&t.disableTarget,{hash:{},inverse:m.noop,
fn:m.program(1,s,o),data:o}),(h||0===h)&&(f+=h),f+="> ",h=r.each.call(t,t&&t.targets,{hash:{},inverse:m.noop,fn:m.programWithDepth(3,l,o,t),data:o}),(h||0===h)&&(f+=h),f+=' <option value="-1" ',h=r.unless.call(t,(h=t&&t.item,null==h||!1===h?h:h.targetTagID),{hash:{},inverse:m.noop,fn:m.program(4,c,o),data:o}),(h||0===h)&&(f+=h),f+=">"+v(i(n(3)).call(t,"Custom",{hash:{},data:o
}))+'</option> </select> <div class="convert-custom-target-container"> <input type="text" class="convert-target-title form-control" name="targetTitle" class="form-control" value="'+v((h=t&&t.item,h=null==h||!1===h?h:h.target,typeof h===g?h.apply(t):h))+'" placeholder="'+v(i(n(3)).call(t,"Quality Name",{hash:{},data:o}))+'"> <select class="convert-target-profile-select" name="targetProfile"> ',h=r.each.call(t,t&&t.profiles,{hash:{},inverse:m.noop,fn:m.programWithDepth(8,d,o,t),data:o}),
(h||0===h)&&(f+=h),f+=' </select> <select class="convert-target-quality-select" name="targetQuality"> ',h=r.each.call(t,t&&t.availableCustomQualities,{hash:{},inverse:m.noop,fn:m.programWithDepth(10,p,o,t),data:o}),(h||0===h)&&(f+=h),f+=' </select> </div> <p class="help-block">'+v(i(n(3)).call(t,"Plex will convert your media to this quality. Each version will be stored in a separate file.",{hash:{},data:o}))+"</p> "})},function(e,t,n){"use strict"
;var i=n(1974),r=n.n(i),a=n(20),o=a.a.ItemView.extend({className:"convert-location-container form-group",template:r.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=o},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"disabled"}function l(e,t){return"selected"}function c(e,t,r){var a,o="";return o+=' <option value="'+h((a=e&&e.id,typeof a===p?a.apply(e):a))+'" ',a=i(n(25)).call(e,r&&r.selectedLocationID,e&&e.id,{hash:{},inverse:f.noop,fn:f.program(3,l,t),data:t}),(a||0===a)&&(o+=a),o+=">"+h(i(n(987)).call(e,e&&e.path,50,20,{hash:{},data:t}))+"</option> "}
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p="function",h=this.escapeExpression,f=this;return d+='<label class="control-label" for="convert-storage-location">'+h(i(n(3)).call(t,"Version storage location",{hash:{},data:o}))+'</label> <select id="convert-storage-location" class="storage-location-select" name="storageLocation" ',u=r.if.call(t,t&&t.disableLocation,{hash:{},inverse:f.noop,fn:f.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+='> <option value="-1" ',
u=i(n(25)).call(t,t&&t.selectedLocationID,-1,{hash:{},inverse:f.noop,fn:f.program(3,l,o),data:o}),(u||0===u)&&(d+=u),d+=">"+h(i(n(3)).call(t,"In folders with original items",{hash:{},data:o}))+"</option> ",u=r.each.call(t,t&&t.locations,{hash:{},inverse:f.noop,fn:f.programWithDepth(5,c,o,t),data:o}),(u||0===u)&&(d+=u),d+=' </select> <p class="help-block">'+h(i(n(3)).call(t,'A "Plex Versions" folder will be created in your chosen location.',{hash:{},data:o}))+"</p> "})},function(e,t,n){
"use strict";var i=n(1976),r=n.n(i),a=n(20),o=n(109),s=a.a.ItemView.extend({className:"modal-body",template:r.a,events:{"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),this.triggerMethod("request:nextState"),Object(o.a)("conversion",{serverID:this.options.server.id})}});t.a=s},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression;return s+='<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(3)).call(t,"This media is being converted.",{hash:{},data:o}))+"</h4> <h4>"+l(i(n(3)).call(t,"Watch the status of the conversion {1}here{2}.",'<a class="status-link" href="#">',"</a>",{hash:{},data:o}))+"</h4> </div> </div> "})
},function(e,t,n){"use strict";var i=n(1978),r=n.n(i),a=n(20),o=a.a.ItemView.extend({className:"modal-body",template:r.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=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i=""
;return i+=" "+p((n=e&&e.status,typeof n===d?n.apply(e):n))+" "}function l(e,t){var r="";return r+=" "+p(i(n(3)).call(e,"There was a problem preparing for optimization.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d="function",p=this.escapeExpression,h=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=r.if.call(t,t&&t.status,{hash:{},inverse:h.program(3,l,o),fn:h.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+=' </h4> <h4><a class="try-again-link" href="#">'+p(i(n(3)).call(t,"Try again",{hash:{},data:o}))+"</a></h4> </div> </div> "})},function(e,t,n){"use strict"
;var i=n(1980),r=n.n(i),a=n(5),o=n.n(a),s=n(400),l=n(19),c=s.a.extend({name:"downloadVersionModal",template:r.a,serializeData:function(){var e=this.model;return{defaultLinkTarget:"_blank",mediaItems:o.a.map(this.model.get("Media"),function(t,n){var i=o.a.clone(t);i.downloadUrl=e.getDownloadUrl(n);var r=e.getFilepath(n);return r&&(i.downloadName=l.getLastSegment(r)),i})}},onClick:function(){}});t.a=c},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t,a){var o,s="";return s+=' <li class="striped-list-item select-list-item download-list-item"> <a class="media" data-value="'+g((o=null==t||!1===t?t:t.index,typeof o===v?o.apply(e):o))+'" href="'+g((o=e&&e.downloadUrl,typeof o===v?o.apply(e):o))+'" target="'+g((o=a&&a.defaultLinkTarget,typeof o===v?o.apply(e):o))+'" ',o=i(n(223)).call(e,a&&a.defaultLinkTarget,"_blank",{hash:{},inverse:m.noop,fn:m.program(2,l,t),data:t}),
(o||0===o)&&(s+=o),s+="> ",o=r.if.call(e,e&&e.title,{hash:{},inverse:m.noop,fn:m.program(4,c,t),data:t}),(o||0===o)&&(s+=o),s+=" ",o=r.if.call(e,e&&e.videoResolution,{hash:{},inverse:m.noop,fn:m.program(6,u,t),data:t}),(o||0===o)&&(s+=o),s+=" ",o=r.if.call(e,e&&e.bitrate,{hash:{},inverse:m.noop,fn:m.program(9,p,t),data:t}),(o||0===o)&&(s+=o),s+=" </a> </li> "}function l(e,t){var n,i="";return i+='download="'+g((n=e&&e.downloadName,typeof n===v?n.apply(e):n))+'"'}function c(e,t){var n,i=""
;return i+=" "+g((n=e&&e.title,typeof n===v?n.apply(e):n))+' <span class="title-separator">\u2022</span> '}function u(e,t){var a,o="";return o+=" "+g(i(n(1981)).call(e,e&&e.videoResolution,{hash:{},data:t})),a=r.if.call(e,e&&e.bitrate,{hash:{},inverse:m.noop,fn:m.program(7,d,t),data:t}),(a||0===a)&&(o+=a),o+=" "}function d(e,t){return","}function p(e,t){var r="";return r+=" "+g(i(n(1982)).call(e,e&&e.bitrate,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),
o=o||{};var h,f="",v="function",g=this.escapeExpression,m=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> '+g(i(n(3)).call(t,"Download a Version",{hash:{},data:o
}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list download-list"> ',h=r.each.call(t,t&&t.mediaItems,{hash:{},inverse:m.noop,fn:m.programWithDepth(1,s,o,t),data:o}),(h||0===h)&&(f+=h),f+=" </ul> </div> </div> </div> "})},function(e,t,n){var i=n(331).default,r=n(152);e.exports=r(i)},function(e,t,n){var i=n(403).default,r=n(152);e.exports=r(i)},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=' <div class="friends-container"></div> <div class="message-container invisible"> <textarea class="message form-control" placeholder="'+d(i(n(3)).call(e,"Say something about this...",{hash:{},data:t}))+'"></textarea> </div> '}function l(e,t){var r="";return r+=' <div class="empty-message"> '+d(i(n(3)).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"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=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 share-alt"></i> '+d(i(n(3)).call(t,"Select Friends",{hash:{},data:o
}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',c=r.if.call(t,t&&t.hasFriends,{hash:{},inverse:p.program(3,l,o),fn:p.program(1,s,o),data:o}),(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(3)).call(t,"Send",{hash:{},data:o}))+"</span> </button> </div> </div> </div> "})
},function(e,t,n){"use strict";var i=n(63),r=n(1985),a=i.a.extend({tagName:"ul",className:"list select-list select-friends-list dark-scrollbar",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(1986),r=n.n(i),a=n(20),o=n(247),s=a.a.ItemView.extend({tagName:"li",className:"striped-list-item select-list-item",template:r.a,ui:{poster:".user-poster"},initialize:function(e){this.image=new o.a({model:this.model,type:"friend",width:80})},onRender:function(){
this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()}});t.a=s},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+='<a class="friend" data-id="'+c((s=t&&t.recommendationsPlaylistId,
"function"==typeof s?s.apply(t):s))+'" href="#"> <span class="media-poster user-poster"></span> '+c(i(n(629)).call(t,t&&t.title,20,{hash:{},data:o}))+" </a> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"hide-streams-column"}function l(e,t){var a,o="";return o+=' <div class="files"> <h4>'+A(i(n(3)).call(e,"Files",{hash:{},data:t}))+"</h4> ",a=r.each.call(e,e&&e.media,{hash:{},
inverse:k.noop,fn:k.programWithDepth(4,c,t,e),data:t}),(a||0===a)&&(o+=a),o+=" </div> "}function c(e,t,n){var i,a="";return a+=' <ul class="media-info-file-list well"> ',i=r.if.call(e,n&&n.showDeleteFile,{hash:{},inverse:k.noop,fn:k.program(5,u,t),data:t}),(i||0===i)&&(a+=i),a+=" ",i=r.each.call(e,e&&e.Part,{hash:{},inverse:k.noop,fn:k.programWithDepth(10,h,t,n),data:t}),(i||0===i)&&(a+=i),a+=" </ul> "}function u(e,t){var r,a=""
;return a+=' <a href="#" data-media-item="'+A((r=null==t||!1===t?t:t.index,typeof r===L?r.apply(e):r))+'" class="delete-btn text-danger pull-right"> <i class="glyphicon bin"></i> ',r=i(n(25)).call(e,(r=e&&e.Part,null==r||!1===r?r:r.length),"1",{hash:{},inverse:k.program(8,p,t),fn:k.program(6,d,t),data:t}),(r||0===r)&&(a+=r),a+=" </a> "}function d(e,t){var r="";return r+=" "+A(i(n(3)).call(e,"Delete File",{hash:{},data:t}))+" "}function p(e,t){var r=""
;return r+=" "+A(i(n(3)).call(e,"Delete Files",{hash:{},data:t}))+" "}function h(e,t,n){var i,a="";return a+=" <li> ",i=r.if.call(e,n&&n.showFilepath,{hash:{},inverse:k.program(13,v,t),fn:k.program(11,f,t),data:t}),(i||0===i)&&(a+=i),a+=" ",i=r.unless.call(e,e&&e.accessible,{hash:{},inverse:k.noop,fn:k.program(15,g,t),data:t}),(i||0===i)&&(a+=i),a+=" </li> "}function f(e,t){var n,i="";return i+=" "+A((n=e&&e.file,typeof n===L?n.apply(e):n))+" "}function v(e,t){var r=""
;return r+=" "+A(i(n(1988)).call(e,e&&e.file,{hash:{},data:t}))+" "}function g(e,t){var n,i="";return i+=" ",n=r.if.call(e,e&&e.exists,{hash:{},inverse:k.program(18,y,t),fn:k.program(16,m,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function m(e,t){var r="";return r+=' <span class="label label-danger" data-toggle="tooltip" title="'+A(i(n(3)).call(e,"Please check the permissions for this file.",{hash:{},data:t}))+'">'+A(i(n(3)).call(e,"Inaccessible",{hash:{},data:t}))+"</span> "}function y(e,t){var r=""
;return r+=' <span class="label label-danger" data-toggle="tooltip" title="'+A(i(n(3)).call(e,"Please check that this file exists and the necessary drive is mounted.",{hash:{},data:t}))+'">'+A(i(n(3)).call(e,"Unavailable",{hash:{},data:t}))+"</span> "}function b(e,t,a){var o,s="";return s+=' <div class="media"> <div class="props"> <h4>'+A(i(n(3)).call(e,"Media",{hash:{},data:t}))+"</h4> <ul> ",o=r.each.call(e,e&&e.properties,{hash:{},inverse:k.noop,fn:k.program(21,I,t),data:t}),
(o||0===o)&&(s+=o),s+=" </ul> </div> ",o=r.each.call(e,e&&e.Part,{hash:{},inverse:k.noop,fn:k.programWithDepth(23,S,t,a),data:t}),(o||0===o)&&(s+=o),s+=" </div> "}function I(e,t){var r,a="";return a+=' <li> <span class="detail-label">'+A(i(n(3)).call(e,e&&e.name,{hash:{},data:t}))+'</span> <span class="detail">'+A((r=e&&e.value,typeof r===L?r.apply(e):r))+"</span> </li> "}function S(e,t,a){var o,s="";return s+=' <div class="part"> <div class="props"> <h4>'+A(i(n(3)).call(e,"Part",{hash:{},data:t
}))+"</h4> <ul> ",o=r.each.call(e,e&&e.properties,{hash:{},inverse:k.noop,fn:k.program(21,I,t),data:t}),(o||0===o)&&(s+=o),s+=' </ul> </div> <div class="streams"> ',o=r.each.call(e,e&&e.Stream,{hash:{},inverse:k.noop,fn:k.program(24,M,t),data:t}),(o||0===o)&&(s+=o),s+=" ",o=r.if.call(e,a&&a.loading,{hash:{},inverse:k.noop,fn:k.program(33,w,t),data:t}),(o||0===o)&&(s+=o),s+=" </div> </div> "}function M(e,t){var a,o="";return o+=' <div class="props"> ',a=i(n(25)).call(e,e&&e.streamType,"1",{
hash:{},inverse:k.program(27,C,t),fn:k.program(25,D,t),data:t}),(a||0===a)&&(o+=a),o+=" <ul> ",a=r.each.call(e,e&&e.properties,{hash:{},inverse:k.noop,fn:k.program(21,I,t),data:t}),(a||0===a)&&(o+=a),o+=" </ul> </div> "}function D(e,t){var r="";return r+=" <h4>"+A(i(n(3)).call(e,"Video",{hash:{},data:t}))+"</h4> "}function C(e,t){var r;return r=i(n(25)).call(e,e&&e.streamType,"2",{hash:{},inverse:k.program(30,j,t),fn:k.program(28,O,t),data:t}),r||0===r?r:""}function O(e,t){var r=""
;return r+=" <h4>"+A(i(n(3)).call(e,"Audio",{hash:{},data:t}))+"</h4> "}function j(e,t){var r;return r=i(n(25)).call(e,e&&e.streamType,"3",{hash:{},inverse:k.noop,fn:k.program(31,P,t),data:t}),r||0===r?r:""}function P(e,t){var r="";return r+=" <h4>"+A(i(n(3)).call(e,"Subtitles",{hash:{},data:t}))+"</h4> "}function w(e,t){var r="";return r+=' <div class="props"> <h4>'+A(i(n(3)).call(e,"Loading",{hash:{},data:t}))+"...</h4> </div> "}function T(e,t,n){var i;return i=r.if.call(e,n&&n.showFilepath,{
hash:{},inverse:k.noop,fn:k.program(36,E,t),data:t}),i||0===i?i:""}function E(e,t){var r,a="";return a+=' <div class="modal-footer"> <div class="pull-left"> <a href="'+A((r=e&&e.url,typeof r===L?r.apply(e):r))+'" target="_blank">'+A(i(n(3)).call(e,"View XML",{hash:{},data:t}))+"</a> </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var x,N="",A=this.escapeExpression,L="function",k=this
;return N+='<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> '+A(i(n(3)).call(t,"Media Info",{hash:{},data:o}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <div class="position-ref ',x=r.unless.call(t,t&&t.hasStreams,{hash:{},inverse:k.noop,fn:k.program(1,s,o),
data:o}),(x||0===x)&&(N+=x),N+='"> ',x=r.if.call(t,t&&t.hasFiles,{hash:{},inverse:k.noop,fn:k.program(3,l,o),data:o}),(x||0===x)&&(N+=x),N+=" ",x=r.each.call(t,t&&t.media,{hash:{},inverse:k.noop,fn:k.programWithDepth(20,b,o,t),data:o}),(x||0===x)&&(N+=x),N+=" </div> </div> ",x=r.if.call(t,t&&t.key,{hash:{},inverse:k.noop,fn:k.programWithDepth(35,T,o,t),data:o}),(x||0===x)&&(N+=x),N+=" </div> </div> "})},function(e,t,n){var i=n(19).getLastSegment,r=n(152);e.exports=r(i)},function(e,t,n){
"use strict";function i(e,t){if(null===e||void 0===e||s()(e))return"";var n=parseInt(e,10),i=l[t||"h264"];return a()(n)&&a()(i)?(n/i).toFixed(1):String(e)}var r=n(992),a=n.n(r),o=n(1992),s=n.n(o),l={h264:10,hevc:30};t.a=i},function(e,t,n){n(1991),e.exports=n(116).Number.isFinite},function(e,t,n){var i=n(162),r=n(179).isFinite;i(i.S,"Number",{isFinite:function(e){return"number"==typeof e&&r(e)}})},function(e,t,n){e.exports={default:n(1993),__esModule:!0}},function(e,t,n){n(1994),
e.exports=n(116).Number.isNaN},function(e,t,n){var i=n(162);i(i.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){"use strict";function i(e){for(var t="",n=0,i=e.length;n<i;n++){var r=e.charAt(n),a=r.toUpperCase();t+=0===n?a:r===a?" "+a:r}return t}t.a=i},function(e,t,n){"use strict";function i(e,t){return!!f.a.find(e,function(e){return t[e]})}function r(e,t,n){
return n===I.b?e?Object(m.default)("Remove from My Podcasts"):Object(m.default)("Add to My Podcasts"):e?Object(m.default)("Remove from My Shows"):Object(m.default)("Add to My Shows")}var a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(5),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=(n.n(g),
n(4)),y=n(73),b=n(24),I=n(143),S=n(493),M=n(156),D=n(289),C=n(994),O=n(1999),j=n(995),P=["showPlay","showPlayVersion","showPlayAll","showShuffle","showQueue","showPlayPlexMix","showQueuePlexMix","showPlayTrailer","showPlayMusicVideo","showAddToAlbum","showAddToPlaylist"],w=["showEdit","showMarkPlayed","showMarkUnplayed","showSettings","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showWatchLater","showRecommend","showDelete","showDeleteVersion","showGetInfo"],T=o()(D.a,{}),E=function(e){
function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onMarkPlayedPress=function(e){r.setState({isConfirmMarkPlayedModalOpen:!0}),r.props.onMenuDisable()},r.onMarkUnplayedPress=function(e){r.setState({isConfirmMarkUnplayedModalOpen:!0}),r.props.onMenuDisable()},r.onMarkPlayedConfirm=function(){var e=r.state.isConfirmMarkPlayedModalOpen;r.setState({isConfirmMarkPlayedModalOpen:!1,isConfirmMarkUnplayedModalOpen:!1}),e?r.props.onMarkPlayedConfirm():r.props.onMarkUnplayedConfirm(),
r.props.onMenuEnable()},r.onMarkPlayedCancel=function(){r.setState({isConfirmMarkPlayedModalOpen:!1,isConfirmMarkUnplayedModalOpen:!1}),r.props.onMenuEnable()},r.onPlayVersionPress=function(e){r.setState({isPlayVersionModalOpen:!0}),r.props.onMenuDisable()},r.onPlayVersionSelect=function(e){r.setState({isPlayVersionModalOpen:!1}),r.props.onPlayVersionPress(e),r.props.onMenuEnable()},r.onPlayVersionCancel=function(){r.setState({isPlayVersionModalOpen:!1}),r.props.onMenuEnable()},
r.onSettingsPress=function(){r.setState({isSettingsModalOpen:!0}),r.props.onMenuDisable()},r.onSettingsClose=function(){r.setState({isSettingsModalOpen:!1}),r.props.onMenuEnable()},r.state={isConfirmMarkPlayedModalOpen:!1,isConfirmMarkUnplayedModalOpen:!1,isPlayVersionModalOpen:!1,isSettingsModalOpen:!1},r}return p()(t,e),t.prototype.render=function(){
var e=this.props,t=this.state,n=t.isConfirmMarkPlayedModalOpen,a=t.isConfirmMarkUnplayedModalOpen,s=t.isPlayVersionModalOpen,l=t.isSettingsModalOpen,c=i(P,e),u=i(w,e),d=c&&u;return o()("div",{},void 0,e.showPlay&&o()(M.a,{onPress:e.onPlayPress},void 0,e.playLabel||Object(m.default)("Play")),e.showPlayVersion&&o()(M.a,{onPress:this.onPlayVersionPress},void 0,Object(m.default)("Play Version...")),e.showPlayAll&&o()(M.a,{onPress:e.onPlayAllPress
},void 0,Object(m.default)("Play All")),e.showShuffle&&o()(M.a,{onPress:e.onShufflePress},void 0,Object(m.default)("Shuffle")),e.showQueue&&o()(M.a,{onPress:e.onPlayNextPress},void 0,Object(m.default)("Play Next")),e.showQueue&&o()(M.a,{onPress:e.onAddToQueuePress},void 0,Object(m.default)("Add to Queue")),e.showPlayPlexMix&&o()(M.a,{onPress:e.onPlayPlexMixPress},void 0,Object(m.default)("Play Plex Mix")),e.showQueuePlexMix&&o()(M.a,{onPress:e.onQueuePlexMixPress
},void 0,Object(m.default)("Queue Plex Mix")),e.showPlayTrailer&&o()(M.a,{onPress:e.onPlayPrimaryExtraPress},void 0,Object(m.default)("Play Trailer")),e.showPlayMusicVideo&&o()(M.a,{onPress:e.onPlayPrimaryExtraPress},void 0,Object(m.default)("Play Music Video")),e.showAddToAlbum&&o()(M.a,{onPress:e.onAddToPlaylistPress},void 0,Object(m.default)("Add to Album...")),e.showAddToPlaylist&&o()(M.a,{onPress:e.onAddToPlaylistPress
},void 0,Object(m.default)("Add to Playlist...")),e.showAddToSaved&&o()(M.a,{onPress:e.onAddToSavedPress},void 0,r(e.saved,e.type,e.subtype)),d&&T,e.showEdit&&o()(M.a,{onPress:e.onEditPress},void 0,Object(m.default)("Edit")),e.showSettings&&o()(M.a,{onPress:this.onSettingsPress},void 0,Object(m.default)("Settings")),e.showMarkPlayed&&o()(M.a,{onPress:this.onMarkPlayedPress},void 0,Object(m.default)("Mark Played")),e.showMarkUnplayed&&o()(M.a,{onPress:this.onMarkUnplayedPress
},void 0,Object(m.default)("Mark Unplayed")),e.showRefresh&&o()(M.a,{isDisabled:e.isRefreshing,onPress:e.onRefreshPress},void 0,Object(m.default)("Refresh Metadata")),e.showAnalyze&&o()(M.a,{isDisabled:e.isAnalyzing,onPress:e.onAnalyzePress},void 0,Object(m.default)("Analyze")),e.showFixMatch&&o()(M.a,{onPress:e.onFixMatchPress},void 0,Object(m.default)("Fix Match...")),e.showMatch&&o()(M.a,{onPress:e.onFixMatchPress},void 0,Object(m.default)("Match...")),e.showUnmatch&&o()(M.a,{
onPress:e.onUnmatchPress},void 0,Object(m.default)("Unmatch")),e.showSplitApart&&o()(M.a,{onPress:e.onSplitApartPress},void 0,Object(m.default)("Split Apart")),e.showSync&&o()(M.a,{onPress:e.onSyncPress},void 0,Object(m.default)("Sync...")),e.showOptimize&&o()(M.a,{onPress:e.onOptimizePress},void 0,Object(m.default)("Optimize...")),e.showDownload&&o()(S.a,{action:y.p},void 0,o()(M.a,{to:e.downloadUrl&&e.downloadUrl(),target:e.downloadUrl&&"_blank",download:!1,
onPress:e.downloadUrl?e.onPress:e.onDownloadVersionPress},void 0,Object(m.default)("Download"))),e.showWatchLater&&o()(M.a,{onPress:e.onWatchLaterPress},void 0,Object(m.default)("Watch Later")),e.showRecommend&&o()(M.a,{onPress:e.onRecommendPress},void 0,Object(m.default)("Recommend...")),e.showDelete&&o()(M.a,{kind:b.b.DANGER,onPress:e.onDeletePress},void 0,Object(m.default)("Delete")),e.showDeleteVersion&&o()(M.a,{kind:b.b.DANGER,onPress:e.onDeleteVersionPress
},void 0,Object(m.default)("Delete Version")),e.showGetInfo&&o()(M.a,{onPress:e.onGetInfoPress},void 0,Object(m.default)("Get Info")),(e.showMarkPlayed||e.showMarkUnplayed)&&o()(C.a,{isOpen:n||a,type:e.type,subtype:e.subtype,title:e.title,leafCount:n?e.unviewedLeafCount:e.viewedLeafCount,markUnplayed:a,onConfirm:this.onMarkPlayedConfirm,onCancel:this.onMarkPlayedCancel}),o()(O.a,{isOpen:s,mediaItems:e.mediaItems,onCancel:this.onPlayVersionCancel,onItemSelect:this.onPlayVersionSelect}),o()(j.a,{
serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,metadataItemEntityID:e.metadataItemEntityID,isOpen:l,onModalClose:this.onSettingsClose}))},t}(g.Component);t.a=E},function(e,t){e.exports={menuItem:"MenuItem-menuItem-1s02m",isDisabled:"MenuItem-isDisabled-37rHX",isHidden:"MenuItem-isHidden-t1VSN",default:"MenuItem-default-2SKQ8",primary:"MenuItem-primary-2LuUH",success:"MenuItem-success-3F7NZ",danger:"MenuItem-danger-3P_Df"}},function(e,t){e.exports={
separator:"MenuSeparator-separator-vr6OL"}},function(e,t,n){"use strict";function i(e){var t=e.mediaItems,n=c()(e,["mediaItems"]);return p.a.createElement(b.a,a()({title:Object(h.default)("Play Version"),metricsPage:f.O},n),t.map(function(e,t){var n=[];if(e.bitrate&&n.push(Object(v.default)(e.bitrate)),e.videoResolution){var i=Object(m.a)(e),r=i?i.scanType:null;n.push(Object(g.default)(e.videoResolution,r))}return s()(I.a,{value:t
},t,!!e.title&&e.title,!!e.title&&n.length&&S,n.length&&n.join(", "),!e.title&&!n.length&&Object(h.default)("Unknown"))}))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(4),f=n(35),v=n(403),g=n(331),m=n(393),y=n(86),b=n(678),I=n(679),S=s()(y.a,{});t.a=i},function(e,t,n){"use strict";function i(){return Object(v.createSelector)(Object(m.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{settings:e.preferences,
isSettingsUpdating:e.isSettingsUpdating,hasError:!!e.settingsUpdateError}})}function r(e,t){return{onSubmit:function(n){Object(g.a)(function(){e(Object(b.updateMetadataSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,data:n}))})},onClearError:function(){e(Object(b.clearMetadataSettingsError)({metadataItemEntityID:t.metadataItemEntityID}))}}}var a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),
n(0)),h=n.n(p),f=n(11),v=n(6),g=(n.n(v),n(34)),m=n(21),y=n(2001),b=n(120),I=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentDidUpdate=function(e,t){!e.isSettingsUpdating||this.props.isSettingsUpdating||this.props.hasError||this.props.onModalClose()},t.prototype.componentWillUnmount=function(){this.props.onClearError()},t.prototype.render=function(){return h.a.createElement(y.a,this.props)},t}(p.Component);t.a=Object(f.b)(i,r)(I)
},function(e,t,n){"use strict";function i(e){var t=e.isSettingsUpdating,n=e.hasError,i=e.settings,r=e.onSubmit,o=e.onModalClose;return s()(v.b,{className:C.a.form,onSubmit:r},void 0,s()(m.a,{onModalClose:o},void 0,s()(y.a,{},void 0,Object(d.default)("Settings")),n&&s()(g.a,{errorMessage:Object(d.default)("There was an error saving the settings")}),s()(b.a,{},void 0,i.map(function(e){return u.a.createElement(M.a,a()({key:e.id},e))})),s()(I.a,{},void 0,s()(S.a,{},void 0,s()(h.a,{onPress:o
},void 0,Object(d.default)("Cancel")),s()(f.a,{kind:p.b.PRIMARY,type:"submit",isSpinning:t},void 0,Object(d.default)("Save"))))))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(4),p=n(24),h=n(47),f=n(962),v=n(145),g=n(224),m=n(103),y=n(111),b=n(74),I=n(112),S=n(92),M=n(427),D=n(2012),C=n.n(D);t.a=i},function(e,t){e.exports={sectionError:"FormSectionError-sectionError-3ZuKe",sectionErrorIcon:"FormSectionError-sectionErrorIcon--74cE",
sectionErrorDismiss:"FormSectionError-sectionErrorDismiss-2k5QS"}},function(e,t){e.exports={group:"FormGroup-group-Gtcqp"}},function(e,t){e.exports={label:"FormLabel-label-2aLJ9",hasError:"FormLabel-hasError-3DBzX"}},function(e,t){e.exports={help:"FormHelp-help-3VCuq"}},function(e,t){e.exports={input:"SelectInput-input-x1tNm input-input-1P2Vi",small:"SelectInput-small-2QgMQ input-small-3LyjJ",select:"SelectInput-select-3zFgU",large:"SelectInput-large-8FdD3 input-large-3wNGT",
isDisabled:"SelectInput-isDisabled-1d1Xj",hasError:"SelectInput-hasError-3tk9i"}},function(e,t){e.exports={input:"TextInput-input-1VMum input-input-1P2Vi",small:"TextInput-small-2i2et input-small-3LyjJ",large:"TextInput-large-2sz70 input-large-3wNGT",isDisabled:"TextInput-isDisabled-3hj7I input-isDisabled-2FiSY",hasError:"TextInput-hasError-3FVrz input-hasError-1to6Q"}},function(e,t,n){"use strict";function i(e){
var t=e.inputClassName,n=e.name,i=e.labelText,r=e.helpText,o=e.showErrors,l=e.errors,u=c()(e,["inputClassName","name","labelText","helpText","showErrors","errors"]);return s()(f.a,{},void 0,s()(v.a,{showErrors:o,errors:l,name:n,labelText:i}),p.a.createElement(m.a,a()({className:t,name:n,type:"number",hasError:o},u)),r&&s()(g.a,{},void 0,r))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(146),f=n(181),v=n(429),g=n(353),m=n(996),y=n(2009),b=n.n(y)
;i.defaultProps={inputClassName:b.a.input},t.a=Object(h.a)(i)},function(e,t){e.exports={input:"NumberInputGroup-input-yz7KY TextInput-input-1VMum input-input-1P2Vi"}},function(e,t){e.exports={input:"CheckInput-input-1Pi_2",label:"CheckInput-label-2yG4r",small:"CheckInput-small-3zAF6",large:"CheckInput-large-3wPNU",isDisabled:"CheckInput-isDisabled-C1Lz-",hasError:"CheckInput-hasError-1V3ZU"}},function(e,t){e.exports={sliderContainer:"SliderInputGroup-sliderContainer-2Dx08 input-input-1P2Vi",
slider:"SliderInputGroup-slider-1x6JA Slider-slider-2oLVT",sliderValue:"SliderInputGroup-sliderValue-2oLoo"}},function(e,t){e.exports={form:"SettingsModalContent-form-3-N4q"}},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(Object(S.a)(),Object(M.a)(),D.a,C.a,I.a,function(e,t,n,i,r){var a=t.title,o=t.summary,s=t.originallyAvailableAt,l=t.addedAt;return{title:a,summary:o,index:e.playQueueSelectedItemOffset,size:e.playQueueTotalCount,
dateTaken:s||Object(b.default)(l,"YYYY-MM-DD"),canEdit:Object(O.e)(n,i,r,t)}})}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(354)),I=n(144),S=n(935),M=n(21),D=n(48),C=n(37),O=n(201),j=n(120),P=n(2014),w={dispatchChangeMetadataItemField:j.changeMetadataItemField},T=function(e){function t(){var n,i,r;c()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s]
;return n=i=d()(this,e.call.apply(e,[this].concat(o))),i.onTitleBlur=function(e){i._updateField("title",e.target.value)},i.onSummaryBlur=function(e){i._updateField("summary",e.target.value)},r=n,d()(i,r)}return h()(t,e),t.prototype._updateField=function(e,t){this.props.dispatchChangeMetadataItemField({providerEntityID:this.props.providerEntityID,metadataItemEntityID:this.props.metadataItemEntityID,name:e,value:t})},t.prototype.render=function(){
var e=this.props,t=(e.dispatchChangeMetadataItemField,s()(e,["dispatchChangeMetadataItemField"]));return g.a.createElement(P.a,a()({},t,{onTitleBlur:this.onTitleBlur,onSummaryBlur:this.onSummaryBlur,onPositionChange:this.onPositionChange}))},t}(v.Component);t.a=Object(m.b)(i,w)(T)},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.summary,i=e.dateTaken,r=e.index,o=e.size,s=e.canEdit,u=e.isEditing,h=e.onTitleBlur,g=e.onSummaryBlur,m=!(!t||!t.length),y=!(!n||!n.length),b=!(s&&u)
;return a()("div",{className:f.a.container},void 0,a()("div",{className:f.a.info},void 0,(u||m)&&a()("div",{className:f.a.title},void 0,a()(p.a,{"data-qa-id":"photoName",name:"titleInput",className:f.a.textInput,value:t,placeholder:Object(l.default)("Title"),isDisabled:b,onBlur:h})),a()("div",{className:f.a.subtitle,"data-qa-id":"dateTaken"},void 0,!!i&&a()("span",{},void 0,Object(c.default)(i),v),a()("span",{},void 0,!!o&&Object(l.default)("{currentIndex} of {size}",{currentIndex:r+1,size:o
})))),(u||y)&&a()("div",{className:f.a.summary},void 0,a()(d.a,{name:"summaryInput",className:f.a.textArea,value:n,placeholder:Object(l.default)("Description"),isDisabled:b,rows:2,onBlur:g})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(254),u=n(86),d=n(2015),p=n(226),h=n(2017),f=n.n(h),v=a()(u.a,{});t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),
n(0)),v=n.n(f),g=n(61),m=n(2016),y=n.n(m),b=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onChange=function(e){i.props.onChange(e.target.value)},r=n,u()(i,r)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.errorClassName,i=e.disabledClassName,a=(e.initialValue,
e.isDisabled),s=e.size,l=e.name,c=e.hasError,u=o()(e,["className","errorClassName","disabledClassName","initialValue","isDisabled","size","name","hasError"]);return v.a.createElement("textarea",r()({},u,{id:l,name:l,disabled:a,className:(t||"")+" "+(y.a[s]||"")+" "+(a&&i||"")+" "+(c&&n||""||""),onChange:this.onChange}))},t}(f.Component);b.defaultProps={className:y.a.textArea,errorClassName:y.a.hasError,disabledClassName:y.a.isDisabled,isDisabled:!1,size:g.LARGE,hasError:!1,rows:2},t.a=b
},function(e,t){e.exports={textArea:"TextArea-textArea-2jx-X input-input-1P2Vi",small:"TextArea-small-1qB4k",large:"TextArea-large-3b8XT",isDisabled:"TextArea-isDisabled-33gHr input-isDisabled-2FiSY",hasError:"TextArea-hasError-2KSz1 input-hasError-1to6Q"}},function(e,t){e.exports={container:"PhotoMetadataControls-container-1FKfK",textInput:"PhotoMetadataControls-textInput-3wTdg TextInput-input-1VMum input-input-1P2Vi",
textArea:"PhotoMetadataControls-textArea-2FczX TextArea-textArea-2jx-X input-input-1P2Vi",info:"PhotoMetadataControls-info-3cDte",title:"PhotoMetadataControls-title-mMl9S",summary:"PhotoMetadataControls-summary-3KD9K",subtitle:"PhotoMetadataControls-subtitle-2P7or"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(l.a,c.a,s.a,Object(o.a)(),function(e,t,n,i){return{canEdit:Object(u.e)(e,t,n,i)}})}var r=n(11),a=n(6),o=(n.n(a),
n(21)),s=n(144),l=n(48),c=n(37),u=n(201),d=n(2019);t.a=Object(r.b)(i)(d.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.isEditing,i=e.canEdit,r=e.onPress;return i?a()(c.a,{"data-qa-id":"photoEditButton",className:t,isActive:n,icon:"plex-icon-toolbar-edit-560",title:Object(l.default)("Edit"),onPress:r}):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(253);t.a=i},function(e,t,n){"use strict";function i(){
return Object(o.createSelector)(Object(c.a)(),u.a,l.a,Object(s.a)(),function(e,t,n,i){return{canFavorite:Object(p.f)(e,t,n,i),canUnfavorite:Object(p.o)(e,t,n,i)}})}function r(e,t){var n={providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID};return{onFavoritePress:function(){e(Object(d.favoriteMetadataItem)(n))},onUnfavoritePress:function(){e(Object(d.unfavoriteMetadataItem)(n))}}}var a=n(11),o=n(6),s=(n.n(o),n(21)),l=n(144),c=n(42),u=n(37),d=n(120),p=n(201),h=n(2021)
;t.a=Object(a.b)(i,r)(h.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.canFavorite,i=e.canUnfavorite,r=e.onFavoritePress,o=e.onUnfavoritePress;return n||i?a()(c.a,{"data-qa-id":"photoFavoriteButton",className:t,icon:n?"plex-icon-favorite-empty-560":"plex-icon-favorite-full-560",title:n?Object(l.default)("Add to Favorites"):Object(l.default)("Remove from Favorites"),onPress:n?r:o}):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(253);t.a=i
},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(339)),g=n(22),m=n(169),y={width:"100%",height:"100%",top:0,position:"absolute",zIndex:0},b=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onPlayPress=function(){i.props.onPlayPress&&i.props.onPlayPress(i.props.index)},r=n,
u()(i,r)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.serverEntityID,i=e.providerEntityID,a=e.url,s=e.dimension,l=e.onPlayPress;return a?o()(g.a,{className:t,isDisabled:!l,onPress:this.onPlayPress},void 0,o()(m.a,{serverEntityID:n,providerEntityID:i,url:a,width:s,height:s,minSize:!0,style:y,background:!0,transition:!0,transitionProps:r()({},v.a)})):null},t}(f.Component);t.a=b},function(e,t){e.exports={controls:"PhotoControls-controls-3-pBn",
expandButton:"PhotoControls-expandButton-orxt_ PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7",container:"PhotoControls-container-1sk-e",thumbContainer:"PhotoControls-thumbContainer-1LvGp",thumb:"PhotoControls-thumb-1eNjV",actions:"PhotoControls-actions-OBY-P",actionButton:"PhotoControls-actionButton-1569I PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7",
closeButton:"PhotoControls-closeButton-oN4PS PhotoControls-actionButton-1569I PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7"}},function(e,t){e.exports={seekBar:"PhotoMiniPlayer-seekBar-15sVh SeekBar-seekBar-2UK3i Slider-slider-2oLVT"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(59)),f=n(72),v=n(85),g=n(24),m=n(39),y=n(680),b=n(2027),I=n(2029),S=n(2045),M=n(969),D=n(2048),C=n(2060),O=n(2069),j=n.n(O),P=function(e){function t(n,i){o()(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.setState({isInformationOpen:!r.state.isInformationOpen})},r.onInteraction=function(e){r.setState({hadRecentInteraction:!0}),r._startInteractionTimer()
},r.onInteractionTimeout=function(){r.setState({hadRecentInteraction:!1}),r._stopInteractionTimer()},r.onContentMeasure=function(e){r.props.onPlaybackDimensionsChange(e)},r.onControlsMenuChange=function(e){r.setState({isControlsMenuOpen:e})},r.onCastMenuChange=function(e){r.setState({isCastMenuOpen:e})},r.state={isPhotoStripOpen:!1,isInformationOpen:!1,isControlsMenuOpen:!1,isCastMenuOpen:!1,hadRecentInteraction:!1},r}return u()(t,e),t.prototype.componentDidMount=function(){
this._startInteractionTimer()},t.prototype.componentWillUnmount=function(){this._stopInteractionTimer()},t.prototype._startInteractionTimer=function(){this._stopInteractionTimer(),this._interactionTimeoutID=setTimeout(this.onInteractionTimeout,2e3)},t.prototype._stopInteractionTimer=function(){this._interactionTimeoutID&&clearTimeout(this._interactionTimeoutID)},t.prototype.render=function(){
var e=this.state,t=e.isPhotoStripOpen,n=e.isInformationOpen,i=e.hadRecentInteraction,a=this.props,o=a.serverEntityID,s=a.providerEntityID,l=a.playQueueItemEntityIDs,c=a.playQueueItemEntityID,u=a.isPlayQueueLoading,d=a.currentMediaType,p=a.size,O=a.firstIndex,P=a.width,w=a.height,T=a.canSkipPrevious,E=a.canSkipNext,x=a.errorMessage,N=a.positionMilliseconds,A=a.bufferStartMilliseconds,L=a.bufferEndMilliseconds,k=a.isFullscreen,_=a.isEditing,R=a.isMediaLoading,z=a.isBuffering,U=a.onExitFullscreenPress,B=a.onEnterFullscreenPress,V=a.onEditToggle,F=a.onPlayNextItem,Q=a.onPlayPreviousItem,H=a.onPlayItem,Y=this.state,W=Y.isControlsMenuOpen,G=Y.isCastMenuOpen,K=t||n,q=!(_||K||i||W||G),Z=!i&&!G,X=K,J=d===h.c,$=!J&&(R||z)
;return r()("div",{"data-qa-id":"photoPlayerContainer",className:(j.a.fullPlayer||"")+" "+(q&&j.a.hideControls||"")+" "+(X&&j.a.dockControls||""||""),onMouseMove:this.onInteraction,onMouseDown:this.onInteraction,onTouchStart:this.onInteraction,onTouchEnd:this.onInteraction},void 0,J&&r()(b.a,{playerType:v.b,playQueueItemEntityID:c}),r()("div",{className:j.a.player},void 0,r()("div",{className:j.a.main},void 0,r()(f.a,{className:j.a.content,onMeasure:this.onContentMeasure},void 0,$&&r()("div",{
className:j.a.spinner},void 0,r()(m.a,{size:g.e.LARGE})),r()(C.a,{serverEntityID:o,providerEntityID:s,playQueueItemEntityIDs:l,playQueueItemEntityID:c,firstIndex:O,size:p,errorMessage:x,width:P,height:w}),!u&&r()(I.a,{hideOverlays:Z,isPhoto:J,isFullscreen:k,canSkipNext:E,canSkipPrevious:T,onPlayNextItem:F,onPlayPreviousItem:Q,onCastMenuChange:this.onCastMenuChange,onEnterFullscreenPress:B,onExitFullscreenPress:U})),t&&r()(S.a,{className:j.a.mainFooter,serverEntityID:o,providerEntityID:s,
playQueueItemEntityIDs:l,playQueueItemEntityID:c,firstIndex:O,size:p,onPhotoPress:H})),n&&r()(D.a,{className:j.a.aside,playerType:v.b})),!u&&r()("div",{className:j.a.controls},void 0,r()(y.a,{className:j.a.seekBar,playerType:v.b,positionMilliseconds:N,bufferStartMilliseconds:A,bufferEndMilliseconds:L,showBuffer:!0}),r()(M.a,{playerType:v.b,isPhotoStripOpen:t,isPhotoInformationOpen:n,isEditing:_,showPhotoStripButton:!0,showPhotoInformationButton:!0,
onPhotoStripTogglePress:this.onPhotoStripTogglePress,onPhotoInformationTogglePress:this.onPhotoInformationTogglePress,onEditTogglePress:V,onControlsMenuChange:this.onControlsMenuChange})))},t}(p.Component);t.a=P},function(e,t){e.exports={container:"Measure-container-3yONE",scrollContainer:"Measure-scrollContainer-1c6dy",expandContent:"Measure-expandContent-zsLw6",shrinkContent:"Measure-shrinkContent-303GS Measure-expandContent-zsLw6"}},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(Object(s.a)(),Object(l.a)(),c.a,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],i=t.metadataItem,r=n[i],a=r.type,s=r.Media,l=s[0],c=a===o.c,u=l&&l.Part&&l.Part[0],d=u&&u.key;return{serverEntityID:e.serverEntityID,imageUrl:c?null:d}})}var r=n(11),a=n(6),o=(n.n(a),n(28)),s=n(44),l=n(119),c=n(110),u=n(1e3);t.a=Object(r.b)(i)(u.a)},function(e,t){e.exports={backgroundContainer:"FullPlayerBackground-backgroundContainer-2UnXo"}
},function(e,t,n){"use strict";function i(e){var t=e.hideOverlays,n=e.canSkipPrevious,i=e.canSkipNext,r=e.isFullscreen,o=e.isPhoto,s=e.onPlayNextItem,h=e.onPlayPreviousItem,v=e.onCastMenuChange,g=e.onEnterFullscreenPress,m=e.onExitFullscreenPress;return a()("div",{className:t&&f.a.hideOverlays},void 0,!o&&a()(d.a,{className:f.a.playButton,playerType:u.b,isFullscreen:r,onEnterFullscreenPress:g,onExitFullscreenPress:m}),a()("div",{className:f.a.topBar},void 0,a()(p.a,{playerType:u.b,
isFullscreen:r,onCastMenuChange:v,onEnterFullscreenPress:g,onExitFullscreenPress:m})),a()(c.a,{className:f.a.leftButton,icon:"plex-icon-hub-prev-560",title:Object(l.default)("Previous Photo"),isDisabled:!n,onPress:h}),a()(c.a,{className:f.a.rightButton,icon:"plex-icon-hub-next-560",title:Object(l.default)("Next Photo"),isDisabled:!i,onPress:s}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(352),u=n(85),d=n(1001),p=n(1002),h=n(2044),f=n.n(h);i.defaultProps={hideOverlays:!1},
t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(173),v=n(2032),g=n.n(v),m=175,y=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onPress=function(e){r._cancelPlayPause(),r.setState(function(e){return{isPaused:!e.isPaused}}),r._playPauseTimeoutID=setTimeout(function(){r._playPauseTimeoutID=null,r.props.isPaused!==r.state.isPaused&&r.props.onTogglePlayPress(e)},m)},
r.onDoubleClick=function(e){r.props.isFullscreen?r.props.onExitFullscreenPress():r.props.onEnterFullscreenPress()},r.state={isPaused:n.isPaused},r._playPauseTimeoutID=null,r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){e.isPaused===this.state.isPaused||this._playPauseTimeoutID||this.setState({isPaused:e.isPaused})},t.prototype.componentWillUnmount=function(){this._cancelPlayPause()},t.prototype._cancelPlayPause=function(){
this._playPauseTimeoutID&&(clearTimeout(this._playPauseTimeoutID),this._playPauseTimeoutID=null)},t.prototype.render=function(){var e=this.props.className,t=this.state.isPaused;return r()(f.a,{className:(e||"")+" "+((t?g.a.playButton:g.a.pauseButton)||""),circleClassName:g.a.playCircle,iconClassName:g.a.playIcon,"aria-label":t?Object(h.default)("Play"):Object(h.default)("Pause"),onPress:this.onPress,onDoubleClick:this.onDoubleClick})},t}(p.Component);t.a=y},function(e,t){e.exports={
playButton:"PlayButton-playButton-3WX8X",playCircle:"PlayButton-playCircle-3Evfd",playIcon:"PlayButton-playIcon-dt3sk"}},function(e,t){e.exports={playButton:"PlayPauseOverlay-playButton-25OfW PlayButton-playButton-3WX8X",pauseButton:"PlayPauseOverlay-pauseButton-hSFg5 PlayPauseOverlay-playButton-25OfW PlayButton-playButton-3WX8X",playCircle:"PlayPauseOverlay-playCircle-3ydPY PlayButton-playCircle-3Evfd",playIcon:"PlayPauseOverlay-playIcon-21tOf PlayButton-playIcon-dt3sk"}},function(e,t,n){
"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(15)),f=n(4),v=n(253),g=n(2034),m=n(2043),y=n.n(m),b=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onRouteChange=function(){i.props.onCollapsePress()},r=n,l()(i,r)}return u()(t,e),t.prototype.componentDidMount=function(){
Object(h.d)("appModel").on("change:history",this.onRouteChange)},t.prototype.componentWillUnmount=function(){Object(h.d)("appModel").off("change:history",this.onRouteChange)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.showRemotePlayer,i=e.hasFullscreen,a=e.isFullscreen,o=e.remotePlayerName,s=e.remotePlayerProduct,l=e.onCollapsePress,c=e.onCastMenuChange,u=e.onEnterFullscreenPress,d=e.onExitFullscreenPress;return r()("div",{className:t},void 0,r()("div",{},void 0,r()(v.a,{
className:y.a.topButton,"data-qa-id":"minimizePlayerButton",icon:"plex-icon-player-minimize-560",title:Object(f.default)("Minimize Player"),onPress:l}),o&&r()("span",{className:y.a.remotePlayerName},void 0,Object(f.default)("Casting to {playerName}",{playerName:o})),o&&s&&r()("span",{className:y.a.remotePlayerProduct},void 0,"(",s,")")),r()("div",{},void 0,n&&r()(g.a,{className:y.a.castButton,onMenuChange:c}),i&&a&&r()(v.a,{className:y.a.topButton,"data-qa-id":"windowedButton",
icon:"plex-icon-player-windowed-560",title:Object(f.default)("Exit Fullscreen"),onPress:d}),i&&!a&&r()(v.a,{className:y.a.topButton,"data-qa-id":"fullscreenButton",icon:"plex-icon-player-fullscreen-560",title:Object(f.default)("Enter Fullscreen"),onPress:u})))},t}(p.Component);b.defaultProps={className:y.a.topControls},t.a=b},function(e,t,n){"use strict";function i(e){return{onDiscoverPlayers:function(t){e(s.e())},onPlayerSelect:function(e){
Object(o.d)("remotePlexPlayerManager").requestSession(e)},onCastPress:function(t){e(l.d())},onDisconnectPress:function(t){e(s.i())}}}var r=n(6),a=(n.n(r),n(11)),o=n(15),s=n(222),l=n(505),c=n(2037),u=Object(r.createSelector)(function(e){return e.isCastApiAvailable},function(e){return e.remotePlayer},function(e){return e.players},function(e,t,n){return{isCastApiAvailable:e,isRemotePlayer:!!t,remotePlayerName:t&&t.friendlyName,remotePlayerProduct:t&&t.product,players:n}});t.a=Object(a.b)(u,i)(c.a)
},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2036),o=n(659),s=n(16),l=n(18),c=l.a.extend({sessionAttrs:{protocol:s.a.string.isRequired},syncedAttrs:{friendlyName:s.a.string.isRequired,capabilities:s.a.array,volume:s.a.integer.isRequired},defaults:{protocol:o.a,volume:100},augmentResponse:function(e){return r()({},e,{friendlyName:Object(a.a)(e.friendlyName)})}});t.a=c},function(e,t,n){"use strict";function i(e){var t=e;return a()(s).forEach(function(e){
t=t.replace(new RegExp(Object(o.a)("&"+e+";"),"g"),s[e])}),t}t.a=i;var r=n(50),a=n.n(r),o=n(215),s={amp:"&",apos:"'","#x27":"'","#x2F":"/","#39":"'","#47":"/",lt:"<",gt:">",nbsp:" ",quot:'"'}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(54),v=n(26),g=n(291),m=n(75),y=n(2040),b=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onPress=function(){
r.setState(function(e,t){return{isMenuOpen:!e.isMenuOpen}},function(){r.props.onMenuChange&&r.props.onMenuChange(r.state.isMenuOpen)})},r.onMenuClose=function(){r.setState({isMenuOpen:!1},function(){r.props.onMenuChange&&r.props.onMenuChange(!1)})},r.state={isMenuOpen:!1},r._menuButtonID=Object(f.a)(),r}return u()(t,e),t.prototype.componentDidUpdate=function(e,t){this.state.isMenuOpen&&!t.isMenuOpen&&this.props.onDiscoverPlayers()},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.isCastApiAvailable,i=e.isRemotePlayer,a=e.remotePlayerName,o=e.remotePlayerProduct,s=e.players,l=e.onPlayerSelect,c=e.onCastPress,u=e.onDisconnectPress;return r()(g.a,{id:this._menuButtonID,className:t,isSelected:i,onPress:this.onPress},void 0,r()(v.a,{name:i?"plex-icon-player-companion-cast-on-560":"plex-icon-player-companion-cast-560",title:Object(h.default)("Select Player")}),r()(m.a,{target:this._menuButtonID,isOpen:this.state.isMenuOpen,
onMenuClose:this.onMenuClose},void 0,r()(y.a,{isCastApiAvailable:n,isRemotePlayer:i,remotePlayerName:a,remotePlayerProduct:o,players:s,onPlayerSelect:l,onCastPress:c,onDisconnectPress:u})))},t}(p.Component);t.a=b},function(e,t){e.exports={disclosureArrow:"DisclosureArrow-disclosureArrow-1KPaB",default:"DisclosureArrow-default-_QTDZ",primary:"DisclosureArrow-primary-2w1Te",success:"DisclosureArrow-success-1gS8P",danger:"DisclosureArrow-danger-3OtVy",small:"DisclosureArrow-small-lqtG6",
up:"DisclosureArrow-up-L-Dw3",right:"DisclosureArrow-right-2D3Mw",medium:"DisclosureArrow-medium-20Idw",large:"DisclosureArrow-large-2JBrD",down:"DisclosureArrow-down-3lf_G DisclosureArrow-up-L-Dw3",left:"DisclosureArrow-left-3Q0NG DisclosureArrow-right-2D3Mw",isSelected:"DisclosureArrow-isSelected-QMJhD"}},function(e,t){e.exports={disclosureArrowButton:"DisclosureArrowButton-disclosureArrowButton-11LSb",isSelected:"DisclosureArrowButton-isSelected-1aPl5",
small:"DisclosureArrowButton-small-2fBp-",medium:"DisclosureArrowButton-medium-3zt1W",large:"DisclosureArrowButton-large-2E9J1",disclosureArrow:"DisclosureArrowButton-disclosureArrow-1Gz1v DisclosureArrow-disclosureArrow-1KPaB",down:"DisclosureArrowButton-down-2EHTT",left:"DisclosureArrowButton-left-1_7OF",up:"DisclosureArrowButton-up-3CeKS",right:"DisclosureArrowButton-right-3r62H"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(26),v=n(156),g=n(289),m=n(2041),y=n(2042),b=n.n(y),I=r()(g.a,{},"separator"),S=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onCastPress=function(e){i.props.onCastPress(e),i.props.onPress(e)},i.onDisconnectPress=function(e){i.props.onDisconnectPress(e),
i.props.onPress(e)},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.isCastApiAvailable,n=e.isRemotePlayer,i=e.remotePlayerName,a=e.remotePlayerProduct,o=e.players,s=e.onPress,l=e.onPlayerSelect,c=!n&&t,u=!n&&!!o.length,d=!n&&!c&&!u;return r()("div",{},void 0,n&&[r()("div",{className:b.a.remotePlayerName},"name",i),r()("div",{className:b.a.remoteProduct},"product",a),r()(v.a,{onPress:this.onDisconnectPress},"disconnect",r()(f.a,{name:"plex-icon-ban-560",
className:b.a.disconnectIcon,"aria-label":Object(h.default)("Disconnect")}),Object(h.default)("Disconnect"))],c&&r()(v.a,{onPress:this.onCastPress},"cast",Object(h.default)("Cast...")),c&&u&&o.length&&I,u&&o.map(function(e){var t=e.machineIdentifier,n=e.friendlyName,i=e.product;return r()(m.a,{machineIdentifier:t,onPress:s,onPlayerSelect:l},t,r()("div",{},void 0,n),r()("div",{className:b.a.remotePlayerProduct},void 0,i))}),d&&r()("div",{className:b.a.emptyMessage
},void 0,Object(h.default)("No players found")))},t}(p.Component);t.a=S},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(156)),f=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onPress=function(e){i.props.onPlayerSelect(i.props.machineIdentifier),i.props.onPress(e)},r=n,l()(i,r)}
return u()(t,e),t.prototype.render=function(){return r()(h.a,{onPress:this.onPress},void 0,this.props.children)},t}(p.Component);t.a=f},function(e,t){e.exports={remotePlayerName:"RemotePlayerMenuItems-remotePlayerName-s8cLV",remoteProduct:"RemotePlayerMenuItems-remoteProduct-twS92",remotePlayerProduct:"RemotePlayerMenuItems-remotePlayerProduct-3AcsN",emptyMessage:"RemotePlayerMenuItems-emptyMessage--flM8",disconnectIcon:"RemotePlayerMenuItems-disconnectIcon-1792p"}},function(e,t){e.exports={
topControls:"FullPlayerTopControls-topControls-2gkcE",topButton:"FullPlayerTopControls-topButton-2iGrJ PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7",castButton:"FullPlayerTopControls-castButton-1CwQ3 FullPlayerTopControls-topButton-2iGrJ PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7 DisclosureArrowButton-disclosureArrowButton-11LSb",remotePlayerName:"FullPlayerTopControls-remotePlayerName-32QaK",remotePlayerProduct:"FullPlayerTopControls-remotePlayerProduct-2k5kg"}
},function(e,t){e.exports={button:"PhotoFullPlayerOverlays-button-1anMg",leftButton:"PhotoFullPlayerOverlays-leftButton-2bCve PhotoFullPlayerOverlays-button-1anMg",rightButton:"PhotoFullPlayerOverlays-rightButton-3cTEz PhotoFullPlayerOverlays-button-1anMg",topBar:"PhotoFullPlayerOverlays-topBar-45GYU",hideOverlays:"PhotoFullPlayerOverlays-hideOverlays-eccNe",playButton:"PhotoFullPlayerOverlays-playButton-35mXL"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(5),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(72)),g=n(93),m=n(2046),y=n(998),b=n(2047),I=n.n(b),S=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onMeasure=function(e){var t=e.width,n=e.height;r.setState({isMeasured:!0,width:t,height:n})},r.state={isMeasured:!1,width:null,height:null},r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.className,n=e.serverEntityID,i=e.providerEntityID,a=e.playQueueItemEntityIDs,o=e.playQueueItemEntityID,s=e.firstIndex,l=e.size,c=e.onPhotoPress,u=this.state,d=u.isMeasured,h=u.width,f=u.height,b=a.indexOf(o)+s,S=[],M=[],D=0;if(d){D=Math.ceil(f);var C=Math.ceil(h/D),O=Object(m.a)({index:b,renderableWindow:C,length:l,cellPadding:2,cellWidth:D,width:h});M=p.a.range(O.renderStartIndex,O.renderEndIndex+1),S=O.positions}return r()("div",{className:(t||"")+" "+(I.a.strip||""),
"data-qa-id":"photoStripContainer"},void 0,r()(v.a,{className:I.a.thumbs,onMeasure:this.onMeasure},void 0,d&&M.map(function(e){var t=S[e],o=b===e,l=a[e-s];return r()(g.a,{className:I.a.cell,cellY:0,cellX:t,cellWidth:D,cellHeight:D},e,r()("div",{className:(I.a.thumbContainer||"")+" "+(o&&I.a.isSelected||""||""),"data-qa-id":"photoStripItem"},void 0,l&&r()(y.a,{className:I.a.thumb,serverEntityID:n,providerEntityID:i,playQueueItemEntityID:l,dimension:D-4,index:e-s,onPlayPress:c})))})))},t
}(f.Component);t.a=S},function(e,t,n){"use strict";function i(e){var t=e.index,n=e.length,i=e.renderableWindow,r=void 0===i?n:i,a=e.cellPadding,o=void 0===a?0:a,s=e.cellWidth,l=e.width,c=l/2,u=s/2,d=n*s+(n-1)*o,p=t*(s+o)-(c-u);d>l&&(p=Math.min(Math.max(p,0),d-l));for(var h=[],f=Math.max(0,t-r),v=Math.min(n-1,t+r),g=f;g<=v;g++)h[g]=g*(s+o)-p;return{renderStartIndex:f,renderEndIndex:v,positions:h}}t.a=i},function(e,t){e.exports={strip:"PhotoStrip-strip-q6m2B",thumbs:"PhotoStrip-thumbs-2iLLA",
cell:"PhotoStrip-cell-NRVDi",thumbContainer:"PhotoStrip-thumbContainer-1kU-f",isSelected:"PhotoStrip-isSelected-3exw8",thumb:"PhotoStrip-thumb-eGqcd",thumbOverlay:"PhotoStrip-thumbOverlay-gC5wm"}},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(Object(m.a)(),Object(y.a)(),function(e,t){var n=t.Media,i=void 0===n?[]:n,r=t.Geolocation,a=void 0===r?{}:r,o=t.type,s=a.Coordinates,l={serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,
metadataItemEntityID:t.entityID,hubEntityIDs:e.relatedHubs||[],type:o,hasGeolocation:!!s};if(s&&(l.latitude=parseFloat(s.latitude),l.longitude=parseFloat(s.longitude)),i.length){var c=i[0],u=c.Part;l.size=u&&u[0].size,l.aperture=c.aperture,l.exposure=c.exposure,l.iso=c.iso,l.model=c.model,l.width=c.width,l.height=c.height,l.container=c.container}return l})}var r=n(13),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),
n(44)),y=n(221),b=n(1003),I=n(2049),S={dispatchFetchRelatedPhotos:b.a},M=function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchFetchRelatedPhotos()},t.prototype.componentDidUpdate=function(e){e.metadataItemEntityID!==this.props.metadataItemEntityID&&this.props.dispatchFetchRelatedPhotos()},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchRelatedPhotos,
a()(e,["dispatchFetchRelatedPhotos"]));return f.a.createElement(I.a,t)},t}(h.Component);t.a=Object(v.b)(i,S)(M)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.serverEntityID,i=e.providerEntityID,r=e.hubEntityIDs,o=e.type,s=e.model,u=e.width,f=e.height,m=e.container,y=e.iso,b=e.aperture,I=e.exposure,S=e.size,M=e.hasGeolocation,D=e.latitude,C=e.longitude;return a()("div",{className:(t||"")+" "+(v.a.photoInformation||"")},void 0,a()(d.a,{className:v.a.scroller,autoScroll:!0
},void 0,a()("div",{className:v.a.exif},void 0,a()("div",{className:v.a.line},void 0,s?a()("div",{},void 0,s):a()("div",{},void 0,"clip"===o?Object(l.default)("Video"):Object(l.default)("Photo")),g),a()("div",{className:v.a.line},void 0,!(!u||!f)&&a()("div",{},void 0,u," \xd7 ",f),!!S&&a()("div",{},void 0,Object(c.a)(S)),m&&a()("div",{className:v.a.format},void 0,m)),!!y&&a()("div",{className:v.a.line
},void 0,a()("div",{},void 0,Object(l.default)("ISO")," ",y),a()("div",{},void 0,b),a()("div",{},void 0,I))),a()(p.a,{serverEntityID:n,providerEntityID:i,hubEntityIDs:r})),M&&a()(h.a,{className:v.a.map,latitude:D,longitude:C}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(991),u=n(26),d=n(80),p=n(2050),h=n(2056),f=n(2059),v=n.n(f),g=a()(u.a,{name:"plex-icon-camera-560"});t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.hubEntityIDs;return i&&i.length?a()("div",{className:d.a.container,"data-qa-id":"relatedPhotosContainer"},void 0,a()("div",{className:d.a.title},void 0,Object(l.default)("Related Photos")),a()("div",{className:d.a.list},void 0,i.map(function(e){return a()(c.a,{serverEntityID:t,providerEntityID:n,hubEntityID:e},e)}))):p}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(2051),u=n(2055),d=n.n(u),p=a()("div",{});t.a=i},function(e,t,n){
"use strict";function i(){return Object(g.createSelector)(Object(b.a)(),Object(S.a)(),Object(I.a)(),function(e,t,n){return{hubLink:Object(M.a)(e,t,n),summary:n.summary,totalSize:n.totalSize,url:n.thumb,icon:n.icon}})}var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(85)),y=n(60),b=n(42),I=n(692),S=n(79),M=n(693),D=n(2052),C=function(e){function t(){var n,i,r;s()(this,t)
;for(var a=arguments.length,o=Array(a),l=0;l<a;l++)o[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(o))),i.onPress=function(){window.location.href=i.props.hubLink,i.props.endPlayback({playerType:m.b})},r=n,c()(i,r)}return d()(t,e),t.prototype.render=function(){return f.a.createElement(D.a,a()({onPress:this.onPress},this.props))},t}(h.Component);t.a=Object(v.b)(i,{endPlayback:y.f})(C)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.summary,r=e.totalSize,o=e.url,s=e.icon,l=e.onPress;return a()("div",{className:h.a.hub,"data-qa-id":"relatedPhotoItem"},void 0,a()(u.a,{onPress:l},void 0,a()("div",{className:h.a.container},void 0,a()("div",{className:h.a.overlay},void 0,a()("div",{className:h.a.title,"data-qa-id":"relatedPhotoName"},void 0,i),a()("div",{className:h.a.count,"data-qa-id":"relatedPhotoCount"},void 0,s?a()(c.a,{className:h.a.icon,serverEntityID:t,providerEntityID:n,
url:s,width:f,height:f}):v,a()("span",{},void 0," ",r))),a()("div",{className:h.a.body},void 0,a()(d.a,{serverEntityID:t,url:o})))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(26)),c=n(169),u=n(22),d=n(2053),p=n(2054),h=n.n(p),f=14,v=a()(l.a,{name:"plex-icon-tag-auto-560"});t.a=i},function(e,t,n){"use strict";function i(e){return a()("div",{style:u},void 0,a()(l.a,{serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,url:e.url,width:c,height:c,minSize:!0,background:!0,
transition:!0}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(169)),c=110,u={width:c,height:c};t.a=i},function(e,t){e.exports={hub:"PhotoHub-hub-3ROVk",container:"PhotoHub-container-2-eNS",body:"PhotoHub-body-2A7LS",overlay:"PhotoHub-overlay-1cF_S",title:"PhotoHub-title-1Js3E",count:"PhotoHub-count-30JDL",icon:"PhotoHub-icon-1yZ1e"}},function(e,t){e.exports={container:"PhotoHubList-container-1-l_q",title:"PhotoHubList-title-1lMNL",list:"PhotoHubList-list-3GW3U"}},function(e,t,n){
"use strict";(function(e){var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(19),v=n(2057),g=n(39),m=n(2058),y=n.n(m),b=f.join("https://tiles.unwiredlabs.com/v/o.json",{token:"59a999cb8f28fb0a54eb"}),I="https://www.google.com/maps/@",S=r()(g.a,{}),M=function(t){function n(i,r){o()(this,n);var a=l()(this,t.call(this,i,r));return a.onMapRender=function(){a._map.loaded()&&(a._map.addControl(new e.mapboxgl.AttributionControl({compact:!0
})),a._map.off("render",a.onMapRender),a.setState({isTilesLoading:!1}))},a.onMarkerClick=function(){var e={api:1,map_action:"map",center:a.props.latitude+","+a.props.longitude};window.open(f.join(I,e))},a.state={isTilesLoading:!0},a}return u()(n,t),n.prototype.componentDidMount=function(){this.props.isExternalsLoaded&&this._addMap()},n.prototype.componentWillReceiveProps=function(e){if(e.isExternalsLoaded){
var t=this.props,n=t.isExternalsLoaded,i=t.latitude,r=t.longitude,a=!n,o=i!==e.latitude,s=r!==e.longitude,l=o||s;a&&!this._map?this._addMap(e):l&&this._moveMap(e)}},n.prototype.componentWillUnmount=function(){this._markerElement&&this._markerElement.removeEventListener("click",this.onMarkerClick),this._map&&this._map.off("render",this.onMapRender)},n.prototype._addMap=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=[t.longitude,t.latitude]
;this._map=new e.mapboxgl.Map({container:"map",style:b,attributionControl:!1,interactive:!1,zoom:12,center:n}),this._map.on("render",this.onMapRender),this._markerElement=document.createElement("div"),this._markerElement.className=y.a.pin,this._markerElement.addEventListener("click",this.onMarkerClick),this._marker=new e.mapboxgl.Marker(this._markerElement).setLngLat(n).addTo(this._map)},n.prototype._moveMap=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=[e.longitude,e.latitude];this._map.setCenter(t),this._marker.setLngLat(t)},n.prototype.render=function(){var t=this.props,n=t.className,i=t.isExternalsLoading,a=t.isExternalsLoaded,o=t.isExternalsError,s=o||a&&!e.mapboxgl,l=i||this.state.isTilesLoading;return r()("div",{className:n},void 0,r()("div",{className:y.a.control},void 0,r()("div",{className:y.a.underlay},void 0,l&&S,s&&r()("span",{className:y.a.error
},void 0,Object(h.default)("Unable to load map."))),r()("div",{className:(y.a.map||"")+" "+(l&&y.a.loading||""||""),id:"map"})))},n}(p.Component);t.a=Object(v.a)(M,{styles:["https://api.tiles.mapbox.com/mapbox-gl-js/v0.42.2/mapbox-gl.css"],scripts:["https://api.tiles.mapbox.com/mapbox-gl-js/v0.42.2/mapbox-gl.js"]})}).call(t,n(191))},function(e,t,n){"use strict";function i(e,t,n){if(O[t])return O[t];var i=y.a.Deferred(),r=document.createElement(e);return g()(r,n),r.onload=function(){
return i.resolve()},r.onerror=function(){return i.reject()},document.head.appendChild(r),O[t]=i.promise(),O[t]}function r(e){return i("link",e,{rel:"stylesheet",type:"text/css",href:e})}function a(e){return i("script",e,{type:"text/javascript",src:e})}function o(e,t){var n=function(n){function i(e,t){u()(this,i);var r=p()(this,n.call(this,e,t));return r.state={externals:M},r}return f()(i,n),i.prototype.componentWillMount=function(){var e=this,n=t.styles.map(r)
;n.push(t.scripts.reduce(function(e,t){return e.then(function(){return a(t)})},y.a.Deferred().resolve().promise())),y.a.when.apply(y.a,n).then(function(){return e.setState({externals:D})},function(){return e.setState({externals:C})})},i.prototype.render=function(){var t=this.state.externals;return I.a.createElement(e,l()({isExternalsLoading:t===M,isExternalsLoaded:t===D,isExternalsError:t===C},this.props))},i}(b.Component);return n.displayName="WithExternals("+Object(S.a)(e)+")",
n.WrappedComponent=e,n}var s=n(7),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(457),g=n.n(v),m=n(12),y=n.n(m),b=n(0),I=n.n(b),S=n(153),M="waiting",D="loaded",C="error",O={};t.a=o},function(e,t){e.exports={control:"PhotoMap-control-3PVoK",underlay:"PhotoMap-underlay-EsEVB",loading:"PhotoMap-loading-1TLcP",map:"PhotoMap-map-3J2kw",pin:"PhotoMap-pin-2X7Jv",error:"PhotoMap-error-1Fk9j"}},function(e,t){e.exports={photoInformation:"PhotoInformation-photoInformation-1vUJb",
scroller:"PhotoInformation-scroller-1kXik Scroller-vertical-VScFL",exif:"PhotoInformation-exif-3TGkh",line:"PhotoInformation-line-2tnkC",split:"PhotoInformation-split-3vWYS PhotoInformation-line-2tnkC",format:"PhotoInformation-format-IPiso",map:"PhotoInformation-map-26hTS"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(2061)),f=n(2063),v=n(2068),g=n.n(v),m=function(e){function t(){var n,i,a;o()(this,t)
;for(var s=arguments.length,c=Array(s),u=0;u<s;u++)c[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(c))),i.renderSlide=function(e){var t=i.props,n=t.playQueueItemEntityID,a=t.serverEntityID,o=t.providerEntityID,s=t.width,l=t.height,c=n===e;return r()(f.a,{serverEntityID:a,providerEntityID:o,playQueueItemEntityID:e,isCurrent:c,maxWidth:s,maxHeight:l})},a=n,l()(i,a)}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.playQueueItemEntityIDs,n=e.playQueueItemEntityID,i=e.size,a=e.firstIndex,o=e.errorMessage,s=e.width,l=e.height;return r()("div",{className:g.a.carousel},void 0,o&&r()("div",{className:g.a.message},void 0,r()("span",{},void 0,o)),t&&!o&&r()(h.a,{items:t,currentItem:n,size:i,firstIndex:a,width:s,height:l,renderSlide:this.renderSlide}))},t}(p.Component);t.a=m},function(e,t,n){"use strict";function i(e){
var t=e.items,n=e.currentItem,i=e.size,r=e.firstIndex,o=e.renderSlide,l=e.width,c=e.height;if(!t||!t.length)return null;var d=t.indexOf(n),h=s.a.range(Math.max(0,d-1),Math.min(i,d+1+1));return a()("div",{className:p.a.magazine},void 0,h.map(function(e){var n=d===e,i=e+r,s=t[e];return a()(u.a,{className:n?p.a.currentSlide:p.a.slide,cellY:0,cellX:(e-d)*l,cellWidth:l,cellHeight:c},i,s&&o(s))}))}var r=n(2),a=n.n(r),o=n(5),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(93)),d=n(2062),p=n.n(d);t.a=i
},function(e,t){e.exports={magazine:"Carousel-magazine-3pULs",slide:"Carousel-slide-1-FUF",currentSlide:"Carousel-currentSlide-1fcfr Carousel-slide-1-FUF"}},function(e,t,n){"use strict";function i(){return Object(d.createSelector)(Object(h.a)(),function(e){return{playQueueItem:e}})}function r(e){var t=e.playQueueItem;return t&&t.type===p.g?c.a.createElement(f.a,o()({metadataItemEntityID:t.metadataItem},e)):null}var a=n(7),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(6),p=(n.n(d),
n(28)),h=n(691),f=n(2064);t.a=Object(u.b)(i)(r)},function(e,t,n){"use strict";function i(){return Object(h.createSelector)(Object(f.a)(),function(e){return e&&e.url?l()({isLoading:!1,metadataKey:e.url},e):{isLoading:!0}})}function r(e){return e.isLoading?m:d.a.createElement(g.a,e)}var a=n(2),o=n.n(a),s=n(7),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(11),h=n(6),f=(n.n(h),n(999)),v=n(39),g=n(2065),m=o()(v.a,{});t.a=Object(p.b)(i)(r)},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(4)),g=n(2066),m=n(339),y=n(169),b=n(39),I=n(2067),S=n.n(I),M=o()(b.a,{}),D=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 p()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataKey,a=e.url,s=e.maxWidth,l=e.maxHeight,c=Object(g.a)(s,l),u=c.width,d=c.height,p={width:"100%",height:"100%"},h=this.state,f=h.loading,b=h.error;return o()("div",{className:S.a.slideContainer},void 0,o()("div",{className:S.a.statusContainer},void 0,f&&!b&&M,b&&o()("div",{},void 0,Object(v.default)("Unable to load photo"))),o()(y.a,{serverEntityID:t,providerEntityID:n,url:a,width:u,height:d,style:p,minSize:!0,background:!0,
backgroundSize:"contain",transition:!0,transitionProps:r()({},m.a),onError:this.onError,onLoad:this.onLoad},i))},t}(f.Component);t.a=D},function(e,t,n){"use strict";function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,i=e*t,o=n/Math.pow(Object(r.a)(),2),s=Math.sqrt(Math.max(i/o,1));return{width:Math.round(e/s),height:Math.round(t/s)}}t.a=i;var r=n(332),a=2073600},function(e,t){e.exports={slideContainer:"SlideImg-slideContainer-2XcH9",
statusContainer:"SlideImg-statusContainer-2GP9q fadeIn-fadeIn-3S08e"}},function(e,t){e.exports={carousel:"PhotoCarousel-carousel-3ebQM",message:"PhotoCarousel-message-2qndu",contents:"PhotoCarousel-contents-1Ozti"}},function(e,t){e.exports={fullPlayer:"PhotoFullPlayer-fullPlayer-zjtdR",player:"PhotoFullPlayer-player-3kRDP",main:"PhotoFullPlayer-main-1eD7_",mainFooter:"PhotoFullPlayer-mainFooter-2n5Rr",content:"PhotoFullPlayer-content-28yAo",spinner:"PhotoFullPlayer-spinner-2SO2v",
bar:"PhotoFullPlayer-bar-2WMUP",controls:"PhotoFullPlayer-controls-1-Z6K PhotoFullPlayer-bar-2WMUP",seekBar:"PhotoFullPlayer-seekBar-3H_Xh SeekBar-seekBar-2UK3i Slider-slider-2oLVT",aside:"PhotoFullPlayer-aside-WshsF",hideControls:"PhotoFullPlayer-hideControls-1nwRe",dockControls:"PhotoFullPlayer-dockControls-e5lzC"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(85)),s=n(56),l=n(928),c=n(2071),u=n(2571),d=n.n(u),p=s.a.extend({className:d.a.container,component:function(){
return r()(l.a,{component:c.a,playerType:o.a})}});t.a=p},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(function(e,t){return t.isMiniPlayer},Object(u.a)(),Object(d.a)(),Object(p.a)(),Object(h.a)(),function(e,t,n,i,r){var a=void 0,o=void 0;if(i){var s=Object(f.r)(i.type);a=s&&s.mediaType,o=i.subtype}var l=i&&i.vast;return{isPlayQueueLoading:t.isPlayQueueLoading,isMediaLoading:t.isMediaLoading,isPostPlayLoading:t.isPostPlayLoading,isBuffering:t.isBuffering,
isSettingsVisible:t.isSettingsVisible,isPlayQueueVisible:t.isPlayQueueVisible,isAlsoAiringVisible:t.isAlsoAiringVisible,isLyricsVisible:t.isLyricsVisible,isPostPlayVisible:t.isPostPlayVisible,hasError:t.hasError,hasConflicts:t.hasConflicts,confirmLiveTVPlayback:t.confirmLiveTVPlayback,hasLiveTVProtocol:!!r&&r.protocols.includes("livetv"),showBackgroundVideoPlayer:!(!l&&!n||e),currentMediaType:a,currentSubType:o,confirmPlaybackPayload:t.confirmPlaybackPayload,
confirmOffsetPayload:t.confirmOffsetPayload,confirmRemoteToLocal:t.confirmRemoteToLocal,confirmLocalToRemote:t.confirmLocalToRemote,vast:l}})}var r=n(7),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(6),u=(n.n(c),n(44)),d=n(252),p=n(119),h=n(220),f=n(28),v=n(2072),g=Object(l.b)(i)(v.a);g.propTypes=a()({},g.propTypes,{playerType:s.a.string.isRequired}),t.a=g},function(e,t,n){"use strict";function i(e){var t=e.isMiniPlayer,n=e.currentMediaType,i=n===c.d,r=n===c.a,o=t&&i?{position:"absolute",bottom:0,left:0,
zIndex:1,width:16/9*parseInt(p.a.miniPlayerVideoHeight,10),height:p.a.miniPlayerVideoHeight}:{width:"100%",height:"100%"};return l.a.createElement(h.a,a()({mediaStyle:o,playerType:y,isVideo:i,isMusic:r,mediaComponent:r?v.a:f.a,playerComponent:t?m.a:g.a},e))}var r=n(7),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(59),u=n(85),d=n(45),p=n.n(d),h=n(955),f=n(667),v=n(2073),g=n(2075),m=n(2566),y=u.a;t.a=i},function(e,t,n){"use strict";function i(e){return l.a.createElement(d.a,a()({},e,{type:c.a,
allowRecycleElement:!0}))}var r=n(7),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(938),u=n(939),d=n(941),p=n(2074),h=n.n(p);i.defaultProps={containerClassName:h.a.musicContainer},t.a=Object(u.a)(i)},function(e,t){e.exports={musicContainer:"MusicContainer-musicContainer-2J5KU"}},function(e,t,n){"use strict";function i(e,t){
return e.isRemotePlayer||e.isMusic||e.isSettingsVisible||e.isPlayQueueVisible||e.isPostPlayVisible||e.isAlsoAiringVisible||t.isControlsMenuOpen||t.isCastMenuOpen||t.followMuteMenuOpenCount>0||t.disableInteractionTimer}function r(e){var t=e.bottom,n=e.children;return p()("div",{className:k.a.content,style:{bottom:t}},void 0,n)}var a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(2),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),
n(85)),g=n(143),m=n(349),y=n(24),b=n(45),I=n.n(b),S=n(2076),M=n(39),D=n(1001),C=n(1002),O=n(2081),j=n(2082),P=n(2268),w=n(2407),T=n(2428),E=n(1109),x=n(2538),N=n(2545),A=n(2556),L=n(2565),k=n.n(L),_=2e3,R=parseInt(I.a.seekBarHeight,10),z=parseInt(I.a.playerControlsHeight,10),U=parseInt(I.a.playerInfoBarHeight,10),B=R+z,V=function(e){function t(n,r){o()(this,t);var a=l()(this,e.call(this,n,r));return a.onInteraction=function(e){var t=e.keyCode
;t!==m.k&&t!==m.c&&(i(a.props,a.state)||(a.state.hideControls&&a.setState({hideControls:!1}),a._interactionTimeoutID&&clearTimeout(a._interactionTimeoutID),a._interactionTimeoutID=setTimeout(a.onInteractionTimeout,_)))},a.onInteractionTimeout=function(){a.setState({hideControls:!0}),a._interactionTimeoutID=null},a.onMouseLeave=function(e){a.setState({disableInteractionTimer:!1},function(){i(a.props,a.state)||(a.setState({hideControls:!0}),
a._interactionTimeoutID&&(clearTimeout(a._interactionTimeoutID),a._interactionTimeoutID=null))})},a.onControlsMouseEnter=function(e){a.setState({disableInteractionTimer:!0})},a.onControlsMouseLeave=function(e){a.setState({disableInteractionTimer:!1})},a.onControlsMenuChange=function(e){a.setState({isControlsMenuOpen:e})},a.onCastMenuChange=function(e){a.setState({isCastMenuOpen:e})},a.onFollowMuteMenuChange=function(e){a.setState(function(t){return{
followMuteMenuOpenCount:e?t.followMuteMenuOpenCount+1:t.followMuteMenuOpenCount-1}})},a.onAudioSettingsDimensionsChange=function(e){var t=e.scrollHeight;a.setState({audioSettingsHeight:t})},a.state={hideControls:!1,isControlsMenuOpen:!1,isCastMenuOpen:!1,followMuteMenuOpenCount:0,disableInteractionTimer:!1},a}return u()(t,e),t.prototype.componentDidMount=function(){document.addEventListener("keydown",this.onInteraction),document.addEventListener("keyup",this.onInteraction),
i(this.props,this.state)||this._startInteractionTimer()},t.prototype.componentWillReceiveProps=function(e){i(e,this.state)&&this.state.hideControls&&this.setState({hideControls:!1}),this.props.isFullscreen!==e.isFullscreen&&this.state.disableInteractionTimer&&this.setState({disableInteractionTimer:!1})},t.prototype.componentDidUpdate=function(e,t){i(e,t)&&!i(this.props,this.state)&&this._startInteractionTimer(),!i(e,t)&&i(this.props,this.state)&&this._stopInteractionTimer()},
t.prototype.componentWillUnmount=function(){document.removeEventListener("keydown",this.onInteraction),document.removeEventListener("keyup",this.onInteraction),this._interactionTimeoutID&&clearTimeout(this._interactionTimeoutID)},t.prototype._startInteractionTimer=function(){this._stopInteractionTimer(),this._interactionTimeoutID=setTimeout(this.onInteractionTimeout,_)},t.prototype._stopInteractionTimer=function(){this._interactionTimeoutID&&clearTimeout(this._interactionTimeoutID)},
t.prototype.render=function(){
var e=this.props,t=e.playerType,n=e.isRemotePlayer,i=e.isPlayQueueLoading,a=e.isMediaLoading,o=e.isPostPlayLoading,s=e.isBuffering,l=e.isFullscreen,c=e.isSettingsVisible,u=e.isPlayQueueVisible,d=e.isAlsoAiringVisible,h=e.isLyricsVisible,f=e.isPostPlayVisible,m=e.isAdVisible,b=e.isVideo,I=e.isMusic,L=e.currentSubType,_=e.hasLiveTVProtocol,R=e.seekStartMilliseconds,V=e.seekEndMilliseconds,F=e.bufferStartMilliseconds,Q=e.bufferEndMilliseconds,H=e.adPositionMilliseconds,Y=e.adDurationMilliseconds,W=e.adSkipDelaySeconds,G=e.onEnterFullscreenPress,K=e.onExitFullscreenPress,q=e.onAdSkipPress,Z=this.state,X=Z.hideControls,J=Z.audioSettingsHeight,$=(i||o||b&&(!m&&a||s))&&!f&&!d,ee=!i&&c&&!u&&!d,te=ee&&I,ne=ee&&b,ie=b&&!i&&!o&&!u&&!d&&!f,re=(!m||u)&&(n||I||a||u||d||o||f),ae=L===g.a,oe=_||m||ae,se=oe?B+U:B,le=X?null:"translateY("+-se+"px)"
;return p()("div",{className:(k.a.fullPlayer||"")+" "+(b&&k.a.isVideo||"")+" "+(u&&k.a.isPlayQueueVisible||"")+" "+(X&&k.a.hideControls||""||""),onMouseMove:this.onInteraction,onMouseDown:this.onInteraction,onTouchStart:this.onInteraction,onTouchEnd:this.onInteraction,onMouseLeave:this.onMouseLeave},void 0,re&&p()(O.a,{playerType:t,isVideo:b,isMusic:I,allowBlur:I||u||d||f}),!u&&!d&&$&&p()(M.a,{size:y.e.LARGE}),ie&&p()(S.a,{playerType:t,heightOffset:X?0:z}),ie&&p()(D.a,{playerType:t,
isFullscreen:l,onEnterFullscreenPress:G,onExitFullscreenPress:K}),!i&&p()("div",{className:k.a.topBar,onMouseEnter:this.onControlsMouseEnter,onMouseLeave:this.onControlsMouseLeave},void 0,p()(C.a,{playerType:t,isFullscreen:l,onCastMenuChange:this.onCastMenuChange,onEnterFullscreenPress:G,onExitFullscreenPress:K})),!i&&!u&&!h&&I&&p()(r,{bottom:se},void 0,p()(P.a,{playerType:v.a,bottom:te?J:null})),!i&&!u&&h&&I&&p()(r,{bottom:se},void 0,p()(w.a,{playerType:v.a})),te&&p()(x.a,{playerType:v.a,
onDimensionsChange:this.onAudioSettingsDimensionsChange}),ne&&p()(N.a,{bottom:se,playerType:v.a}),!i&&u&&!d&&!c&&p()(r,{bottom:se},void 0,p()(j.a,{playerType:v.a,isVideo:b,isMusic:I})),!i&&!u&&d&&!c&&p()(r,{bottom:se},void 0,p()(A.a,{playerType:v.a,isVideo:b,isMusic:I})),!i&&f&&!u&&!d&&p()(r,{bottom:se},void 0,p()(T.a,{playerType:t})),!i&&p()("div",{className:k.a.bottomBar,style:{bottom:-se,height:se,WebkitTransform:le,msTransform:le,transform:le},onMouseEnter:this.onControlsMouseEnter,
onMouseLeave:this.onControlsMouseLeave},void 0,p()(E.a,{playerType:t,isVideo:b,isMusic:I,isAdVisible:m,isPostPlayVisible:f,currentSubType:L,hasLiveTVProtocol:_,adSkipDelaySeconds:W,seekStartMilliseconds:R,bufferStartMilliseconds:F,bufferEndMilliseconds:Q,seekEndMilliseconds:V,adPositionMilliseconds:H,adDurationMilliseconds:Y,onAdSkipPress:q,onFollowMuteMenuChange:this.onFollowMuteMenuChange,onControlsMenuChange:this.onControlsMenuChange})))},t}(f.Component);t.a=V},function(e,t,n){"use strict"
;function i(e){return Object(D.a)(e+"Player",["isOpen","isMediaLoading","isBuffering","isPaused","hasError","qualityIndex","positionSeconds","lastSeekPositionSeconds"])}function r(e,t){var n=t.playerType;return Object(b.createSelector)(i(n),Object(M.a)(),Object(C.a)(),O.a,function(e,t,n,i){var r=n.entityID,a=f()({},e,{playQueueItemEntityID:r});return t&&(a.decisionMediaIndex=t.mediaIndex,a.decisionPartIndex=t.partIndex,a.subtitlesUrl=t.subtitlesUrl),i&&(a.size=i.subtitleSize),a})}
var a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(7),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),n(334)),S=n(681),M=n(252),D=n(2077),C=n(119),O=n(100),j=n(417),P=n(2078),w={dispatchMakeDecision:j.a,dispatchRemoveDecision:j.d},T=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onSubtitlesError=function(){
var e=i.props,t=e.playQueueItemEntityID,n=e.playerType,r=e.positionMilliseconds,a=e.qualityIndex,o=e.decisionMediaIndex,s=e.decisionPartIndex,l=e.dispatchMakeDecision;(0,e.dispatchRemoveDecision)({playerType:n,playQueueItemEntityID:t}),l({playerType:n,playQueueItemEntityID:t,qualityIndex:a,mediaIndex:o,partIndex:s,options:{offset:r,subtitlesBurnLevel:I.a.ALWAYS}})},r=n,u()(i,r)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.subtitlesUrl,n=(e.dispatchMakeDecision,
e.dispatchRemoveDecision,o()(e,["subtitlesUrl","dispatchMakeDecision","dispatchRemoveDecision"]));return t?m.a.createElement(P.a,f()({subtitlesUrl:t},n,{onSubtitlesError:this.onSubtitlesError})):null},t}(g.Component),E=Object(S.a)(T);t.a=Object(y.b)(r,w)(E)},function(e,t,n){"use strict";function i(e,t){return Object(s.a)(Object(o.createSelector)(function(e){return e.ui},function(n){return n[e]?a.a.pick(n[e],t):{}}),function(e){return e})}var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),n(195));t.a=i
},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(2079)),f=n.n(h),v=n(30),g=n(694),m=n(54),y=n(72),b=n(2080),I=n.n(b),S=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r._loadSubtitles=function(){r._loadTimeoutID&&clearTimeout(r._loadTimeoutID),r._connectionTimeoutID&&clearTimeout(r._connectionTimeoutID);var e=r.props,t=e.subtitlesUrl,n=e.positionMilliseconds
;r._positionAtTimeOfRequest=n,Object(v.a)("[Subtitles] loading subtitles. position: %s url: %s",r._positionAtTimeOfRequest,t),r._abortStream(),r._xhr=new window.XMLHttpRequest;var i=new f.a.parser.XhrStream(r._xhr),a=new f.a.parser.StreamParser(i);r._openSubtitlesConnection(),a.minimalASS.then(r.onSubtitlesLoad,r.onSubtitlesFail)},r._getPosition=function(){var e=r.props,t=e.positionMilliseconds,n=e.offset,i=e.delay,a=(t-n+i)/1e3;if(a%1e3){var o=r._clock.currentTime;if(Math.floor(o)===a)return o}
return a},r.onMeasure=function(e){var t=e.width,n=e.height;r.setState({width:t,height:n})},r.onSubtitlesLoad=function(e){Object(v.a)("[Subtitles] Starting to render subtitles"),r._destroySubtitles(),r._clock=new f.a.renderers.AutoClock(r._getPosition,1e3),r._renderer=new f.a.renderers.WebRenderer(e,r._clock,document.getElementById(r._rendererID),r.props.rendererOptions),r._setSubtitleSize(),r._resizeSubtitles(),r._setClockState()},r.onSubtitlesConnectionTimeout=function(){
Object(v.a)("[Subtitles] Connection inactivity timeout, reopening."),r._openSubtitlesConnection()},r.onSubtitlesFail=function(){var e=r._xhr.readyState,t=r._xhr.status;r._errorCount++,v.a.warn("[Subtitles] Request failed. statusCode:%s state:%s errorCount:%s %s",t,e,r._errorCount,r._xhr.errorString||""),r._errorCount>r.props.consecutiveErrorsTolerance?r.props.onSubtitlesError():r._loadTimeoutID=setTimeout(r._loadSubtitles,r.props.retryTimeout)},f.a.debugMode=!1,r.state={width:0,height:0},
r._rendererID=Object(m.a)(),r._loadTimeoutID=null,r._connectionTimeoutID=null,r._errorCount=0,r._positionAtTimeOfRequest=null,r}return u()(t,e),t.prototype.componentDidUpdate=function(e,t){var n=this.props,i=n.isOpen,r=n.isBuffering,a=n.isPaused,o=n.hasError,s=n.heightOffset,l=n.rendererOptions,c=n.size,u=n.sizeMultiplier,d=n.subtitlesUrl,p=this.state,h=p.width,f=p.height;if(this._shouldResetStream(e)||l!==e.rendererOptions||d!==e.subtitlesUrl)return void this._loadSubtitles()
;var v=c!==e.size||u!==e.sizeMultiplier;v&&this._setSubtitleSize(),(v||h!==t.width||f!==t.height||s!==e.heightOffset)&&this._resizeSubtitles(),i===e.isOpen&&r===e.isBuffering&&a===e.isPaused&&o===e.hasError||this._setClockState()},t.prototype.componentWillUnmount=function(){Object(v.a)("[Subtitles] Closing"),this._connectionTimeoutID&&clearTimeout(this._connectionTimeoutID),this._destroySubtitles(),this._abortStream()},t.prototype._openSubtitlesConnection=function(){
var e=this,t=this.props,n=t.subtitlesUrl,i=t.connectionTimeout;this._abortStream(),this._xhr.onreadystatechange=function(t){4===t.currentTarget.readyState&&(t.currentTarget.status>=200&&t.currentTarget.status<300?e._errorCount=0:e.onSubtitlesFail())},i&&(this._xhr.onprogress=function(t){Object(v.a)("[Subtitles] Received data, restarting connection timer."),clearTimeout(e._connectionTimeoutID),e._connectionTimeoutID=setTimeout(e.onSubtitlesConnectionTimeout,i)}),this._xhr.open("GET",n,!0),
this._xhr.send()},t.prototype._destroySubtitles=function(){this._loadTimeoutID&&clearTimeout(this._loadTimeoutID),this._clock&&(this._clock.disable(),this._clock=null),this._renderer&&(this._renderer.disable(),this._renderer=null);for(var e=document.getElementById(this._rendererID);e.hasChildNodes();)e.removeChild(e.lastChild)},t.prototype._abortStream=function(){this._xhr&&(Object(v.a)("[Subtitles] Aborting existing xhr."),this._xhr.onreadystatechange=null,this._xhr.onprogress=null,
this._xhr.abort())},t.prototype._setSubtitleSize=function(){var e=this.props,t=e.size,n=e.sizeMultiplier,i=this._renderer.ass.properties,r=t*n/100,a=void 0,o=void 0;this.state.originalResolutionX&&this.state.originalResolutionY?(a=this.state.originalResolutionX,o=this.state.originalResolutionY):(a=i.resolutionX,o=i.resolutionY,this.setState({originalResolutionX:a,originalResolutionY:o})),i.resolutionX=a/r,i.resolutionY=o/r},t.prototype._resizeSubtitles=function(){if(this._renderer){
var e=this.state,t=e.width,n=e.height;Object(v.a)("[Subtitles] Resizing subtitles"),this._renderer.resize(t,n-this.props.heightOffset)}},t.prototype._setClockState=function(){var e=this._clock;if(e){var t=this.props,n=t.isOpen,i=t.isBuffering,r=t.isPaused,a=t.hasError;return i||r?(Object(v.a)("[Subtitles] Clock State: paused"),void e.pause()):!n||a?(Object(v.a)("[Subtitles] Clock State: disabled"),void e.disable()):r?void 0:(Object(v.a)("[Subtitles] Clock State: playing"),void e.play())}},
t.prototype._shouldResetStream=function(e){var t=this.props,n=t.isOpen,i=t.isMediaLoading,r=t.isBuffering,a=t.isPaused,o=t.hasError,s=t.positionMilliseconds,l=t.lastSeekPositionSeconds,c=this._positionAtTimeOfRequest,u=s-e.positionMilliseconds,d=u>0&&n&&!i&&!r&&!a&&!o;if(null!=l&&l!==e.lastSeekPositionSeconds)return this._resetAfterSeekStarted=!0,this._resetLater=!1,!1;if(this._resetAfterSeekStarted){var p=1e3*l<s;return!(!d||!p)&&(this._resetAfterSeekStarted=!1,!0)}
return d&&this._resetLater?(this._resetLater=!1,!0):(!this._xhr||u>1e4||s<c)&&(this._resetLater=!d,d)},t.prototype.render=function(){return r()(y.a,{className:I.a.measure,onMeasure:this.onMeasure},void 0,r()("div",{id:this._rendererID,className:I.a.renderer}))},t}(p.Component);S.defaultProps={offset:0,delay:0,size:g.a.NORMAL,sizeMultiplier:1,heightOffset:0,consecutiveErrorsTolerance:3,connectionTimeout:null,retryTimeout:3e3,rendererOptions:{enableSvg:!1,preciseOutlines:!1}},t.a=S
},function(e,t,n){var i,r;!function(n,a){var o=this;i=[],void 0!==(r=function(){return a(o)}.apply(t,i))&&(e.exports=r)}(0,function(e){"use strict";return function(e){function t(i){if(n[i])return n[i];var r=n[i]=Object.create(null);return e[i](r,t),r}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 r=t(33),a=t(33);e.Set=a.Set;var o=t(30),s=t(30);e.Map=s.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 p=t(1);e.parser=p;var h=t(14);e.renderers=h;var f=t(24);e.ASS=f.ASS;var v=t(25);e.Attachment=v.Attachment,e.AttachmentType=v.AttachmentType;var g=t(26);e.Dialogue=g.Dialogue;var m=t(28);e.ScriptProperties=m.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 r.Set},set:r.setImplementation},Map:{get:function(){return o.Map},set:o.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 r=t(4);e.StreamParser=r.StreamParser,
e.SrtStreamParser=r.SrtStreamParser},function(e,t){function n(e){var t=e.indexOf(":");return-1===t?null:{name:e.substr(0,t),value:e.substr(t+1).replace(/^\s+/,"")}}function i(e,t){var i=n(e);if(null===i)return null;var a=i.value.split(",");a.length>t.length&&(a[t.length-1]=a.slice(t.length-1).join(","));var o=new r.Map;return t.forEach(function(e,t){o.set(e,a[t])}),{type:i.name,template:o}}var r=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 a.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(r){var a=this,o=new p(r);if(null===a.read(o,e))return r.pop(),null;var s=n.call(a,o);if(null!==s)o.value=new t(s.value);else{if(i)return r.pop(),null;o.value=new t(null)}return o}}var r=t(8),a=t(23),o=t(30),s=new o.Map;e.parse=n;var l=function(){
function e(e,t){this._input=e,this._parseTree=new p(null),this._result=s.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 p(e);for(i.value=[];this._haveMore();){var a=this.parse_enclosedTags(i);if(null!==a)(t=i.value).push.apply(t,a.value);else{var o=this.parse_newline(i)||this.parse_hardspace(i)||this.parse_text(i)
;if(null===o)return e.pop(),null;if(o.value instanceof r.Text&&i.value[i.value.length-1]instanceof r.Text){var s=i.value[i.value.length-1];i.value[i.value.length-1]=new r.Text(s.value+o.value.value)}else i.value.push(o.value)}}var l=!1;return i.value.forEach(function(e,t){e instanceof r.DrawingMode?l=0!==e.scale:e instanceof r.Text&&l&&(i.value[t]=new r.DrawingInstructions(n(e.value,"drawingInstructions")))}),i},e.prototype.parse_enclosedTags=function(e){var t=new p(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,"\\")&&null===(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))&&t.pop(),
null===i&&(i=this.parse_comment(t)),null===i)return e.pop(),null;i.value instanceof r.Comment&&t.value[t.value.length-1]instanceof r.Comment?t.value[t.value.length-1]=new r.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 p(e);return null===this.read(t,"\\N")?(e.pop(),null):(t.value=new r.NewLine,t)},e.prototype.parse_hardspace=function(e){var t=new p(e)
;return null===this.read(t,"\\h")?(e.pop(),null):(t.value=new r.Text("\xa0"),t)},e.prototype.parse_text=function(e){var t=this._peek(),n=new p(e),i=new p(n,t);return n.value=new r.Text(i.value),n},e.prototype.parse_comment=function(e){var t=this._peek(),n=new p(e),i=new p(n,t);return n.value=new r.Comment(i.value),n},e.prototype.parse_tag_a=function(e){var t=new p(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 a=new p(t,n),o=null;switch(a.value){case"1":o=1;break;case"2":o=2;break;case"3":o=3;break;case"5":o=7;break;case"6":o=8;break;case"7":o=9;break;case"9":o=4;break;case"10":o=5;break;case"11":o=6}return t.value=new r.Alignment(o),t},e.prototype.parse_tag_alpha=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_an=function(e){var t=new p(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 p(t,n);return t.value=new r.Alignment(parseInt(i.value)),t},e.prototype.parse_tag_b=function(e){var t=new p(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 p(t,i),n.value=parseInt(n.value))),null===n&&(n=this.parse_enableDisable(t)),t.value=null!==n?new r.Bold(n.value):new r.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 p(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 r.Fade(n.value/1e3,i.value/1e3),t)},e.prototype.parse_tag_fade=function(e){var t=new p(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 a=this.parse_decimal(t);if(null===a)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 s=this.parse_decimal(t);if(null===s)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 r.ComplexFade(1-n.value/255,1-i.value/255,1-a.value/255,o.value/1e3,s.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 p(e);if(null===this.read(t,"fn"))return e.pop(),null;for(var n=new p(t,""),i=this._peek();this._haveMore()&&"\\"!==i&&"}"!==i;i=this._peek())n.value+=i;return n.value.length>0?t.value=new r.FontName(n.value):t.value=new r.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 p(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 r.FontSizePlus(n.value),t)},e.prototype.parse_tag_fsminus=function(e){
var t=new p(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 r.FontSizeMinus(n.value),t)},e.prototype.parse_tag_fscx=function(e){var t=new p(e);if(null===this.read(t,"fscx"))return e.pop(),null;var n=this.parse_decimal(t);return t.value=null!==n?new r.FontScaleX(n.value/100):new r.FontScaleX(null),t},e.prototype.parse_tag_fscy=function(e){var t=new p(e);if(null===this.read(t,"fscy"))return e.pop(),null
;var n=this.parse_decimal(t);return t.value=null!==n?new r.FontScaleY(n.value/100):new r.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 p(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 r.ColorKaraoke(n.value/100),t)},e.prototype.parse_tag_K=function(e){var t=new p(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 r.SweepingColorKaraoke(n.value/100),t)},e.prototype.parse_tag_kf=function(e){var t=new p(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 r.SweepingColorKaraoke(n.value/100),t)},
e.prototype.parse_tag_ko=function(e){var t=new p(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 r.OutlineKaraoke(n.value/100),t)},e.prototype.parse_tag_move=function(e){var t=new p(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 a=this.parse_decimal(t);if(null===a)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;var s=null,l=null;if(null!==this.read(t,",")){if(null===(s=this.parse_decimal(t)))return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;if(null===(l=this.parse_decimal(t)))return e.pop(),null}return null===this.read(t,")")?(e.pop(),
null):(t.value=new r.Move(n.value,i.value,a.value,o.value,null!==s?s.value/1e3:null,null!==l?l.value/1e3:null),t)},e.prototype.parse_tag_org=function(e){var t=new p(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 r.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 p(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 r.Position(n.value,i.value),t)},e.prototype.parse_tag_q=function(e){var t=new p(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 p(t,n);return t.value=new r.WrappingStyle(parseInt(i.value)),t},e.prototype.parse_tag_r=function(e){var t=new p(e);if(null===this.read(t,"r"))return e.pop(),null
;for(var n=new p(t,""),i=this._peek();this._haveMore()&&"\\"!==i&&"}"!==i;i=this._peek())n.value+=i;return n.value.length>0?t.value=new r.Reset(n.value):t.value=new r.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 p(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,a=null,o=this.parse_decimal(t);if(null!==o){if(null===this.read(t,","))return e.pop(),null;var s=this.parse_decimal(t);if(null!==s){if(n=o,i=s,null===this.read(t,","))return e.pop(),null;var l=this.parse_decimal(t);if(null!==l&&(a=l,null===this.read(t,",")))return e.pop(),null}else if(a=o,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,"\\")&&null===(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))&&t.pop(),
null===d&&(d=this.parse_comment(t)),null===d)return e.pop(),null;d.value instanceof r.Comment&&c[c.length-1]instanceof r.Comment?c[c.length-1]=new r.Comment(c[c.length-1].value+d.value.value):c.push(d.value)}return this.read(t,")"),t.value=new r.Transform(null!==n?n.value/1e3:null,null!==i?i.value/1e3:null,null!==a?a.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 p(e),n=null,i=[]
;for(t.value=[];this._haveMore();){for(;null!==this.read(t," "););if(!this._haveMore())break;if(null!==n){var a=this.parse_decimal(t);if(null!==a){i.push(a),"m"===n&&2===i.length?(t.value.push(new r.drawing.MoveInstruction(i[0].value,i[1].value)),i.splice(0,i.length)):"l"===n&&2===i.length?(t.value.push(new r.drawing.LineInstruction(i[0].value,i[1].value)),
i.splice(0,i.length)):"b"===n&&6===i.length&&(t.value.push(new r.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 o=this.parse_text(t);if(null===o)break;var s=o.value.value;switch(s){case"m":case"l":case"b":n=s,i.splice(0,i.length)}}for(;null!==this.read(t," "););return t},e.prototype.parse_decimalInt32=function(e){
for(var t=new p(e),n=null!==this.read(t,"-"),i=new p(t,""),r=this._peek();this._haveMore()&&r>="0"&&r<="9";r=this._peek())i.value+=r;if(0===i.value.length)return e.pop(),null;var a=parseInt(i.value);return a>=4294967295?a=4294967295:n&&(a=-a),t.value=a,t},e.prototype.parse_hexInt32=function(e){for(var t=new p(e),n=null!==this.read(t,"-"),i=new p(t,""),r=this._peek();this._haveMore()&&(r>="0"&&r<="9"||r>="a"&&r<="f"||r>="A"&&r<="F");r=this._peek())i.value+=r;if(0===i.value.length)return e.pop(),
null;var a=parseInt(i.value,16);return a>=4294967295?a=4294967295:n&&(a=-a),t.value=a,t},e.prototype.parse_decimalOrHexInt32=function(e){var t=new p(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 p(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 p(e),n=new p(t,""),i=null,r=this._peek();this._haveMore()&&r>="0"&&r<="9";r=this._peek())n.value+=r;if(0===n.value.length)return e.pop(),null;if(null!==this.read(t,".")){i=new p(t,"");for(var r=this._peek();this._haveMore()&&r>="0"&&r<="9";r=this._peek())i.value+=r;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 p(e,t);return n.value="1"===n.value,n}return null},e.prototype.parse_color=function(e){for(var t=new p(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 r.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 p(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 p(e),n=this.parse_decimalOrHexInt32(t);if(null===n)return e.pop(),null;var i=n.value;return t.value=new r.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 p(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 p(t);if(null===this.read(i,e))return t.pop(),null;if(null===this.read(i,"("))return t.pop(),null;var a=null,o=null,s=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 h=this.parse_decimal(i);null!==h?(a=d,s=h):c=d}if(null!==a&&null!==s){if(null===this.read(i,","))return t.pop(),null;if(o=this.parse_decimal(i),null===this.read(i,","))return t.pop(),null;l=this.parse_decimal(i),i.value=new r.RectangularClip(a.value,s.value,o.value,l.value,"clip"===e)}else{u=new p(i,"");for(var f=this._peek();this._haveMore()&&")"!==f&&"}"!==f;f=this._peek())u.value+=f;i.value=new r.VectorClip(null!==c?c.value:1,n(u.value,"drawingInstructions"),"clip"===e)}
return null===this.read(i,")")?(t.pop(),null):i},e}();i("alpha",r.Alpha,l.prototype.parse_alpha,!1),i("be",r.Blur,l.prototype.parse_decimal,!1),i("blur",r.GaussianBlur,l.prototype.parse_decimal,!1),i("bord",r.Border,l.prototype.parse_decimal,!1),i("c",r.PrimaryColor,l.prototype.parse_color,!1),i("fax",r.SkewX,l.prototype.parse_decimal,!1),i("fay",r.SkewY,l.prototype.parse_decimal,!1),i("fr",r.RotateZ,l.prototype.parse_decimal,!1),i("frx",r.RotateX,l.prototype.parse_decimal,!1),
i("fry",r.RotateY,l.prototype.parse_decimal,!1),i("frz",r.RotateZ,l.prototype.parse_decimal,!1),i("fs",r.FontSize,l.prototype.parse_decimal,!1),i("fsp",r.LetterSpacing,l.prototype.parse_decimal,!1),i("i",r.Italic,l.prototype.parse_enableDisable,!1),i("p",r.DrawingMode,l.prototype.parse_decimal,!0),i("pbo",r.DrawingBaselineOffset,l.prototype.parse_decimal,!0),i("s",r.StrikeThrough,l.prototype.parse_enableDisable,!1),i("shad",r.Shadow,l.prototype.parse_decimal,!1),
i("u",r.Underline,l.prototype.parse_enableDisable,!1),i("xbord",r.BorderX,l.prototype.parse_decimal,!1),i("xshad",r.ShadowX,l.prototype.parse_decimal,!1),i("ybord",r.BorderY,l.prototype.parse_decimal,!1),i("yshad",r.ShadowY,l.prototype.parse_decimal,!1),i("1a",r.PrimaryAlpha,l.prototype.parse_alpha,!1),i("1c",r.PrimaryColor,l.prototype.parse_color,!1),i("2a",r.SecondaryAlpha,l.prototype.parse_alpha,!1),i("2c",r.SecondaryColor,l.prototype.parse_color,!1),
i("3a",r.OutlineAlpha,l.prototype.parse_alpha,!1),i("3c",r.OutlineColor,l.prototype.parse_color,!1),i("4a",r.ShadowAlpha,l.prototype.parse_alpha,!1),i("4c",r.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]&&s.set(d.substr("parse_".length),l.prototype[d])}var p=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}(),h=t(32),f=t(36);t(38).registerWorkerCommand(f.WorkerCommands.Parse,function(e){return new h.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,r=t(23),a=t(24),o=t(29),s=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 p=function(){function e(e){var t=this;this._stream=e,
this._ass=new a.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 a=d.parseLineIntoProperty(e);if(null!==a)switch(a.name){case"PlayResX":this._ass.properties.resolutionX=parseInt(a.value);break;case"PlayResY":this._ass.properties.resolutionY=parseInt(a.value);break;case"WrapStyle":this._ass.properties.wrappingStyle=parseInt(a.value);break;case"ScaledBorderAndShadow":this._ass.properties.scaleBorderAndShadow="yes"===a.value}break;case i.Styles:if(null===this._ass.stylesFormatSpecifier){var o=d.parseLineIntoProperty(e)
;null!==o&&"Format"===o.name&&(this._ass.stylesFormatSpecifier=o.value.split(",").map(function(e){return e.trim()}))}else try{this._ass.addStyle(e)}catch(t){r.debugMode&&console.error("Could not parse style from line "+e+" - "+(t.stack||t))}break;case i.Events:if(null===this._ass.dialoguesFormatSpecifier){var s=d.parseLineIntoProperty(e);null!==s&&"Format"===s.name&&(this._ass.dialoguesFormatSpecifier=s.value.split(",").map(function(e){return e.trim()}))}else try{this._ass.addEvent(e)}catch(t){
r.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){r.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=p;var h=function(){function e(e){var t=this;this._stream=e,
this._ass=new a.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 o.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 s.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 s.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=h},function(t,n){var i=n(32),r=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)
;-1!==t?(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=r;var a=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);-1!==t?(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=a;var o=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");-1!==t?(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;t.done?(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=o},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 r={
dataView:new DataView(n.buffer),position:0},a=u.read(r),o=null,i=0;i<a.numTables;i++){var s=d.read(r);if(s.c1+s.c2+s.c3+s.c4==="name"){o=s;break}}r.position=o.offset;for(var c=p.read(r),f=new l.Set,i=0;i<c.count;i++){var v=h.read(r);switch(v.nameId){case 1:case 4:case 6:var g=o.offset+c.stringOffset+v.offset,m=n.subarray(g,g+v.length);switch(v.platformId){case 1:for(var y="",b=0;b<m.length;b++)y+=String.fromCharCode(m[b]);f.add(y);break;case 3:
for(var I="",b=0;b<m.length;b+=2)I+=String.fromCharCode((m[b]<<8)+m[b+1]);f.add(I)}}}return f}function i(e){var t=e.__fields;return e.read=function(n){for(var i=new e,r=0;r<t.length;r++){var o=t[r],s=void 0;switch(o.type){case a.Char:s=String.fromCharCode(n.dataView.getInt8(n.position)),n.position+=1;break;case a.Uint16:s=n.dataView.getUint16(n.position),n.position+=2;break;case a.Uint32:s=n.dataView.getUint32(n.position),n.position+=4}i[o.field]=s}return i},e}function r(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 a,o=t(34).__decorate,s=t(30),l=t(33);!function(e){e[e.Char=0]="Char",e[e.Uint16=1]="Uint16",e[e.Uint32=2]="Uint32"}(a||(a={}));var c=new s.Map,u=function(){function e(){}return o([r(a.Uint16)],e.prototype,"majorVersion",void 0),o([r(a.Uint16)],e.prototype,"minorVersion",void 0),o([r(a.Uint16)],e.prototype,"numTables",void 0),
o([r(a.Uint16)],e.prototype,"searchRange",void 0),o([r(a.Uint16)],e.prototype,"entrySelector",void 0),o([r(a.Uint16)],e.prototype,"rangeShift",void 0),e=o([i],e)}(),d=function(){function e(){}return o([r(a.Char)],e.prototype,"c1",void 0),o([r(a.Char)],e.prototype,"c2",void 0),o([r(a.Char)],e.prototype,"c3",void 0),o([r(a.Char)],e.prototype,"c4",void 0),o([r(a.Uint32)],e.prototype,"checksum",void 0),o([r(a.Uint32)],e.prototype,"offset",void 0),o([r(a.Uint32)],e.prototype,"length",void 0),
e=o([i],e)}(),p=function(){function e(){}return o([r(a.Uint16)],e.prototype,"formatSelector",void 0),o([r(a.Uint16)],e.prototype,"count",void 0),o([r(a.Uint16)],e.prototype,"stringOffset",void 0),e=o([i],e)}(),h=function(){function e(){}return o([r(a.Uint16)],e.prototype,"platformId",void 0),o([r(a.Uint16)],e.prototype,"encodingId",void 0),o([r(a.Uint16)],e.prototype,"languageId",void 0),o([r(a.Uint16)],e.prototype,"nameId",void 0),o([r(a.Uint16)],e.prototype,"length",void 0),
o([r(a.Uint16)],e.prototype,"offset",void 0),e=o([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,r,a){this._x1=e,this._y1=t,this._x2=n,this._y2=i,this._x3=r,this._y3=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,"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 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.Comment=r;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.prototype.toString=function(){return"Text { value: "+this._value.replace(/\u00A0/g,"\\h")+" }"},e}();e.Text=a;var o=function(){function e(){}return e}();e.NewLine=o
;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.Italic=s;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 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.BorderX=p;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.BorderY=h;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 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.ShadowX=v;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.ShadowY=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.Blur=m
;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 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.FontSize=I;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.FontSizePlus=S;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 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.FontScaleX=D;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 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.LetterSpacing=O;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.RotateX=j;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.RotateY=P;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.RotateZ=w;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.SkewX=T;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.SkewY=E;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.PrimaryColor=x;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.SecondaryColor=N;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.OutlineColor=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.ShadowColor=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.Alpha=k;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.PrimaryAlpha=_;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.SecondaryAlpha=R;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 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.Alignment=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.ColorKaraoke=V;var F=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=F;var Q=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=Q;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.WrappingStyle=H;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.Reset=Y;var W=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=W;var G=function(){function e(e,t,n,i,r,a){this._x1=e,this._y1=t,this._x2=n,this._y2=i,this._t1=r,this._t2=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,"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,r,a,o){this._a1=e,this._a2=t,this._a3=n,this._t1=i,this._t2=r,this._t3=a,this._t4=o}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,r){
this._x1=e,this._y1=t,this._x2=n,this._y2=i,this._inside=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,"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?" ":"")+"}"}}},re=t(38),ae=0,oe=Object.keys(e);ae<oe.length;ae++){var se=oe[ae],le=e[se];le instanceof Function&&(ie(le,se),re.registerClassPrototype(le.prototype))}for(var ce=0,ue=Object.keys(n);ce<ue.length;ce++){var se=ue[ce],le=n[se];le instanceof Function&&(ie(le,"Drawing"+se),re.registerClassPrototype(le.prototype))}},function(e,t){var n=t(23),i=t(11),r=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,r=this._getCurrentTime();this._manualClock.paused?i!==r&&(this._lastKnownExternalTime=r,this._lastKnownExternalTimeObtainedAt=e,
this._manualClock.tick(r)):null!==this._lastKnownExternalTime&&r===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=r,this._lastKnownExternalTimeObtainedAt=e,this._manualClock.tick(r)),
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=r},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 r=n[i];r.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),r=t(10),a=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(r.ClockEvent.Play,[]))},e.prototype.tick=function(e){this._enabled&&this._currentTime!==e&&(this.play(),this._currentTime=e,this._dispatchEvent(r.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(r.ClockEvent.Pause,[])))},e.prototype.stop=function(){this._dispatchEvent(r.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(r.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=a,n.mixin(a,[r.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),r=t(21),a=function(e){function t(t,n,r){e.call(this,n,new i.VideoClock(t),document.createElement("div"),r),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,r=this._video.offsetHeight,a=Math.min(i/t,r/n),o=t*a,s=n*a,l=(i-o)/2,c=(r-s)/2;e.prototype.resize.call(this,o,s,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}(r.WebRenderer);e.DefaultRenderer=a},function(e,t){
var n=t(10);e.ClockEvent=n.ClockEvent,e.EventSource=n.EventSource;var i=t(9);e.AutoClock=i.AutoClock;var r=t(11);e.ManualClock=r.ManualClock;var a=t(12);e.VideoClock=a.VideoClock;var o=t(13);e.DefaultRenderer=o.DefaultRenderer;var s=t(15);e.NullRenderer=s.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),r=t(23),a=function(){function e(t,r,a){var o=this;this._ass=t,this._clock=r,this._id=++e._lastRendererId,
this._settings=i.RendererSettings.from(a),this._clock.addEventListener(n.ClockEvent.Play,function(){return o._onClockPlay()}),this._clock.addEventListener(n.ClockEvent.Tick,function(){return o._onClockTick()}),this._clock.addEventListener(n.ClockEvent.Pause,function(){return o._onClockPause()}),this._clock.addEventListener(n.ClockEvent.Stop,function(){return o._onClockStop()}),this._clock.addEventListener(n.ClockEvent.RateChange,function(){return o._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(){r.verboseMode&&console.log("NullRenderer._onClockPlay")},
e.prototype._onClockTick=function(){var e=this._clock.currentTime;r.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(){r.verboseMode&&console.log("NullRenderer._onClockPause")},e.prototype._onClockStop=function(){r.verboseMode&&console.log("NullRenderer._onClockStop")},
e.prototype._onClockRateChange=function(){r.verboseMode&&console.log("NullRenderer._onClockRateChange")},e._lastRendererId=-1,e}();e.NullRenderer=a},function(e,t){function n(e){return e.type===CSSRule.FONT_FACE_RULE}var i=t(30),r=function(){function e(){}return e.makeFontMapFromStyleElement=function(e){for(var t=new i.Map,r=e.sheet,a=0;a<r.cssRules.length;a++){var o=r.cssRules[a];if(n(o)){
var s=o.style.getPropertyValue("font-family").match(/^["']?(.*?)["']?$/)[1],l=o.style.getPropertyValue("src");l||(l=o.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(s,l)}}return t},e.from=function(t){void 0!==t&&null!==t||(t={})
;var n=t,i=n.fontMap,r=void 0===i?null:i,a=n.preRenderTime,o=void 0===a?5:a,s=n.preciseOutlines,l=void 0!==s&&s,c=n.enableSvg,u=void 0===c||c,d=n.fallbackFonts,p=void 0===d?'Arial, Helvetica, sans-serif, "Segoe UI Symbol"':d,h=n.useAttachedFonts,f=void 0!==h&&h,v=new e;return v.fontMap=r,v.preRenderTime=o,v.preciseOutlines=l,v.enableSvg=u,v.fallbackFonts=p,v.useAttachedFonts=f,v},e}();e.RendererSettings=r},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,r=0;r<t.length;r++){var a=t[r]
;null===n&&(n=a.time),i=a.time}for(var o="",s=0;s<t.length;s++){var a=t[s];o+="\t"+(100*(i-n==0?1:(a.time-n)/(i-n))).toFixed(3)+"% {\n",a.properties.forEach(function(e,t){o+="\t\t"+t+": "+e+";\n"}),o+="\t}\n"}var l="animation-"+this._id+"-"+this._numAnimations++;this._style.appendChild(document.createTextNode("@-webkit-keyframes "+l+" {\n"+o+"\n}")),this._style.appendChild(document.createTextNode("@keyframes "+l+" {\n"+o+"\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),r=this._outputScaleX/i,a=this._outputScaleY/i,o=document.createElementNS("http://www.w3.org/2000/svg","path"),s=0,l=0,c=0,u=e.instructions;c<u.length;c++){var d=u[c];d instanceof n.drawing.MoveInstruction?(o.pathSegList.appendItem(o.createSVGPathSegMovetoAbs(d.x,d.y+this._baselineOffset)),s=Math.max(s,d.x),
l=Math.max(l,d.y+this._baselineOffset)):d instanceof n.drawing.LineInstruction?(o.pathSegList.appendItem(o.createSVGPathSegLinetoAbs(d.x,d.y+this._baselineOffset)),s=Math.max(s,d.x),l=Math.max(l,d.y+this._baselineOffset)):d instanceof n.drawing.CubicBezierCurveInstruction&&(o.pathSegList.appendItem(o.createSVGPathSegCurvetoCubicAbs(d.x3,d.y3+this._baselineOffset,d.x1,d.y1+this._baselineOffset,d.x2,d.y2+this._baselineOffset)),s=Math.max(s,d.x1,d.x2,d.x3),
l=Math.max(l,d.y1+this._baselineOffset,d.y2+this._baselineOffset,d.y3+this._baselineOffset))}var p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("version","1.1"),p.width.baseVal.valueAsString=(s*r).toFixed(3)+"px",p.height.baseVal.valueAsString=(l*a).toFixed(3)+"px";var h=document.createElementNS("http://www.w3.org/2000/svg","g");return p.appendChild(h),h.setAttribute("transform","scale("+r.toFixed(3)+" "+a.toFixed(3)+")"),h.appendChild(o),
o.setAttribute("fill",t.toString()),p},e}();e.DrawingStyles=i},function(e,t){function n(e,t,n,i){var r='"'+e+'"';""!==n&&(r+=", "+n),i.style.fontFamily=r,i.style.fontSize=t+"px"}function i(e,t,i,r){return n(e,t,i,r),new c.Promise(function(e){return setTimeout(function(){return e(r.offsetHeight)},1e3)})}function r(e,t,i,r){return n(e,t,i,r),r.offsetHeight}function a(e,t){return[e,180/(t-e)]}function o(e,t,n){return i(e,180,t,n).then(function(r){return i(e,360,t,n).then(function(e){return a(r,e)})
})}function s(e,t,n){return 180+(e-t)*n}function l(e,t,n,i,o){var l=o.get(e);if(void 0===l){var c=r(e,180,n,i),u=r(e,360,n,i);o.set(e,l=a(c,u))}return s(t,l[0],l[1])}var c=t(32);e.calculateFontMetrics=o,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,r=n(17),a=n(18),o=n(19),s=n(20),l=n(22),c=n(10),u=n(15),d=n(6),p=n(8),h=n(23),f=n(25),v=n(27),g=n(31),m=n(30),y=n(32),b=/^(url|local)\(["']?(.+?)["']?\)$/,I=function(t){function n(n,i,r,a){var o=this;t.call(this,n,i,function(){if(!(r instanceof HTMLDivElement)){var e=a;a=r,r=e,
console.warn("WebRenderer's constructor now takes libjassSubsWrapper as the third parameter and settings as the fourth parameter. Please update the caller.")}return a}()),this._libjassSubsWrapper=r,this._layerWrappers=[],this._layerAlignmentWrappers=[],this._fontMetricsCache=new m.Map,this._currentSubs=new m.Map,this._preRenderedSubs=new m.Map,this._eventListeners=new m.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")),h.debugMode&&console.log("Preloading fonts...");var s=[],l=new m.Map,c=null===this.settings.fontMap?new m.Map:this.settings.fontMap,u=new m.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 r="string"==typeof t?t:t.map(function(e){return null!==e.match(b)?e:'url("'+e+'")'}).join(", "),a=u.get(n);if(void 0!==a)for(var c=0;c<a.length;c++){var d=a[c];r+=', url("'+d+'")'}var p=[];e.document.fonts.forEach(function(e){e.family!==n&&e.family!=='"'+n+'"'||p.push(e)});var f;if(0===p.length){var v=new FontFace(n,r),g=new FontFace('"'+n+'"',r);e.document.fonts.add(v),e.document.fonts.add(g),f=y.any([v.load(),g.load()])}else f=y.any(p.map(function(e){return e.load()}))
;i=o._calculateFontMetricsAfterFetch(n,f.catch(function(e){return console.warn("Fetching fonts for "+n+" at "+r+" failed: %o",e),null}))}else{var m=("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}),a=u.get(n);void 0!==a&&(m=m.concat(a));var I=m.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(){h.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}),S=0===I.length?y.Promise.resolve(null):y.first(I).catch(function(e){return console.warn("Fetching fonts for "+n+" at "+m.join(", ")+" failed: %o",e),null});i=o._calculateFontMetricsAfterFetch(n,S)}s.push(i.then(function(e){return o._fontMetricsCache.set(n,e)}))}),y.Promise.all(s).then(function(){
h.debugMode&&console.log("All fonts have been preloaded."),o._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(),-1!==this.clock.currentTime&&this._onClockTick()},n.prototype.preRender=function(e){var t=this,i=this._preRenderedSubs.get(e.id);if(i)return i;var o=this.clock.currentTime-e.start;if(e.containsTransformTag&&o<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 r.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 g=document.createElementNS("http://www.w3.org/2000/svg","defs");f.appendChild(g);var y=null,b=new l.SpanStyles(this,e,this._scaleX,this._scaleY,this.settings,this._fontSizeElement,g,this._fontMetricsCache),I=null,S=!1,M=function(e){
null!==y&&y.hasChildNodes()&&c.appendChild(b.setStylesOnSpan(y,I)),null!==I&&I.animationDelays.forEach(function(e,t){return d.animationDelays.set(t,e)}),e&&(S?c.appendChild(b.makeNewLine()):c.appendChild(document.createElement("br"))),y=document.createElement("span"),I=new r.AnimationCollection(t,u),S=e};M(!1);for(var D=new a.DrawingStyles(this._scaleX,this._scaleY),C=this.ass.properties.wrappingStyle,O=0,j=0,P=e.parts;j<P.length;j++){var w=P[j]
;if(w instanceof p.Italic)b.italic=w.value;else if(w instanceof p.Bold)b.bold=w.value;else if(w instanceof p.Underline)b.underline=w.value;else if(w instanceof p.StrikeThrough)b.strikeThrough=w.value;else if(w instanceof p.Border)b.outlineWidth=w.value,b.outlineHeight=w.value;else if(w instanceof p.BorderX)b.outlineWidth=w.value;else if(w instanceof p.BorderY)b.outlineHeight=w.value;else if(w instanceof p.Shadow)b.shadowDepthX=w.value,
b.shadowDepthY=w.value;else if(w instanceof p.ShadowX)b.shadowDepthX=w.value;else if(w instanceof p.ShadowY)b.shadowDepthY=w.value;else if(w instanceof p.Blur)b.blur=w.value;else if(w instanceof p.GaussianBlur)b.gaussianBlur=w.value;else if(w instanceof p.FontName)b.fontName=w.value;else if(w instanceof p.FontSize)b.fontSize=w.value;else if(w instanceof p.FontSizePlus)b.fontSize+=w.value;else if(w instanceof p.FontSizeMinus)b.fontSize-=w.value;else if(w instanceof p.FontScaleX)b.fontScaleX=w.value;else if(w instanceof p.FontScaleY)b.fontScaleY=w.value;else if(w instanceof p.LetterSpacing)b.letterSpacing=w.value;else if(w instanceof p.RotateX)b.rotationX=w.value;else if(w instanceof p.RotateY)b.rotationY=w.value;else if(w instanceof p.RotateZ)b.rotationZ=w.value;else if(w instanceof p.SkewX)b.skewX=w.value;else if(w instanceof p.SkewY)b.skewY=w.value;else if(w instanceof p.PrimaryColor)b.primaryColor=w.value;else if(w instanceof p.SecondaryColor)b.secondaryColor=w.value;else if(w instanceof p.OutlineColor)b.outlineColor=w.value;else if(w instanceof p.ShadowColor)b.shadowColor=w.value;else if(w instanceof p.Alpha)b.primaryAlpha=w.value,
b.secondaryAlpha=w.value,b.outlineAlpha=w.value,b.shadowAlpha=w.value;else if(w instanceof p.PrimaryAlpha)b.primaryAlpha=w.value;else if(w instanceof p.SecondaryAlpha)b.secondaryAlpha=w.value;else if(w instanceof p.OutlineAlpha)b.outlineAlpha=w.value;else if(w instanceof p.ShadowAlpha)b.shadowAlpha=w.value;else if(w instanceof p.Alignment);else if(w instanceof p.ColorKaraoke)M(!1),
I.add("step-end",[new s.Keyframe(0,new m.Map([["color",b.secondaryColor.withAlpha(b.secondaryAlpha).toString()]])),new s.Keyframe(O,new m.Map([["color",b.primaryColor.withAlpha(b.primaryAlpha).toString()]]))]),O+=w.duration;else if(w instanceof p.WrappingStyle)C=w.value;else if(w instanceof p.Reset)b.reset(this.ass.styles.get(w.value));else if(w instanceof p.Position)c.style.position="absolute",c.style.left=(this._scaleX*w.x).toFixed(3)+"px",
c.style.top=(this._scaleY*w.y).toFixed(3)+"px";else if(w instanceof p.Move)c.style.position="absolute",
d.add("linear",[new s.Keyframe(0,new m.Map([["left",(this._scaleX*w.x1).toFixed(3)+"px"],["top",(this._scaleY*w.y1).toFixed(3)+"px"]])),new s.Keyframe(w.t1,new m.Map([["left",(this._scaleX*w.x1).toFixed(3)+"px"],["top",(this._scaleY*w.y1).toFixed(3)+"px"]])),new s.Keyframe(w.t2,new m.Map([["left",(this._scaleX*w.x2).toFixed(3)+"px"],["top",(this._scaleY*w.y2).toFixed(3)+"px"]])),new s.Keyframe(e.end-e.start,new m.Map([["left",(this._scaleX*w.x2).toFixed(3)+"px"],["top",(this._scaleY*w.y2).toFixed(3)+"px"]]))]);else if(w instanceof p.Fade)d.add("linear",[new s.Keyframe(0,new m.Map([["opacity","0"]])),new s.Keyframe(w.start,new m.Map([["opacity","1"]])),new s.Keyframe(e.end-e.start-w.end,new m.Map([["opacity","1"]])),new s.Keyframe(e.end-e.start,new m.Map([["opacity","0"]]))]);else if(w instanceof p.ComplexFade)d.add("linear",[new s.Keyframe(0,new m.Map([["opacity",w.a1.toFixed(3)]])),new s.Keyframe(w.t1,new m.Map([["opacity",w.a1.toFixed(3)]])),new s.Keyframe(w.t2,new m.Map([["opacity",w.a2.toFixed(3)]])),new s.Keyframe(w.t3,new m.Map([["opacity",w.a2.toFixed(3)]])),new s.Keyframe(w.t4,new m.Map([["opacity",w.a3.toFixed(3)]])),new s.Keyframe(e.end-e.start,new m.Map([["opacity",w.a3.toFixed(3)]]))]);else if(w instanceof p.Transform)for(var T=o<=w.start?0:o>=w.end?1:Math.pow((o-w.start)/(w.end-w.start),w.accel),E=0,x=w.tags;E<x.length;E++){
var N=x[E];N instanceof p.Border?(b.outlineWidth+=T*(N.value-b.outlineWidth),b.outlineHeight+=T*(N.value-b.outlineHeight)):N instanceof p.BorderX?b.outlineWidth+=T*(N.value-b.outlineWidth):N instanceof p.BorderY?b.outlineHeight+=T*(N.value-b.outlineHeight):N instanceof p.Shadow?(b.shadowDepthX+=T*(N.value-b.shadowDepthX),
b.shadowDepthY+=T*(N.value-b.shadowDepthY)):N instanceof p.ShadowX?b.shadowDepthX+=T*(N.value-b.shadowDepthX):N instanceof p.ShadowY?b.shadowDepthY+=T*(N.value-b.shadowDepthY):N instanceof p.Blur?b.blur+=T*(N.value-b.blur):N instanceof p.GaussianBlur?b.gaussianBlur+=T*(N.value-b.gaussianBlur):N instanceof p.FontSize?b.fontSize+=T*(N.value-b.fontSize):N instanceof p.FontSizePlus?b.fontSize+=T*N.value:N instanceof p.FontSizeMinus?b.fontSize-=T*N.value:N instanceof p.FontScaleX?b.fontScaleX+=T*(N.value-b.fontScaleX):N instanceof p.FontScaleY?b.fontScaleY+=T*(N.value-b.fontScaleY):N instanceof p.LetterSpacing?b.letterSpacing+=T*(N.value-b.letterSpacing):N instanceof p.RotateX?b.rotationX+=T*(N.value-b.rotationX):N instanceof p.RotateY?b.rotationY+=T*(N.value-b.rotationY):N instanceof p.RotateZ?b.rotationZ+=T*(N.value-b.rotationZ):N instanceof p.SkewX?b.skewX+=T*(N.value-b.skewX):N instanceof p.SkewY?b.skewY+=T*(N.value-b.skewY):N instanceof p.PrimaryColor?b.primaryColor=b.primaryColor.interpolate(N.value,T):N instanceof p.SecondaryColor?b.secondaryColor=b.secondaryColor.interpolate(N.value,T):N instanceof p.OutlineColor?b.outlineColor=b.outlineColor.interpolate(N.value,T):N instanceof p.ShadowColor?b.shadowColor=b.shadowColor.interpolate(N.value,T):N instanceof p.Alpha?(b.primaryAlpha+=T*(N.value-b.primaryAlpha),
b.secondaryAlpha+=T*(N.value-b.secondaryAlpha),b.outlineAlpha+=T*(N.value-b.outlineAlpha),b.shadowAlpha+=T*(N.value-b.shadowAlpha)):N instanceof p.PrimaryAlpha?b.primaryAlpha+=T*(N.value-b.primaryAlpha):N instanceof p.SecondaryAlpha?b.secondaryAlpha+=T*(N.value-b.secondaryAlpha):N instanceof p.OutlineAlpha?b.outlineAlpha+=T*(N.value-b.outlineAlpha):N instanceof p.ShadowAlpha&&(b.shadowAlpha+=T*(N.value-b.shadowAlpha))
}else w instanceof p.DrawingMode?0!==w.scale&&(D.scale=w.scale):w instanceof p.DrawingBaselineOffset?D.baselineOffset=w.value:w instanceof p.DrawingInstructions?(y.appendChild(D.toSVG(w,b.primaryColor.withAlpha(b.primaryAlpha))),M(!1)):w instanceof p.Text?(y.appendChild(document.createTextNode(w.value+"\u200c")),M(!1)):h.debugMode&&w instanceof p.Comment?(y.appendChild(document.createTextNode(w.value)),M(!1)):w instanceof p.NewLine&&M(!0)}for(var A=0,L=e.parts;A<L.length;A++){var w=L[A]
;if(w instanceof p.Position||w instanceof p.Move){var k=n._transformOrigins[e.alignment],_="translate("+-k[0]+"%, "+-k[1]+"%) translate(-"+c.style.marginLeft+", -"+c.style.marginTop+")",R=k[0]+"% "+k[1]+"%";c.style.webkitTransform=_,c.style.webkitTransformOrigin=R,c.style.transform=_,c.style.transformOrigin=R;break}}switch(C){case v.WrappingStyle.EndOfLineWrapping:c.style.whiteSpace="pre-wrap";break;case v.WrappingStyle.NoLineWrapping:c.style.whiteSpace="pre";break
;case v.WrappingStyle.SmartWrappingWithWiderTopLine:case v.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),
g.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){h.debugMode&&console.log(e.toString());var n=this._preRenderedSubs.get(e.id);void 0===n&&(n=this.preRender(e),h.debugMode&&console.log(e.toString()));var i=n.sub.cloneNode(!0),r=function(i){var r=i.style.animationName||i.style.webkitAnimationName
;if(void 0!==r&&""!==r){var a=r.split(",").map(function(i){return i=i.trim(),((n.animationDelays.get(i)+e.start-t.clock.currentTime)/t.clock.rate).toFixed(3)+"s"}).join(", ");i.style.webkitAnimationDelay=a,i.style.animationDelay=a}};r(i);for(var a=i.querySelectorAll('[style*="animation:"]'),o=0;o<a.length;o++)r(a[o]);var s=e.layer,l="absolute"===i.style.position?0:e.alignment;if(void 0===this._layerWrappers[s]){var c=document.createElement("div");c.className="layer layer"+s
;for(var u=null,d=s+1;d<this._layerWrappers.length&&null===u;d++)void 0!==this._layerWrappers[d]&&(u=this._layerWrappers[d]);this._subsWrapper.insertBefore(c,u),this._layerWrappers[s]=c,this._layerAlignmentWrappers[s]=[]}if(void 0===this._layerAlignmentWrappers[s][l]){var p=document.createElement("div");p.className="an an"+l
;for(var c=this._layerWrappers[s],u=null,f=l+1;f<this._layerAlignmentWrappers[s].length&&null===u;f++)void 0!==this._layerAlignmentWrappers[s][f]&&(u=this._layerAlignmentWrappers[s][f]);c.insertBefore(p,u),this._layerAlignmentWrappers[s][l]=p}this._layerAlignmentWrappers[s][l].appendChild(i);var v=i.getElementsByTagName("style")[0];if(void 0!==v){var g=v.sheet;0===g.cssRules.length&&(g.cssText=v.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(o.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=I,g.mixin(I,[c.EventSource])},function(e,t){
var n=t(19),i=function(){function e(e,t,n,i,r,a,o,s){this._scaleX=n,this._scaleY=i,this._settings=r,this._fontSizeElement=a,this._svgDefsElement=o,this._fontMetricsCache=s,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 r=t.childNodes[0]instanceof Text,a="";this._italic&&(a+="italic "),!0===this._bold?a+="bold ":!1!==this._bold&&(a+=this._bold+" ")
;var o=(this._scaleY*n.fontSizeForLineHeight(this._fontName,this._fontSize*(r?this._fontScaleX:1),this._settings.fallbackFonts,this._fontSizeElement,this._fontMetricsCache)).toFixed(3),s=(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=""+a+o+"px/"+s+"px "+l;var c=""
;this._underline&&(c="underline"),this._strikeThrough&&(c+=" line-through"),t.style.textDecoration=c.trim();var u="";if(r?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);u+="matrix(1, "+e._valueOrDefault(this._skewY,0)+", "+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,h=this._scaleY*this._outlineHeight,f=document.createElement("span");f.appendChild(t);var v=this._primaryColor.withAlpha(this._primaryAlpha),g=this._outlineColor.withAlpha(this._outlineAlpha),m=this._shadowColor.withAlpha(this._shadowAlpha);if(this._settings.enableSvg||(0!==p||0!==h)&&g.alpha!==v.alpha||(0!==this._shadowDepthX||0!==this._shadowDepthY)&&m.alpha!==v.alpha||(v=this._primaryColor.withAlpha(1),g=this._outlineColor.withAlpha(1),
m=this._shadowColor.withAlpha(1),t.style.opacity=this._primaryAlpha.toFixed(3)),t.style.color=v.toString(),this._settings.enableSvg?this._setSvgOutlineOnSpan(f,p,h,g,this._primaryAlpha):this._setTextShadowOutlineOnSpan(t,p,h,g),0!==this._shadowDepthX||0!==this._shadowDepthY){var y=m.toString()+" "+(this._shadowDepthX*this._scaleX).toFixed(3)+"px "+(this._shadowDepthY*this._scaleY).toFixed(3)+"px 0px";""===t.style.textShadow?t.style.textShadow=y:t.style.textShadow+=", "+y}
return 0===this._rotationX&&0===this._rotationY||(f.style.display="inline-block"),t.style.webkitAnimation=i.animationStyle,t.style.animation=i.animationStyle,f},e.prototype._setSvgOutlineOnSpan=function(e,t,n,i,r){var a="svg-filter-"+this._id+"-"+this._nextFilterId++,o=document.createElementNS("http://www.w3.org/2000/svg","filter");if(o.id=a,o.x.baseVal.valueAsString="-50%",o.width.baseVal.valueAsString="200%",o.y.baseVal.valueAsString="-50%",o.height.baseVal.valueAsString="200%",t>0||n>0){
var s=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 r;for(r=0;r<=n;r+=l)e(t/n*Math.sqrt(n*n-r*r),r);r!==n+l&&e(0,n)}else e(t,0)}(function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","feMorphology");o.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"+s,s++});var c=document.createElementNS("http://www.w3.org/2000/svg","feComponentTransfer");o.insertBefore(c,o.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===r?1:1/r,u.intercept.baseVal=0
;var d=document.createElementNS("http://www.w3.org/2000/svg","feMerge");o.appendChild(d);for(var p=0;p<s;p++){var h=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");d.appendChild(h),h.in1.baseVal="outline"+p}var f=document.createElementNS("http://www.w3.org/2000/svg","feComponentTransfer");o.appendChild(f),f.setAttribute("color-interpolation-filters","sRGB");var v=document.createElementNS("http://www.w3.org/2000/svg","feFuncR");f.appendChild(v),
v.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,v.slope.baseVal=0,v.intercept.baseVal=i.red/255*i.alpha;var g=document.createElementNS("http://www.w3.org/2000/svg","feFuncG");f.appendChild(g),g.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,g.slope.baseVal=0,g.intercept.baseVal=i.green/255*i.alpha;var m=document.createElementNS("http://www.w3.org/2000/svg","feFuncB");f.appendChild(m),
m.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,m.slope.baseVal=0,m.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");o.appendChild(b),
b.stdDeviationX.baseVal=this._gaussianBlur,b.stdDeviationY.baseVal=this._gaussianBlur}for(var p=0;p<this._blur;p++){var I=document.createElementNS("http://www.w3.org/2000/svg","feConvolveMatrix");o.appendChild(I),I.setAttribute("kernelMatrix","1 2 1 2 4 2 1 2 1"),I.edgeMode.baseVal=SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE}var S=document.createElementNS("http://www.w3.org/2000/svg","feComposite");o.appendChild(S),S.in2.baseVal="source",
S.operator.baseVal=SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT;var M=document.createElementNS("http://www.w3.org/2000/svg","feMerge");o.appendChild(M);var D=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");M.appendChild(D);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");o.appendChild(b),
b.stdDeviationX.baseVal=this._gaussianBlur,b.stdDeviationY.baseVal=this._gaussianBlur}for(var p=0;p<this._blur;p++){var I=document.createElementNS("http://www.w3.org/2000/svg","feConvolveMatrix");o.appendChild(I),I.setAttribute("kernelMatrix","1 2 1 2 4 2 1 2 1"),I.edgeMode.baseVal=SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE}}o.childElementCount>0&&(this._svgDefsElement.appendChild(o),e.style.webkitFilter='url("#'+a+'")',e.style.filter='url("#'+a+'")')},
e.prototype._setTextShadowOutlineOnSpan=function(e,t,n,i){var r=this;if(t>0||n>0){var a="";!function(e){for(var i=0;i<=t;i++)for(var r=0===t?n:n*Math.sqrt(1-i*i/(t*t)),a=0;a<=r;a++)e(i,a),0!==i&&e(-i,a),0!==a&&e(i,-a),0!==i&&0!==a&&e(-i,-a)}(function(e,t){a+=", "+i.toString()+" "+e+"px "+t+"px "+r._gaussianBlur.toFixed(3)+"px"}),e.style.textShadow=a.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),r=n(29),a=n(28),o=n(27),s=n(23),l=n(1),c=n(2),u=n(30),d=n(32),p=function(){function t(){if(this._properties=new a.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 r.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(s.verboseMode){var i="";n.forEach(function(e,t){return i+=t+" = "+e+", "}),console.log("Read style: "+i)}var a=new r.Style(n);this._styles.set(a.name,a)}},t.prototype.addEvent=function(e){var t=c.parseLineIntoTypedTemplate(e,this._dialoguesFormatSpecifier);if(null!==t&&"Dialogue"===t.type){var n=t.template;if(s.verboseMode){var r="";n.forEach(function(e,t){return r+=t+" = "+e+", "}),console.log("Read dialogue: "+r)}
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=o.Format.ASS),t.fromStream(new l.StringStream(e),n)},t.fromStream=function(e,t){switch(void 0===t&&(t=o.Format.ASS),t){case o.Format.ASS:return new l.StreamParser(e).ass;case o.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=o.Format.ASS);var r
;return r="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(!1===e.ok||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.")),r.catch(function(e){console.warn("fetch() failed, falling back to XHR: %o",e)
;var r=new XMLHttpRequest,a=t.fromStream(new l.XhrStream(r),i);return r.open("GET",n,!0),r.send(),a})},t.fromReadableStream=function(e,n,i){return void 0===n&&(n="utf-8"),void 0===i&&(i=o.Format.ASS),t.fromStream(new l.BrowserReadableStream(e,n),i)},t}();t.ASS=p},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),r=t(8),a=t(23),o=t(30),s=function(){function e(t,i){
this._parts=null,this._containsTransformTag=!1;var r=new o.Map;t.forEach(function(e,t){r.set(t.toLowerCase(),e)}),t=r,this._id=++e._lastDialogueId;var s=t.get("style");if(void 0!==s&&null!==s&&s.constructor===String&&(s=s.replace(/^\*+/,""),null!==s.match(/^Default$/i)&&(s="Default")),this._style=i.styles.get(s),void 0===this._style&&(a.debugMode&&console.warn("Unrecognized style "+s+'. Falling back to "Default"'),this._style=i.styles.get("Default")),
void 0===this._style)throw new Error("Unrecognized style "+s);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 r.Alignment?e._alignment=t.value:t instanceof r.Move?null!==t.t1&&null!==t.t2||(e._parts[n]=new r.Move(t.x1,t.y1,t.x2,t.y2,0,e._end-e._start)):t instanceof r.Transform&&(null!==t.start&&null!==t.end&&null!==t.accel||(e._parts[n]=new r.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)}),a.debugMode){var t=this._parts.filter(function(e){return e instanceof r.Comment&&-1!==e.value.indexOf("\\")})
;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=s},function(e){function t(e,t,n,i,r){var a=e.get(t);if(void 0===a)return n(r);try{var o=n(a);if(null!==i&&!i(o))throw new Error("Validation failed.");return o}catch(e){
throw new Error("Property "+t+" has invalid value "+a+" - "+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),r=t(30),a=function(){function e(e){var t=new r.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=a},function(t){function n(e){t.Map=null!==e?e: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 r=i[n];e.call(t,this._values[r],this._keys[r],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],r=0,a=Object.getOwnPropertyNames(i.prototype);r<a.length;r++){var o=a[r];e.prototype[o]=i.prototype[o]}}e.mixin=t},function(t){function n(e){
t.Promise=null!==e?e:l}function i(e){return r(e,[])}function r(e,n){if(0===e.length)return t.Promise.reject(n);var i=e[0],a=e.slice(1);return i.catch(function(e){return r(a,n.concat(e))})}function a(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 o(e,t){return e.then(function(e){return t(),e},function(e){throw t(),e})}t.Promise=e.Promise;var s=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,r=document.createElement("div");return new t(function(){for(var e=n.splice(0,n.length),t=0;t<e.length;t++){(0,e[t])()}i=!1,n.length>0&&(r.classList.toggle("foo"),i=!0)}).observe(r,{attributes:!0}),function(e){n.push(e),i||(r.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},r={capabilities:n,handler:t};switch(this._state){
case c.PENDING:this._fulfillReactions.push(i),this._rejectReactions.push(r);break;case c.FULFILLED:this._enqueueFulfilledReactionJob(i,this._fulfilledValue);break;case c.REJECTED:this._enqueueRejectedReactionJob(r,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 r=[],a=e.length;if(0===a)return void n(r);e.forEach(function(e,o){return t.Promise.resolve(e).then(function(e){r[o]=e,0===--a&&n(r)},i)})})},e.race=function(e){return new t.Promise(function(n,i){for(var r=0;r<e.length;r++){var a=e[r];t.Promise.resolve(a).then(n,i)}})},e.prototype._createResolvingFunctions=function(){var e=this,t=!1;return{resolve: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)}if("function"!=typeof i)return void e._fulfill(n);s(function(){return e._resolveWithThenable(n,i)})}},reject:function(n){t||(t=!0,e._reject(n))}}},e.prototype._resolveWithThenable=function(e,t){var n=this._createResolvingFunctions(),i=n.resolve,r=n.reject;try{t.call(e,i,r)}catch(e){r(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){s(function(){
var n,i=e.capabilities,r=i.resolve,a=i.reject,o=e.handler;try{n=o(t)}catch(e){return void a(e)}r(n)})},e.prototype._enqueueRejectedReactionJob=function(e,t){s(function(){var n,i=e.capabilities,r=i.resolve,a=i.reject,o=e.handler;try{n=o(t)}catch(e){return void a(e)}r(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=a,t.lastly=o},function(t){function n(e){t.Set=null!==e?e: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 r=i[n],a=this._elements[r];e.call(t,a,a,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){if(arguments.length<3)return i(e.reverse(),t);r(e.reverse(),t,n)}function i(e,t){for(var n=0;n<e.length;n++){t=(0,e[n])(t)||t}return t}function r(e,t,n){for(var i=0;i<e.length;i++){(0,e[i])(t,n)}}e.__extends=t,e.__decorate=n},function(e,t){
var n=t(30),i=t(32),r=t(36),a=t(38),o=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 r=new i.DeferredPromise,o=++e._lastRequestId;this._pendingRequests.set(o,r);var s={requestId:o,command:t,parameters:n};return this._comm.postMessage(a.serialize(s)),r.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(a.serialize({command:r.WorkerCommands.Response,requestId:t,error:n,result:i}))},e.prototype._onMessage=function(e){var t=this,n=a.deserialize(e);if(n.command===r.WorkerCommands.Response){var i=n,o=this._pendingRequests.get(i.requestId)
;void 0!==o&&(this._pendingRequests.delete(i.requestId),null===i.error?o.resolve(i.result):o.reject(i.error))}else{var s=n,l=s.requestId,c=a.getWorkerCommandHandler(s.command);if(void 0===c)return void this._respond({requestId:l,error:new Error("No handler registered for command "+s.command),result:null});c(s.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=o,a.registerWorkerCommand(r.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=o.src),new r.WorkerChannelImpl(new Worker(e))}var r=n(35),a=n(36);t.WorkerCommands=a.WorkerCommands,t.supported="undefined"!=typeof Worker
;var o="undefined"!=typeof document&&void 0!==document.currentScript?document.currentScript:null;t.createWorker=i,"undefined"!=typeof WorkerGlobalScope&&e instanceof WorkerGlobalScope&&new r.WorkerChannelImpl(e)},function(e,t){function n(e,t){l.set(e,t)}function i(e){return l.get(e)}function r(e){e._classTag=c.size,c.set(e._classTag,e)}function a(e){return JSON.stringify(e,function(e,t){return t&&void 0!==t._classTag&&(t._classTag=t._classTag),t})}function o(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,r=Object.keys(t);i<r.length;i++){var a=r[i];"_classTag"!==a&&(n[a]=t[a])}t=n}return t})}var s=t(30),l=new s.Map,c=new s.Map;e.registerWorkerCommand=n,e.getWorkerCommandHandler=i,e.registerClassPrototype=r,e.serialize=a,e.deserialize=o}])})},function(e,t){e.exports={measure:"Subtitles-measure-3cYuW",renderer:"Subtitles-renderer-12VzS"}},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(function(e,t){return t.isMusic},Object(o.a)(),Object(s.a)(),l.a,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],r=t.startMetadataItemEntityID||n.metadataItem,a=i[r],o=void 0;return a&&(o=e?a.parentThumb||a.grandparentThumb:a.grandparentArt||a.art),{serverEntityID:t.serverEntityID,imageUrl:o}})}var r=n(6),a=(n.n(r),n(11)),o=n(44),s=n(119),l=n(110),c=n(1e3);t.a=Object(a.b)(i)(c.a)},function(e,t,n){"use strict"
;var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(6),m=(n.n(g),n(11)),y=n(508),b=n(34),I=n(45),S=n.n(I),M=n(118),D=n(706),C=n(2188),O=parseInt(S.a.playQueueItemHeight,10),j=Object(g.createSelector)(function(e){return e.ui.audioVideoPlayer},function(e){var t=e.playQueue;return{isQueueRepeated:t.repeat,isQueueShuffled:t.playQueueShuffled,isPlayerPaused:e.isPaused,isUpdatePending:t.isUpdatePending,
playQueueItemEntityIDs:t.playQueueItems,playQueueSelectedItemOffset:t.playQueueSelectedItemOffset,playQueueTotalCount:t.playQueueTotalCount,currentIndex:t.currentIndex,showAddToPlaylist:!(t.isLocal||t.isUniversal)}}),P={dispatchSavePlayQueueToPlaylist:D.b,dispatchMovePlayQueueItem:M.e},w=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onSavePress=function(){var e=r.props.playerType;r.props.dispatchSavePlayQueueToPlaylist({playerType:e})},
r.onPlayQueueItemDragMove=function(e){e!==r.state.moveIndex&&r.setState({moveIndex:e})},r.onPlayQueueItemDragEnd=function(e,t){var n=r.props.playerType,i=r.state.moveIndex;t&&null!=i&&Object(b.a)(function(){r.props.dispatchMovePlayQueueItem(o()({playerType:n},e,{moveIndex:i}))}),r.setState({moveIndex:null})},r.onScrollPositionChange=function(e){var t=e.scrollTop;r.setState({scrollTop:t})},r.shouldUpdateScrollTop=!1,r.state={moveIndex:null,scrollTop:O*n.currentIndex},r}return p()(t,e),
t.prototype.componentWillReceiveProps=function(e){this.props.isQueueRepeated===e.isQueueRepeated&&this.props.isQueueShuffled===e.isQueueShuffled||(this.shouldUpdateScrollTop=!0),this.shouldUpdateScrollTop&&this.props.currentIndex!==e.currentIndex&&this.setState({scrollTop:O*e.currentIndex}),this.props.isUpdatePending&&!e.isUpdatePending&&(this.shouldUpdateScrollTop=!1)},t.prototype.render=function(){var e=this.props,t=(e.dispatchMovePlayQueueItem,e.dispatchSavePlayQueueToPlaylist,
r()(e,["dispatchMovePlayQueueItem","dispatchSavePlayQueueToPlaylist"])),n=this.state,i=n.moveIndex,a=n.scrollTop;return v.a.createElement(C.a,o()({moveIndex:i,scrollTop:a,onPlayQueueItemDragMove:this.onPlayQueueItemDragMove,onPlayQueueItemDragEnd:this.onPlayQueueItemDragEnd,onSavePress:this.onSavePress,onScrollPositionChange:this.onScrollPositionChange},t))},t}(f.Component);t.a=Object(y.a)(Object(m.b)(j,P)(w))},function(e,t,n){"use strict";function i(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")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e){
g.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 p.DragDropManager(t)};return function(e){var t=e.displayName||e.name||"Component";return function(i){function o(){r(this,o),
i.apply(this,arguments)}return a(o,i),o.prototype.getDecoratedComponentInstance=function(){return this.refs.child},o.prototype.getManager=function(){return n.dragDropManager},o.prototype.getChildContext=function(){return n},o.prototype.render=function(){return d.default.createElement(e,s({},this.props,{ref:"child"}))},c(o,null,[{key:"DecoratedComponent",value:e,enumerable:!0},{key:"displayName",value:"DragDropContext("+t+")",enumerable:!0},{key:"childContextTypes",value:{
dragDropManager:u.PropTypes.object.isRequired},enumerable:!0}]),o}(u.Component)}}t.__esModule=!0;var s=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=o;var u=n(0),d=i(u),p=n(2084),h=n(141),f=i(h),v=n(516),g=i(v);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2085);Object.defineProperty(t,"DragDropManager",{enumerable:!0,get:function(){return i(r).default}});var a=n(2147);Object.defineProperty(t,"DragSource",{enumerable:!0,get:function(){return i(a).default}});var o=n(2148)
;Object.defineProperty(t,"DropTarget",{enumerable:!0,get:function(){return i(o).default}});var s=n(2149);Object.defineProperty(t,"createTestBackend",{enumerable:!0,get:function(){return i(s).default}})},function(e,t,n){"use strict";function i(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")}Object.defineProperty(t,"__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}}(),o=n(2086),s=i(o),l=n(2090),c=i(l),u=n(509),d=function(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}(u),p=n(2142),h=i(p),f=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,e)
;var i=(0,s.default)(c.default);this.context=n,this.store=i,this.monitor=new h.default(i),this.registry=this.monitor.registry,this.backend=t(this),i.subscribe(this.handleRefCountChange.bind(this))}return a(e,[{key:"handleRefCountChange",value: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)}},{key:"getContext",value:function(){return this.context}},{key:"getMonitor",
value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.registry}},{key:"getActions",value:function(){function e(e){return function(){for(var i=arguments.length,r=Array(i),a=0;a<i;a++)r[a]=arguments[a];var o=e.apply(t,r);void 0!==o&&n(o)}}var t=this,n=this.store.dispatch;return Object.keys(d).filter(function(e){return"function"==typeof d[e]}).reduce(function(t,n){var i=d[n];return t[n]=e(i),t},{})}}]),e}()
;t.default=f},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){function i(){m===g&&(m=g.slice())}function a(){return v}function s(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return i(),m.push(e),function(){if(t){t=!1,i();var n=m.indexOf(e);m.splice(n,1)}}}function u(e){if(!(0,o.default)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.")
;if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(y)throw new Error("Reducers may not dispatch actions.");try{y=!0,v=f(v,e)}finally{y=!1}for(var t=g=m,n=0;n<t.length;n++){(0,t[n])()}return e}function d(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");f=e,u({type:c.INIT})}function p(){var e,t=s;return e={subscribe:function(e){function n(){e.next&&e.next(a())}
if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");return n(),{unsubscribe:t(n)}}},e[l.default]=function(){return this},e}var h;if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(r)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var f=e,v=t,g=[],m=g,y=!1;return u({type:c.INIT}),h={dispatch:u,subscribe:s,getState:a,
replaceReducer:d},h[l.default]=p,h}t.__esModule=!0,t.ActionTypes=void 0,t.default=r;var a=n(217),o=i(a),s=n(2087),l=i(s),c=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,i){var r,a=n(2089);r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:i;var o=Object(a.a)(r);t.default=o}.call(t,n(191),n(2088)(e))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e)
;t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";function i(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}t.a=i},function(e,t,n){"use strict";function i(e){
return e&&e.__esModule?e:{default:e}}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return{dirtyHandlerIds:(0,p.default)(e.dirtyHandlerIds,t,e.dragOperation),dragOffset:(0,o.default)(e.dragOffset,t),refCount:(0,u.default)(e.refCount,t),dragOperation:(0,l.default)(e.dragOperation,t),stateId:(0,f.default)(e.stateId)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r
;var a=n(1005),o=i(a),s=n(2091),l=i(s),c=n(2129),u=i(c),d=n(1013),p=i(d),h=n(2141),f=i(h)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1];switch(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 l.REMOVE_TARGET:return-1===e.targetIds.indexOf(t.targetId)?e:r({},e,{targetIds:(0,o.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}}Object.defineProperty(t,"__esModule",{value:!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=i;var a=n(1007),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=n(509),l=n(515),c={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null}},function(e,t,n){function i(){this.size=0,this.__data__={hash:new r,map:new(o||a),string:new r}}var r=n(2093),a=n(2104),o=n(2110);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 r=n(2094),a=n(2100),o=n(2101),s=n(2102),l=n(2103);i.prototype.clear=r,i.prototype.delete=a,i.prototype.get=o,i.prototype.has=s,i.prototype.set=l,e.exports=i},function(e,t,n){function i(){this.__data__=r?r(null):{},this.size=0}var r=n(510);e.exports=i},function(e,t,n){function i(e){return!(!o(e)||a(e))&&(r(e)?f:c).test(s(e))}
var r=n(1010),a=n(2096),o=n(430),s=n(2098),l=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,p=u.toString,h=d.hasOwnProperty,f=RegExp("^"+p.call(h).replace(l,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=i},function(e,t,n){function i(e){return!!a&&a in e}var r=n(2097),a=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=i},function(e,t,n){
var i=n(407),r=i["__core-js_shared__"];e.exports=r},function(e,t){function n(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var i=Function.prototype,r=i.toString;e.exports=n},function(e,t){function n(e,t){return null==e?void 0:e[t]}e.exports=n},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(r){var n=t[e];return n===a?void 0:n}
return s.call(t,e)?t[e]:void 0}var r=n(510),a="__lodash_hash_undefined__",o=Object.prototype,s=o.hasOwnProperty;e.exports=i},function(e,t,n){function i(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}var r=n(510),a=Object.prototype,o=a.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]=r&&void 0===t?a:t,this}var r=n(510),a="__lodash_hash_undefined__";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 r=n(2105),a=n(2106),o=n(2107),s=n(2108),l=n(2109);i.prototype.clear=r,i.prototype.delete=a,i.prototype.get=o,i.prototype.has=s,i.prototype.set=l,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=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}var r=n(512),a=Array.prototype,o=a.splice;e.exports=i
},function(e,t,n){function i(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}var r=n(512);e.exports=i},function(e,t,n){function i(e){return r(this.__data__,e)>-1}var r=n(512);e.exports=i},function(e,t,n){function i(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}var r=n(512);e.exports=i},function(e,t,n){var i=n(511),r=n(407),a=i(r,"Map");e.exports=a},function(e,t,n){function i(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}var r=n(513)
;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(this,e).get(e)}var r=n(513);e.exports=i},function(e,t,n){function i(e){return r(this,e).has(e)}var r=n(513);e.exports=i},function(e,t,n){function i(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}var r=n(513);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){function i(e,t,n){return t===t?o(e,t,n):r(e,a,n)}var r=n(2119),a=n(2120),o=n(2121);e.exports=i},function(e,t){function n(e,t,n,i){for(var r=e.length,a=n+(i?1:-1);i?a--:++a<r;)if(t(e[a],a,e))return a;return-1}e.exports=n},function(e,t){function n(e){return e!==e}e.exports=n},function(e,t){function n(e,t,n){
for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}e.exports=n},function(e,t,n){function i(e,t,n){return t=a(void 0===t?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=a(i.length-t,0),l=Array(s);++o<s;)l[o]=i[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=i[o];return c[t]=n(l),r(e,this,c)}}var r=n(2123),a=Math.max;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){var i=n(2125),r=n(2128),a=r(i);e.exports=a},function(e,t,n){var i=n(2126),r=n(2127),a=n(1011),o=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:a;e.exports=o},function(e,t){function n(e){return function(){return e}}e.exports=n},function(e,t,n){var i=n(511),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},function(e,t){
function n(e){var t=0,n=0;return function(){var o=a(),s=r-(o-n);if(n=o,s>0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,r=16,a=Date.now;e.exports=n},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(arguments[1].type){case r.ADD_SOURCE:case r.ADD_TARGET:return e+1;case r.REMOVE_SOURCE:case r.REMOVE_TARGET:return e-1;default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i
;var r=n(515)},function(e,t,n){var i=n(2131),r=n(431),a=n(2132),o=n(514),s=r(function(e){return a(i(e,o))});e.exports=s},function(e,t){function n(e,t){for(var n=-1,i=null==e?0:e.length,r=0,a=[];++n<i;){var o=e[n];t(o,n,e)&&(a[r++]=o)}return a}e.exports=n},function(e,t,n){function i(e,t,n){var i=e.length;if(i<2)return i?o(e[0]):[];for(var s=-1,l=Array(i);++s<i;)for(var c=e[s],u=-1;++u<i;)u!=s&&(l[s]=r(l[s]||c,e[u],t,n));return o(a(l,1),t,n)}var r=n(1008),a=n(1014),o=n(1016);e.exports=i
},function(e,t){function n(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}e.exports=n},function(e,t,n){function i(e){return o(e)||a(e)||!!(s&&e&&e[s])}var r=n(638),a=n(1015),o=n(292),s=r?r.isConcatSpreadable:void 0;e.exports=i},function(e,t,n){function i(e){return a(e)&&r(e)==o}var r=n(481),a=n(408),o="[object Arguments]";e.exports=i},function(e,t,n){var i=n(2137),r=n(1017),a=n(1018),o=i&&1/a(new i([,-0]))[1]==1/0?function(e){return new i(e)}:r;e.exports=o},function(e,t,n){
var i=n(511),r=n(407),a=i(r,"Set");e.exports=a},function(e,t,n){var i=n(699),r=n(2139),a=n(431),o=n(2140),s=a(function(e){var t=i(e,o);return t.length&&t[0]===e[0]?r(t):[]});e.exports=s},function(e,t,n){function i(e,t,n){for(var i=n?o:a,d=e[0].length,p=e.length,h=p,f=Array(p),v=1/0,g=[];h--;){var m=e[h];h&&t&&(m=s(m,l(t))),v=u(m.length,v),f[h]=!n&&(t||d>=120&&m.length>=120)?new r(h&&m):void 0}m=e[0];var y=-1,b=f[0];e:for(;++y<d&&g.length<v;){var I=m[y],S=t?t(I):I;if(I=n||0!==I?I:0,
!(b?c(b,S):i(g,S,n))){for(h=p;--h;){var M=f[h];if(!(M?c(M,S):i(e[h],S,n)))continue e}b&&b.push(S),g.push(I)}}return g}var r=n(695),a=n(697),o=n(698),s=n(699),l=n(700),c=n(701),u=Math.min;e.exports=i},function(e,t,n){function i(e){return r(e)?e:[]}var r=n(514);e.exports=i},function(e,t,n){"use strict";function i(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function i(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")}Object.defineProperty(t,"__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}
}(),o=n(141),s=i(o),l=n(292),c=i(l),u=n(1006),d=i(u),p=n(2143),h=i(p),f=n(1005),v=n(1013),g=function(){function e(t){r(this,e),this.store=t,this.registry=new h.default(t)}return a(e,[{key:"subscribeToStateChange",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.handlerIds;(0,s.default)("function"==typeof e,"listener must be a function."),(0,s.default)(void 0===i||(0,c.default)(i),"handlerIds, when specified, must be an array of strings.")
;var r=this.store.getState().stateId,a=function(){var n=t.store.getState(),a=n.stateId;try{a===r||a===r+1&&!(0,v.areDirty)(n.dirtyHandlerIds,i)||e()}finally{r=a}};return this.store.subscribe(a)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;(0,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)}},{key:"canDragSource",
value:function(e){var t=this.registry.getSource(e);return(0,s.default)(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){var t=this.registry.getTarget(e);if((0,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(0,d.default)(n,i)&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{
key:"isDraggingSource",value:function(e){var t=this.registry.getSource(e,!0);return(0,s.default)(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&(this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e))}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1},n=t.shallow;if(!this.isDragging())return!1;var i=this.registry.getTargetType(e),r=this.getItemType();if(!(0,
d.default)(i,r))return!1;var a=this.getTargetIds();if(!a.length)return!1;var o=a.indexOf(e);return n?o===a.length-1:o>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",
value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{
key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return(0,f.getSourceClientOffset)(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return(0,f.getDifferenceFromInitialOffset)(this.store.getState().dragOffset)}}]),e}();t.default=g},function(e,t,n){"use strict";function i(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")}function a(e){(0,h.default)("function"==typeof e.canDrag,"Expected canDrag to be a function."),(0,h.default)("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),(0,h.default)("function"==typeof e.endDrag,"Expected endDrag to be a function.")}function o(e){(0,h.default)("function"==typeof e.canDrop,"Expected canDrop to be a function."),(0,
h.default)("function"==typeof e.hover,"Expected hover to be a function."),(0,h.default)("function"==typeof e.drop,"Expected beginDrag to be a function.")}function s(e,t){if(t&&(0,v.default)(e))return void e.forEach(function(e){return s(e,!1)});(0,h.default)("string"==typeof e||"symbol"===(void 0===e?"undefined":d(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 l(e){var t=(0,I.default)().toString();switch(e){case S.SOURCE:
return"S"+t;case S.TARGET:return"T"+t;default:(0,h.default)(!1,"Unknown role: "+e)}}function c(e){switch(e[0]){case"S":return S.SOURCE;case"T":return S.TARGET;default:(0,h.default)(!1,"Cannot parse handler ID: "+e)}}Object.defineProperty(t,"__esModule",{value:!0});var u=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}}(),d="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},p=n(141),h=i(p),f=n(292),v=i(f),g=n(2144),m=i(g),y=n(515),b=n(2146),I=i(b),S={SOURCE:"SOURCE",TARGET:"TARGET"},M=function(){function e(t){r(this,e),this.store=t,this.types={},this.handlers={},this.pinnedSourceId=null,this.pinnedSource=null}return u(e,[{key:"addSource",
value:function(e,t){s(e),a(t);var n=this.addHandler(S.SOURCE,e,t);return this.store.dispatch((0,y.addSource)(n)),n}},{key:"addTarget",value:function(e,t){s(e,!0),o(t);var n=this.addHandler(S.TARGET,e,t);return this.store.dispatch((0,y.addTarget)(n)),n}},{key:"addHandler",value:function(e,t,n){var i=l(e);return this.types[i]=t,this.handlers[i]=n,i}},{key:"containsHandler",value:function(e){var t=this;return Object.keys(this.handlers).some(function(n){return t.handlers[n]===e})}},{key:"getSource",
value:function(e,t){return(0,h.default)(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.handlers[e]}},{key:"getTarget",value:function(e){return(0,h.default)(this.isTargetId(e),"Expected a valid target ID."),this.handlers[e]}},{key:"getSourceType",value:function(e){return(0,h.default)(this.isSourceId(e),"Expected a valid source ID."),this.types[e]}},{key:"getTargetType",value:function(e){return(0,
h.default)(this.isTargetId(e),"Expected a valid target ID."),this.types[e]}},{key:"isSourceId",value:function(e){return c(e)===S.SOURCE}},{key:"isTargetId",value:function(e){return c(e)===S.TARGET}},{key:"removeSource",value:function(e){var t=this;(0,h.default)(this.getSource(e),"Expected an existing source."),this.store.dispatch((0,y.removeSource)(e)),(0,m.default)(function(){delete t.handlers[e],delete t.types[e]})}},{key:"removeTarget",value:function(e){var t=this;(0,
h.default)(this.getTarget(e),"Expected an existing target."),this.store.dispatch((0,y.removeTarget)(e)),(0,m.default)(function(){delete t.handlers[e],delete t.types[e]})}},{key:"pinSource",value:function(e){var t=this.getSource(e);(0,h.default)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){(0,h.default)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}}]),e}();t.default=M
},function(e,t,n){"use strict";function i(){if(l.length)throw l.shift()}function r(e){var t;t=s.length?s.pop():new a,t.task=e,o(t)}function a(){this.task=null}var o=n(2145),s=[],l=[],c=o.makeRequestCallFromTimer(i);e.exports=r,a.prototype.call=function(){try{this.task.call()}catch(e){r.onerror?r.onerror(e):(l.push(e),c())}finally{this.task=null,s[s.length]=this}}},function(e,t,n){"use strict";(function(t){function n(e){o.length||(a(),s=!0),o[o.length]=e}function i(){for(;l<o.length;){var e=l
;if(l+=1,o[e].call(),l>c){for(var t=0,n=o.length-l;t<n;t++)o[t]=o[t+l];o.length-=l,l=0}}o.length=0,l=0,s=!1}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 a,o=[],s=!1,l=0,c=1024,u=void 0!==t?t:self,d=u.MutationObserver||u.WebKitMutationObserver;a="function"==typeof d?function(e){var t=1,n=new d(e),i=document.createTextNode("");return n.observe(i,{characterData:!0}),function(){t=-t,i.data=t}}(i):r(i),
n.requestFlush=a,n.makeRequestCallFromTimer=r}).call(t,n(191))},function(e,t,n){"use strict";function i(){return r++}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=0},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(t,"__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}}(),a=function(){function e(){i(this,e)}return r(e,[{key:"canDrag",value:function(){return!0}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}]),e}();t.default=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")}
Object.defineProperty(t,"__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}}(),a=function(){function e(){i(this,e)}return r(e,[{key:"canDrop",value:function(){return!0}},{key:"hover",value:function(){}},{key:"drop",value:function(){}}]),e}();t.default=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 r(e){return new l(e)}Object.defineProperty(t,"__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}}();t.default=r;var o=n(1017),s=function(e){
return e&&e.__esModule?e:{default:e}}(o),l=function(){function e(t){i(this,e),this.actions=t.getActions()}return a(e,[{key:"setup",value:function(){this.didCallSetup=!0}},{key:"teardown",value:function(){this.didCallTeardown=!0}},{key:"connectDragSource",value:function(){return s.default}},{key:"connectDragPreview",value:function(){return s.default}},{key:"connectDropTarget",value:function(){return s.default}},{key:"simulateBeginDrag",value:function(e,t){this.actions.beginDrag(e,t)}},{
key:"simulatePublishDragSource",value:function(){this.actions.publishDragSource()}},{key:"simulateHover",value:function(e,t){this.actions.hover(e,t)}},{key:"simulateDrop",value:function(){this.actions.drop()}},{key:"simulateEndDrag",value:function(){this.actions.endDrag()}}]),e}()},function(e,t,n){"use strict";function i(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")}function a(e,t){
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return S.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(m.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,o=void 0===i?v.default:i,l=n.displayName||n.name||"Component";return function(t){function i(e,n){r(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 a(i,t),i.prototype.getDecoratedComponentInstance=function(){return this.refs.child},i.prototype.shouldComponentUpdate=function(e,t){
return!o(e,this.props)||!h.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();h.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,s({},this.props,this.state,{ref:"child"}))},i}(u.Component)}}t.__esModule=!0;var s=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=o;var u=n(0),d=i(u),p=n(703),h=i(p),f=n(1019),v=i(f),g=n(217),m=i(g),y=n(141),b=i(y),I=n(516),S=i(I);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(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(a.call(arguments)));var r=e
;"function"!=typeof e&&(s.default(D.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),r=function(){return e}),
s.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 o=m.default(t);return s.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),
s.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 h.default({connectBackend:function(e,t){return e.connectDragSource(t)},containerDisplayName:"DragSource",createHandler:o,registerHandler:v.default,createMonitor:b.default,createConnector:S.default,DecoratedComponent:e,getType:r,collect:n,options:i})}}
t.__esModule=!0;var a=Array.prototype.slice;t.default=r;var o=n(141),s=i(o),l=n(217),c=i(l),u=n(516),d=i(u),p=n(1020),h=i(p),f=n(2156),v=i(f),g=n(2157),m=i(g),y=n(2158),b=i(y),I=n(2159),S=i(I),M=n(1023),D=i(M);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(704),a=i(r);t.isDisposable=a.default;var o=n(2153),s=i(o);t.Disposable=s.default;var l=n(2154),c=i(l);t.CompositeDisposable=c.default;var u=n(2155),d=i(u)
;t.SerialDisposable=d.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 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}}(),a=function(){},o=function(){function e(t){i(this,e),this.isDisposed=!1,
this.action=t||a}return r(e,null,[{key:"empty",value:{dispose:a},enumerable:!0}]),e.prototype.dispose=function(){this.isDisposed||(this.action.call(null),this.isDisposed=!0)},e}();t.default=o,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 r=n(704),a=function(e){return e&&e.__esModule?e:{default:e}}(r),o=function(){function e(){
for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];i(this,e),Array.isArray(n[0])&&1===n.length&&(n=n[0]);for(var o=0;o<n.length;o++)if(!a.default(n[o]))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-1!==t&&(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";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=n(704),a=function(e){return e&&e.__esModule?e:{default:e}}(r),o=function(){function e(){
i(this,e),this.isDisposed=!1,this.current=null}return e.prototype.getDisposable=function(){return this.current},e.prototype.setDisposable=function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0];if(null!=e&&!a.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";function i(e,t,n){function i(){r.removeSource(a)}var r=n.getRegistry(),a=r.addSource(e,t);return{handlerId:a,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 r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){
Object.keys(e).forEach(function(t){s.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),
s.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){s.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){r(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=a;var o=n(141),s=i(o),l=n(217),c=(i(l),["canDrag","beginDrag","canDrag","isDragging","endDrag"]),u=["beginDrag"];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")}function r(e){return new c(e)}t.__esModule=!0,t.default=r
;var a=n(141),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=!1,l=!1,c=function(){function e(t){i(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.sourceId=e},e.prototype.canDrag=function(){o.default(!s,"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 s=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{s=!1}},
e.prototype.isDragging=function(){o.default(!l,"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 l=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{l=!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 r(e){function t(){c&&(c(),c=null),r&&a&&(c=e.connectDragSource(r,a,s))}function n(){p&&(p(),p=null),r&&u&&(p=e.connectDragPreview(r,u,d))}function i(e){e!==r&&(r=e,t(),n())}
var r=void 0,a=void 0,s=void 0,c=void 0,u=void 0,d=void 0,p=void 0;return{receiveHandlerId:i,hooks:o.default({dragSource:function(e,n){e===a&&l.default(n,s)||(a=e,s=n,t())},dragPreview:function(e,t){e===u&&l.default(t,d)||(u=e,d=t,n())}})}}t.__esModule=!0,t.default=r;var a=n(1021),o=i(a),s=n(1022),l=i(s);e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=e.ref
;return a.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=i;var r=n(141),a=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0);e.exports=t.default
},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(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(a.call(arguments)));var r=e
;"function"!=typeof e&&(s.default(D.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),r=function(){return e}),
s.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 o=m.default(t);return s.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),
s.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 h.default({connectBackend:function(e,t){return e.connectDropTarget(t)},containerDisplayName:"DropTarget",createHandler:o,registerHandler:v.default,createMonitor:b.default,createConnector:S.default,DecoratedComponent:e,getType:r,collect:n,options:i})}}
t.__esModule=!0;var a=Array.prototype.slice;t.default=r;var o=n(141),s=i(o),l=n(217),c=i(l),u=n(516),d=i(u),p=n(1020),h=i(p),f=n(2162),v=i(f),g=n(2163),m=i(g),y=n(2164),b=i(y),I=n(2165),S=i(I),M=n(1023),D=i(M);e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){function i(){r.removeTarget(a)}var r=n.getRegistry(),a=r.addTarget(e,t);return{handlerId:a,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 r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){Object.keys(e).forEach(function(t){s.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),
s.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){r(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=a;var o=n(141),s=i(o),l=n(217),c=(i(l),["canDrop","hover","drop"]);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")}function r(e){return new l(e)}t.__esModule=!0,t.default=r;var a=n(141),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=!1,l=function(){function e(t){i(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.targetId=e},e.prototype.canDrop=function(){
o.default(!s,"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 s=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{s=!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){return e&&e.__esModule?e:{default:e}}function r(e){function t(){s&&(s(),s=null),i&&r&&(s=e.connectDropTarget(i,r,a))}function n(e){e!==i&&(i=e,t())}var i=void 0,r=void 0,a=void 0,s=void 0;return{receiveHandlerId:n,
hooks:o.default({dropTarget:function(e,n){e===r&&l.default(n,a)||(r=e,a=n,t())}})}}t.__esModule=!0,t.default=r;var a=n(1021),o=i(a),s=n(1022),l=i(s);e.exports=t.default},function(e,t,n){"use strict";function i(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 a=n(2167),o=i(a),s=n(2180),l=i(s),c=n(2181),u=i(c),d=n(1025),p=n(2184),h=n(2186),f=n(705),v=function(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}(f),g=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 u.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 r=function(t){return i.handleDragStart(t,e)},a=function(t){return i.handleSelectStart(t,e)};return t.setAttribute("draggable",!0),t.addEventListener("dragstart",r),t.addEventListener("selectstart",a),function(){delete i.sourceNodes[e],delete i.sourceNodeOptions[e],t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",a),t.setAttribute("draggable",!1)}},e.prototype.connectDropTarget=function(e,t){var n=this,i=function(t){return n.handleDragEnter(t,e)},r=function(t){
return n.handleDragOver(t,e)},a=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",i),t.addEventListener("dragover",r),t.addEventListener("drop",a),function(){t.removeEventListener("dragenter",i),t.removeEventListener("dragover",r),t.removeEventListener("drop",a)}},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(v).some(function(t){return v[t]===e})},e.prototype.beginDragNativeItem=function(e){this.clearCurrentDragSourceNode();var t=h.createNativeDragSource(e);this.currentNativeSource=new t,this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle]),d.isFirefox()&&window.addEventListener("mousemove",this.endDragNativeItem,!0)},e.prototype.endDragNativeItem=function(){
this.isDraggingNativeItem()&&(d.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=!l.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 r=e.dataTransfer,a=h.matchNativeItemType(r);if(this.monitor.isDragging()){if("function"==typeof r.setDragImage){
var o=this.monitor.getSourceId(),s=this.sourceNodes[o],l=this.sourcePreviewNodes[o]||s,c=this.getCurrentSourcePreviewNodeOptions(),u=c.anchorX,d=c.anchorY,f={anchorX:u,anchorY:d},v=p.getDragPreviewOffset(s,l,i,f);r.setDragImage(l,v.x,v.y)}try{r.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target);this.getCurrentSourcePreviewNodeOptions().captureDraggingState?this.actions.publishDragSource():setTimeout(function(){return t.actions.publishDragSource()})
}else if(a)this.beginDragNativeItem(a);else{if(!(r.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){if(this.dragEnterTargetIds=[],this.enterLeaveCounter.enter(e.target)&&!this.monitor.isDragging()){var t=e.dataTransfer,n=h.matchNativeItemType(t);n&&this.beginDragNativeItem(n)}},
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()){d.isFirefox()||this.actions.hover(n,{clientOffset:p.getEventClientOffset(e)});n.some(function(e){return t.monitor.canDropOnTarget(e)})&&(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)}),n.some(function(e){return t.monitor.canDropOnTarget(e)})?(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(),this.enterLeaveCounter.leave(e.target)&&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=g,e.exports=t.default},function(e,t,n){var i=n(431),r=n(696),a=n(2168),o=n(2169),s=Object.prototype,l=s.hasOwnProperty,c=i(function(e,t){e=Object(e);var n=-1,i=t.length,c=i>2?t[2]:void 0;for(c&&a(t[0],t[1],c)&&(i=1);++n<i;)for(var u=t[n],d=o(u),p=-1,h=d.length;++p<h;){
var f=d[p],v=e[f];(void 0===v||r(v,s[f])&&!l.call(e,f))&&(e[f]=u[f])}return e});e.exports=c},function(e,t,n){function i(e,t,n){if(!s(n))return!1;var i=typeof t;return!!("number"==i?a(n)&&o(t,n.length):"string"==i&&t in n)&&r(n[t],e)}var r=n(696),a=n(702),o=n(1024),s=n(430);e.exports=i},function(e,t,n){function i(e){return o(e)?r(e,!0):a(e)}var r=n(2170),a=n(2177),o=n(702);e.exports=i},function(e,t,n){function i(e,t){
var n=o(e),i=!n&&a(e),u=!n&&!i&&s(e),p=!n&&!i&&!u&&c(e),h=n||i||u||p,f=h?r(e.length,String):[],v=f.length;for(var g in e)!t&&!d.call(e,g)||h&&("length"==g||u&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||l(g,v))||f.push(g);return f}var r=n(2171),a=n(1015),o=n(292),s=n(2172),l=n(1024),c=n(2174),u=Object.prototype,d=u.hasOwnProperty;e.exports=i},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(e){var i=n(407),r=n(2173),a="object"==typeof t&&t&&!t.nodeType&&t,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===a,l=s?i.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||r;e.exports=u}).call(t,n(622)(e))},function(e,t){function n(){return!1}e.exports=n},function(e,t,n){var i=n(2175),r=n(700),a=n(2176),o=a&&a.isTypedArray,s=o?r(o):i;e.exports=s},function(e,t,n){function i(e){return o(e)&&a(e.length)&&!!s[r(e)]}var r=n(481),a=n(1012),o=n(408),s={}
;s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,
s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=i},function(e,t,n){(function(e){
var i=n(890),r="object"==typeof t&&t&&!t.nodeType&&t,a=r&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===r,s=o&&i.process,l=function(){try{return s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=l}).call(t,n(622)(e))},function(e,t,n){function i(e){if(!r(e))return o(e);var t=a(e),n=[];for(var i in e)("constructor"!=i||!t&&l.call(e,i))&&n.push(i);return n}var r=n(430),a=n(2178),o=n(2179),s=Object.prototype,l=s.hasOwnProperty;e.exports=i},function(e,t){function n(e){
var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}var i=Object.prototype;e.exports=n},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){"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 r=Object.prototype.hasOwnProperty,a=0;a<n.length;a++){if(!r.call(t,n[a])||e[n[a]]!==t[n[a]])return!1;if(e[n[a]]!==t[n[a]])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 r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var a=n(2182),o=i(a),s=n(1007),l=i(s),c=function(){function e(){r(this,e),this.entered=[]}return e.prototype.enter=function(e){var t=this.entered.length;return this.entered=o.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){var i=n(1014),r=n(431),a=n(1016),o=n(514),s=r(function(e){return a(i(e,1,o,!0))})
;e.exports=s},function(e,t,n){function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(a);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],a=n.cache;if(a.has(r))return a.get(r);var o=e.apply(this,i);return n.cache=a.set(r,o)||a,o};return n.cache=new(i.Cache||r),n}var r=n(1009),a="Expected a function";i.Cache=r,e.exports=i},function(e,t,n){"use strict";function i(e){var t=e.nodeType===c?e:e.parentElement;if(!t)return null
;var n=t.getBoundingClientRect(),i=n.top;return{x:n.left,y:i}}function r(e){return{x:e.clientX,y:e.clientY}}function a(e,t,n,r){var a="IMG"===t.nodeName&&(o.isFirefox()||!document.documentElement.contains(t)),s=a?e:t,c=i(s),u={x:n.x-c.x,y:n.y-c.y},d=e.offsetWidth,p=e.offsetHeight,h=r.anchorX,f=r.anchorY,v=a?t.width:d,g=a?t.height:p;o.isSafari()&&a?(g/=window.devicePixelRatio,v/=window.devicePixelRatio):o.isFirefox()&&!a&&(g*=window.devicePixelRatio,v*=window.devicePixelRatio)
;var m=new l.default([0,.5,1],[u.x,u.x/d*v,u.x+v-d]),y=new l.default([0,.5,1],[u.y,u.y/p*g,u.y+g-p]),b=m.interpolate(h),I=y.interpolate(f);return o.isSafari()&&a&&(I+=(window.devicePixelRatio-1)*g),{x:b,y:I}}t.__esModule=!0,t.getNodeClientOffset=i,t.getEventClientOffset=r,t.getDragPreviewOffset=a;var o=n(1025),s=n(2185),l=function(e){return e&&e.__esModule?e:{default:e}}(s),c=1},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 r=function(){function e(t,n){i(this,e);for(var r=t.length,a=[],o=0;o<r;o++)a.push(o);a.sort(function(e,n){return t[e]<t[n]?-1:1});for(var s=[],l=[],c=[],u=void 0,d=void 0,o=0;o<r-1;o++)u=t[o+1]-t[o],d=n[o+1]-n[o],l.push(u),s.push(d),c.push(d/u);for(var p=[c[0]],o=0;o<l.length-1;o++){var h=c[o],f=c[o+1];if(h*f<=0)p.push(0);else{u=l[o];var v=l[o+1],g=u+v;p.push(3*g/((g+v)/h+(g+u)/f))}}
p.push(c[c.length-1]);for(var m=[],y=[],b=void 0,o=0;o<p.length-1;o++){b=c[o];var I=p[o],S=1/l[o],g=I+p[o+1]-b-b;m.push((b-I-g)*S),y.push(g*S*S)}this.xs=t,this.ys=n,this.c1s=p,this.c2s=m,this.c3s=y}return e.prototype.interpolate=function(e){var t=this.xs,n=this.ys,i=this.c1s,r=this.c2s,a=this.c3s,o=t.length-1;if(e===t[o])return n[o];for(var s=0,l=a.length-1,c=void 0;s<=l;){c=Math.floor(.5*(s+l));var u=t[c];if(u<e)s=c+1;else{if(!(u>e))return n[c];l=c-1}}o=Math.max(0,l);var d=e-t[o],p=d*d
;return n[o]+i[o]*d+r[o]*p+a[o]*d*p},e}();t.default=r,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")}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 a(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=d[e],n=t.exposeProperty,a=t.matchesTypes,o=t.getData
;return function(){function e(){i(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]=o(e,a)},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 s(e){var t=Array.prototype.slice.call(e.types||[]);return Object.keys(d).filter(function(e){return d[e].matchesTypes.some(function(e){return t.indexOf(e)>-1})})[0]||null}t.__esModule=!0;var l;t.createNativeDragSource=o,t.matchNativeItemType=s;var c=n(705),u=function(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}(c),d=(l={},r(l,u.FILE,{
exposeProperty:"files",matchesTypes:["Files"],getData:function(e){return Array.prototype.slice.call(e.files)}}),r(l,u.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return a(e,t,"").split("\n")}}),r(l,u.TEXT,{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(e,t){return a(e,t,"")}}),l)},function(e,t,n){"use strict";function i(){return r||(r=new Image,r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),
r}t.__esModule=!0,t.default=i;var r=void 0;e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.playQueueItemEntityIDs,n=e.playQueueSelectedItemOffset,i=e.playQueueTotalCount,r=e.playerType,o=e.currentIndex,s=e.moveIndex,u=e.scrollTop,y=e.isPlayerPaused,S=e.showAddToPlaylist,M=e.onPlayQueueItemDragMove,D=e.onPlayQueueItemDragEnd,C=e.onSavePress,O=n-o,j=O+t.length-1;return a()("div",{className:b.a.container},void 0,a()(f.a,{},void 0,a()(v.a,{
title:Object(l.default)("Play Queue")}),a()("div",{className:b.a.topContainer},void 0,a()("div",{className:b.a.topLeft},void 0,a()("span",{className:b.a.count},void 0,1===i?Object(l.default)("{itemCount} item",{itemCount:i}):Object(l.default)("{itemCount} items",{itemCount:i}))),a()("div",{className:b.a.topRight},void 0,S&&a()(p.a,{className:b.a.tooltipButton,"data-qa-id":"queueAddPlaylist","aria-label":Object(l.default)("Add to Playlist"),component:d.a,
tooltip:Object(l.default)("Add to Playlist"),onPress:C},void 0,I)))),a()(h.a,{className:b.a.content,scrollTop:u,smoothScroll:!1,autoScroll:!0},void 0,t.map(function(e,t){var n=null!=s,l=o===t,u=n&&s===t,d=n&&s===t+1;return a()(g.a,{sortIndex:t,opacity:Object(c.a)(t,O,j,i),playQueueItemEntityID:e,playerType:r,isDraggingBefore:u,isDraggingAfter:d,isCurrentItem:l,isPlayerPaused:y,onPlayQueueItemDragMove:M,onPlayQueueItemDragEnd:D},e)})),a()(m.a,{playerType:r}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(4)),c=n(2189),u=n(26),d=n(22),p=n(355),h=n(80),f=n(1026),v=n(1027),g=n(2195),m=n(2264),y=n(2267),b=n.n(y),I=a()(u.a,{name:"plex-icon-toolbar-add-to-playlist-560"});t.a=i},function(e,t,n){"use strict";function i(e,t,n,i){if(n+1<i){var a=n-t,o=a-e;if(o<r.length)return r[o]}return 1}t.a=i;var r=[.2,.4,.6,.8]},function(e,t,n){"use strict";function i(e){var t=e.children,n=a()(e,["children"]);return l.a.createElement("div",n,t)}var r=n(13),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s)
;t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.target,r=e.attachment,a=e.options,s=e.isOpen,c=(e.onMenuClose,u()(e,["children","className","target","attachment","options","isOpen","onMenuClose"]));return l()(g.a,{className:S.a.tooltipPortal,target:i,options:a||C[r],isOpen:s,closeTimeout:M},void 0,l()(v.a,{transitionName:D,transitionAppearTimeout:M,transitionEnterTimeout:M,transitionLeaveTimeout:M},void 0,s&&h.a.createElement("div",o()({className:n||S.a[r]
},c),t)))}var r,a=n(7),o=n.n(a),s=n(2),l=n.n(s),c=n(13),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(251),v=n(410),g=n(973),m=n(482),y=n.n(m),b=n(961),I=n(2192),S=n.n(I),M=Object(f.a)(y.a.tooltipSpeed),D={appear:S.a.enter,appearActive:S.a.enterActive,enter:S.a.enter,enterActive:S.a.enterActive,leave:S.a.leave,leaveActive:S.a.leaveActive},C=(r={},r[b.TOP_LEFT]={placement:"top-start"},r[b.TOP_CENTER]={placement:"top"},r[b.TOP_RIGHT]={placement:"top-end"},r[b.BOTTOM_LEFT]={placement:"bottom-start"
},r[b.BOTTOM_CENTER]={placement:"bottom"},r[b.BOTTOM_RIGHT]={placement:"bottom-end"},r[b.MIDDLE_LEFT]={placement:"auto-start"},r[b.MIDDLE_RIGHT]={placement:"auto-end"},r);i.defaultProps={attachment:b.BOTTOM_CENTER},t.a=i},function(e,t){e.exports={tooltipPortal:"Tooltip-tooltipPortal-3Nb82",tooltip:"Tooltip-tooltip-9TKmA",tooltipArrow:"Tooltip-tooltipArrow-3GUCr",tooltipBottomArrow:"Tooltip-tooltipBottomArrow-34fSA",tooltipTopArrow:"Tooltip-tooltipTopArrow-NjH0D",
tooltipRightArrow:"Tooltip-tooltipRightArrow-18BKz",tooltipLeftArrow:"Tooltip-tooltipLeftArrow-1Zt2g",tooltipCenterAlignArrow:"Tooltip-tooltipCenterAlignArrow-35uHt",tooltipLeftAlignArrow:"Tooltip-tooltipLeftAlignArrow-NweCL",tooltipRightAlignArrow:"Tooltip-tooltipRightAlignArrow-1ETgz",tooltipMiddleAlignArrow:"Tooltip-tooltipMiddleAlignArrow-3x1zF",
topLeft:"Tooltip-topLeft-2DEJ1 Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipBottomArrow-34fSA Tooltip-tooltipLeftAlignArrow-NweCL",topCenter:"Tooltip-topCenter-Hv9C9 Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipBottomArrow-34fSA Tooltip-tooltipCenterAlignArrow-35uHt",topRight:"Tooltip-topRight-3-Bmg Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipBottomArrow-34fSA Tooltip-tooltipRightAlignArrow-1ETgz",
bottomLeft:"Tooltip-bottomLeft-2fPtV Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipLeftAlignArrow-NweCL",bottomCenter:"Tooltip-bottomCenter-2yj43 Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipCenterAlignArrow-35uHt",bottomRight:"Tooltip-bottomRight-T6_Ik Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipRightAlignArrow-1ETgz",
middleLeft:"Tooltip-middleLeft-11JlO Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipRightArrow-18BKz Tooltip-tooltipMiddleAlignArrow-3x1zF",middleRight:"Tooltip-middleRight-3lubO Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipLeftArrow-1Zt2g Tooltip-tooltipMiddleAlignArrow-3x1zF",enter:"Tooltip-enter-GVOuq",enterActive:"Tooltip-enterActive-29GJJ",leave:"Tooltip-leave-2B4cn",leaveActive:"Tooltip-leaveActive-1CpHe"}},function(e,t){e.exports={
headingContainer:"AudioVideoFullPlayerContentHeadingContainer-headingContainer-2UyXv",divider:"AudioVideoFullPlayerContentHeadingContainer-divider-1A1d_"}},function(e,t){e.exports={heading:"AudioVideoFullPlayerContentHeading-heading-1XO9q"}},function(e,t,n){"use strict";function i(e,t){return{connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}}function r(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver()}}
var a=n(7),o=n.n(a),s=n(2),l=n.n(s),c=n(13),u=n.n(c),d=n(8),p=n.n(d),h=n(9),f=n.n(h),v=n(10),g=n.n(v),m=n(1),y=(n.n(m),n(0)),b=n.n(y),I=n(84),S=(n.n(I),n(227)),M=(n.n(S),n(432)),D=(n.n(M),n(29)),C=n(293),O=n(348),j=n(1028),P=n(2263),w=n.n(P),T={beginDrag:function(e){return{playQueueItemEntityID:e.playQueueItemEntityID}},endDrag:function(e,t,n){e.onPlayQueueItemDragEnd(t.getItem(),t.didDrop())}},E={hover:function(e,t,n){
var i=Object(I.findDOMNode)(n).getBoundingClientRect(),r=(i.bottom-i.top)/2,a=t.getClientOffset(),o=a.y-i.top,s=e.sortIndex,l=o>r?s+1:s;e.onPlayQueueItemDragMove(l)}},x=function(e){function t(){return p()(this,t),f()(this,e.apply(this,arguments))}return g()(t,e),t.prototype.componentDidMount=function(){this.props.connectDragPreview(Object(M.getEmptyImage)())},t.prototype.shouldComponentUpdate=function(e,t){return Object(D.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.isDragging,n=e.isDraggingBefore,i=e.isDraggingAfter,r=e.isOver,a=e.connectDropTarget,s=e.connectDragSource,c=u()(e,["isDragging","isDraggingBefore","isDraggingAfter","isOver","connectDropTarget","connectDragSource"]);return a(l()("div",{className:(w.a.container||"")+" "+(t&&O.c||"")+" "+(n&&r&&O.e||"")+" "+(i&&r&&O.d||""||"")},void 0,b.a.createElement(j.a,o()({connectDragSource:s},c))))},t}(y.Component);t.a=Object(S.DropTarget)(C.c,E,r)(Object(S.DragSource)(C.c,T,i)(x))
},function(e,t,n){"use strict";function i(e){var t=e.metadataItemEntityID,n=e.playerType,i=e.mediaType,r=e.sortIndex,o=e.opacity,s=e.isCurrentItem,f=e.isPlayerPaused,m=e.isItemDragging,y=e.connectDragSource,b=e.onRemovePress;return a()("div",{className:(v.a.container||"")+" "+(m&&v.a.isItemDragging||"")+" "+(s&&v.a.isCurrentItem||"")+" "+(null!=o&&g[o]||""||""),"data-qa-id":"playQueueItem"},void 0,a()("div",{className:v.a.leftContainer},void 0,s&&a()(p.a,{isPaused:f}),!s&&y(a()("div",{
className:v.a.moveControls,"data-qa-id":"playQueueReorder"},void 0,a()(c.a,{className:v.a.grabButton,name:"plex-icon-reorder-560"})))),a()(h.a,{className:v.a.metadataContainer,durationContainerClassName:v.a.metadataDurationContainer,metadataItemEntityID:t,playerType:n,mediaType:i,sortIndex:r}),!s&&a()("div",{className:v.a.removeControls},void 0,a()(d.a,{className:v.a.removeButton,"data-qa-id":"playQueueRemove",icon:"plex-icon-remove-560",title:Object(l.default)("Remove"),kind:u.b.DANGER,
onPress:b})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(26),u=n(24),d=n(352),p=n(707),h=n(2200),f=n(2262),v=n.n(f),g={.2:v.a.opacity20Precent,.4:v.a.opacity40Precent,.6:v.a.opacity60Precent,.8:v.a.opacity80Precent};i.defaultProps={opacity:1,isCurrentItem:!1,isPlayerPaused:!1,isItemDragging:!1,connectDragSource:function(e){return e}},t.a=i},function(e,t,n){"use strict";function i(e,t){return Math.random()*(t-e)+e}
var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),n(251)),v=n(2198),g=n.n(v),m=function(e){function t(n,i){s()(this,t);var r=c()(this,e.call(this,n,i));return r._setBarValues(n),r.state=r._getInitialState(!0),r}return d()(t,e),t.prototype.componentDidMount=function(){if(!this.props.isPaused)for(var e=0,t=this._bars.length;e<t;e++)this._setTransitionTimeout(e)},t.prototype.componentWillReceiveProps=function(e){
var t=e.isPaused!==this.props.isPaused,n=e.width!==this.props.width,i=e.barCount!==this.props.barCount,r=e.barGap!==this.props.barGap;(t||n||i||r)&&(this._clearAllTransitionTimeouts(),this._setBarValues(e),this.setState(this._getInitialState(e.isPaused)))},t.prototype.componentDidUpdate=function(e,t){if(!this.props.isPaused)for(var n=0,i=this._bars.length;n<i;n++){var r=this._bars[n];t[r]!==this.state[r]&&this._setTransitionTimeout(n)}},t.prototype.componentWillUnmount=function(){
this._clearAllTransitionTimeouts()},t.prototype._setBarValues=function(e){var t=e.width,n=e.barCount,i=e.barGap,r=i*(n-1);this._barGap=i,this._barWidth=Math.floor((t-r)/n),this._bars=[];for(var a=0,o=n;a<o;a++)this._bars.push("bar"+a)},t.prototype._getInitialState=function(e){var t=this;return this._bars.reduce(function(n,i,r){return n[i]=t._getRandomStyle(r,e),n},{})},t.prototype._getRandomStyle=function(e,t){
var n=this.props.unit,r=e*(this._barWidth+this._barGap),a=t?.2:i(.2,1),o="scaleY("+a+")",s=i(300,500);return{left:""+r+n,width:""+this._barWidth+n,backgroundColor:this.props.barColor,transitionDuration:s+"ms",WebkitTransform:o,msTransform:o,transform:o}},t.prototype._setTransitionTimeout=function(e){var t=this,n=this._bars[e],i=n+"TimeoutID",r=this.state[n],a=Object(f.a)(r.transitionDuration)-100;this[i]=setTimeout(function(){var i;t.setState((i={},i[n]=t._getRandomStyle(e),i))},a)},
t.prototype._clearAllTransitionTimeouts=function(){for(var e=0,t=this._bars.length;e<t;e++){var n=this._bars[e],i=n+"TimeoutID";clearTimeout(this[i])}},t.prototype.render=function(){var e=this,t=this.props,n=t.className,i=t.width,r=t.height,o=t.unit;return a()("div",{className:n,style:{width:""+i+o,height:""+r+o}},void 0,this._bars.map(function(t){return a()("div",{className:g.a.bar,style:e.state[t]},t)}))},t}(h.Component);m.defaultProps={className:g.a.equalizer,width:14,height:14,
barColor:"#fff",barCount:3,barGap:2,isPaused:!0,unit:"px"},t.a=m},function(e,t){e.exports={equalizer:"EqualizerIcon-equalizer-2SoFA",bar:"EqualizerIcon-bar-1nPot"}},function(e,t){e.exports={defaultColor:"#fff",quietColor:"#a8a8a8",inverseColor:"#222",primaryColor:"#cc7b19",primaryAlternateColor:"#e5a00d",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)",selectedLinkColor:"#f9be03",selectedLinkHoverColor:"color(#f9be03 lightness(+15%))",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%))",darkBackgroundColor:"rgba(0, 0, 0, 0.3)",darkHoverBackgroundColor:"rgba(255, 255, 255, 0.3)",darkActiveBackgroundColor:"rgba(255, 255, 255, 0.2)",darkDisabledBackgroundColor:"rgba(255, 255, 255, 0.15)",
headerColor:"rgba(255, 255, 255, 0.3)",dimColor:"rgba(255, 255, 255, 0.45)",shadowColor:"rgba(0, 0, 0, 0.35)",dividerColor:"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)",errorBackgroundColor:"rgba(255, 85, 51, 0.3)",inputBackgroundColor:"rgba(255, 255, 255, 0.25)",inputFocusBackgroundColor:"#eee",inputColor:"#eee",inputFocusColor:"#555",
inputPlaceholderColor:"#afb0b1",inputDisabledOpacity:"0.5",formSectionBackgroundColor:"rgba(0, 0, 0, 0.3)",formSectionHoverBackgroundColor:"rgba(0, 0, 0, 0.15)",modalBackdropBackgroundColor:"rgba(102, 102, 102, 0.6)",modalBackgroundColor:"#2d2d2d",menuBackgroundColor:"#191a1c",menuItemHoverBackgroundColor:"rgba(255, 255, 255, 0.08)",menuItemActiveBackgroundColor:"rgba(255, 255, 255, 0.15)",menuSeparatorBackgroundColor:"rgba(200, 200, 200, 0.15)",tooltipBackgroundColor:"#191a1c",
pageHeaderBackgroundColor:"rgba(0, 0, 0, 0.7)",pageHeaderLinkColor:"#999",pageHeaderLinkHoverColor:"#eee",searchInputBackgroundColor:"rgba(255, 255, 255, 0.25)",searchFocusBackgroundColor:"#eee",searchInputColor:"#eee",searchInputFocusColor:"#555",searchImagePlaceholderBackgroundColor:"rgba(255, 255, 255, 0.1)",searchHoverResultBackgroundColor:"rgba(255, 255, 255, 0.05)",searchSelectedResultBackgroundColor:"rgba(255, 255, 255, 0.08)",searchResultTitleColor:"rgba(255, 255, 255, 0.75)",
searchResultTitleSelectedColor:"rgba(255, 255, 255, 1)",searchResultSecondaryTitleColor:"rgba(255, 255, 255, 0.3)",sidebarBackgroundColor:"rgba(0, 0, 0, 0.15)",sidebarMenuButtonBackgroundColor:"rgba(0, 0, 0, 0.3)",sidebarMenuButtonHoverBackgroundColor:"rgba(0, 0, 0, 0.45)",sidebarMenuButtonActiveBackgroundColor:"rgba(0, 0, 0, 0.75)",stripeListAlternateBackgroundColor:"rgba(255, 255, 255, 0.02)",stripeListHoverBackgroundColor:"rgba(255, 255, 255, 0.06)",
stripeListSelectedBackgroundColor:"rgba(0, 0, 0, 0.15)"}},function(e,t,n){"use strict";function i(){return Object(h.createSelector)(Object(g.a)(),Object(v.a)(),function(e,t){var n=y.g,i=Object(S.c)(t.type,t.subtype,n)===S.a?D:C,r=Object(I.a)(i,null,t.type,t.subtype,t,n);return{serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,type:t.type,subtype:t.subtype,metadataKey:t.key,duration:t.duration,title:t.title,context:n,imageWidth:r.width,imageHeight:r.height,imageUrl:r.url}})}
function r(e,t){var n={playerType:t.playerType};return{onPlayPress:function(){e(Object(b.f)(c()({},n,{index:t.sortIndex}))),t.mediaType===m.d&&e(Object(b.s)(n))}}}function a(e){var t=(e.mediaType,s()(e,["mediaType"]));return p.a.createElement(M.a,t)}var o=n(13),s=n.n(o),l=n(7),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(6),f=(n.n(h),n(11)),v=n(21),g=n(44),m=n(59),y=n(31),b=n(118),I=n(228),S=n(121),M=n(2201),D=64,C=36;t.a=Object(f.b)(i,r)(a)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.titlesContainerClassName,i=e.durationContainerClassName,r=e.serverEntityID,o=e.providerEntityID,s=e.metadataItemEntityID,f=e.type,g=e.subtype,m=e.metadataKey,y=e.title,b=e.duration,I=e.context,S=e.imageWidth,M=e.imageHeight,D=e.imageUrl,C=e.onPlayPress,O=Object(d.b)(f,I,{providerEntityID:o,subtype:g}),j="track"===f;return a()("div",{className:t},void 0,a()("div",{className:v.a.cardContainer},void 0,a()(p.a,{className:v.a.card,serverEntityID:r,providerEntityID:o,
metadataItemEntityID:s,metadataKey:m,title:Object(l.default)("Play {title}",{title:y}),type:f,imageWidth:S,imageHeight:M,imageUrl:D,onPlayPress:C})),a()("div",{className:n,"data-qa-id":"playQueueTitleContainer"},void 0,O.map(function(e,t){return a()(h.a,{serverEntityID:r,providerEntityID:o,metadataItemEntityID:s,component:e,isSecondary:t>0},t)})),!!b&&a()("div",{className:i},void 0,j?Object(u.a)(b):Object(c.a)(b)))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(4)),c=n(351),u=n(350),d=(n(31),n(174)),p=n(722),h=n(257),f=n(2261),v=n.n(f);i.defaultProps={className:v.a.container,titlesContainerClassName:v.a.titlesContainer,durationContainerClassName:v.a.durationContainer},t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.listType},Object(s.a)(),function(e,t){if(t&&!t.skipDetails&&!t.isExtra&&(e!==a.g||t.type===a.h))return t.type===a.l&&t.subtype!==o.b?t.skipParent?t.grandparentKey:t.parentKey:t.key})}
t.a=i;var r=n(6),a=(n.n(r),n(28)),o=n(143),s=n(21)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),Object(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return{title:e.title,route:t}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(356),l=n(357),c=Object(r.b)(i)(l.a);c.isDoubleLine=!0,t.a=c},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.parentTitle,r=e.parentRoute;return a()(l.a,{
className:t,tabIndex:n,title:i,route:r})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(357));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.grandparentTitle,r=e.grandparentRoute;return a()(l.a,{className:t,tabIndex:n,title:i,route:r})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(357));t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.tabIndex,i=e.skipParent,r=e.parentTitle,o=e.parentRoute,s=e.grandparentTitle,l=e.grandparentRoute;return a()("span",{className:t},void 0,a()(c.a,{tabIndex:n,title:s,route:l}),!!r&&!i&&u,!i&&a()(c.a,{tabIndex:n,title:r,route:o}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(86)),c=n(357),u=a()(l.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.childCount,i=e.subtype,r=void 0;if(null!=n){var o=1===n,s={itemCount:n}
;r=i===c.f?o?Object(l.default)("{itemCount} movie",s):Object(l.default)("{itemCount} movies",s):i===c.k?o?Object(l.default)("{itemCount} show",s):Object(l.default)("{itemCount} shows",s):o?Object(l.default)("{itemCount} item",s):Object(l.default)("{itemCount} items",s)}return a()("span",{className:t},void 0,r)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(28);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.skipChildren,i=e.childCount,r=e.leafCount
;if(n)return a()(c.a,{className:t,leafCount:r});var o=void 0;return null!=i&&(o=1===i?Object(l.default)("{albumCount} album",{albumCount:i}):Object(l.default)("{albumCount} albums",{albumCount:i})),a()("span",{className:t},void 0,o)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(2209);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.leafCount,i=void 0;return null!=n&&(i=1===n?Object(l.default)("{trackCount} track",{trackCount:n
}):Object(l.default)("{trackCount} tracks",{trackCount:n})),a()("span",{className:t},void 0,i)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.skipChildren,i=e.childCount,r=e.leafCount;if(n)return a()(c.a,{className:t,leafCount:r});var o=void 0;return null!=i&&(o=1===i?Object(l.default)("{seasonCount} season",{seasonCount:i}):Object(l.default)("{seasonCount} seasons",{seasonCount:i})),a()("span",{className:t
},void 0,o)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(519);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.seasonIndex;return null==t?"":t>1e3?t:(e.noLeadingZero||(t=Object(a.a)(t)),e.useLongName?Object(r.default)("Season {seasonNumber}",{seasonNumber:t}):Object(r.default)("S{seasonNumber}",{seasonNumber:t}))}var r=n(4),a=n(623);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.index,i=e.longName,r=e.originallyAvailableAt,o=Object(l.a)({
useLongName:i,episodeIndex:n,date:r,noLeadingZero:!0});return a()("span",{className:t},void 0,o)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(1034));i.defaultProps={longName:!0},t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{playlistType:e.playlistType,duration:e.duration,leafCount:e.leafCount}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2214)
;t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.playlistType,i=e.duration,r=e.leafCount;return n===l.b?a()(u.a,{className:t,leafCount:r}):a()(c.a,{className:t,duration:i})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(214)),c=n(520),u=n(1036);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.addedAt;return n?a()(l.a,{className:t,date:1e3*n}):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2216));t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.date;return n?a()("span",{className:t},void 0,Object(l.default)(n)):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(254));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.addedAt;return a()(l.a,{className:t,timestamp:n})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(1039));t.a=i},function(e,t,n){"use strict";function i(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return"";var r=i?o.b:o.a;return a.a.lang("en",{relativeTime:r}),"past"===n?e=Math.min(e,a()().unix()):"future"===n&&(e=Math.max(e,a()().add(1,"second").unix())),a.a.unix(e).lang("en").fromNow()}var r=n(41),a=n.n(r),o=n(2219);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r});var i={future:"in %s",past:"%s ago",
s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},r={future:"in %s",past:"%s ago",s:"%ds",m:"1m",mm:"%dm",h:"1h",hh:"%dh",d:"1d",dd:"%dd",M:"1mo",MM:"%dmo",y:"1y",yy:"%dy"}},function(e,t,n){"use strict";function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.timeFormat,r=void 0===i?"h:mma":i;if(null==e)return"";var h=a.a.unix(e)
;if(Object(s.a)(e))return Object(o.default)("Yesterday");0===h.minutes()&&(r=r.replace("h:mm","h"));var f=Object(p.default)(e,r),v=void 0;return v=Object(l.a)(e)?Object(c.a)(e)?Object(o.default)("Tonight"):Object(o.default)("Today"):Object(u.a)(e)?Object(o.default)("Tomorrow"):Object(d.a)(e)?Object(p.default)(e,"dddd"):Object(p.default)(e,"MMM D"),t?Object(o.default)("{1} at {2} on {3}",v,f,t):Object(o.default)("{1} at {2}",v,f)}t.a=i
;var r=n(41),a=n.n(r),o=n(4),s=n(521),l=n(359),c=n(1047),u=n(1048),d=n(1049),p=n(354)},function(e,t){e.exports={separator:"MetadataTitleAirDate-separator-2i3bJ DashSeparator-separator-2a3yn"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e){return e.experienceSettings.timeFormat},Object(o.a)(),function(e,t){return{beginsAt:t&&t.beginsAt,endsAt:t&&t.endsAt,timeFormat:e}})}var r=n(11),a=n(6),o=(n.n(a),n(717)),s=n(2223);t.a=Object(r.b)(i)(s.a)},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.beginsAt,i=e.endsAt,r=e.timeFormat,o=Object(l.a)(n,i,{includeMinuteZero:!1,timeFormat:r});return a()("span",{className:t},void 0,o)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(434));t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){return{extraType:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).extraType}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2225)
;t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.extraType,i=l.a.get(n);return a()("span",{className:t},void 0,i?i.title:"")}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2226));t.a=i},function(e,t,n){"use strict";var i=n(4),r=n(275),a=["id","typeString"],o=Object(r.a)(a,[{id:1,typeString:"trailer",title:function(){return Object(i.default)("Trailer")}},{id:2,typeString:"deletedScene",title:function(){return Object(i.default)("Deleted Scene")}},{
id:3,typeString:"interview",title:function(){return Object(i.default)("Interview")}},{id:4,typeString:"musicVideo",title:function(){return Object(i.default)("Music Video")}},{id:5,typeString:"behindTheScenes",title:function(){return Object(i.default)("Behind the Scenes")}},{id:6,typeString:"scene",title:function(){return Object(i.default)("Scene")}},{id:7,typeString:"liveMusicVideo",title:function(){return Object(i.default)("Live Music Video")}},{id:8,typeString:"lyricMusicVideo",
title:function(){return Object(i.default)("Lyric Music Video")}},{id:9,typeString:"concert",title:function(){return Object(i.default)("Concert")}},{id:10,typeString:"featurette",title:function(){return Object(i.default)("Featurette")}},{id:11,typeString:"short",title:function(){return Object(i.default)("Short")}},{id:12,typeString:"other",title:function(){return Object(i.default)("Other")}}]);t.a=o},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.tabIndex,i=e.server,r=e.provider,o=e.librarySectionKey,s=e.tag,u=e.filter;if(!s)return null;var d={filters:u,filterLabel:s},p=Object(l.a)(i,r,o,d);return p&&u?a()(c.a,{"data-qa-id":"castTitle",className:t,tabIndex:n,title:s,to:p},void 0,s):a()("span",{className:t,title:s},void 0,s)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(122)),c=(n(95),n(87),n(22));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.role;return a()("span",{className:t,
title:n},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0));n.n(s);t.a=i},function(e,t,n){"use strict";function i(e,t){return Object(a.createSelector)(Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration,n=e.Channel;return{duration:t,channel:n&&n[0]}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2230);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.duration,i=e.channel;return n||i?a()("span",{className:t
},void 0,a()(l.a,{duration:n}),!(!n||!i)&&" \u2014 ",!!i&&i.tag):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(718));t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{topics:e&&e.Topic}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2232);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.topics;return n&&n.length?a()("span",{className:t},void 0,n[0].tag):null}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0));n.n(s);t.a=i},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(170)),a=Object(i.createSelector)(r.a,function(e){return e.searchResults});t.a=a},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.server,i=e.provider,r=e.originalTitle,o=e.reason,s=e.reasonID,d=e.reasonTitle,p=e.filter,h=e.librarySectionID,f=e.librarySectionKey,v=e.onPress;if(!o)return null;if("originalTitle"===o)return a()("span",{className:t},void 0,r);if(!d)return null
;var g={};("actor"===o||"director"===o)&&(g.filters=p||o+"="+s,g.filterLabel=d);var m=i.isLibraryProvider?h:f,y=Object(c.a)(n,i,m,g),b={director:Object(l.default)("by"),actor:Object(l.default)("with"),section:Object(l.default)("in"),autotag:Object(l.default)("tagged"),place:Object(l.default)("in")};return y?a()("span",{className:t},void 0,b[o]," ",a()(u.a,{title:d,tabIndex:"-1",to:y,onPress:v},void 0,d)):a()("span",{className:t},void 0,b[o]+" "+d)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(4)),c=n(122),u=(n(95),n(87),n(22));t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName}})}var r=n(11),a=n(6),o=(n.n(a),n(42)),s=n(2236);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.machineIdentifier,i=e.friendlyName;if(!i)return null;var r=encodeURIComponent(n);return a()("span",{className:t
},void 0,Object(l.default)("on")," ",a()(c.a,{title:i,to:"#!/server/"+r+"/dashboard"},void 0,i))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(22);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.server,i=e.provider,r=e.reasonID,o=e.id,s=e.tag,d=e.filter,p=e.tagType,h=e.librarySectionKey,f=l.a.get(p),v=f.typeString,g=d||v+"="+o,m={filters:g,filterLabel:s},y=i.isLibraryProvider?r:h,b=Object(c.a)(n,i,y,m);return a()(u.a,{"data-qa-id":"searchTagTitle",
className:t,title:s,to:b},void 0,s)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(361)),c=n(122),u=(n(95),n(87),n(22));t.a=i},function(e,t,n){"use strict";function i(e){switch(e.split(":")[0]){case"addedAt":return r.a;case"duration":return o.a;case"lastViewedAt":return s.a;case"originallyAvailableAt":return l.a;case"rating":return a.a;case"userRating":return c.a;case"viewCount":return u.a;case"mediaBitrate":return d.a;case"contentRating":return p.a;case"mediaHeight":return h.a
;case"year":return f.a}}t.a=i;var r=n(1038),a=n(719),o=n(1053),s=n(1054),l=n(1055),c=n(435),u=n(2248),d=n(1056),p=n(1057),h=n(1058),f=n(294)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.rating,i=e.ratingImage,r=e.audienceRating,o=e.audienceRatingImage;return n?a()("span",{className:t},void 0,a()(l.a,{rating:n,ratingImage:i,audienceRating:r,audienceRatingImage:o})):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2240));t.a=i},function(e,t,n){"use strict"
;function i(e){var t=e.rating,n=e.ratingImage,i=e.audienceRating,r=e.audienceRatingImage;return t?g.test(n)?"imdb":m.test(n)||i&&m.test(r)?"rt":"other":"unrated"}function r(e){var t=e.rating;return c()("div",{className:v.a.rating,title:Object(h.default)("IMDb Rating")},void 0,c()("div",{className:v.a.imdb}),t.toFixed(1))}function a(e){var t=e.rating,n=e.ratingImage,i=e.audienceRating,r=e.audienceRatingImage,a=n&&n.substr(n.lastIndexOf(".")+1),o=i&&r&&r.substr(r.lastIndexOf(".")+1),s={
certified:Object(h.default)("Certified Fresh"),ripe:Object(h.default)("Fresh"),rotten:Object(h.default)("Rotten"),spilled:Object(h.default)("Audience Rating"),upright:Object(h.default)("Audience Rating")};return c()("div",{className:v.a.rt},void 0,a&&c()("div",{className:v.a.rating},void 0,c()("div",{className:v.a[a],title:s[a]}),Math.round(10*t)+"%"),o&&c()("div",{className:v.a.rating},void 0,c()("div",{className:v.a[o],title:s[o]}),Math.round(10*i)+"%"))}function o(e){var t=e.rating
;return c()("div",{className:v.a.rating},void 0,c()("div",{className:v.a.other,title:Object(h.default)("Rating")}),Math.round(10*t)+"%")}function s(e){var t=i(e),n=y[t];return n?c()("div",{className:v.a.container},void 0,p.a.createElement(n,e)):null}var l=n(2),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(4),f=n(2241),v=n.n(f),g=/^imdb\:\/\//,m=/^rottentomatoes\:\/\//,y={imdb:r,rt:a,other:o};t.a=s},function(e,t){e.exports={container:"CriticRating-container-33b2h",
rating:"CriticRating-rating-2Jrl1",rt:"CriticRating-rt-2J0Sb",ratingImage:"CriticRating-ratingImage-3-Lxo",imdb:"CriticRating-imdb-23PVn CriticRating-ratingImage-3-Lxo",certified:"CriticRating-certified-kPXY1 CriticRating-ratingImage-3-Lxo",ripe:"CriticRating-ripe-3KaJB CriticRating-ratingImage-3-Lxo",rotten:"CriticRating-rotten-19B4i CriticRating-ratingImage-3-Lxo",spilled:"CriticRating-spilled-9kErJ CriticRating-ratingImage-3-Lxo",
upright:"CriticRating-upright-3fxty CriticRating-ratingImage-3-Lxo",other:"CriticRating-other-1f4HX CriticRating-ratingImage-3-Lxo"}},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.lastViewedAt;return a()(l.a,{className:t,timestamp:n})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(1039));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.originallyAvailableAt;return a()("span",{className:t},void 0,Object(l.default)(n,"MMM D, YYYY"))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(254));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.value,i=e.onRatingChange;return a()("span",{className:t},void 0,a()(l.a,{value:n,onRatingChange:i}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2245));t.a=i},function(e,t,n){"use strict";function i(e,t){return e>0?Math.min(Math.floor(e)+1,t):0}function r(e){
var t=e.className,n=e.icon,i=e.isVisible,r=e.isPulsing,a=(t||"")+" "+(!i&&x.a.hidden||"")+" "+(r&&x.a.pulsing||""||"");return m()(j.a,{name:n,className:a})}function a(e){return M.a.createElement(r,v()({icon:"plex-icon-star-empty-560",className:x.a.emptyStar},e))}function o(e){return M.a.createElement(r,v()({icon:"plex-icon-star-full-560",className:x.a.fullStar},e))}function s(){return m()(j.a,{name:"plex-icon-star-dot-560",className:x.a.dot})}
var l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(7),v=n.n(f),g=n(2),m=n.n(g),y=n(5),b=n.n(y),I=n(1),S=(n.n(I),n(0)),M=n.n(S),D=n(4),C=n(29),O=n(251),j=n(26),P=n(286),w=n(720),T=n.n(w),E=n(2247),x=n.n(E),N=Object(O.a)(T.a.starPulseSpeed),A=function(e){function t(n,r){c()(this,t);var a=d()(this,e.call(this,n,r));return a.onSliderChange=function(e){var t=e.positionValue,n=a.props.starCount,r=i(t,n);a.setState({currentValue:r})},a.onSliderMove=function(e){
var t=e.positionValue,n=a.props.starCount,r=i(t,n);0!==r&&a.setState({currentValue:r})},a.onSlideComplete=function(e){var t=e.positionValue,n=a.props.starCount,r=i(t,n);a.state.currentRating!==r&&(a._setRating(r),a.props.onRatingChange(r))},a.onMouseLeave=function(e){e.pageX;a.setState({currentValue:a.state.currentRating})},a.state={currentValue:n.value,currentRating:n.value,isPulsing:!1},a}return h()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=e.value
;t=Math.max(0,Math.min(t,this.props.starCount)),this.state.currentRating!==t&&this._setRating(t)},t.prototype.shouldComponentUpdate=function(e,t){return Object(C.a)(this,e,t)},t.prototype.componentDidUpdate=function(e,t){var n=this;this.state.currentRating!==t.currentRating&&(clearTimeout(this._pulseTimeoutID),this._pulseTimeoutID=setTimeout(function(){n.setState({isPulsing:!1})},N))},t.prototype.componentWillUnmount=function(){clearTimeout(this._pulseTimeoutID)},
t.prototype._setRating=function(e){this.setState({currentValue:e,currentRating:e,isPulsing:!0})},t.prototype.render=function(){var e=this.props,t=e.starCount,n=e.className,i=this.state,r=i.currentValue,l=i.currentRating,c=i.isPulsing,u=!this.state.currentValue,d=!this.props.onRatingChange,p=b.a.range(t);return m()("div",{className:(n||"")+" "+(x.a.starRating||"")+" "+(d&&x.a.isReadOnly||"")+" "+(u&&x.a.isUnrated||""||""),onMouseLeave:this.onMouseLeave
},void 0,m()("div",{},void 0,p.map(function(e){return m()(s,{},e)})),m()("div",{className:x.a.stars},void 0,p.map(function(e){var t=e>r-1;return m()(a,{isVisible:t},e)})),m()("div",{className:x.a.stars},void 0,p.map(function(e){var t=e<=r-1;return m()(o,{isVisible:t,isPulsing:c&&l>e},e)})),!d&&m()(P.a,{className:x.a.slider,trackClassName:x.a.track,label:Object(D.default)("User Rating"),value:this.state.currentValue,min:0,max:t,stepSize:1,autoHideThumb:!0,onChange:this.onSliderChange,
onMove:this.onSliderMove,onDragComplete:this.onSlideComplete}))},t}(S.Component);A.defaultProps={starCount:5,value:0},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)",modalSpeed:"0.2s",menuSpeed:"0.15s",tooltipSpeed:"0.15s"}},function(e,t){e.exports={starRating:"StarRating-starRating-1-SbN",stars:"StarRating-stars-2HyHd",dot:"StarRating-dot-3IqC-",star:"StarRating-star-31C9X",hidden:"StarRating-hidden-2n6-9",
emptyStar:"StarRating-emptyStar-1XVvK StarRating-star-31C9X",fullStar:"StarRating-fullStar-3gYOk StarRating-star-31C9X",pulsing:"StarRating-pulsing-ZL72H",isReadOnly:"StarRating-isReadOnly-2SumJ",isUnrated:"StarRating-isUnrated-2pl1W",slider:"StarRating-slider-2uo17",track:"StarRating-track-29690"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){return{viewCount:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).viewCount}})}
var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2249);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.viewCount;return a()("span",{className:t},void 0,n>0&&(n>1?Object(l.default)("{viewCount} Plays",{viewCount:n}):Object(l.default)("{viewCount} Play",{viewCount:n})),!n&&Object(l.default)("Unplayed"))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4));t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.type,i=e.bitrate,r=n===u.a?Object(c.a)(i):Object(l.default)(i);return a()("span",{className:t},void 0,r)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(403)),c=n(872),u=n(59);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.contentRating;return a()("span",{className:t},void 0,Object(l.a)(n))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(721));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.videoResolution
;return a()("span",{className:t},void 0,Object(l.default)(n))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(331));t.a=i},function(e,t){e.exports={recordIconContainer:"RecordIcon-recordIconContainer-1PXGA",recordCircle:"RecordIcon-recordCircle-176nl PlayButton-playCircle-3Evfd",recordIcon:"RecordIcon-recordIcon-2ygXS"}},function(e,t){e.exports={recordButton:"RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X RecordIcon-recordIconContainer-1PXGA"}},function(e,t){e.exports={
card:"PosterCard-card-1rN9g"}},function(e,t){e.exports={imageContainer:"PosterCardImg-imageContainer-1Ar4M"}},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.type,i=e.width,r=e.height,o=e.isFolder,s=o?"plex-icon-folder-560":c.a[n];if(!s)return null;var u={fontSize:Math.max(14,Math.min(Math.round(i/4),42)),lineHeight:r+"px"};return a()(l.a,{name:s,className:t,style:u})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(26)),c=n(724);t.a=i},function(e,t){e.exports={
placeholderIcon:"MetadataPosterCardIcon-placeholderIcon-2P76z"}},function(e,t){e.exports={card:"MetadataPosterButtonCard-card-2T8TR",playButton:"MetadataPosterButtonCard-playButton-aOV1E PlayButton-playButton-3WX8X",playCircle:"MetadataPosterButtonCard-playCircle-366hc PlayButton-playCircle-3Evfd",recordButton:"MetadataPosterButtonCard-recordButton-1m2tb RecordIcon-recordIconContainer-1PXGA",
recordCircle:"MetadataPosterButtonCard-recordCircle-1UtXW RecordIcon-recordCircle-176nl PlayButton-playCircle-3Evfd"}},function(e,t){e.exports={title:"MetadataPosterTitle-title-3tU5F",singleLineTitle:"MetadataPosterTitle-singleLineTitle-24_DN MetadataPosterTitle-title-3tU5F",doubleLineTitle:"MetadataPosterTitle-doubleLineTitle-37-cW MetadataPosterTitle-title-3tU5F",isSecondary:"MetadataPosterTitle-isSecondary-2VUxY",isSplitLine:"MetadataPosterTitle-isSplitLine-oK3N1"}},function(e,t){e.exports={
container:"AudioVideoPlayerPlayQueueMetadata-container-sM2h0",cardContainer:"AudioVideoPlayerPlayQueueMetadata-cardContainer-vcGvj",card:"AudioVideoPlayerPlayQueueMetadata-card-18P30 QuickSearchMetadataPosterCard-card-3_XFi MetadataPosterButtonCard-card-2T8TR",titlesContainer:"AudioVideoPlayerPlayQueueMetadata-titlesContainer-2G9lR",durationContainer:"AudioVideoPlayerPlayQueueMetadata-durationContainer-2dgI9"}},function(e,t){e.exports={container:"AudioVideoPlayQueueItem-container-2_nsg",
moveControls:"AudioVideoPlayQueueItem-moveControls-1M6Iy",removeControls:"AudioVideoPlayQueueItem-removeControls-1XM62",metadataDurationContainer:"AudioVideoPlayQueueItem-metadataDurationContainer-184Jw AudioVideoPlayerPlayQueueMetadata-durationContainer-2dgI9",metadataContainer:"AudioVideoPlayQueueItem-metadataContainer-w326I AudioVideoPlayerPlayQueueMetadata-container-sM2h0",leftContainer:"AudioVideoPlayQueueItem-leftContainer-2xVS6",
removeButton:"AudioVideoPlayQueueItem-removeButton-4gx_S IconButton-button-9An-7",opacity20Precent:"AudioVideoPlayQueueItem-opacity20Precent-36ydL",opacity40Precent:"AudioVideoPlayQueueItem-opacity40Precent-1FZXa",opacity60Precent:"AudioVideoPlayQueueItem-opacity60Precent-3KF0l",opacity80Precent:"AudioVideoPlayQueueItem-opacity80Precent-3wzZO",isCurrentItem:"AudioVideoPlayQueueItem-isCurrentItem-3g1KW",isItemDragging:"AudioVideoPlayQueueItem-isItemDragging-1lnod"}},function(e,t){e.exports={
container:"AudioVideoPlayQueueItemDragSource-container-3ncn7"}},function(e,t,n){"use strict";function i(e){return{item:e.getItem(),itemType:e.getItemType(),currentOffset:e.getSourceClientOffset()}}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),n(227)),v=(n.n(f),n(29)),g=n(45),m=n.n(g),y=n(293),b=n(525),I=n(1028),S=n(2266),M=n.n(S),D=parseInt(m.a.playQueueSidePadding,10),C=function(e){function t(){return s()(this,t),
c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.playerType,n=e.item,i=e.itemType,r=e.currentOffset;if(!r||i!==y.c)return null;var o=r.x,s=r.y,l=window.innerWidth-2*D,c="translate3d("+o+"px, "+s+"px, 0)",u={position:"absolute",WebkitTransform:c,msTransform:c,transform:c,width:l+"px"};return a()(b.a,{},void 0,a()("div",{className:M.a.dragPreview,style:u
},void 0,a()(I.a,{playQueueItemEntityID:n.playQueueItemEntityID,playerType:t,isItemDragging:!0})))},t}(h.Component);t.a=Object(f.DragLayer)(i)(C)},function(e,t){e.exports={dragLayer:"DragPreviewLayer-dragLayer-2uYZU"}},function(e,t){e.exports={dragPreview:"AudioVideoPlayQueueDragPreview-dragPreview-21bXe"}},function(e,t){e.exports={container:"AudioVideoPlayQueue-container-mD38o",topContainer:"AudioVideoPlayQueue-topContainer-3udEG",topLeft:"AudioVideoPlayQueue-topLeft-_-AJU",
topRight:"AudioVideoPlayQueue-topRight-2iuaO",count:"AudioVideoPlayQueue-count-1zBsg",content:"AudioVideoPlayQueue-content-28l4x Scroller-vertical-VScFL",tooltipButton:"AudioVideoPlayQueue-tooltipButton-1wdD7"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),Object(s.a)(),function(e,t){var n=l.e;return{serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,metadataItemEntityID:t.entityID,context:n,type:t.type,
imageUrl:t.parentThumb||t.grandparentThumb}})}var r=n(11),a=n(6),o=(n.n(a),n(44)),s=n(221),l=n(31),c=n(2269),u=Object(r.b)(i)(c.a);t.a=u},function(e,t,n){"use strict";function i(e,t,n,i,r,a){var o=void 0,s=void 0;if(e<t){var l=e-S-n;o=Math.min(b,l),s=Object(p.d)(o,i,r,a)}else{var c=t-(S+y+n);s=Math.min(b,c),o=Object(p.e)(s,i,r,a)}return{width:o,height:s}}function r(e){
var t=e.className,n=e.serverEntityID,r=e.providerEntityID,a=e.metadataItemEntityID,s=e.type,l=e.subtype,c=e.context,u=e.imageUrl,p=e.bottom,g=Object(d.b)(s,c,{providerEntityID:r,subtype:l});return o()(h.a,{className:m.a.measure},void 0,function(e){var d=e.isMeasured,h=e.width,y=e.height;if(!d)return null;var b=p?p+M:0,I=i(h,y,0,s,l,c),S=void 0;if(b){var C=i(h,y,b,s,l,c);S=C.height>0?C.height/I.height:1,S=Math.max(S,D)}else S=1;return o()("div",{className:t,style:{
transform:"translate(-50%, -50%) scale("+S+")"}},void 0,o()(f.a,{cardClassName:m.a.card,serverEntityID:n,providerEntityID:r,metadataItemEntityID:a,metadataKey:"music",type:s,imageWidth:I.width,imageHeight:I.height,imageUrl:u,showLinkOnly:!0}),o()("div",{className:m.a.titlesContainer},void 0,g.map(function(e,t){return o()(v.a,{className:t>0?m.a.secondaryTitle:m.a.primaryTitle,serverEntityID:n,providerEntityID:r,metadataItemEntityID:a,component:e},t)})))})}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),
n(0)),c=(n.n(l),n(31),n(45)),u=n.n(c),d=n(174),p=n(121),h=n(72),f=n(297),v=n(257),g=n(2406),m=n.n(g),y=90,b=500,I=parseInt(u.a.pagePadding,10),S=2*I,M=I/2,D=.4;r.defaultProps={className:m.a.content},t.a=r},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,o=e.type,l=e.subtype,u=e.selectionType,d=e.activeSelectionType,v=e.isSelected,m=e.isOffscreen,y=e.visibleFace,b=e.imageWidth,I=e.imageHeight,S=e.imageUrl,M=e.imageTransitionProps,D=e.isFolder,C=e.onImageLoad,O=e.onImageError,j=e.onSelectItem,P=e.onDeselectItem,w=c()(e,["className","serverEntityID","providerEntityID","metadataItemEntityID","type","subtype","selectionType","activeSelectionType","isSelected","isOffscreen","visibleFace","imageWidth","imageHeight","imageUrl","imageTransitionProps","isFolder","onImageLoad","onImageError","onSelectItem","onDeselectItem"])
;return s()("div",{className:(t||"")+" "+(g.a[y]||"")+" "+(v&&g.a.isSelected||"")+" "+(!!d&&!v&&g.a.isOtherItemSelected||""||"")},void 0,s()(h.a,{serverEntityID:n,providerEntityID:i,type:o,subtype:l,isOffscreen:m,url:S,width:b,height:I,transitionProps:M,isFolder:D,onLoad:C,onError:O}),p.a.createElement(f.a,a()({serverEntityID:n,providerEntityID:i,metadataItemEntityID:r,type:o,selectionID:r,selectionType:u,activeSelectionType:d,isSelected:v,onSelectItem:j,onDeselectItem:P},w)))}
var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(256),f=n(2271),v=n(2404),g=n.n(v);i.defaultProps={className:g.a.face},t.a=i},function(e,t,n){"use strict";function i(e,t){var n=e.type,i=e.subtype,r=e.viewCount,a=e.viewOffset,o=e.saved,s=e.isLibraryItem,l=e.isFolder,c=e.isExtra;if(null!=o&&!o)return!1;var u=s&&!l&&!c&&t.mediaType===f.d,d=n===g.l&&i===v.b;return(u||d)&&!r&&!a}function r(e,t){
var n=e.type,i=e.subtype,r=e.saved,a=e.unviewedLeafCount,o=e.isLibraryItem,s=e.isExtra;if(null!=r&&!r)return!1;var l=o&&!s&&g.u(n)&&t.mediaType===f.d,c=n===g.k&&i===v.b;return(l||c)&&!!a}function a(){return Object(h.createSelector)(function(e,t){return t.type},function(e,t){return t.listType},Object(b.a)(),P.a,w.a,S.a,Object(T.a)(),Object(I.a)(),Object(M.a)(),function(e,t,n,a,o,s,l,c,u){
var d=n.subtype,p=n.title,h=n.viewCount,f=n.viewOffset,v=n.unviewedLeafCount,b=n.smart,I=n.icon,S=n.metadataState,M=n.mediaState,D=n.deletedAt,C=n.subscriptionID,O=n.subscriptionType,P=n.grandparentSubscriptionID,w=n.grandparentSubscriptionType,T=n.isFolder,E=n.Media,x=Object(A.j)(a,o,s,n),N=!!o.features.subscribe,L=Object(A.e)(a,o,s,n),k=t===g.g&&Object(A.f)(a,o,s,n),_=t===g.g&&Object(A.o)(a,o,s,n),R=Object(A.m)(a,o,s,n),z=g.r(e),U=g.q(e),B=E.length,V=null!=C||null!=P,F=!!b,Q=I===y.a,H=S===m.b,Y=S===m.c||S===m.a,W=!H&&!Y&&!!M,G=H||Y||W,K=!G&&!!D
;return{server:a,provider:o,route:l,title:p,viewCount:h,viewOffset:f,viewPercent:c,unviewedLeafCount:v,mediaCount:B,subscriptionType:O||w,type:e,subtype:d,isSubscribed:V,isMultiVersion:Object(j.a)(n),isSmart:F,isFavorite:Q,isMatching:H,isProcessing:Y,isAnalyzing:W,isRefreshing:G,isTrash:K,showLink:!!l,showUnplayedBadge:i(n,z),showUnplayedNumberBadge:r(n,U),showPlay:x,showRecord:N,showEdit:L,showFavorite:k,showUnfavorite:_,showSelect:R,showMore:!T,beginsAt:u&&u.beginsAt,endsAt:u&&u.endsAt}})}
function o(e,t){var n={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,metricsPage:t.metricsPage,metricsContext:t.metricsContext};return{onPlayPress:function(){e(Object(D.m)(c()({},n,{options:{containerKey:t.containerKey,listType:t.listType}})))},onPlayLiveTVPress:function(){e(Object(C.l)(c()({},n,{options:{containerKey:t.containerKey,listType:t.listType}})))},onEditPress:function(){e(Object(E.editMetadataItem)(n))},
onFavoritePress:function(){e(Object(E.favoriteMetadataItem)(n))},onUnfavoritePress:function(){e(Object(E.unfavoriteMetadataItem)(n))}}}function s(e){return e.provider.protocols.livetv?p.a.createElement(k.a,e):e.showSelect&&!e.showLinkOnly?p.a.createElement(_,e):p.a.createElement(L.a,e)}var l=n(7),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(6),f=(n.n(h),
n(59)),v=n(143),g=n(28),m=n(977),y=n(2272),b=n(21),I=n(2273),S=n(144),M=n(358),D=n(60),C=n(155),O=n(57),j=n(1061),P=n(48),w=n(37),T=n(356),E=n(120),x=n(436),N=n(288),A=(n(87),n(201)),L=n(1062),k=n(2277),_=Object(x.a)(L.a);t.a=Object(O.a)(a,o,N.a)(s)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="playlist://image.favorite"},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),function(e){
return e&&e.viewOffset?Object(a.a)(e.viewOffset,e.duration):0})}t.a=i;var r=n(6),a=(n.n(r),n(526)),o=n(21)},function(e,t){e.exports={selectButton:"SelectButton-selectButton-3Kbjm",isSelected:"SelectButton-isSelected-3mX24",selectCircle:"SelectButton-selectCircle-3tdvG",selectedIcon:"SelectButton-selectedIcon-3-SAL"}},function(e,t){e.exports={progress:"PosterCardOverlayProgress-progress-16k0B",progressTrack:"PosterCardOverlayProgress-progressTrack-3luzP",
progressBar:"PosterCardOverlayProgress-progressBar-3k291"}},function(e,t){e.exports={overlay:"MetadataPosterCardOverlay-overlay-1uMpL",background:"MetadataPosterCardOverlay-background-2EwyB",link:"MetadataPosterCardOverlay-link-1Swhl",badge:"MetadataPosterCardOverlay-badge-1FU-p",topLeftBadge:"MetadataPosterCardOverlay-topLeftBadge-2ooI_ MetadataPosterCardOverlay-badge-1FU-p",
versionBadge:"MetadataPosterCardOverlay-versionBadge-1cDAu MetadataPosterCardOverlay-topLeftBadge-2ooI_ MetadataPosterCardOverlay-badge-1FU-p",versionBadgeIcon:"MetadataPosterCardOverlay-versionBadgeIcon-JkU8E",smartBadge:"MetadataPosterCardOverlay-smartBadge-2YOF_ MetadataPosterCardOverlay-topLeftBadge-2ooI_ MetadataPosterCardOverlay-badge-1FU-p",smartBadgeIcon:"MetadataPosterCardOverlay-smartBadgeIcon-378Sy",
favoriteBadge:"MetadataPosterCardOverlay-favoriteBadge-1jLkE MetadataPosterCardOverlay-topLeftBadge-2ooI_ MetadataPosterCardOverlay-badge-1FU-p",favoriteBadgeIcon:"MetadataPosterCardOverlay-favoriteBadgeIcon-2CJhP",unplayedBadge:"MetadataPosterCardOverlay-unplayedBadge-2hKHo MetadataPosterCardOverlay-badge-1FU-p",unplayedTagContainer:"MetadataPosterCardOverlay-unplayedTagContainer-1uFYq",
unplayedTag:"MetadataPosterCardOverlay-unplayedTag-3hwoi MetadataPosterCardOverlay-unplayedBadge-2hKHo MetadataPosterCardOverlay-badge-1FU-p",progress:"MetadataPosterCardOverlay-progress-2voxf PosterCardOverlayProgress-progress-16k0B",button:"MetadataPosterCardOverlay-button-M43H-",centerCircle:"MetadataPosterCardOverlay-centerCircle-1Mg-s",playButton:"MetadataPosterCardOverlay-playButton-1fjhk PlayButton-playButton-3WX8X MetadataPosterCardOverlay-button-M43H-",
playCoverButton:"MetadataPosterCardOverlay-playCoverButton-I7oU3 MetadataPosterCardOverlay-playButton-1fjhk PlayButton-playButton-3WX8X MetadataPosterCardOverlay-button-M43H-",playCircle:"MetadataPosterCardOverlay-playCircle-M67q6 PlayButton-playCircle-3Evfd MetadataPosterCardOverlay-centerCircle-1Mg-s",selectButton:"MetadataPosterCardOverlay-selectButton-3rwSV SelectButton-selectButton-3Kbjm MetadataPosterCardOverlay-button-M43H-",
selectCircle:"MetadataPosterCardOverlay-selectCircle-3ql8S SelectButton-selectCircle-3tdvG",coverButton:"MetadataPosterCardOverlay-coverButton-2Dm9P",selectCoverButton:"MetadataPosterCardOverlay-selectCoverButton-ukQUf MetadataPosterCardOverlay-coverButton-2Dm9P",deselectCoverButton:"MetadataPosterCardOverlay-deselectCoverButton-3mzek MetadataPosterCardOverlay-coverButton-2Dm9P",editButton:"MetadataPosterCardOverlay-editButton-7oR-Q MetadataPosterCardOverlay-button-M43H-",
favoriteButton:"MetadataPosterCardOverlay-favoriteButton-3SmN_ MetadataPosterCardOverlay-button-M43H-",moreButton:"MetadataPosterCardOverlay-moreButton-3FK-K MetadataPosterCardOverlay-button-M43H-",removeButton:"MetadataPosterCardOverlay-removeButton-3hIPx MetadataPosterCardOverlay-button-M43H-",isActionsMenuOpen:"MetadataPosterCardOverlay-isActionsMenuOpen-AvHIX",isOtherItemSelected:"MetadataPosterCardOverlay-isOtherItemSelected-jneUT",isDragging:"MetadataPosterCardOverlay-isDragging-1XK1P",
hasActiveSelection:"MetadataPosterCardOverlay-hasActiveSelection-2pflV",refreshingCircle:"MetadataPosterCardOverlay-refreshingCircle-3Ebpe MetadataPosterCardOverlay-centerCircle-1Mg-s",trashCircle:"MetadataPosterCardOverlay-trashCircle-XoEoZ MetadataPosterCardOverlay-centerCircle-1Mg-s",isSelected:"MetadataPosterCardOverlay-isSelected-2muun",isConflictingTypeSelected:"MetadataPosterCardOverlay-isConflictingTypeSelected-E8CIx",
isModifierKeyPressed:"MetadataPosterCardOverlay-isModifierKeyPressed-2cmkd",isRefreshing:"MetadataPosterCardOverlay-isRefreshing-2cSpK",isTrash:"MetadataPosterCardOverlay-isTrash-1RTBu",refreshingSpinnerContainer:"MetadataPosterCardOverlay-refreshingSpinnerContainer-1ERDt",refreshingSpinner:"MetadataPosterCardOverlay-refreshingSpinner-ipJiy",refreshingIcon:"MetadataPosterCardOverlay-refreshingIcon-3dF55"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(54)),f=n(29),v=n(438),g=n(22),m=n(524),y=n(173),b=n(231),I=n(2401),S=n(2403),M=n.n(S),D=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onRecordPress=function(e){r.setState({isSubscribeModalOpen:!0})},r.onSubscribeModalClose=function(){r.setState({isSubscribeModalOpen:!1})},r.state={isSubscribeModalOpen:!1},r._moreButtonID=Object(h.a)(),r}return u()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.serverEntityID,i=e.providerEntityID,a=e.metadataItemEntityID,o=e.route,s=e.type,l=e.title,c=e.subscriptionType,u=e.isSubscribed,d=e.showLink,p=e.beginsAt,h=e.endsAt,f=e.showPlay,S=e.showRecord,D=e.onPlayLiveTVPress,C=this.state.isSubscribeModalOpen;return r()("div",{className:(t||"")+" "+(M.a.overlay||"")},void 0,r()("div",{className:M.a.background
}),u&&r()("div",{className:M.a.subscriptionBadge},void 0,r()(v.a,{type:c})),d&&r()(g.a,{className:M.a.link,to:o}),r()(I.a,{className:M.a.progress,beginsAt:p,endsAt:h}),f&&r()(y.a,{className:d?M.a.playButton:M.a.playCoverButton,circleClassName:M.a.playCircle,tabIndex:"-1",title:l,"data-qa-id":"metadataPosterPlayButton",onPress:D}),!f&&S&&r()(m.a,{className:d?M.a.recordButton:M.a.recordCoverButton,"data-qa-id":"metadataPosterRecordButton",circleClassName:M.a.recordCircle,
iconClassName:M.a.recordIcon,tabIndex:"-1",title:l,onPress:this.onRecordPress}),f&&S&&r()(m.a,{className:M.a.recordButtonBottom,"data-qa-id":"metadataPosterRecordButton",circleClassName:M.a.recordCircleBottom,iconClassName:M.a.recordIconBottom,tabIndex:"-1",title:l,onPress:this.onRecordPress}),r()(b.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,isOpen:C,subscriptionType:s,onModalClose:this.onSubscribeModalClose}))},t}(p.Component);t.a=D},function(e,t,n){"use strict";function i(){
return Object(C.createSelector)(function(e,t){return t.subscriptionType},function(e){return"playlist"===e?"show":e})}function r(){return Object(C.createSelector)(Object(E.a)(),i(),function(e,t){var n=Object(P.t)(t);return e.filter(function(e){return Object(P.r)(e.type).id===n.id}).map(function(e){return{librarySectionID:e.key,locations:e.locations,title:e.title}})})}function a(){return Object(C.createSelector)(Object(T.a)(),function(e){return e.ui.mediaSubscriptionModal
},x.a,N.a,i(),r(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],r=arguments[4],a=arguments[5],o=b.a.omit(t,"templates","mediaSubscription"),s=n.key,l=n.grabOperations,c=void 0===l?[]:l,u=n.prefs,d=m()(n,["key","grabOperations","prefs"]),p=void 0,h=void 0,f=void 0;i.length>1?(h=b.a.findIndex(i,function(e){return e.selected}),p=i.map(function(e,t){var n,i=e.title;return n={},n[t]=i,n})):(h=0,p=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 g=b.a.groupBy(u,function(e){return e.advanced?"advanced":"basic"});return g.basic=b.a.indexBy(g.basic,"id"),v()({mediaSubscriptionKey:s,prefGroups:g,metadataType:r,libraries:a,initialMode:h,modes:p,conflicts:f,server:e},o,d)})}var o=n(2),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(7),v=n.n(f),g=n(13),m=n.n(g),y=n(5),b=n.n(y),I=n(1),S=(n.n(I),
n(0)),M=n.n(S),D=n(11),C=n(6),O=(n.n(C),n(4)),j=n(34),P=n(28),w=n(166),T=n(42),E=n(725),x=n(2279),N=n(2280),A=n(1065),L=n(258),k=n(674),_=n(2381),R=n(2382),z=n(2391),U=n(2399),B={dispatchAddLibrary:L.a,dispatchInitMediaSubscriptionModal:A.e,dispatchClearMediaSubscriptionModal:A.b,dispatchSaveMediaSubscription:A.h,dispatchChangeMediaSubscriptionTemplateMode:A.a,dispatchMoveMediaSubscriptionModal:A.g,dispatchClearMediaSubscriptionModalError:A.c,dispatchDeleteMediaSubscriptionModal:A.d
},V=function(e){function t(n,i){c()(this,t);var r=d()(this,e.call(this,n,i));return r.onSubmit=function(e){var t=r.props,n=t.serverEntityID,i=t.metadataItemEntityID,a=e.targetLibrarySectionID,o=e.targetSectionLocationID,s=(e.mode,m()(e,["targetLibrarySectionID","targetSectionLocationID","mode"]));r.props.dispatchSaveMediaSubscription({serverEntityID:n,metadataItemEntityID:i,targetLibrarySectionID:a,targetSectionLocationID:o,prefs:s})},r.onDelete=function(){
r.props.dispatchDeleteMediaSubscriptionModal({metadataItemEntityID:r.props.metadataItemEntityID})},r.onModeChange=function(e){Object(j.a)(function(){r.props.dispatchChangeMediaSubscriptionTemplateMode({modeIndex:e})})},r.onMediaMove=function(){r.props.dispatchMoveMediaSubscriptionModal()},r.onErrorDismiss=function(){r.props.dispatchClearMediaSubscriptionModalError()},r.onCreatePress=function(){var e=r.props,t=e.metadataType,n=e.serverEntityID,i=Object(P.t)(t),a=i.typeString,o=w.a.get(a)
;r.props.onModalClose(),r.props.dispatchAddLibrary({serverEntityID:n,options:{redirect:!1,seedAttrs:{type:o.typeString,title:o.title,language:o.defaultLanguage}}})},r.state={showConflicts:n.showConflicts},r}return h()(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.dispatchClearMediaSubscriptionModal()},t.prototype._populate=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.serverEntityID,n=e.mediaSubscriptionEntityID,i=e.metadataItemEntityID,r=e.showConflicts;Object(j.a)(function(){e.dispatchInitMediaSubscriptionModal({serverEntityID:t,mediaSubscriptionEntityID:n,metadataItemEntityID:i,showConflicts:r})})},t.prototype.render=function(){return this.props.mediaSubscriptionError?s()(k.a,{message:Object(O.default)("There was an unexpected error"),onModalClose:this.props.onModalClose
}):this.props.isMediaSubscriptionPending||!this.props.isMediaSubscriptionPopulated?s()(_.a,{onModalClose:this.props.onModalClose}):this.props.libraries.length?this.state.showConflicts?M.a.createElement(z.a,v()({},this.props,{onDelete:this.onDelete,onMediaMove:this.onMediaMove,onErrorDismiss:this.onErrorDismiss})):M.a.createElement(R.a,v()({},this.props,{onModeChange:this.onModeChange,onSubmit:this.onSubmit,onDelete:this.onDelete,onErrorDismiss:this.onErrorDismiss
})):M.a.createElement(U.a,v()({},this.props,{onCreatePress:this.onCreatePress,onErrorDismiss:this.onErrorDismiss,onDelete:this.onDelete}))},t}(S.Component);V.defaultProps={showConflicts:!1},t.a=Object(D.b)(a,B)(V)},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(726)),a=Object(i.createSelector)(function(e){return e.ui.mediaSubscriptionModal.mediaSubscription},r.a,function(e,t){return t[e]});t.a=a},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),
n(726)),a=Object(i.createSelector)(function(e){return e.ui.mediaSubscriptionModal.templates},r.a,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];return e.map(function(e){return t[e]})});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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=a},function(e,t,n){"use strict";var i=n(2283),r=n.n(i),a=n(5),o=n.n(a),s=n(15),l=n(73),c=n(49),u=c.a.extend({template:r.a,events:o.a.extend({"click .learn-more":"onLearnMoreClick"},c.a.prototype.events),onRender:function(){c.a.prototype.onRender.apply(this,arguments),Object(s.d)("metrics").trackView({
page:"relayNotification",mode:"modal",action:l.o},{interaction:!1})},onHide:function(e){c.a.prototype.onHide.apply(this,arguments),Object(s.d)("metrics").trackClick({page:"relayNotification",mode:"modal",action:l.o})},onLearnMoreClick:function(){Object(s.d)("metrics").trackClick({page:"relayNotification",mode:"modal",action:l.z})},serializeData:function(){return{serverName:this.options.serverName}}});t.a=u},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;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(3)).call(t,"Limited Connection",{hash:{},data:o
}))+" - "+c((s=t&&t.serverName,"function"==typeof s?s.apply(t):s))+' </h4> </div> <div class="modal-body"> <p> '+c(i(n(3)).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:o
}))+' </p> </div> <div class="modal-footer"> <button type="button" class="confirm-btn btn btn-lg btn-primary">'+c(i(n(3)).call(t,"OK",{hash:{},data:o}))+"</button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=' <i class="modal-icon glyphicon plus"></i> '+I(i(n(3)).call(e,"Add {1} Library",'<span class="section-type-title"></span>',{hash:{},data:t
}))+" "}function l(e,t){var r="";return r+=' <i class="modal-icon glyphicon pencil"></i> '+I(i(n(3)).call(e,"Edit Library",{hash:{},data:t}))+" "}function c(e,t){return' <div class="modal-body-pane pane-region dark-scrollbar"> <div class="loading loading-inline"></div> </div> '}function u(e,t){var a,o="";return o+=' <div class="modal-nav-pane dark-scrollbar"> <ul class="list modal-nav-list"> <li> <a class="btn-gray change-pane-btn type-btn',a=i(n(25)).call(e,e&&e.selectedPane,"type",{hash:{},
inverse:S.noop,fn:S.program(8,d,t),data:t}),(a||0===a)&&(o+=a),o+='" data-pane="type" href="#"> <i class="modal-nav-icon glyphicon align-center"></i> ',a=r.if.call(e,e&&e.add,{hash:{},inverse:S.program(12,h,t),fn:S.program(10,p,t),data:t}),(a||0===a)&&(o+=a),o+=' </a> </li> <li> <a class="btn-gray change-pane-btn folders-btn',a=i(n(25)).call(e,e&&e.selectedPane,"folders",{hash:{},inverse:S.noop,fn:S.program(8,d,t),data:t}),(a||0===a)&&(o+=a),o+=" ",a=r.if.call(e,e&&e.add,{hash:{},inverse:S.noop,
fn:S.program(14,f,t),data:t}),(a||0===a)&&(o+=a),o+=" ",a=r.unless.call(e,e&&e.showFolders,{hash:{},inverse:S.noop,fn:S.program(16,v,t),data:t}),(a||0===a)&&(o+=a),o+='" data-pane="folders" href="#"> <i class="modal-nav-icon glyphicon folder-open"></i> '+I(i(n(3)).call(e,"Add folders",{hash:{},data:t}))+' </a> </li> <li> <a class="btn-gray change-pane-btn options-btn',a=i(n(25)).call(e,e&&e.selectedPane,"options",{hash:{},inverse:S.noop,fn:S.program(8,d,t),data:t}),(a||0===a)&&(o+=a),o+=" ",
a=r.if.call(e,e&&e.add,{hash:{},inverse:S.noop,fn:S.program(14,f,t),data:t}),(a||0===a)&&(o+=a),o+=' hidden" data-pane="options" href="#"> <i class="modal-nav-icon glyphicon magic"></i> '+I(i(n(3)).call(e,"Options",{hash:{},data:t}))+' </a> </li> <li> <a class="btn-gray change-pane-btn advanced-btn',a=i(n(25)).call(e,e&&e.selectedPane,"advanced",{hash:{},inverse:S.noop,fn:S.program(8,d,t),data:t}),(a||0===a)&&(o+=a),o+=" ",a=r.if.call(e,e&&e.add,{hash:{},inverse:S.noop,fn:S.program(14,f,t),
data:t}),(a||0===a)&&(o+=a),o+='" data-pane="advanced" href="#"> <i class="modal-nav-icon glyphicon cogwheel"></i> '+I(i(n(3)).call(e,"Advanced",{hash:{},data:t}))+' </a> </li> </ul> </div> <div class="modal-body-pane pane-region dark-scrollbar"> </div> '}function d(e,t){return" selected"}function p(e,t){var r="";return r+=" "+I(i(n(3)).call(e,"Select type",{hash:{},data:t}))+" "}function h(e,t){var r="";return r+=" "+I(i(n(3)).call(e,"General",{hash:{},data:t}))+" "}function f(e,t){
return"disabled"}function v(e,t){return"hidden"}function g(e,t){var r="";return r+=" "+I(i(n(3)).call(e,"Add Library",{hash:{},data:t}))+" "}function m(e,t){var r="";return r+=" "+I(i(n(3)).call(e,"Save Changes",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var y,b="",I=this.escapeExpression,S=this
;return b+='<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"> ',y=r.if.call(t,t&&t.add,{hash:{},inverse:S.program(3,l,o),fn:S.program(1,s,o),data:o}),(y||0===y)&&(b+=y),b+=' </h4> </div> <div class="modal-body modal-body-scroll modal-body-with-panes"> ',y=r.if.call(t,t&&t.isLoading,{hash:{},inverse:S.program(7,u,o),fn:S.program(5,c,o),
data:o}),(y||0===y)&&(b+=y),b+=' </div> <div class="modal-footer"> <span class="form-message"></span> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+I(i(n(3)).call(t,"Cancel",{hash:{},data:o}))+'</button> <button type="button" class="save-btn btn btn-primary btn-loading ',y=r.if.call(t,t&&t.add,{hash:{},inverse:S.noop,fn:S.program(14,f,o),data:o}),(y||0===y)&&(b+=y),
b+='"> <div class="loading loading-sm"></div> <span class="btn-label"> <span class="save-btn-label-next">'+I(i(n(3)).call(t,"Next",{hash:{},data:o}))+'</span> <span class="save-btn-label-save"> ',y=r.if.call(t,t&&t.add,{hash:{},inverse:S.program(20,m,o),fn:S.program(18,g,o),data:o}),(y||0===y)&&(b+=y),b+=" </span> </span> </button> </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(2286),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(32),u=n(363),d=n(2290),p=n(2292),h=u.a.extend({
template:r.a,ui:o.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 p.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(o.a.bind(this.onAgentsPopulate,this)),t.then(o.a.bind(this.onScannersPopulate,this)),n.then(o.a.bind(this.renderSectionSettings,this)),i.then(o.a.bind(this.renderSectionAgentSettings,this)),l.a.when(e,t,n,i).then(o.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 r=i.get("languages"),a=this.model.get("language");r.get(a)||this.model.set("language",r.first().get("code")),this.model.agentSettings=null,this.populateSectionAgentSettings().then(o.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(),c.a.execute("deleteSectionThumbnails",{section:this.model}).done(this.whenRendered(function(){this.ui.thumbnailsCheckbox.prop("checked",!1)}))}});t.a=h},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var s,l="",c=this.escapeExpression;return l+='<form class="edit-section-advanced-form settings-container"> <div class="language-group"> <input type="hidden" name="language" value="'+c((s=t&&t.section,s=null==s||!1===s?s:s.language,
"function"==typeof s?s.apply(t):s))+'"> </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"> '+c(i(n(3)).call(t,"Scanner",{hash:{},data:o}))+' <span class="control-error">'+c(i(n(3)).call(t,"A scanner is required.",{hash:{},data:o
}))+'</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"> '+c(i(n(3)).call(t,"Agent",{hash:{},data:o}))+' <span class="control-error">'+c(i(n(3)).call(t,"An agent is required.",{hash:{},data:o
}))+'</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){"use strict";var i=n(5),r=n.n(i),a=n(23),o=n(2288),s=a.a.extend({name:"ScannerCollection",context:["server","sectionTypeID"],model:o.a,url:function(){return"/system/scanners/"+this.sectionTypeID},hasExclusiveScanner:function(e){return!!r.a.intersection(this.pluck("name"),e).length}})
;t.a=s},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"ScannerModel",context:["server"],rootPropertyName:"Scanner",syncedAttrs:{name:i.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(501),o=n.n(a),s=o.a.extend({constructor:function(e,t,n,i){this.exclusiveScanners=t,this.scannerName=n,o.a.call(this,e,i),this.filterBy(r.a.bind(this.filterExclusiveScanner,this))},filterExclusiveScanner:function(e){var t=e.get("name"),n=this.exclusiveScanners
;if(!n)return!0;var i=this.scannerName,r=-1!==n.indexOf(i),a=-1!==n.indexOf(t);return r?t===i:!a}});t.a=s},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(2291),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=c.a.ItemView.extend({template:o.a,events:{"change [name]":"onEditSectionSettingInputChange"},initialize:function(e){this.hideSettings=e.hideSettings},serializeData:function(){function e(e){return!r.a.contains(t,e.get("id"))}var t=this.hideSettings;return{
settings:this.model.settings.filter(e).map(function(e){return e.toJSON()}),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();this.collection.findWhere({id:n}).set("value",i)}});t.a=u},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){
function s(e,t,a){var o,s="";return s+=" "+p(i(n(27)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" ",o=r.if.call(e,a&&a.edit,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(o||0===o)&&(s+=o),s+=" "}function l(e,t){var r,a="";return a+=" ",r=i(n(25)).call(e,e&&e.id,"enableBIFGeneration",{hash:{},inverse:h.noop,fn:h.program(3,c,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function c(e,t){var r=""
;return r+=' <div class="form-group"> <button type="button" class="delete-thumbnails-btn btn btn-sm btn-danger">'+p(i(n(3)).call(e,"Delete Preview Thumbnails",{hash:{},data:t}))+"</button> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p=this.escapeExpression,h=this;return u=r.each.call(t,t&&t.settings,{hash:{},inverse:h.noop,fn:h.programWithDepth(1,s,o,t),data:o}),(u||0===u)&&(d+=u),d+=" "})},function(e,t,n){"use strict"
;var i=n(2293),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=s.a.ItemView.extend({template:r.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=o()(e.currentTarget),n=t.is(":checkbox")?t.prop("checked"):t.val();this.collection.findWhere({id:t.attr("name")
}).set("value",n)}});t.a=l},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var a,o="";return o+=' <div class="setup-agent-section"> <div class="setup-agent-title">'+d(i(n(3)).call(e,"{1} Settings",e&&e.agentName,{hash:{},data:t}))+'</div> <p class="setup-agent-disclaimer">'+d(i(n(3)).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"> ',a=r.each.call(e,e&&e.settings,{hash:{},inverse:p.noop,fn:p.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+=" </div> </div> "}function l(e,t){var r="";return r+=" "+d(i(n(27)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this.escapeExpression,p=this;return c=r.if.call(t,t&&t.settings,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(c||0===c)&&(u+=c),
u+=" "})},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2295),o=n.n(a),s=n(12),l=n.n(s),c=n(727),u=n(439),d=n(17),p=n(1069),h=n(363),f=n(2296),v=n(2299),g=h.a.extend({template:o.a,fieldNames:["Location"],regions:{pathsRegion:".paths-region"},ui:r()({},h.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(h.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=i;var n=new p.a({},{server:t
}),i=l.a.Deferred(),r=Object(c.a)(function(){return n.fetchAndNotUpdating()},{times:100,delay:2e3,maxDuration:18e4,cancel:i.promise()});Object(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 v.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);this.model.get("locations").findWhere({path:n}).set("path",i),t.prop("defaultValue",i)},onClose:function(){
this.cancelPersonalCloudServerDriveCacheRetryDeferred&&this.cancelPersonalCloudServerDriveCacheRetryDeferred.resolve()}});t.a=g},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var l,c="",u=this.escapeExpression,d=this
;return c+='<form class="edit-section-folders-form settings-container"> <label> '+u(i(n(3)).call(t,"Add folders to your library",{hash:{},data:o}))+' </label> <div class="form-group Location-group"> <div class="paths-region"></div> <p class="add-folder-container"> <span class="add-folder-populating loading ',l=r.unless.call(t,t&&t.isPersonalCloudServerDriveCachePending,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+='"></span> <span class="add-folder-populating ',
l=r.unless.call(t,t&&t.isPersonalCloudServerDriveCachePending,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+='"> '+u(i(n(3)).call(t,"Plex Cloud is searching for folders",{hash:{},data:o}))+' </span> <span class="add-folder-error hidden"> '+u(i(n(3)).call(t,"Plex Cloud took too long finding folders. Please try again.",{hash:{},data:o}))+' </span> <button type="button" class="add-folder-btn btn btn-icon-label btn-default ',
l=r.if.call(t,t&&t.isPersonalCloudServerDriveCachePending,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+='"> <i class="glyphicon folder-plus"></i> '+u(i(n(3)).call(t,"Browse for media folder",{hash:{},data:o}))+' </button> </p> <p class="control-error">'+u(i(n(3)).call(t,"At least one folder is required.",{hash:{},data:o
}))+'</p> </div> <p class="help-block">'+u(i(n(3)).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:o}))+"</p> </form> "})},function(e,t,n){"use strict";var i=n(20),r=n(2297),a=i.a.CollectionView.extend({itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2298),o=n.n(a),s=n(20),l=s.a.ItemView.extend({template:o.a,
className:"row",events:{"click .remove-path-btn":"onRemovePathClick"},serializeData:function(){return r()({},s.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){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){var i,r,a=""
;return a+=' <input type="text" name="path" class="form-control" value="',(r=n.path)?i=r.call(e,{hash:{},data:t}):(r=e&&e.path,i=typeof r===c?r.call(e,{hash:{},data:t}):r),a+=u(i)+'"> '}function o(e,t){var i,r,a="";return a+=' <span class="form-static-value">',(r=n.path)?i=r.call(e,{hash:{},data:t}):(r=e&&e.path,i=typeof r===c?r.call(e,{hash:{},data:t}):r),a+=u(i)+'<input type="hidden" name="path" value="',(r=n.path)?i=r.call(e,{hash:{},data:t}):(r=e&&e.path,i=typeof r===c?r.call(e,{hash:{},
data:t}):r),a+=u(i)+'" /></span> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var s,l="",c="function",u=this.escapeExpression,d=this;return l+='<div class="col-md-12"> <div class="form-group path-group"> ',s=n.if.call(t,t&&t.canEditPath,{hash:{},inverse:d.program(3,o,r),fn:d.program(1,a,r),data:r}),(s||0===s)&&(l+=s),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){"use strict";var i=n(2300),r=n.n(i),a=n(5),o=n.n(a),s=n(4),l=n(17),c=n(211),u=n(1070),d=n(70),p=n(2305),h=n(2308),f=d.a.extend({name:"addFolderModal",className:"add-folder-modal modal fade",template:r.a,events:o.a.extend({"submit form":"onSubmitForm"},d.a.prototype.events),ui:{path:'input[name="path"]'},regions:{rootList:".home-directory-container",childrenList:".path-container",childrenFileList:".file-container"},initialize:function(e){
d.a.prototype.initialize.apply(this,arguments),this.rootPathList=new u.default({},{server:e.server,includeFiles:1}),this.childrenPathList=new u.default({},{server:e.server,includeFiles:1}),this.loadRootPaths()},loadRootPaths:function(){this.rootPathList.fetch().done(this.whenRendered(function(){var e=this.rootPathList.get("paths").where({home:!0}),t=o.a.first(e)||this.rootPathList.get("paths").first();this.rootList.currentView.startLoadingItem(t),this.loadChildrenPaths(t)}))},
loadChildrenPaths:function(e){c.a.abortAll("addFolderModal");var t=e.get("children"),n=t.fetch({scope:"addFolderModal"});n.done(this.whenRendered(function(){this.ui.path.val(e.get("path")),this.childrenPathList.get("paths").reset(t.get("paths").models),this.childrenPathList.get("files").reset(t.get("files").models),this.childrenPathList.set("truncatedFilesCount",t.get("truncatedFilesCount"))})),n.fail(this.whenRendered(function(){this.childrenList.currentView.unselectItem(e),
l.a.trigger("show:alert",{type:"error",message:Object(s.default)("Unable to load contents of '{1}'",e.get("path"))})})),n.always(this.whenRendered(function(){this.rootList.currentView.stopLoadingItem(e)}))},onRender:function(){d.a.prototype.onRender.apply(this,arguments);var e=new p.a({isRoot:!0,collection:this.rootPathList.get("paths")}),t=new p.a({collection:this.childrenPathList.get("paths")}),n=new h.a({model:this.childrenPathList,collection:this.childrenPathList.get("files")})
;this.listenTo(e,"change:path",this.onRootPathChange),this.listenTo(t,"change:path",this.onChildrenPathChange),this.rootList.show(e),this.childrenList.show(t),this.childrenFileList.show(n)},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=f},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression
;return s+='<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(3)).call(t,"Add Folder",{hash:{},data:o
}))+'</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="col-md-7"> <div class="path-container"></div> <div class="file-container"></div> </div> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+l(i(n(3)).call(t,"Cancel",{
hash:{},data:o}))+'</button> <button type="submit" class="add-btn btn btn-primary">'+l(i(n(3)).call(t,"Add",{hash:{},data:o}))+"</button> </div> </form> </div> </div> "})},function(e,t,n){"use strict";var i=n(23),r=n(2302),a=n(19),o=i.a.extend({name:"FilePathCollection",context:["server","includeFiles"],model:r.a,url:function(){var e={};return this.includeFiles&&(e.includeFiles=1),a.join(["/services/browse"],e)}});t.a=o},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(19),o=r.a.extend({
name:"FilePathModel",context:["server","includeFiles"],idAttribute:"key",rootPropertyName:"Path",sessionAttrs:{isBackShortcut:i.a.boolean},sessionRelations:{children:function(){var e={};return this.includeFiles&&(e.includeFiles=1),{relationClass:n(1070).default,options:{url:a.join([this.id],e)}}}},syncedAttrs:{key:i.a.string,title:i.a.string,path:i.a.string,home:i.a.boolean,network:i.a.boolean}});t.a=o},function(e,t,n){"use strict";var i=n(23),r=n(2304),a=i.a.extend({name:"FileCollection",
model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"FileModel",idAttribute:"key",rootPropertyName:"File",syncedAttrs:{key:i.a.string,title:i.a.string,path:i.a.string,network:i.a.boolean}});t.a=a},function(e,t,n){"use strict";var i=n(20),r=n(12),a=n.n(r),o=n(2306),s=i.a.CollectionView.extend({tagName:"ul",className:"list browse-directory-list",itemView:o.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=a()(e.currentTarget),n=t.data("key"),i=this.collection.get(n)||this.parentFilePath;this.trigger("change:path",i),this.options.isRoot||(i.parent.parent?(this.parentFilePath=i.parent.parent.clone(),this.parentFilePath.set({title:".. [Back]",isBackShortcut:!0})):this.parentFilePath=null)}});t.a=s},function(e,t,n){"use strict";var i=n(2307),r=n.n(i),a=n(20),o=a.a.ItemView.extend({tagName:"li",className:"striped-list-item browse-directory-list-item",template:r.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=o},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return"left-arrow"}function o(e,t){var i;return i=n.if.call(e,(i=e&&e.filePath,null==i||!1===i?i:i.home),{hash:{},
inverse:v.program(6,l,t),fn:v.program(4,s,t),data:t}),i||0===i?i:""}function s(e,t){return"home"}function l(e,t){var i;return i=n.if.call(e,(i=e&&e.filePath,null==i||!1===i?i:i.network),{hash:{},inverse:v.program(9,u,t),fn:v.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:v.program(12,p,t),fn:v.program(10,d,t),data:t}),i||0===i?i:""}function d(e,t){return"hdd"}function p(e,t){return"folder-open"}
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var h,f="",v=this,g=this.escapeExpression;return f+='<a class="striped-list-item" href="#" data-key="'+g((h=t&&t.filePath,h=null==h||!1===h?h:h.key,"function"==typeof h?h.apply(t):h))+'"> <i class="folder-icon glyphicon ',h=n.if.call(t,(h=t&&t.filePath,null==h||!1===h?h:h.isBackShortcut),{hash:{},inverse:v.program(3,o,r),fn:v.program(1,a,r),data:r}),(h||0===h)&&(f+=h),f+='"></i> '+g((h=t&&t.filePath,h=null==h||!1===h?h:h.title,
"function"==typeof h?h.apply(t):h))+' <div class="loading loading-sm loading-inline hidden"></div> </a> '})},function(e,t,n){"use strict";var i=n(20),r=n(4),a=n(2309),o=n(2311),s=n.n(o),l=i.a.CompositeView.extend({template:s.a,itemView:a.a,itemViewContainer:".js-file-list-items",bindings:{".js-file-list-truncated-message":{modelAttribute:"truncatedFilesCount",formatter:function(e){return e?Object(r.default)("\u2026and {truncatedFilesCount} more",{truncatedFilesCount:e}):null}}}});t.a=l
},function(e,t,n){"use strict";var i=n(2310),r=n.n(i),a=n(20),o=a.a.ItemView.extend({tagName:"li",className:"striped-list-item browse-directory-list-item disabled",template:r.a,serializeData:function(){return{filePath:this.model.toJSON()}}});t.a=o},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,o="",s=this.escapeExpression
;return o+='<a class="striped-list-item" href="#" data-key="'+s((a=t&&t.filePath,a=null==a||!1===a?a:a.key,"function"==typeof a?a.apply(t):a))+'"> <i class="glyphicon file"></i> '+s((a=t&&t.filePath,a=null==a||!1===a?a:a.title,"function"==typeof a?a.apply(t):a))+" </a> "})},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},
'<ul class="js-file-list-items list browse-directory-list"></ul> <div class="js-file-list-truncated-message css-file-list-truncated-message"></div> '})},function(e,t,n){"use strict";var i=n(363),r=n(2313),a=n.n(r),o=n(2314),s=n(2316),l=i.a.extend({template:a.a,regions:{options:".section-options"},onRender:function(){"photos"===this.model.sectionType.key?this.options.show(new s.a({model:this.model})):this.options.show(new o.a({model:this.model}))}});t.a=l},function(e,t,n){var i=n(14)
;e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="section-options" />'})},function(e,t,n){"use strict";var i=n(2315),r=n.n(i),a=n(12),o=n.n(a),s=n(15),l=n(17),c=n(363),u=n(626),d=c.a.extend({template:r.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=s.d("appModel"),t=e.get("user");return{hasPremiumMusic:this.hasPremiumMusic,plexPassUrl:t.server.get("plexPassUrl"),hasLyrics:this.model.server.get("transcoderLyrics")}},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=o()(e.currentTarget),n=t.data("agent"),i=t.data("scanner");if((n||i)&&!this.hasPremiumMusic)return void l.a.trigger("show:modal",new u.a({model:this.model.server}));this.model.agentSettings=null,
this.model.set({agent:n||this.getSectionType().defaultAgent,scanner:i||this.getSectionType().defaultScanner})},onSectionAgentChange:function(){this.updateSelectedOffering()},onSectionScannerChange:function(){this.updateSelectedOffering()}});t.a=d},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r=""
;return r+=' <p class="help-block"> '+d(i(n(3)).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"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this.escapeExpression,p=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(3)).call(t,"Create a premium Plex music library!",{hash:{},data:o
}))+' </span> </div> </div> <div class="row use-premium-library-body"> <div class="col-xs-8"> <ul> <li>'+d(i(n(3)).call(t,"Access to the best artwork, artist bios, album reviews, and more",{hash:{},data:o}))+"</li> <li>"+d(i(n(3)).call(t,"Smart mixes based on track or mood",{hash:{},data:o}))+"</li> <li>"+d(i(n(3)).call(t,"Improved music recognition and matching",{hash:{},data:o}))+"</li> </ul> ",c=r.unless.call(t,t&&t.hasPremiumMusic,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),
(c||0===c)&&(u+=c),u+=' </div> <div class="col-xs-4 vendor-logos"> ',c=r.if.call(t,t&&t.hasLyrics,{hash:{},inverse:p.noop,fn:p.program(3,l,o),data:o}),(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(3)).call(t,"Create a basic music library",{
hash:{},data:o}))+" </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(20),r=n(2317),a=n.n(r),o=n(15),s=n(17),l=n(626),c=i.a.Layout.extend({template:a.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=o.d("appModel"),t=e.get("user");return{hasPremiumPhotos:this.hasPremiumPhotos,plexPassUrl:t.server.get("plexPassUrl")}},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):s.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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r=""
;return r+=' <p class="help-block"> '+u(i(n(3)).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"],r=this.merge(r,e.helpers),o=o||{};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(3)).call(t,"Automatically tag my photos!",{hash:{},data:o
}))+' </span> </div> </div> <div class="use-premium-library-body"> <div class="row"> <div class="col-xs-8"> <ul> <li>'+u(i(n(3)).call(t,"Wondering if your photos contain kittens? Our advanced neural net can help you figure it out!",{hash:{},data:o}))+"</li> <li>"+u(i(n(3)).call(t,"A fun new way to explore your collection!",{hash:{},data:o
}))+'</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(3)).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:o}))+" </p> ",l=r.unless.call(t,t&&t.hasPremiumPhotos,{hash:{},inverse:d.noop,
fn:d.program(1,s,o),data:o}),(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(3)).call(t,"No thanks, I don't care about kittens",{hash:{},data:o}))+" </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(2319),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(166),u=n(295),d=n(363),p=d.a.extend({template:r.a,ui:o.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 n=this.model.get("updatedAt");return n&&(e.updatedAt=Object(u.a)(n)),
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(o.a.bind(this.model.setAgentAndScanner,this.model))),i=i.then(e).then(o.a.bind(this.onAgentsPopulate,this)).then(o.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"),r=c.a.get(i),a=r.defaultLanguage;this.model.set("language",a,{silent:!0}),e=a}
var o=n.map(function(e){return{label:e.get("name"),value:e.id}});this.updateSectionLanguage(),this.ui.sectionLanguage.html(this.createMenuOptions(o,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},r=c.a.get(n);this.model.get("title")||(i.title=r.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 r=this.model.get("title"),a=this.model.previous("type"),o=c.a.get(a),s=o&&o.title;r&&r!==s||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=p},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"section-type-chosen"}function l(e,t){
var r="";return r+=' <p class="prompt">'+m(i(n(3)).call(e,"Select your library type",{hash:{},data:t}))+"</p> "}function c(e,t){var r="";return r+=" <label>"+m(i(n(3)).call(e,"Library type",{hash:{},data:t}))+"</label> "}function u(e,t,a){var o,s="";return s+=' <a class="wizard-block section-type ',o=r.if.call(e,a&&a.canChangeType,{hash:{},inverse:y.noop,fn:y.program(8,d,t),data:t}),(o||0===o)&&(s+=o),s+=" ",o=i(n(25)).call(e,a&&a.currentSectionKey,e&&e.key,{hash:{},inverse:y.noop,
fn:y.program(10,p,t),data:t}),(o||0===o)&&(s+=o),s+='" data-key="'+m((o=e&&e.key,typeof o===b?o.apply(e):o))+'" href="#"> <i class="wizard-block-icon '+m((o=e&&e.sectionTypeIcon,typeof o===b?o.apply(e):o))+'"></i> '+m((o=e&&e.title,typeof o===b?o.apply(e):o))+" </a> "}function d(e,t){return"selectable"}function p(e,t){return"selected"}function h(e,t){var r="";return r+=' <div class="row"> <div class="col-xs-12"> <p class="prompt">'+m(i(n(3)).call(e,"Name your library and choose language.",{
hash:{},data:t}))+"</p> </div> </div> "}function f(e,t){var r="";return r+=" "+m(i(n(3)).call(e,"Last updated {1}",e&&e.updatedAt,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var v,g="",m=this.escapeExpression,y=this,b="function";return g+='<form class="edit-section-type-form settings-container ',v=r.if.call(t,(v=t&&t.section,null==v||!1===v?v:v.type),{hash:{},inverse:y.noop,fn:y.program(1,s,o),data:o}),(v||0===v)&&(g+=v),g+='"> ',
v=r.if.call(t,t&&t.add,{hash:{},inverse:y.program(5,c,o),fn:y.program(3,l,o),data:o}),(v||0===v)&&(g+=v),g+=' <div class="wizard-blocks-group form-group type-group"> ',v=r.each.call(t,t&&t.sectionTypes,{hash:{},inverse:y.noop,fn:y.programWithDepth(7,u,o,t),data:o}),(v||0===v)&&(g+=v),g+=' <label class="control-label"> <span class="control-error">'+m(i(n(3)).call(t,"You must select a media type.",{hash:{},data:o}))+'</span> </label> </div> <div class="visible-once-section-type-chosen"> ',
v=r.if.call(t,t&&t.hasType,{hash:{},inverse:y.noop,fn:y.program(12,h,o),data:o}),(v||0===v)&&(g+=v),g+=' <div class="row"> <div class="col-md-7"> <div class="form-group title-group"> <div> <label for="edit-section-title" class="control-label"> '+m(i(n(3)).call(t,"Name",{hash:{},data:o}))+' <span class="control-error">'+m(i(n(3)).call(t,"A library name is required.",{hash:{},data:o
}))+'</span> </label> </div> <input type="text" id="edit-section-title" name="title" class="form-control" value="'+m((v=t&&t.section,v=null==v||!1===v?v:v.title,typeof v===b?v.apply(t):v))+'"> </div> </div> <div class="col-md-5"> <div class="form-group language-group"> <div> <label for="edit-section-language" class="control-label"> '+m(i(n(3)).call(t,"Language",{hash:{},data:o}))+' <span class="control-error">'+m(i(n(3)).call(t,"A language is required.",{hash:{},data:o
}))+'</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"> ',v=r.if.call(t,t&&t.updatedAt,{hash:{},inverse:y.noop,fn:y.program(14,f,o),data:o}),(v||0===v)&&(g+=v),g+=" </span> </div> </div> </div> </form> "})},function(e,t,n){"use strict";var i=n(2321),r=n.n(i),a=n(363),o=a.a.extend({template:r.a});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}
var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression;return s+='<form class="edit-section-type-form settings-container"> <p>'+l(i(n(3)).call(t,"There was an error adding this library.",{hash:{},data:o
}))+"</p> <p>"+l(i(n(3)).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:o}))+"</p> </form>"})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i="";return i+=" "+y((n=e&&e.title,
typeof n===m?n.apply(e):n))+" "}function l(e,t){var r,a="";return a+=" ",r=i(n(25)).call(e,e&&e.type,"home",{hash:{},inverse:b.program(6,u,t),fn:b.program(4,c,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function c(e,t){var r="";return r+=" "+y(i(n(3)).call(e,"Add User",{hash:{},data:t}))+" "}function u(e,t){var r="";return r+=" "+y(i(n(3)).call(e,"Invite Friend",{hash:{},data:t}))+" "}function d(e,t){var r="";return r+=" "+y(i(n(3)).call(e,"Save Changes",{hash:{},data:t}))+" "}function p(e,t){
var r,a="";return a+=" ",r=i(n(25)).call(e,e&&e.type,"home",{hash:{},inverse:b.program(13,f,t),fn:b.program(11,h,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function h(e,t){var r="";return r+=" "+y(i(n(3)).call(e,"Add",{hash:{},data:t}))+" "}function f(e,t){var r="";return r+=" "+y(i(n(3)).call(e,"Invite",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var v,g="",m="function",y=this.escapeExpression,b=this
;return g+='<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"> ',v=r.if.call(t,t&&t.title,{hash:{},inverse:b.program(3,l,o),fn:b.program(1,s,o),data:o}),(v||0===v)&&(g+=v),
g+=' </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(3)).call(t,"Cancel",{hash:{},data:o
}))+'</button> <button type="submit" class="next-btn btn btn-lg btn-primary disabled">'+y(i(n(3)).call(t,"Next",{hash:{},data:o}))+'</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"> ',v=r.if.call(t,t&&t.title,{hash:{},inverse:b.program(10,p,o),fn:b.program(8,d,o),data:o}),(v||0===v)&&(g+=v),g+=" </span> </button> </div> </form> </div> </div> "})},function(e,t,n){"use strict"
;var i=n(5),r=n.n(i),a=n(165),o=n(2324),s=a.a.extend({model:o.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 r.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=s},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(67),o=n(117),s=o.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=r.a.isObject(e)?e:a.a.parseXML(e);t.SharedServer&&(t=t.SharedServer),a.a.parseInteger(t,["id","serverId","lastSeenAt","invitedAt","acceptedAt","numLibraries"]),a.a.parseBoolean(t,["owned","admin","pending","allLibraries","allowSync","allowCameraUpload","allowChannels"]),a.a.parseArray(t,"Section");var n=t.Section
;return r.a.each(n,function(e){a.a.parseInteger(e,"id"),a.a.parseBoolean(e,"shared")}),t},parse:function(e){var t=this.convert(e);return t=r.a.pick(t,this.whitelistedAttrs),!t.numLibraries&&t.Section.length&&(t.numLibraries=r.a.where(t.Section,{shared:!0}).length),t}});t.a=s},function(e,t,n){"use strict";var i=n(23),r=n(2326),a=i.a.extend({name:"ServerOverviewCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(2327),o=r.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:a.a,rootPropertyName:"Section"}}});t.a=o},function(e,t,n){"use strict";var i=n(23),r=n(2328),a=i.a.extend({name:"SectionOverviewCollection",context:["server"],model:r.a})
;t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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=a},function(e,t,n){"use strict";var i=n(2330),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=n(2331),c=s.a.Layout.extend({tagName:"ul",className:"list modal-nav-list",template:r.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=o()(e.currentTarget);if(!t.isDisabled()){var n=t.data("pane"),i=t.data("pane-id"),r={};"ownedServer"===n?r.serverOverview=this.model.get("serverOverviews").get(i):"sharedServer"===n&&(r.serverShare=this.model.get("serverShares").get(i)),this.trigger("change:pane",n,i,r)}}});t.a=c},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression;return s+='<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(3)).call(t,"General",{hash:{},data:o
}))+' </a> </li> <li class="owned-list-header modal-nav-list-header">'+l(i(n(3)).call(t,"My Servers",{hash:{},data:o}))+'</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(3)).call(t,"Restrictions",{hash:{},data:o}))+' </a> </li> <li class="shared-list-header modal-nav-list-header">'+l(i(n(3)).call(t,"Shared With Me",{hash:{},data:o
}))+'</li> <li class="shared-servers-container"></li> '})},function(e,t,n){"use strict";var i=n(63),r=n(2332),a=i.a.extend({className:"server-nav-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(2333),r=n.n(i),a=n(20),o=n(15),s=a.a.ItemView.extend({tagName:"a",className:"btn-gray change-pane-btn disabled",template:r.a,initialize:function(e){this.$el.attr({href:"#","data-pane":e.paneType,"data-pane-id":this.model.id})
;var t=o.d("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=s},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,o,s="",l=this.escapeExpression;return s+='<span class="modal-nav-icon friend-server-status ',(o=n.status)?a=o.call(t,{hash:{},data:r}):(o=t&&t.status,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),
s+=l(a)+'"> <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> '+l((a=t&&t.server,a=null==a||!1===a?a:a.name,"function"==typeof a?a.apply(t):a))+" "})},function(e,t,n){"use strict";var i=n(2335),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(32),d=c.a.ItemView.extend({template:r.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=o.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(o.a.bind(function(){
this.$el.addClass("is-valid-username"),this.$el.removeClass("is-invalid-username")},this)),t.fail(o.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(o.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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r=""
;return r+=' <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(3)).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(3)).call(e,"Add an Existing Plex User",{hash:{},data:t}))+'</button> <p class="help-block">'+d(i(n(3)).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(3)).call(e,"Name",{hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <button type="button" class="add-restricted-user-btn btn btn-primary">'+d(i(n(3)).call(e,"Create a Managed User",{hash:{},data:t
}))+'</button> <p class="help-block">'+d(i(n(3)).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 r=""
;return r+=' <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(3)).call(e,"Username or email",{hash:{},data:t
}))+'" autocorrect="off" autocapitalize="off"> <p class="help-block">'+d(i(n(3)).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"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this.escapeExpression,p=this;return c=i(n(25)).call(t,t&&t.type,"home",{hash:{},inverse:p.program(3,l,o),fn:p.program(1,s,o),data:o}),
(c||0===c)&&(u+=c),u+=" "})},function(e,t,n){"use strict";var i=n(2337),r=n.n(i),a=n(20),o=n(247),s=a.a.ItemView.extend({template:r.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 o.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=s},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){
var r,a="";return a+=' <div class="restricted-name-group form-group"> <input type="text" id="restricted-title" name="title" class="form-control" placeholder="'+M(i(n(3)).call(e,"Name",{hash:{},data:t}))+'" value="'+M((r=e&&e.homeUser,r=null==r||!1===r?r:r.title,typeof r===D?r.apply(e):r))+'"> </div> '}function l(e,t){var n,i="";return i+=' <h3 class="friend-title"> ',n=r.if.call(e,(n=e&&e.friend,null==n||!1===n?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=r.if.call(e,(n=e&&e.friend,null==n||!1===n?n:n.email),{hash:{},inverse:C.program(10,p,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||!1===n?n:n.title,typeof n===D?n.apply(e):n))+" "}function u(e,t){var n,i="";return i+=" "+M((n=e&&e.friend,n=null==n||!1===n?n:n.username,typeof n===D?n.apply(e):n))+" "}function d(e,t){var n,i=""
;return i+=" "+M((n=e&&e.friend,n=null==n||!1===n?n:n.email,typeof n===D?n.apply(e):n))+" "}function p(e,t){var r="";return r+=" "+M(i(n(3)).call(e,"An invite will be sent to this user.",{hash:{},data:t}))+" "}function h(e,t){var n,i="";return i+=' <div class="edit-friend-footer"> ',n=r.if.call(e,(n=e&&e.homeUser,null==n||!1===n?n:n.restricted),{hash:{},inverse:C.program(18,m,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=r.if.call(e,(n=e&&e.homeUser,null==n||!1===n?n:n.guest),{hash:{},inverse:C.program(16,g,t),fn:C.program(14,v,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function v(e,t){var r="";return r+=' <button type="button" class="disable-guest-btn btn btn-sm btn-danger">'+M(i(n(3)).call(e,"Disable guest",{hash:{},data:t}))+"</button> "}function g(e,t){var r="";return r+=' <button type="button" class="remove-home-btn btn btn-sm btn-danger">'+M(i(n(3)).call(e,"Delete user",{hash:{},data:t}))+"</button> "}
function m(e,t){var n,i="";return i+=" ",n=r.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=r.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 r="";return r+=' <button type="button" class="remove-friend-btn btn btn-sm btn-danger">'+M(i(n(3)).call(e,"Remove this friend",{hash:{},data:t}))+"</button> "}function b(e,t){var r=""
;return r+=' <button type="button" class="remove-home-btn btn btn-sm btn-danger">'+M(i(n(3)).call(e,"Remove from home",{hash:{},data:t}))+"</button> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var I,S="",M=this.escapeExpression,D="function",C=this;return S+='<div class="edit-friend-header"> <div class="media-poster img-circle placeholder-friend"></div> ',I=r.if.call(t,(I=t&&t.homeUser,null==I||!1===I?I:I.restricted),{hash:{},inverse:C.program(3,l,o),fn:C.program(1,s,o),
data:o}),(I||0===I)&&(S+=I),S+=" </div> ",I=r.if.call(t,t&&t.showActions,{hash:{},inverse:C.noop,fn:C.program(12,h,o),data:o}),(I||0===I)&&(S+=I),S+=" "})},function(e,t,n){"use strict";var i=n(2339),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(15),d=n(295),p=n(2340),h=c.a.Layout.extend({template:r.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.d("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"),r=[],a={machineIdentifier:e.id,owned:!0,allLibraries:!1};return i.each(function(){if("all"===this.value)return a.allLibraries=!0,!1;r.push(parseInt(this.value,10))}),a.allLibraries?a.numLibraries=t.length:a.numLibraries=r.length,a.Section=t.map(function(e){var t=e.toJSON()
;return t.shared=a.allLibraries||o.a.contains(r,t.id),t}),a},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=Object(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 p.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=h},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression;return s+='<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(3)).call(t,"Available",{hash:{},data:o}))+'</span> <span class="server-status-label unavailable">'+l(i(n(3)).call(t,"Unavailable",{
hash:{},data:o}))+'</span> <span class="server-status-label unauthorized">'+l(i(n(3)).call(t,"Unauthorized",{hash:{},data:o}))+'</span> <span class="server-status-label unknown">'+l(i(n(3)).call(t,"Unknown",{hash:{},data:o}))+'</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(3)).call(t,"Info",{hash:{},data:o
}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(3)).call(t,"Version",{hash:{},data:o}))+'</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(3)).call(t,"Last Seen",{hash:{},data:o
}))+'</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(3)).call(t,"Address",{hash:{},data:o}))+'</div> <div class="server-detail-value server-detail-address"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(3)).call(t,"Port",{hash:{},data:o
}))+'</div> <div class="server-detail-value server-detail-port"></div> </div> </div> <div class="share-details"> <h4>'+l(i(n(3)).call(t,"Share",{hash:{},data:o}))+"</h4> </div> "})},function(e,t,n){"use strict";var i=n(2341),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(2342),d=c.a.CompositeView.extend({className:"share-server-container",template:r.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){o.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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"show-libraries"}function l(e,t){var a,o="";return o+=' <li class="share-section-list-item"> <div class="checkbox"> <label for="share-all-libraries-'+y((a=e&&e.server,a=null==a||!1===a?a:a.machineIdentifier,
typeof a===m?a.apply(e):a))+'-cb"> <input type="checkbox" id="share-all-libraries-'+y((a=e&&e.server,a=null==a||!1===a?a:a.machineIdentifier,typeof a===m?a.apply(e):a))+'-cb" name="share-all-libraries-cb" value="all" ',a=r.if.call(e,e&&e.allLibraries,{hash:{},inverse:b.noop,fn:b.program(4,c,t),data:t}),(a||0===a)&&(o+=a),o+="> "+y(i(n(3)).call(e,"All Libraries",{hash:{},data:t}))+" </label> </div> </li> "}function c(e,t){return"checked"}function u(e,t){var r=""
;return r+=' <p class="text-muted">'+y(i(n(3)).call(e,"Loading...",{hash:{},data:t}))+"</p> "}function d(e,t){var n;return n=r.if.call(e,e&&e.hasFailed,{hash:{},inverse:b.program(11,h,t),fn:b.program(9,p,t),data:t}),n||0===n?n:""}function p(e,t){var r,a="";return a+=' <p class="text-muted">'+y(i(n(3)).call(e,"We were unable to retrieve libraries for {1}. Please ensure the server is signed in to your Plex account.",(r=e&&e.server,null==r||!1===r?r:r.name),{hash:{},data:t}))+"</p> "}
function h(e,t){var n;return n=r.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 r="";return r+=' <p class="text-muted">'+y(i(n(3)).call(e,"No libraries",{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var v,g="",m="function",y=this.escapeExpression,b=this;return g+='<ul id="'+y((v=t&&t.server,v=null==v||!1===v?v:v.machineIdentifier,
typeof v===m?v.apply(t):v))+'-section-list" class="list share-section-list ',v=r.unless.call(t,t&&t.allLibraries,{hash:{},inverse:b.noop,fn:b.program(1,s,o),data:o}),(v||0===v)&&(g+=v),g+='"> ',v=r.if.call(t,t&&t.hasSections,{hash:{},inverse:b.noop,fn:b.program(3,l,o),data:o}),(v||0===v)&&(g+=v),g+=" </ul> ",v=r.if.call(t,t&&t.isPending,{hash:{},inverse:b.program(8,d,o),fn:b.program(6,u,o),data:o}),(v||0===v)&&(g+=v),g+=" "})},function(e,t,n){"use strict"
;var i=n(2343),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(166),c=s.a.ItemView.extend({tagName:"li",className:"share-section-list-item",template:r.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=!!o.a.findWhere(t,{id:this.model.id,shared:!0})}return e}})
;t.a=c},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return"checked"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var o,s,l="",c=this.escapeExpression,u=this;return l+='<div class="checkbox"> <label for="share-section-'+c((o=t&&t.section,o=null==o||!1===o?o:o.id,"function"==typeof o?o.apply(t):o))+'-cb"> <input type="checkbox" id="share-section-'+c((o=t&&t.section,o=null==o||!1===o?o:o.id,
"function"==typeof o?o.apply(t):o))+'-cb" value="'+c((o=t&&t.section,o=null==o||!1===o?o:o.id,"function"==typeof o?o.apply(t):o))+'" ',o=n.if.call(t,t&&t.isChecked,{hash:{},inverse:u.noop,fn:u.program(1,a,r),data:r}),(o||0===o)&&(l+=o),l+='> <i class="section-type-icon glyphicon ',(s=n.typeIcon)?o=s.call(t,{hash:{},data:r}):(s=t&&t.typeIcon,o="function"==typeof s?s.call(t,{hash:{},data:r}):s),l+=c(o)+'"></i> '+c((o=t&&t.section,o=null==o||!1===o?o:o.title,
"function"==typeof o?o.apply(t):o))+" </label> </div> "})},function(e,t,n){"use strict";var i=n(2345),r=n.n(i),a=n(2346),o=n.n(a),s=n(5),l=n.n(s),c=n(12),u=n.n(c),d=n(20),p=n(15),h=n(4),f=n(295),v=n(166),g=d.a.ItemView.extend({template:r.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=p.d("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 Object(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:v.a.get(e.type).sectionTypeIcon};t+=o()(n)})):t=o()({section:{
title:Object(h.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=g
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression;return s+='<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(3)).call(t,"Available",{hash:{},data:o
}))+'</span> <span class="server-status-label unavailable">'+l(i(n(3)).call(t,"Unavailable",{hash:{},data:o}))+'</span> <span class="server-status-label unauthorized">'+l(i(n(3)).call(t,"Unauthorized",{hash:{},data:o}))+'</span> <span class="server-status-label unknown">'+l(i(n(3)).call(t,"Unknown",{hash:{},data:o
}))+'</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(3)).call(t,"Info",{hash:{},data:o}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(3)).call(t,"Version",{hash:{},data:o
}))+'</div> <div class="server-detail-value server-detail-version"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(3)).call(t,"Last Seen",{hash:{},data:o}))+'</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(3)).call(t,"Address",{hash:{},data:o
}))+'</div> <div class="server-detail-value server-detail-address"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(3)).call(t,"Port",{hash:{},data:o}))+'</div> <div class="server-detail-value server-detail-port"></div> </div> </div> <div class="share-details"> <h4>'+l(i(n(3)).call(t,"Sharing",{hash:{},data:o
}))+'</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(3)).call(t,"Sync Allowed",{hash:{},data:o}))+' </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(3)).call(t,"Leave Server",{hash:{},data:o}))+"</button> </div> "})
},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,o,s="",l=this.escapeExpression;return s+='<li class="share-section-list-item no-checkbox"> <i class="section-type-icon glyphicon ',(o=n.typeIcon)?a=o.call(t,{hash:{},data:r}):(o=t&&t.typeIcon,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),s+=l(a)+'"></i> '+l((a=t&&t.section,a=null==a||!1===a?a:a.title,
"function"==typeof a?a.apply(t):a))+" </li> "})},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2348),o=n.n(a),s=n(5),l=n.n(s),c=n(12),u=n.n(c),d=n(20),p=n(15),h=n(166),f=n(52),v=n(620),g=n(986),m=(n.n(g),d.a.ItemView.extend({className:"form-horizontal",template:o.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","photo"]}},
filterByType:{movie:"filterMovies",show:"filterTelevision",artist:"filterMusic",photo:"filterPhotos"},ui:{tagInputs:".tag-input-hidden",onlyDeleteTagInputs:".only-delete-tag-input-hidden"},events:{"change input":"onInputChange"},initialize:function(e){this.paneID=e.paneID,this.type=e.type;var t=p.d("appModel"),n=t.get("user");this.hasContentFilterFeature=n.get("features").get(f.c),this.canShareTuners=!!e.homeUser&&n.get("features").get(f.h),this.plexPassUrl=n.server.get("plexPassUrl"),
this.changes={}},serializeData:function(){return{user:this.model.toJSON(),hasContentFilterFeature:this.hasContentFilterFeature,canShareTuners:this.canShareTuners,plexPassUrl:this.plexPassUrl,moviesIcon:h.a.get("movies").sectionTypeIcon,showsIcon:h.a.get("tv").sectionTypeIcon,musicIcon:h.a.get("music").sectionTypeIcon,photosIcon:h.a.get("photo").sectionTypeIcon}},loadPresets:function(){l.a.each(this.filters,function(e,t){l.a.isEmpty(e.presets)||l.a.each(e.presets,function(e,n){
var i=this.getSelectizeInputByFilterName(t,n),r=l.a.map(e,function(e){return{title:e,key:e}});i.addOption(r)},this)},this)},loadSections:function(){var e=p.d("appModel"),t=e.get("servers"),n=this.model.get("serverShares"),i=n.filter(function(e){return e.isActive()&&e.get("owned")}),r=l.a.compact(l.a.map(i,function(e){return t.get(e.get("machineIdentifier"))}));l.a.each(r,function(e){if(e.get("connected")){var t=e.get("sections");t.populate().done(l.a.bind(function(){this.loadFilters(t)},this))}
},this)},loadFilters:function(e){e.each(function(e){var t=e.get("type");l.a.each(this.filters,function(n,i){l.a.contains(n.sectionTypes,t)&&this.loadFilterOptions(e,i)},this)},this)},loadFilterOptions:function(e,t){var n=new v.a({filter:t,filterType:"string"},{server:e.server,section:e}),i=n.get("options");i.populate().done(l.a.bind(function(){this.getSelectizeInputByFilterName(t,e.get("type")).addOption(i.toJSON())},this))},getSelectizeInputByFilterName:function(e,t){var n="#filter-"+t+"-"+e
;return this.$(n)[0].selectize},resetAllPlaceholders:function(){var e=[];l.a.each(this.filters,function(t){e=l.a.union(e,t.sectionTypes)}),l.a.each(e,function(e){var t=this.model.get(this.filterByType[e]);this.resetPlaceholders(e,{restore:l.a.isEmpty(t)})},this)},resetPlaceholders:function(e,t){t||(t={}),this.$("input[data-section-type="+e+"]").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(){if(!this.hasContentFilterFeature)return void this.$el.addClass("no-plex-pass");var e={plugins:["remove_button"],create:!0,labelField:"title",valueField:"title",sortField:"title",searchField:["title"]};this.ui.tagInputs.selectize(e),this.ui.onlyDeleteTagInputs.selectize(r()({onInitialize:function(){
this.$control.off("click mousedown"),this.$control.addClass("no-input"),this.$control_input.prop("disabled",!0)},hideDropdown:!0},e)),this.resetAllPlaceholders(),this.loadSections(),this.loadPresets()},onInputChange:function(e){var t=e.currentTarget,n=u()(t),i=t.value,r=n.data("filter"),a=n.data("sectionType");if(this.hasContentFilterFeature||"allowChannels"===t.name){if(r){var o=this.changes[t.name]||this.model.get(t.name)||{};i?o[r]=i:o.hasOwnProperty(r)&&delete o[r],this.resetPlaceholders(a,{
restore:l.a.isEmpty(o)}),i=o}else"checkbox"===t.type&&(i=t.checked);this.changes[t.name]=i}}}));t.a=m},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var a,o="";return o+=' <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" ',a=r.if.call(e,(a=e&&e.user,
null==a||!1===a?a:a.allowChannels),{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+="> "+v(i(n(3)).call(e,"Allow Plugins",{hash:{},data:t}))+' </label> </div> </div> </div> <div class="row"> <h4 class="text-muted plex-pass-restrictions-header"> <span class="plex-pass-restrictions-title">'+v(i(n(3)).call(e,"Plex Pass restrictions",{hash:{},data:t}))+'</span> <a href="'+v((a=e&&e.plexPassUrl,typeof a===g?a.apply(e):a))+'" target="_blank">'+v(i(n(3)).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 a,o="";return o+=' <div class="checkbox"> <label for="allow-channels-cb"> <input type="checkbox" id="allow-channels-cb" name="allowChannels" ',a=r.if.call(e,(a=e&&e.user,null==a||!1===a?a:a.allowChannels),{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+="> "+v(i(n(3)).call(e,"Allow Plugins",{hash:{},data:t}))+" </label> </div> "}function u(e,t){
var a,o="";return o+=' <div class="checkbox"> <label for="allow-tuners-cb"> <input type="checkbox" id="allow-tuners-cb" name="allowTuners" ',a=r.if.call(e,(a=e&&e.user,null==a||!1===a?a:a.allowTuners),{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+="> "+v(i(n(3)).call(e,"Allow access to Live TV",{hash:{},data:t
}))+' </label> <p class="help-block"> '+v(i(n(3)).call(e,"Enabling this option will allow this user to access Live TV streams. It requires a library on the Plex Media Server that has DVR configured to be shared with the user.",{hash:{},data:t}))+" </p> </div> "}function d(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var p,h="",f=this,v=this.escapeExpression,g="function";return p=r.unless.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:f.noop,
fn:f.program(1,s,o),data:o}),(p||0===p)&&(h+=p),h+=' <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" ',p=r.if.call(t,(p=t&&t.user,null==p||!1===p?p:p.allowSync),{hash:{},inverse:f.noop,fn:f.program(2,l,o),data:o}),(p||0===p)&&(h+=p),h+="> "+v(i(n(3)).call(t,"Allow Sync",{hash:{},data:o
}))+' </label> </div> <div class="checkbox"> <label for="allow-camera-upload-images-cb"> <input type="checkbox" id="allow-camera-upload-images-cb" name="allowCameraUpload" ',p=r.if.call(t,(p=t&&t.user,null==p||!1===p?p:p.allowCameraUpload),{hash:{},inverse:f.noop,fn:f.program(2,l,o),data:o}),(p||0===p)&&(h+=p),h+="> "+v(i(n(3)).call(t,"Allow Camera Upload",{hash:{},data:o
}))+' </label> <p class="help-block">'+v(i(n(3)).call(t,"Enabling this option will allow this user to upload media to your server.",{hash:{},data:o}))+"</p> </div> ",p=r.if.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:f.noop,fn:f.program(4,c,o),data:o}),(p||0===p)&&(h+=p),h+=" ",p=r.if.call(t,t&&t.canShareTuners,{hash:{},inverse:f.noop,fn:f.program(6,u,o),data:o}),(p||0===p)&&(h+=p),
h+=' </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+v((p=t&&t.moviesIcon,typeof p===g?p.apply(t):p))+'"></i> '+v(i(n(3)).call(t,"Movies",{hash:{},data:o}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+v(i(n(3)).call(t,"Only allow movies matching the ratings or labels below.",{hash:{},data:o
}))+' </div> </div> <div class="form-group"> <label for="filter-movie-contentRating" class="col-sm-3 control-label"> '+v(i(n(3)).call(t,"Ratings",{hash:{},data:o}))+' </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="'+v(i(n(3)).call(t,"Allow all ratings",{hash:{},data:o}))+'" value="'+v((p=t&&t.user,p=null==p||!1===p?p:p.filterMovies,
p=null==p||!1===p?p:p.contentRating,typeof p===g?p.apply(t):p))+'"> </div> </div> <div class="form-group"> <label for="filter-movie-label" class="col-sm-3 control-label"> '+v(i(n(3)).call(t,"Labels",{hash:{},data:o}))+' </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="'+v(i(n(3)).call(t,"Allow all labels",{hash:{},data:o}))+'" value="'+v((p=t&&t.user,
p=null==p||!1===p?p:p.filterMovies,p=null==p||!1===p?p:p.label,typeof p===g?p.apply(t):p))+'"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+v((p=t&&t.showsIcon,typeof p===g?p.apply(t):p))+'"></i> '+v(i(n(3)).call(t,"TV Shows",{hash:{},data:o}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+v(i(n(3)).call(t,"Only allow TV shows matching the ratings or labels below.",{hash:{},data:o
}))+' </div> </div> <div class="form-group"> <label for="filter-show-contentRating" class="col-sm-3 control-label"> '+v(i(n(3)).call(t,"Ratings",{hash:{},data:o}))+' </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="'+v(i(n(3)).call(t,"Allow all ratings",{hash:{},data:o}))+'" value="'+v((p=t&&t.user,p=null==p||!1===p?p:p.filterTelevision,
p=null==p||!1===p?p:p.contentRating,typeof p===g?p.apply(t):p))+'"> </div> </div> <div class="form-group"> <label for="filter-show-label" class="col-sm-3 control-label"> '+v(i(n(3)).call(t,"Labels",{hash:{},data:o}))+' </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="'+v(i(n(3)).call(t,"Allow all labels",{hash:{},data:o}))+'" value="'+v((p=t&&t.user,
p=null==p||!1===p?p:p.filterTelevision,p=null==p||!1===p?p:p.label,typeof p===g?p.apply(t):p))+'"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+v((p=t&&t.musicIcon,typeof p===g?p.apply(t):p))+'"></i> '+v(i(n(3)).call(t,"Albums",{hash:{},data:o}))+' </label> </div> <div class="form-group"> <label for="filter-artist-label" class="col-sm-3 control-label"> '+v(i(n(3)).call(t,"Labels",{hash:{},data:o
}))+' </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="'+v(i(n(3)).call(t,"Allow all labels",{hash:{},data:o}))+'" value="'+v((p=t&&t.user,p=null==p||!1===p?p:p.filterMusic,p=null==p||!1===p?p:p.label,typeof p===g?p.apply(t):p))+'"> </div> </div> <div class="form-group ',p=r.unless.call(t,(p=t&&t.user,p=null==p||!1===p?p:p.filterPhotos,
null==p||!1===p?p:p.label),{hash:{},inverse:f.noop,fn:f.program(8,d,o),data:o}),(p||0===p)&&(h+=p),h+='"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+v((p=t&&t.photosIcon,typeof p===g?p.apply(t):p))+'"></i> '+v(i(n(3)).call(t,"Photos",{hash:{},data:o}))+' </label> </div> <div class="form-group ',p=r.unless.call(t,(p=t&&t.user,p=null==p||!1===p?p:p.filterPhotos,null==p||!1===p?p:p.label),{hash:{},inverse:f.noop,fn:f.program(8,d,o),data:o}),
(p||0===p)&&(h+=p),h+='"> <label for="filter-photo-label" class="col-sm-3 control-label"> '+v(i(n(3)).call(t,"Labels",{hash:{},data:o}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-photo-label" class="form-control only-delete-tag-input-hidden" name="filterPhotos" data-filter="label" data-section-type="photo" data-only-delete="true" placeholder="'+v(i(n(3)).call(t,"Allow all labels",{hash:{},data:o}))+'" value="'+v((p=t&&t.user,p=null==p||!1===p?p:p.filterPhotos,
p=null==p||!1===p?p:p.label,typeof p===g?p.apply(t):p))+'"> </div> </div> </div> '})},function(e,t,n){"use strict";var i=n(2350),r=n.n(i),a=n(49),o=a.a.extend({template:r.a,initialize:function(e){a.a.prototype.initialize.apply(this,arguments),this.server=e.server},serializeData:function(){return this.server.toJSON()}});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r=""
;return r+=" "+d(i(n(3)).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 r="";return r+=" "+d(i(n(3)).call(e,"Insecure connections will be allowed to any server.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=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 circle-exclamation-mark"></i> '+d(i(n(3)).call(t,"Server Unreachable",{hash:{},data:o}))+' </h4> </div> <div class="modal-body"> <p> ',c=r.if.call(t,t&&t.publicAddressMatches,{hash:{},inverse:p.program(3,l,o),fn:p.program(1,s,o),data:o}),
(c||0===c)&&(u+=c),u+=" </p> <p>"+d(i(n(3)).call(t,"The Allow Fallback to Insecure Connections setting can be changed in Web Settings. Would you like to allow insecure connections?",{hash:{},data:o}))+'</p> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+d(i(n(3)).call(t,"No",{hash:{},data:o}))+'</button> <button type="button" class="confirm-btn btn btn-lg btn-danger">'+d(i(n(3)).call(t,"Yes",{hash:{},data:o
}))+"</button> </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(2352),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(4),u=n(17),d=n(70),p=d.a.extend({name:"importPlaylistsModal",className:"import-playlists-modal modal fade",template:r.a,ui:{importBtn:".import-btn",sections:"#section-list",importAll:"#import-all"},events:o.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.libraries.where({type:"artist"})},serializeData:function(){var e=o.a.map(this.musicSections,function(e){return e.pick("key","title")});return{showSections:e.length>1,sections:e}},onImportClick:function(e){e.preventDefault(),this.ui.importBtn.addClass("active");var t=this.ui.sections.val(),n="/playlists/import/itunes?sectionID="+t;this.ui.importAll[0].checked&&(n+="&force=1");var i=o.a.extend(this.server.getXHROptions(n),{type:"PUT"}),r=l.a.ajax(i);r.done(o.a.bind(function(){
u.a.trigger("show:alert",{type:"success",message:Object(c.default)("Playlists have been imported.")}),this.server.get("playlists").get("items").fetch(),this.hide()},this)),r.fail(function(){u.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem importing.")})})}});t.a=p},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"hidden"}function l(e,t){var n,i=""
;return i+=' <option value="'+p((n=e&&e.key,typeof n===d?n.apply(e):n))+'">'+p((n=e&&e.title,typeof n===d?n.apply(e):n))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d="function",p=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 file-import"></i> '+p(i(n(3)).call(t,"Import from iTunes",{hash:{},data:o
}))+' </h4> </div> <div class="modal-body"> <p class="help-block">'+p(i(n(3)).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:o}))+'</p> <div class="form-group ',c=r.unless.call(t,t&&t.showSections,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),
(c||0===c)&&(u+=c),u+='"> <label class="control-label"> '+p(i(n(3)).call(t,"Add to library: ",{hash:{},data:o}))+' <select id="section-list"> ',c=r.each.call(t,t&&t.sections,{hash:{},inverse:h.noop,fn:h.program(3,l,o),data:o}),(c||0===c)&&(u+=c),u+=' </select> </label> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="import-all"> '+p(i(n(3)).call(t,"Overwrite existing playlists",{hash:{},data:o
}))+' </label> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+p(i(n(3)).call(t,"Cancel",{hash:{},data:o}))+'</button> <button type="button" class="import-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+p(i(n(3)).call(t,"Import",{hash:{},data:o}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){"use strict";function i(){
var e=Object(a.a)(window.location.href,"http:");o.a.get("allowSSO")?window.location=r.join(e,{secure:0},{parseParams:!0,recognizeHash:!0}):window.location=e}var r=n(19),a=n(846),o=n(62);t.a=i},function(e,t,n){"use strict";var i=n(2355),r=n.n(i),a=n(5),o=n.n(a),s=n(38),l=n(35),c=n(73),u=n(15),d=n(2356),p=n(70),h=n(425),f=n(2362),v={osx:"mac"},g=p.a.extend({mixins:[h.a],name:"serverDownloadModal",className:"server-download-modal modal modal-lg fade",template:r.a,ui:{downloadBtn:".download-btn",
paneTabs:".show-pane-btn",loading:".server-download-loading"},regions:{paneRegion:".pane-region"},events:o.a.extend({"click .show-pane-btn":"onShowPaneClick","click .download-btn":"onDownloadClick"},p.a.prototype.events),panesModel:"selectedModel",onlyAfterRender:["showPane"],initialize:function(e){var t=this;p.a.prototype.initialize.apply(this,arguments);var n=u.d("appModel");n.get("primaryServer")||this.listenTo(n,"change:primaryServer",function(e,n){n&&n.id&&t.hide()}),
this.downloadType=e.downloadType;var i=new d.a([],{server:n.get("cloudServer")});i.populate().done(function(){t.collection=i.get(t.downloadType).get("platforms"),t.paneSetup(),t.render(),t.ui.loading.addClass("hidden")}),u.d("metrics").trackView({page:l.y,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){return e[t.get("id")]={constructor:f.a},e},{});var e=s.a.platformID,t=v[e]||e;this.selectedModel=this.collection.get(t)||this.collection.first(),this.showPane(this.selectedModel.get("id"))},onRender:function(){p.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");u.d("metrics").trackClick({page:l.y,firstRun:!0,action:c.q,platform:this.downloadType,os:t})}});t.a=g},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){
var r,a="";return a+=' <li><a class="btn-gray show-pane-btn type-btn',r=i(n(25)).call(e,e&&e.selectedPane,e&&e.id,{hash:{},inverse:d.noop,fn:d.program(2,l,t),data:t}),(r||0===r)&&(a+=r),a+='" href="#" data-pane="'+h((r=e&&e.id,typeof r===p?r.apply(e):r))+'">'+h((r=e&&e.name,typeof r===p?r.apply(e):r))+"</a></li> "}function l(e,t){return" selected"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this,p="function",h=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> '+h(i(n(3)).call(t,"Plex Media Server Downloads",{hash:{},data:o}))+' </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=r.each.call(t,t&&t.items,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(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){"use strict";var i=n(5),r=n.n(i),a=n(19),o=n(23),s=n(2357),l=o.a.extend({name:"DownloadServerCollection",context:["server"],url:function(){var e=r.a.result(this.server,"url")
;return a.join([e,"api/downloads/1"])},model:s.a});t.a=l},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(2358),o=r.a.extend({name:"DownloadServerModel",context:["server"],rootPropertyName:"Type",idAttribute:"name",syncedAttrs:{name:i.a.string},syncedRelations:{platforms:{rootPropertyName:"Platform",relationClass:a.a,options:function(e){return{type:e.name}}}}});t.a=o},function(e,t,n){"use strict";var i=n(23),r=n(2359),a=i.a.extend({name:"DownloadServerPlatformCollection",
context:["server","type"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(16),l=n(18),c=n(2360),u=l.a.extend({name:"DownloadServerPlatformModel",context:["server","type"],rootPropertyName:"Platform",idAttribute:"id",syncedAttrs:{id:s.a.string,name:s.a.string,version:s.a.string,date:s.a.integer,requirements:s.a.string,fixed:s.a.string,added:s.a.string,info:s.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,a=e.items_added,s=o()(e,["release_date","extra_info","items_fixed","items_added"]);return r()({},s,{info:n,fixed:i,added:a,date:t+"000"})}});t.a=u},function(e,t,n){"use strict";var i=n(23),r=n(2361),a=i.a.extend({name:"DownloadServerReleaseCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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=a},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2363),o=n.n(a),s=n(20),l=s.a.ItemView.extend({template:o.a,className:"download-server-pane",serializeData:function(){var e=this.model.toJSON();return r()({shouldUseDropup:e.releases.length>4},e)}});t.a=l},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r,a="";return a+="<p>"+v(i(n(3)).call(e,"Requirements",{hash:{},data:t}))+": ",r=e&&e.requirements,r=typeof r===g?r.apply(e):r,(r||0===r)&&(a+=r),a+="</p>"}function l(e,t){var n,i="";return i+="<p>",n=e&&e.info,n=typeof n===g?n.apply(e):n,(n||0===n)&&(i+=n),i+="</p>"}function c(e,t){var a,o=""
;return o+=' <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"> '+v(i(n(3)).call(e,"Download",{hash:{},data:t}))+' <span class="caret"></span> </button> <ul class="dropdown-menu"> ',a=r.each.call(e,e&&e.releases,{hash:{},inverse:m.noop,fn:m.program(6,u,t),data:t}),(a||0===a)&&(o+=a),o+=" </ul> </div> "}function u(e,t){var n,i=""
;return i+=' <li><a href="'+v((n=e&&e.url,typeof n===g?n.apply(e):n))+'" download class="download-btn">'+v((n=e&&e.label,typeof n===g?n.apply(e):n))+"</a></li> "}function d(e,t){var n,i="";return i+=' <div class="download-server-btn-group"> ',n=r.each.call(e,e&&e.releases,{hash:{},inverse:m.noop,fn:m.program(9,p,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> "}function p(e,t){var n,i="";return i+=' <a href="'+v((n=e&&e.url,
typeof n===g?n.apply(e):n))+'" download class="btn btn-primary download-btn">'+v((n=e&&e.label,typeof n===g?n.apply(e):n))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var h,f="",v=this.escapeExpression,g="function",m=this;return f+='<div class="type-'+v((h=t&&t.type,typeof h===g?h.apply(t):h))+" platform-logo platform-"+v((h=t&&t.id,typeof h===g?h.apply(t):h))+'"></div> <h2><strong>'+v((h=t&&t.name,
typeof h===g?h.apply(t):h))+"</strong> "+v(i(n(3)).call(t,"Download",{hash:{},data:o}))+"</h2> <h5>"+v(i(n(3)).call(t,"Version",{hash:{},data:o}))+" "+v((h=t&&t.version,typeof h===g?h.apply(t):h))+"</h5> <h5>"+v(i(n(1073)).call(t,t&&t.date,{hash:{},data:o}))+'</h5> <div class="more-info"> ',h=r.if.call(t,t&&t.requirements,{hash:{},inverse:m.noop,fn:m.program(1,s,o),data:o}),(h||0===h)&&(f+=h),f+=" ",h=r.if.call(t,t&&t.info,{hash:{},inverse:m.noop,fn:m.program(3,l,o),data:o}),(h||0===h)&&(f+=h),
f+=" </div> ",h=r.if.call(t,t&&t.shouldUseDropup,{hash:{},inverse:m.program(8,d,o),fn:m.program(5,c,o),data:o}),(h||0===h)&&(f+=h),f+=" "})},function(e,t,n){"use strict";var i=n(2365),r=n.n(i),a=n(5),o=n.n(a),s=n(15),l=n(135),c=n(52),u=n(213),d=n(280),p=d.a.extend({className:"alert-bar notify",template:r.a,events:o.a.extend({"click .setup-link":"onSetupClick"},d.a.prototype.events),serializeData:function(){
var e=Object(s.d)("appModel"),t=e.get("user"),n=t.get("features").get(c.i),i=n?Object(u.a)(this.options.machineIdentifier,"manage","dvr"):"#!/settings/server/"+encodeURIComponent(this.options.machineIdentifier)+"/dvr";return{model:this.model.get("model"),make:this.model.get("make"),dvrSettingsRoute:i}},disableDevice:function(){var e=Object(s.d)("appStore"),t=this.options.serverEntityID;t&&e.dispatch(Object(l.C)({serverEntityID:t,deviceID:this.model.id,enabled:!1}))},onSetupClick:function(){
this.hide(),this.disableDevice()},onCloseClick:function(e){d.a.prototype.onCloseClick.apply(this,arguments),this.disableDevice()}});t.a=p},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression
;return l+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">'+c(i(n(3)).call(t,"A new TV tuner ({tunerMake} {tunerModel}) has been found! Plex DVR is the easiest way to record your favorite shows!",{hash:{tunerModel:t&&t.model,tunerMake:t&&t.make},data:o}))+'</span> <a class="setup-link link" href="'+c((s=t&&t.dvrSettingsRoute,"function"==typeof s?s.apply(t):s))+'">'+c(i(n(3)).call(t,"Learn more",{hash:{},data:o}))+"</a> "})
},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({name:"ChannelMappingModel",context:["server"],rootPropertyName:"ChannelMapping",idAttribute:"deviceIdentifier",syncedAttrs:{deviceIdentifier:r.a.string,lineupIdentifier:r.a.string,enabled:r.a.boolean},defaults:{enabled:!1}});t.a=a},function(e,t,n){"use strict";var i=n(530),r=n(23),a=n(2368),o=r.a.extend({name:"MediaGrabberDeviceChannelCollection",context:["server"],model:a.a,comparator:function(e,t){
return Object(i.a)(e.get("identifier"),t.get("identifier"))}});t.a=o},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({name:"MediaGrabberDeviceChannelModel",rootPropertyName:"DeviceChannel",idAttribute:"key",syncedAttrs:{key:r.a.string,identifier:r.a.string,name:r.a.string,drm:r.a.boolean,hd:r.a.boolean,signalStrength:r.a.integer,signalQuality:r.a.integer},augmentResponse:function(e){return e.key=e.key||e.identifier,e}});t.a=a},function(e,t,n){"use strict"
;var i=n(23),r=n(2370),a=i.a.extend({name:"EPGChannelCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({name:"EPGChannelModel",context:["server"],rootPropertyName:"Channel",idAttribute:"identifier",syncedAttrs:{identifier:r.a.string,callSign:r.a.string,thumb:r.a.string,title:r.a.string,hd:r.a.boolean},defaults:{hd:!1}});t.a=a},function(e,t,n){"use strict"
;var i=n(18),r=n(16),a=n(2372),o=n(1075),s=n(2373),l=n(729),c=n(2374),u=n(2377),d=n(1076),p=i.a.extend({name:"EPGSettingsModel",context:["server"],sessionAttrs:{baseUrl:r.a.string,postalCode:r.a.string,isFetching:r.a.boolean,isPopulated:r.a.boolean},sessionRelations:{countries:{relationClass:a.a},languages:{relationClass:s.a},regions:{relationClass:u.a},lineupGroup:{relationClass:c.a},selectedCountry:{relationClass:o.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=p},function(e,t,n){"use strict";var i=n(23),r=n(1075),a=i.a.extend({name:"EPGCountryCollection",context:["server"],model:r.a,url:"/livetv/epg/countries"});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(729),a=i.a.extend({name:"EPGLanguageCollection",context:["server"],model:r.a,url:"/livetv/epg/languages"});t.a=a},function(e,t,n){"use strict"
;var i=n(18),r=n(16),a=n(2375),o=i.a.extend({name:"EPGLineupGroupModel",context:["server"],idAttribute:"uuid",syncedAttrs:{uuid:r.a.string},syncedRelations:{lineups:{relationClass:a.a,rootPropertyName:"Lineup"}}});t.a=o},function(e,t,n){"use strict";var i=n(23),r=n(2376),a=i.a.extend({name:"EPGCountryRegionCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({name:"EPGLineupModel",context:["server"],idAttribute:"uuid",
rootPropertyName:"Lineup",syncedAttrs:{uuid:r.a.string,type:r.a.string,title:r.a.string,lineupType:r.a.integer,location:r.a.string},defaults:{location:""}});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(1076),a=i.a.extend({name:"EPGCountryRegionCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(2379),a=i.a.extend({name:"DVRSetupErrorMessageCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({
name:"DVRSetupErrorMessageModel",sessionAttrs:{id:r.a.string,message:r.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({name:"DVRNetworkModel",sessionAttrs:{key:r.a.string,title:r.a.string}});t.a=a},function(e,t,n){"use strict";function i(e){return s.a.createElement(c.a,e,u)}var r=n(2),a=n.n(r),o=n(0),s=n.n(o),l=n(39),c=n(965),u=a()(l.a,{});t.a=i},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(4),b=n(298),I=n(24),S=n(103),M=n(111),D=n(74),C=n(112),O=n(92),j=n(26),P=n(22),w=n(102),T=n(145),E=n(224),x=n(2383),N=n(2389),A=n(2390),L=n.n(A),k=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r.onAdvancedPress=function(){r.setState({isAdvanced:!r.state.isAdvanced})},r.onFormChange=function(e){
if(e.targetLibrarySectionID&&(e.targetLibrarySectionID.value!==r.state.selectedLibrarySectionID&&r.setState({selectedLibrarySectionID:e.targetLibrarySectionID.value}),e.mode&&e.mode.value!==r.state.selectedMode)){var t=e.mode.value;r.setState({selectedMode:t}),r.props.onModeChange(t)}},r.state={selectedLibrarySectionID:n.targetLibrarySectionID,selectedMode:n.initialMode,isAdvanced:!1},r}return f()(t,e),t.prototype.componentDidUpdate=function(e,t){
(e.isMediaSubscriptionSaving&&!this.props.isMediaSubscriptionSaving&&null==this.props.mediaSubscriptionSaveError||e.isMediaSubscriptionDeleting&&!this.props.isMediaSubscriptionDeleting&&null==this.props.mediaSubscriptionDeleteError)&&this.props.onModalClose()},t.prototype.render=function(){
var e=this.props,t=e.mediaSubscriptionKey,n=e.isMediaSubscriptionSaving,i=e.mediaSubscriptionSaveError,a=e.isMediaSubscriptionDeleting,s=e.mediaSubscriptionDeleteError,c=e.prefGroups,u=e.onModalClose,d=e.onErrorDismiss,p=e.onSubmit,h=e.onDelete,f=l()(e,["mediaSubscriptionKey","isMediaSubscriptionSaving","mediaSubscriptionSaveError","isMediaSubscriptionDeleting","mediaSubscriptionDeleteError","prefGroups","onModalClose","onErrorDismiss","onSubmit","onDelete"]);return o()(T.b,{
className:this.state.isAdvanced?L.a.advancedForm:L.a.baseForm,onChange:this.onFormChange,onSubmit:p},void 0,o()(S.a,{onModalClose:u},void 0,o()(M.a,{},void 0,Object(y.default)("Record Options")),i&&o()("div",{},void 0,o()(E.a,{errorMessage:Object(b.a)(i,Object(y.default)("There was a problem saving your changes. Please try again.")),onErrorDismiss:d})),s&&o()("div",{},void 0,o()(E.a,{
errorMessage:Object(b.a)(s,Object(y.default)("There was a problem with canceling this subscription. Please try again.")),onErrorDismiss:d})),o()(D.a,{},void 0,o()("div",{className:L.a.baseSettings},"base",m.a.createElement(x.a,r()({selectedLibrarySectionID:this.state.selectedLibrarySectionID,prefs:c.basic},f))),o()("div",{className:L.a.advancedSettings},"advanced",m.a.createElement(N.a,r()({prefs:c.advanced},f)))),o()(C.a,{className:L.a.footer},void 0,o()(O.a,{},void 0,o()(P.a,{kind:I.b.PRIMARY,
onPress:this.onAdvancedPress},void 0,o()(j.a,{className:L.a.advancedIcon,name:"plex-icon-settings-560"}),this.state.isAdvanced?Object(y.default)("Show Basic"):Object(y.default)("Show Advanced"))),o()(O.a,{},void 0,o()(w.a,{isSpinning:a,kind:t?I.b.DANGER:I.b.DEFAULT,onPress:t?h:u},void 0,t?Object(y.default)("Cancel Recording"):Object(y.default)("Cancel")),o()(w.a,{type:"submit",isSpinning:n,kind:I.b.PRIMARY},void 0,t?Object(y.default)("Save"):Object(y.default)("Record"))))))},t}(g.Component)
;t.a=k},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.target,r=e.initialMode,o=e.modes,s=e.libraries,f=e.targetLibrarySectionID,v=e.targetSectionLocationID,g=e.selectedLibrarySectionID,m=e.prefs,y=m.onlyNewAirings,b="episode"===i.type||"show"===i.type||"playlist"===i.type;return a()(d.a,{serverEntityID:t,providerEntityID:n,target:i,useStaticHeight:b},void 0,a()(c.a,{flexWrap:"wrap"},void 0,a()(u.a,{flexBasis:230,maxWidth:230},void 0,o&&a()(p.a,{
labelText:Object(l.default)("Record"),name:"mode",initialValue:r,values:o,isDisabled:o.length<2})),a()(u.a,{flexBasis:230,maxWidth:230},void 0,y&&a()(p.a,{name:y.id,labelText:y.label,initialValue:y.value,values:y.enumValues.map(function(e){var t,n=e.label,i=e.value;return t={},t[i]=n,t})}))),a()(h.a,{libraries:s,targetLibrarySectionID:f,targetSectionLocationID:v,selectedLibrarySectionID:g}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(4)),c=n(1079),u=n(1080),d=n(531),p=n(1081),h=n(2388);t.a=i},function(e,t){e.exports={grid:"FlexGrid-grid-Ws_Yk"}},function(e,t,n){"use strict";function i(e){var t=e.component,n=e.isSecondary,i=s()(e,["component","isSecondary"]);return u.a.createElement(t,a()({className:n?p.a.secondaryTitle:p.a.title},i))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2386),p=n.n(d);t.a=i},function(e,t){e.exports={title:"MediaSubscriptionTitle-title-1I857",
secondaryTitle:"MediaSubscriptionTitle-secondaryTitle-1srwE"}},function(e,t){e.exports={container:"MediaSubscriptionTargetPosterTitle-container-2LmdB",left:"MediaSubscriptionTargetPosterTitle-left-3Kcsf",right:"MediaSubscriptionTargetPosterTitle-right-18jQp",subscriptionBadge:"MediaSubscriptionTargetPosterTitle-subscriptionBadge-10p6v MetadataPosterCardOverlay-badge-1FU-p",subscriptionBadgeIcon:"MediaSubscriptionTargetPosterTitle-subscriptionBadgeIcon-3Aqfc",
titleContainer:"MediaSubscriptionTargetPosterTitle-titleContainer-1Zl4x",staticHeightTitleContainer:"MediaSubscriptionTargetPosterTitle-staticHeightTitleContainer-3Pp5d MediaSubscriptionTargetPosterTitle-titleContainer-1Zl4x"}},function(e,t,n){"use strict";function i(e,t){var n=c.a.find(e,function(e){return e.librarySectionID===t});return n?n.locations.map(function(e){var t,n=e.id,i=e.path;return t={},t[n]=i,t}):[]}function r(e){var t=e[0];if(t){return t[c.a.keys(t)[0]]}}function a(e){
var t=e.libraries,n=e.targetLibrarySectionID,a=e.targetSectionLocationID,o=e.selectedLibrarySectionID,l=i(t,o);return s()(v.a,{flexWrap:"wrap"},void 0,s()(g.a,{flexBasis:230,maxWidth:230},void 0,s()(f.a,{labelText:Object(p.default)("Add to Library"),name:"targetLibrarySectionID",initialValue:n,size:h.e.SMALL,values:t.map(function(e,t){var n,i=e.title,r=e.librarySectionID;return n={},n[r]=i,n})})),s()(g.a,{flexBasis:230,maxWidth:230},void 0,l.length>1&&s()(f.a,{
labelText:Object(p.default)("Location"),name:"targetSectionLocationID",size:h.e.SMALL,initialValue:null==a?r(l):a,values:l})))}var o=n(2),s=n.n(o),l=n(5),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=(n.n(d),n(4)),h=n(24),f=n(1081),v=n(1079),g=n(1080);t.a=a},function(e,t,n){"use strict";function i(e){var t=e.prefs;return s()("div",{},void 0,t.map(function(e){var t=e.id;return u.a.createElement(d.a,a()({key:t},e))}))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(427);t.a=i
},function(e,t){e.exports={baseForm:"MediaSubscriptionForm-baseForm-2bT5U",advancedForm:"MediaSubscriptionForm-advancedForm-26WFw",advancedSettings:"MediaSubscriptionForm-advancedSettings-3dyPl",baseSettings:"MediaSubscriptionForm-baseSettings-2ssnb",footer:"MediaSubscriptionForm-footer-2U6dh ModalFooter-modalFooter-30WIB",advancedIcon:"MediaSubscriptionForm-advancedIcon-j3Yxg"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),
n(0)),h=(n.n(p),n(4)),f=n(298),v=n(24),g=n(103),m=n(111),y=n(74),b=n(112),I=n(92),S=n(102),M=n(47),D=n(224),C=n(531),O=n(2392),j=n(2398),P=n.n(j),w=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentDidUpdate=function(e,t){
(e.isMediaSubscriptionMoving&&!this.props.isMediaSubscriptionMoving&&null==this.props.mediaSubscriptionMoveError||e.isMediaSubscriptionDeleting&&!this.props.isMediaSubscriptionDeleting&&null==this.props.mediaSubscriptionDeleteError)&&this.props.onModalClose()},t.prototype.render=function(){
var e=this.props,t=e.isRecordingSchedule,n=e.isMediaSubscriptionDeleting,i=e.mediaSubscriptionDeleteError,a=e.isMediaSubscriptionMoving,o=e.mediaSubscriptionMoveError,s=e.serverEntityID,l=e.server,c=e.target,u=e.conflicts,d=e.onDelete,p=e.onMediaMove,j=e.onErrorDismiss,w=e.onModalClose,T=encodeURIComponent(l.machineIdentifier);return r()(g.a,{onModalClose:w},void 0,r()(m.a,{},void 0,Object(h.default)("Conflict Detected")),o&&r()("div",{},void 0,r()(D.a,{
errorMessage:Object(f.a)(o,Object(h.default)("There was a problem saving your changes...")),onErrorDismiss:j})),i&&r()("div",{},void 0,r()(D.a,{errorMessage:Object(f.a)(i,Object(h.default)("There was a problem canceling...")),onErrorDismiss:j})),r()(y.a,{autoScroll:!0},void 0,r()(C.a,{serverEntityID:s,target:c},void 0,r()("div",{className:P.a.message},void 0,1===u.length?Object(h.default)("Conflicts with 1 recording"):Object(h.default)("Conflicts with {conflictCount} recordings",{
conflictCount:u.length})),r()("div",{className:P.a.conflicts},void 0,u.map(function(e,t){var n=e.metadataItem;return r()(O.a,{metadataItemEntityID:n},t)})))),r()(b.a,{},void 0,r()(I.a,{},void 0,r()(S.a,{isSpinning:n,kind:v.b.DANGER,onPress:d},void 0,Object(h.default)("Cancel This")),r()(S.a,{isSpinning:a,kind:v.b.PRIMARY,onPress:p},void 0,Object(h.default)("Prefer This")),t?r()(M.a,{kind:v.b.PRIMARY,onPress:w},void 0,Object(h.default)("Close")):r()(M.a,{kind:v.b.PRIMARY,
to:"#!/server/"+T+"/schedule"},void 0,Object(h.default)("Manage")))))},t}(p.Component);w.defaultProps={conflicts:[]},t.a=w},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(Object(u.a)(),function(){return{type:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type}})}function r(e){return s.a.createElement(d.a,e)}var a=n(1),o=(n.n(a),n(0)),s=n.n(o),l=n(11),c=n(6),u=(n.n(c),n(21)),d=n(2393);t.a=Object(l.b)(i)(r)},function(e,t,n){"use strict";function i(e){
switch(e){case"movie":case"show":return[f.a];case"episode":return[v.a,g.a];case"playlist":default:return[f.a]}}function r(e){var t=(e.className,e.type),n=u()(e,["className","type"]),r=i(t);return l()("div",{className:b.a.container},void 0,r.map(function(e,t){return h.a.createElement(m.a,o()({key:t,component:e,isSecondary:t>0},n))}))}var a=n(7),o=n.n(a),s=n(2),l=n.n(s),c=n(13),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(708),v=n(2394),g=n(255),m=n(2395),y=n(2397),b=n.n(y);t.a=r},function(e,t,n){
"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){return{grandparentTitle:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).grandparentTitle}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(730);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.component,n=e.isSecondary,i=s()(e,["component","isSecondary"]);return u.a.createElement(t,a()({className:n?p.a.secondaryTitle:p.a.title},i))}
var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2396),p=n.n(d);t.a=i},function(e,t){e.exports={title:"ConflictTitle-title-1g7j7",secondaryTitle:"ConflictTitle-secondaryTitle-2kiOL"}},function(e,t){e.exports={container:"ConflictItemRow-container-x4THp"}},function(e,t){e.exports={message:"MediaSubscriptionConflict-message-1ZbxO",conflicts:"MediaSubscriptionConflict-conflicts-3hyQu"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(298),v=n(24),g=n(28),m=n(166),y=n(26),b=n(47),I=n(102),S=n(22),M=n(103),D=n(111),C=n(74),O=n(112),j=n(92),P=n(224),w=n(531),T=n(2400),E=n.n(T),x=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentDidUpdate=function(e,t){
e.isMediaSubscriptionDeleting&&!this.props.isMediaSubscriptionDeleting&&null==this.props.mediaSubscriptionDeleteError&&this.props.onModalClose()},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.mediaSubscriptionKey,i=e.target,a=e.metadataType,o=e.isMediaSubscriptionDeleting,s=e.mediaSubscriptionDeleteError,l=e.onCreatePress,c=e.onModalClose,u=e.onErrorDismiss,d=e.onDelete,p=Object(g.t)(a),T=p.typeString,x=m.a.get(T),N=x.title;return r()(M.a,{onModalClose:c
},void 0,r()(D.a,{},void 0,Object(h.default)("Record Options")),s&&r()(P.a,{errorMessage:Object(f.a)(s,Object(h.default)("There was a problem with canceling this subscription. Please try again.")),onErrorDismiss:u}),r()(C.a,{},void 0,r()(w.a,{serverEntityID:t,target:i},void 0,r()("div",{className:E.a.errorMessage},void 0,Object(h.default)("{type} Library Required",{type:N
})),r()("p",{},void 0,n?Object(h.default)("This recording cannot be scheduled because you don\u2019t yet have a library for {type}. Please create a library or cancel the recording.",{type:N}):Object(h.default)("This recording cannot be scheduled because you don\u2019t yet have a library for {type}. Please try recording again after you have created your library.",{type:N})),r()(S.a,{kind:v.b.PRIMARY,onPress:l},void 0,r()(y.a,{name:"plex-icon-add-560",className:E.a.addIcon
})," ",Object(h.default)("Create Library")))),r()(O.a,{},void 0,r()(j.a,{},void 0,n&&r()(I.a,{isSpinning:o,kind:v.b.DANGER,onPress:d},void 0,Object(h.default)("Cancel Recording")),r()(b.a,{onPress:c},void 0,Object(h.default)("Cancel")))))},t}(p.Component);t.a=x},function(e,t){e.exports={errorMessage:"MediaSubscriptionNoLibrary-errorMessage-39UUf",addIcon:"MediaSubscriptionNoLibrary-addIcon-2B_Pq"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(2402)),f=n(29),v=n(1063),g=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.tick=function(){r.setState(r.getState(r.props)),r.setTickTimeout()},r.state=r.getState(n),r}return u()(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 Object(f.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this.tickTimeout&&clearTimeout(this.tickTimeout)},t.prototype.getState=function(e){var t=e.beginsAt,n=e.endsAt;return{progress:Object(h.a)(t,n,Date.now()/1e3)}},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()(v.a,{className:e,progress:t
}):null},t}(p.Component);t.a=g},function(e,t,n){"use strict";function i(e,t,n){var i=t-e,a=n-e;return Object(r.a)(a,i)}t.a=i;var r=n(526)},function(e,t){e.exports={overlay:"EPGPosterCardOverlay-overlay-21AW0",background:"EPGPosterCardOverlay-background-nZkC7",link:"EPGPosterCardOverlay-link-hVinz",subscriptionBadge:"EPGPosterCardOverlay-subscriptionBadge-2DXam MetadataPosterCardOverlay-badge-1FU-p",subscriptionBadgeIcon:"EPGPosterCardOverlay-subscriptionBadgeIcon-2CSvd",
progress:"EPGPosterCardOverlay-progress-2KBp3 PosterCardOverlayProgress-progress-16k0B",button:"EPGPosterCardOverlay-button-1-wi- MetadataPosterCardOverlay-button-M43H-",playButton:"EPGPosterCardOverlay-playButton-2VFIk RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X RecordIcon-recordIconContainer-1PXGA EPGPosterCardOverlay-button-1-wi- MetadataPosterCardOverlay-button-M43H-",
recordButton:"EPGPosterCardOverlay-recordButton-hPelU RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X RecordIcon-recordIconContainer-1PXGA EPGPosterCardOverlay-button-1-wi- MetadataPosterCardOverlay-button-M43H-",playCoverButton:"EPGPosterCardOverlay-playCoverButton-virTg EPGPosterCardOverlay-playButton-2VFIk RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X RecordIcon-recordIconContainer-1PXGA EPGPosterCardOverlay-button-1-wi- MetadataPosterCardOverlay-button-M43H-",
playCircle:"EPGPosterCardOverlay-playCircle-3e6vz MetadataPosterCardOverlay-playCircle-M67q6 PlayButton-playCircle-3Evfd MetadataPosterCardOverlay-centerCircle-1Mg-s",recordCoverButton:"EPGPosterCardOverlay-recordCoverButton-3QBBo EPGPosterCardOverlay-recordButton-hPelU RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X RecordIcon-recordIconContainer-1PXGA EPGPosterCardOverlay-button-1-wi- MetadataPosterCardOverlay-button-M43H-",
recordCircle:"EPGPosterCardOverlay-recordCircle-fVDxD RecordIcon-recordCircle-176nl PlayButton-playCircle-3Evfd MetadataPosterCardOverlay-centerCircle-1Mg-s",recordIcon:"EPGPosterCardOverlay-recordIcon-1-ns1 RecordIcon-recordIcon-2ygXS",
recordButtonBottom:"EPGPosterCardOverlay-recordButtonBottom-18I3q EPGPosterCardOverlay-recordButton-hPelU RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X RecordIcon-recordIconContainer-1PXGA EPGPosterCardOverlay-button-1-wi- MetadataPosterCardOverlay-button-M43H-",recordCircleBottom:"EPGPosterCardOverlay-recordCircleBottom-3rJ86 EPGPosterCardOverlay-recordCircle-fVDxD RecordIcon-recordCircle-176nl PlayButton-playCircle-3Evfd MetadataPosterCardOverlay-centerCircle-1Mg-s",
recordIconBottom:"EPGPosterCardOverlay-recordIconBottom-1cF9x RecordIcon-recordIcon-2ygXS",isActionsMenuOpen:"EPGPosterCardOverlay-isActionsMenuOpen-1O_P2"}},function(e,t){e.exports={poster:"MetadataPosterCardFace-poster-L2P6r",face:"MetadataPosterCardFace-face--dz_D MetadataPosterCardFace-poster-L2P6r",isSelected:"MetadataPosterCardFace-isSelected-1XUgk",isOtherItemSelected:"MetadataPosterCardFace-isOtherItemSelected-z8NtN",faceFront:"MetadataPosterCardFace-faceFront-1bxHG",
faceBack:"MetadataPosterCardFace-faceBack-1ofDH"}},function(e,t){e.exports={cardContainer:"MetadataPosterCard-cardContainer-2gRcQ",card:"MetadataPosterCard-card-3bztR",isFlipped:"MetadataPosterCard-isFlipped-2lUII"}},function(e,t){e.exports={measure:"AudioVideoFullMusic-measure-3rspA",content:"AudioVideoFullMusic-content-7Qnq7",card:"AudioVideoFullMusic-card-3HHZD MetadataPosterCard-card-3bztR",titlesContainer:"AudioVideoFullMusic-titlesContainer-1f9NM",
title:"AudioVideoFullMusic-title-2fZRL MetadataPosterTitle-title-3tU5F",primaryTitle:"AudioVideoFullMusic-primaryTitle-sT84w AudioVideoFullMusic-title-2fZRL MetadataPosterTitle-title-3tU5F",secondaryTitle:"AudioVideoFullMusic-secondaryTitle-2tx_B AudioVideoFullMusic-title-2fZRL MetadataPosterTitle-title-3tU5F"}},function(e,t,n){"use strict";function i(e){return!(!e||!e.timed)}function r(){
return Object(b.createSelector)(Object(I.a)(),Object(S.a)(),Object(M.a)(),Object(D.a)(),C.a,function(e,t,n,i,r){var a=O.e;return{serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,metadataItemEntityID:n.entityID,playQueueItemEntityID:i.entityID,positionSeconds:e.positionSeconds,context:a,type:n.type,imageUrl:n.parentThumb||n.grandparentThumb,lyricsStreams:i.lyricsStreams,columnAdjustment:r.columnAdjustment,
hasLyricsFeature:!!i.lyricsStreams.length||t.ownerFeatures.indexOf("lyrics")>-1,hasPremiumLyrics:i.hasPremiumLyrics}})}var a=n(7),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),n(44)),S=n(656),M=n(221),D=n(119),C=n(100),O=n(31),j=n(118),P=n(2408),w={dispatchFetchPlayQueue:j.c,dispatchFetchPlayQueueItemLyrics:j.d},T=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return E.call(r),
r.state=r.getDefaultState(n),r}return f()(t,e),t.prototype.componentDidMount=function(){this._populate(),this.props.hasPremiumLyrics&&this.props.hasLyricsFeature&&this.props.dispatchFetchPlayQueue({playerType:this.props.playerType})},t.prototype.componentWillReceiveProps=function(e){this.props.lyricsStreams!==e.lyricsStreams&&this.setState(this.getDefaultState(e,this.state.selectedLyricsStreamIndex))},t.prototype.componentWillUpdate=function(e,t){
if(this.state.selectedLyricsStreamIndex!==t.selectedLyricsStreamIndex){var n=e.lyricsStreams[t.selectedLyricsStreamIndex];this.setState({isTimedLyricsActive:i(n)})}},t.prototype.componentDidUpdate=function(e,t){var n=this.props.lyricsStreams[this.state.selectedLyricsStreamIndex];this.props.hasLyricsFeature!==e.hasLyricsFeature&&this.props.dispatchFetchPlayQueue({playerType:this.props.playerType}),
!n||n.lyricsError||this.state.selectedLyricsStreamIndex===t.selectedLyricsStreamIndex&&this.props.lyricsStreams===e.lyricsStreams||this._populate()},t.prototype.getDefaultState=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.lyricsStreams.length>0?t:null;return{isTimedLyricsActive:i(e.lyricsStreams[n]),selectedLyricsStreamIndex:n}},t.prototype._populate=function(){
var e=this.props,t=e.playerType,n=e.playQueueItemEntityID,i=e.lyricsStreams,r=this.state.selectedLyricsStreamIndex;if(null!=r){var a=i[r];a&&!a.lines.length&&this.props.dispatchFetchPlayQueueItemLyrics({playerType:t,playQueueItemEntityID:n,streamID:a.id,streamKey:a.key})}},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchPlayQueue,e.dispatchFetchPlayQueueItemLyrics,
e.lyricsStreams),n=l()(e,["dispatchFetchPlayQueue","dispatchFetchPlayQueueItemLyrics","lyricsStreams"]),r=this.state,a=r.isTimedLyricsActive,s=r.selectedLyricsStreamIndex,c=t[s];return m.a.createElement(P.a,o()({lines:null!=c?c.lines:[],lyricsStreamsCount:t.length,selectedIndex:s,hasTimedLyrics:i(c),isTimedLyricsActive:a,isLyricFindProvider:!!c&&"com.plexapp.agents.lyricfind"===c.provider,hasLyricsError:!!c&&!!c.lyricsError,onPreviousPress:this.onPreviousPress,onNextPress:this.onNextPress,
onTimedLyricsPress:this.onTimedLyricsPress},n))},t}(g.Component),E=function(){var e=this;this.onPreviousPress=function(){e.setState(function(e){return{selectedLyricsStreamIndex:Math.max(0,e.selectedLyricsStreamIndex-1)}})},this.onNextPress=function(){e.setState(function(e,t){return{selectedLyricsStreamIndex:Math.min(t.lyricsStreams.length-1,e.selectedLyricsStreamIndex+1)}})},this.onTimedLyricsPress=function(){e.setState(function(e){return{isTimedLyricsActive:!e.isTimedLyricsActive}})}}
;t.a=Object(y.b)(r,w)(T)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(4),v=(n(31),n(121)),g=n(1082),m=n(26),y=n(72),b=n(80),I=n(352),S=n(39),M=n(731),D=n(297),C=n(518),O=n(709),j=n(136),P=n(183),w=n(184),T=n(96),E=n(365),x=n(1084),N=n(1085),A=n(2427),L=n.n(A),k=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.setLineRef=function(e){r.lineRef=e,r.scrollToLine()},
r.onContentMeasure=function(e){var t=e.width,n=e.height;r.setState({isMeasured:!0,pageWidth:t,pageHeight:n})},r.onScrollerMeasure=function(e){var t=e.height;t&&r.setState({isScrollerMeasured:!0,scrollerHeight:t},function(){r.scrollToLine()})},r.onScrollPositionChange=function(e){var t=e.scrollTop;r.setState({scrollTop:t})},r.state={isMeasured:!1,isScrollerMeasured:!1,pageWidth:0,pageHeight:0,scrollerHeight:0,scrollTop:0},r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){
this.props.lines!==e.lines&&this.setState({scrollTop:0})},t.prototype.scrollToLine=function(){if(this.lineRef){var e=this.state,t=e.scrollerHeight,n=e.scrollTop,i=this.lineRef.getBoundingClientRect(),r=i.height,a=this.lineRef.offsetTop,o=a+r>n+t,s=a<n;(o||s)&&this.setState({scrollTop:a})}},t.prototype.render=function(){
var e=this,t=this.props,n=t.serverEntityID,i=t.providerEntityID,a=t.metadataItemEntityID,o=t.type,s=t.subtype,l=t.context,c=t.columnAdjustment,u=t.imageUrl,d=t.positionSeconds,p=t.lines,A=t.selectedIndex,k=t.lyricsStreamsCount,_=t.hasTimedLyrics,R=t.isTimedLyricsActive,z=t.hasLyricsError,U=t.hasLyricsFeature,B=t.isLyricFindProvider,V=t.onPreviousPress,F=t.onNextPress,Q=t.onTimedLyricsPress,H=this.state,Y=H.isMeasured,W=H.isScrollerMeasured,G=H.pageWidth,K=H.scrollTop,q=Object(g.a)(G,c),Z=Object(v.d)(q,o,s,l)
;return U?r()(y.a,{className:L.a.measure,onMeasure:this.onContentMeasure},void 0,Y&&r()("div",{className:L.a.container},void 0,r()("div",{},void 0,r()(D.a,{cardClassName:L.a.card,serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,metadataKey:"music",type:o,imageWidth:q,imageHeight:Z,imageUrl:u,showLinkOnly:!0})),r()("div",{className:L.a.content},void 0,r()("div",{className:L.a.titlesContainer},void 0,r()(j.a,{},void 0,r()(C.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:a
})),r()(P.a,{},void 0,r()(T.a,{},void 0,r()(O.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:a}))),r()(w.a,{},void 0,r()(T.a,{},void 0,B&&Object(f.default)("Powered by {provider}",{provider:"LyricFind"})),r()(E.a,{},void 0,r()("span",{className:L.a.rightInfo},void 0,r()(I.a,{className:(L.a.timedLyricsButton||"")+" "+(R&&L.a.isTimedLyricsActive||""||""),"data-qa-id":"toggleTimedLyrics",icon:"plex-icon-player-lyrics-timed-560",title:Object(f.default)("Timed Lyrics"),isDisabled:!_,
onPress:Q})),r()("span",{className:L.a.rightInfo},void 0,Object(f.default)("{selectedIndex} of {lyricsStreamsCount}",{selectedIndex:A+1,lyricsStreamsCount:k})),r()("span",{className:L.a.rightInfo},void 0,r()(I.a,{icon:"plex-icon-page-prev-560","data-qa-id":"previousLyricsPage",title:Object(f.default)("Previous"),isDisabled:0===A,onPress:V})),r()("span",{className:L.a.rightInfo},void 0,r()(I.a,{icon:"plex-icon-page-next-560","data-qa-id":"nextLyricsPage",title:Object(f.default)("Next"),
isDisabled:A===k-1,onPress:F}))))),z&&r()("div",{className:L.a.innerContent},void 0,r()(M.a,{title:Object(f.default)("There was an error loading the lyrics")})),!z&&r()("div",{className:L.a.innerContent},void 0,r()(y.a,{className:L.a.measure,onMeasure:this.onScrollerMeasure},void 0,W&&r()(b.a,{className:L.a.scroller,scrollTop:K,onScrollPositionChange:this.onScrollPositionChange},void 0,p.length?p.map(function(t,n){
var i=t.spans,a=t.startOffset,o=t.endOffset,s=Math.round(a/1e3),l=Math.round(o/1e3),c=R&&d>=s&&-1!==a&&(d<l||-1===o);return h.a.createElement("div",{key:n,className:(L.a.line||"")+" "+(c&&L.a.isLineSelected||""||""),ref:c?e.setLineRef:null},i.map(function(e,t){var n=e.text;return r()("span",{},t,n)}),r()(m.a,{className:L.a.lineTimedIcon,name:"plex-icon-player-lyrics-timed-560"}))}):r()(S.a,{className:L.a.spinner}))))))):r()("div",{className:L.a.upsellContainer},void 0,r()(x.a,{
icon:"plex-icon-marketing-lyrics-560",title:Object(f.default)("Song Lyrics"),text:Object(f.default)("Still think Elton is saying \u201cHold me closer, Tony Danza\u201d? With a Plex Pass, enjoy timed lyrics (when available) to your favorite songs for the ultimate sing-along\u2026 with the right words!")}),r()(N.a,{serverEntityID:n,modalMetricsProperties:{context:"lyrics"}}))},t}(p.Component);t.a=k},function(e,t){e.exports={emptyPage:"EmptyPage-emptyPage-2AM9u",content:"EmptyPage-content-10PgB",
icon:"EmptyPage-icon-31D3Z",default:"EmptyPage-default-26GUD",primary:"EmptyPage-primary-1uNBT",success:"EmptyPage-success-zqYzQ",danger:"EmptyPage-danger-3-2M_",title:"EmptyPage-title-264Jp",description:"EmptyPage-description-oYWtW",footer:"EmptyPage-footer-2lE0T"}},function(e,t){e.exports={icon:"InnerErrorPage-icon-tWVPF ErrorPage-icon-ZJ38x EmptyPage-icon-31D3Z"}},function(e,t){e.exports={primaryTitle:"PrePlayPrimaryTitle-primaryTitle-1r9P9"}},function(e,t){e.exports={
secondaryTitle:"PrePlaySecondaryTitle-secondaryTitle-YJRGC PrePlayPrimaryTitle-primaryTitle-1r9P9"}},function(e,t){e.exports={tertiaryTitle:"PrePlayTertiaryTitle-tertiaryTitle-1Rc92"}},function(e,t){e.exports={leftTitle:"PrePlayLeftTitle-leftTitle-Ev1KG"}},function(e,t){e.exports={rightTitle:"PrePlayRightTitle-rightTitle-VxiwU"}},function(e,t){e.exports={upsell:"PlexPassUpsell-upsell-3i2JL",iconContainer:"PlexPassUpsell-iconContainer-3uKd8",icon:"PlexPassUpsell-icon-1r94u",
title:"PlexPassUpsell-title-3m6RL",text:"PlexPassUpsell-text-2hF28"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(24),v=n(213),g=n(47),m=n(532),y=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onPlexPassPress=function(){r.setState({isPlexPassModalOpen:!0})},r.onPlexPassModalClose=function(){r.setState({isPlexPassModalOpen:!1})},r.state={isPlexPassModalOpen:!1},r}
return u()(t,e),t.prototype.getButtonText=function(){var e=this.props,t=e.isSignedIn,n=e.hasPlexPass;return t?t&&n?Object(h.default)("Claim Server"):t&&!n?Object(h.default)("Get a Plex Pass"):void 0:Object(h.default)("Sign In")},t.prototype.render=function(){var e=this.props,t=e.machineIdentifier,n=e.modalMetricsProperties,i=e.isSignedIn,a=e.isClaimed,o=e.hasPlexPass,s=e.hasTypeFirstSettings;if(o&&a)return null
;var l=this.state.isPlexPassModalOpen,c=i&&!o,u=s?Object(v.a)(t,"settings","general"):"#!/settings/server/"+encodeURIComponent(t);return r()(g.a,{kind:f.b.PRIMARY,size:f.e.LARGE,to:c?void 0:u,onPress:c?this.onPlexPassPress:void 0},void 0,this.getButtonText(),c&&r()(m.a,{metricsProperties:n,isOpen:l,onModalClose:this.onPlexPassModalClose}))},t}(p.Component);t.a=y},function(e,t,n){"use strict";var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(1),u=(n.n(c),
n(0)),d=n.n(u),p=n(11),h=n(6),f=(n.n(h),n(19)),v=n(200),g=n(440),m=n(2420),y=Object(h.createSelector)(v.a,function(e){var t=e.desktop;return{isSignedIn:e.isSignedIn,plans:t.plans,isPlansPending:t.isPlansPending,isPlansPopulated:t.isPlansPopulated,plansError:t.plansError,subscribeUrl:f.join(["https://plex.tv","subscription/new"]),infoUrl:f.join(["https://plex.tv","subscription/about"]),giftUrl:f.join(["https://plex.tv","gifts"])}}),b=function(e){function t(){return r()(this,t),
o()(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 d.a.createElement(m.a,this.props)},t}(u.Component);t.a=Object(p.b)(function(e){return y(e)},{fetchPlans:g.d})(b)},function(e,t,n){"use strict";function i(e,t){
var n=e.server,i=n.getXHROptions(a.a.result(e,"url"),{method:"POST",dataType:"json",data:c.a.stringify({urls:t},{arrayFormat:"brackets"})||"urls="});return Object(u.a)(s.a.ajax(i),400).then(function(t){e.reset(t)},function(e){return s.a.Deferred().reject(e.status&&e.responseJSON.errors||[]).promise()})}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(590),c=n.n(l),u=n(439);t.a=i},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(4),m=n(19),y=n(73),b=n(24),I=n(29),S=n(493),M=n(39),D=n(22),C=n(47),O=n(103),j=n(111),P=n(74),w=n(112),T=n(1087),E=n(1088),x=n.n(E),N=n(2422),A=n.n(N),L=n(2423),k=n.n(L),_=n(1089),R=n.n(_),z=n(2424),U=n.n(z),B=n(2425),V=n.n(B),F=n(2426),Q=n.n(F),H=o()(M.a,{}),Y=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return Object(I.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.metricsProperties,n=e.subscribeUrl,i=e.infoUrl,a=e.giftUrl,s=e.plans,l=e.isPlansPending,c=e.isPlansPopulated,u=e.plansError,d=e.onModalClose;return o()(O.a,{onModalClose:d},void 0,o()(j.a,{className:Q.a.header},void 0,o()("div",{className:Q.a.plexPassTitle
},void 0,Object(g.default)("Plex Pass")),Object(g.default)("Enhance your Plex experience with exclusive premium features")),o()(P.a,{innerClassName:Q.a.body},void 0,o()(T.a,{img:x.a,title:Object(g.default)("Mobile Sync"),description:Object(g.default)("Enjoy your media offline on Android, iOS, and Windows devices")}),o()(T.a,{img:A.a,title:Object(g.default)("Live TV & DVR"),description:Object(g.default)("Connect a tuner and antenna to access free OTA broadcasts")}),o()(T.a,{img:k.a,
title:Object(g.default)("Trailers & Extras"),description:Object(g.default)("See movie trailers, cast interviews, and other bonus features")}),o()(T.a,{img:R.a,title:Object(g.default)("Camera Upload"),description:Object(g.default)("Sync photos from your mobile devices to Plex Media Server")}),o()(T.a,{img:U.a,title:Object(g.default)("Automagic phototagging"),description:Object(g.default)("Auto-tag your photos to easily classify and find photos in libraries of any size")}),o()(T.a,{img:V.a,
title:Object(g.default)("Gracenote Music Magic"),description:Object(g.default)("Song identification, album reviews, artist bios, and Plex Mix playlists")}),o()("div",{className:Q.a.moreFeatures},void 0,o()(D.a,{className:Q.a.link,to:i,target:"_blank"},void 0,Object(g.default)("...plus more exclusive features!")))),o()(w.a,{className:Q.a.footer},void 0,l&&o()("div",{className:Q.a.spinnerContainer},void 0,H),o()("div",{className:(Q.a.plansContainer||"")+" "+(l&&Q.a.isPlansPending||""||"")
},void 0,!l&&c&&s.map(function(e){return v.a.createElement(S.a,r()({key:e.id},t,{action:y.X,plan:e.id}),o()(C.a,{className:Q.a.planButton,to:m.join(n,{plan:e.id,continue:window.location.href}),target:"_blank",kind:b.b.PRIMARY,size:b.e.LARGE},void 0,e.formattedPrice," \u2014 ",e.name))}),!l&&u&&v.a.createElement(S.a,r()({},t,{action:y.X,plan:"unknown"}),o()(C.a,{className:Q.a.planButton,to:n,target:"_blank",kind:b.b.PRIMARY,size:b.e.LARGE
},void 0,Object(g.default)("Subscribe")))),o()("div",{},void 0,Object(g.default)("Subscribe today"),o()("span",{className:Q.a.linkSeparator},void 0,"\u2014"),v.a.createElement(S.a,r()({},t,{action:y.y}),o()(D.a,{className:Q.a.link,to:a,target:"_blank"},void 0,Object(g.default)("or give Plex Pass as a gift!"))))))},t}(f.Component);t.a=Y},function(e,t){e.exports={feature:"PlexPassFeature-feature-227Do",featurePadding:"PlexPassFeature-featurePadding-3qxKL",
featureImage:"PlexPassFeature-featureImage-1MQuZ",featureContainer:"PlexPassFeature-featureContainer-5yGpR",featureTitle:"PlexPassFeature-featureTitle-cBOf4",featureDescription:"PlexPassFeature-featureDescription-2mgxr"}},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8ZyBmaWxsPSIjQ0M3QjE5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzIDQpIj4KICAgIDxwYXRoIGQ9Ik0yNSwxNiBDMjAuNTg4LDE2IDE3LDE5LjU4OCAxNywyNCBDMTcsMjguNDEyIDIwLjU4OCwzMiAyNSwzMiBDMjkuNDEyLDMyIDMzLDI4LjQxMiAzMywyNCBDMzMsMTkuNTg4IDI5LjQxMiwxNiAyNSwxNiBaIE0yNSwzMC42NjcgQzIxLjMyNCwzMC42NjcgMTguMzMzLDI3LjY3NiAxOC4zMzMsMjQgQzE4LjMzMywyMC4zMjQgMjEuMzI0LDE3LjMzMyAyNSwxNy4zMzMgQzI4LjY3NiwxNy4zMzMgMzEuNjY3LDIwLjMyNCAzMS42NjcsMjQgQzMxLjY2NywyNy42NzYgMjguNjc2LDMwLjY2NyAyNSwzMC42NjcgWiIvPgogICAgPHBhdGggZD0iTTI1LDIwIEMyMi43OTUsMjAgMjEsMjEuNzk1IDIxLDI0IEMyMSwyNi4yMDUgMjIuNzk1LDI4IDI1LDI4IEMyNy4yMDUsMjggMjksMjYuMjA1IDI5LDI0IEMyOSwyMS43OTUgMjcuMjA1LDIwIDI1LDIwIFogTTI1LDI2LjY2NyBDMjMuNTI5LDI2LjY2NyAyMi4zMzMsMjUuNDcxIDIyLjMzMywyNCBDMjIuMzMzLDIyLjUyOSAyMy41MjksMjEuMzMzIDI1LDIxLjMzMyBDMjYuNDcxLDIxLjMzMyAyNy42NjcsMjIuNTI5IDI3LjY2NywyNCBDMjcuNjY3LDI1LjQ3MSAyNi40NzEsMjYuNjY3IDI1LDI2LjY2NyBaIi8+CiAgICA8cGF0aCBkPSJNMzIuMzMzIDkuMzMzTDEuNjY2IDkuMzMzQzEuMjk4IDkuMzMzLjk5OSA5LjYzMi45OTkgMTBMLjk5OSAyNi44MDFDLjk5OSAyOC4xOTcgMi4xNTggMjkuMzMzIDMuNTgzIDI5LjMzM0wxNC4zMzIgMjkuMzMzIDE0LjMzMiAyOCAzLjU4MyAyOEMyLjg5MiAyOCAyLjMzMiAyNy40NjMgMi4zMzIgMjYuODAxTDIuMzMyIDEwLjY2NiAzMS42NjUgMTAuNjY2IDMxLjY2NSAxNS45OTMgMzIuOTk4IDE1Ljk5MyAzMi45OTggMTBDMzIuOTk4IDkuNjMyIDMyLjY5OSA5LjMzMyAzMi4zMzEgOS4zMzNMMzIuMzMzIDkuMzMzek0zMSAwTDMgMEMxLjg5NyAwIDEgLjg5NyAxIDIuMDAxTDEgNy4zMzNDMSA3LjcwMSAxLjI5OSA4IDEuNjY3IDhMMzIuMzM0IDhDMzIuNzAyIDggMzMuMDAxIDcuNzAxIDMzLjAwMSA3LjMzM0wzMy4wMDEgMi4wMDFDMzMuMDAxLjg5NyAzMi4xMDQgNC40NDA4OTIxZS0xNiAzMS4wMDEgNC40NDA4OTIxZS0xNkwzMSAwek0zMS42MiAxLjc3MkwyNi43MjUgNi42NjcgMjMuMjc3IDYuNjY3IDI4LjYxIDEuMzM0IDMwLjk5OSAxLjMzNEMzMS4yODYgMS4zMzQgMzEuNTI2IDEuNTE4IDMxLjYxOSAxLjc3M0wzMS42MiAxLjc3MnpNMTIuNjExIDEuMzMzTDE2LjA1OSAxLjMzMyAxMC43MjYgNi42NjYgNy4yNzggNi42NjYgMTIuNjExIDEuMzMzek01LjM5MiA2LjY2N0wyLjYxMSA2LjY2NyA3Ljk0NCAxLjMzNCAxMC43MjUgMS4zMzQgNS4zOTIgNi42Njd6TTE3Ljk0NCAxLjMzM0wyMS4zOTIgMS4zMzMgMTYuMDU5IDYuNjY2IDEyLjYxMSA2LjY2NiAxNy45NDQgMS4zMzN6TTIzLjI3NyAxLjMzM0wyNi43MjUgMS4zMzMgMjEuMzkyIDYuNjY2IDE3Ljk0NCA2LjY2NiAyMy4yNzcgMS4zMzN6TTMgMS4zMzNMNi4wNTkgMS4zMzMgMi4zMzQgNS4wNTggMi4zMzQgMi4wMDFDMi4zMzQgMS42MzMgMi42MzMgMS4zMzMgMy4wMDEgMS4zMzNMMyAxLjMzM3pNMjguNjExIDYuNjY3TDMxLjY2NyAzLjYxMSAzMS42NjcgNi42NjcgMjguNjExIDYuNjY3eiIvPgogIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8ZyBmaWxsPSIjQ0M3QjE5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzIDQpIj4KICAgIDxwYXRoIGQ9Ik0yNSwxNiBDMjAuNTg4LDE2IDE3LDE5LjU4OCAxNywyNCBDMTcsMjguNDEyIDIwLjU4OCwzMiAyNSwzMiBDMjkuNDEyLDMyIDMzLDI4LjQxMiAzMywyNCBDMzMsMTkuNTg4IDI5LjQxMiwxNiAyNSwxNiBaIE0yNSwzMC42NjcgQzIxLjMyNCwzMC42NjcgMTguMzMzLDI3LjY3NiAxOC4zMzMsMjQgQzE4LjMzMywyMC4zMjQgMjEuMzI0LDE3LjMzMyAyNSwxNy4zMzMgQzI4LjY3NiwxNy4zMzMgMzEuNjY3LDIwLjMyNCAzMS42NjcsMjQgQzMxLjY2NywyNy42NzYgMjguNjc2LDMwLjY2NyAyNSwzMC42NjcgWiIvPgogICAgPHBhdGggZD0iTTI5LjM2NCwyMy40MTYgTDIzLjMyMywyMC4wODMgQzIzLjExNiwxOS45NyAyMi44NjQsMTkuOTc0IDIyLjY2MiwyMC4wOTIgQzIyLjQ1OCwyMC4yMTIgMjIuMzM0LDIwLjQzMSAyMi4zMzQsMjAuNjY3IEwyMi4zMzQsMjcuMzU1IEMyMi4zMzQsMjcuNTkxIDIyLjQ1OSwyNy44MSAyMi42NjMsMjcuOTMgQzIyLjc2NywyNy45OTEgMjIuODg0LDI4LjAyMiAyMywyOC4wMjIgQzIzLjExMSwyOC4wMjIgMjMuMjIzLDI3Ljk5NCAyMy4zMjQsMjcuOTM4IEwyOS4zNjUsMjQuNTgzIEMyOS41NzcsMjQuNDY2IDI5LjcwOSwyNC4yNDIgMjkuNzA4LDIzLjk5OSBDMjkuNzA4LDIzLjc1NiAyOS41NzYsMjMuNTM0IDI5LjM2NCwyMy40MTYgWiBNMjMuNjY3LDI2LjIyMSBMMjMuNjY3LDIxLjc5NiBMMjcuNjY2LDI0LjAwMyBMMjMuNjY3LDI2LjIyMiBMMjMuNjY3LDI2LjIyMSBaIi8+CiAgICA8cGF0aCBkPSJNMzIuMzMzIDkuMzMzTDEuNjY2IDkuMzMzQzEuMjk4IDkuMzMzLjk5OSA5LjYzMi45OTkgMTBMLjk5OSAyNi44MDFDLjk5OSAyOC4xOTcgMi4xNTggMjkuMzMzIDMuNTgzIDI5LjMzM0wxNC4zMzIgMjkuMzMzIDE0LjMzMiAyOCAzLjU4MyAyOEMyLjg5MiAyOCAyLjMzMiAyNy40NjMgMi4zMzIgMjYuODAxTDIuMzMyIDEwLjY2NiAzMS42NjUgMTAuNjY2IDMxLjY2NSAxNS45OTMgMzIuOTk4IDE1Ljk5MyAzMi45OTggMTBDMzIuOTk4IDkuNjMyIDMyLjY5OSA5LjMzMyAzMi4zMzEgOS4zMzNMMzIuMzMzIDkuMzMzek0zMSAwTDMgMEMxLjg5NyAwIDEgLjg5NyAxIDIuMDAxTDEgNy4zMzNDMSA3LjcwMSAxLjI5OSA4IDEuNjY3IDhMMzIuMzM0IDhDMzIuNzAyIDggMzMuMDAxIDcuNzAxIDMzLjAwMSA3LjMzM0wzMy4wMDEgMi4wMDFDMzMuMDAxLjg5NyAzMi4xMDQgNC40NDA4OTIxZS0xNiAzMS4wMDEgNC40NDA4OTIxZS0xNkwzMSAwek0zMS42MiAxLjc3MkwyNi43MjUgNi42NjcgMjMuMjc3IDYuNjY3IDI4LjYxIDEuMzM0IDMwLjk5OSAxLjMzNEMzMS4yODYgMS4zMzQgMzEuNTI2IDEuNTE4IDMxLjYxOSAxLjc3M0wzMS42MiAxLjc3MnpNMTIuNjExIDEuMzMzTDE2LjA1OSAxLjMzMyAxMC43MjYgNi42NjYgNy4yNzggNi42NjYgMTIuNjExIDEuMzMzek01LjM5MiA2LjY2N0wyLjYxMSA2LjY2NyA3Ljk0NCAxLjMzNCAxMC43MjUgMS4zMzQgNS4zOTIgNi42Njd6TTE3Ljk0NCAxLjMzM0wyMS4zOTIgMS4zMzMgMTYuMDU5IDYuNjY2IDEyLjYxMSA2LjY2NiAxNy45NDQgMS4zMzN6TTIzLjI3NyAxLjMzM0wyNi43MjUgMS4zMzMgMjEuMzkyIDYuNjY2IDE3Ljk0NCA2LjY2NiAyMy4yNzcgMS4zMzN6TTMgMS4zMzNMNi4wNTkgMS4zMzMgMi4zMzQgNS4wNTggMi4zMzQgMi4wMDFDMi4zMzQgMS42MzMgMi42MzMgMS4zMzMgMy4wMDEgMS4zMzNMMyAxLjMzM3pNMjguNjExIDYuNjY3TDMxLjY2NyAzLjYxMSAzMS42NjcgNi42NjcgMjguNjExIDYuNjY3eiIvPgogIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8cGF0aCBmaWxsPSIjQ0M3QjE5IiBkPSJNMjYuNjY3LDguNjY3IEwyNi42NjcsMC42NjcgQzI2LjY2NywwLjI5OSAyNi4zNjgsMCAyNiwwIEwxNy42NTYsMCBDMTcuNDc5LDAgMTcuMzA5LDAuMDcxIDE3LjE4NCwwLjE5NSBMMC44NjEsMTYuNTI4IEMwLjYwMSwxNi43ODggMC42MDEsMTcuMjExIDAuODYxLDE3LjQ3MSBMOS4xOTQsMjUuODA0IEM5LjMxOSwyNS45MjkgOS40ODksMjYgOS42NjYsMjYgQzkuODA5LDI2LjAzNyAxMC4wMTcsMjUuOTI3IDEwLjE0MiwyNS44IEwyNi40NzUsOS4xMzMgQzI2LjU5Niw5LjAwOSAyNi42NjYsOC44NDEgMjYuNjY2LDguNjY2IEwyNi42NjcsOC42NjcgWiBNMjUuMzMzLDguMzk1IEw5LjY2MSwyNC4zODYgTDIuMjc2LDE3LjAwMSBMMTcuOTMyLDEuMzM0IEwyNS4zMzMsMS4zMzQgTDI1LjMzMyw4LjM5NSBaIE0yMS4zMzMsOCBDMjIuODA0LDggMjQsNi44MDQgMjQsNS4zMzMgQzI0LDMuODYyIDIyLjgwNCwyLjY2NiAyMS4zMzMsMi42NjYgQzE5Ljg2MiwyLjY2NiAxOC42NjYsMy44NjIgMTguNjY2LDUuMzMzIEMxOC42NjYsNi44MDQgMTkuODYyLDggMjEuMzMzLDggWiBNMjEuMzMzLDQgQzIyLjA2OSw0IDIyLjY2Niw0LjU5NyAyMi42NjYsNS4zMzMgQzIyLjY2Niw2LjA2OSAyMi4wNjksNi42NjYgMjEuMzMzLDYuNjY2IEMyMC41OTcsNi42NjYgMjAsNi4wNjkgMjAsNS4zMzMgQzIwLDQuNTk3IDIwLjU5Nyw0IDIxLjMzMyw0IFogTTI0LjY2NywxNy4zMzMgQzI4LjcwOSwxNy4zMzMgMzIsMjAuNjI0IDMyLDI0LjY2NiBDMzIsMjguNzA4IDI4LjcwOSwzMS45OTkgMjQuNjY3LDMxLjk5OSBDMjAuNjI1LDMxLjk5OSAxNy4zMzQsMjguNzA4IDE3LjMzNCwyNC42NjYgQzE3LjMzNCwyMC42MjQgMjAuNjI0LDE3LjMzMyAyNC42NjcsMTcuMzMzIFogTTI0LjY2NywzMC42NjcgQzI3Ljk3NSwzMC42NjcgMzAuNjY3LDI3Ljk3NSAzMC42NjcsMjQuNjY3IEMzMC42NjcsMjEuMzU5IDI3Ljk3NSwxOC42NjcgMjQuNjY3LDE4LjY2NyBDMjEuMzU5LDE4LjY2NyAxOC42NjcsMjEuMzU5IDE4LjY2NywyNC42NjcgQzE4LjY2NywyNy45NzUgMjEuMzU5LDMwLjY2NyAyNC42NjcsMzAuNjY3IFogTTI3LjUyOSwyMi4xOTMgTDI3LjUyOCwyMi4xOTMgQzI3Ljc5MiwyMS45MzIgMjguMjEyLDIxLjkzOSAyOC40NzIsMjIuMTk2IEMyOC43MzEsMjIuNDU3IDI4LjcyOCwyMi44OCAyOC40NjgsMjMuMTQgTDI0LjQzNSwyNy4xNCBDMjQuMzA5LDI3LjI2NCAyNC4xNCwyNy4zMzMgMjMuOTY0LDI3LjMzMyBDMjMuNzc0LDI3LjMxMyAyMy42MTYsMjcuMjYyIDIzLjQ4OSwyNy4xMzQgTDIwLjg1NiwyNC40NjIgQzIwLjU5OSwyNC4yIDIwLjYwMSwyMy43NzggMjAuODY0LDIzLjUxOSBDMjEuMTI0LDIzLjI2MyAyMS41NSwyMy4yNjMgMjEuODA3LDIzLjUyNyBMMjMuOTcsMjUuNzIyIEwyNy41MjksMjIuMTkzIFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMgNCkiLz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8ZyBmaWxsPSIjQ0M3QjE5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0IDQpIj4KICAgIDxwYXRoIGQ9Ik0xMi41MzIgMTUuMjcyQzExLjIzMiAxNi41NzIgMTEuMjMyIDE4LjY4OCAxMi41MzIgMTkuOTg3IDEzLjE2MyAyMC42MTYgMTMuOTk5IDIwLjk2MiAxNC44ODkgMjAuOTYyIDE1Ljc3OSAyMC45NjIgMTYuNjE2IDIwLjYxNSAxNy4yNDYgMTkuOTg3IDE4LjU0NiAxOC42ODcgMTguNTQ2IDE2LjU3MSAxNy4yNDYgMTUuMjcyIDE1Ljk4NSAxNC4wMTUgMTMuNzkzIDE0LjAxNSAxMi41MzEgMTUuMjcyTDEyLjUzMiAxNS4yNzJ6TTE2LjMwNCAxOS4wNDRDMTUuNTQ5IDE5Ljc5OSAxNC4yMzEgMTkuNzk5IDEzLjQ3NiAxOS4wNDQgMTIuNjk2IDE4LjI2NCAxMi42OTYgMTYuOTk1IDEzLjQ3NiAxNi4yMTUgMTMuODUzIDE1LjgzOCAxNC4zNTYgMTUuNjMxIDE0Ljg5MSAxNS42MzEgMTUuNDI2IDE1LjYzMSAxNS45MjcgMTUuODM4IDE2LjMwNiAxNi4yMTUgMTcuMDgzIDE2Ljk5NSAxNy4wODMgMTguMjY0IDE2LjMwNSAxOS4wNDRMMTYuMzA0IDE5LjA0NHpNNS45MzIgMjIuODE1QzUuNjcyIDIyLjU1NSA1LjI0OSAyMi41NTUgNC45ODkgMjIuODE1IDQuNzI5IDIzLjA3NSA0LjcyOSAyMy40OTggNC45ODkgMjMuNzU4TDguNzYgMjcuNTI5QzguODkxIDI3LjY2IDkuMDYxIDI3LjcyNCA5LjIzMiAyNy43MjQgOS40MDMgMjcuNzI0IDkuNTczIDI3LjY1OSA5LjcwNCAyNy41MjkgOS45NjQgMjcuMjY5IDkuOTY0IDI2Ljg0NiA5LjcwNCAyNi41ODZMNS45MzIgMjIuODE1eiIvPgogICAgPHBhdGggZD0iTTMxLjQ2MSw1LjMzMyBMMzIuMzIyLDQuNDcyIEMzMi41ODIsNC4yMTIgMzIuNTgyLDMuNzg5IDMyLjMyMiwzLjUyOSBMMjguOTg5LDAuMTk2IEMyOC43MjksLTAuMDY0IDI4LjMwNiwtMC4wNjQgMjguMDQ2LDAuMTk2IEwyNy4xODUsMS4wNTcgTDI2LjMyNCwwLjE5NiBDMjYuMDY0LC0wLjA2NCAyNS42NDEsLTAuMDY0IDI1LjM4MSwwLjE5NiBDMjUuMTIxLDAuNDU2IDI1LjEyMSwwLjg3OSAyNS4zODEsMS4xMzkgTDI2LjI0MiwyIEwyNS4xODUsMy4wNTcgTDI0LjMyNCwyLjE5NiBDMjQuMDY0LDEuOTM2IDIzLjY0MSwxLjkzNiAyMy4zODEsMi4xOTYgQzIzLjEyMSwyLjQ1NiAyMy4xMjEsMi44NzkgMjMuMzgxLDMuMTM5IEwyNC4yNDIsNCBMMjIuNzE0LDUuNTI4IEMyMi40NTQsNS43ODggMjIuNDU0LDYuMjExIDIyLjcxNCw2LjQ3MSBMMjIuOTA5LDYuNjY3IEwxOC40MjgsMTEuMTQ4IEMxNy4zMDQsMTAuNDc1IDE2LjA4OCwxMC4xMjEgMTQuODgsMTAuMTIxIEMxMi4xMDUsMTAuMTIxIDkuOTAzLDExLjkxMiA5LjMwNywxNC41NTQgQzUuNjk0LDE0LjAxIDIuODAyLDE1LjQ5MyAxLjU3NiwxOC40NDkgQzAuMjUzLDIxLjY0MiAxLjI0NywyNS42NjkgNC4wNDgsMjguNDcgQzUuOTg1LDMwLjQwNyA4LjU0LDMxLjUxOCAxMS4wNTcsMzEuNTE4IEMxMy4zMjUsMzEuNTE4IDE1LjM1NCwzMC42MTcgMTYuNjI1LDI5LjA0NiBDMTcuNSwyNy45NjMgMTguNDAyLDI2LjA5NSAxNy45NjIsMjMuMjA5IEMxOS43MTgsMjIuODA4IDIxLjE1NSwyMS42NjggMjEuODgzLDIwLjA2NCBDMjIuNzIsMTguMjE5IDIyLjUyMywxNi4wMjMgMjEuMzcsMTQuMDkyIEwyNS44NTEsOS42MTEgTDI2LjA0Niw5LjgwNiBDMjYuMzA2LDEwLjA2NiAyNi43MjksMTAuMDY2IDI2Ljk4OSw5LjgwNiBMMjguNTE3LDguMjc4IEwyOS4zNzgsOS4xMzkgQzI5LjUxLDkuMjY4IDI5LjY4MSw5LjMzNCAyOS44NTEsOS4zMzQgQzMwLjAyMSw5LjMzNCAzMC4xOTIsOS4yNjkgMzAuMzIzLDkuMTM5IEMzMC41ODMsOC44NzkgMzAuNTgzLDguNDU2IDMwLjMyMyw4LjE5NiBMMjkuNDYsNy4zMzMgTDMwLjUxNyw2LjI3NiBMMzEuMzc4LDcuMTM3IEMzMS41MDksNy4yNjggMzEuNjc5LDcuMzMzIDMxLjg1LDcuMzMzIEMzMi4wMjEsNy4zMzMgMzIuMTkxLDcuMjY4IDMyLjMyMiw3LjEzOCBDMzIuNTgyLDYuODc4IDMyLjU4Miw2LjQ1NSAzMi4zMjIsNi4xOTUgTDMxLjQ1OSw1LjMzMiBMMzEuNDYxLDUuMzMzIFogTTI2LjUxOSw4LjM5MSBMMjYuMzI0LDguMTk2IEMyNi4wNjQsNy45MzYgMjUuNjQxLDcuOTM2IDI1LjM4MSw4LjE5NiBMMjAuMDQ4LDEzLjUyOSBDMTkuODIsMTMuNzU3IDE5Ljc4OCwxNC4xMTYgMTkuOTcyLDE0LjM4MSBDMjEuMTE5LDE2LjAyOSAyMS4zOCwxNy45NDkgMjAuNjY5LDE5LjUxNCBDMjAuMDMzLDIwLjkxNyAxOC43MzYsMjEuODIzIDE3LjExLDIyLjAwNSBDMTYuOTIzLDIyLjAyNiAxNi43NTMsMjIuMTI1IDE2LjY0MywyMi4yNzggQzE2LjUzMiwyMi40MyAxNi40OTIsMjIuNjIzIDE2LjUzMiwyMi44MDYgQzE3LjAwMSwyNC45OTQgMTYuNjczLDI2Ljg2MiAxNS41ODcsMjguMjA5IEMxNC41NzEsMjkuNDY2IDEyLjkyLDMwLjE4NiAxMS4wNTYsMzAuMTg2IEM4Ljg4OSwzMC4xODYgNi42NzcsMjkuMjE3IDQuOTg5LDI3LjUyOSBDMi41NjUsMjUuMTA1IDEuNjg4LDIxLjY2MiAyLjgwNiwxOC45NjEgQzMuNjQ1LDE2LjkzNiA1LjQ4MiwxNS43NzYgNy44NDYsMTUuNzc2IEM4LjQzNSwxNS43NzYgOS4wNjMsMTUuODQ3IDkuNzEsMTUuOTg1IEM5Ljg5NCwxNi4wMiAxMC4wODcsMTUuOTg1IDEwLjIzOSwxNS44NzMgQzEwLjM5MSwxNS43NjQgMTAuNDkxLDE1LjU5NCAxMC41MTIsMTUuNDA2IEMxMC43NzEsMTMuMDgxIDEyLjU2NSwxMS40NTUgMTQuODc3LDExLjQ1NSBDMTUuOTgyLDExLjQ1NSAxNy4xMDgsMTEuODMyIDE4LjEzNCwxMi41NDYgQzE4LjM5OCwxMi43MzEgMTguNzU3LDEyLjY5OCAxOC45ODYsMTIuNDcgTDI0LjMxOSw3LjEzNyBDMjQuNTc5LDYuODc3IDI0LjU3OSw2LjQ1NCAyNC4zMTksNi4xOTQgTDI0LjEyNCw1Ljk5OSBMMjguNTE1LDEuNjA4IEwzMC45MDYsMy45OTkgTDI2LjUxNSw4LjM5IEwyNi41MTksOC4zOTEgWiIvPgogIDwvZz4KPC9zdmc+Cg=="
},function(e,t){e.exports={plexPassTitle:"PlexPassModalContent-plexPassTitle-3B6zq",header:"PlexPassModalContent-header-2D-A9 ModalHeader-modalHeader-1Kf9R",body:"PlexPassModalContent-body-3BSt2 ModalBody-innerModalBody-36gmb",moreFeatures:"PlexPassModalContent-moreFeatures-2qv0-",footer:"PlexPassModalContent-footer-15_IJ ModalFooter-modalFooter-30WIB",planButton:"PlexPassModalContent-planButton-3JY2b",link:"PlexPassModalContent-link-3Xt-y",
linkSeparator:"PlexPassModalContent-linkSeparator-2yiHh",spinnerContainer:"PlexPassModalContent-spinnerContainer-ytMIf",plansContainer:"PlexPassModalContent-plansContainer-2boTW",isPlansPending:"PlexPassModalContent-isPlansPending-SjJBD"}},function(e,t){e.exports={measure:"AudioVideoLyrics-measure-2SF_6",container:"AudioVideoLyrics-container-3d-0q",card:"AudioVideoLyrics-card-1ul6P MetadataPosterCard-card-3bztR",content:"AudioVideoLyrics-content-5An40",
titlesContainer:"AudioVideoLyrics-titlesContainer-3I1RV",rightInfo:"AudioVideoLyrics-rightInfo-x_GGf",scroller:"AudioVideoLyrics-scroller-3hrpl Scroller-vertical-VScFL",spinner:"AudioVideoLyrics-spinner-1K46l Spinner-spinner-Niere spin-spin-2kLwt",upsellContainer:"AudioVideoLyrics-upsellContainer-2K0Q7",innerContent:"AudioVideoLyrics-innerContent-19sRo",line:"AudioVideoLyrics-line-2CYDi",lineTimedIcon:"AudioVideoLyrics-lineTimedIcon-GOFkG",isLineSelected:"AudioVideoLyrics-isLineSelected-2kgwV",
timedLyricsButton:"AudioVideoLyrics-timedLyricsButton-13NoS IconButton-button-9An-7",isTimedLyricsActive:"AudioVideoLyrics-isTimedLyricsActive-3bWfB"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),Object(s.a)(),Object(s.a)(1),function(e,t,n){return n?{serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,metadataItemEntityID:n.metadataItem,hubEntityIDs:t.postPlay}:{}})}var r=n(11),a=n(6),o=(n.n(a),
n(44)),s=n(119),l=n(2429),c=Object(r.b)(i)(l.a);t.a=c},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.hubEntityIDs,o=e.playerType;return a()("div",{className:f.a.container},void 0,a()("div",{className:f.a.poster},void 0,a()(p.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,playerType:o})),a()(l.a,{className:f.a.details,smoothScroll:!1,autoScroll:!0},void 0,a()(d.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i,showStreams:!1}),a()(u.a,{},void 0,r&&r.length>0&&a()(c.a,{serverEntityID:t,providerEntityID:n,hubEntityIDs:r,columnAdjustment:1}))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(80)),c=n(733),u=n(107),d=n(2456),p=n(2487),h=n(2493),f=n.n(h);t.a=i},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.b;switch(e){case"home.continue":return r.a;case"home.newscast":return r.d;default:return t}}t.a=i;var r=n(31)
},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(170)),a=Object(i.createSelector)(r.a,function(e){return e.metadataLists});t.a=a},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";function i(){function e(){var e=void 0;return i.length?e=i.shift():(e=n+s,s++),e}function t(e){delete r[e]}var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=[],r={},o={},s=0;return{getKeys:function(n,s,l){
var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=arguments[4];a.a.each(r,function(e,t){var r=e.item;if(null===r)i.push(t);else{var d=a.a.isString(r)?r:r[u],p=l.indexOf(r)+c;(p<n||p>s)&&(i.push(t),delete o[d])}});for(var d=n;d<=s;d++){var p=l[d-c]||null,h=p&&(a.a.isString(p)?p:p[u]),f=p&&o[h];f||(f=e(),p&&(o[h]=f)),r[f]={index:d,item:p}}return i.forEach(t),i.length=0,a.a.extend({},r)}}}t.a=i;var r=n(5),a=n.n(r)},function(e,t){e.exports={
scroller:"VirtualListScroller-scroller-37EU_"}},function(e,t){e.exports={hubCellHeader:"HubCellHeader-hubCellHeader-2pvYN"}},function(e,t){e.exports={hubCellTitle:"HubCellTitle-hubCellTitle-2abIn"}},function(e,t){e.exports={hubCell:"HubCell-hubCell-3Ys17",hubHeader:"HubCell-hubHeader-l3HPI",hubActions:"HubCell-hubActions-28w1-",hubScrollButton:"HubCell-hubScrollButton-2Y7ri",hubScroller:"HubCell-hubScroller-2qgkr VirtualListScroller-scroller-37EU_ Scroller-horizontal-cOKsq"}},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,o=e.searchResultEntityID,l=e.containerKey,u=(e.cellIndex,
e.cellX),d=e.cellY,v=e.cellWidth,I=e.cellHeight,M=e.showScrollPlaceholder,D=e.showOffscreenPlaceholder,C=e.listType,O=e.listContext,j=e.titleComponents,P=e.isFeaturedHub,w=e.metadataKey,T=e.type,E=e.subtype,x=e.selectionType,N=e.activeSelectionType,A=e.isSelected,L=e.imageWidth,k=e.imageHeight,_=e.imageUrl,R=e.onSelectItem,z=e.onDeselectItem,U=c()(e,["className","serverEntityID","providerEntityID","metadataItemEntityID","searchResultEntityID","containerKey","cellIndex","cellX","cellY","cellWidth","cellHeight","showScrollPlaceholder","showOffscreenPlaceholder","listType","listContext","titleComponents","isFeaturedHub","metadataKey","type","subtype","selectionType","activeSelectionType","isSelected","imageWidth","imageHeight","imageUrl","onSelectItem","onDeselectItem"]),B=!w,V=B||M,F=Object(f.a)(j,C,T,E,O),Q=P?F.slice(0,2):[],H=P?F.slice(2):F
;return s()(g.a,{className:t,cellX:u,cellY:d,cellWidth:v,cellHeight:I},void 0,V?s()(y.a,{imageWidth:L,imageHeight:k,activeSelectionType:N,isSelected:A}):p.a.createElement(m.a,a()({serverEntityID:n,providerEntityID:i,metadataItemEntityID:r,containerKey:l,listType:C,listContext:O,metadataKey:w,type:T,imageWidth:L,imageHeight:k,imageUrl:_,selectionType:x,activeSelectionType:N,isSelected:A,isOffscreen:D,onSelectItem:R,onDeselectItem:z},U)),s()("div",{"data-qa-id":"metadataTitleContainer",
className:P?S.a.continueWatchingTitleContainer:S.a.titleContainer},void 0,B&&Object(h.default)("Loading..."),!B&&!!Q.length&&s()("div",{className:S.a.splitTitleContainer},void 0,Q.map(function(t,a){return s()(b.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:r,searchResultEntityID:o,containerKey:l,metricsContext:e.metricsContext,component:t,isSecondary:a>0,isDoubleLine:t.isDoubleLine,isSplitLine:!0},a)})),!B&&H.map(function(t,a){return t?s()(b.a,{serverEntityID:n,providerEntityID:i,
metadataItemEntityID:r,searchResultEntityID:o,containerKey:l,metricsContext:e.metricsContext,component:t,isSecondary:Q.length+a>0,isDoubleLine:t.isDoubleLine},a):null})))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(4),f=(n(31),n(174)),v=n(124),g=n(93),m=n(297),y=n(542),b=n(257),I=n(2441),S=n.n(I);t.a=Object(v.a)(i)},function(e,t){e.exports={cell:"virtualized-cell-3KPHx",isMoving:"virtualized-isMoving-a-wk0"}},function(e,t){e.exports={
placeholder:"MetadataPosterCardPlaceholder-placeholder-pMf-q MetadataPosterCardFace-poster-L2P6r",isSelected:"MetadataPosterCardPlaceholder-isSelected-34TSl MetadataPosterCardFace-isSelected-1XUgk",isOtherItemSelected:"MetadataPosterCardPlaceholder-isOtherItemSelected-3sjrF MetadataPosterCardFace-isOtherItemSelected-z8NtN"}},function(e,t){e.exports={titleContainer:"MetadataPosterCell-titleContainer-24DI6",continueWatchingTitleContainer:"MetadataPosterCell-continueWatchingTitleContainer-3yCAY",
splitTitleContainer:"MetadataPosterCell-splitTitleContainer-RAVdF"}},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.metadataItemEntityIDs,o=e.containerKey,l=e.listType,c=e.listSubtype,g=e.listContext,m=e.style,y=e.columnAdjustment,b=e.populatedRange,I=(e.hubLink,
s()(e,["serverEntityID","providerEntityID","metadataListEntityID","metadataItemEntityIDs","containerKey","listType","listSubtype","listContext","style","columnAdjustment","populatedRange","hubLink"])),S=void 0;return S=m===d.a?h.a:Object(p.a)(l,c,g,y,1),u.a.createElement(v.a,a()({},I,{containerKey:o,listType:l,listContext:g,keyPropName:"metadataDirectoryEntityID",items:r,itemsOffset:b.start,layout:S,cellRenderer:Object(f.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,
containerKey:o,hubStyle:m})}))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(1097),p=(n(441),n(31),n(533)),h=n(2443),f=n(1098),v=n(535);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(534),o=n(45),s=n.n(o),l=n(734),c=parseInt(s.a.listButtonHeight,10),u=Object(a.c)({direction:a.a,rows:1,overscan:4,innerHorizontalPadding:30,innerVerticalPadding:30,outerPaddingTop:10,outerPaddingRight:5,outerPaddingBottom:5,outerPaddingLeft:5,getCellWidth:function(e){
return Object(l.a)(r()({},e,{minCellWidth:250,minColumns:2,maxColumns:8,columnAdjustment:0,aspectRatio:6.25}))},getCellHeight:function(e){return c}});t.a=u},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),Object(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return{directoryKey:e.key,directoryType:e.type,title:e.title,route:t}})}var r=n(6),a=(n.n(r),n(57)),o=n(736),s=n(1099),l=n(2446)
;t.a=Object(a.a)(i)(l.a)},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(170)),a=Object(i.createSelector)(r.a,function(e){return e.metadataDirectories});t.a=a},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.cellX,i=e.cellY,r=e.cellWidth,o=e.cellHeight,s=e.title,l=e.route;return a()(c.a,{className:t,cellX:n,cellY:i,cellWidth:r,cellHeight:o},void 0,a()(d.a,{className:h.a.button,kind:u.b.DARK,size:u.e.LARGE,to:l},void 0,s))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(124)),c=n(93),u=n(24),d=n(47),p=n(2447),h=n.n(p);t.a=Object(l.a)(i)},function(e,t){e.exports={button:"MetadataDirectoryButtonCell-button-29C3x Button-button-2kT68 Link-link-2n0yJ"}},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.listContext},function(e,t){return t.cellWidth},Object(o.a)(),Object(s.a)(),l.a,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],r=arguments[4];return{
directoryKey:n.key,directoryType:n.type,title:n.title,thumb:n.thumb,icon:n.icon,imageWidth:t,imageHeight:Object(c.d)(t,n.type,n.subtype,e),route:i,isOtherItemSelected:!!r.activeSelectionType}})}var r=n(6),a=(n.n(r),n(57)),o=n(736),s=n(1099),l=n(88),c=n(121),u=n(2449);t.a=Object(a.a)(i)(u.a)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.serverEntityID,i=e.providerEntityID,r=e.cellX,o=e.cellY,s=e.cellWidth,c=e.cellHeight,h=e.imageWidth,v=e.imageHeight,g=e.showScrollPlaceholder,m=e.showOffscreenPlaceholder,y=e.directoryKey,b=e.title,I=e.thumb,S=e.icon,M=e.route,D=e.isOtherItemSelected,C=e.onMouseEnter,O=!y,j=O||g;return a()(u.a,{className:t,cellX:r,cellY:o,cellWidth:s,cellHeight:c},void 0,j?a()("div",{className:(f.a.placeholder||"")+" "+(D&&f.a.isOtherItemSelected||""||""),style:{width:h,height:v}
}):a()(p.a,{serverEntityID:n,providerEntityID:i,directoryKey:y,route:M,imageWidth:h,imageHeight:v,imageUrl:I,icon:S,title:b,isOtherItemSelected:D,isOffscreen:m,onMouseEnter:C}),a()("div",{className:f.a.titleContainer},void 0,O&&Object(l.default)("Loading..."),!O&&(S||I)&&a()(d.a,{className:f.a.title,title:b,to:M},void 0,b)))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(124),u=n(93),d=n(22),p=n(2450),h=n(2452),f=n.n(h);t.a=Object(c.a)(i)},function(e,t,n){"use strict"
;function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.directoryKey,r=e.route,o=e.imageWidth,s=e.imageHeight,c=e.imageUrl,u=e.icon,v=e.title,y=e.isOffscreen,b=e.isOtherItemSelected,I=e.onMouseEnter;return a()("div",{className:g.a.cardContainer,"data-qa-id":"directoryPosterCard--"+i},i,a()("div",{className:g.a.card,style:{width:o,height:s}},void 0,a()("div",{className:(g.a.face||"")+" "+(b&&g.a.faceIsOtherItemSelected||""||"")},void 0,!y&&c&&a()(h.a,{serverEntityID:t,providerEntityID:n,
url:c,width:o,height:s}),!y&&u&&a()("div",{className:g.a.iconContainer},void 0,a()(h.a,{serverEntityID:t,providerEntityID:n,url:u,width:o-m,height:s-m,backgroundSize:"contain"})),!y&&!c&&!u&&v&&a()("div",{className:g.a.titleContainer},void 0,a()("div",{className:g.a.titleItem},void 0,v)),a()("div",{className:(g.a.overlay||"")+" "+(b&&g.a.overlayIsOtherItemSelected||""||""),onMouseEnter:I},void 0,a()("div",{className:g.a.overlayBackground}),a()(p.a,{className:g.a.overlayLink,to:r}),b&&a()(f.a,{
className:g.a.overlaySelectCoverButton,component:p.a,tooltip:Object(l.default)("A different type is selected"),tooltipAttachment:d.f.TOP_CENTER,showOnFocus:!1,hideOnPress:!1})))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(45),u=n.n(c),d=n(24),p=n(22),h=n(723),f=n(355),v=n(2451),g=n.n(v),m=2*parseInt(u.a.posterIconPadding,10);t.a=i},function(e,t){e.exports={cardContainer:"MetadataDirectoryPosterCard-cardContainer-ZkpfR MetadataPosterCard-cardContainer-2gRcQ",
card:"MetadataDirectoryPosterCard-card-3Hffo MetadataPosterCard-card-3bztR",face:"MetadataDirectoryPosterCard-face-1a7ld MetadataPosterCardFace-face--dz_D MetadataPosterCardFace-poster-L2P6r",faceIsOtherItemSelected:"MetadataDirectoryPosterCard-faceIsOtherItemSelected-2DzNT MetadataPosterCardFace-isOtherItemSelected-z8NtN",overlay:"MetadataDirectoryPosterCard-overlay-1W6Fj MetadataPosterCardOverlay-overlay-1uMpL",
overlayIsOtherItemSelected:"MetadataDirectoryPosterCard-overlayIsOtherItemSelected-2vCMi MetadataPosterCardOverlay-isOtherItemSelected-jneUT MetadataPosterCardOverlay-isConflictingTypeSelected-E8CIx",overlayBackground:"MetadataDirectoryPosterCard-overlayBackground-23yvv MetadataPosterCardOverlay-background-2EwyB",overlayLink:"MetadataDirectoryPosterCard-overlayLink-3Lb0W MetadataPosterCardOverlay-link-1Swhl",
overlaySelectCoverButton:"MetadataDirectoryPosterCard-overlaySelectCoverButton-31KJl MetadataPosterCardOverlay-selectCoverButton-ukQUf MetadataPosterCardOverlay-coverButton-2Dm9P",iconContainer:"MetadataDirectoryPosterCard-iconContainer-2qCCQ",titleContainer:"MetadataDirectoryPosterCard-titleContainer-waqIG",titleItem:"MetadataDirectoryPosterCard-titleItem-3i-cu"}},function(e,t){e.exports={title:"MetadataDirectoryPosterCell-title-3smW- MetadataPosterTitle-title-3tU5F",
titleContainer:"MetadataDirectoryPosterCell-titleContainer-2B6MF MetadataPosterCell-titleContainer-24DI6",placeholder:"MetadataDirectoryPosterCell-placeholder-1qJ1M MetadataPosterCardFace-poster-L2P6r",isOtherItemSelected:"MetadataDirectoryPosterCell-isOtherItemSelected-vxSuB MetadataPosterCardFace-isOtherItemSelected-z8NtN"}},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(S.a,function(e){return{provider:e}})}
var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(31)),I=n(692),S=n(37),M=(n(87),n(2454)),D=n(1090),C=n(335),O={dispatchPopulateProvider:C.d},j=function(e){function t(){return c()(this,t),d()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidMount=function(){this.props.provider.isPopulated||this._populateProvider()},t.prototype.componentDidUpdate=function(e){
this.props.providerEntityID===e.providerEntityID||this.props.provider.isPopulated||this._populateProvider()},t.prototype._populateProvider=function(){this.props.dispatchPopulateProvider({providerEntityID:this.props.providerEntityID,options:{merge:!0}})},t.prototype.render=function(){var e=this.props,t=(e.dispatchPopulateProvider,e.provider),n=s()(e,["dispatchPopulateProvider","provider"]);return t.isPopulated?g.a.createElement(D.a,a()({},n,{hubContext:b.b})):null},t}(v.Component)
;t.a=Object(M.a)(Object(m.b)(i,O)(j),I.a)},function(e,t,n){"use strict";function i(e,t){function n(){return Object(a.createSelector)(t(),function(e){var t=e.source;return Object(s.a)(t)||{}})}var i=Object(r.b)(n)(e);return i.displayName="OverrideEntityIDsWithSource("+Object(o.a)(e)+")",i}var r=n(11),a=n(6),o=(n.n(a),n(33),n(153)),s=n(1100);t.a=i},function(e,t){e.exports={innerContent:"PrePlayMetadataInnerContent-innerContent-1BPzw"}},function(e,t,n){"use strict";function i(){
return Object(d.createSelector)(Object(p.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:e.type,title:e.title,year:e.year,summary:e.summary}})}function r(e){var t=v[e.type];return c.a.createElement(t,e)}var a=n(50),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(6),p=(n.n(d),n(21)),h=n(1101),f=n(1107),v={episode:h.a,movie:f.a,clip:f.a};o()(v);t.a=Object(u.b)(i)(r)},function(e,t){e.exports={divider:"PrePlayDivider-divider-1qvbj"}},function(e,t,n){
"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={isPartialMediaGrab:!1,mediaGrabError:null},n=e.Media;if(!n||!n.length)return t;for(var i=0;i<n.length;i++){var r=n[i],a=r.mediaGrabPartialRecording,o=r.mediaGrabError;a&&(t.isPartialMediaGrab=!0),o&&(t.mediaGrabError=r.mediaGrabError)}return t})}t.a=i;var r=n(6),a=(n.n(r),n(21))},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(function(e){return e.ui.prePlayPage},Object(a.a)(),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.isFileUnavailable)return!0;var n=t.Media;if(!n||!n.length)return!1;for(var i=0,r=n.length;i<r;i++){var a=n[i],o=a.Part;if(o&&o.length)for(var s=0,l=o.length;s<l;s++){var c=o[s];if(!1===c.exists||!1===c.accessible)return!0}}return!1})}t.a=i;var r=n(6),a=(n.n(r),n(21))},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.duration,o=e.saved,s=e.viewCount,d=e.viewOffset,y=e.isFileUnavailable,b=e.isPartialMediaGrab,I=e.mediaGrabError,S=e.onGetInfoPress,M=!s&&!d,D=!!d,C=!!r||M||D;return a()(p.a,{},void 0,C&&a()(h.a,{},void 0,a()(c.a,{duration:r}),!!r&&(M||D)&&m,(null==o&&M||null!=o&&o&&M)&&Object(l.default)("Unplayed"),D&&a()(u.a,{duration:r,viewOffset:d})),a()(f.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),y&&a()(g.a,{
onPress:S}),!y&&(b||!!I)&&a()(v.a,{mediaGrabError:I,onPress:S}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(520),u=n(714),d=n(2461),p=n(96),h=n(1102),f=n(543),v=n(2466),g=n(2468),m=a()(d.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.separator;return a()("span",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2462)),c=n.n(l);i.defaultProps={className:c.a.separator,separator:"\xb7"},t.a=i},function(e,t){e.exports={
separator:"PrePlayDashSeparator-separator-1d01z"}},function(e,t){e.exports={tertiaryTitleSpacer:"PrePlayTertiaryTitleSpacer-tertiaryTitleSpacer-14zhL"}},function(e,t,n){"use strict";function i(e){var t=e.server,n=e.provider,i=e.librarySectionKey,r=e.contentRating;if(!r)return null;var o={filters:"contentRating="+encodeURIComponent(r),filterLabel:r};return a()(u.a,{to:Object(c.a)(t,n,i,o)},void 0,Object(l.a)(r))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(721)),c=(n(95),n(87),
n(122)),u=n(738);t.a=i},function(e,t){e.exports={statusButton:"PrePlayStatusButton-statusButton-28XJ7 Button-default--yDCH"}},function(e,t,n){"use strict";function i(e){var t=e.mediaGrabError,n=e.onPress;return t?a()(c.a,{className:d.a.failedButton,title:t,onPress:n},void 0,Object(l.default)("Failed Recording")):a()(c.a,{className:d.a.partialButton,onPress:n},void 0,Object(l.default)("Partial Recording"))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(738),u=n(2467),d=n.n(u)
;t.a=i},function(e,t){e.exports={partialButton:"PrePlayRecordingStatusButton-partialButton-1aQ0t PrePlayStatusButton-statusButton-28XJ7 Button-default--yDCH",failedButton:"PrePlayRecordingStatusButton-failedButton-ap5JD PrePlayStatusButton-statusButton-28XJ7 Button-default--yDCH"}},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.onPress;return a()(c.a,{className:t,onPress:n},void 0,Object(l.default)("Unavailable"))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(4)),c=n(738),u=n(2469),d=n.n(u);i.defaultProps={className:d.a.unavailableButton},t.a=i},function(e,t){e.exports={unavailableButton:"PrePlayUnavailableButton-unavailableButton-3dycr PrePlayStatusButton-statusButton-28XJ7 Button-default--yDCH"}},function(e,t){e.exports={ratingRightTitle:"PrePlayRatingRightTitle-ratingRightTitle-1d4Yy PrePlayRightTitle-rightTitle-VxiwU",starRating:"PrePlayRatingRightTitle-starRating-31XbA",criticRating:"PrePlayRatingRightTitle-criticRating-2J_tn"}
},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.server,i=e.provider,r=e.librarySectionKey,o=e.type,s=e.Director,p=e.Writer,h=e.studio;return t||s.length||p.length||h?a()(u.a,{},void 0,t,!!s.length&&a()(d.a,{label:Object(l.default)("Directed by")},void 0,a()(c.a,{server:n,provider:i,librarySectionKey:r,fallbackFilterKey:"director",type:o,tags:s})),!!p.length&&a()(d.a,{label:Object(l.default)("Written by")},void 0,a()(c.a,{server:n,provider:i,librarySectionKey:r,
fallbackFilterKey:"writer",type:o,tags:p})),!!h&&a()(d.a,{label:Object(l.default)("Studio")},void 0,a()(c.a,{server:n,provider:i,librarySectionKey:r,type:o,tags:[{filter:"studio="+encodeURIComponent(h),tag:h}]}))):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=(n(95),n(87),n(739)),u=n(740),d=n(544);i.defaultProps={Director:[],Writer:[]},t.a=i},function(e,t){e.exports={tagsListLink:"PrePlayTagList-tagsListLink-Z6lfX Link-link-2n0yJ"}},function(e,t){e.exports={
group:"PrePlayDetailsGroup-group-3i0Tj"}},function(e,t){e.exports={groupItem:"PrePlayDetailsGroupItem-groupItem-3Tut9",label:"PrePlayDetailsGroupItem-label-2Ee43",content:"PrePlayDetailsGroupItem-content-1aRNU"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(4)),f=n(129),v=n(243),g=n(663),m=n(950),y=n(54),b=n(24),I=n(291),S=n(2476),M=n(741),D=n(742),C=n(2477),O=n(2480),j=n(740),P=n(544),w=n(2481),T=n.n(w),E=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onAudioStreamMenuButtonPress=function(e){r.setState({isAudioStreamMenuOpen:!r.state.isAudioStreamMenuOpen})},r.onAudioStreamMenuClose=function(){r.setState({isAudioStreamMenuOpen:!1})},r.onSubtitlesStreamMenuButtonPress=function(e){r.setState({
isSubtitlesStreamMenuOpen:!r.state.isSubtitlesStreamMenuOpen})},r.onSubtitlesStreamMenuClose=function(){r.setState({isSubtitlesStreamMenuOpen:!1})},r.state={isAudioStreamMenuOpen:!1,isSubtitlesStreamMenuOpen:!1},r._audioStreamMenuButtonID=Object(y.a)(),r._subtitlesStreamMenuButtonID=Object(y.a)(),r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.mediaItem,n=e.onAudioStreamSelect,i=e.onSubtitlesStreamSelect,a=this.state,o=a.isAudioStreamMenuOpen,s=a.isSubtitlesStreamMenuOpen
;if(!t)return r()(j.a,{},void 0,r()(P.a,{label:Object(h.default)("Video")},void 0,r()("span",{className:T.a.loadingMessage},void 0,Object(h.default)("Loading..."))),r()(P.a,{label:Object(h.default)("Audio")},void 0,r()("span",{className:T.a.loadingMessage},void 0,Object(h.default)("Loading..."))),r()(P.a,{label:Object(h.default)("Subtitles")},void 0,r()("span",{className:T.a.loadingMessage},void 0,Object(h.default)("Loading..."))));var l=f.a.get("audio").id,c=Object(v.a)(t,{streamType:l
}),u=Object(g.a)(t),d=f.a.get("subtitles").id,p=Object(v.a)(t,{streamType:d}),y=Object(m.a)(t);return r()(j.a,{},void 0,r()(P.a,{label:Object(h.default)("Video")},void 0,r()(S.a,{mediaItem:t})),r()(P.a,{label:Object(h.default)("Audio")},void 0,c.length>1?r()(I.a,{id:this._audioStreamMenuButtonID,direction:o?b.a.UP:b.a.DOWN,onPress:this.onAudioStreamMenuButtonPress},void 0,r()(M.a,{audioStream:u})):r()(M.a,{audioStream:u})),r()(P.a,{label:Object(h.default)("Subtitles")
},void 0,p.length>1?r()(I.a,{id:this._subtitlesStreamMenuButtonID,direction:s?b.a.UP:b.a.DOWN,onPress:this.onSubtitlesStreamMenuButtonPress},void 0,r()(D.a,{subtitlesStream:y})):r()(D.a,{subtitlesStream:y})),r()(C.a,{target:this._audioStreamMenuButtonID,isOpen:o,audioStreams:c,onMenuClose:this.onAudioStreamMenuClose,onStreamSelect:n}),r()(O.a,{target:this._subtitlesStreamMenuButtonID,isOpen:s,subtitlesStreams:p,onMenuClose:this.onSubtitlesStreamMenuClose,onStreamSelect:i}))},t}(p.Component)
;t.a=E},function(e,t,n){"use strict";function i(e){var t=e.mediaItem;if(!t)return a()("span",{},void 0,Object(l.default)("None"));var n=[];t.videoCodec&&n.push(Object(c.a)(t.videoCodec));var i=Object(d.a)(t),r=i?i.scanType:null;return a()("span",{"data-qa-id":"videoStream"},void 0,Object(u.default)(t.videoResolution,r)||Object(l.default)("Unknown"),!!n.length&&h,n.join(" "))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(405),u=n(331),d=n(393),p=n(86),h=a()(p.a,{});t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.target,n=e.isOpen,i=e.audioStreams,r=e.onMenuClose,o=e.onStreamSelect;return a()(u.a,{target:t,isOpen:n,size:l.e.LARGE,onMenuClose:r},void 0,i.map(function(e){return a()(d.a,{stream:e,onMenuClose:r,onStreamSelect:o},e.id,a()(c.a,{audioStream:e}))}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(24)),c=n(741),u=n(75),d=n(1105);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.children,n=e.className,i=e.iconComponent,r=e.isSelected,o=e.selectedIconName,l=e.selectedIconAriaLabel,u=c()(e,["children","className","iconComponent","isSelected","selectedIconName","selectedIconAriaLabel"]);return p.a.createElement(h.a,a()({className:(n||"")+" "+(r&&v.a.isSelected||""||"")},u),s()("div",{className:v.a.menuItemContainer},void 0,s()("div",{className:v.a.menuLabel},void 0,t),r&&s()("div",{className:v.a.selectedIcon},void 0,s()(i,{name:o,"aria-label":l}))))}
var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(156),f=n(2479),v=n.n(f);i.defaultProps={selectedIconName:"plex-icon-selected-560"},t.a=i},function(e,t){e.exports={menuItemContainer:"SelectedMenuItem-menuItemContainer-2hXIr",menuLabel:"SelectedMenuItem-menuLabel-2fp2l",selectedIcon:"SelectedMenuItem-selectedIcon-20Yx1",isSelected:"SelectedMenuItem-isSelected-178xe"}},function(e,t,n){"use strict";function i(e){
var t=e.target,n=e.isOpen,i=e.subtitlesStreams,r=e.onMenuClose,o=e.onStreamSelect;return a()(u.a,{target:t,isOpen:n,size:l.e.LARGE,onMenuClose:r},void 0,i.map(function(e){return a()(d.a,{stream:e,onMenuClose:r,onStreamSelect:o},e.id,a()(c.a,{subtitlesStream:e}))}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(24)),c=n(742),u=n(75),d=n(1105);t.a=i},function(e,t){e.exports={loadingMessage:"PrePlayDetailsStreamsGroup-loadingMessage-27_nd"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(4),v=n(24),g=n(29),m=n(72),y=n(291),b=n(2483),I=n.n(b),S=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onLineHeightRef=function(e){e&&r.setState({lineHeight:e.clientHeight})},r.onMeasure=function(e){var t=e.height;r.setState({expandedHeight:t})},r.onTogglePress=function(){r.setState({isCollapsed:!r.state.isCollapsed,allowTransition:!0})},r.state={
isCollapsed:!0,allowTransition:!1,lineHeight:0,expandedHeight:0},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(g.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.dangerouslySetInnerHTML,i=e.children,a=e.maxLines,o=this.state,s=o.isCollapsed,l=o.allowTransition,c=o.expandedHeight,u=o.lineHeight,d=u*a,p=c>d,g={overflow:"hidden",maxHeight:s?d:c};return r()("div",{className:t},void 0,!u&&h.a.createElement("div",{
className:I.a.lineHeightMeasure,ref:this.onLineHeightRef}),r()("div",{className:l&&I.a.contentTransition,style:g},void 0,r()(m.a,{ignoreWidth:!0,ignorePosition:!0,onMeasure:this.onMeasure},void 0,n?r()("div",{dangerouslySetInnerHTML:n}):i)),p&&r()(y.a,{className:I.a.readMore,arrowClassName:I.a.readMoreArrow,direction:s?v.a.DOWN:v.a.UP,isSelected:!1,onPress:this.onTogglePress},void 0,s?Object(f.default)("Read More"):Object(f.default)("Read Less")))},t}(p.Component);S.defaultProps={maxLines:3},
t.a=S},function(e,t){e.exports={lineHeightMeasure:"CollapsibleText-lineHeightMeasure-1waS-",contentTransition:"CollapsibleText-contentTransition-15VYv",readMore:"CollapsibleText-readMore-1bRJm DisclosureArrowButton-disclosureArrowButton-11LSb",readMoreArrow:"CollapsibleText-readMoreArrow-34BdB DisclosureArrowButton-disclosureArrow-1Gz1v DisclosureArrow-disclosureArrow-1KPaB"}},function(e,t){e.exports={summary:"PrePlaySummary-summary-1NL8g"}},function(e,t,n){"use strict";function i(e){
var t=e.originallyAvailableAt;return a()(h.a,{},void 0,!!t&&Object(u.default)("{monthName} {day}, {year}",{monthName:Object(p.a)(c()(t).unix()),day:Object(d.default)(t,"D"),year:Object(d.default)(t,"YYYY")}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(41)),c=n.n(l),u=n(4),d=n(254),p=n(716),h=n(365);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,n=e.provider,i=e.librarySectionKey,r=e.Genre,o=!(!r||!r.length);return a()(c.a,{},void 0,o&&a()(l.a,{server:t,provider:n,
librarySectionKey:i,Genre:r}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(95),n(87),n(743)),c=n(365);t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(s.a)(),Object(l.a)(),c.a,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];return{type:t.type,posterUrl:t.thumb,autoPlayEnabled:n.autoPlay}})}function r(e,t){var n=t.playerType;return{onToggleAutoPlay:function(){e(Object(u.c)({playerType:n}))},
onPlay:function(){e(Object(d.k)({playerType:n}))}}}var a=n(11),o=n(6),s=(n.n(o),n(44)),l=n(21),c=n(100),u=n(706),d=n(131),p=n(2488);t.a=Object(a.b)(i,r)(p.a)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(72),v=n(31),g=n(121),m=n(1108),y=n(173),b=n(260),I=n(290),S=n(256),M=n(45),D=(n.n(M),
n(2492)),C=n.n(D),O=parseInt(M.postPlayPosterWidth,10),j=parseInt(M.postPlayTitleHeight,10)+parseInt(M.postPlayAutoPlayHeight,10),P=10,w=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onContentMeasure=function(e){var t=e.height,n=Math.min(Object(g.d)(O,r.props.type,r.props.subtype,v.h),t-j),i=Object(g.e)(n,r.props.type,r.props.subtype,v.h);r.setState({isMeasured:!0,width:i,height:n})},r.onCountdown=function(){var e=r.state.secondsLeft-1
;e<=0?r.props.onPlay():r.setState({secondsLeft:e})},r.state={isMeasured:!1,width:0,height:0,secondsLeft:P},r}return u()(t,e),t.prototype.componentDidMount=function(){this.props.autoPlayEnabled&&(this._tickIntervalID=setInterval(this.onCountdown,1e3))},t.prototype.componentWillReceiveProps=function(e){this.props.autoPlayEnabled&&!e.autoPlayEnabled&&(clearInterval(this._tickIntervalID),this.setState({secondsLeft:P})),
!this.props.autoPlayEnabled&&e.autoPlayEnabled&&(this._tickIntervalID=setInterval(this.onCountdown,1e3))},t.prototype.componentWillUnmount=function(){clearInterval(this._tickIntervalID)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.type,a=e.posterUrl,o=e.autoPlayEnabled,s=e.onToggleAutoPlay,l=e.onPlay,c=this.state,u=c.isMeasured,d=c.width,p=c.height,v=c.secondsLeft,g=P-v+1,M=g/P*100;return r()(f.a,{className:C.a.container,
onMeasure:this.onContentMeasure},void 0,r()("div",{className:C.a.title},void 0,Object(h.default)("Playing Next")),u&&r()("div",{className:C.a.poster,style:{width:d,height:p}},void 0,r()(S.a,{serverEntityID:t,providerEntityID:n,type:i,width:d,height:p,url:a}),o&&r()("div",{className:C.a.progress},void 0,r()(b.a,{size:d/4,lineWidth:3,progress:M,showProgressText:!1,easing:m.a}),r()("span",{className:C.a.timeLeft},void 0,v)),r()(y.a,{className:C.a.playButton,circleClassName:C.a.playCircle,
"aria-label":Object(h.default)("Play Next"),onPress:l})),r()(I.a,{className:o?C.a.autoPlayOn:C.a.autoPlayOff,name:"autoPlayCheck",value:o,checkboxText:o?Object(h.default)("Auto Play On"):Object(h.default)("Auto Play Off"),onChange:s}))},t}(p.Component);t.a=w},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(495)),f=n.n(h),v=n(2490),g=n.n(v),m=function(e){function t(n,i){o()(this,t)
;var r=l()(this,e.call(this,n,i));return r.onProgressToUpdate=function(){r.setState({progress:r._progressPosition.progress})},r.onProgressToComplete=function(){r._progressToTween=null},r.state={progress:0},r}return u()(t,e),t.prototype.componentDidMount=function(){this._progressTo(this.props)},t.prototype.componentDidUpdate=function(e){e.progress!==this.props.progress&&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:this.props.easing,onUpdate:this.onProgressToUpdate,onComplete:this.onProgressToComplete};this._progressPosition={progress:this.state.progress},this._cancelProgressTo(),this._progressToTween=f.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.state.progress,t=this.props,n=t.className,i=t.containerClassName,a=t.backgroundClassName,o=t.textClassName,s=t.size,l=t.lineWidth,c=t.strokeColor,u=t.progressText,d=void 0===u?Math.round(e)+"%":u,p=t.showProgressText,h=s/2,f=h-l,v=Math.PI*(2*f),g=s+"px",m=s-3*l+"px",y=(100-e)/100*v;return r()("div",{className:i,style:{width:g,height:g,lineHeight:g}},void 0,r()("svg",{className:n,version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:s,height:s},void 0,r()("circle",{fill:"transparent",
r:f,cx:h,cy:h,strokeDasharray:v,style:{strokeWidth:l,stroke:c,strokeDashoffset:y}})),r()("div",{className:a,style:{width:m,height:m}}),p&&r()("div",{className:o},void 0,d))},t}(p.Component);m.defaultProps={className:g.a.circularProgressBar,containerClassName:g.a.circularProgressBarContainer,backgroundClassName:g.a.circularProgressBarBackground,textClassName:g.a.circularProgressBarText,size:60,lineWidth:5,showProgressText:!0,smoothProgressDuration:1e3},t.a=m},function(e,t){e.exports={
circularProgressBarContainer:"CircularProgressBar-circularProgressBarContainer-26EO1",absoluteCenterCircularProgressBarContainer:"CircularProgressBar-absoluteCenterCircularProgressBarContainer--zr4W",circularProgressBar:"CircularProgressBar-circularProgressBar-3gv7m",circularProgressBarBackground:"CircularProgressBar-circularProgressBarBackground-RvD8O",circularProgressBarText:"CircularProgressBar-circularProgressBarText-gC1Z-"}},function(e,t){e.exports={
circularProgressBarText:"CircularProgressBar-circularProgressBarText-1kr2I CircularProgressBar-circularProgressBarText-gC1Z-",circularProgressBarBackground:"CircularProgressBar-circularProgressBarBackground-1a1VU CircularProgressBar-circularProgressBarBackground-RvD8O"}},function(e,t){e.exports={container:"AudioVideoUpNext-container-1Hyiy",title:"AudioVideoUpNext-title-2RflZ",poster:"AudioVideoUpNext-poster-362Qo",progress:"AudioVideoUpNext-progress-3dmBn",
playButton:"AudioVideoUpNext-playButton-3X0Mb PlayButton-playButton-3WX8X",playCircle:"AudioVideoUpNext-playCircle-RTuur PlayButton-playCircle-3Evfd",timeLeft:"AudioVideoUpNext-timeLeft--rCIM",autoPlay:"AudioVideoUpNext-autoPlay-2s2lS",autoPlayOn:"AudioVideoUpNext-autoPlayOn-2tSBY AudioVideoUpNext-autoPlay-2s2lS",autoPlayOff:"AudioVideoUpNext-autoPlayOff-3tmvp AudioVideoUpNext-autoPlay-2s2lS"}},function(e,t){e.exports={container:"AudioVideoPostPlay-container-1G36_",
poster:"AudioVideoPostPlay-poster-1YcVF",details:"AudioVideoPostPlay-details-2CzQu"}},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(function(e,t){return t.isVideo},function(e,t){return t.isMusic},function(e,t){return t.isAdVisible},Object(S.a)(),Object(M.a)(),Object(D.a)(),C.a,function(e,t,n,i,r,a,o){
var s=i.isPlayQueueVisible,l=i.isPostPlayVisible,c=i.playQueue,u=i.positionSeconds,d=i.durationSeconds,p=i.isPaused,h=i.repeatAll,f=i.repeatOne,v=i.controllable,g=c.currentIndex,m=d-u,S=r.subtype===b.a,M=r.subtype===b.b,D=e&&!S&&!l||M,C={serverEntityID:i.serverEntityID,providerEntityID:i.providerEntityID,metadataItemEntityID:r.metadataItem,showDuration:!l,positionSeconds:u,durationSeconds:d,volume:o,showRecordButton:!1,showRepeatButton:!S&&!f,activateRepeatButton:h,showRepeatOneButton:f,
activateRepeatOneButton:f,showPreviousButton:!0,disablePreviousButton:n||!h&&g<=0&&u<=I.a,showSkipBackButton:D,showPlayButton:p,showPauseButton:!p,showSkipForwardButton:D,disableSkipForwardButton:m<=I.b,showNextButton:!0,disableNextButton:n||!h&&g>=c.playQueueItems.length-1,showShuffleButton:!S,disableShuffleButton:!c.canShuffle,activateShuffleButton:c.playQueueShuffled,showMenuButton:!l&&!S,showLyricsButton:t&&!M,
disableLyricsButton:!(r.hasPremiumLyrics||r.lyricsStreams&&r.lyricsStreams.length),activateLyricsButton:i.isLyricsVisible,showSettingsButton:(!Object(y.a)()&&t||e)&&!l&&!S,activateSettingsButton:i.isSettingsVisible,showQueueButton:!0,disableQueueButton:n,activateQueueButton:s,showVolume:!0,showCloseButton:!0,hasLiveTVProtocol:a.protocols.includes("livetv")};return v&&(v.playPause||(C.disablePlayButton=!0,C.disablePauseButton=!0),v.repeat||(C.disableRepeatButton=!0,C.disableRepeatOneButton=!0),
v.shuffle||(C.disableShuffleButton=!0),v.skipPrevious||(C.disablePreviousButton=!0),v.skipNext||(C.disableNextButton=!0),v.seekTo||(C.disableSkipBackButton=!0,C.disableSkipForwardButton=!0),v.volume||(C.showVolume=!1),!v.playbackSpeed&&t&&(C.disableSettingsButton=!0)),C})}function r(e,t){var n={playerType:t.playerType};return{onRepeatPress:function(){e(P.t(n))},onRepeatOnePress:function(){e(P.t(n))},onPreviousPress:function(t){e(P.i(n))},onSkipBackPress:function(t){e(j.o(n))},
onPlayPress:function(t){e(j.k(n))},onPausePress:function(t){e(j.j(n))},onSkipForwardPress:function(t){e(j.p(n))},onNextPress:function(t){e(P.h(n))},onShufflePress:function(t){e(P.u(n))},onQueuePress:function(){e(P.s(n))},onLyricsPress:function(){e(P.r(n))},onSettingsPress:function(){e(j.u(n))},onVolumeChange:function(t){e(j.h(p()({},n,{volume:t})))},onClosePress:function(t){e(O.f(n))}}}var a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(7),p=n.n(d),h=n(1),f=(n.n(h),
n(0)),v=n.n(f),g=n(6),m=(n.n(g),n(11)),y=n(418),b=n(143),I=n(346),S=(n(85),n(44)),M=n(119),D=n(220),C=n(492),O=n(60),j=n(131),P=n(118),w=n(2495),T=n(1111),E=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onVolumeChange=function(e){r.setState({volume:e},function(){r.props.onVolumeChange(r.state.volume)})},r.onVolumeIconPress=function(){var e=r.state.volume>0;e&&(r._lastVolume=r.state.volume),r.setState({volume:e?0:r._lastVolume||100},function(){
r.props.onVolumeChange(r.state.volume)})},r.state={volume:n.volume},r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=e.volume;t!==this.state.volume&&this.setState({volume:t})},t.prototype.render=function(){return this.props.hasLiveTVProtocol?v.a.createElement(w.a,p()({},this.props,{volume:this.state.volume,onVolumeChange:this.onVolumeChange,onVolumeIconPress:this.onVolumeIconPress})):v.a.createElement(T.a,p()({},this.props,{volume:this.state.volume,
onVolumeChange:this.onVolumeChange,onVolumeIconPress:this.onVolumeIconPress}))},t}(f.Component);t.a=Object(m.b)(i,r)(E)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e,t){return t.isVideo},function(e,t){return t.isMusic},l.a,Object(c.a)(),Object(u.a)(),function(e,t,n,i,r){var a=Object(s.a)(i,r),o=a.disablePreviousButton,l=a.disableSkipForwardButton,c=a.disableNextButton;return{showDuration:!1,showRecordButton:!!n.features.subscribe,showRepeatButton:!1,
showRepeatOneButton:!1,disablePreviousButton:o,disableSkipForwardButton:l,disableNextButton:c,showShuffleButton:!1,showMenuButton:!1,showLyricsButton:!1,showSettingsButton:!0,showQueueButton:!1}})}function r(e,t){var n={playerType:t.playerType};return{onPreviousPress:function(t){e(d.h(n))},onSkipBackPress:function(t){e(d.j(n))},onSkipForwardPress:function(t){e(d.k(n))},onNextPress:function(t){e(d.g(n))}}}var a=n(6),o=(n.n(a),n(11)),s=n(2496),l=n(37),c=n(522),u=n(1110),d=n(155),p=n(1111)
;t.a=Object(o.b)(i,r)(p.a)},function(e,t,n){"use strict";function i(e,t){var n=t.seekRangeStartedAtSeconds,i=t.seekStartSeconds,a=t.seekEndSeconds,o=e-n;return{disablePreviousButton:o<=r.a||o-i<=r.a,disableSkipForwardButton:a-o<=r.b,disableNextButton:a-o<=r.b}}t.a=i;var r=n(346)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(350)),f=n(22),v=n(2498),g=n.n(v),m=function(e){function t(n,i){o()(this,t)
;var r=l()(this,e.call(this,n,i));return r.onTogglePress=function(){r.setState(function(e){return{isToggled:!e.isToggled}})},r.state={isToggled:!1},r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.durationSeconds,i=e.positionSeconds,a=1e3*i,o=1e3*n,s=o-a;return r()(f.a,{className:t,"data-qa-id":"mediaDuration",onPress:this.onTogglePress},void 0,this.state.isToggled?"-"+Object(h.a)(s):Object(h.a)(a)," / ",Object(h.a)(o))},t}(p.Component);m.defaultProps={
className:g.a.container},t.a=m},function(e,t){e.exports={container:"DurationRemaining-container-1F4w8"}},function(e,t,n){"use strict";function i(e){return e>60?"plex-icon-player-volume-high-560":e>40?"plex-icon-player-volume-mid-560":e>0?"plex-icon-player-volume-low-560":"plex-icon-player-volume-off-560"}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),n(4)),v=n(286),g=n(253),m=n(2500),y=n.n(m),b=function(e){function t(n,i){s()(this,t)
;var r=c()(this,e.call(this,n,i));return r.onWheel=function(e){e.preventDefault(),r.timeoutID&&(clearTimeout(r.timeoutID),r.timeoutID=null),r.isYLocked=null!=r.isYLocked?r.isYLocked:Math.abs(e.deltaY)>Math.abs(e.deltaX);var t=r.isYLocked?e.deltaY:e.deltaX,n=Math.max(100,Math.min(500,Math.abs(t))),i=Math.round(n/100*5),a=r.props.volume,o=t>0?Math.max(a-i,0):Math.min(a+i,100);r.onChange({positionValue:o}),r.timeoutID=setTimeout(function(){r.isYLocked=null,r.timeoutID=null},250)},
r.onChange=function(e){var t=e.positionValue,n=r.props.volume,i=Math.round(t);n!==i&&r.props.onVolumeChange(i)},r.timeoutID=null,r.isYLocked=null,r}return d()(t,e),t.prototype.componentWillUnmount=function(){this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},t.prototype.render=function(){var e=this.props,t=e.volume,n=e.onVolumeIconPress;return a()("span",{onWheel:this.onWheel},void 0,a()(g.a,{title:0===t?Object(f.default)("Unmute Volume"):Object(f.default)("Mute Volume"),
"data-qa-id":"volumeButton",icon:i(t),onPress:n}),a()(v.a,{className:y.a.slider,trackClassName:y.a.track,fillClassName:y.a.fill,showFill:!0,autoHideThumb:!0,stepSize:1,value:t,onChange:this.onChange}))},t}(h.Component);b.defaultProps={volume:50},t.a=b},function(e,t){e.exports={slider:"VolumeSlider-slider-1QXdT Slider-slider-2oLVT",track:"VolumeSlider-track-2WJDz Slider-track-28JOS",fill:"VolumeSlider-fill-3XkYy Slider-fill-35GFq"}},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(Object(s.a)(),function(e,t){return t.isMusic},Object(o.a)(),function(e,t,n){var i=l.e;return{serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,metadataItemEntityID:n.entityID,type:n.type,subtype:n.subtype,context:i,showStarRating:t,hasUserRating:null!=n.userRating}})}var r=n(6),a=(n.n(r),n(11)),o=n(21),s=n(44),l=n(31),c=n(1112);t.a=Object(a.b)(i)(c.a)},function(e,t){e.exports={container:"AudioVideoPlayerControlsMetadata-container-2PqUx",
titlesContainer:"AudioVideoPlayerControlsMetadata-titlesContainer-1oLik",ratingContainer:"AudioVideoPlayerControlsMetadata-ratingContainer-2TSSx",hasUserRating:"AudioVideoPlayerControlsMetadata-hasUserRating-rAzLd"}},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(s.a)(),function(e,t){return t.isMusic},Object(l.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=c.e,r=Object(p.a)(null,f,n.type,n.subtype,n,i);return{
serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,metadataItemEntityID:n.entityID,type:n.type,metadataKey:n.key,context:i,showPoster:e.openState===o.b,showStarRating:t,hasUserRating:null!=n.userRating,imageWidth:r.width,imageHeight:r.height,imageUrl:r.url}})}var r=n(6),a=(n.n(r),n(11)),o=n(197),s=n(44),l=n(523),c=n(31),u=n(45),d=n.n(u),p=n(228),h=n(1112),f=parseInt(d.a.playerPosterHeight,10);t.a=Object(a.b)(i)(h.a)},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{metadataItemEntityID:e.entityID,type:e.type}})}var r=n(11),a=n(6),o=(n.n(a),n(523)),s=n(2505);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(231)),f=n(2506),v=n(2509),g=n.n(v),m=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i))
;return r.onRecordPress=function(e){r.setState({isSubscribeModalOpen:!0})},r.onSubscribeModalClose=function(){r.setState({isSubscribeModalOpen:!1})},r.state={isSubscribeModalOpen:!1},r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.type;return i&&a?r()("div",{className:g.a.recordButtonContainer},void 0,r()(f.a,{serverEntityID:t,metadataItemEntityID:i,type:a,onPress:this.onRecordPress}),r()(h.a,{serverEntityID:t,
providerEntityID:n,metadataItemEntityID:i,isOpen:this.state.isSubscribeModalOpen,subscriptionType:a,onModalClose:this.onSubscribeModalClose})):null},t}(p.Component);t.a=m},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{isRecording:!!e,recordingProgress:e&&e.progress}})}var r=n(11),a=n(6),o=(n.n(a),n(1113)),s=n(2507);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.isRecording,n=e.recordingProgress,i=e.onPress
;return a()(c.a,{className:p.a.recordButton,title:Object(l.default)("Record"),onPress:i},void 0,t&&a()(u.a,{size:26,backgroundClassName:p.a.recordingProgressBackground,lineWidth:2,progress:n,showProgressText:!1}),!t&&a()("div",{className:p.a.recordingCircle}),a()("span",{className:t?p.a.recordingIconRecording:p.a.recordingIcon}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(22),u=n(260),d=n(2508),p=n.n(d);t.a=i},function(e,t){e.exports={
recordButton:"LiveTVRecordButton-recordButton-3o22m Link-link-2n0yJ",recordingCircle:"LiveTVRecordButton-recordingCircle-HSsQb PlayButton-playCircle-3Evfd",recordingIcon:"LiveTVRecordButton-recordingIcon-3XvOS",recordingIconRecording:"LiveTVRecordButton-recordingIconRecording-3tlCw LiveTVRecordButton-recordingIcon-3XvOS",
recordingProgressBackground:"LiveTVRecordButton-recordingProgressBackground-3vdcH CircularProgressBar-circularProgressBarBackground-1a1VU CircularProgressBar-circularProgressBarBackground-RvD8O"}},function(e,t){e.exports={recordButtonContainer:"LiveTVRecord-recordButtonContainer-vuoUX"}},function(e,t){e.exports={controls:"AudioVideoPlayerControls-controls-OwK1f",metadataContainer:"AudioVideoPlayerControls-metadataContainer-3h2Oi AudioVideoPlayerControlsMetadata-container-2PqUx",
durationContainer:"AudioVideoPlayerControls-durationContainer-3TK0D",buttonGroup:"AudioVideoPlayerControls-buttonGroup-ShnOa",titlesButtonGroup:"AudioVideoPlayerControls-titlesButtonGroup-2V4Qg AudioVideoPlayerControls-buttonGroup-ShnOa",buttonGroupLeft:"AudioVideoPlayerControls-buttonGroupLeft-3kwFX AudioVideoPlayerControls-buttonGroup-ShnOa",buttonGroupCenter:"AudioVideoPlayerControls-buttonGroupCenter-Vok98 AudioVideoPlayerControls-buttonGroup-ShnOa",
buttonGroupRight:"AudioVideoPlayerControls-buttonGroupRight-17650 AudioVideoPlayerControls-buttonGroup-ShnOa",auxButtons:"AudioVideoPlayerControls-auxButtons-2YhIh",closeButton:"AudioVideoPlayerControls-closeButton-2ULmA PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7",textButton:"AudioVideoPlayerControls-textButton-2psxQ PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7"}},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),function(e){
return{hasLiveTVProtocol:e.protocols.includes("livetv")}})}var r=n(6),a=(n.n(r),n(11)),o=n(220),s=n(2512);t.a=Object(a.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.isAdVisible,n=e.hasLiveTVProtocol,i=e.adPositionMilliseconds,r=e.adDurationMilliseconds,o=s()(e,["isAdVisible","hasLiveTVProtocol","adPositionMilliseconds","adDurationMilliseconds"]);return t?u.a.createElement(h.a,a()({},o,{positionMilliseconds:i,durationMilliseconds:r,showBuffer:!0
})):n?u.a.createElement(p.a,o):u.a.createElement(d.a,a()({},o,{showBuffer:!0}))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(680),p=n(2513),h=n(2515);t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(v,Object(u.a)(),Object(d.a)(),Object(p.a)(),Object(c.a)(),Object(l.a)(),function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],r=arguments[4],o=arguments[5],s=n.beginsAt,l=n.endsAt,c=o.serverEntityID,u=o.controllable,d=l-s,p=a()({serverEntityID:c,metadataItemEntityID:t.entityID,canSeek:!!d,beginsAt:s,endsAt:l,durationSeconds:d,timeFormat:e},r);return u&&!u.seekTo&&(p.canSeek=!1),i&&(p.streamStartedAt=i.startedAt,p.currentPosition=i.currentPosition,
p.lastSeekPosition=i.lastSeekPosition),p})}var r=n(7),a=n.n(r),o=n(6),s=(n.n(o),n(11)),l=n(44),c=n(1110),u=n(523),d=n(717),p=n(198),h=n(155),f=n(2514),v=Object(o.createSelector)(function(e){return e.experienceSettings.timeFormat},function(e){return e.replace(":mm",":mm:ss")}),g={onSeek:h.i};t.a=Object(s.b)(i,g)(f.a)},function(e,t,n){"use strict";function i(e){var t=e.currentPosition,n=e.positionMilliseconds,i=e.streamStartedAt;return e.lastSeekPosition?1e3*t:1e3*i+n}
var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(354),y=n(24),b=n(681),I=n(682),S=function(e){function t(){var n,i,r;c()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=d()(this,e.call.apply(e,[this].concat(o))),i.formatPlayerTime=function(e){var t=i.props.timeFormat;return Object(m.default)(e/1e3,t)},i.onSeek=function(e){
var t=e.positionSeconds,n=i.props,r=n.seekRangeStartedAtSeconds,a=n.seekStartSeconds,o=n.seekEndSeconds,s=r+a,l=r+o;t<s?t=s:t>l&&(t=l),i.props.onSeek({playerType:i.props.playerType,seekPosition:t})},r=n,d()(i,r)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.canSeek,n=e.currentPosition,r=(e.positionMilliseconds,e.beginsAt),o=e.endsAt,l=(e.durationSeconds,e.streamStartedAt,e.timeFormat,
e.seekRangeStartedAtSeconds),c=e.seekStartSeconds,u=e.seekEndSeconds,d=s()(e,["canSeek","currentPosition","positionMilliseconds","beginsAt","endsAt","durationSeconds","streamStartedAt","timeFormat","seekRangeStartedAtSeconds","seekStartSeconds","seekEndSeconds"]);if(!t)return null;var p=1e3*(l?l+c:n),h=1e3*(l?l+u:n),f=1e3*r,v=1e3*(o-1),m=Math.max(f,p),b=Math.min(v,h),S=i(this.props);return g.a.createElement(I.a,a()({},d,{positionMilliseconds:S,offsetMilliseconds:f,durationMilliseconds:v,
bufferStartMilliseconds:m,bufferEndMilliseconds:b,showBuffer:!0,canSeek:t,formatValue:this.formatPlayerTime,size:y.e.LARGE,onSeek:this.onSeek}))},t}(v.Component);S.defaultProps={beginsAt:0,endsAt:0,streamStartedAt:0,seekRangeStartedAtSeconds:0},t.a=Object(b.a)(S)},function(e,t,n){"use strict";function i(e){return null!=e.durationMilliseconds?l.a.createElement(c.a,a()({fillClassName:d.a.seekBarFill,isDisabled:!0},e)):null}var r=n(7),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=n.n(s),c=n(682),u=n(2516),d=n.n(u);t.a=i},function(e,t){e.exports={seekBarFill:"AdSeekBar-seekBarFill-1Qc6w SeekBar-seekBarFill-1Lcu0 Slider-fill-35GFq"}},function(e,t,n){"use strict";function i(e){var t=e.skipDelaySeconds,n=e.positionSeconds,i=e.onSkipPress;if(null==t)return null;var r=t<=n;return o()("div",{className:h.a.message},void 0,r?o()(u.a,{className:h.a.skipAdButton,onPress:i},void 0,Object(c.default)("Skip Ad")):Object(c.default)("You can skip this ad in {seconds} seconds",{
seconds:t-n}))}function r(e){var t=e.className,n=e.skipDelaySeconds,r=e.positionSeconds,a=e.onSkipPress;return o()(d.a,{className:t},void 0,o()("div",{className:h.a.message},void 0,Object(c.default)("Video will play after this advertisement")),o()(i,{skipDelaySeconds:n,positionSeconds:r,onSkipPress:a}))}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(4)),u=n(22),d=n(744),p=n(2519),h=n.n(p);t.a=r},function(e,t){e.exports={container:"AudioVideoInfoBar-container-2ewFy"}},function(e,t){
e.exports={message:"AdInfoBar-message-oXwI7",skipAdButton:"AdInfoBar-skipAdButton-2CaCx"}},function(e,t,n){"use strict";function i(e){var t=e.playerType;return a()(l.a,{},void 0,a()(c.a,{playerType:t}),a()(u.a,{playerType:t}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(744)),c=n(2521),u=n(2524);t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(l.a)(),Object(c.a)(),function(e,t){return{isAlsoAiringVisible:e.isAlsoAiringVisible,
positionSeconds:e.positionSeconds,channelTitle:t?t.channelTitle:Object(s.default)("Unknown")}})}function r(e,t){var n={playerType:t.playerType};return{onPress:function(t){e(Object(u.m)(n))}}}var a=n(11),o=n(6),s=(n.n(o),n(4)),l=n(44),c=n(717),u=n(155),d=n(2522);t.a=Object(a.b)(i,r)(d.a)},function(e,t,n){"use strict";function i(e){var t=e.channelTitle,n=e.isAlsoAiringVisible,i=e.onPress;return a()(c.a,{className:n?d.a.isActive:void 0,onPress:i},void 0,a()(l.a,{className:d.a.icon,
name:"plex-icon-toolbar-detail-560"}),t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(26)),c=n(22),u=n(2523),d=n.n(u);t.a=i},function(e,t){e.exports={isActive:"LiveTVCurrentChannel-isActive-2DTwm",icon:"LiveTVCurrentChannel-icon-17Slv"}},function(e,t,n){"use strict";function i(e){var t=e.playerType;return a()("div",{className:h.a.container},void 0,a()(c.a,{className:h.a.icon,name:"plex-icon-player-queue-560"}),a()(u.a,{
message:Object(l.default)("{openSpan}Up Next:{closeSpan} {openTitle}{closeTitle}"),tags:[{open:"openSpan",close:"closeSpan",component:"span",className:h.a.upNext},{open:"openTitle",close:"closeTitle",component:d.a,playerType:t}]}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(26),u=n(199),d=n(2525),p=n(2528),h=n.n(p);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),Object(s.a)(),function(e,t){return t?{
serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,metadataItemEntityID:t.entityID,positionSeconds:e.positionSeconds,type:t.type}:{}})}var r=n(11),a=n(6),o=(n.n(a),n(44)),s=n(2526),l=n(2527);t.a=Object(r.b)(i)(l.a)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(s.a)(),Object(a.a)(),Object(o.a)(),function(e,t,n){if(e&&null!=t){for(var i=e.channelIdentifier,r=null,a=null,o=0;o<n.length;o++)for(var s=n[o],l=0;l<s.Media.length;l++){
var c=s.Media[l],u=c.beginsAt,d=c.channelIdentifier;u>t&&d===i&&(!a||u<a.beginsAt)&&(r=s,a=c)}return r}})}t.a=i;var r=n(6),a=(n.n(r),n(522)),o=n(676),s=n(198)},function(e,t,n){"use strict";function i(e){var t=e.type,n=a()(e,["type"]);return t===c.e?l.a.createElement(d.a,n):l.a.createElement(u.a,n)}var r=n(13),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(28),u=n(518),d=n(230);t.a=i},function(e,t){e.exports={container:"LiveTVUpNext-container-1kAJR",upNext:"LiveTVUpNext-upNext-pGRmz",
icon:"LiveTVUpNext-icon-3DqMO"}},function(e,t,n){"use strict";function i(e){var t=e.playerType,n=e.onFollowMuteMenuChange;return a()(l.a,{},void 0,a()(c.a,{playerType:t,onFollowMuteMenuChange:n}),a()(u.a,{playerType:t}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(744)),c=n(2530),u=n(2534);t.a=i},function(e,t,n){"use strict";function i(e){return function(t,n){return null==n.followed&&null==n.muted||t.push(s()({},n,{tagElement:e})),t}}function r(){
return Object(u.createSelector)(Object(p.a)(),Object(d.a)(),function(e,t){var n=[];return g.forEach(function(t){var r=e[t];if(r&&r.length){var a=r.reduce(i(t),[]);n.push.apply(n,a)}}),{metadataItemEntityID:e.entityID,providerEntityID:t.entityID,tags:n}})}function a(e,t){var n=t.metricsPage;return{onUpdateFollowMute:function(t){e(Object(h.f)(s()({metricsPage:n},t)))}}}var o=n(7),s=n.n(o),l=n(1),c=n.n(l),u=n(6),d=(n.n(u),
n(220)),p=n(221),h=n(282),f=n(57),v=n(2531),g=["Channel","Topic"],m=Object(f.a)(r,a)(v.a);m.propTypes=s()({},m.propTypes,{playerType:c.a.string.isRequired}),t.a=m},function(e,t,n){"use strict";function i(e){var t=e.metadataItemEntityID,n=e.providerEntityID,i=e.tags,r=e.onUpdateFollowMute,o=e.onFollowMuteMenuChange;return s()("div",{},void 0,i.map(function(e){return u.a.createElement(d.a,a()({key:e.ratingKey},e,{metadataItemEntityID:t,providerEntityID:n,onUpdateFollowMute:r,onMenuChange:o}))}))}
var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2532);t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(54),v=n(324),g=n(26),m=n(22),y=n(75),b=n(156),I=n(2533),S=n.n(I),M={placement:"top"},D=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onFollowButtonPress=function(e){r._emitUpdateFollowMuteAction(v.b.FOLLOW,!r.props.followed)},
r.onMuteButtonPress=function(e){r._emitUpdateFollowMuteAction(v.b.MUTE,!r.props.muted)},r.onMenuButtonPress=function(e){r.setState({isMenuOpen:!r.state.isMenuOpen},function(){r.props.onMenuChange&&r.props.onMenuChange(r.state.isMenuOpen)})},r.onMenuClose=function(){r.setState({isMenuOpen:!1},function(){r.props.onMenuChange&&r.props.onMenuChange(!1)})},r.state={isMenuOpen:!1},r._menuButtonID=Object(f.a)(),r}return u()(t,e),t.prototype._emitUpdateFollowMuteAction=function(e,t){
var n=this.props,i=n.metadataItemEntityID,r=n.providerEntityID,a=n.tagElement,o=n.ratingKey;this.props.onUpdateFollowMute({metadataItemEntityID:i,providerEntityID:r,actionID:e,tagElement:a,ratingKey:o,value:t})},t.prototype.render=function(){var e=this.props,t=e.tag,n=e.followed,i=e.muted,a=this.state.isMenuOpen,o=void 0,s="plex-icon-unselected-560";return!0===n?(o=S.a.isFollowed,s="plex-icon-selected-560"):!0===i&&(o=S.a.isMuted,s="plex-icon-remove-560"),r()(m.a,{id:this._menuButtonID,
className:S.a.tag,onPress:this.onMenuButtonPress},void 0,r()(g.a,{name:s,className:(S.a.icon||"")+" "+(o||"")})," ",r()("span",{className:S.a.tagText},void 0,t),r()(y.a,{target:this._menuButtonID,isOpen:a,options:M,onMenuClose:this.onMenuClose},void 0,null!=n&&r()(b.a,{onPress:this.onFollowButtonPress},void 0,n?Object(h.default)("Unfollow {tag}",{tag:t}):Object(h.default)("Follow {tag}",{tag:t})),null!=i&&r()(b.a,{onPress:this.onMuteButtonPress},void 0,i?Object(h.default)("Unblock {tag}",{tag:t
}):Object(h.default)("Block {tag}",{tag:t}))))},t}(p.Component);t.a=D},function(e,t){e.exports={tag:"MetadataFollowMuteTag-tag-2CoGQ",tagText:"MetadataFollowMuteTag-tagText-2sa_R",icon:"MetadataFollowMuteTag-icon-sFuVh",isFollowed:"MetadataFollowMuteTag-isFollowed-1q9G0",isMuted:"MetadataFollowMuteTag-isMuted-2XZVI"}},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(Object(u.a)(1),function(e){return e?{title:e.title}:{}})}
var r=n(7),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(6),u=(n.n(c),n(221)),d=n(2535),p=Object(l.b)(i)(d.a);p.propTypes=a()({},p.propTypes,{playerType:s.a.string.isRequired}),t.a=p},function(e,t,n){"use strict";function i(e){var t=e.title;return t?a()("div",{},void 0,a()("span",{className:u.a.upNext},void 0,Object(l.default)("Up Next"))," \u2014 ",t):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(2536),u=n.n(c);t.a=i},function(e,t){e.exports={
container:"MetadataUpNext-container-3BvKX",upNext:"MetadataUpNext-upNext-3XxQS"}},function(e,t){e.exports={controlsContainer:"AudioVideoBottomBar-controlsContainer-2c743",seekBar:"AudioVideoBottomBar-seekBar-2ai3z SeekBar-seekBar-2UK3i Slider-slider-2oLVT"}},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(Object(d.a)(),function(e){if(e){var t=s.a.findWhere(e.features,{type:p.b.SETTINGS});if(t){var n=s.a.findWhere(t.settings,{id:h.b.PLAYBACK_SPEED});if(n)return n}}})}
function r(){return Object(c.createSelector)(Object(l.a)("controllable"),Object(u.a)(),i(),function(e,t,n){return{canSetPlaybackSpeed:!e||!!e.playbackSpeed,playbackSpeed:t,playbackSpeedSetting:n}})}function a(e,t){var n=t.playerType;return{onPlaybackSpeedChange:function(t){e(f.d({playerType:n,playbackSpeed:t}))}}}var o=n(5),s=n.n(o),l=n(347),c=n(6),u=(n.n(c),n(942)),d=n(220),p=n(76),h=n(323),f=n(131),v=n(57),g=n(2539),m=Object(v.a)(r,a)(g.a);t.a=m},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(286),v=n(1114),g=n(1115),m=n(2544),y=n.n(m),b=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onPlaybackSpeedChange=function(e){var t=e.positionValue;r.setState({playbackSpeed:t},function(){r.props.onPlaybackSpeedChange(t)})},r.state={playbackSpeed:n.playbackSpeed},r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){
e.playbackSpeed!==this.props.playbackSpeed&&this.setState({playbackSpeed:e.playbackSpeed})},t.prototype.render=function(){var e=this.props,t=e.canSetPlaybackSpeed,n=e.playbackSpeed,i=e.playbackSpeedSetting,a=e.onDimensionsChange;return r()(v.a,{onDimensionsChange:a},void 0,t&&r()(g.a,{label:Object(h.default)("Playback Speed")},void 0,r()(f.a,{className:y.a.slider,min:i.min,max:i.max,stepSize:i.step,value:this.state.playbackSpeed,onChange:this.onPlaybackSpeedChange}),n))},t}(p.Component)
;b.defaultProps={playbackSpeedSetting:{min:.5,max:2,step:.1}},t.a=b},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(45)),f=n.n(h),v=n(72),g=n(2541),m=n.n(g),y=parseInt(f.a.playerControlsHeight,10),b=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onMeasure=function(e){
i.props.onDimensionsChange&&i.props.onDimensionsChange(e)},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.bottom,i=e.children;return r()(v.a,{className:t,style:{bottom:n},ignoreWidth:!0,ignorePosition:!0,onMeasure:this.onMeasure},void 0,i)},t}(p.Component);b.defaultProps={className:m.a.container,bottom:y},t.a=b},function(e,t){e.exports={container:"AudioVideoStripeContainer-container-MI02O"}},function(e,t){e.exports={
container:"AudioVideoPlaybackSettings-container-2pTAj AudioVideoStripeContainer-container-MI02O",title:"AudioVideoPlaybackSettings-title-2MRYF",menusContainer:"AudioVideoPlaybackSettings-menusContainer-2bvbj"}},function(e,t){e.exports={row:"AudioVideoSettingsRow-row-2CrSz",cell:"AudioVideoSettingsRow-cell-24KvK",label:"AudioVideoSettingsRow-label-2h0yy AudioVideoSettingsRow-cell-24KvK",isDisabled:"AudioVideoSettingsRow-isDisabled-3laLA"}},function(e,t){e.exports={
slider:"AudioSettings-slider-2uCoX Slider-slider-2oLVT"}},function(e,t,n){"use strict";function i(){return Object(b.createSelector)(Object(b.createStructuredSelector)({availableQualities:Object(P.a)("availableQualities"),transcodeServer:Object(j.a)(),currentDecision:Object(D.a)(),currentBandwidth:Object(M.a)(),mediaItem:Object(C.a)(),canPlayAdaptiveBitrate:Object(w.a)()}),I.a)}function r(){
return Object(b.createSelector)(Object(P.a)("controllable"),i(),Object(O.a)(),Object(j.a)(),Object(P.a)("qualityIndex"),Object(T.a)(),E.a,function(e,t,n,i,r,a,o){var s=a.protocols.includes(S.b.LIVE_TV);return{availableQualities:t,audioStreams:n.audioStreams,selectedAudioStream:n.selectedAudioStream,subtitlesStreams:n.subtitlesStreams,selectedSubtitlesStream:n.selectedSubtitlesStream,selectedSubtitlesSize:o.subtitleSize,autoPlay:o.autoPlay,
canSetVideoQuality:e?!!e.quality:!!i.transcoderVideo&&!i.transcoderVideoRemuxOnly,canSetAudioStream:e?!!e.audioStream:!s,canSetSubtitleStream:e?!!e.subtitleStream:!s,canSetSubtitleSize:e?!!e.subtitleSize:!s,canSetAutoPlay:e?!!e.autoPlay:!s,qualityIndex:r}})}var a=n(7),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),
n(2546)),S=n(55),M=n(2548),D=n(252),C=n(946),O=n(944),j=n(669),P=n(347),w=n(2549),T=n(220),E=n(100),x=n(131),N=n(118),A=n(2550),L={dispatchChangeQualityIndex:x.e,dispatchChangeStream:x.f,dispatchChangeSubtitleSize:x.g,dispatchSetAutoPlay:N.o},k=function(e){function t(){var n,i,r;u()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=p()(this,e.call.apply(e,[this].concat(o))),i.onQualityChange=function(e){var t=i.props,n=t.playerType;(0,
t.dispatchChangeQualityIndex)({playerType:n,qualityIndex:parseInt(e,10)})},i.onAudioStreamChange=function(e){var t=i.props,n=t.playerType;(0,t.dispatchChangeStream)({playerType:n,streamTypeString:"audio",streamID:parseInt(e,10)})},i.onSubtitleStreamChange=function(e){var t=i.props,n=t.playerType;(0,t.dispatchChangeStream)({playerType:n,streamTypeString:"subtitles",streamID:parseInt(e,10)})},i.onSubtitleSizeChange=function(e){var t=i.props,n=t.playerType;(0,t.dispatchChangeSubtitleSize)({
playerType:n,subtitleSize:parseInt(e,10)})},i.onAutoPlayChange=function(e){var t=i.props,n=t.playerType;(0,t.dispatchSetAutoPlay)({playerType:n,autoPlay:e})},r=n,p()(i,r)}return f()(t,e),t.prototype.render=function(){var e=this.props,t=(e.dispatchChangeQualityIndex,e.dispatchChangeStream,e.dispatchChangeSubtitleSize,e.dispatchSetAutoPlay,l()(e,["dispatchChangeQualityIndex","dispatchChangeStream","dispatchChangeSubtitleSize","dispatchSetAutoPlay"]));return m.a.createElement(A.a,o()({},t,{
onQualityChange:this.onQualityChange,onAudioStreamChange:this.onAudioStreamChange,onSubtitleStreamChange:this.onSubtitleStreamChange,onSubtitleSizeChange:this.onSubtitleSizeChange,onAutoPlayChange:this.onAutoPlayChange}))},t}(g.Component);t.a=Object(y.b)(r,L)(k)},function(e,t,n){"use strict";function i(e){var t=e.availableQualities,n=e.transcodeServer,i=e.currentDecision,l=e.currentBandwidth,c=e.mediaItem,u=e.canPlayAdaptiveBitrate;if(!c)return[]
;var d=[],p=n.maxUploadBitrate,h=c.bitrate,f=!p||h&&p>h,v=i&&i.canPlayOriginalQuality;return f&&v&&d.push(r(c)),u&&d.push(a(i,l)),f&&!v&&d.push(o(c)),d.push.apply(d,t.map(s).reverse()),d}function r(e){var t=l(e.width,e.height,e.bitrate),n=c(t);return{index:f.a.ORIGINAL,explicitQuality:!1,conversionDescriptionSummary:p([Object(h.default)("Original"),d(n)]),conversionDescription:Object(h.default)("Play Original Quality"),conversionDescriptionExtra:n}}function a(e,t){var n={
index:f.a.CONVERT_AUTOMATICALLY,explicitQuality:!1,conversionDescription:Object(h.default)("Convert Automatically")};if(e&&e.qualityIndex===f.a.CONVERT_AUTOMATICALLY&&t){var i=c({bitrate:Object(v.default)(t.bandwidth),resolution:t.resolution});n.conversionDescriptionSummary=Object(h.default)("Auto (Now: {bitrateWithResolution})",{bitrateWithResolution:i}),n.conversionDescriptionExtra=Object(h.default)("Now: {bitrateWithResolution}",{bitrateWithResolution:i})
}else n.conversionDescriptionSummary=Object(h.default)("Convert Automatically");return n}function o(e){var t=l(e.width,e.height,e.bitrate),n=u(t),i=n?Object(h.default)("Convert to"):Object(h.default)("Convert");return{index:f.a.ORIGINAL,explicitQuality:!1,conversionDescriptionSummary:Object(h.default)("Convert (Maximum)"),conversionDescription:p([i,n,d(Object(h.default)("Maximum"))]),conversionDescriptionExtra:t.bitrate}}function s(e){
var t=e.videoResolution.split("x"),n=l(t[0],t[1],e.bitrate),i=c(n),r=u(n);return{index:e.index,explicitQuality:!0,conversionDescriptionSummary:p([Object(h.default)("Convert"),d(i)]),conversionDescription:p([Object(h.default)("Convert to"),r]),conversionDescriptionExtra:n.bitrate}}function l(e,t,n){var i=Object(g.a)(e,t,n);return{bitrate:Object(v.default)(n),resolution:i.resolution,resolutionDescription:i.description,resolutionDescriptionExtra:d(i.descriptionExtra)}}function c(e){
var t=p([e.resolution,e.resolutionDescription]);return e.bitrate?p([e.bitrate,t],", "):t}function u(e){return p([e.resolution,e.resolutionDescription,e.resolutionDescriptionExtra])}function d(e){return e&&0!==e.length?"("+e+")":""}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.filter(function(e){return e}).join(t)}t.a=i;var h=n(4),f=n(475),v=n(403),g=n(2547)},function(e,t,n){"use strict";function i(e,t,n){if(!e&&!t)return{resolution:"",description:"",
descriptionExtra:""};var i=Object(s.a)(e,t);return{resolution:i+"p",description:r(i),descriptionExtra:a(i,n)}}function r(e){return e>2560?"8K":e>1100?"4K":e>576?"HD":""}function a(e,t){return e<=576||e>1100||!t?"":t<=2e3?"":t<=3e3?Object(o.default)("Medium"):t<=4e3?Object(o.default)("High"):t<=8e3?"":t<=1e4?"":t<=12e3?Object(o.default)("Medium"):Object(o.default)("High")}t.a=i;var o=n(4),s=n(870)},function(e,t,n){"use strict";function i(){
return Object(o.createSelector)(Object(l.a)(),Object(s.a)(),function(e,t){var n=e.bandwidthTimeline;if(!(t&&n&&n.bandwidths&&n.transcodeSessionID&&n.transcodeSessionID===t.transcodeSessionID))return null;var i=1e3*e.positionSeconds,r=n.bandwidths.filter(function(e){return parseInt(e.time,10)<=i});return 0===r.length?null:a.a.max(r,function(e){return parseInt(e.time,10)})})}t.a=i;var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),n(252)),l=n(44)},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(function(e){return!!e.remotePlayer},Object(o.a)(a.a),Object(s.a)(),Object(l.a)(),function(e,t,n,i){return t&&n.hasAdaptiveBitrate&&!e&&!i})}t.a=i;var r=n(6),a=(n.n(r),n(52)),o=n(232),s=n(669),l=n(198)},function(e,t,n){"use strict";function i(e){
var t=e.bottom,n=e.availableQualities,i=e.audioStreams,r=e.selectedAudioStream,o=e.subtitlesStreams,s=e.selectedSubtitlesStream,I=e.selectedSubtitlesSize,S=e.autoPlay,M=e.qualityIndex,D=e.canSetVideoQuality,C=e.canSetAudioStream,O=e.canSetSubtitleStream,j=e.canSetSubtitleSize,P=e.canSetAutoPlay,w=e.onQualityChange,T=e.onAudioStreamChange,E=e.onSubtitleStreamChange,x=e.onSubtitleSizeChange,N=e.onAutoPlayChange,A=O&&o.length>1,L=A&&j&&!Object(c.a)(),k=D&&!!n.length&&null!=M&&n.findIndex(function(e){
return e.index===M})>-1,_=L&&s&&0!==s.id&&!Object(p.a)(s.codec);return a()(v.a,{bottom:t},void 0,k&&a()(m.a,{label:Object(l.default)("Quality")},void 0,a()(g.a,{qualityIndex:M,availableQualities:n,onQualityChange:w})),a()(m.a,{label:Object(l.default)("Audio Stream")},void 0,C&&i.length>1?a()(f.a,{name:"audioStream",size:u.e.MEDIUM,value:""+r.id,values:i.map(function(e){var t;return t={},t[""+e.id]=a()(y.a,{audioStream:e}),t}),onChange:T}):a()(y.a,{audioStream:r})),a()(m.a,{
label:Object(l.default)("Subtitles")},void 0,A?a()(f.a,{name:"subtitleStream",size:u.e.MEDIUM,value:""+s.id,values:o.map(function(e){var t;return t={},t[""+e.id]=a()(b.a,{subtitlesStream:e}),t}),onChange:E}):a()(b.a,{subtitlesStream:s})),L&&a()(m.a,{label:Object(l.default)("Subtitle Size"),isDisabled:!_},void 0,a()(f.a,{name:"subtitleSize",size:u.e.MEDIUM,value:I.toString(),values:d.a.settings.map(function(e){var t;return t={},t[e.value]=e.title,t}),onChange:x})),P&&a()(m.a,{
label:Object(l.default)("Auto Play")},void 0,a()(h.a,{name:"autoPlay",size:u.e.SMALL,value:S,onChange:N})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(418),u=n(24),d=n(694),p=n(952),h=n(290),f=n(2551),v=n(1114),g=n(2552),m=n(1115),y=n(741),b=n(742);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(5),g=n.n(v),m=n(1),y=(n.n(m),
n(0)),b=n.n(y),I=n(54),S=n(24),M=n(75),D=n(108),C=n(291),O=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r.onToggleMenuPress=function(e){r.setState({isMenuOpen:!r.state.isMenuOpen})},r.onMenuClose=function(e){r.setState({isMenuOpen:!1})},r.onSelectPress=function(e){return function(t){r.props.onChange(e)}},r.state={isMenuOpen:!1},r._menuInputButtonID=Object(I.a)(),r}return f()(t,e),t.prototype.getSelectedValue=function(e,t){var n=g.a.find(e,function(e){
return g.a.isString(e)?e===t:g.a.keys(e)[0]===t});return g.a.isString(n)?n:n[g.a.keys(n)[0]]},t.prototype.render=function(){var e=this,t=this.props,n=(t.name,t.size),i=t.kind,a=t.value,s=t.values,c=l()(t,["name","size","kind","value","values"]);return o()(C.a,{id:this._menuInputButtonID,size:n,kind:i,direction:this.state.isMenuOpen?S.a.UP:S.a.DOWN,onPress:this.onToggleMenuPress},void 0,this.getSelectedValue(s,a),b.a.createElement(M.a,r()({isOpen:this.state.isMenuOpen,
target:this._menuInputButtonID,onMenuClose:this.onMenuClose},c),s.map(function(t){if(g.a.isString(t))return o()(D.a,{isSelected:t===a,onPress:e.onSelectPress(t)},t,t);var n=g.a.keys(t),i=n[0];return o()(D.a,{isSelected:i===a,onPress:e.onSelectPress(i)},i,t[i])})))},t}(y.Component);t.a=O},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(5),p=n.n(d),h=n(4),f=n(1),v=(n.n(f),n(0)),g=(n.n(v),
n(24)),m=n(419),y=n(54),b=n(75),I=n(291),S=n(2553),M=n(130),D=n(2555),C=n.n(D),O="toggleShowAll",j={placement:"top-start"},P=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));r.onToggleMenuPress=function(e){r.setState({isMenuOpen:!r.state.isMenuOpen})},r.onMenuClose=function(e){r.setState({isMenuOpen:!1})},r.onQualitySelect=function(e){if(e===O)return void r.setState({showAll:!0,qualities:r._getQualityMenuValues(r.props.availableQualities,r.props.qualityIndex,!0)})
;r.setState({isMenuOpen:!1}),r.props.onQualityChange(e)};var a=!r._canToggleShowAll(n.availableQualities);return r.state={isMenuOpen:!1,showAll:a,qualities:r._getQualityMenuValues(n.availableQualities,n.qualityIndex,a)},r._menuInputButtonID=Object(y.a)(),r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=e.qualityIndex!==this.props.qualityIndex,n=e.availableQualities!==this.props.availableQualities;if(t||n){var i=this.state.showAll
;!n||i||this._canToggleShowAll(e.availableQualities)||(i=!0),this.setState({showAll:i,qualities:this._getQualityMenuValues(e.availableQualities,e.qualityIndex,i)})}},t.prototype._canToggleShowAll=function(e){var t=e.some(function(e){return!0===e.explicitQuality}),n=!!p.a.findWhere(e,{index:M.a.CONVERT_AUTOMATICALLY});return t&&n},t.prototype._getQualityMenuValues=function(e,t,n){var i=e.filter(function(e){return n||!e.explicitQuality||e.index===t});return i.push({index:O,
conversionDescription:Object(h.default)("Show all")}),i},t.prototype.render=function(){var e=this,t=this.props.qualityIndex,n=this.state.qualities,i=n.find(function(e){return e.index===t});return r()(I.a,{id:this._menuInputButtonID,"data-qa-id":"videoQuality",size:g.e.MEDIUM,direction:this.state.isMenuOpen?m.UP:m.DOWN,onPress:this.onToggleMenuPress},void 0,i.conversionDescriptionSummary,r()(b.a,{className:C.a.menu,isOpen:this.state.isMenuOpen,target:this._menuInputButtonID,options:j,
onMenuClose:this.onMenuClose},void 0,n.map(function(n){return r()(S.a,{conversionQualityIndex:n.index,conversionQuality:n,isSelected:n.index===t,isHidden:e.state.showAll&&n.index===O,onQualitySelect:e.onQualitySelect},n.index)})))},t}(v.Component);t.a=P},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(108)),f=n(2554),v=n.n(f),g=function(e){function t(){var n,i,r;o()(this,t)
;for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onPress=function(e){i.props.onQualitySelect(i.props.conversionQualityIndex)},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.conversionQualityIndex,n=e.conversionQuality,i=e.isSelected,a=e.isHidden;return r()(h.a,{isSelected:i,isHidden:a,onPress:this.onPress},t,n.conversionDescription,n.conversionDescriptionExtra&&r()("span",{
className:v.a.itemExtraDetail,"data-qa-id":"playbackBitrateQuality"},void 0,n.conversionDescriptionExtra))},t}(p.Component);t.a=g},function(e,t){e.exports={itemExtraDetail:"AudioVideoQualityMenuItem-itemExtraDetail-202QW"}},function(e,t){e.exports={menu:"AudioVideoQualityMenuInput-menu-2i8jz MenuContainer-menu-2OAQT"}},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e){return e.ui.audioVideoPlayer},Object(o.a)(),function(e,t){return{
serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,itemEntityIDs:t.alsoAiring}})}var r=n(6),a=(n.n(r),n(11)),o=n(198),s=n(2557);t.a=Object(a.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.itemEntityIDs,r=e.playerType;return a()("div",{className:f.a.container},void 0,a()(u.a,{},void 0,a()(d.a,{title:Object(l.default)("Airing Now")})),a()(c.a,{className:f.a.content,autoScroll:!0},void 0,i.map(function(e){return a()(p.a,{
serverEntityID:t,providerEntityID:n,metadataItemEntityID:e,playerType:r},e)})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(80),u=n(1026),d=n(1027),p=n(2558),h=n(2564),f=n.n(h);t.a=i},function(e,t,n){"use strict";function i(e,t){var n={playerType:t.playerType,serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID};return{onPlayPress:function(){e(Object(a.l)(n))}}}var r=n(11),a=n(155),o=n(2559)
;t.a=Object(r.b)(null,i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.metadataItemEntityID,n=e.playerType,i=e.onPlayPress;return a()("div",{className:d.a.container},void 0,a()(l.a,{className:d.a.underlay,onPress:i}),a()(c.a,{className:d.a.metadataContainer,posterPlayButtonClassName:d.a.metadataPosterPlayButton,metadataItemEntityID:t,playerType:n,onPlayPress:i}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(22)),c=n(2560),u=n(2563),d=n.n(u);t.a=i},function(e,t,n){
"use strict";function i(){return Object(r.createSelector)(function(e){return e.experienceSettings.timeFormat},Object(s.a)(),Object(o.a)(),Object(c.a)(),function(e,t,n,i){var r=l.c,a=Object(d.c)(n.type,n.subtype,r)===d.a?h:f,o=Object(u.a)(a,null,n.type,n.subtype,n,r);return{serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,type:n.type,title:n.title,context:r,imageWidth:o.width,imageHeight:o.height,imageUrl:o.url,beginsAt:i&&i.beginsAt,endsAt:i&&i.endsAt,
channelTitle:i&&i.channelTitle,timeFormat:e}})}var r=n(6),a=(n.n(r),n(11)),o=n(21),s=n(44),l=n(31),c=n(358),u=n(228),d=n(121),p=n(2561),h=64,f=36;t.a=Object(a.b)(i)(p.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.posterPlayButtonClassName,i=e.serverEntityID,r=e.providerEntityID,o=e.metadataItemEntityID,s=e.type,p=e.title,f=e.context,v=e.imageWidth,g=e.imageHeight,m=e.imageUrl,y=e.beginsAt,b=e.endsAt,I=e.channelTitle,S=e.timeFormat,M=e.onPlayPress,D=Object(c.b)(s,f,{
providerEntityID:r});return a()("div",{className:t},void 0,a()("div",{className:h.a.channelInfoContainer},void 0,a()("div",{className:h.a.channelTitle},void 0,I.substring(0,I.lastIndexOf(" ")))),a()("div",{className:h.a.cardContainer},void 0,a()(u.a,{playButtonClassName:n,playCircleClassName:h.a.posterPlayCircle,serverEntityID:i,providerEntityID:r,imageWidth:v,imageHeight:g,imageUrl:m,title:p,onPlayPress:M})),a()("div",{className:h.a.titlesContainer},void 0,a()("div",{className:h.a.titles
},void 0,D.map(function(e,t){return a()(d.a,{serverEntityID:i,providerEntityID:r,metadataItemEntityID:o,component:e,isSecondary:t>0},t)}))),a()("div",{className:h.a.airTimeContainer},void 0,!!y&&!!b&&Object(l.a)(y,b,{timeFormat:S,separator:" \u2014 "})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(434)),c=(n(31),n(174)),u=n(722),d=n(257),p=n(2562),h=n.n(p);i.defaultProps={className:h.a.container},t.a=i},function(e,t){e.exports={container:"LiveTVAlsoAiringItemMetadata-container-mHohH",
channelInfoContainer:"LiveTVAlsoAiringItemMetadata-channelInfoContainer-17N5O",channelTitle:"LiveTVAlsoAiringItemMetadata-channelTitle-5p11m",cardContainer:"LiveTVAlsoAiringItemMetadata-cardContainer-1KCMc",titlesContainer:"LiveTVAlsoAiringItemMetadata-titlesContainer-1JomM",titles:"LiveTVAlsoAiringItemMetadata-titles-2BF9G",airTimeContainer:"LiveTVAlsoAiringItemMetadata-airTimeContainer-1-UHs",
posterPlayCircle:"LiveTVAlsoAiringItemMetadata-posterPlayCircle-1Kmt_ MetadataPosterButtonCard-playCircle-366hc PlayButton-playCircle-3Evfd"}},function(e,t){e.exports={container:"LiveTVAlsoAiringItem-container-1yHzB",metadataPosterPlayButton:"LiveTVAlsoAiringItem-metadataPosterPlayButton-1spkg MetadataPosterButtonCard-playButton-aOV1E PlayButton-playButton-3WX8X",underlay:"LiveTVAlsoAiringItem-underlay-2Zawk",
metadataContainer:"LiveTVAlsoAiringItem-metadataContainer-i4aJc LiveTVAlsoAiringItemMetadata-container-mHohH"}},function(e,t){e.exports={container:"LiveTVAlsoAiring-container-3XW6f",content:"LiveTVAlsoAiring-content-5i41J Scroller-vertical-VScFL",tooltipButton:"LiveTVAlsoAiring-tooltipButton-3Azay"}},function(e,t){e.exports={fullPlayer:"AudioVideoFullPlayer-fullPlayer-3bJyO",bar:"AudioVideoFullPlayer-bar-dDYeo",topBar:"AudioVideoFullPlayer-topBar-2XUGM AudioVideoFullPlayer-bar-dDYeo",
bottomBar:"AudioVideoFullPlayer-bottomBar-2yixi AudioVideoFullPlayer-bar-dDYeo",content:"AudioVideoFullPlayer-content-37T7O",isVideo:"AudioVideoFullPlayer-isVideo-1aASw",isPlayQueueVisible:"AudioVideoFullPlayer-isPlayQueueVisible-1caox",hideControls:"AudioVideoFullPlayer-hideControls-3B1pW"}},function(e,t,n){"use strict";function i(e){
var t=e.playerType,n=e.isPlayQueueLoading,i=e.isPostPlayVisible,r=e.isVideo,o=e.isMusic,s=e.isAdVisible,d=e.currentSubType,h=e.hasLiveTVProtocol,f=e.seekStartMilliseconds,v=e.seekEndMilliseconds,g=e.bufferStartMilliseconds,m=e.bufferEndMilliseconds,y=e.adPositionMilliseconds,b=e.adDurationMilliseconds,I=e.adSkipDelaySeconds,S=e.onAdSkipPress;return a()(l.a,{playerType:t,isPlayQueueLoading:n},void 0,a()(c.a,{className:p.a.posterContainer,playerType:t,isVideo:r,isMusic:o}),a()(u.a,{
className:p.a.controlsContainer,playerType:t,isVideo:r,isMusic:o,isAdVisible:s,isPostPlayVisible:i,currentSubType:d,hasLiveTVProtocol:h,adSkipDelaySeconds:I,seekStartMilliseconds:f,bufferStartMilliseconds:g,bufferEndMilliseconds:m,seekEndMilliseconds:v,adPositionMilliseconds:y,adDurationMilliseconds:b,onAdSkipPress:S}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(85),n(966)),c=n(2567),u=n(1109),d=n(2570),p=n.n(d);t.a=i},function(e,t,n){"use strict";function i(){
return Object(c.createSelector)(Object(d.a)(),function(e,t){return t.isVideo},Object(p.a)(),function(e,t,n){var i=h.e,r=Object(g.a)(null,t?I:b,n.type,n.subtype,n,i);return{serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,metadataItemEntityID:n.entityID,type:n.type,metadataKey:n.key,imageWidth:r.width,imageHeight:r.height,imageUrl:r.url}})}function r(e,t){var n={playerType:t.playerType};return{onExpandPress:function(t){e(m.b(n))}}}
var a=n(7),o=n.n(a),s=n(1),l=n.n(s),c=n(6),u=(n.n(c),n(11)),d=n(44),p=n(221),h=n(31),f=n(45),v=n.n(f),g=n(228),m=n(497),y=n(2568),b=parseInt(v.a.playerPosterHeight,10),I=parseInt(v.a.miniPlayerVideoHeight,10),S=Object(u.b)(i,r)(y.a);S.propTypes=o()({},S.propTypes,{playerType:l.a.string.isRequired}),t.a=S},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,o=e.metadataKey,s=e.type,d=e.disableExpandButton,h=e.imageWidth,f=e.imageHeight,v=e.imageUrl,g=e.isMusic,m=e.onExpandPress,y=g?"music":o;return a()("div",{className:t,style:{width:h}},void 0,a()("div",{className:g?p.a.cardContainer:p.a.videoContainer},void 0,a()(u.a,{className:p.a.expandButton,"data-qa-id":"expandPlayerButton",icon:"plex-icon-player-expand-560",isDisabled:d,
title:Object(l.default)("Expand Player"),onPress:m}),a()(c.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:r,metadataKey:y,type:s,imageWidth:h,imageHeight:f,imageUrl:v,showLinkOnly:!0})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(297),u=n(253),d=n(2569),p=n.n(d);t.a=i},function(e,t){e.exports={cardContainer:"AudioVideoMiniPlayerPoster-cardContainer-wXH6t",
expandButton:"AudioVideoMiniPlayerPoster-expandButton-2gdU6 PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7",videoContainer:"AudioVideoMiniPlayerPoster-videoContainer-3rQbN AudioVideoMiniPlayerPoster-cardContainer-wXH6t"}},function(e,t){e.exports={posterContainer:"AudioVideoMiniPlayer-posterContainer-3fvrf",controlsContainer:"AudioVideoMiniPlayer-controlsContainer-1Q_dd AudioVideoBottomBar-controlsContainer-2c743"}},function(e,t){e.exports={
container:"AudioVideoPlayerView-container-kWiFs"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(2573),o=n.n(a),s=n(5),l=n.n(s),c=n(20),u=n(0),d=(n.n(u),n(84)),p=n.n(d),h=n(11),f=n(52),v=n(15),g=n(163),m=n(17),y=n(1072),b=n(1117),I=n(109),S=n(114),M=n(2603),D=n(532),C=n(2639),O=n(2646),j=n(2649),P=r()(M.a,{}),w=r()(C.a,{}),T=c.a.Layout.extend({className:"nav-bar",template:o.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(),
Object(b.b)()){var e=v.d("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=this.primaryServer.get("desktop").get("backgroundTranscodeJobs"),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:Object(b.a)(),isOnDashboard:this.isOnDashboard(),isFullscreen:this.isFullscreen(),
showActivity:this.shouldShowActivity(this.primaryServer),activityCount:this.getActivityCount(),hasTypeFirstSettings:!!e.get("features").get(f.i)}},mountReact:function(){p.a.render(r()(h.a,{store:v.d("appStore")},void 0,P),this.ui.search[0]),p.a.render(r()(h.a,{store:v.d("appStore")},void 0,r()("div",{},void 0,r()(D.a,{metricsProperties:{context:S.f},isOpen:this.isPlexPassModalOpen,onModalClose:this.onPlexPassModalClose}),w)),this.ui.modalContainer[0])},unmountReact:function(){
this.isRendered&&(p.a.unmountComponentAtNode(this.ui.search[0]),p.a.unmountComponentAtNode(this.ui.modalContainer[0]))},getActivityCount:function(){return(this.sessions?this.sessions.length:0)+(this.transcodeJobs?this.transcodeJobs.length:0)},hasHistory:function(){return this.model.get("history").length>1},canGoPremium:function(){return this.model.get("user").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(Object(b.a)()){return v.d("fullscreenManager").isFullscreen()}return!1},shouldShowActivity:function(e){return this.model.get("user").get("features").get(f.i)?!(!e||e.get("isShared")):!(!e||e.get("isShared")&&!e.get("allowSync"))},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact(),this.playerDropdown.append(new j.a),
this.navDropdown.append(new O.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()),Object(b.a)()&&this.ui.tvModeBtn.toggleClass("hidden",!this.isOnDashboard()||this.isFullscreen())},
onPrimaryServerChange:function(e,t){this.setupServerListeners();var n=this.shouldShowActivity(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(),
Object(y.a)("tv")},onExitFullscreenClick:function(e){e.preventDefault(),g.a.set("main.fullscreen",!1)},onActivityClick:function(e){e.preventDefault(),Object(I.a)("nowPlaying",{serverID:this.primaryServer.id})},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=T},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"hidden"}function l(e,t){var a,o="";return o+=' <li><a class="exit-fullscreen-btn ',a=r.unless.call(e,e&&e.isFullscreen,{hash:{},inverse:p.noop,fn:p.program(1,s,t),data:t}),(a||0===a)&&(o+=a),
o+='" href="#" title="'+h(i(n(3)).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 ',a=r.unless.call(e,e&&e.isOnDashboard,{hash:{},inverse:p.noop,fn:p.program(1,s,t),data:t}),(a||0===a)&&(o+=a),o+=" ",a=r.if.call(e,e&&e.isFullscreen,{hash:{},inverse:p.noop,fn:p.program(1,s,t),data:t}),(a||0===a)&&(o+=a),o+='" href="#" title="'+h(i(n(3)).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"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p=this,h=this.escapeExpression;return d+='<ul class="nav nav-bar-nav"> <li><a class="back-btn ',u=r.unless.call(t,t&&t.hasHistory,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(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=r.unless.call(t,t&&t.canGoPremium,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+='" href="#"><span class="plex-pass-label label label-primary">'+h(i(n(3)).call(t,"Go Premium",{hash:{},data:o
}))+"</span></a></li> ",u=r.if.call(t,t&&t.isKonvergo,{hash:{},inverse:p.noop,fn:p.program(3,l,o),data:o}),(u||0===u)&&(d+=u),d+=' <li class="',u=r.if.call(t,t&&t.activityCount,{hash:{},inverse:p.noop,fn:p.program(5,c,o),data:o}),(u||0===u)&&(d+=u),d+='"><a class="activity-btn ',u=r.unless.call(t,t&&t.showActivity,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+='" href="#" title="'+h(i(n(3)).call(t,"Status",{hash:{},data:o
}))+'" data-toggle="tooltip"><span class="activity-badge badge badge-transparent ',u=r.unless.call(t,t&&t.activityCount,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+='">'+h((u=t&&t.activityCount,"function"==typeof u?u.apply(t):u))+'</span><i class="glyphicon cardio"></i></a></li> <li><a class="settings-btn" href="'+h(i(n(1116)).call(t,"#!/settings",t&&t.hasTypeFirstSettings,{hash:{},data:o}))+'" title="'+h(i(n(3)).call(t,"Settings",{hash:{},data:o
}))+'" data-toggle="tooltip"><i class="glyphicon settings"></i></a></li> </ul> <div class="modal-container"></div> '})},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";function i(){return"windowskonvergo"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a).platformID}t.a=i;var r=n(38)},function(e,t,n){"use strict";n(545)},function(e,t,n){"use strict";n(38)
},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(38),n(1118),n(1119)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(545)},function(e,t,n){"use strict";n(545)},function(e,t,n){"use strict";n(38),n(746),n(546)},function(e,t,n){"use strict";n(38),n(746),n(547)},function(e,t,n){
"use strict";n(38)},function(e,t,n){"use strict";n(545)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(38),n(747),n(748)},function(e,t,n){"use strict";n(38),n(747),n(749)},function(e,t,n){"use strict";n(38),n(749),n(750)},function(e,t,n){"use strict";n(38),n(748),n(750)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";n(38)},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(function(e){
return e.ui.quickSearch},P,T,function(e,t,n){return t?{serverEntityID:t.entityID,providerEntityID:e.providerEntityID,isConnected:t.isConnected,isCloud:t.isCloud,providerEntityIDs:n,query:e.query,providerIdentifier:e.providerIdentifier,selectedResultEntityID:e.selectedResultEntityID}:{}})}var r=n(13),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(7),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),
n(195)),I=n(34),S=n(55),M=n(218),D=n(194),C=n(113),O=n(148),j=n(2604),P=Object(y.createSelector)(function(e){return e.servers},function(e){return e.ui.quickSearch.serverEntityID},M.a,function(e,t,n){return t&&e.indexOf(t)>-1?n[t]:void 0}),w=Object(b.a)(Object(y.createSelector)(function(e){return e.user.desktop.providers},D.a,function(e,t){return e.filter(function(e){var n=t[e].providerIdentifier||t[e].identifier
;return n===S.c.PODCASTS_PROVIDER_IDENTIFER||n===S.c.PODCASTS_STAGE_PROVIDER_IDENTIFER})}),function(e){return e}),T=Object(y.createSelector)(P,function(e){return e.user.desktop.providers},w,function(e,t,n){if(e)return e.isCloud?t:[].concat(e.desktop.providers,n)}),E=h()({populateProviders:C.l},O),x=function(e){function t(){return s()(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,n=e.isConnected,i=e.isCloud,r=e.providerEntityIDs,a=e.providerIdentifier;t&&n&&!i&&e.populateProviders({serverEntityID:t}),
r&&r.length&&Object(I.a)(function(){e.initQuickSearch({serverEntityID:t,providerEntityIDs:r,providerIdentifier:a})})},t.prototype.render=function(){var e=this.props,t=e.providerEntityIDs,n=a()(e,["providerEntityIDs"]);return t&&t.length?g.a.createElement(j.a,n):null},t}(v.Component);t.a=Object(m.b)(i,E)(x)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),
n(0)),h=n.n(p),f=n(84),v=n.n(f),g=n(38),m=n(34),y=n(349),b=n(29),I=n(421),S=n(45),M=n.n(S),D=n(2605),C=n(2608),O=n(2638),j=n.n(O),P=parseInt(M.a.searchResultHeight,10),w=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onScrollIntoView=function(e){var t=e.scrollTop,n=v.a.findDOMNode(r.refs.results),i=n.clientHeight,a=i+r.state.scrollTop,o=t+P>a||t<r.state.scrollTop;r.setState({scrollTop:o?t:r.state.scrollTop})},r.onWindowPress=function(e){if(r.state.isOpen){
var t=v.a.findDOMNode(r.refs.search);t&&t.contains(e.target)||r.setState({isOpen:!1})}},r.onKeyDown=function(e){var t=r.props,n=t.serverEntityID,i=t.providerEntityID,a=r.state.isOpen;switch(e.keyCode){case y.c:case y.k:a&&(e.stopPropagation(),e.preventDefault(),e.keyCode===y.k?r.props.selectQuickSearchResult({offset:-1}):r.props.selectQuickSearchResult({offset:1}),r.isTabScoped&&(I.c(),r.isTabScoped=!1));break;case y.d:if(a){var o=g.a.platformID,s="osx"===o?e.metaKey:e.ctrlKey,l=e.shiftKey
;I.a(),r.isTabScoped=!1,s?l?r.props.playQuickSearchResult({serverEntityID:n,options:{shuffle:!0}}):r.props.playQuickSearchResult({serverEntityID:n,providerEntityID:i}):r.props.navigateQuickSearchResult({serverEntityID:n,providerEntityID:i})}break;case y.e:e.nativeEvent.stopImmediatePropagation(),r.isTabScoped&&(I.c(),r.isTabScoped=!1),a?r.setState({isOpen:!1}):r.props.changeQuickSearchQuery("");break;case y.j:if(a){if(!r.isTabScoped){var c=v.a.findDOMNode(r.refs.results);I.f(c),r.isTabScoped=!0}
I.e(e)}}},r.onInputClick=function(e){r.isTabScoped&&(I.c(),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(){Object(m.a)(function(){r.props.fetchQuickSearch()})},r.onInputChange=function(e){Object(m.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,r=this.props.query!==i,a=i.trim().length,o=this.state.isOpen;a&&!o&&r?this.setState({isOpen:!0}):!a&&o&&(this.setState({isOpen:!1}),this.isTabScoped&&(I.b(),this.isTabScoped=!1)),null==n&&this.setState({scrollTop:0})},t.prototype.shouldComponentUpdate=function(e,t){return Object(b.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.providerEntityID,i=e.query;return h.a.createElement("div",{className:j.a.container,ref:"search",
onKeyDown:this.onKeyDown},r()(D.a,{query:i,onChange:this.onInputChange,onSearch:this.onSearch,onClick:this.onInputClick}),this.state.isOpen&&h.a.createElement(C.a,{serverEntityID:t,providerEntityID:n,scrollTop:this.state.scrollTop,ref:"results",onScrollIntoView:this.onScrollIntoView,onScrollPositionChange:this.onScrollPositionChange}))},t}(p.Component);t.a=w},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(0),p=n.n(d),h=n(17),f=n(29),v=n(26),g=n(2606),m=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.focusInput=function(){i._input.focus()},i.onRef=function(e){i._input=e},r=n,l()(i,r)}return u()(t,e),t.prototype.componentDidMount=function(){h.a.on("shortcut:search",this.focusInput)},
t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.componentWillUnmount=function(){h.a.off("shortcut:search",this.focusInput)},t.prototype.render=function(){return p.a.createElement(g.a,r()({},this.props,{closeIcon:v.a,searchIcon:v.a,onRef:this.onRef}))},t}(p.a.Component);t.a=m},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=n.n(d),h=n(0),f=n.n(h),v=n(29),g=n(22),m=n(2607),y=n.n(m),b=function(e){
function t(n){o()(this,t);var i=l()(this,e.call(this,n));return i.focusInput=function(){i._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.onRef=function(e){var t=i.props.onRef;i._input=e,t&&t(e)},i.state={isFocused:!1,query:n.query},i.searchTimeout=null,i}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){this.state.query!==e.query&&this.setState({query:e.query})},t.prototype.shouldComponentUpdate=function(e,t){return Object(v.a)(this,e,t)},
t.prototype.componentWillUnmount=function(){this.searchTimeout&&clearTimeout(this.searchTimeout)},t.prototype.render=function(){var e=this.props,t=e.closeIcon,n=e.searchIcon,i=this.state,a=i.isFocused,o=i.query;return r()("div",{className:(y.a.container||"")+" "+(a&&y.a.focused||""||""),onClick:this.onClick},void 0,r()(n,{className:y.a.searchIcon,name:"plex-icon-search-560"}),f.a.createElement("input",{"data-qa-id":"quickSearchInput",className:y.a.searchInput,value:o,type:"text",
autoComplete:"off",spellCheck:"false",ref:this.onRef,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur}),o.length>0&&r()(g.a,{onPress:this.onClearPress},void 0,r()(t,{className:y.a.closeIcon,name:"plex-icon-close-560"})))},t}(h.Component);b.defaultProps={query:"",onClick:p.a.func},t.a=b},function(e,t){e.exports={container:"QuickSearchInput-container-1HiCo",focused:"QuickSearchInput-focused-3rEqJ",searchIcon:"QuickSearchInput-searchIcon-38PAh",
closeIcon:"QuickSearchInput-closeIcon-3ZiOR",searchInput:"QuickSearchInput-searchInput-3m6na"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(35)),f=n(29),v=n(80),g=n(284),m=n(2609),y=n(2613),b=n(2637),I=n.n(b),S=function(e){function t(n){o()(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 Object(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.providerEntityID,a=e.scrollTop,o=e.onScrollIntoView,s=e.onScrollPositionChange;return r()(g.a,{page:h.T},void 0,r()(v.a,{className:(I.a.container||"")+" "+(t||""),style:this.state,scrollTop:a,onScrollPositionChange:s},void 0,r()(m.a,{serverEntityID:n,providerEntityID:i}),r()(y.a,{serverEntityID:n,providerEntityID:i,onScrollIntoView:o})))},t}(p.Component);t.a=S},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(11),v=n(6),g=(n.n(v),n(100)),m=n(48),y=n(37),b=n(148),I=n(421),S=n(2610),M={resetQuickSearch:b.resetQuickSearch,selectQuickSearchResult:b.selectQuickSearchResult},D=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onLinkPress=function(e){var t=i.props.serverEntityID
;i.props.resetQuickSearch({serverEntityID:t}),I.a()},i.onLinkFocus=function(e){i.props.selectQuickSearchResult({searchResultEntityID:null})},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){return h.a.createElement(S.a,r()({onLinkPress:this.onLinkPress,onLinkFocus:this.onLinkFocus},this.props))},t}(p.Component);t.a=Object(f.b)(function(){return Object(v.createSelector)(m.a,y.a,function(e){return e.ui.quickSearch},g.a,function(e,t,n,i){return{server:e,provider:t,query:n.query,
channelPlaceholder:n.channelPlaceholder,channelID:n.channelID,channelSearchKey:n.channelSearchKey,isSelected:!n.selectedResultEntityID,searchAllServers:i.searchAllServers}})}(),M)(D)},function(e,t,n){"use strict";function i(e,t,n){return t?Object(c.default)("Search in {channelName}...",{channelName:t}):n?Object(c.default)("Search all servers...",e):Object(c.default)("Show more results...",e)}function r(e){
var t=e.server,n=e.provider,r=e.query,a=e.searchAllServers,s=e.channelPlaceholder,l=e.channelID,c=e.channelSearchKey,p=e.isSelected,h=e.onLinkPress,f=e.onLinkFocus,v=encodeURIComponent(t.machineIdentifier),g=encodeURIComponent(n.identifier),m=encodeURIComponent(r),y=void 0;if(null!=l&&null!=c){var b=encodeURIComponent(l),I=u.join(c,{query:r});y="#!/server/"+v+"/channel/"+b+"/"+encodeURIComponent(I)}else y=t.isCloud?"#!/provider/"+g+"/search/"+m:"#!/server/"+v+"/search/"+m;var S=i(r,s,a)
;return o()(d.a,{isSelected:p,text:S,url:y,onLinkPress:h,onLinkFocus:f})}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(4)),u=n(19),d=(n(95),n(87),n(2611));t.a=r},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.isSelected,i=e.text,r=e.url,o=e.onLinkPress,l=e.onLinkFocus,c=s()(e,["className","isSelected","text","url","onLinkPress","onLinkFocus"]);return u.a.createElement(d.a,a()({className:(t||"")+" "+(n&&h.a.isPlaceholderSelected||""||""),tabIndex:"1",title:i,to:r,
onPress:o,onFocus:l},c),i)}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(22),p=n(2612),h=n.n(p);i.defaultProps={className:h.a.placeholder},t.a=i},function(e,t){e.exports={placeholder:"QuickSearchPlaceholderLink-placeholder-1Wxzp",isPlaceholderSelected:"QuickSearchPlaceholderLink-isPlaceholderSelected-rDCpK"}},function(e,t,n){"use strict";var i=n(11),r=n(6),a=(n.n(r),n(100)),o=n(2614),s=Object(r.createSelector)(function(e){return e.ui.quickSearch},a.a,function(e,t){
return{searches:e.searches}});t.a=Object(i.b)(function(e){return s(e)})(o.a)},function(e,t,n){"use strict";function i(e){var t=e.searches,n=e.onScrollIntoView;return s()("div",{},void 0,t.map(function(e){return u.a.createElement(d.a,a()({},e,{key:e.providerEntityID,isOnlyProvider:1===t.length,onScrollIntoView:n}))}))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2615);t.a=i},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(function(e){
return e.ui.quickSearch},Object(c.a)(),function(e,t){return{title:t.title,selectedResultEntityID:e.selectedResultEntityID}})}function r(e){return o.a.createElement(u.a,e)}var a=n(0),o=n.n(a),s=n(11),l=n(6),c=(n.n(l),n(79)),u=n(2616);t.a=Object(s.b)(i)(r)},function(e,t,n){"use strict";function i(e){var t=e.isLoading,n=e.hubs,i=u()(e,["isLoading","hubs"]);return t?l()("div",{className:y.a.spinnerContainer},void 0,l()(v.a,{className:y.a.spinner})):n.length?l()("div",{},void 0,n.map(function(e){
return h.a.createElement(g.a,o()({key:e.hubIdentifier,title:e.title,metadataResults:e.metadataResults,tagResults:e.tagResults,metricsContext:e.context},i))})):l()("div",{className:y.a.noResults},void 0,Object(f.default)("No Results"))}function r(e){var t=e.title,n=e.isOnlyProvider,r=e.isSearchPending,a=(e.isSearchPopulated,u()(e,["title","isOnlyProvider","isSearchPending","isSearchPopulated"]));return l()("div",{},void 0,!n&&l()("div",{className:y.a.title,"aria-label":"heading","aria-level":"4"
},void 0,t),h.a.createElement(i,o()({isLoading:r&&!e.hubs.length},a)))}var a=n(7),o=n.n(a),s=n(2),l=n.n(s),c=n(13),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(4),v=n(39),g=n(2617),m=n(2636),y=n.n(m);t.a=r},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(29),b=n(1120),I=n(2618),S=n(2634),M=function(e){function t(){return u()(this,t),p()(this,e.apply(this,arguments))}
return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.title,n=e.selectedResultEntityID,i=e.metadataResults,a=e.tagResults,s=l()(e,["title","selectedResultEntityID","metadataResults","tagResults"]);return o()(S.a,{title:t},void 0,i.concat(a).map(function(e,t){return m.a.createElement(b.a,r()({key:e,searchResultEntityID:e,component:I.a,isSelected:n===e},s))}))},t}(g.Component);t.a=M},function(e,t,n){
"use strict";function i(){return Object(g.createSelector)(function(e,t){return t.metricsContext},D.a,C.a,Object(O.a)(),Object(j.a)(),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments[4],a={server:t,provider:n,reasonID:i.reasonID,reasonTitle:i.reasonTitle};if(r){var o=Object(E.c)(r.type,r.subtype)===E.b?A:L,s=Object(x.a)(o,null,r.type,r.subtype,r,y.i);a=d()({metadataKey:r.key,metadataTitle:r.title,metadataType:r.type,typeString:r.type,imageWidth:s.width,
imageHeight:s.height,imageUrl:s.url,resultRoute:Object(M.a)(t,n,r,{context:e})},a)}else{var l=i.tagItem||{},c=m.a.get(l.tagType),u=c&&c.typeString,p=Object(x.a)(L,null,u,null,l,y.i);a=d()({tag:l.tag,tagType:l.tagType,tagTypeString:u,librarySectionType:l.librarySectionType,imageWidth:p.width,imageHeight:p.height,imageUrl:p.url,resultRoute:Object(S.a)(t,n,n.isLibraryProvider?i.reasonID:l.librarySectionKey,{filters:l.filter?l.filter:u+"="+l.id,filterLabel:l.tag,context:e})},a)}return a})}
var r=n(8),a=n.n(r),o=n(9),s=n.n(o),l=n(10),c=n.n(l),u=n(7),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(361)),y=n(31),b=n(421),I=n(34),S=n(122),M=n(1121),D=n(48),C=n(37),O=n(360),j=n(21),P=n(120),w=n(148),T=n(288),E=n(121),x=n(228),N=n(2619),A=28,L=36,k=d()({resetQuickSearch:w.resetQuickSearch,selectQuickSearchResult:w.selectQuickSearchResult,playQuickSearchResult:w.playQuickSearchResult},P),_=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.onLinkPress=function(){var e=i.props.serverEntityID;i.props.resetQuickSearch({serverEntityID:e}),b.a()},i.onResultFocus=function(e){Object(I.a)(function(){i.props.selectQuickSearchResult({searchResultEntityID:e})})},i.onPlayPress=function(e){var t=i.props,n=t.serverEntityID,r=t.providerEntityID;i.props.playQuickSearchResult({serverEntityID:n,providerEntityID:r,
searchResultEntityID:e})},r=n,s()(i,r)}return c()(t,e),t.prototype.render=function(){return f.a.createElement(N.a,d()({},this.props,{onLinkPress:this.onLinkPress,onResultFocus:this.onResultFocus,onPlayPress:this.onPlayPress}))},t}(h.Component);t.a=Object(v.b)(i,k,T.a)(_)},function(e,t,n){"use strict";function i(e){switch(e){case"movie":return[M.a,O.a];case"show":return[M.a,T.a];case"episode":return[M.a,C.a];case"artist":return[M.a,w.a];case"album":return[M.a,D.a];case"track":return[M.a,x.a]
;case"photo":case"photoalbum":case"clip":return[M.a,E.a];case"playlist":return[M.a,j.a];case"collection":return[M.a,P.a];default:return[M.a,A.a]}}function r(e){return[N.a,A.a]}function a(e,t){return t?i(e):r(e)}var o=n(2),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=(n.n(v),
n(84)),m=n.n(g),y=n(29),b=n(134),I=n(22),S=n(437),M=n(708),D=n(433),C=n(230),O=n(294),j=n(2620),P=n(1031),w=n(1032),T=n(710),E=n(715),x=n(709),N=n(2621),A=n(1051),L=n(2623),k=n(2625),_=n(2627),R=n(2633),z=n.n(R),U=function(e){function t(n){c()(this,t);var i=d()(this,e.call(this,n));return i.onItemPress=function(e){e.stopPropagation(),i.state.isActionsMenuOpen&&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.onActionsMenuOpenChange=function(e){i.setState({isActionsMenuOpen:e})},i.state={isActionsMenuOpen:!1},i}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.componentWillUpdate=function(e,t){if(e.isSelected!==this.props.isSelected&&e.isSelected){var n=m.a.findDOMNode(this);this.props.onScrollIntoView({
scrollTop:n.offsetTop})}},t.prototype.render=function(){var e=this,t=this.props,n=t.serverEntityID,i=t.providerEntityID,r=t.searchResultEntityID,o=t.metadataItemEntityID,l=t.server,c=t.provider,u=t.isSelected,d=t.isMetadataItem,p=t.imageWidth,h=t.imageHeight,f=t.imageUrl,v=t.resultRoute,g=t.metadataKey,m=t.metadataTitle,y=t.metadataType,M=t.tag,D=t.tagTypeString,C=t.librarySectionType,O=t.reasonTitle,j=this.state.isActionsMenuOpen,P=d?y:D,w=c.protocols.livetv;return s()(I.a,{component:"div",
"data-qa-id":"quickSearchItemButton",className:(z.a.button||"")+" "+((u||j)&&z.a.selected||""||""),onPress:this.onItemPress,onFocus:this.onItemFocus},void 0,s()(I.a,{className:z.a.underlay,"data-qa-id":"quickSearchItemLink",tabIndex:"1",title:d?m:M,to:v,onPress:v?this.onLinkPress:this.onPlayPress}),s()("div",{className:z.a.overlay},void 0,s()("div",{className:z.a.imageContainer},void 0,d?s()(k.a,{serverEntityID:n,providerEntityID:i,imageWidth:p,imageHeight:h,imageUrl:f,title:m,type:y,
isLiveTVItem:w,recordLink:Object(b.a)(l,c,g,{record:1}),onRecordPress:this.onLinkPress,onPlayPress:this.onPlayPress}):s()(_.a,{serverEntityID:n,providerEntityID:i,imageWidth:p,imageHeight:h,imageUrl:f,title:M,tagType:D,librarySectionType:C})),s()("div",{className:z.a.titles,"data-qa-id":"quickSearchTitleContainer"},void 0,a(P,d).map(function(t,a){var l=a>0,c=l&&!!O;return s()(L.a,{className:l?null:z.a.title,serverEntityID:n,providerEntityID:i,searchResultEntityID:r,metadataItemEntityID:o,
component:c?A.a:t,isSecondary:l,onPress:e.onLinkPress},a)})),d&&!w&&s()(S.a,{"data-qa-id":"quickSearchMoreButton",className:z.a.moreButton,iconClassName:z.a.moreIcon,tabIndex:"-1",serverEntityID:n,providerEntityID:i,metadataItemEntityID:o,showPlayTrailer:!1,showPlayPlexMix:!1,showQueuePlexMix:!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,isMenuOpen:j,onMenuOpenChange:this.onActionsMenuOpenChange})))},t}(v.Component);U.defaultProps={isMetadataItem:!1},t.a=U},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){return{leafCount:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).leafCount}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(1036);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){
return Object(c.createSelector)(Object(u.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{tag:e.tagItem&&e.tagItem.tag}})}function r(e){return s.a.createElement(d.a,e)}var a=n(1),o=(n.n(a),n(0)),s=n.n(o),l=n(11),c=n(6),u=(n.n(c),n(360)),d=n(2622);t.a=Object(l.b)(i)(r)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tag;return a()("span",{className:t},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0));n.n(s);t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.component,i=e.isSecondary,r=c()(e,["className","component","isSecondary"]);return s()("div",{className:(t||"")+" "+(f.a.title||"")+" "+(i&&f.a.isSecondary||""||"")},void 0,p.a.createElement(n,a()({tabIndex:"-1"},r)))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(2624),f=n.n(h);t.a=i},function(e,t){e.exports={title:"QuickSearchTitle-title-2ApAO",isSecondary:"QuickSearchTitle-isSecondary-mxETF"}
},function(e,t,n){"use strict";function i(e){return a.a.createElement(o.a,e)}var r=n(0),a=n.n(r),o=n(722),s=n(2626),l=n.n(s);i.defaultProps={className:l.a.card},t.a=i},function(e,t){e.exports={card:"QuickSearchMetadataPosterCard-card-3_XFi MetadataPosterButtonCard-card-2T8TR"}},function(e,t,n){"use strict";function i(e){return s.a.createElement(l.a,a()({className:u.a.card},e))}var r=n(7),a=n.n(r),o=n(0),s=n.n(o),l=n(751),c=n(2632),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){
switch(e){case"artist":return"track";default:return e}}function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.isOffscreen,a=e.tagType,s=e.librarySectionType,l=e.title,f=e.url,v=e.width,g=e.height,m=e.transitionProps,y=e.onLoad,b=e.onError;if(r)return null;if(f)return o()(h.a,{serverEntityID:t,providerEntityID:n,url:f,width:v,height:g,transitionProps:m,backgroundPosition:"center center",onLoad:y,onError:b});var I=u.a.get(a);if(I&&I.isPerson)return o()(d.a,{name:l,width:v,height:g})
;var S=c.a.get(s),M=S&&S.typeString,D=i(M);return o()(p.a,{type:D,width:v,height:g})}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(166)),u=n(361),d=n(2629),p=n(1060),h=n(723);t.a=r},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.name,i=e.width,r=e.height,o=s()(e,["className","name","width","height"]),l=n.toUpperCase().split(" "),c=l[0].charAt(0),d=l[l.length-1].charAt(0),h=l.length>1?""+c+d:n.charAt(0),f={fontSize:Math.max(14,Math.min(Math.round(i/4),42)),
lineHeight:r+"px"};return u.a.createElement("div",a()({style:f,className:(t||"")+" "+(p.a.anagram||"")},o),h)}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2630),p=n.n(d);i.defaultProps={width:13,height:13},t.a=i},function(e,t){e.exports={anagram:"Anagram-anagram-2KZ_Z"}},function(e,t){e.exports={card:"TagPosterCard-card-RVD0D MetadataPosterCardFace-poster-L2P6r",isPerson:"TagPosterCard-isPerson-1ez1h"}},function(e,t){e.exports={
card:"QuickSearchTagPosterCard-card-3RJG3 TagPosterCard-card-RVD0D MetadataPosterCardFace-poster-L2P6r"}},function(e,t){e.exports={button:"QuickSearchResult-button-1ZHpO",title:"QuickSearchResult-title-1XJ-0",selected:"QuickSearchResult-selected-3xPnw",underlay:"QuickSearchResult-underlay-QgyJt",overlay:"QuickSearchResult-overlay-38WrL",imageContainer:"QuickSearchResult-imageContainer-DvFlp",titles:"QuickSearchResult-titles-3kHPx",moreButton:"QuickSearchResult-moreButton-2Agbk",
moreIcon:"QuickSearchResult-moreIcon-UsTkI"}},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.title;return a()("div",{},void 0,a()("h5",{className:c.a.hubTitle,"data-qa-id":"quickSearchHub"},void 0,n),t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2635)),c=n.n(l);t.a=i},function(e,t){e.exports={hubTitle:"QuickSearchHubContainer-hubTitle-2B0GD"}},function(e,t){e.exports={title:"QuickSearchProvider-title-1DX5M",noResults:"QuickSearchProvider-noResults-2j7_9",
spinnerContainer:"QuickSearchProvider-spinnerContainer-lhn2A",spinner:"QuickSearchProvider-spinner-2_uC9"}},function(e,t){e.exports={container:"QuickSearchResults-container-3IlHh"}},function(e,t){e.exports={container:"QuickSearch-container-2PWkB"}},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(6),m=(n.n(g),
n(11)),y=n(232),b=n(52),I=n(371),S=n(372),M=n(2640),D=Object(g.createSelector)(function(e){return e.ui.provisionPersonalCloudServerPage.isPersonalCloudServerModalOpen},Object(y.a)(b.i),function(e,t){return{isOpen:e,hasTypeFirstSettings:t}}),C={dispatchFetchOauthProviders:I.a,dispatchShowProvisionPersonalCloudServerModal:S.f,dispatchIndicateInterestInPersonalCloudServer:S.c},O=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onClose=function(){r.setState({
isChoosingProvider:!1}),r.props.dispatchShowProvisionPersonalCloudServerModal({open:!1})},r.onNotInterested=function(){r.props.dispatchIndicateInterestInPersonalCloudServer({interested:!1}),r.onClose()},r.onInterested=function(){r.setState({isChoosingProvider:!0})},r.state={isChoosingProvider:!1},r}return p()(t,e),t.prototype.componentWillReceiveProps=function(e){e.isOpen&&!this.props.isOpen&&(this.setState({isChoosingProvider:!1}),this.props.dispatchFetchOauthProviders())},
t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchOauthProviders,e.dispatchShowProvisionPersonalCloudServerModal,e.dispatchIndicateInterestInPersonalCloudServer,o()(e,["dispatchFetchOauthProviders","dispatchShowProvisionPersonalCloudServerModal","dispatchIndicateInterestInPersonalCloudServer"]));return v.a.createElement(M.a,r()({},t,{isChoosingProvider:this.state.isChoosingProvider,onClose:this.onClose,onInterested:this.onInterested,onNotInterested:this.onNotInterested}))},t
}(f.Component);t.a=Object(m.b)(D,C)(O)},function(e,t,n){"use strict";function i(e){var t=e.isChoosingProvider,n=e.isOpen,i=e.hasTypeFirstSettings,r=e.metricsProperties,o=e.onClose,s=e.onInterested,S=e.onNotInterested;return a()(v.a,{size:d.LARGE,isOpen:n,metricsPage:c.v,metricsProperties:r,onModalClose:o},void 0,a()(g.a,{onModalClose:o},void 0,a()(m.a,{className:O.a.header},void 0,a()("div",{className:O.a.personalCloudServerTitle
},void 0,Object(l.default)("Plex Cloud")),Object(l.default)("Your very own Plex Media Server in the cloud. No computer required.")),!t&&a()(y.a,{innerClassName:O.a.innerModalBody},void 0,a()("div",{className:O.a.upsell},void 0,a()("img",{className:O.a.upsellImage,src:M.a}),a()("div",{className:O.a.upsellText
},void 0,a()("p",{},void 0,Object(l.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:O.a.upsellPoint},void 0,Object(l.default)("First, we\u2019ll link your cloud storage to your Plex account. Choose from popular providers like Dropbox and Google Drive.")),a()("li",{className:O.a.upsellPoint
},void 0,Object(l.default)("Next, we\u2019ll create your Plex Cloud. This may take a minute or two.")),a()("li",{className:O.a.upsellPoint},void 0,Object(l.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!"))))),a()(f.a,{component:"div",className:O.a.findOutMore,to:Object(p.default)("#!/account/plex-cloud",i),onPress:o
},void 0,Object(l.default)("Find more Plex Cloud settings or add additional storage providers"))),!t&&a()(b.a,{className:O.a.footer},void 0,a()(f.a,{kind:u.PRIMARY,onPress:S},void 0,Object(l.default)("No thanks, not interested")),a()(I.a,{},void 0,a()(h.a,{kind:u.PRIMARY,size:d.LARGE,onPress:s},void 0,Object(l.default)("Let's do this!")))),t&&j))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(4)),c=n(35),u=n(65),d=n(61),p=n(444),h=n(47),f=n(22),v=n(132),g=n(103),m=n(111),y=n(74),b=n(112),I=n(92),S=n(2641),M=n.n(S),D=n(2642),C=n(2645),O=n.n(C),j=a()(D.a,{});t.a=i},function(e,t){
e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0ZWQgYnkgSWNvTW9vbi5pbyAtLT4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxMDI0IiBoZWlnaHQ9IjEwMjQiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPgo8ZyBpZD0iaWNvbW9vbi1pZ25vcmUiPgo8L2c+CjxwYXRoIGZpbGw9IiNlZWUiIGQ9Ik00OTcuNCA5MTAuNmMtMTMzLTQuNC0yMzcuNy0xMTYuMi0yMzMuNC0yNDkuMiA0LjQtMTMzLjEgMTE2LjItMjM3LjcgMjQ5LjItMjMzLjRzMjM3LjcgMTE2LjIgMjMzLjQgMjQ5LjJjLTQuNCAxMzMuMS0xMTYuMiAyMzcuOC0yNDkuMiAyMzMuNHpNNTExLjggNDcxLjljLTEwOC45LTMuNi0yMDAuMyA4Mi4xLTIwMy45IDE5MXM4Mi4xIDIwMC4zIDE5MC45IDIwMy45YzEwOC45IDMuNiAyMDAuMy04Mi4xIDIwMy45LTE5MC45cy04Mi4xLTIwMC40LTE5MC45LTIwNHoiPjwvcGF0aD4KPHBhdGggZmlsbD0iI2VlZSIgZD0iTTE4OS41IDY3Ni4yYy05LjYtMC4zLTg4LjItNC41LTEzOS44LTU4LjgtMzAuNi0zMi4yLTQ1LjMtNzQuOC00My42LTEyNi43IDEuOC01NC4yIDI3LjYtMTA0LjEgNzAuOC0xMzYuOSAzNi43LTI3LjkgODEuNy00MC4yIDEyNy4yLTM1LjYgMjUuOC0xNTQuNCAxNjIuNi0yNjguMiAzMjEuNC0yNjMgMTE2LjQgMy44IDIyMi4yIDcyLjkgMjczLjIgMTc3LjMgNTguMSAzLjIgMTExLjkgMjcuNiAxNTIuNyA2OS42IDQ0LjMgNDUuNiA2Ny42IDEwNS43IDY1LjUgMTY5LjItNS43IDE3MS43LTE1NC44IDIxMy43LTIwMC40IDIyMi41LTEyIDIuMy0yMy40LTUuNS0yNS43LTE3LjRzNS41LTIzLjQgMTcuNC0yNS43YzQ4LTkuMyAxNjAuMy00NS40IDE2NC43LTE4MC44IDEuNy01MS41LTE3LjItMTAwLjItNTMuMS0xMzcuMi0zNS43LTM2LjctODQtNTctMTM1LjMtNTYuNy05LjEgMC0xNi44LTUuMi0yMC4yLTEzLjItNDEuNy05Ni0xMzYtMTYwLjMtMjQwLjMtMTYzLjgtMTQzLjUtNC43LTI2Ni4yIDEwMy42LTI3OS4zIDI0Ni42LTAuNiA2LjQtMy45IDEyLjEtOS4xIDE1LjhzLTExLjggNS0xOCAzLjVjLTM5LjgtOS42LTgxLjYtMS0xMTQuMiAyMy44cy01Mi4xIDYyLjUtNTMuNCAxMDMuNGMtMS4zIDM5LjYgOS4yIDcxLjUgMzEuMyA5NC45IDQwLjkgNDMuMiAxMDcuMyA0NS4xIDEwOS45IDQ1LjMgMCAwIDAuMSAwIDAuMSAwIDEyLjEgMC40IDIxLjYgMTAuNCAyMS4zIDIyLjQtMC4yIDEyLjEtMTAuMiAyMS43LTIyLjMgMjEuNS0wLjEgMC0wLjQgMC0wLjggMHoiPjwvcGF0aD4KPHBhdGggZmlsbD0iI2VlZSIgZD0iTTUxMi41IDU0My40aC03My45bDczLjkgMTI3LjQtNzMuOSAxMjcuNGg3My45bDczLjktMTI3LjQtNzMuOS0xMjcuNHoiPjwvcGF0aD4KPC9zdmc+Cg=="
},function(e,t,n){"use strict";var i=n(11),r=n(1122),a=n(2643);t.a=Object(i.b)(r.a)(a.a)},function(e,t,n){"use strict";function i(e){var t=e.oauthProviders,n=e.isOauthProvidersPending,i=e.isOauthProvidersPopulated,r=e.oauthProvidersError;return a()(f.a,{innerClassName:g.a.innerModalBody
},void 0,a()("p",{},void 0,Object(u.default)("Choose your cloud storage provider. You can use an existing account or create a new one."),m,Object(u.default)("You'll be able to link additional providers later in settings.")),n&&!i&&a()("div",{className:g.a.providersButtonsSpinner},void 0,y),i&&a()("div",{className:4===t.length?g.a.providerButtonsContainerNarrow:g.a.providerButtonsContainer},void 0,t.map(function(e){var t=e.image,n=e.label,i=e.url;return a()(p.a,{className:g.a.vendorLogoButton,
"aria-label":n,to:l.join([i],{origin:Object(c.a)(window.location.href,"#!/cpms")})},n,a()(h.a,{className:g.a.vendorLogo,src:t}))})),r&&Object(u.default)("An error occurred retrieving cloud storage providers. Please try again."))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(19)),c=n(752),u=n(4),d=n(39),p=n(47),h=n(409),f=n(74),v=n(2644),g=n.n(v),m=a()("br",{}),y=a()(d.a,{});t.a=i},function(e,t){e.exports={
innerModalBody:"PersonalCloudServerChooseProviderModalBody-innerModalBody-2BJPU PersonalCloudServerModal-innerModalBody-wbNiQ ModalBody-innerModalBody-36gmb",providersButtonsSpinner:"PersonalCloudServerChooseProviderModalBody-providersButtonsSpinner-3yoJz",providerButtonsContainer:"PersonalCloudServerChooseProviderModalBody-providerButtonsContainer-3E_52",
providerButtonsContainerNarrow:"PersonalCloudServerChooseProviderModalBody-providerButtonsContainerNarrow-2BXio PersonalCloudServerChooseProviderModalBody-providerButtonsContainer-3E_52",vendorLogoButton:"PersonalCloudServerChooseProviderModalBody-vendorLogoButton-1rQcN Button-button-2kT68 Link-link-2n0yJ",vendorLogo:"PersonalCloudServerChooseProviderModalBody-vendorLogo-21lJX"}},function(e,t){e.exports={personalCloudServerTitle:"PersonalCloudServerModal-personalCloudServerTitle-3B--X",
header:"PersonalCloudServerModal-header-1gfrn ModalHeader-modalHeader-1Kf9R",innerModalBody:"PersonalCloudServerModal-innerModalBody-wbNiQ ModalBody-innerModalBody-36gmb",upsell:"PersonalCloudServerModal-upsell-1RaWE",upsellImage:"PersonalCloudServerModal-upsellImage-2OC3p",upsellText:"PersonalCloudServerModal-upsellText-3KIFG",upsellPoint:"PersonalCloudServerModal-upsellPoint-3wbUp",findOutMore:"PersonalCloudServerModal-findOutMore-2wqwi",
footer:"PersonalCloudServerModal-footer-12h4I ModalFooter-modalFooter-30WIB"}},function(e,t,n){"use strict";var i=n(2647),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(17),c=n(32),u=n(52),d=n(444),p=n(634),h=n(247),f=n(241),v=n(1124),g=s.a.ItemView.extend({id:"nav-dropdown",tagName:"li",className:"nav-dropdown dropdown",template:r.a,ui:{poster:".dropdown-poster-toggle .media-poster",dropdownMenu:".dropdown-menu",accountButton:".account-btn",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","click .keyboard-shortcut-btn":"onKeyboardShortcutClick"},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 h.a({model:this.user,type:"friend",width:34});var e=o.a.debounce(this.updateBadges),t=o.a.debounce(this.onSignedInChange);this.listenTo(this.user,{"change:signedIn":t,"change:username":this.onUsernameChange,"change:home":this.onHomeChange,"change:features.update":this.onFeaturesChange}),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(),hasTypeFirstSettings:!!this.user.get("features").get(u.i),invitesCount:e,unreadAnnouncementsCount:t,totalCount:e+t,appsUrl:this.user.server.get("appsUrl"),
helpUrl:this.user.server.get("helpUrl"),defaultTarget:"_blank"}},getUnreadAnnouncementsCount:function(){return this.user.get("desktop").get("announcements").where({read:!1}).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"))},onFeaturesChange:function(e){
var t=e.get(u.i),n=Object(d.default)("#!/account",t);this.ui.accountButton.attr("href",n)},onSwitchUserClick:function(e){e.preventDefault(),this.user.set("lockState",f.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(function(){l.a.trigger("navigate:refresh:dashboard")})},
onKeyboardShortcutClick:function(e){e.preventDefault();var t=p.a.getInstance();l.a.trigger("show:modal",new v.a({shortcuts:t.shortcuts}))}});t.a=g},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"hidden"}function l(e,t){return"signed-in"}function c(e,t){return"full-user"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p=this,h=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=r.unless.call(t,t&&t.totalCount,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+='">'+h((u=t&&t.totalCount,"function"==typeof u?u.apply(t):u))+'</span> </a> <ul class="dropdown-menu ',u=r.if.call(t,t&&t.signedIn,{
hash:{},inverse:p.noop,fn:p.program(3,l,o),data:o}),(u||0===u)&&(d+=u),d+=" ",u=r.if.call(t,t&&t.isFullUser,{hash:{},inverse:p.noop,fn:p.program(5,c,o),data:o}),(u||0===u)&&(d+=u),d+='"> <li class="signed-in-item dropdown-header username-header"></li> <li class="signed-in-item"><a class="account-btn" href="'+h(i(n(1116)).call(t,"#!/account",t&&t.hasTypeFirstSettings,{hash:{},data:o}))+'">'+h(i(n(3)).call(t,"Account",{hash:{},data:o
}))+'</a></li> <li class="signed-in-item"><a class="users-btn" href="#">'+h(i(n(3)).call(t,"Users",{hash:{},data:o}))+' <span class="invites-badge badge ',u=r.unless.call(t,t&&t.invitesCount,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+='">'+h((u=t&&t.invitesCount,
"function"==typeof u?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">'+h(i(n(3)).call(t,"Watch Later",{hash:{},data:o}))+'</a></li> <li class="signed-in-item full-user-item"><a href="#!/playlist/recommendations">'+h(i(n(3)).call(t,"Recommended",{hash:{},data:o}))+'</a></li> <li class="signed-in-item divider"></li> <li class="announcements-item ',u=r.if.call(t,t&&t.isRestricted,{hash:{},
inverse:p.noop,fn:p.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+='"><a href="#!/announcements">'+h(i(n(3)).call(t,"Announcements",{hash:{},data:o}))+' <span class="announcements-badge badge ',u=r.unless.call(t,t&&t.unreadAnnouncementsCount,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+='">'+h((u=t&&t.unreadAnnouncementsCount,"function"==typeof u?u.apply(t):u))+'</span></a></li> <li><a href="'+h((u=t&&t.appsUrl,
"function"==typeof u?u.apply(t):u))+'" target="_blank">'+h(i(n(3)).call(t,"Get Plex apps",{hash:{},data:o}))+'</a></li> <li><a href="'+h((u=t&&t.helpUrl,"function"==typeof u?u.apply(t):u))+'" target="_blank">'+h(i(n(3)).call(t,"Help",{hash:{},data:o}))+'</a></li> <li><a class="keyboard-shortcut-btn" href="#">'+h(i(n(3)).call(t,"Keyboard Shortcuts",{hash:{},data:o}))+'</a></li> <li class="divider"></li> <li class="signed-in-item switch-user-item ',u=r.unless.call(t,t&&t.home,{hash:{},
inverse:p.noop,fn:p.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+='"><a class="switch-user-btn" href="#">'+h(i(n(3)).call(t,"Switch User...",{hash:{},data:o}))+'</a></li> <li class="signed-out-item"><a class="sign-in-btn" href="#">'+h(i(n(3)).call(t,"Sign In",{hash:{},data:o}))+'</a></li> <li class="signed-in-item full-user-item"><a class="sign-out-btn" href="#">'+h(i(n(3)).call(t,"Sign Out",{hash:{},data:o}))+"</a></li> </ul> "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i="";return i+=' <h5 class="keyboard-shortcuts-header">'+g((n=e&&e.label,typeof n===v?n.apply(e):n))+'</h5> <ul class="list keyboard-shortcuts-list"> ',n=r.each.call(e,e&&e.shortcuts,{hash:{},inverse:m.noop,fn:m.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function l(e,t){var a,o="";return o+=' <li> <span class="keyboard-shortcuts-keys"> ',
a=r.each.call(e,e&&e.keys,{hash:{},inverse:m.noop,fn:m.program(3,c,t),data:t}),(a||0===a)&&(o+=a),o+=' </span> <span class="keyboard-shortcuts-label text-muted">'+g(i(n(3)).call(e,e&&e.label,{hash:{},data:t}))+"</span> </li> "}function c(e,t){var n,i="";return i+=" ",n=r.if.call(e,e&&e.plain,{hash:{},inverse:m.noop,fn:m.program(4,u,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=r.unless.call(e,e&&e.plain,{hash:{},inverse:m.noop,fn:m.program(6,d,t),data:t}),(n||0===n)&&(i+=n),i+=" ",
n=r.if.call(e,e&&e.split,{hash:{},inverse:m.noop,fn:m.program(8,p,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function u(e,t){var n,i="";return i+=' <span class="keyboard-shortcuts-keys-plain">'+g((n=e&&e.s,typeof n===v?n.apply(e):n))+"</span> "}function d(e,t){var n,i="";return i+=' <span class="keyboard-shortcuts-keys-key">'+g((n=e&&e.s,typeof n===v?n.apply(e):n))+"</span> "}function p(e,t){return" <br> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var h,f="",v="function",g=this.escapeExpression,m=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> '+g(i(n(3)).call(t,"Keyboard Shortcuts",{hash:{},data:o}))+' </h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',h=r.each.call(t,t&&t.groups,{
hash:{},inverse:m.noop,fn:m.program(1,s,o),data:o}),(h||0===h)&&(f+=h),f+=" </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(2650),r=n.n(i),a=n(20),o=n(15),s=n(43),l=n(2651),c=a.a.Layout.extend({id:"primary-player-dropdown",tagName:"li",className:"nav-dropdown dropdown",template:r.a,regions:{list:".dropdown-menu"},events:{"click .dropdown-toggle":"onDropdownToggleClick"},initialize:function(e){e||(e={});var t=o.d("appModel");this.players=t.get("players"),this.listenTo(t,{
"change:remotePlayer":this.onRemotePlayerChange,"change:ui.change:audioVideoPlayer.change:providerEntityID":this.render,"change:ui.change:photoPlayer.change:providerEntityID":this.render,"change:isCastApiAvailable":this.render}),this.listenTo(this.players,"update reset",this.render)},serializeData:function(){return{isActive:!!o.d("appModel").get("remotePlayer"),allowRemotePlayer:this.allowRemotePlayer("audioVideoPlayer")&&this.allowRemotePlayer("photoPlayer")}},allowRemotePlayer:function(e){
var t=o.d("appModel"),n=t.get("entities"),i=n.get(s.k),r=t.get("ui").get(e).get("providerEntityID"),a=r&&i.get(r),l=a&&a.get("model");return!l||l.get("allowRemotePlayer")},onRender:function(){this.list.append(new l.a,this.$el)},onRemotePlayerChange:function(e,t){this.render()},onDropdownToggleClick:function(e){this.players.fetch()}});t.a=c},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){var i,r="";return r+=' <a class="dropdown-toggle ',
i=n.if.call(e,e&&e.isActive,{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='" href="#primary-player-dropdown" data-toggle="dropdown"> <i class="',i=n.if.call(e,e&&e.isActive,{hash:{},inverse:d.program(6,l,t),fn:d.program(4,s,t),data:t}),(i||0===i)&&(r+=i),r+='"></i><i class="caret-icon"></i> </a> '}function o(e,t){return"active"}function s(e,t){return"plex-icon-companion-cast-active"}function l(e,t){return"plex-icon-companion-cast"}this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),r=r||{};var c,u="",d=this;return c=n.if.call(t,t&&t.allowRemotePlayer,{hash:{},inverse:d.noop,fn:d.program(1,a,r),data:r}),(c||0===c)&&(u+=c),u+=" "})},function(e,t,n){"use strict";var i=n(2652),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=n(222),c=n(505),u=n(15),d=s.a.ItemView.extend({tagName:"ul",className:"dropdown-menu pull-right",template:r.a,events:{"click .local-player-btn":"onLocalPlayerClick","click .cast-player-btn":"onCastPlayerClick",
"click .plex-player-btn":"onPlexPlayerClick"},initialize:function(e){e||(e={});var t=Object(u.d)("appModel");this.players=t.get("players"),this.listenTo(this.players,"update reset",this.render),this.listenTo(t,"change:isCastApiAvailable",this.render)},serializeData:function(){var e=Object(u.d)("appModel"),t=e.get("isCastApiAvailable"),n=e.get("remotePlayer");return{showCast:t,showPlayers:t||this.players.length,remotePlayer:n?n.toJSON():null,players:this.players.toJSON()}},
onLocalPlayerClick:function(e){e.preventDefault(),Object(u.d)("appStore").dispatch(l.i())},onCastPlayerClick:function(e){e.preventDefault(),Object(u.d)("appStore").dispatch(c.d())},onPlexPlayerClick:function(e){e.preventDefault();var t=o()(e.currentTarget).data("id");Object(u.d)("remotePlexPlayerManager").requestSession(t)}});t.a=d},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r,a=""
;return a+=' <li class="dropdown-header-selected-item"> <span class="dropdown-truncated-label">'+y((r=e&&e.remotePlayer,r=null==r||!1===r?r:r.friendlyName,typeof r===m?r.apply(e):r))+'</span> <span class="dropdown-truncated-label dropdown-secondary-label">'+y((r=e&&e.remotePlayer,r=null==r||!1===r?r:r.product,typeof r===m?r.apply(e):r))+'</span> </li> <li> <a class="local-player-btn" href="#"> <i class="plex-icon-ban-560"></i> '+y(i(n(3)).call(e,"Disconnect",{hash:{},data:t}))+" </a> </li> "}
function l(e,t){var n,i="";return i+=" ",n=r.if.call(e,e&&e.showPlayers,{hash:{},inverse:b.program(12,f,t),fn:b.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function c(e,t){var n,i="";return i+=" ",n=r.if.call(e,e&&e.showCast,{hash:{},inverse:b.noop,fn:b.program(5,u,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=r.each.call(e,e&&e.players,{hash:{},inverse:b.noop,fn:b.program(10,h,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function u(e,t){var a,o=""
;return o+=' <li> <a class="cast-player-btn" href="#"> <span class="dropdown-truncated-label">'+y(i(n(3)).call(e,"Cast...",{hash:{},data:t}))+"</span> ",a=r.if.call(e,e&&e.selected,{hash:{},inverse:b.noop,fn:b.program(6,d,t),data:t}),(a||0===a)&&(o+=a),o+=" </a> </li> ",a=r.if.call(e,e&&e.players,{hash:{},inverse:b.noop,fn:b.program(8,p,t),data:t}),(a||0===a)&&(o+=a),o+=" "}function d(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function p(e,t){
return' <li class="divider"></li> '}function h(e,t){var n,i="";return i+=' <li> <a class="plex-player-btn dropdown-composite-link" data-id="'+y((n=e&&e.machineIdentifier,typeof n===m?n.apply(e):n))+'" href="#"> <span class="dropdown-truncated-label">'+y((n=e&&e.friendlyName,typeof n===m?n.apply(e):n))+'</span> <span class="dropdown-truncated-label dropdown-secondary-label text-muted">'+y((n=e&&e.product,typeof n===m?n.apply(e):n))+"</span> ",n=r.if.call(e,e&&e.selected,{hash:{},inverse:b.noop,
fn:b.program(6,d,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> </li> "}function f(e,t){var r="";return r+=' <li class="dropdown-menu-item"> <a class="disabled">'+y(i(n(3)).call(e,"No players found",{hash:{},data:t}))+"</a> </li> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var v,g="",m="function",y=this.escapeExpression,b=this;return v=r.if.call(t,t&&t.remotePlayer,{hash:{},inverse:b.program(3,l,o),fn:b.program(1,s,o),data:o}),(v||0===v)&&(g+=v),g+=" "})},function(e,t,n){
"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=n(17),c=s.a.Region.extend({resizeSubscribersCallbacks:[],scrollSubscribersCallbacks:[],sidebarDelay:200,scrollDelay:100,initialize:function(e){r.a.bindAll(this,"onResize","onScroll","onScrollEvent","onSidebarChange"),this.$el=o()(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(r.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(r.a.indexOf(this.scrollSubscribersCallbacks,e),1),
0===this.scrollSubscribersCallbacks.length&&this.$el.off("scroll",this.onScroll)},onResize:function(){this.updateSize(),r.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(),r.a.each(this.scrollSubscribersCallbacks,function(e){e(this.scrollPosition)},this)},onSidebarChange:function(e){
"sidebar"===e&&r.a.delay(this.onResize,this.sidebarDelay)}});t.a=c},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(287)),s=n(40),l=n(56),c=n(186),u=n(234),d=n(235),p=n(445),h=n(138),f=n(66),v=r()(h.a,{}),g=l.a.extend({component:function(e){var t=e.selectedServerID,n=e.params||{},i=Object(s.a)(o.SERVER,t);return r()(c.a,{metricsContext:n.context},void 0,r()(f.a,{},void 0,v,r()(u.a,{machineIdentifier:e.selectedServerID},void 0,r()(d.a,{},void 0,r()(p.a,{machineIdentifier:t,
serverEntityID:i,directoryKey:n.key})))))}});t.a=g},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.machineIdentifier,i=e.isWaitingForPrimaryServer,r=e.primaryServerEntityID,a=c()(e,["children","machineIdentifier","isWaitingForPrimaryServer","primaryServerEntityID"]),o=Object(f.a)(h.m,n),l=!o||o===r;return r&&l?p.a.createElement(y.a,s()({serverEntityID:r},a),t):i||!l?b:I}var r=n(2),a=n.n(r),o=n(7),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),
n(0)),p=n.n(d),h=n(43),f=n(40),v=n(39),g=n(1125),m=n(157),y=n(2663),b=a()(m.a,{},void 0,a()(v.a,{})),I=a()(g.a,{});t.a=i},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(549)),a=Object(i.createSelector)(r.a,function(e){return e.filter(function(e){return e.isPersonalCloudServer})});t.a=a},function(e,t,n){"use strict";function i(e){
var t=e.server,n=e.outOfDateServers,i=e.isDownForMaintenance,r=e.hasFailedResources,o=e.hasPlexPass,s=e.isUserRestricted,u=e.canProvisionPersonalCloudServer,d=e.onDownloadServer,g=e.onLinkPersonalCloudServerPress;return n.length?a()(p.a,{selectedServer:t,outOfDateServers:n}):i?f:r?v:s?a()(c.a,{title:Object(l.default)("No shared libraries"),description:Object(l.default)("A user in your home needs to share a library with you")}):a()(h.a,{hasPlexPass:o,canProvisionPersonalCloudServer:u,
onDownloadServer:d,onLinkPersonalCloudServerPress:g})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(126),u=n(302),d=n(1127),p=n(2659),h=n(2661),f=a()(d.a,{}),v=a()(u.a,{});t.a=i},function(e,t){e.exports={icon:"ErrorPage-icon-ZJ38x EmptyPage-icon-31D3Z"}},function(e,t,n){"use strict";function i(e){
var t=e.selectedServer,n=e.outOfDateServers,i=t&&t.isOutOfDate?Object(c.default)('The server "{serverName}" is out of date and cannot be selected. This version of the web app requires Plex Media Server {version} or higher. Use one of the links below to open an available, out of date server directly.',{serverName:t.friendlyName,version:"1.3.0"
}):Object(c.default)("This version of the web app requires Plex Media Server {version} or higher. Use one of the links below to open an available, out of date server directly.",{version:"1.3.0"});return a()(h.a,{title:Object(c.default)("Update your Plex Media Server"),description:i},void 0,a()("div",{},void 0,n.map(function(e){var t=e.activeConnection,n=e.isShared;return t?a()(p.a,{className:v.a.updateLink,to:u.join([t.uri,n?"/web/index.html":"/web/index.html#!/settings/server"]),
target:"_blank",kind:d.b.PRIMARY,size:d.e.LARGE},e.machineIdentifier,e.friendlyName):a()("span",{className:v.a.updateDisabledLink},e.machineIdentifier,Object(c.default)("{serverName} (Unavailable)",{serverName:e.friendlyName}))})))}var r=n(2),a=n.n(r),o=n(1),s=n.n(o),l=n(0),c=(n.n(l),n(4)),u=n(19),d=n(24),p=n(22),h=n(126),f=n(2660),v=n.n(f);s.a.shape({friendlyName:s.a.string.isRequired,isShared:s.a.bool.isRequired,activeConnection:s.a.shape({uri:s.a.string.isRequired})});t.a=i},function(e,t){
e.exports={updateLink:"ServerUpdateRequiredPage-updateLink-2Enej",updateDisabledLink:"ServerUpdateRequiredPage-updateDisabledLink-2AETO ServerUpdateRequiredPage-updateLink-2Enej"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(114),v=n(24),g=n(29),m=n(80),y=n(22),b=n(47),I=n(532),S=n(2662),M=n.n(S),D=n(1128),C=n.n(D),O={context:f.j,firstRun:!0},j=function(e){function t(n,i){o()(this,t)
;var r=l()(this,e.call(this,n,i));return r.onDownloadPress=function(e){r.setState({isDownloadStep:!1}),r.props.onDownloadServer(e.currentTarget.dataset.type)},r.onPlexPassModalClose=function(){r.setState({isPlexPassModalOpen:!1})},r.state={isDownloadStep:!0,isPlexPassModalOpen:!n.hasPlexPass},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(g.a)(this,e,t)},t.prototype.render=function(){
var e=this.state,t=e.isDownloadStep,n=e.isPlexPassModalOpen,i=this.props,a=i.canProvisionPersonalCloudServer,o=i.onLinkPersonalCloudServerPress,s=void 0
;return s=t?a?Object(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."):Object(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."):Object(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."),
r()(m.a,{className:M.a.emptyPage},void 0,r()("div",{className:M.a.content},void 0,r()("img",{className:M.a.pmsLogo,src:C.a}),r()("div",{className:M.a.title},void 0,t?Object(h.default)("Get your Plex Media Server"):Object(h.default)("Install your new server")),r()("div",{className:M.a.description},void 0,s),t&&a&&r()(b.a,{className:M.a.button,kind:v.b.PRIMARY,size:v.e.LARGE,onPress:o},void 0,Object(h.default)("Set up Plex Cloud")),t&&r()(b.a,{className:M.a.button,kind:v.b.PRIMARY,size:v.e.LARGE,
"data-type":"computer",onPress:this.onDownloadPress},void 0,Object(h.default)("Download Plex Media Server")),!t&&r()("div",{className:M.a.downloadMessage},void 0,Object(h.default)("Need to download different server?")),!t&&r()(y.a,{kind:v.b.PRIMARY,"data-type":"computer",onPress:this.onDownloadPress},void 0,Object(h.default)("Download for Computer Platforms")),r()(y.a,{kind:v.b.PRIMARY,"data-type":"nas",onPress:this.onDownloadPress
},void 0,Object(h.default)("Download for NAS Platforms"))),r()(I.a,{metricsProperties:O,isOpen:n,onModalClose:this.onPlexPassModalClose}))},t}(p.Component);t.a=j},function(e,t){e.exports={emptyPage:"ServerDownloadRequiredPage-emptyPage-2rkKB EmptyPage-emptyPage-2AM9u",content:"ServerDownloadRequiredPage-content-CK6sE EmptyPage-content-10PgB",title:"ServerDownloadRequiredPage-title-3HyW3 EmptyPage-title-264Jp",description:"ServerDownloadRequiredPage-description-3LRBR EmptyPage-description-oYWtW",
pmsLogo:"ServerDownloadRequiredPage-pmsLogo-RreDd",button:"ServerDownloadRequiredPage-button-1QeiU",downloadMessage:"ServerDownloadRequiredPage-downloadMessage-sP7Ud"}},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(Object(d.a)(),function(e){var t=s.a.pick(e,"friendlyName","isConnected","isPending","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","hasHttpsConnections");return a()({},t,{isHostedHttps:u.a.isHostedHttps})})}
var r=n(7),a=n.n(r),o=n(5),s=n.n(o),l=n(11),c=n(6),u=(n.n(c),n(83)),d=n(42),p=n(2664);t.a=Object(l.b)(i)(p.a)},function(e,t,n){"use strict";function i(e){
var t=e.children,n=e.friendlyName,i=e.isConnected,r=e.isUnavailable,o=e.isUnauthorized,l=e.isFullServer,c=e.isFullOwnedServer,p=e.isHostedHttps,f=e.hasHttpsConnections,m=e.requiresFullServer,y=e.requiresFullOwnedServer,b=s()(e,["children","friendlyName","isConnected","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","isHostedHttps","hasHttpsConnections","requiresFullServer","requiresFullOwnedServer"]);if(i){if(m&&!l||y&&!c)return a()(v.a,{
title:Object(d.default)("You're not supposed to be here"),description:n?Object(d.default)('This page is restricted from the server "{serverName}"',{serverName:n}):Object(d.default)("This page is restricted from this server")});var I=u.a.Children.only(t);return u.a.cloneElement(I,b)}return r?p&&!f?a()(h.a,{serverEntityID:e.serverEntityID}):a()(v.a,{title:n?Object(d.default)('The server "{serverName}" is unavailable',{serverName:n}):Object(d.default)("This server is unavailable"),
description:Object(d.default)("Plex will automatically try to reconnect to this server")}):o?a()(v.a,{title:Object(d.default)("No soup for you!"),description:Object(d.default)("You do not have access to this server")}):g}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(4),p=n(39),h=n(2665),f=n(157),v=n(126),g=a()(f.a,{},void 0,a()(p.a,{}));t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(l.a)(),function(e){return{
friendlyName:e.friendlyName}})}function r(e){return{onReloadHttpPress:function(t){e(Object(s.e)())},onReloadHttpAlwaysPress:function(t){e(Object(s.d)()),e(Object(s.e)())}}}var a=n(11),o=n(6),s=(n.n(o),n(106)),l=n(42),c=n(2666);t.a=Object(a.b)(i,r)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.friendlyName,n=e.onReloadHttpPress,i=e.onReloadHttpAlwaysPress;return a()(p.a,{className:g.a.emptyPage},void 0,a()("div",{className:g.a.content},void 0,a()("img",{className:g.a.pmsLogo,src:y.a
}),a()("div",{className:g.a.title},void 0,Object(l.default)('The server "{serverName}" does not allow secure connections',{serverName:t})),a()("div",{className:g.a.description},void 0,Object(l.default)('Its "Secure connections" setting may be set to disabled, or you may need to adjust some settings on your network.'),b,a()(d.a,{message:Object(l.default)("You can {openLink}learn more about secure connections here{closeLink}."),tags:[{open:"openLink",close:"closeLink",component:h.a,
to:"https://support.plex.tv/hc/en-us/articles/206225077-How-to-Use-Secure-Server-Connections",kind:c.PRIMARY,target:"_blank"}]}),I,Object(l.default)("You can also allow insecure connections now, which will reload the app insecurely.")),a()(f.a,{className:g.a.button,kind:c.PRIMARY,size:u.LARGE,onPress:n},void 0,Object(l.default)("Allow once")),a()(f.a,{className:g.a.button,kind:c.PRIMARY,size:u.LARGE,onPress:i},void 0,Object(l.default)("Allow always"))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(4)),c=n(65),u=n(61),d=n(199),p=n(80),h=n(22),f=n(47),v=n(2667),g=n.n(v),m=n(1128),y=n.n(m),b=a()("br",{}),I=a()("br",{});t.a=i},function(e,t){e.exports={emptyPage:"InsecureFallbackChoicePage-emptyPage-3RqTd EmptyPage-emptyPage-2AM9u",content:"InsecureFallbackChoicePage-content-hP24c EmptyPage-content-10PgB",title:"InsecureFallbackChoicePage-title-fSQV1 EmptyPage-title-264Jp",description:"InsecureFallbackChoicePage-description-3qJXg EmptyPage-description-oYWtW",
pmsLogo:"InsecureFallbackChoicePage-pmsLogo-rf-KR",button:"InsecureFallbackChoicePage-button-Hd0hl"}},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e,t){return t.directoryKey},function(e,t){var n=!1,i=void 0;if(e&&e.length)if(t)for(var r=0;!i&&r<e.length;){var a=e[r++];n=a.hubKey===t,(n||a.key===t)&&(i=a)}else i=e[0],n=!!i.hubKey;return null==i&&null!=t&&(i={key:t}),{isHubKey:n,directory:i}})}var r=n(6),a=(n.n(r),n(303));t.a=i},function(e,t,n){
"use strict";function i(){return Object(r.createSelector)(Object(s.a)(),Object(o.a)(),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?{isChannelGrid:!0,title:Object(a.default)("Channels"),key:"/"+t.identifier+"/grid"}:null})}t.a=i;var r=n(6),a=(n.n(r),n(4)),o=n(79),s=n(2670)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(l.a)(),Object(c.a)(),u.a,function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=arguments[2];return e.protocols&&e.protocols.includes(s.b.LIVE_TV)&&n[d.f]&&Object(a.a)(t.version,o.a.channelGrid)})}t.a=i;var r=n(6),a=(n.n(r),n(395)),o=n(192),s=n(55),l=n(79),c=n(42),u=n(144),d=n(52)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.showSpinner,r=e.isHubKey,o=e.isTimeline,l=e.isChannelsGrid,u=e.selectedDirectory,d=e.activeType,h=e.activeFilters,f=e.activeFilterLabel,v=e.activeSort,M=e.activeLimit,D=e.customFilter,C=e.typeKey,O=e.folderKey,j=e.folderTitle,P=e.parentFolderKey,w=e.parentFolderTitle,T=e.component,E=c()(e,["serverEntityID","providerEntityID","showSpinner","isHubKey","isTimeline","isChannelsGrid","selectedDirectory","activeType","activeFilters","activeFilterLabel","activeSort","activeLimit","customFilter","typeKey","folderKey","folderTitle","parentFolderKey","parentFolderTitle","component"])
;return i?I:u&&T?p.a.createElement(T,s()({serverEntityID:t,providerEntityID:n,selectedDirectory:u,activeType:d,activeSort:v},E)):u&&r?a()(g.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:u}):u&&o?a()(y.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:u}):u&&l?a()(b.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:u,activeFilters:h,activeFilterLabel:f}):u?a()(m.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:u,activeType:d,activeFilters:h,activeFilterLabel:f,
activeSort:v,activeLimit:M,customFilter:D,typeKey:C,folderKey:O,folderTitle:j||u.title,parentFolderKey:P,parentFolderTitle:w}):S}var r=n(2),a=n.n(r),o=n(7),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(39),f=n(157),v=(n(115),n(756)),g=n(2672),m=n(2774),y=n(2895),b=n(2917),I=a()(f.a,{},void 0,a()(h.a,{})),S=a()(v.a,{});i.defaultProps={isTimeline:!1},t.a=i},function(e,t,n){"use strict";function i(){return Object(b.createSelector)(M.a,Object(C.a)(),Object(D.a)(),function(e){
return e.ui.dashboardPage},function(e,t){return t.selectedDirectory.hubKey},function(e,t){return t.selectedDirectory.isHomeDirectory},N,j.a,x,function(e,t,n,i,r,a,o,s,l){var c=i.hubs||[],u=!Object(I.a)(i.knownPromotedHubCloudProviderIDs,e.desktop.providers),d=!(u||t.isCloud||!a||!e.desktop.isProvidersPopulated||!t.desktop.isProvidersPopulated),p=d&&o&&!i.hubsError,h=i.isHubsPending||p&&i.isPromotedHubsPending;return{providerIdentifier:n.identifier,providerMetricsIdentifier:n.metricsIdentifier,
isProgramGuide:S.c.EPG_IDENTIFIER.test(n.identifier),hubKey:r,hubEntityIDs:c,promotedHubEntityIDs:l,hasProvidersChanged:u,showPromotedHubs:d,isHubsPending:h,hubsError:i.hubsError,isEmpty:o,activeSelectionType:s.activeSelectionType}})}function r(e,t){return{dispatchFetchPromotedHubs:function(){e(Object(w.b)())},dispatchPopulatePromotedHubs:function(){e(Object(w.d)())},onProviderChange:function(n){e(Object(P.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,
providerEntityID:t.providerEntityID,providerIdentifier:n,sectionID:null}))}}}function a(e){var t=e.ui.dashboardPage;return{providerEntityID:t.providerEntityID,hubKey:t.hubKey}}function o(e,t){e(Object(w.c)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,hubKey:t.hubKey})),e(Object(w.a)({options:{onlyTransient:!0}}))}var s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),
n(2673)),S=n(55),M=n(200),D=n(79),C=n(42),O=n(1004),j=n(88),P=n(148),w=n(1130),T=n(202),E=n(2674),x=Object(b.createSelector)(function(e){return e.ui.dashboardPage},function(e){return e.isHubsPending||e.hubsError?[]:e.promotedHubs}),N=Object(b.createSelector)(O.a,function(e){return e.ui.dashboardPage.hubs},x,function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],i=t.concat(n),r=i.length;r-- >0;){var a=i[r],o=e[a];if(o.size||o.totalSize)return!1}return!0
}),A=function(e){function t(){return u()(this,t),p()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.componentDidMount=function(){this.props.hasProvidersChanged?this.props.dispatchFetchPromotedHubs():this.props.showPromotedHubs&&this.props.dispatchPopulatePromotedHubs()},t.prototype.componentDidUpdate=function(e){
this.props.hasProvidersChanged&&!e.hasProvidersChanged?this.props.dispatchFetchPromotedHubs():this.props.showPromotedHubs&&!e.showPromotedHubs&&this.props.dispatchPopulatePromotedHubs()},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchPromotedHubs,e.dispatchPopulatePromotedHubs,l()(e,["dispatchFetchPromotedHubs","dispatchPopulatePromotedHubs"]));return m.a.createElement(E.a,t)},t}(g.Component),L=Object(T.a)(A,a,o);t.a=Object(y.b)(i,r)(L)},function(e,t,n){"use strict"
;function i(e,t){return e.length===t.length&&0===a.a.difference(e,t).length}t.a=i;var r=n(5),a=n.n(r)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(35)),f=n(101),v=n(187),g=n(261),m=n(373),y=n(733),b=n(552),I=n(1133),S=n(2693),M=n(2698),D=n(2712),C=n(2773),O=n.n(C),j=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentDidMount=function(){
this.props.onProviderChange(this.props.providerIdentifier)},t.prototype.componentDidUpdate=function(e){this.props.providerIdentifier!==e.providerIdentifier&&this.props.onProviderChange(this.props.providerIdentifier)},t.prototype.componentWillUnmount=function(){this.props.onProviderChange(null)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.providerIdentifier,a=e.providerMetricsIdentifier,o=e.isProgramGuide,s=e.selectedDirectory,l=e.activeSelectionType,c=e.hubEntityIDs,u=e.promotedHubEntityIDs,d=e.isHubsPending,p=e.hubsError,C=e.isEmpty,j=e.showPromotedHubs,P=e.onRepopulate;return r()(v.a,{metricsPage:h.x,metricsProperties:{identifier:a,type:s.type},allowBackgroundLightPreset:!0,scrollDirection:f.NONE},void 0,l?r()(m.a,{serverEntityID:t,providerEntityID:n}):r()(M.a,{
serverEntityID:t,providerEntityID:n,selectedDirectory:s}),r()(D.a,{serverEntityID:t,providerEntityID:n}),r()(g.a,{innerClassName:O.a.dashboardPageContent},void 0,C&&r()(S.a,{serverEntityID:t,providerEntityID:n,providerIdentifier:i,isPending:d,error:p,onRepopulate:P}),!C&&r()(y.a,{serverEntityID:t,providerEntityID:n,hubEntityIDs:c}),!C&&j&&r()(y.a,{serverEntityID:t,providerEntityID:n,hubEntityIDs:u,isPromoted:!0}),o&&!C&&r()(b.a,{className:O.a.attribution,providerEntityID:n})),o&&r()(I.a,{
serverEntityID:t,providerEntityID:n}))},t}(p.Component);t.a=j},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.metricsPage,i=e.metricsProperties,r=e.isMetricsDelegated,o=s()(e,["children","metricsPage","metricsProperties","isMetricsDelegated"]);return u.a.createElement(d.a,a()({},i,{page:n,isDelegated:r}),u.a.createElement(p.a,a()({className:f.a.page},o),t))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(284),p=n(1131),h=n(2676),f=n.n(h);t.a=i
},function(e,t){e.exports={page:"Page-page-aq7i_"}},function(e,t){e.exports={pageContent:"PageContent-pageContent-16mK6",innerPageContent:"PageContent-innerPageContent-3ktLT"}},function(e,t,n){"use strict";function i(e){var t=e.selectedItemsCount,n=e.toolbarComponent,i=e.onDeselectAllPress,r=c()(e,["selectedItemsCount","toolbarComponent","onDeselectAllPress"]);return s()(g.a,{className:S.a.multiSelectPageHeader},void 0,s()(m.a,{},void 0,s()("div",{className:S.a.selectedTitle},void 0,s()(f.a,{
name:"plex-icon-selected-560",className:S.a.icon}),1===t?Object(h.default)("1 item selected"):Object(h.default)("{selectedItemsCount} items selected",{selectedItemsCount:t})),s()(v.a,{className:S.a.deselectLink,onPress:i},void 0,s()(f.a,{name:"plex-icon-remove-560",className:S.a.icon}),Object(h.default)("Deselect All"))),s()(y.a,{},void 0,p.a.createElement(n,a()({selectedItemsCount:t},r))))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),
n(0)),p=n.n(d),h=n(4),f=n(26),v=n(22),g=n(188),m=n(189),y=n(204),b=n(2682),I=n(2690),S=n.n(I);i.defaultProps={toolbarComponent:b.a},t.a=i},function(e,t){e.exports={pageHeader:"PageHeader-pageHeader-18RSw"}},function(e,t){e.exports={pageHeaderLeft:"PageHeaderLeft-pageHeaderLeft-2TxSo"}},function(e,t){e.exports={pageHeaderRight:"PageHeaderRight-pageHeaderRight-2CT0g"}},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(l.a,u.a,d.a,p.a,c.a,function(e,t,n,i,r){
var a=t.activeSelectionItems,s=t.activeSelectionType,l=a.map(function(t){return o()({},t,{model:e[t.model]})}),c=Object(f.a)(n,i,r,l,s),u=c.showMarkPlayed||c.showMarkUnplayed;return o()({activeSelectionType:s,showTogglePlayed:u},c)})}function r(e,t){var n={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metricsPage:t.metricsPage};return{onPlaySelectedPress:function(){e(h.o(n))},onShufflePress:function(){e(h.t(n))},onPlaySelectedNextPress:function(){e(h.p(n))},
onAddToQueuePress:function(){e(h.b(n))},onAddToPlaylistPress:function(){e(h.a(n))},onFavoritePress:function(){e(h.i(n))},onUnfavoritePress:function(){e(h.v(n))},onMarkPlayedConfirm:function(){e(h.j(n))},onMarkUnplayedConfirm:function(){e(h.k(n))},onEditPress:function(){e(h.h(n))},onRefreshPress:function(){e(h.q(n))},onAnalyzePress:function(){e(h.c(n))},onMergePress:function(){e(h.l(n))},onSyncPress:function(){e(h.u(n))},onOptimizePress:function(){e(h.n(n))},onDeleteConfirm:function(){e(h.d(n))},
onDeselectAllPress:function(){e(h.e(n))}}}var a=n(7),o=n.n(a),s=n(6),l=(n.n(s),n(110)),c=n(144),u=n(88),d=n(48),p=n(37),h=n(366),f=n(2683),v=n(57),g=n(2684);t.a=Object(v.a)(i,r)(g.a)},function(e,t,n){"use strict";function i(e){return e.map(function(e){return e.model.type})}function r(e,t,n,i){return S.a.every(i.map(function(i){var r=i.model;return Object(D.j)(e,t,n,r)}))}function a(e,t,n,i){return S.a.every(i.map(function(i){var r=i.model;return Object(D.k)(e,t,n,r)}))}function o(e,t,n,i){
return S.a.every(i.map(function(i){var r=i.model;return Object(D.a)(e,t,n,r)}))}function s(e,t,n,i){return S.a.every(i.map(function(i){var r=i.model;return Object(D.b)(e,t,n,r)}))}function l(e,t,n,i){return S.a.some(i.map(function(i){var r=i.model;return Object(D.f)(e,t,n,r)}))}function c(e,t,n,i){return S.a.every(i.map(function(i){var r=i.model;return Object(D.o)(e,t,n,r)}))}function u(e,t,n,i){return S.a.some(i.map(function(i){var r=i.model;return Object(D.g)(e,t,n,r)}))}function d(e,t,n,i){
return S.a.some(i.map(function(i){var r=i.model;return Object(D.h)(e,t,n,r)}))}function p(e,t,n,r){var a=i(r);return!(S.a.uniq(a).length>1)&&S.a.every(r.map(function(i){var r=i.model;return Object(D.e)(e,t,n,r)}))}function h(e,t,n,i){return S.a.every(i.map(function(i){var r=i.model;return Object(D.l)(e,t,n,r)}))}function f(e,t,n,i){return S.a.every(i.map(function(i){var r=i.model;return Object(D.c)(e,t,n,r)}))}function v(e,t,n,r){if(!p(e,t,n,r))return!1;var a=i(r)
;return 1!==a.length&&(!(S.a.uniq(a).length>1)&&S.a.every(a,function(e){return-1!==j.indexOf(e)}))}function g(e,t,n,i){return S.a.every(i.map(function(i){var r=i.model;return Object(D.n)(e,t,n,r)}))}function m(e,t,n,i){return S.a.every(i.map(function(i){var r=i.model;return Object(D.i)(e,t,n,r)}))}function y(e,t,n,i){return S.a.every(i.map(function(i){var r=i.model;return Object(D.d)(e,t,n,r)}))}function b(e,t,n,i,r){var a=O[r]
;return Object(M.a)(Array.isArray(a),"getMultiSelectActionProps: Invalid type, "+r+", provided"),a.reduce(function(a,o){var s=C[o];return Object(M.a)(S.a.isFunction(s),"getMultiSelectActionProps: Invalid action, "+o+", for "+r),a[o]=s(e,t,n,i),a},{})}t.a=b;var I=n(5),S=n.n(I),M=n(33),D=n(201),C={showPlay:r,showShuffle:r,showQueue:a,showAddToAlbum:o,showAddToPlaylist:s,showMarkPlayed:u,showMarkUnplayed:d,showFavorite:l,showUnfavorite:c,showEdit:p,showRefresh:h,showAnalyze:f,showMerge:v,
showSync:g,showOptimize:m,showDelete:y},O={video:["showPlay","showShuffle","showQueue","showAddToPlaylist","showMarkPlayed","showMarkUnplayed","showEdit","showRefresh","showAnalyze","showMerge","showSync","showOptimize","showDelete"],audio:["showPlay","showShuffle","showQueue","showAddToPlaylist","showEdit","showRefresh","showAnalyze","showMerge","showSync","showDelete"],
photo:["showPlay","showShuffle","showAddToAlbum","showFavorite","showUnfavorite","showEdit","showAnalyze","showSync","showDelete"],playlist:["showDelete"],collection:["showDelete"]},j=["movie","show","season","artist","album"]},function(e,t,n){"use strict";function i(e){return 1===e?Object(b.default)("Are you sure you want to mark this item as played?"):Object(b.default)("Are you sure you want to mark these {selectedItemsCount} items as played?",{selectedItemsCount:e})}function r(e){
return 1===e?Object(b.default)("Are you sure you want to mark this item as unplayed?"):Object(b.default)("Are you sure you want to mark these {selectedItemsCount} items as unplayed?",{selectedItemsCount:e})}function a(e,t){var n=1===e;return t===S.i?n?Object(b.default)("Are you sure you want to delete this playlist?"):Object(b.default)("Are you sure you want to delete these {selectedItemsCount} playlists?",{selectedItemsCount:e
}):t===S.d?n?Object(b.default)("Are you sure you want to delete this collection?"):Object(b.default)("Are you sure you want to delete these {selectedItemsCount} collections?",{selectedItemsCount:e}):n?Object(b.default)("Are you sure you want to delete this item from your filesystem?"):Object(b.default)("Are you sure you want to delete these {selectedItemsCount} items from your filesystem?",{selectedItemsCount:e})}
var o=n(7),s=n.n(o),l=n(2),c=n.n(l),u=n(8),d=n.n(u),p=n(9),h=n.n(p),f=n(10),v=n.n(f),g=n(1),m=(n.n(g),
n(0)),y=n.n(m),b=n(4),I=n(17),S=n(28),M=n(35),D=n(29),C=n(54),O=n(24),j=n(26),P=n(758),w=n(154),T=n(127),E=n(759),x=n(760),N=n(761),A=n(762),L=n(2687),k=n(1132),_=n(764),R=n(551),z=n(2689),U=["showPlay","showShuffle","showAddToAlbum","showAddToPlaylist","showFavorite","showUnfavorite","showTogglePlayed","showEdit","showSync"],B=["showRefresh","showAnalyze","showMerge","showOptimize","showDelete"],V=c()(j.a,{name:"plex-icon-favorite-empty-560"}),F=c()(j.a,{name:"plex-icon-favorite-full-560"
}),Q=function(e){function t(n,i){d()(this,t);var r=h()(this,e.call(this,n,i));return r.onPlaySelectedShortcut=function(){var e=r.props,t=e.showPlay,n=e.showPlayOverflow,i=e.onPlaySelectedPress;(t||n)&&i()},r.onToggleWatchedShortcut=function(){var e=r.props,t=e.showMarkPlayed,n=e.showMarkUnplayed;t?r.setState({isConfirmMarkPlayedModalOpen:!0}):n&&r.setState({isConfirmMarkUnplayedModalOpen:!0})},r.onEditShortcut=function(){var e=r.props,t=e.showEdit,n=e.showEditOverflow,i=e.onEditPress;(t||n)&&i()
},r.onActionsPress=function(e){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen})},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.onMarkPlayedPress=function(e){r.setState({isConfirmMarkPlayedModalOpen:!0})},r.onMarkUnplayedPress=function(e){r.setState({isConfirmMarkUnplayedModalOpen:!0})},r.onMarkPlayedConfirm=function(){r.setState({isConfirmMarkPlayedModalOpen:!1}),r.props.onMarkPlayedConfirm()},r.onMarkPlayedCancel=function(){r.setState({
isConfirmMarkPlayedModalOpen:!1})},r.onMarkUnplayedConfirm=function(){r.setState({isConfirmMarkUnplayedModalOpen:!1}),r.props.onMarkUnplayedConfirm()},r.onMarkUnplayedCancel=function(){r.setState({isConfirmMarkUnplayedModalOpen:!1})},r.onDeletePress=function(e){r.setState({isConfirmDeleteModalOpen:!0})},r.onDeleteConfirm=function(e){r.setState({isConfirmDeleteModalOpen:!1}),r.props.onDeleteConfirm()},r.onDeleteCancel=function(){r.setState({isConfirmDeleteModalOpen:!1})},r.state={
isActionsMenuOpen:!1,isConfirmMarkPlayedModalOpen:!1,isConfirmMarkUnplayedModalOpen:!1,isConfirmDeleteModalOpen:!1},r._moreButtonID=Object(C.a)(),r}return v()(t,e),t.prototype.componentDidMount=function(){I.a.on("shortcut:playSelected",this.onPlaySelectedShortcut),I.a.on("shortcut:toggleWatched",this.onToggleWatchedShortcut),I.a.on("shortcut:edit",this.onEditShortcut)},t.prototype.shouldComponentUpdate=function(e,t){return Object(D.a)(this,e,t)},t.prototype.componentWillUnmount=function(){
I.a.off("shortcut:playSelected",this.onPlaySelectedShortcut),I.a.off("shortcut:toggleWatched",this.onToggleWatchedShortcut),I.a.off("shortcut:edit",this.onEditShortcut)},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.activeSelectionType,o=e.selectedItemsCount,l=e.showPlay,u=e.showPlayOverflow,d=e.showShuffle,p=e.showShuffleOverflow,h=e.showAddToAlbum,f=e.showAddToAlbumOverflow,v=e.showAddToPlaylist,g=e.showAddToPlaylistOverflow,m=e.showFavorite,I=e.showFavoriteOverflow,S=e.showUnfavorite,D=e.showUnfavoriteOverflow,C=e.showTogglePlayed,j=e.showTogglePlayedOverflow,P=e.showMarkPlayed,U=e.showMarkUnplayed,B=e.showEdit,Q=e.showEditOverflow,H=e.showSync,Y=e.showSyncOverflow,W=e.showOverflow,G=e.onPlaySelectedPress,K=e.onShufflePress,q=e.onAddToPlaylistPress,Z=e.onFavoritePress,X=e.onUnfavoritePress,J=e.onEditPress,$=e.onSyncPress,ee=this.state,te=ee.isActionsMenuOpen,ne=ee.isConfirmMarkPlayedModalOpen,ie=ee.isConfirmMarkUnplayedModalOpen,re=ee.isConfirmDeleteModalOpen
;return c()("div",{className:t},void 0,l&&c()(E.a,{playLabel:Object(b.default)("Play Selected"),onPress:G}),d&&c()(x.a,{onPress:K}),h&&c()(N.a,{onPress:q}),v&&c()(A.a,{onPress:q}),m&&c()(T.a,{"data-qa-id":"toolbarFavorite",tooltip:Object(b.default)("Add to Favorites"),onPress:Z},void 0,V),S&&c()(T.a,{"data-qa-id":"toolbarUnfavorite",tooltip:Object(b.default)("Remove from Favorites"),onPress:X},void 0,F),C&&c()(L.a,{showMarkPlayed:P,showMarkUnplayed:U,onMarkPlayedPress:this.onMarkPlayedPress,
onMarkUnplayedPress:this.onMarkUnplayedPress}),B&&c()(k.a,{onPress:J}),H&&c()(_.a,{onPress:$}),W&&c()(R.a,{id:this._moreButtonID,icon:"plex-icon-toolbar-more-560",label:Object(b.default)("More..."),isMenuOpen:te,onPress:this.onActionsPress}),y.a.createElement(z.a,s()({},this.props,{target:this._moreButtonID,isOpen:te,showPlay:u,showShuffle:p,showAddToAlbum:f,showAddToPlaylist:g,showFavorite:I,showUnfavorite:D,showMarkPlayed:j&&P,showMarkUnplayed:j&&U,showEdit:Q,showSync:Y,
onMenuClose:this.onActionsMenuClose,onMarkPlayedPress:this.onMarkPlayedPress,onMarkUnplayedPress:this.onMarkUnplayedPress,onDeletePress:this.onDeletePress})),c()(w.a,{isOpen:ne,metricsPage:M.o,title:Object(b.default)("Mark Played"),message:i(o),onConfirm:this.onMarkPlayedConfirm,onCancel:this.onMarkPlayedCancel}),c()(w.a,{isOpen:ie,metricsPage:M.n,title:Object(b.default)("Mark Unplayed"),message:r(o),onConfirm:this.onMarkUnplayedConfirm,onCancel:this.onMarkUnplayedCancel}),c()(w.a,{isOpen:re,
metricsPage:M.g,kind:O.b.DANGER,title:Object(b.default)("Delete"),message:a(o,n),onConfirm:this.onDeleteConfirm,onCancel:this.onDeleteCancel}))},t}(m.Component);t.a=Object(P.a)(Q,U,B)},function(e,t){e.exports={toolbarContainer:"pageHeaderToolbar-toolbarContainer-2N-IJ Measure-container-3yONE",toolbar:"pageHeaderToolbar-toolbar-1lW-M"}},function(e,t){e.exports={toolbarButton:"ToolbarButton-toolbarButton-3xzHJ",
bottomLeft:"ToolbarButton-bottomLeft-nOJqG Tooltip-bottomLeft-2fPtV Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipLeftAlignArrow-NweCL",bottomCenter:"ToolbarButton-bottomCenter-1c_3c Tooltip-bottomCenter-2yj43 Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipCenterAlignArrow-35uHt",
bottomRight:"ToolbarButton-bottomRight-1Klcy Tooltip-bottomRight-T6_Ik Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipRightAlignArrow-1ETgz"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(54),v=n(763),g=n(156),m=n(551),y=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onMenuButtonPress=function(e){r.setState({
isMenuOpen:!r.state.isMenuOpen})},r.onMenuClose=function(){r.setState({isMenuOpen:!1})},r.state={isMenuOpen:!1},r._toolbarMenuButtonID=Object(f.a)(),r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.showMarkPlayed,n=e.showMarkUnplayed,i=e.onMarkPlayedPress,a=e.onMarkUnplayedPress,o=this.state.isMenuOpen;return r()(m.a,{id:this._toolbarMenuButtonID,icon:"plex-icon-toolbar-played-toggle-560",label:Object(h.default)("Toggle Played..."),isMenuOpen:o,onPress:this.onMenuButtonPress
},void 0,r()(v.a,{target:this._toolbarMenuButtonID,isOpen:o,onMenuClose:this.onMenuClose},void 0,t&&r()(g.a,{onPress:i},void 0,Object(h.default)("Mark Played")),n&&r()(g.a,{onPress:a},void 0,Object(h.default)("Mark Unplayed"))))},t}(p.Component);t.a=y},function(e,t){e.exports={toolbarMenu:"ToolbarMenu-toolbarMenu-18yic MenuContainer-menu-2OAQT"}},function(e,t,n){"use strict";function i(e){return a()(u.a,{target:e.target,isOpen:e.isOpen,onMenuClose:e.onMenuClose},void 0,e.showPlay&&a()(d.a,{
onPress:e.onPlaySelectedPress},void 0,Object(l.default)("Play")),e.showShuffle&&a()(d.a,{onPress:e.onShufflePress},void 0,Object(l.default)("Shuffle")),e.showQueue&&a()(d.a,{onPress:e.onPlaySelectedNextPress},void 0,Object(l.default)("Play Next")),e.showQueue&&a()(d.a,{onPress:e.onAddToQueuePress},void 0,Object(l.default)("Add to Queue")),e.showAddToAlbum&&a()(d.a,{onPress:e.onAddToPlaylistPress},void 0,Object(l.default)("Add to Album...")),e.showAddToPlaylist&&a()(d.a,{
onPress:e.onAddToPlaylistPress},void 0,Object(l.default)("Add to Playlist...")),e.showFavorite&&a()(d.a,{onPress:e.onFavoritePress},void 0,Object(l.default)("Add to Favorites")),e.showUnfavorite&&a()(d.a,{onPress:e.onUnfavoritePress},void 0,Object(l.default)("Remove from Favorites")),e.showMarkPlayed&&a()(d.a,{onPress:e.onMarkPlayedPress},void 0,Object(l.default)("Mark Played")),e.showMarkUnplayed&&a()(d.a,{onPress:e.onMarkUnplayedPress
},void 0,Object(l.default)("Mark Unplayed")),e.showEdit&&a()(d.a,{onPress:e.onEditPress},void 0,Object(l.default)("Edit")),e.showRefresh&&a()(d.a,{onPress:e.onRefreshPress},void 0,Object(l.default)("Refresh Metadata")),e.showAnalyze&&a()(d.a,{onPress:e.onAnalyzePress},void 0,Object(l.default)("Analyze")),e.showMerge&&a()(d.a,{onPress:e.onMergePress},void 0,Object(l.default)("Merge")),e.showSync&&a()(d.a,{onPress:e.onSyncPress},void 0,Object(l.default)("Sync...")),e.showOptimize&&a()(d.a,{
onPress:e.onOptimizePress},void 0,Object(l.default)("Optimize...")),e.showDelete&&a()(d.a,{kind:c.b.DANGER,onPress:e.onDeletePress},void 0,Object(l.default)("Delete")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(24),u=n(763),d=n(156);t.a=i},function(e,t){e.exports={multiSelectPageHeader:"MultiSelectPageHeader-multiSelectPageHeader-MIQA1 PageHeader-pageHeader-18RSw",selectedTitle:"MultiSelectPageHeader-selectedTitle-1kn-x",
deselectLink:"MultiSelectPageHeader-deselectLink-3Muvc",icon:"MultiSelectPageHeader-icon-3_oXi"}},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.style,i=e.provider;return a()("div",{className:t,style:n},void 0,Object(l.default)("Powered by {provider}",{provider:i}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(2692),u=n.n(c);i.defaultProps={className:u.a.attribution,provider:"Gracenote\xae"},t.a=i},function(e,t){e.exports={
attribution:"ProgramGuideAttribution-attribution-3Ca_I"}},function(e,t,n){"use strict";function i(e){var t=e.providerIdentifier,n=a()(e,["providerIdentifier"]);return c.c.EPG_IDENTIFIER.test(t)?l.a.createElement(d.a,n):l.a.createElement(u.a,n)}var r=n(13),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(55),u=n(2694),d=n(2696);t.a=i},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(Object(b.a)(),function(e){return{friendlyName:e.friendlyName,
isFullOwnedServer:e.isFullOwnedServer,isCloudSyncServer:e.isCloudSyncServer,hasLibraries:!!e.isCloud||!!e.desktop.libraries.length}})}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(42)),I=n(258),S=n(2695),M=function(e){function t(){var n,i,r;c()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=d()(this,e.call.apply(e,[this].concat(o))),
i.onAddLibraryPress=function(e){i.props.addLibrary({serverEntityID:i.props.serverEntityID})},r=n,d()(i,r)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.onRepopulate,n=s()(e,["onRepopulate"]);return g.a.createElement(S.a,a()({},n,{onAddLibraryPress:this.onAddLibraryPress,onRetryPress:t}))},t}(v.Component);t.a=Object(m.b)(i,{addLibrary:I.a})(M)},function(e,t,n){"use strict";function i(e){
var t=e.friendlyName,n=e.isFullOwnedServer,i=e.isCloudSyncServer,r=e.isPending,o=e.error,s=e.hasLibraries,d=e.onAddLibraryPress,m=e.onRetryPress;return r?g:o&&!i?a()(v.a,{title:Object(l.default)("There was an unexpected error loading the dashboard")},void 0,a()(h.a,{kind:u.PRIMARY,onPress:m},void 0,Object(l.default)("Retry"))):o&&i?a()(f.a,{title:Object(l.default)('The server "{serverName}" does not support the dashboard',{serverName:t}),
description:Object(l.default)("Browse libraries using the sidebar")}):s&&n?a()(f.a,{title:Object(l.default)("The dashboard is empty"),description:Object(l.default)("Browse and manage your libraries using the sidebar"),footer:Object(l.default)('Tip: The "Include in dashboard" advanced setting for each library allows content to be displayed here')}):!s&&n?a()(f.a,{title:Object(l.default)("The dashboard is empty"),
description:Object(l.default)("Add libraries with your media to make the most of Plex Media Server")},void 0,a()(p.a,{kind:u.PRIMARY,size:c.LARGE,onPress:d},void 0,Object(l.default)("Add Library"))):a()(f.a,{title:Object(l.default)("The dashboard is empty"),description:Object(l.default)("Browse libraries using the sidebar")})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(61),u=n(65),d=n(39),p=n(47),h=n(22),f=n(182),v=n(262),g=a()(f.a,{},void 0,a()(d.a,{}));t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.isPending,r=e.error;return i?h:r?a()(d.a,{title:Object(l.default)("There was an unexpected error loading the Guide")}):a()(p.a,{serverEntityID:t,providerEntityID:n})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(39),u=n(182),d=n(262),p=n(765),h=a()(u.a,{},void 0,a()(c.a,{}));t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.machineIdentifier,n=e.isRefreshing,i=e.hasTypeFirstSettings;if(n)return a()(p.a,{icon:"plex-icon-shows-broadcast-560",title:Object(l.default)("We're now building your Guide"),description:Object(l.default)("Hang tight while we download all the data for what's on")});var r=i?Object(c.a)(t,"manage","dvr"):"#!/settings/server/"+encodeURIComponent(t)+"/dvr";return a()(p.a,{icon:"plex-icon-shows-broadcast-560",title:Object(l.default)("The Guide is empty"),
description:Object(l.default)("Please verify your channel mappings and refresh the Guide")},void 0,a()(d.a,{to:r,kind:u.b.PRIMARY},void 0,Object(l.default)("Go to DVR Settings")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(213),u=n(24),d=n(22),p=n(182);t.a=i},function(e,t,n){"use strict";function i(){return Object(u.createSelector)(p.a,h.a,Object(f.a)(),function(e,t,n){return e.isCloud||t.isLibraryProvider?n.filter(function(e){return!!e.hubKey}):n})}function r(){
return Object(u.createSelector)(Object(d.a)(),h.a,i(),Object(v.a)(),function(e,t,n,i){return{server:e,provider:t,directories:n,showEPGActivity:!!i}})}function a(e){return l.a.createElement(g.a,e)}var o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(11),u=n(6),d=(n.n(u),n(42)),p=n(48),h=n(37),f=n(303),v=n(304),g=n(2699);t.a=Object(c.b)(r)(a)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(54),v=(n(95),n(87),
n(1134)),g=n(263),m=n(1137),y=n(188),b=n(189),I=n(766),S=n(204),M=n(767),D=n(205),C=n(555),O=n(446),j=r()(M.a,{}),P=r()(C.a,{}),w=r()(g.a,{}),T=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onDirectoriesMenuButtonPress=function(e){r.setState({isDirectoriesMenuOpen:!r.state.isDirectoriesMenuOpen})},r.onDirectoriesMenuClose=function(){r.setState({isDirectoriesMenuOpen:!1})},r.state={isDirectoriesMenuOpen:!1},r._directoriesMenuButtonID=Object(f.a)(),r}
return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.server,a=e.provider,o=e.directories,s=e.selectedDirectory,l=e.showEPGActivity,c=this.state.isDirectoriesMenuOpen;return r()(y.a,{},void 0,r()(b.a,{},void 0,a.isLibraryProvider&&r()("span",{},void 0,Object(h.default)("Discover"),j),r()(D.a,{id:this._directoriesMenuButtonID,"data-qa-id":"directoriesMenuButton",title:s.isHomeDirectory?Object(h.default)("All Libraries"):s.title,
hasMenu:o.length>1,isMenuOpen:c,isSelected:!0,onPress:this.onDirectoriesMenuButtonPress}),r()(O.a,{target:this._directoriesMenuButtonID,isOpen:c,server:i,provider:a,directories:o,selectedDirectory:s,onMenuClose:this.onDirectoriesMenuClose})),l&&r()(I.a,{},void 0,r()(m.a,{serverEntityID:t,providerEntityID:n})),r()(S.a,{},void 0,!!a.features.actions.addToCatalog&&r()(v.a,{providerEntityID:n}),!!a.features.actions.addToCatalog&&P,w))},t}(p.Component);t.a=T},function(e,t,n){"use strict"
;function i(){return Object(a.createSelector)(function(e){return e.ui.addToCatalogModal},function(e){return{isUpdating:e.isUpdating,hasError:!!e.error}})}function r(e,t){return{onClearError:function(){e(Object(l.b)())},onSubmit:function(n){e(Object(l.a)({providerEntityID:t.providerEntityID,data:n}))}}}var a=n(6),o=(n.n(a),n(2701)),s=n(57),l=n(1136),c=Object(s.a)(i,r)(o.a);t.a=c},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),
n(0)),h=(n.n(p),n(4)),f=n(24),v=n(553),g=n(102),m=n(132),y=n(103),b=n(111),I=n(74),S=n(112),M=n(92),D=n(145),C=n(503),O=n(224),j=n(2702),P=n.n(j),w=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onModalClose=function(){i.props.onClearError(),i.props.onModalClose()},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.isOpen,n=e.title,i=e.message,a=e.hasError,o=e.textInputLabel,s=e.confirmLabel,l=e.confirmKind,c=e.isUpdating,u=e.isDirty,d=e.metricsPage,p=e.metricsProperties,f=e.onDirtyChange,v=e.onSubmit;return r()(m.a,{isOpen:t,metricsPage:d,metricsProperties:p,onModalClose:this.onModalClose},void 0,r()(D.b,{className:P.a.form,onSubmit:v,onChange:f},void 0,r()(y.a,{onModalClose:this.onModalClose},void 0,r()(b.a,{},void 0,n),a&&r()(O.a,{
errorMessage:Object(h.default)("Something went wrong. Make sure the URL is correct and try again.")}),r()(I.a,{},void 0,r()("p",{},void 0,i),r()(C.a,{name:"channelURL",initialValue:"",labelText:o,"data-autofocus":!0})),r()(S.a,{},void 0,r()(M.a,{},void 0,r()(g.a,{type:"submit",kind:l,isDisabled:!u,isSpinning:c},void 0,s||Object(h.default)("Continue")))))))},t}(p.Component);w.defaultProps={confirmKind:f.b.PRIMARY},t.a=Object(v.a)(w,{isUpdatingPropName:"isUpdating",errorPropName:"error",
clearDirtyOnChangePropName:"isOpen"})},function(e,t){e.exports={form:"AddToCatalogModal-form-3c_Mq"}},function(e,t,n){"use strict";function i(e){return e===g.f?"plex-icon-toolbar-column-560":e===g.e||e===g.d?"plex-icon-toolbar-detail-560":"plex-icon-toolbar-grid-560"}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),n(4)),v=(n(33),n(31),n(24)),g=n(81),m=n(54),y=n(26),b=n(506),I=n(286),S=n(22),M=n(75),D=n(2704),C=n(2705),O=n.n(C),j=function(e){
function t(n,i){s()(this,t);var r=c()(this,e.call(this,n,i));return r.onSliderChange=function(e){var t=e.steppedValue;r.setState({sliderValue:t}),r._clearTimeout(),r._columnAdjustmentTimeoutID=setTimeout(function(){r.props.onColumnAdjustmentChange(-1*t)},r.props.columnAdjustmentTimeout)},r.onStylesPress=function(e){r.setState({isStylesMenuOpen:!r.state.isStylesMenuOpen})},r.onStylesMenuClose=function(){r.setState({isStylesMenuOpen:!1})},r.onListStylePress=function(e){r.props.onListStyleChange(e)
},r.state={sliderValue:-1*n.columnAdjustment,isStylesMenuOpen:!1},r._stylesButtonID=Object(m.a)(),r}return d()(t,e),t.prototype.componentWillReceiveProps=function(e){e.columnAdjustment!==this.props.columnAdjustment&&this.setState({sliderValue:-1*e.columnAdjustment})},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,n=(t.listType,t.listContext,t.selectedListStyle),r=t.allListStyles,o=this.state,s=o.sliderValue,l=o.isStylesMenuOpen,c=g.c,u=g.b,d=g.f,p=g.e,h=g.d,m=[{listStyle:c,title:Object(f.default)("Grid View")},{listStyle:u,title:Object(f.default)("Mosaic View")},{listStyle:d,title:Object(f.default)("List View")},{listStyle:p,title:Object(f.default)("Summary View")},{listStyle:h,title:Object(f.default)("Summary View")}],C=g.h(n),j=g.g(r);return C||j?a()("div",{
className:O.a.stylesContainer},void 0,C&&a()(I.a,{className:O.a.slider,label:Object(f.default)("Poster Size"),value:s,min:-1,max:2,stepSize:1,onChange:this.onSliderChange}),a()(S.a,{id:this._stylesButtonID,"data-qa-id":"toolbarView",className:O.a.stylesButton,"aria-label":Object(f.default)("Show List Styles"),isDisabled:!j,onPress:this.onStylesPress},void 0,a()(y.a,{className:O.a.stylesIcon,name:i(n)}),j&&a()(b.a,{direction:l?v.a.UP:v.a.DOWN})),a()(M.a,{target:this._stylesButtonID,isOpen:l,
onMenuClose:this.onStylesMenuClose},void 0,j&&m.map(function(t){var i=t.listStyle,o=t.title;return r.indexOf(i)>-1&&a()(D.a,{isSelected:n===i,title:o,listStyle:i,onListStylePress:e.onListStylePress},i)}))):null},t}(h.Component);j.defaultProps={selectedListStyle:g.c,allListStyles:[g.c],allListStyleActions:[],columnAdjustmentTimeout:500},t.a=j},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(108)),f=(n(81),
function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onListStylePress=function(e){i.props.onListStylePress(i.props.listStyle),i.props.onPress(e)},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.isSelected,n=e.title;return r()(h.a,{isSelected:t,onPress:this.onListStylePress},void 0,n)},t}(p.Component));t.a=f},function(e,t){e.exports={
stylesContainer:"MetadataListStylesMenu-stylesContainer-jYQkc",slider:"MetadataListStylesMenu-slider-o88eP Slider-slider-2oLVT",stylesButton:"MetadataListStylesMenu-stylesButton-21zDb",stylesIcon:"MetadataListStylesMenu-stylesIcon-1r4qe"}},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.isEPGRefreshing,i=e.epgActivityProgress,r=e.epgActivityTitle;return n?a()("span",{className:t},void 0,r," (",i,"%)",a()(c.a,{className:d.a.refreshingSpinner,size:l.e.SMALL})):null}t.a=i
;var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(24)),c=n(39),u=n(2707),d=n.n(u)},function(e,t){e.exports={refreshingSpinner:"ProgramGuideActivityStatus-refreshingSpinner-30DBl"}},function(e,t){e.exports={pageHeaderCenter:"PageHeaderCenter-pageHeaderCenter-3Uq10"}},function(e,t){e.exports={pageHeaderSeparator:"PageHeaderSeparator-pageHeaderSeparator-221fi DashSeparator-separator-2a3yn"}},function(e,t){e.exports={link:"PageHeaderBreadcrumbButton-link-1N0DD",
button:"PageHeaderBreadcrumbButton-button-1uaPj DisclosureArrowButton-disclosureArrowButton-11LSb"}},function(e,t){e.exports={pageHeaderDivider:"PageHeaderDivider-pageHeaderDivider-DvwUq"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(s.a)(),Object(l.a)(o.b),c.a,function(e,t,n){var i=e.isFullOwnedServer&&!e.isPersonalCloudServer,r=e.ownerFeatures&&-1!==e.ownerFeatures.indexOf("dvr"),a=!n.hasDismissedDVRUpsell;return{showDVRUpsell:t&&i&&r&&a}})}
var r=n(11),a=n(6),o=(n.n(a),n(52)),s=n(42),l=n(232),c=n(100),u=n(2713);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.serverEntityID,i=e.providerEntityID;return e.showDVRUpsell?a()(l.a,{className:t,serverEntityID:n,providerEntityID:i}):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2714));t.a=i},function(e,t,n){"use strict";function i(e){return{onDismissPress:function(){e(Object(o.h)({hasDismissedDVRUpsell:!0}))}}}
var r=n(11),a=n(2715),o=n(106);t.a=Object(r.b)(null,i)(a.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.serverEntityID,i=e.onDismissPress;return a()(h.a,{className:t,serverEntityID:n},void 0,function(e){var t=e.noDVRs,n=e.onOpen;return t?a()(f.a,{imageUrl:u.a,headerImgUrl:p.a,header:Object(l.default)("Set up Live TV & DVR"),
text:Object(l.default)("Install your antenna and tuner before starting the Setup Wizard! This will allow you to configure Plex for your tuner, detect your local channels, and customize your TV guide."),actionText:Object(l.default)("Get Started"),infoUrl:"https://www.plex.tv/features/live-tv-dvr/",onActionPress:n,onDismissPress:i}):null})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(2716),u=n.n(c),d=n(2717),p=n.n(d),h=n(768),f=n(2771);t.a=i},function(e,t,n){
e.exports=n.p+"desktop/common/img/banners/banner-dvr.71d3d38ae0ab13037c0e189a61f80953.jpg"},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTE1NC45IDc5MS45Ij48c3R5bGU+LnN0MXtmaWxsOiNmZmZ9PC9zdHlsZT48cGF0aCBmaWxsPSIjZmZlZTM1IiBkPSJNODQwLjIgNTExLjloMTc0Ljd2MTQwSDg0MC4xbC00My41LTQxdi01Ny44eiIvPjxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0yOTYuOSAyNTAuNWwzLjQtMS4yYzIuMi0xIDQuOC0yLjggNy44LTUuM3M2LjEtNS40IDkuMS04LjdjMy0zLjMgNS43LTcuNyA3LjktMTMuMiAyLjItNS41IDMuMy0xMS4zIDMuMy0xNy4zIDAtMTUuOS03LjItMjkuNi0yMS42LTQxLjEtMTQuNC0xMS41LTM0LTE3LjMtNTguOS0xNy4zSDE0MHYyMjFoMTE0LjJjMjkuMyAwIDg5LjktNS41IDg5LjktNjMuMiAwLTQ0LjItNDYuMi01My4zLTQ3LjItNTMuN20tODUuNC01Mi40aDI2LjNjNS4zIDAgOS42IDEuNiAxMi45IDQuNyAzLjMgMy4xIDUgNi45IDUgMTEuNXMtMS43IDguNC01IDExLjVjLTMuMyAzLjEtNy42IDQuNy0xMi45IDQuN2gtMjYuM3YtMzIuNHptNDkuMSAxMTIuMmMtNC4xIDMuOS05LjMgNS44LTE1LjUgNS44aC0zMy43di0zOS43aDMzLjdjNi4yIDAgMTEuNCAxLjkgMTUuNSA1LjcgNC4xIDMuOCA2LjIgOC41IDYuMiAxNCAwIDUuNy0yIDEwLjQtNi4yIDE0LjJNMzUzLjcgNDk1LjFsMy40LTEuMmMyLjItMSA0LjgtMi44IDcuOC01LjNzNi4xLTUuNCA5LjEtOC43YzMtMy4zIDUuNy03LjcgNy45LTEzLjIgMi4yLTUuNSAzLjMtMTEuMyAzLjMtMTcuMyAwLTE1LjktNy4yLTI5LjYtMjEuNi00MS4xLTE0LjQtMTEuNS0zNC0xNy4zLTU4LjktMTcuM0gxOTd2MjIxaDExNGMyOS4zIDAgODkuOS01LjUgODkuOS02My4yIDAtNDQuMi00Ni4yLTUzLjMtNDcuMi01My43bS04NS4yLTUyLjRoMjYuMWM1LjMgMCA5LjYgMS42IDEyLjkgNC43IDMuMyAzLjEgNSA2LjkgNSAxMS41cy0xLjcgOC40LTUgMTEuNWMtMy4zIDMuMS03LjcgNC43LTEyLjkgNC43aC0yNi4xdi0zMi40ek0zMTcuNCA1NTVjLTQuMSAzLjktOS4zIDUuOC0xNS41IDUuOGgtMzMuNHYtMzkuN2gzMy40YzYuMiAwIDExLjQgMS45IDE1LjUgNS43IDQuMSAzLjggNi4yIDguNSA2LjIgMTQgMCA1LjYtMiAxMC4zLTYuMiAxNC4yTTUyNy4xIDMxMy43SDQyMC4zVjI3OWg4Ny4ydi01MC42aC04Ny4ydi0yOC4zaDEwN3YtNTMuOEgzNDguOHYyMjFoMTc4LjN6TTcwOS44IDE0Ni4zdjUzLjhoNTguNHYxNjcuMmg3MVYyMDAuMWg1OC41di01My44ek02MjkgMzEwLjFjLTMuOSAzLjQtOS4zIDUuMS0xNi4zIDUuMS02LjkgMC0xNC4yLTEuOS0yMS43LTUuNy03LjUtMy44LTEyLjUtNi45LTE1LTkuMi0xLjQtMS4zLTIuNy0yLjUtMy43LTMuNWwtNDIuMiA0MCAyLjcgMi43YzIuNiAyLjcgNi41IDUuOSAxMS45IDkuNiA1LjMgMy43IDExLjUgNy40IDE4LjYgMTEuMSA3IDMuNyAxNS44IDYuOSAyNi40IDkuNSAxMC41IDIuNiAyMS40IDMuOSAzMi42IDMuOSAyNy45IDAgNTAuMi03LjIgNjYuNy0yMS43czI0LjgtMzIgMjQuOC01Mi40YzAtMTEuOC0yLjQtMjIuMi03LjItMzEuMS00LjgtOC45LTEwLjctMTUuNy0xNy45LTIwLjItNy4xLTQuNS0xNC45LTguNi0yMy4yLTEyLjItNy42LTMuMy0xNC43LTUuOC0yMS4zLTcuNS0uNi0uMi0xLjMtLjMtMS45LS41LTcuMS0xLjctMTMuMS0zLjktMTcuOC02LjUtNC43LTIuNi03LjEtNS42LTcuMS05IDAtNC4xIDEuNi03LjUgNC45LTEwLjIgMy4zLTIuNyA4LTQgMTQtNCAxNC40IDAgMjMuMyA2LjUgMjcuOCAxMS4ybDQyLjMtNDAuMi0uOC0uOWMtMS44LTIuNC01LTUuMS05LjYtOC4xLTQuNS0zLTkuOC02LjEtMTUuOC05LjItNi0zLjEtMTMuOC01LjctMjMuNC03LjktOS42LTIuMi0xOS42LTMuMy0zMC4xLTMuMy0yNi41IDAtNDcuOCA3LTY0IDIxLTE2LjIgMTQtMjQuMyAzMC41LTI0LjMgNDkuNCAwIDEwLjEgMS44IDE5LjEgNS40IDI3LjEgMy42IDggOC4yIDE0LjQgMTMuNyAxOS4xIDUuNSA0LjcgMTEuNyA4LjkgMTguNiAxMi41IDUuNyAzIDExLjUgNS41IDE3LjMgNy42IDEuMS40IDIuMi44IDMuMyAxLjEgNi45IDIuMiAxMy4yIDQuMyAxOC44IDYuMiA1LjYgMS45IDEwLjIgMy45IDEzLjggNi4xIDMuNiAyLjIgNS40IDQuNyA1LjQgNy43LjIgNC45LTEuOCA5LTUuNyAxMi40TTUyNy4zIDUyMi4yYzAgMTQuNi0xMS44IDI2LjQtMjYuNCAyNi42LTE0LjcuMS0yNi43LTExLjgtMjYuNy0yNi42VjM5MWgtNzEuNXYxMjcuOWMwIDUyLjcgNDIuOCA5NS41IDk1LjUgOTUuNWg0LjVjNTIuNyAwIDk1LjUtNDIuOCA5NS41LTk1LjVWMzkxaC03MC45djEzMS4yek03MjAuNCA0NjYuMkw2NzMuNSAzOTFoLTcxLjZsODIuNyAxNDIuMVY2MTJoNzEuNXYtNzguOUw4MzguOCAzOTFoLTcxLjZ6Ii8+PHBhdGggZD0iTTgzMS40IDU4MS44YzAgNC44LTMuOSA4LjYtOC42IDguNi00LjggMC04LjYtMy45LTguNi04LjZzMy45LTguNiA4LjYtOC42YzQuNy0uMSA4LjYgMy44IDguNiA4LjYiIGZpbGw9IiMxYzI1MmMiLz48cGF0aCBjbGFzcz0ic3QxIiBkPSJNODQwLjMgNDU0LjRoLTUuMnYtMS42aDEyLjR2MS42aC01LjJ2MTUuMWgtMi4xdi0xNS4xem0xMC40LTEuN2gyLjlsNS40IDEzLjIgNS4zLTEzLjJoMi45djE2LjdoLTJ2LTE0LjJsLTUuOSAxNC4yaC0uN2wtNS45LTE0LjJ2MTQuMmgtMS45di0xNi43eiIvPjwvc3ZnPgo="
},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(114)),f=n(1139),v={context:h.k},g=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onCreateDVRPress=function(){r.setState({isDVRSetupModalOpen:!0})},r.onDVRSetupModalClose=function(){r.setState({isDVRSetupModalOpen:!1}),r.props.onModalClose&&r.props.onModalClose()},r.state={isDVRSetupModalOpen:n.isModalOpen},r}return u()(t,e),
t.prototype.render=function(){var e=this.props,t=e.className,n=e.serverEntityID,i=e.isDvrsPending,a=e.hasDVRs,o=e.hasDVRFeature,s=e.children,l=this.state.isDVRSetupModalOpen,c=!i&&!a;return r()("div",{className:t},void 0,s&&s({serverEntityID:n,hasDVRFeature:o,noDVRs:c,onOpen:this.onCreateDVRPress}),r()(f.a,{serverEntityID:n,metricsProperties:v,isOpen:l,onModalClose:this.onDVRSetupModalClose}))},t}(p.Component);g.defaultProps={isModalOpen:!1},t.a=g},function(e,t,n){"use strict";function i(){
return Object(g.createSelector)(y.a,function(e){return{step:e.step}})}var r=n(13),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(529)),y=n(160),b=n(135),I=n(2720),S=n(2728),M=n(2731),D=n(2734),C=n(2748),O=n(2758),j=n(2767),P={clearDVRSetup:b.g},w=function(e){function t(){return s()(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=a()(e,["step"]);switch(t){case m.b.DEVICE:return f.a.createElement(C.a,n);case m.b.UNSUPPORTED_DEVICE:return f.a.createElement(j.a,n);case m.b.DEVICE_CHANNELS:return f.a.createElement(O.a,n);case m.b.EPG:return f.a.createElement(I.a,n);case m.b.EPG_MAPPING:return f.a.createElement(S.a,n);case m.b.CHANNEL_MAPPING:return f.a.createElement(D.a,n);case m.b.EPG_DOWNLOAD:return f.a.createElement(M.a,n)}},t}(h.Component);t.a=Object(v.b)(i,P)(w)
},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(Object(b.a)(),I.a,S.a,function(e,t,n){var i=t.selectedLineupUUID,r=t.epgSettings,a=r.isFetching,o=r.selectedCountry,s=r.selectedLanguage,l=r.selectedRegion,c=r.languages,u=r.regions,d=r.lineupGroup,p=o&&1===o.flavor?o.example:null,h=s?s.code:"",f=l?l.key:"",v=c.length>0,g=u.length>0,m=c.reduce(function(e,t){var n;return e.push((n={},n[t.code]=t.title,n)),e},[]),y=u.reduce(function(e,t){var n;return e.push((n={},
n[t.key]=t.title,n)),e},[]);return{platform:e.platform,setupErrorMessage:n,selectedLineupUUID:i,selectedLanguageCode:h,selectedRegionCode:f,languagesPopulated:v,regionsPopulated:g,languageOptions:m,regionOptions:y,isFetching:a,postalCodeExample:p,canContinue:!(!d.lineups.length&&!i||!h)}})}var r=n(8),a=n.n(r),o=n(9),s=n.n(o),l=n(10),c=n.n(l),u=n(7),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(34)),y=n(2721),b=n(42),I=n(160),S=n(374),M=n(2722),D=n(135),C=n(556),O=d()({
dvrSetupNextStep:D.l,selectEPGLineup:D.B},C),j=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.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});var n=Object(y.a)(e),r="lineup://tv.plex.providers.epg.xmltv/"+n+"#"+encodeURIComponent(t);i.props.selectEPGLineup({lineupUUID:r})},r=n,s()(i,r)}return c()(t,e),t.prototype.componentWillMount=function(){this._populate(this.props)},t.prototype._populate=function(e){Object(m.a)(function(){var t=e.serverEntityID;e.fetchEPGLanguages({serverEntityID:t}),e.selectEPGLineup({lineupUUID:null})})},
t.prototype.render=function(){return f.a.createElement(M.a,d()({onLanguageSelect:this.onLanguageSelect,onRegionSelect:this.onRegionSelect,onPostalCodeChange:this.onPostalCodeChange,onXMLTVProgramGuideChange:this.onXMLTVProgramGuideChange,onSubmit:this.onSubmit},this.props))},t}(h.Component);t.a=Object(v.b)(i,O)(j)},function(e,t,n){"use strict";function i(e){return/^[a-z]\:\\|\\\\/i.test(e)&&(e=e.replace(/\\/g,"/")),/^(\/|[a-z]\:\/)/i.test(e)&&(e=e.replace(/\/(.+?)(?=\/|$)/g,function(e,t){
return"/"+encodeURIComponent(t)})),"/"===e.charAt(0)&&(e=e.substring(1)),/^[a-z]+?\:\/\//i.test(e)&&(e=encodeURIComponent(e)),e}t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(24),v=n(39),g=n(22),m=n(47),y=n(145),b=n(181),I=n(133),S=n(225),M=n(226),D=n(74),C=n(92),O=n(305),j=n(375),P=n(770),w=n(2725),T=n(2727),E=n.n(T),x=r()(P.a,{}),N=function(e){function t(n,i){o()(this,t)
;var r=l()(this,e.call(this,n,i));return r.onShowXMLTVEntryPress=function(){r.setState({showXMLTVEntry:!r.state.showXMLTVEntry})},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:Object(h.default)("My Guide")},r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.platform,i=e.setupErrorMessage,a=e.isFetching,o=e.selectedLanguageCode,s=e.selectedRegionCode,l=e.languageOptions,c=e.regionOptions,u=e.languagesPopulated,d=e.regionsPopulated,p=e.canContinue,P=e.postalCodeExample,T=e.onSubmit,N=e.onModalClose,A=this.state,L=A.showXMLTVEntry,k=A.xmlTVPath,_=A.programGuideTitle,R=u,z=!(!u||!P),U=!(!u||!d),B=[{"":Object(h.default)("Select Language")}].concat(l),V=[{"":Object(h.default)("Select Region")
}].concat(c),F="Windows"===n?"C:\\path\\to\\your\\xmltv_file.xml":"/path/to/your/xmltv_file.xml";return r()(y.b,{className:E.a.form,onSubmit:T},void 0,r()(O.a,{errorMessage:i,onModalClose:N},void 0,r()(D.a,{},void 0,r()("div",{className:E.a.message},void 0,r()("div",{},void 0,Object(h.default)("To download an electronic guide we need to know your location.")),r()(g.a,{kind:f.b.PRIMARY,onPress:this.onShowXMLTVEntryPress
},void 0,L?Object(h.default)("Don't use XMLTV? Click here to select your location instead."):Object(h.default)("Have an XMLTV guide on your server? Click here to use that instead."))),L&&r()("div",{},void 0,u&&r()(b.a,{},void 0,r()(I.a,{},void 0,Object(h.default)("Language")),r()(S.a,{name:"languageSelect",values:B,value:o,onChange:this.onLanguageSelect})),r()(b.a,{},void 0,r()(I.a,{},void 0,Object(h.default)("XMLTV Guide")),r()(M.a,{name:"xmltvPath",placeholder:F,value:k,
onChange:this.onXMLTVPathChange})),r()(b.a,{},void 0,r()(I.a,{},void 0,Object(h.default)("Guide Title")),r()(M.a,{name:"programGuideTitle",value:_,onChange:this.onProgramGuideTitleChange}))),!L&&r()("div",{},void 0,R&&r()(b.a,{},void 0,r()(I.a,{},void 0,Object(h.default)("Language")),r()(S.a,{name:"languageSelect",values:B,value:o,onChange:this.onLanguageSelect})),z&&r()(b.a,{},void 0,r()(I.a,{},void 0,Object(h.default)("Postal Code")),r()(w.a,{serverEntityID:t,postalCodeExample:P}),a&&r()(v.a,{
className:E.a.fetchingSpinner})),U&&r()(b.a,{},void 0,r()(I.a,{},void 0,Object(h.default)("Region")),r()(S.a,{className:E.a.regionInput,name:"regionSelect",values:V,value:s,onChange:this.onRegionSelect}),a&&r()(v.a,{className:E.a.fetchingSpinner})))),r()(j.a,{},void 0,r()(C.a,{},void 0,r()(m.a,{kind:f.b.DEFAULT,size:f.e.MEDIUM,onPress:N},void 0,Object(h.default)("Cancel"))),r()(C.a,{},void 0,x,r()(m.a,{type:"submit",kind:f.b.PRIMARY,size:f.e.MEDIUM,isDisabled:!p||a
},void 0,Object(h.default)("Continue"))))))},t}(p.Component);t.a=N},function(e,t){e.exports={errorMessage:"DVRSetupModalContent-errorMessage-1lyhv",errorIcon:"DVRSetupModalContent-errorIcon-38FJ7"}},function(e,t){e.exports={footer:"DVRSetupModalFooter-footer-VLPNT ModalFooter-modalFooter-30WIB"}},function(e,t,n){"use strict";function i(e){return{postalCode:e.ui.dvrSettingsUI.dvrSetup.epgSettings.postalCode}}var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),
n(0)),f=n.n(h),v=n(11),g=n(34),m=n(556),y=n(2726),b=function(e){function t(n,i){s()(this,t);var r=c()(this,e.call(this,n,i));return r._fetchEPGLineups=function(){r.props.fetchEPGLineups({serverEntityID:r.props.serverEntityID})},r.onPostalCodeChange=function(e){r._postalCodeTimeoutID&&clearTimeout(r._postalCodeTimeoutID),Object(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 f.a.createElement(y.a,a()({onPostalCodeChange:this.onPostalCodeChange},this.props))},t}(h.Component);t.a=Object(v.b)(i,m)(b)},function(e,t,n){"use strict";var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(84),h=n.n(p),f=n(226),v=function(e){function t(n,i){
r()(this,t);var a=o()(this,e.call(this,n,i));return a.onPostalCodeChange=function(e){a.setState({postalCode:e},function(){a.props.onPostalCodeChange(e)})},a.state={postalCode:""},a}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 d.a.createElement(f.a,{name:"postalCodeInput",placeholder:"e.g. "+e,value:t,ref:this.focusInput,onChange:this.onPostalCodeChange})},t}(u.Component);t.a=v},function(e,t){e.exports={form:"EPGSettings-form-ZJ79Y",message:"EPGSettings-message-159ME",regionInput:"EPGSettings-regionInput-1wXWR SelectInput-input-x1tNm input-input-1P2Vi",fetchingSpinner:"EPGSettings-fetchingSpinner-3HphG Spinner-spinner-Niere spin-spin-2kLwt"}},function(e,t,n){"use strict";function i(){
return Object(g.createSelector)(b.a,I.a,Object(y.a)(),function(e,t,n){return{setupErrorMessage:t,progress:(d.a.find(n,{uuid:e.epgLineupActivityID})||{}).progress}})}var r=n(8),a=n.n(r),o=n(9),s=n.n(o),l=n(10),c=n.n(l),u=n(5),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(34)),y=n(301),b=n(160),I=n(374),S=n(135),M=n(2729),D={findBestEPGLineup:S.s},C=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments))}return c()(t,e),
t.prototype.componentWillMount=function(){this._populate(this.props)},t.prototype._populate=function(e){Object(m.a)(function(){e.findBestEPGLineup({serverEntityID:e.serverEntityID})})},t.prototype.render=function(){return f.a.createElement(M.a,this.props)},t}(h.Component);t.a=Object(v.b)(i,D)(C)},function(e,t,n){"use strict";function i(e){var t=e.setupErrorMessage,n=e.progress,i=e.onModalClose;return a()(f.a,{errorMessage:t,onModalClose:i},void 0,a()(p.a,{},void 0,a()("div",{
className:m.a.message},void 0,a()("div",{},void 0,Object(l.default)("We're finding the best guide for your channels and location.")),a()("div",{},void 0,Object(l.default)("This should only take a few moments."))),a()("div",{className:m.a.spinnerContainer},void 0,a()(u.a,{size:90,progress:n}))),a()(v.a,{},void 0,a()(h.a,{},void 0,a()(d.a,{kind:c.b.DEFAULT,size:c.e.MEDIUM,onPress:i},void 0,Object(l.default)("Cancel")))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(4)),c=n(24),u=n(260),d=n(47),p=n(74),h=n(92),f=n(305),v=n(375),g=n(2730),m=n.n(g);i.defaultProps={progress:0},t.a=i},function(e,t){e.exports={message:"EPGMapping-message-2-bns",spinnerContainer:"EPGMapping-spinnerContainer-TAwZ1"}},function(e,t,n){"use strict";function i(){return Object(u.createSelector)(function(e,t){return t.serverEntityID},Object(f.a)(),v.a,function(e,t,n){var i=n.selectedDVR;if(i&&t){var r=i.epgIdentifier,a=Object(p.a)(d.k,r,e);return t.indexOf(a)>-1?r:void 0}})}
function r(){return Object(u.createSelector)(v.a,g.a,Object(h.a)(),Object(m.a)(),i(),function(e,t,n,i,r){var a=i||{},o=a.progress,s=a.subtitle;return{setupErrorMessage:t,machineIdentifier:n.machineIdentifier,epgProviderIdentifier:r,epgDownloadActivityID:e.epgDownloadActivityID,progress:o,message:s}})}function a(e){return l.a.createElement(y.a,e)}var o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(11),u=n(6),d=(n.n(u),n(43)),p=n(40),h=n(42),f=n(771),v=n(160),g=n(374),m=n(1140),y=n(2732);t.a=Object(c.b)(r)(a)
},function(e,t,n){"use strict";function i(e){var t=e.setupErrorMessage,n=e.machineIdentifier,i=e.epgProviderIdentifier,r=e.epgDownloadActivityID,o=e.progress,s=e.message,g=e.onModalClose,y=encodeURIComponent(n),b=encodeURIComponent(i);return a()(f.a,{errorMessage:t,onModalClose:g},void 0,a()(p.a,{},void 0,a()("div",{className:m.a.message
},void 0,a()("div",{},void 0,Object(l.default)("Setup complete!")),a()("div",{},void 0,Object(l.default)("You can now find your Guide and Recordings in the sidebar under \"Live TV\". While we're grabbing the guide data, you can start browsing; it will update automatically as we download what's on."))),r&&a()("div",{},void 0,a()("div",{className:m.a.spinnerContainer},void 0,a()(u.a,{size:90,progress:o}),a()("div",{className:m.a.spinnerMessage
},void 0,s)))),a()(h.a,{},void 0,a()(v.a,{},void 0,a()(d.a,{kind:c.b.DEFAULT,size:c.e.MEDIUM,onPress:g},void 0,Object(l.default)("Close")),a()(d.a,{kind:c.b.PRIMARY,size:c.e.MEDIUM,to:"#!/server/"+y+"/provider/"+b,isDisabled:!i},void 0,Object(l.default)("View Guide")))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(24),u=n(260),d=n(47),p=n(74),h=n(112),f=n(305),v=n(92),g=n(2733),m=n.n(g);i.defaultProps={progress:0,message:""},t.a=i},function(e,t){e.exports={
message:"EPGDownload-message-1nld-",spinnerContainer:"EPGDownload-spinnerContainer-OHwKI",spinnerMessage:"EPGDownload-spinnerMessage-j4e6W"}},function(e,t,n){"use strict";function i(e,t){if(e){var n=M.a.parseXML(e.responseText);if(n.message)return n.message}else{if(!t)return;var i=M.a.parseXML(t.responseText);if(i.message)return i.message}return Object(I.default)("Unable to load channel mappings")}function r(){return Object(b.createSelector)(D.a,C.a,O.a,Object(j.a)(),function(e,t,n,r){
var a=e.selectedDevice,o=e.selectedLineupUUID,s=e.isChannelMappingsPending,l=e.isLineupChannelsPending,c=e.channelMappingsError,u=e.lineupChannelsError,d=e.isSavingDVR;return{setupErrorMessage:t,selectedDevice:a,selectedLineupUUID:o,availableLineups:f.a.reduce(e.epgSettings.lineupGroup.lineups,function(e,t){var n;return e.push((n={},n[t.uuid]=t.title,n)),e},[]),lineupChannels:n,channelMappings:r,isChannelMappingsPending:s,isLineupChannelsPending:l,isSavingDVR:d,channelMappingsErrorMessage:i(c,u)
}})}var a=n(7),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(5),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),n(4)),S=n(34),M=n(58),D=n(160),C=n(374),O=n(1141),j=n(1142),P=n(135),w=n(2735),T={fetchLineupChannels:P.r,fetchChannelMap:P.n,selectEPGLineup:P.B,clearChannelMapError:P.d,saveDVR:P.v,addDVRDevice:P.a},E=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s]
;return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onLineupSelect=function(e){var t=i.props,n=t.serverEntityID,r=t.selectedDevice;i.props.selectEPGLineup({serverEntityID:n,lineupUUID:e}),i.props.fetchLineupChannels({serverEntityID:n,lineupUUID:e}),i.props.fetchChannelMap({serverEntityID:n,deviceUUID:r.uuid,lineupUUID:e,forceEnabled:!0})},i.onAddDeviceSubmit=function(e){var t=i.props,n=t.serverEntityID,r=t.dvrID,a=t.selectedDevice;i.props.addDVRDevice({serverEntityID:n,dvrID:r,
deviceID:a.key,data:e})},i.onSaveDVRSubmit=function(e){var t=i.props,n=t.serverEntityID,r=t.selectedDevice;i.props.saveDVR({serverEntityID:n,deviceID:r.key,data:e})},r=n,u()(i,r)}return p()(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,n=e.selectedDevice.uuid,i=e.selectedLineupUUID;i&&Object(S.a)(function(){e.fetchLineupChannels({
serverEntityID:t,lineupUUID:i}),e.fetchChannelMap({serverEntityID:t,deviceUUID:n,lineupUUID:i,forceEnabled:!0})})},t.prototype.render=function(){var e=this.props.dvrID;return m.a.createElement(w.a,o()({onLineupSelect:this.onLineupSelect,onSubmit:e?this.onAddDeviceSubmit:this.onSaveDVRSubmit},this.props))},t}(g.Component);t.a=Object(y.b)(r,T)(E)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(4)),f=n(24),v=n(80),g=n(39),m=n(47),y=n(102),b=n(225),I=n(145),S=n(74),M=n(92),D=n(305),C=n(375),O=n(770),j=n(1143),P=n(1144),w=n(1145),T=n(2747),E=n.n(T),x=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onLineupsMenuButtonPress=function(){r.setState({isLineupsMenuOpen:!r.state.isLineupMenuOpen})},r.onLineupsMenuClose=function(){r.setState({isLineupsMenuOpen:!1})},r.state={isLineupsMenuOpen:!1},r}return u()(t,e),t.prototype.render=function(){
for(var e=this.props,t=e.dvrID,n=e.setupErrorMessage,i=e.selectedLineupUUID,a=e.availableLineups,o=e.lineupChannels,s=e.channelMappings,l=e.isChannelMappingsPending,c=e.isLineupChannelsPending,u=e.isSavingDVR,d=e.channelMappingsErrorMessage,p=e.formState,j=e.allChannelMappingsEnabled,T=e.allChannelMappingsDisabled,x=e.onAllChannelMappingsEnabledChange,N=e.onFormStateChange,A=e.onLineupSelect,L=e.onModalClose,k=e.onSubmit,_=l||c,R=!!a.length,z=[{"":Object(h.default)("Select Guide")
}].concat(a),U=i?decodeURIComponent(i.match(/#(.+?)$/)[1]):void 0,B=!1,V=!1,F=0;F<s.length&&(!B||!V);F++){var Q=s[F];null==Q.signalQuality&&null==Q.signalStrengh||(B=!0),(Q.isDeviceChannelHD||Q.isLineupChannelHD)&&(V=!0)}return r()(I.b,{className:E.a.form,formState:p,onChange:N,onSubmit:k},void 0,r()(D.a,{errorMessage:n,onModalClose:L},void 0,d&&r()(S.a,{className:E.a.channelMappingsBody,scrollDirection:f.d.NONE},void 0,r()("div",{className:E.a.centeredContainer},void 0,d)),!d&&r()(S.a,{
className:E.a.channelMappingsBody,scrollDirection:f.d.NONE},void 0,R&&r()("div",{},void 0,r()("div",{className:E.a.programGuideLabel},void 0,Object(h.default)("Guide")),r()("div",{className:E.a.programGuideSelectContainer},void 0,r()(b.a,{name:"programGuide",values:z,value:i,onChange:A}))),!R&&r()("div",{className:E.a.programGuideTitle},void 0,U),_&&r()("div",{className:E.a.centeredContainer},void 0,r()(g.a,{label:Object(h.default)("Loading channel mappings")})),!_&&i&&r()(v.a,{
className:E.a.scroller,autoScroll:!0},void 0,r()(P.a,{showSignalStrength:B,allChannelMappingsEnabled:j,allChannelMappingsDisabled:T,onAllChannelMappingsEnabledChange:x}),s.map(function(e){var t=e.key,n=e.deviceIdentifier,i=e.name,a=e.enabled,s=e.lineupIdentifier,l=e.drm,c=e.signalStrengh,u=e.signalQuality,d=e.isDeviceChannelHD,p=e.isLineupChannelHD,h=e.isChannelMissing;return r()(w.a,{name:t,initialValue:{enabled:a,lineupIdentifier:s},deviceIdentifier:n,channelName:i,drm:l,signalStrength:u||c,
isDeviceChannelHD:d,isLineupChannelHD:p,isChannelMissing:h,showResolution:V,lineupChannels:o},t)}))),r()(C.a,{},void 0,r()(M.a,{},void 0,r()(m.a,{kind:f.b.DEFAULT,size:f.e.MEDIUM,onPress:L},void 0,Object(h.default)("Cancel"))),r()(M.a,{},void 0,r()(O.a,{dvrID:t}),r()(y.a,{type:"submit",kind:f.b.PRIMARY,size:f.e.MEDIUM,isSpinning:u},void 0,Object(h.default)("Continue"))))))},t}(p.Component);t.a=Object(j.a)(x)},function(e,t){e.exports={container:"DeviceChannelMappingsHeader-container-1VViT",
deviceChannelsContainer:"DeviceChannelMappingsHeader-deviceChannelsContainer-1TSeU",guideChannels:"DeviceChannelMappingsHeader-guideChannels-3D6cO",deviceChannels:"DeviceChannelMappingsHeader-deviceChannels-iZFrg",signalStrength:"DeviceChannelMappingsHeader-signalStrength-1vcKg",deviceChannelsPadding:"DeviceChannelMappingsHeader-deviceChannelsPadding-AkfFy"}},function(e,t){e.exports={badge:"Badge-badge-1VCQ1",isHidden:"Badge-isHidden-3Atw9",default:"Badge-default-1XnzT",
primary:"Badge-primary-3GV6T",success:"Badge-success-3G72_",danger:"Badge-danger-2SHAW"}},function(e,t,n){"use strict";function i(){return a()(s.a,{className:c.a.resolution},void 0,"HD")}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(376)),l=n(2739),c=n.n(l);t.a=i},function(e,t){e.exports={resolution:"EPGChannelResolution-resolution-rYFHt Badge-badge-1VCQ1"}},function(e,t){
e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDJweCIgaGVpZ2h0PSIzMnB4IiB2aWV3Qm94PSIwIDAgNDIgMzIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ5LjMgKDUxMTY3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TdHJlbmd0aCAtIDE8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iMS4xLVNpZ25hbC1TdHJlbmd0aC1NYW5hZ2UtQ2hhbm5lbHMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzc4LjAwMDAwMCwgLTEwNzguMDAwMDAwKSI+CiAgICAgICAgICAgIDxnIGlkPSJTdHJlbmd0aC1JbmRpY2F0b3JzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMzc4LjAwMDAwMCwgNzU4LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPGcgaWQ9IlN0cmVuZ3RoLS0tMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDMyMC4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLUNvcHktNSIgZmlsbD0iIzUyNTI1MiIgeD0iMzUuNzQ0NjgwOSIgeT0iMCIgd2lkdGg9IjYuMjU1MzE5MTUiIGhlaWdodD0iMzIiIHJ4PSIzLjEyNzY1OTU3Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZS1Db3B5IiBmaWxsPSIjNTI1MjUyIiB4PSIyNi44MDg1MTA2IiB5PSI2LjQiIHdpZHRoPSI2LjI1NTMxOTE1IiBoZWlnaHQ9IjI1LjYiIHJ4PSIzLjEyNzY1OTU3Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZS1Db3B5LTIiIGZpbGw9IiM1MjUyNTIiIHg9IjE3Ljg3MjM0MDQiIHk9IjEyLjgiIHdpZHRoPSI2LjI1NTMxOTE1IiBoZWlnaHQ9IjE5LjIiIHJ4PSIzLjEyNzY1OTU3Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZS1Db3B5LTMiIGZpbGw9IiM1MjUyNTIiIHg9IjguOTM2MTcwMjEiIHk9IjE5LjIiIHdpZHRoPSI2LjI1NTMxOTE1IiBoZWlnaHQ9IjEyLjgiIHJ4PSIzLjEyNzY1OTU3Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZS1Db3B5LTQiIGZpbGw9IiNEMDAyMUIiIHg9IjAiIHk9IjI1LjYiIHdpZHRoPSI2LjI1NTMxOTE1IiBoZWlnaHQ9IjYuNCIgcng9IjMuMTI3NjU5NTciPjwvcmVjdD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"
},function(e,t){
e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDJweCIgaGVpZ2h0PSIzMnB4IiB2aWV3Qm94PSIwIDAgNDIgMzIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ5LjMgKDUxMTY3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TdHJlbmd0aCAtIDI8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iMS4xLVNpZ25hbC1TdHJlbmd0aC1NYW5hZ2UtQ2hhbm5lbHMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzc4LjAwMDAwMCwgLTk5OC4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9IlN0cmVuZ3RoLUluZGljYXRvcnMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEzNzguMDAwMDAwLCA3NTguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iU3RyZW5ndGgtLS0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMjQwLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtQ29weS01IiBmaWxsPSIjNTI1MjUyIiB4PSIzNS43NDQ2ODA5IiB5PSIwIiB3aWR0aD0iNi4yNTUzMTkxNSIgaGVpZ2h0PSIzMiIgcng9IjMuMTI3NjU5NTciPjwvcmVjdD4KICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLUNvcHkiIGZpbGw9IiM1MjUyNTIiIHg9IjI2LjgwODUxMDYiIHk9IjYuNCIgd2lkdGg9IjYuMjU1MzE5MTUiIGhlaWdodD0iMjUuNiIgcng9IjMuMTI3NjU5NTciPjwvcmVjdD4KICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLUNvcHktMiIgZmlsbD0iIzUyNTI1MiIgeD0iMTcuODcyMzQwNCIgeT0iMTIuOCIgd2lkdGg9IjYuMjU1MzE5MTUiIGhlaWdodD0iMTkuMiIgcng9IjMuMTI3NjU5NTciPjwvcmVjdD4KICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLUNvcHktMyIgZmlsbD0iI0Y5ODkwMCIgeD0iOC45MzYxNzAyMSIgeT0iMTkuMiIgd2lkdGg9IjYuMjU1MzE5MTUiIGhlaWdodD0iMTIuOCIgcng9IjMuMTI3NjU5NTciPjwvcmVjdD4KICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLUNvcHktNCIgZmlsbD0iI0Y5ODkwMCIgeD0iMCIgeT0iMjUuNiIgd2lkdGg9IjYuMjU1MzE5MTUiIGhlaWdodD0iNi40IiByeD0iMy4xMjc2NTk1NyI+PC9yZWN0PgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="
},function(e,t){
e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDJweCIgaGVpZ2h0PSIzMnB4IiB2aWV3Qm94PSIwIDAgNDIgMzIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ5LjMgKDUxMTY3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TdHJlbmd0aCAtIDM8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iMS4xLVNpZ25hbC1TdHJlbmd0aC1NYW5hZ2UtQ2hhbm5lbHMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzc4LjAwMDAwMCwgLTkxOC4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9IlN0cmVuZ3RoLUluZGljYXRvcnMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEzNzguMDAwMDAwLCA3NTguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iU3RyZW5ndGgtLS0zIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMTYwLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtQ29weS01IiBmaWxsPSIjNTI1MjUyIiB4PSIzNS43NDQ2ODA5IiB5PSIwIiB3aWR0aD0iNi4yNTUzMTkxNSIgaGVpZ2h0PSIzMiIgcng9IjMuMTI3NjU5NTciPjwvcmVjdD4KICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLUNvcHkiIGZpbGw9IiM1MjUyNTIiIHg9IjI2LjgwODUxMDYiIHk9IjYuNCIgd2lkdGg9IjYuMjU1MzE5MTUiIGhlaWdodD0iMjUuNiIgcng9IjMuMTI3NjU5NTciPjwvcmVjdD4KICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLUNvcHktMiIgZmlsbD0iI0Y5QkUwMyIgeD0iMTcuODcyMzQwNCIgeT0iMTIuOCIgd2lkdGg9IjYuMjU1MzE5MTUiIGhlaWdodD0iMTkuMiIgcng9IjMuMTI3NjU5NTciPjwvcmVjdD4KICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLUNvcHktMyIgZmlsbD0iI0Y5QkUwMyIgeD0iOC45MzYxNzAyMSIgeT0iMTkuMiIgd2lkdGg9IjYuMjU1MzE5MTUiIGhlaWdodD0iMTIuOCIgcng9IjMuMTI3NjU5NTciPjwvcmVjdD4KICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLUNvcHktNCIgZmlsbD0iI0Y5QkUwMyIgeD0iMCIgeT0iMjUuNiIgd2lkdGg9IjYuMjU1MzE5MTUiIGhlaWdodD0iNi40IiByeD0iMy4xMjc2NTk1NyI+PC9yZWN0PgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="
},function(e,t){
e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDJweCIgaGVpZ2h0PSIzMnB4IiB2aWV3Qm94PSIwIDAgNDIgMzIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ5LjMgKDUxMTY3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TdHJlbmd0aCAtIDQ8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iMS4xLVNpZ25hbC1TdHJlbmd0aC1NYW5hZ2UtQ2hhbm5lbHMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzc4LjAwMDAwMCwgLTgzOC4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9IlN0cmVuZ3RoLUluZGljYXRvcnMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEzNzguMDAwMDAwLCA3NTguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iU3RyZW5ndGgtLS00IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgODAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZS1Db3B5LTUiIGZpbGw9IiM1MjUyNTIiIHg9IjM1Ljc0NDY4MDkiIHk9IjAiIHdpZHRoPSI2LjI1NTMxOTE1IiBoZWlnaHQ9IjMyIiByeD0iMy4xMjc2NTk1NyI+PC9yZWN0PgogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtQ29weSIgZmlsbD0iI0FDRDMyMSIgeD0iMjYuODA4NTEwNiIgeT0iNi40IiB3aWR0aD0iNi4yNTUzMTkxNSIgaGVpZ2h0PSIyNS42IiByeD0iMy4xMjc2NTk1NyI+PC9yZWN0PgogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtQ29weS0yIiBmaWxsPSIjQUNEMzIxIiB4PSIxNy44NzIzNDA0IiB5PSIxMi44IiB3aWR0aD0iNi4yNTUzMTkxNSIgaGVpZ2h0PSIxOS4yIiByeD0iMy4xMjc2NTk1NyI+PC9yZWN0PgogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtQ29weS0zIiBmaWxsPSIjQUNEMzIxIiB4PSI4LjkzNjE3MDIxIiB5PSIxOS4yIiB3aWR0aD0iNi4yNTUzMTkxNSIgaGVpZ2h0PSIxMi44IiByeD0iMy4xMjc2NTk1NyI+PC9yZWN0PgogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtQ29weS00IiBmaWxsPSIjQUNEMzIxIiB4PSIwIiB5PSIyNS42IiB3aWR0aD0iNi4yNTUzMTkxNSIgaGVpZ2h0PSI2LjQiIHJ4PSIzLjEyNzY1OTU3Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDJweCIgaGVpZ2h0PSIzMnB4IiB2aWV3Qm94PSIwIDAgNDIgMzIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ5LjMgKDUxMTY3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TdHJlbmd0aCAtIDU8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iMS4xLVNpZ25hbC1TdHJlbmd0aC1NYW5hZ2UtQ2hhbm5lbHMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzc4LjAwMDAwMCwgLTc1OC4wMDAwMDApIiBmaWxsPSIjN0VEMzIxIj4KICAgICAgICAgICAgPGcgaWQ9IlN0cmVuZ3RoLUluZGljYXRvcnMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEzNzguMDAwMDAwLCA3NTguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iU3RyZW5ndGgtLS01Ij4KICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLUNvcHkiIHg9IjI2LjgwODUxMDYiIHk9IjYuNCIgd2lkdGg9IjYuMjU1MzE5MTUiIGhlaWdodD0iMjUuNiIgcng9IjMuMTI3NjU5NTciPjwvcmVjdD4KICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLUNvcHktNSIgeD0iMzUuNzQ0NjgwOSIgeT0iMCIgd2lkdGg9IjYuMjU1MzE5MTUiIGhlaWdodD0iMzIiIHJ4PSIzLjEyNzY1OTU3Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZS1Db3B5LTIiIHg9IjE3Ljg3MjM0MDQiIHk9IjEyLjgiIHdpZHRoPSI2LjI1NTMxOTE1IiBoZWlnaHQ9IjE5LjIiIHJ4PSIzLjEyNzY1OTU3Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZS1Db3B5LTMiIHg9IjguOTM2MTcwMjEiIHk9IjE5LjIiIHdpZHRoPSI2LjI1NTMxOTE1IiBoZWlnaHQ9IjEyLjgiIHJ4PSIzLjEyNzY1OTU3Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZS1Db3B5LTQiIHg9IjAiIHk9IjI1LjYiIHdpZHRoPSI2LjI1NTMxOTE1IiBoZWlnaHQ9IjYuNCIgcng9IjMuMTI3NjU5NTciPjwvcmVjdD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"
},function(e,t){e.exports={signalStrength:"SignalStrength-signalStrength-33wP3"}},function(e,t){e.exports={channelMapping:"DeviceChannelMapping-channelMapping-2Z4xx",deviceInfo:"DeviceChannelMapping-deviceInfo-3HnWc",channelEnabled:"DeviceChannelMapping-channelEnabled-1FW8M",deviceIdentifier:"DeviceChannelMapping-deviceIdentifier-3-v5l",mappingDisabled:"DeviceChannelMapping-mappingDisabled-3uY5j",channelName:"DeviceChannelMapping-channelName-2knCV",
signalStrength:"DeviceChannelMapping-signalStrength-3YDOu SignalStrength-signalStrength-33wP3",epgChannel:"DeviceChannelMapping-epgChannel-tjRMx",drmChannel:"DeviceChannelMapping-drmChannel-2CJhX",drmChannelBadge:"DeviceChannelMapping-drmChannelBadge-1_tZU",resolutionContainer:"DeviceChannelMapping-resolutionContainer-1Au-K"}},function(e,t){e.exports={form:"DeviceChannelMappings-form-BhAiS",channelMappingsBody:"DeviceChannelMappings-channelMappingsBody-1KPox ModalBody-modalBody--5uHS",
programGuideLabel:"DeviceChannelMappings-programGuideLabel-3tWK8",programGuideSelectContainer:"DeviceChannelMappings-programGuideSelectContainer-1cpiV",programGuideTitle:"DeviceChannelMappings-programGuideTitle-3xOjM",centeredContainer:"DeviceChannelMappings-centeredContainer-3NaUq",scroller:"DeviceChannelMappings-scroller-2_Aea Scroller-vertical-VScFL",channelMappingsContainer:"DeviceChannelMappings-channelMappingsContainer-2gZaI"}},function(e,t,n){"use strict";function i(){
return Object(b.createSelector)(M.a,D.a,j,function(e,t,n){return{isDiscoveringDevices:e.isDiscoveringDevices,selectedDevice:e.selectedDevice,setupErrorMessage:t,addDevicePending:e.addDevicePending,devices:n}})}function r(e,t){var n=t.serverEntityID;return{dispatchDiscoverDevices:function(){e(Object(C.j)({serverEntityID:n}))},dispatchFetchDevices:function(){e(Object(C.q)({serverEntityID:n}))},onAddDevice:function(t){e(Object(C.b)({serverEntityID:n,uri:t}))},onSelectDevice:function(t){
e(Object(C.z)({serverEntityID:n,deviceID:t}))}}}var a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(5),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),n(34)),S=n(299),M=n(160),D=n(374),C=n(135),O=n(2749),j=Object(b.createSelector)(function(e){return e.ui.dvrSettingsUI.dvrSetup.devices},function(e){return f.a.filter(e,function(e){return!e.parentID&&e.status===S.b.ALIVE})}),P=function(e){function t(n){l()(this,t);var i=u()(this,e.call(this,n))
;return i._discoverDevices=function(){i.props.dispatchDiscoverDevices()},i._discoverTimeoutID=null,i.discoverDelay=2e3,i}return p()(t,e),t.prototype.componentDidMount=function(){var e=this;Object(I.a)(function(){e.props.dispatchFetchDevices()}),this._discoverTimeoutID=setTimeout(this._discoverDevices,this.discoverDelay)},t.prototype.componentDidUpdate=function(e){
!this.props.isDiscoveringDevices&&e.isDiscoveringDevices&&(this._discoverTimeoutID=setTimeout(this._discoverDevices,this.discoverDelay))},t.prototype.componentWillUnmount=function(){this._discoverTimeoutID&&clearTimeout(this._discoverTimeoutID)},t.prototype.render=function(){var e=this.props,t=(e.dispatchDiscoverDevices,e.dispatchFetchDevices,o()(e,["dispatchDiscoverDevices","dispatchFetchDevices"]));return m.a.createElement(O.a,t)},t}(g.Component);t.a=Object(y.b)(i,r)(P)},function(e,t,n){
"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(4),m=n(24),y=n(39),b=n(80),I=n(47),S=n(102),M=n(291),D=n(181),C=n(133),O=n(226),j=n(74),P=n(92),w=n(305),T=n(375),E=n(772),x=n(1147),N=n(2757),A=n.n(N),L=o()(y.a,{}),k=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onShowDeviceAddressPress=function(){r.setState({showManualAddress:!r.state.showManualAddress})},
r.onDeviceAddressChange=function(e){r.setState({manualDeviceAddress:e})},r.onAddDevicePress=function(){r.props.onAddDevice(r.state.manualDeviceAddress)},r.state={showManualAddress:!1,manualDeviceAddress:""},r}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.selectedDevice,i=e.setupErrorMessage,a=e.addDevicePending,s=e.devices,l=e.onSelectDevice,c=e.onModalClose,u=this.state,d=u.showManualAddress,p=u.manualDeviceAddress,h=s.length>0;return o()(w.a,{
errorMessage:i,onModalClose:c},void 0,o()(j.a,{},void 0,h&&o()("div",{},void 0,Object(g.default)("We found hardware we recognize!")),!h&&o()("div",{},void 0,Object(g.default)("Looking for compatible devices...")),o()("div",{className:A.a.manualDeviceButtonContainer},void 0,o()(M.a,{kind:m.b.PRIMARY,direction:d?m.a.UP:m.a.DOWN,isSelected:!1,onPress:this.onShowDeviceAddressPress},void 0,Object(g.default)("Don't see your HDHomeRun device? Enter its network address manually"))),o()("div",{
className:A.a.manualDeviceContainer},void 0,d&&o()("div",{},void 0,o()(D.a,{},void 0,o()(C.a,{},void 0,Object(g.default)("HDHomeRun Device Address")),o()(O.a,{type:"text",name:"manualDeviceInput",className:A.a.manualDeviceInput,value:this.state.manualDeviceAddress,placeholder:Object(g.default)("IP address or hostname"),onChange:this.onDeviceAddressChange}),o()(S.a,{className:A.a.addDeviceButton,kind:m.b.PRIMARY,size:m.e.LARGE,isDisabled:!p,isSpinning:a,onPress:this.onAddDevicePress
},void 0,Object(g.default)("Connect"))))),!h&&o()("div",{className:A.a.spinnerContainer},void 0,L),h&&o()("div",{},void 0,o()("div",{className:A.a.deviceCount},void 0,1===s.length?Object(g.default)("1 device found"):Object(g.default)("{deviceCount} devices found",{deviceCount:s.length})),o()(b.a,{className:A.a.devices,scrollDirection:m.d.HORIZONTAL},void 0,s.map(function(e){var i=n&&n.key===e.key;return v.a.createElement(x.a,r()({key:e.key,className:A.a.device,serverEntityID:t,deviceID:e.key,
isSelectable:!0,isSelected:i,includeUri:!0,onSelectDevice:l},e))})))),o()(T.a,{},void 0,o()(P.a,{},void 0,o()(I.a,{kind:m.b.DEFAULT,size:m.e.MEDIUM,onPress:c},void 0,Object(g.default)("Cancel"))),o()(P.a,{},void 0,o()(E.a,{isDisabled:!n}))))},t}(f.Component);t.a=k},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={image:"DVRDeviceImage-image-1q4Bg"}},function(e,t){e.exports={unsupported:"UnsupportedDeviceIcon-unsupported-_Tz7j",unsupportedIcon:"UnsupportedDeviceIcon-unsupportedIcon-gpTqo",unsupportedTooltip:"UnsupportedDeviceIcon-unsupportedTooltip-38E6z Tooltip-bottomCenter-2yj43 Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipCenterAlignArrow-35uHt"}},function(e,t){e.exports={
deviceImageContainer:"DVRSetupDevice-deviceImageContainer-2xU-H",selectButton:"DVRSetupDevice-selectButton-ae6X2 SelectButton-selectButton-3Kbjm",details:"DVRSetupDevice-details-3KGan",make:"DVRSetupDevice-make-1bKta",modelContainer:"DVRSetupDevice-modelContainer-2aBGG",model:"DVRSetupDevice-model-2C8RY",uri:"DVRSetupDevice-uri-1doZG",channelCount:"DVRSetupDevice-channelCount-3h5cj"}},function(e,t){e.exports={addDeviceButton:"DVRSetupDeviceSelector-addDeviceButton-37qk2",
manualDeviceButtonContainer:"DVRSetupDeviceSelector-manualDeviceButtonContainer-3-lqe",manualDeviceContainer:"DVRSetupDeviceSelector-manualDeviceContainer-6K51i",manualAddressArrow:"DVRSetupDeviceSelector-manualAddressArrow-e9thn",manualDeviceInput:"DVRSetupDeviceSelector-manualDeviceInput-22enz TextInput-input-1VMum input-input-1P2Vi",deviceCount:"DVRSetupDeviceSelector-deviceCount-6HUil",devices:"DVRSetupDeviceSelector-devices-2f43G",device:"DVRSetupDeviceSelector-device-QX9WA",
spinnerContainer:"DVRSetupDeviceSelector-spinnerContainer-2U4Wi"}},function(e,t,n){"use strict";function i(){return Object(b.createSelector)(M.a,C.a,Object(D.a)(),function(e,t,n){var i=e.selectedDevice,r=i.sources.reduce(function(e,t){var n,i;switch(t){case"0":e.push((n={},n[t]=Object(I.default)("Antenna"),n));break;case"1":e.push((i={},i[t]=Object(I.default)("Cable"),i))}return e
},[]),a=e.scanPrefs,o=e.scanNetworks,s=e.hasScannedChannels,l=e.epgSettings,c=l.selectedCountry,u=l.countries,d=u.length>0,p=c?c.code:"",h=u.reduce(function(e,t){var n;return e.push((n={},n[t.code]=t.title,n)),e},[]);return{selectedDevice:i,setupErrorMessage:t,isChannelsPending:i.isChannelsPending,sourceOptions:r,countriesPopulated:d,selectedCountryCode:p,countryOptions:h,scanPrefs:a,scanNetworks:o,hasScannedChannels:s,channelScanActivity:n}})}function r(e,t){var n=t.serverEntityID;return{
dispatchFetchDeviceDetails:function(){e(O.p({serverEntityID:n}))},dispatchFetchDeviceChannels:function(){e(O.o({serverEntityID:n}))},dispatchFetchEPGCountries:function(){e(Object(j.fetchEPGCountries)({serverEntityID:n}))},dispatchCancelScanDeviceChannels:function(t){e(O.c({serverEntityID:n,deviceID:t}))},onDeviceSourceSelect:function(t){e(O.A({serverEntityID:n,source:t}))},onScanDeviceChannels:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e(O.y(f()({serverEntityID:n
},t)))},onCountrySelect:function(t){e(Object(j.selectEPGCountry)({serverEntityID:n,countryCode:t}))},onClearDeviceScanPrefs:function(){e(O.h({serverEntityID:n}))}}}var a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(7),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),n(4)),S=n(34),M=n(160),D=n(1150),C=n(374),O=n(135),j=n(556),P=n(2759),w=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onCancelScanDeviceChannels=function(){
r.setState({isCancellingChannelScan:!0}),r.props.dispatchCancelScanDeviceChannels(r.props.selectedDevice.key)},r.state={isCancellingChannelScan:!1},r}return p()(t,e),t.prototype.componentWillMount=function(){this.props.channelScanActivity&&this.setState({isCancellingChannelScan:!0})},t.prototype.componentDidMount=function(){var e=this,t=this.props.selectedDevice,n=t.source>-1?t.source.toString():t.sources[0];Object(S.a)(function(){e.props.dispatchFetchDeviceDetails(),
e.props.dispatchFetchDeviceChannels(),e.props.dispatchFetchEPGCountries(),e.props.onDeviceSourceSelect(n),e.props.onClearDeviceScanPrefs()})},t.prototype.componentWillReceiveProps=function(e){!e.channelScanActivity&&this.props.channelScanActivity&&this.setState({isCancellingChannelScan:!1})},t.prototype.componentDidUpdate=function(e,t){var n=this;this.props.channelScanActivity||!e.channelScanActivity||this.props.scanNetworks||Object(S.a)(function(){n.props.dispatchFetchDeviceChannels()})},
t.prototype.componentWillUnmount=function(){this.props.channelScanActivity&&!this.state.isCancellingChannelScan&&this.props.dispatchCancelScanDeviceChannels(this.props.selectedDevice.key)},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchDeviceDetails,e.dispatchFetchDeviceChannels,e.dispatchFetchEPGCountries,e.dispatchCancelScanDeviceChannels,o()(e,["dispatchFetchDeviceDetails","dispatchFetchDeviceChannels","dispatchFetchEPGCountries","dispatchCancelScanDeviceChannels"]))
;return m.a.createElement(P.a,f()({isCancellingChannelScan:this.state.isCancellingChannelScan,onCancelScanDeviceChannels:this.onCancelScanDeviceChannels},t))},t}(g.Component);t.a=Object(y.b)(i,r)(w)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),
n(0)),v=n.n(f),g=n(4),m=n(24),y=n(47),b=n(102),I=n(80),S=n(145),M=n(181),D=n(133),C=n(225),O=n(74),j=n(92),P=n(305),w=n(375),T=n(770),E=n(772),x=n(1147),N=n(2760),A=n(2764),L=n(2766),k=n.n(L),_=o()(T.a,{}),R=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onScanDeviceChannelsPress=function(e){var t=i.props.scanPrefs.length?{prefs:e}:e;i.props.onScanDeviceChannels(t)},
i.onDeviceSourceSelect=function(e){i.props.onDeviceSourceSelect(e),i.clearExistingScanPrefs()},i.onCountrySelect=function(e){i.props.onCountrySelect(e),i.clearExistingScanPrefs()},r=n,u()(i,r)}return p()(t,e),t.prototype.clearExistingScanPrefs=function(){var e=this.props,t=e.selectedDevice,n=e.scanPrefs,i=e.scanNetworks,r=e.onScanDeviceChannels,a=e.onClearDeviceScanPrefs;n.length?(a(),r(t.deviceID)):i.length&&a()},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.dvrID,i=e.selectedDevice,a=e.setupErrorMessage,s=e.isChannelsPending,l=e.sourceOptions,c=e.channelScanActivity,u=e.isCancellingChannelScan,d=e.selectedCountryCode,p=e.countryOptions,h=e.countriesPopulated,f=e.scanPrefs,T=e.scanNetworks,L=e.hasScannedChannels,R=e.onCancelScanDeviceChannels,z=e.onModalClose,U=i.selectedSource||i.sources[0],B=c?parseInt(c.Response.channels,10):i.channels.length,V=!(!B||c||s),F=!!f.length,Q=!!T.length,H=[{
"":Object(g.default)("Select Country")}].concat(p),Y=i.channels.some(function(e){return null!=e.signalQuality||null!=e.signalStrengh}),W=!(i&&i.channels.length&&!c&&d);return o()(P.a,{errorMessage:a,onModalClose:z},void 0,o()(O.a,{className:k.a.deviceInfoBody,scrollDirection:m.d.NONE},void 0,o()(S.b,{className:k.a.deviceInfoForm,onSubmit:this.onScanDeviceChannelsPress},void 0,o()("div",{className:k.a.channelInfo},void 0,o()(A.a,{channelCount:B,hasSignalStrength:Y,isChannelsPending:s,
channelScanActivity:c,hasScanPrefs:F,hasScanNetworks:Q}),o()("div",{},void 0,o()(b.a,{type:c?"button":"submit",kind:c||B||s?m.b.DEFAULT:m.b.PRIMARY,size:m.e.MEDIUM,isSpinning:u,isDisabled:!d||u,onPress:c?R:null},void 0,c?Object(g.default)("Stop scanning"):Object(g.default)("Scan channels")))),o()("div",{className:k.a.channelDetails},void 0,o()("div",{className:k.a.deviceDetails},void 0,v.a.createElement(x.a,r()({serverEntityID:t,deviceID:i.key,channelCount:B,includeChannelCount:!0
},i)),o()(M.a,{},void 0,o()(C.a,{className:k.a.channelScanSourceSelect,name:"deviceSource",value:U,values:l,isDisabled:!!c,onChange:this.onDeviceSourceSelect})),h&&o()(M.a,{className:k.a.countryInputGroup},void 0,o()(D.a,{},void 0,Object(g.default)("Country")),o()(C.a,{name:"countrySelect",value:d,values:H,isDisabled:!!c,onChange:this.onCountrySelect}))),o()("div",{className:k.a.deviceChannelsContainer},void 0,o()(I.a,{className:V?k.a.deviceChannels:k.a.deviceChannelsInfo,autoScroll:!0
},void 0,o()(N.a,{selectedDevice:i,channelCount:B,isChannelsPending:s,channelScanActivity:c,scanPrefs:f,scanNetworks:T,hasScannedChannels:L})))))),o()(w.a,{},void 0,o()(j.a,{},void 0,o()(y.a,{kind:m.b.DEFAULT,size:m.e.MEDIUM,onPress:z},void 0,Object(g.default)("Cancel"))),o()(j.a,{},void 0,_,o()(E.a,{dvrID:n,isDisabled:W}))))},t}(f.Component);R.defaultProps={scanPrefs:[],scanNetworks:[]},t.a=R},function(e,t,n){"use strict";function i(e){
var t=e.selectedDevice,n=e.channelCount,i=e.isChannelsPending,r=e.channelScanActivity,o=e.scanPrefs,c=e.scanNetworks,u=e.hasScannedChannels;return r?s()("div",{className:y.a.container},void 0,s()(h.a,{size:90,progress:r.progress}),s()("div",{className:y.a.message},void 0,Object(l.default)("Scanning channels"))):o.length?s()(v.a,{className:y.a.settings,prefs:o}):c.length?s()(g.a,{className:y.a.settings,networks:c}):i?s()("div",{className:y.a.container},void 0,s()("div",{className:y.a.message
},void 0,Object(l.default)("Loading channels"))):n?s()("div",{},void 0,t.channels.map(function(e){return d.a.createElement(f.a,a()({key:e.identifier},e))})):u?s()("div",{className:y.a.container},void 0,s()("div",{className:y.a.noChannelsIconContainer},void 0,s()("div",{className:y.a.noChannelsIconBackground},void 0,s()(p.a,{className:y.a.noChannelsIcon,name:"plex-icon-alert-560"}))),s()("div",{className:y.a.message
},void 0,Object(l.default)("No channels found. Make sure your device has a signal from your antenna and try scanning again."))):s()("div",{className:y.a.container},void 0,s()("div",{className:y.a.clockContainer},void 0,s()("div",{className:y.a.clockBackground}),s()(p.a,{className:y.a.clockTime,name:"plex-icon-dvr-clock-hour-560"}),s()(p.a,{className:y.a.clock,name:"plex-icon-dvr-clock-separator-560"}),s()(p.a,{className:y.a.clockTime,name:"plex-icon-dvr-clock-minutes-560"})),s()("div",{
className:y.a.message},void 0,Object(l.default)("Awaiting channel scan")))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(4),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(26),h=n(260),f=n(2761),v=n(1151),g=n(1152),m=n(2763),y=n.n(m);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.identifier,n=e.name,i=e.signalStrength,r=e.signalQuality;return a()("div",{className:u.a.channel},void 0,a()("div",{className:u.a.channelIdentifier},void 0,t),a()(l.a,{className:u.a.signalStrength,signalStrength:r||i
}),a()("div",{},void 0,n))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(1146)),c=n(2762),u=n.n(c);t.a=i},function(e,t){e.exports={channel:"DVRSetupDeviceChannel-channel-3Z90s",channelIdentifier:"DVRSetupDeviceChannel-channelIdentifier-1EqGb",signalStrength:"DVRSetupDeviceChannel-signalStrength-2Jp2f SignalStrength-signalStrength-33wP3"}},function(e,t){e.exports={container:"DVRSetupDeviceInfoChannelInfo-container-38Jxg",settings:"DVRSetupDeviceInfoChannelInfo-settings-3rutx",
message:"DVRSetupDeviceInfoChannelInfo-message-1d9gE",noChannelsIcon:"DVRSetupDeviceInfoChannelInfo-noChannelsIcon-339HB",clockContainer:"DVRSetupDeviceInfoChannelInfo-clockContainer-2n_Vv",noChannelsIconContainer:"DVRSetupDeviceInfoChannelInfo-noChannelsIconContainer-25faJ",clock:"DVRSetupDeviceInfoChannelInfo-clock-2vxBT",clockTime:"DVRSetupDeviceInfoChannelInfo-clockTime-qyydg DVRSetupDeviceInfoChannelInfo-clock-2vxBT",blink:"DVRSetupDeviceInfoChannelInfo-blink-107UT",
clockBackground:"DVRSetupDeviceInfoChannelInfo-clockBackground-2moSt",noChannelsIconBackground:"DVRSetupDeviceInfoChannelInfo-noChannelsIconBackground-3tc9i"}},function(e,t,n){"use strict";function i(e){var t=e.channelCount,n=e.hasSignalStrength,i=e.isChannelsPending,r=e.channelScanActivity,a=e.hasScanPrefs,o=e.hasScanNetworks
;return r?Object(s.default)("Scanning for channels... This may take some time."):a?Object(s.default)("We need some more information before proceeding with the channel scan."):o?Object(s.default)("Please select a network before proceeding with the channel scan."):i?Object(s.default)("Fetching device channels"):t?n?Object(s.default)("We found {channelCount} channels. If these don't look right, you can scan again. Signal strength is stored at the time of scanning.",{channelCount:t
}):Object(s.default)("We found {channelCount} channels. If these don't look right, you can scan again.",{channelCount:t}):Object(s.default)("Make sure your device is connected to your antenna or cable and click Scan Channels.")}function r(e){var t=i(e);return o()("div",{className:d.a.message},void 0,t)}var a=n(2),o=n.n(a),s=n(4),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(2765)),d=n.n(u);t.a=r},function(e,t){e.exports={message:"DVRSetupDeviceInfoMessage-message-2ozwd"}},function(e,t){e.exports={
deviceInfoBody:"DVRSetupDeviceInfo-deviceInfoBody-2LzEx ModalBody-modalBody--5uHS",deviceInfoForm:"DVRSetupDeviceInfo-deviceInfoForm-1K-pG",channelInfo:"DVRSetupDeviceInfo-channelInfo-32L38",channelDetails:"DVRSetupDeviceInfo-channelDetails-314k9",deviceDetails:"DVRSetupDeviceInfo-deviceDetails-3DYVe",countryInputGroup:"DVRSetupDeviceInfo-countryInputGroup-5CATq",channelScanSourceSelect:"DVRSetupDeviceInfo-channelScanSourceSelect-22g5X SelectInput-input-x1tNm input-input-1P2Vi",
deviceChannelsContainer:"DVRSetupDeviceInfo-deviceChannelsContainer-2ffnz",deviceChannels:"DVRSetupDeviceInfo-deviceChannels-2erQ6 Scroller-vertical-VScFL",deviceChannelsInfo:"DVRSetupDeviceInfo-deviceChannelsInfo-3oUd5 DVRSetupDeviceInfo-deviceChannels-2erQ6 Scroller-vertical-VScFL"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(o.a,function(e){var t=e.selectedDevice;return{make:t.make,model:t.model,thumb:t.thumb}})}var r=n(11),a=n(6),o=(n.n(a),n(160)),s=n(2768)
;t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.dvrID,i=e.make,r=e.model,o=e.thumb,s=e.onModalClose;return a()(m.a,{title:Object(l.default)("Unsupported Tuner"),onModalClose:s},void 0,a()(v.a,{className:M.a.unsupportedDeviceBody,scrollDirection:c.d.NONE},void 0,a()("div",{className:M.a.imageContainer},void 0,a()(I.a,{serverEntityID:t,make:i,model:r,thumb:o,width:D,height:C}),a()("div",{className:M.a.makeModelContainer
},void 0,a()("div",{},void 0,i),a()("div",{},void 0,r))),a()("div",{className:M.a.info},void 0,Object(l.default)("Community Supported Tuners opens up your Plex account to access a larger variety of DVR tuners, many of which have been tested and are supported by the community. If your tuner hasn't been recognized by Plex DVR and you're up for a little adventure, this will allow you to use unsupported tuners that have not been tested by Plex.")),a()("div",{className:M.a.info},void 0,a()(u.a,{
message:Object(l.default)("We recommend you review our {openLink}Community Supported Tuners{closeLink} article to learn about limitations, compatibility, and how to get involved."),tags:[{open:"openLink",close:"closeLink",component:f.a,kind:c.b.PRIMARY,to:"https://support.plex.tv/articles/community-supported-tuners/",target:"_blank"}]}))),a()(y.a,{},void 0,a()(g.a,{},void 0,a()(h.a,{kind:c.b.DEFAULT,size:c.e.MEDIUM,onPress:s},void 0,Object(l.default)("Cancel"))),a()(g.a,{},void 0,a()(b.a,{
dvrID:n,label:Object(l.default)("Enable Unsupported Tuner")}))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(24),u=n(199),d=n(45),p=n.n(d),h=n(47),f=n(22),v=n(74),g=n(92),m=n(305),y=n(375),b=n(772),I=n(558),S=n(2769),M=n.n(S),D=parseInt(p.a.dvrSetupImageWidth,10),C=100;t.a=i},function(e,t){e.exports={unsupportedDeviceBody:"DVRSetupUnsupportedDevice-unsupportedDeviceBody-1vVn1 ModalBody-modalBody--5uHS",imageContainer:"DVRSetupUnsupportedDevice-imageContainer-3DhXF",
makeModelContainer:"DVRSetupUnsupportedDevice-makeModelContainer-2bdrZ",info:"DVRSetupUnsupportedDevice-info-1un44"}},function(e,t){e.exports={modal:"DVRSetupModal-modal-3IeKF Modal-medium-1UIAd Modal-modal-3Z1JS"}},function(e,t,n){"use strict";function i(e){var t=e.imageUrl,n=e.headerImgUrl,i=e.header,r=e.text,s=e.actionText,l=e.infoText,c=e.infoUrl,f=e.onActionPress,I=e.onDismissPress;return a()("div",{className:v.a.container},void 0,t&&a()("div",{className:v.a.image,style:y},void 0,a()(h.a,{
src:t,width:g,height:m,background:!0,backgroundSize:"cover",transition:!0})),a()("div",{className:v.a.call},void 0,a()("div",{className:v.a.header},void 0,n&&a()("img",{className:v.a.headerImage,src:n}),i),a()("div",{className:v.a.text},void 0,r)),a()("div",{className:v.a.actions},void 0,a()("div",{className:v.a.actionButton},void 0,a()(d.a,{kind:u.PRIMARY,onPress:f},void 0,s)),a()("div",{className:v.a.infoButton},void 0,c&&a()(p.a,{kind:u.PRIMARY,to:c,target:"_blank"
},void 0,l||Object(o.default)("Learn more")))),a()("div",{className:v.a.dismissButton},void 0,I&&a()(p.a,{onPress:I},void 0,b)))}var r=n(2),a=n.n(r),o=n(4),s=n(26),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(65)),d=n(47),p=n(22),h=n(409),f=n(2772),v=n.n(f),g=220,m=140,y={width:g,height:m},b=a()(s.a,{name:"plex-icon-remove-560"});t.a=i},function(e,t){e.exports={container:"DashboardBanner-container-2OmIz",image:"DashboardBanner-image-2XZVh",call:"DashboardBanner-call-v2F8E",
header:"DashboardBanner-header-3kNdr",headerImage:"DashboardBanner-headerImage-2sECm",text:"DashboardBanner-text-fvmdp",actions:"DashboardBanner-actions-2MrVM",dismissButton:"DashboardBanner-dismissButton-3tRWE",actionButton:"DashboardBanner-actionButton-17R4_",infoButton:"DashboardBanner-infoButton-1DRa1"}},function(e,t){e.exports={dashboardPageContent:"DashboardPage-dashboardPageContent-2rN8X PageContent-innerPageContent-3ktLT",
attribution:"DashboardPage-attribution-3AsG5 ProgramGuideAttribution-attribution-3Ca_I"}},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(function(e){return e.ui.libraryPage},Object(c.a)(),Object(u.a)(),Object(d.a)(),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.details;return{libraryKey:n,librarySectionID:r&&r.librarySectionID,providerIdentifier:t.identifier,selectedType:i}})}function r(e,t){return{onLibraryChange:function(n,i){
e(Object(p.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,providerIdentifier:n,sectionID:i}))},dispatchInitLibraryPageMetadataList:function(t){e(h.initLibraryPageMetadataList(t))},dispatchPopulateLibraryFirstCharacters:function(){e(h.populateLibraryFirstCharacters())}}}function a(e){var t=e.ui.libraryPage;return{providerEntityID:t.providerEntityID,libraryKey:t.libraryKey}}function o(e,t){e(h.initLibraryPage({serverEntityID:t.serverEntityID,
providerEntityID:t.providerEntityID,libraryKey:t.libraryKey})),e(h.populateLibraryDetails())}var s=n(11),l=n(6),c=(n.n(l),n(79)),u=n(206),d=n(306),p=n(148),h=n(307),f=n(202),v=n(2775),g=Object(f.a)(v.a,a,o),m=Object(s.b)(i,r)(g);t.a=m},function(e,t,n){"use strict";function i(e,t){if(e){if(t){var n=Object(I.q)(e.type);return n?Object(I.q)(n.id).typeString:k.e}return Object(I.n)(e.type)?Object(I.r)(e.type).typeString:e.type}}function r(e){if(e)return e.subtype}function a(){
return Object(b.createSelector)(function(e){return e.ui.libraryPage},function(e,t){return t.selectedDirectory},function(e,t){return t.folderKey},Object(M.a)(),Object(C.a)(),Object(O.a)(),Object(j.a)(),Object(D.a)("query/parse"),Object(P.a)(),Object(w.a)(),x.a,E.a,Object(N.a)(),function(e,t,n,a,o,s,l,c){
var u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{},d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:{},p=arguments[10],h=arguments[11],f=arguments[12],v=e.metadataList,g=e.directoryList,m=e.firstCharacters,y=e.details,b=e.isDetailsPending,M=e.isDetailsPopulated,D=e.detailsError,C=i(u,n),O=r(u),j=Object(_.a)(p,T.b,C,O,a);return{libraryKey:o,containerKey:s,librarySectionID:y&&y.librarySectionID,firstCharacterKey:l,queryParseKey:c,metadataListEntityID:v,directoryListEntityID:g,
providerIdentifier:a.identifier,providerMetricsIdentifier:a.metricsIdentifier,isProgramGuide:S.c.EPG_IDENTIFIER.test(a.identifier),showLibrarySpinner:!(D||M&&(v||g)),showLibraryError:!b&&!!D,libraryErrorStatus:D&&D.status,libraryDirectories:y&&y.directories,listTitle:u.title,listType:C,listSubtype:O,listStyle:j,typeKey:u.key,selectedType:u,selectedSort:d,activeSelectionType:h.activeSelectionType,isDirectoryList:!Object(I.n)(C)&&C!==k.e,isLibraryRefreshing:f,firstCharacterCount:m?m.length:0}})}
function o(e,t){return{onLibraryChange:function(n,i){e(Object(A.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,providerIdentifier:n,sectionID:i}))},dispatchInitLibraryPageMetadataList:function(t){e(L.initLibraryPageMetadataList(t))},dispatchInitLibraryPageDirectoryList:function(t){e(L.initLibraryPageDirectoryList(t))},dispatchPopulateLibraryFirstCharacters:function(){e(L.populateLibraryFirstCharacters())}}}
var s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),n(28)),S=n(55),M=n(79),D=n(559),C=n(206),O=n(2776),j=n(2777),P=n(306),w=n(1156),T=n(31),E=n(88),x=n(773),N=n(774),A=n(148),L=n(307),k=n(229),_=n(775),R=n(2778),z=function(e){function t(){return u()(this,t),p()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.typeKey,n=e.containerKey;t&&n&&this._populate()},
t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.typeKey,i=t.containerKey;(n&&n!==e.typeKey||i&&i!==e.containerKey)&&this._populate()},t.prototype._populate=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.containerKey,r=e.typeKey,a=e.folderKey,o=e.firstCharacterKey,s=e.queryParseKey,l=e.isDirectoryList,c=e.dispatchInitLibraryPageMetadataList,u=e.dispatchInitLibraryPageDirectoryList,d=e.dispatchPopulateLibraryFirstCharacters;l?u({serverEntityID:t,
providerEntityID:n,containerKey:i,typeKey:r}):(c({serverEntityID:t,providerEntityID:n,containerKey:i,typeKey:r,folderKey:a,firstCharacterKey:o,queryParseKey:s}),d())},t.prototype.render=function(){var e=this.props,t=(e.dispatchInitLibraryPageMetadataList,e.dispatchPopulateLibraryFirstCharacters,l()(e,["dispatchInitLibraryPageMetadataList","dispatchPopulateLibraryFirstCharacters"]));return m.a.createElement(R.a,t)},t}(g.Component);t.a=Object(y.b)(a,o)(z)},function(e,t,n){"use strict"
;function i(){return Object(r.createSelector)(function(e,t){return t.folderKey},Object(a.a)("all"),function(e,t){return e||t})}t.a=i;var r=n(6),a=(n.n(r),n(559))},function(e,t,n){"use strict";function i(){return Object(r.a)("firstCharacter")}t.a=i;var r=n(559)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(35),v=n(2779),g=(n(115),
n(31)),m=n(101),y=n(81),b=n(39),I=n(187),S=n(157),M=n(756),D=n(302),C=n(158),O=n(373),j=n(2780),P=n(552),w=n(1133),T=n(2803),E=n(2806),x=n(2824),N=n(2864),A=n(2871),L=n(2894),k=n.n(L),_=r()(S.a,{},void 0,r()(b.a,{})),R=r()(M.a,{}),z=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));U.call(r);var a=n.listHeight,s=n.scrollIndex,c=n.viewportHeight;return r.state={listHeight:a,scrollIndex:s,viewportHeight:c},r}return u()(t,e),t.prototype.componentDidMount=function(){
var e=this.props,t=e.librarySectionID,n=e.providerIdentifier,i=e.onLibraryChange;t&&i(n,t)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.librarySectionID,i=t.providerIdentifier,r=t.onLibraryChange;n&&n!==e.librarySectionID&&r(i,n)},t.prototype.componentWillUnmount=function(){this.props.onLibraryChange(null,null)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,a=e.directoryListEntityID,o=e.containerKey,s=e.providerIdentifier,l=e.providerMetricsIdentifier,c=e.isProgramGuide,u=e.selectedDirectory,d=e.showLibrarySpinner,p=e.showLibraryError,g=e.libraryErrorStatus,b=e.libraryDirectories,S=e.selectedSort,M=e.listTitle,L=e.listType,z=e.listSubtype,U=e.listContext,B=e.listStyle,V=e.activeSelectionType,F=e.typeKey,Q=e.activeFilters,H=e.activeFilterLabel,Y=e.activeSort,W=e.activeLimit,G=e.customFilter,K=e.folderKey,q=e.folderTitle,Z=e.parentFolderKey,X=e.parentFolderTitle,J=e.isDirectoryList,$=e.isLibraryRefreshing,ee=e.firstCharacterCount,te=this.state,ne=te.listHeight,ie=te.scrollIndex,re=te.viewportHeight,ae=/titleSort/i.test(S.key),oe=Math.max(ne,1),se=ee>=5,le=re/oe<=.25,ce=!K&&ae&&se&&le,ue=B===y.f,de=!V&&!!K,pe=!V&&!K
;return d?_:404===g?R:p?r()(D.a,{title:Object(h.default)("There was an unexpected error loading this library")}):r()(I.a,{metricsPage:f.E,metricsProperties:{identifier:l,mode:K?v.a:v.b,type:L,customFilter:G,style:B},allowBackgroundLightPreset:!0,scrollDirection:m.NONE},void 0,V&&r()(O.a,{serverEntityID:t,providerEntityID:n}),de&&r()(T.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,libraryDirectories:b,listType:L,listSubtype:z,listContext:U,listStyle:B,selectedDirectory:u,
folderKey:K,folderTitle:q,parentFolderKey:Z,parentFolderTitle:X}),pe&&r()(E.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i||a,libraryDirectories:b,listType:L,listSubtype:z,listContext:U,listStyle:B,selectedDirectory:u,typeKey:F,activeFilters:Q,activeFilterLabel:H,activeSort:Y,customFilter:G,showSortsMenu:!ue}),G&&r()(x.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,providerIdentifier:s,typeKey:F,activeSort:Y,activeLimit:W,selectedSort:S}),ue&&r()(j.a,{
providerEntityID:n,listType:L,listSubtype:z,listContext:U,typeKey:F,activeFilters:Q,activeFilterLabel:H,activeSort:Y,customFilter:G,selectedSort:S,isDisabled:!!K}),r()(C.a,{component:A.a,serverEntityID:t,providerEntityID:n,metadataListEntityID:i||a,containerKey:o,containerTitle:q,providerIdentifier:s,hasGutter:ce,scrollIndex:ie,listTitle:M,listType:L,listSubtype:z,listContext:U,listStyle:B,typeKey:F,activeFilters:Q,activeSort:Y,selectedSort:S,initialSize:50,shouldResetOnUnmount:!0,
isDirectoryList:J,isLibraryRefreshing:$,onListScrollIndexChange:this.onListScrollIndexChange,onListUpdate:this.onListUpdate,onMeasure:this.onMeasure},void 0,c&&r()(P.a,{className:k.a.attribution,providerEntityID:n})),ce&&r()(N.a,{activeSort:Y,viewportHeight:re,onJumpBarItemPress:this.onJumpBarItemPress}),c&&r()(w.a,{serverEntityID:t,providerEntityID:n}))},t}(p.Component),U=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})}};z.defaultProps={listContext:g.b,scrollIndex:0,listHeight:0,viewportHeight:0},t.a=z},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r});var i="folder",r="type"},function(e,t,n){"use strict";function i(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1],n=e.reduce(function(e,t){return e[t.key]=t,e},{});return t.map(function(e){var t=n[e.ascKey];return t?f()({},e,{title:function(n){return t.title||e.title(n)}}):e})}function r(){return Object(b.createSelector)(function(e,t){return t.listType},Object(I.a)(),Object(S.a)(),function(e,t,n){var r=Object(D.a)(n.sorts),a=t.reduce(function(e,t){return e[t.key]=t,e},{});return{allTableColumns:i(n.sorts,r),
activeTableColumnsByKey:a,activeTableColumns:t}})}var a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(7),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),n(1157)),S=n(306),M=n(307),D=n(1158),C=n(2800),O={dispatchSelectLibraryTableColumn:M.selectLibraryTableColumn,dispatchDeselectLibraryTableColumn:M.deselectLibraryTableColumn},j=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s]
;return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onColumnSelect=function(e){i.props.dispatchSelectLibraryTableColumn({type:i.props.listType,subtype:i.props.listSubtype,activeTableColumns:i.props.activeTableColumns,key:e})},i.onColumnDeselect=function(e){i.props.dispatchDeselectLibraryTableColumn({type:i.props.listType,subtype:i.props.listSubtype,activeTableColumns:i.props.activeTableColumns,key:e})},r=n,u()(i,r)}return p()(t,e),t.prototype.render=function(){
var e=this.props,t=(e.dispatchSelectLibraryTableColumn,e.dispatchDeselectLibraryTableColumn,e.activeTableColumns,o()(e,["dispatchSelectLibraryTableColumn","dispatchDeselectLibraryTableColumn","activeTableColumns"]));return m.a.createElement(C.a,f()({},t,{onColumnSelect:this.onColumnSelect,onColumnDeselect:this.onColumnDeselect}))},t}(g.Component);t.a=Object(y.b)(r,O)(j)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(l.a)(),function(e){return e?{title:e.title,
isFolder:e.isFolder,isMultiVersion:Object(o.a)(e),hasMusicVideo:Object(s.a)(e)}:{}})}var r=n(11),a=n(6),o=(n.n(a),n(1061)),s=n(1159),l=n(21),c=n(2782);t.a=Object(r.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.title,i=e.isFolder,r=e.isMultiVersion,o=e.hasMusicVideo;return a()("span",{className:t},void 0,a()("div",{className:u.a.titleContainer},void 0,i&&a()(l.a,{className:u.a.folderIconContainer,iconClassName:u.a.folderIcon,name:"plex-icon-folder-560"
}),a()("span",{className:u.a.title},void 0,n),a()("span",{},void 0,r&&a()(l.a,{iconClassName:u.a.multiVersionIcon,name:"plex-icon-files-560"}),o&&d)))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(1160)),c=n(2784),u=n.n(c),d=a()(l.a,{name:"plex-icon-shows-560"});t.a=i},function(e,t){e.exports={decoratorIconContainer:"MetadataTitleDecoratorIcon-decoratorIconContainer-3n0am",decoratorIcon:"MetadataTitleDecoratorIcon-decoratorIcon-sjuWW"}},function(e,t){e.exports={
titleContainer:"MetadataTableTitle-titleContainer-3sPQC",title:"MetadataTableTitle-title-2WmEM",folderIconContainer:"MetadataTableTitle-folderIconContainer-3Tcvn MetadataTitleDecoratorIcon-decoratorIconContainer-3n0am",folderIcon:"MetadataTableTitle-folderIcon-1bAao MetadataTitleDecoratorIcon-decoratorIcon-sjuWW",multiVersionIcon:"MetadataTableTitle-multiVersionIcon-1lcNL MetadataTitleDecoratorIcon-decoratorIcon-sjuWW"}},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(Object(o.a)(),function(){return{originalTitle:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).originalTitle}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2786);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.originalTitle;return a()("span",{className:t,title:n},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0));n.n(s);t.a=i},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(Object(s.a)(),function(e){return e?{title:e.title,originalTitle:e.originalTitle,hasMusicVideo:Object(o.a)(e)}:{}})}var r=n(11),a=n(6),o=(n.n(a),n(1159)),s=n(21),l=n(2788);t.a=Object(r.b)(i)(l.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.title,i=e.originalTitle,r=e.hasMusicVideo;return a()("span",{className:t},void 0,a()("span",{className:d.a.titleContainer},void 0,a()("span",{className:d.a.title,"data-qa-id":"trackName"
},void 0,n,!!i&&a()("span",{className:d.a.trackArtist},void 0,!!n&&p,i)),r&&h))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(86)),c=n(1160),u=n(2789),d=n.n(u),p=a()(l.a,{}),h=a()(c.a,{name:"plex-icon-shows-560"});t.a=i},function(e,t){e.exports={titleContainer:"MetadataTitleCombinedTitleTrackArtist-titleContainer-4jblz",title:"MetadataTitleCombinedTitleTrackArtist-title-2YgMr",trackArtist:"MetadataTitleCombinedTitleTrackArtist-trackArtist-19qju"}},function(e,t,n){"use strict"
;function i(){return Object(a.createSelector)(Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{duration:e.duration,viewOffset:e.viewOffset,viewCount:e.viewCount,isFolder:e.isFolder}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2791);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.size,i=e.duration,r=e.viewOffset,o=e.viewCount;return e.isFolder?null:o||r?a()(c.a,{className:t,duration:i,viewOffset:r}):a()("div",{
className:(d.a.unwatchedCircle||"")+" "+(d.a[n]||"")})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(61)),c=n(714),u=n(2792),d=n.n(u);i.defaultProps={size:l.MEDIUM},t.a=i},function(e,t){e.exports={unwatchedCircle:"MetadataTitleProgress-unwatchedCircle-25KKn",medium:"MetadataTitleProgress-medium-1tjFo"}},function(e,t,n){"use strict";function i(e){var t=e.size,n=e.saved,i=e.viewOffset,r=e.viewCount;return null==n||n||i?r||i?i?a()("div",{
className:(u.a.unwatchedCircle||"")+" "+(u.a.isPartiallyWatched||"")+" "+(u.a[t]||"")}):null:a()("div",{className:(u.a.unwatchedCircle||"")+" "+(u.a[t]||"")}):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(61)),c=n(2794),u=n.n(c);i.defaultProps={size:l.MEDIUM},t.a=i},function(e,t){e.exports={unwatchedCircle:"MetadataTitleMiniProgress-unwatchedCircle-235-S MetadataTitleProgress-unwatchedCircle-25KKn",isPartiallyWatched:"MetadataTitleMiniProgress-isPartiallyWatched-19Hrx",
small:"MetadataTitleMiniProgress-small-1fCco",medium:"MetadataTitleMiniProgress-medium-xU97R"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){return{unviewedLeafCount:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).unviewedLeafCount}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2796);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.unviewedLeafCount,i=void 0
;return n>0&&(i=Object(l.default)("{numEpisodes} unplayed",{numEpisodes:n})),a()("span",{className:t},void 0,i)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4));t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){return{viewCount:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).viewCount}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(2798);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.viewCount;return a()("span",{className:t},void 0,n>0?n:null)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0));n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){return e.experienceSettings.libraryTableColumns}t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=(n(115),n(54)),v=n(264),g=n(26),m=n(22),y=n(75),b=n(2801),I=n(2802),S=n.n(I),M=r()(g.a,{name:"plex-icon-more-560"
}),D=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onChangeColumnsPress=function(e){r.setState({isColumnsMenuOpen:!r.state.isColumnsMenuOpen})},r.onColumnsMenuClose=function(){r.setState({isColumnsMenuOpen:!1})},r.state={isColumnsMenuOpen:!1},r._columnsButtonID=Object(f.a)(),r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.activeTableColumnsByKey,n=e.allTableColumns,i=e.typeKey,a=e.listType,o=e.activeFilters,s=e.activeFilterLabel,l=e.activeSort,c=e.customFilter,u=e.selectedSort,d=e.isDisabled,p=e.onColumnSelect,f=e.onColumnDeselect,I=this.state.isColumnsMenuOpen;return r()("div",{className:S.a.tableHeader,"data-qa-id":"metadataTableHeader"},void 0,r()("div",{className:S.a.playCell}),n.map(function(e){var n=e.style,p=e.title,f=e.ascKey,y=e.descKey,b=e.key;if(!t[b])return null
;var I=l===f||l===y||u.key===f,M=l?l===f:u.key===f;return d?r()("div",{style:n,className:S.a.tableHeaderLink},b,r()("div",{className:S.a.tableHeaderCell},void 0,r()("div",{className:S.a.tableHeaderTitle},void 0,p(a)))):r()(m.a,{style:n,className:S.a.tableHeaderLink,to:Object(v.a)({typeKey:i,filters:o,filterLabel:s,sort:M?y:f,customFilter:c})},b,r()("div",{className:I?S.a.activeTableHeaderCell:S.a.tableHeaderCell},void 0,r()("div",{className:S.a.tableHeaderTitle},void 0,p(a)),I&&M&&r()(g.a,{
className:S.a.sortDirectionIcon,name:"plex-icon-sort-ascending-560","aria-label":Object(h.default)("Ascending")}),I&&!M&&r()(g.a,{className:S.a.sortDirectionIcon,name:"plex-icon-sort-descending-560","aria-label":Object(h.default)("Descending")})))}),r()("div",{className:S.a.actionsCell},void 0,r()(m.a,{id:this._columnsButtonID,className:S.a.columnsButton,"aria-label":Object(h.default)("Change Columns"),"aria-haspopup":!0,onPress:this.onChangeColumnsPress},void 0,M),r()(y.a,{
target:this._columnsButtonID,isOpen:I,onMenuClose:this.onColumnsMenuClose},void 0,n.map(function(e){return r()(b.a,{columnKey:e.key,isSelected:!!t[e.key],onColumnSelect:p,onColumnDeselect:f},e.key,e.title(a))}))))},t}(p.Component);t.a=D},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(108)),f=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c]
;return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onPress=function(e){(i.props.isSelected?i.props.onColumnDeselect:i.props.onColumnSelect)(i.props.columnKey)},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.isSelected;return r()(h.a,{isSelected:n,onPress:this.onPress},void 0,t)},t}(p.Component);t.a=f},function(e,t){e.exports={tableHeader:"MetadataTableHeader-tableHeader-2bHAm",tableHeaderLink:"MetadataTableHeader-tableHeaderLink-7Uy9q",
tableHeaderCell:"MetadataTableHeader-tableHeaderCell-61R48 MetadataTableCell-tableCell-35117",activeTableHeaderCell:"MetadataTableHeader-activeTableHeaderCell-16E3M MetadataTableHeader-tableHeaderCell-61R48 MetadataTableCell-tableCell-35117",tableHeaderTitle:"MetadataTableHeader-tableHeaderTitle-2CMNj",sortDirectionIcon:"MetadataTableHeader-sortDirectionIcon-3oFWZ",
playCell:"MetadataTableHeader-playCell-1oEdH MetadataTableRow-playCell-ziDSk MetadataTableHeader-tableHeaderCell-61R48 MetadataTableCell-tableCell-35117",actionsCell:"MetadataTableHeader-actionsCell-1RppT MetadataTableRow-libraryActionsCell-2OOmP MetadataTableRow-actionsCell-1ax6E MetadataTableHeader-tableHeaderCell-61R48 MetadataTableCell-tableCell-35117",columnsButton:"MetadataTableHeader-columnsButton-33h2b"}},function(e,t,n){"use strict";function i(){
return Object(o.createSelector)(function(e,t){return t.selectedDirectory},function(e,t){return t.folderKey},function(e,t){return t.folderTitle},function(e,t){return t.parentFolderKey},function(e,t){return t.parentFolderTitle},c.a,u.a,function(e,t,n,i,r,a,o){var s=e.key,l={folderKey:i,folderTitle:r};if(!i){var c=s+"/folder";if(c===t)return null;l.folderKey=c,l.folderTitle=e.title}return Object(h.a)(a,o,s,l)})}function r(){return Object(o.createSelector)(function(e,t){return t.listType
},function(e,t){return t.libraryDirectories},c.a,u.a,Object(s.a)(),d.a,Object(l.a)(),i(),function(e,t,n,i,r,a,o,s){var l=Object(f.a)(e,null,p.b,i),c={key:"folder"},u=Object(v.a)({type:e,server:n,provider:i,libraryKey:r,libraryDirectories:t});return{parentRoute:s,size:o.totalSize||o.metadataItems.length,metadataTypes:a,metadataPseudoTypes:u,selectedType:c,allListStyles:l}})}var a=n(11),o=n(6),s=(n.n(o),n(206)),l=n(159),c=n(48),u=n(37),d=n(377),p=n(31),h=n(122),f=n(560),v=n(561),g=n(2804)
;t.a=Object(a.b)(r)(g.a)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(54),v=(n(31),n(81),n(263)),g=n(188),m=n(189),y=n(204),b=n(205),I=n(379),S=n(562),M=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onTypesMenuButtonPress=function(e){r.setState({isTypesMenuOpen:!r.state.isTypesMenuOpen})},r.onTypesMenuClose=function(){r.setState({isTypesMenuOpen:!1})},r.state={
isTypesMenuOpen:!1},r._typesMenuButtonID=Object(f.a)(),r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.selectedDirectory,n=e.folderTitle,i=e.parentFolderTitle,a=e.parentRoute,o=e.size,s=e.listType,l=e.listContext,c=e.listStyle,u=e.metadataTypes,d=e.metadataPseudoTypes,p=e.selectedType,f=e.allListStyles,M=this.state.isTypesMenuOpen;return r()(g.a,{},void 0,r()(m.a,{},void 0,r()(b.a,{id:this._typesMenuButtonID,title:Object(h.default)("Folders"),hasMenu:!0,isMenuOpen:M,
onPress:this.onTypesMenuButtonPress}),r()(S.a,{target:this._typesMenuButtonID,isOpen:M,types:u,pseudoTypes:d,selectedType:p,activeFilters:[],onMenuClose:this.onTypesMenuClose}),!!a&&r()(b.a,{title:i||t.title,hasMenu:!1,to:a}),r()(b.a,{title:n}),r()(I.a,{},void 0,o)),r()(y.a,{},void 0,r()(v.a,{listType:s,listContext:l,selectedListStyle:c,allListStyles:f})))},t}(p.Component);t.a=M},function(e,t){e.exports={badge:"PageHeaderBadge-badge-sOmD-"}},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(function(e,t){return t.listType},function(e,t){return t.listSubtype},function(e,t){return t.listStyle},function(e,t){return t.libraryDirectories},Object(u.a)(),d.a,Object(l.a)(),Object(o.a)(),p.a,Object(s.a)(),Object(h.a)(),Object(v.a)(),Object(f.a)(),function(e,t,n,i,r,a,o,s,l,u,d,p,h){var f=Object(g.a)(e,t,c.b,a);return{server:r,provider:a,directories:s,metadataTypes:l,metadataPseudoTypes:Object(m.a)({type:e,server:r,provider:a,libraryKey:o,libraryDirectories:i
}),selectedType:d,selectedFilterTitle:p,selectedSort:h,listType:e,listStyle:n,allListStyles:f,totalSize:u.totalSize}})}var r=n(11),a=n(6),o=(n.n(a),n(303)),s=n(159),l=n(206),c=n(31),u=n(42),d=n(37),p=n(377),h=n(306),f=n(1156),v=n(2807),g=n(560),m=n(561),y=n(2808);t.a=Object(r.b)(i)(y.a)},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(function(e,t){return t.activeFilters},function(e,t){return t.activeFilterLabel},Object(c.a)(),function(e,t,n){
if(a.a.isEmpty(e)||!n)return Object(s.default)("All");var i=[],r=e.reduce(function(e,t){return(t.type===l.a?e.boolean:e.other).push(t),e},{boolean:[],other:[]}),o=r.boolean,c=r.other;if(1===o.length){var u=o[0],d=a.a.findWhere(n.filters,{filter:u.key,filterType:l.a});d&&i.push(d.title)}return 1===c.length&&t&&i.push(t),i.length?i.join(" "):Object(s.default)("Filtered")})}t.a=i;var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),n(4)),l=n(265),c=n(306)},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(29),v=n(54),g=(n(95),n(87),n(115),n(31),n(81),n(777)),m=n(778),y=n(263),b=n(188),I=n(189),S=n(204),M=n(205),D=n(379),C=n(446),O=n(2813),j=n(562),P=n(2823),w=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onDirectoriesMenuButtonPress=function(e){r.setState({isDirectoriesMenuOpen:!r.state.isDirectoriesMenuOpen})},r.onDirectoriesMenuClose=function(){
r.setState({isDirectoriesMenuOpen:!1})},r.onFiltersMenuButtonPress=function(e){r.setState({isFiltersMenuOpen:!r.state.isFiltersMenuOpen})},r.onFiltersMenuClose=function(){r.setState({isFiltersMenuOpen:!1})},r.onTypesMenuButtonPress=function(e){r.setState({isTypesMenuOpen:!r.state.isTypesMenuOpen})},r.onTypesMenuClose=function(){r.setState({isTypesMenuOpen:!1})},r.onSortsMenuButtonPress=function(e){r.setState({isSortsMenuOpen:!r.state.isSortsMenuOpen})},r.onSortsMenuClose=function(){r.setState({
isSortsMenuOpen:!1})},r.state={isDirectoriesMenuOpen:!1,isFiltersMenuOpen:!1,isTypesMenuOpen:!1,isSortsMenuOpen:!1},r._directoriesMenuButtonID=Object(v.a)(),r._filtersMenuButtonID=Object(v.a)(),r._sortsMenuButtonID=Object(v.a)(),r._typesMenuButtonID=Object(v.a)(),r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,a=e.listType,o=e.listSubtype,s=e.listContext,l=e.listStyle,c=e.server,u=e.provider,d=e.directories,p=e.selectedDirectory,f=e.typeKey,v=e.activeFilters,w=e.activeFilterLabel,T=e.activeSort,E=e.activeLimit,x=e.metadataTypes,N=e.metadataPseudoTypes,A=e.selectedType,L=e.selectedFilterTitle,k=e.selectedSort,_=e.customFilter,R=e.totalSize,z=e.showSortsMenu,U=e.allListStyles,B=this.state,V=B.isDirectoriesMenuOpen,F=B.isFiltersMenuOpen,Q=B.isTypesMenuOpen,H=B.isSortsMenuOpen,Y=!c.isCloud&&!u.isLibraryProvider&&d.length>1,W=!!A&&A.filters.length>0,G=!!A&&x.length+N.length>0,K=!!(z&&k&&A.sorts.length>1)
;return r()(b.a,{},void 0,r()(I.a,{},void 0,Y&&r()(M.a,{id:this._directoriesMenuButtonID,title:p.title,hasMenu:!0,isMenuOpen:V,isSelected:!0,onPress:this.onDirectoriesMenuButtonPress}),Y&&r()(C.a,{target:this._directoriesMenuButtonID,isOpen:V,server:c,provider:u,directories:d,selectedDirectory:p,onMenuClose:this.onDirectoriesMenuClose}),W&&r()(M.a,{id:this._filtersMenuButtonID,title:L,hasMenu:!0,isMenuOpen:F,onPress:this.onFiltersMenuButtonPress}),W&&r()(O.a,{serverEntityID:t,providerEntityID:n,
target:this._filtersMenuButtonID,isOpen:F,typeKey:f,activeFilters:v,activeFilterLabel:w,activeSort:T,selectedType:A,showCustomFilter:!!u.features.queryParser,onMenuClose:this.onFiltersMenuClose}),G&&r()(M.a,{id:this._typesMenuButtonID,title:A.title,hasMenu:x.length+N.length>1,isMenuOpen:Q,onPress:this.onTypesMenuButtonPress}),G&&r()(j.a,{target:this._typesMenuButtonID,isOpen:Q,types:x,pseudoTypes:N,activeFilters:v,activeSort:T,activeLimit:E,customFilter:_,selectedType:A,
onMenuClose:this.onTypesMenuClose}),K&&r()(M.a,{id:this._sortsMenuButtonID,title:Object(h.default)("By {sortTitle}",{sortTitle:k.title}),hasMenu:!0,isMenuOpen:H,onPress:this.onSortsMenuButtonPress}),K&&r()(P.a,{target:this._sortsMenuButtonID,isOpen:H,typeKey:f,activeFilters:v,activeFilterLabel:w,activeSort:T,activeLimit:E,customFilter:_,sorts:A.sorts,selectedSort:k,onMenuClose:this.onSortsMenuClose}),r()(D.a,{},void 0,R)),r()(S.a,{},void 0,r()(g.a,{serverEntityID:t,providerEntityID:n,
metadataListEntityID:i,listType:a,selectedType:A,isLibraryList:!0}),r()(m.a,{selectedListStyle:l,allListStyles:U}),r()(y.a,{listType:a,listSubtype:o,listContext:s,selectedListStyle:l,allListStyles:U})))},t}(p.Component);w.defaultProps={showSortsMenu:!0},t.a=w},function(e,t,n){"use strict";function i(e,t,n,i){return Object(v.a)(e,t,n,i)}function r(e,t,n,r){return i(e,t,n,r)&&!!t.features.playqueue}function a(e,t,n,r){return i(e,t,n,r)}function o(e,t,n,i){return s(e,t,n,i)}function s(e,t,n,i){
return!(!e.isFullServer||!i.isFirstItemLibraryItem)}function l(e,t,n,i){return!!t.features.actions.addToCatalog}function c(e,t,n,i){return!!(e.isFullServer&&e.allowSync&&i.isFirstItemLibraryItem&&i.allowSync)}function u(e,t,n,i){return!(!e.isFullOwnedServer||!e.transcoderVideo||!i.isFirstItemLibraryItem)}function d(e,t,n,i,r){var a=r||i.firstItemType||"mixed",o=m[a];return o?o.reduce(function(r,o){var s=g[o]
;return Object(f.a)(h.a.isFunction(s),"getMetadataListActionProps: Invalid action, "+o+", for "+a),r[o]=s(e,t,n,i),r},{}):{}}t.a=d;var p=n(5),h=n.n(p),f=n(33),v=n(972),g={showPlayAll:i,showShuffle:r,showQueue:a,showAddToAlbum:o,showAddToPlaylist:s,showAddToCatalog:l,showSync:c,showOptimize:u},m={mixed:[],movie:["showPlayAll","showShuffle","showQueue","showAddToPlaylist","showSync","showOptimize"],
show:["showPlayAll","showShuffle","showQueue","showAddToPlaylist","showAddToCatalog","showSync","showOptimize"],season:["showPlayAll","showShuffle","showQueue","showAddToPlaylist","showSync","showOptimize"],episode:["showPlayAll","showShuffle","showQueue","showAddToPlaylist","showSync","showOptimize"],artist:["showPlayAll","showShuffle","showQueue","showAddToPlaylist","showSync"],album:["showPlayAll","showShuffle","showQueue","showAddToPlaylist","showSync"],
track:["showPlayAll","showShuffle","showAddToCatalog","showQueue","showAddToPlaylist","showSync"],photoalbum:["showPlayAll","showShuffle","showAddToAlbum","showSync"],photo:["showPlayAll","showShuffle","showAddToAlbum","showSync"],clip:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],genre:["showAddToCatalog"]}},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),
n(0)),v=n.n(f),g=n(4),m=n(17),y=n(54),b=n(758),I=n(2811),S=n(759),M=n(760),D=n(761),C=n(762),O=n(1134),j=n(764),P=n(551),w=["showPlayAll","showShuffle","showAddToAlbum","showAddToPlaylist","showAddToCatalog","showSync"],T=["showOptimize","showQueue"],E=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onPlayShortcut=function(){r.props.showPlayAll&&r.props.onPlayAllPress()},r.onActionsPress=function(e){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen})},
r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.state={isActionsMenuOpen:!1},r._moreButtonID=Object(y.a)(),r}return p()(t,e),t.prototype.componentDidMount=function(){m.a.on("shortcut:playSelected",this.onPlayShortcut)},t.prototype.componentWillUnmount=function(){m.a.off("shortcut:playSelected",this.onPlayShortcut)},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.providerEntityID,i=e.showPlayAll,a=e.showPlayAllOverflow,s=e.showShuffle,l=e.showShuffleOverflow,c=e.showAddToAlbum,u=e.showAddToAlbumOverflow,d=e.showAddToPlaylist,p=e.showAddToPlaylistOverflow,h=e.showAddToCatalog,f=e.showAddToCatalogOverflow,m=e.showSync,y=e.showSyncOverflow,b=e.showOverflow,w=e.onPlayAllPress,T=e.onShufflePress,E=e.onAddToPlaylistPress,x=e.onSyncPress,N=this.state.isActionsMenuOpen;return o()("div",{className:t},void 0,i&&o()(S.a,{
playLabel:Object(g.default)("Play All"),onPress:w}),s&&o()(M.a,{onPress:T}),c&&o()(D.a,{onPress:E}),d&&o()(C.a,{onPress:E}),h&&o()(O.a,{providerEntityID:n}),m&&o()(j.a,{onPress:x}),b&&o()(P.a,{id:this._moreButtonID,icon:"plex-icon-toolbar-more-560",label:Object(g.default)("More..."),isMenuOpen:N,onPress:this.onActionsPress}),v.a.createElement(I.a,r()({},this.props,{target:this._moreButtonID,isOpen:N,showPlayAll:a,showShuffle:l,showAddToAlbum:u,showAddToPlaylist:p,showAddToCatalog:f,showSync:y,
onMenuClose:this.onActionsMenuClose})))},t}(f.Component);t.a=Object(b.a)(E,w,T)},function(e,t,n){"use strict";function i(e){var t=(e.target,e.isOpen,e.onMenuClose,s()(e,["target","isOpen","onMenuClose"]));return a()(d.a,{target:e.target,isOpen:e.isOpen,onMenuClose:e.onMenuClose},void 0,u.a.createElement(p.a,t))}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(763),p=n(2812);t.a=i},function(e,t,n){"use strict";function i(e,t){
return t===v.b?Object(f.default)("Add Podcast by URL"):Object(f.default)("Add to Catalog by URL")}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),n(4)),v=n(143),g=n(156),m=n(1135),y=function(e){function t(n,i){s()(this,t);var r=c()(this,e.call(this,n,i));return r.onAddToCatalogPress=function(){r.setState({isAddToCatalogModalOpen:!0}),r.props.onMenuDisable()},r.onAddToCatalogClose=function(){r.setState({isAddToCatalogModalOpen:!1}),
r.props.onMenuEnable()},r.state={isAddToCatalogModalOpen:!1},r}return d()(t,e),t.prototype.createOnPress=function(e){var t=this;return function(){e(),t.props.onPress()}},t.prototype.render=function(){var e=this.props,t=this.state.isAddToCatalogModalOpen;return a()("div",{},void 0,e.showPlayAll&&a()(g.a,{onPress:this.createOnPress(e.onPlayAllPress)},void 0,Object(f.default)("Play All")),e.showShuffle&&a()(g.a,{onPress:this.createOnPress(e.onShufflePress)
},void 0,Object(f.default)("Shuffle")),e.showQueue&&a()(g.a,{onPress:this.createOnPress(e.onPlayNextPress)},void 0,Object(f.default)("Play Next")),e.showQueue&&a()(g.a,{onPress:this.createOnPress(e.onAddToQueuePress)},void 0,Object(f.default)("Add to Queue")),e.showAddToPlaylist&&a()(g.a,{onPress:this.createOnPress(e.onAddToPlaylistPress)},void 0,Object(f.default)("Add to Playlist...")),e.showAddToCatalog&&a()(g.a,{onPress:this.onAddToCatalogPress
},void 0,i(e.listType,e.listSubtype)),e.showSync&&a()(g.a,{onPress:this.createOnPress(e.onSyncPress)},void 0,Object(f.default)("Sync...")),e.showOptimize&&a()(g.a,{onPress:this.createOnPress(e.onOptimizePress)},void 0,Object(f.default)("Optimize...")),a()(m.a,{providerEntityID:e.providerEntityID,isOpen:t,onModalClose:this.onAddToCatalogClose}))},t}(h.Component);t.a=y},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(function(e,t){return t.activeFilters},function(e,t){
return t.selectedType},function(e){return e.ui.libraryPage},Object(b.a)(),function(e,t,n,i){var r=n.selectedFilterKey,a=n.filterOptionQuery,o=n.selectedFilterOptions,s=void 0===o?[]:o,l=n.isSelectedFilterOptionsPopulated,c=n.selectedFilterOptionsError,u=t&&t.filters;return{filters:u,selectedFilter:r&&h.a.findWhere(u,{key:r}),filterOptions:i,filterOptionQuery:a,showSpinner:!l&&!c,showError:!!c,showSearchInput:s.length>12}})}
var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(5),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(2814)),I=n(307),S=n(2815),M=function(e){function t(){var n,i,r;s()(this,t);for(var a=arguments.length,o=Array(a),l=0;l<a;l++)o[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(o))),i.onFilterSelect=function(e){i.props.selectLibraryFilter({serverEntityID:i.props.serverEntityID,providerEntityID:i.props.providerEntityID,key:e}),
i.props.fetchLibraryFilterOptions()},i.onFilterDeselect=function(){i.props.deselectLibraryFilter()},i.onSearch=function(e){i.props.searchLibraryFilterOptions(e)},r=n,c()(i,r)}return d()(t,e),t.prototype.render=function(){return g.a.createElement(S.a,a()({onFilterSelect:this.onFilterSelect,onFilterDeselect:this.onFilterDeselect,onSearch:this.onSearch},this.props))},t}(v.Component);t.a=Object(m.b)(i,I)(M)},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(function(e,t){
return t.activeFilters},function(e,t){return t.selectedType},function(e){return e.ui.libraryPage.selectedFilterKey},function(e){return e.ui.libraryPage.filterOptionQuery},function(e){return e.ui.libraryPage.selectedFilterOptions},function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=t&&t.filters,l=s.a.findWhere(o,{key:n}),u=r;if(i){var d=i.trim().toLowerCase();u=u.filter(function(e){return e.title.toLowerCase().indexOf(d)>-1})}if(l){var p=e.filter(function(e){
return e.key===l.filter}),h=u.reduce(function(e,t){var n=Object(c.a)(p,t.value);return(n?e.selected:e.unselected).push(a()({},t,{isSelected:n})),e},{selected:[],unselected:[]});u=h.selected.concat(h.unselected)}return u})}t.a=i;var r=n(7),a=n.n(r),o=n(5),s=n.n(o),l=n(6),c=(n.n(l),n(1164))},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(420)),f=n(24),v=(n(115),
n(72)),g=n(75),m=n(1165),y=n(2820),b=n(2822),I=n.n(b),S={scrollDirection:f.d.NONE},M=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onFiltersListMeasure=function(e){var t=e.height;r.setState({isMeasured:!0,filterOptionsHeight:Math.max(t,r.props.minHeight)})},r.state={isMeasured:!1,filterOptionsHeight:"auto"},r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.target,n=e.isOpen,i=e.typeKey,a=e.activeFilters,o=e.activeFilterLabel,s=e.activeSort,l=e.filters,c=e.selectedFilter,u=e.filterOptions,d=e.filterOptionQuery,p=e.showSpinner,b=e.showError,M=e.showSearchInput,D=e.showCustomFilter,C=e.onFilterSelect,O=e.onFilterDeselect,j=e.onSearch,P=e.onMenuClose,w=this.state,T=w.isMeasured,E=w.filterOptionsHeight,x=!!c&&!p&&T;return r()(g.a,{target:t,isOpen:n,size:f.e.LARGE,scrollerProps:S,onMenuClose:Object(h.a)(O,P)},void 0,r()(v.a,{
className:(I.a.panesContainer||"")+" "+(x&&I.a.showFilterOptions||""||""),ignoreWidth:!0,ignorePosition:!0,ignoreTransforms:!0,onMeasure:this.onFiltersListMeasure},void 0,r()(m.a,{className:I.a.filtersPane,typeKey:i,activeFilters:a,activeFilterLabel:o,activeSort:s,filters:l,selectedFilter:c,showSpinner:p,showCustomFilter:D,onFilterSelect:C}),x&&r()(y.a,{className:I.a.filterOptionsPane,style:{height:E},typeKey:i,activeFilters:a,activeSort:s,selectedFilter:c,filterOptions:u,filterOptionQuery:d,
showError:b,showSearchInput:M,onFilterDeselect:O,onSearch:j})))},t}(p.Component);M.defaultProps={minHeight:385},t.a=M},function(e,t,n){"use strict";function i(e){var t=e.typeKey,n=e.activeFilters,i=e.activeFilterLabel,r=e.activeSort,o=e.filter,s=e.title,f=n.filter(function(e){return e.key===o}),v=Object(c.a)(f,"1");return a()(h.a,{to:Object(p.a)({typeKey:t,filters:v?Object(d.a)(n,o):Object(u.a)(n,o,{value:"1",type:l.a}),filterLabel:i,sort:r}),isSelected:v},void 0,s)}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(265)),c=(n(115),n(1164)),u=n(1166),d=n(1167),p=n(264),h=n(108);t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(5),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(4)),g=n(24),m=(n(115),n(29)),y=n(26),b=n(39),I=n(156),S=n(2818),M=n.n(S),D=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c]
;return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onPress=function(e){i.props.onFilterSelect(i.props.filterKey)},r=n,l()(i,r)}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(m.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.activeFilters,n=e.filter,i=e.title,a=e.showSpinner,o=!a&&!!p.a.find(t,function(e){return e.key===n});return r()(I.a,{className:o?M.a.isSelected:void 0,onPress:this.onPress},void 0,r()("div",{className:M.a.menuItemContainer
},void 0,r()("div",{className:M.a.menuLabel},void 0,i),a&&r()(b.a,{className:M.a.spinner,size:g.e.SMALL}),!a&&o&&r()("div",{className:M.a.selectedIcon},void 0,r()(y.a,{name:"plex-icon-selected-560","aria-label":Object(v.default)("Selected")}))))},t}(f.Component);t.a=D},function(e,t){e.exports={menuItemContainer:"DisclosureFilterMenuItem-menuItemContainer-umTpy SelectedMenuItem-menuItemContainer-2hXIr",menuLabel:"DisclosureFilterMenuItem-menuLabel-3sWTg SelectedMenuItem-menuLabel-2fp2l",
spinner:"DisclosureFilterMenuItem-spinner-k12hY Spinner-spinner-Niere spin-spin-2kLwt",selectedIcon:"DisclosureFilterMenuItem-selectedIcon-1HwbQ SelectedMenuItem-selectedIcon-20Yx1",isSelected:"DisclosureFilterMenuItem-isSelected-3uWkO"}},function(e,t){e.exports={filtersScroller:"LibraryFiltersList-filtersScroller-2-lmL Scroller-vertical-VScFL"}},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.style,i=e.typeKey,r=e.activeFilters,o=e.activeSort,s=e.selectedFilter,g=e.filterOptions,b=e.filterOptionQuery,M=e.showError,D=e.showSearchInput,C=e.onFilterDeselect,O=e.onSearch,j=s.filter;return a()("div",{className:t,style:n,"data-qa-id":"secondFiltersList"},void 0,a()("div",{className:I.a.header,"data-qa-id":"filterHeader"},void 0,a()("div",{className:I.a.headerTitle},void 0,a()(v.a,{"data-qa-id":"previousFilters",onPress:C},void 0,a()(f.a,{className:I.a.backIcon,
name:"plex-icon-hub-prev-560","aria-label":Object(l.default)("Back")})),a()("span",{className:I.a.filterText},void 0,s.title)),D&&a()(y.a,{className:I.a.searchInput,name:"filterOptionQuery",placeholder:Object(l.default)("Filter {filterTitle}",{filterTitle:s.title}),value:b,onChange:O})),S,a()(h.a,{className:D?I.a.filterOptionsWithSearchScroller:I.a.filterOptionsScroller,autoScroll:!0},void 0,M&&a()("div",{className:I.a.emptyText
},void 0,Object(l.default)("Unable to load options")),!M&&!g.length&&a()("div",{className:I.a.emptyText},void 0,Object(l.default)("No options")),g.map(function(e){var t=e.value,n=e.title,s=e.isSelected,l=decodeURIComponent(t);return a()(m.a,{className:I.a.filterOptionMenuItem,to:Object(p.a)({typeKey:i,filters:s?Object(d.a)(r,j,l):Object(u.a)(r,j,{value:l,type:c.b}),filterLabel:s?void 0:n,sort:o}),isSelected:s},t,n)})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(4)),c=n(265),u=(n(115),n(1166)),d=n(1167),p=n(264),h=n(80),f=n(26),v=n(22),g=n(289),m=n(108),y=n(226),b=n(2821),I=n.n(b),S=a()(g.a,{});t.a=i},function(e,t){e.exports={header:"LibraryFilterOptionsList-header-JO56l",headerTitle:"LibraryFilterOptionsList-headerTitle-21Ewq",backIcon:"LibraryFilterOptionsList-backIcon-15GqT",filterText:"LibraryFilterOptionsList-filterText-ys_NH",searchInput:"LibraryFilterOptionsList-searchInput-3YaUS TextInput-input-1VMum input-input-1P2Vi",
filterOptionsScroller:"LibraryFilterOptionsList-filterOptionsScroller-1TXk8 Scroller-vertical-VScFL",filterOptionsWithSearchScroller:"LibraryFilterOptionsList-filterOptionsWithSearchScroller-3ARHU LibraryFilterOptionsList-filterOptionsScroller-1TXk8 Scroller-vertical-VScFL",filterOptionMenuItem:"LibraryFilterOptionsList-filterOptionMenuItem-3bhER MenuItem-menuItem-1s02m",emptyText:"LibraryFilterOptionsList-emptyText-1SzoY"}},function(e,t){e.exports={
panesContainer:"LibraryFiltersMenu-panesContainer-2wE6-",pane:"LibraryFiltersMenu-pane-13lnR",filtersPane:"LibraryFiltersMenu-filtersPane-367id LibraryFiltersMenu-pane-13lnR",filterOptionsPane:"LibraryFiltersMenu-filterOptionsPane-sYfFI LibraryFiltersMenu-pane-13lnR",showFilterOptions:"LibraryFiltersMenu-showFilterOptions-PvLk-"}},function(e,t,n){"use strict";function i(e){
var t=e.typeKey,n=e.activeFilters,i=e.activeFilterLabel,r=e.activeSort,o=e.activeLimit,l=e.sorts,c=e.selectedSort,p=e.customFilter,g=s()(e,["typeKey","activeFilters","activeFilterLabel","activeSort","activeLimit","sorts","selectedSort","customFilter"]);return u.a.createElement(f.a,g,l.map(function(e){var s=e.key,l=e.descKey,u=e.defaultDirection,f=e.title,g=c.key===s,b=u;g&&(b=r?r===l?m:y:u===m?y:m);var I=b===y;return a()(v.a,{to:Object(h.a)({typeKey:t,filters:n,filterLabel:i,sort:I?l:s,
limit:p?o:null,customFilter:p}),isSelected:g,selectedIconName:I?"plex-icon-sort-ascending-560":"plex-icon-sort-descending-560",selectedIconAriaLabel:I?Object(d.default)("Ascending"):Object(d.default)("Descending")},s,f)}))}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(4),p=(n(115),n(327)),h=n(264),f=n(75),v=n(108),g=p.a.directions,m=g.ASCENDING,y=g.DESCENDING;t.a=i},function(e,t,n){"use strict";function i(e,t){
var n=e.field,i=e.type,r=e.fieldTitle,a=e.valueTitle,o=null==i?n:i+"."+n,s=void 0,l=void 0;return e.operator!==M.c&&e.operator!==M.e||!E.test(e.value)||t[o].type!==D.b?t[o].type===D.b?(s=e.operator,l=S.a.unix(e.value).format("YYYY-MM-DD")):(s=e.operator,l=e.value):(s=e.operator+"-",l=e.value.substr(1)),{key:o,keyTitle:r,operator:s,value:[{value:decodeURIComponent(l),valueTitle:a?decodeURIComponent(a):void 0}]}}function r(e,t){var n=[];if("composite"===e.type&&"and"===e.operator){if(e.rules){
var a=e.rules.reduce(function(e,n){return e.push.apply(e,r(n,t)),e},[]);n.push.apply(n,a)}}else if("composite"===e.type&&"or"===e.operator){var o=e.rules.reduce(function(e,n){var r=i(n,t);return e.key=r.key,e.keyTitle=r.keyTitle,e.operator=r.operator,null==e.value&&(e.value=[]),e.value.push.apply(e.value,r.value),e},{});n.push(o)}else n.push(i(e,t));return n}var a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(5),f=n.n(h),v=n(1),g=(n.n(v),
n(0)),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),n(41)),S=n.n(I),M=n(378),D=n(563),C=n(377),O=n(37),j=n(1168),P=n(1169),w=n(307),T=n(2825),E=/^\-([0-9]+)([a-zA-Z]+)$/,x=Object(b.createSelector)(P.a,function(e){return e.reduce(function(e,t){return e[t.key]=t,e},{})}),N=Object(b.createSelector)(function(e){return e.ui.libraryPage.queryParse},x,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return e.rule?r(e.rule,t):[]
}),A=Object(b.createSelector)(O.a,C.a,j.a,x,N,function(e){return e.ui.libraryPage.queryParse.key},function(e){return e.ui.libraryPage.queryParseError},function(e){return e.ui.libraryPage.isQueryParsePopulated},function(e,t,n,i,r,a,o,s){var l=t[0],c=l.fields,u=c[0],d=f.a.find(n,function(e){return e.type===u.type});return{supportsQueryParser:!!e.features.queryParser,activeFilters:r,allTypeFieldsByKey:i,queryParseKey:a,queryParseError:o,isQueryParsePopulated:s,defaultField:u,defaultFieldType:d}
}),L={dispatchPopulateQueryParse:w.populateQueryParse},k=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.componentDidMount=function(){this.props.supportsQueryParser&&this.props.dispatchPopulateQueryParse()},t.prototype.componentWillReceiveProps=function(e){this.props.queryParseKey!==e.queryParseKey&&this.props.dispatchPopulateQueryParse()},t.prototype.render=function(){var e=this.props,t=(e.dispatchPopulateQueryParse,
e.supportsQueryParser),n=o()(e,["dispatchPopulateQueryParse","supportsQueryParser"]);return t?m.a.createElement(T.a,n):null},t}(g.Component);t.a=Object(y.b)(A,L)(k)},function(e,t,n){"use strict";function i(e){var t=e.defaultField,n=e.defaultFieldType,i=n.type,r=n.operators,a=[];return i===D.a&&a.push({value:1}),{key:t.key,value:a,operator:r[0].key,id:g.a.uniqueId()}}function r(e){return(e.activeFilters.length?e.activeFilters:[i(e)]).map(function(e){return f()({},e,{id:g.a.uniqueId(e.key)})})}
var a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(7),f=n.n(h),v=n(5),g=n.n(v),m=n(1),y=(n.n(m),n(0)),b=(n.n(y),n(41)),I=n.n(b),S=n(4),M=n(61),D=n(265),C=n(563),O=n(65),j=n(1170),P=(n(115),n(264)),w=n(47),T=n(39),E=n(145),x=n(2826),N=n(290),A=n(146),L=n(2832),k=n(2863),_=n.n(k),R=Object(A.a)(N.a),z=o()(T.a,{}),U=function(e){function t(n,a){l()(this,t);var o=u()(this,e.call(this,n,a));return o.onFormSubmit=function(e){
var t=o.state.activeFilters,n=o.props,i=n.allTypeFieldsByKey,r=n.typeKey,a=n.activeSort,s=t.map(function(t){var n=e[t.id],r=n.key,a=n.value,o=n.operator,s=a.map(function(e){return g.a.isString(e)?e:e.value}),l=void 0;return l=i[r].type!==C.b||Object(j.a)(o)?s:[I()(s[0],"YYYY-MM-DD").unix()],{key:r,operator:o,value:l}}).filter(function(e){return e.value.length}),l=void 0;e.enableLimit&&""!==e.limit&&(l=e.limit),window.location.hash=Object(P.a)({typeKey:r,filters:s,sort:a,limit:l,customFilter:!0})
},o.onCancelPress=function(){var e=o.props,t=e.typeKey,n=e.activeSort;window.location.hash=Object(P.a)({typeKey:t,filters:[],sort:n})},o.onAddPress=function(e){var t=[].concat(o.state.activeFilters);t.splice(e+1,0,i(o.props)),o.setState({activeFilters:t})},o.onRemovePress=function(e){var t=[].concat(o.state.activeFilters);t.splice(e,1),o.setState({activeFilters:t})},o.state={activeFilters:n.activeFilters?r(n):[]},o}return p()(t,e),t.prototype.componentWillReceiveProps=function(e){this.setState({
activeFilters:r(e)})},t.prototype.render=function(){var e=this,t=this.state.activeFilters,n=this.props,i=n.serverEntityID,r=n.activeLimit,a=n.isQueryParsePopulated,s=n.queryParseError;if(!a)return o()("div",{className:_.a.loadingContainer},void 0,s?Object(S.default)("There was an error trying to load the filters. Reload the page and try again"):z);var l=!!r;return o()(E.b,{className:_.a.container,onSubmit:this.onFormSubmit},void 0,t.map(function(n,r){return o()(L.a,{serverEntityID:i,name:n.id,
index:r,initialValue:n,isRemoveDisabled:t.length<2,onRemovePress:e.onRemovePress,onAddPress:e.onAddPress},n.id)}),o()("div",{className:_.a.footer},void 0,o()("div",{className:_.a.settings},void 0,o()(R,{className:_.a.checkInput,size:M.SMALL,name:"enableLimit",checkboxText:Object(S.default)("Limit to"),initialValue:l}),o()(x.a,{inputClassName:_.a.numberInput,size:M.SMALL,name:"limit",initialValue:l?r:"",leftLabel:!1,labelText:Object(S.default)("items")})),o()("div",{className:_.a.buttons
},void 0,o()(w.a,{className:_.a.button,onPress:this.onCancelPress},void 0,Object(S.default)("Cancel")),o()(w.a,{kind:O.PRIMARY,type:"submit"},void 0,Object(S.default)("Apply")))))},t}(y.Component);t.a=U},function(e,t,n){"use strict";function i(e){var t=e.inputClassName,n=e.name,i=e.labelText,r=e.showErrors,o=e.errors,l=e.leftLabel,u=c()(e,["inputClassName","name","labelText","showErrors","errors","leftLabel"]);return s()(f.a,{},void 0,l&&s()(v.a,{hasError:r,errors:o,name:n,labelText:i
}),p.a.createElement(g.a,a()({className:t,name:n,hasError:r},u)),!l&&s()(v.a,{hasError:r,errors:o,name:n,labelText:i}))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(146),f=n(2827),v=n(2829),g=n(996),m=n(2831),y=n.n(m);i.defaultProps={inputClassName:y.a.input,leftLabel:!0},t.a=Object(h.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.children,n=a()(e,["children"]);return l.a.createElement("div",n,t)}var r=n(13),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=n.n(s),c=n(2828),u=n.n(c);i.defaultProps={className:u.a.group},t.a=i},function(e,t){e.exports={group:"InlineFormGroup-group-2Wa86"}},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.name,i=e.labelText,r=e.showErrors,o=e.errors;return a()(l.a,{className:t,showErrors:r,errors:o,name:n,labelText:i})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(429)),c=n(2830),u=n.n(c);i.defaultProps={className:u.a.label},t.a=i},function(e,t){e.exports={
label:"InlineInputGroupFormLabel-label-3jkhB FormLabel-label-2aLJ9"}},function(e,t){e.exports={input:"InlineNumberInputGroup-input-uLbRb TextInput-input-1VMum input-input-1P2Vi"}},function(e,t,n){"use strict";function i(){return Object(I.createSelector)(function(e,t){return t.value.key},D.a,O.a,C.a,function(e){return e.ui.libraryPage.selectedFilterOptions},function(e,t,n,i,r){for(var a=void 0,o=void 0,s=[],l={},c=0;c<n.length;c++){var u=n[c],d=u.key,p=u.title,h=u.type,f=u.subType
;if(u.key===e&&(a=u),l[d]={type:h,subType:f,defaultOperator:i[h][0].key},!E.test(d)){var g;s.push((g={},g[d]=p,g))}}if(a){var m=a.key.split("."),h=m[0],y=m[1];y||(y=h,h=null);var b=void 0;if(h){var I=Object(M.r)(h),S=I.id;b=v.a.find(t,function(e){var t=Object(M.r)(e.type);return!!t&&t.id===S})}else b=t[0];b&&(o=v.a.find(b.filters,function(e){return e.filter===y}))}return{selectedField:a,fieldValues:s,selectedFilter:o,selectedFilterOptions:r,operatorValues:i[a.type].map(function(e){var t
;return t={},t[e.key]=e.title,t}),fieldKeyTypes:l}})}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(5),v=n.n(f),g=n(1),m=(n.n(g),n(0)),y=n.n(m),b=n(11),I=n(6),S=(n.n(I),n(34)),M=n(28),D=n(377),C=n(2833),O=n(1169),j=n(307),P=n(146),w=n(2834),T=["duration","mediaSize","mediaBitrate","mood","show.writer","show.producer","show.director"],E=new RegExp("("+T.join("|")+")$"),x={dispatchSelectLibraryFilter:j.selectLibraryFilter,
dispatchPopulateLibraryFilterOptions:j.populateLibraryFilterOptions,dispatchDeselectLibraryFilter:j.deselectLibraryFilter,dispatchSearchLibraryFilterOptions:j.searchLibraryFilterOptions},N=function(e){function t(){var n,i,r;c()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=d()(this,e.call.apply(e,[this].concat(o))),i.onSuggestionsFetchRequested=function(){i.props.selectedFilter&&(i.props.dispatchSelectLibraryFilter({serverEntityID:i.props.serverEntityID,
key:i.props.selectedFilter.key}),i.props.dispatchPopulateLibraryFilterOptions())},i.onSuggestionsClearRequested=function(){i.props.selectedFilterOptions&&Object(S.a)(function(){i.props.dispatchDeselectLibraryFilter()})},r=n,d()(i,r)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=(e.dispatchSelectLibraryFilter,e.dispatchPopulateLibraryFilterOptions,e.dispatchDeselectLibraryFilter,e.dispatchSearchLibraryFilterOptions,
s()(e,["dispatchSelectLibraryFilter","dispatchPopulateLibraryFilterOptions","dispatchDeselectLibraryFilter","dispatchSearchLibraryFilterOptions"]));return y.a.createElement(w.a,a()({},t,{onSuggestionsFetchRequested:this.onSuggestionsFetchRequested,onSuggestionsClearRequested:this.onSuggestionsClearRequested}))},t}(m.Component);t.a=Object(P.a)(Object(b.b)(i,x)(N))},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(4)),a=n(563),o=n(378),s=n(1168),l=Object(i.createSelector)(s.a,function(e){
return e.reduce(function(e,t){if(t.type===a.b){var n=t.operators.filter(function(e){var t=e.key;return t!==o.b&&t!==o.h});n.push({key:o.d,title:Object(r.default)("in the last")},{key:o.f,title:Object(r.default)("in not the last")}),e[t.type]=n}else e[t.type]=t.operators;return e},{})});t.a=l},function(e,t,n){"use strict";function i(e){
var t=e.selectedField,n=e.filter,i=e.selectedFilterOptions,r=e.suggestionsFilter,a=e.renderSuggestion,o=e.shouldRenderSuggestions,s=e.getSuggestionValue,l=e.getTagValue,c=e.getTagDisplayValue,u=e.makeTag,d=e.makeTagFromSuggestion,p=e.onSuggestionSelected,f=e.onSuggestionsFetchRequested,v=e.onSuggestionsClearRequested,y=e.onValueChange,S=e.onTagValueChange;return t.type===b.a?null:t.subType===b.c?h()(D.a,{className:T.a.selectInput,name:"value",size:m.SMALL,values:[{"-1":Object(g.default)("Empty")
},{2:"\u2605"},{4:"\u2605\u2605"},{6:"\u2605\u2605\u2605"},{8:"\u2605\u2605\u2605\u2605"},{10:"\u2605\u2605\u2605\u2605\u2605"}],value:n.value[0]?n.value[0].value:"",onChange:y}):t.type===b.b&&Object(I.a)(n.operator)?h()(j.a,{textInputClassName:T.a.unitTextInput,selectInputClassName:T.a.selectInput,name:"value",size:m.SMALL,units:[{s:Object(g.default)("Seconds")},{m:Object(g.default)("Minutes")},{h:Object(g.default)("Hours")},{d:Object(g.default)("Days")},{w:Object(g.default)("Weeks")},{
mon:Object(g.default)("Months")},{y:Object(g.default)("Years")}],value:n.value[0]?n.value[0].value:"",onChange:y}):t.type===b.b?h()(O.a,{className:T.a.textInput,name:"value",size:m.SMALL,value:n.value[0]?n.value[0].value:"",onChange:y}):h()(C.a,{className:T.a.tagsInput,value:n.value,suggestions:i,suggestionsFilter:r,renderSuggestion:a,shouldRenderSuggestions:o,getSuggestionValue:s,getTagValue:l,getTagDisplayValue:c,makeTag:u,makeTagFromSuggestion:d,tagComponent:P.a,validationRegex:N[t.type],
onSuggestionSelected:p,onSuggestionsFetchRequested:f,onSuggestionsClearRequested:v,onChange:S})}var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(2),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=(n.n(v),n(4)),m=n(61),y=n(378),b=n(563),I=n(1170),S=n(22),M=n(26),D=n(225),C=n(2835),O=n(2854),j=n(2858),P=n(2860),w=n(2862),T=n.n(w),E=[y.b,y.h],x=[y.a,y.g],N={integer:/^\d+$/},A=h()(M.a,{name:"plex-icon-toolbar-filter-remove-560"}),L=h()(M.a,{name:"plex-icon-toolbar-filter-add-560"
}),k=function(e){function t(){var n,i,r;s()(this,t);for(var o=arguments.length,l=Array(o),u=0;u<o;u++)l[u]=arguments[u];return n=i=c()(this,e.call.apply(e,[this].concat(l))),i.shouldRenderSuggestions=function(e){var t=i.props,n=t.selectedFilter,r=t.selectedField.type,a=t.value.operator;return!!n&&(r===b.d&&x.indexOf(a)>-1||r!==b.d&&E.indexOf(a)>-1)},i.onFieldChange=function(e){var t=i.props.fieldKeyTypes,n=t[e],r=n.defaultOperator,a=n.type,o=n.subType,s=[];a===b.a&&s.push({value:1}),
o===b.c&&s.push({value:"-1"}),e!==i.props.value.key&&i.props.onChange({key:e,operator:r,value:s})},i.onOperatorChange=function(e){var t=i.props.selectedField,n=void 0;n=t.type===b.b&&Object(I.a)(e)&&Object(I.a)(i.props.value.operator)||!Object(I.a)(e)&&!Object(I.a)(i.props.value.operator)?i.props.value.value:[],i.props.onChange(a()({},i.props.value,{value:n,operator:e}))},i.onTagValueChange=function(e){i.props.onChange(a()({},i.props.value,{value:Array.isArray(e)?e:[e]}))},
i.onValueChange=function(e){i.props.onChange(a()({},i.props.value,{value:[{value:e}]}))},i.onRemovePress=function(){i.props.onRemovePress(i.props.index)},i.onAddPress=function(){i.props.onAddPress(i.props.index)},r=n,c()(i,r)}return d()(t,e),t.prototype.getSuggestionValue=function(e){return e},t.prototype.getTagValue=function(e){return e.value},t.prototype.getTagDisplayValue=function(e){return e.valueTitle||e.value},t.prototype.makeTag=function(e){return{value:e}},
t.prototype.makeTagFromSuggestion=function(e){return{value:e.value,valueTitle:e.title}},t.prototype.suggestionsFilter=function(e,t){return e.title.toLowerCase().indexOf(t.toLowerCase())>-1},t.prototype.renderSuggestion=function(e){return e.title},t.prototype.render=function(){var e=this.props,t=e.isRemoveDisabled,n=e.value,r=e.operatorValues,a=e.fieldValues,o=e.selectedField,s=e.selectedFilterOptions,l=e.onSuggestionsFetchRequested,c=e.onSuggestionsClearRequested;return h()("div",{
className:T.a.container},void 0,h()("div",{className:T.a.rules},void 0,h()("div",{className:T.a.rule},void 0,h()(D.a,{className:T.a.selectInput,name:"filter",size:m.SMALL,values:a,value:n.key,onChange:this.onFieldChange})),h()("div",{className:T.a.rule},void 0,h()(D.a,{className:T.a.selectInput,name:"operator",size:m.SMALL,values:r,value:n.operator,onChange:this.onOperatorChange})),h()("div",{className:T.a.value},void 0,h()(i,{selectedField:o,filter:n,selectedFilterOptions:s,
suggestionsFilter:this.suggestionsFilter,renderSuggestion:this.renderSuggestion,shouldRenderSuggestions:this.shouldRenderSuggestions,getSuggestionValue:this.getSuggestionValue,getTagValue:this.getTagValue,getTagDisplayValue:this.getTagDisplayValue,makeTag:this.makeTag,makeTagFromSuggestion:this.makeTagFromSuggestion,tagComponent:P.a,onSuggestionSelected:this.onSuggestionSelected,onSuggestionsFetchRequested:l,onSuggestionsClearRequested:c,onTagValueChange:this.onTagValueChange,
onValueChange:this.onValueChange})),h()("div",{className:T.a.buttons},void 0,h()(S.a,{className:t?T.a.iconButtonDisabled:T.a.iconButton,"aria-label":Object(g.default)("Remove Filter"),isDisabled:t,onPress:this.onRemovePress},void 0,A),h()(S.a,{className:T.a.iconButton,"aria-label":Object(g.default)("Add Filter"),onPress:this.onAddPress},void 0,L))))},t}(v.Component);k.defaultProps={isRemoveDisabled:!1,isAddEnabled:!0,onRemovePress:function(){},onAddPress:function(){}},t.a=k},function(e,t,n){
"use strict";var i=n(2),r=n.n(i),a=n(7),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(2836),b=n(2840),I=n(2853),S=n.n(I),M=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r.setTagsInputRef=function(e){r.tagsInputRef=e},r.onInputChange=function(e){r.setState({inputValue:e})},r.onSuggestionSelected=function(e,t){var n=t.suggestion;r.tagsInputRef.addTag(r.props.makeTagFromSuggestion(n))},
r.renderInputComponent=function(e){var t=e.ref,n=l()(e,["ref"]),i=r.props,a=i.className,s=i.shouldRenderSuggestions,c=i.tagComponent,u=i.validationRegex,d=i.value,p=i.makeTag,h=i.getTagDisplayValue,f=i.getTagValue,v=i.tagProps,g=i.onChange,b=r.state.inputValue;return m.a.createElement(y.a,{className:a,inputValue:b,inputProps:o()({},n,{inputRef:t}),tagProps:v,value:d,validationRegex:u,tagComponent:c,addOnBlur:!s(b),getTagValue:f,getTagDisplayValue:h,makeTag:p,ref:r.setTagsInputRef,
onInputChange:r.onInputChange,onChange:g})},r.state={inputValue:""},r}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.suggestions,n=e.getSuggestionValue,i=e.renderSuggestion,a=e.suggestionsFilter,s=e.shouldRenderSuggestions,l=e.theme,c=e.onSuggestionsClearRequested,u=e.onSuggestionsFetchRequested,d=this.state.inputValue;return r()(b.a,{suggestions:t.filter(function(e){return a(e,d)}),shouldRenderSuggestions:s,getSuggestionValue:n,renderSuggestion:i,
focusInputOnSuggestionClick:!1,focusFirstSuggestion:!0,inputProps:{value:d,onChange:function(e,t){t.newValue;"enter"===t.method&&e.preventDefault()}},theme:o()({input:S.a.input},l),inputComponent:this.renderInputComponent,onSuggestionSelected:this.onSuggestionSelected,onSuggestionsClearRequested:c,onSuggestionsFetchRequested:u})},t}(g.Component);M.defaultProps={className:S.a.tagsInput,suggestions:[],value:[],shouldRenderSuggestions:function(){return!1}},t.a=M},function(e,t,n){"use strict"
;function i(e){return window.clipboardData?window.clipboardData.getData("Text"):e.clipboardData?e.clipboardData.getData("text/plain"):""}function r(e){var t=e.inputRef,n=(e.addTag,v()(e,["inputRef","addTag"]));return I.a.createElement("input",h()({type:"text",ref:t},n))}function a(e){return e.split(" ").map(function(e){return e.trim()})}var o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(7),h=n.n(p),f=n(13),v=n.n(f),g=n(5),m=n.n(g),y=n(1),b=(n.n(y),
n(0)),I=n.n(b),S=n(349),M=n(2837),D=n(2839),C=n.n(D),O=function(e){function t(n,r){s()(this,t);var a=c()(this,e.call(this,n,r));return a.addTag=function(e){return a._addTags([e])},a.setInputRef=function(e){a.inputRef=e},a.setDivRef=function(e){a.divRef=e},a.onPaste=function(e){var t=a.props,n=t.addOnPaste,r=t.pasteSplit,o=t.makeTag;if(n){e.preventDefault();var s=i(e),l=r(s).map(function(e){return o(e)});a._addTags(l)}},a.onKeyDown=function(e){var t=a.props.inputProps.onKeyDown;if(t&&t(e),
!e.defaultPrevented){var n=a.props,i=n.value,r=n.removeKeys,o=n.addKeys,s=n.inputValue,l=s,c=""===l,u=e.keyCode,d=-1!==o.indexOf(u),p=-1!==r.indexOf(u);if(d){(a._accept()||u===S.d)&&e.preventDefault()}p&&i.length>0&&c&&(e.preventDefault(),a._removeTag(i.length-1))}},a.onClick=function(e){e.target===a.divRef&&(a.inputRef&&"function"==typeof a.inputRef.focus&&a.inputRef.focus(),a.onFocus())},a.onChange=function(e){var t=a.props.onInputChange,n=a.props.inputProps.onChange,i=e.target.value;n&&n(e),
t(i)},a.onFocus=function(e){var t=a.props.inputProps.onFocus;t&&t(e),a.setState({isFocused:!0})},a.onBlur=function(e){var t=a.props.inputProps.onBlur;if(a.setState({isFocused:!1}),null!=e&&(t&&t(e),a.props.addOnBlur)){var n=a.props.makeTag(e.target.value);a._addTags([n])}},a.onRemove=function(e){a._removeTag(e)},a.state={isFocused:!1},a}return d()(t,e),t.prototype._removeTag=function(e){var t=this.props.value.slice(0);if(e>-1&&e<t.length){var n=t.splice(e,1);this.props.onChange(t,n,[e])}},
t.prototype._clearInput=function(){this.props.onInputChange("")},t.prototype._addTags=function(e){var t=this.props,n=t.validationRegex,i=t.onlyUnique,r=t.maxTags,a=t.value,o=t.getTagValue,s=t.onChange,l=t.onValidationReject,c=void 0;if(i&&(e=m.a.uniq(e,function(e){return o(e)})),n&&(c=e.filter(function(e){return!n.test(o(e))}),e=e.filter(function(e){return n.test(o(e))})),e=e.filter(function(e){var t=o(e);return t?t.trim().length>0:t}),r>=0){var u=Math.max(r-a.length,0);e=e.slice(0,u)}
if(l&&c&&c.length>0&&l(c),e.length>0){for(var d=a.concat(e),p=[],h=0;h<e.length;h++)p.push(a.length+h);i&&(d=m.a.uniq(d,function(e){return o(e)}));var f=d.length!==a.length;return f&&s(d,e,p),this._clearInput(),f}return this._clearInput(),!1},t.prototype._accept=function(){var e=this.props.inputValue;return""!==e&&(e=this.props.makeTag(e),this._addTags([e]))},t.prototype.inputProps=function(){var e=this.props.inputProps,t=(e.onChange,e.onFocus,e.onBlur,
v()(e,["onChange","onFocus","onBlur"])),n=h()({className:C.a.input,placeholder:""},t);return this.props.isDisabled&&(n.isDisabled=!0),n},t.prototype.render=function(){var e=this,t=this.props,n=t.className,i=t.errorClassName,r=t.focusedClassName,a=t.hasError,o=t.value,s=t.inputValue,l=t.getTagValue,c=t.getTagDisplayValue,u=t.tagProps,d=t.tagComponent,p=t.inputComponent,f=t.isDisabled,v=this.state.isFocused;return I.a.createElement("div",{className:(n||"")+" "+(v&&r||"")+" "+(a&&i||""||""),
ref:this.setDivRef,onClick:this.onClick},o.map(function(t,n){return I.a.createElement(d,h()({key:l(t)+"-"+n,index:n,tagCount:o.length,tag:t,isDisabled:f,getTagDisplayValue:c,onRemove:e.onRemove},u))}),I.a.createElement(p,h()({key:"input",inputRef:this.setInputRef,value:s},this.inputProps(),{addTag:this.addTag,onPaste:this.onPaste,onKeyDown:this.onKeyDown,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur})))},t}(b.Component);O.defaultProps={className:C.a.tagsInput,
errorClassName:C.a.hasError,addKeys:[S.j,S.d],addOnBlur:!1,addOnPaste:!1,inputProps:{},removeKeys:[S.a],inputComponent:r,tagComponent:M.a,pasteSplit:a,tagProps:{},onlyUnique:!0,maxTags:-1,validationRegex:null,isDisabled:!1,getTagDisplayValue:function(e){return e},getTagValue:function(e){return e},makeTag:function(e){return e}},t.a=O},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(22)),f=n(2838),v=n.n(f),g=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onPress=function(){var e=i.props;(0,e.onRemove)(e.index)},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.removeClassName,i=e.tag,a=e.iconComponent,o=e.isDisabled,s=e.removeLabel,l=e.getTagDisplayValue;return r()("span",{className:t},void 0,!o&&r()(h.a,{
className:n,"aria-label":s,onPress:this.onPress},void 0,r()(a,{name:"plex-icon-remove-560"})),r()("span",{},void 0,l(i)))},t}(p.Component);g.defaultProps={className:v.a.tag,removeClassName:v.a.remove},t.a=g},function(e,t){e.exports={tag:"TagLabel-tag-2n9WO",remove:"TagLabel-remove-27nEk"}},function(e,t){e.exports={tagsInput:"TagsInput-tagsInput-2eRCn",input:"TagsInput-input-3KDPb",hasError:"TagsInput-hasError-22oXC input-hasError-1to6Q"}},function(e,t,n){"use strict";function i(e){
return d.a.createElement("input",l()({type:"text"},e))}function r(e){var t=e.inputComponent,n=e.suggestionsComponent,i=e.theme,r=o()(e,["inputComponent","suggestionsComponent","theme"]);return d.a.createElement(h.a,l()({},r,{renderInputComponent:t,renderSuggestionsContainer:n,theme:l()({},v.a,i)}))}var a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(2841),h=n.n(p),f=n(2852),v=n.n(f);r.defaultProps={inputComponent:i},t.a=r},function(e,t,n){"use strict"
;e.exports=n(2842).default},function(e,t,n){"use strict";function i(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")}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 o(e,t){
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=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}}(),c=n(0),u=i(c),d=n(2843),p=i(d),h=n(2844),f=i(h),v=function(){return!0},g=function(e){return e.trim().length>0},m={container:"react-autosuggest__container",
containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFocused:"react-autosuggest__suggestion--focused",sectionContainer:"react-autosuggest__section-container",sectionTitle:"react-autosuggest__section-title"},y=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":
t.itemsContainer=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFocused":t.itemFocused=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t},b=function(e){function t(e){var n=e.alwaysRenderSuggestions;r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return I.call(i),i.state={isFocused:!1,isCollapsed:!n,focusedSectionIndex:null,focusedSuggestionIndex:null,valueBeforeUpDown:null},i.justPressedUpDown=!1,i}return o(t,e),l(t,[{
key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown)}},{key:"componentWillReceiveProps",value:function(e){(0,p.default)(e.suggestions,this.props.suggestions)?e.focusFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&this.focusFirstSuggestion():this.willRenderSuggestions(e)?(e.focusFirstSuggestion&&this.focusFirstSuggestion(),
this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions()):this.resetFocusedSuggestion()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown)}},{key:"inputFocused",value:function(e){this.setState({isFocused:!0,isCollapsed:!e})}},{key:"inputBlurred",value:function(e){this.setState({isFocused:!1,focusedSectionIndex:null,focusedSuggestionIndex:null,valueBeforeUpDown:null,isCollapsed:!e})}},{key:"inputChanged",
value:function(e){this.setState({focusedSectionIndex:null,focusedSuggestionIndex:null,valueBeforeUpDown:null,isCollapsed:!e})}},{key:"updateFocusedSuggestion",value:function(e,t,n){var i=this.state.valueBeforeUpDown;null===t?i=null:null===i&&void 0!==n&&(i=n),this.setState({focusedSectionIndex:e,focusedSuggestionIndex:t,valueBeforeUpDown:i})}},{key:"resetFocusedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.state.valueBeforeUpDown
;this.setState({focusedSectionIndex:null,focusedSuggestionIndex:null,valueBeforeUpDown:e?null:t})}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({focusedSectionIndex:null,focusedSuggestionIndex:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,i=n.suggestions,r=n.multiSection,a=n.getSectionSuggestions;return r?a(i[e])[t]:i[t]}},{key:"getFocusedSuggestion",
value:function(){var e=this.state,t=e.focusedSectionIndex,n=e.focusedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{
key:"findSuggestionElement",value:function(e){var t=e;do{if(null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var i=this.props.inputProps,r=i.value,a=i.onChange;t!==r&&a(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e){var t=e.suggestions,n=e.inputProps,i=e.shouldRenderSuggestions,r=n.value
;return t.length>0&&i(r)}},{key:"render",value:function(){
var e=this,t=this.props,n=t.suggestions,i=t.renderInputComponent,r=t.renderSuggestionsContainer,a=t.onSuggestionsFetchRequested,o=t.renderSuggestion,l=t.inputProps,c=t.multiSection,d=t.renderSectionTitle,p=t.id,h=t.getSectionSuggestions,g=t.theme,m=t.getSuggestionValue,b=t.alwaysRenderSuggestions,I=this.state,S=I.isFocused,M=I.isCollapsed,D=I.focusedSectionIndex,C=I.focusedSuggestionIndex,O=I.valueBeforeUpDown,j=b?v:this.props.shouldRenderSuggestions,P=l.value,w=l.onFocus,T=l.onKeyDown,E=this.willRenderSuggestions(this.props),x=b||S&&!M&&E,N=x?n:[],A=s({},l,{
onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=j(P);e.inputFocused(n),w&&w(t),n&&a({value:P})}},onBlur:function(t){if(e.justClickedOnSuggestionsContainer)return void e.input.focus();e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested())},onChange:function(t){var n=t.target.value,i=j(n);e.maybeCallOnChange(t,n,"type"),e.inputChanged(i),i?a({value:n}):e.onSuggestionsClearRequested()},onKeyDown:function(t,i){switch(t.key){
case"ArrowDown":case"ArrowUp":if(M)j(P)&&(a({value:P}),e.revealSuggestions());else if(n.length>0){var r=i.newFocusedSectionIndex,o=i.newFocusedItemIndex,s=void 0;s=null===o?null===O?P:O:e.getSuggestionValueByIndex(r,o),e.updateFocusedSuggestion(r,o,P),e.maybeCallOnChange(t,s,"ArrowDown"===t.key?"down":"up")}t.preventDefault(),e.justPressedUpDown=!0,setTimeout(function(){e.justPressedUpDown=!1});break;case"Enter":var l=e.getFocusedSuggestion();if(x&&!b&&e.closeSuggestions(),null!==l){var c=m(l)
;e.maybeCallOnChange(t,c,"enter"),e.onSuggestionSelected(t,{suggestion:l,suggestionValue:c,suggestionIndex:C,sectionIndex:D,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout(function(){e.justSelectedSuggestion=!1})}break;case"Escape":x&&t.preventDefault();var u=x&&!b;if(null===O){if(!u){e.maybeCallOnChange(t,"","escape"),j("")?a({value:""}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,O,"escape");u?(e.onSuggestionsClearRequested(),
e.closeSuggestions()):e.resetFocusedSuggestion()}T&&T(t)}}),L={query:(O||P).trim()};return u.default.createElement(f.default,{multiSection:c,items:N,renderInputComponent:i,renderItemsContainer:r,renderItem:o,renderItemData:L,renderSectionTitle:d,getSectionItems:h,focusedSectionIndex:D,focusedItemIndex:C,inputProps:A,itemProps:this.itemProps,theme:y(g),id:p,ref:this.storeReferences})}}]),t}(c.Component);b.propTypes={suggestions:c.PropTypes.array.isRequired,
onSuggestionsFetchRequested:function(e,t){if("function"!=typeof e[t])throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},
onSuggestionSelected:c.PropTypes.func,renderInputComponent:c.PropTypes.func,renderSuggestionsContainer:c.PropTypes.func,getSuggestionValue:c.PropTypes.func.isRequired,renderSuggestion:c.PropTypes.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n.hasOwnProperty("value"))throw new Error("'inputProps' must have 'value'.");if(!n.hasOwnProperty("onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:c.PropTypes.func,alwaysRenderSuggestions:c.PropTypes.bool,
multiSection:c.PropTypes.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},
focusInputOnSuggestionClick:c.PropTypes.bool,focusFirstSuggestion:c.PropTypes.bool,theme:c.PropTypes.object,id:c.PropTypes.string},b.defaultProps={shouldRenderSuggestions:g,alwaysRenderSuggestions:!1,multiSection:!1,focusInputOnSuggestionClick:!0,focusFirstSuggestion:!1,theme:m,id:"1"};var I=function(){var e=this;this.onDocumentMouseDown=function(t){e.justClickedOnSuggestionsContainer=!1;for(var n=t.detail&&t.detail.target||t.target;null!==n&&n!==document;){
if(null!==n.getAttribute("data-suggestion-index"))return;if(n===e.suggestionsContainer)return void(e.justClickedOnSuggestionsContainer=!0);n=n.parentNode}},this.storeReferences=function(t){if(null!==t){var n=t.input,i=t.itemsContainer;e.input=n,e.suggestionsContainer=i}},this.onSuggestionMouseEnter=function(t,n){var i=n.sectionIndex,r=n.itemIndex;e.updateFocusedSuggestion(i,r)},this.focusFirstSuggestion=function(){e.updateFocusedSuggestion(e.props.multiSection?0:null,0)},
this.onSuggestionMouseDown=function(){e.justSelectedSuggestion=!0},this.onSuggestionsClearRequested=function(){var t=e.props.onSuggestionsClearRequested;t&&t()},this.onSuggestionSelected=function(t,n){var i=e.props,r=i.alwaysRenderSuggestions,a=i.onSuggestionSelected,o=i.onSuggestionsFetchRequested;a&&a(t,n),r?o({value:n.suggestionValue}):e.onSuggestionsClearRequested(),e.resetFocusedSuggestion()},this.onSuggestionClick=function(t){
var n=e.props,i=n.alwaysRenderSuggestions,r=n.focusInputOnSuggestionClick,a=e.getSuggestionIndices(e.findSuggestionElement(t.target)),o=a.sectionIndex,s=a.suggestionIndex,l=e.getSuggestion(o,s),c=e.props.getSuggestionValue(l);e.maybeCallOnChange(t,c,"click"),e.onSuggestionSelected(t,{suggestion:l,suggestionValue:c,suggestionIndex:s,sectionIndex:o,method:"click"}),i||e.closeSuggestions(),!0===r?e.input.focus():e.onBlur(),setTimeout(function(){e.justSelectedSuggestion=!1})},this.onBlur=function(){
var t=e.props,n=t.inputProps,i=t.shouldRenderSuggestions,r=n.value,a=n.onBlur,o=e.getFocusedSuggestion();e.inputBlurred(i(r)),a&&a(e.blurEvent,{focusedSuggestion:o})},this.resetFocusedSuggestionOnMouseLeave=function(){e.resetFocusedSuggestion(!1)},this.itemProps=function(t){return{"data-section-index":t.sectionIndex,"data-suggestion-index":t.itemIndex,onMouseEnter:e.onSuggestionMouseEnter,onMouseLeave:e.resetFocusedSuggestionOnMouseLeave,onMouseDown:e.onSuggestionMouseDown,
onTouchStart:e.onSuggestionMouseDown,onClick:e.onSuggestionClick}}};t.default=b},function(e,t){e.exports=function(e,t){if(e===t)return!0;var n=e.length;if(t.length!==n)return!1;for(var i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}},function(e,t,n){"use strict";e.exports=n(2845).default},function(e,t,n){"use strict";function i(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")}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 o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0});var s=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){var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,a=e}finally{try{!i&&s.return&&s.return()}finally{if(r)throw a}}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")}}(),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}}(),u=n(0),d=i(u),p=n(2846),h=i(p),f=n(2847),v=i(f),g=n(2849),m=i(g),y=n(2850),b=i(y),I=function(){return!0},S={},M=function(e){
return d.default.createElement("input",e)},D=function(e){return d.default.createElement("div",e)},C={container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",itemsContainer:"react-autowhatever__items-container",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFocused:"react-autowhatever__item--focused",sectionContainer:"react-autowhatever__section-container",
sectionTitle:"react-autowhatever__section-title"},O=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.focusedItem=null,n.setSectionsItems(e),n.setSectionIterator(e),n.setTheme(e),n.onKeyDown=n.onKeyDown.bind(n),n.storeInputReference=n.storeInputReference.bind(n),n.storeItemsContainerReference=n.storeItemsContainerReference.bind(n),n.onFocusedItemChange=n.onFocusedItemChange.bind(n),n.getItemId=n.getItemId.bind(n),n}return o(t,e),
c(t,[{key:"componentDidMount",value:function(){this.ensureFocusedItemIsVisible()}},{key:"componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureFocusedItemIsVisible()}},{key:"setSectionsItems",value:function(e){
e.multiSection&&(this.sectionsItems=e.items.map(function(t){return e.getSectionItems(t)}),this.sectionsLengths=this.sectionsItems.map(function(e){return e.length}),this.allSectionsAreEmpty=this.sectionsLengths.every(function(e){return 0===e}))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,h.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,v.default)(e.theme)}},{
key:"storeInputReference",value:function(e){null!==e&&(this.input=e)}},{key:"storeItemsContainerReference",value:function(e){null!==e&&(this.itemsContainer=e)}},{key:"onFocusedItemChange",value:function(e){this.focusedItem=e}},{key:"getItemId",value:function(e,t){return null===t?null:"react-autowhatever-"+this.props.id+"-"+(null===e?"":"section-"+e)+"-item-"+t}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null
;var t=this.theme,n=this.props,i=n.id,r=n.items,a=n.renderItem,o=n.renderItemData,s=n.shouldRenderSection,l=n.renderSectionTitle,c=n.focusedSectionIndex,u=n.focusedItemIndex,p=n.itemProps;return r.map(function(n,r){if(!s(n))return null;var h="react-autowhatever-"+i+"-",f=h+"section-"+r+"-";return d.default.createElement("div",t(f+"container","sectionContainer"),d.default.createElement(m.default,{section:n,renderSectionTitle:l,theme:t,sectionKeyPrefix:f}),d.default.createElement(b.default,{
items:e.sectionsItems[r],itemProps:p,renderItem:a,renderItemData:o,sectionIndex:r,focusedItemIndex:c===r?u:null,onFocusedItemChange:e.onFocusedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:h,ref:e.storeItemsListReference}))})}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,i=n.id,r=n.renderItem,a=n.renderItemData,o=n.focusedSectionIndex,s=n.focusedItemIndex,l=n.itemProps;return d.default.createElement(b.default,{items:e,
itemProps:l,renderItem:r,renderItemData:a,focusedItemIndex:null===o?s:null,onFocusedItemChange:this.onFocusedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-"+i+"-"})}},{key:"onKeyDown",value:function(e){var t=this.props,n=t.inputProps,i=t.focusedSectionIndex,r=t.focusedItemIndex;switch(e.key){case"ArrowDown":case"ArrowUp":var a="ArrowDown"===e.key?"next":"prev",o=this.sectionIterator[a]([i,r]),s=l(o,2),c=s[0],u=s[1];n.onKeyDown(e,{newFocusedSectionIndex:c,
newFocusedItemIndex:u});break;default:n.onKeyDown(e,{focusedSectionIndex:i,focusedItemIndex:r})}}},{key:"ensureFocusedItemIsVisible",value:function(){var e=this.focusedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,i=t.scrollTop;n<i?i=n:n+e.offsetHeight>i+t.offsetHeight&&(i=n+e.offsetHeight-t.offsetHeight),i!==t.scrollTop&&(t.scrollTop=i)}}},{key:"render",value:function(){
var e=this.theme,t=this.props,n=t.id,i=t.multiSection,r=t.renderInputComponent,a=t.renderItemsContainer,o=t.focusedSectionIndex,l=t.focusedItemIndex,c=i?this.renderSections():this.renderItems(),u=null!==c,p=this.getItemId(o,l),h=e("react-autowhatever-"+n+"-container","container",u&&"containerOpen"),f="react-autowhatever-"+n,v=r(s({type:"text",value:"",autoComplete:"off",role:"combobox","aria-autocomplete":"list","aria-owns":f,"aria-expanded":u,"aria-haspopup":u,"aria-activedescendant":p
},e("react-autowhatever-"+n+"-input","input"),this.props.inputProps,{onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),g=a(s({id:f},e("react-autowhatever-"+n+"-items-container","itemsContainer"),{ref:this.storeItemsContainerReference,children:c}));return d.default.createElement("div",h,v,g)}}]),t}(u.Component);O.propTypes={id:u.PropTypes.string,multiSection:u.PropTypes.bool,renderInputComponent:u.PropTypes.func,items:u.PropTypes.array.isRequired,
renderItemsContainer:u.PropTypes.func,renderItem:u.PropTypes.func,renderItemData:u.PropTypes.object,shouldRenderSection:u.PropTypes.func,renderSectionTitle:u.PropTypes.func,getSectionItems:u.PropTypes.func,inputComponent:u.PropTypes.func,inputProps:u.PropTypes.object,itemProps:u.PropTypes.oneOfType([u.PropTypes.object,u.PropTypes.func]),focusedSectionIndex:u.PropTypes.number,focusedItemIndex:u.PropTypes.number,theme:u.PropTypes.oneOfType([u.PropTypes.object,u.PropTypes.array])},O.defaultProps={
id:"1",multiSection:!1,renderInputComponent:M,renderItemsContainer:D,shouldRenderSection:I,renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:S,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},inputProps:S,itemProps:S,focusedSectionIndex:null,focusedItemIndex:null,theme:C},t.default=O},function(e,t,n){"use strict";var i=function(){
function e(e,t){var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,a=e}finally{try{!i&&s.return&&s.return()}finally{if(r)throw a}}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")}}();e.exports=function(e){function t(e){for(null===e?e=0:e++;e<s.length&&0===s[e];)e++
;return e===s.length?null:e}function n(e){for(null===e?e=s.length-1:e--;e>=0&&0===s[e];)e--;return-1===e?null:e}function r(e){var n=i(e,2),r=n[0],a=n[1];return l?null===a||a===s[r]-1?(r=t(r),null===r?[null,null]:[r,0]):[r,a+1]:0===s||a===s-1?[null,null]:null===a?[null,0]:[null,a+1]}function a(e){var t=i(e,2),r=t[0],a=t[1];return l?null===a||0===a?(r=n(r),null===r?[null,null]:[r,s[r]-1]):[r,a-1]:0===s||0===a?[null,null]:null===a?[null,s-1]:[null,a-1]}function o(e){return null===r(e)[1]}
var s=e.data,l=e.multiSection;return{next:r,prev:a,isLast:o}}},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)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,a=e}finally{try{!i&&s.return&&s.return()}finally{if(r)throw a
}}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")}}(),a=n(2848),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=r(t,2),a=n[0],l=n[1];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var c=n.map(function(e){
return a[e]}).filter(s);return"string"==typeof c[0]||"function"==typeof l?{key:e,className:l?l.apply(void 0,i(c)):c.join(" ")}:{key:e,style:o.default.apply(void 0,[{}].concat(i(c)))}}},e.exports=t.default},function(e,t,n){"use strict";function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(e){var t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),
t.filter(function(t){return a.call(e,t)})}var a=Object.prototype.propertyIsEnumerable;e.exports=Object.assign||function(e,t){for(var n,a,o=i(e),s=1;s<arguments.length;s++){n=arguments[s],a=r(Object(n));for(var l=0;l<a.length;l++)o[a[l]]=n[a[l]]}return o}},function(e,t,n){"use strict";function i(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")}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 o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0});var 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}}(),l=n(0),c=i(l),u=n(779),d=i(u),p=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e){return(0,
d.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,i=e.theme,r=e.sectionKeyPrefix,a=n(t);return a?c.default.createElement("div",i(r+"title","sectionTitle"),a):null}}]),t}(l.Component);p.propTypes={section:l.PropTypes.any.isRequired,renderSectionTitle:l.PropTypes.func.isRequired,theme:l.PropTypes.func.isRequired,sectionKeyPrefix:l.PropTypes.string.isRequired},t.default=p},function(e,t,n){"use strict";function i(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")}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 o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,
enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=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}}(),c=n(0),u=i(c),d=n(2851),p=i(d),h=n(779),f=i(h),v=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.storeFocusedItemReference=e.storeFocusedItemReference.bind(e),e}return o(t,e),l(t,[{key:"shouldComponentUpdate",value:function(e){return(0,f.default)(e,this.props,["itemProps"])}},{key:"storeFocusedItemReference",value:function(e){
this.props.onFocusedItemChange(null===e?null:e.item)}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,i=t.itemProps,r=t.renderItem,a=t.renderItemData,o=t.sectionIndex,l=t.focusedItemIndex,c=t.getItemId,d=t.theme,h=t.keyPrefix,f=null===o?h:h+"section-"+o+"-",v="function"==typeof i;return u.default.createElement("ul",s({role:"listbox"},d(f+"items-list","itemsList")),n.map(function(t,n){var h=n===l,g=f+"item-"+n,m=v?i({sectionIndex:o,itemIndex:n}):i,y=s({id:c(o,n)
},d(g,"item",h&&"itemFocused"),m);return h&&(y.ref=e.storeFocusedItemReference),u.default.createElement(p.default,s({},y,{sectionIndex:o,itemIndex:n,item:t,renderItem:r,renderItemData:a}))}))}}]),t}(c.Component);v.propTypes={items:c.PropTypes.array.isRequired,itemProps:c.PropTypes.oneOfType([c.PropTypes.object,c.PropTypes.func]),renderItem:c.PropTypes.func.isRequired,renderItemData:c.PropTypes.object.isRequired,sectionIndex:c.PropTypes.number,focusedItemIndex:c.PropTypes.number,
onFocusedItemChange:c.PropTypes.func.isRequired,getItemId:c.PropTypes.func.isRequired,theme:c.PropTypes.func.isRequired,keyPrefix:c.PropTypes.string.isRequired},v.defaultProps={sectionIndex:null},t.default=v},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(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){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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(t,"__esModule",{value:!0});var l=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},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}}(),u=n(0),d=i(u),p=n(779),h=i(p),f=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.storeItemReference=e.storeItemReference.bind(e),e.onMouseEnter=e.onMouseEnter.bind(e),e.onMouseLeave=e.onMouseLeave.bind(e),e.onMouseDown=e.onMouseDown.bind(e),e.onClick=e.onClick.bind(e),e}return s(t,e),c(t,[{key:"shouldComponentUpdate",value:function(e){return(0,h.default)(e,this.props,["renderItemData"])}},{
key:"storeItemReference",value:function(e){null!==e&&(this.item=e)}},{key:"onMouseEnter",value:function(e){var t=this.props,n=t.sectionIndex,i=t.itemIndex;this.props.onMouseEnter(e,{sectionIndex:n,itemIndex:i})}},{key:"onMouseLeave",value:function(e){var t=this.props,n=t.sectionIndex,i=t.itemIndex;this.props.onMouseLeave(e,{sectionIndex:n,itemIndex:i})}},{key:"onMouseDown",value:function(e){var t=this.props,n=t.sectionIndex,i=t.itemIndex;this.props.onMouseDown(e,{sectionIndex:n,itemIndex:i})}},{
key:"onClick",value:function(e){var t=this.props,n=t.sectionIndex,i=t.itemIndex;this.props.onClick(e,{sectionIndex:n,itemIndex:i})}},{key:"render",value:function(){var e=this.props,t=e.item,n=e.renderItem,i=e.renderItemData,a=r(e,["item","renderItem","renderItemData"]);return delete a.sectionIndex,delete a.itemIndex,"function"==typeof a.onMouseEnter&&(a.onMouseEnter=this.onMouseEnter),"function"==typeof a.onMouseLeave&&(a.onMouseLeave=this.onMouseLeave),
"function"==typeof a.onMouseDown&&(a.onMouseDown=this.onMouseDown),"function"==typeof a.onClick&&(a.onClick=this.onClick),d.default.createElement("li",l({role:"option"},a,{ref:this.storeItemReference}),n(t,i))}}]),t}(u.Component);f.propTypes={sectionIndex:u.PropTypes.number,itemIndex:u.PropTypes.number.isRequired,item:u.PropTypes.any.isRequired,renderItem:u.PropTypes.func.isRequired,renderItemData:u.PropTypes.object.isRequired,onMouseEnter:u.PropTypes.func,onMouseLeave:u.PropTypes.func,
onMouseDown:u.PropTypes.func,onClick:u.PropTypes.func},t.default=f},function(e,t){e.exports={container:"AutosuggestInput-container-20ylX",input:"AutosuggestInput-input-1--lB",suggestionsContainer:"AutosuggestInput-suggestionsContainer-3jInG Scroller-scroller-3GqQc Scroller-vertical-VScFL MenuContainer-menu-2OAQT",containerOpen:"AutosuggestInput-containerOpen-13PxW",suggestionsList:"AutosuggestInput-suggestionsList-2NO4y",suggestion:"AutosuggestInput-suggestion-1Q-8m MenuItem-menuItem-1s02m",
suggestionFocused:"AutosuggestInput-suggestionFocused-8rPtp"}},function(e,t){e.exports={tagsInput:"AutosuggestTagsInput-tagsInput-6yLPX TagsInput-tagsInput-2eRCn",input:"AutosuggestTagsInput-input-ZG-hT TagsInput-input-3KDPb"}},function(e,t,n){"use strict";function i(e){return l.a.createElement(u.a,a()({mask:p,pipe:h,keepCharPositions:!0,placeholder:d},e))}var r=n(7),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(2855),u=(n.n(c),
n(1171)),d="yyyy-mm-dd",p=[/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,"-",/\d/,/\d/],h=Object(c.createAutoCorrectedDatePipe)("yyyy-mm-dd");i.defaultProps={placeholderChar:"\u2000",guide:!1},t.a=i},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function i(e){
return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);Object.defineProperty(t,"createAutoCorrectedDatePipe",{enumerable:!0,get:function(){return i(r).default}});var a=n(2);Object.defineProperty(t,"createNumberMask",{enumerable:!0,get:function(){return i(a).default}});var o=n(3);Object.defineProperty(t,"emailMask",{enumerable:!0,get:function(){return i(o).default}})},function(e,t){"use strict";function n(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mm dd yyyy";return function(t){var n=[],i=e.split(/[^dmy]+/),r={dd:31,mm:12,yyyy:9999},a={dd:1,mm:1,yyyy:1},o=t.split("");return i.forEach(function(t){var i=e.indexOf(t),a=parseInt(r[t].toString().substr(0,1),10);parseInt(o[i],10)>a&&(o[i+1]=o[i],o[i]=0,n.push(i))}),!i.some(function(n){var i=e.indexOf(n),o=n.length,s=t.substr(i,o).replace(/\D/g,""),l=parseInt(s,10);return l>r[n]||s.length===o&&l<a[n]})&&{value:o.join(""),
indexesOfPipedChars:n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t){"use strict";function n(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=e.length;if(e===s||e[0]===g[0]&&1===t)return g.split(s).concat([f]).concat(y.split(s));var n=e.lastIndexOf(j),o=-1!==n,l=e[0]===u&&N,c=void 0,m=void 0,b=void 0;if(e.slice(-1*z)===y&&(e=e.slice(0,-1*z)),o&&(C||E)?(c=e.slice(e.slice(0,R)===g?R:0,n),m=e.slice(n+1,t),
m=i(m.replace(p,s))):c=e.slice(0,R)===g?e.slice(R):e,_&&(void 0===_?"undefined":a(_))===h){var S="."===M?"[.]":""+M,D=(c.match(new RegExp(S,"g"))||[]).length;c=c.slice(0,_+D*U)}return c=c.replace(p,s),L||(c=String(Number(c))),c=I?r(c,M):c,b=i(c),(o&&C||!0===E)&&(e[n-1]!==j&&b.push(v),b.push(j,v),m&&((void 0===w?"undefined":a(w))===h&&(m=m.slice(0,w)),b=b.concat(m)),!0===E&&e[n-1]===j&&b.push(f)),R>0&&(b=g.split(s).concat(b)),l&&(b.length===R&&b.push(f),b=[d].concat(b)),
y.length>0&&(b=b.concat(y.split(s))),b}
var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.prefix,g=void 0===n?o:n,m=t.suffix,y=void 0===m?s:m,b=t.includeThousandsSeparator,I=void 0===b||b,S=t.thousandsSeparatorSymbol,M=void 0===S?l:S,D=t.allowDecimal,C=void 0!==D&&D,O=t.decimalSymbol,j=void 0===O?c:O,P=t.decimalLimit,w=void 0===P?2:P,T=t.requireDecimal,E=void 0!==T&&T,x=t.allowNegative,N=void 0!==x&&x,A=t.allowLeadingZeroes,L=void 0!==A&&A,k=t.integerLimit,_=void 0===k?null:k,R=g&&g.length||0,z=y&&y.length||0,U=M&&M.length||0
;return e.instanceOf="createNumberMask",e}function i(e){return e.split(s).map(function(e){return f.test(e)?f:e})}function r(e,t){return e.replace(/\B(?=(\d{3})+(?!\d))/g,t)}Object.defineProperty(t,"__esModule",{value:!0});var a="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};t.default=n
;var o="$",s="",l=",",c=".",u="-",d=/-/,p=/\D+/g,h="number",f=/\d/,v="[]"},function(e,t,n){"use strict";function i(e,t){e=e.replace(I,h);var n=t.placeholderChar,i=t.currentCaretPosition,c=e.indexOf(f),u=e.lastIndexOf(p),d=u<c?-1:u,v=r(e,c+1,f),g=r(e,d-1,p),m=a(e,c),y=o(e,c,d,n),b=s(e,d,n,i);return m=l(m),y=l(y),b=l(b,!0),m.concat(v).concat(y).concat(g).concat(b)}function r(e,t,n){var i=[];return e[t]===n?i.push(n):i.push(v,n),i.push(v),i}function a(e,t){return-1===t?e:e.slice(0,t)}
function o(e,t,n,i){var r=h;return-1!==t&&(r=-1===n?e.slice(t+1,e.length):e.slice(t+1,n)),r=r.replace(new RegExp("[\\s"+i+"]",m),h),r===f?d:r.length<1?g:r[r.length-1]===p?r.slice(0,r.length-1):r}function s(e,t,n,i){var r=h;return-1!==t&&(r=e.slice(t+1,e.length)),r=r.replace(new RegExp("[\\s"+n+".]",m),h),0===r.length?e[t-1]===p&&i!==e.length?d:h:r}function l(e,t){return e.split(h).map(function(e){return e===g?e:t?b:y})}Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),u=function(e){
return e&&e.__esModule?e:{default:e}}(c),d="*",p=".",h="",f="@",v="[]",g=" ",m="g",y=/[^\s]/,b=/[^.\s]/,I=/\s/g;t.default={mask:i,pipe:u.default}},function(e,t){"use strict";function n(e,t){var n=t.currentCaretPosition,a=t.rawValue,p=t.previousConformedValue,h=t.placeholderChar,f=e;f=i(f);var v=f.indexOf(s);if(null===a.match(new RegExp("[^@\\s."+h+"]")))return o;if(-1!==f.indexOf(c)||-1!==v&&n!==v+1||-1===a.indexOf(r)&&p!==o&&-1!==a.indexOf(l))return!1;var g=f.indexOf(r)
;return(f.slice(g+1,f.length).match(d)||u).length>1&&f.substr(-1)===l&&n!==a.length&&(f=f.slice(0,f.length-1)),f}function i(e){var t=0;return e.replace(a,function(){return t++,1===t?r:o})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r="@",a=/@/g,o="",s="@.",l=".",c="..",u=[],d=/\./g}])})},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1}
;return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);Object.defineProperty(t,"conformToMask",{enumerable:!0,get:function(){return i(r).default}});var a=n(2);Object.defineProperty(t,"adjustCaretPosition",{enumerable:!0,get:function(){return i(a).default}});var o=n(5)
;Object.defineProperty(t,"createTextMaskInputElement",{enumerable:!0,get:function(){return i(o).default}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placeholderChar="_"},function(e,t){"use strict";function n(e){var t=e.previousConformedValue,n=void 0===t?r:t,a=e.currentCaretPosition,o=void 0===a?0:a,s=e.conformedValue,l=e.rawValue,c=e.placeholderChar,u=e.placeholder,d=e.indexesOfPipedChars,p=void 0===d?i:d,h=e.caretTrapIndexes,f=void 0===h?i:h
;if(0===o)return 0;var v=l.length,g=n.length,m=u.length,y=s.length,b=v-g,I=b>0,S=0===g;if(b>1&&!I&&!S)return o;var M=I&&(n===s||s===u),D=0;if(M)D=o-b;else for(var C=s.toLowerCase(),O=l.toLowerCase(),j=O.substr(0,o).split(r),P=j.filter(function(e){return-1!==C.indexOf(e)}),w=P[P.length-1],T=p.map(function(e){return C[e]}),E=T.filter(function(e){return e===w}).length,x=P.filter(function(e){return e===w}).length,N=u.substr(0,u.indexOf(c)).split(r).filter(function(e,t){return e===w&&l[t]!==e
}).length,A=N+x+E,L=0,k=0;k<y;k++){var _=C[k];if(D=k+1,_===w&&L++,L>=A)break}if(I){for(var R=D,z=D;z<=m;z++)if(u[z]===c&&(R=z),u[z]===c||-1!==f.indexOf(z)||z===m)return R}else for(var U=D;U>=0;U--)if(u[U-1]===c||-1!==f.indexOf(U)||0===U)return U}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var i=[],r=""},function(e,t,n){"use strict";function i(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.guide,s=void 0===i||i,l=n.previousConformedValue,c=void 0===l?o:l,u=n.placeholderChar,d=void 0===u?a.placeholderChar:u,p=n.placeholder,h=void 0===p?(0,
r.convertMaskToPlaceholder)(t,d):p,f=n.currentCaretPosition,v=n.keepCharPositions,g=!1===s&&void 0!==c,m=e.length,y=c.length,b=h.length,I=t.length,S=m-y,M=S>0,D=f+(M?-S:0),C=D+Math.abs(S);if(!0===v&&!M){for(var O=o,j=D;j<C;j++)h[j]===d&&(O+=d);e=e.slice(0,D)+O+e.slice(D,m)}for(var P=e.split(o).map(function(e,t){return{char:e,isNew:t>=D&&t<C}}),w=m-1;w>=0;w--){var T=P[w].char;if(T!==d){T===h[w>=D&&y===I?w-S:w]&&P.splice(w,1)}}var E=o,x=!1;e:for(var N=0;N<b;N++){var A=h[N];if(A===d){
if(P.length>0)for(;P.length>0;){var L=P.shift(),k=L.char,_=L.isNew;if(k===d&&!0!==g){E+=d;continue e}if(t[N].test(k)){if(!0===v&&!1!==_&&c!==o&&!1!==s&&M){for(var R=P.length,z=null,U=0;U<R;U++){var B=P[U];if(B.char!==d&&!1===B.isNew)break;if(B.char===d){z=U;break}}null!==z?(E+=k,P.splice(z,1)):N--}else E+=k;continue e}x=!0}!1===g&&(E+=h.substr(N,b));break}E+=A}if(g&&!1===M){for(var V=null,F=0;F<E.length;F++)h[F]===d&&(V=F);E=null!==V?E.substr(0,V+1):o}return{conformedValue:E,meta:{
someCharsRejected:x}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(4),a=n(1),o=""},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.placeholderChar
;if(-1!==e.indexOf(t))throw new Error("Placeholder character must not be used as part of the mask. Please specify a character that is not present in your mask as your placeholder character.\n\nThe placeholder character that was received is: "+JSON.stringify(t)+"\n\nThe mask that was received is: "+JSON.stringify(e));return e.map(function(e){return e instanceof RegExp?t:e}).join("")}function r(e){return"string"==typeof e||e instanceof String}function a(e){
return"number"==typeof e&&void 0===e.length&&!isNaN(e)}function o(e){for(var t=[],n=void 0;-1!==(n=e.indexOf(c));)t.push(n),e.splice(n,1);return{maskWithoutCaretTraps:e,indexes:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.convertMaskToPlaceholder=i,t.isString=r,t.isNumber=a,t.processCaretTraps=o;var s=n(1),l=[],c="[]"},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e){var t={previousConformedValue:g};return{state:t,update:function(n){
var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=i.inputElement,c=i.mask,d=i.guide,m=i.pipe,b=i.placeholderChar,I=void 0===b?f.placeholderChar:b,S=i.keepCharPositions,M=void 0!==S&&S;if((n=n||r.value)!==t.previousConformedValue){(void 0===c?"undefined":l(c))===y&&void 0!==c.pipe&&void 0!==c.mask&&(m=c.pipe,c=c.mask);var D=void 0,C=void 0;if(c instanceof Array&&(D=(0,h.convertMaskToPlaceholder)(c,I)),!1!==c){var O=o(n),j=r.selectionStart,P=t.previousConformedValue,w=void 0
;if((void 0===c?"undefined":l(c))===v){if(!1===(C=c(O,{currentCaretPosition:j,previousConformedValue:P,placeholderChar:I})))return;var T=(0,h.processCaretTraps)(C),E=T.maskWithoutCaretTraps,x=T.indexes;C=E,w=x,D=(0,h.convertMaskToPlaceholder)(C,I)}else C=c;var N={previousConformedValue:P,guide:d,placeholderChar:I,pipe:m,placeholder:D,currentCaretPosition:j,keepCharPositions:M},A=(0,p.default)(O,C,N),L=A.conformedValue,k=(void 0===m?"undefined":l(m))===v,_={};k&&(_=m(L,s({rawValue:O},N)),
!1===_?_={value:P,rejected:!0}:(0,h.isString)(_)&&(_={value:_}));var R=k?_.value:L,z=(0,u.default)({previousConformedValue:P,conformedValue:R,placeholder:D,rawValue:O,currentCaretPosition:j,placeholderChar:I,indexesOfPipedChars:_.indexesOfPipedChars,caretTrapIndexes:w}),U=R===D&&0===z,B=U?g:R;t.previousConformedValue=B,r.value!==B&&(r.value=B,a(r,z))}}}}}function a(e,t){document.activeElement===e&&(b?setTimeout(function(){return e.setSelectionRange(t,t,m)},0):e.setSelectionRange(t,t,m))}
function o(e){if((0,h.isString)(e))return e;if((0,h.isNumber)(e))return String(e);if(void 0===e||null===e)return g;throw new Error("The 'value' provided to Text Mask needs to be a string or a number. The value received was:\n\n "+JSON.stringify(e))}Object.defineProperty(t,"__esModule",{value:!0});var s=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"==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};t.default=r;var c=n(2),u=i(c),d=n(3),p=i(d),h=n(4),f=n(1),v="function",g="",m="none",y="object",b="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent)}])})},function(e,t){e.exports={input:"MaskedInput-input-17hU3 TextInput-input-1VMum input-input-1P2Vi",
small:"MaskedInput-small-1owiY TextInput-small-2i2et input-small-3LyjJ",large:"MaskedInput-large-1UpZY TextInput-large-2sz70 input-large-3wNGT",isDisabled:"MaskedInput-isDisabled-3_twg TextInput-isDisabled-3hj7I input-isDisabled-2FiSY",hasError:"MaskedInput-hasError-1kFAT TextInput-hasError-3FVrz input-hasError-1to6Q"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(50),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(61),
n(226)),g=n(225),m=n(2859),y=n.n(m),b=/^([0-9]+)?([a-zA-Z]+)?$/,I=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onValueChange=function(e){r.setState({inputValue:e},function(){r.props.onChange(""+e+r.state.selectedUnit)})},r.onUnitChange=function(e){r.setState({selectedUnit:e},function(){r.props.onChange(""+r.state.inputValue+e)})},r.state=r.getStateFromProps(n),r}return p()(t,e),t.prototype.componentWillReceiveProps=function(e){
this.props.value!==e.value&&this.setState(this.getStateFromProps(e))},t.prototype.getStateFromProps=function(e){var t=e.units,n=t[0],i=e.value.match(b)||[],r=i[1],a=void 0===r?"":r,s=i[2];return{inputValue:a,selectedUnit:void 0===s?o()(n)[0]:s}},t.prototype.render=function(){var e=this.props,t=e.textInputClassName,n=e.selectInputClassName,i=e.units,a=e.size;return r()("span",{className:y.a.inputs},void 0,r()(v.a,{name:"unitValue",className:t,type:"number",value:this.state.inputValue,size:a,
onChange:this.onValueChange}),r()(g.a,{name:"unit",className:n,value:this.state.selectedUnit,values:i,size:a,onChange:this.onUnitChange}))},t}(f.Component);t.a=I},function(e,t){e.exports={inputs:"UnitInput-inputs-1Fc89",textInput:"UnitInput-textInput-QSuLW TextInput-input-1VMum input-input-1P2Vi"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(22),v=n(26),g=n(2861),m=n.n(g),y=r()(v.a,{
name:"plex-icon-remove-560"}),b=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onRemovePress=function(){i.props.onRemove(i.props.index)},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.tag,n=e.index,i=e.tagCount,a=e.isDisabled,o=e.getTagDisplayValue;return r()("span",{className:m.a.container},void 0,r()("span",{className:m.a.tag
},void 0,!a&&r()(f.a,{className:m.a.remove,"aria-label":Object(h.default)("Remove Tag"),onPress:this.onRemovePress},void 0,y),r()("span",{},void 0,o(t))),r()("span",{className:m.a.or},void 0,n!==i-1&&Object(h.default)("or")))},t}(p.Component);t.a=b},function(e,t){e.exports={container:"LibraryFilterBuilderRowTag-container-2eCig",tag:"LibraryFilterBuilderRowTag-tag-3tEm1",remove:"LibraryFilterBuilderRowTag-remove-3WifL TagLabel-remove-27nEk",or:"LibraryFilterBuilderRowTag-or-2CPm8"}
},function(e,t){e.exports={container:"LibraryFilterBuilderRow-container-2QVqa",rules:"LibraryFilterBuilderRow-rules-3enme",rule:"LibraryFilterBuilderRow-rule-2bAya",tagsInput:"LibraryFilterBuilderRow-tagsInput-1zILx AutosuggestTagsInput-tagsInput-6yLPX TagsInput-tagsInput-2eRCn",textInput:"LibraryFilterBuilderRow-textInput-3yZ-z TextInput-input-1VMum input-input-1P2Vi",unitTextInput:"LibraryFilterBuilderRow-unitTextInput-38LP9 UnitInput-textInput-QSuLW TextInput-input-1VMum input-input-1P2Vi",
selectInput:"LibraryFilterBuilderRow-selectInput-gFMEG SelectInput-input-x1tNm input-input-1P2Vi",value:"LibraryFilterBuilderRow-value-3DsOS",buttons:"LibraryFilterBuilderRow-buttons-3m5pt",iconButton:"LibraryFilterBuilderRow-iconButton-1L9m0",iconButtonDisabled:"LibraryFilterBuilderRow-iconButtonDisabled-1LPOD LibraryFilterBuilderRow-iconButton-1L9m0"}},function(e,t){e.exports={container:"LibraryFilterBuilder-container-1ep_x",
loadingContainer:"LibraryFilterBuilder-loadingContainer-c77Me LibraryFilterBuilder-container-1ep_x",footer:"LibraryFilterBuilder-footer-3W2q0",settings:"LibraryFilterBuilder-settings-okmbX",checkInput:"LibraryFilterBuilder-checkInput-B0ck9 InlineInputGroupFormLabel-label-3jkhB FormLabel-label-2aLJ9",numberInput:"LibraryFilterBuilder-numberInput-1vwc6 InlineNumberInputGroup-input-uLbRb TextInput-input-1VMum input-input-1P2Vi",buttons:"LibraryFilterBuilder-buttons-3PEDF",
button:"LibraryFilterBuilder-button-36Leq Button-button-2kT68 Link-link-2n0yJ"}},function(e,t,n){"use strict";function i(e){var t=0;return e.map(function(e,n){var i=o()({},e,{position:n,scrollIndex:t});return t+=e.size,i})}function r(){return Object(l.createSelector)(function(e,t){return t.activeSort},function(e){return e.ui.libraryPage.firstCharacters},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{
firstCharacters:i(/titleSort:desc/i.test(e)?t.slice().reverse():t)}})}var a=n(7),o=n.n(a),s=n(11),l=n(6),c=(n.n(l),n(2865));t.a=Object(s.b)(r)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.firstCharacters,n=e.viewportHeight,i=e.onJumpBarItemPress,r={height:n+"px"},o=Math.floor(n/m),l=Object(d.a)(t,o);return s()("div",{className:v.a.jumpBar,style:r},void 0,l.map(function(e,t){return u.a.createElement(g.a,a()({key:t},e,{onPress:i}))}))}
var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2866),p=n(45),h=n.n(p),f=n(2868),v=n.n(f),g=n(2869),m=parseInt(h.a.jumpBarCharacterHeight,10);t.a=i},function(e,t,n){"use strict";function i(e,t){return e&&e.length&&t>0?a.a.sortBy(Object(o.a)(e,t),"position"):[]}t.a=i;var r=n(5),a=n.n(r),o=n(2867)},function(e,t,n){"use strict";function i(e,t){var n=[a.a.first(e),a.a.last(e)],i=a.a.sortBy(e,"size").reverse();return a.a.union(n,i).slice(0,t)}t.a=i;var r=n(5),a=n.n(r)
},function(e,t){e.exports={jumpBar:"LibraryPageJumpBar-jumpBar-22VKU"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(29)),f=n(22),v=n(2870),g=n.n(v),m=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onPress=function(e){i.props.onPress(i.props.scrollIndex)},r=n,l()(i,r)}return u()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return Object(h.a)(this,e,t)},t.prototype.render=function(){return r()(f.a,{className:g.a.character,"data-qa-id":"jumpBarCharacter",onPress:this.onPress},void 0,this.props.title)},t}(p.Component);t.a=m},function(e,t){e.exports={character:"LibraryPageJumpBarCharacter-character-2Hr4E"}},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.providerIdentifier,r=e.metadataItemEntityIDs,o=e.totalSize,s=e.isPending,p=e.isPopulated,h=e.error,f=e.typeKey,v=e.activeFilters,g=e.activeSort,m=e.listType,y=e.isLibraryRefreshing,b=o||r.length;return s||p&&b?l.a.createElement(u.a,e):a()(c.a,{},void 0,a()(d.a,{serverEntityID:t,providerEntityID:n,providerIdentifier:i,error:h,typeKey:f,activeFilters:v,activeSort:g,listType:m,isLibraryRefreshing:y}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=n.n(s),c=(n(115),n(261)),u=n(1172),d=n(2893);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.containerKey,o=e.containerTitle,l=e.listType,c=e.listSubtype,v=e.listContext,g=e.typeKey,m=e.activeSort,y=e.selectedSort,b=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","containerTitle","listType","listSubtype","listContext","typeKey","activeSort","selectedSort"])
;return u.a.createElement(h.a,a()({layout:d.a,cellRenderer:Object(p.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,containerKey:r,containerTitle:o,listType:l,listSubtype:c,listContext:v,typeKey:g,activeSort:m,selectedSort:y},f.a)},b))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(781),p=(n(31),n(123)),h=n(259),f=n(564);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.cellIndex,n=e.cellX,i=e.cellY,r=e.cellWidth,o=e.cellHeight;return a()(u.a,{
className:t%2?p.a.alternateLoadingItem:p.a.loadingItem,cellX:n,cellY:i,cellWidth:r,cellHeight:o},void 0,Object(l.default)("Loading..."))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(124),u=n(93),d=n(2874),p=n.n(d);t.a=Object(c.a)(i)},function(e,t){e.exports={loadingItem:"MetadataTableRowLoading-loadingItem-2g4_Q",alternateLoadingItem:"MetadataTableRowLoading-alternateLoadingItem-3U7fu MetadataTableRowLoading-loadingItem-2g4_Q"}},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(4),m=n(565),y=n(124),b=n(31),I=n(93),S=n(2876),M=n(26),D=n(707),C=n(22),O=n(173),j=n(362),P=n(437),w=n(2877),T=n(1161),E=n(1037),x=n(2878),N=n(2880),A=n.n(N),L=o()(M.a,{name:"plex-icon-edit-560"}),k=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onActionsMenuOpenChange=function(e){r.setState({isActionsMenuOpen:e})},r.state={
isActionsMenuOpen:!1},r}return p()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.containerKey,s=e.listType,l=e.listContext,c=e.activeSort,u=e.selectedSort,d=e.cellIndex,p=e.cellX,h=e.cellY,f=e.cellWidth,m=e.cellHeight,y=e.activeTableColumns,M=e.title,N=e.route,k=e.showLink,_=e.showPlay,R=e.showEdit,z=e.showSelect,U=e.showMore,B=e.showPlayIndex,V=e.showPlayCellIndex,F=e.showActionsDuration,Q=e.showActionsMinutesLeft,H=e.hasActiveSelection,Y=e.isSelected,W=e.isOtherItemSelected,G=e.isModifierKeyPressed,K=e.isPlaying,q=e.isPlayerPaused,Z=e.onPlayPress,X=e.onEditPress,J=e.onSelectPress,$=e.onDeselectPress,ee=e.hoverableProps,te=e.isHovered,ne=e.isVirtual,ie=this.state.isActionsMenuOpen,re=l===b.b,ae=z&&(G||W),oe=H?"-1":"0",se=!te,le=ne?I.a:S.a
;return v.a.createElement(le,r()({className:((d%2?A.a.alternateItem:A.a.item)||"")+" "+(H&&A.a.hasActiveSelection||"")+" "+(ae&&A.a.isForcingSelection||"")+" "+(Y&&A.a.isSelected||"")+" "+(ie&&A.a.isActionsMenuOpen||""||""),cellX:p,cellY:h,cellWidth:f,cellHeight:m},ee),z&&o()(C.a,{className:A.a.selectCoverButton,"aria-label":Y?Object(g.default)("Deselect {title}",{title:M}):Object(g.default)("Select {title}",{title:M}),tabIndex:k&&!H?"-1":"0",onPress:Y?$:J}),k&&o()(C.a,{className:A.a.underlay,
tabIndex:oe,to:N,"aria-label":M}),o()("div",{className:A.a.overlay},void 0,o()("div",{className:A.a.playCell},void 0,B&&!K&&o()(w.a,{className:A.a.transientTitleLeft,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),V&&!K&&o()("span",{className:A.a.transientTitleLeft},void 0,d+1),_&&!K&&o()(O.a,{className:A.a.playButton,"data-qa-id":"listItemPlayButton",tabIndex:oe,title:M,onPress:Z}),K&&o()(D.a,{className:A.a.equalizer,isPaused:q})),y.map(function(e,r){
var a=e.style,l=e.component,d=e.ascKey,p=e.descKey;return o()(x.a,{style:a,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,component:l,type:s,isActiveSort:c===d||c===p||!!u&&u.key===d,hideUnrated:se},r)}),o()("div",{className:re?A.a.libraryActionsCell:A.a.actionsCell},void 0,F&&o()(T.a,{className:A.a.transientTitleRight,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),Q&&o()(E.a,{className:A.a.transientTitleRight,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i
}),z&&o()(j.a,{className:A.a.selectButton,tabIndex:oe,title:M,isSelected:Y,onPress:J}),R&&o()(C.a,{"data-qa-id":"metadataRowEditButton",className:A.a.editButton,tabIndex:oe,"aria-label":Object(g.default)("Edit {title}",{title:M}),onPress:X},void 0,L),U&&o()(P.a,{"data-qa-id":"metadataRowMoreButton",className:A.a.moreButton,tabIndex:oe,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,containerKey:a,listType:s,showPlay:!1,showQueuePlexMix:!1,showEdit:!1,isMenuOpen:ie,
onMenuOpenChange:this.onActionsMenuOpenChange}))))},t}(f.Component);k.defaultProps={isVirtual:!0},t.a=Object(m.a)(Object(y.a)(k))},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.cellHeight,r=e.onMouseMove,o=e.onMouseLeave,s=e.onFocus,l=e.onBlur,c={position:"relative",width:"100%",height:i};return a()("div",{className:t,style:c,onMouseMove:r,onMouseLeave:o,onFocus:s,onBlur:l},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0));n.n(s);t.a=i},function(e,t,n){
"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){return{index:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).index}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(782);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.style,n=e.component,i=e.isActiveSort,r=c()(e,["style","component","isActiveSort"]),o=n(e.type);return s()("div",{className:i?f.a.activeTableCell:f.a.tableCell,style:t},void 0,p.a.createElement(o,a()({},r,{
className:f.a.title})))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(2879),f=n.n(h);t.a=i},function(e,t){e.exports={tableCell:"MetadataTableCell-tableCell-35117",activeTableCell:"MetadataTableCell-activeTableCell-IpsrR MetadataTableCell-tableCell-35117",title:"MetadataTableCell-title-3KMG0"}},function(e,t){e.exports={item:"MetadataTableRow-item-11DH-",isActionsMenuOpen:"MetadataTableRow-isActionsMenuOpen-3yasO",
transientTitle:"MetadataTableRow-transientTitle-3nwho",button:"MetadataTableRow-button-1Y7ax",hasActiveSelection:"MetadataTableRow-hasActiveSelection-3A2BE",underlay:"MetadataTableRow-underlay-2ipZb",isForcingSelection:"MetadataTableRow-isForcingSelection-t_XFI",overlay:"MetadataTableRow-overlay-1RiId",transientTitleLeft:"MetadataTableRow-transientTitleLeft-19Y6P MetadataTableRow-transientTitle-3nwho",
transientTitleRight:"MetadataTableRow-transientTitleRight-3JGw3 MetadataTableRow-transientTitle-3nwho",playButton:"MetadataTableRow-playButton-3bNBC PlayButton-playButton-3WX8X MetadataTableRow-button-1Y7ax",editButton:"MetadataTableRow-editButton-1hH1w MetadataTableRow-button-1Y7ax",moreButton:"MetadataTableRow-moreButton-2YKSy MetadataTableRow-button-1Y7ax",isSelected:"MetadataTableRow-isSelected-bNqXl",
selectButton:"MetadataTableRow-selectButton-11Ia9 SelectButton-selectButton-3Kbjm MetadataTableRow-button-1Y7ax",alternateItem:"MetadataTableRow-alternateItem-1-jtp MetadataTableRow-item-11DH-",playCell:"MetadataTableRow-playCell-ziDSk",actionsCell:"MetadataTableRow-actionsCell-1ax6E",libraryActionsCell:"MetadataTableRow-libraryActionsCell-2OOmP MetadataTableRow-actionsCell-1ax6E",selectCoverButton:"MetadataTableRow-selectCoverButton-3SFDJ",
equalizer:"MetadataTableRow-equalizer-35cH_ EqualizerIcon-equalizer-2SoFA"}},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.containerKey,o=e.containerTitle,l=e.listType,c=e.listContext,v=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","containerTitle","listType","listContext"]);return u.a.createElement(h.a,a()({listType:l,listContext:c,layout:d.a,cellRenderer:Object(p.a)({serverEntityID:t,
providerEntityID:n,metadataListEntityID:i,listType:l,listContext:c,containerKey:r,containerTitle:o},f.a)},v))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=(n(31),n(1175)),p=n(123),h=n(259),f=n(1176);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(437),f=n(1),v=(n.n(f),
n(0)),g=n.n(v),m=n(4),y=n(565),b=n(124),I=n(31),S=n(93),M=n(26),D=n(86),C=n(22),O=n(362),j=n(297),P=n(542),w=n(782),T=n(230),E=n(435),x=n(2883),N=n.n(x),A=o()(M.a,{name:"plex-icon-edit-560"}),L=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onActionsMenuOpenChange=function(e){r.setState({isActionsMenuOpen:e})},r.state={isActionsMenuOpen:!1},r}return p()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.containerKey,s=e.listType,l=e.listContext,c=e.cellIndex,u=e.cellX,d=e.cellY,p=e.cellWidth,f=e.cellHeight,v=e.showScrollPlaceholder,y=e.showOffscreenPlaceholder,b=e.metadataKey,M=e.type,x=e.index,L=e.title,k=e.grandparentKey,_=e.summary,R=e.isFolder,z=e.route,U=e.showLink,B=e.showEdit,V=e.showSelect,F=e.showMore,Q=e.hasActiveSelection,H=e.isSelected,Y=e.isOtherItemSelected,W=e.isModifierKeyPressed,G=e.imageWidth,K=e.imageHeight,q=e.imageUrl,Z=e.onEditPress,X=e.onSelectPress,J=e.onDeselectPress,$=e.hoverableProps,ee=e.isHovered,te=this.state.isActionsMenuOpen,ne=l===I.b,ie=V&&(W||Y),re=Q?"-1":"0",ae=null!=x,oe=!ee
;return g.a.createElement(S.a,r()({className:((c%2?N.a.alternateItem:N.a.item)||"")+" "+(Q&&N.a.hasActiveSelection||"")+" "+(ie&&N.a.isForcingSelection||"")+" "+(H&&N.a.isSelected||"")+" "+(te&&N.a.isActionsMenuOpen||""||""),cellX:u,cellY:d,cellWidth:p,cellHeight:f},$),V&&o()(C.a,{className:N.a.selectCoverButton,"aria-label":H?Object(m.default)("Deselect {title}",{title:L}):Object(m.default)("Select {title}",{title:L}),tabIndex:U&&!Q?"-1":"0",onPress:H?J:X}),U&&o()(C.a,{className:N.a.underlay,
tabIndex:re,to:z,"aria-label":L}),o()("div",{className:N.a.overlay},void 0,o()("div",{className:N.a.posterContainer},void 0,v?o()(P.a,{imageWidth:G,imageHeight:K}):o()(j.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,containerKey:a,listType:s,listContext:l,metadataKey:b,type:M,imageWidth:G,imageHeight:K,imageUrl:q,isOffscreen:y,isFolder:R,showLink:!1,showSelect:!1,showEdit:!1,showMore:!1})),o()("div",{className:ne?N.a.librarySummaryContainer:N.a.summaryContainer
},void 0,o()("div",{},void 0,o()("div",{className:N.a.titleContainer},void 0,o()("div",{className:N.a.title},void 0,!!k&&o()("span",{},void 0,ne?o()(T.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}):ae&&o()(w.a,{index:x}),(ne||ae)&&o()(D.a,{className:N.a.separator})),L),o()("div",{className:N.a.rating},void 0,o()(E.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,hideUnrated:oe})),o()("div",{className:N.a.actions},void 0,V&&o()(O.a,{className:N.a.selectButton,
tabIndex:re,title:L,isSelected:H,onPress:X}),B&&o()(C.a,{"data-qa-id":"metadataSummaryEditButton",className:N.a.editButton,tabIndex:re,"aria-label":Object(m.default)("Edit {title}",{title:L}),onPress:Z},void 0,A),F&&o()(h.a,{"data-qa-id":"metadataSummaryMoreButton",className:N.a.moreButton,tabIndex:re,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,containerKey:a,listType:s,showPlay:!1,showQueuePlexMix:!1,showEdit:!1,isMenuOpen:te,onMenuOpenChange:this.onActionsMenuOpenChange
}))),o()("div",{className:N.a.summary},void 0,_)))))},t}(v.Component);t.a=Object(y.a)(Object(b.a)(L))},function(e,t){e.exports={item:"MetadataSummaryCell-item-3B6Cc",isActionsMenuOpen:"MetadataSummaryCell-isActionsMenuOpen-2SCBd",button:"MetadataSummaryCell-button-zZgSe",hasActiveSelection:"MetadataSummaryCell-hasActiveSelection-3nabO",underlay:"MetadataSummaryCell-underlay-3M2OQ",isForcingSelection:"MetadataSummaryCell-isForcingSelection-2Iov2",overlay:"MetadataSummaryCell-overlay-1lk0o",
editButton:"MetadataSummaryCell-editButton-2RfiY MetadataSummaryCell-button-zZgSe",moreButton:"MetadataSummaryCell-moreButton-1rf6A MetadataSummaryCell-button-zZgSe",isSelected:"MetadataSummaryCell-isSelected-fha5M",selectButton:"MetadataSummaryCell-selectButton-3KJeM SelectButton-selectButton-3Kbjm MetadataSummaryCell-button-zZgSe",alternateItem:"MetadataSummaryCell-alternateItem-3K1M6 MetadataSummaryCell-item-3B6Cc",posterContainer:"MetadataSummaryCell-posterContainer-1Vc-o",
summaryContainer:"MetadataSummaryCell-summaryContainer-6HJG5",librarySummaryContainer:"MetadataSummaryCell-librarySummaryContainer-HZdA_ MetadataSummaryCell-summaryContainer-6HJG5",titleContainer:"MetadataSummaryCell-titleContainer-p5H3c",title:"MetadataSummaryCell-title-3jmFb",rating:"MetadataSummaryCell-rating-2Qtpg",separator:"MetadataSummaryCell-separator-2zu7c DashSeparator-separator-2a3yn",summary:"MetadataSummaryCell-summary-2xqys",actions:"MetadataSummaryCell-actions-1C9Sh",
selectCoverButton:"MetadataSummaryCell-selectCoverButton-2nF-u"}},function(e,t,n){"use strict";function i(e){var t=e.cellIndex,n=e.cellX,i=e.cellY,r=e.cellWidth,o=e.cellHeight,s=e.imageWidth,c=e.imageHeight;return a()(u.a,{className:t%2?h.a.alternateLoadingItem:h.a.loadingItem,cellX:n,cellY:i,cellWidth:r,cellHeight:o},void 0,a()("div",{className:h.a.posterContainer},void 0,a()(d.a,{imageWidth:s,imageHeight:c})),Object(l.default)("Loading..."))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(4)),c=n(124),u=n(93),d=n(542),p=n(2885),h=n.n(p);t.a=Object(c.a)(i)},function(e,t){e.exports={loadingItem:"MetadataSummaryCellLoading-loadingItem-2TLko",alternateLoadingItem:"MetadataSummaryCellLoading-alternateLoadingItem-6d55P MetadataSummaryCellLoading-loadingItem-2TLko",posterContainer:"MetadataSummaryCellLoading-posterContainer-18W6x"}},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.containerKey,o=e.containerTitle,l=e.listType,c=e.listContext,v=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","containerTitle","listType","listContext"]);return u.a.createElement(h.a,a()({listType:l,listContext:c,layout:d.a,cellRenderer:Object(p.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listType:l,listContext:c,containerKey:r,containerTitle:o},f.a)},v))}
var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=(n(31),n(1178)),p=n(123),h=n(259),f=n(1179);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(61),m=n(565),y=n(124),b=n(93),I=n(22),S=n(437),M=n(1035),D=n(1162),C=n(173),O=n(2888),j=n.n(O),P=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onActionsMenuOpenChange=function(e){r.setState({
isActionsMenuOpen:e})},r.state={isActionsMenuOpen:!1},r}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.containerKey,s=e.listType,l=e.cellIndex,c=e.cellX,u=e.cellY,d=e.cellWidth,p=e.cellHeight,h=e.title,f=e.summary,m=e.tagline,y=e.route,O=e.showLink,P=e.showMore,w=e.hoverableProps,T=e.onPlayPress,E=this.state.isActionsMenuOpen;return v.a.createElement(b.a,r()({
className:((l%2?j.a.alternateItem:j.a.item)||"")+" "+(E&&j.a.isActionsMenuOpen||""||""),cellX:c,cellY:u,cellWidth:d,cellHeight:p},w),O&&o()(I.a,{className:j.a.underlay,to:y,"aria-label":h}),o()("div",{className:j.a.overlay},void 0,o()("div",{className:j.a.simpleSummaryContainer},void 0,o()("div",{className:j.a.indexPlayContainer},void 0,o()(M.a,{className:j.a.titleEpisodeIndex,metadataItemEntityID:i,longName:!1}),o()("div",{className:j.a.playButtonContainer},void 0,o()(C.a,{
className:j.a.playButton,title:h,onPress:T}))),o()("div",{className:j.a.miniProgressContainer},void 0,o()(D.a,{metadataItemEntityID:i,size:g.SMALL})),o()("div",{className:j.a.titleAndSummaryContainer},void 0,o()("div",{className:j.a.titleContainer},void 0,o()("div",{className:j.a.title},void 0,h),o()("div",{className:j.a.actions},void 0,P&&o()(S.a,{"data-qa-id":"metadataSimpleSummaryMoreButton",className:j.a.moreButton,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,containerKey:a,
listType:s,showPlay:!1,showAddToSaved:!1,isMenuOpen:E,onMenuOpenChange:this.onActionsMenuOpenChange}))),o()("div",{className:j.a.summary},void 0,m||f)))))},t}(f.Component);t.a=Object(m.a)(Object(y.a)(P))},function(e,t){e.exports={item:"MetadataSimpleSummaryCell-item-2wMSi",isActionsMenuOpen:"MetadataSimpleSummaryCell-isActionsMenuOpen-3iGW8",button:"MetadataSimpleSummaryCell-button-T_Dfk",titleEpisodeIndex:"MetadataSimpleSummaryCell-titleEpisodeIndex-fssXI",
alternateItem:"MetadataSimpleSummaryCell-alternateItem-2dz9a MetadataSimpleSummaryCell-item-2wMSi",underlay:"MetadataSimpleSummaryCell-underlay-3j5Eg",overlay:"MetadataSimpleSummaryCell-overlay-18Efa",simpleSummaryContainer:"MetadataSimpleSummaryCell-simpleSummaryContainer-2b-1R",indexPlayContainer:"MetadataSimpleSummaryCell-indexPlayContainer-C8tSJ",playButtonContainer:"MetadataSimpleSummaryCell-playButtonContainer-CgWZX",
playButton:"MetadataSimpleSummaryCell-playButton-3yyum PlayButton-playButton-3WX8X MetadataSimpleSummaryCell-button-T_Dfk",miniProgressContainer:"MetadataSimpleSummaryCell-miniProgressContainer-3piSD",titleAndSummaryContainer:"MetadataSimpleSummaryCell-titleAndSummaryContainer-YfihR",titleContainer:"MetadataSimpleSummaryCell-titleContainer-1kD2L",title:"MetadataSimpleSummaryCell-title-2SoJl",summary:"MetadataSimpleSummaryCell-summary-1plSw",actions:"MetadataSimpleSummaryCell-actions-2_Byw",
moreButton:"MetadataSimpleSummaryCell-moreButton-1mNpc MetadataSimpleSummaryCell-button-T_Dfk"}},function(e,t,n){"use strict";function i(e){var t=e.cellIndex,n=e.cellX,i=e.cellY,r=e.cellWidth,o=e.cellHeight;return a()(u.a,{className:t%2?p.a.alternateLoadingItem:p.a.loadingItem,cellX:n,cellY:i,cellWidth:r,cellHeight:o},void 0,Object(l.default)("Loading..."))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(124),u=n(93),d=n(2890),p=n.n(d);t.a=Object(c.a)(i)},function(e,t){e.exports={
loadingItem:"MetadataSimpleSummaryCellLoading-loadingItem-35Sst",alternateLoadingItem:"MetadataSimpleSummaryCellLoading-alternateLoadingItem-2LPd5 MetadataSimpleSummaryCellLoading-loadingItem-35Sst"}},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.containerKey,o=e.containerTitle,l=e.activeSort,c=e.listType,v=e.listSubtype,g=e.listContext,m=e.columnAdjustment,y=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","containerTitle","activeSort","listType","listSubtype","listContext","columnAdjustment"]),b=Object(p.b)(c,g,{activeSort:l,subtype:v,providerEntityID:n});return u.a.createElement(f.a,a()({listType:c,listContext:g,
layout:Object(d.a)(c,v,g,m,b.length),cellRenderer:Object(h.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listType:c,listContext:g,titleComponents:b,containerKey:r,containerTitle:o})},y))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(780),p=(n(31),n(174)),h=n(1098),f=n(259);t.a=i},function(e,t){e.exports={metadataListPageContent:"MetadataListPageContent-metadataListPageContent-s56y9 PageContent-pageContent-16mK6",
metadataListScroller:"MetadataListPageContent-metadataListScroller-1uFgY",hasGutter:"MetadataListPageContent-hasGutter-1EfyE",attribution:"MetadataListPageContent-attribution-3zY50"}},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.providerIdentifier,r=e.error,o=e.typeKey,l=e.activeFilters,c=e.activeSort,b=e.listType,I=e.isLibraryRefreshing,S=h.a[b];return r?a()(m.a,{title:Object(u.default)("There was an unexpected error loading this library")
}):s.a.isEmpty(l)?d.c.EPG_IDENTIFIER.test(i)?a()(y.a,{serverEntityID:t,providerEntityID:n}):I?a()(g.a,{icon:S,title:Object(u.default)("Libraries are currently being updated"),description:Object(u.default)("Hang tight while we look for your content")}):a()(g.a,{icon:S,title:Object(u.default)("There are no items in this library")}):a()(g.a,{icon:S,title:Object(u.default)("The active filter has no matches"),description:Object(u.default)("Use the menu above to change the active filter")
},void 0,a()(v.a,{to:Object(f.a)({typeKey:o,sort:c}),kind:p.b.PRIMARY},void 0,Object(u.default)("Clear filter")))}var r=n(2),a=n.n(r),o=n(5),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(4)),d=n(55),p=n(24),h=(n(115),n(724)),f=n(264),v=n(22),g=n(182),m=n(262),y=n(765);t.a=i},function(e,t){e.exports={attribution:"LibraryPage-attribution-f51hr ProgramGuideAttribution-attribution-3Ca_I"}},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(function(e){return e.ui.timelinePage
},S,f.a,Object(c.a)(),Object(d.a)(),Object(p.a)(),h.a,Object(v.a)(),u.a,function(e,t,n,i,r,a,o,s,l){var c=e.details,u=e.containerKey,d=e.isMomentListPending,p=e.isMomentListPopulated,h=e.momentListError,f=Object(y.a)(n,i,r,{save:1});return{libraryKey:r,metadataListEntityID:e.metadataList,providerIdentifier:i.identifier,providerMetricsIdentifier:i.metricsIdentifier,librarySectionID:c&&c.librarySectionID,libraryDirectories:c&&c.directories,libraryRoute:f,metadataTypes:c?c.types:[],moments:t,
isMomentListPending:d,isMomentListPopulated:p,momentListError:h,containerKey:u,momentKey:a,activeSelectionType:o.activeSelectionType,disableReloadThreshold:!!o.activeSelectionType,isLibraryRefreshing:s,columnAdjustment:l.columnAdjustment}})}function r(e,t){return{onLibraryChange:function(n,i){e(Object(g.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,providerIdentifier:n,sectionID:i}))},onCloseTimelinePage:function(){e(m.a({}))}}}function a(e){
var t=e.ui.timelinePage;return{serverEntityID:t.serverEntityID,momentKey:t.momentKey}}function o(e,t){e(m.b({serverEntityID:t.serverEntityID,libraryKey:t.libraryKey,momentKey:t.momentKey})),e(m.c())}var s=n(11),l=n(6),c=(n.n(l),n(79)),u=n(100),d=n(206),p=n(2896),h=n(88),f=n(48),v=n(774),g=n(148),m=n(2897),y=n(122),b=n(202),I=n(2898),S=Object(l.createSelector)(function(e){return e.ui.timelinePage.momentList},function(e){if(!e)return[];var t=0;return e.moments.map(function(e){var n=t;t+=e.size
;var i=e.id,r=e.title,a=e.size,o=e.avgAR,s=e.startsAt,l=e.size*(e.avgAR||1);return{start:n,end:t,area:l,id:i,title:r,size:a,avgAR:o,startsAt:s}})}),M=Object(b.a)(I.a,a,o),D=Object(s.b)(i,r)(M);t.a=D},function(e,t,n){"use strict";function i(){return Object(r.a)("cluster?clusterZoomLevel=1")}t.a=i;var r=n(559)},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return o}),n.d(t,"c",function(){return s})
;var i=n(36),r=n(82),a=Object(i.a)(r.I),o=Object(i.a)(r.g),s=(Object(i.a)(r.y),Object(i.a)(r.U))},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(35),v=n(192),g=n(72),m=n(24),y=n(81),b=n(22),I=n(39),S=n(187),M=n(157),D=n(126),C=n(302),O=n(373),j=n(2899),P=n(2901),w=n(2916),T=n.n(w),E=r()(M.a,{},void 0,r()(I.a,{})),x=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i))
;return r.onMeasure=function(e){var t=e.width,n=e.height;r.setState({isMeasured:!0,width:t,height:n})},r.onMomentScrollIndexChange=function(e){r.setState({currentMomentTitle:r.props.moments[e].title})},r.state={isMeasured:!1,currentMomentTitle:"",width:0,height:0},r}return u()(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.librarySectionID,n=e.providerIdentifier,i=e.onLibraryChange;t&&i(n,t)},t.prototype.componentDidUpdate=function(e){
var t=this.props,n=t.librarySectionID,i=t.providerIdentifier,r=t.onLibraryChange;n&&n!==e.librarySectionID&&r(i,n)},t.prototype.componentWillUnmount=function(){this.props.onLibraryChange(null,null),this.props.onCloseTimelinePage()},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.providerMetricsIdentifier,a=e.selectedDirectory,o=e.libraryDirectories,s=e.metadataTypes,l=e.metadataListEntityID,c=e.isMomentListPending,u=e.isMomentListPopulated,d=e.momentListError,p=e.moments,I=e.libraryRoute,M=e.activeSelectionType,w=e.columnAdjustment,x=this.state,N=x.isMeasured,A=x.width,L=x.height,k=x.currentMomentTitle,_=200-100*w,R=12+w,z=Math.min(Math.ceil(A/_),R);return u?r()(S.a,{metricsPage:f.E,metricsProperties:{
identifier:i,mode:"timeline",type:"photo",style:y.b},allowBackgroundLightPreset:!0,scrollDirection:m.d.NONE},void 0,M?r()(O.a,{serverEntityID:t,providerEntityID:n}):r()(j.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:l,metadataTypes:s,libraryRoute:I,libraryDirectories:o,title:k,selectedDirectory:a}),r()(g.a,{className:T.a.measured,ignorePosition:!0,onMeasure:this.onMeasure},void 0,N&&r()(P.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:l,moments:p,columns:z,height:L,
onMomentScrollIndexChange:this.onMomentScrollIndexChange}))):c?E:d?r()(C.a,{title:Object(h.default)("There was an unexpected error loading this library")}):r()(D.a,{title:Object(h.default)("There was an error loading the timeline for this library"),description:Object(h.default)("The photos timeline requires Plex Media Server {version} or higher",{version:v.a.itemClusters})},void 0,r()(b.a,{to:I,kind:m.b.PRIMARY},void 0,Object(h.default)("Browse by Type")))},t}(p.Component);t.a=x
},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e,t){return t.libraryDirectories},Object(c.a)(),o.a,Object(l.a)(),Object(s.a)(),function(e,t,n,i,r){var a={key:"timeline"},o=Object(d.a)({type:"photo",server:t,provider:n,libraryKey:i,libraryDirectories:e});return{listType:"photo",listStyle:u.b,totalSize:r.totalSize,libraryKey:i,metadataPseudoTypes:o,selectedType:a,allListStyles:[u.b]}})}var r=n(11),a=n(6),o=(n.n(a),
n(37)),s=n(159),l=n(206),c=n(42),u=n(81),d=n(561),p=n(2900);t.a=Object(r.b)(i)(p.a)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(54),v=(n(81),n(777)),g=n(778),m=n(263),y=n(188),b=n(189),I=n(204),S=n(379),M=n(205),D=n(562),C=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onTypesMenuButtonPress=function(e){r.setState({isTypesMenuOpen:!r.state.isTypesMenuOpen})},
r.onTypesMenuClose=function(){r.setState({isTypesMenuOpen:!1})},r.state={isTypesMenuOpen:!1},r._typesMenuButtonID=Object(f.a)(),r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,a=e.listType,o=e.listStyle,s=e.title,l=e.totalSize,c=e.libraryRoute,u=e.metadataTypes,d=e.metadataPseudoTypes,p=e.selectedType,f=e.allListStyles,C=this.state.isTypesMenuOpen;return r()(y.a,{},void 0,r()(b.a,{},void 0,r()(M.a,{
id:this._typesMenuButtonID,title:Object(h.default)("Timeline"),hasMenu:!0,isMenuOpen:C,onPress:this.onTypesMenuButtonPress}),r()(D.a,{target:this._typesMenuButtonID,isOpen:C,libraryRoute:c,types:u,pseudoTypes:d,selectedType:p,activeFilters:[],onMenuClose:this.onTypesMenuClose}),r()(M.a,{title:s}),r()(S.a,{},void 0,l)),r()(I.a,{},void 0,r()(v.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listType:a,isLibraryList:!0}),r()(g.a,{selectedListStyle:o,allListStyles:f}),r()(m.a,{
selectedListStyle:o,allListStyles:f})))},t}(p.Component);t.a=C},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(5),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(4)),g=n(724),m=n(45),y=n.n(m),b=n(182),I=n(261),S=n(2902),M=n(2905),D=n(2906),C=n(2909),O=n(2915),j=n.n(O),P=Math.max(0,parseInt(y.a.timelineGutter,10)-40),w=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onListUpdate=function(e){
var t=e.landmarks,n=e.listStyle&&e.listStyle.height;if(t!==r._landmarks){r._landmarks=t;var i=p.a.pluck(r.props.moments,"startsAt"),a=Object(M.a)(t,i);r.setState({ticks:a,listHeight:n})}},r.state={ticks:null,listHeight:null},r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,a=e.moments,o=e.columns,s=e.height,l=e.onMomentScrollIndexChange,c=this.state,u=c.ticks,d=c.listHeight,p=1/s,h=d&&d>s;return a.length?r()("div",{
className:j.a.container},void 0,r()(D.a,{className:j.a.stack,scrollerClassName:j.a.scroller,serverEntityID:t,providerEntityID:n,metadataListEntityID:i,scrollPositionStorageKey:"TimelinePageContent",keyPropName:"id",items:a,size:a.length,columns:o,footerHeight:59,listPadding:55,listGutter:P,hasNestedList:!0,cellComponent:C.a,onListScrollIndexChange:l,onListUpdate:this.onListUpdate}),r()("div",{className:j.a.adornment},void 0,u&&h&&r()(S.a,{pixelProportion:p,ticks:u}))):r()(I.a,{},void 0,r()(b.a,{
icon:g.a.photo,title:Object(v.default)("There are no events in this library")}))},t}(f.Component);t.a=w},function(e,t,n){"use strict";function i(e){var t=e.ticks,n=e.pixelProportion,i=e.majorTickGap,r=e.minorTickGap,a=h.a.where(t,{type:m.a}),o=h.a.where(t,{type:m.b}),s=Object(g.a)({items:a,gap:n*i});return Object(g.a)({items:o,existingItems:s,gap:n*r})}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(5),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=(n.n(v),
n(2903)),m=n(1180),y=n(2904),b=n.n(y),I=function(e){function t(n,r){s()(this,t);var a=c()(this,e.call(this,n,r));return a.state={ticks:i(n)},a}return d()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=e.ticks,n=e.pixelProportion,r=e.majorTickGap,a=e.minorTickGap,o=this.props.ticks!==t,s=this.props.pixelProportion!==n,l=this.props.majorTickGap!==r,c=this.props.minorTickGap!==a;(o||s||l||c)&&this.setState({ticks:i(e)})},t.prototype.render=function(){return a()("div",{
className:b.a.container},void 0,a()("div",{className:b.a.ticks},void 0,this.state.ticks.map(function(e){var t=e.type,n=e.position,i=e.label;return a()("div",{className:b.a[t],style:{top:100*n+"%"}},n,i&&"major"===t&&a()("div",{className:b.a.label},void 0,i))})))},t}(v.Component);I.defaultProps={majorTickGap:20,minorTickGap:5},t.a=I},function(e,t,n){"use strict";function i(e){
var t=e.items,n=e.gap,i=void 0===n?0:n,r=e.existingItems,o=void 0===r?[]:r,s=a.a.sortBy(o,"position"),l=a.a.sortBy(t,"position"),c=-1/0;return l.forEach(function(e){var t=a.a.sortedIndex(o,e,"position"),n=o[t-1],r=o[t],l=e.position>c+i,u=!n||e.position>n.position+i,d=!r||e.position<r.position-i;l&&u&&d&&(s.push(e),c=e.position)}),a.a.sortBy(s,"position")}t.a=i;var r=n(5),a=n.n(r)},function(e,t){e.exports={container:"TickMarks-container-Dsw5z",ticks:"TickMarks-ticks-3rrhG",
tick:"TickMarks-tick-S3qkF",minor:"TickMarks-minor-1EIQq TickMarks-tick-S3qkF",major:"TickMarks-major-2GXoi TickMarks-tick-S3qkF",label:"TickMarks-label-2qQML"}},function(e,t,n){"use strict";function i(e,t){var n={},i={};return e.reduce(function(e,o){var s=o.index,l=o.position,c=Object(r.default)(1e3*t[s],"YYYY MM"),u=c.slice(0,4);return n[u]?i[c]||(i[c]=!0,e.push({position:l,type:a.b})):(n[u]=!0,i[c]=!0,e.push({position:l,type:a.a,label:u})),e},[])}t.a=i;var r=n(254),a=n(1180)},function(e,t,n){
"use strict";function i(){return Object(y.createSelector)(b.a,function(e){return{disableReloadThreshold:!!e.activeSelectionType}})}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(88)),I=n(137),S=n(2907),M={dispatchPopulateMetadataListRange:I.h,dispatchDeselectAllMetadataListItems:I.b},D=function(e){function t(){var n,i,r;c()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s]
;return n=i=d()(this,e.call.apply(e,[this].concat(o))),i.onPageRequest=function(e){var t=e.startIndex,n=e.endIndex,r=i.props,a=r.metadataListEntityID,o=r.disableReloadThreshold,s=r.items;(0,r.dispatchPopulateMetadataListRange)({metadataListEntityID:a,disableReloadThreshold:o,startIndex:s[t].start,endIndex:s[n].end-1,pages:1})},r=n,d()(i,r)}return h()(t,e),t.prototype.componentWillUnmount=function(){var e=this.props.metadataListEntityID;this.props.dispatchDeselectAllMetadataListItems({
metadataListEntityID:e})},t.prototype.render=function(){var e=this.props,t=(e.dispatchPopulateMetadataListRange,e.dispatchDeselectAllMetadataListItems,s()(e,["dispatchPopulateMetadataListRange","dispatchDeselectAllMetadataListItems"]));return g.a.createElement(S.a,a()({onPageRequest:this.onPageRequest},t))},t}(v.Component);t.a=Object(m.b)(i,M)(D)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),
n(0)),h=n.n(p),f=n(2908),v=n(259),g=n(123),m=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.state={layout:r._createLayout(n)},r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=e.items!==this.props.items,n=e.columns!==this.props.columns;(t||n)&&this.setState({layout:this._createLayout(e)})},t.prototype._createLayout=function(e){return Object(f.a)({columns:e.columns,areas:e.items.map(function(e){return e.area}),
innerPaddingTop:e.headerHeight,innerPaddingBottom:e.footerHeight,outerPaddingTop:e.listPadding,outerPaddingRight:e.listPadding-e.listGutter,outerPaddingBottom:e.listPadding,outerPaddingLeft:e.listPadding})},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,a=e.columns,o=e.headerHeight,s=e.footerHeight,l=e.cellComponent;return h.a.createElement(v.a,r()({layout:this.state.layout,cellRenderer:Object(g.a)({serverEntityID:t,
providerEntityID:n,metadataListEntityID:i,columns:a,headerHeight:o,footerHeight:s},l)},this.props))},t}(p.Component);t.a=m},function(e,t,n){"use strict";function i(e){function t(e,t){return Math.max(1,Math.round(e/r))*t+(d+h)}function n(e){return c.map(function(n){return t(n,e/r)})}var i=e.columns,r=void 0===i?1:i,o=e.areas,c=void 0===o?[]:o,u=e.innerPaddingTop,d=void 0===u?0:u,p=e.innerPaddingBottom,h=void 0===p?0:p,f=s()(e,["columns","areas","innerPaddingTop","innerPaddingBottom"])
;return Object(l.a)(a()({getCellHeights:n},f))}t.a=i;var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(783)},function(e,t,n){"use strict";function i(){return Object(u.createSelector)(function(e,t){return t.start},function(e,t){return t.end},Object(f.a)(),function(e,t,n){var i=n.populatedRange,r=n.metadataItems;return e<i.start||t>i.end?p.a.times(t-e,function(){return null}):r.slice(e-i.start,t-i.start)})}function r(){return Object(u.createSelector)(i(),g.a,function(e,t){return e.map(function(e){
return t[e]})})}function a(){return Object(u.createSelector)(r(),y.a,function(e,t){return e.every(function(e){return e&&Object(I.a)(t,e.ratingKey)})})}function o(){return Object(u.createSelector)(function(e,t){return t.avgAR},r(),function(e,t){return t.map(function(t){return t?Object(v.a)(t,e):e})})}function s(){return Object(u.createSelector)(Object(f.a)(),i(),o(),a(),m.a,function(e,t,n,i,r){return{containerKey:e.containerKey,listType:"photo",aspectRatios:n,items:t,isSelected:i,
hasSelection:r.activeSelectionItems.length>0}})}function l(e,t){return{onSelectItems:function(t){e(Object(b.l)({type:h.g,ids:t}))},onDeselectItems:function(t){e(Object(b.d)({ids:t}))}}}var c=n(11),u=n(6),d=(n.n(u),n(5)),p=n.n(d),h=n(28),f=n(159),v=n(566),g=n(110),m=n(88),y=n(540),b=n(137),I=n(541),S=n(2911);t.a=Object(c.b)(s,l)(S.a)},function(e,t,n){"use strict";function i(e){return e>=5&&e<9}t.a=i},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(124)),f=n(93),v=n(185),g=n(1181),m=n(1182),y=n(123),b=n(1183),I=n(362),S=n(2914),M=n.n(S),D=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onSelectPress=function(){var e=r.props,t=e.isSelected,n=e.items,i=e.onSelectItems,a=e.onDeselectItems;t?a(n):i(n)},r.state={layout:r._createLayout(n),cellRenderer:r._createCellRenderer(n)},r}return u()(t,e),
t.prototype.componentWillReceiveProps=function(e){var t=e.aspectRatios!==this.props.aspectRatios,n=e.columns!==this.props.columns,i=e.viewportWidth!==this.props.viewportWidth,r=e.viewportHeight!==this.props.viewportHeight,a=e.serverEntityID!==this.props.serverEntityID,o=e.providerEntityID!==this.props.providerEntityID,s=e.metadataListEntityID!==this.props.metadataListEntityID,l=t||n||r||i,c=a||o||s;if(l||c){var u={};l&&(u.layout=this._createLayout(e)),
c&&(u.cellRenderer=this._createCellRenderer(e)),this.setState(u)}},t.prototype._createLayout=function(e){var t=Object(m.a)({aspectRatios:e.aspectRatios,columns:e.columns});return Object(g.a)({columns:e.columns,rows:t,maximumHeight:e.cellHeight-(e.footerHeight+e.headerHeight)})},t.prototype._createCellRenderer=function(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.containerKey,a=e.listType;return Object(y.a)({serverEntityID:t,providerEntityID:n,
metadataListEntityID:i,containerKey:r,listType:a},b.a)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.className,i=e.cellX,a=e.cellY,o=e.cellWidth,s=e.cellHeight,l=e.title,c=e.items,u=e.size,d=e.viewportHeight,p=e.scrollTop,h=e.isSelected,g=e.hasSelection,m=this.state,y=m.layout,b=m.cellRenderer;return r()(f.a,{className:n,cellX:i,cellY:a,cellWidth:o,cellHeight:s},void 0,r()("div",{className:(g&&M.a.hasSelection||"")+" "+(M.a.header||"")},void 0,r()("div",{
className:M.a.actions},void 0,r()(I.a,{className:M.a.selectButton,title:l,isSelected:h,onPress:this.onSelectPress})),r()("div",{className:M.a.title},void 0,l)),r()(v.a,{serverEntityID:t,items:c,keyPropName:"metadataItemEntityID",size:u,cellRenderer:b,viewportWidth:o,viewportHeight:d,scrollTop:p-a,layout:y}))},t}(p.Component);D.defaultProps={headerHeight:0,footerHeight:0},t.a=Object(h.a)(D)},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(29)),f=n(26),v=n(124),g=n(93),m=n(45),y=n.n(m),b=n(542),I=n(297),S=n(2913),M=n.n(S),D=parseInt(y.a.mosaicCellPadding,10),C=r()(f.a,{name:"plex-icon-clips-560"}),O=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(h.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.containerKey,o=e.listType,s=e.metadataKey,l=e.type,c=e.title,u=e.thumb,d=e.cellX,p=e.cellY,h=e.cellWidth,f=e.cellHeight,v=e.showOffscreenPlaceholder,m=e.selectionType,y=e.activeSelectionType,S=e.isSelected,O=e.onSelectItem,j=e.onDeselectItem,P="clip"===l,w="photoalbum"===l,T=!s,E=h-2*D,x=f-2*D;return r()(g.a,{cellX:d,cellY:p,cellWidth:h,cellHeight:f},void 0,r()("div",{className:M.a.photoContainer
},void 0,r()("div",{className:M.a.photo},void 0,r()("div",{className:M.a.image},void 0,T&&r()(b.a,{imageWidth:E,imageHeight:x,activeSelectionType:y,isSelected:S}),!T&&r()(I.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,containerKey:a,listType:o,metadataKey:s,type:l,imageUrl:u,imageWidth:E,imageHeight:x,selectionType:m,activeSelectionType:y,isSelected:S,isOffscreen:v,onSelectItem:O,onDeselectItem:j}),P&&r()("div",{className:M.a.badge},void 0,C),w&&r()("div",{className:M.a.title
},void 0,c)))))},t}(p.Component);t.a=Object(v.a)(O)},function(e,t){e.exports={photoContainer:"MetadataPhotoCell-photoContainer-1HkmQ",photo:"MetadataPhotoCell-photo-Po3Kx",image:"MetadataPhotoCell-image-3KqaF",badge:"MetadataPhotoCell-badge-2L0KJ",title:"MetadataPhotoCell-title-OzhEq"}},function(e,t){e.exports={actions:"MetadataMomentCell-actions--ESOo",selectButton:"MetadataMomentCell-selectButton-2JUti SelectButton-selectButton-3Kbjm",title:"MetadataMomentCell-title-RqYT0",
header:"MetadataMomentCell-header-3vgVa",hasSelection:"MetadataMomentCell-hasSelection-3g1dL"}},function(e,t){e.exports={container:"TimelinePageContent-container-2lbp-",stack:"TimelinePageContent-stack-2iWVF PageContent-pageContent-16mK6",adornment:"TimelinePageContent-adornment-1VLRt",scroller:"TimelinePageContent-scroller-3tS5J"}},function(e,t){e.exports={measured:"TimelinePage-measured-3JDcK"}},function(e,t,n){"use strict";function i(e){var t=e.ui.channelGridPage;return{
providerEntityID:t.providerEntityID,serverEntityID:t.serverEntityID,metadataListEntityID:t.metadataList,directoryKey:t.directoryKey}}function r(e,t){e(Object(s.b)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,directoryKey:t.directoryKey})),e(Object(s.g)())}var a=n(11),o=n(6),s=(n.n(o),n(266)),l=n(206),c=n(202),u=n(2921),d=Object(o.createStructuredSelector)({metadataListEntityID:function(e){return e.ui.channelGridPage.metadataList},directoryKey:Object(l.a)()
}),p=Object(c.a)(u.a,i,r),h=Object(a.b)(d)(p);t.a=h},function(e,t,n){"use strict";var i={CHANNEL:310};t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(19),o=n(244),s=r()({},o.a,{getPaginatedUrl:function(e){var t=this.get("beginsAt"),n=this.get("endsAt");if(null!=t||null!=n){var i={"endsAt>":t,"beginsAt<":n};return a.join(e,i)}return e},fetchRange:function(e){var t=r()({},e,{remove:!1});return e.prepend&&(t.at=0),this.set({beginsAt:e.start,endsAt:e.end}),this.fetch(t).promise()},
repopulateRange:function(){var e=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("populatedRange")),t=e.start,n=e.end;return this.set({beginsAt:t,endsAt:n}),this.abortPendingPopulate(),this.fetch()},updatePopulatedRange:function(){var e=this.get("beginsAt"),t=this.get("endsAt"),n=this.get("populatedRange"),i=n.start,r=n.end,a=void 0,o=void 0;this.getCollection().length?i?(a=Math.min(i,null==e?1/0:e),o=Math.max(r,null==t?-1/0:t)):(a=e||i,o=t||r):(a=0,o=0),
this.set("populatedRange",{start:a,end:o,size:o-a}),this.set("isPopulated",o-a>0)}});t.a=s},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"ProviderTagModel",context:["server","provider"],idAttribute:"id",rootPropertyName:"Directory",syncedAttrs:{id:i.a.integer,filter:i.a.string,tag:i.a.string,tagType:i.a.integer,tagValue:i.a.integer,thumb:i.a.string,channelCallSign:i.a.string,channelIdentifier:i.a.string}});t.a=a},function(e,t,n){"use strict";function i(){
return Object(y.createSelector)(Object(I.a)(),C.a,function(e,t){return e&&e.metadataItems?e.metadataItems.map(function(e){return t[e]}):[]})}function r(){return Object(y.createSelector)(function(e){return e.ui.channelGridPage},function(e,t){return t.activeFilters},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.channelsList,i=e.isChannelsListPopulated,r=e.isChannelsListPending,a=e.channelsListError;return!i||r||a?[]:t.find(function(e){return e.key===E
})?n.filter(function(e){return!!e.tagValue}):n})}function a(){return Object(y.createSelector)(function(e){return e.ui.channelGridPage},i(),Object(S.a)(),Object(M.a)(),Object(D.a)(),r(),function(e,t,n,i,r,a){return{columnTimes:e.columnTimes,metadataListEntityID:e.metadataList,providerIdentifier:i.identifier,isRefreshing:!!r,channels:Object(w.a)(e.columnTimes,t,a),containerKey:n}})}var o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),
n(0)),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(250)),I=n(159),S=n(2922),M=n(79),D=n(304),C=n(110),O=n(266),j=n(137),P=n(148),w=n(2923),T=n(2924),E="hdonly",x={dispatchInitMetadataList:O.c,dispatchResetStartTime:O.h,dispatchResetMetadataList:j.j,dispatchPopulateChannelPrograms:O.f,dispatchChangeQuickSearchSettings:P.changeQuickSearchSettings},N=function(e){function t(){return c()(this,t),d()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidMount=function(){
this.props.containerKey&&this._populate(),this.props.providerIdentifier&&this._setSearchProviderIdentifier(this.props.providerIdentifier)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.providerIdentifier,i=t.containerKey,r=t.columnTimes,a=t.isRefreshing;i&&i!==e.containerKey||a!==e.isRefreshing?this._populate():Object(b.a)(r,e.columnTimes)||this.props.dispatchPopulateChannelPrograms(),n&&n!==e.providerIdentifier&&this._setSearchProviderIdentifier(n)},
t.prototype.componentWillUnmount=function(){var e=this.props.metadataListEntityID;this.props.dispatchResetMetadataList({metadataListEntityID:e}),this._setSearchProviderIdentifier(null)},t.prototype._populate=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.containerKey,r=e.dispatchInitMetadataList,a=e.dispatchResetStartTime,o=e.dispatchPopulateChannelPrograms;a(),r({containerKey:i,serverEntityID:t,providerEntityID:n}),o()},
t.prototype._setSearchProviderIdentifier=function(e){var t=this.props;(0,t.dispatchChangeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,providerIdentifier:e,sectionID:null})},t.prototype.render=function(){var e=this.props,t=(e.dispatchInitMetadataList,s()(e,["dispatchInitMetadataList"]));return g.a.createElement(T.a,t)},t}(v.Component);t.a=Object(m.b)(a,x)(N)},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(function(e,t){
return t.activeFilters},Object(c.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];if(!t)return null;var n="/"+t.identifier+"/grid",i=[Object(l.r)(l.f).id,Object(l.r)(l.e).id].join(","),r=e.reduce(function(e,t){return t.key===u?e.push(a()({},t,{key:"channel.value"})):e.push(t),e},[]),o={type:i,filters:r,sort:"beginsAt"};return Object(s.a)(n,o)})}t.a=i;var r=n(7),a=n.n(r),o=n(6),s=(n.n(o),n(1153)),l=n(28),c=n(79),u="hdonly"},function(e,t,n){
"use strict";function i(e,t,n){var i=t,r=[];e.sort(function(e,t){return e.beginsAt>t.beginsAt?1:e.beginsAt<t.beginsAt?-1:0});for(var a=0;a<e.length;a++){var o=e[a];if(o.beginsAt>i){var s={beginsAt:i,endsAt:o.beginsAt};r.push(s)}r.push(o),i=o.endsAt}if(i<n){var l={beginsAt:i,endsAt:n};r.push(l)}return r}function r(e){return e?e.split(" ")[1]:""}function a(e,t,n){return e.reduce(function(e,i){return i&&i.Media?(i.Media.forEach(function(a,o){
var s=a.channelIdentifier,l=a.channelThumb,c=a.channelTitle,u=a.channelCallSign,d=a.beginsAt,p=a.endsAt;if(e[s]||(e[s]={identifier:s,thumb:l,title:c,callSign:u||r(c),programs:[]}),d<n&&p>t){var h={beginsAt:Math.max(d,t),endsAt:Math.min(p,n),metadataItemEntityID:i.entityID,mediaIndex:o};e[s].programs.push(h)}}),e):e},{})}function o(e,t,n){return c()(e).map(function(r){var a=e[r];return a.programs=i(a.programs,t,n),a}).sort(function(e,t){return Object(u.a)(e.identifier,t.identifier)})}
function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=e[0],r=e[e.length-1],s=a(t,i,r);return n.forEach(function(e){s[e.channelIdentifier]||(s[e.channelIdentifier]={identifier:e.channelIdentifier,thumb:e.thumb,title:e.tag,callSign:e.channelCallSign,programs:[]})}),o(s,i,r)}t.a=s;var l=n(50),c=n.n(l),u=n(530)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.selectedDirectory,o=e.activeFilters,s=e.activeFilterLabel,h=e.channels;return a()(u.a,{metricsPage:l.c,scrollDirection:c.NONE},void 0,a()(d.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:r,activeFilters:o,activeFilterLabel:s,totalSize:h.length}),a()(p.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,channels:h}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(115),
n(35)),c=n(101),u=n(187),d=n(2925),p=n(2937);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e){return e.ui.channelGridPage},Object(o.a)(),s.a,Object(l.a)(),Object(c.a)(),Object(u.a)(),function(e,t,n,i,r,a){return{server:t,provider:n,directories:i,datePickerTitle:Object(d.a)(1e3*e.startTime),showEPGActivity:!!r,selectedFilterTitle:a}})}var r=n(11),a=n(6),o=(n.n(a),n(42)),s=n(37),l=n(303),c=n(304),u=n(2926),d=n(1187),p=n(2927);t.a=Object(r.b)(i)(p.a)
},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.activeFilters},function(e,t){return t.activeFilterLabel},Object(o.a)(),function(e,t,n){if(!e||!e.length)return Object(a.default)("All Channels");if(e&&1===e.length){var i=e[0],r=n.find(function(e){return e.filter===i.key});if(r)return r.title}return t||Object(a.default)("Filtered")})}t.a=i;var r=n(6),a=(n.n(r),n(4)),o=n(1186)},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(29)),f=n(54),v=(n(115),n(95),n(87),n(188)),g=n(189),m=n(766),y=n(204),b=n(379),I=n(205),S=n(1137),M=n(446),D=n(2928),C=n(2935),O=r()(y.a,{}),j=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onDirectoriesMenuButtonPress=function(e){r.setState({isDirectoriesMenuOpen:!r.state.isDirectoriesMenuOpen})},r.onDirectoriesMenuClose=function(){r.setState({
isDirectoriesMenuOpen:!1})},r.onDatePickerMenuButtonPress=function(e){r.setState({isDatePickerMenuOpen:!r.state.isDatePickerMenuOpen})},r.onDatePickerMenuClose=function(){r.setState({isDatePickerMenuOpen:!1})},r.onFilterMenuButtonPress=function(e){r.setState({isFilterMenuOpen:!r.state.isFilterMenuOpen})},r.onFilterMenuClose=function(){r.setState({isFilterMenuOpen:!1})},r.state={isDirectoriesMenuOpen:!1,isDatePickerMenuOpen:!1,isFilterMenuOpen:!1},r._directoriesMenuButtonID=Object(f.a)(),
r._datePickerMenuButtonID=Object(f.a)(),r._filterMenuButtonID=Object(f.a)(),r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(h.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.server,n=e.provider,i=e.serverEntityID,a=e.providerEntityID,o=e.directories,s=e.selectedDirectory,l=e.selectedFilterTitle,c=e.datePickerTitle,u=e.showEPGActivity,d=e.activeFilters,p=e.activeFilterLabel,h=e.totalSize,f=this.state,y=f.isDirectoriesMenuOpen,j=f.isDatePickerMenuOpen,P=f.isFilterMenuOpen;return r()(v.a,{},void 0,r()(g.a,{},void 0,r()(I.a,{id:this._directoriesMenuButtonID,"data-qa-id":"directoriesMenuButton",title:s.title,hasMenu:o.length>1,isMenuOpen:y,
isSelected:!0,onPress:this.onDirectoriesMenuButtonPress}),r()(M.a,{target:this._directoriesMenuButtonID,isOpen:y,server:t,provider:n,directories:o,selectedDirectory:s,onMenuClose:this.onDirectoriesMenuClose}),r()(I.a,{id:this._datePickerMenuButtonID,title:c,hasMenu:!0,isMenuOpen:j,onPress:this.onDatePickerMenuButtonPress}),r()(D.a,{target:this._datePickerMenuButtonID,isOpen:j,onMenuClose:this.onDatePickerMenuClose}),r()(I.a,{id:this._filterMenuButtonID,title:l,hasMenu:!0,isMenuOpen:P,
onPress:this.onFilterMenuButtonPress}),r()(C.a,{target:this._filterMenuButtonID,isOpen:P,activeFilters:d,activeFilterLabel:p,onMenuClose:this.onFilterMenuClose}),r()(b.a,{},void 0,h)),u&&r()(m.a,{},void 0,r()(S.a,{serverEntityID:i,providerEntityID:a})),u&&O)},t}(p.Component);t.a=j},function(e,t,n){"use strict";function i(e){for(var t=[],n=l.a.unix(e),i=0;i<p;i++){var r=l()().add(i,"days"),a=Object(u.a)(r),o=r.date()===n.date();t.push({title:a,value:r.unix(),isSelected:o})}return t}function r(){
return Object(o.createSelector)(function(e){return e.ui.channelGridPage},function(e){return{dateOptions:i(e.startTime)}})}var a=n(11),o=n(6),s=(n.n(o),n(41)),l=n.n(s),c=n(266),u=n(1187),d=n(2929),p=8,h={dispatchSetStartTime:c.i};t.a=Object(a.b)(r,h)(d.a)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(420)),f=n(24),v=n(75),g=n(2930),m=n(2931),y=n(2934),b=n.n(y),I={scrollDirection:f.d.NONE,
className:b.a.listContainer},S=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onSelectDate=function(e){r.setState({showTimeOptions:!0,activeDateOption:e})},r.onSelectNow=function(){var e=Math.floor(Date.now()/1e3);r.onSelectTime({value:e})},r.onSelectTime=function(e){r.setState({showTimeOptions:!1}),r.props.dispatchSetStartTime(e.value),r.props.onMenuClose()},r.onHideOptions=function(e){r.setState({showTimeOptions:!1})},r.state={showTimeOptions:!1,
activeDateOption:n.dateOptions.find(function(e){return e.isSelected})},r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.target,n=e.isOpen,i=e.dateOptions,a=e.onMenuClose,o=this.state,s=o.showTimeOptions,l=o.activeDateOption,c=(b.a.list||"")+" "+(!!s&&b.a.showTimeOptions||""||"");return r()(v.a,{target:t,isOpen:n,size:f.e.MEDIUM,scrollerProps:I,onMenuClose:Object(h.a)(this.onHideOptions,a)},void 0,r()(g.a,{className:c,dateOptions:i,onSelectDate:this.onSelectDate,
onSelectNow:this.onSelectNow}),r()(m.a,{className:c,selectedDateOption:l,onDeselectDateOption:this.onHideOptions,onSelectTime:this.onSelectTime}))},t}(p.Component);t.a=S},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.dateOptions,i=e.onSelectDate,r=e.onSelectNow;return a()(l.a,{className:t,autoScroll:!0},void 0,a()(d.a,{onPress:r},void 0,Object(u.default)("Now")),h,n.map(function(e,t){return a()(p.a,{option:e,isSelected:e.isSelected,onPress:i},t,e.title)}))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(80)),c=n(289),u=n(4),d=n(108),p=n(1188),h=a()(c.a,{});t.a=i},function(e,t,n){"use strict";function i(e,t){return l()(e).hour(t).startOf("hour")}function r(){var e=[{startHour:0,title:Object(c.default)("Midnight")},{startHour:4,title:Object(c.default)("Early Morning")},{startHour:8,title:Object(c.default)("Morning")},{startHour:12,title:Object(c.default)("Afternoon")},{startHour:17,title:Object(c.default)("Primetime")},{startHour:22,
title:Object(c.default)("Late Night")}];return Object(o.createSelector)(function(e){return e.ui.channelGridPage},function(e,t){return t.selectedDateOption},function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n)return{timeOptions:[]};var r=l.a.unix(t.startTime),a=l.a.unix(n.value),o=l()();return{timeOptions:e.map(function(t,n){var s=e[n+1],l=i(a,t.startHour),u=i(a,s?s.startHour:24),d=o.isBefore(u),p=r.diff(l)>=0&&r.diff(u)<0,h=l.isBefore(o)?o.unix():l.unix();return{
title:o.diff(l)>=0&&o.diff(u)<0?Object(c.default)("Now ({timeSlotTitle})",{timeSlotTitle:t.title}):t.title,value:h,isEnabled:d,isSelected:p}})}})}var a=n(11),o=n(6),s=(n.n(o),n(41)),l=n.n(s),c=n(4),u=n(2932);t.a=Object(a.b)(r)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.timeOptions,i=e.selectedDateOption,r=e.onDeselectDateOption,o=e.onSelectTime;return a()("div",{className:t},void 0,a()("div",{className:f.a.header},void 0,a()(u.a,{onPress:r},void 0,a()(c.a,{
className:f.a.backIcon,name:"plex-icon-hub-prev-560","aria-label":Object(l.default)("Back")})),a()("span",{className:f.a.headerText},void 0,i.title)),v,n.map(function(e,t){return a()(p.a,{option:e,isDisabled:!e.isEnabled,isSelected:e.isSelected,onPress:o},t,e.title)}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(26),u=n(22),d=n(289),p=n(1188),h=n(2933),f=n.n(h),v=a()(d.a,{});t.a=i},function(e,t){e.exports={header:"DatePickerTimeList-header-2g8yB",
backIcon:"DatePickerTimeList-backIcon-1dZa8",headerText:"DatePickerTimeList-headerText-3xMhW"}},function(e,t){e.exports={listContainer:"DatePickerMenu-listContainer-2IYmJ",list:"DatePickerMenu-list-3YRaA",showTimeOptions:"DatePickerMenu-showTimeOptions-2OWJ9"}},function(e,t,n){"use strict";var i=n(11),r=n(6),a=(n.n(r),n(266)),o=n(1186),s=n(2936),l=Object(r.createStructuredSelector)({filters:Object(o.a)()}),c={dispatchSetStartTime:a.i};t.a=Object(i.b)(l,c)(s.a)},function(e,t,n){"use strict"
;function i(e){var t=e.filters,n=e.target,i=e.isOpen,r=e.activeFilters,o=e.activeFilterLabel,s=e.onMenuClose;return a()(l.a,{target:n,isOpen:i,size:c.e.LARGE,onMenuClose:s},void 0,a()(u.a,{activeFilters:r,activeFilterLabel:o,showSpinner:!1,showCustomFilter:!1,filters:t}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(75)),c=(n(115),n(24)),u=n(1165);t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(11)),f=n(6),v=(n.n(f),n(250)),g=n(266),m=n(2938),y=Object(f.createSelector)(function(e){return e.ui.channelGridPage},function(e){return{columnTimes:e.columnTimes}}),b={dispatchSetViewportSize:g.j,dispatchResetStartTime:g.h},I=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r._updateGrid=function(){(0,r.props.dispatchResetStartTime)(),r._resetTimeout()},r.onMeasure=function(e){var t=r.state,n=t.isMeasured,i=t.measuredSize;n&&Object(v.a)(i,e)||r.setState({
isMeasured:!0,measuredSize:e},function(){r.setViewportSize(e)})},r._updateTimeout=null,r.state={isMeasured:!1,measuredSize:null},r}return u()(t,e),t.prototype.componentDidMount=function(){this._resetTimeout()},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.metadataListEntityID,i=t.columnTimes;n===e.metadataListEntityID&&Object(v.a)(i,e.columnTimes)||this._resetTimeout()},t.prototype.componentWillUnmount=function(){this._updateTimeout&&clearTimeout(this._updateTimeout)},
t.prototype._resetTimeout=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.columnTimes;if(t.length){this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=null);var n=Math.floor(Date.now()/1e3),i=7200;if(t[0]<=n&&t[1]>=n){i=t.find(function(e){return n<e})-n}this._updateTimeout=setTimeout(this._updateGrid,1e3*i)}},t.prototype.setViewportSize=function(e){(0,this.props.dispatchSetViewportSize)(e),this._resetTimeout()},
t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,a=e.channels;return r()(m.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,channels:a,onMeasure:this.onMeasure})},t}(p.Component);t.a=Object(h.b)(y,b)(I)},function(e,t,n){"use strict";function i(e){var t=e.metadataListEntityID,n=e.serverEntityID,i=e.providerEntityID,r=e.channels,o=e.onMeasure;return a()(l.a,{className:d.a.measureContainer,onMeasure:o},void 0,a()(c.a,{
className:d.a.gridContent,metadataListEntityID:t,serverEntityID:n,providerEntityID:i,channels:r}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(72)),c=n(2939),u=n(2973),d=n.n(u);t.a=i},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(function(e){return e.ui.channelGridPage},Object(c.a)(),function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isPending,i=void 0===n||n,r=t.isPopulated,o=void 0!==r&&r,s=t.metadataItems,l=void 0===s?[]:s,c=t.error,u=!!i&&!o&&!c,d=!!c,p=o&&!i&&!c&&0===l.length;return a()({},e,{isPending:i,isEmpty:p,showSpinner:u,showError:d})})}var r=n(7),a=n.n(r),o=n(11),s=n(6),l=(n.n(s),n(266)),c=n(159),u=n(2940),d={dispatchUpdateAiredProgress:l.k};t.a=Object(o.b)(i,d)(u.a)},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(250)),f=n(101),v=n(29),g=n(4),m=n(72),y=n(93),b=n(39),I=n(259),S=n(552),M=n(182),D=n(262),C=n(783),O=n(45),j=(n.n(O),n(765)),P=n(2941),w=n(2945),T=n(2964),E=n(2972),x=n.n(E),N=parseInt(O.channelGridRowHeight,10)-1,A=140,L=function(e){function t(n,i){o()(this,t);var a=l()(this,e.call(this,n,i));return a.getCellHeights=function(){
var e=a.state,t=e.selectedMediaItemRow,n=e.selectedMediaItemHeight;return a.props.channels.map(function(e,i){var r=N;return i===t&&(r+=n||A),r})},a._updateProgress=function(){a.props.dispatchUpdateAiredProgress(),a._resetUpdateTimeout()},a.onMetadataItemPress=function(e,t,n){a.state.selectedMetadataItemEntityID!==e||a.state.selectedMediaIndex!==t?a.setState({selectedMetadataItemEntityID:e,selectedMediaIndex:t,selectedMediaItemRow:n,selectedMediaItemHeight:A}):a.setState({
selectedMetadataItemEntityID:null,selectedMediaIndex:null,selectedMediaItemRow:-1,selectedMediaItemHeight:0})},a.onDetailRowMeasure=function(e){var t=e.height;a.setState({selectedMediaItemHeight:t})},a.renderCell=function(e){var t=e.cellIndex,n=e.cellX,i=e.cellY,o=e.cellWidth,s=e.cellHeight,l=a.props,c=l.serverEntityID,u=l.providerEntityID,d=l.columnTimes,p=l.columnWidth,h=l.channels,f=l.isPending,v=a.state,g=v.selectedMetadataItemEntityID,b=v.selectedMediaIndex,I=v.selectedMediaItemRow,S=h[t]
;return S?r()(y.a,{className:x.a.gridRowCell,cellX:n,cellY:i,cellWidth:o,cellHeight:s},t,r()(w.a,{className:x.a.gridRow,channel:S,serverEntityID:c,providerEntityID:u,selectedMetadataItemEntityID:g,selectedMediaIndex:b,columnTimes:d,rowIndex:t,columnWidth:p,isFetching:f,onMetadataItemPress:a.onMetadataItemPress}),t===I&&r()(m.a,{onMeasure:a.onDetailRowMeasure},void 0,r()(T.a,{serverEntityID:c,providerEntityID:u,metadataItemEntityID:g,mediaIndex:b}))):null},a._updateTimeout=null,a.state={
selectedMetadataItemEntityID:null,selectedMediaIndex:null,selectedMediaItemRow:-1,selectedMediaItemHeight:0,progress:0},a}return u()(t,e),t.prototype.componentDidMount=function(){this._updateProgress()},t.prototype.shouldComponentUpdate=function(e,t){return Object(v.a)(this,e,t)},t.prototype.componentDidUpdate=function(e){Object(h.a)(this.props.columnTimes,e.columnTimes)||this._updateProgress()},t.prototype._resetUpdateTimeout=function(){this._updateTimeout&&clearTimeout(this._updateTimeout)
;var e=6e4-Date.now()%6e4;this._updateTimeout=setTimeout(this._updateProgress,e)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.serverEntityID,i=e.providerEntityID,a=e.viewportWidth,o=e.viewportHeight,s=e.columnTimes,l=e.channels,c=e.isEmpty,u=e.showSpinner,d=e.showError;return r()("div",{className:t},void 0,!u&&!d&&!c&&r()(P.a,{className:x.a.timeline,columnTimes:s}),d&&r()(D.a,{className:x.a.innerEmptyPage,title:Object(g.default)("There was an error loading channels")
}),u&&r()(M.a,{className:x.a.innerEmptyPage},void 0,r()(b.a,{label:Object(g.default)("Loading channels")})),!u&&!d&&c&&r()(j.a,{serverEntityID:n,providerEntityID:i}),!u&&!d&&!c&&r()(I.a,{className:x.a.gridContent,scrollerClassName:x.a.gridInnerContent,keyPropName:"identifier",items:l,scrollDirection:f.VERTICAL,viewportWidth:a,viewportHeight:o,size:l.length,layout:Object(C.a)({getCellHeights:this.getCellHeights}),cellRenderer:this.renderCell,onMeasure:this.onScrollerMeasure},void 0,r()(S.a,{
className:x.a.attribution,providerEntityID:i})))},t}(p.Component);L.defaultProps={className:x.a.gridContainer,columnTimes:[]},t.a=L},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e){return e.ui.channelGridPage},s.a,function(e,t){var n=t.timeFormat,i=e.startTime,r=e.columnWidth,a=new Date-u,s=new Date(1e3*i),l=s>a;return Object(o.a)(i)&&(s=null),{timeFormat:n,startDate:s,columnWidth:r,enablePrevious:l,enableNext:!0}})}var r=n(11),a=n(6),o=(n.n(a),
n(359)),s=n(100),l=n(266),c=n(2942),u=108e5,d={dispatchNext:l.e,dispatchPrevious:l.d};t.a=Object(r.b)(i,d)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.enablePrevious,i=e.enableNext,r=e.startDate,o=e.columnTimes,s=e.timeFormat,p=e.columnWidth,f=e.dispatchPrevious,v=e.dispatchNext;return a()("div",{className:t},void 0,a()("div",{className:h.a.dayContainer},void 0,r&&Object(u.default)(r,"dddd, MMM DD")),a()("div",{className:h.a.labelContainer},void 0,o.map(function(e,t){
return a()("div",{className:h.a.label,style:{width:p+"px"}},t,Object(c.a)(1e3*e,s))})),a()("div",{className:h.a.navigationButtons},void 0,a()(d.a,{className:h.a.navigationButton,icon:"plex-icon-hub-prev-560",title:Object(l.default)("Previous"),isDisabled:!n,onPress:f}),a()(d.a,{className:h.a.navigationButton,icon:"plex-icon-hub-next-560",title:Object(l.default)("Next"),isDisabled:!i,onPress:v})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(4)),c=n(2943),u=n(254),d=n(352),p=n(2944),h=n.n(p);i.defaultProps={className:h.a.container},t.a=i},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HH:mm:ss";return e?a()(e).format(t):""}var r=n(41),a=n.n(r);t.a=i},function(e,t){e.exports={container:"ChannelsGridTimeline-container-3dKF2",dayContainer:"ChannelsGridTimeline-dayContainer-22Vll",labelContainer:"ChannelsGridTimeline-labelContainer-3JCH3",
label:"ChannelsGridTimeline-label-368pi",navigationButtons:"ChannelsGridTimeline-navigationButtons-3GtRv",navigationButton:"ChannelsGridTimeline-navigationButton-2oRTO"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(2946)),f=n(2949),v=n(2952),g=n(2963),m=n.n(g),y=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onMouseEnter=function(){r.setState({isHovered:!0})},
r.onMouseLeave=function(){r.setState({isHovered:!1})},r.state={isHovered:!1},r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.serverEntityID,i=e.providerEntityID,a=e.selectedMetadataItemEntityID,o=e.selectedMediaIndex,s=e.channel,l=e.rowIndex,c=e.columnWidth,u=e.columnTimes,d=e.isFetching,p=e.onMetadataItemPress,g=this.state.isHovered,y=u[0],b=u[u.length-1],I=u[1]-u[0];return r()("div",{className:t,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave
},void 0,r()(f.a,{className:m.a.title,serverEntityID:n,providerEntityID:i,channel:s,showPlayButton:g}),r()("div",{className:m.a.programsContainer},void 0,r()(h.a,{className:m.a.progress}),s.programs.map(function(e,t){var s=Math.max(e.beginsAt,y),u=Math.min(e.endsAt,b),h=u-s,f=h/I*c,g=a===e.metadataItemEntityID&&o===e.mediaIndex;return r()(v.a,{width:f,className:m.a.program,beginsAt:e.beginsAt,endsAt:e.endsAt,metadataItemEntityID:e.metadataItemEntityID,mediaIndex:e.mediaIndex,serverEntityID:n,
providerEntityID:i,rowIndex:l,isSelected:g,showLoader:d&&!e.metadataItemEntityID,onPress:p},t)})))},t}(p.Component);y.defaultProps={className:m.a.container},t.a=y},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e){return e.ui.channelGridPage},function(e,t){var n=e.airedProgress,i=e.columnWidth;return{width:n/100*e.visibleColumns*i}})}var r=n(11),a=n(6),o=(n.n(a),n(2947));t.a=Object(r.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.width,i=e.isActive,r={width:n+"px"};return a()("div",{className:t},void 0,a()("div",{className:(c.a.fill||"")+" "+(n>0&&c.a.indicator||"")+" "+(i&&c.a.active||""||""),style:r}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2948)),c=n.n(l);t.a=i},function(e,t){e.exports={fill:"ChannelsGridProgress-fill-hY0DO",indicator:"ChannelsGridProgress-indicator-2xDxP",active:"ChannelsGridProgress-active-1lw2k"}},function(e,t,n){"use strict";function i(e,t){
var n=t.serverEntityID,i=t.providerEntityID,r=t.channel;return{dispatchStartLiveTVPlayback:function(){e(Object(o.l)({serverEntityID:n,providerEntityID:i,options:{type:a.d,identifier:r.identifier}}))}}}var r=n(11),a=n(59),o=n(155),s=n(2950);t.a=Object(r.b)(null,i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.channel,i=e.showPlayButton,r=e.dispatchStartLiveTVPlayback,o=n.thumb?a()("img",{src:n.thumb,className:d.a.thumbnail}):n.callSign,s=void 0;return s=i?a()(c.a,{
className:d.a.playButton,title:Object(l.default)("Play this channel"),tabIndex:"-1",onPress:r}):a()("span",{className:d.a.number},void 0,n.identifier),a()("div",{className:t},void 0,a()("div",{className:d.a.numberContainer},void 0,s),a()("div",{className:d.a.thumbnailContainer},void 0,o))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(173),u=n(2951),d=n.n(u);i.defaultProps={className:d.a.container},t.a=i},function(e,t){e.exports={container:"ChannelsGridRowTitle-container-2k8lv",
numberContainer:"ChannelsGridRowTitle-numberContainer-1NXm9",thumbnailContainer:"ChannelsGridRowTitle-thumbnailContainer-3ThS3",thumbnail:"ChannelsGridRowTitle-thumbnail-1At_s",number:"ChannelsGridRowTitle-number-2yURd",playButton:"ChannelsGridRowTitle-playButton-1Dp3V PlayButton-playButton-3WX8X"}},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(11),o=n(6),s=(n.n(o),n(76)),l=n(21),c=n(567),u=n(2953),d=Object(o.createSelector)(Object(l.a)(),function(){
return Object(o.createSelector)(function(e,t){return t.mediaIndex},Object(l.a)(),function(e,t){return t?t.Media[e]:null})}(),function(){return Object(o.createSelector)(function(e,t){return t.beginsAt},function(e,t){return t.endsAt},function(e,t){var n=Math.floor(Date.now()/1e3);return{isOnAir:n>=e&&n<=t,isFinishedAiring:n>=t}})}(),Object(c.a)(s.b.SUBSCRIBE),function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=arguments[2],i=arguments[3],a=e.type,o=e.grandparentTitle,s=e.title,l=e.subscriptionID,c=e.subscriptionType,u=e.grandparentSubscriptionID,d=e.grandparentSubscriptionType,p=e.index,h=e.originallyAvailableAt,f=!!t&&t.premiere,v=null!=l||null!=u,g=null==p&&!!h,m=!0;if(g){var y=new Date,b=new Date(h);m=y.getDate()!==b.getUTCDate()||y.getMonth()!==b.getUTCMonth()||y.getFullYear()!==b.getUTCFullYear()}return r()({},n,{
type:a,title:o||s,subscriptionType:c||d,showEpisodeTitle:m,isSubscribed:v,premiere:f,canRecord:!!i})});t.a=Object(a.b)(d)(u.a)},function(e,t,n){"use strict";function i(e,t){var n=null;switch(e){case g.f:n=I.a;break;case g.k:case g.e:t&&(n=S.a)}return n}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),
n(22)),v=n(4),g=n(28),m=n(438),y=n(376),b=n(784),I=n(294),S=n(712),M=n(1189),D=n(2960),C=n(2962),O=n.n(C),j=a()(D.a,{}),P=a()(D.a,{}),w=function(e){function t(){var n,i,r;s()(this,t);for(var a=arguments.length,o=Array(a),l=0;l<a;l++)o[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(o))),i.onCellPress=function(){var e=i.props,t=e.metadataItemEntityID,n=e.mediaIndex,r=e.rowIndex;(0,e.onPress)(t,n,r)},r=n,c()(i,r)}return d()(t,e),t.prototype.render=function(){
var e=this.props,t=e.className,n=e.metadataItemEntityID,r=e.serverEntityID,o=e.providerEntityID,s=e.mediaIndex,l=e.width,c=e.type,u=e.subscriptionType,d=e.title,p=e.premiere,h=e.canRecord,g=e.showEpisodeTitle,I=e.showLoader,S=e.isOnAir,D=e.isFinishedAiring,C=e.isSelected,w=e.isSubscribed;if(!n)return a()("div",{className:(t||"")+" "+(S&&O.a.onAir||"")+" "+(D&&O.a.finishedAiring||""||""),style:{width:l+"px"}},void 0,I&&a()("div",{className:O.a.placeholderContainer},void 0,j,P),!I&&a()("div",{
className:O.a.content},void 0,Object(v.default)("Unknown Airing")));var T=i(c,g);return a()("div",{className:(t||"")+" "+(S&&O.a.onAir||"")+" "+(C&&O.a.selected||"")+" "+((S||h)&&O.a.hoverable||"")+" "+(D&&O.a.finishedAiring||""||""),style:{width:l+"px"}},void 0,a()("div",{className:O.a.content},void 0,a()(f.a,{className:O.a.underlay,onPress:this.onCellPress}),a()("div",{},void 0,d),a()("div",{className:O.a.actionsContainer},void 0,a()("div",{className:O.a.subTitleContainer},void 0,T&&a()(T,{
className:O.a.subTitle,serverEntityID:r,providerEntityID:o,metadataItemEntityID:n}),p&&a()(b.a,{className:O.a.premiereBadge}),w&&a()(y.a,{className:O.a.subscriptionBadge},void 0,a()(m.a,{type:u}))),a()(M.a,{className:O.a.actions,isCompact:!0,serverEntityID:r,providerEntityID:o,metadataItemEntityID:n,mediaIndex:s,showRecord:h,showPlay:S}))))},t}(h.Component);w.defaultProps={className:O.a.container},t.a=w},function(e,t){e.exports={badge:"PremiereAiringBadge-badge-hAmdn"}},function(e,t,n){
"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(231)),f=n(2956),v=n(2958),g=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onRecordPress=function(e){r.setState({isSubscribeModalOpen:!0})},r.onSubscribeModalClose=function(){r.setState({isSubscribeModalOpen:!1})},r.state={isSubscribeModalOpen:!1},r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.className,n=e.type,i=e.title,a=e.subscriptionType,o=e.isCompact,s=e.isSubscribed,l=e.showPlay,c=e.showRecord,u=e.serverEntityID,d=e.providerEntityID,p=e.metadataItemEntityID,g=e.dispatchStartLiveTVPlayback,m=this.state.isSubscribeModalOpen,y=o?f.a:v.a;return r()("span",{className:t},void 0,r()(y,{title:i,subscriptionType:a,isSubscribed:s,showPlay:l,showRecord:c,onPlayPress:g,onRecordPress:this.onRecordPress}),r()(h.a,{serverEntityID:u,providerEntityID:d,
metadataItemEntityID:p,isOpen:m,subscriptionType:n,onModalClose:this.onSubscribeModalClose}))},t}(p.Component);t.a=g},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.showPlay,i=e.showRecord,r=e.onPlayPress,o=e.onRecordPress;return a()("div",{className:d.a.actions},void 0,n&&a()(l.a,{className:d.a.playButton,iconClassName:d.a.playIcon,title:t,tabIndex:"-1",onPress:r}),i&&a()(c.a,{className:d.a.recordButton,title:t,tabIndex:"-1",onPress:o}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(173)),c=n(524),u=n(2957),d=n.n(u);t.a=i},function(e,t){e.exports={actions:"ChannelsGridMetadataCellButtons-actions-250Km",button:"ChannelsGridMetadataCellButtons-button-9hRMc",playButton:"ChannelsGridMetadataCellButtons-playButton-3vgI5 PlayButton-playButton-3WX8X ChannelsGridMetadataCellButtons-button-9hRMc",playIcon:"ChannelsGridMetadataCellButtons-playIcon-4UZyL PlayButton-playIcon-dt3sk",
recordButton:"ChannelsGridMetadataCellButtons-recordButton-1bSu6 RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X RecordIcon-recordIconContainer-1PXGA ChannelsGridMetadataCellButtons-button-9hRMc"}},function(e,t,n){"use strict";function i(e){var t=e.subscriptionType,n=e.isSubscribed,i=e.showPlay,r=e.showRecord,o=e.onPlayPress,s=e.onRecordPress,f=n?Object(l.default)("Recording Scheduled"):Object(l.default)("Record");return a()("span",{},void 0,i&&a()(c.a,{className:v.a.playButton,
kind:u.DARK,size:d.SMALL,onPress:o},void 0,a()(p.a,{className:v.a.icon,name:"plex-icon-play-560"}),Object(l.default)("Watch Now")),r&&a()(c.a,{className:v.a.recordButton,kind:u.DARK,size:d.SMALL,onPress:s},void 0,a()(h.a,{className:v.a.icon,type:t}),f))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(47),u=n(65),d=n(61),p=n(26),h=n(438),f=n(2959),v=n.n(f);t.a=i},function(e,t){e.exports={playButton:"ChannelsGridMetadataDetailButtons-playButton-2liy7",
recordButton:"ChannelsGridMetadataDetailButtons-recordButton-17JFU ChannelsGridMetadataDetailButtons-playButton-2liy7",recordingIcon:"ChannelsGridMetadataDetailButtons-recordingIcon-1R0yT",icon:"ChannelsGridMetadataDetailButtons-icon-1-luT"}},function(e,t,n){"use strict";function i(){return y+Math.random()*(m-y)}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),n(45)),v=(n.n(f),
n(2961)),g=n.n(v),m=parseInt(f.channelGridChannelColumnWidth,10),y=.3*m,b=function(e){function t(n,r){s()(this,t);var a=c()(this,e.call(this,n,r));return a.state={placeholderWidth:i()},a}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,i=this.state.placeholderWidth;return a()("div",{className:t,style:{width:i+"px"}},void 0,a()("div",{className:g.a.bar},void 0,n))},t}(h.Component);b.defaultProps={className:g.a.container},t.a=b},function(e,t){e.exports={
container:"ChannelsGridPlaceholder-container-t1lz5",bar:"ChannelsGridPlaceholder-bar-1g_DP",shimmer:"ChannelsGridPlaceholder-shimmer-18AjF"}},function(e,t){e.exports={container:"ChannelsGridMetadataItemCell-container-2NM2z",selected:"ChannelsGridMetadataItemCell-selected-3K64H",hoverable:"ChannelsGridMetadataItemCell-hoverable-Tm-6m",subTitleContainer:"ChannelsGridMetadataItemCell-subTitleContainer-2Izpk",actions:"ChannelsGridMetadataItemCell-actions-3Owae",
onAir:"ChannelsGridMetadataItemCell-onAir-1TBno",finishedAiring:"ChannelsGridMetadataItemCell-finishedAiring-1NTjL",underlay:"ChannelsGridMetadataItemCell-underlay-Qhcti",content:"ChannelsGridMetadataItemCell-content-3-Y3Y",actionsContainer:"ChannelsGridMetadataItemCell-actionsContainer-_6ZyY",subTitle:"ChannelsGridMetadataItemCell-subTitle-iaQsk",premiereBadge:"ChannelsGridMetadataItemCell-premiereBadge-1Qqk6 PremiereAiringBadge-badge-hAmdn",
subscriptionBadge:"ChannelsGridMetadataItemCell-subscriptionBadge-dFSz1",placeholderContainer:"ChannelsGridMetadataItemCell-placeholderContainer-2681u"}},function(e,t){e.exports={container:"ChannelsGridRow-container-2sCkC",title:"ChannelsGridRow-title-3AzG0 ChannelsGridRowTitle-container-2k8lv",programsContainer:"ChannelsGridRow-programsContainer-TF5JS",program:"ChannelsGridRow-program-1x1gR ChannelsGridMetadataItemCell-container-2NM2z",progress:"ChannelsGridRow-progress-2ZqEd"}
},function(e,t,n){"use strict";var i=n(11),r=n(6),a=(n.n(r),n(76)),o=n(21),s=n(567),l=n(2965),c=n(2966),u=Object(r.createSelector)(function(e,t){return t.mediaIndex},Object(o.a)(),Object(l.a)(),Object(s.a)(a.b.SUBSCRIBE),function(e,t,n,i){var r=t.type,a=t.summary,o=t.grandparentThumb,s=t.thumb,l=t.contentRating,c=t.Media[e],u=c.beginsAt,d=c.endsAt,p=c.channelTitle;return{type:r,summary:a,thumb:o||s,contentRating:l,beginsAt:u,endsAt:d,channel:p,showPlay:n,showRecord:!!i}});t.a=Object(i.b)(u)(c.a)
},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.mediaIndex},Object(a.a)(),o.a,s.a,l.a,function(e,t,n,i,r){var a=Math.floor(Date.now()/1e3),o=t.Media[e];return!!o&&(Object(c.j)(n,i,r,t)&&o.beginsAt<=a&&o.endsAt>a)})}t.a=i;var r=n(6),a=(n.n(r),n(21)),o=n(48),s=n(37),l=n(144),c=n(201)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.metadataItemEntityID,i=e.serverEntityID,r=e.providerEntityID,o=e.mediaIndex,s=e.type,f=e.summary,m=e.thumb,y=e.contentRating,b=e.beginsAt,I=e.endsAt,S=e.channel,M=e.showPlay,D=e.showRecord;return a()("div",{className:t},void 0,a()(c.a,{className:v.a.poster,serverEntityID:i,providerEntityID:r,component:u.a,type:s,width:g,height:Object(l.d)(g,s),url:m}),a()("div",{className:v.a.preplayContainer},void 0,a()(d.a,{type:s,serverEntityID:i,providerEntityID:r,metadataItemEntityID:n
}),a()(p.a,{beginsAt:b,endsAt:I,channel:S,contentRating:y}),a()(h.a,{serverEntityID:i,providerEntityID:r,metadataItemEntityID:n,mediaIndex:o,showPlay:M,showRecord:D}),a()("p",{},void 0,f)))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(121)),c=n(296),u=n(256),d=n(2967),p=n(2969),h=n(1189),f=n(2971),v=n.n(f),g=80;i.defaultProps={className:v.a.container},t.a=i},function(e,t,n){"use strict";function i(e){var t=void 0;switch(e){case c.f:t=[u.a,p.a];break;case c.k:t=[u.a,h.a];break;case c.e:
t=[d.a,h.a];break;default:t=[u.a]}return t}function r(e){var t=e.type,n=e.metadataItemEntityID,r=e.serverEntityID,a=e.providerEntityID,s=i(t);return o()("div",{className:v.a.titleContainer},void 0,s.map(function(e,t){var i=0===t?v.a.primaryTitle:v.a.secondaryTitle;return o()(e,{className:i,metadataItemEntityID:n,serverEntityID:r,providerEntityID:a},t)}))}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(28)),u=n(518),d=n(230),p=n(294),h=n(255),f=n(2968),v=n.n(f);t.a=r},function(e,t){
e.exports={titleContainer:"ChannelsGridDetailRowTitle-titleContainer-2gAFR",primaryTitle:"ChannelsGridDetailRowTitle-primaryTitle-1SX7s",secondaryTitle:"ChannelsGridDetailRowTitle-secondaryTitle-2HfyQ"}},function(e,t,n){"use strict";function i(e,t,n){var i=Math.floor(Date.now()/1e3),r="",a="";if(i>=e&&i<=t)r=Object(c.default)("Now on {channel}",{channel:n}),a=Object(h.a)(t-i);else{var o=Object(d.a)(e,t,{separator:" - "});r=Object(c.default)("{timeRange} on {channel}",{timeRange:o,channel:n}),
a=Object(p.a)(1e3*(t-e))}return{airTime:r,duration:a}}function r(e){var t=e.beginsAt,n=e.endsAt,r=e.channel,a=e.contentRating,s=i(t,n,r),l=s.airTime,c=s.duration;return o()("div",{className:g.a.container},void 0,l,m,c,o()("div",{className:g.a.contentRating},void 0,Object(u.a)(a)))}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(4)),u=n(721),d=n(434),p=n(351),h=n(285),f=n(86),v=n(2970),g=n.n(v),m=o()(f.a,{});t.a=r},function(e,t){e.exports={
container:"ChannelsGridDetailRowAirTime-container-Xxl-I",contentRating:"ChannelsGridDetailRowAirTime-contentRating-3x_JJ"}},function(e,t){e.exports={container:"ChannelsGridDetailRow-container-3CcnP",preplayContainer:"ChannelsGridDetailRow-preplayContainer-2ECfQ",poster:"ChannelsGridDetailRow-poster-3A0Rg PosterCard-card-1rN9g"}},function(e,t){e.exports={gridContainer:"ChannelsGrid-gridContainer-u_bmj",gridRowCell:"ChannelsGrid-gridRowCell-3P8MT ChannelsGrid-gridContainer-u_bmj",
gridRow:"ChannelsGrid-gridRow-2odI0 ChannelsGridRow-container-2sCkC",gridContent:"ChannelsGrid-gridContent-3Vhy_",gridInnerContent:"ChannelsGrid-gridInnerContent-27SAI VirtualListScroller-scroller-37EU_",timeline:"ChannelsGrid-timeline-ctXXx ChannelsGridTimeline-container-3dKF2",innerEmptyPage:"ChannelsGrid-innerEmptyPage-18fOT InnerEmptyPage-innerEmptyPage-1MHKZ EmptyPage-emptyPage-2AM9u",attribution:"ChannelsGrid-attribution-1KnJ7 ProgramGuideAttribution-attribution-3Ca_I"}},function(e,t){
e.exports={measureContainer:"ChannelsGridPageContent-measureContainer-86FCP",gridContent:"ChannelsGridPageContent-gridContent-1qxiR ChannelsGrid-gridContainer-u_bmj"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(251)),f=n(54),v=n(720),g=n.n(v),m=n(284),y=n(1190),b=n(1191),I=n(2977),S=n(2983),M=n(2985),D=n(3013),C=n(3015),O=n(3022),j=n(3032),P=n.n(j),w=Object(h.a)(g.a.menuSpeed),T=r()(C.a,{}),E=function(e){
function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onMenuButtonPress=function(e){r.setState({isMenuOpen:!r.state.isMenuOpen})},r.onMenuClose=function(e){r.setState({isMenuOpen:!1})},r.state={isMenuOpen:!1},r._serverMenuButtonID=Object(f.a)(),r}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()},w))},t.prototype.componentWillUnmount=function(){
this._openTimeoutID&&clearTimeout(this._openTimeoutID)},t.prototype.render=function(){var e=this.props,t=e.primaryServerEntityID,n=e.selectedProviderEntityID,i=e.serverEntityIDs,a=e.providerEntityIDs,o=e.isPlaylistRoute,s=e.canProvisionPersonalCloudServer,l=this.state.isMenuOpen;return r()(m.a,{page:"sidebar",isDelegated:!0},void 0,r()(y.a,{},void 0,n?r()(S.a,{id:this._serverMenuButtonID,providerEntityID:n,isMenuOpen:l,onPress:this.onMenuButtonPress}):r()(I.a,{id:this._serverMenuButtonID,
hasPrimaryServer:!!t,serverEntityID:t,isMenuOpen:l,onPress:this.onMenuButtonPress}),r()(b.a,{},void 0,r()("div",{className:P.a.sidebarContent},void 0,!n&&t&&r()(M.a,{serverEntityID:t,isPlaylistRoute:o}),!n&&!t&&T,n&&r()(D.a,{providerEntityID:n}))),r()(O.a,{target:this._serverMenuButtonID,isOpen:l,canProvisionPersonalCloudServer:s,selectedProviderEntityID:n,serverEntityIDs:i,providerEntityIDs:a,onMenuClose:this.onMenuClose})))},t}(p.Component);t.a=E},function(e,t){e.exports={
sidebarContainer:"SidebarContainer-sidebarContainer-2RAYT"}},function(e,t){e.exports={scroller:"SidebarScroller-scroller-2wp83"}},function(e,t,n){"use strict";function i(){return Object(d.createSelector)(Object(p.a)(),function(e){return o.a.pick(e,"friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isRelayed")})}function r(e){return c.a.createElement(h.a,e)}var a=n(5),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(6),p=(n.n(d),n(42)),h=n(2978);t.a=Object(u.b)(i)(r)
},function(e,t,n){"use strict";function i(e){var t=e.hasPrimaryServer,n=c()(e,["hasPrimaryServer"]);return t?p.a.createElement(a,n):p.a.createElement(r,n)}function r(e){var t=e.id;return s()(v.a,{id:t,primaryTitle:Object(h.default)("Looking for servers..."),isDisabled:!0,isLoading:!0})}function a(e){var t=e.id,n=e.friendlyName,i=e.sourceTitle,r=e.isConnected,a=e.isUnavailable,o=e.isSecure,l=e.isRelayed,c=e.isMenuOpen,u=e.onPress,d=void 0
;return l&&i?d=Object(h.default)("Indirect ({serverName})",{serverName:i}):l?d=Object(h.default)("Indirect"):i&&(d=i),s()(v.a,{id:t,isMenuOpen:c,primaryTitle:n,secondaryTitle:d,onPress:u},void 0,s()(f.a,{className:m.a.icon,isConnected:r,isUnavailable:a,isSecure:o}))}var o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(4),f=n(786),v=n(1192),g=n(2982),m=n.n(g);t.a=i},function(e,t){e.exports={secureIcon:"ServerStatusIcon-secureIcon-itZ54",
alertIcon:"ServerStatusIcon-alertIcon-eSzhd",warningIcon:"ServerStatusIcon-warningIcon-ZSAqi"}},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.id,i=e.isLoading,r=e.isMenuOpen,o=e.isDisabled,s=e.primaryTitle,d=e.secondaryTitle,h=e.children,v=e.spinnerComponent,g=e.onPress;return a()(p.a,{id:n,className:(t||"")+" "+(o&&f.a.isDisabled||""||""),"aria-haspopup":!o,"data-qa-id":"serverMenuButton",isSelected:!0,isDisabled:o,onPress:g},void 0,a()("div",{
className:f.a.sidebarMenuButtonContainer},void 0,a()("span",{className:f.a.sidebarMenuTitle},void 0,a()("span",{className:f.a.sidebarMenuPrimaryTitleContainer},void 0,a()("span",{className:f.a.sidebarMenuPrimaryTitle},void 0,s),!o&&a()(u.a,{direction:r?l.UP:l.DOWN,isSelected:!0})),d&&a()("span",{className:f.a.sidebarMenuSecondaryTitle},void 0,d)),i?a()(v,{size:c.SMALL,className:f.a.sidebarMenuSpinner}):h))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(419)),c=n(61),u=n(506),d=n(494),p=n(22),h=n(2981),f=n.n(h);i.defaultProps={className:f.a.sidebarMenuButton,isMenuOpen:!1,isDisabled:!1,isLoading:!1,spinnerComponent:d.a},t.a=i},function(e,t){e.exports={sidebarMenuButton:"SidebarMenuButton-sidebarMenuButton-khx_P",sidebarMenuButtonContainer:"SidebarMenuButton-sidebarMenuButtonContainer-3c2yQ",sidebarMenuSpinner:"SidebarMenuButton-sidebarMenuSpinner-2cI_m",sidebarMenuTitle:"SidebarMenuButton-sidebarMenuTitle-2If4a",
sidebarMenuPrimaryTitleContainer:"SidebarMenuButton-sidebarMenuPrimaryTitleContainer-3-vDD",sidebarMenuPrimaryTitle:"SidebarMenuButton-sidebarMenuPrimaryTitle-2_fxH",sidebarMenuSecondaryTitle:"SidebarMenuButton-sidebarMenuSecondaryTitle-2jpJL",icon:"SidebarMenuButton-icon-3UrWW",isDisabled:"SidebarMenuButton-isDisabled-Iwcsx"}},function(e,t){e.exports={icon:"ServerMenuButton-icon-2yrbL"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){
return e?{hasProvider:!0,title:e.title}:{hasProvider:!1}})}var r=n(11),a=n(6),o=(n.n(a),n(79)),s=n(2984),l=Object(r.b)(i)(s.a);t.a=l},function(e,t,n){"use strict";function i(e){var t=e.hasProvider,n=c()(e,["hasProvider"]);return t?p.a.createElement(a,n):p.a.createElement(r,n)}function r(e){var t=e.id;return s()(f.a,{id:t,primaryTitle:Object(h.default)("Looking for sources..."),isDisabled:!0,isLoading:!0})}function a(e){var t=e.id,n=e.title,i=e.isMenuOpen,r=e.isDisabled,a=e.onPress
;return s()(f.a,{id:t,isMenuOpen:i,isDisabled:r,primaryTitle:n,secondaryTitle:Object(h.default)("Online"),onPress:a})}var o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(4),f=n(1192);t.a=i},function(e,t,n){"use strict";function i(e){return!e.isLibraryProvider}function r(){return Object(S.createSelector)(Object(C.a)(),j.c(),j.a(),Object(O.a)(D.b.CONTENT,i),Object(O.a)(D.b.SUBSCRIBE),Object(P.a)(),Object(w.a)(T.i),function(e,t,n,i,r,a,o){
var s=m.a.pick(e,"machineIdentifier","friendlyName","promiseState","presence","allowChannelAccess","isConnected","isFullServer","isFullOwnedServer","isPersonalCloudServer","isBundled","isClaimed","hasHttpsConnections","hasFallbackConnections"),l=m.a.pick(e&&e.desktop,"libraries","isLibrariesPending","isLibrariesPopulated","librariesError","isProvidersPending","isProvidersPopulated","providersError");return v()({},s,l,{contentProviders:i,showRecordingSchedule:!!r.length,isLibraryRefreshing:a,
isOptimizeDatabaseInProgress:!!t,isCleanBundlesInProgress:!!n,hasTypeFirstSettings:o})})}function a(e,t){var n={serverEntityID:t.serverEntityID,metricsPage:t.metricsPage};return{dispatchFetchLibraries:function(){e(x.g(n))},dispatchFetchProviders:function(){e(x.h(n))},onReloadHttpPress:function(){e(Object(E.e)())},onReloadHttpAlwaysPress:function(){e(Object(E.d)()),e(Object(E.e)())},onRestartPress:function(){e(N.l(n))},onDeleteServerConfirm:function(){e(N.e(n))},onAddLibraryPress:function(){
e(N.a(n))},onSharePress:function(){e(N.n(n))},onUpdateLibrariesPress:function(){e(N.o(n))},onCancelUpdatePress:function(){e(N.b(n))},onOptimizeDatabaseConfirm:function(){e(N.j(n))},onCleanBundlesConfirm:function(){e(N.d(n))},onEmptyTrashConfirm:function(){e(N.g(n))},onTryAgainPress:function(){e(Object(E.b)()),e(x.q(n))},onAllowFallbackPress:function(){e(N.h(n))}}}var o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(7),v=n.n(f),g=n(5),m=n.n(g),y=n(1),b=(n.n(y),
n(0)),I=n.n(b),S=n(6),M=(n.n(S),n(34)),D=n(76),C=n(42),O=n(1193),j=n(1194),P=n(774),w=n(232),T=n(52),E=n(106),x=n(113),N=n(258),A=n(57),L=n(2986),k=function(e){function t(){return c()(this,t),d()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidMount=function(){this.props.isConnected&&this._populate()},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.serverEntityID,i=t.isConnected,r=n!==e.serverEntityID,a=i!==e.isConnected;i&&(r||a)&&this._populate()},
t.prototype._populate=function(){var e=this;Object(M.a)(function(){e.props.dispatchFetchLibraries(),e.props.dispatchFetchProviders()})},t.prototype.render=function(){var e=this.props,t=(e.metricsPage,e.dispatchFetchLibraries,e.dispatchFetchProviders,s()(e,["metricsPage","dispatchFetchLibraries","dispatchFetchProviders"]));return I.a.createElement(L.a,t)},t}(b.Component);t.a=Object(A.a)(r,a)(k)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.machineIdentifier,i=e.allowChannelAccess,r=e.isFullOwnedServer,o=e.isConnected,s=e.isClaimed,y=e.isLibrariesPopulated,b=e.librariesError,M=e.contentProviders,D=e.isProvidersPopulated,C=e.providersError,O=e.showRecordingSchedule,j=e.hasTypeFirstSettings;if(!o)return l.a.createElement(m.a,e);var P=!D&&!C,w=!y&&!b;if(P||w)return S
;var T=j?Object(u.a)(n,"settings","general"):"#!/settings/server",E=j?Object(u.a)(n,"status","now-playing"):"#!/status/playing/"+encodeURIComponent(n);return a()("div",{},void 0,r&&a()(p.a,{title:Object(c.default)("Manage")},void 0,a()(h.a,{to:E,icon:"plex-icon-status-560",title:Object(c.default)("Status"),"data-qa-id":"sidebarStatus"},"status"),a()(h.a,{to:T,icon:"plex-icon-settings-560",title:Object(c.default)("Settings"),"data-qa-id":"sidebarSettings"},"settings",!s&&a()(d.a,{
name:"plex-icon-alert-560",className:I.a.unclaimedIcon,"aria-label":Object(c.default)("Unclaimed")}))),!!M.length&&a()(p.a,{title:Object(c.default)("Live TV & DVR")},void 0,O&&a()(h.a,{to:"#!/server/"+encodeURIComponent(n)+"/schedule",icon:"plex-icon-calendar-560",title:Object(c.default)("Recordings"),highlightActiveRoute:!0,"data-qa-id":"sidebarRecordingSchedule"},"schedule"),M.map(function(e){return a()(f.a,{serverEntityID:t,providerEntityID:e,machineIdentifier:n},e)
})),l.a.createElement(v.a,e),a()(g.a,{machineIdentifier:n,showChannels:i}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(4),u=n(213),d=n(26),p=n(568),h=n(176),f=n(2991),v=n(2993),g=n(3007),m=n(3009),y=n(1197),b=n(3012),I=n.n(b),S=a()(y.a,{});t.a=i},function(e,t){e.exports={sidebarListHeaderContainer:"SidebarList-sidebarListHeaderContainer-2D2g-",sidebarListHeader:"SidebarList-sidebarListHeader-1t0yz",sidebarListHeaderIcon:"SidebarList-sidebarListHeaderIcon-3Itr_"}},function(e,t){
e.exports={sidebarListItem:"SidebarListItem-sidebarListItem-GdcVs"}},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.iconClassName,r=e.iconSrc,o=e.icon,l=e.iconComponent,u=e.iconNode,d=e.title,g=e.showSpinner,y=c()(e,["className","children","iconClassName","iconSrc","icon","iconComponent","iconNode","title","showSpinner"]),b=void 0;return r?b=s()(v.a,{className:m.a.iconImg,src:r}):o?b=s()(l,{name:o}):u&&(b=u),p.a.createElement(f.a,a()({className:t},y),s()("div",{
className:m.a.container},void 0,s()("div",{className:i},void 0,g?s()(h.a,{className:m.a.spinner}):b),s()("div",{className:m.a.title},void 0,d),n&&s()("div",{className:m.a.children},void 0,n)))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(494),f=n(22),v=n(409),g=n(2990),m=n.n(g);i.defaultProps={className:m.a.sidebarLink,iconClassName:m.a.icon},t.a=i},function(e,t){e.exports={sidebarLink:"SidebarLink-sidebarLink-L2OPd Link-default-2XA2b",
iconImg:"SidebarLink-iconImg-1grLX",container:"SidebarLink-container-24bhW",icon:"SidebarLink-icon-34JWq",title:"SidebarLink-title-2vaAA",children:"SidebarLink-children-3Lh_R",spinner:"SidebarLink-spinner-3MZY0"}},function(e,t,n){"use strict";function i(e){return l.a.createElement(h.a,e)}var r=n(5),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(11),u=n(6),d=(n.n(u),n(79)),p=n(304),h=n(2992),f=function(){return Object(u.createSelector)(Object(d.a)(),Object(p.a)(),function(e,t){
var n=a.a.pick(e,"identifier","title");return n.isRefreshing=!!t,n})};t.a=Object(c.b)(f)(i)},function(e,t,n){"use strict";function i(e){return c.c.EPG_IDENTIFIER.test(e)?"plex-icon-shows-broadcast-560":"plex-icon-channels-560"}function r(e){var t=e.machineIdentifier,n=e.identifier,r=e.title,a=e.isRefreshing,s=encodeURIComponent(t),l=encodeURIComponent(n);return o()(u.a,{"data-qa-id":"sidebarProgramGuide",to:"#!/server/"+s+"/provider/"+l,icon:i(n),title:r,showSpinner:a,highlightActiveRoute:!0})}
var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(55)),u=n(176);t.a=r},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(4),b=n(565),I=n(267),S=n(176),M=n(2994),D=n(2998),C=n(3001),O=n(3006),j=n.n(O),P=function(e){function t(){return u()(this,t),p()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.render=function(){
var e=this.props,t=e.hoverableProps,n=e.serverEntityID,i=e.isFullServer,a=e.isFullOwnedServer,s=e.isHovered,c=e.isPlaylistRoute,u=e.libraries,d=e.librariesError,p=e.onAddLibraryPress,h=l()(e,["hoverableProps","serverEntityID","isFullServer","isFullOwnedServer","isHovered","isPlaylistRoute","libraries","librariesError","onAddLibraryPress"]),f=!!d&&!u.length,v=a&&!u.length;return m.a.createElement("div",r()({role:"navigation","data-qa-id":"sidebarLibrariesList"},t),o()("div",{
className:j.a.librariesListHeader,role:"header"},void 0,o()("div",{className:j.a.librariesTitle},void 0,Object(y.default)("Libraries")),a&&m.a.createElement(M.a,r()({isHovered:s,onAddLibraryPress:p},h))),i&&o()(D.a,{serverEntityID:n,isSelected:c}),v&&o()(S.a,{icon:"plex-icon-add-560",title:Object(y.default)("Add Library"),onPress:p},"addLibrary"),f?o()(I.a,{message:Object(y.default)("There was an unexpected error loading libraries.")}):u.map(function(e){return o()(C.a,{serverEntityID:n,
libraryEntityID:e},e)}))},t}(g.Component);t.a=Object(b.a)(P)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(83),v=n(35),g=n(29),m=n(54),y=n(154),b=n(2995),I=n(789),S=n(2997),M=n.n(S),D=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onActionsPress=function(e){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen}),
r.props.onActionsMenuOpen&&r.props.onActionsMenuOpen()},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1}),r.props.onActionsMenuClose&&r.props.onActionsMenuClose()},r.onOptimizeDatabasePress=function(e){r.setState({isOptimizeModalOpen:!0})},r.onOptimizeConfirm=function(){r.props.onOptimizeDatabaseConfirm()},r.onOptimizeCancel=function(){r.setState({isOptimizeModalOpen:!1})},r.onCleanBundlesPress=function(e){r.setState({isCleanBundlesModalOpen:!0})},
r.onCleanBundlesConfirm=function(){r.props.onCleanBundlesConfirm()},r.onCleanBundlesCancel=function(){r.setState({isCleanBundlesModalOpen:!1})},r.onEmptyTrashPress=function(e){r.setState({isEmptyTrashModalOpen:!0})},r.onEmptyTrashConfirm=function(){r.setState({isEmptyTrashModalOpen:!1}),r.props.onEmptyTrashConfirm()},r.onEmptyTrashCancel=function(){r.setState({isEmptyTrashModalOpen:!1})},r.state={isActionsMenuOpen:!1,isOptimizeModalOpen:!1,isCleanBundlesModalOpen:!1,isEmptyTrashModalOpen:!1},
r._actionsMenuButtonID=Object(m.a)(),r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isOptimizeDatabaseInProgress&&!e.isOptimizeDatabaseInProgress&&this.setState({isOptimizeModalOpen:!1}),this.props.isCleanBundlesInProgress&&!e.isCleanBundlesInProgress&&this.setState({isCleanBundlesModalOpen:!1})},t.prototype.shouldComponentUpdate=function(e,t){return Object(g.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.isHovered,i=e.isLibraryRefreshing,a=e.isOptimizeDatabaseInProgress,o=e.isCleanBundlesInProgress,s=f.a.hasTouchScreen||n||this.state.isActionsMenuOpen;return r()("div",{className:(t||"")+" "+(s&&M.a.isVisible||""||""),role:"menu"},void 0,r()(I.a,{className:M.a.action,"data-qa-id":"sidebarLibrariesAddButton",icon:"plex-icon-add-560",title:Object(h.default)("Add Library"),onPress:this.props.onAddLibraryPress}),r()(I.a,{id:this._actionsMenuButtonID,
className:M.a.action,"aria-haspopup":"true","data-qa-id":"sidebarLibrariesMoreButton",icon:"plex-icon-more-560",title:Object(h.default)("More Actions"),onPress:this.onActionsPress}),r()(b.a,{target:this._actionsMenuButtonID,isOpen:this.state.isActionsMenuOpen,isLibraryRefreshing:i,onMenuClose:this.onActionsMenuClose,onSharePress:this.props.onSharePress,onUpdateLibrariesPress:this.props.onUpdateLibrariesPress,onCancelUpdatePress:this.props.onCancelUpdatePress,
onOptimizeDatabasePress:this.onOptimizeDatabasePress,onCleanBundlesPress:this.onCleanBundlesPress,onEmptyTrashPress:this.onEmptyTrashPress}),r()(y.a,{isOpen:this.state.isOptimizeModalOpen,isConfirmButtonSpinning:a,isCancelButtonDisabled:a,metricsPage:v.p,title:Object(h.default)("Optimize Database"),
message:Object(h.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:Object(h.default)("Optimize"),onConfirm:this.onOptimizeConfirm,onCancel:this.onOptimizeCancel}),r()(y.a,{isOpen:this.state.isCleanBundlesModalOpen,isConfirmButtonSpinning:o,isCancelButtonDisabled:o,metricsPage:v.e,title:Object(h.default)("Clean Bundles"),
message:Object(h.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:Object(h.default)("Clean"),onConfirm:this.onCleanBundlesConfirm,onCancel:this.onCleanBundlesCancel}),r()(y.a,{isOpen:this.state.isEmptyTrashModalOpen,metricsPage:v.j,title:Object(h.default)("Empty Trash"),
message:Object(h.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:Object(h.default)("Empty"),onConfirm:this.onEmptyTrashConfirm,onCancel:this.onEmptyTrashCancel}))},t}(p.Component);D.defaultProps={className:M.a.actions},t.a=D},function(e,t,n){"use strict";function i(e){
var t=e.isLibraryRefreshing,n=e.onSharePress,i=e.onUpdateLibrariesPress,r=e.onCancelUpdatePress,o=e.onOptimizeDatabasePress,l=e.onCleanBundlesPress,c=e.onEmptyTrashPress,f=s()(e,["isLibraryRefreshing","onSharePress","onUpdateLibrariesPress","onCancelUpdatePress","onOptimizeDatabasePress","onCleanBundlesPress","onEmptyTrashPress"]);return u.a.createElement(p.a,f,a()(h.a,{onPress:n},void 0,Object(d.default)("Share...")),t?a()(h.a,{onPress:r},void 0,Object(d.default)("Cancel Scan")):a()(h.a,{
onPress:i},void 0,Object(d.default)("Scan Library Files")),a()(h.a,{onPress:o},void 0,Object(d.default)("Optimize Database")),a()(h.a,{onPress:l},void 0,Object(d.default)("Clean Bundles")),a()(h.a,{onPress:c},void 0,Object(d.default)("Empty Trash")))}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(4),p=n(75),h=n(156);t.a=i},function(e,t){e.exports={sidebarIconButton:"SidebarIconButton-sidebarIconButton-3zxa5"}},function(e,t){e.exports={
actions:"SidebarLibrariesActions-actions-2eVPc",action:"SidebarLibrariesActions-action-1NiFy SidebarIconButton-sidebarIconButton-3zxa5",isVisible:"SidebarLibrariesActions-isVisible-k1QA0"}},function(e,t,n){"use strict";function i(){return Object(m.createSelector)(Object(y.a)(),b.a,function(e,t){var n=e.entityID+"!/playlists",i=t[n],r={isLibraryProvider:!0},a=Object(I.a)(e,r,"/playlists");return{route:i||a,showActions:!(!e.isFullOwnedServer||!e.desktop.hasiTunes)}})}function r(e,t){var n={
serverEntityID:t.serverEntityID};return{dispatchCheckiTunes:function(){e(S.c(n))},onImportPress:function(){e(S.i(n))}}}var a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(11),m=n(6),y=(n.n(m),n(42)),b=n(757),I=n(776),S=n(258),M=n(2999),D=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchCheckiTunes()},t.prototype.render=function(){
var e=this.props,t=(e.dispatchCheckiTunes,o()(e,["dispatchCheckiTunes"]));return v.a.createElement(M.a,t)},t}(f.Component);t.a=Object(g.b)(i,r)(D)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(788),v=n(787),g=n(789),m=n(3e3),y=n.n(m),b=n(75),I=n(156),S=n(54),M=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onActionsPress=function(){r.setState({
isActionsMenuOpen:!r.state.isActionsMenuOpen})},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.state={isActionsMenuOpen:!1},r._actionsMenuButtonID=Object(S.a)(),r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.route,n=e.showActions,i=e.isSelected,a=e.onImportPress;return r()(v.a,{className:y.a.playlistsListItem},void 0,r()(f.a,{to:t,icon:"plex-icon-playlists-560",title:Object(h.default)("Playlists"),isSelected:i},"playlists"),n&&r()(g.a,{
id:this._actionsMenuButtonID,className:(y.a.action||"")+" "+(this.state.isActionsMenuOpen&&y.a.isVisible||""||""),"data-qa-id":"sidebarPlaylistsMoreButton",icon:"plex-icon-more-560",title:Object(h.default)("More Actions"),onPress:this.onActionsPress}),r()(b.a,{target:this._actionsMenuButtonID,isOpen:this.state.isActionsMenuOpen,onMenuClose:this.onActionsMenuClose},void 0,r()(I.a,{onPress:a},void 0,Object(h.default)("Import from iTunes..."))))},t}(p.Component);t.a=M},function(e,t){e.exports={
action:"SidebarPlaylistsItem-action-2LTK0 SidebarLibraryItem-action-2AHiQ SidebarIconButton-sidebarIconButton-3zxa5",playlistsListItem:"SidebarPlaylistsItem-playlistsListItem-3NFLP SidebarLibraryItem-libraryListItem-2cmmj SidebarListItem-sidebarListItem-GdcVs",isVisible:"SidebarPlaylistsItem-isVisible-30YBJ"}},function(e,t,n){"use strict";function i(){return Object(m.createSelector)(function(e){return e.ui.quickSearch},function(e){return e.ui.background.isBackgroundPending
},Object(I.a)(),function(e,t,n){var i=e.providerIdentifier,r=e.sectionID;t||(T=i,E=r);var a=t?T:i,o=t?E:r;return a===y.c.LIBRARY_PROVIDER_IDENTIFIER&&o===n.key})}function r(){return Object(m.createSelector)(Object(b.a)(),Object(I.a)(),M.a,Object(S.b)(),i(),function(e,t,n,i,r){var a=t.key,o=t.title,s=void 0===o?"":o,l=t.type,c=t.agent,u=t.refreshing,d="movie"===l&&"com.plexapp.agents.none"===c,p="photo"===l&&e.itemClusters,h=s.trim(),f=e.isCloudSyncServer?{type:l,title:h
}:{},v=e.entityID+"!/library/sections/"+t.key,g=n[v],m={isLibraryProvider:!0},y=p&&Object(j.a)(e,m,a),b=Object(O.a)(e,m,a,f);return{libraryKey:a,route:g||y||b,title:h,type:d?"videos":l,refreshing:u,isLibraryDeleteInProgress:!!i,isFullOwnedServer:e.isFullOwnedServer,isSelected:r}})}function a(e,t){var n={serverEntityID:t.serverEntityID,libraryEntityID:t.libraryEntityID,metricsPage:t.metricsPage};return{dispatchFetchLibraries:function(){e(Object(D.g)({serverEntityID:t.serverEntityID}))},
onShareLibraryPress:function(){e(C.g(n))},onUpdateLibraryPress:function(){e(C.i(n))},onCancelUpdateLibraryPress:function(){e(C.b(n))},onEditLibraryPress:function(){e(C.d(n))},onAnalyzeLibraryPress:function(){e(C.a(n))},onRefreshLibraryPress:function(){e(C.h(n))},onEmptyTrashLibraryPress:function(){e(C.e(n))},onDeleteLibraryPress:function(){e(C.c(n))}}}var o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(6),y=(n.n(m),
n(55)),b=n(42),I=n(3002),S=n(1194),M=n(757),D=n(113),C=n(1196),O=n(122),j=n(1163),P=n(57),w=n(3003),T=void 0,E=void 0,x=function(e){function t(){return c()(this,t),d()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidUpdate=function(e){e.isLibraryDeleteInProgress&&!this.props.isLibraryDeleteInProgress&&this.props.dispatchFetchLibraries()},t.prototype.render=function(){var e=this.props,t=(e.metricsPage,e.dispatchFetchLibraries,s()(e,["metricsPage","dispatchFetchLibraries"]))
;return g.a.createElement(w.a,t)},t}(v.Component);t.a=Object(P.a)(r,a)(x)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.libraryEntityID},a.a,function(e,t){return t[e]})}t.a=i;var r=n(6),a=(n.n(r),n(1064))},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(4)),f=n(166),v=n(35),g=n(54),m=n(65),y=n(154),b=n(787),I=n(788),S=n(789),M=n(3004),D=n(3005),C=n.n(D),O=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onActionsPress=function(){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen})},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.onAnalyzePress=function(){r.setState({isAnalyzeModalOpen:!0})},r.onAnalyzeConfirm=function(){r.setState({isAnalyzeModalOpen:!1}),
r.props.onAnalyzeLibraryPress()},r.onAnalyzeCancel=function(){r.setState({isAnalyzeModalOpen:!1})},r.onRefreshAllPress=function(){r.setState({isRefreshAllModalOpen:!0})},r.onRefreshAllConfirm=function(){r.setState({isRefreshAllModalOpen:!1}),r.props.onRefreshLibraryPress()},r.onRefreshAllCancel=function(){r.setState({isRefreshAllModalOpen:!1})},r.onEmptyTrashPress=function(){r.setState({isEmptyTrashModalOpen:!0})},r.onEmptyTrashConfirm=function(){r.setState({isEmptyTrashModalOpen:!1}),
r.props.onEmptyTrashLibraryPress()},r.onEmptyTrashCancel=function(){r.setState({isEmptyTrashModalOpen:!1})},r.onDeletePress=function(){r.setState({isDeleteModalOpen:!0})},r.onDeleteConfirm=function(){r.props.onDeleteLibraryPress()},r.onDeleteCancel=function(){r.setState({isDeleteModalOpen:!1})},r.state={isActionsMenuOpen:!1,isAnalyzeModalOpen:!1,isRefreshAllModalOpen:!1,isEmptyTrashModalOpen:!1,isDeleteModalOpen:!1},r._actionsMenuButtonID=Object(g.a)(),r}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.libraryKey,n=e.route,i=e.type,a=e.title,o=e.refreshing,s=e.isLibraryDeleteInProgress,l=e.isFullOwnedServer,c=e.isSelected,u=e.onShareLibraryPress,d=e.onUpdateLibraryPress,p=e.onCancelUpdateLibraryPress,g=e.onEditLibraryPress;return r()(b.a,{className:C.a.libraryListItem},void 0,r()(I.a,{
"data-qa-id":"sidebarLibraryItem--"+t,to:n,icon:f.a.get(i).sectionTypeIcon,title:a,showSpinner:l&&o,isSelected:c}),l&&r()(S.a,{id:this._actionsMenuButtonID,className:(C.a.action||"")+" "+(this.state.isActionsMenuOpen&&C.a.isVisible||""||""),"data-qa-id":"sidebarLibraryMoreButton",icon:"plex-icon-more-560",title:Object(h.default)("More Actions"),onPress:this.onActionsPress}),r()(M.a,{target:this._actionsMenuButtonID,isOpen:this.state.isActionsMenuOpen,isLibraryRefreshing:o,
onMenuClose:this.onActionsMenuClose,onSharePress:u,onUpdatePress:d,onCancelUpdatePress:p,onEditPress:g,onAnalyzePress:this.onAnalyzePress,onRefreshAllPress:this.onRefreshAllPress,onEmptyTrashPress:this.onEmptyTrashPress,onDeletePress:this.onDeletePress}),r()(y.a,{isOpen:this.state.isAnalyzeModalOpen,metricsPage:v.d,title:Object(h.default)("Analyze Library"),
message:Object(h.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:Object(h.default)("Analyze"),onConfirm:this.onAnalyzeConfirm,onCancel:this.onAnalyzeCancel}),r()(y.a,{isOpen:this.state.isRefreshAllModalOpen,metricsPage:v.l,title:Object(h.default)("Refresh All Metadata"),
message:Object(h.default)("Forces a download of fresh media information from the internet. This can take a long time. Any locked fields are not modified."),confirmLabel:Object(h.default)("Refresh"),onConfirm:this.onRefreshAllConfirm,onCancel:this.onRefreshAllCancel}),r()(y.a,{isOpen:this.state.isEmptyTrashModalOpen,metricsPage:v.k,title:Object(h.default)("Empty Trash"),
message:Object(h.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:Object(h.default)("Empty"),onConfirm:this.onEmptyTrashConfirm,onCancel:this.onEmptyTrashCancel}),r()(y.a,{isOpen:this.state.isDeleteModalOpen,isConfirmButtonSpinning:s,isCancelButtonDisabled:s,metricsPage:v.h,kind:m.DANGER,
title:Object(h.default)("Delete Library"),message:Object(h.default)('The library "{libraryName}" will be removed from this server. Your media files will not be affected. This can\'t be undone. Continue?',{libraryName:a}),accordMessage:Object(h.default)('Yes, delete the library "{libraryName}"',{libraryName:a}),confirmLabel:Object(h.default)("Delete"),onConfirm:this.onDeleteConfirm,onCancel:this.onDeleteCancel}))},t}(p.Component);O.defaultProps={refreshing:!1},t.a=O},function(e,t,n){"use strict"
;function i(e){var t=e.isLibraryRefreshing,n=e.onSharePress,i=e.onUpdatePress,r=e.onCancelUpdatePress,o=e.onEditPress,l=e.onAnalyzePress,c=e.onRefreshAllPress,v=e.onEmptyTrashPress,g=e.onDeletePress,m=s()(e,["isLibraryRefreshing","onSharePress","onUpdatePress","onCancelUpdatePress","onEditPress","onAnalyzePress","onRefreshAllPress","onEmptyTrashPress","onDeletePress"]);return u.a.createElement(p.a,m,a()(h.a,{onPress:n},void 0,Object(d.default)("Share...")),t?a()(h.a,{onPress:r
},void 0,Object(d.default)("Cancel Scan")):a()(h.a,{onPress:i},void 0,Object(d.default)("Scan Library Files")),a()(h.a,{onPress:o},void 0,Object(d.default)("Edit")),a()(h.a,{onPress:l},void 0,Object(d.default)("Analyze")),a()(h.a,{onPress:c},void 0,Object(d.default)("Refresh All Metadata")),a()(h.a,{onPress:v},void 0,Object(d.default)("Empty Trash")),a()(h.a,{kind:f.b.DANGER,onPress:g},void 0,Object(d.default)("Delete")))}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),
n(0)),u=n.n(c),d=n(4),p=n(75),h=n(156),f=n(24);t.a=i},function(e,t){e.exports={action:"SidebarLibraryItem-action-2AHiQ SidebarIconButton-sidebarIconButton-3zxa5",libraryListItem:"SidebarLibraryItem-libraryListItem-2cmmj SidebarListItem-sidebarListItem-GdcVs",isVisible:"SidebarLibraryItem-isVisible-ynsb8"}},function(e,t){e.exports={librariesListHeader:"SidebarServerLibraries-librariesListHeader-33wsS SidebarList-sidebarListHeader-1t0yz",librariesTitle:"SidebarServerLibraries-librariesTitle-3iqmv"
}},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(11),v=n(6),g=(n.n(v),n(34)),m=n(200),y=n(785),b=n(440),I=n(569),S=Object(v.createSelector)(m.a,y.a,function(e,t){var n=e.desktop;return{isSignedIn:e.isSignedIn,showUserPlaylists:!e.restricted,unwatchedWatchLaterCount:n.unwatchedWatchLaterList.totalSize,unwatchedRecommendedCount:n.unwatchedRecommendedList.totalSize,cloudProviderEntityIDs:t}}),M={
repopulateUnwatchedWatchLaterList:b.i,repopulateUnwatchedRecommendedList:b.h},D=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(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.showUserPlaylists&&Object(g.a)(function(){e.repopulateUnwatchedWatchLaterList(),e.repopulateUnwatchedRecommendedList()})},t.prototype.render=function(){var e=this.props,t=(e.repopulateUnwatchedWatchLaterList,e.repopulateUnwatchedRecommendedList,r()(e,["repopulateUnwatchedWatchLaterList","repopulateUnwatchedRecommendedList"]));return h.a.createElement(I.a,t)},t}(p.Component);t.a=Object(f.b)(function(e){return S(e)},M)(D)},function(e,t,n){"use strict";function i(){
return Object(u.createSelector)(Object(f.a)(),function(e){return{title:e.title,identifier:e.identifier,iconSrc:Object(p.a)(e.icon)?e.icon:d.join([e.baseURL,e.icon])}})}function r(e){var t=e.title,n=e.identifier,i=e.iconSrc;return n===h.c.CHANNEL_PROVIDER_IDENTIFIER?null:o()(v.a,{title:t,to:"#!/provider/"+n,iconSrc:i})}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(11)),u=n(6),d=(n.n(u),n(19)),p=n(469),h=n(55),f=n(79),v=n(176);t.a=Object(c.b)(i)(r)},function(e,t,n){"use strict"
;function i(){return Object(a.createSelector)(l.a,function(e){return e?{isFallbackPossible:!o.a.isHostedHttps||s.a.get("allowMixedContent"),isCloudServerConnected:e.isConnected,isCloudServerResourcesPending:e.isResourcesPending,isPersonalCloudServerRestarting:e.desktop.isPersonalCloudServerRestarting}:{isCloudServerConnected:!1}})}var r=n(11),a=n(6),o=(n.n(a),n(83)),s=n(62),l=n(548),c=n(3010);t.a=Object(r.b)(i)(c.a)},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(35),v=n(29),g=n(24),m=n(154),y=n(176),b=n(267),I=n(1195),S=n.n(I),M=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onRemoveServerPress=function(e){r.setState({isRemoveModalOpen:!0})},r.onRemoveConfirm=function(){r.setState({isRemoveModalOpen:!1}),r.props.onDeleteServerConfirm(r.props.machineIdentifier)},r.onRemoveCancel=function(){r.setState({
isRemoveModalOpen:!1})},r.state={isRemoveModalOpen:!1},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(v.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.friendlyName,n=e.presence,i=e.isPending,a=e.isBundled,o=e.isFallbackPossible,s=e.isCloudServerConnected,l=e.isCloudServerResourcesPending,c=e.isFullServer,u=e.isFullOwnedServer,d=e.isPersonalCloudServer,p=e.hasHttpsConnections,v=e.hasFallbackConnections,I=e.isPersonalCloudServerRestarting,M=e.onTryAgainPress,D=e.onReloadHttpPress,C=e.onReloadHttpAlwaysPress,O=e.onRestartPress,j=e.onAllowFallbackPress,P=c&&n,w=p&&!v,T=void 0,E=void 0,x=void 0,N=void 0,A=void 0,L=void 0,k=void 0
;d?(T=!1,E=!1,x=!1,N=!1,A=s,L=!1,k=Object(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.")):(T=!o&&P,E=o&&P&&w,x=T||E,N=!x,A=!1,L=u&&!a,k=x?Object(h.default)('Unable to connect to "{serverName}" securely.',{serverName:t}):Object(h.default)('The server "{serverName}" is unreachable. Make sure it\'s running, double check your network, and try again.',{serverName:t}))
;var _=l||i,R=_?Object(h.default)("Connecting"):Object(h.default)("Try again");return r()(b.a,{message:k},void 0,r()(y.a,{icon:"plex-icon-reload-560",title:R,showSpinner:_,isDisabled:_,onPress:M}),T&&r()("p",{className:S.a.sidebarMessage},void 0,Object(h.default)("Do you want to allow insecure connections?")),T&&r()(y.a,{icon:"plex-icon-unlock-560",title:Object(h.default)("Allow once"),onPress:D}),T&&r()(y.a,{icon:"plex-icon-unlock-560",title:Object(h.default)("Allow always"),onPress:C
}),A&&r()(y.a,{icon:"plex-icon-personal-cloud-560",title:Object(h.default)("Restart Cloud Server"),showSpinner:I,isDisabled:I,onPress:O}),E&&r()(y.a,{icon:"plex-icon-unlock-560",title:Object(h.default)("Allow insecure connection"),onPress:j}),x&&r()(y.a,{to:"https://support.plex.tv/hc/en-us/articles/206225077",target:"_blank",icon:"plex-icon-help-560",title:Object(h.default)("Learn more")}),N&&r()(y.a,{to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560",
title:Object(h.default)("Where is my server?")}),L&&r()(y.a,{icon:"plex-icon-remove-560",title:Object(h.default)("Remove server"),onPress:this.onRemoveServerPress}),L&&r()(m.a,{isOpen:this.state.isRemoveModalOpen,metricsPage:f.i,kind:g.b.DANGER,title:Object(h.default)("Remove {serverName}",{serverName:t}),message:Object(h.default)("If this server is restarted, it will automatically be added to your account again.",t),confirmLabel:Object(h.default)("Remove"),onConfirm:this.onRemoveConfirm,
onCancel:this.onRemoveCancel}))},t}(p.Component);t.a=M},function(e,t){e.exports={spinnerContainer:"SidebarSpinner-spinnerContainer-2oi1o"}},function(e,t){e.exports={unclaimedIcon:"SidebarServerContent-unclaimedIcon-3-qUN"}},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(Object(d.a)(),Object(p.a)(),Object(h.a)(u.b.SETTINGS),function(e,t,n){return e?{identifier:e.identifier,providerIcon:Object(c.a)(e.icon)?e.icon:l.join([e.baseURL,e.icon]),
contentDirectories:t.map(function(t){var n=a()({},t);return t.icon&&(n.icon=Object(c.a)(t.icon)?t.icon:l.join([e.baseURL,t.icon])),n}),showProvidersSpinner:e.isPending&&!e.isPopulated,hasError:!!e.error,hasSettings:!!n}:{showProvidersSpinner:!0,hasError:!1}})}var r=n(7),a=n.n(r),o=n(11),s=n(6),l=(n.n(s),n(19)),c=n(469),u=n(76),d=n(79),p=n(303),h=n(567),f=n(3014),v=Object(o.b)(i)(f.a);t.a=v},function(e,t,n){"use strict";function i(e){
var t=e.identifier,n=e.providerIcon,i=e.contentDirectories,r=e.showProvidersSpinner,l=e.hasSettings,c=e.hasError;return r?f:c?a()("div",{},void 0,a()(d.a,{message:Object(s.default)("There was an unexpected error.")})):a()("div",{},void 0,i.map(function(e){var i="news"===e.subtype?e.hubKey||e.key:e.key||e.hubKey,r=u.a.get(e.type),s=r&&r.sectionTypeIcon,l=o.join(["#!/provider",encodeURIComponent(t)],{key:i,context:e.context});return a()(p.a,{to:l,icon:s,iconSrc:e.icon||n,title:e.title,
highlightActiveRoute:!0},i)}),l&&a()(p.a,{to:"#!/provider/"+encodeURIComponent(t)+"/settings",icon:"plex-icon-settings-560",title:Object(s.default)("Personalize"),highlightActiveRoute:!0},"settings"))}var r=n(2),a=n.n(r),o=n(19),s=n(4),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(166)),d=n(267),p=n(176),h=n(1197),f=a()(h.a,{});i.defaultProps={contentDirectories:[],hasError:!1},t.a=i},function(e,t,n){"use strict";function i(){return Object(g.createStructuredSelector)({outOfDateServers:m.a,
isWaitingForPrimaryServer:function(e){return e.isWaitingForPrimaryServer},isUserRestricted:function(e){return!!e.user.restricted},canProvisionPersonalCloudServer:y.a,cloudProviderEntityIDs:b.a})}var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(1126)),y=n(550),b=n(785),I=n(372),S=n(3016),M={showProvisionPersonalCloudServerModal:I.f},D=function(e){function t(){var n,i,r;s()(this,t)
;for(var a=arguments.length,o=Array(a),l=0;l<a;l++)o[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(o))),i.onLinkPersonalCloudServerPress=function(e){i.props.showProvisionPersonalCloudServerModal({open:!0})},r=n,c()(i,r)}return d()(t,e),t.prototype.render=function(){return f.a.createElement(S.a,a()({},this.props,{onLinkPersonalCloudServerPress:this.onLinkPersonalCloudServerPress}))},t}(h.Component);t.a=Object(v.b)(i,M)(D)},function(e,t,n){"use strict";function i(e){
var t=e.outOfDateServers,n=e.isWaitingForPrimaryServer,i=e.isUserRestricted,r=e.canProvisionPersonalCloudServer,o=e.cloudProviderEntityIDs,s=e.onLinkPersonalCloudServerPress;return n?h:t.length?a()(u.a,{outOfDateServers:t}):i?a()(c.a,{cloudProviderEntityIDs:o}):r?a()(p.a,{cloudProviderEntityIDs:o,onPress:s}):a()(l.a,{cloudProviderEntityIDs:o})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3017)),c=n(3018),u=n(3019),d=n(3020),p=n(3021),h=a()(d.a,{});t.a=i},function(e,t,n){"use strict"
;function i(e){var t=e.cloudProviderEntityIDs;return a()(c.a,{message:Object(l.default)("A server could not be found. Download and install Plex Media Server, and it will appear here.")},void 0,a()(u.a,{to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560",title:Object(l.default)("Where is my server?")}),a()(d.a,{showChannels:!1,cloudProviderEntityIDs:t}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(267),u=n(176),d=n(569);t.a=i},function(e,t,n){
"use strict";function i(e){return a()(c.a,{message:Object(l.default)("No one in your home has shared a library with you.")},void 0,a()(u.a,{to:"https://support.plex.tv/hc/en-us/articles/204234313-Example-Plex-Home-Setup",target:"_blank",icon:"plex-icon-help-560",title:Object(l.default)("Learn more")}),a()(d.a,{showChannels:!1,cloudProviderEntityIDs:e.cloudProviderEntityIDs}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(267),u=n(176),d=n(569);t.a=i},function(e,t,n){"use strict"
;function i(e){var t=e.outOfDateServers,n=t.map(function(e){return'"'+e.friendlyName+'"'}),i=Object(c.a)(n),r=void 0;return r=1===t.length?Object(l.default)("The server {serverName} needs an update.",{serverName:i}):Object(l.default)("The servers {serverNames} need updates.",{serverNames:i}),a()(u.a,{message:r})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(866),u=n(267);t.a=i},function(e,t,n){"use strict";function i(){return a()(l.a,{
message:Object(s.default)("Please wait while servers are discovered.")})}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(4)),l=n(267);t.a=i},function(e,t,n){"use strict";function i(e){return a()("div",{},void 0,a()(c.a,{message:Object(l.default)("Don't have a computer to run Plex Media Server? You can get started with Plex Cloud right now!")},void 0,a()(u.a,{icon:"plex-icon-personal-cloud-560",title:Object(l.default)("Set up Plex Cloud..."),onPress:e.onPress}),a()(d.a,{showChannels:!1,
cloudProviderEntityIDs:e.cloudProviderEntityIDs})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(267),u=n(176),d=n(569);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.target,n=e.isOpen,i=e.selectedProviderEntityID,r=e.serverEntityIDs,o=e.providerEntityIDs,s=e.onMenuClose;return a()(p.a,{className:m.a.serverMenu,target:t,isOpen:n,scrollerProps:I,maxHeight:b,onMenuClose:s},void 0,a()(d.a,{page:"serverPicker"},void 0,a()(v.a,{onPress:s}),r.map(function(e){
return a()(h.a,{selectedProviderEntityID:i,serverEntityID:e},e)}),o.map(function(e){return a()(f.a,{selectedProviderEntityID:i,providerEntityID:e},e)})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(45)),c=n.n(l),u=n(101),d=n(3023),p=n(75),h=n(3024),f=n(3027),v=n(3028),g=n(3031),m=n.n(g),y=parseInt(c.a.serverMenuItemHeight,10),b=5*y,I={className:m.a.serverMenuScroller,scrollDirection:u.VERTICAL,autoScroll:!0};t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.children,n=c()(e,["children"]);return p.a.createElement(h.a,a()({},n,{mode:"dropdown"}),s()("div",{},void 0,t))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(284);t.a=i},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(Object(u.a)(),function(e){return e.primaryServer},function(e,t){return t.selectedProviderEntityID},function(e,t,n){return{machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName,
sourceTitle:e.sourceTitle,isConnected:e.isConnected,isUnavailable:e.isUnavailable,isSecure:e.isSecure,isCloudSyncServer:e.isCloudSyncServer,isPrimaryEligible:e.isPrimaryEligible,activeConnection:e.activeConnection,isOutOfDate:e.isOutOfDate,isRelayed:e.isRelayed,isSelected:e.entityID===t&&!n}})}function r(e){return s.a.createElement(d.a,e)}var a=n(1),o=(n.n(a),n(0)),s=n.n(o),l=n(11),c=n(6),u=(n.n(c),n(42)),d=n(3025);t.a=Object(l.b)(i)(r)},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(73)),f=n(3026),v=n(29),g=n(493),m=n(790),y=n(786),b=n(1198),I=n.n(b),S=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(v.a)(this,e,t)},t.prototype.render=function(){if(!this.props.isPrimaryEligible||!this.props.friendlyName)return null
;var e=this.props,t=e.className,n=e.isSelected,i=e.isConnected,a=e.isUnavailable,o=e.isSecure,s=e.isRelayed,l=e.machineIdentifier,c=e.friendlyName,u=e.onPress,d=Object(f.a)(this.props),p=d.isConnecting,v=d.statusWithSource;return r()(g.a,{action:h.R},void 0,r()(m.a,{className:(t||"")+" "+((p||a)&&I.a.disabledServerMenuItem||""||""),to:"#!/server/"+l+"/dashboard",isDisabled:p,isSelected:n,identifier:l,title:c,details:v,onPress:u},void 0,r()(y.a,{className:I.a.serverMenuIcon,isConnected:i,
isUnavailable:a,isSecure:o,isRelayed:!n&&s})))},t}(p.Component);t.a=S},function(e,t,n){"use strict";function i(e){var t=e.activeConnection,n=!1,i=void 0
;return e.isConnected&&t?i=e.isCloudSyncServer?Object(r.default)("Cloud"):e.isOutOfDate?Object(r.default)("Needs Update"):t.relay?Object(r.default)("Indirect"):t.isPrivate?Object(r.default)("Nearby"):Object(r.default)("Remote"):e.isRelayed?i=Object(r.default)("Indirect"):e.isUnavailable?i=Object(r.default)("Unavailable"):e.isUnauthorized?i=Object(r.default)("Unauthorized"):(n=!0,i=Object(r.default)("Connecting")),{isConnecting:n,status:i,statusWithSource:e.sourceTitle?i+" ("+e.sourceTitle+")":i}
}var r=n(4);t.a=i},function(e,t,n){"use strict";function i(){return Object(d.createSelector)(Object(f.a)(),function(e){return{title:e.title,identifier:e.identifier}})}function r(e){return e.identifier===h.c.CHANNEL_PROVIDER_IDENTIFIER?null:c.a.createElement(v.a,o()({},e,{isSelected:e.providerEntityID===e.selectedProviderEntityID,to:"#!/provider/"+e.identifier,details:Object(p.default)("Online")}))}var a=n(7),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(6),p=(n.n(d),
n(4)),h=n(55),f=n(79),v=n(790);t.a=Object(u.b)(i)(r)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(6)),f=(n.n(h),n(11)),v=n(372),g=n(550),m=n(3029),y=Object(h.createStructuredSelector)({isNotInterested:function(e){return e.experienceSettings.isNotInterestedInPersonalCloud},canProvisionPersonalCloudServer:g.a}),b={showProvisionPersonalCloudServerModal:v.f},I=function(e){function t(){var n,i,r;o()(this,t)
;for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),S.call(i),r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){return this.props.canProvisionPersonalCloudServer&&!this.props.isNotInterested?r()(m.a,{onPress:this.onPress}):null},t}(p.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=Object(f.b)(y,b)(I)
},function(e,t,n){"use strict";function i(e){var t=e.onPress;return a()(u.a,{identifier:"plexCloud",title:Object(l.default)("Plex Cloud"),details:Object(l.default)("Set up Plex Cloud\u2026"),onPress:t},void 0,a()(c.a,{className:p.a.personalCloudIcon,name:"plex-icon-personal-cloud-560","aria-label":Object(l.default)("Plex Cloud")}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(26),u=n(790),d=n(3030),p=n.n(d);t.a=i},function(e,t){e.exports={
personalCloudIcon:"ProvisionPersonalCloudServerMenuItem-personalCloudIcon-3BAU_ ServerMenuItem-serverMenuIcon-2zKCW"}},function(e,t){e.exports={serverMenu:"ServerMenu-serverMenu-6KNnX MenuContainer-menu-2OAQT",serverMenuScroller:"ServerMenu-serverMenuScroller-1nSX6 Menu-menuScroller-1TF6o Scroller-vertical-VScFL"}},function(e,t){e.exports={sidebarContent:"ServerSidebar-sidebarContent-3hRNR"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),
n(43)),s=n(40),l=n(56),c=n(138),u=n(66),d=n(186),p=n(234),h=n(235),f=n(1199),v=r()(c.a,{}),g=l.a.extend({component:function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.params||{},a=Object(s.a)(o.m,t),l=Object(s.a)(o.k,n,a);return r()(d.a,{metricsContext:i.context},void 0,r()(u.a,{},void 0,v,r()(p.a,{machineIdentifier:t},void 0,r()(h.a,{providerEntityID:l},void 0,r()(f.a,{machineIdentifier:t,serverEntityID:a,providerEntityID:l,listKey:i.key,listTitle:i.title,listType:i.type})))))}})
;t.a=g},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(36),r=n(82),a=Object(i.a)(r.E)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.listKey,o=e.listTitle,l=e.listType,c=e.listSubtype,y=e.activeSelectionType;return s()(h.a,{metricsPage:d.I,allowBackgroundLightPreset:!0,scrollDirection:p.NONE},void 0,y?s()(v.a,{serverEntityID:t,providerEntityID:n}):s()(g.a,{serverEntityID:t,providerEntityID:n,
metadataListEntityID:i,listTitle:o,listType:l,listSubtype:c}),u.a.createElement(f.a,a()({component:m.a,initialSize:50,shouldResetOnUnmount:!0,containerKey:r,containerTitle:o,listType:l,listSubtype:c},e)))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(35),p=n(101),h=n(187),f=n(158),v=n(373),g=n(3036),m=n(1172);t.a=i},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(u.a,d.a,Object(c.a)(),Object(p.a)(),function(e,t,n,i){return{server:e,provider:t,
directories:i,selectedDirectory:a.a.find(i,function(e){if(!e.key)return!1;var t=new RegExp("^"+Object(l.a)(e.key)+"\\b");return n.containerKey.match(t)}),totalSize:n.totalSize}})}var r=n(5),a=n.n(r),o=n(11),s=n(6),l=(n.n(s),n(215)),c=n(159),u=n(48),d=n(37),p=n(303),h=n(3037);t.a=Object(o.b)(i)(h.a)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(54),v=(n(95),n(87),
n(777)),g=n(263),m=n(188),y=n(189),b=n(204),I=n(205),S=n(379),M=n(555),D=n(446),C=n(3038),O=n.n(C),j=r()(g.a,{}),P=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onDirectoriesMenuButtonPress=function(e){r.setState({isDirectoriesMenuOpen:!r.state.isDirectoriesMenuOpen})},r.onDirectoriesMenuClose=function(){r.setState({isDirectoriesMenuOpen:!1})},r.state={isDirectoriesMenuOpen:!1},r._directoriesMenuButtonID=Object(f.a)(),r}return u()(t,e),
t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,a=e.listTitle,o=e.listType,s=e.listSubtype,l=e.totalSize,c=e.server,u=e.provider,d=e.directories,p=e.selectedDirectory,f=e.isLibraryList,g=this.state.isDirectoriesMenuOpen;return r()(m.a,{},void 0,r()(y.a,{},void 0,p&&r()(I.a,{id:this._directoriesMenuButtonID,title:p.isHomeDirectory?Object(h.default)("All Libraries"):p.title,hasMenu:d.length>1,isMenuOpen:g,isSelected:!0,
onPress:this.onDirectoriesMenuButtonPress}),p&&r()(D.a,{target:this._directoriesMenuButtonID,isOpen:g,server:c,provider:u,directories:d,selectedDirectory:p,onMenuClose:this.onDirectoriesMenuClose}),r()(I.a,{title:a,hasMenu:!1,isSelected:!0}),r()(S.a,{},void 0,l)),r()(b.a,{},void 0,r()(v.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listType:o,listSubtype:s,isLibraryList:f}),r()(M.a,{className:O.a.divider}),j))},t}(p.Component);t.a=P},function(e,t){e.exports={
divider:"MetadataListPageHeader-divider-1LM5c PageHeaderDivider-pageHeaderDivider-DvwUq"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(43)),s=n(40),l=n(172),c=n(186),u=n(138),d=n(449),p=n(1199),h=n(56),f=n(66),v=h.a.extend({component:function(e){var t=e.selectedProviderID,n=e.params||{},i=l.a,a=Object(s.a)(o.m,i),h=Object(s.a)(o.k,t,a);return r()(c.a,{metricsContext:n.context},void 0,r()(f.a,{},void 0,r()(u.a,{selectedProviderEntityID:h}),r()(d.a,{serverEntityID:a,
providerEntityID:h},void 0,r()(p.a,{machineIdentifier:i,serverEntityID:a,providerEntityID:h,providerIdentifier:t,listKey:n.key,listTitle:n.title,listType:n.type,listSubtype:n.subtype}))))}});t.a=v},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(43)),s=n(40),l=n(172),c=n(138),u=n(449),d=n(3041),p=n(56),h=n(66),f=r()(d.a,{}),v=p.a.extend({component:function(e){var t=e.selectedProviderID,n=l.a,i=Object(s.a)(o.m,n),a=Object(s.a)(o.k,t,i);return r()(h.a,{},void 0,r()(c.a,{
selectedProviderEntityID:a}),r()(u.a,{serverEntityID:i,providerEntityID:a},void 0,f))}});t.a=v},function(e,t,n){"use strict";function i(){return Object(v.createSelector)(Object(g.a)(),Object(m.a)(y.b.SETTINGS),function(e){return e.ui.providerSettingsPage},function(e,t,n){return{providerEntityID:e.entityID,settings:t.settings,isSettingsPending:t.isSettingsPending,isUpdatePending:n.isUpdatePending,updateError:n.updateError}})}
var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),n(11)),v=n(6),g=(n.n(v),n(79)),m=n(567),y=n(76),b=n(323),I=n(1200),S=n(3042),M={dispatchFetchProviderSettings:I.c,dispatchUpdateProviderSetting:I.f,dispatchClearProviderSettingUpdateError:I.b,dispatchClearProviderSettingFetchError:I.a,dispatchPopulateSettingsOptions:I.d},D=function(e){function t(){var n,i,r;s()(this,t);for(var a=arguments.length,o=Array(a),l=0;l<a;l++)o[l]=arguments[l]
;return n=i=c()(this,e.call.apply(e,[this].concat(o))),i.onUpdateErrorDismiss=function(){i.props.dispatchClearProviderSettingUpdateError({providerEntityID:i.props.providerEntityID})},i.onOptionsFetchErrorDismiss=function(e){i.props.dispatchClearProviderSettingFetchError({providerEntityID:i.props.providerEntityID,settingID:e})},i.onUpdateSetting=function(e,t){i.props.dispatchUpdateProviderSetting({providerEntityID:i.props.providerEntityID,settingID:e,values:t})},i.onSettingViewDetail=function(e){
i.props.dispatchPopulateSettingsOptions({providerEntityID:i.props.providerEntityID,settingID:e})},r=n,c()(i,r)}return d()(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.providerEntityID,n=e.settings;this._dispatchOnboarded(t,n),this.props.dispatchFetchProviderSettings({providerEntityID:t})},t.prototype._dispatchOnboarded=function(e,t){var n=t.find(function(e){return e.id===b.b.ONBOARDED});if(n&&!n.value){var i;this.props.dispatchUpdateProviderSetting({providerEntityID:e,
settingID:n.id,values:(i={},i[n.id]=!0,i)})}},t.prototype.render=function(){return a()(S.a,{showSpinner:this.props.isSettingsPending,settings:this.props.settings,isUpdatePending:this.props.isUpdatePending,updateError:this.props.updateError,onSettingViewDetail:this.onSettingViewDetail,onUpdateErrorDismiss:this.onUpdateErrorDismiss,onOptionsFetchErrorDismiss:this.onOptionsFetchErrorDismiss,onUpdateSetting:this.onUpdateSetting})},t}(h.Component);t.a=Object(f.b)(i,M)(D)},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(5),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(4),m=n(35),y=n(207),b=n(208),I=n(3045),S=n(3054),M=n(157),D=n(39),C=r()(M.a,{},void 0,r()(D.a,{})),O=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onTogglePress=function(e){var t=r.state[e];r.props.updateError&&r.props.onUpdateErrorDismiss(),t||r.props.onSettingViewDetail(e),r.setState(p.a.mapObject(r.state,function(n,i){return i===e&&!t}))
},r.state=r._getDefaultOpenState(),r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){!this.props.isUpdatePending||e.isUpdatePending||e.updateError||this.setState(this._getDefaultOpenState())},t.prototype._getDefaultOpenState=function(){return this.props.settings.reduce(function(e,t){return e[t.id]=!1,e},{})},t.prototype.render=function(){
var e=this,t=this.props,n=t.showSpinner,i=t.settings,a=t.isUpdatePending,o=t.updateError,s=t.onUpdateSetting,l=t.onUpdateErrorDismiss,c=t.onOptionsFetchErrorDismiss;return n?C:r()(y.a,{metricsPage:m.S,metricsPane:"settings"},void 0,r()(b.a,{},void 0,Object(g.default)("Personalize")),i.map(function(t){return t.hidden?null:r()(I.a,{title:t.label,setting:t,isOpen:e.state[t.id],isUpdating:a,updateError:o,onTogglePress:e.onTogglePress,onUpdateSetting:s,onUpdateErrorDismiss:l,
onOptionsFetchErrorDismiss:c},t.id,v.a.createElement(S.a,t))}))},t}(f.Component);t.a=O},function(e,t){e.exports={content:"SettingsPage-content-1vKVE PageContent-pageContent-16mK6"}},function(e,t){e.exports={header:"SettingsPageHeader-header-1ugtI"}},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(4),m=n(30),y=n(323),b=n(308),I=n(3051),S=n(3052),M=n(3053),D=function(e){function t(){var n,i,r
;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onTogglePress=function(){var e=i.props.setting.id;i.props.onTogglePress(e),i.props.setting.optionsError&&i.props.onOptionsFetchErrorDismiss(e)},i.onErrorDismiss=function(){var e=i.props.setting,t=e.updateError,n=e.optionsError,r=e.locationsError,a=e.id;t&&i.props.onUpdateErrorDismiss(),(n||r)&&i.props.onOptionsFetchErrorDismiss(a)},i.onSubmit=function(e){
i.props.onUpdateSetting(i.props.setting.id,e)},r=n,u()(i,r)}return p()(t,e),t.prototype.render=function(){var e=this.props.setting,t=e.summary,n=e.optionsError,i=e.locationsError,a=e.type,s=e.multiselect,l=this.props,c=l.updateError,u=(l.onUpdateSetting,l.onTogglePress,l.onUpdateErrorDismiss,l.onOptionsFetchErrorDismiss,
o()(l,["updateError","onUpdateSetting","onTogglePress","onUpdateErrorDismiss","onOptionsFetchErrorDismiss"])),d=c?Object(g.default)("Unable to save settings"):null,p=n||i?Object(g.default)("There was an error loading the options"):d;return a===y.c.GROUP?v.a.createElement(I.a,r()({},u,{errorMessage:p,onSubmit:this.onSubmit,onErrorDismiss:this.onErrorDismiss,onTogglePress:this.onTogglePress})):a===y.c.LOCATION?v.a.createElement(S.a,r()({},u,{errorMessage:p,onSubmit:this.onSubmit,
onErrorDismiss:this.onErrorDismiss,onTogglePress:this.onTogglePress})):a===y.c.SELECT&&s?v.a.createElement(M.a,r()({},u,{errorMessage:p,onSubmit:this.onSubmit,onErrorDismiss:this.onErrorDismiss,onTogglePress:this.onTogglePress})):a===y.c.DOUBLE?v.a.createElement(b.a,r()({closedNode:t},u,{errorMessage:p,onSubmit:this.onSubmit,onErrorDismiss:this.onErrorDismiss,onTogglePress:this.onTogglePress})):(m.a.warn("Unsupported provider setting type:[%s]",a),null)},t}(f.Component);t.a=D},function(e,t){
e.exports={sectionWrapper:"SettingsFormSection-sectionWrapper-1-gPg",section:"SettingsFormSection-section-1zYMP"}},function(e,t){e.exports={actionLinks:"SettingsFormSectionActionLinks-actionLinks-2vGv7"}},function(e,t){e.exports={isPressable:"CloseableFormSection-isPressable-3BPTn",isClosed:"CloseableFormSection-isClosed-37Gj8 CloseableFormSection-isPressable-3BPTn",isOpen:"CloseableFormSection-isOpen-vvIoP"}},function(e,t){e.exports={
sectionDetails:"SettingsFormSectionDetails-sectionDetails-2rJ3j"}},function(e,t){e.exports={sectionDetails:"SubmittableFormSection-sectionDetails-12m6E CloseableFormSection-isPressable-3BPTn SettingsFormSectionDetails-sectionDetails-2rJ3j",label:"SubmittableFormSection-label-1uVA_ FormLabel-label-2aLJ9 CloseableFormSection-isPressable-3BPTn",submitButton:"SubmittableFormSection-submitButton-2Dd-P",spinnerContainer:"SubmittableFormSection-spinnerContainer-3Jnpq"}},function(e,t,n){"use strict"
;function i(e){var t=e.setting,n=s()(e,["setting"]);return u.a.createElement(d.a,a()({closedNode:t.summary},n))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(308);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(308),m=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s]
;return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onSubmit=function(e){var t=e.location;i.props.onSubmit(t)},r=n,u()(i,r)}return p()(t,e),t.prototype._getCountryPostalCodeLabel=function(e,t){var n=[];return e?(n.push(e),t&&n.push(t),n.join(", ")):""},t.prototype.render=function(){var e=this.props,t=e.setting,n=o()(e,["setting"]);return v.a.createElement(g.a,r()({closedNode:this._getCountryPostalCodeLabel(t.countryLabel,t.postalCode),showSpinner:t.isLocationsPending},n,{
onSubmit:this.onSubmit}))},t}(f.Component);t.a=m},function(e,t,n){"use strict";function i(e){var t=e.setting,n=s()(e,["setting"]);return d.a.createElement(p.a,a()({closedNode:Object(l.default)("{1} selected",t.selectedCount),showSpinner:t.isOptionsPending},n))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(4),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(308);t.a=i},function(e,t,n){"use strict";function i(e){
if(e.postalCode&&!/^\d{5}$/.test(e.postalCode))return Object(p.default)("Postal Code is not in correct format")}function r(e){var t=e.id,n=e.type,i=e.multiselect,a=e.label,s=e.summary,c=e.country,u=e.locations,p=e.postalCode,I=e.value,S=e.options,M=e.settings,D=e.parentSetting;return n===f.c.GROUP?l()("div",{},void 0,M.map(function(t){return t.hidden?null:d.a.createElement(r,o()({key:t.id},t,{parentSetting:e}))})):n===f.c.BOOL?l()(v.a,{name:t,labelText:D.label||a,checkboxText:a,helpText:s,
initialValue:I}):n===f.c.DOUBLE?l()(y.a,{name:t,labelText:a,min:e.min,max:e.max,stepSize:e.step,initialValue:I}):n===f.c.LOCATION?l()(g.a,{name:t,labelText:a,helpText:s,initialValue:{country:c,postalCode:p},validations:b,countries:u}):n===f.c.SELECT&&i?l()(m.a,{labelText:a,helpText:s,options:S}):(h.a.warn("Unsupported provider setting type:[%s]",n),null)}var a=n(7),o=n.n(a),s=n(2),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(4),h=n(30),f=n(323),v=n(504),g=n(3055),m=n(3057),y=n(997),b=[i];t.a=r
},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(5),p=n.n(d),h=n(4),f=n(1),v=n.n(f),g=n(0),m=(n.n(g),n(146)),y=n(181),b=n(353),I=n(225),S=n(133),M=n(1171),D=n(3056),C=n.n(D),O=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onCountryChange=function(e){var t=r._calculateLocationState(e,r.state.postalCode,r.props.countries);r.setState(t,function(){r.props.onChange({country:t.country,postalCode:t.postalCode})})
},r.onPostalCodeChange=function(e){r.setState({postalCode:e},function(){r.props.onChange({country:r.state.country,postalCode:e})})},r.state=r._calculateLocationState(n.initialValue.country,n.initialValue.postalCode,n.countries),r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.state.country!==e.value.country,n=this.state.postalCode!==e.value.postalCode;if(this.props.countries!==e.countries||t||n){
var i=this._calculateLocationState(e.value.country,e.value.postalCode,e.countries);this.setState(i)}},t.prototype._getCountryOption=function(e,t){return t.find(function(t){return t.code===e})},t.prototype._countryHasPostalCode=function(e,t){var n=this._getCountryOption(e,t);return n&&"postalcode"===n.flavor},t.prototype._calculateLocationState=function(e,t,n){return{country:e,postalCode:this._countryHasPostalCode(e,n)&&t?t:""}},t.prototype._getSelectInputValues=function(e){
return e.map(function(e){var t;return t={},t[e.code]=e.title,t})},t.prototype._getPostalCodeMask=function(e,t){var n=this._getCountryOption(e,t).postalCodeFormat;return n?p.a.map(n,function(e){return"N"===e?/\d/:/\./}):[]},t.prototype.render=function(){var e=this.props,t=e.labelText,n=e.helpText,i=e.countries,a=e.showErrors,o=e.errors,s=e.onBlur,l=this.state,c=l.country,u=l.postalCode,d=o[0],p=0===i.length,f=this._countryHasPostalCode(c,i);return r()(y.a,{},void 0,r()(S.a,{name:"country"
},void 0,t),n&&r()(b.a,{className:C.a.help},void 0,n),r()(I.a,{name:"country",value:c,values:this._getSelectInputValues(i),isDisabled:p,onChange:this.onCountryChange}),f&&r()(S.a,{name:"postalCode",hasError:a,className:C.a.secondaryLabel},void 0,Object(h.default)("Postal Code"),a&&d&&" \u2014 "+d),f&&r()(M.a,{mask:this._getPostalCodeMask(c,i),name:"postalCode",value:u,isDisabled:p,hasError:a,onBlur:s,onChange:this.onPostalCodeChange}))},t}(g.Component);v.a.shape({country:v.a.string.isRequired,
postalCode:v.a.string});t.a=Object(m.a)(O)},function(e,t){e.exports={help:"LocationSettingInputGroup-help-3KxH7 FormHelp-help-3VCuq",secondaryLabel:"LocationSettingInputGroup-secondaryLabel-1RrMc FormLabel-label-2aLJ9"}},function(e,t,n){"use strict";function i(e){var t=e.labelText,n=e.helpText,i=e.options;return a()(c.a,{},void 0,a()(d.a,{},void 0,t),n&&a()(u.a,{className:f.a.help},void 0,n),a()("div",{className:f.a.multiSelectContainer},void 0,i.map(function(e){return a()("div",{
className:f.a.multiSelectItem},e.key,a()(v,{name:e.key,checkboxText:e.title,initialValue:e.selected}))})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(146)),c=n(181),u=n(353),d=n(133),p=n(290),h=n(3058),f=n.n(h),v=Object(l.a)(p.a);t.a=i},function(e,t){e.exports={multiSelectContainer:"MultiSelectInputGroup-multiSelectContainer-2ePye",multiSelectItem:"MultiSelectInputGroup-multiSelectItem-qpRtx",help:"MultiSelectInputGroup-help-FxDQr FormHelp-help-3VCuq"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(43)),s=n(40),l=n(56),c=n(1125),u=n(66),d=n(138),p=r()(d.a,{}),h=l.a.extend({component:function(e){var t=e.selectedServerID,n=Object(s.a)(o.m,t);return r()(u.a,{},void 0,p,r()(c.a,{serverEntityID:n}))}});t.a=h},function(e,t,n){"use strict";function i(){return Object(I.createSelector)(D.a,function(e){return e.isFirstRun},function(e,t){return v()({isFirstRun:t,isPollClient:Object(M.a)(),showEnterFullScreen:Object(S.a)()},e)})}
var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(7),v=n.n(f),g=n(1),m=(n.n(g),n(0)),y=n.n(m),b=n(11),I=n(6),S=(n.n(I),n(745)),M=n(451),D=n(209),C=n(1127),O=n(380),j=n(793),P=n(106),w=n(236),T=n(1206),E=n(3065),x=n(3078),N={dispatchResetAuthCodeExchange:w.e,dispatchSwitchAppLayout:P.i,dispatchSignInWithAuthToken:T.b},A=a()(C.a,{}),L=a()(x.a,{}),k=function(e){function t(){var n,i,r;c()(this,t)
;for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=d()(this,e.call.apply(e,[this].concat(o))),i.onSwitchLayoutPress=function(){i.props.dispatchSwitchAppLayout()},r=n,d()(i,r)}return h()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchResetAuthCodeExchange()},t.prototype.componentDidUpdate=function(e){this.props.authToken!==e.authToken&&this.props.authToken&&this.props.dispatchSignInWithAuthToken({authToken:this.props.authToken})},
t.prototype.render=function(){var e=this.props,t=e.providerID,n=e.showEnterFullScreen,i=(e.errorMessage,e.fatalErrorMessage),r=e.isFirstRun,a=e.isPollClient,o=(e.dispatchResetAuthCodeExchange,e.dispatchSwitchAppLayout,e.dispatchSignInWithAuthToken,s()(e,["providerID","showEnterFullScreen","errorMessage","fatalErrorMessage","isFirstRun","isPollClient","dispatchResetAuthCodeExchange","dispatchSwitchAppLayout","dispatchSignInWithAuthToken"]));return i?A:t?y.a.createElement(O.a,v()({component:j.a,
providerID:t},o)):a?y.a.createElement(E.a,v()({isFirstRun:r,showEnterFullScreen:n,onSwitchLayoutPress:this.onSwitchLayoutPress},o)):L},t}(m.Component);t.a=Object(b.b)(i,N)(k)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.email},function(e,t){return t.providerID},function(e,t){return t.userAuthToken},function(e,t){return t.code},function(e,t){return t.pinID},function(e,t){return t.errorMessage},function(e){return e.clientID},function(e){
return e.isFirstRun},function(e){return e.isSigningOut},function(e,t,n,i,r,d,p,h,f){if(f)return"https://plex.tv/users/sign_out";var v=Object(a.d)("metrics"),g=v.toJSON(),m=Object(u.a)(g.context||{}),y={clientID:p,context:m};if(!Object(c.a)()){var b=r?Object(l.a)(window.location.href,{pinID:r}):window.location.href;y.forwardUrl=b,h&&(y.skipSignInUrl=Object(s.a)(window.location.href,o.join(["#!/setup/skipSignIn"],{forwardUrl:b})))}return i&&(y.code=i),t&&(y.provider=t),e&&(y.email=e),
n&&(y.authToken=n),d&&(y.error=d),o.join(["https://app.plex.tv/auth",o.join(["#!/"],y)])})}var r=n(6),a=(n.n(r),n(15)),o=n(19),s=n(752),l=n(3062),c=n(451),u=n(3063);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=Object(l.a)(e),i=n.base,r=n.searchParams,c=n.hashPath,u=n.hashParams,d=Object(o.a)(u);return""+i+r+"#"+c+"?"+Object(s.a)(a()({},d,t))}var r=n(7),a=n.n(r),o=n(840),s=n(841),l=n(879);t.a=i},function(e,t,n){"use strict";function i(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.a.identity;return s()(e).forEach(function(n){t(e[n])||delete e[n]}),e}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.a.identity;return s()(e).forEach(function(n){e[n]=t(e[n])}),e}function a(e){return r(i(e),function(e){return c.a.isObject(e)?a(e):e})}var o=n(50),s=n.n(o),l=n(5),c=n.n(l);t.a=a},function(e,t,n){"use strict";function i(){return function(e,t,n){function i(){var t=c.get("pinID")
;l===t&&Object(a.a)(e,l).then(function(e){var t=e.authToken;t?c.set({authToken:t}):s()}).fail(function(e){c.set({code:null,pinID:null,isBusy:!1,fatalErrorMessage:e&&404===e.status?null:Object(r.default)("An error occurred")})})}function s(){setTimeout(i,2e3)}var l=t.pinID,c=Object(o.a)(e);s()}}var r=n(4),a=n(1205),o=n(479);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),
n(0)),v=n.n(f),g=n(11),m=n(236),y=n(209),b=n(380),I=n(3066),S={dispatchPreloadPIN:m.c,dispatchBeginPolling:m.b,dispatchStopPolling:m.g,dispatchSkipSignIn:m.f},M=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onSignInPress=function(){i.props.dispatchBeginPolling({pinID:i.props.pinID})},i.onStillTherePress=function(){i.props.dispatchPreloadPIN()},
i.onSkipSignInPress=function(){i.props.dispatchSkipSignIn()},r=n,u()(i,r)}return p()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchPreloadPIN()},t.prototype.componentWillUnmount=function(){this.props.dispatchStopPolling()},t.prototype.render=function(){var e=this.props,t=(e.dispatchPreloadPIN,e.dispatchBeginPolling,e.dispatchStopPolling,e.dispatchSkipSignIn,o()(e,["dispatchPreloadPIN","dispatchBeginPolling","dispatchStopPolling","dispatchSkipSignIn"]))
;return v.a.createElement(b.a,r()({component:I.a,onSignInPress:this.onSignInPress,onStillTherePress:this.onStillTherePress,onSkipSignInPress:this.onSkipSignInPress},t))},t}(f.Component);t.a=Object(g.b)(y.a,S)(M)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(0),p=(n.n(d),n(1)),h=(n.n(p),n(4)),f=n(3067),v=n(65),g=n(80),m=n(3069),y=n(22),b=n(3073),I=n(3075),S=n(3077),M=n.n(S),D=r()(f.a,{}),C=r()(m.a,{}),O=function(e){function t(n,i){
o()(this,t);var r=l()(this,e.call(this,n,i));return r.onSwitchToSkipSignInPress=function(){r.setState({isSkipSignInVisible:!0})},r.onStillTherePress=function(){r.setState({isSkipSignInVisible:!1}),r.props.onStillTherePress()},r.onSignInPress=function(){r.setState({isSkipSignInVisible:!1}),r.props.onSignInPress()},r.state={isSkipSignInVisible:!1},r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.to,n=e.code,i=e.isBusy,a=e.isFirstRun,o=e.showEnterFullScreen,s=e.onSwitchLayoutPress,l=e.onSkipSignInPress,c=!(i||n),u=!c,d=this.state.isSkipSignInVisible;return r()(g.a,{className:M.a.page,autoScroll:!0},void 0,o&&r()(I.a,{onSwitchLayoutPress:s}),a&&!d&&r()(y.a,{className:M.a.switchToSkipSignInLink,kind:v.PRIMARY,onPress:this.onSwitchToSkipSignInPress},void 0,Object(h.default)("What's this?")),D,r()("div",{className:M.a.container},void 0,d&&C,r()("div",{
className:M.a.section},void 0,u&&r()(b.a,{to:t,target:"_blank",type:"submit",isSpinning:!n,onPress:this.onSignInPress},void 0,Object(h.default)("Sign in")),c&&r()(y.a,{kind:v.PRIMARY,onPress:this.onStillTherePress},void 0,Object(h.default)("Are you still there?")))),d&&r()(y.a,{className:M.a.addendumLink,kind:v.PRIMARY,onPress:l},void 0,Object(h.default)("Skip and accept limited functionality")))},t}(d.Component);t.a=O},function(e,t,n){"use strict";function i(){return a()("div",{
className:l.a.plexImageContainer},void 0,a()("div",{className:l.a.plexImage}))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(3068)),l=n.n(s);t.a=i},function(e,t){e.exports={plexImage:"PlexHeaderImage-plexImage-2K4VH",plexImageContainer:"PlexHeaderImage-plexImageContainer-NE-7v"}},function(e,t,n){"use strict";function i(e){return a()(l.a,{},void 0,a()("div",{className:u.a.header},void 0,Object(s.default)("You must be signed in for Plex to work properly. If you are not signed in\u2026")),a()("ul",{
className:u.a.list},void 0,a()("li",{className:u.a.item},void 0,Object(s.default)("Any connections between your media server and players WILL NOT BE SECURE")),a()("li",{className:u.a.item},void 0,Object(s.default)("You may experience degraded streaming performance")),a()("li",{className:u.a.item},void 0,Object(s.default)("It will be more difficult, and sometimes impossible, to find your server and discover players")),a()("li",{className:u.a.item
},void 0,Object(s.default)("You will not be able to access your media server from outside your home")),a()("li",{className:u.a.item},void 0,Object(s.default)("You will not be able to access content and many features provided by Plex"))))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(4)),l=n(3070),c=n(3072),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.component,n=s()(e,["component"]);return u.a.createElement(t,a()({className:p.a.section},n))}
var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(3071),p=n.n(d);i.defaultProps={component:"div"},t.a=i},function(e,t){e.exports={section:"SignInFormSection-section-ugrmB"}},function(e,t){e.exports={header:"SkipSignInMessage-header-1uOTk",list:"SkipSignInMessage-list-_2WY9",item:"SkipSignInMessage-item-3-fcL"}},function(e,t,n){"use strict";function i(e){var t=e.className,n=s()(e,["className"]);return u.a.createElement(h.a,a()({className:t,kind:d.PRIMARY,size:p.LARGE},n))}
var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(65),p=n(61),h=n(102),f=n(3074),v=n.n(f);i.defaultProps={className:v.a.button},t.a=i},function(e,t){e.exports={button:"SignInButton-button-1SYIV SignInPage-button-1I3Ol SpinnerButton-button-1A8Ec Button-button-2kT68 Link-link-2n0yJ Button-large-3S9Ud"}},function(e,t,n){"use strict";function i(e){var t=e.onSwitchLayoutPress;return a()(u.a,{className:h.a.link,kind:c.DEFAULT,onPress:t
},void 0,Object(l.default)("Enter TV Full Screen"),a()(d.a,{className:h.a.icon,name:"plex-icon-tv-mode-enter-560"}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(65),u=n(22),d=n(26),p=n(3076),h=n.n(p);t.a=i},function(e,t){e.exports={link:"SwitchToTVLayoutLink-link-2Aq9X",icon:"SwitchToTVLayoutLink-icon-1RpyT"}},function(e,t){e.exports={page:"SignInLaunchPagePoll-page-1MNEQ",container:"SignInLaunchPagePoll-container-10QkU",section:"SignInLaunchPagePoll-section-11ige",
addendumLink:"SignInLaunchPagePoll-addendumLink-2n2Di",switchToSkipSignInLink:"SignInLaunchPagePoll-switchToSkipSignInLink-2eT_L"}},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(11),m=n(236),y=n(209),b=n(380),I=n(793),S={dispatchReadStoredPIN:m.d},M=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.componentDidMount=function(){
this.props.dispatchReadStoredPIN({shouldCreatePIN:!0})},t.prototype.render=function(){var e=this.props,t=e.pinID,n=(e.dispatchReadStoredPIN,o()(e,["pinID","dispatchReadStoredPIN"]));return t?v.a.createElement(b.a,r()({component:I.a,pinID:t},n)):null},t}(f.Component);t.a=Object(g.b)(y.a,S)(M)},function(e,t,n){"use strict";var i=n(3080),r=n.n(i),a=n(20),o=a.a.ItemView.extend({className:"logs-container",template:r.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=o},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,o,s="",l=this.escapeExpression;return s+='<textarea class="form-control">',(o=n.logs)?a=o.call(t,{hash:{},data:r}):(o=t&&t.logs,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),
s+=l(a)+"</textarea> "})},function(e,t,n){"use strict";var i=n(3082),r=n.n(i),a=n(20),o=n(15),s=n(38),l=a.a.ItemView.extend({template:r.a,initialize:function(){var e=o.d("appModel");this.listenTo(e,"change:primaryServer",this.render),this.listenTo(e.get("user"),"change:signedIn",this.render)},serializeData:function(){var e=o.d("appModel"),t=e.get("user"),n=e.get("primaryServer"),i={host:window.location.host,userAgent:window.navigator.userAgent,browser:s.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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"(Plex Pass)"}function l(e,t){var n,i="";return i+=' <p><span class="text-muted">Name:</span> '+h((n=e&&e.primaryServer,n=null==n||!1===n?n:n.friendlyName,
typeof n===p?n.apply(e):n))+'</p> <p><span class="text-muted">URL:</span> '+h((n=e&&e.primaryServerUrl,typeof n===p?n.apply(e):n))+'</p> <p><span class="text-muted">Version:</span> '+h((n=e&&e.primaryServer,n=null==n||!1===n?n:n.version,typeof n===p?n.apply(e):n))+'</p> <p><span class="text-muted">Token:</span> '+h((n=e&&e.primaryServer,n=null==n||!1===n?n:n.accessToken,typeof n===p?n.apply(e):n))+"</p> "}function c(e,t){return' <p><span class="text-muted">none</span></p> '}
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p="function",h=this.escapeExpression,f=this;return d+='<h3>Browser</h3> <p><span class="text-muted">Host:</span> '+h((u=t&&t.host,typeof u===p?u.apply(t):u))+'</p> <p><span class="text-muted">User Agent:</span> '+h((u=t&&t.userAgent,typeof u===p?u.apply(t):u))+'</p> <p><span class="text-muted">Name:</span> '+h((u=t&&t.browser,u=null==u||!1===u?u:u.name,
typeof u===p?u.apply(t):u))+'</p> <p><span class="text-muted">Version:</span> '+h((u=t&&t.browser,u=null==u||!1===u?u:u.version,typeof u===p?u.apply(t):u))+'</p> <p><span class="text-muted">Platform:</span> '+h((u=t&&t.browser,u=null==u||!1===u?u:u.platform,typeof u===p?u.apply(t):u))+'</p> <p><span class="text-muted">Mobile:</span> '+h(i(n(794)).call(t,(u=t&&t.browser,null==u||!1===u?u:u.mobile),{hash:{},data:o
}))+'</p> <h3>User</h3> <p><span class="text-muted">Username:</span> '+h((u=t&&t.user,u=null==u||!1===u?u:u.username,typeof u===p?u.apply(t):u))+" ",u=r.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:f.noop,fn:f.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+='</p> <p><span class="text-muted">Email:</span> '+h((u=t&&t.user,u=null==u||!1===u?u:u.email,typeof u===p?u.apply(t):u))+'</p> <p><span class="text-muted">Token:</span> '+h((u=t&&t.user,u=null==u||!1===u?u:u.accessToken,
typeof u===p?u.apply(t):u))+'</p> <h3>plex.tv</h3> <p><span class="text-muted">URL:</span> '+h((u=t&&t.cloudServerUrl,typeof u===p?u.apply(t):u))+'</p> <p><span class="text-muted">Available:</span> '+h(i(n(794)).call(t,(u=t&&t.cloudServer,null==u||!1===u?u:u.available),{hash:{},data:o}))+'</p> <p><span class="text-muted">Authorized:</span> '+h(i(n(794)).call(t,(u=t&&t.cloudServer,null==u||!1===u?u:u.authorized),{hash:{},data:o}))+"</p> <h3>Primary Server</h3> ",u=r.if.call(t,t&&t.primaryServer,{
hash:{},inverse:f.program(5,c,o),fn:f.program(3,l,o),data:o}),(u||0===u)&&(d+=u),d+=" "})},function(e,t,n){"use strict";var i=n(381),r=n.n(i),a=n(3084),o=a.a.extend({className:"container",template:r.a});t.a=o},function(e,t,n){"use strict";var i=n(4),r=n(382),a=r.a.extend({serializeData:function(){return{title:Object(i.default)("This plugin is not responding.")}}});t.a=a},function(e,t,n){"use strict";var i=n(382),r=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=r},function(e,t,n){"use strict";var i=n(381),r=n.n(i),a=n(3087),o=a.a.extend({className:"container",template:r.a});t.a=o},function(e,t,n){"use strict";var i=n(4),r=n(382),a=r.a.extend({initialize:function(e){this.type=e.type||"404"},serializeData:function(){var e,t;return"404"===this.type?(e=Object(i.default)("You must be lost."),
t=Object(i.default)("This page doesn't exist.")):"server"===this.type?(e=Object(i.default)("Media server not found."),t=Object(i.default)("The server you're trying to access doesn't seem to exist.")):(e=Object(i.default)("Media not found."),t=Object(i.default)("The media you're trying to access doesn't seem to exist.")),{title:e,subtitle:t}}});t.a=a},function(e,t,n){"use strict";var i=n(381),r=n.n(i),a=n(4),o=n(3089),s=o.a.extend({className:"container",template:r.a,serializeData:function(){
return{title:Object(a.default)("You don't have any media servers yet."),subtitle:Object(a.default)("{1}Download and install{2} one and try again.",'<a href="https://plex.tv/downloads" target="_blank">',"</a>")}}});t.a=s},function(e,t,n){"use strict";var i=n(382),r=i.a.extend({});t.a=r},function(e,t,n){"use strict";var i=n(381),r=n.n(i),a=n(3091),o=a.a.extend({className:"container",template:r.a});t.a=o},function(e,t,n){"use strict";var i=n(4),r=n(382),a=r.a.extend({serializeData:function(){
return{title:Object(i.default)("No soup for you!"),subtitle:Object(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=a},function(e,t,n){"use strict";var i=n(381),r=n.n(i),a=n(3093),o=a.a.extend({className:"container",template:r.a});t.a=o},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(4),o=n(17),s=n(382),l=s.a.extend({modelEvents:{"change:isResolved":"onResolvedChange"},
serializeData:function(){var e,t,n=this.model,i=n.get("friendlyName");return n.get("cloud")?n.get("isDownForMaintenance")?(e=Object(a.default)("Plex is down for maintenance."),t=Object(a.default)("Don't worry, it'll be back soon.")):(e=Object(a.default)("Plex is not reachable."),t=Object(a.default)("Make sure your server has an internet connection and any firewalls or other programs are set to allow access.")):(e=Object(a.default)("Server unavailable."),
t=i?Object(a.default)("We couldn't reach \"{1}\". Make sure it's online and try again.",r.a.escape(i)):Object(a.default)("We couldn't reach this server. Make sure it's online and try again.")),{title:e,subtitle:t}},onResolvedChange:function(e,t){t&&o.a.trigger("navigate:refresh")}});t.a=l},function(e,t,n){"use strict";var i=n(248),r=n(3095),a=i.a.extend({controller:new r.a,appRoutes:{"!/setup/skipSignIn?forwardUrl=:forwardUrl":"setupSkipSignIn","!/setup/library":"setupLibrary",
"!/setup/channels":"setupChannels","!/setup/complete":"setupComplete","!/setup(/:serverID)":"setupBasic"}});t.a=a},function(e,t,n){"use strict";var i=n(35),r=n(73),a=n(17),o=n(249),s=n(15),l=n(1209),c=n(3096),u=o.a.extend({setupBasic:function(e){var t;t=e?{serverID:e}:{primaryServer:!0},this.populateView(t).done(function(e){a.a.trigger("show:view",new c.a({model:e.server,subset:"setupBasic"}))})},setupLibrary:function(){this.populateView({primaryServer:!0}).done(function(e){
a.a.trigger("show:view",new c.a({model:e.server,subset:"setupLibrary"}))})},setupChannels:function(){this.populateView({primaryServer:!0}).done(function(e){a.a.trigger("show:view",new c.a({model:e.server,subset:"setupChannels"}))})},setupComplete:function(){this.populateView({primaryServer:!0}).done(function(e){a.a.trigger("show:view",new c.a({model:e.server,subset:"setupComplete"}))})},setupSkipSignIn:function(e){this.populateView({primaryServer:!0}).then(function(){
var e=Object(s.d)("appModel"),t=e.get("primaryServer");return Object(l.a)(t)}).then(function(){Object(s.d)("metrics").trackClick({page:i.Z,action:r.V,firstRun:!0}),window.location.href=e})}});t.a=u},function(e,t,n){"use strict";function i(e){return{setupSignIn:S.a,setupIntro:C.a,setupLoading:M.a,setupError:D.a,setupBasic:O.a,setupLibrary:j.a,setupComplete:P.a}[e]}
var r=n(3097),a=n.n(r),o=n(5),s=n.n(o),l=n(12),c=n.n(l),u=n(20),d=n(15),p=n(17),h=n(30),f=n(52),v=n(35),g=n(73),m=n(32),y=n(500),b=n(203),I=n(1209),S=n(1202),M=n(3098),D=n(3100),C=n(3102),O=n(3107),j=n(3109),P=n(3114),w={setupIntro:"intro",setupError:"error",setupBasic:"name",setupLibrary:"library",setupComplete:"complete"},T=["com.plexapp.agents.imdb","com.plexapp.agents.thetvdb","com.plexapp.agents.lastfm"],E=u.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","onSkipSignInChange"),(0,Object(d.d)("appStore").dispatch)(Object(b.a)({allowLightPreset:!1})),this.subset=e.subset||"setupIntro",this.attempts=0,
this._visitedSubsets={},h.a.info("Starting the setup wizard");var t=Object(d.d)("appModel");this.listenTo(t,"change:skipSignIn",this.onSkipSignInChange)},serializeData:function(){return{subset:this.subset}},renderSubset:function(){var e=this;if(this.model.get("shared"))return void this.navigate("setupError");var t=Object(d.d)("appModel"),n=t.get("user"),i=n.server,r=i.populate();r.done(this.whenRendered(function(){n.get("features").get(f.b)?e.navigate("setupLoading"):e.navigate("setupIntro")})),
r.fail(function(){t.get("primaryServer").get("desktop").get("settings").fetch().then(function(e){return!0===e.get("AcceptedEULA").get("value")?c.a.Deferred().resolve():c.a.Deferred().reject()}).then(e.whenRendered(function(){e.navigate("setupIntro")})).fail(e.whenRendered(function(){var n=t.get("skipSignIn"),r=i.get("isUnavailable");e.navigate(n||r?"setupIntro":"setupSignIn")}))})},start:function(){
if(this.attempts>=this.maxAttempts)return h.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)Object(h.a)("Waiting for server to start ("+e+")"),this.model.fetch().done(s.a.delay(this.start,500));else{var t=new y.a([],{server:this.model}),n=t.fetch({scope:"page",timeout:0});n.done(this.onAgentsSuccess),n.fail(this.onAgentsFail)}},navigate:function(e){
var t="setupIntro"===e,n="setupSignIn"===e,r="setupLoading"===e,a=i(e),o=w[e];this.previousSubset=this.subset,this.subset=e,o&&Object(d.d)("metrics").trackView({page:v.X,pane:o,firstRun:!0});var s=!this._visitedSubsets[e];this._visitedSubsets[e]=!0;var l=new a({model:this.model,isFirstRun:!0,isFirstVisitToSubset:s});this.container.show(l),this.ui.header.toggleClass("hidden",t||n),this.$el.addClass(e),this.previousSubset!==e&&this.$el.removeClass(this.previousSubset),r&&this.start()},
onRender:function(){Object(d.d)("appModel").set("isFirstRun",!0),this.renderSubset()},onClose:function(){Object(d.d)("appModel").set("isFirstRun",!1)},onAgentsSuccess:function(e){Object(h.a)("Looking for a core agent");var t=T.find(function(t){return e.get(t)});t?(Object(h.a)(t+" found"),Object(I.a)(this.model),m.a.execute("updateChannel",{server:this.model,silent:!0}).always(this.onUpdatesComplete)):(h.a.error("No core agents found"),this.navigate("setupError"))},onAgentsFail:function(){
h.a.warn("Unable to request agents"),s.a.delay(this.start,500)},onUpdatesComplete:function(){this.navigate("setupBasic")},onNavClick:function(e){e.preventDefault();var t=c()(e.currentTarget),n=t.data("subset");t.hasClass("segment-btn")&&"setupBasic"===this.subset&&this.container.currentView?(e.preventDefault(),this.container.currentView.submit()):(this.navigate(n),p.a.trigger("navigate",n,{trigger:!1}))},onDoneClick:function(e){e.preventDefault(),Object(d.d)("metrics").trackClick({page:v.X,
action:g.j,firstRun:!0}),p.a.trigger("navigate","dashboard")},onSkipSignInChange:function(){this.renderSubset()}});t.a=E},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression
;return s+='<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(3)).call(t,"Server Setup",{hash:{},data:o}))+'</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(3)).call(t,"Name",{hash:{},data:o
}))+'</a> </div> <div class="library-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupLibrary" href="#">'+l(i(n(3)).call(t,"Media Library",{hash:{},data:o}))+'</a> </div> <div class="complete-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupComplete" href="#">'+l(i(n(3)).call(t,"Finish",{hash:{},data:o}))+'</a> </div> </div> </div> </div> <div class="setup-container"></div> '})},function(e,t,n){"use strict"
;var i=n(3099),r=n.n(i),a=n(20),o=a.a.ItemView.extend({className:"setup-loading-container",template:r.a});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="";return s+='<div class="loading loading-inline"></div> <p class="loading-title">'+(0,this.escapeExpression)(i(n(3)).call(t,"Please wait a moment while Plex starts.",{hash:{},
data:o}))+"</p> "})},function(e,t,n){"use strict";var i=n(3101),r=n.n(i),a=n(20),o=a.a.ItemView.extend({className:"setup-error-container",template:r.a});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=" <h1>"+d(i(n(3)).call(e,"Setup is not allowed for shared servers.",{hash:{},data:t}))+"</h1> "}function l(e,t){var r=""
;return r+=" <h1>"+d(i(n(3)).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(3)).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"],
r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this.escapeExpression,p=this;return u+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> ',c=r.if.call(t,t&&t.shared,{hash:{},inverse:p.program(3,l,o),fn:p.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+=" </div> </div> "})},function(e,t,n){"use strict";var i=n(3103),r=n.n(i),a=n(20),o=n(3104),s=n.n(o),l=n(3105),c=n.n(l),u=n(3106),d=n.n(u),p=a.a.ItemView.extend({className:"setup-intro-container",template:r.a,
serializeData:function(){return{computerImg:s.a,mediaImg:c.a,playImg:d.a}}});t.a=p},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+='<h2 class="setup-intro-header">'+c(i(n(3)).call(t,"How Plex Works",{hash:{},data:o
}))+"</h2> <h4>"+c(i(n(3)).call(t,"Plex Media Server runs on the computer where you keep your media",{hash:{},data:o}))+'</h4> <img class="setup-intro-img setup-intro-computer-img" src='+c((s=t&&t.computerImg,"function"==typeof s?s.apply(t):s))+"> <h4>"+c(i(n(3)).call(t,"Plex scans your media, automatically organizes it, and makes it beautiful",{hash:{},data:o}))+'</h4> <img class="setup-intro-img setup-intro-media-img" src='+c((s=t&&t.mediaImg,
"function"==typeof s?s.apply(t):s))+"> <h4>"+c(i(n(3)).call(t,"Play your media on any screen with your favorite Plex app",{hash:{},data:o}))+'</h4> <img class="setup-intro-img setup-intro-play-img" src='+c((s=t&&t.playImg,"function"==typeof s?s.apply(t):s))+'> <p> <button class="next-btn btn btn-primary btn-lg" data-subset="setupLoading">'+c(i(n(3)).call(t,"Got it!",{hash:{},data:o}))+"</button> </p> "})},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,n){"use strict";var i=n(2),r=n.n(i),a=n(3108),o=n.n(a),s=n(5),l=n.n(s),c=n(12),u=n.n(c),d=n(20),p=n(0),h=(n.n(p),n(84)),f=n.n(h),v=n(11),g=n(15),m=n(4),y=n(17),b=n(151),I=n(114),S=n(32),M=n(532),D=d.a.ItemView.extend({className:"setup-basic-container",template:o.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=Object(g.d)("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(r()(v.a,{store:Object(g.d)("appStore")},void 0,r()(M.a,{metricsProperties:{context:I.l,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;return this.saveChanges().then(function(){return e.claimServer()})},saveChanges:function(){
return(l.a.isEmpty(this.changes)?u.a.Deferred().resolve().promise():this.collection.first().save(this.changes)).then(null,function(){y.a.trigger("show:alert",{type:"error",message:Object(m.default)("There was a problem saving these settings.")})})},claimServer:function(){var e=this;if(!this.model.supports("claimServer")||this.model.get("isClaimed")||this.model.get("superToken"))return u.a.Deferred().resolve().promise();var t=Object(g.d)("appModel"),n=t.get("cloudServer")
;return Object(b.a)(n.populate().then(function(){return S.a.execute("signInServer",{claim:!0,cloudAccount:e.model.get("desktop").get("cloudAccount")}).then(null,function(){y.a.trigger("show:alert",{type:"error",message:Object(m.default)("There was a problem claiming this server.")})})}))},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=D},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r,a=""
;return a+=' <div class="setup-basic-form-group form-group"> <p class="text-muted"> '+d(i(n(3)).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((r=e&&e.friendlyNameSetting,r=null==r||!1===r?r:r.id,typeof r===p?r.apply(e):r))+'" class="form-control" value="'+d((r=e&&e.friendlyNameSetting,r=null==r||!1===r?r:r.value,typeof r===p?r.apply(e):r))+'" placeholder="'+d((r=e&&e.server,
r=null==r||!1===r?r:r.friendlyName,typeof r===p?r.apply(e):r))+'"> </div> '}function l(e,t){var r,a="";return a+=' <div class="setup-basic-form-group form-group"> <div class="publish-checkbox checkbox"> <label for="'+d((r=e&&e.publishSetting,r=null==r||!1===r?r:r.id,typeof r===p?r.apply(e):r))+'"> <input type="checkbox" id="'+d((r=e&&e.publishSetting,r=null==r||!1===r?r:r.id,typeof r===p?r.apply(e):r))+'" checked> '+d(i(n(3)).call(e,"Allow me to access my media outside my home",{hash:{},data:t
}))+' </label> </div> <p class="text-muted"> '+d(i(n(3)).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"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this.escapeExpression,p="function",h=this;return u+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <h4>'+d(i(n(3)).call(t,"Great, we found a server!",{hash:{},data:o
}))+'</h4> <form id="setup-basic-form" class="settings-container"> ',c=r.if.call(t,t&&t.friendlyNameSetting,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+=" ",c=r.if.call(t,t&&t.publishSetting,{hash:{},inverse:h.noop,fn:h.program(3,l,o),data:o}),(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(3)).call(t,"Next",{hash:{},
data:o}))+'</span> </button> <button class="next-btn hidden" data-subset="setupLibrary"></button> </div> </form> </div> </div> <div class="modal-container"></div> '})},function(e,t,n){"use strict";var i=n(3110),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=n(17),c=n(15),u=n(52),d=n(619),p=n(3111),h=n(528),f=s.a.Layout.extend({className:"setup-library-container",template:r.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=Object(c.d)("appModel"),r=i.get("user"),a="/services/defaultLibraries";r.get("features").get(u.b)&&(a+="?includeAllLibraries=1");var s=new d.a([],{server:t,url:a});this.collection=n,this.model.supports("defaultSections")&&e.isFirstVisitToSubset&&o.a.when(s.populate(),n.populate()).done(function(){n.length||s.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 p.a({collection:this.collection}))},onAddSectionClick:function(e){e.preventDefault(),l.a.trigger("show:modal",new h.a({server:this.model}))}});t.a=f},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var s="",l=this.escapeExpression;return s+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <h4>'+l(i(n(3)).call(t,"Organize Your Media",{hash:{},data:o}))+'</h4> <p class="text-muted">'+l(i(n(3)).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:o
}))+'</p> <p class="setup-add-section-container"> <button class="add-section-btn btn btn-default">'+l(i(n(3)).call(t,"Add Library",{hash:{},data:o}))+'</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(3)).call(t,"Back",{hash:{},data:o}))+'</button> <button class="next-btn btn btn-primary btn-lg" data-subset="setupComplete">'+l(i(n(3)).call(t,"Next",{hash:{},data:o
}))+"</button> </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(63),r=n(3112),a=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(3113),r=n.n(i),a=n(20),o=n(17),s=n(32),l=n(528),c={artist:"music",movie:"film",photo:"picture",show:"display"},u=a.a.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:r.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)}),o.a.trigger("show:modal",n)},onDeleteClick:function(e){e.preventDefault(),
s.a.execute("deleteSection",{section:this.model})}});t.a=u},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,o,s="",l=this.escapeExpression
;return s+='<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 ',(o=n.icon)?a=o.call(t,{hash:{},data:r}):(o=t&&t.icon,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),s+=l(a)+'"></i> <span class="section-title"></span> </div> '})},function(e,t,n){
"use strict";var i=n(2),r=n.n(i),a=n(3115),o=n.n(a),s=n(5),l=n.n(s),c=n(12),u=n.n(c),d=n(20),p=n(0),h=(n.n(p),n(84)),f=n.n(h),v=n(11),g=n(4),m=n(17),y=n(463),b=n(35),I=n(73),S=n(114),M=n(15),D=n(850),C=n(52),O=n(768),j=n(728),P=n(299),w=n(3116),T=n(3120),E=n.n(T),x=d.a.ItemView.extend({className:"setup-complete-container",template:o.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","onDVRSetupModalClose"),this.collection=this.model.get("desktop").get("settings"),this.collection.populate({reset:!0}),this.changes={},this.isPlexPassLiteModalOpen=!1,this.isDVRSetupModalOpen=!1;var e=M.d("appModel"),t=e.get("user");t.get("isSignedIn")&&t.fetch().done(this.whenRendered(function(){var e=this;t.get("subscription").get("plan")===D.a?(this.isPlexPassLiteModalOpen=!0,
this.mountReact()):t.get("features").get(C.b)?this.fetchDVRs().then(function(){e.isDVRSetupModalOpen=!0,e.mountReact()},function(){e.ui.submitBtn.removeClass("active")}):this.ui.submitBtn.removeClass("active")}))},serializeData:function(){var e=this.collection.get("collectUsageData");return{devicesImg:E.a,collectUsageDataSetting:e?e.toJSON():null}},mountReact:function(){f.a.render(r()("div",{},void 0,r()(w.a,{metricsProperties:{context:S.l,firstRun:!0},isOpen:this.isPlexPassLiteModalOpen,
onModalClose:this.onPlexPassLiteModalClose}),this.isDVRSetupModalOpen&&r()(v.a,{store:M.d("appStore")},void 0,r()(O.a,{serverEntityID:this.model.entityID(),isModalOpen:this.isDVRSetupModalOpen,onModalClose:this.onDVRSetupModalClose}))),this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&f.a.unmountComponentAtNode(this.ui.modalContainer[0])},fetchDVRs:function(){var e=u.a.Deferred();return new j.a([],{server:this.model}).fetch().then(function(t){t.filter(function(e){
return!e.get("parentID")&&e.get("status")===P.b.ALIVE}).length?e.resolve():e.reject()},function(){e.reject()}),e.promise()},submit:function(){var e=this.ui.submitBtn;if(!e.hasClass("active")){e.addClass("active");this.save().always(this.whenRendered(function(){this.ui.doneBtn.click(),e.removeClass("active")}))}},save:function(){this.saved=!0,l.a.has(this.changes,"collectUsageData")&&!this.changes.collectUsageData&&M.d("metrics").trackClick({action:I.G,page:b.X,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()}),n=u.a.when(e,Object(y.a)(t));return n.fail(function(){m.a.trigger("show:alert",{type:"error",message:Object(g.default)("There was a problem saving these settings.")})}),n},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.saved||this.save(),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.ui.submitBtn.removeClass("active"),this.mountReact()},onDVRSetupModalClose:function(){this.isDVRSetupModalOpen=!1,this.ui.submitBtn.removeClass("active"),this.mountReact()}});t.a=x},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var a,o="";return o+=' <div class="checkbox"> <label for="'+p((a=e&&e.collectUsageDataSetting,a=null==a||!1===a?a:a.id,typeof a===d?a.apply(e):a))+'"> <input type="checkbox" id="'+p((a=e&&e.collectUsageDataSetting,a=null==a||!1===a?a:a.id,typeof a===d?a.apply(e):a))+'" name="'+p((a=e&&e.collectUsageDataSetting,a=null==a||!1===a?a:a.id,typeof a===d?a.apply(e):a))+'" value="1" ',a=r.if.call(e,(a=e&&e.collectUsageDataSetting,
null==a||!1===a?a:a.value),{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+="> "+p(i(n(3)).call(e,"Send anonymous usage data to Plex",{hash:{},data:t}))+' </label> </div> <p class="setup-complete-help text-muted"> '+p(i(n(3)).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"],r=this.merge(r,e.helpers),o=o||{}
;var c,u="",d="function",p=this.escapeExpression,h=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="'+p((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">'+p(i(n(3)).call(t,"Get Plex Apps",{hash:{},data:o
}))+'</a> </div> <p class="text-muted">'+p(i(n(3)).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:o}))+'</p> <form id="setup-complete-form" class="settings-container"> ',c=r.if.call(t,t&&t.collectUsageDataSetting,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),(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">'+p(i(n(3)).call(t,"Back",{hash:{},data:o}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading btn-lg active"> <div class="loading loading-sm"></div> <span class="btn-label">'+p(i(n(3)).call(t,"Done",{hash:{},data:o
}))+'</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){"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.onModalClose;return a()(p.a,{size:u.e.LARGE,isOpen:t,metricsPage:c.Q,metricsProperties:n,onModalClose:i},void 0,a()(h.a,{onModalClose:i},void 0,a()(f.a,{className:P.a.header},void 0,a()("div",{className:P.a.plexPassTitle
},void 0,Object(l.default)("Plex Pass Lite")),Object(l.default)("Congratulations! You qualify for a free year of Plex Pass Lite!")),a()(v.a,{innerClassName:P.a.body},void 0,a()(m.a,{img:b.a,title:Object(l.default)("Mobile Sync"),description:Object(l.default)("Enjoy your media offline on Android, iOS, and Windows devices")}),a()(m.a,{img:S.a,title:Object(l.default)("Camera Upload"),description:Object(l.default)("Sync photos from your mobile devices to Plex Media Server")}),a()(m.a,{img:D.a,
title:Object(l.default)("Cloud Sync"),description:Object(l.default)("Sync media to the cloud and enjoy it anywhere there\u2019s internet")}),a()(m.a,{img:O.a,title:Object(l.default)("Plex Home"),description:Object(l.default)("Parental controls and fast user switching")})),a()(g.a,{className:P.a.footer},void 0,a()(d.a,{kind:u.b.PRIMARY,size:u.e.LARGE,onPress:i},void 0,Object(l.default)("Hooray, thanks!")))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(4)),c=n(35),u=n(24),d=n(47),p=n(132),h=n(103),f=n(111),v=n(74),g=n(112),m=n(1087),y=n(1088),b=n.n(y),I=n(1089),S=n.n(I),M=n(3117),D=n.n(M),C=n(3118),O=n.n(C),j=n(3119),P=n.n(j);t.a=i},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8ZyBmaWxsPSIjQ0M3QjE5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1IDcpIj4KICAgIDxwYXRoIGQ9Ik0yOC44NDQsNy40MDcgQzI3LjU2NSw2LjE3MiAyNS45MDcsNS40ODQgMjQuMTM3LDUuNDQzIEMyMi40ODIsMi4zMjYgMTkuMjA0LDAuMzM0IDE1LjY2NiwwLjMzNCBDMTAuODQyLDAuMzM0IDYuODAyLDMuOTI3IDYuMTcsOC42MzkgQzQuODAyLDguNTM4IDMuNDMxLDguOTYyIDIuMzQ1LDkuODQ2IEMxLjA2NiwxMC44ODUgMC4zMzMsMTIuNDI2IDAuMzMzLDE0LjA3NCBDMC4zMzMsMTUuNjUxIDAuODIsMTYuOTMzIDEuNzgyLDE3Ljg3OSBDMy40MDEsMTkuNDc0IDUuNzkxLDE5LjUyMyA2LjA4NSwxOS41MjMgQzYuMDk4LDE5LjUyMyA2LjEwOCwxOS41MjMgNi4xMTMsMTkuNTIzIEM2LjQ4LDE5LjUxOCA2Ljc3NCwxOS4yMTUgNi43NjksMTguODQ3IEM2Ljc2NCwxOC40ODIgNi40NjUsMTguMTkgNi4xMDIsMTguMTkgQzYuMDk5LDE4LjE5IDYuMDk1LDE4LjE5IDYuMDkxLDE4LjE5IEM2LjA3NCwxOC4xODcgNC4wMiwxOC4yMTEgMi43MTgsMTYuOTI5IEMyLjAyMSwxNi4yNDIgMS42NjYsMTUuMjgxIDEuNjY2LDE0LjA3NCBDMS42NjYsMTIuODI5IDIuMjE5LDExLjY2NiAzLjE4NiwxMC44ODEgQzQuMTUzLDEwLjA5NiA1LjQwNiw5Ljc5MiA2LjYzLDEwLjA0NiBDNi44MjEsMTAuMDg1IDcuMDE3LDEwLjA0MiA3LjE3MSw5LjkyMyBDNy4zMjQsOS44MDYgNy40MTksOS42MjcgNy40MzEsOS40MzIgQzcuNjg4LDUuMDc5IDExLjMwNCwxLjY2NyAxNS42NjYsMS42NjcgQzE4LjgzNSwxLjY2NyAyMS43NjIsMy41MjQgMjMuMTIzLDYuMzk4IEMyMy4yMzYsNi42MzkgMjMuNDQ3LDYuNzk0IDIzLjc1MSw2Ljc3OSBDMjUuMjk5LDYuNzIyIDI2Ljc5OCw3LjI4NyAyNy45MTksOC4zNjcgQzI5LjA0NCw5LjQ1NCAyOS42NjYsMTAuOTE1IDI5LjY2NiwxMi40NzkgQzI5LjY2NiwxNy40NDIgMjQuNzE3LDE4LjE2NiAyNC41MDYsMTguMTk1IEMyNC4xNDIsMTguMjQ0IDIzLjg4NSwxOC41NzkgMjMuOTMzLDE4Ljk0MyBDMjMuOTgxLDE5LjMwNyAyNC4zMjYsMTkuNTcgMjQuNjgsMTkuNTE2IEMyNC43NDQsMTkuNTA4IDMxLDE4LjYyMyAzMSwxMi40NzkgQzMxLDEwLjU1IDMwLjIzNSw4Ljc0OCAyOC44NDQsNy40MDcgWiIvPgogICAgPHBhdGggZD0iTTE5Ljk1MSwxNS43NTYgQzE5LjYzNCwxNS45NDEgMTkuNTI0LDE2LjM0OCAxOS43MDgsMTYuNjY4IEMyMC4xMTcsMTcuMzczIDIwLjMzMywxOC4xOCAyMC4zMzMsMTkgQzIwLjMzMywyMS41NzMgMTguMjQsMjMuNjY3IDE1LjY2NiwyMy42NjcgQzEzLjA5MiwyMy42NjcgMTAuOTk5LDIxLjU3NCAxMC45OTksMTkgQzEwLjk5OSwxNi41MzIgMTIuOTMxLDE0LjUyNyAxNS4zNTksMTQuMzY0IEwxNC41MjgsMTUuMTk1IEMxNC4yNjgsMTUuNDU1IDE0LjI2OCwxNS44NzggMTQuNTI4LDE2LjEzOCBDMTQuNjU3LDE2LjI2OSAxNC44MjgsMTYuMzM0IDE0Ljk5OSwxNi4zMzQgQzE1LjE3LDE2LjMzNCAxNS4zNCwxNi4yNjkgMTUuNDcxLDE2LjEzOSBMMTcuNDcsMTQuMTM5IEMxNy41MzMsMTQuMDc4IDE3LjU4MiwxNC4wMDMgMTcuNjE1LDEzLjkyMiBDMTcuNjgyLDEzLjc1OSAxNy42ODIsMTMuNTc1IDE3LjYxNSwxMy40MTMgQzE3LjU4MiwxMy4zMyAxNy41MzIsMTMuMjU3IDE3LjQ3LDEzLjE5NiBMMTUuNDcxLDExLjE5NiBDMTUuMjExLDEwLjkzNiAxNC43ODgsMTAuOTM2IDE0LjUyOCwxMS4xOTYgQzE0LjI2OCwxMS40NTYgMTQuMjY4LDExLjg3OSAxNC41MjgsMTIuMTM5IEwxNS40MTUsMTMuMDI3IEMxMi4yMjQsMTMuMTYyIDkuNjY2LDE1Ljc3OSA5LjY2NiwxOS4wMDIgQzkuNjY2LDIyLjMxIDEyLjM1OCwyNS4wMDIgMTUuNjY2LDI1LjAwMiBDMTguOTc0LDI1LjAwMiAyMS42NjYsMjIuMzEgMjEuNjY2LDE5LjAwMiBDMjEuNjY2LDE3Ljk0NiAyMS4zODcsMTYuOTA5IDIwLjg2MSwxNi4wMDEgQzIwLjY3NiwxNS42ODEgMjAuMjY1LDE1LjU3NCAxOS45NSwxNS43NTggTDE5Ljk1MSwxNS43NTYgWiIvPgogIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8ZyBmaWxsPSIjQ0M3QjE5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0IDQpIj4KICAgIDxwYXRoIGQ9Ik0yNiAyNS4zMzNDMjUuMjY1IDI1LjMzMyAyNC42NjcgMjUuOTMyIDI0LjY2NyAyNi42NjYgMjQuNjY3IDI3LjE1MyAyNC45NDMgMjcuNTYyIDI1LjMzNCAyNy43OTRMMjUuMzM0IDI4LjY2NkMyNS4zMzQgMjkuMDM0IDI1LjYzMyAyOS4zMzMgMjYuMDAxIDI5LjMzMyAyNi4zNjkgMjkuMzMzIDI2LjY2OCAyOS4wMzQgMjYuNjY4IDI4LjY2NkwyNi42NjggMjcuNzk0QzI3LjA1OSAyNy41NjIgMjcuMzM1IDI3LjE1MyAyNy4zMzUgMjYuNjY2IDI3LjMzNSAyNS45MzEgMjYuNzM2IDI1LjMzMyAyNi4wMDIgMjUuMzMzTDI2IDI1LjMzM3pNMjAuNjUxIDguNjY3QzIwLjY1MSAzLjg4OCAxNy4zNjIgMCAxMy4zMTggMCA5LjI3NCAwIDUuOTg1IDMuODg4IDUuOTg1IDguNjY3IDUuOTg1IDExLjcxIDcuMzIxIDE0LjM4NiA5LjMzNCAxNS45MzJMOS4zMzQgMTguODYzIDMuMDk3IDIxLjA5MUMxLjI0NSAyMS43NTIuMDAxIDIzLjUxOS4wMDEgMjUuNDg2TC4wMDEgMjguNjY3Qy4wMDEgMjkuMDM1LjMgMjkuMzM0LjY2OCAyOS4zMzRMMTYuNjY4IDI5LjMzNCAxNi42NjggMjguMDAxIDEuMzM1IDI4LjAwMSAxLjMzNSAyNS40ODZDMS4zMzUgMjQuMDgxIDIuMjI0IDIyLjgxOSAzLjU0NiAyMi4zNDdMMTAuMjI2IDE5Ljk2MkMxMC40OTEgMTkuODY3IDEwLjY2OSAxOS42MTUgMTAuNjY5IDE5LjMzNEwxMC42NjkgMTYuNzM5QzExLjQ5MyAxNy4xMTggMTIuMzg1IDE3LjMzNCAxMy4zMiAxNy4zMzQgMTQuMjY3IDE3LjMzNCAxNS4xNzEgMTcuMTEzIDE2LjAwMyAxNi43MjVMMTYuMDAzIDE5LjMzNCAxNy4zMzYgMTkuMzM0IDE3LjMzNiAxNS45MTFDMTkuMzMyIDE0LjM2IDIwLjY1MyAxMS42OTUgMjAuNjUzIDguNjY3TDIwLjY1MSA4LjY2N3pNMTMuMzE3IDEuMzMzQzE2LjI1NiAxLjMzMyAxOC43MDIgMy45MyAxOS4yMTQgNy4zNDQgMTkuMjA2IDcuMzQ1IDE5LjE5OCA3LjM0NCAxOS4xOSA3LjM0NSAxNy4yNTMgNy43MiAxNi4wNTQgNy4wODggMTQuOTE1IDUuMDk2IDE0Ljc5NSA0Ljg4NSAxNC41OTYgNC43NDkgMTQuMzIzIDQuNzYgMTQuMDc5IDQuNzY0IDEzLjg1OCA0LjkwMSAxMy43NDQgNS4xMTkgMTMuMTMxIDYuMjk5IDExLjA2MSA3LjMzNCA5LjMxNiA3LjMzNCA4LjYzOSA3LjMzNCA4LjA1NiA3LjIyMSA3LjQ4MSA2Ljk4NSA4LjEwNiAzLjc1IDEwLjQ4MSAxLjMzNCAxMy4zMTYgMS4zMzRMMTMuMzE3IDEuMzMzek03LjMxNyA4LjY2N0M3LjMxNyA4LjU1OSA3LjMyNiA4LjQ1NCA3LjMzIDguMzQ2IDcuOTU3IDguNTU3IDguNjAzIDguNjY3IDkuMzE3IDguNjY3IDExLjE1IDguNjY3IDEzLjE1OCA3Ljc5NiAxNC4yOTcgNi42IDE1LjM2IDguMDc5IDE2LjYxMiA4Ljc4MSAxOC4yMDQgOC43ODEgMTguNTU2IDguNzgxIDE4LjkzMSA4LjczNiAxOS4zMTcgOC42NjggMTkuMzE3IDEyLjcxMSAxNi42MjUgMTYgMTMuMzE3IDE2IDEwLjAwOSAxNiA3LjMxNyAxMi43MTEgNy4zMTcgOC42Njd6Ii8+CiAgICA8cGF0aCBkPSJNMzEuMzMzLDIyLjY2NyBMMzAuNjY2LDIyLjY2NyBMMzAuNjY2LDIyIEMzMC42NjYsMTkuNDI3IDI4LjU3MywxNy4zMzMgMjUuOTk5LDE3LjMzMyBDMjMuNDI1LDE3LjMzMyAyMS4zMzIsMTkuNDI2IDIxLjMzMiwyMiBMMjEuMzMyLDIyLjY2NyBMMjAuNjY1LDIyLjY2NyBDMjAuMjk3LDIyLjY2NyAxOS45OTgsMjIuOTY2IDE5Ljk5OCwyMy4zMzQgTDE5Ljk5OCwzMS4zMzQgQzE5Ljk5OCwzMS43MDIgMjAuMjk3LDMyLjAwMSAyMC42NjUsMzIuMDAxIEwzMS4zMzIsMzIuMDAxIEMzMS43LDMyLjAwMSAzMS45OTksMzEuNzAyIDMxLjk5OSwzMS4zMzQgTDMxLjk5OSwyMy4zMzQgQzMxLjk5OSwyMi45NjYgMzEuNywyMi42NjcgMzEuMzMyLDIyLjY2NyBMMzEuMzMzLDIyLjY2NyBaIE0yMi42NjcsMjIgQzIyLjY2NywyMC4xNjMgMjQuMTYzLDE4LjY2NyAyNiwxOC42NjcgQzI3LjgzNywxOC42NjcgMjkuMzMzLDIwLjE2MyAyOS4zMzMsMjIgTDI5LjMzMywyMi42NjcgTDIyLjY2NiwyMi42NjcgTDIyLjY2NiwyMiBMMjIuNjY3LDIyIFogTTMwLjY2NywzMC42NjcgTDIxLjMzNCwzMC42NjcgTDIxLjMzNCwyNCBMMzAuNjY3LDI0IEwzMC42NjcsMzAuNjY3IFoiLz4KICA8L2c+Cjwvc3ZnPgo="
},function(e,t){e.exports={plexPassTitle:"PlexPassLiteModal-plexPassTitle-yydxI PlexPassModalContent-plexPassTitle-3B6zq",header:"PlexPassLiteModal-header-3v_OD PlexPassModalContent-header-2D-A9 ModalHeader-modalHeader-1Kf9R",body:"PlexPassLiteModal-body-X7IaQ PlexPassModalContent-body-3BSt2 ModalBody-innerModalBody-36gmb",footer:"PlexPassLiteModal-footer-iGi6c PlexPassModalContent-footer-15_IJ ModalFooter-modalFooter-30WIB"}},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,n){"use strict";var i=n(248),r=n(3122),a=i.a.extend({controller:new r.a,appRoutes:{"!/server/:serverID/search/:query":"search","!/provider/:providerID/search/:query":"providerSearch","!/server/:serverID(/provider/:providerID)":"provider","!/provider/:providerID":"cloudProvider","!/provider/:providerID/details":"providerPrePlay","!/server/:serverID(/provider/:providerID)/albums":"albums","!/server/:serverID(/provider/:providerID)/timeline":"timeline",
"!/server/:serverID(/provider/:providerID)/playlists":"playlists","!/server/:serverID(/provider/:providerID)/playlist?key=:key":"playlist","!/server/:serverID(/provider/:providerID)/details":"prePlay","!/transient/provider/:providerID/details":"transientPrePlay","!/server/:serverID?key=:sectionID":"section","!/server/:serverID/details?key=:key":"details"}});t.a=a},function(e,t,n){"use strict"
;var i=n(17),r=n(19),a=n(249),o=n(3123),s=n(3137),l=n(3141),c=n(3143),u=n(3144),d=n(3164),p=n(3301),h=n(3302),f=n(3306),v=n(3307),g=a.a.extend({search:function(e,t,n){this.populateView().done(function(){i.a.trigger("show:view",new o.a({selectedServerID:e,query:t,params:r.parseParams(n)}))})},providerSearch:function(e,t,n){this.populateView().done(function(){i.a.trigger("show:view",new s.a({selectedProviderID:e,query:t,params:r.parseParams(n)}))})},provider:function(e,t,n){
this.populateView().done(function(){i.a.trigger("show:view",new c.a({selectedServerID:e,selectedProviderID:t,params:r.parseParams(n)}))})},cloudProvider:function(e,t){this.populateView().done(function(){i.a.trigger("show:view",new l.a({selectedProviderID:e,params:r.parseParams(t)}))})},albums:function(e,t,n){this.populateView().done(function(){i.a.trigger("show:view",new u.a({selectedServerID:e,selectedProviderID:t,params:r.parseParams(n),isPlaylistRoute:!1}))})},timeline:function(e,t,n){
this.populateView().done(function(){i.a.trigger("show:view",new v.a({selectedServerID:e,selectedProviderID:t,params:r.parseParams(n)}))})},playlists:function(e,t,n){this.populateView().done(function(){i.a.trigger("show:view",new u.a({selectedServerID:e,selectedProviderID:t,params:r.parseParams(n)}))})},playlist:function(e,t,n,a){this.populateView().done(function(){i.a.trigger("show:view",new d.a({selectedServerID:e,selectedProviderID:t,key:n,params:r.parseParams(a)}))})},prePlay:function(e,t,n){
this.populateView().done(function(){i.a.trigger("show:view",new p.a({selectedServerID:e,selectedProviderID:t,params:r.parseParams(n)}))})},transientPrePlay:function(e,t){this.populateView().done(function(){i.a.trigger("show:view",new h.a({selectedProviderID:e,params:r.parseParams(t)}))})},providerPrePlay:function(e,t){this.populateView().done(function(){i.a.trigger("show:view",new f.a({selectedProviderID:e,params:r.parseParams(t)}))})},section:function(e,t){
var n=encodeURIComponent("/library/sections/"+t);this.provider(e,void 0,"key="+n)},details:function(e,t){this.prePlay(e,void 0,"key="+encodeURIComponent(t))}});t.a=g},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(43)),s=n(40),l=n(56),c=n(186),u=n(234),d=n(235),p=n(3124),h=n(138),f=n(66),v=l.a.extend({component:function(e){var t=e.selectedServerID,n=e.query,i=e.params,a=Object(s.a)(o.m,e.serverID);return r()(c.a,{metricsContext:i.context},void 0,r()(f.a,{},void 0,r()(h.a,{
serverEntityID:a}),r()(u.a,{machineIdentifier:e.selectedServerID},void 0,r()(d.a,{},void 0,r()(p.a,{machineIdentifier:t,serverEntityID:a,query:n})))))}});t.a=v},function(e,t,n){"use strict";function i(){return Object(I.createSelector)(function(e){return e.servers},function(e,t){return t.serverEntityID},D.a,C.a,function(e,t,n,i){var r=i.searchAllServers;return e.reduce(function(e,i){if(i!==t&&!r)return e;var a=n[i];return y.a.isMatch(a,{isConnected:!0,isFullServer:!0})?e.concat(i):e},[])})}
function r(){return Object(M.a)(i(),function(e){return e})}function a(){return Object(I.createSelector)(function(e){return e.ui.searchPage},r(),C.a,function(e,t,n){return{serverEntityIDs:t,searchAllServers:n.searchAllServers,isSearchPending:!!y.a.findWhere(e.searches,{isSearchPending:!0})}})}var o=n(7),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(5),y=n.n(m),b=n(11),I=n(6),S=(n.n(I),n(34)),M=n(195),D=n(218),C=n(100),O=n(570),j=n(106),P=n(3125),w={
populateSearchProviders:O.c,clearSearchPage:O.a,saveExperienceSettings:j.h},T=function(e){function t(){var n,i,r;c()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=d()(this,e.call.apply(e,[this].concat(o))),i.onSearchAllChange=function(e){Object(S.a)(function(){i.props.saveExperienceSettings({searchAllServers:e})})},r=n,d()(i,r)}return h()(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;Object(S.a)(function(){e.populateSearchProviders(e.serverEntityIDs)})},t.prototype.render=function(){return g.a.createElement(P.a,s()({},this.props,{onSearchAllChange:this.onSearchAllChange}))},t}(v.Component);t.a=Object(b.b)(a,w)(T)},function(e,t,n){
"use strict";function i(e){var t=e.serverEntityIDs,n=e.query,i=e.isSearchPending,r=e.searchAllServers,o=e.onSearchAllChange;return a()(u.a,{metricsPage:l.V,metricsProperties:{singleServer:!r},allowBackgroundLightPreset:!0,scrollDirection:c.NONE},void 0,a()(d.a,{isSearchPending:i,query:n,allowSearchAllServers:!0,searchAllServers:r,onSearchAllChange:o}),a()(p.a,{serverEntityIDs:t,query:n}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(35)),c=n(101),u=n(187),d=n(1210),p=n(3128);t.a=i
},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(4),m=n(75),y=n(108),b=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onThisServerPress=function(){i.props.onSearchAllChange(!1)},i.onAllServersPress=function(){i.props.onSearchAllChange(!0)},r=n,u()(i,r)}return p()(t,e),
t.prototype.render=function(){var e=this.props,t=e.isSearchAll,n=o()(e,["isSearchAll"]);return v.a.createElement(m.a,n,r()(y.a,{isSelected:!t,onPress:this.onThisServerPress},void 0,Object(g.default)("This Server")),r()(y.a,{isSelected:t,onPress:this.onAllServersPress},void 0,Object(g.default)("All Servers")))},t}(f.Component);t.a=b},function(e,t){e.exports={spinner:"SearchPageHeader-spinner-1_DoE",separator:"SearchPageHeader-separator-C3ELo"}},function(e,t,n){"use strict";function i(){
return Object(S.createSelector)(function(e,t){return t.serverEntityIDs},C.a,O.a,function(e,t,n){return e.reduce(function(e,i){return t[i].desktop.providers.forEach(function(t){var r=n[t];e[t]={serverEntityID:i,identifier:r.identifier,title:r.title}}),e},{})})}function r(){return Object(D.a)(i(),function(e){return e})}function a(){return Object(S.createSelector)(function(e){return e.ui.searchPage.searches},r(),function(e,t){var n=e.reduce(function(e,n){var i=n.providerEntityID,r=t[i]
;if(!r)return e;var a=e[r.identifier];return a||(a=e[r.identifier]={providerEntityID:i,title:r.title,isSearchPending:!1,isSearchPopulated:!1,hubs:{}}),n.isSearchPending&&(a.isSearchPending=!0),n.isSearchPopulated&&(a.isSearchPopulated=!0),n.hubs.forEach(function(e){var t=function(e){return{serverEntityID:r.serverEntityID,providerEntityID:i,searchResultEntityID:e}},n=e.metadataResults.map(t),o=e.tagResults.map(t),s=a.hubs[e.hubIdentifier];s?(s.size+=e.size,
s.results=s.results.concat(n,o)):a.hubs[e.hubIdentifier]={hubIdentifier:e.hubIdentifier,size:e.size,type:e.type,title:e.title,results:[].concat(n,o)}}),e},{});return g.a.map(n,function(e){return{providerEntityID:e.providerEntityID,title:e.title,isSearchPending:e.isSearchPending,isSearchPopulated:e.isSearchPopulated,hubs:g.a.values(e.hubs)}})})}function o(){return Object(S.createSelector)(r(),a(),j.a,function(e,t,n){return{availableProviders:e,isSearchCapable:!!f()(e).length,
searchAllServers:n.searchAllServers,columnAdjustment:n.columnAdjustment,providers:t}})}var s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(50),f=n.n(h),v=n(5),g=n.n(v),m=n(1),y=(n.n(m),n(0)),b=n.n(y),I=n(11),S=n(6),M=(n.n(S),n(34)),D=n(424),C=n(218),O=n(194),j=n(100),P=n(570),w=n(1211),T={fetchSearchPage:P.b,clearSearchPage:P.a},E=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.componentWillMount=function(){var e=this
;Object(M.a)(function(){e._clear(),e._populate()})},t.prototype.componentWillReceiveProps=function(e){var t=this,n=e.query!==this.props.query,i=e.availableProviders!==this.props.availableProviders;(n||i)&&Object(M.a)(function(){n&&t._clear(e),t._populate(e)})},t.prototype._clear=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props).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:30})},t.prototype.render=function(){return b.a.createElement(w.a,this.props)},t}(y.Component);t.a=Object(I.b)(o,T)(E)},function(e,t,n){"use strict";function i(e){return function(t){return d.a.createElement(I.a,l()({component:S.a},e,t))}}function r(e){var t=e.title,n=e.hubs,r=e.columnAdjustment,a=e.searchAllServers,s=e.isSearchPending,c=e.isSearchPopulated;return o()("div",{},void 0,o()("div",{role:"heading",
"aria-level":"2",className:D.a.providerTitle},void 0,t,s&&o()(m.a,{className:D.a.spinner,size:h.SMALL})),!n.length&&c?o()(b.a,{title:Object(p.default)("No Results"),description:Object(p.default)("Try a different query")}):n.map(function(e){var t=e.type,n=e.subtype,o=f.j,s=Object(v.b)(t,o,{subtype:e.subtype,isSearch:!0,isSearchAll:a});return d.a.createElement(y.a,l()({},e,{key:e.hubIdentifier,listType:t,listContext:o,keyPropName:"searchResultEntityID",size:e.results.length,items:e.results,
itemsOffset:0,layout:Object(g.a)(t,n,o,r,s.length),cellRenderer:i({listType:t,listContext:o,titleComponents:s})}))}))}var a=n(2),o=n.n(a),s=n(7),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(4),h=n(61),f=n(31),v=n(174),g=n(533),m=n(39),y=n(535),b=n(157),I=n(1120),S=n(3130),M=n(3135),D=n.n(M);t.a=r},function(e,t,n){"use strict";function i(e){var t=e.isMetadataItem,n=s()(e,["isMetadataItem"]);return t?u.a.createElement(d.a,a()({},n,{showSelect:!1})):u.a.createElement(p.a,n)}
var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(3131),p=n(3132);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{containerKey:e.skipParent?e.grandparentKey:e.parentKey}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(536);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(function(e,t){return t.listType
},function(e,t){return t.listSubtype},function(e,t){return t.listContext},function(e,t){return t.cellWidth},Object(d.a)(),function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=r.tagItem,o=a.tag,s=a.tagType,l=a.librarySectionType,c=Object(u.a)(i,null,e,t,a,n);return{tag:o,tagType:s,librarySectionType:l,imageWidth:c.width,imageHeight:c.height,imageUrl:c.url}})}function r(e){return s.a.createElement(p.a,e)}var a=n(1),o=(n.n(a),n(0)),s=n.n(o),l=n(11),c=n(6),u=(n.n(c),
n(228)),d=n(360),p=n(3133);t.a=Object(l.b)(i)(r)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.serverEntityID,i=e.providerEntityID,r=e.searchResultEntityID,o=e.imageWidth,s=e.imageHeight,c=e.imageUrl,f=e.tag,g=e.tagType,m=e.librarySectionType,y=e.cellX,b=e.cellY,I=e.cellWidth,S=e.cellHeight,M=e.showOffscreenPlaceholder,D=e.titleComponents,C=l.a.get(g),O=!!C&&C.isPerson;return a()(u.a,{className:t,cellX:y,cellY:b,cellWidth:I,cellHeight:S},void 0,a()("div",{
className:v.a.imageContainer},void 0,a()(d.a,{serverEntityID:n,providerEntityID:i,imageWidth:o,imageHeight:s,imageUrl:c,title:f,tagType:g,librarySectionType:m,isOffscreen:M}),a()(p.a,{className:(v.a.imageLink||"")+" "+(O&&v.a.isPerson||""||""),serverEntityID:n,providerEntityID:i,searchResultEntityID:r})),a()("div",{className:v.a.titleContainer},void 0,D.map(function(e,t){return a()(h.a,{serverEntityID:n,providerEntityID:i,searchResultEntityID:r,component:e,isSecondary:t>0},t)})))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(361)),c=n(124),u=n(93),d=n(751),p=n(1052),h=n(257),f=n(3134),v=n.n(f);t.a=Object(c.a)(i)},function(e,t){e.exports={titleContainer:"SearchTagPosterCell-titleContainer-2WMiU",imageContainer:"SearchTagPosterCell-imageContainer-244-T",imageLink:"SearchTagPosterCell-imageLink-GYb2j",isPerson:"SearchTagPosterCell-isPerson-3JJoq"}},function(e,t){e.exports={providerTitle:"SearchProviderHubs-providerTitle-3nGwS",
spinner:"SearchProviderHubs-spinner-1-T9U"}},function(e,t){e.exports={searchPageContent:"SearchPageContent-searchPageContent-2qlNl DashboardPage-dashboardPageContent-2rN8X PageContent-innerPageContent-3ktLT"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(43)),s=n(40),l=n(172),c=n(186),u=n(138),d=n(449),p=n(3138),h=n(56),f=n(66),v=h.a.extend({component:function(e){var t=e.selectedProviderID,n=e.query,i=e.params,a=l.a,h=Object(s.a)(o.m,a),v=Object(s.a)(o.k,t,h)
;return r()(c.a,{metricsContext:i.context},void 0,r()(f.a,{},void 0,r()(u.a,{selectedProviderEntityID:v}),r()(d.a,{serverEntityID:h,providerEntityID:v},void 0,r()(p.a,{providerEntityID:v,serverEntityID:h,providerIdentifier:t,query:n}))))}});t.a=v},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(function(e){return e.ui.searchPage},function(e){return{isSearchPending:!!g.a.findWhere(e.searches,{isSearchPending:!0})}})}
var r=n(13),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(5),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(148)),I=n(570),S=n(3139),M={dispatchChangeQuickSearchSettings:b.changeQuickSearchSettings,dispatchClearSearchPage:I.a},D=function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchChangeQuickSearchSettings({serverEntityID:this.props.serverEntityID,
providerEntityID:this.props.providerEntityID,providerIdentifier:this.props.providerIdentifier,sectionID:null})},t.prototype.componentDidUpdate=function(e){this.props.providerIdentifier!==e.providerIdentifier&&this.props.dispatchChangeQuickSearchSettings({serverEntityID:this.props.serverEntityID,providerEntityID:this.props.providerEntityID,providerIdentifier:this.props.providerIdentifier,sectionID:null})},t.prototype.componentWillUnmount=function(){this.props.dispatchClearSearchPage()},
t.prototype.render=function(){var e=this.props,t=(e.dispatchChangeQuickSearchSettings,e.dispatchClearSearchPage,a()(e,["dispatchChangeQuickSearchSettings","dispatchClearSearchPage"]));return f.a.createElement(S.a,t)},t}(h.Component);t.a=Object(m.b)(i,M)(D)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.query,r=e.isSearchPending;return a()(u.a,{metricsPage:l.V,metricsProperties:{singleServer:!0},allowBackgroundLightPreset:!0,scrollDirection:c.NONE
},void 0,a()(d.a,{isSearchPending:r,query:i,allowSearchAllServers:!1}),a()(p.a,{serverEntityID:t,providerEntityID:n,query:i}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(35)),c=n(101),u=n(187),d=n(1210),p=n(3140);t.a=i},function(e,t,n){"use strict";function i(){return Object(O.createSelector)(function(e,t){return t.serverEntityID},function(e,t){return t.providerEntityID},w.a,function(e,t,n){var i,r=n[t];return i={},i[t]={serverEntityID:e,identifier:r.identifier,title:r.title},i})}
function r(){return Object(P.a)(i(),function(e){return e})}function a(){return Object(O.createSelector)(function(e,t){return t.serverEntityID},function(e,t){return t.providerEntityID},function(e){return e.ui.searchPage.searches},r(),function(e,t,n,i){var r=i[t],a=n[0];if(!n.length)return[];var o=I.a.values(a.hubs).map(function(e){var n=function(e){return{serverEntityID:r.serverEntityID,providerEntityID:t,searchResultEntityID:e}},i=e.metadataResults.map(n),a=e.tagResults.map(n);return y()({},e,{
results:[].concat(i,a)})});return[{serverEntityID:e,providerEntityID:t,title:r.title,isSearchPending:a.isSearchPending,isSearchPopulated:a.isSearchPopulated,hubs:o}]})}function o(){return Object(O.createSelector)(r(),a(),T.a,function(e,t,n){return{availableProviders:e,isSearchCapable:!!g()(e).length,columnAdjustment:n.columnAdjustment,providers:t}})}var s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(50),g=n.n(v),m=n(7),y=n.n(m),b=n(5),I=n.n(b),S=n(1),M=(n.n(S),
n(0)),D=n.n(M),C=n(11),O=n(6),j=(n.n(O),n(34)),P=n(424),w=n(194),T=n(100),E=n(570),x=n(1211),N={dispatchFetchSearchPage:E.b,dispatchClearSearchPage:E.a},A=function(e){function t(){return u()(this,t),p()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.componentDidMount=function(){var e=this;Object(j.a)(function(){e._clear(),e._populate()})},t.prototype.componentDidUpdate=function(e){var t=this,n=e.query!==this.props.query,i=e.availableProviders!==this.props.availableProviders
;(n||i)&&Object(j.a)(function(){n&&t._clear(),t._populate()})},t.prototype._clear=function(){this.props.dispatchClearSearchPage()},t.prototype._populate=function(){this.props.dispatchFetchSearchPage({availableProviders:this.props.availableProviders,query:this.props.query,limit:30})},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchSearchPage,e.dispatchClearSearchPage,l()(e,["dispatchFetchSearchPage","dispatchClearSearchPage"]));return D.a.createElement(x.a,t)},t}(M.Component)
;t.a=Object(C.b)(o,N)(A)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(58)),s=n(1212),l=n(43),c=n(40),u=n(172),d=n(186),p=n(138),h=n(449),f=n(445),v=n(56),g=n(66),m=v.a.extend({component:function(e){var t=e.selectedProviderID,n=e.params||{},i=n.key,a=n.typeKey,v=n.type,m=n.filters,y=n.filterLabel,b=n.sort,I=n.folderKey,S=n.folderTitle,M=n.parentFolderKey,D=n.parentFolderTitle,C=n.limit,O=n.save,j=n.customFilter,P=u.a,w=Object(c.a)(l.m,P),T=Object(c.a)(l.k,t,w)
;return r()(d.a,{metricsContext:n.context},void 0,r()(g.a,{},void 0,r()(p.a,{selectedProviderEntityID:T}),r()(h.a,{serverEntityID:w,providerEntityID:T},void 0,r()(f.a,{machineIdentifier:P,serverEntityID:w,providerEntityID:T,directoryKey:i,typeKey:a,activeType:v,activeFilters:Object(s.a)(m),activeFilterLabel:y,activeSort:b,activeLimit:o.a.parseInteger(C),customFilter:o.a.parseBoolean(j),folderKey:I,folderTitle:S,parentFolderKey:M,parentFolderTitle:D,isTimeline:!1,
shouldSaveRoute:o.a.parseBoolean(O)}))))}});t.a=m},function(e,t,n){"use strict";function i(e,t,n){var i=[].concat(e);if(n.type===l.a){var r=s.a.findIndex(i,function(e){return e.key===t}),o=-1===r?0:r,c=a()({key:t},n);-1===r?i.push(c):i.splice(o,1,c)}else{s.a.findWhere(i,{key:t,value:n.value})||i.push(a()({key:t},n))}return i}t.a=i;var r=n(7),a=n.n(r),o=n(5),s=n.n(o),l=(n(33),n(265))},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),
n(58)),s=n(1212),l=n(43),c=n(40),u=n(56),d=n(186),p=n(138),h=n(66),f=n(234),v=n(235),g=n(445),m=r()(p.a,{}),y=u.a.extend({component:function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.params||{},a=i.key,u=i.typeKey,p=i.type,y=i.filters,b=i.filterLabel,I=i.sort,S=i.folderKey,M=i.folderTitle,D=i.parentFolderKey,C=i.parentFolderTitle,O=i.limit,j=i.save,P=i.customFilter,w=Object(c.a)(l.m,t),T=Object(c.a)(l.k,n,w);return r()(d.a,{metricsContext:i.context
},void 0,r()(h.a,{},void 0,m,r()(f.a,{machineIdentifier:t},void 0,r()(v.a,{providerEntityID:T},void 0,r()(g.a,{machineIdentifier:t,serverEntityID:w,providerEntityID:T,directoryKey:a,typeKey:u,activeType:p,activeFilters:Object(s.a)(y),activeFilterLabel:b,activeSort:I,activeLimit:o.a.parseInteger(O),customFilter:o.a.parseBoolean(P),folderKey:S,folderTitle:M,parentFolderKey:D,parentFolderTitle:C,isTimeline:!1,shouldSaveRoute:o.a.parseBoolean(j)})))))}});t.a=y},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(58)),s=n(43),l=n(40),c=n(56),u=n(138),d=n(66),p=n(186),h=n(234),f=n(235),v=n(445),g=n(3145),m=c.a.extend({component:function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.params||{},a=i.type,c=i.sort,m=i.save,y=!1!==e.isPlaylistRoute,b=i.key;b||(y=!0,b="/playlists");var I=Object(l.a)(s.m,t),S=Object(l.a)(s.k,n,I);return r()(p.a,{metricsContext:i.context},void 0,r()(d.a,{},void 0,r()(u.a,{isPlaylistRoute:y}),r()(h.a,{machineIdentifier:t
},void 0,r()(f.a,{providerEntityID:S},void 0,r()(v.a,{machineIdentifier:t,serverEntityID:I,providerEntityID:S,directoryKey:b,activeType:a,activeSort:c,shouldSaveRoute:o.a.parseBoolean(m),component:g.a})))))}});t.a=m},function(e,t,n){"use strict";function i(){return Object(d.createSelector)(function(e){return e.ui.playlistsPage.sorts},function(e,t){return t.activeSort},function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t.split(":"),i=n[0],r=n[1],a=c.a.findWhere(e,{isDefault:!0})||e[0],o=c.a.findWhere(e,{key:i})||a;return o&&r&&(o.direction=r),o})}function r(){return Object(d.createSelector)(function(e){return e.ui.playlistsPage},p.a,Object(h.a)(),Object(f.a)(),i(),v.a,function(e,t,n,i,r,a){var o=e.playlists,s=e.libraryDetails;return{providerIdentifier:t.identifier,
providerMetricsIdentifier:t.metricsIdentifier,metadataListEntityID:o,libraryKey:"/playlists"===n?null:n,librarySectionID:s&&s.librarySectionID,containerKey:i,selectedSort:r,activeSelectionType:a.activeSelectionType}})}function a(e,t){return{onLibraryChange:function(n,i){e(Object(g.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerIdentifier:n,sectionID:i}))}}}function o(e){var t=e.ui.playlistsPage;return{serverEntityID:t.serverEntityID,libraryKey:t.libraryKey,
containerKey:t.containerKey}}function s(e,t){e(m.b({serverEntityID:t.serverEntityID,libraryKey:t.libraryKey,containerKey:t.containerKey})),e(m.d()),t.libraryKey&&e(m.c())}var l=n(5),c=n.n(l),u=n(11),d=n(6),p=(n.n(d),n(37)),h=n(206),f=n(3146),v=n(88),g=n(148),m=n(1213),y=n(202),b=n(3157),I=Object(y.a)(b.a,o,s),S=Object(u.b)(r,a)(I);t.a=S},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.directoryKey},function(e,t){return t.activeType},function(e,t){
return t.activeSort},Object(l.a)(),function(e,t,n,i){var r=e.lastIndexOf("/")+1,l=parseInt(e.slice(r),10),u={type:Object(o.r)(o.i).id},d=Object(s.a)(i.version,c.a.multiplePlaylistTypes),p=i.ownerFeatures&&-1!==i.ownerFeatures.indexOf("photos-v5");return t?u.playlistType=t:!l&&d&&p&&(u.playlistType="audio,video"),n&&(u.sort=n),l&&(u.sectionID=l,u.includeEmpty=0),Object(a.join)("/playlists",u)})}t.a=i;var r=n(6),a=(n.n(r),n(19)),o=n(28),s=n(395),l=n(42),c=n(192)},function(e,t,n){"use strict"
;var i=n(23),r=n(3148),a=i.a.extend({name:"LibraryDirectoryCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"LibraryDirectoryModel",context:["server"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:i.a.string,title:i.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(3150),a=i.a.extend({name:"MetadataTypeCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict"
;var i=n(16),r=n(18),a=n(862),o=n(398),s=n(3151),l=r.a.extend({name:"MetadataTypeModel",context:["server"],idAttribute:"key",rootPropertyName:"Type",syncedAttrs:{type:i.a.string,subtype:i.a.string,key:i.a.string,title:i.a.string},syncedRelations:{filters:{relationClass:a.a,rootPropertyName:"Filter"},sorts:{relationClass:o.a,rootPropertyName:"Sort"},fields:{relationClass:s.a,rootPropertyName:"Field"}}});t.a=l},function(e,t,n){"use strict";var i=n(23),r=n(3152),a=i.a.extend({
name:"FieldCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"FieldModel",context:["server"],idAttribute:"key",rootPropertyName:"Field",syncedAttrs:{key:i.a.string,title:i.a.string,type:i.a.string,subType:i.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(3154),a=i.a.extend({name:"MetadataTypeCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(3155),o=r.a.extend({
name:"MetadataFieldTypeModel",context:["server"],idAttribute:"type",rootPropertyName:"FieldType",syncedAttrs:{type:i.a.string.isRequired},syncedRelations:{operators:{relationClass:a.a,rootPropertyName:"Operator"}}});t.a=o},function(e,t,n){"use strict";var i=n(23),r=n(3156),a=i.a.extend({name:"OperatorCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"OperatorModel",context:["server"],idAttribute:"key",
rootPropertyName:"Operator",syncedAttrs:{key:i.a.string,title:i.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(59)),f=n(35),v=n(101),g=n(187),m=n(158),y=n(373),b=n(3158),I=n(3160),S=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentDidMount=function(){
var e=this.props,t=e.librarySectionID,n=e.providerIdentifier,i=e.onLibraryChange;t&&i(n,t)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.librarySectionID,i=t.providerIdentifier,r=t.onLibraryChange;n&&n!==e.librarySectionID&&r(i,n)},t.prototype.componentWillUnmount=function(){this.props.onLibraryChange(null,null)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,a=e.providerMetricsIdentifier,o=e.selectedDirectory,s=e.selectedSort,l=e.activeType,c=e.activeSelectionType;return r()(g.a,{metricsPage:f.N,metricsProperties:{identifier:a,type:l},allowBackgroundLightPreset:!0,scrollDirection:v.NONE},void 0,c?r()(y.a,{serverEntityID:t,providerEntityID:n}):r()(I.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,selectedDirectory:o,selectedSort:s,activeType:l}),r()(m.a,{
serverEntityID:t,providerEntityID:n,metadataListEntityID:i,initialSize:50,isPhotoAlbums:o.type===h.c,shouldResetOnUnmount:!0,component:b.a}))},t}(p.Component);t.a=S},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.metadataItemEntityIDs,o=e.containerKey,s=e.columnAdjustment,d=e.totalSize,g=e.populatedRange,b=e.isPopulated,I=e.isPending,S=e.error,M=e.isPhotoAlbums,D=e.onPageRequest;return b&&d?a()(v.a,{className:m.a.pageContent,
scrollerClassName:m.a.pageContentScroller,serverEntityID:t,providerEntityID:n,metadataListEntityID:i,items:r,containerKey:o,listType:c.h,listContext:u.b,columnAdjustment:s,keyPropName:"metadataItemEntityID",itemsOffset:g.start,size:d,onPageRequest:D}):I?y:S?a()(f.a,{},void 0,a()(h.a,{title:M?Object(l.default)("There was an unexpected error loading these albums"):Object(l.default)("There was an unexpected error loading these playlists")})):a()(f.a,{},void 0,a()(p.a,{
title:Object(l.default)("Nothing to see here"),description:M?Object(l.default)("There are no photo albums in this library"):Object(l.default)("There are no playlists of this type")}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(229),u=n(31),d=(n(441),n(39)),p=n(182),h=n(262),f=n(261),v=n(1173),g=n(3159),m=n.n(g),y=a()(f.a,{},void 0,a()(p.a,{},void 0,a()(d.a,{})));t.a=i},function(e,t){e.exports={pageContent:"PlaylistsPageContent-pageContent-1Gnbv PageContent-pageContent-16mK6",
pageContentScroller:"PlaylistsPageContent-pageContentScroller-2RUW0"}},function(e,t,n){"use strict";function i(e,t){var n={};return t&&(n.type=t),e.activeSort&&(n.sort=e.activeSort.descKey),n.save=1,{type:t,title:r(t),route:Object(b.a)(e.server,e.provider,e.libraryKey,t,n)}}function r(e){switch(e){case h.d:return Object(p.default)("Video");case h.a:return Object(p.default)("Music");case h.c:return Object(p.default)("Photo");default:return Object(p.default)("All")}}function a(){
return Object(d.createSelector)(function(e,t){return t.selectedDirectory},function(e,t){return t.selectedSort},function(e,t){return t.activeType},function(e){return e.ui.playlistsPage.libraryDetails},function(e){return e.ui.playlistsPage.sorts},Object(v.a)(),Object(g.a)(),Object(m.a)(),Object(y.a)(),function(e,t,n,r){
var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments[5],s=arguments[6],l=arguments[7],c=arguments[8],u=o.ownerFeatures&&-1!==o.ownerFeatures.indexOf("photos-v5"),d=a.map(function(i){var r=i.key,a=i.defaultDirection,l=i.title,u=t.key===r,d=t.direction||a,p=d===C?O:C,h=u?p:d;return{key:r,title:l,isSelected:u,linkDirection:h,route:Object(b.a)(o,s,c,e.type,{type:n,sort:r+":"+h,save:1})}}),p={totalSize:l.totalSize,playlistSorts:d};if("/playlists"===c){var f={server:o,
provider:s,libraryKey:c,selectedSort:t},v=i(f),g=i(f,h.a),m=i(f,h.c),y=i(f,h.d);p.playlistTypes=u?[v,g,y]:[v,g,m,y]}else p.libraryRoute=Object(I.a)(o,s,c,{save:1}),p.isPhotoAlbums=u&&e.type===h.c,p.metadataTypes=r?r.types:[],p.metadataPseudoTypes=Object(S.a)({type:e.type,server:o,provider:s,libraryKey:c,libraryDirectories:r&&r.directories});return p})}var o=n(7),s=n.n(o),l=n(1),c=n.n(l),u=n(11),d=n(6),p=(n.n(d),
n(4)),h=n(59),f=n(327),v=n(42),g=n(79),m=n(159),y=n(206),b=n(776),I=n(122),S=n(561),M=n(3161),D=f.a.directions,C=D.ASCENDING,O=D.DESCENDING,j=Object(u.b)(a)(M.a);j.propTypes=s()({},j.propTypes,{selectedDirectory:c.a.shape({type:c.a.string.isRequired}).isRequired,selectedSort:c.a.shape({key:c.a.string.isRequired,direction:c.a.string.isRequired}),activeType:c.a.string}),t.a=j},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(5),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(4)),g=n(54),m=n(263),y=n(188),b=n(189),I=n(204),S=n(379),M=n(205),D=n(562),C=n(3162),O=n(3163),j=r()(I.a,{},void 0,r()(m.a,{})),P=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onTypesMenuButtonPress=function(e){r.setState({isTypesMenuOpen:!r.state.isTypesMenuOpen})},r.onTypesMenuClose=function(){r.setState({isTypesMenuOpen:!1})},
r.onSortsMenuButtonPress=function(e){r.setState({isSortsMenuOpen:!r.state.isSortsMenuOpen})},r.onSortsMenuClose=function(){r.setState({isSortsMenuOpen:!1})},r.state={isTypesMenuOpen:!1,isSortsMenuOpen:!1},r._typesMenuButtonID=Object(g.a)(),r._sortsMenuButtonID=Object(g.a)(),r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.totalSize,n=e.libraryRoute,i=e.playlistTypes,a=e.metadataTypes,o=e.metadataPseudoTypes,s=e.activeType,l=e.playlistSorts,c=e.selectedSort,u=e.isPhotoAlbums,d=this.state,h=d.isTypesMenuOpen,f=d.isSortsMenuOpen,g=u?Object(v.default)("Albums"):Object(v.default)("Playlists"),m=p.a.find(i,function(e){return e.type===s}),I=n||!m?g:m.title;return r()(y.a,{},void 0,r()(b.a,{},void 0,r()(M.a,{id:this._typesMenuButtonID,title:I,hasMenu:!0,isMenuOpen:h,
onPress:this.onTypesMenuButtonPress}),n?r()(D.a,{target:this._typesMenuButtonID,isOpen:h,libraryRoute:n,types:a,pseudoTypes:o,selectedType:{key:"playlists"},activeFilters:[],onMenuClose:this.onTypesMenuClose}):r()(C.a,{target:this._typesMenuButtonID,isOpen:h,activeType:s,types:i,onMenuClose:this.onTypesMenuClose}),!n&&r()(M.a,{title:g}),c&&r()(M.a,{id:this._sortsMenuButtonID,title:c.title,hasMenu:!0,isMenuOpen:f,onPress:this.onSortsMenuButtonPress}),c&&r()(O.a,{target:this._sortsMenuButtonID,
isOpen:f,sorts:l,onMenuClose:this.onSortsMenuClose}),r()(S.a,{},void 0,t)),j)},t}(f.Component);t.a=P},function(e,t,n){"use strict";function i(e){var t=e.activeType,n=e.types,i=s()(e,["activeType","types"]);return u.a.createElement(d.a,i,n.map(function(e){var n=e.type,i=e.title,r=e.route;return a()(p.a,{to:r,isSelected:t===n||!t&&!n},n||"all",i)}))}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(75),p=n(108);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.sorts,n=s()(e,["sorts"]);return u.a.createElement(h.a,n,t.map(function(e){var t=e.key,n=e.title,i=e.isSelected,r=e.linkDirection,o=e.route,s=r===v;return a()(f.a,{to:o,isSelected:i,selectedIconName:s?"plex-icon-sort-ascending-560":"plex-icon-sort-descending-560",selectedIconAriaLabel:s?Object(d.default)("Ascending"):Object(d.default)("Descending")},t,n)}))}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(4),p=n(327),h=n(75),f=n(108),v=p.a.directions.DESCENDING
;t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(43)),s=n(40),l=n(56),c=n(138),u=n(66),d=n(186),p=n(234),h=n(235),f=n(3165),v=r()(c.a,{isPlaylistRoute:!0}),g=l.a.extend({component:function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.key,a=e.params,l=Object(s.a)(o.m,t),c=Object(s.a)(o.k,n,l);return r()(d.a,{metricsContext:a.context},void 0,r()(u.a,{},void 0,v,r()(p.a,{machineIdentifier:t},void 0,r()(h.a,{providerEntityID:c},void 0,r()(f.a,{
machineIdentifier:t,serverEntityID:l,providerEntityID:c,metadataKey:i})))))}});t.a=g},function(e,t,n){"use strict";function i(e,t){return Object(s.createSelector)(function(e){return e.ui.playlistPage},l.a,c.a,function(e,t,n){var i=e.playlist,r=e.isPlaylistPending,a=e.playlistError;return{metadataItemEntityID:i,showSpinner:r,showError:!r&&!!a,columnAdjustment:t.columnAdjustment,activeSelectionType:n.activeSelectionType,multiSelectToolbarComponent:p.a}})}function r(e){var t=e.ui.playlistPage
;return{serverEntityID:t.serverEntityID,metadataKey:t.metadataKey}}function a(e,t){e(u.d({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataKey:t.metadataKey})),e(u.b())}var o=n(11),s=n(6),l=(n.n(s),n(100)),c=n(88),u=n(309),d=n(202),p=n(3166),h=n(1214),f=Object(d.a)(h.a,r,a),v=Object(o.b)(i)(f);t.a=v},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(l.a,function(e){return{isAlbum:e.activeSelectionType===s.c}})}function r(e,t){return{
onRemovePress:function(){e(c.h())}}}var a=n(11),o=n(6),s=(n.n(o),n(59)),l=n(88),c=n(309),u=n(3167);t.a=Object(a.b)(i,r)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.isAlbum,n=e.onRemovePress;return a()(d.a,{tooltip:t?Object(l.default)("Remove from Album"):Object(l.default)("Remove from Playlist"),tooltipAttachment:u.f.BOTTOM_RIGHT,onPress:n},void 0,p)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(26),u=n(24),d=n(127),p=a()(c.a,{
name:"plex-icon-toolbar-remove-from-playlist-560"});t.a=i},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(function(e,t){return t.metricsContext},function(e){return e.ui.prePlayPage},v.a,g.a,Object(d.a)(),Object(p.a)(),Object(h.a)(),m.a,y.a,Object(b.a)(),function(e,t,n,i,r,a,o,s,c,u){var d=a.librarySectionID,p=new RegExp("/"+d+"$"),h=l.a.find(r,function(e){return!!e.key&&p.test(e.key)
}),v=a.grandparentKey,g=a.parentKey,m=a.key,y=a.grandparentTitle,b=a.parentTitle,I=a.title,S=a.skipParent,O=Object(M.a)(c,f.h,u,a.subtype,i),j=Object(D.a)(u,a.subtype,f.h,i),P={};return e&&(P.context=e),{siblingsMetadataListEntityID:t.siblingList,server:n,provider:i,directories:r,selectedDirectory:h||l.a.first(r),metadataKey:m,siblingKey:o,grandparentTitle:y,parentTitle:b,title:I,skipParent:S,grandparentRoute:Object(C.a)(n,i,v,P),parentRoute:Object(C.a)(n,i,g,P),showArtworkButton:!!a.art,
isArtworkButtonSelected:s,listType:u,listStyle:O,allListStyles:j}})}function r(e,t){return{onArtworkToggle:function(t){e(Object(S.h)({showPrePlayArtwork:t}))}}}function a(e){return{siblingKey:e.ui.prePlayPage.siblingKey}}function o(e,t){e(Object(I.e)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,siblingKey:t.siblingKey}))}var s=n(5),l=n.n(s),c=n(6),u=(n.n(c),
n(57)),d=n(303),p=n(21),h=n(3169),f=n(31),v=n(48),g=n(37),m=n(1215),y=n(773),b=n(1216),I=n(369),S=n(106),M=n(775),D=n(560),C=n(134),O=n(202),j=n(3170),P=Object(O.a)(j.a,a,o),w=Object(u.a)(i,r)(P);t.a=w},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),function(e){if(e){var t=e.skipParent,n=t?e.grandparentKey:e.parentKey;if(n){var i=t?"grandchildren":"children";return a.join([n,i])}}})}t.a=i;var r=n(6),a=(n.n(r),n(19)),o=n(21)},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(29),v=n(31),g=n(54),m=(n(95),n(87),n(24)),y=n(81),b=n(26),I=n(127),S=n(158),M=n(778),D=n(263),C=n(188),O=n(189),j=n(204),P=n(205),w=n(446),T=n(555),E=n(3171),x=n(3175),N=n(3182),A=n(3185),L=n.n(A),k=r()(b.a,{name:"plex-icon-toolbar-artwork-560"}),_=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onDirectoriesMenuButtonPress=function(e){r.setState({
isDirectoriesMenuOpen:!r.state.isDirectoriesMenuOpen})},r.onDirectoriesMenuClose=function(){r.setState({isDirectoriesMenuOpen:!1})},r.onSiblingsMenuButtonPress=function(e){r.setState({isSiblingsMenuOpen:!r.state.isSiblingsMenuOpen})},r.onSiblingsMenuClose=function(){r.setState({isSiblingsMenuOpen:!1})},r.onToggleArtworkPress=function(e){r.props.onArtworkToggle(!r.props.isArtworkButtonSelected)},r.state={isDirectoriesMenuOpen:!1,isSiblingsMenuOpen:!1},r._directoriesMenuButtonID=Object(g.a)(),
r._siblingsMenuButtonID=Object(g.a)(),r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.siblingsMetadataListEntityID,o=e.server,s=e.provider,l=e.directories,c=e.selectedDirectory,u=e.metadataKey,d=e.grandparentTitle,p=e.parentTitle,f=e.title,g=e.skipParent,b=e.grandparentRoute,A=e.parentRoute,_=e.showArtworkButton,R=e.isArtworkButtonSelected,z=e.listType,U=e.listStyle,B=e.allListStyles,V=this.state,F=V.isDirectoriesMenuOpen,Q=V.isSiblingsMenuOpen;if(!u)return null
;var H=!o.isCloud&&!s.isLibraryProvider&&l.length>1,Y=!!a,W=z&&y.g(B,U);return r()(C.a,{className:Y||_&&!W?L.a.altPageHeader:L.a.pageHeader},void 0,r()(O.a,{},void 0,H&&r()(P.a,{id:this._directoriesMenuButtonID,title:c.title,hasMenu:!0,isMenuOpen:F,onPress:this.onDirectoriesMenuButtonPress}),H&&r()(w.a,{target:this._directoriesMenuButtonID,isOpen:F,server:o,provider:s,directories:l,selectedDirectory:c,onMenuClose:this.onDirectoriesMenuClose}),!!d&&r()(P.a,{title:d,to:b,hasMenu:!1,isDisabled:!b
}),!g&&!!p&&r()(P.a,{title:p,to:A,hasMenu:!1,isDisabled:!A}),!!f&&r()(P.a,{id:this._siblingsMenuButtonID,title:f,hasMenu:Y,isMenuOpen:Q,isDisabled:!Y,onPress:this.onSiblingsMenuButtonPress}),Y&&r()(S.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,component:E.a,initialSize:1/0,target:this._siblingsMenuButtonID,isOpen:Q,selectedKey:u,onMenuClose:this.onSiblingsMenuClose})),r()(j.a,{},void 0,r()(x.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),_&&r()(T.a,{
className:L.a.divider}),_&&r()(I.a,{tooltip:R?Object(h.default)("Hide Artwork"):Object(h.default)("Show Artwork"),"data-qa-id":"toolbarToggleArtwork",isSelected:R,hideOnPress:!1,tooltipAttachment:W||Y?m.f.BOTTOM_CENTER:m.f.BOTTOM_RIGHT,onPress:this.onToggleArtworkPress},void 0,k),W&&r()(M.a,{selectedListStyle:U,allListStyles:B}),W&&r()(D.a,{listType:z,listContext:v.h,selectedListStyle:U,allListStyles:B}),Y&&r()(T.a,{className:W?L.a.listStylesArrowsDivider:L.a.divider}),Y&&r()(N.a,{
serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataListEntityID:a})))},t}(p.Component);t.a=_},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityIDs,r=e.isPending,o=e.error,s=e.selectedKey,u=e.target,h=e.isOpen,g=e.onMenuClose,m=!!i.length,y=!m&&r,b=!m&&!r&&!!o,I=!m&&!y&&!b;return a()(d.a,{target:u,isOpen:h,size:c.e.LARGE,onMenuClose:g},void 0,y&&a()("span",{className:f.a.emptyContainer},void 0,v),b&&a()("span",{
className:f.a.emptyContainer},void 0,Object(l.default)("Unable to load items")),I&&a()("span",{className:f.a.emptyContainer},void 0,Object(l.default)("No items")),i.map(function(e){return a()(p.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:e,selectedKey:s},e)}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(24),u=n(39),d=n(75),p=n(3172),h=n(3174),f=n.n(h),v=a()(u.a,{});t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){
return t.selectedKey},function(e,t){return t.metricsContext},o.a,s.a,Object(l.a)(),function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a={};return t&&(a.context=t),{title:r.title,to:Object(c.a)(n,i,r.key,a),isSelected:e===r.key}})}var r=n(6),a=(n.n(r),n(57)),o=n(48),s=n(37),l=n(21),c=n(134),u=n(3173);t.a=Object(a.a)(i)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.to,i=e.isSelected;return a()(l.a,{to:n,isSelected:i},void 0,t)}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(108));t.a=i},function(e,t){e.exports={emptyContainer:"PrePlayPageHeaderSiblingsMenu-emptyContainer-zMrx0"}},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(l.a,c.a,d.a,Object(u.a)(),function(e,t,n,i){var r=i.type,a=i.subtype,s=i.title,l=i.viewedLeafCount,c=i.unviewedLeafCount,u=Object(v.p)(e,t,n,i),d=u.showMarkPlayed||u.showMarkUnplayed,p=!!t.protocols.livetv,h=e.isFullServer&&!!t.features.subscribe;return o()({
type:r,subtype:a,title:s,viewedLeafCount:l,unviewedLeafCount:c,isLiveTV:p,showRecord:h,showTogglePlayed:d},u)})}function r(e,t){var n={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,metricsPage:t.metricsPage};return{onPlayPress:function(){e(p.m(n))},onPlayLiveTVPress:function(){e(Object(h.l)(n))},onPlayTrailerPress:function(){e(p.n(n))},onShufflePress:function(){e(p.p(n))},onAddToPlaylistPress:function(){
e(f.addMetadataItemToPlaylist(n))},onMarkPlayedConfirm:function(){e(f.markMetadataItemPlayed(o()({},n,{skipConfirm:!0})))},onMarkUnplayedConfirm:function(){e(f.markMetadataItemUnplayed(o()({},n,{skipConfirm:!0})))},onEditPress:function(){e(f.editMetadataItem(n))},onSyncPress:function(){e(f.syncMetadataItem(n))},onGetInfoPress:function(){e(f.getMetadataItemInfo(n))}}}var a=n(7),o=n.n(a),s=n(6),l=(n.n(s),n(48)),c=n(37),u=n(21),d=n(144),p=n(60),h=n(155),f=n(120),v=n(201),g=n(57),m=n(3176)
;t.a=Object(g.a)(i,r)(m.a)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(4)),f=n(17),v=n(28),g=n(54),m=n(758),y=n(684),b=n(3177),I=n(759),S=n(3179),M=n(760),D=n(761),C=n(762),O=n(3180),j=n(1132),P=n(3181),w=n(764),T=n(551),E=n(994),x=n(231),N=n(995),A=["showPlay","showPlayTrailer","showShuffle","showAddToAlbum","showAddToPlaylist","showTogglePlayed","showEdit","showSettings","showSync"],L=["showPlayVersion","showPlayAll","showQueue","showPlayPlexMix","showPlayMusicVideo","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo"],k=function(e){
function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onPlayShortcut=function(){var e=r.props,t=e.showPlay,n=e.showPlayOverflow,i=e.onPlayPress;(t||n)&&i()},r.onTogglePlayedShortcut=function(){var e=r.props,t=e.showMarkPlayed,n=e.showMarkUnplayed;t?r.setState({isConfirmMarkPlayedModalOpen:!0}):n&&r.setState({isConfirmMarkUnplayedModalOpen:!0})},r.onEditShortcut=function(){var e=r.props,t=e.showEdit,n=e.showEditOverflow,i=e.onEditPress;(t||n)&&i()},r.onGetInfoShortcut=function(){
var e=r.props,t=e.showGetInfo,n=e.onGetInfoPress;t&&n()},r.onSettingsPress=function(e){r.setState({isSettingsModalOpen:!0})},r.onSettingsModalClose=function(){r.setState({isSettingsModalOpen:!1})},r.onRecordPress=function(e){r.setState({isSubscribeModalOpen:!0})},r.onSubscribeModalClose=function(){r.setState({isSubscribeModalOpen:!1})},r.onMarkPlayedPress=function(e){r.setState({isConfirmMarkPlayedModalOpen:!0})},r.onMarkPlayedConfirm=function(){r.setState({isConfirmMarkPlayedModalOpen:!1}),
r.props.onMarkPlayedConfirm()},r.onMarkPlayedCancel=function(){r.setState({isConfirmMarkPlayedModalOpen:!1})},r.onMarkUnplayedPress=function(e){r.setState({isConfirmMarkUnplayedModalOpen:!0})},r.onMarkUnplayedConfirm=function(){r.setState({isConfirmMarkUnplayedModalOpen:!1}),r.props.onMarkUnplayedConfirm()},r.onMarkUnplayedCancel=function(){r.setState({isConfirmMarkUnplayedModalOpen:!1})},r.onActionsPress=function(e){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen})},
r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.state={isActionsMenuOpen:!1,isConfirmMarkPlayedModalOpen:!1,isConfirmMarkUnplayedModalOpen:!1,isSubscribeModalOpen:!1,isSettingsModalOpen:!1},r._moreButtonID=Object(g.a)(),r}return u()(t,e),t.prototype.componentDidMount=function(){f.a.on("shortcut:playSelected",this.onPlayShortcut),f.a.on("shortcut:toggleWatched",this.onTogglePlayedShortcut),f.a.on("shortcut:edit",this.onEditShortcut),
f.a.on("shortcut:info",this.onGetInfoShortcut)},t.prototype.componentWillUnmount=function(){f.a.off("shortcut:playSelected",this.onPlayShortcut),f.a.off("shortcut:toggleWatched",this.onTogglePlayedShortcut),f.a.off("shortcut:edit",this.onEditShortcut),f.a.off("shortcut:info",this.onGetInfoShortcut)},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.serverEntityID,i=e.providerEntityID,a=e.metadataItemEntityID,o=e.type,s=e.subtype,l=e.title,c=e.viewedLeafCount,u=e.unviewedLeafCount,d=e.isLiveTV,p=e.showRecord,f=e.showPlay,g=e.showPlayOverflow,m=e.showPlayTrailer,A=e.showPlayTrailerOverflow,L=e.showShuffle,k=e.showShuffleOverflow,_=e.showAddToAlbum,R=e.showAddToAlbumOverflow,z=e.showAddToPlaylist,U=e.showAddToPlaylistOverflow,B=e.showAddToSaved,V=e.showTogglePlayed,F=e.showTogglePlayedOverflow,Q=e.showMarkPlayed,H=e.showMarkUnplayed,Y=e.showEdit,W=e.showEditOverflow,G=e.showSettings,K=e.showSettingsOverflow,q=e.showSync,Z=e.showSyncOverflow,X=e.showOverflow,J=e.onPlayPress,$=e.onPlayLiveTVPress,ee=e.onPlayTrailerPress,te=e.onShufflePress,ne=e.onAddToPlaylistPress,ie=e.onEditPress,re=e.onSyncPress,ae=this.state,oe=ae.isActionsMenuOpen,se=ae.isConfirmMarkPlayedModalOpen,le=ae.isConfirmMarkUnplayedModalOpen,ce=ae.isSubscribeModalOpen,ue=ae.isSettingsModalOpen
;return r()("div",{className:t},void 0,p&&r()(b.a,{title:l,onPress:this.onRecordPress}),f&&r()(I.a,{playLabel:Object(h.default)("Play"),onPress:d?$:J}),m&&r()(S.a,{onPress:ee}),L&&r()(M.a,{onPress:te}),_&&r()(D.a,{onPress:ne}),z&&r()(C.a,{onPress:ne}),V&&Q&&r()(O.a,{type:o,subtype:s,onPress:this.onMarkPlayedPress}),V&&H&&!Q&&r()(O.a,{type:o,subtype:s,markUnplayed:!0,onPress:this.onMarkUnplayedPress}),Y&&r()(j.a,{onPress:ie}),G&&r()(P.a,{onPress:this.onSettingsPress}),q&&r()(w.a,{onPress:re
}),X&&r()(T.a,{id:this._moreButtonID,icon:"plex-icon-toolbar-more-560",label:Object(h.default)("More..."),isMenuOpen:oe,onPress:this.onActionsPress}),r()(y.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,allowRedirectOnDelete:!0,showPlay:g,showPlayTrailer:A,showQueuePlexMix:!1,showShuffle:k,showAddToAlbum:R,showAddToPlaylist:U,showAddToSaved:B&&o!==v.k,showEdit:W,showSettings:K,showMarkPlayed:F&&Q,showMarkUnplayed:F&&H,showSync:Z,target:this._moreButtonID,isOpen:oe,
onMenuClose:this.onActionsMenuClose}),Q&&r()(E.a,{isOpen:se,type:o,subtype:s,title:l,leafCount:u,onConfirm:this.onMarkPlayedConfirm,onCancel:this.onMarkPlayedCancel}),H&&r()(E.a,{isOpen:le,type:o,subtype:s,title:l,leafCount:c,markUnplayed:!0,onConfirm:this.onMarkUnplayedConfirm,onCancel:this.onMarkUnplayedCancel}),r()(x.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,isOpen:ce,subscriptionType:o,onModalClose:this.onSubscribeModalClose}),r()(N.a,{serverEntityID:n,providerEntityID:i,
metadataItemEntityID:a,isOpen:ue,onModalClose:this.onSettingsModalClose}))},t}(p.Component);t.a=Object(m.a)(k,A,L)},function(e,t,n){"use strict";function i(e){var t=(e.title,c()(e,["title"]));return p.a.createElement(f.a,s()({tooltip:Object(h.default)("Record"),className:m.a.toolbarRecordButton,"data-qa-id":"toolbarRecord"},t),y)}var r=n(2),a=n.n(r),o=n(7),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(4),f=n(127),v=n(1059),g=n(3178),m=n.n(g),y=a()(v.a,{});t.a=i},function(e,t){
e.exports={toolbarRecordButton:"ToolbarRecordButton-toolbarRecordButton-2R8pz ToolbarButton-toolbarButton-3xzHJ PlayButton-playButton-3WX8X RecordIcon-recordIconContainer-1PXGA"}},function(e,t,n){"use strict";function i(e){return c.a.createElement(p.a,s()({tooltip:Object(u.default)("Play Trailer")},e),h)}var r=n(2),a=n.n(r),o=n(7),s=n.n(o),l=n(0),c=n.n(l),u=n(4),d=n(26),p=n(127),h=a()(d.a,{name:"plex-icon-toolbar-play-trailer-560"});t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.markUnplayed,n=e.onPress;return a()(u.a,{"data-qa-id":"toolbarToggleWatched",tooltip:t?Object(l.default)("Mark Unplayed"):Object(l.default)("Mark Played"),onPress:n},void 0,d)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(26),u=n(127),d=a()(c.a,{name:"plex-icon-toolbar-played-toggle-560"});i.defaultProps={markUnplayed:!1},t.a=i},function(e,t,n){"use strict";function i(e){return c.a.createElement(p.a,s()({tooltip:Object(u.default)("Settings"),
"data-qa-id":"toolbarSettings"},e),h)}var r=n(2),a=n.n(r),o=n(7),s=n.n(o),l=n(0),c=n.n(l),u=n(4),d=n(26),p=n(127),h=a()(d.a,{name:"plex-icon-settings-560"});t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e,t){return t.metadataItemEntityID},Object(o.a)(),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.metadataItems,i=n.indexOf(e),r=i+1,a=i-1,o=void 0,s=void 0;return a>-1&&(o=n[a]),r>0&&r<n.length&&(s=n[r]),{
previousMetadataItemEntityID:o,nextMetadataItemEntityID:s}})}var r=n(11),a=n(6),o=(n.n(a),n(159)),s=n(3183);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.previousMetadataItemEntityID,r=e.nextMetadataItemEntityID;return a()("div",{},void 0,a()(c.a,{serverEntityID:t,"data-qa-id":"toolbarPrevious",providerEntityID:n,metadataItemEntityID:i},void 0,u),a()(c.a,{serverEntityID:t,"data-qa-id":"toolbarNext",providerEntityID:n,
metadataItemEntityID:r},void 0,d))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(26)),c=n(3184),u=a()(l.a,{name:"plex-icon-page-prev-560"}),d=a()(l.a,{name:"plex-icon-page-next-560"});t.a=i},function(e,t,n){"use strict";function i(){return Object(v.createSelector)(function(e,t){return t.metricsContext},m.a,y.a,Object(b.a)(),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={};return e&&(r.context=e),{to:Object(S.a)(t,n,i.key,r),isDisabled:!i.key}})}
var r=n(13),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(6),g=(n.n(v),n(57)),m=n(48),y=n(37),b=n(21),I=n(369),S=n(134),M=n(127),D={dispatchPreFetch:I.g},C=function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentDidMount=function(){this._preFetch()},t.prototype.componentDidUpdate=function(e){this.props.metadataItemEntityID!==e.metadataItemEntityID&&this._preFetch()},
t.prototype._preFetch=function(){var e=this.props,t=e.metadataItemEntityID,n=e.isDisabled,i=e.dispatchPreFetch;n||i({metadataItemEntityID:t})},t.prototype.render=function(){var e=this.props,t=(e.serverEntityID,e.providerEntityID,e.metadataItemEntityID,e.dispatchPreFetch,e.metricsPage,e.metricsContext,a()(e,["serverEntityID","providerEntityID","metadataItemEntityID","dispatchPreFetch","metricsPage","metricsContext"]));return f.a.createElement(M.a,t)},t}(h.Component);t.a=Object(g.a)(i,D)(C)
},function(e,t){e.exports={pageHeader:"PrePlayPageHeader-pageHeader-2o14F PageHeader-pageHeader-18RSw",altPageHeader:"PrePlayPageHeader-altPageHeader-3bZbS PrePlayPageHeader-pageHeader-2o14F PageHeader-pageHeader-18RSw",divider:"PrePlayPageHeader-divider-WQRk8 PageHeaderDivider-pageHeaderDivider-DvwUq",listStylesArrowsDivider:"PrePlayPageHeader-listStylesArrowsDivider-1OrTC PageHeaderDivider-pageHeaderDivider-DvwUq"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(45)),f=n.n(h),v=n(1082),g=n(29),m=n(72),y=n(261),b=n(3187),I=n(3300),S=n.n(I),M=parseInt(f.a.pagePadding,10),D=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onScrollPositionChange=function(e){var t=e.scrollTop;r.setState({scrollTop:t})},r.onContentMeasure=function(e){var t=e.width,n=e.height,i=e.y;(t||n)&&r.setState({isMeasured:!0,pageWidth:t,pageHeight:n,
pageY:i})},r.state={scrollTop:0,isMeasured:!1,pageWidth:0,pageHeight:0,pageY:0},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(g.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataListEntityID,o=e.columnAdjustment,s=e.record,l=e.allEpisodes,c=this.state,u=c.scrollTop,d=c.isMeasured,p=c.pageWidth,h=c.pageHeight,f=c.pageY;return r()(m.a,{className:S.a.prePlayPageContentContainer,
onMeasure:this.onContentMeasure},void 0,r()(y.a,{className:S.a.prePlayPageContent,scrollTop:u,onScrollPositionChange:this.onScrollPositionChange},void 0,d&&r()(b.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataListEntityID:a,pageWidth:p,pageHeight:h,posterWidth:Object(v.a)(p,o),posterTop:f+M,scrollTop:u,record:s,allEpisodes:l})))},t}(p.Component);t.a=D},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(Object(h.a)(),function(e){
return!(!e||!e.isPopulated)})}function r(){return Object(c.createSelector)(u.a,Object(d.a)(),Object(p.a)(),v.a,g.a,m.a,Object(y.a)(),i(),function(e){return!!e.remotePlayer},function(e,t,n,i,r,a,o,s,l){var c=t.thumb||t.parentThumb||t.grandparentThumb,u=t.grandparentArt||t.parentArt||t.art,d=t.grandparentTheme||t.parentTheme||t.theme,p=i?u||c:c||u,h=Object(D.a)(a,f.h,o,t.subtype,e);return{librarySectionID:t.librarySectionID,providerIdentifier:e.identifier,
providerMetricsIdentifier:e.metricsIdentifier,metadataKey:t.key,descendantKey:n,title:t.title,type:t.type,subtype:t.subtype,year:t.year,minYear:t.minYear,maxYear:t.maxYear,summary:t.summary,saved:t.saved,thumb:t.thumb,parentThumb:t.parentThumb,grandparentThumb:t.grandparentThumb,composite:t.composite,art:i?u:void 0,theme:r?d:void 0,backgroundImageUrl:p,playlistType:t.playlistType,isListReady:s,onDeckMetadataItemEntityID:t.onDeck,extrasMetadataListEntityID:t.extras,
popularLeavesMetadataListEntityID:t.popularLeaves,listType:o,listStyle:h,isRemotePlayer:l}})}function a(e,t){return{onLibraryChange:function(n,i){e(Object(b.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,providerIdentifier:n,sectionID:i}))},onBackgroundChange:function(n){e(Object(S.a)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,imageUrl:n}))},onThemeMusicChange:function(n){e(Object(S.b)({serverEntityID:t.serverEntityID,
providerEntityID:t.providerEntityID,theme:n}))},onMirrorDetails:function(){e(Object(M.g)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID}))}}}function o(e){return{descendantKey:e.ui.prePlayPage.descendantKey}}function s(e,t){e(Object(I.c)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,descendantKey:t.descendantKey}))}var l=n(11),c=n(6),u=(n.n(c),
n(37)),d=n(21),p=n(3188),h=n(159),f=n(31),v=n(1215),g=n(3189),m=n(773),y=n(1216),b=n(148),I=n(369),S=n(203),M=n(222),D=n(775),C=n(202),O=n(3190),j=Object(C.a)(O.a,o,s),P=Object(l.b)(r,a)(j);t.a=P},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),function(e){if(e&&e.childrenKey){var t=e.key,n=e.skipChildren?"grandchildren":"children";return a.join([t,n])}})}t.a=i;var r=n(6),a=(n.n(r),n(19)),o=n(21)},function(e,t,n){"use strict";function i(e){
return e.experienceSettings.playThemeMusic}t.a=i},function(e,t,n){"use strict";function i(e,t,n){if(!e)return _.a;var i=b.c.EPG_IDENTIFIER.test(n),r=i?U:R,a=z[t],o=r[e];return(a?a[e]||o:o)||k.a}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(8),d=n.n(u),p=n(9),h=n.n(p),f=n(10),v=n.n(f),g=n(1),m=(n.n(g),
n(0)),y=n.n(m),b=n(55),I=n(3191),S=n(3192),M=n(3208),D=n(3214),C=n(3230),O=n(3234),j=n(3241),P=n(3242),w=n(3243),T=n(3244),E=n(3245),x=n(3256),N=n(3263),A=n(3264),L=n(3297),k=n(3298),_=n(3299),R={movie:S.a,show:D.a,season:j.a,episode:P.a,artist:E.a,album:x.a,photoalbum:N.a,clip:S.a,playlist:A.a,collection:L.a},z={podcast:{show:O.a,track:w.a}},U={movie:M.a,show:C.a,episode:T.a},B=function(e){function t(){return d()(this,t),h()(this,e.apply(this,arguments))}return v()(t,e),
t.prototype.componentDidMount=function(){this.props.onLibraryChange(this.props.providerIdentifier,this.props.librarySectionID),this.props.onBackgroundChange(this.props.backgroundImageUrl),this.props.onThemeMusicChange(this.props.theme),this.props.isRemotePlayer&&this.props.onMirrorDetails()},t.prototype.componentDidUpdate=function(e){
var t=this.props,n=t.librarySectionID,i=t.providerIdentifier,r=t.backgroundImageUrl,a=t.theme,o=t.isRemotePlayer,s=t.onLibraryChange,l=t.onBackgroundChange,c=t.onThemeMusicChange,u=t.onMirrorDetails;n!==e.librarySectionID&&s(i,n),e.backgroundImageUrl!==r&&l(r),e.theme!==a&&c(a),!e.isRemotePlayer&&o&&u()},t.prototype.componentWillUnmount=function(){this.props.onLibraryChange(null,null)},t.prototype.render=function(){
var e=this.props,t=e.providerIdentifier,n=e.providerMetricsIdentifier,r=e.type,o=e.subtype,l=e.art,u=e.listStyle,d=(e.onBackgroundChange,c()(e,["providerIdentifier","providerMetricsIdentifier","type","subtype","art","listStyle","onBackgroundChange"])),p=i(r,o,t);return s()(I.a,{identifier:n,type:r,style:u,showArtwork:!!l},void 0,y.a.createElement(p,a()({type:r,subtype:o,art:l,listStyle:u},d)))},t}(m.Component);t.a=B},function(e,t,n){"use strict";function i(e,t){var n=t.metricsPage
;return c.a.createElement(u.a,a()({},e,{page:n}))}var r=n(7),a=n.n(r),o=n(1),s=n.n(o),l=n(0),c=n.n(l),u=n(284);i.contextTypes={metricsPage:s.a.string.isRequired},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.extrasMetadataListEntityID,o=e.metadataKey,s=e.title,g=e.type,m=e.year,y=e.summary,b=e.thumb,I=e.art,S=e.pageWidth,M=e.pageHeight,D=e.posterWidth,C=e.posterTop,O=e.scrollTop;return a()(d.a,{serverEntityID:t,
providerEntityID:n,metadataItemEntityID:i,metadataKey:o,type:g,thumb:b,art:I,pageWidth:S,pageHeight:M,scrollTop:O,posterWidth:D,posterTop:C},void 0,a()(v.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,extrasMetadataListEntityID:r,title:s,year:m,summary:y}),a()(u.a,{},void 0,a()(c.a,{},void 0,a()(p.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),!!r&&a()(h.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataListEntityID:r,
title:Object(l.default)("Extras")}),a()(f.a,{serverEntityID:t,providerEntityID:n}))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(107),u=n(149),d=n(150),p=n(268),h=n(795),f=n(177),v=n(1107);t.a=i},function(e,t){e.exports={innerContent:"PrePlayMetadataListInnerContent-innerContent-2CsIz"}},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.width,r=e.height,o=e.url;return s()(d.a,{serverEntityID:t,providerEntityID:n,background:!0,
backgroundPosition:"top center",minSize:!0,transition:!0,transitionProps:a()({className:h.a.imageContainer,style:{width:i,height:r}},u.a),width:i,height:r,url:o})}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(339)),d=n(169),p=n(3195),h=n.n(p);t.a=i},function(e,t){e.exports={imageContainer:"PrePlayArtwork-imageContainer-3dXG6"}},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataKey,o=e.type,s=e.subtype,c=e.posterType,u=e.pageHeight,h=e.posterWidth,v=e.posterTop,m=e.posterUrl,y=e.showLinkOnly,b=c||o,I=h,S=Object(d.d)(I,b,s,l.h);return S>u-g&&(S=u-g,I=Object(d.e)(S,b,s,l.h)),a()("div",{style:{position:"fixed",top:v}},void 0,a()(p.a,{cardFaceClassName:f.a.face,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:r,type:o,subtype:s,imageWidth:I,imageHeight:S,imageUrl:m,
showLink:!1,showSelect:!1,showEdit:!1,showMore:!1,showLinkOnly:y}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(31)),c=n(45),u=n.n(c),d=n(121),p=n(297),h=n(3197),f=n.n(h),v=parseInt(u.a.pagePadding,10),g=2*v+40;t.a=i},function(e,t){e.exports={face:"PrePlayPosterCard-face-3rQEj MetadataPosterCardFace-face--dz_D MetadataPosterCardFace-poster-L2P6r"}},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.posterWidth;return a()("div",{className:t,style:{
paddingLeft:i+60}},void 0,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3199)),c=n.n(l);i.defaultProps={className:c.a.content},t.a=i},function(e,t){e.exports={content:"PrePlayMetadataContent-content-2ww3j"}},function(e,t,n){"use strict";function i(e){return function(t){return d.a.createElement(m.a,l()({},e,t))}}function r(e){var t=e.listType,n=e.listSubtype,r=e.listContext,a=e.serverEntityID,s=e.providerEntityID,c=e.server,u=e.provider,d=e.librarySectionKey,h=e.roles
;if(!h)return null;var m=Object(f.b)(t,r);return o()("div",{className:b.a.castList},void 0,o()(g.a,{hubIdentifier:"cast",title:Object(p.default)("Cast"),size:h.length,listType:t,listContext:r,columnAdjustment:1,keyPropName:"uniqueID",items:h.map(function(e){return l()({},e,{uniqueID:e.id+"!"+e.role})}),layout:Object(v.a)(t,n,r,1,m.length),cellRenderer:i({listType:t,listContext:r,serverEntityID:a,providerEntityID:s,server:c,provider:u,librarySectionKey:d,titleComponents:m})}))}
var a=n(2),o=n.n(a),s=n(7),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(4),h=n(31),f=n(174),v=n(533),g=(n(95),n(87),n(535)),m=n(3201),y=n(3203),b=n.n(y);r.defaultProps={listType:"actor",listContext:h.h},t.a=r},function(e,t,n){"use strict";function i(e){
var t=e.listType,n=e.serverEntityID,i=e.providerEntityID,r=e.server,o=e.provider,s=e.librarySectionKey,l=e.titleComponents,f=e.thumb,g=e.id,m=e.tag,y=e.role,b=e.filter,I=e.cellX,S=e.cellY,M=e.cellWidth,D=e.cellHeight,C=e.showOffscreenPlaceholder,O={filters:b||"actor="+g,filterLabel:m};return a()(d.a,{cellX:I,cellY:S,cellWidth:M,cellHeight:D},void 0,a()(u.a,{className:v.a.cardLink,to:Object(c.a)(r,o,s,O)},void 0,a()(p.a,{serverEntityID:n,providerEntityID:i,imageWidth:M,imageHeight:M,imageUrl:f,
title:m,tagType:t,isOffscreen:C},g||m)),a()("div",{className:v.a.titleContainer},void 0,l.map(function(e,t){return a()(h.a,{server:r,provider:o,librarySectionKey:s,tag:m,role:y,filter:b,component:e,isSecondary:t>0},t)})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(124)),c=(n(95),n(87),n(122)),u=n(22),d=n(93),p=n(751),h=n(257),f=n(3202),v=n.n(f);t.a=Object(l.a)(i)},function(e,t){e.exports={cardLink:"PrePlayCastCell-cardLink-Tndv5",titleContainer:"PrePlayCastCell-titleContainer-PAy29"}
},function(e,t){e.exports={castList:"PrePlayCastList-castList-3dQB5"}},function(e,t,n){"use strict";function i(e){return l.a.createElement(u.a,a()({className:p.a.extrasHubCell,hubIdentifier:"extras"},e))}var r=n(7),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(31),u=n(1092),d=n(3205),p=n.n(d);i.defaultProps={listType:"extra",listContext:c.h,columnAdjustment:1},t.a=i},function(e,t){e.exports={extrasHubCell:"PrePlayExtrasList-extrasHubCell-2NcGK HubCell-hubCell-3Ys17"}},function(e,t,n){"use strict"
;function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.relatedHubEntityIDs;return e.showSpinner?a()("div",{className:d.a.spinnerContainer},void 0,p):a()(c.a,{className:d.a.relatedList,serverEntityID:t,providerEntityID:n,hubEntityIDs:i,columnAdjustment:1})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(39)),c=n(733),u=n(3207),d=n.n(u),p=a()(l.a,{});t.a=i},function(e,t){e.exports={relatedList:"PrePlayRelatedList-relatedList-2fY8S",
spinnerContainer:"PrePlayRelatedList-spinnerContainer-RG3Px"}},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataKey,o=e.title,s=e.type,d=e.year,j=e.summary,P=e.thumb,w=e.art,T=e.pageWidth,E=e.pageHeight,x=e.scrollTop,N=e.posterWidth,A=e.posterTop,L=e.record;return a()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,attribution:S.a,metadataKey:r,type:s,thumb:P,art:w,pageWidth:T,pageHeight:E,scrollTop:x,
posterWidth:N,posterTop:A},void 0,a()(c.a,{},void 0,a()(p.a,{},void 0,a()(v.a,{},void 0,o)),a()(h.a,{},void 0,a()(v.a,{},void 0,d)),a()(f.a,{},void 0,a()(M.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,record:L}),a()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),O,a()(c.a,{},void 0,a()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(D.a,{metadataItemEntityID:i},void 0,a()(C.a,{metadataItemEntityID:i,showFullTime:!0,showChannel:!0
})),a()(y.a,{},void 0,j),a()(u.a,{},void 0,a()(c.a,{},void 0,a()(b.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(I.a,{serverEntityID:t,providerEntityID:n})))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(150)),c=n(107),u=n(149),d=n(125),p=n(136),h=n(183),f=n(184),v=n(96),g=n(370),m=n(300),y=n(147),b=n(268),I=n(177),S=n(796),M=n(1217),D=n(1219),C=n(1221),O=a()(d.a,{});t.a=i},function(e,t,n){var i=n(71),r=n(3210);e.exports=i({},r,{})},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",headerFontSize:"24px",lineHeightComputed:"1.71428571"}},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.type,o=e.duration,s=e.isSubscribed,p=e.subscriptionType,f=e.grandparentSubscriptionType,v=e.showRecord,g=e.record;return a()(c.a,{},void 0,a()(l.a,{className:h.a.duration,duration:o}),a()(u.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),v&&a()(d.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,type:r,isSubscribed:s,subscriptionType:p,grandparentSubscriptionType:f,isSubscribeModalOpen:g}))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(520)),c=n(96),u=n(543),d=n(1218),p=n(3213),h=n.n(p);t.a=i},function(e,t){e.exports={recordButton:"EPGPrePlayRecordButton-recordButton-1Y_Dw PrePlayStatusButton-statusButton-28XJ7 Button-default--yDCH",recordingIcon:"EPGPrePlayRecordButton-recordingIcon-15EDB",recordIcon:"EPGPrePlayRecordButton-recordIcon-3SHaD"}},function(e,t){e.exports={duration:"EPGPrePlayStatusLeftTitle-duration-1W91h"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(29),v=(n(81),n(712)),g=n(711),m=n(72),y=n(86),b=n(158),I=n(150),S=n(107),M=n(149),D=n(125),C=n(136),O=n(183),j=n(184),P=n(1102),w=n(96),T=n(233),E=n(543),x=n(370),N=n(300),A=n(147),L=n(268),k=n(795),_=n(177),R=n(310),z=r()(y.a,{}),U=r()(D.a,{}),B=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onContentMeasure=function(e){var t=e.width,n=e.height
;r.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},r.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataListEntityID,o=e.onDeckMetadataItemEntityID,s=e.extrasMetadataListEntityID,l=e.metadataKey,c=e.title,u=e.type,d=e.year,p=e.summary,f=e.thumb,y=e.art,D=e.listType,B=e.listStyle,V=e.isListReady,F=e.pageWidth,Q=e.pageHeight,H=e.scrollTop,Y=e.posterWidth,W=e.posterTop,G=this.state,K=G.isContentMeasured,q=G.contentWidth,Z=G.contentHeight,X=!(!K||!a);return r()(I.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i,metadataKey:l,type:u,thumb:f,art:y,pageWidth:F,pageHeight:Q,scrollTop:H,posterWidth:Y,posterTop:W},void 0,r()(m.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(S.a,{},void 0,r()(C.a,{},void 0,r()(w.a,{},void 0,c)),r()(O.a,{},void 0,r()(w.a,{},void 0,d),r()(T.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(j.a,{},void 0,r()(w.a,{},void 0,r()(P.a,{},void 0,o?r()("span",{},void 0,Object(h.default)("On Deck")," ",z,r()(v.a,{
serverEntityID:t,providerEntityID:n,metadataItemEntityID:o})):r()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(E.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(x.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),U,r()(S.a,{},void 0,r()(N.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(A.a,{},void 0,p))),r()(M.a,{},void 0,X&&r()(b.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:D,
listStyle:B,component:R.a,initialSize:20,showArtwork:!!y,viewportWidth:q,viewportHeight:Q,contentHeight:Z,scrollTop:H}),V&&r()(S.a,{},void 0,r()(L.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),!!s&&r()(k.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataListEntityID:s,title:Object(h.default)("Extras")}),r()(_.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);t.a=B},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(448),v=n(185),g=n(3216),m=Object(f.a)(96),y=function(e){function t(){var n,i,a;o()(this,t);for(var s=arguments.length,c=Array(s),u=0;u<s;u++)c[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(c))),i.renderCell=function(e){return h.a.createElement(g.a,r()({serverEntityID:i.props.serverEntityID,providerEntityID:i.props.providerEntityID,
metadataListEntityID:i.props.metadataListEntityID},e))},a=n,l()(i,a)}return u()(t,e),t.prototype.render=function(){return h.a.createElement(v.a,r()({layout:m,cellRenderer:this.renderCell},this.props))},t}(p.Component);t.a=y},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(function(e,t){return t.metricsContext},u.a,d.a,Object(p.a)(),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={};return e&&(r.context=e),{metadataKey:i.key,
title:i.title,type:i.type,summary:i.summary,route:Object(h.a)(t,n,i.key),showRecord:!!n.features.subscribe,hasSingleSubscription:!!i.subscriptionID}})}function r(e){return s.a.createElement(f.a,e)}var a=n(1),o=(n.n(a),n(0)),s=n.n(o),l=n(6),c=(n.n(l),n(57)),u=n(48),d=n(37),p=n(21),h=n(134),f=n(3217);t.a=Object(c.a)(i)(r)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(4)),f=n(29),v=n(124),g=n(93),m=n(26),y=n(22),b=n(86),I=n(524),S=n(231),M=n(255),D=n(1040),C=n(3218),O=n.n(C),j=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onRecordPress=function(e){r.setState({isSubscribeModalOpen:!0})},r.onSubscribeModalClose=function(){r.setState({isSubscribeModalOpen:!1})},r.state={isSubscribeModalOpen:!1},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.cellIndex,o=e.cellX,s=e.cellY,l=e.cellWidth,c=e.cellHeight,u=e.metadataKey,d=e.route,p=e.title,f=e.type,v=e.summary,C=e.showRecord,j=e.hasSingleSubscription,P=this.state.isSubscribeModalOpen;return u?r()(g.a,{className:a%2?O.a.alternateItem:O.a.item,cellX:o,cellY:s,cellWidth:l,cellHeight:c},void 0,r()(y.a,{className:O.a.underlay,to:d}),r()("div",{className:O.a.overlay},void 0,r()("div",{
className:O.a.primaryTitle},void 0,r()(M.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()("div",{className:O.a.secondaryTitle},void 0,j&&r()(m.a,{className:O.a.subscriptionIcon,name:"plex-icon-dvr-single-560","aria-label":Object(h.default)("Recording Scheduled")}),r()(D.a,{className:O.a.nextAiringDate,metadataItemEntityID:i,showFullTime:!0}),!!v&&r()(b.a,{className:O.a.separator}),v)),C&&r()(I.a,{className:O.a.recordButton,tabIndex:"-1",title:p,onPress:this.onRecordPress
}),r()(S.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,isOpen:P,subscriptionType:f,onModalClose:this.onSubscribeModalClose})):r()(g.a,{className:a%2?O.a.alternateLoadingItem:O.a.loadingItem,cellX:o,cellY:s,cellWidth:l,cellHeight:c},void 0,Object(h.default)("Loading..."))},t}(p.Component);t.a=Object(v.a)(j)},function(e,t){e.exports={item:"EPGPrePlayEpisodeCell-item-31U2l",
recordButton:"EPGPrePlayEpisodeCell-recordButton-x7LVG RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X RecordIcon-recordIconContainer-1PXGA",alternateItem:"EPGPrePlayEpisodeCell-alternateItem-3QMpy EPGPrePlayEpisodeCell-item-31U2l",underlay:"EPGPrePlayEpisodeCell-underlay-28hJx",overlay:"EPGPrePlayEpisodeCell-overlay-2sL4Q",primaryTitle:"EPGPrePlayEpisodeCell-primaryTitle-p-Naw",secondaryTitle:"EPGPrePlayEpisodeCell-secondaryTitle-iTKpt",
subscriptionIcon:"EPGPrePlayEpisodeCell-subscriptionIcon-14CJU",nextAiringDate:"EPGPrePlayEpisodeCell-nextAiringDate-10Bif",separator:"EPGPrePlayEpisodeCell-separator-2LvFs",loadingItem:"EPGPrePlayEpisodeCell-loadingItem-2VkI2",alternateLoadingItem:"EPGPrePlayEpisodeCell-alternateLoadingItem-2KPtT EPGPrePlayEpisodeCell-loadingItem-2VkI2"}},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.containerKey,o=e.listType,l=e.listSubtype,c=e.listContext,g=e.columnAdjustment,m=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","listType","listSubtype","listContext","columnAdjustment"]),y=Object(h.b)(o,c,{providerEntityID:n});return u.a.createElement(f.a,a()({layout:Object(d.a)(o,l,c,g,y.length),cellRenderer:Object(p.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,
containerKey:r,listType:o,listContext:c,titleComponents:y},v.a)},m))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=(n(31),n(780)),p=n(123),h=n(174),f=n(185),v=n(536);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e,t){return t.items},function(e,t){return t.serverEntityID},function(e,t){return t.providerEntityID},function(e,t){return t.metadataListEntityID},function(e,t){return t.containerKey},function(e,t){return t.listType
},s.a,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1],n=arguments[2],i=arguments[3],r=arguments[4],a=arguments[5],s=arguments[6];return{listType:a,cellRenderer:Object(l.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,containerKey:r,listType:a},c.a),aspectRatios:e.map(function(e){return Object(o.a)(s[e])})}})}var r=n(11),a=n(6),o=(n.n(a),n(566)),s=n(110),l=n(123),c=n(1183),u=n(1224);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict"
;function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.containerKey,o=e.listType,l=e.listContext,c=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","listType","listContext"]),v={serverEntityID:t,providerEntityID:n,metadataListEntityID:i,containerKey:r,listType:o,listContext:l,activeSort:"titleSort"};return"episode"===o&&(v.showPlayIndex=!0,v.showActionsMinutesLeft=!0),"track"===o&&(v.showLink=!1,v.showPlayIndex=!0,
v.showActionsDuration=!0),u.a.createElement(h.a,a()({layout:d.a,cellRenderer:Object(p.a)(v,f.a)},c))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=(n(31),n(781)),p=n(123),h=n(185),f=n(564);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.containerKey,o=e.listType,l=e.listContext,c=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","listType","listContext"])
;return u.a.createElement(h.a,a()({layout:d.a,cellRenderer:Object(p.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,containerKey:r,listType:o,listContext:l},f.a)},c))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=(n(31),n(1178)),p=n(123),h=n(185),f=n(1179);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.containerKey,o=e.listType,l=e.listContext,c=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","listType","listContext"]);return u.a.createElement(h.a,a()({layout:d.a,cellRenderer:Object(p.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,containerKey:r,listType:o,listContext:l},f.a)},c))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=(n(31),
n(1175)),p=n(123),h=n(185),f=n(1176);t.a=i},function(e,t){e.exports={topDivider:"PrePlayListTopDivider-topDivider-3c8uz PrePlayDivider-divider-1qvbj"}},function(e,t){e.exports={bottomDivider:"PrePlayListBottomDivider-bottomDivider-3XSnc PrePlayDivider-divider-1qvbj"}},function(e,t,n){"use strict";function i(e){switch(e){case a.i:return Object(r.default)("No seasons");case a.c:return Object(r.default)("No episodes");case a.a:return Object(r.default)("No albums");case a.j:
return Object(r.default)("No tracks");case a.g:return Object(r.default)("No photos");default:return Object(r.default)("No items")}}t.a=i;var r=n(4),a=n(229)},function(e,t,n){"use strict";function i(e){switch(e){case a.i:return Object(r.default)("Unable to load seasons");case a.c:return Object(r.default)("Unable to load episodes");case a.a:return Object(r.default)("Unable to load albums");case a.j:return Object(r.default)("Unable to load tracks");case a.g:
return Object(r.default)("Unable to load photos");default:return Object(r.default)("Unable to load items")}}t.a=i;var r=n(4),a=n(229)},function(e,t){e.exports={container:"PrePlayList-container-WZ86O HubCell-hubCell-3Ys17",emptyContainer:"PrePlayList-emptyContainer-1scC5",emptyMessage:"PrePlayList-emptyMessage-aeAV8 PrePlayList-emptyContainer-1scC5"}},function(e,t){e.exports={descendantHubCellHeader:"PrePlayDescendantList-descendantHubCellHeader-2qK3U HubCellHeader-hubCellHeader-2pvYN",
titleButton:"PrePlayDescendantList-titleButton-P7EPn"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(29)),f=(n(81),n(72)),v=n(158),g=n(150),m=n(107),y=n(149),b=n(125),I=n(136),S=n(183),M=n(184),D=n(96),C=n(370),O=n(300),j=n(147),P=n(268),w=n(177),T=n(310),E=n(796),x=n(3231),N=r()(b.a,{}),A=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onContentMeasure=function(e){
var t=e.width,n=e.height;r.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},r.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(h.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataListEntityID,o=e.metadataKey,s=e.title,l=e.type,c=e.year,u=e.summary,d=e.thumb,p=e.art,h=e.listType,b=e.listStyle,A=e.isListReady,L=e.pageWidth,k=e.pageHeight,_=e.scrollTop,R=e.posterWidth,z=e.posterTop,U=e.record,B=this.state,V=B.isContentMeasured,F=B.contentWidth,Q=B.contentHeight,H=!(!V||!a);return r()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,attribution:E.a,metadataKey:o,
type:l,thumb:d,art:p,pageWidth:L,pageHeight:k,scrollTop:_,posterWidth:R,posterTop:z},void 0,r()(f.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(m.a,{},void 0,r()(I.a,{},void 0,r()(D.a,{},void 0,s)),r()(S.a,{},void 0,r()(D.a,{},void 0,c)),r()(M.a,{},void 0,r()(x.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,record:U}),r()(C.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),N,r()(m.a,{},void 0,r()(O.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i}),r()(j.a,{},void 0,u))),r()(y.a,{},void 0,H&&r()(v.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:h,listStyle:b,component:T.a,initialSize:20,showArtwork:!!p,viewportWidth:F,viewportHeight:k,contentHeight:Q,scrollTop:_}),A&&r()(m.a,{},void 0,r()(P.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(w.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);t.a=A},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(s.a,Object(o.a)(),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:t.type,leafCount:t.leafCount,isSubscribed:null!=t.subscriptionID||null!=t.grandparentSubscriptionID,subscriptionType:t.subscriptionType,grandparentSubscriptionType:t.grandparentSubscriptionType,showRecord:!!e.features.subscribe}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(37),l=n(3232);t.a=Object(r.b)(i)(l.a)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.type,o=e.leafCount,s=e.isSubscribed,p=e.subscriptionType,f=e.grandparentSubscriptionType,v=e.showRecord,g=e.record;return a()(c.a,{},void 0,a()(l.a,{className:h.a.episodeCount,leafCount:o}),a()(u.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),v&&a()(d.a,{serverEntityID:t,metadataItemEntityID:i,providerEntityID:n,type:r,isSubscribed:s,subscriptionType:p,grandparentSubscriptionType:f,isSubscribeModalOpen:g}))
}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(519)),c=n(96),u=n(543),d=n(1218),p=n(3233),h=n.n(p);t.a=i},function(e,t){e.exports={episodeCount:"EPGPrePlayEpisodeCountLeftTitle-episodeCount-1Ae4n EPGPrePlayStatusLeftTitle-duration-1W91h"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(19),v=n(29),g=(n(81),
n(72)),m=n(158),y=n(150),b=n(107),I=n(149),S=n(125),M=n(136),D=n(184),C=n(96),O=n(370),j=n(3235),P=n(147),w=n(3237),T=n(177),E=n(310),x=n(3240),N=n.n(x),A=r()(S.a,{}),L=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onContentMeasure=function(e){var t=e.width,n=e.height;r.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},r.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},r}return u()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return Object(v.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataListEntityID,o=e.metadataKey,s=e.title,l=e.type,c=e.subtype,u=e.summary,d=e.saved,p=e.thumb,v=e.art,S=e.allEpisodes,x=e.listType,L=e.listStyle,k=e.isListReady,_=e.pageWidth,R=e.pageHeight,z=e.scrollTop,U=e.posterWidth,B=e.posterTop,V=this.state,F=V.isContentMeasured,Q=V.contentWidth,H=V.contentHeight,Y=!(!F||!a);return r()(y.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:o,
type:l,subtype:c,thumb:p,art:v,pageWidth:_,pageHeight:R,scrollTop:z,posterWidth:U,posterTop:B},void 0,r()(g.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(b.a,{},void 0,r()(M.a,{},void 0,r()(C.a,{},void 0,s)),r()(D.a,{},void 0,r()(j.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(O.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),A,r()(b.a,{},void 0,r()(P.a,{dangerouslySetInnerHTML:{__html:u}}),null!=d&&r()(w.a,{
className:N.a.addToSavedButton,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),r()(I.a,{},void 0,Y&&r()(m.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:x,listStyle:L,component:E.a,initialSize:20,previewSize:S?null:3,listTitle:S?Object(h.default)("All Episodes"):Object(h.default)("Recent Episodes"),titleButtonTitle:S?Object(h.default)("See Recent Episodes"):Object(h.default)("See All Episodes"),titleButtonRoute:f.join(window.location.hash,{
allEpisodes:S?void 0:1},{parseParams:!0}),showArtwork:!!v,viewportWidth:Q,viewportHeight:R,contentHeight:H,scrollTop:z}),k&&r()(b.a,{},void 0,r()(T.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);t.a=L},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){return{leafCount:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).leafCount}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(3236);t.a=Object(r.b)(i)(s.a)},function(e,t,n){
"use strict";function i(e){var t=e.leafCount;return a()(c.a,{},void 0,a()(l.a,{leafCount:t}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(519)),c=n(96);t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(s.a)(),function(e){return{saved:e.saved,type:e.type,subtype:e.subtype}})}function r(e,t){var n={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID};return{onPress:function(t){
e(Object(l.toggleMetadataItemSave)(n))}}}var a=n(11),o=n(6),s=(n.n(o),n(21)),l=n(120),c=n(3238),u=Object(a.b)(i,r)(c.a);t.a=u},function(e,t,n){"use strict";function i(e,t,n){return n===u.b?e?Object(c.default)("In My Podcasts"):Object(c.default)("Add to My Podcasts"):e?Object(c.default)("In My Shows"):Object(c.default)("Add to My Shows")}function r(e){var t=e.className,n=e.kind,r=e.size,a=e.saved,s=e.type,l=e.subtype,c=e.onPress;return o()(h.a,{className:t,kind:n,size:r,onPress:c
},void 0,a&&o()(p.a,{className:v.a.iconSaved,name:"plex-icon-selected-560"}),i(a,s,l))}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(4)),u=n(143),d=n(24),p=n(26),h=n(47),f=n(3239),v=n.n(f);r.defaultProps={kind:d.b.DARK,size:d.e.LARGE},t.a=r},function(e,t){e.exports={icon:"PrePlayAddToMySaved-icon-3ALQf",iconSaved:"PrePlayAddToMySaved-iconSaved-3tFiN PrePlayAddToMySaved-icon-3ALQf",iconUnsaved:"PrePlayAddToMySaved-iconUnsaved-22-Go PrePlayAddToMySaved-icon-3ALQf"}},function(e,t){
e.exports={addToSavedButton:"PodcastShowPrePlay-addToSavedButton-2aatE undefined"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(29)),f=(n(81),n(72)),v=n(433),g=n(158),m=n(150),y=n(107),b=n(149),I=n(125),S=n(136),M=n(183),D=n(96),C=n(233),O=n(147),j=n(268),P=n(177),w=n(310),T=r()(I.a,{}),E=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onContentMeasure=function(e){
var t=e.width,n=e.height;r.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},r.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(h.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataListEntityID,o=e.metadataKey,s=e.title,l=e.type,c=e.summary,u=e.thumb,d=e.art,p=e.listType,h=e.listStyle,I=e.isListReady,E=e.pageWidth,x=e.pageHeight,N=e.scrollTop,A=e.posterWidth,L=e.posterTop,k=this.state,_=k.isContentMeasured,R=k.contentWidth,z=k.contentHeight,U=!(!_||!a);return r()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:o,type:l,thumb:u,art:d,pageWidth:E,
pageHeight:x,scrollTop:N,posterWidth:A,posterTop:L},void 0,r()(f.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(y.a,{},void 0,r()(S.a,{},void 0,r()(v.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(M.a,{},void 0,r()(D.a,{},void 0,s),r()(C.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),T,!!c&&r()(y.a,{},void 0,r()(O.a,{},void 0,c))),r()(b.a,{},void 0,U&&r()(g.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:p,
listStyle:h,component:w.a,initialSize:20,showArtwork:!!d,viewportWidth:R,viewportHeight:x,contentHeight:z,scrollTop:N}),I&&r()(y.a,{},void 0,r()(j.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(P.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);t.a=E},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataKey,o=e.type,s=e.summary,f=e.thumb,v=e.art,g=e.pageWidth,m=e.pageHeight,y=e.scrollTop,b=e.posterWidth,I=e.posterTop;return a()(u.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:r,type:o,thumb:f,art:v,pageWidth:g,pageHeight:m,scrollTop:y,posterWidth:b,posterTop:I},void 0,a()(h.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,type:o,summary:s
}),a()(c.a,{},void 0,a()(l.a,{},void 0,a()(d.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(p.a,{serverEntityID:t,providerEntityID:n}))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(107)),c=n(149),u=n(150),d=n(268),p=n(177),h=n(1101);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataKey,o=e.type,s=e.subtype,f=e.summary,C=e.thumb,O=e.art,j=e.pageWidth,P=e.pageHeight,w=e.scrollTop,T=e.posterWidth,E=e.posterTop;return a()(p.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:r,type:o,subtype:s,thumb:C,art:O,pageWidth:j,pageHeight:P,scrollTop:w,posterWidth:T,posterTop:E},void 0,a()(u.a,{},void 0,a()(v.a,{},void 0,a()(y.a,{},void 0,a()(l.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i}))),a()(g.a,{},void 0,a()(y.a,{},void 0,a()(c.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),a()(I.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),a()(m.a,{},void 0,a()(b.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(M.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),D,a()(u.a,{},void 0,a()(S.a,{dangerouslySetInnerHTML:{__html:f}})),a()(d.a,{},void 0,a()(u.a,{},void 0,a()(h.a,{serverEntityID:t,
providerEntityID:n}))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(230)),c=n(255),u=n(107),d=n(149),p=n(150),h=n(177),f=n(125),v=n(136),g=n(183),m=n(184),y=n(96),b=n(737),I=n(233),S=n(147),M=n(1106),D=a()(f.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataKey,o=e.type,s=e.summary,h=e.grandparentThumb,w=e.art,T=e.pageWidth,E=e.pageHeight,x=e.scrollTop,N=e.posterWidth,A=e.posterTop,L=e.record
;return a()(u.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,posterType:"show",attribution:D.a,metadataKey:r,type:o,thumb:h,art:w,pageWidth:T,pageHeight:E,scrollTop:x,posterWidth:N,posterTop:A},void 0,a()(d.a,{},void 0,a()(f.a,{},void 0,a()(m.a,{},void 0,a()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),a()(v.a,{},void 0,a()(m.a,{},void 0,a()(c.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),a()(g.a,{},void 0,a()(C.a,{serverEntityID:t,
providerEntityID:n,metadataItemEntityID:i,record:L}),a()(y.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),P,a()(d.a,{},void 0,a()(b.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(O.a,{metadataItemEntityID:i},void 0,a()(j.a,{metadataItemEntityID:i,showFullTime:!0,showChannel:!0})),a()(I.a,{},void 0,s),a()(p.a,{},void 0,a()(d.a,{},void 0,a()(S.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(M.a,{serverEntityID:t,providerEntityID:n})))))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(230)),c=n(255),u=n(150),d=n(107),p=n(149),h=n(125),f=n(136),v=n(183),g=n(184),m=n(96),y=n(370),b=n(300),I=n(147),S=n(268),M=n(177),D=n(796),C=n(1217),O=n(1219),j=n(1221),P=a()(h.a,{});t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(29),v=(n(81),
n(72)),g=n(158),m=n(150),y=n(107),b=n(149),I=n(125),S=n(136),M=n(96),D=n(233),C=n(300),O=n(147),j=n(795),P=n(177),w=n(310),T=n(3246),E=n(3248),x=n(3250),N=r()(I.a,{}),A=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onContentMeasure=function(e){var t=e.width,n=e.height;r.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},r.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},r}return u()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataListEntityID,o=e.extrasMetadataListEntityID,s=e.popularLeavesMetadataListEntityID,l=e.metadataKey,c=e.title,u=e.type,d=e.summary,p=e.thumb,f=e.art,I=e.listType,A=e.listStyle,L=e.isListReady,k=e.pageWidth,_=e.pageHeight,R=e.scrollTop,z=e.posterWidth,U=e.posterTop,B=this.state,V=B.isContentMeasured,F=B.contentWidth,Q=B.contentHeight,H=!(!V||!s),Y=!(!V||!a);return r()(m.a,{serverEntityID:t,
providerEntityID:n,metadataItemEntityID:i,metadataKey:l,type:u,thumb:p,art:f,pageWidth:k,pageHeight:_,scrollTop:R,posterWidth:z,posterTop:U},void 0,r()(v.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(y.a,{},void 0,r()(S.a,{},void 0,r()(M.a,{},void 0,c),r()(D.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(T.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),N,r()(y.a,{},void 0,r()(C.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i}),r()(O.a,{},void 0,d))),r()(b.a,{},void 0,H&&r()(g.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:s,component:E.a,showArtwork:!!f,viewportWidth:F,viewportHeight:_,contentHeight:Q,scrollTop:R,listStyle:A}),Y&&r()(g.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:I,listStyle:A,component:w.a,initialSize:20,showArtwork:!!f,viewportWidth:F,viewportHeight:_,contentHeight:Q,scrollTop:R}),L&&r()(y.a,{},void 0,!!o&&r()(j.a,{serverEntityID:t,
providerEntityID:n,metadataItemEntityID:i,metadataListEntityID:o,title:Object(h.default)("Music Videos")}),r()(x.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(P.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);t.a=A},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(o.a,s.a,Object(l.a)(),Object(c.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{server:e,provider:t,librarySectionKey:arguments[3],
Country:n.Country,Genre:n.Genre}})}var r=n(11),a=n(6),o=(n.n(a),n(48)),s=n(37),l=n(21),c=n(443),u=n(3247);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.server,n=e.provider,i=e.librarySectionKey,r=e.Country,o=e.Genre,s=!(!r||!r.length),h=!(!o||!o.length);return s||h?a()(u.a,{},void 0,s&&a()(d.a,{},void 0,a()(l.a,{server:t,provider:n,librarySectionKey:i,fallbackFilterKey:"country",tags:r,limit:1})),h&&a()(p.a,{},void 0,a()(c.a,{server:t,provider:n,librarySectionKey:i,
Genre:o}))):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(95),n(87),n(739)),c=n(743),u=n(184),d=n(96),p=n(365);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.metadataItemEntityIDs,o=e.containerKey,l=e.showArtwork,u=e.contentHeight,d=e.scrollTop,D=c()(e,["serverEntityID","providerEntityID","metadataListEntityID","metadataItemEntityIDs","containerKey","showArtwork","contentHeight","scrollTop"])
;if(!r||!r.length)return null;var C=Object(f.a)(Object(h.default)("Popular Tracks")),O={serverEntityID:t,providerEntityID:n,metadataListEntityID:i,containerKey:o,listType:"track",listContext:g.h,activeSort:"titleSort",showLink:!1,showPlayIndex:!1,showPlayCellIndex:!0,showActionsDuration:!0};return s()("div",{className:j.a.popularTracksHubCell,"data-qa-id":"hub--popularTracks"},void 0,s()(S.a,{},void 0,s()(b.a,{},void 0,C)),P,s()(M.a,{showArtwork:l,contentHeight:u,scrollTop:d
},void 0,p.a.createElement(m.a,a()({layout:v.a,cellRenderer:Object(y.a)(O,I.a),items:r,size:Math.min(r.length,5),keyPropName:"metadataItemEntityID"},D))),w)}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(4),f=n(367),v=n(781),g=n(31),m=n(185),y=n(123),b=n(368),I=n(564),S=n(107),M=n(571),D=n(572),C=n(573),O=n(3249),j=n.n(O),P=s()(D.a,{}),w=s()(C.a,{});t.a=i},function(e,t){e.exports={
popularTracksHubCell:"PrePlayPopularTracks-popularTracksHubCell-Q0N9b HubCell-hubCell-3Ys17"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(){return{concerts:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).concerts}})}var r=n(11),a=n(6),o=(n.n(a),n(21)),s=n(3251);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.concerts;if(!t||!t.length)return null;var n=Object(p.a)(Object(d.default)("On Tour"))
;return s()("div",{className:b.a.concerts},void 0,s()(h.a,{},void 0,s()(f.a,{},void 0,n,s()("img",{className:b.a.concertsLogo,src:m.a}))),t.map(function(e){return u.a.createElement(v.a,a()({key:e.id},e))}))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(4),p=n(367),h=n(442),f=n(368),v=n(3252),g=n(3254),m=n.n(g),y=n(3255),b=n.n(y);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.at,n=e.city,i=e.country,r=e.tag,o=e.url,s=e.venue,l=c.a.unix(t),d=l.format("DD"),h=l.format("MMM");return a()(u.a,{className:p.a.concert,target:"_blank",to:o},void 0,a()("div",{className:p.a.concertCalendar},void 0,a()("div",{className:p.a.concertMonth},void 0,h),a()("div",{className:p.a.concertDay},void 0,d)),a()("div",{className:p.a.concertDetails},void 0,a()("div",{className:p.a.concertTitle},void 0,r),a()("div",{className:p.a.concertLocation},void 0,s," (",n,", ",i,")")))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(41)),c=n.n(l),u=n(22),d=n(3253),p=n.n(d);t.a=i},function(e,t){e.exports={concert:"PrePlayConcert-concert-2d4lO",concertCalendar:"PrePlayConcert-concertCalendar-1FILv",concertMonth:"PrePlayConcert-concertMonth-2qln2",concertDay:"PrePlayConcert-concertDay-zNEEh",concertDetails:"PrePlayConcert-concertDetails-_iXFv",concertTitle:"PrePlayConcert-concertTitle-2O-pN",concertLocation:"PrePlayConcert-concertLocation-3ltdC"}},function(e,t,n){
e.exports=n.p+"desktop/common/img/vendor-logos/songkick.19411461aa7bffd06675aaa8a3d0a056.svg"},function(e,t){e.exports={concerts:"PrePlayConcerts-concerts-3r-qi",concertsLogo:"PrePlayConcerts-concertsLogo-oF29R"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(29)),f=(n(81),
n(72)),v=n(433),g=n(158),m=n(150),y=n(107),b=n(149),I=n(125),S=n(3257),M=n(136),D=n(183),C=n(184),O=n(96),j=n(365),P=n(233),w=n(147),T=n(268),E=n(177),x=n(3258),N=r()(I.a,{}),A=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onContentMeasure=function(e){var t=e.width,n=e.height;r.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},r.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},r}return u()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return Object(h.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataListEntityID,o=e.metadataKey,s=e.title,l=e.type,c=e.year,u=e.summary,d=e.thumb,p=e.art,h=e.listType,I=e.listStyle,A=e.isListReady,L=e.pageWidth,k=e.pageHeight,_=e.scrollTop,R=e.posterWidth,z=e.posterTop,U=this.state,B=U.isContentMeasured,V=U.contentWidth,F=U.contentHeight,Q=!!p,H=!(!B||!a)
;return r()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:o,type:l,thumb:d,art:p,pageWidth:L,pageHeight:k,scrollTop:_,posterWidth:R,posterTop:z},void 0,r()(f.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(y.a,{},void 0,r()(M.a,{},void 0,r()(v.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(D.a,{},void 0,r()(O.a,{},void 0,s),r()(P.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i
})),r()(C.a,{},void 0,r()(O.a,{},void 0,c),r()(j.a,{},void 0,r()(S.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})))),N,!!u&&r()(y.a,{},void 0,r()(w.a,{},void 0,u))),r()(b.a,{},void 0,H&&r()(g.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,initialSize:1/0,listType:h,listStyle:I,showArtwork:Q,component:x.a,viewportWidth:V,viewportHeight:k,contentHeight:F,scrollTop:_}),A&&r()(y.a,{},void 0,r()(T.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i
}),r()(E.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);t.a=A},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(o.a,s.a,Object(l.a)(),Object(c.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{server:e,provider:t,librarySectionKey:arguments[3],type:n.type,Genre:n.Genre}})}var r=n(11),a=n(6),o=(n.n(a),n(48)),s=n(37),l=n(21),c=n(443),u=n(743);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(Object(o.a)(),function(e){return{discs:e}})}var r=n(11),a=n(6),o=(n.n(a),n(3259)),s=n(3260);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(function(e,t){return t.metadataItemEntityIDs},s.a,function(e,t){return a.a.compact(e.reduce(function(e,n){var i=t[n],r=i.entityID,a=i.parentIndex,o=void 0===a?1:a,s=e[o];return s?s.metadataItemEntityIDs.push(r):e[o]={index:o,metadataItemEntityIDs:[r]},e},[]))})}t.a=i
;var r=n(5),a=n.n(r),o=n(6),s=(n.n(o),n(110))},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(35),b=n(185),I=n(1223),S=n(783),M=n(123),D=n(1225),C=n(571),O=n(3261),j=n(45),P=n.n(j),w=parseInt(P.a.tableTitleHeight,10)+19,T=parseInt(P.a.tableRowHeight,10),E=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r.state={layout:null,totalSize:0,title:""},r
}return f()(t,e),t.prototype.componentDidMount=function(){this._updateLayout()},t.prototype.componentDidUpdate=function(e){e.discs!==this.props.discs&&this._updateLayout()},t.prototype._updateLayout=function(){var e=this.props,t=e.discs,n=e.listType,i=t.reduce(function(e,t){return e+t.metadataItemEntityIDs.length},0),r=1===t.length?Object(I.a)(n,i):"",a=Object(S.a)({getCellHeights:function(){return t.map(function(e){return w+e.metadataItemEntityIDs.length*T})},overscan:1});this.setState({
layout:a,totalSize:i,title:r})},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,a=e.containerKey,s=e.discs,c=e.listType,u=e.isPopulated,d=e.isPending,p=e.error,h=e.showArtwork,f=e.contentHeight,v=e.scrollTop,g=l()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","discs","listType","isPopulated","isPending","error","showArtwork","contentHeight","scrollTop"]),I=this.state,S=I.layout,j=I.totalSize,P=I.title,w={serverEntityID:t,providerEntityID:n,metadataListEntityID:i,
containerKey:a,title:P,listType:c};return o()(D.a,{listType:c,isPopulated:u,isPending:d,error:p,size:j},void 0,o()(C.a,{showArtwork:h,contentHeight:f,scrollTop:v},void 0,S&&m.a.createElement(b.a,r()({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,keyPropName:"index",items:s,size:s.length,listType:c,listContext:y.R,isPopulated:u,isPending:d,error:p,layout:S,cellRenderer:Object(M.a)(w,O.a)},g))))},t}(g.Component);t.a=E},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.containerKey,o=e.title,s=e.index,d=e.className,g=e.cellX,m=e.cellY,y=e.cellWidth,b=e.cellHeight,I=e.metadataItemEntityIDs,O=e.listType;return a()(p.a,{className:d,cellX:g,cellY:m,cellWidth:y,cellHeight:b},void 0,a()(f.a,{className:S.a.header},void 0,a()(v.a,{},void 0,Object(c.a)(o||Object(l.default)("Disc {discNumber}",{discNumber:s})))),D,I.map(function(e,o){return a()(h.a,{serverEntityID:t,providerEntityID:n,
metadataListEntityID:i,containerKey:r,keyPropName:"metadataItemEntityID",metadataItemEntityID:e,cellHeight:M,cellIndex:o,listType:O,listContext:u.h,activeSort:"titleSort",showLink:!1,showPlayIndex:!0,showActionsDuration:!0,isVirtual:!1},e)}),C)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(367),u=n(31),d=n(124),p=n(93),h=n(564),f=n(442),v=n(368),g=n(45),m=n.n(g),y=n(572),b=n(573),I=n(3262),S=n.n(I),M=parseInt(m.a.tableRowHeight,10),D=a()(y.a,{}),C=a()(b.a,{});t.a=Object(d.a)(i)
},function(e,t){e.exports={header:"PrePlayDisc-header-1227p HubCellHeader-hubCellHeader-2pvYN"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(29)),f=(n(81),n(72)),v=n(158),g=n(150),m=n(107),y=n(149),b=n(125),I=n(136),S=n(96),M=n(233),D=n(147),C=n(310),O=r()(b.a,{}),j=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onContentMeasure=function(e){var t=e.width,n=e.height
;r.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},r.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(h.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataListEntityID,o=e.metadataKey,s=e.title,l=e.type,c=e.summary,u=e.art,d=e.listType,p=e.listStyle,h=e.pageWidth,b=e.pageHeight,j=e.scrollTop,P=this.state,w=P.isContentMeasured,T=P.contentWidth,E=P.contentHeight,x=!(!w||!a);return r()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,showPoster:!1,metadataKey:o,type:l,art:u,pageWidth:h,pageHeight:b,scrollTop:j},void 0,r()(f.a,{
ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(m.a,{},void 0,r()(I.a,{},void 0,r()(S.a,{},void 0,s),r()(M.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),O,!!c&&r()(m.a,{},void 0,r()(D.a,{},void 0,c))),r()(y.a,{},void 0,x&&r()(v.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:d,listStyle:p,component:C.a,initialSize:1e3,showArtwork:!!u,viewportWidth:T,viewportHeight:b,contentHeight:E,scrollTop:j})))},t}(p.Component);t.a=j},function(e,t,n){
"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(59)),f=n(29),v=n(72),g=n(150),m=n(107),y=n(149),b=n(125),I=n(136),S=n(147),M=n(3265),D=r()(b.a,{}),C=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onContentMeasure=function(e){var t=e.width,n=e.height;r.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},r.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},r}
return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataKey,o=e.title,s=e.type,l=e.playlistType,c=e.summary,u=e.art,d=e.composite,p=e.pageWidth,f=e.pageHeight,b=e.scrollTop,C=e.posterWidth,O=e.posterTop,j=this.state,P=j.contentWidth,w=j.contentHeight,T=j.isContentMeasured;return r()(g.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i,showPoster:l!==h.c,metadataKey:a,type:s,thumb:d,art:u,pageWidth:p,pageHeight:f,scrollTop:b,posterWidth:C,posterTop:O},void 0,r()(v.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(m.a,{},void 0,r()(I.a,{},void 0,o)),D,!!c&&r()(m.a,{},void 0,r()(S.a,{},void 0,c))),r()(y.a,{},void 0,T&&r()(M.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,playlistType:l,contentHeight:w,viewportWidth:P,viewportHeight:f,scrollTop:b})))},t}(p.Component);t.a=C
},function(e,t,n){"use strict";function i(e,t){return Object(y.createSelector)(function(e){return e.ui.playlistPage},Object(S.a)(),function(e,t){var n=e.serverEntityID,i=e.providerEntityID,r=e.metadataKey,a=e.playlistItemList,o=void 0===a?{}:a,s=e.isPlaylistItemListPending,l=e.isPlaylistItemListPopulated,c=e.playlistItemListError,u=t.ratingKey,d=t.playlistType,p=t.smart,h=t.duration,f=o.metadataItems,v=void 0===f?[]:f,g=o.populatedRange,m=void 0===g?{}:g,y=o.totalSize;return{serverEntityID:n,
providerEntityID:i,metadataKey:r,ratingKey:u,listType:d,keyPropName:"playlistItemEntityID",isSmart:p,populatedRange:m,items:v,size:y,itemsOffset:m.start,duration:h,isEmpty:l&&!y,showArtwork:!1,showSpinner:s&&!l,showError:c}})}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(309)),I=n(366),S=n(21),M=n(3266),D={dispatchInitPlaylistItemList:b.c,dispatchPopulatePlaylistItemRange:b.f,
dispatchDeselectAllPlaylistItems:I.e,dispatchMovePlaylistItem:b.e},C=function(e){function t(){var n,i,r;c()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=d()(this,e.call.apply(e,[this].concat(o))),i.onPageRequest=function(e){var t=e.startIndex,n=e.endIndex;i.props.dispatchPopulatePlaylistItemRange({startIndex:t,endIndex:n})},r=n,d()(i,r)}return h()(t,e),t.prototype.componentDidMount=function(){this._populate()},t.prototype.componentDidUpdate=function(e){
this.props.metadataKey!==e.metadataKey&&this._populate()},t.prototype.componentWillUnmount=function(){this.props.dispatchDeselectAllPlaylistItems()},t.prototype._populate=function(){var e=this.props,t=e.serverEntityID,n=e.metadataKey,i=e.dispatchInitPlaylistItemList,r=e.dispatchPopulatePlaylistItemRange;i({serverEntityID:t,metadataKey:n}),r({startIndex:0,endIndex:39})},t.prototype.render=function(){var e=this.props,t=(e.dispatchInitPlaylistItemList,e.dispatchPopulatePlaylistItemRange,
e.dispatchDeselectAllPlaylistItems,s()(e,["dispatchInitPlaylistItemList","dispatchPopulatePlaylistItemRange","dispatchDeselectAllPlaylistItems"]));return g.a.createElement(M.a,a()({},t,{onPageRequest:this.onPageRequest}))},t}(v.Component);t.a=Object(m.b)(i,D)(C)},function(e,t,n){"use strict";function i(e){
var t=e.contentHeight,n=e.scrollTop,i=e.showArtwork,r=e.showSpinner,o=e.showError,l=e.listType,c=e.isEmpty,h=s()(e,["contentHeight","scrollTop","showArtwork","showSpinner","showError","listType","isEmpty"]);return r?a()("div",{className:y.a.emptyContainer},void 0,b):o?a()("div",{className:y.a.emptyMessage},void 0,Object(d.default)("Unable to load items")):c?a()("div",{className:y.a.emptyMessage
},void 0,l===p.c?Object(d.default)("There are no items in this album"):Object(d.default)("There are no items in this playlist")):a()(f.a,{showArtwork:i,contentHeight:t,scrollTop:n},void 0,l===p.c?u.a.createElement(v.a,h):u.a.createElement(g.a,h))}var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(4),p=n(59),h=n(39),f=n(571),v=n(3267),g=n(3281),m=n(3296),y=n.n(m),b=a()(h.a,{});t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e,t){
return t.items},function(e,t){return t.serverEntityID},function(e,t){return t.providerEntityID},Object(s.a)(),c.a,l.a,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(arguments[1],arguments[2],arguments[3]),n=arguments[4],i=arguments[5],r=e.map(function(e){var t=n[e];return Object(o.a)(i[t.metadataItem])});return{listType:t.playlistType,aspectRatios:r,playlistMetadataItemEntityID:t.entityID,playlistRatingKey:t.ratingKey,isSmart:t.smart}})}
var r=n(11),a=n(6),o=(n.n(a),n(566)),s=n(21),l=n(110),c=n(797),u=n(309),d=n(3268),p={onItemDropped:u.e};t.a=Object(r.b)(i,p)(d.a)},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(1224),m=n(123),y=n(3269),b=n(3276),I=n(3280),S=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=u()(this,e.call.apply(e,[this].concat(s))),
i.createCellRenderer=function(e){var t=i.props,n=t.serverEntityID,r=t.providerEntityID,a=t.playlistMetadataItemEntityID,s=t.playlistRatingKey,l=t.isSmart,c=t.listType;return Object(m.a)(o()({serverEntityID:n,providerEntityID:r,playlistMetadataItemEntityID:a,ratingKey:s,listType:c,isSmart:l},e),y.a)},r=n,u()(i,r)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.isSmart,n=e.onItemDropped,i=r()(e,["isSmart","onItemDropped"]);return v.a.createElement(I.a,o()({showPreview:!t,
listComponent:g.a,previewComponent:b.a,createCellRenderer:this.createCellRenderer,onItemDropped:n},i))},t}(f.Component);t.a=S},function(e,t,n){"use strict";function i(e){return{onSelectItem:function(t){e(Object(a.j)(t))},onDeselectItem:function(t){e(Object(a.a)(t))},onRemoveItem:function(t){e(Object(a.g)(t))}}}var r=n(11),a=n(309),o=n(3270);t.a=Object(r.b)(null,i)(o.a)},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(function(e,t){return t.playlistItemEntityID
},Object(c.a)(),Object(u.a)(),p.a,v.a,function(e,t){var n=t.playlistItemID,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],a=arguments[4],o=i.entityID,s=i.key,c=i.type,u=i.thumb,d=i.title;return{listType:l.c,playlistItemID:n,metadataItemEntityID:o,metadataKey:s,type:c,thumb:u,title:d,selectionID:e,selectionType:l.c,activeSelectionType:a.activeSelectionType,isSelected:Object(m.a)(r,n)}})}function r(e,t){var n={serverEntityID:t.serverEntityID,
providerEntityID:t.providerEntityID,metricsPage:t.metricsPage};return{onPlayPress:function(i){e(Object(h.m)(o()({},n,{playlistMetadataItemEntityID:t.playlistMetadataItemEntityID,metadataItemEntityID:i})))},onEditPress:function(t){e(Object(g.editMetadataItem)(o()({},n,{metadataItemEntityID:t})))},onRemovePress:function(){t.onRemoveItem({playlistItemEntityID:t.playlistItemEntityID})}}}var a=n(7),o=n.n(a),s=n(6),l=(n.n(s),
n(59)),c=n(798),u=n(1226),d=n(436),p=n(540),h=n(60),f=n(57),v=n(88),g=n(120),m=n(541),y=n(3271);t.a=Object(f.a)(i,r)(Object(d.a)(y.a))},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(29),b=n(124),I=n(93),S=n(45),M=n.n(S),D=n(3272),C=n(1227),O=parseInt(M.a.mosaicCellPadding,10),j=function(e){function t(){return u()(this,t),p()(this,e.apply(this,arguments))}return f()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.cellX,n=e.cellY,i=e.cellWidth,a=e.cellHeight,s=e.isSmart,c=l()(e,["cellX","cellY","cellWidth","cellHeight","isSmart"]),u=s?C.a:D.a,d=i-2*O,p=a-2*O;return o()(I.a,{cellX:t,cellY:n,cellWidth:i,cellHeight:a},void 0,m.a.createElement(u,r()({width:d,height:p,isSmart:s},c)))},t}(g.Component);t.a=Object(b.a)(j)},function(e,t,n){"use strict"
;var i=n(293),r=n(1227),a=n(3274),o=n(3275),s=n.n(o);t.a=Object(a.b)({itemComponent:r.a,indexPropName:"cellIndex",direction:a.a,idAttribute:"playlistItemEntityID",dragType:i.a,dragClassName:s.a.draggable})},function(e,t){e.exports={photoContainer:"PlaylistPhotoItem-photoContainer-3t9rf MetadataPhotoCell-photoContainer-1HkmQ",image:"PlaylistPhotoItem-image-2oORk MetadataPhotoCell-image-3KqaF",photo:"PlaylistPhotoItem-photo-10hVk MetadataPhotoCell-photo-Po3Kx",
badge:"PlaylistPhotoItem-badge-3F6lg MetadataPhotoCell-badge-2L0KJ",isSelected:"PlaylistPhotoItem-isSelected-9usYF MetadataPosterCardFace-isSelected-1XUgk",isOtherItemSelected:"PlaylistPhotoItem-isOtherItemSelected-2S2qO MetadataPosterCardFace-isOtherItemSelected-z8NtN"}},function(e,t,n){"use strict";function i(e){var t=e.idAttribute;return{beginDrag:function(e){var n;return n={},n[t]=e[t],n},endDrag:function(e,t,n){e.onItemDragEnd(t.getItem(),t.didDrop())}}}function r(e){
var t=e.direction,n=e.indexPropName;return{hover:function(e,i,r){var a=Object(C.findDOMNode)(r).getBoundingClientRect(),o=(a.right-a.left)/2,s=(a.bottom-a.top)/2,l=i.getClientOffset(),c=l.x-a.left,u=l.y-a.top,d=e[n],p=t===T?u>s:c>o,h=p?d+1:d;e.onItemDragMove(h)}}}function a(e,t){return{connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}}function o(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver()}}function s(e){return function(t){
return D.a.createElement(x,u()({},e,t))}}function l(e){var t=e.itemComponent,n=e.dragClassName,l=e.dragType,c=e.direction,u=void 0===c?T:c,d=e.idAttribute,p=e.indexPropName;return Object(O.DropTarget)(l,r({direction:u,indexPropName:p}),o)(Object(O.DragSource)(l,i({idAttribute:d}),a)(s({itemComponent:t,indexPropName:p,dragClassName:n})))}n.d(t,"a",function(){return E}),t.b=l;var c=n(7),u=n.n(c),d=n(2),p=n.n(d),h=n(13),f=n.n(h),v=n(8),g=n.n(v),m=n(9),y=n.n(m),b=n(10),I=n.n(b),S=n(1),M=(n.n(S),
n(0)),D=n.n(M),C=n(84),O=(n.n(C),n(227)),j=(n.n(O),n(432)),P=(n.n(j),n(29)),w=n(348),T="VERTICAL",E="HORIZONTAL",x=function(e){function t(){return g()(this,t),y()(this,e.apply(this,arguments))}return I()(t,e),t.prototype.componentDidMount=function(){this.props.connectDragPreview(Object(j.getEmptyImage)())},t.prototype.shouldComponentUpdate=function(e,t){return Object(P.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.dragClassName,n=e.indexPropName,i=e.moveIndex,r=e.isDragging,a=e.isOver,o=e.connectDropTarget,s=e.connectDragSource,l=(e.connectDragPreview,e.itemComponent),c=f()(e,["dragClassName","indexPropName","moveIndex","isDragging","isOver","connectDropTarget","connectDragSource","connectDragPreview","itemComponent"]),d=this.props[n],h=a&&i===d,v=a&&i===d+1;return o(p()("div",{className:(t||"")+" "+(r&&w.c||"")+" "+(h&&a&&w.e||"")+" "+(v&&a&&w.d||""||"")
},void 0,D.a.createElement(l,u()({connectDragSource:s,canDrag:!0,isDragging:r},c))))},t}(M.Component)},function(e,t){e.exports={draggable:"PlaylistPhotoSortableItem-draggable-2XyLA"}},function(e,t,n){"use strict";function i(e){return{item:e.getItem(),itemType:e.getItemType(),currentOffset:e.getClientOffset()}}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),n(227)),v=(n.n(f),n(1228)),g=n(525),m=n(3277),y=n(3279),b=n.n(y),I=function(e){
function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.item,n=e.currentOffset,i=e.serverEntityID;if(!n||!t)return null;var r=Object(v.a)(n);return a()(g.a,{},void 0,a()("div",{className:b.a.dragPreview,style:r},void 0,a()(m.a,{serverEntityID:i,playlistItemEntityID:t.playlistItemEntityID})))},t}(h.Component);t.a=Object(f.DragLayer)(i)(I)},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(function(e,t){return t.playlistItemEntityID},s.a,o.a,function(e,t,n){var i=t[e],r=n[i.metadataItem],a=Math.min(Math.max(Object(l.a)(r),.5),2),o=a>1;return{width:o?u*a:u,height:o?u:u/a,thumb:r.thumb}})}var r=n(11),a=n(6),o=(n.n(a),n(110)),s=n(797),l=n(566),c=n(3278),u=100;t.a=Object(r.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.width,n=e.height,i={width:t,height:n};return a()(l.a,{serverEntityID:e.serverEntityID,style:i,background:!0,
transition:!0,url:e.thumb,width:t,height:n})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(169));t.a=i},function(e,t){e.exports={dragPreview:"PlaylistPhotoDragPreview-dragPreview-1Grr5"}},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(508),m=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onItemDragMove=function(e){e!==r.state.moveIndex&&r.setState({
moveIndex:e})},r.onItemDragEnd=function(e,t){var n=r.state.moveIndex;t&&null!==n&&r.props.onItemDropped(o()({},e,{moveIndex:n})),r.setState({moveIndex:null})},r.state={moveIndex:null},r}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.showPreview,n=e.createCellRenderer,i=e.listComponent,a=e.previewComponent,s=r()(e,["showPreview","createCellRenderer","listComponent","previewComponent"]),l={onItemDragMove:this.onItemDragMove,onItemDragEnd:this.onItemDragEnd}
;return v.a.createElement(i,o()({moveIndex:this.state.moveIndex,cellRenderer:n(l)},s),t&&v.a.createElement(a,s))},t}(f.Component);t.a=Object(g.a)(m)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(1),g=(n.n(v),
n(0)),m=n.n(g),y=n(4),b=n(34),I=n(367),S=n(351),M=n(59),D=n(3282),C=n(123),O=n(508),j=n(185),P=n(442),w=n(368),T=n(572),E=n(573),x=n(3283),N=n(3293),A=n(3295),L=n.n(A),k=r()(T.a,{}),_=r()(E.a,{}),R=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r.onItemDragMove=function(e){e!==r.state.moveIndex&&r.setState({moveIndex:e})},r.onItemDragEnd=function(e,t){var n=r.state.moveIndex;t&&null!=n&&Object(b.a)(function(){r.props.dispatchMovePlaylistItem(l()({},e,{moveIndex:n
}))}),r.setState({moveIndex:null})},r.state={moveIndex:null},r}return f()(t,e),t.prototype._getItemCountLabel=function(){var e=this.props.size;return this.props.playlistType===M.d?1===e?Object(y.default)("1 Video"):Object(y.default)("{count} Videos",{count:e}):1===e?Object(y.default)("1 Track"):Object(y.default)("{count} Tracks",{count:e})},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataKey,s=e.playlistType,c=e.contentWidth,u=e.contentHeight,d=e.scrollTop,p=e.items,h=e.isSmart,f=e.size,v=e.duration,g=o()(e,["serverEntityID","providerEntityID","metadataItemEntityID","metadataKey","playlistType","contentWidth","contentHeight","scrollTop","items","isSmart","size","duration"]),b={serverEntityID:t,providerEntityID:n,metadataListEntityID:i,metadataKey:a,listType:s,activeSort:"titleSort",
isSmart:h,showLink:!1,showPlayIndex:!1,showPlayCellIndex:!0,showActionsDuration:!0,onItemDragMove:this.onItemDragMove,onItemDragEnd:this.onItemDragEnd,moveIndex:this.state.moveIndex};return 0===f?r()("div",{},void 0,s===M.d?Object(y.default)("This playlist has no videos."):Object(y.default)("This playlist has no tracks.")):r()("div",{},void 0,r()(P.a,{className:L.a.header},void 0,r()(w.a,{},void 0,Object(I.a)(this._getItemCountLabel())),!!v&&r()("span",{className:L.a.durationTitle
},void 0,Object(S.a)(v))),k,m.a.createElement(j.a,l()({layout:D.a,containerKey:a,keyPropName:"playlistItemEntityID",cellRenderer:Object(C.a)(b,x.a),items:p,size:f,viewportWidth:c,viewportHeight:u,scrollTop:d,firstItemType:s,listType:s,moveIndex:this.state.moveIndex},g)),_,!h&&r()(N.a,{serverEntityID:t,providerEntityID:n}))},t}(g.Component);t.a=Object(O.a)(R)},function(e,t,n){"use strict";var i=n(448),r=n(45),a=n.n(r),o=parseInt(a.a.playQueueItemHeight,10),s=Object(i.a)(o);t.a=s},function(e,t,n){
"use strict";function i(e){var t=e.cellIndex,n=e.cellX,i=e.cellY,r=e.cellWidth,o=e.cellHeight,l=e.playlistItemEntityID,u=e.isSmart,d=c()(e,["cellIndex","cellX","cellY","cellWidth","cellHeight","playlistItemEntityID","isSmart"]),m=u?g.a:v.a;return s()(h.a,{cellX:n,cellY:i,cellWidth:r,cellHeight:o},void 0,l?p.a.createElement(m,a()({playlistItemEntityID:l,cellIndex:t,isSmart:u},d)):s()(f.a,{cellIndex:t}))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),
n(0)),p=n.n(d),h=n(93),f=n(3284),v=n(3286),g=n(799);t.a=i},function(e,t,n){"use strict";function i(e){return a()("div",{className:e.cellIndex%2?u.a.alternateContainer:u.a.container},void 0,Object(l.default)("Loading..."))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(3285),u=n.n(c);t.a=i},function(e,t){e.exports={container:"PlaylistItemLoading-container-2kR7-",alternateContainer:"PlaylistItemLoading-alternateContainer-3UvX6 PlaylistItemLoading-container-2kR7-"}},function(e,t,n){
"use strict";function i(e,t){return{connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}}function r(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver()}}var a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(84),m=(n.n(g),n(227)),y=(n.n(m),n(432)),b=(n.n(y),n(29)),I=n(293),S=n(348),M=n(799),D=n(3292),C=n.n(D),O={beginDrag:function(e){return{providerEntityID:e.providerEntityID,
serverEntityID:e.serverEntityID,metadataListEntityID:e.metadataListEntityID,playlistItemEntityID:e.playlistItemEntityID,cellIndex:e.cellIndex,isSmart:e.isSmart,listType:e.listType,viewportWidth:e.viewportWidth}},endDrag:function(e,t,n){e.onItemDragEnd(t.getItem(),t.didDrop())}},j={hover:function(e,t,n){var i=Object(g.findDOMNode)(n).getBoundingClientRect(),r=(i.bottom-i.top)/2,a=t.getClientOffset(),o=a.y-i.top,s=e.cellIndex,l=o>r?s+1:s;e.onItemDragMove(l)}},P=function(e){function t(){
return l()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.componentDidMount=function(){this.props.connectDragPreview(Object(y.getEmptyImage)())},t.prototype.shouldComponentUpdate=function(e,t){return Object(b.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.moveIndex,n=e.cellIndex,i=e.isOver,r=e.isDragging,a=e.connectDropTarget,s=i&&t===n,l=i&&t===n+1;return a(o()("div",{
className:(C.a.container||"")+" "+(r&&S.c||"")+" "+(s&&i&&S.e||"")+" "+(l&&i&&S.d||""||"")},void 0,v.a.createElement(M.a,this.props)))},t}(f.Component);t.a=Object(m.DropTarget)(I.b,j,r)(Object(m.DragSource)(I.b,O,i)(P))},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataListEntityID,o=e.metadataKey,s=e.title,f=e.isSmart,m=e.isSelected,y=e.hasActiveSelection,b=e.isOtherItemSelected,I=e.isModifierKeyPressed,S=e.cellIndex,M=e.isDragging,D=e.connectDragSource,C=e.onRemovePress,O=e.onSelectPress,j=e.onDeselectPress,P=!f&&(I||b);return a()("div",{
className:((S%2?v.a.alternateContainer:v.a.container)||"")+" "+(y&&v.a.hasActiveSelection||"")+" "+(P&&v.a.isForcingSelection||"")+" "+(m&&v.a.isSelected||"")+" "+(f&&v.a.isSmart||"")+" "+(M&&v.a.isItemDragging||""||"")},void 0,!f&&a()(p.a,{className:v.a.underlay,"aria-label":m?Object(l.default)("Deselect {title}",{title:s}):Object(l.default)("Select {title}",{title:s}),tabIndex:y?"0":"-1",onPress:m?j:O}),a()("div",{className:v.a.overlay,"data-qa-id":"playlistItem"},void 0,!f&&D(a()("div",{
className:v.a.moveControl,"data-qa-id":"playlistReorderItem"},void 0,a()(c.a,{className:v.a.grabIcon,name:"plex-icon-reorder-560"}))),a()(h.a,{className:v.a.metadataContainer,durationContainerClassName:v.a.metadataDurationContainer,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataListEntityID:r,metadataKey:o,cellIndex:S}),!f&&a()("div",{className:v.a.otherControls},void 0,a()(g.a,{className:v.a.selectButton,title:s,isSelected:m,onPress:m?j:O}),a()(d.a,{
className:v.a.removeButton,"data-qa-id":"playlistRemoveButton",icon:"plex-icon-remove-560",title:Object(l.default)("Remove"),kind:u.b.DANGER,onPress:C}))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(26),u=n(24),d=n(352),p=n(22),h=n(3288),f=n(3291),v=n.n(f),g=n(362);i.defaultProps={isDragging:!1,connectDragSource:function(e){return e}},t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),Object(s.a)(),function(e){
return e.ui.audioVideoPlayer.isPaused},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=arguments[2],i=l.f,r=Object(d.c)(e.type,e.subtype,i),a=r===d.a?f:v,o=Object(u.a)(a,null,e.type,e.subtype,e,i);return{type:e.type,metadataKey:e.key,duration:e.duration,title:e.title,context:i,imageWidth:o.width,imageHeight:o.height,imageUrl:o.url,isPlaying:t,isPlayerPaused:n}})}function r(e,t){return{onPlayPress:function(){e(Object(c.m)({
serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,playlistMetadataItemEntityID:t.metadataListEntityID,metadataItemEntityID:t.metadataItemEntityID,metricsPage:t.metricsPage}))}}}var a=n(6),o=(n.n(a),n(21)),s=n(1174),l=n(31),c=n(60),u=n(228),d=n(121),p=n(57),h=n(3289),f=64,v=36;t.a=Object(p.a)(i,r)(h.a)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.indexContainerClassName,i=e.titlesContainerClassName,r=e.durationContainerClassName,o=e.serverEntityID,s=e.providerEntityID,g=e.metadataItemEntityID,y=e.cellIndex,b=e.type,I=e.subtype,S=e.title,M=e.duration,D=e.context,C=e.imageWidth,O=e.imageHeight,j=e.imageUrl,P=e.isPlaying,w=e.isPlayerPaused,T=e.onPlayPress,E=Object(l.b)(b,D,{providerEntityID:s,subtype:I});return a()("div",{className:t},void 0,a()("div",{className:n},void 0,!P&&a()(h.a,{className:m.a.transientTitleLeft,
index:y+1}),!P&&a()(u.a,{className:m.a.playButton,title:S,onPress:T}),P&&a()(c.a,{className:m.a.equalizer,isPaused:w})),a()("div",{className:m.a.cardContainer},void 0,a()(d.a,{className:m.a.card,serverEntityID:o,providerEntityID:s,component:v.a,width:C,height:O,url:j},g)),a()("div",{className:i,"data-qa-id":"playlistTitleContainer"},void 0,E.map(function(e,t){return a()(p.a,{serverEntityID:o,providerEntityID:s,metadataItemEntityID:g,component:e,isSecondary:t>0},t)})),!!M&&a()("div",{className:r
},void 0,a()(f.a,{className:m.a.transientTitleRight,duration:M})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(174)),c=n(707),u=n(173),d=n(296),p=n(257),h=n(782),f=n(718),v=n(256),g=n(3290),m=n.n(g);i.defaultProps={className:m.a.container,indexContainerClassName:m.a.indexContainer,titlesContainerClassName:m.a.titlesContainer,durationContainerClassName:m.a.durationContainer},t.a=i},function(e,t){e.exports={container:"PlaylistItemMetadata-container-2NWQH",
transientTitleLeft:"PlaylistItemMetadata-transientTitleLeft-3qVWp PlaylistItemMetadata-transientTitle-2Qo_V",button:"PlaylistItemMetadata-button-mjGjC",cardContainer:"PlaylistItemMetadata-cardContainer-7tc0m",card:"PlaylistItemMetadata-card-2mWmP QuickSearchMetadataPosterCard-card-3_XFi MetadataPosterButtonCard-card-2T8TR",indexContainer:"PlaylistItemMetadata-indexContainer-fnl6e",titlesContainer:"PlaylistItemMetadata-titlesContainer-964Le",
durationContainer:"PlaylistItemMetadata-durationContainer-yQA2V",transientTitle:"PlaylistItemMetadata-transientTitle-2Qo_V",transientTitleRight:"PlaylistItemMetadata-transientTitleRight-3KEzx PlaylistItemMetadata-transientTitle-2Qo_V",playButton:"PlaylistItemMetadata-playButton-2Nx0M PlayButton-playButton-3WX8X PlaylistItemMetadata-button-mjGjC",equalizer:"PlaylistItemMetadata-equalizer-3_dxg EqualizerIcon-equalizer-2SoFA"}},function(e,t){e.exports={container:"PlaylistItemRow-container-PfUn9",
isSelected:"PlaylistItemRow-isSelected-1Ajx9",button:"PlaylistItemRow-button-13eRZ",isSmart:"PlaylistItemRow-isSmart-2l7Gd",moveControl:"PlaylistItemRow-moveControl-2sc-e",otherControls:"PlaylistItemRow-otherControls-2m4rn",metadataDurationContainer:"PlaylistItemRow-metadataDurationContainer-96Rvw PlaylistItemMetadata-durationContainer-yQA2V",isForcingSelection:"PlaylistItemRow-isForcingSelection-3N6Br",
selectButton:"PlaylistItemRow-selectButton-1nLWB SelectButton-selectButton-3Kbjm PlaylistItemRow-button-13eRZ",hasActiveSelection:"PlaylistItemRow-hasActiveSelection-3MrNh",overlay:"PlaylistItemRow-overlay-2nVlq",removeButton:"PlaylistItemRow-removeButton-1g21f IconButton-button-9An-7",alternateContainer:"PlaylistItemRow-alternateContainer-2SVf_ PlaylistItemRow-container-PfUn9",metadataContainer:"PlaylistItemRow-metadataContainer-1BWE5 PlaylistItemMetadata-container-2NWQH",
underlay:"PlaylistItemRow-underlay-iZmQR",grabIcon:"PlaylistItemRow-grabIcon--qMgM",isItemDragging:"PlaylistItemRow-isItemDragging-2d2Wa"}},function(e,t){e.exports={container:"PlaylistItemDragSource-container-ACeFE"}},function(e,t,n){"use strict";function i(e){return{item:e.getItem(),itemType:e.getItemType(),currentOffset:e.getSourceClientOffset()}}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(8),c=n.n(l),u=n(9),d=n.n(u),p=n(10),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(227),y=(n.n(m),
n(29)),b=n(293),I=n(1228),S=n(525),M=n(799),D=n(3294),C=n.n(D),O=function(e){function t(){return c()(this,t),d()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.item,n=e.itemType,i=e.currentOffset;if(!i||n!==b.b)return null;var r=Object(I.a)(i,t.viewportWidth);return s()(S.a,{},void 0,s()("div",{className:C.a.dragPreview,style:r},void 0,g.a.createElement(M.a,a()({
isDragging:!0},t))))},t}(v.Component);t.a=Object(m.DragLayer)(i)(O)},function(e,t){e.exports={dragPreview:"PlaylistItemDragPreview-dragPreview-pFud8"}},function(e,t){e.exports={header:"PlaylistItemTable-header-2fQb_ HubCell-hubHeader-l3HPI",durationTitle:"PlaylistItemTable-durationTitle-2PGlc"}},function(e,t){e.exports={emptyContainer:"PlaylistItemList-emptyContainer-3nMxM",emptyMessage:"PlaylistItemList-emptyMessage-1ot0C PlaylistItemList-emptyContainer-3nMxM"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(29)),f=(n(81),n(72)),v=n(158),g=n(150),m=n(107),y=n(149),b=n(125),I=n(136),S=n(183),M=n(96),D=n(233),C=n(147),O=n(177),j=n(310),P=r()(b.a,{}),w=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onContentMeasure=function(e){var t=e.width,n=e.height;r.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},r.state={isContentMeasured:!1,contentWidth:null,
contentHeight:null},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(h.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataListEntityID,o=e.metadataKey,s=e.title,l=e.minYear,c=e.maxYear,u=e.type,d=e.summary,p=e.thumb,h=e.art,b=e.listType,w=e.listStyle,T=e.isListReady,E=e.pageWidth,x=e.pageHeight,N=e.scrollTop,A=e.posterWidth,L=e.posterTop,k=this.state,_=k.isContentMeasured,R=k.contentWidth,z=k.contentHeight,U=!(!l||!c||l===c),B=!(!c||l!==c),V=!(!_||!a);return r()(g.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i,metadataKey:o,type:u,thumb:p,art:h,pageWidth:E,pageHeight:x,scrollTop:N,posterWidth:A,posterTop:L},void 0,r()(f.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(m.a,{},void 0,r()(I.a,{},void 0,r()(M.a,{},void 0,s)),r()(S.a,{},void 0,(U||B)&&r()(M.a,{},void 0,U?l+" \u2014 "+c:c),r()(D.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),P,!!d&&r()(m.a,{},void 0,r()(C.a,{},void 0,d))),r()(y.a,{},void 0,V&&r()(v.a,{serverEntityID:t,
providerEntityID:n,metadataListEntityID:a,listType:b,listStyle:w,component:j.a,initialSize:20,showArtwork:!!h,viewportWidth:R,viewportHeight:x,contentHeight:z,scrollTop:N}),T&&r()(m.a,{},void 0,r()(O.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);t.a=w},function(e,t,n){"use strict";function i(){return a()(u.a,{title:Object(s.default)("You must be lost"),description:Object(s.default)("This item does not have its own page")},void 0,a()(c.a,{to:"#",kind:l.b.PRIMARY
},void 0,Object(s.default)("Go Home")))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(4)),l=n(24),c=n(22),u=n(731);t.a=i},function(e,t,n){"use strict";function i(){return a()(u.a,{title:Object(s.default)("Nothing is here"),description:Object(s.default)("This item may have been deleted recently")},void 0,a()(c.a,{to:"#",kind:l.b.PRIMARY},void 0,Object(s.default)("Go Home")))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(4)),l=n(24),c=n(22),u=n(731);t.a=i},function(e,t){e.exports={
prePlayPageContentContainer:"PrePlayPageContent-prePlayPageContentContainer-1ckaM PageContent-pageContent-16mK6",prePlayPageContent:"PrePlayPageContent-prePlayPageContent-1fFCH"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(43)),s=n(40),l=n(56),c=n(138),u=n(66),d=n(186),p=n(234),h=n(235),f=n(800),v=r()(c.a,{}),g=l.a.extend({component:function(e){
var t=e.selectedServerID,n=e.selectedProviderID,i=e.params||{},a=i.key,l=i.record,c=i.allEpisodes,g=Object(s.a)(o.m,t),m=Object(s.a)(o.k,n,g);return r()(d.a,{metricsContext:i.context},void 0,r()(u.a,{},void 0,v,r()(p.a,{machineIdentifier:t},void 0,r()(h.a,{providerEntityID:m},void 0,r()(f.a,{machineIdentifier:t,serverEntityID:g,providerEntityID:m,metadataKey:a,record:1===parseInt(l,10),allEpisodes:1===parseInt(c,10)})))))}});t.a=g},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(56)),s=n(3303),l=n(66),c=o.a.extend({component:function(e){var t=e.selectedProviderID,n=e.params||{};return r()(l.a,{},void 0,r()(s.a,{providerIdentifier:t,metadataKey:n.key}))}});t.a=c},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(function(e,t){return t.providerIdentifier},d.a,u.a,function(e,t,n){if(n)for(var i=n.desktop.providers,r=0,a=i.length;r<a;r++){var o=t[i[r]];if(o.identifier===e)return{serverEntityID:n.entityID,
providerEntityID:o.entityID}}return{}})}var r=n(7),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(6),u=(n.n(c),n(3304)),d=n(194),p=n(3305),h=Object(l.b)(i)(p.a);h.propTypes=a()({},h.propTypes,{providerIdentifier:s.a.string.isRequired}),t.a=h},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(218)),a=Object(i.createSelector)(r.a,function(e){return e.transientServer},function(e,t){return e[t]});t.a=a},function(e,t,n){"use strict";function i(e){
return e.serverEntityID&&e.providerEntityID?l.a.createElement(h.a,e):a()(p.a,{title:Object(c.default)("No longer available"),description:Object(c.default)("Details can only be mirrored temporarily while casting")},void 0,a()(d.a,{to:"#",kind:u.b.PRIMARY},void 0,Object(c.default)("Go Home")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(4),u=n(24),d=n(22),p=n(126),h=n(800);t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),
n(43)),s=n(40),l=n(172),c=n(186),u=n(138),d=n(449),p=n(800),h=n(56),f=n(66),v=h.a.extend({component:function(e){var t=e.selectedProviderID,n=e.params||{},i=n.key,a=n.record,h=n.allEpisodes,v=l.a,g=Object(s.a)(o.m,v),m=Object(s.a)(o.k,t,g);return r()(c.a,{metricsContext:n.context},void 0,r()(f.a,{},void 0,r()(u.a,{selectedProviderEntityID:m}),r()(d.a,{serverEntityID:g,providerEntityID:m},void 0,r()(p.a,{machineIdentifier:v,serverEntityID:g,providerEntityID:m,metadataKey:i,
record:1===parseInt(a,10),allEpisodes:1===parseInt(h,10)}))))}});t.a=v},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(58)),s=n(43),l=n(40),c=n(56),u=n(138),d=n(66),p=n(234),h=n(235),f=n(445),v=r()(u.a,{}),g=c.a.extend({component:function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.params||{},a=i.key,c=i.save,u=Object(l.a)(s.m,t),g=Object(l.a)(s.k,n,u);return r()(d.a,{},void 0,v,r()(p.a,{machineIdentifier:t},void 0,r()(h.a,{providerEntityID:g},void 0,r()(f.a,{
machineIdentifier:t,serverEntityID:u,providerEntityID:g,directoryKey:a,isTimeline:!0,shouldSaveRoute:o.a.parseBoolean(c)}))))}});t.a=g},function(e,t,n){"use strict";var i=n(248),r=n(3309),a=i.a.extend({controller:new r.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=a},function(e,t,n){"use strict"
;var i=n(4),r=n(17),a=n(249),o=n(1229),s=n(3311),l=n(3329),c=n(3334),u=n(1231),d=n(383),p=a.a.extend({channel:function(e,t,n){this.populateView({serverID:e,channelID:t,channelKey:n}).done(function(e){var t=e.channelItem?e.channelItem:e.channel;r.a.trigger("show:view",new s.a({model:t,listModel:t.get("metadataList")}))})},channelDetails:function(e,t,n){this.populateView({serverID:e,channelID:t,channelKey:n}).done(function(e){var t=e.channelItem.get("metadataList").getCollection(),n=t.first()
;r.a.trigger("show:view",new u.a({model:n}))})},channels:function(e){this.populateView({serverID:e}).done(function(e){var t=new o.a({subset:"all"},{server:e.server}),n=t.get("channels");n.comparator=n.sortByTitle;var a=t.fetch({scope:"page"});a.done(function(){r.a.trigger("show:view",new l.a({collection:n}))}),a.fail(function(){r.a.trigger("show:view",new d.a({title:Object(i.default)("Your plugins are unavailable.")}))})})},directory:function(e,t,n){this.populateView({serverID:e
}).done(function(e){if(e.server.get("shared"))return void r.a.trigger("show:view",new d.a({title:Object(i.default)("The plugin directory is restricted from shared users.")}));var a=new o.a({key:"/system/appstore"},{server:e.server}),s=a.fetch({scope:"page"});s.done(function(){r.a.trigger("show:view",new c.a({collection:a.get("channels"),currentKey:t,currentPath:n}))}),s.fail(function(){r.a.trigger("show:view",new d.a({title:Object(i.default)("The plugin directory is unavailable.")}))})})}})
;t.a=p},function(e,t,n){"use strict";var i=n(17),r=n(23),a=n(881),o=r.a.extend({name:"ChannelCollection",context:["server","channel"],model:a.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=o
},function(e,t,n){"use strict";var i=n(3312),r=n.n(i),a=n(20),o=n(17),s=n(15),l=n(3313),c=n(203),u=n(148),d=n(3314),p=n(3317),h=n(3326),f=n(3328),v=a.a.Layout.extend({className:"channel-container legacy-page",template:r.a,regions:{breadcrumbBar:".legacy-breadcrumb-bar",scroller:".legacy-content-scroller"},initialize:function(e){var t=Object(s.d)("appStore").dispatch;t(Object(c.a)({allowLightPreset:!1})),this.listModel=e.listModel,this.collection=this.listModel.get("metadataItems")
;var n=this.model.get("header"),i=this.model.get("message");(n||i)&&o.a.trigger("show:alert",{message:i||n}),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 r=this.model.channel||this.model,a=r.id?r.id:r.get("identifier");this.searchKey&&t(u.changeQuickSearchSettings({
serverEntityID:this.model.server.entityID(),channelPlaceholder:this.searchPlaceholder,channelID:a,channelSearchKey:this.searchKey})),this.listType=l.a.getListType(this.model),o.a.trigger("show:background",{model:this.model,dim:!0})},getListConstructor:function(){switch(this.listType){case l.a.types.tileList:return p.a;case l.a.types.detailsList:return h.a;default:return f.a}},onRender:function(){var e=this.getListConstructor();this.scroller.show(new e({listModel:this.listModel,
collection:this.collection,paginated:!1}));var t=new d.a({model:this.model,currentListType:this.listType});this.listenTo(t,"change:listType",this.onListTypeChange),this.breadcrumbBar.show(t)},onClose:function(){(0,Object(s.d)("appStore").dispatch)(u.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),channelPlaceholder:null,channelID:null,channelSearchKey:null}))},onListTypeChange:function(e){this.listType=e,this.listModel.scrollPosition=0,
this.scroller.currentView.scrollPosition=0,this.render()}});t.a=v},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="legacy-content"> <div class="legacy-breadcrumb-bar"></div> <div class="legacy-content-scroller dark-scrollbar"></div> </div> '})},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 o.tileList;if("List"===i)return o.list;if(t.findWhere({type:"photo"}))return o.tileList;var r=a.a.compact(t.pluck("summary")),s=a.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 s.length>n/2&&c<30?o.tileList:r.length>n/2?o.detailsList:o.list}var r=n(5),a=n.n(r),o={tileList:"media-tile-list",detailsList:"media-details-list",list:"media-list"},s={types:o,getListType:i};t.a=s},function(e,t,n){"use strict"
;var i=n(3315),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(17),d=n(245),p=n(574),h=c.a.Layout.extend({className:"breadcrumb-bar",template:r.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);return i+="/channel/"+encodeURIComponent(n),{channelTitle:t,channelUrl:i,title:this.model.channel?this.model.get("title"):null,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(o.a.bind(function(){u.a.trigger("show:modal",new p.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)}});t.a=h},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return'<a class="settings-btn btn-gray" href="#"><i class="glyphicon cogwheel"></i></a>'}function l(e,t){return"hidden"}function c(e,t){var n,i="";return i+='<span class="breadcrumb-dropdown"><a href="'+h((n=e&&e.channelUrl,typeof n===p?n.apply(e):n))+'">'+h((n=e&&e.channelTitle,typeof n===p?n.apply(e):n))+"</a></span>"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var u,d="",p="function",h=this.escapeExpression,f=this;return d+='<div class="breadcrumb-actions pull-right"> ',u=r.if.call(t,t&&t.showSettings,{hash:{},inverse:f.noop,fn:f.program(1,s,o),data:o}),(u||0===u)&&(d+=u),
d+=' <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(3)).call(t,"Posters",{hash:{},data:o}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=i(n(223)).call(t,t&&t.listType,"media-tile-list",{hash:{},
inverse:f.noop,fn:f.program(3,l,o),data:o}),(u||0===u)&&(d+=u),d+='"></i></a></li> <li><a class="list-btn" data-type="media-details-list" href="#">'+h(i(n(3)).call(t,"Details",{hash:{},data:o}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=i(n(223)).call(t,t&&t.listType,"media-details-list",{hash:{},inverse:f.noop,fn:f.program(3,l,o),data:o}),(u||0===u)&&(d+=u),d+='"></i></a></li> <li><a class="list-btn" data-type="media-list" href="#">'+h(i(n(3)).call(t,"List",{hash:{},data:o
}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=i(n(223)).call(t,t&&t.listType,"media-list",{hash:{},inverse:f.noop,fn:f.program(3,l,o),data:o}),(u||0===u)&&(d+=u),d+='"></i></a></li> </ul> </span> </div> ',u=r.if.call(t,t&&t.channelTitle,{hash:{},inverse:f.noop,fn:f.program(5,c,o),data:o}),(u||0===u)&&(d+=u),d+=' <span class="breadcrumb-subset-dropdown ',u=r.unless.call(t,t&&t.title,{hash:{},inverse:f.noop,fn:f.program(3,l,o),data:o}),(u||0===u)&&(d+=u),
d+='"><span class="dropdown-placeholder">'+h((u=t&&t.title,typeof u===p?u.apply(t):u))+'</span></span> <span class="list-badge badge badge-lg">'+h((u=t&&t.totalSize,typeof u===p?u.apply(t):u))+"</span> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=" "+p(i(n(3)).call(e,"Directory Settings",{hash:{},data:t}))+" "}function l(e,t){var r=""
;return r+=" "+p(i(n(3)).call(e,"{1} Settings",e&&e.title,{hash:{},data:t}))+" "}function c(e,t){var r="";return r+=" "+p(i(n(27)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p=this.escapeExpression,h=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(25)).call(t,t&&t.title,"Preferences...",{hash:{},inverse:h.program(3,l,o),fn:h.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+=' </h4> </div> <form id="channel-settings-form"> <div class="modal-body settings-container"> ',
u=r.each.call(t,t&&t.settings,{hash:{},inverse:h.noop,fn:h.program(5,c,o),data:o}),(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">'+p(i(n(3)).call(t,"Cancel",{hash:{},data:o}))+'</button> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+p(i(n(3)).call(t,"Save",{hash:{},data:o
}))+"</span> </button> </div> </form> </div> </div> "})},function(e,t,n){"use strict";var i=n(63),r=n(3318),a=i.a.extend({tagName:"ul",className:"tile-list media-tile-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(3319),r=n.n(i),a=n(5),o=n.n(a),s=n(3320),l=n(575),c=n(167),u=l.a.extend({className:"poster-item media-tile-list-item",template:r.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){l.a.prototype.initialize.apply(this,arguments),this.model&&this.createImageView()},createImageView:function(){var e=Object(s.a)(this.model.section),t="photo"===e?e:this.type,n=150;"episode"===t?t="show":"clip"!==t&&"userPlaylistItem"!==t||(n=250),this.image=new c.a({model:this.model,type:t,getUrl:this.getPosterUrl,width:n})},bindings:o.a.extend({},l.a.prototype.bindings,{".media-subtitle-1":{
modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=l.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=l.a.prototype.bindings[".media-subtitle-2"].formatter.apply(this,arguments)
;return"episode"===this.model.get("type")&&this.ui.subtitle2Fill.toggleClass("hidden",!!t),t}}})});t.a=u},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return"hide-actions"}function o(e,t){return"selected"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var l,c,u="",d=this,p=this.escapeExpression;return u+='<a class="media-poster-container ',l=n.unless.call(t,t&&t.showActions,{hash:{},
inverse:d.noop,fn:d.program(1,a,r),data:r}),(l||0===l)&&(u+=l),u+=" ",l=n.if.call(t,t&&t.selected,{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+='" href="',(c=n.url)?l=c.call(t,{hash:{},data:r}):(c=t&&t.url,l="function"==typeof c?c.call(t,{hash:{},data:r}):c),u+=p(l)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-actions ',l=n.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(5,s,r),data:r}),
(l||0===l)&&(u+=l),
u+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <div class="media-progress"></div> </div> <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-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){"use strict";function i(e){return a.a.isEmpty(e)?void 0:e.get("type")}t.a=i;var r=n(5),a=n.n(r)},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return"show-actions"}function o(e,t){return"selected"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var l,c,u="",d=this,p=this.escapeExpression;return u+='<a class="media-list-inner-item ',l=n.if.call(t,t&&t.showActions,{hash:{},
inverse:d.noop,fn:d.program(1,a,r),data:r}),(l||0===l)&&(u+=l),u+=" ",l=n.if.call(t,t&&t.selected,{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+='" href="',(c=n.url)?l=c.call(t,{hash:{},data:r}):(c=t&&t.url,l="function"==typeof c?c.call(t,{hash:{},data:r}):c),u+=p(l)+'"> <div class="media-actions ',l=n.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(5,s,r),data:r}),(l||0===l)&&(u+=l),
u+='"> <button class="play-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></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> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '
})},function(e,t,n){"use strict";var i=n(3323),r=n.n(i),a=n(20),o=n(526),s=a.a.ItemView.extend({className:"hidden",template:r.a,bindings:{".media-progress-pct":{modelAttribute:"viewOffset",manual:!0,formatter:function(e,t){var n=this.model,i="track"===n.get("type")?0:Object(o.a)(e,n.get("duration"));i&&t.css("width",i+"%"),this.$el.toggleClass("hidden",!i)}}}});t.a=s},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),r=r||{},'<div class="media-progress-track"></div> <div class="media-progress-pct"></div> '})},function(e,t,n){"use strict";var i=n(3325),r=n.n(i),a=n(12),o=n.n(a),s=n(20),l=n(17),c=n(32),u=n(801),d=n(689),p=n(688),h=s.a.ItemView.extend({tagName:"ul",className:"dropdown-menu",template:r.a,events:{"click .mark-watched-btn":"onMarkWatchedClick","click .mark-unwatched-btn":"onMarkUnwatchedClick","click .watch-later-btn":"onWatchLaterClick",
"click .recommend-btn":"onRecommendClick","click .info-btn":"onInfoClick"},initialize:function(e){this.mediaActions=new u.a({},{item:this.model}),o()(".dropdown.open .dropdown-toggle").dropdown("toggle")},serializeData:function(){return{}},bindingsModel:"mediaActions",bindings:{".mark-watched-btn":{modelAttribute:"showMarkWatched",manual:!0,autohide:!0},".mark-unwatched-btn":{modelAttribute:"showMarkUnwatched",manual:!0,autohide:!0},".watch-later-btn":{modelAttribute:"showWatchLater",manual:!0,
autohide:!0},".recommend-btn":{modelAttribute:"showShare",manual:!0,autohide:!0},".delete-btn":{modelAttribute:"showDelete",manual:!0,autohide:!0},".info-btn":{modelAttribute:"showInfo",manual:!0,autohide:!0}},onClose:function(){this.mediaActions.stopListening()},onMarkWatchedClick:function(e){e.preventDefault(),c.a.execute("markWatched",{item:this.model})},onMarkUnwatchedClick:function(e){e.preventDefault(),c.a.execute("markUnwatched",{item:this.model})},onWatchLaterClick:function(e){
e.preventDefault(),c.a.execute("watchLater",{item:this.model})},onRecommendClick:function(e){e.preventDefault(),l.a.trigger("show:modal",new p.a({model:this.model}))},onInfoClick:function(e){e.preventDefault(),l.a.trigger("show:modal",new d.a({model:this.model}))}});t.a=h},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var s="",l=this.escapeExpression;return s+='<li><a class="mark-watched-btn" href="#" tabindex="-1">'+l(i(n(3)).call(t,"Mark as Watched",{hash:{},data:o}))+'</a></li> <li><a class="mark-unwatched-btn" href="#" tabindex="-1">'+l(i(n(3)).call(t,"Mark as Unwatched",{hash:{},data:o}))+'</a></li> <li><a class="watch-later-btn" href="#" tabindex="-1">'+l(i(n(3)).call(t,"Watch Later",{hash:{},data:o}))+'</a></li> <li><a class="recommend-btn" href="#" tabindex="-1">'+l(i(n(3)).call(t,"Recommend...",{
hash:{},data:o}))+'</a></li> <li><a class="info-btn" href="#" tabindex="-1">'+l(i(n(3)).call(t,"Get Info",{hash:{},data:o}))+"</a></li> "})},function(e,t,n){"use strict";var i=n(63),r=n(1230),a=i.a.extend({tagName:"ul",className:"list media-list media-details-list",itemView:r.a});t.a=a},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return"show-actions"}function o(e,t){return"selected"}function s(e,t){return"hidden"}
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var l,c,u="",d=this,p=this.escapeExpression;return u+='<a class="media-list-inner-item ',l=n.if.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,a,r),data:r}),(l||0===l)&&(u+=l),u+=" ",l=n.if.call(t,t&&t.selected,{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+='" href="',(c=n.url)?l=c.call(t,{hash:{},data:r}):(c=t&&t.url,l="function"==typeof c?c.call(t,{hash:{},data:r}):c),
u+=p(l)+'"> <div class="media-poster"></div> <div class="media-actions ',l=n.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(5,s,r),data:r}),(l||0===l)&&(u+=l),
u+='"> <button class="play-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="more-btn media-action-btn" 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> <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){"use strict";var i=n(63),r=n(575),a=i.a.extend({tagName:"ul",className:"list media-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(3330),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(15),d=n(32),p=n(203),h=n(3331),f=c.a.Layout.extend({className:"container",template:r.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(){(0,Object(u.d)("appStore").dispatch)(Object(p.a)({allowLightPreset:!1})),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 h.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 h.a({collection:this.collection}))},
onVideoClick:function(e){e.preventDefault(),this.list.show(new h.a({collection:this.videoCollection}))},onMusicClick:function(e){e.preventDefault(),this.list.show(new h.a({collection:this.musicCollection}))},onPhotoClick:function(e){e.preventDefault(),this.list.show(new h.a({collection:this.photoCollection}))},onCheckUpdatesClick:function(e){e.preventDefault();var t=this.ui.checkUpdatesBtn;if(!t.hasClass("active")){t.addClass("active");d.a.execute("updateChannel",{server:this.collection.server
}).always(o.a.bind(function(){t.removeClass("active")},this))}}});t.a=f},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i="";return i+='<span class="badge">'+v((n=e&&e.allCount,typeof n===f?n.apply(e):n))+"</span>"}function l(e,t){var n,i="";return i+='<span class="badge">'+v((n=e&&e.videoCount,typeof n===f?n.apply(e):n))+"</span>"}function c(e,t){var n,i=""
;return i+='<span class="badge">'+v((n=e&&e.musicCount,typeof n===f?n.apply(e):n))+"</span>"}function u(e,t){var n,i="";return i+='<span class="badge">'+v((n=e&&e.photoCount,typeof n===f?n.apply(e):n))+"</span>"}function d(e,t){var r="";return r+=' <div class="filter-bar"> <a class="btn btn-sm btn-primary pull-right" href="#!/server/'+v(i(n(190)).call(e,e&&e.serverID,{hash:{},data:t}))+'/directory">'+v(i(n(3)).call(e,"Install Plugins",{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">'+v(i(n(3)).call(e,"Check for Updates",{hash:{},data:t}))+"</span> </a> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var p,h="",f="function",v=this.escapeExpression,g=this;return h+='<ul class="nav nav-header pull-right"> <li><a class="all-btn btn-gray selected" href="#">'+v(i(n(3)).call(t,"All",{hash:{},data:o})),
p=r.if.call(t,t&&t.allCount,{hash:{},inverse:g.noop,fn:g.program(1,s,o),data:o}),(p||0===p)&&(h+=p),h+='</a></li> <li><a class="video-btn btn-gray" href="#">'+v(i(n(3)).call(t,"Video",{hash:{},data:o})),p=r.if.call(t,t&&t.videoCount,{hash:{},inverse:g.noop,fn:g.program(3,l,o),data:o}),(p||0===p)&&(h+=p),h+='</a></li> <li><a class="music-btn btn-gray" href="#">'+v(i(n(3)).call(t,"Music",{hash:{},data:o})),p=r.if.call(t,t&&t.musicCount,{hash:{},inverse:g.noop,fn:g.program(5,c,o),data:o}),
(p||0===p)&&(h+=p),h+='</a></li> <li><a class="photo-btn btn-gray" href="#">'+v(i(n(3)).call(t,"Photo",{hash:{},data:o})),p=r.if.call(t,t&&t.photoCount,{hash:{},inverse:g.noop,fn:g.program(7,u,o),data:o}),(p||0===p)&&(h+=p),h+="</a></li> </ul> <h2>"+v(i(n(3)).call(t,"Plugins",{hash:{},data:o}))+"</h2> ",p=r.unless.call(t,t&&t.shared,{hash:{},inverse:g.noop,fn:g.program(9,d,o),data:o}),(p||0===p)&&(h+=p),h+=' <div class="channels-container"></div> '})},function(e,t,n){"use strict"
;var i=n(63),r=n(3332),a=i.a.extend({tagName:"ul",className:"tile-list media-tile-list channel-tile-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(3333),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(4),c=n(17),u=n(32),d=n(245),p=n(167),h=n(574),f=s.a.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item channel",template:r.a,ui:{poster:".media-poster"},events:{"click .settings-btn":"onSettingsClick","click .uninstall-btn":"onUninstallClick"},initialize:function(e){
this.image=new p.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}},bindings:{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"type",autohide:!0,formatter:function(e){return"video"===e?Object(l.default)("Video"):"music"===e?Object(l.default)("Music"):"photos"===e?Object(l.default)("Photo"):Object(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(o.a.bind(function(){c.a.trigger("show:modal",new h.a({model:this.model,collection:t}))},this)),n.always(o.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(o.a.bind(function(){this.model.trigger("destroy",this.model,this.model.collection)},this)),t.always(o.a.bind(function(){this.$el.removeClass("active")},this))}}});t.a=f},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i=""
;return i+=' <div class="media-poster-overlay"></div> <div class="media-poster-actions"> ',n=r.if.call(e,(n=e&&e.item,null==n||!1===n?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"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this,p=this.escapeExpression;return u+='<a class="media-poster-container" href="#!/server/'+p(i(n(190)).call(t,t&&t.serverID,{hash:{},data:o}))+"/channel/"+p(i(n(190)).call(t,(c=t&&t.item,null==c||!1===c?c:c.key),{hash:{},data:o}))+'"> <div class="media-poster"> ',c=r.unless.call(t,t&&t.shared,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(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){"use strict";var i=n(3335),r=n.n(i),a=n(20),o=n(15),s=n(203),l=n(1229),c=n(3336),u=n(3339),d=a.a.Layout.extend({className:"container",template:r.a,regions:{list:".directory-container"},onlyAfterRender:["onUpdate"],initialize:function(e){(0,Object(o.d)("appStore").dispatch)(Object(s.a)({allowLightPreset:!1})),
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 l.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 u.a(t):new c.a(t),this.list.show(e)}});t.a=d},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t,r){var a,o="";return o+=' <li><a class="card btn-gray ',a=i(n(25)).call(e,r&&r.currentKey,e&&e.key,{hash:{},inverse:d.noop,fn:d.program(2,l,t),data:t}),
(a||0===a)&&(o+=a),o+='" href="#!/server/'+p(i(n(190)).call(e,r&&r.serverID,{hash:{},data:t}))+"/directory/"+p(i(n(190)).call(e,e&&e.key,{hash:{},data:t}))+'">'+p(i(n(3)).call(e,e&&e.title,{hash:{},data:t}))+"</a></li> "}function l(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this,p=this.escapeExpression;return u+="<h2>"+p(i(n(3)).call(t,"Plugin Directory",{hash:{},data:o
}))+'</h2> <div class="filter-bar"> <a class="btn btn-sm btn-default pull-right" href="#!/server/'+p(i(n(190)).call(t,t&&t.serverID,{hash:{},data:o}))+'/channels">'+p(i(n(3)).call(t,"Browse Plugins",{hash:{},data:o}))+'</a> </div> <div class="row"> <div class="col-md-3"> <ul class="nav nav-cards"> ',c=r.each.call(t,t&&t.directories,{hash:{},inverse:d.noop,fn:d.programWithDepth(1,s,o,t),data:o}),(c||0===c)&&(u+=c),u+=' </ul> </div> <div class="directory-container col-md-9"></div> </div> '})
},function(e,t,n){"use strict";var i=n(63),r=n(3337),a=i.a.extend({tagName:"ul",className:"list card-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(3338),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(17),c=n(32),u=n(245),d=n(574),p=s.a.ItemView.extend({tagName:"li",className:"striped-list-item",template:r.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(o.a.bind(function(){l.a.trigger("show:modal",new d.a({model:this.model,collection:t}))},this))}}});t.a=p},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+='<a class="card-collapsed" href="#!/server/'+c(i(n(190)).call(t,t&&t.serverID,{hash:{},data:o}))+"/directory/"+c(i(n(190)).call(t,t&&t.currentKey,{hash:{},data:o}))+"/"+c(i(n(190)).call(t,(s=t&&t.channel,null==s||!1===s?s:s.key),{hash:{},data:o
}))+'"> <span class="media-title media-heading"></span> </a> '})},function(e,t,n){"use strict";var i=n(63),r=n(3340),a=i.a.extend({tagName:"ul",className:"tile-list media-tile-list channel-directory-tile-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(3341),r=n.n(i),a=n(20),o=n(4),s=n(17),l=n(167),c=n(3342),u=a.a.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item channel-directory-tile-list-item channel",template:r.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 n=e?Object(o.default)("Installed"):"";return this.ui.subtitle.text(n),e}}},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){
this.image.close()},onClick:function(e){e.preventDefault(),s.a.trigger("show:modal",new c.a({model:this.model,closeOnInstall:this.closeOnInstall}))}});t.a=u},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},
'<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){"use strict";var i=n(3343),r=n.n(i),a=n(5),o=n.n(a),s=n(17),l=n(32),c=n(70),u=n(167),d=c.a.extend({name:"channelModal",className:"channel-modal modal fade",template:r.a,ui:{poster:".media-poster",installBtn:".install-btn",
updateBtn:".update-btn",uninstallBtn:".uninstall-btn"},events:o.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=o.a.last(t.split("/"));s.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(o.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");l.a.execute("updateChannel",{channel:this.model,skipConfirmation:!0}).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");l.a.execute("uninstallChannel",{channel:this.model,skipConfirmation:!0}).always(function(){t.removeClass("active")})}}});t.a=d},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+='<button class="browse-btn btn btn-primary">'+u(i(n(3)).call(e,"Browse",{hash:{},data:t}))+"</button>"}this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),o=o||{};var l,c="",u=this.escapeExpression,d=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||!1===l?l:l.title,
"function"==typeof l?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=r.unless.call(t,t&&t.agent,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(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(3)).call(t,"Update",{
hash:{},data:o}))+'</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(3)).call(t,"Restart",{hash:{},data:o}))+'</a></li> <li><a class="reset-btn" href="#">'+u(i(n(3)).call(t,"Reset",{hash:{},data:o
}))+'</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(3)).call(t,"Uninstall",{hash:{},data:o}))+'</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(3)).call(t,"Install",{hash:{},data:o
}))+'</span> </button> </div> </div> <div class="channel-details"> '+u((l=t&&t.channel,l=null==l||!1===l?l:l.summary,"function"==typeof l?l.apply(t):l))+" </div> </div> </div> </div> "})},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},
'<div class="legacy-action-bar"></div> <div class="legacy-content"> <div class="legacy-breadcrumb-bar"></div> <div class="legacy-content-scroller dark-scrollbar"></div> </div> '})},function(e,t,n){"use strict";var i=n(3346),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(15),d=n(17),p=n(32),h=n(60),f=n(688),v=n(689),g={preventDefault:!0,stopPropagation:!1},m=c.a.ItemView.extend({className:"action-bar",template:r.a,ui:{primaryActions:".action-bar-nav",secondaryActions:".dropdown-menu",
playBtn:".play-btn",markWatchedBtn:".mark-watched-btn",markUnwatchedBtn:".mark-unwatched-btn",watchLaterBtn:".watch-later-btn",recommendBtn:".recommend-btn",deleteFromUserPlaylistBtn:".delete-from-user-playlist-btn",infoBtn:".info-btn"},triggers:{"click .play-btn":"play","click .mark-watched-btn":"markWatched","click .mark-unwatched-btn":"markUnwatched","click .watch-later-btn":o.a.extend({event:"watchLater"},g),"click .recommend-btn":o.a.extend({event:"recommend"},g),
"click .delete-from-user-playlist-btn":o.a.extend({event:"deleteFromUserPlaylist"},g),"click .info-btn":o.a.extend({event:"info"},g)},onlyAfterRender:["onPlay","onMarkWatched","onMarkUnwatched","onWatchLater","onRecommend","onDeleteFromUserPlaylist","updateDropdown"],initialize:function(e){this.type=this.model.get("type"),this.mediaActions=e.mediaActions,this.listenTo(this.mediaActions,"change",o.a.throttle(this.updateDropdown,50)),
this.listenTo(this.mediaActions,"change:selectedItems",this.onSelectedItemsChange),this.listenTo(d.a,{"shortcut:play":this.onPlay,"shortcut:markWatched":this.onMarkWatched,"shortcut:markUnwatched":this.onMarkUnwatched,"shortcut:delete":this.onDeleteFromUserPlaylist,"shortcut:info":this.onInfo})},serializeData:function(){return{}},updateDropdown:function(){var e=this.ui.secondaryActions.find("a:not(.hidden)"),t=e.hasClass("secondary-only"),n=e.length>2||t
;this.$el.toggleClass("show-secondary-actions-dropdown",n)},bindingsModel:"mediaActions",bindings:{".play-btn":{modelAttribute:"showPlay",manual:!0,autohide:!0},".mark-watched-btn":{modelAttribute:"showMarkWatched",manual:!0,autohide:!0},".mark-unwatched-btn":{modelAttribute:"showMarkUnwatched",manual:!0,autohide:!0},".watch-later-btn":{modelAttribute:"showWatchLater",manual:!0,autohide:!0},".recommend-btn":{modelAttribute:"showShare",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(){if(!this.ui.playBtn.isDisabled()||!this.ui.playAllBtn.isDisabled()){Object(u.d)("appStore").dispatch(Object(h.k)({serverModel:this.model.server,metadataItemModel:this.model}))}},onMarkWatched:function(){
this.ui.markWatchedBtn.isDisabled()||p.a.execute("markWatched",{item:this.model})},onMarkUnwatched:function(){this.ui.markUnwatchedBtn.isDisabled()||p.a.execute("markUnwatched",{item:this.model})},onWatchLater:function(){this.ui.watchLaterBtn.isDisabled()||p.a.execute("watchLater",{item:this.model})},onRecommend:function(){this.ui.recommendBtn.isDisabled()||d.a.trigger("show:modal",new f.a({model:this.model}))},onDeleteFromUserPlaylist:function(){
if(!this.ui.deleteFromUserPlaylistBtn.isDisabled()){this.model.destroy().done(o.a.bind(function(){l()(".tooltip").remove(),d.a.trigger("navigate","dashboard",{replace:!0})},this))}},onInfo:function(){this.ui.infoBtn.isDisabled()||d.a.trigger("show:modal",new v.a({model:this.model}))}});t.a=m},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var s="",l=this.escapeExpression;return s+='<ul class="nav action-bar-nav"> <li> <a class="play-btn btn-gray" href="#" title="'+l(i(n(3)).call(t,"Play",{hash:{},data:o}))+'" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="mark-watched-btn btn-gray" href="#" title="'+l(i(n(3)).call(t,"Mark as Watched",{hash:{},data:o
}))+'" data-toggle="tooltip"><i class="glyphicon circle-ok"></i></a> </li> <li> <a class="mark-unwatched-btn btn-gray" href="#" title="'+l(i(n(3)).call(t,"Mark as Unwatched",{hash:{},data:o}))+'" data-toggle="tooltip"><i class="glyphicon circle-minus"></i></a> </li> <li> <a class="share-btn btn-gray secondary-action" href="#" title="'+l(i(n(3)).call(t,"Share",{hash:{},data:o
}))+'" data-toggle="tooltip"><i class="glyphicon share"></i></a> </li> <li> <a class="recommend-btn btn-gray secondary-action" href="#" title="'+l(i(n(3)).call(t,"Recommend",{hash:{},data:o}))+'" data-toggle="tooltip"><i class="glyphicon share-alt"></i></a> </li> <li> <a class="delete-from-user-playlist-btn btn-gray secondary-action" href="#" title="'+l(i(n(3)).call(t,"Delete",{hash:{},data:o
}))+'" data-toggle="tooltip"><i class="glyphicon bin"></i></a> </li> <li> <a class="info-btn btn-gray secondary-action" href="#" title="'+l(i(n(3)).call(t,"Info",{hash:{},data:o
}))+'" 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="watch-later-btn" href="#" tabindex="-1">'+l(i(n(3)).call(t,"Watch Later",{hash:{},data:o}))+'</a></li> <li><a class="recommend-btn" href="#">'+l(i(n(3)).call(t,"Recommend",{hash:{},data:o
}))+'</a></li> <li><a class="delete-from-user-playlist-btn has-danger" href="#">'+l(i(n(3)).call(t,"Delete",{hash:{},data:o}))+'</a></li> <li><a class="info-btn" href="#">'+l(i(n(3)).call(t,"Get Info",{hash:{},data:o}))+"</a></li> </ul> </li> </ul> "})},function(e,t,n){"use strict";var i=n(3348),r=n.n(i),a=n(15),o=n(3349),s=n(3351),l=n(686),c=n(3352),u=n(3354),d=n(167),p=n(3357),h=s.a.extend({mixins:o.a,className:"clip-details-row details-row",template:r.a,initialize:function(){
s.a.prototype.initialize.apply(this,arguments),this.starRatingView=new l.a({model:this.model,disabled:!0}),this.summaryView=new c.a({model:this.model}),this.audioDropdown=new u.a({type:"audio",model:this.model}),this.subtitlesDropdown=new u.a({type:"subtitles",model:this.model}),this.posterImage=new d.a({model:this.model,type:this.model.get("type"),width:this.posterWidth});var e=this.model.server.get("isCloud"),t=a.d("appModel"),n=t.get("primaryServer")
;(!e||n&&!n.get("isCloudSyncServer"))&&(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}))}});t.a=h},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression
;return s+='<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(3)).call(t,"Director",{
hash:{},data:o}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+l(i(n(3)).call(t,"Writer",{hash:{},data:o}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+l(i(n(3)).call(t,"Cast",{hash:{},data:o
}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+l(i(n(3)).call(t,"Audio",{hash:{},data:o}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+l(i(n(3)).call(t,"Subtitles",{hash:{},data:o
}))+'</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,n){
"use strict";var i=n(5),r=n.n(i),a=n(1232),o={bindings:r.a.pick(a.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=o},function(e,t,n){"use strict";function i(e){var t=a.a.reject(e.tags,function(e){return!e.tag}),n=e.model,i=n.section,r=i&&i.get("allowAdvancedFilters"),l=Object(s.r)(n.get("type")),c=e.separator||", ",u=""
;if(t&&t.length){var d=e.maxTags||t.length;d>t.length&&(d=t.length);for(var p=0;p<d;p++)u+=function(t){var n=a.a.escape(Object(o.default)(t.tag,e.maxLen));return r&&t.id?'<a class="pivot-link" href="'+["#!/server/"+encodeURIComponent(i.server.id),"/section/"+encodeURIComponent(i.id),"/filter","/"+encodeURIComponent(l.id),"/"+encodeURIComponent(e.key),"/"+encodeURIComponent(t.id),"/"+encodeURIComponent(t.tag)].join("")+'">'+n+"</a>":n}(t[p]),p+1<d&&(u+=c)}return u}
var r=n(5),a=n.n(r),o=n(874),s=n(28);t.a=i},function(e,t,n){"use strict";var i=n(20),r=n(15),a=n(60),o=n(1232),s=i.a.Layout.extend({mixins:o.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"},initialize:function(e){this.mediaActions=e.mediaActions},serializeData:function(){var e=this.model.get("grandparentKey"),t=this.model.get("parentKey");return{serverID:this.model.server.id,grandparentKey:t?encodeURIComponent(e):null,parentKey:t?encodeURIComponent(t):null}},onRender:function(){
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()},onPlayClick:function(e){e.preventDefault(),Object(r.d)("appStore").dispatch(Object(a.k)({serverModel:this.model.server,metadataItemModel:this.model}))}});t.a=s},function(e,t,n){"use strict"
;var i=n(3353),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(4),c=n(17),u=s.a.ItemView.extend({className:"summary",template:r.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=o.a.map(o.a.compact(e.split("\n")),function(e){return o.a.escape(e).trim()});if(t.length)return"<p>"+t.join("</p><p>")+"</p>"}}}},initialize:function(){this.listenTo(c.a,"resize",this.onResize),this.listenTo(this.model,"change:summary",this.onSummaryChange)},updateDividerBtn:function(e){var t=e?Object(l.default)("More"):Object(l.default)("Less");this.ui.dividerBtn.html(t)},updateDividerBtnVisibility:function(){if(this.originalHeight){
this.ui.summary.prop("scrollHeight")<=this.originalHeight?this.ui.divider.addClass("hidden"):(this.updateDividerBtn(!this.expanded),this.ui.divider.removeClass("hidden"))}},onRender:function(){o.a.defer(o.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=u},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="";return s+='<p class="item-summary metadata-summary"></p> <div class="summary-divider hidden"> <button type="button" class="summary-divider-btn">'+(0,this.escapeExpression)(i(n(3)).call(t,"More",{hash:{},data:o}))+"</button> </div> "})},function(e,t,n){"use strict"
;var i=n(3355),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(243),d=n(129),p=n(32),h=c.a.ItemView.extend({tagName:"span",className:"dropdown",template:r.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"),n=Object(u.a)(this.media,{streamType:this.streamType.id}),i=Object(u.a)(this.media,{streamType:this.streamType.id,selected:!0}),r=o.a.first(i);return{showDropdown:!this.disabled&&n.length>1&&(!t||e),type:this.streamType.typeString,streams:n,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");p.a.execute("selectStream",{item:this.model,streamType:this.streamType,streamID:n})}});t.a=h},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var a,o="";return o+=' <a class="dropdown-toggle" href="#'+f((a=e&&e.type,typeof a===h?a.apply(e):a))+'-dropdown" data-toggle="dropdown"> '+f(i(n(802)).call(e,e&&e.selectedStream,{hash:{},data:t
}))+' <i class="caret-icon caret-icon-sm"></i> </a> <ul class="dropdown-menu"> ',a=r.each.call(e,e&&e.streams,{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+=" </ul> "}function l(e,t){var a,o="";return o+=' <li> <a data-id="'+f((a=e&&e.id,typeof a===h?a.apply(e):a))+'" href="#"> '+f(i(n(802)).call(e,e,{hash:{},data:t}))+" ",a=r.if.call(e,e&&e.selected,{hash:{},inverse:v.noop,fn:v.program(3,c,t),data:t}),(a||0===a)&&(o+=a),o+=" </a> </li> "}function c(e,t){
return' <i class="dropdown-selected-icon glyphicon ok-2"></i> '}function u(e,t){var r="";return r+=" "+f(i(n(802)).call(e,e&&e.selectedStream,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var d,p="",h="function",f=this.escapeExpression,v=this;return d=r.if.call(t,t&&t.showDropdown,{hash:{},inverse:v.program(5,u,o),fn:v.program(1,s,o),data:o}),(d||0===d)&&(p+=d),p+=" "})},function(e,t,n){"use strict";function i(e){if(!e)return Object(r.default)("None")
;var t=e.language||Object(r.default)("Unknown"),n=a.a.get(e.streamType),i=n&&n.typeString,l=e.codec,c=[];return"subtitles"===i&&l?(c.push(l.toUpperCase()),e.key&&c.push(Object(r.default)("External")),e.forced&&c.push(Object(r.default)("Forced"))):"audio"===i&&l&&(c.push(Object(o.a)(l)),e.channels&&c.push(Object(s.a)(e.channels))),c.length?t+" \u2014 "+c.join(" "):t}Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),a=n(129),o=n(1104),s=n(690);t.default=i},function(e,t,n){"use strict"
;var i=n(333),r=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=r},function(e,t,n){"use strict";var i=n(3359),r=n.n(i),a=n(20),o=a.a.ItemView.extend({className:"container",template:r.a});t.a=o},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="";return s+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h1>'+(0,this.escapeExpression)(i(n(3)).call(t,"This media type does not have a details page.",{hash:{},data:o}))+"</h1> </div> </div> "})},function(e,t,n){"use strict";var i=n(248),r=n(3361),a=i.a.extend({controller:new r.a,appRoutes:{
"!/settings/server/:serverID/settings/:group":"serverSettings","!/settings/server/:serverID/manage/:group":"manage","!/settings/users":"users","!/settings/users(/:usersSubset)":"users","!/settings/web/(:settingsSubset)":"webSettings","!/settings/devices(/:deviceTypeID)":"devices","!/settings":"settings","!/settings/web":"legacyWebSettings","!/settings/server(/:serverID)(/:group)":"legacyServerSettings"}});t.a=a},function(e,t,n){"use strict"
;var i=n(12),r=n.n(i),a=n(15),o=n(4),s=n(17),l=n(52),c=n(576),u=n(3391),d=n(3392),p=n(109),h=n(249),f=n(3393),v=n(245),g=n(172),m=n(3394),y=n(3439),b=n(1255),I=n(3532),S=n(3533),M=n(383),D=h.a.extend({settings:function(){return this.findHasTypeFirstSettings()?this.webSettings("general"):this.legacyWebSettings()},webSettings:function(e){var t=Object(a.d)("appModel").get("experienceSettings"),n=t.get("showAdvancedSettings"),i=d.a(e);if(!i||i.isAdvanced&&!n)return void Object(p.a)("webSettings",{
settingsSubset:"general"});this.showWebSettingsView(function(e){s.a.trigger("show:view",new S.a({model:e,subset:"web",webSettingsSubset:i}))})},legacyWebSettings:function(){if(this.findHasTypeFirstSettings())return this.webSettings("general");this.showWebSettingsView(function(e){s.a.trigger("show:view",new y.a({model:e,subset:"web"}))})},showWebSettingsView:function(e){this.populateView().done(function(){function t(){e(i)}
var n=Object(a.d)("appModel"),i=n.get("settings"),r=n.get("user"),o=r.get("homeUsers"),s=r.server.populate();s.done(function(){r.get("signedIn")?o.populate().always(t):t()}),s.fail(t)})},legacyServerSettings:function(e,t){var n=void 0;if(t){var i=c.a.find(function(e){return!!e.groups.find(function(e){return e.key===t})});i&&(n=i.key)}else n="settings",t="general";this.showServerSettingsView(e,n,t)},serverSettings:function(e,t){this.showServerSettingsView(e,"settings",t)},manage:function(e,t){
this.showServerSettingsView(e,"manage",t)},showServerSettingsView:function(e,t,n){var i,a=this;i=e?{serverID:e}:{primaryServer:!0},this.populateView(i).done(function(e){var i=a.findHasTypeFirstSettings(),l=e.server;if(l.get("shared"))return i?void s.a.trigger("show:view",new b.a({machineIdentifier:l.id,settingsSection:t,settingsGroup:n,hasError:!0,errorMessage:Object(o.default)("Server settings are restricted from shared users.")})):void s.a.trigger("show:view",new M.a({
title:Object(o.default)("Server settings are restricted from shared users.")}));var c=l.get("desktop").get("settings"),u=new f.a({key:"/accounts/1"},{server:l}),d=l.get("desktop").get("cloudAccount"),p=new v.a([],{server:l,url:"/system/:/prefs"}),h=r.a.when(c.fetch(),u.fetch({scope:"page"}),d.fetch({scope:"page"}),p.fetch({scope:"page"}));h.done(function(){var e={model:l,collection:l.get("desktop").get("settings"),account:u,cloudAccount:d,channelSettings:p,subset:"server",group:n,
machineIdentifier:l.id,settingsSection:t,settingsGroup:n};i?s.a.trigger("show:view",new b.a(e)):s.a.trigger("show:view",new y.a(e))}),h.fail(function(){i?s.a.trigger("show:view",new b.a({machineIdentifier:l.id,settingsSection:t,settingsGroup:n,hasError:!0,errorMessage:Object(o.default)("Server settings are unavailable.")})):s.a.trigger("show:view",new M.a({title:Object(o.default)("Server settings are unavailable.")}))})})},users:function(e){this.populateView({serverID:g.a}).done(function(t){
var n=Object(a.d)("appModel"),i=n.get("user"),c=i.get("homeUsers"),d=i.get("homeDetails"),p=i.get("desktop").get("friends"),h=i.get("desktop").get("invites"),f=i.get("desktop").get("sentInvites"),v=r.a.Deferred(),g=d.fetch();g.done(function(){v.resolve()}),g.fail(function(e,t){404===t.status?v.resolve():v.reject()});var m=r.a.when(i.fetch({scope:"page"}),c.fetch({scope:"page"}),p.fetch({scope:"page"}),h.fetch({scope:"page"}),f.fetch({scope:"page"}),v.promise());m.done(function(){var t=!1
;if("pin"===e?(e="home",t=!0):e||(e=h.length&&!h.findWhere({home:!0})?"friends":"home"),i.get("features").get(l.i)){var r=u.a(e);if(!r)return void s.a.trigger("navigate","users",{usersSubset:"home"});s.a.trigger("show:view",new I.a({model:n.get("user"),subset:"users",userSettingsSubset:r,promptPIN:t}))}else s.a.trigger("show:view",new y.a({model:n.get("user"),subset:"users",usersSubset:e,promptPIN:t}))}),m.fail(function(){if(i.get("features").get(l.i)){e||(e="home");var t=u.a(e)
;if(!t)return void s.a.trigger("navigate","users",{usersSubset:"home"});s.a.trigger("show:view",new I.a({userSettingsSubset:t,usersError:!0}))}else{var n;n="friends"===e?Object(o.default)("Your friends are unavailable."):Object(o.default)("Your home is unavailable."),s.a.trigger("show:view",new M.a({title:n}))}})})},devices:function(e){var t=this;this.populateView({serverID:g.a}).done(function(){
var n=Object(a.d)("appModel"),i=n.get("user"),r=i.get("desktop").get("devices"),l=t.findHasTypeFirstSettings(),c=r.fetch({scope:"page"});c.done(function(){var t={model:i,collection:r,subset:"devices",deviceTypeID:e};l?s.a.trigger("show:view",new m.a(t)):s.a.trigger("show:view",new y.a(t))}),c.fail(function(){l?s.a.trigger("show:view",new m.a({hasError:!0,errorMessage:Object(o.default)("Your devices are unavailable.")})):s.a.trigger("show:view",new M.a({
title:Object(o.default)("Your devices are unavailable.")}))})})},findHasTypeFirstSettings:function(){return Object(a.d)("appModel").get("user").get("features").get(l.i)}});t.a=D},function(e,t,n){"use strict";function i(e){return e.isActive?c:null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(26)),c=a()(l.a,{name:"plex-icon-status-560"});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.remoteAccessState,n=p[t];return n?l.a.createElement(a.a,n):null}
var r,a=n(26),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(473),u=n(3364),d=n.n(u),p=(r={},r[c.d]={className:d.a.unknown,name:"glyphicon circle-question-mark"},r[c.e]={className:d.a.unknown,name:"glyphicon circle-question-mark"},r[c.h]={className:d.a.error,name:"glyphicon circle-exclamation-mark"},r[c.f]={className:d.a.ok,name:"glyphicon circle-ok"},r);t.a=i},function(e,t){e.exports={unknown:"RemoteAccessStateIcon-unknown-2v9yM",error:"RemoteAccessStateIcon-error-1HDvq",
ok:"RemoteAccessStateIcon-ok-2eQXX"}},function(e,t,n){"use strict";function i(e){return e.isClaimed?null:a()(l.a,{className:u.a.icon,name:"plex-icon-alert-560"})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(26)),c=n(3366),u=n.n(c);t.a=i},function(e,t){e.exports={icon:"ServerIsClaimedIcon-icon-dQsVa"}},function(e,t,n){"use strict";function i(e){var t=e.ui.dvrSettingsUI;return{isDvrsPending:t.isDvrsPending,dvrsError:t.dvrsError,dvrs:t.dvrs}}var r=n(11),a=n(3368);t.a=Object(r.b)(i)(a.a)
},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.isDvrsPending,i=e.dvrsError,r=e.dvrs;return i?a()("div",{},void 0,Object(l.default)("Unable to load DVRs")):n?a()(c.a,{label:Object(l.default)("Loading DVRs")}):a()("div",{},void 0,r.map(function(e){return a()(u.a,{dvrID:e.key,serverEntityID:t,lineupTitle:e.lineupTitle,devices:e.devices},e.key)}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(39),u=n(3369);t.a=i},function(e,t,n){"use strict";function i(e,t){
var n=t.serverEntityID,i=t.dvrID;return{onRemoveDVR:function(){e(Object(s.f)({serverEntityID:n,dvrID:i}))},onReloadGuidePress:function(){e(Object(s.e)({serverEntityID:n,dvrID:i}))},onCancelReloadGuidePress:function(){e(Object(s.a)({serverEntityID:n,dvrID:i}))}}}var r=n(11),a=n(6),o=(n.n(a),n(1140)),s=n(769),l=n(3370),c=Object(a.createStructuredSelector)({epgDownloadActivity:Object(o.a)()});t.a=Object(r.b)(c,i)(l.a)},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(35),v=n(114),g=n(24),m=n(29),y=n(26),b=n(22),I=n(86),S=n(154),M=n(3371),D=n(1139),C=n(3385),O=n(3389),j=n.n(O),P={context:v.k},w=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onRemoveDVRPress=function(){r.setState({isRemoveDVRModalOpen:!0})},r.onRemoveDVRConfirm=function(){r.setState({isRemoveDVRModalOpen:!1}),r.props.onRemoveDVR()},
r.onRemoveDVRCancel=function(){r.setState({isRemoveDVRModalOpen:!1})},r.onDVRSettingsPress=function(){r.setState({isDVRSettingsModalOpen:!0})},r.onDVRSettingsModalClose=function(){r.setState({isDVRSettingsModalOpen:!1})},r.onAddDevicePress=function(){r.setState({isAddDeviceModalOpen:!0})},r.onModalClose=function(){r.setState({isAddDeviceModalOpen:!1})},r.state={isRemoveDVRModalOpen:!1,isDVRSettingsModalOpen:!1,isAddDeviceModalOpen:!1},r}return u()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return Object(m.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.dvrID,i=e.lineupTitle,a=e.devices,o=e.epgDownloadActivity,s=e.onReloadGuidePress,l=e.onCancelReloadGuidePress,c=this.state,u=c.isRemoveDVRModalOpen,d=c.isDVRSettingsModalOpen;return r()("div",{className:j.a.dvr},void 0,r()("div",{className:j.a.header},void 0,r()("div",{className:j.a.name},void 0,Object(h.default)("DVR"),r()(I.a,{
className:j.a.separator}),i),r()(b.a,{className:j.a.deleteLink,kind:g.b.PRIMARY,onPress:this.onRemoveDVRPress},void 0,Object(h.default)("Delete DVR"))),r()("div",{className:j.a.actions},void 0,r()("div",{},void 0,o?r()(b.a,{kind:g.b.DEFAULT,title:Object(h.default)("Cancel refresh"),onPress:l},void 0,r()(y.a,{className:j.a.actionIcon,name:"plex-icon-remove-560"}),o.title," (",o.progress,"%)",r()(I.a,{className:j.a.separator}),o.subtitle):r()(b.a,{kind:g.b.PRIMARY,onPress:s},void 0,r()(y.a,{
className:j.a.actionIcon,name:"plex-icon-reload-560"}),Object(h.default)("Refresh Guide"))),r()("div",{},void 0,r()(b.a,{kind:g.b.PRIMARY,onPress:this.onDVRSettingsPress},void 0,r()(y.a,{className:j.a.actionIcon,name:"plex-icon-settings-560","aria-label":Object(h.default)("DVR Settings")}),Object(h.default)("DVR Settings")))),r()("div",{className:j.a.devices},void 0,a.map(function(e){return r()(M.a,{serverEntityID:t,dvrID:n,deviceID:e.key,canRemoveDevice:a.length>1,model:e.model,uri:e.uri,
unsupported:e.unsupported,channelMappings:e.channelMappings,tunerCount:e.tuners,status:e.status,thumb:e.thumb},e.key)})),r()(b.a,{kind:g.b.PRIMARY,onPress:this.onAddDevicePress},void 0,r()(y.a,{className:j.a.addDeviceIcon,name:"plex-icon-add-560"}),Object(h.default)("Add Device")),r()(S.a,{isOpen:u,metricsPage:f.s,title:Object(h.default)("Delete DVR"),
message:Object(h.default)("Deleting your DVR will remove the Guide, and all scheduled recordings will be suspended. Programming you've previously recorded will remain in your library."),confirmLabel:Object(h.default)("Delete"),kind:g.b.DANGER,onConfirm:this.onRemoveDVRConfirm,onCancel:this.onRemoveDVRCancel}),r()(C.a,{isOpen:d,serverEntityID:t,dvrID:n,metricsProperties:P,onModalClose:this.onDVRSettingsModalClose}),r()(D.a,{isOpen:this.state.isAddDeviceModalOpen,serverEntityID:t,dvrID:n,
metricsProperties:P,onModalClose:this.onModalClose}))},t}(p.Component);t.a=w},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(function(e,t){return t.tunerCount},Object(M.a)(),Object(S.a)(),function(e,t,n){var i=h.a.filter(n,function(e){return e.type===I.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 r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(5),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(34)),I=n(175),S=n(301),M=n(447),D=n(135),C=n(3372),O={fetchDeviceChannels:D.o,removeDVRDevice:D.t},j=function(e){function t(){var n,i,r;s()(this,t);for(var a=arguments.length,o=Array(a),l=0;l<a;l++)o[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(o))),i.onRemoveDevicePress=function(){
var e=i.props,t=e.serverEntityID,n=e.dvrID,r=e.deviceID;i.props.removeDVRDevice({serverEntityID:t,dvrID:n,deviceID:r})},r=n,c()(i,r)}return d()(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.props,n=t.serverEntityID,i=t.dvrID,r=t.deviceID;Object(b.a)(function(){e.props.fetchDeviceChannels({serverEntityID:n,dvrID:i,deviceID:r})})},t.prototype.render=function(){return g.a.createElement(C.a,a()({onRemoveDevicePress:this.onRemoveDevicePress},this.props))},t}(v.Component)
;t.a=Object(m.b)(i,O)(j)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(114),v=n(26),g=n(24),m=n(299),y=n(86),b=n(22),I=n(3373),S=n(1149),M=n(3380),D=n(558),C=n(1148),O=n(3384),j=n.n(O),P={context:f.k},w=r()(S.a,{}),T=r()(v.a,{name:"plex-icon-alert-560"}),E=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onManageChannelsPress=function(){r.setState({
isManageChannelsModalOpen:!0})},r.onManageChannelsModalClose=function(){r.setState({isManageChannelsModalOpen:!1})},r.onDeviceSettingsPress=function(){r.setState({isDeviceSettingsModalOpen:!0})},r.onDeviceSettingsModalClose=function(){r.setState({isDeviceSettingsModalOpen:!1})},r.state={isManageChannelsModalOpen:!1,isDeviceSettingsModalOpen:!1},r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.dvrID,i=e.deviceID,a=e.model,o=e.uri,s=e.thumb,l=e.tunerCount,c=e.channelCount,u=e.unsupported,d=e.activeRecordingCount,p=e.channelMappings,f=e.hasPrefs,S=e.status,O=e.canRemoveDevice,E=e.onRemoveDevicePress,x=S===m.b.DEAD,N=p.filter(function(e){return e.enabled}).length,A=void 0;return A=c?1===c?Object(h.default)("1 channel"):Object(h.default)("{channelCount} channels",{channelCount:c}):Object(h.default)("No channels"),r()("div",{className:j.a.device
},void 0,r()(D.a,{className:j.a.deviceImage,serverEntityID:t,model:a,thumb:s,width:100,height:100}),r()("div",{className:j.a.details},void 0,r()("div",{},void 0,r()("span",{className:j.a.model},void 0,a),u&&w,f&&r()(b.a,{className:j.a.deviceSettingsButton,kind:g.b.PRIMARY,onPress:this.onDeviceSettingsPress},void 0,r()(v.a,{className:j.a.deviceSettingsIcon,name:"plex-icon-settings-560","aria-label":Object(h.default)("Device Settings")}))),r()(C.a,{className:j.a.uri,uri:o}),x&&r()("div",{
className:j.a.deviceWarning},void 0,r()("div",{className:j.a.deviceWarningIconContainer},void 0,T),Object(h.default)("Device not found. Ensure your device is powered on and connected to your network.")),!x&&r()("div",{className:j.a.info},void 0,r()("div",{},void 0,1===l?Object(h.default)("1 tuner"):Object(h.default)("{tunerCount} tuners",{tunerCount:l}),!!d&&r()("span",{},void 0,r()(y.a,{className:j.a.separator}),Object(h.default)("{activeRecordingCount} recording now",{activeRecordingCount:d
}))),r()("div",{},void 0,A,r()(y.a,{className:j.a.separator}),r()(b.a,{kind:g.b.PRIMARY,onPress:this.onManageChannelsPress},void 0,Object(h.default)("{enabledChannelsCount} enabled",{enabledChannelsCount:N}))))),O&&r()("div",{className:j.a.removeDeviceContainer},void 0,r()(b.a,{className:j.a.removeDevice,onPress:E},void 0,r()(v.a,{name:"plex-icon-remove-560","aria-label":Object(h.default)("Remove Device")}))),r()(I.a,{serverEntityID:t,dvrID:n,deviceID:i,metricsProperties:P,
isOpen:this.state.isManageChannelsModalOpen,onModalClose:this.onManageChannelsModalClose}),r()(M.a,{serverEntityID:t,dvrID:n,deviceID:i,metricsProperties:P,isOpen:this.state.isDeviceSettingsModalOpen,onModalClose:this.onDeviceSettingsModalClose}))},t}(p.Component);t.a=E},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(Object(m.a)(),Object(y.a)(),function(e,t){return{dvrID:e.key,deviceID:t.key}})}
var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(557)),y=n(447),b=n(135),I=n(3374),S=function(e){function t(){var n,i,r;s()(this,t);for(var a=arguments.length,o=Array(a),l=0;l<a;l++)o[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(o))),i.onModalClose=function(){i.props.clearDVRSetup({serverEntityID:i.props.serverEntityID}),i.props.onModalClose()},r=n,c()(i,r)}return d()(t,e),
t.prototype.render=function(){return f.a.createElement(I.a,a()({},this.props,{onModalClose:this.onModalClose}))},t}(h.Component);t.a=Object(v.b)(i,{clearDVRSetup:b.g})(S)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.dvrID,i=e.deviceID,r=e.metricsProperties,o=e.isOpen,s=e.onModalClose;return a()(c.a,{metricsPage:l.A,metricsProperties:r,isOpen:o,preventCloseOnBackdropPress:!0,onModalClose:s},void 0,a()(u.a,{serverEntityID:t,dvrID:n,deviceID:i,onModalClose:s}))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(35)),c=n(132),u=n(3375);t.a=i},function(e,t,n){"use strict";function i(){return Object(b.createSelector)(Object(S.a)(),Object(M.a)(),Object(D.a)(),Object(C.a)(),O.a,j.a,function(e,t,n,i,r,a){var o=e.country,s=e.lineup,l=r.isChannelMappingsPending,c=r.isLineupChannelsPending,u=r.channelMappingsError,d=r.lineupChannelsError,p=r.isChannelMappingsSaving,h=r.channelMappingsSaveError,f=r.scanPrefs,v=r.scanNetworks;return{country:o,
lineupUUID:e.lineup,lineupTitle:s,channelMappings:n,lineupChannels:a,isChannelMappingsPending:l,isLineupChannelsPending:c,isDeviceChannelsPending:t.isChannelsPending,channelMappingsError:u,lineupChannelsError:d,isChannelMappingsSaving:p,channelMappingsSaveError:h,deviceChannelsError:t.channelsError,scanPrefs:f,scanNetworks:v,channelScanActivity:i}})}function r(e,t){var n=t.serverEntityID,i=t.dvrID,r=t.deviceID;return{dispatchSelectDevice:function(){e(P.p({serverEntityID:n,dvrID:i,deviceID:r}))},
dispatchFetchLineupChannels:function(t){e(P.r({serverEntityID:n,lineupUUID:t}))},dispatchFetchDeviceChannels:function(){e(P.o({serverEntityID:n,dvrID:i,deviceID:r}))},dispatchFetchChannelMap:function(){e(P.n({serverEntityID:n}))},dispatchCancelScanDeviceChannels:function(){e(P.c({serverEntityID:n,deviceID:r}))},dispatchClearDeviceScanPrefs:function(){e(P.h({serverEntityID:n}))},onScanDeviceChannels:function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(P.y(f()({
serverEntityID:n,dvrID:i,deviceID:r,country:t},a)))},onSubmit:function(t){Object(I.a)(function(){e(P.u({serverEntityID:n,dvrID:i,deviceID:r,data:t}))})},onDismissSaveError:function(){Object(I.a)(function(){e(P.e())})}}}var a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(7),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),n(34)),S=n(557),M=n(447),D=n(1142),C=n(1150),O=n(160),j=n(1141),P=n(135),w=n(3376),T=function(e){function t(n,i){l()(this,t)
;var r=u()(this,e.call(this,n,i));return r.onCancelScanDeviceChannels=function(){r.setState({isCancellingChannelScan:!0}),r.props.dispatchCancelScanDeviceChannels(r.props.deviceID)},r.state={isCancellingChannelScan:!!n.channelScanActivity},r}return p()(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.lineupUUID,n=e.dispatchClearDeviceScanPrefs,i=e.dispatchSelectDevice,r=e.dispatchFetchLineupChannels,a=e.dispatchFetchDeviceChannels;Object(I.a)(function(){n(),i(),r(t),a()})},
t.prototype.componentWillReceiveProps=function(e){!e.channelScanActivity&&this.props.channelScanActivity&&this.setState({isCancellingChannelScan:!1})},t.prototype.componentDidUpdate=function(e,t){var n=this;e.isChannelMappingsSaving&&!this.props.isChannelMappingsSaving&&null==this.props.channelMappingsSaveError&&this.props.onModalClose(),this.props.channelScanActivity||!e.channelScanActivity||this.props.scanNetworks||Object(I.a)(function(){n.props.dispatchFetchDeviceChannels()})},
t.prototype.componentWillUnmount=function(){var e=this.props,t=e.serverEntityID,n=e.dvrID,i=e.deviceID;e.channelScanActivity&&!this.state.isCancellingChannelScan&&this.props.dispatchCancelScanDeviceChannels({serverEntityID:t,dvrID:n,deviceID:i})},t.prototype.render=function(){var e=this.props,t=(e.dispatchSelectDevice,e.dispatchFetchLineupChannels,e.dispatchFetchDeviceChannels,e.dispatchFetchChannelMap,e.dispatchCancelScanDeviceChannels,e.dispatchClearDeviceScanPrefs,
o()(e,["dispatchSelectDevice","dispatchFetchLineupChannels","dispatchFetchDeviceChannels","dispatchFetchChannelMap","dispatchCancelScanDeviceChannels","dispatchClearDeviceScanPrefs"]));return m.a.createElement(w.a,f()({isCancellingChannelScan:this.state.isCancellingChannelScan,onCancelScanDeviceChannels:this.onCancelScanDeviceChannels},t))},t}(g.Component);t.a=Object(y.b)(i,r)(T)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),
n(0)),h=(n.n(p),n(4)),f=n(298),v=n(24),g=n(39),m=n(47),y=n(102),b=n(145),I=n(224),S=n(103),M=n(111),D=n(74),C=n(112),O=n(92),j=n(674),P=n(1143),w=n(3377),T=n(3379),E=n.n(T),x=r()(g.a,{}),N=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onScanDeviceChannelsButtonPress=function(){var e=r.props,t=e.scanPrefs,n=e.scanNetworks,i=e.channelScanActivity,a=e.onScanDeviceChannels,o=e.onCancelScanDeviceChannels;t.length||n.length||(i?o():a(r.props.country))},
r.onSubmit=function(e){var t=r.props,n=t.scanPrefs,i=t.scanNetworks,a=t.onSubmit;if(n.length||i.length){var o=r.props.scanPrefs.length?{prefs:e}:e;r.props.onScanDeviceChannels(r.props.country,o)}else a(e)},r.state={channelScanningFormState:{}},r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.channelMappings,n=e.lineupChannels,i=e.isChannelMappingsPending,a=e.isLineupChannelsPending,o=e.isDeviceChannelsPending,s=e.channelMappingsError,l=e.lineupChannelsError,c=e.deviceChannelsError,u=e.isChannelMappingsSaving,d=e.channelMappingsSaveError,p=e.formState,g=e.allChannelMappingsEnabled,P=e.allChannelMappingsDisabled,T=e.isCancellingChannelScan,N=e.scanPrefs,A=e.scanNetworks,L=e.channelScanActivity,k=e.onAllChannelMappingsEnabledChange,_=e.onFormStateChange,R=e.onModalClose,z=e.onDismissSaveError,U=L&&!T,B=i||a||o,V=s||l||c,F=!U&&B,Q=L?parseInt(L.Response.channels,10):0,H=void 0
;H=1===Q?Object(h.default)("Scanning channels. 1 channel found."):Q>1?Object(h.default)("Scanning channels. {channelCount} channels found.",{channelCount:Q}):Object(h.default)("Scanning channels. No channels found.");var Y=!(!N.length&&!A.length),W=t.some(function(e){return null!=e.signalQuality||null!=e.signalStrengh
}),G=W?Object(h.default)('Click "Scan Channels" to refresh this list, or create a new DVR to use a different lineup. Signal strength is stored at the time of scanning.'):Object(h.default)('Click "Scan Channels" to refresh this list, or create a new DVR to use a different lineup.');return V?r()(j.a,{message:Object(h.default)("Unable to load channel mappings"),onModalClose:R}):r()(b.b,{className:E.a.form,formState:p,onChange:_,onSubmit:this.onSubmit},void 0,r()(S.a,{onModalClose:R
},void 0,r()(M.a,{},void 0,Object(h.default)("Manage Channels")),F&&r()(D.a,{},void 0,r()("div",{className:E.a.centeredContainer},void 0,x)),!F&&!!d&&r()("div",{},void 0,r()(I.a,{errorMessage:Object(f.a)(d,Object(h.default)("There was a problem saving your changes. Please try again.")),onErrorDismiss:z})),!F&&r()(D.a,{className:L?void 0:E.a.manageChannelsBody,scrollDirection:L?v.d.VERTICAL:v.d.NONE},void 0,r()("div",{className:E.a.scanChannelsContainer},void 0,r()("div",{
className:E.a.scanChannelsMessage},void 0,L?H:G),r()("div",{},void 0,r()(y.a,{type:Y?"submit":"button",size:v.e.MEDIUM,isSpinning:T,isDisabled:T,onPress:this.onScanDeviceChannelsButtonPress},void 0,U?Object(h.default)("Stop scanning"):Object(h.default)("Scan channels")))),r()(w.a,{channelMappings:t,lineupChannels:n,showSignalStrength:W,channelScanActivity:L,scanPrefs:N,scanNetworks:A,allChannelMappingsEnabled:g,allChannelMappingsDisabled:P,onAllChannelMappingsEnabledChange:k
})),r()(C.a,{},void 0,r()(O.a,{},void 0,r()(m.a,{kind:v.b.DEFAULT,size:v.e.MEDIUM,onPress:R},void 0,Object(h.default)("Cancel")),r()(y.a,{type:"submit",kind:v.b.PRIMARY,size:v.e.MEDIUM,isDisabled:F||!!L,isSpinning:u},void 0,Object(h.default)("Save"))))))},t}(p.Component);N.defaultProps={scanPrefs:[],scanNetworks:[]},t.a=Object(P.a)(N)},function(e,t,n){"use strict";function i(e){
var t=e.channelMappings,n=e.lineupChannels,i=e.showSignalStrength,r=e.channelScanActivity,o=e.scanPrefs,s=e.scanNetworks,f=e.allChannelMappingsEnabled,g=e.allChannelMappingsDisabled,m=e.onAllChannelMappingsEnabledChange,y=t.some(function(e){return e.isDeviceChannelHD||e.isLineupChannelHD});return r?a()("div",{className:v.a.progressContainer},void 0,a()(l.a,{size:90,progress:r.progress})):o.length?a()(c.a,{className:v.a.scroller,autoScroll:!0},void 0,a()(p.a,{prefs:o})):s.length?a()(h.a,{
networks:s}):t.length?a()(c.a,{className:v.a.scroller,autoScroll:!0},void 0,a()(u.a,{showSignalStrength:i,allChannelMappingsEnabled:f,allChannelMappingsDisabled:g,onAllChannelMappingsEnabledChange:m}),t.map(function(e){var t=e.key,i=e.deviceIdentifier,r=e.name,o=e.enabled,s=e.lineupIdentifier,l=e.drm,c=e.signalStrength,u=e.signalQuality,p=e.isDeviceChannelHD,h=e.isLineupChannelHD,f=e.isChannelMissing;return a()(d.a,{name:t,initialValue:{enabled:o,lineupIdentifier:s},deviceIdentifier:i,
channelName:r,drm:l,signalStrength:u||c,isChannelMissing:f,showResolution:y,isDeviceChannelHD:p,isLineupChannelHD:h,lineupChannels:n},t)})):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(260)),c=n(80),u=n(1144),d=n(1145),p=n(1151),h=n(1152),f=n(3378),v=n.n(f);t.a=i},function(e,t){e.exports={progressContainer:"DVRManageChannelsInfo-progressContainer-1JJ2z",scroller:"DVRManageChannelsInfo-scroller-1mBV9 Scroller-vertical-VScFL"}},function(e,t){e.exports={
form:"DVRManageChannelsModalContent-form-2ykdJ",manageChannelsBody:"DVRManageChannelsModalContent-manageChannelsBody-PHeFR ModalBody-modalBody--5uHS",scanChannelsContainer:"DVRManageChannelsModalContent-scanChannelsContainer-1k91y",scanChannelsMessage:"DVRManageChannelsModalContent-scanChannelsMessage-3d_Eu",scroller:"DVRManageChannelsModalContent-scroller-1MbzJ Scroller-vertical-VScFL",centeredContainer:"DVRManageChannelsModalContent-centeredContainer-6K7kA",
progressContainer:"DVRManageChannelsModalContent-progressContainer-1GUW1"}},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.onModalClose,r=c()(e,["isOpen","metricsProperties","onModalClose"]);return s()(f.a,{isOpen:t,metricsPage:h.z,metricsProperties:n,onModalClose:i},void 0,p.a.createElement(v.a,a()({onModalClose:i},r)))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(35),f=n(132),v=n(3381);t.a=i},function(e,t,n){
"use strict";function i(){return Object(g.createSelector)(function(e,t){return t.dvrID},Object(y.a)(),function(e,t){return{dvrID:e,deviceID:t.key,model:t.model,uri:t.uri,prefs:t.prefs,thumb:t.thumb,isSaving:t.isSaving,saveError:t.saveError}})}var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(34)),y=n(447),b=n(135),I=n(3382),S=function(e){function t(){var n,i,r;s()(this,t)
;for(var a=arguments.length,o=Array(a),l=0;l<a;l++)o[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(o))),i.onSubmit=function(e){var t=i.props,n=t.serverEntityID,r=t.dvrID,a=t.deviceID;Object(m.a)(function(){i.props.saveDeviceSettings({serverEntityID:n,dvrID:r,deviceID:a,prefs:e})})},i.onErrorDismiss=function(){var e=i.props,t=e.dvrID,n=e.deviceID;i.props.clearDeviceSettingsSaveError({dvrID:t,deviceID:n})},i.onModalClose=function(){var e=i.props,t=e.dvrID,n=e.deviceID
;i.props.clearDeviceSettingsSaveError({dvrID:t,deviceID:n}),i.props.onModalClose()},r=n,c()(i,r)}return d()(t,e),t.prototype.render=function(){return f.a.createElement(I.a,a()({},this.props,{onSubmit:this.onSubmit,onErrorDismiss:this.onErrorDismiss,onModalClose:this.onModalClose}))},t}(h.Component);t.a=Object(v.b)(i,{saveDeviceSettings:b.x,clearDeviceSettingsSaveError:b.i})(S)},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(4),m=n(298),y=n(24),b=n(103),I=n(111),S=n(74),M=n(112),D=n(92),C=n(145),O=n(224),j=n(427),P=n(47),w=n(102),T=n(558),E=n(3383),x=n.n(E),N=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.componentDidUpdate=function(e,t){e.isSaving&&!this.props.isSaving&&null==this.props.saveError&&this.props.onModalClose()},
t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.model,i=e.uri,a=e.thumb,s=e.prefs,l=e.isSaving,c=e.saveError,u=e.onSubmit,d=e.onErrorDismiss,p=e.onModalClose;return o()(C.b,{className:x.a.form,onSubmit:u},void 0,o()(b.a,{onModalClose:p},void 0,o()(I.a,{},void 0,Object(g.default)("Device Settings")),c&&o()(O.a,{errorMessage:Object(m.a)(c,Object(g.default)("There was a problem saving your changes. Please try again.")),onErrorDismiss:d}),o()(S.a,{},void 0,o()("div",{
className:x.a.container},void 0,o()(T.a,{className:x.a.deviceImage,serverEntityID:t,model:n,thumb:a,width:150,height:150}),o()("div",{className:x.a.info},void 0,o()("div",{className:x.a.model},void 0,n),o()("div",{},void 0,i),o()("div",{className:x.a.settings},void 0,s.map(function(e){var t=e.id;return v.a.createElement(j.a,r()({key:t},e))}))))),o()(M.a,{},void 0,o()(D.a,{},void 0,o()(P.a,{kind:y.b.DEFAULT,size:y.e.MEDIUM,onPress:p},void 0,Object(g.default)("Cancel")),o()(w.a,{type:"submit",
isSpinning:l,kind:y.b.PRIMARY,size:y.e.MEDIUM},void 0,Object(g.default)("Save"))))))},t}(f.Component);t.a=N},function(e,t){e.exports={form:"DVRDeviceSettingsModalContent-form-1a8dR",container:"DVRDeviceSettingsModalContent-container-320C5",info:"DVRDeviceSettingsModalContent-info-3oNQ9",deviceImage:"DVRDeviceSettingsModalContent-deviceImage-3ud4c",model:"DVRDeviceSettingsModalContent-model-3qWA4",settings:"DVRDeviceSettingsModalContent-settings-3-Kyi"}},function(e,t){e.exports={
device:"DVRDevice-device-3IwH6",deviceImage:"DVRDevice-deviceImage-1efFa DVRDeviceImage-image-1q4Bg",details:"DVRDevice-details-F9a0M",model:"DVRDevice-model-1unSm",deviceSettingsButton:"DVRDevice-deviceSettingsButton-2W-U0 Link-link-2n0yJ",deviceSettingsIcon:"DVRDevice-deviceSettingsIcon-wNdKg",uri:"DVRDevice-uri-2Vhv0",deviceWarning:"DVRDevice-deviceWarning-UAoFi",deviceWarningIconContainer:"DVRDevice-deviceWarningIconContainer-29K1l",
separator:"DVRDevice-separator-2sIVz DashSeparator-separator-2a3yn",info:"DVRDevice-info-kn53L",removeDeviceContainer:"DVRDevice-removeDeviceContainer-2W5hI",removeDevice:"DVRDevice-removeDevice-3N-rD"}},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.onModalClose,r=c()(e,["isOpen","metricsProperties","onModalClose"]);return s()(f.a,{isOpen:t,metricsPage:h.B,metricsProperties:n,onModalClose:i},void 0,p.a.createElement(v.a,a()({onModalClose:i},r)))}
var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(35),f=n(132),v=n(3386);t.a=i},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(Object(y.a)(),function(e){return{prefs:e.prefs,isSaving:e.isSaving,saveError:e.saveError}})}var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(34)),y=n(557),b=n(135),I=n(3387),S=function(e){function t(){var n,i,r;s()(this,t)
;for(var a=arguments.length,o=Array(a),l=0;l<a;l++)o[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(o))),i.onSubmit=function(e){var t=i.props,n=t.serverEntityID,r=t.dvrID;Object(m.a)(function(){i.props.saveDVRSettings({serverEntityID:n,dvrID:r,prefs:e})})},i.onErrorDismiss=function(){i.props.clearDVRSettingsSaveError({dvrID:i.props.dvrID})},i.onModalClose=function(){i.props.clearDVRSettingsSaveError({dvrID:i.props.dvrID}),i.props.onModalClose()},r=n,c()(i,r)}return d()(t,e),
t.prototype.render=function(){return f.a.createElement(I.a,a()({},this.props,{onSubmit:this.onSubmit,onErrorDismiss:this.onErrorDismiss,onModalClose:this.onModalClose}))},t}(h.Component);t.a=Object(v.b)(i,{saveDVRSettings:b.w,clearDVRSettingsSaveError:b.f})(S)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),
n(0)),v=n.n(f),g=n(4),m=n(298),y=n(24),b=n(103),I=n(111),S=n(74),M=n(112),D=n(92),C=n(145),O=n(224),j=n(427),P=n(47),w=n(102),T=n(3388),E=n.n(T),x=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.componentDidUpdate=function(e,t){e.isSaving&&!this.props.isSaving&&null==this.props.saveError&&this.props.onModalClose()},t.prototype.render=function(){
var e=this.props,t=e.prefs,n=e.isSaving,i=e.saveError,a=e.onSubmit,s=e.onErrorDismiss,l=e.onModalClose;return o()(C.b,{className:E.a.form,onSubmit:a},void 0,o()(b.a,{onModalClose:l},void 0,o()(I.a,{},void 0,Object(g.default)("DVR Settings")),i&&o()(O.a,{errorMessage:Object(m.a)(i,Object(g.default)("There was a problem saving your changes. Please try again.")),onErrorDismiss:s}),o()(S.a,{},void 0,t.map(function(e){var t=e.id;return v.a.createElement(j.a,r()({key:t},e))
})),o()(M.a,{},void 0,o()(D.a,{},void 0,o()(P.a,{kind:y.b.DEFAULT,size:y.e.MEDIUM,onPress:l},void 0,Object(g.default)("Cancel")),o()(w.a,{type:"submit",isSpinning:n,kind:y.b.PRIMARY,size:y.e.MEDIUM},void 0,Object(g.default)("Save"))))))},t}(f.Component);t.a=x},function(e,t){e.exports={form:"DVRSettingsModalContent-form-2-MX9"}},function(e,t){e.exports={dvr:"DVRListItem-dvr-1CoTi",header:"DVRListItem-header-Lb8AE",separator:"DVRListItem-separator-2BuN4 DashSeparator-separator-2a3yn",
name:"DVRListItem-name-rIFJz",deleteLink:"DVRListItem-deleteLink-1ATve",actions:"DVRListItem-actions-1mU6F",actionIcon:"DVRListItem-actionIcon-fPqPl",devices:"DVRListItem-devices-2eZl_",addDeviceIcon:"DVRListItem-addDeviceIcon-2n26f"}},function(e,t){e.exports={container:"LiveTVSettingsPage-container-KCZxG",info:"LiveTVSettingsPage-info-nWAM3",moreInfo:"LiveTVSettingsPage-moreInfo-13wgk",upsell:"LiveTVSettingsPage-upsell-rUmZ4 PlexPassUpsell-upsell-3i2JL"}},function(e,t,n){"use strict"
;function i(e){return o.find(function(t){return t.key===e})}t.a=i;var r=n(35),a=n(4),o=[{key:"home",title:function(){return Object(a.default)("Home Users")},errorTitle:function(){return Object(a.default)("Home users are unavailable")},metricsPage:r.D},{key:"friends",title:function(){return Object(a.default)("Sharing")},errorTitle:function(){return Object(a.default)("Sharing users are unavailable")},metricsPage:r.Y}]},function(e,t,n){"use strict";function i(e){return a.find(function(t){
return t.key===e})}t.a=i;var r=n(4),a=[{key:"general",title:function(){return Object(r.default)("General")}},{key:"quality",title:function(){return Object(r.default)("Quality")}},{key:"debug",title:function(){return Object(r.default)("Debug")},isAdvanced:!0},{key:"player",title:function(){return Object(r.default)("Player")}}]},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(67),o=n(117),s=o.a.extend({idAttribute:"key",
whitelistedAttrs:["key","name","defaultAudioLanguage","autoSelectAudio","defaultSubtitleLanguage","subtitleMode"],url:function(){return this.get("key")},convert:function(e){var t=r.a.isObject(e)?e:a.a.parseXML(e);return t.Account&&(t=t.Account),a.a.parseBoolean(t,"autoSelectAudio"),t},parse:function(e){var t=this.convert(e);return t=r.a.pick(t,this.whitelistedAttrs)}});t.a=s},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(0),l=(n.n(s),
n(4)),c=n(35),u=n(56),d=n(1234),p=n(126),h=n(66),f=n(207),v=n(208),g=n(577),m=n(237),y=o()(m.a,{selectedKey:"devices"}),b=u.a.extend({component:function(e){var t=e.hasError,n=e.errorMessage;return o()(h.a,{},void 0,y,t&&o()(p.a,{title:n}),!t&&o()(f.a,{metricsPage:c.w},void 0,o()(v.a,{},void 0,Object(l.default)("Authorized Devices")),o()(g.a,{view:d.a,viewOptions:r()({},e,{hideNavLinks:!0})})))}});t.a=b},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i="";return i+=' <div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> ',n=r.each.call(e,e&&e.deviceTypes,{hash:{},inverse:g.noop,fn:g.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=' </ul> </div> <div class="device-list-container col-sm-8 col-md-9"></div> '}function l(e,t){var n,i="";return i+=" ",n=r.if.call(e,e&&e.title,{hash:{},inverse:g.noop,fn:g.program(3,c,t),data:t}),(n||0===n)&&(i+=n),i+=" "}
function c(e,t){var r,a="";return a+=' <li> <a class="card btn-gray ',r=i(n(25)).call(e,e&&e.id,"all",{hash:{},inverse:g.noop,fn:g.program(4,u,t),data:t}),(r||0===r)&&(a+=r),a+='" data-id="'+y((r=e&&e.id,typeof r===m?r.apply(e):r))+'" href="#">'+y(i(n(3)).call(e,e&&e.title,{hash:{},data:t}))+"</a> </li> "}function u(e,t){return"selected"}function d(e,t){var n,i=""
;return i+=' <div class="filter-bar"> <span class="dropdown"> <a class="dropdown-toggle" href="#device-type-dropdown" data-toggle="dropdown"> <span class="dropdown-friendly-name">'+y((n=e&&e.selectedDeviceType,n=null==n||!1===n?n:n.title,typeof n===m?n.apply(e):n))+'</span> <i class="caret-icon"></i> </a> <ul class="dropdown-menu"> ',n=r.each.call(e,e&&e.deviceTypes,{hash:{},inverse:g.noop,fn:g.programWithDepth(7,p,t,e),data:t}),(n||0===n)&&(i+=n),
i+=' </ul> </span> </div> <div class="device-list-container col-sm-12 col-md-12"></div> '}function p(e,t,r){var a,o="";return o+=' <li><a data-id="'+y((a=e&&e.id,typeof a===m?a.apply(e):a))+'" href="#"><span class="dropdown-truncated-label">'+y((a=e&&e.title,typeof a===m?a.apply(e):a))+"</span>",a=i(n(25)).call(e,(a=r&&r.selectedDeviceType,null==a||!1===a?a:a.id),e&&e.id,{hash:{},inverse:g.noop,fn:g.program(8,h,t),data:t}),(a||0===a)&&(o+=a),o+="</a></li> "}function h(e,t){
return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var f,v="",g=this,m="function",y=this.escapeExpression;return f=r.if.call(t,t&&t.showNavLinks,{hash:{},inverse:g.program(6,d,o),fn:g.program(1,s,o),data:o}),(f||0===f)&&(v+=f),v+=" "})},function(e,t,n){"use strict";var i=n(63),r=n(3397),a=n(3426),o=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:r.a,emptyView:a.a});t.a=o},function(e,t,n){"use strict"
;var i=n(3398),r=n.n(i),a=n(20),o=n(478),s=n(295),l=n(1235),c=n(1236),u=n(32),d=a.a.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:r.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||"plex cloud server"===e}return this.isServer},bindings:{".device-icon":{
modelAttribute:"product",modelListeners:["product","platform"],manual:!0,formatter:function(e,t){var n=Object(c.a)(e,this.model.get("platform"));t.attr("src",n)}},".name":{modelAttribute:"name",modelListeners:["name","product"],autohide:!1,formatter:function(e){return e||this.model.get("product")}},".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 Object(s.a)(e)}},".sync-count":{modelAttribute:"syncList",autohide:!1,formatter:function(e){if(e){var t,n=e.get("itemsCompleteCount");return n&&n>0&&(t=[n,Object(o.a)("item",n)].join(" "),this.ui.syncInfo.removeClass("hidden")),t}}},".sync-size":{
modelAttribute:"syncList",autohide:!1,formatter:function(e){if(e){var t,n=e.get("totalSize");return n&&n>0&&(t=["(",Object(l.a)(n),")"].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){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},
'<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){
e.exports="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMTAgMTEwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxwYXRoIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJub256ZXJvIi8+CiAgPHBhdGggZD0ibTUwLjI5NSA4NC42MjJ2LTUuOTQ3YzAtMi4xMTUtMS4yOTUtNC0zLjI1OC00LjgzMy03LjM1LTMuMTItMTIuNDk0LTEwLjQxOC0xMi40OTQtMTguODQyIDAtMTEuMjI5IDkuMTM5LTIwLjQ1NyAyMC40NTctMjAuNDU3czIwLjQ1NyA5LjIyOCAyMC40NTcgMjAuNDU3YzAgMTMuMjQ4LTEwLjI0OCAyNS43NzUtMjUuMTYyIDI5LjYyMnptNC43MDUtNTkuNjIyYy0xNi41OTggMC0zMCAxMy41MzQtMzAgMzBzMTMuNDAyIDMwIDMwIDMwIDMwLTEzLjUzNCAzMC0zMC0xMy40MDItMzAtMzAtMzB6IiBmaWxsPSIjMzFjNGYzIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz4KPC9zdmc+Cg=="
},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+"desktop/common/img/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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMTAiIGhlaWdodD0iMTEwIiB2aWV3Qm94PSIwIDAgMTEwIDExMCI+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBsZXhhbXAtYSIgeDE9IjEwMCUiIHgyPSIwJSIgeTE9IjUwJSIgeTI9IjUwJSI+CiAgICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNGNENFMUUiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjQ0M3QzE5Ii8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8ZyBmaWxsPSJub25lIj4KICAgIDxwb2x5Z29uIGZpbGw9IiMxRjFGMUYiIHBvaW50cz0iMCAwIDExMCAwIDExMCAxMTAgMCAxMTAiLz4KICAgIDxwb2x5Z29uIGZpbGw9InVybCgjcGxleGFtcC1hKSIgcG9pbnRzPSI4MC4wOTQgNTUgNTguNDM4IDI0LjA3OCA1MS41NjMgMjQuMDYzIDQ4LjEyNSAyNC4wNzggNjkuNzgxIDU1IDUwLjUzMSA4Mi41IDQ3LjA5NCA4Mi41IDY2LjM0NCA1NSA0NC42ODggMjQuMDc4IDM3LjgxMyAyNC4wNjMgMzQuMzc1IDI0LjA3OCA1My42NDMgNTEuNTYzIDE2LjY0OCA1MS41NjMgMTYuNjQ4IDU1IDU5LjQ2OSA1NSA0MC4yMDkgMjcuNSA0My42NDcgMjcuNSA2Mi45MDYgNTUgNDEuMjUgODUuOTM4IDUxLjU2MyA4NS45MzggNzMuMjE5IDU1IDUzLjk1OSAyNy41IDU3LjM5NyAyNy41IDc2LjY1NiA1NSA1NSA4NS45MzggNjUuMzEzIDg1LjkzOCA4NC41MjUgNTguNDM4IDkzLjgxNCA1OC40MzggOTMuODE0IDU1IDgzLjUzMSA1NSA2NC4yODEgODIuNSA2MC44NDQgODIuNSIvPgogIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMTAiIGhlaWdodD0iMTEwIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIxMDAlIiB4Mj0iMCUiIHkxPSI1MCUiIHkyPSI1MCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNGOUJFMDMiLz48c3RvcCBvZmZzZXQ9IjQ3LjczOCUiIHN0b3AtY29sb3I9IiNFNUEwMEQiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNDQzdDMTkiLz48L2xpbmVhckdyYWRpZW50PjxyYWRpYWxHcmFkaWVudCBpZD0iYiIgY3g9Ijg5LjI2NyUiIGN5PSI0OS43NiUiIHI9IjkyLjUlIiBmeD0iODkuMjY3JSIgZnk9IjQ5Ljc2JSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAuNjExMiAwIC4xOTMpIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjRjlCRTAzIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjQ0M3QzE5Ii8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzFGMUYxRiIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+PHBhdGggZmlsbD0idXJsKCNhKSIgZD0iTTU1IDg1Yy0xNi41NjkgMC0zMC0xMy40MzEtMzAtMzAgMC0xNi41NjkgMTMuNDMxLTMwIDMwLTMwIDE2LjU2OSAwIDMwIDEzLjQzMSAzMCAzMCAwIDE2LjU2OS0xMy40MzEgMzAtMzAgMzB6bTAtMS44YzE1LjU3NCAwIDI4LjItMTIuNjI2IDI4LjItMjguMlM3MC41NzQgMjYuOCA1NSAyNi44IDI2LjggMzkuNDI2IDI2LjggNTUgMzkuNDI2IDgzLjIgNTUgODMuMnoiLz48cGF0aCBmaWxsPSJ1cmwoI2IpIiBkPSJNNDQuNzQgMzYuMjhoMTAuODk2TDY3LjY2IDU1LjAzIDU1LjYzNiA3My43OEg0NC43NGwxMi4wMjQtMTguNzVMNDQuNzQgMzYuMjgiLz48L2c+PC9zdmc+Cg=="
},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, "
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiM0RTYzODciIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+PHBhdGggZD0iTTkwLjg2NSA1OS42NDNsLjYxNiAzLjI1NWE3LjI3MyA3LjI3MyAwIDAgMS00Ljg1IDguMjUybC0xMy4wNSA0LjM0MmE5LjY5NyA5LjY5NyAwIDAgMS02Ljg5Ni0uMjk0bC05Ljc2Ny00LjIwNmE0Ljg0OCA0Ljg0OCAwIDAgMC0zLjgzNiAwbC05Ljc2NyA0LjIwNmE5LjY5NyA5LjY5NyAwIDAgMS02Ljg5Ny4yOTRMMjMuMzcgNzEuMTVhNy4yNzMgNy4yNzMgMCAwIDEtNC44NS04LjI1MmwuNjE2LTMuMjU1Yy0uMzMxLjIxOS0uNzk5LjMzNi0xLjI4Ny4yOWwtMS41MjctLjE0MWMtLjg0My0uMDc5LTEuNDI3LS42MTEtMS4zMDUtMS4xOWwyLjY2LTEyLjU2OWMuMTIzLS41NzguOTA1LS45ODQgMS43NDktLjkwNmwxLjUyNi4xNDJjLjMzMy4wMy42MjUuMTMyLjg1LjI4bC4wNTktLjMxNGExMi4xMjEgMTIuMTIxIDAgMCAxIDEwLjkzNS05LjgzTDQ1LjI0NiAzNC40YTEyMS4yMTIgMTIxLjIxMiAwIDAgMSAxOS41MDggMGwxMi40NTEgMS4wMDZjNS40NDMuNDQgOS45MiA0LjQ2NCAxMC45MzUgOS44M2wuMDYuMzEyYTEuODcgMS44NyAwIDAgMSAuODQ5LS4yNzlsMS41MjYtLjE0MmMuODQ0LS4wNzggMS42MjYuMzI4IDEuNzQ5LjkwNmwyLjY2IDEyLjU3Yy4xMjIuNTc4LS40NjIgMS4xMS0xLjMwNSAxLjE4OWwtMS41MjcuMTQxYy0uNDg4LjA0Ni0uOTU2LS4wNzEtMS4yODctLjI5ek03My45MSA2Ni4zNmwtMS4xODIgMS42NDdjLjM5Ni0uMTQuNzktLjMgMS4xODItLjQ4bDkuNDU0LTUuODMzYzIuNjkzLTEuNzczIDQuMDA1LTQuNzA1IDMuNTQ2LTYuOTk4bC0yLjM2NC05LjMzMmMtLjYxLTQuNjY2LTUuMTMyLTguNDM5LTEwLjYzNi04LjE2NWwtMTMtMS4xNjdjLTMuNzExLS4wMzEtNi45NTktLjAzNC0xMC42MzcgMEwzNi4wOSAzNy4yYy01LjQ5NS0uMjY4LTEwLjAyOCAzLjUwNy0xMC42MzYgOC4xNjVsLTIuMzY0IDkuMzMyYy0uNDU5IDIuMjkzLjg1MyA1LjIyNSAzLjU0NiA2Ljk5OGw5LjQ1NCA1LjgzM2MuMzg5LjE3Ny43ODMuMzMzIDEuMTgyLjQ2NkwzNi4wOSA2Ni4zNmwtOC4yNzMtNi45OTljLTEuNzk1LS45MjQtMi42NjktMi44NzQtMi4zNjMtNC42NjVsMi4zNjMtOC4xNjZjLjM0LTQuMyAzLjk2NS03LjMxMyA4LjI3My02Ljk5OGwxNC4xODMtMS4xNjdjMy43MS0uMDMzIDYuODktLjAzIDEwLjYzNiAwbDEzIDEuMTY3YzQuMzE2LS4zMjMgNy45MzEgMi42ODggOC4yNzQgNi45OThsMi4zNjMgOC4xNjZjLjMwNiAxLjc5MS0uNTY4IDMuNzQxLTIuMzYzIDQuNjY1bC04LjI3MyA3eiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4="
},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,n){"use strict";var i=n(3427),r=n.n(i),a=n(20),o=a.a.ItemView.extend({template:r.a});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="";return s+='<div class="row-padded"> <h4 class="text-muted text-center">'+(0,this.escapeExpression)(i(n(3)).call(t,"No devices found",{hash:{},data:o}))+"</h4> </div> "})
},function(e,t,n){"use strict";var i=n(6),r=(n.n(i),n(3429)),a=Object(i.createSelector)(r.a,function(e){return e.reduce(function(e,t){return t.isShared&&!t.allowSync||t.isCloudSyncServer||t.isOutOfDate||e.push(t.entityID),e},[])});t.a=a},function(e,t,n){"use strict";var i=n(424),r=n(549),a=Object(i.a)(r.a,function(e){return e.filter(function(e){return e.isPrimaryEligible})});t.a=a},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(0),p=(n.n(d),
n(4)),h=n(19),f=n(3431),v=n(444),g=n(72),m=n(1190),y=n(568),b=n(3432),I=n(803),S=n(1240),M=n(1191),D=n(1239),C=n(3438),O=n.n(C),j=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onSelectedSidebarListRef=function(e){r._selectedSidebarListRef=e,r.scrollToSelectedSidebarList()},r.onScrollerMeasure=function(e){var t=e.height;t&&r.setState({isScrollerMeasured:!0,scrollerHeight:t},function(){r.scrollToSelectedSidebarList()})},r.onScrollPositionChange=function(e){
var t=e.scrollTop;r.setState({userHasManuallyScrolled:!0,scrollTop:t})},r.state={userHasManuallyScrolled:!1,scrollerHeight:0,scrollTop:0},r}return u()(t,e),t.prototype.scrollToSelectedSidebarList=function(){if(this.state.isScrollerMeasured&&!this.state.userHasManuallyScrolled&&this._selectedSidebarListRef){var e=this.state,t=e.scrollerHeight,n=e.scrollTop,i=this._selectedSidebarListRef.getBoundingClientRect(),r=i.height,a=this._selectedSidebarListRef.offsetTop;n+t>a+r||this.setState({scrollTop:a
})}},t.prototype.getOnRef=function(e){var t=this.props.selectedKey;return t&&0===t.indexOf(e)?this.onSelectedSidebarListRef:null},t.prototype.render=function(){var e=this,t=this.props,n=t.serverEntityIDs,i=t.selectedKey,a=t.isPlexCloudVisible,o=t.isWebhooksVisible,s=t.isUserSignedIn,l=t.isUserUnrestricted,c=t.showAdvancedSettings,u=t.hasTypeFirstSettings,d=t.myPlexUrl,C=t.userTitle,j=this.state.scrollTop,P=Object(f.a)();return r()(g.a,{ignoreWidth:!0,onMeasure:this.onScrollerMeasure
},void 0,r()(m.a,{},void 0,r()(M.a,{smoothScroll:!1,scrollTop:j,onScrollPositionChange:this.onScrollPositionChange},void 0,r()("div",{className:O.a.sidebarContent},void 0,s&&r()(y.a,{title:C},void 0,r()(I.a,{selectableKey:"account",selectedKey:i,to:Object(v.default)("#!/account",u),title:Object(p.default)("Account")}),l&&r()(I.a,{to:Object(h.join)([d,"/subscription"]),title:Object(p.default)("Subscriptions")}),l&&r()(I.a,{to:Object(h.join)([d,"/users/payments"]),
title:Object(p.default)("Payments")}),a&&l&&r()(I.a,{selectableKey:"plex-cloud",selectedKey:i,to:Object(v.default)("#!/account/plex-cloud",u),title:Object(p.default)("Plex Cloud")}),l&&r()(I.a,{to:Object(h.join)([d,"/cloudsync/providers"]),title:Object(p.default)("Cloud Sync")}),l&&r()(I.a,{selectableKey:"online-media-sources",selectedKey:i,to:Object(v.default)("#!/account/online-media-sources",u),title:Object(p.default)("Online Media Sources")}),r()(I.a,{selectableKey:"audio-subtitle-settings",
selectedKey:i,to:Object(v.default)("#!/account/audio-subtitle",u),title:Object(p.default)("Audio & Subtitle Settings")}),l&&r()(I.a,{selectableKey:"devices",selectedKey:i,to:"#!/settings/devices",title:Object(p.default)("Authorized Devices")}),o&&l&&r()(I.a,{selectableKey:"webhooks",selectedKey:i,to:Object(v.default)("#!/account/webhooks",u),title:Object(p.default)("Webhooks")}),l&&r()(I.a,{to:Object(h.join)([d,"/users/other-services"]),title:Object(p.default)("Other Services")})),s&&r()(y.a,{
title:Object(p.default)("Family & Friends"),selectableKey:"users",selectedKey:i,onRef:this.getOnRef("users")},void 0,r()(I.a,{selectableKey:"users--home",selectedKey:i,to:"#!/settings/users/home",title:Object(p.default)("Home Users")}),l&&r()(I.a,{selectableKey:"users--friends",selectedKey:i,to:"#!/settings/users/friends",title:Object(p.default)("Sharing")})),u&&r()(y.a,{title:Object(p.default)("Web Client"),selectableKey:P,selectedKey:i,onRef:this.getOnRef(P)},void 0,r()(D.a,{
selectableKey:Object(f.a)(),selectedKey:i,title:Object(p.default)("Settings"),to:"#!/settings/web/general"},void 0,r()(S.a,{selectableKey:Object(f.a)("general"),selectedKey:i,to:"#!/settings/web/general",title:Object(p.default)("General")}),r()(S.a,{selectableKey:Object(f.a)("quality"),selectedKey:i,to:"#!/settings/web/quality",title:Object(p.default)("Quality")}),c&&r()(S.a,{selectableKey:Object(f.a)("debug"),selectedKey:i,to:"#!/settings/web/debug",title:Object(p.default)("Debug")}),r()(S.a,{
selectableKey:Object(f.a)("player"),selectedKey:i,to:"#!/settings/web/player",title:Object(p.default)("Player")}))),u&&n.map(function(t){return r()(b.a,{serverEntityID:t,selectedKey:i,onSelectedRef:e.onSelectedSidebarListRef},t)})))))},t}(d.Component);t.a=j},function(e,t,n){"use strict";function i(e){var t=["web-client--settings"];return e&&t.push(e),t.join("--")}t.a=i},function(e,t,n){"use strict";function i(){return Object(m.createSelector)(Object(b.a)(),Object(y.a)(),function(e,t){return{
machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName,isConnected:e.isConnected,isUnavailable:e.isUnavailable,isShared:!!e.isShared,settingsSections:t}})}var r=n(13),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(258),m=n(6),y=(n.n(m),n(1237)),b=n(42),I=n(3434),S={dispatchPopulateSettings:g.k},M=function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentDidMount=function(){
this._populate()},t.prototype.componentDidUpdate=function(){this._populate()},t.prototype._populate=function(){var e=this.props,t=e.serverEntityID,n=e.isConnected,i=e.dispatchPopulateSettings;n&&i({serverEntityID:t})},t.prototype.render=function(){var e=this.props,t=(e.serverEntityID,e.isConnected,e.dispatchPopulateSettings,a()(e,["serverEntityID","isConnected","dispatchPopulateSettings"]));return f.a.createElement(I.a,t)},t}(h.Component);t.a=Object(v.b)(i,S)(M)},function(e,t,n){"use strict"
;function i(){return Object(r.createSelector)(Object(a.a)(),function(e){return e?e.desktop.settings:void 0})}t.a=i;var r=n(6),a=(n.n(r),n(42))},function(e,t,n){"use strict";function i(e){var t=e.machineIdentifier,n=e.friendlyName,i=e.selectedKey,r=e.isUnavailable,o=e.isShared,f=e.settingsSections,v=e.onSelectedRef,g=Object(s.a)(t),m=i&&0===i.indexOf(g),y=r?a()(c.a,{allowSectureIcon:!1,isUnavailable:r}):null;return a()(h.a,{title:n,icon:y,selectableKey:g,selectedKey:i,onRef:m?v:null
},void 0,f.map(function(e,n){if(o&&1===e.groups.length){var r=e.groups[0];return a()(d.a,{selectableKey:Object(s.a)(t,e.key,r.key),selectedKey:i,title:r.title,to:Object(l.a)(t,e.key,r.key)},n)}return a()(u.a,{selectableKey:Object(s.a)(t,e.key),selectedKey:i,title:e.title,to:Object(l.a)(t,e.key,e.groups[0].key),closedIcon:e.statusIndicator},n,e.groups.map(function(n,r){return a()(p.a,{selectableKey:Object(s.a)(t,e.key,n.key),selectedKey:i,title:n.title,to:Object(l.a)(t,e.key,n.key)
},r,n.statusIndicator)}))}))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(1238)),l=n(213),c=n(786),u=n(1239),d=n(803),p=n(1240),h=n(568);t.a=i},function(e,t){e.exports={icon:"SidebarSecondaryList-icon-1EufX SidebarLink-icon-34JWq"}},function(e,t){e.exports={icon:"SettingsSidebarListLink-icon-eICe1 SidebarSecondaryList-icon-1EufX SidebarLink-icon-34JWq",selectedIcon:"SettingsSidebarListLink-selectedIcon-caIG1 SettingsSidebarListLink-icon-eICe1 SidebarSecondaryList-icon-1EufX SidebarLink-icon-34JWq"}
},function(e,t){e.exports={secondarySidebarLink:"SettingsSidebarSecondaryListLink-secondarySidebarLink-2FZdZ SidebarLink-sidebarLink-L2OPd Link-default-2XA2b"}},function(e,t){e.exports={sidebarContent:"SettingsSidebar-sidebarContent-3yMjj"}},function(e,t,n){"use strict";var i=n(3440),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(15),c=n(17),u=n(203),d=n(1241),p=n(1244),h=n(1250),f=n(1234),v={web:d.a,server:p.a,users:h.a,devices:f.a},g=s.a.Layout.extend({className:"container",template:r.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=Object(l.d)("appModel"),n=t.get("user"),i=n.get("desktop").get("invites");(0,Object(l.d)("appStore").dispatch)(Object(u.a)({allowLightPreset:!1})),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=Object(l.d)("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}
;o.a.each(o.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=v[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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"selected"}function l(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this,p=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(25)).call(t,t&&t.subset,"web",{hash:{},inverse:d.noop,fn:d.program(1,s,o),
data:o}),(c||0===c)&&(u+=c),u+='" href="#!/settings/web">'+p(i(n(3)).call(t,"Web",{hash:{},data:o}))+'</a></li> <li class="server-nav-item ',c=r.unless.call(t,t&&t.hasPrimaryServer,{hash:{},inverse:d.noop,fn:d.program(3,l,o),data:o}),(c||0===c)&&(u+=c),u+='"><a class="server-btn btn-gray ',c=i(n(25)).call(t,t&&t.subset,"server",{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+='" href="#!/settings/server">'+p(i(n(3)).call(t,"Server",{hash:{},data:o
}))+'</a></li> <li class="users-nav-item ',c=r.unless.call(t,t&&t.signedIn,{hash:{},inverse:d.noop,fn:d.program(3,l,o),data:o}),(c||0===c)&&(u+=c),u+='"><a class="users-btn btn-gray ',c=i(n(25)).call(t,t&&t.subset,"users",{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+='" href="#!/settings/users">'+p(i(n(3)).call(t,"Users",{hash:{},data:o}))+'<span class="badge"></span></a></li> <li class="devices-nav-item ',c=r.unless.call(t,t&&t.signedIn,{hash:{},inverse:d.noop,
fn:d.program(3,l,o),data:o}),(c||0===c)&&(u+=c),u+='"><a class="devices-btn btn-gray ',c=i(n(25)).call(t,t&&t.subset,"devices",{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+='" href="#!/settings/devices">'+p(i(n(3)).call(t,"Devices",{hash:{},data:o}))+"</a></li> </ul> <h2>"+p(i(n(3)).call(t,"Settings",{hash:{},data:o}))+'</h2> <div class="settings-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=' <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">'+U(i(n(3)).call(e,"General",{hash:{},data:t}))+'</a></li> <li><a class="card btn-gray" href="#quality-web-group">'+U(i(n(3)).call(e,"Quality",{hash:{},data:t
}))+'</a></li> <li class="advanced-setting"><a class="card btn-gray" href="#debug-web-group">'+U(i(n(3)).call(e,"Debug",{hash:{},data:t}))+'</a></li> <li><a class="card btn-gray" href="#player-web-group">'+U(i(n(3)).call(e,"Player",{hash:{},data:t}))+"</a></li> </ul> </div> "}function l(e,t){return'class="col-sm-8 col-md-9"'}function c(e,t){return'class="col-sm-12 col-md-12"'}function u(e,t){return"active"}function d(e,t,r){var a,o="";return o+=' <option value="'+U((a=e&&e.value,
typeof a===B?a.apply(e):a))+'" ',a=i(n(25)).call(e,e&&e.value,(a=r&&r.settings,null==a||!1===a?a:a.language),{hash:{},inverse:V.noop,fn:V.program(10,p,t),data:t}),(a||0===a)&&(o+=a),o+="> "+U((a=e&&e.title,typeof a===B?a.apply(e):a))+" </option> "}function p(e,t){return"selected"}function h(e,t){var a,o="";return o+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="autoLogin" ',a=r.if.call(e,(a=e&&e.settings,null==a||!1===a?a:a.autoLogin),{hash:{},
inverse:V.noop,fn:V.program(13,f,t),data:t}),(a||0===a)&&(o+=a),o+="> "+U(i(n(3)).call(e,"Automatically Sign In",{hash:{},data:t}))+' </label> <p class="help-block">'+U(i(n(3)).call(e,"Do not prompt to select a user or enter a PIN during startup on this device.",{hash:{},data:t}))+"</p> </div> "}function f(e,t){return"checked"}function v(e,t,r){var a,o="";return o+=' <option value="'+U((a=e&&e.value,typeof a===B?a.apply(e):a))+'" ',a=i(n(25)).call(e,e&&e.value,(a=r&&r.settings,
null==a||!1===a?a:a.allowHttpFallback),{hash:{},inverse:V.noop,fn:V.program(10,p,t),data:t}),(a||0===a)&&(o+=a),o+=">"+U(i(n(3)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function g(e,t,r){var a,o="";return o+=' <option value="'+U((a=e&&e.value,typeof a===B?a.apply(e):a))+'" ',a=i(n(25)).call(e,e&&e.value,(a=r&&r.experienceSettings,null==a||!1===a?a:a.timeFormat),{hash:{},inverse:V.noop,fn:V.program(10,p,t),data:t}),(a||0===a)&&(o+=a),o+=">"+U(i(n(3)).call(e,e&&e.title,{hash:{},data:t
}))+"</option> "}function m(e,t){var a,o="";return o+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="autoAdjustQuality" ',a=r.if.call(e,(a=e&&e.experienceSettings,null==a||!1===a?a:a.autoAdjustQuality),{hash:{},inverse:V.noop,fn:V.program(13,f,t),data:t}),(a||0===a)&&(o+=a),o+="> "+U(i(n(3)).call(e,"Automatically adjust quality (Beta)",{hash:{},data:t
}))+' </label> <p class="help-block">'+U(i(n(3)).call(e,"Plex will increase or decrease quality based on connection speed. Requires latest Plex Media Server.",{hash:{},data:t}))+"</p> </div> "}function y(e,t){return"settings-header"}function b(e,t){return"settings-header-first"}function I(e,t,r){var a,o="";return o+=' <option value="'+U((a=e&&e.index,typeof a===B?a.apply(e):a))+'" ',a=i(n(25)).call(e,e&&e.index,(a=r&&r.experienceSettings,null==a||!1===a?a:a.remoteQuality),{hash:{},
inverse:V.noop,fn:V.program(10,p,t),data:t}),(a||0===a)&&(o+=a),o+="> "+U(i(n(402)).call(e,e,{hash:{},data:t}))+" </option> "}function S(e,t){return U(i(n(3)).call(e,'"Automatically adjust quality" will be disabled for these videos.',{hash:{},data:t}))}function M(e,t,r){var a,o="";return o+=' <option value="'+U((a=e&&e.index,typeof a===B?a.apply(e):a))+'" ',a=i(n(25)).call(e,e&&e.index,(a=r&&r.experienceSettings,null==a||!1===a?a:a.localQuality),{hash:{},inverse:V.noop,fn:V.program(10,p,t),
data:t}),(a||0===a)&&(o+=a),o+="> "+U(i(n(402)).call(e,e,{hash:{},data:t}))+" </option> "}function D(e,t,r){var a,o="";return o+=' <option value="'+U((a=e&&e.value,typeof a===B?a.apply(e):a))+'" ',a=i(n(25)).call(e,e&&e.value,(a=r&&r.settings,null==a||!1===a?a:a.debugLevel),{hash:{},inverse:V.noop,fn:V.program(10,p,t),data:t}),(a||0===a)&&(o+=a),o+=">"+U(i(n(3)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function C(e,t){var a,o=""
;return o+=' <div class="form-group"> <label for="chromecastAppID">Chromecast Receiver</label> <select id="chromecastAppID"> ',a=r.each.call(e,e&&e.chromecastAppIDs,{hash:{},inverse:V.noop,fn:V.programWithDepth(34,O,t,e),data:t}),(a||0===a)&&(o+=a),o+=' </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 ',a=i(n(223)).call(e,(a=e&&e.settings,null==a||!1===a?a:a.chromecastAppID),"custom",{hash:{},
inverse:V.noop,fn:V.program(36,j,t),data:t}),(a||0===a)&&(o+=a),o+='"> <label for="chromecastCustomAppID">Custom Chromecast Application ID</label> <input type="text" id="chromecastCustomAppID" class="form-control" placeholder="Application ID" value="'+U((a=e&&e.settings,a=null==a||!1===a?a:a.chromecastCustomAppID,
typeof a===B?a.apply(e):a))+'"> <p class="help-block">Refresh after saving this setting for it to take effect.</p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="rejectDirectConnections" ',a=r.if.call(e,(a=e&&e.settings,null==a||!1===a?a:a.rejectDirectConnections),{hash:{},inverse:V.noop,fn:V.program(13,f,t),data:t}),(a||0===a)&&(o+=a),
o+='> 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 O(e,t,r){var a,o="";return o+=' <option value="'+U((a=e&&e.value,typeof a===B?a.apply(e):a))+'" ',a=i(n(25)).call(e,e&&e.value,(a=r&&r.settings,null==a||!1===a?a:a.chromecastAppID),{hash:{},inverse:V.noop,fn:V.program(10,p,t),data:t}),(a||0===a)&&(o+=a),o+=">"+U(i(n(3)).call(e,e&&e.title,{hash:{},data:t
}))+"</option> "}function j(e,t){return"hidden"}function P(e,t){var r="";return r+=" "+U(i(n(3)).call(e,"Allows the player to play compatible media without any conversion.",{hash:{},data:t}))+" "}function w(e,t){var r="";return r+=" "+U(i(n(3)).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 T(e,t){var n,i=""
;return i+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="debugVideoQualityOverlay" ',n=r.if.call(e,(n=e&&e.experienceSettings,null==n||!1===n?n:n.debugVideoQualityOverlay),{hash:{},inverse:V.noop,fn:V.program(13,f,t),data:t}),(n||0===n)&&(i+=n),i+='> Video quality overlay </label> <p class="help-block">Burns a quality information overlay on video when automatically adjusting quality.</p> </div> '}function E(e,t){return"advanced-setting"}function x(e,t,r){
var a,o="";return o+=' <option value="'+U((a=e&&e.value,typeof a===B?a.apply(e):a))+'" ',a=i(n(25)).call(e,e&&e.value,(a=r&&r.settings,null==a||!1===a?a:a.audioBoost),{hash:{},inverse:V.noop,fn:V.program(10,p,t),data:t}),(a||0===a)&&(o+=a),o+=">"+U(i(n(3)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function N(e,t){var a,o="";return o+=' <div class="form-group"> <label for="subtitleSize">'+U(i(n(3)).call(e,"Subtitle Size",{hash:{},data:t
}))+'</label> <select id="subtitleSize" data-type="int"> ',a=r.each.call(e,e&&e.subtitleSizes,{hash:{},inverse:V.noop,fn:V.programWithDepth(49,A,t,e),data:t}),(a||0===a)&&(o+=a),o+=' </select> </div> <div class="form-group advanced-setting"> <label for="subtitlesBurnLevel">'+U(i(n(3)).call(e,"Burn Subtitles",{hash:{},data:t}))+'</label> <select id="subtitlesBurnLevel"> ',a=r.each.call(e,e&&e.subtitlesBurnLevels,{hash:{},inverse:V.noop,fn:V.programWithDepth(51,L,t,e),data:t}),(a||0===a)&&(o+=a),
o+=' </select> <p class="help-block">'+U(i(n(3)).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 A(e,t,r){var a,o="";return o+=' <option value="'+U((a=e&&e.value,typeof a===B?a.apply(e):a))+'" ',a=i(n(25)).call(e,e&&e.value,(a=r&&r.experienceSettings,null==a||!1===a?a:a.subtitleSize),{hash:{},
inverse:V.noop,fn:V.program(10,p,t),data:t}),(a||0===a)&&(o+=a),o+=">"+U(i(n(3)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function L(e,t,r){var a,o="";return o+=' <option value="'+U((a=e&&e.value,typeof a===B?a.apply(e):a))+'" ',a=i(n(25)).call(e,e&&e.value,(a=r&&r.experienceSettings,null==a||!1===a?a:a.subtitlesBurnLevel),{hash:{},inverse:V.noop,fn:V.program(10,p,t),data:t}),(a||0===a)&&(o+=a),o+=">"+U(i(n(3)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function k(e,t,r){
var a,o="";return o+=' <option value="'+U((a=e&&e.value,typeof a===B?a.apply(e):a))+'" ',a=i(n(25)).call(e,e&&e.value,(a=r&&r.experienceSettings,null==a||!1===a?a:a.extrasPrefixCount),{hash:{},inverse:V.noop,fn:V.program(10,p,t),data:t}),(a||0===a)&&(o+=a),o+=">"+U(i(n(3)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function _(e,t){var a,o="";return o+=' <h4 class="settings-header advanced-setting">'+U(i(n(3)).call(e,"Chromecast",{hash:{},data:t
}))+'</h4> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="audioForceMultiChannel" ',a=r.if.call(e,(a=e&&e.experienceSettings,null==a||!1===a?a:a.audioForceMultiChannel),{hash:{},inverse:V.noop,fn:V.program(13,f,t),data:t}),(a||0===a)&&(o+=a),o+="> "+U(i(n(3)).call(e,"Force multi-channel audio support",{hash:{},data:t
}))+' </label> <p class="help-block">'+U(i(n(3)).call(e,"Forces Chromecast to allow six channel surround sound whether or not the device reports support.",{hash:{},data:t}))+"</p> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var R,z="",U=this.escapeExpression,B="function",V=this;return z+='<div class="filter-bar"> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right basic-setting">'+U(i(n(3)).call(t,"Show Advanced",{hash:{},data:o
}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right advanced-setting">'+U(i(n(3)).call(t,"Hide Advanced",{hash:{},data:o}))+'</button> </div> <div class="row"> ',R=r.if.call(t,t&&t.showNavLinks,{hash:{},inverse:V.noop,fn:V.program(1,s,o),data:o}),(R||0===R)&&(z+=R),z+=" <div ",R=r.if.call(t,t&&t.showNavLinks,{hash:{},inverse:V.program(5,c,o),fn:V.program(3,l,o),data:o}),(R||0===R)&&(z+=R),
z+='> <form id="web-settings-form"> <div id="general-web-group" class="settings-group ',R=r.if.call(t,t&&t.showNavLinks,{hash:{},inverse:V.noop,fn:V.program(7,u,o),data:o}),(R||0===R)&&(z+=R),z+='"> <h4 class="version-title"> '+U(i(n(3)).call(t,"Version",{hash:{},data:o}))+" "+U((R=t&&t.version,typeof R===B?R.apply(t):R))+' </h4> <div class="form-group"> <label for="language">'+U(i(n(3)).call(t,"Language",{hash:{},data:o}))+'</label> <select id="language"> ',R=r.each.call(t,t&&t.languages,{
hash:{},inverse:V.noop,fn:V.programWithDepth(9,d,o,t),data:o}),(R||0===R)&&(z+=R),z+=' </select> <p class="help-block">'+U(i(n(3)).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:o}))+"</p> </div> ",R=r.if.call(t,t&&t.hasHome,{hash:{},inverse:V.noop,fn:V.program(12,h,o),data:o}),(R||0===R)&&(z+=R),
z+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="playThemeMusic" ',R=r.if.call(t,(R=t&&t.experienceSettings,null==R||!1===R?R:R.playThemeMusic),{hash:{},inverse:V.noop,fn:V.program(13,f,o),data:o}),(R||0===R)&&(z+=R),z+="> "+U(i(n(3)).call(t,"Play Theme Music",{hash:{},data:o}))+' </label> <p class="help-block">'+U(i(n(3)).call(t,"Automatically play theme music in the background when available.",{hash:{},data:o
}))+'</p> </div> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="companion" ',R=r.if.call(t,(R=t&&t.settings,null==R||!1===R?R:R.companion),{hash:{},inverse:V.noop,fn:V.program(13,f,o),data:o}),(R||0===R)&&(z+=R),z+="> "+U(i(n(3)).call(t,"Advertise as player",{hash:{},data:o}))+' </label> <p class="help-block">'+U(i(n(3)).call(t,"Allow other Plex apps to fling content to this device and control it remotely.",{hash:{},data:o
}))+'</p> </div> <div class="form-group advanced-setting"> <label for="allowHttpFallback">'+U(i(n(3)).call(t,"Allow Fallback to Insecure Connections",{hash:{},data:o}))+'</label> <select id="allowHttpFallback"> ',R=r.each.call(t,t&&t.httpFallbackOptions,{hash:{},inverse:V.noop,fn:V.programWithDepth(15,v,o,t),data:o}),(R||0===R)&&(z+=R),z+=' </select> <p class="help-block">'+U(i(n(3)).call(t,"Allow this browser to make insecure connections to Plex Media Server if secure connections fail.",{
hash:{},data:o}))+'</p> </div> <div class="form-group"> <label for="timeFormat">'+U(i(n(3)).call(t,"Time Format",{hash:{},data:o}))+'</label> <select id="timeFormat"> ',R=r.each.call(t,t&&t.timeFormats,{hash:{},inverse:V.noop,fn:V.programWithDepth(17,g,o,t),data:o}),(R||0===R)&&(z+=R),z+=' </select> </div> </div> <div id="quality-web-group" class="settings-group"> ',R=r.if.call(t,t&&t.hasAdaptiveBitrate,{hash:{},inverse:V.noop,fn:V.program(19,m,o),data:o}),(R||0===R)&&(z+=R),z+=' <h4 class="',
R=r.if.call(t,t&&t.hasAdaptiveBitrate,{hash:{},inverse:V.program(23,b,o),fn:V.program(21,y,o),data:o}),(R||0===R)&&(z+=R),z+='">'+U(i(n(3)).call(t,"Internet Streaming",{hash:{},data:o}))+'</h4> <div class="form-group"> <label for="remoteQuality">'+U(i(n(3)).call(t,"Video quality",{hash:{},data:o}))+'</label> <select id="remoteQuality" data-type="int"> <option value="-1">'+U(i(n(3)).call(t,"Maximum",{hash:{},data:o}))+"</option> ",R=r.each.call(t,t&&t.availableQualities,{hash:{},inverse:V.noop,
fn:V.programWithDepth(25,I,o,t),data:o}),(R||0===R)&&(z+=R),z+=' </select> <p class="help-block">'+U(i(n(3)).call(t,"Set the default quality for streaming video over the internet. If quality is set too high, videos will start slowly and pause frequently.",{hash:{},data:o}))+'</p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="remoteSmallVideoAtOriginalQuality" ',R=r.if.call(t,(R=t&&t.experienceSettings,
null==R||!1===R?R:R.remoteSmallVideoAtOriginalQuality),{hash:{},inverse:V.noop,fn:V.program(13,f,o),data:o}),(R||0===R)&&(z+=R),z+="> "+U(i(n(3)).call(t,"Play smaller videos at original quality",{hash:{},data:o}))+' </label> <p class="help-block"> '+U(i(n(3)).call(t,"When a video file is smaller than the quality above, try playing the original video without converting. This preserves full quality, but playback may pause frequently.",{hash:{},data:o}))+" ",R=r.if.call(t,t&&t.hasAdaptiveBitrate,{
hash:{},inverse:V.noop,fn:V.program(27,S,o),data:o}),(R||0===R)&&(z+=R),z+=' </p> </div> <h4 class="settings-header">'+U(i(n(3)).call(t,"Home Streaming",{hash:{},data:o}))+'</h4> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="useHomeStreamingRecommendedSettings" ',R=r.if.call(t,(R=t&&t.experienceSettings,null==R||!1===R?R:R.useHomeStreamingRecommendedSettings),{hash:{},inverse:V.noop,fn:V.program(13,f,o),data:o}),(R||0===R)&&(z+=R),
z+="> "+U(i(n(3)).call(t,"Use recommended settings",{hash:{},data:o}))+' </label> <p class="help-block recommended-home-streaming-settings">'+U(i(n(3)).call(t,"All compatible videos will play at original quality. Incompatible videos will be converted at maximum quality.",{hash:{},data:o}))+'</p> </div> <div class="form-group custom-home-streaming-settings"> <label for="localQuality">'+U(i(n(3)).call(t,"Video quality",{hash:{},data:o
}))+'</label> <select id="localQuality" data-type="int"> <option value="-1">'+U(i(n(3)).call(t,"Maximum",{hash:{},data:o}))+"</option> ",R=r.each.call(t,t&&t.availableQualities,{hash:{},inverse:V.noop,fn:V.programWithDepth(29,M,o,t),data:o}),(R||0===R)&&(z+=R),z+=' </select> <p class="help-block">'+U(i(n(3)).call(t,"Choose the default video quality to use for local Wi-Fi streaming on home networks. If quality is set too high, videos will start slowly and pause frequently.",{hash:{},data:o
}))+'</p> </div> </div> <div id="debug-web-group" class="settings-group"> <div class="form-group"> <label for="debugLevel">'+U(i(n(3)).call(t,"Debug Level",{hash:{},data:o}))+'</label> <select id="debugLevel" data-type="int"> ',R=r.each.call(t,t&&t.debugLevels,{hash:{},inverse:V.noop,fn:V.programWithDepth(31,D,o,t),data:o}),(R||0===R)&&(z+=R),z+=' </select> <p class="help-block">'+U(i(n(3)).call(t,"You can view the debug logs {1}here{2}.",'<a href="#!/logs">',"</a>",{hash:{},data:o
}))+"</p> </div> ",R=r.if.call(t,t&&t.isNinja,{hash:{},inverse:V.noop,fn:V.program(33,C,o),data:o}),(R||0===R)&&(z+=R),z+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="directPlay" ',R=r.if.call(t,(R=t&&t.settings,null==R||!1===R?R:R.directPlay),{hash:{},inverse:V.noop,fn:V.program(13,f,o),data:o}),(R||0===R)&&(z+=R),z+="> "+U(i(n(3)).call(t,"Direct Play",{hash:{},data:o}))+' </label> <p class="help-block"> ',R=r.if.call(t,t&&t.isPMPDesktop,{hash:{},
inverse:V.program(40,w,o),fn:V.program(38,P,o),data:o}),(R||0===R)&&(z+=R),z+=' </p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="directStream" ',R=r.if.call(t,(R=t&&t.settings,null==R||!1===R?R:R.directStream),{hash:{},inverse:V.noop,fn:V.program(13,f,o),data:o}),(R||0===R)&&(z+=R),z+="> "+U(i(n(3)).call(t,"Direct Stream",{hash:{},data:o
}))+' </label> <p class="help-block">'+U(i(n(3)).call(t,"Allows the server to copy compatible audio and video streams without converting them.",{hash:{},data:o}))+"</p> </div> ",R=r.if.call(t,t&&t.canDebugAdaptiveBitrate,{hash:{},inverse:V.noop,fn:V.program(42,T,o),data:o}),(R||0===R)&&(z+=R),z+=' </div> <div id="player-web-group" class="settings-group"> <h4 class="settings-header-first ',R=r.if.call(t,t&&t.isPMPDesktop,{hash:{},inverse:V.noop,fn:V.program(44,E,o),data:o}),(R||0===R)&&(z+=R),
z+='">'+U(i(n(3)).call(t,"Audio & Subtitles",{hash:{},data:o}))+'</h4> <div class="form-group advanced-setting"> <label for="audioBoost">'+U(i(n(3)).call(t,"Multi-Channel Audio Boost",{hash:{},data:o}))+'</label> <select id="audioBoost" data-type="int"> ',R=r.each.call(t,t&&t.audioBoostLevels,{hash:{},inverse:V.noop,fn:V.programWithDepth(46,x,o,t),data:o}),(R||0===R)&&(z+=R),z+=' </select> <p class="help-block">'+U(i(n(3)).call(t,"Boost volume when converting multi-channel audio to stereo.",{
hash:{},data:o}))+"</p> </div> ",R=r.unless.call(t,t&&t.isPMPDesktop,{hash:{},inverse:V.noop,fn:V.program(48,N,o),data:o}),(R||0===R)&&(z+=R),z+=' <h4 class="settings-header">'+U(i(n(3)).call(t,"Extras",{hash:{},data:o}))+'</h4> <div class="form-group"> <label for="extrasPrefixCount">'+U(i(n(3)).call(t,"Cinema Trailers to Play Before Movies",{hash:{},data:o}))+'</label> <select id="extrasPrefixCount" data-type="int"> ',R=r.each.call(t,t&&t.extrasPrefixCounts,{hash:{},inverse:V.noop,
fn:V.programWithDepth(53,k,o,t),data:o}),(R||0===R)&&(z+=R),z+=" </select> </div> ",R=r.unless.call(t,t&&t.isPMPDesktop,{hash:{},inverse:V.noop,fn:V.program(55,_,o),data:o}),(R||0===R)&&(z+=R),z+=' </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">'+U(i(n(3)).call(t,"Save Changes",{hash:{},data:o
}))+'</span> </button> <span class="form-message"></span> </div> </form> </div> </div> '})},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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r=""
;return r+=' <div class="filter-bar-right"> <button class="toggle-advanced-btn btn btn-sm btn-default basic-setting">'+p(i(n(3)).call(e,"Show Advanced",{hash:{},data:t}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default advanced-setting">'+p(i(n(3)).call(e,"Hide Advanced",{hash:{},data:t}))+"</button> </div> "}function l(e,t){return' <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 c(e,t){return' <div class="settings-row row"> <div class="pane-region col-sm-12 col-md-12"></div> </div> '}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p=this.escapeExpression,h=this;return d+='<div class="filter-bar"> ',u=r.unless.call(t,t&&t.shared,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+=" </div> ",u=r.if.call(t,t&&t.showNavLinks,{hash:{},inverse:h.program(5,c,o),fn:h.program(3,l,o),data:o}),(u||0===u)&&(d+=u),d+=" "
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(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||!1===n?n:n.friendlyName,typeof n===h?n.apply(e):n))+'</span> <i class="caret-icon"></i> </a> <ul class="dropdown-menu"> ',n=r.each.call(e,e&&e.servers,{hash:{},
inverse:v.noop,fn:v.programWithDepth(2,l,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function l(e,t,r){var a,o="";return o+=' <li><a data-id="'+f((a=e&&e.machineIdentifier,typeof a===h?a.apply(e):a))+'" href="#"><span class="dropdown-truncated-label">'+f((a=e&&e.friendlyName,typeof a===h?a.apply(e):a))+"</span>",a=i(n(25)).call(e,(a=r&&r.currentServer,null==a||!1===a?a:a.machineIdentifier),e&&e.machineIdentifier,{hash:{},inverse:v.noop,fn:v.program(3,c,t),data:t}),(a||0===a)&&(o+=a),
o+="</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||!1===n?n:n.friendlyName,typeof n===h?n.apply(e):n))+"</span> </span> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var d,p="",h="function",f=this.escapeExpression,v=this;return d=r.if.call(t,t&&t.showDropdown,{hash:{},
inverse:v.program(5,u,o),fn:v.program(1,s,o),data:o}),(d||0===d)&&(p+=d),p+=" "})},function(e,t,n){"use strict";var i=n(20),r=n(3446),a=i.a.CollectionView.extend({tagName:"ul",className:"nav nav-cards",itemView:r.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){
this.children.findByModel(n).showDecorator(t)}}});t.a=a},function(e,t,n){"use strict";var i=n(3447),r=n.n(i),a=n(20),o=a.a.ItemView.extend({tagName:"li",className:"server-settings-nav-list-item",template:r.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=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+='<a class="card btn-gray" href="#" data-group="'+c((s=t&&t.id,
"function"==typeof s?s.apply(t):s))+'"> <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> '+c(i(n(3)).call(t,t&&t.title,{hash:{},data:o}))+" </a> "})},function(e,t,n){"use strict"
;var i=n(5),r=n.n(i),a=n(4),o=n(311),s=n(3450),l=n(3469),c=n(3473),u=n.n(c),d=o.a.extend({template:u.a,regions:{signIn:".sign-in-region",update:".update-region"},serializeData:function(){var e=o.a.prototype.serializeData.apply(this,arguments),t=r.a.findWhere(e,{id:"FriendlyName"});return t&&(t.placeholder=this.model.get("friendlyName")),e},bindings:{".version":{modelAttribute:"shortVersion",formatter:function(e){return Object(a.default)("Version {1}",e)}}},onRender:function(){
o.a.prototype.onRender.apply(this,arguments),this.signIn.show(new s.a({model:this.model})),this.model.get("updater")&&this.update.show(new l.a({model:this.model.get("desktop").get("update"),collection:this.collection}))}});t.a=d},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=" "+u(i(n(27)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),o=o||{};var l,c="",u=this.escapeExpression,d=this;return c+='<form id="server-settings-form"> ',l=r.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(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(3)).call(t,"Save Changes",{hash:{},data:o
}))+'</span> </button> <span class="form-message"></span> </div> </form> '})},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(84)),s=n.n(o),l=n(11),c=n(15),u=n(56),d=n(3451),p=u.a.extend({template:function(){return""},mountReact:function(){var e=Object(c.d)("appStore"),t=this.model.entityID();s.a.render(r()(l.a,{store:e},void 0,r()(d.a,{serverEntityID:t})),this.el)}});t.a=p},function(e,t,n){"use strict";function i(){return Object(d.createSelector)(Object(p.a)(),function(e){
return{isServerClaimed:e}})}function r(e){var t=e.isServerClaimed,n=o()(e,["isServerClaimed"]);return t?c.a.createElement(h.a,n):c.a.createElement(f.a,n)}var a=n(13),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(6),p=(n.n(d),n(3452)),h=n(3453),f=n(3462);t.a=Object(u.b)(i)(r)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),Object(o.a)(),function(e,t){return!!(e&&e.isClaimed&&t&&t.signedIn)})}var r=n(6),a=(n.n(r),n(42)),o=n(1245);t.a=i
},function(e,t,n){"use strict";function i(){return Object(I.createSelector)(Object(S.a)(),function(e){return!!e&&e.isPersonalCloudServer})}function r(){return Object(I.createSelector)(Object(M.a)(),function(e){return e&&e.username||null})}function a(){return Object(I.createSelector)(j,i(),r(),function(e,t,n){return{isSigningOut:e,isAbleToSignOut:!t,username:n}})}var o=n(7),s=n.n(o),l=n(13),c=n.n(l),u=n(8),d=n.n(u),p=n(9),h=n.n(p),f=n(10),v=n.n(f),g=n(1),m=(n.n(g),
n(0)),y=n.n(m),b=n(11),I=n(6),S=(n.n(I),n(42)),M=n(1245),D=n(209),C=n(385),O=n(3457),j=Object(I.createSelector)(D.a,function(e){return e.isBusy}),P={dispatchSignOutServer:C.e},w=function(e){function t(){var n,i,r;d()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=h()(this,e.call.apply(e,[this].concat(o))),i.onSignOutPress=function(e){i.props.dispatchSignOutServer({serverEntityID:i.props.serverEntityID})},r=n,h()(i,r)}return v()(t,e),
t.prototype.render=function(){var e=this.props,t=(e.dispatchSignOutServer,c()(e,["dispatchSignOutServer"]));return y.a.createElement(O.a,s()({},t,{onSignOutPress:this.onSignOutPress}))},t}(m.Component);t.a=Object(b.b)(a,P)(w)},function(e,t,n){"use strict";function i(e,t){var n=e.get("cloudServer"),i=n.get("resources"),r={clientIdentifier:t.get("machineIdentifier")};return Object(u.a)(function(){return i.fetch().then(function(){
return i.findWhere(r)?s.a.Deferred().resolve().promise():s.a.Deferred().reject().promise()})},{times:30,delay:1e3})}function r(e,t,n){var i=s.a.Deferred();return e.get("primaryServer")===t?i.resolve():(e.once("change:primaryServer",i.resolve),n()),Object(d.a)(i.promise(),2e3)}function a(e,t,n,a){var o,u=e.get("user"),d=e.get("cloudServer");return s.a.ajax(d.getXHROptions("/api/claim/token",{headers:(o={},o["X-Plex-Token"]=n,o)})).promise().then(function(e){return c.a.parseXML(e).token
}).then(function(e){return s.a.ajax(t.getXHROptions(l.join("/myplex/claim",{token:e}),{type:"POST"}))}).then(function(){return i(e,t)}).then(function(){return t.fetch()}).then(function(){return r(e,t,a)}).then(function(){var e=u.get("email"),n=t.get("desktop").get("cloudAccount");t.set({myPlexSigninState:p.b,myPlexUsername:e}),n.set({signedIn:!0,username:e})})}var o=n(12),s=n.n(o),l=n(19),c=n(58),u=n(727),d=n(3455),p=n(99);t.a=a},function(e,t,n){"use strict";function i(e,t){
var n=a.a.Deferred(),i=setTimeout(function(){n.reject()},t);return e.then(n.resolve,n.reject).always(function(){clearTimeout(i)}),n.promise()}var r=n(12),a=n.n(r);t.a=i},function(e,t,n){"use strict";function i(e){return e.destroy({timeout:0}).promise().done(function(){e.server.set({accessToken:void 0,myPlexSigninState:r.a,myPlexSubscription:!1}),e.restoreDefaults()})}var r=n(99);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.isAbleToSignOut,n=e.isSigningOut,i=e.username,r=e.serverEntityID,o=e.onSignOutPress;return a()("div",{className:f.a.container},void 0,a()(p.a,{serverEntityID:r}),a()("div",{className:f.a.message},void 0,a()("div",{className:f.a.messageHeader},void 0,Object(l.default)("Server signed in as")),a()("div",{className:f.a.messageDetails},void 0,i)),t&&a()(d.a,{className:f.a.button,kind:c.DEFAULT,size:u.MEDIUM,isSpinning:n,onPress:o},void 0,Object(l.default)("Sign Out")))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(65),u=n(61),d=n(102),p=n(3458),h=n(3461),f=n.n(h);t.a=i},function(e,t,n){"use strict";var i=n(11),r=n(6),a=(n.n(r),n(200)),o=n(1246),s=Object(r.createSelector)(a.a,function(e){return{avatarUrl:e.isSignedIn?e.thumb:null}});t.a=Object(i.b)(s)(o.a)},function(e,t){e.exports={avatar:"AvatarImg-avatar-3Op56"}},function(e,t){e.exports={avatar:"ServerAvatar-avatar-2VGH0",icon:"ServerAvatar-icon-DrP34"}},function(e,t){e.exports={
container:"ClaimedServer-container-3O6-1",message:"ClaimedServer-message-1yZ-w",messageHeader:"ClaimedServer-messageHeader-3uzat",messageDetails:"ClaimedServer-messageDetails-3lEkV",button:"ClaimedServer-button-36k0Q SpinnerButton-button-1A8Ec Button-button-2kT68 Link-link-2n0yJ"}},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(S.a,Object(I.a)("isSignedIn"),Object(I.a)("restricted"),function(e,t,n){var i=void 0;return i=t?P:Object(b.a)()?w:T,f()({componentType:i,
isUserRestricted:!!n},e)})}var r,a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(7),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=(n.n(g),n(11)),y=n(6),b=(n.n(y),n(451)),I=n(423),S=n(209),M=n(385),D=n(3463),C=n(3465),O=n(3467),j=n(3468),P="SIGNED_IN_BUTTON",w="SIGNED_OUT_POLL_BUTTON",T="SIGNED_OUT_LAUNCH_BUTTON",E={dispatchClaimServer:M.a},x=(r={},r[P]=C.a,r[w]=O.a,r[T]=j.a,r),N=function(e){function t(){return l()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),
t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.componentType,i=e.isBusy,r=e.isUserRestricted;return o()(D.a,{serverEntityID:t,isBusy:i,isUserRestricted:r,ClaimServerButtonConnectorComponent:x[n]})},t}(g.Component);t.a=Object(m.b)(i,E)(N)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.isBusy,i=e.isUserRestricted,r=e.ClaimServerButtonConnectorComponent;return a()("div",{className:d.a.container},void 0,a()(c.a,{serverEntityID:t}),i?a()("div",{
className:d.a.message},void 0,a()("div",{className:d.a.messageHeader},void 0,Object(l.default)("This server is unclaimed and not secure")),a()("div",{className:d.a.messageDetails},void 0,Object(l.default)("You are signed in as a managed user.")),a()("div",{className:d.a.messageDetails},void 0,Object(l.default)("Switch to a full user account to claim this server."))):a()("div",{className:d.a.message},void 0,a()("div",{className:d.a.messageHeader
},void 0,Object(l.default)("This server is unclaimed and not secure")),a()("div",{className:d.a.messageDetails},void 0,Object(l.default)("Claiming this server will associate it with your Plex account.")),a()("div",{className:d.a.messageDetails},void 0,Object(l.default)("This helps your devices find each other and helps keep your media safe."))),a()(r,{serverEntityID:t,isBusy:n,isDisabled:i}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(1246),u=n(3464),d=n.n(u);t.a=i
},function(e,t){e.exports={container:"UnclaimedServer-container-2zE1Q",message:"UnclaimedServer-message-16zts",messageHeader:"UnclaimedServer-messageHeader-6cNqh",messageDetails:"UnclaimedServer-messageDetails-2ERBD"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(11)),f=n(6),v=(n.n(f),n(423)),g=n(385),m=n(804),y=Object(f.createSelector)(Object(v.a)("authToken"),function(e){return{authToken:e}}),b={
dispatchClaimServer:g.a},I=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onClaimServerPress=function(){i.props.dispatchClaimServer({serverEntityID:i.props.serverEntityID,authToken:i.props.authToken})},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.isBusy,n=e.isDisabled;return r()(m.a,{isSpinning:t,isDisabled:n,
onPress:this.onClaimServerPress})},t}(p.Component);t.a=Object(h.b)(y,b)(I)},function(e,t){e.exports={button:"ClaimServerButton-button-2r6HK SpinnerButton-button-1A8Ec Button-button-2kT68 Link-link-2n0yJ"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(11)),f=n(4),v=n(24),g=n(209),m=n(199),y=n(236),b=n(385),I=n(22),S=n(380),M=n(804),D={dispatchPreloadPIN:y.c,dispatchBeginPolling:y.b,dispatchStopPolling:y.g,
dispatchSignInThenClaimServer:b.d},C=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onClaimServerPress=function(){i.props.dispatchBeginPolling({pinID:i.props.pinID})},i.onStillTherePress=function(){i.props.dispatchPreloadPIN()},r=n,l()(i,r)}return u()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchPreloadPIN()},t.prototype.componentDidUpdate=function(e){
this.props.authToken!==e.authToken&&this.props.authToken&&this.props.dispatchSignInThenClaimServer({serverEntityID:this.props.serverEntityID,authToken:this.props.authToken})},t.prototype.componentWillUnmount=function(){this.props.dispatchStopPolling()},t.prototype.render=function(){var e=this.props,t=e.code,n=e.pinID,i=e.isBusy,a=e.isDisabled;return i||this.props.code?r()(S.a,{component:M.a,code:t,pinID:n,isSpinning:i,isDisabled:a||!n,onPress:this.onClaimServerPress}):r()(m.a,{
message:Object(f.default)("Server claiming timed out. {openLink}Try again?{closeLink}"),tags:[{open:"openLink",close:"closeLink",component:I.a,kind:v.b.PRIMARY,onPress:this.onStillTherePress}]})},t}(p.Component);t.a=Object(h.b)(g.a,D)(C)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(11)),f=n(209),v=n(236),g=n(385),m=n(380),y=n(793),b=n(804),I={dispatchReadStoredPIN:v.d,dispatchCreatePIN:g.c,
dispatchSignInThenClaimServer:g.d},S=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onClaimServerPress=function(){i.props.dispatchCreatePIN()},r=n,l()(i,r)}return u()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchReadStoredPIN({shouldCreatePIN:!1})},t.prototype.componentDidUpdate=function(e){
this.props.authToken!==e.authToken&&this.props.authToken&&this.props.dispatchSignInThenClaimServer({serverEntityID:this.props.serverEntityID,authToken:this.props.authToken})},t.prototype.render=function(){var e=this.props,t=e.isBusy,n=e.isDisabled,i=e.pinID,a=e.code;return i?r()(m.a,{component:y.a,code:a,pinID:i}):r()(b.a,{isSpinning:t,isDisabled:n,onPress:this.onClaimServerPress})},t}(p.Component);t.a=Object(h.b)(f.a,I)(S)},function(e,t,n){"use strict"
;var i=n(12),r=n.n(i),a=n(3470),o=n.n(a),s=n(5),l=n.n(s),c=n(20),u=n(15),d=n(4),p=n(17),h=n(32),f=n(3471),v=c.a.ItemView.extend({tagName:"span",className:"check-for-updates-container",template:o.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){h.a.execute("checkForServerUpdates",{server:this.model.server,download:e.download,initialState:e.initialState})},installUpdates:function(){h.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 n=e;this.model.get("canInstall")||"available"!==e||(n="notify"),this.$el.addClass(n)
;var i=!(!this.model.get("added")&&!this.model.get("fixed"));if(this.$el.toggleClass("has-release-notes",i),"installing"===n)this.waitForInstall();else if("error"===n||"notify"===n){var r;this.model.get("error")?(r=this.model.get("error"),this.ui.installManualLink.addClass("hidden")):this.model.get("canInstall")?(r=Object(d.default)("Something went wrong."),this.ui.installManualLink.removeClass("hidden")):(r=Object(d.default)("An update is available."),
this.ui.installManualLink.removeClass("hidden"));var a=u.d("appModel"),o=a.get("user").server,s=this.model.get("downloadURL")||o.get("appsUrl");this.ui.installManualLink.attr("href",s),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?h.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"});r.a.ajax(n).promise().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(),p.a.trigger("show:modal",new f.a({model:this.model}))}});t.a=v},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var l,c="",u=this,d=this.escapeExpression;return c+='<a href="#" class="check-for-updates-btn label label-btn label-primary ',l=r.unless.call(t,t&&t.canCheckForUpdate,{hash:{},inverse:u.noop,fn:u.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+='"> <i class="label-icon glyphicon upload"></i> '+d(i(n(3)).call(t,"Check for Updates",{hash:{},data:o
}))+' </a> <a href="#" class="checking-for-updates-btn label label-btn label-primary active"> <i class="label-icon glyphicon upload"></i> '+d(i(n(3)).call(t,"Checking for Updates",{hash:{},data:o}))+' </a> <a href="#" class="available-updates-btn label label-btn label-primary"> <i class="label-icon glyphicon download"></i> '+d(i(n(3)).call(t,"Download Updates",{hash:{},data:o
}))+' </a> <span class="downloading-updates-container label label-btn label-progress active"> <i class="label-icon glyphicon download"></i> '+d(i(n(3)).call(t,"Downloading Update",{hash:{},data:o}))+' <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(3)).call(t,"Install Update",{hash:{},data:o
}))+' </a> <a href="#" class="installing-updates-btn label label-btn label-primary active"> <i class="label-icon glyphicon upload"></i> '+d(i(n(3)).call(t,"Installing",{hash:{},data:o}))+' </a> <span class="install-info-label up-to-date-label"> <i class="success-icon glyphicon ok-2"></i> '+d(i(n(3)).call(t,"Up to date",{hash:{},data:o
}))+' </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(3)).call(t,"Please install manually.",{hash:{},data:o}))+'</a> </span> <a href="#" class="release-notes-btn label label-btn label-default"> <i class="label-icon glyphicon circle-info"></i> '+d(i(n(3)).call(t,"What's New",{hash:{},data:o
}))+" </a> "})},function(e,t,n){"use strict";function i(e){return e?e.split("\n"):[]}var r=n(3472),a=n.n(r),o=n(70),s=o.a.extend({name:"releaseNotesModal",template:a.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=s},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t,a){var o,s=""
;return s+=' <h4 class="update-list-title">'+h(i(n(3)).call(e,"New",{hash:{},data:t}))+"</h4> <ul> ",o=r.each.call(e,a&&a.added,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(o||0===o)&&(s+=o),s+=" </ul> "}function l(e,t){var n="";return n+=" <li>"+h(typeof e===p?e.apply(e):e)+"</li> "}function c(e,t,a){var o,s="";return s+=' <h4 class="update-list-title">'+h(i(n(3)).call(e,"Fixes",{hash:{},data:t}))+"</h4> <ul> ",o=r.each.call(e,a&&a.fixed,{hash:{},inverse:f.noop,fn:f.program(2,l,t),
data:t}),(o||0===o)&&(s+=o),s+=" </ul> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p="function",h=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> '+h(i(n(3)).call(t,"Plex Media Server Release Notes",{hash:{},data:o
}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <span class="text-muted">'+h(i(n(3)).call(t,"Version {1}",t&&t.version,{hash:{},data:o}))+"</span> ",u=r.if.call(t,t&&t.added,{hash:{},inverse:f.noop,fn:f.programWithDepth(1,s,o,t),data:o}),(u||0===u)&&(d+=u),d+=" ",u=r.if.call(t,t&&t.fixed,{hash:{},inverse:f.noop,fn:f.programWithDepth(4,c,o,t),data:o}),(u||0===u)&&(d+=u),d+=" </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}
var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=" "+u(i(n(27)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var l,c="",u=this.escapeExpression,d=this;return c+='<div class="sign-in-region"></div> <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=r.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(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(3)).call(t,"Save Changes",{hash:{},data:o}))+'</span> </button> <span class="form-message"></span> </div> </form> '})},function(e,t,n){"use strict";var i=n(3475),r=n.n(i),a=n(311),o=a.a.extend({template:r.a,
serializeData:function(){var e=this.model,t=e.get("diagnostics"),n=t&&-1!==t.indexOf("logs"),i=t&&-1!==t.indexOf("databases");return{showDownloadLogs:n,showDownloadDatabases:i,showDownloadLogsOrDatabases:n||i,downloadLogsUrl:e.resolveUrl("/diagnostics/logs",{appendToken:!0}),downloadDatabasesUrl:e.resolveUrl("/diagnostics/databases",{appendToken:!0}),defaultLinkTarget:"_blank"}}});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var a,o="";return o+=' <p class="text-muted"> '+h(i(n(3)).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"> ',a=r.if.call(e,e&&e.showDownloadLogs,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+=" ",a=r.if.call(e,e&&e.showDownloadDatabases,{hash:{},
inverse:f.noop,fn:f.program(4,c,t),data:t}),(a||0===a)&&(o+=a),o+=" </div> "}function l(e,t){var r,a="";return a+=' <a class="btn btn-primary" href="'+h((r=e&&e.downloadLogsUrl,typeof r===p?r.apply(e):r))+'" target="'+h((r=e&&e.defaultLinkTarget,typeof r===p?r.apply(e):r))+'">'+h(i(n(3)).call(e,"Download Logs",{hash:{},data:t}))+"</a> "}function c(e,t){var r,a="";return a+=' <a class="btn btn-primary" href="'+h((r=e&&e.downloadDatabasesUrl,
typeof r===p?r.apply(e):r))+'" target="'+h((r=e&&e.defaultLinkTarget,typeof r===p?r.apply(e):r))+'">'+h(i(n(3)).call(e,"Download Database",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p="function",h=this.escapeExpression,f=this
;return d+='<div class="help-container"> <p class="text-muted"> '+h(i(n(3)).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:o}))+" </p> ",u=r.if.call(t,t&&t.showDownloadLogsOrDatabases,{hash:{},inverse:f.noop,fn:f.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+=" </div> "})},function(e,t,n){"use strict"
;var i=n(3477),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(32),u=n(109),d=n(473),p=n(311),h=p.a.extend({className:"remote-access-container",template:r.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.hideNavLinks=e.hideNavLinks,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"),r=this.collection.get("WanPerStreamMaxUploadRate"),a=this.cloudAccount.toJSON(),o=!e.get("value"),s=!a.signedIn,l=o||s,c=!(!a.privateAddress||null==a.privatePort),u=!(!a.publicAddress||null==a.publicPort),d={forceAdvanced:!o&&!!a.mappingError,isDisabled:o,isSignedOut:s,isUnavailable:l,
canEditPort:!l&&t&&t.get("value"),hasPrivateAddress:c,hasPublicAddress:u,cloudAccount:a,hasMappingSettings:!(!t||!n),hasUploadLimitSettings:!(!i||!r),mappingModeSetting:t?t.toJSON():null,mappingPortSetting:n?n.toJSON():null,uploadSettings:[]};return i&&(d.totalRateSettingID=i.id,d.totalRateSettingValue=i.get("value")/1e3),r&&d.uploadSettings.push(r.toJSON()),d},enable:function(){},enableUploadForm:function(){this.isDisabled=!1,this.ui.submitBtn.removeClass("disabled"),this.ui.message.text("")},
updateUploadSetting:function(e,t){if(e){this.updateModel(e,t)&&(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(o.a.isEmpty(this.changes))return l.a.Deferred().resolve().promise()
;var e=this.collection.first().save(this.changes);return e.done(o.a.bind(function(){this.changes={}},this)),e},onErrorInputChange:function(e){p.a.prototype.onInputChange.apply(this,arguments),this.ui.manualPortMappingPort.prop("disabled",!this.ui.manualPortMappingMode.prop("checked"))},onSignInClick:function(e){e.preventDefault(),this.hideNavLinks?Object(u.a)("serverSettings",{serverID:this.model.id,group:"general"}):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",d.d),this.saveChanges().always(o.a.bind(this.reconnect,this))},onTotalRateChange:function(e){var t=e.currentTarget,n=parseFloat(t.value,10),i=o.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=h},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r=""
;return r+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+V(i(n(3)).call(e,"Connecting server...",{hash:{},data:t}))+" </h4> "}function l(e,t){var r;return r=i(n(25)).call(e,(r=e&&e.cloudAccount,null==r||!1===r?r:r.remoteAccessState),"disconnecting",{hash:{},inverse:F.program(6,u,t),fn:F.program(4,c,t),data:t}),r||0===r?r:""}function c(e,t){var r=""
;return r+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+V(i(n(3)).call(e,"Disconnecting server...",{hash:{},data:t}))+" </h4> "}function u(e,t){var n;return n=r.if.call(e,e&&e.isUnavailable,{hash:{},inverse:F.program(12,f,t),fn:F.program(7,d,t),data:t}),n||0===n?n:""}function d(e,t){var a,o="";return o+=' <h4 class="status-header text-danger">'+V(i(n(3)).call(e,"Not available outside your network",{hash:{},data:t}))+"</h4> ",
a=r.if.call(e,e&&e.isSignedOut,{hash:{},inverse:F.program(10,h,t),fn:F.program(8,p,t),data:t}),(a||0===a)&&(o+=a),o+=" "}function p(e,t){var r="";return r+=' <span class="status-description help-block">'+V(i(n(3)).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 h(e,t){var r="";return r+=' <span class="status-description help-block">'+V(i(n(3)).call(e,"Enable to access your server from anywhere.",{
hash:{},data:t}))+'</span> <button class="remote-access-enable-btn btn btn-sm btn-primary">'+V(i(n(3)).call(e,"Enable Remote Access",{hash:{},data:t}))+"</button> "}function f(e,t){var a,o="";return o+=" ",a=i(n(25)).call(e,(a=e&&e.cloudAccount,null==a||!1===a?a:a.remoteAccessState),"unreachable",{hash:{},inverse:F.program(19,b,t),fn:F.program(13,v,t),data:t}),(a||0===a)&&(o+=a),o+=' <button class="remote-access-disable-btn btn btn-sm btn-default">'+V(i(n(3)).call(e,"Disable Remote Access",{
hash:{},data:t}))+"</button> ",a=r.if.call(e,(a=e&&e.mappingModeSetting,null==a||!1===a?a:a.value),{hash:{},inverse:F.noop,fn:F.program(21,I,t),data:t}),(a||0===a)&&(o+=a),o+=" "}function v(e,t){var r,a="";return a+=' <h4 class="status-header text-danger">'+V(i(n(3)).call(e,"Not available outside your network",{hash:{},data:t
}))+'</h4> <span class="unreachable-description status-description help-block">'+V(i(n(3)).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> ",r=i(n(25)).call(e,(r=e&&e.cloudAccount,null==r||!1===r?r:r.mappingError),"jumboframes",{hash:{},inverse:F.program(16,m,t),fn:F.program(14,g,t),data:t}),
(r||0===r)&&(a+=r),a+=" "}function g(e,t){var r="";return r+=' <span class="jumbo-frames-description status-details help-block"> <span class="help-tip">'+V(i(n(3)).call(e,"Tip:",{hash:{},data:t}))+"</span> "+V(i(n(3)).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 m(e,t){var r
;return r=i(n(25)).call(e,(r=e&&e.cloudAccount,null==r||!1===r?r:r.mappingError),"doublenat",{hash:{},inverse:F.noop,fn:F.program(17,y,t),data:t}),r||0===r?r:""}function y(e,t){var r="";return r+=' <span class="double-nat-description status-details help-block"> <span class="help-tip">'+V(i(n(3)).call(e,"Tip:",{hash:{},data:t
}))+"</span> "+V(i(n(3)).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 r=""
;return r+=' <h4 class="status-header text-success">'+V(i(n(3)).call(e,"Fully accessible outside your network",{hash:{},data:t}))+'</h4> <span class="status-description help-block"> '+V(i(n(3)).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 I(e,t){var r=""
;return r+=' <p class="remote-access-disable-message help-block"> <i class="remote-access-disable-warning-icon glyphicon circle-exclamation-mark"></i> '+V(i(n(3)).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 S(e,t){var r,a="";return a+=" ",r=i(n(223)).call(e,(r=e&&e.cloudAccount,
null==r||!1===r?r:r.remoteAccessState),"disconnecting",{hash:{},inverse:F.noop,fn:F.program(24,M,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function M(e,t){var a,o="";return o+=' <div class="remote-access-advanced"> <div class="remote-access-mapping-container ',a=r.unless.call(e,e&&e.forceAdvanced,{hash:{},inverse:F.noop,fn:F.program(25,D,t),data:t}),(a||0===a)&&(o+=a),
o+='"> <hr> <i class="plex-image server server-xs server-logo"></i> <div class="remote-access-mapping"> <span class="mapping-label text-muted">'+V(i(n(3)).call(e,"Private",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',a=r.if.call(e,e&&e.hasPrivateAddress,{hash:{},inverse:F.program(29,O,t),fn:F.program(27,C,t),data:t}),(a||0===a)&&(o+=a),o+=" </span> ",a=r.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:F.program(33,P,t),fn:F.program(31,j,t),data:t}),(a||0===a)&&(o+=a),
o+=' <span class="mapping-label text-muted">'+V(i(n(3)).call(e,"Public",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',a=r.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:F.program(29,O,t),fn:F.program(35,w,t),data:t}),(a||0===a)&&(o+=a),o+=" </span> ",a=i(n(25)).call(e,(a=e&&e.cloudAccount,null==a||!1===a?a:a.remoteAccessState),"ok",{hash:{},inverse:F.program(33,P,t),fn:F.program(31,j,t),data:t}),(a||0===a)&&(o+=a),o+=' <span class="mapping-internet ',
a=i(n(223)).call(e,(a=e&&e.cloudAccount,null==a||!1===a?a:a.remoteAccessState),"ok",{hash:{},inverse:F.noop,fn:F.program(37,T,t),data:t}),(a||0===a)&&(o+=a),o+='"> <i class="mapping-internet-icon glyphicon globe text-muted"></i> '+V(i(n(3)).call(e,"Internet",{hash:{},data:t}))+" </span> </div> </div> ",a=r.if.call(e,e&&e.hasMappingSettings,{hash:{},inverse:F.noop,fn:F.program(39,E,t),data:t}),(a||0===a)&&(o+=a),o+=" </div> "}function D(e,t){return"advanced-setting"}function C(e,t){var r,a=""
;return a+=' <span class="mapping-value">'+V((r=e&&e.cloudAccount,r=null==r||!1===r?r:r.privateAddress,typeof r===Q?r.apply(e):r))+'</span> <span class="mapping-separator text-muted">'+V(i(n(3)).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+V((r=e&&e.cloudAccount,r=null==r||!1===r?r:r.privatePort,typeof r===Q?r.apply(e):r))+"</span> "}function O(e,t){var r="";return r+=' <span class="mapping-empty-value">'+V(i(n(3)).call(e,"Unknown IP",{hash:{},data:t}))+"</span> "}
function j(e,t){return' <i class="mapping-icon glyphicon left-arrow text-success"></i> '}function P(e,t){return' <i class="mapping-icon glyphicon remove-2 text-danger"></i> '}function w(e,t){var r,a="";return a+=' <span class="mapping-value">'+V((r=e&&e.cloudAccount,r=null==r||!1===r?r:r.publicAddress,typeof r===Q?r.apply(e):r))+'</span> <span class="mapping-separator text-muted">'+V(i(n(3)).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+V((r=e&&e.cloudAccount,
r=null==r||!1===r?r:r.publicPort,typeof r===Q?r.apply(e):r))+"</span> "}function T(e,t){return"unreachable"}function E(e,t){var a,o="";return o+=' <div class="remote-access-error-container ',a=r.unless.call(e,e&&e.forceAdvanced,{hash:{},inverse:F.noop,fn:F.program(25,D,t),data:t}),(a||0===a)&&(o+=a),o+='"> <div class="form-inline"> <div class="checkbox"> <label class="',a=r.if.call(e,e&&e.isUnavailable,{hash:{},inverse:F.noop,fn:F.program(40,x,t),data:t}),(a||0===a)&&(o+=a),
o+='"> <input type="checkbox" id="'+V((a=e&&e.mappingModeSetting,a=null==a||!1===a?a:a.id,typeof a===Q?a.apply(e):a))+'" name="'+V((a=e&&e.mappingModeSetting,a=null==a||!1===a?a:a.id,typeof a===Q?a.apply(e):a))+'" value="1" ',a=r.if.call(e,e&&e.isUnavailable,{hash:{},inverse:F.noop,fn:F.program(40,x,t),data:t}),(a||0===a)&&(o+=a),o+=" ",a=r.if.call(e,(a=e&&e.mappingModeSetting,null==a||!1===a?a:a.value),{hash:{},inverse:F.noop,fn:F.program(42,N,t),data:t}),(a||0===a)&&(o+=a),
o+="> "+V(i(n(3)).call(e,"Manually specify public port",{hash:{},data:t}))+' </label> </div> <div class="form-group"> <input type="text" id="'+V((a=e&&e.mappingPortSetting,a=null==a||!1===a?a:a.id,typeof a===Q?a.apply(e):a))+'" name="'+V((a=e&&e.mappingPortSetting,a=null==a||!1===a?a:a.id,typeof a===Q?a.apply(e):a))+'" class="form-control" value="'+V((a=e&&e.mappingPortSetting,a=null==a||!1===a?a:a.value,typeof a===Q?a.apply(e):a))+'" ',a=r.unless.call(e,e&&e.canEditPort,{hash:{},inverse:F.noop,
fn:F.program(40,x,t),data:t}),(a||0===a)&&(o+=a),o+='> </div> <button class="retry-btn btn btn-primary btn-loading" ',a=r.if.call(e,e&&e.isUnavailable,{hash:{},inverse:F.noop,fn:F.program(40,x,t),data:t}),(a||0===a)&&(o+=a),o+='> <div class="loading loading-sm"></div> <span class="btn-label">',a=i(n(25)).call(e,(a=e&&e.cloudAccount,null==a||!1===a?a:a.remoteAccessState),"unreachable",{hash:{},inverse:F.program(46,L,t),fn:F.program(44,A,t),data:t}),(a||0===a)&&(o+=a),
o+='</span> </button> </div> <p class="help-block">'+V(i(n(3)).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 x(e,t){return"disabled"}function N(e,t){return"checked"}function A(e,t){
return V(i(n(3)).call(e,"Retry",{hash:{},data:t}))}function L(e,t){return V(i(n(3)).call(e,"Apply",{hash:{},data:t}))}function k(e,t){var a,o="";return o+=' <div class="remote-access-upload-container ',a=r.unless.call(e,e&&e.totalRateSettingValue,{hash:{},inverse:F.noop,fn:F.program(49,_,t),data:t}),(a||0===a)&&(o+=a),
o+='"> <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">'+V(i(n(3)).call(e,"No upload speed set",{hash:{},data:t
}))+'</div> <div class="form-group"> <div class="form-inline"> <div class="form-group"> '+V(i(n(3)).call(e,"Internet upload speed",{hash:{},data:t}))+' <input type="text" id="'+V((a=e&&e.totalRateSettingID,typeof a===Q?a.apply(e):a))+'" name="'+V((a=e&&e.totalRateSettingID,typeof a===Q?a.apply(e):a))+'" class="remote-access-upload-speed-control form-control" value="',a=r.if.call(e,e&&e.totalRateSettingValue,{hash:{},inverse:F.noop,fn:F.program(51,R,t),data:t}),(a||0===a)&&(o+=a),
o+='" > '+V(i(n(3)).call(e,"Mbps",{hash:{},data:t}))+' </div> <p class="help-block"> '+V(i(n(3)).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> "+V(i(n(3)).call(e,"Enter an upload speed here and Plex can ensure it operates within this boundary.",{hash:{},data:t}))+" </p> </div> </div> ",a=r.each.call(e,e&&e.uploadSettings,{hash:{},inverse:F.noop,
fn:F.program(53,z,t),data:t}),(a||0===a)&&(o+=a),o+=' <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">'+V(i(n(3)).call(e,"Save Changes",{hash:{},data:t}))+'</span> </button> <span class="form-message"></span> </div> </form> </div> '}function _(e,t){return"show-warning"}function R(e,t){var n;return V((n=e&&e.totalRateSettingValue,typeof n===Q?n.apply(e):n))}
function z(e,t){var r="";return r+=" "+V(i(n(27)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var U,B="",V=this.escapeExpression,F=this,Q="function";return B+='<i class="remote-access-status-icon glyphicon globe"></i> <div class="remote-access-status-message"> ',U=i(n(25)).call(t,(U=t&&t.cloudAccount,null==U||!1===U?U:U.remoteAccessState),"connecting",{hash:{},inverse:F.program(3,l,o),fn:F.program(1,s,o),data:o}),
(U||0===U)&&(B+=U),B+=" </div> ",U=i(n(223)).call(t,(U=t&&t.cloudAccount,null==U||!1===U?U:U.remoteAccessState),"connecting",{hash:{},inverse:F.noop,fn:F.program(23,S,o),data:o}),(U||0===U)&&(B+=U),B+=" ",U=r.if.call(t,t&&t.hasUploadLimitSettings,{hash:{},inverse:F.noop,fn:F.program(48,k,o),data:o}),(U||0===U)&&(B+=U),B+=" "})},function(e,t,n){"use strict"
;var i=n(3479),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(32),u=n(109),d=n(330),p=n(687),h=n(882),f=n(3480),v=n(311),g=n(3494),m=v.a.extend({mixins:[d.a],className:"versions-container",template:r.a,ui:{message:".versions-status-message"},regions:{listRegion:".background-processing-list-region"},events:{"click .delete-all-btn":"onDeleteAllVersionsClick","click .status-conversion-btn":"onStatusConversionClick"},initialize:function(e){
this.pausedSetting=this.collection.get("BackgroundQueueIdlePaused"),this.playlists=new p.a([],{server:this.model,allowInCache:!0}),this.transcodeJobs=this.model.get("desktop").get("backgroundTranscodeJobs")},initialState:"loading",states:{loading:{nextState:"list",onEnter:function(){var e=this.model.supports("streamReady"),t=this.model.get("transcoderVideo");if(this.listRegion.show(new h.a({inline:!0})),!e||!t)return void this.enterState("error")
;var n=l.a.when(this.playlists.populate(),this.transcodeJobs.fetch());n=n.then(o.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 g.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(o.a.bind(function(){return this.generators.fetch()},this))},onStatusConversionClick:function(e){e.preventDefault(),Object(u.a)("conversion",{serverID:this.model.id})}});t.a=m},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var s="",l=this.escapeExpression;return s+='<p class="versions-status-message hidden"> <button class="delete-all-btn btn btn-sm btn-danger pull-right">'+l(i(n(3)).call(t,"Delete All Versions",{hash:{},data:o}))+"</button> "+l(i(n(3)).call(t,"Monitor conversion progress in {1}Conversion Activity{2}.",'<a class="status-conversion-btn" href="#">',"</a>",{hash:{},data:o}))+' </p> <div class="background-processing-list-region"></div> '})},function(e,t,n){"use strict"
;var i=n(12),r=n.n(i),a=n(5),o=n.n(a),s=n(805),l=n.n(s),c=n(63),u=n(3481),d=n(3492),p=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:o.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=r()(e.item).data("generator-id"),n=r()(e.item).prev().data("generator-id");this.collection.parent.moveItem(t,n)}});t.a=p},function(e,t,n){"use strict";var i=n(3482),r=n.n(i),a=n(20),o=n(4),s=n(17),l=n(630),c=n(3483),u=n(32),d=n(979),p=n(502),h=n(3484),f=a.a.ItemView.extend({className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:r.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");this.compositeImage=new d.a({model:this.model,width:l.a.getPosterWidth("movie",60),height:60,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?Object(o.default)("1 failed item"):Object(o.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(),s.a.trigger("show:modal",new h.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(),s.a.trigger("show:modal",new p.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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+='<a class="show-actions playlist-inner-item '+c((s=t&&t.type,
"function"==typeof s?s.apply(t):s))+'" 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> '+c(i(n(3)).call(t,"Complete",{
hash:{},data:o}))+' </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">'+c(i(n(3)).call(t,"Failed",{hash:{},data:o}))+'</span> </div> <div class="generator-status-container generator-status-converting"> <i class="generator-status-icon glyphicon restart"></i> '+c(i(n(3)).call(t,"Converting",{hash:{},data:o
}))+' </div> <div class="generator-status-container generator-status-pending"> <i class="generator-status-icon glyphicon clock"></i> '+c(i(n(3)).call(t,"Waiting",{hash:{},data:o}))+" </div> </div> </div> </div> </a> "})},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"
;var i=n(3485),r=n.n(i),a=n(5),o=n.n(a),s=n(4),l=n(1235),c=n(330),u=n(70),d=n(3486),p=u.a.extend({mixins:[c.a],name:"versionGeneratorMetadataModal",className:"version-generator-metadata-modal modal fade",template:r.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=o.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?Object(s.default)("{1} item",e):Object(s.default)("{1} items",e)}},".generator-total-size":{model:"status",modelAttribute:"totalSize",formatter:function(e){return e?Object(l.a)(e):Object(s.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){this.ui.body.prop("scrollHeight")-this.ui.body.innerHeight()-this.ui.body.scrollTop()<this.scrollThreshold&&this.listModel.get("populatedRange").end<this.listModel.get("totalSize")&&this.populatePage()}}});t.a=p
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s=""
;return s+='<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"> '+(0,
this.escapeExpression)(i(n(3)).call(t,"There was a problem loading these items.",{hash:{},data:o}))+" </span> </div> </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(63),r=n(3487),a=i.a.extend({tagName:"ul",className:"list version-generator-metadata-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(3488),r=n.n(i),a=n(20),o=n(4),s=n(399),l=n(3489),c=n(32),u=n(167),d=n(1248),p=a.a.Layout.extend({tagName:"li",
className:"striped-list-item version-generator-metadata-list-item",template:r.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 Object(s.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 Object(o.default)("File unavailable");case t.METADATA_ERROR:return Object(o.default)("Invalid metadata")
;case t.PROFILE_ERROR:return Object(o.default)("Invalid profile");case t.ANALYSIS_ERROR:return Object(o.default)("Unable to analyze")}return Object(o.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=p},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,o,s="",l=this.escapeExpression;return s+='<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">',(o=n.title)?a=o.call(t,{hash:{},data:r}):(o=t&&t.title,
a="function"==typeof o?o.call(t,{hash:{},data:r}):o),s+=l(a)+'</div> <div class="generator-metadata-episode-index generator-metadata-subtitle"></div> <div class="generator-metadata-year generator-metadata-subtitle">',(o=n.year)?a=o.call(t,{hash:{},data:r}):(o=t&&t.year,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),s+=l(a)+"</div> </div> "})},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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var s,l="",c=this.escapeExpression;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(3)).call(t,"Converting",{hash:{},data:o
}))+'</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(3)).call(t,"Complete",{
hash:{},data:o}))+' </div> <div class="conversion-status-container conversion-status-disabled"> <i class="conversion-status-icon glyphicon circle-exclamation-mark text-danger"></i> '+c(i(n(3)).call(t,"Deleted",{hash:{},data:o
}))+' <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((s=t&&t.initialErrorMessage,
"function"==typeof s?s.apply(t):s))+'</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(3)).call(t,"Waiting",{hash:{},data:o}))+"</span> </div> "})},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<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,n){"use strict";var i=n(3493),r=n.n(i),a=n(20),o=a.a.ItemView.extend({template:r.a});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression;return s+='<div class="row row-padded"> <h4 class="text-muted text-center"> <p>'+l(i(n(3)).call(t,'Choose "Optimize..." on items in your library and optimized versions will appear here.',{hash:{},data:o}))+"</p> <p>"+l(i(n(3)).call(t,"Monitor conversion progress in {1}Conversion Activity{2}.",'<a class="status-conversion-btn" href="#">',"</a>",{hash:{},data:o}))+"</p> </h4> </div> "})
},function(e,t,n){"use strict";var i=n(3495),r=n.n(i),a=n(20),o=n(192),s=a.a.ItemView.extend({template:r.a,serializeData:function(){return{isTranscoderRequired:!this.model.get("transcoderVideo"),isUpgradeRequired:!this.model.supports("streamReady"),minServerVersion:o.a.streamReady}}});t.a=s},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r=""
;return r+=" "+h(i(n(3)).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=r.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 r="";return r+=" "+h(i(n(3)).call(e,"This Plex Media Server platform is not capable of converting video.",{hash:{},data:t}))+" "}function u(e,t){var r=""
;return r+=" "+h(i(n(3)).call(e,"There was a problem requesting media versions from this server.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var d,p="",h=this.escapeExpression,f=this;return p+='<div class="row row-padded"> <h4 class="text-muted text-center"> ',d=r.if.call(t,t&&t.isUpgradeRequired,{hash:{},inverse:f.program(3,l,o),fn:f.program(1,s,o),data:o}),(d||0===d)&&(p+=d),p+=" </h4> </div> "})},function(e,t,n){"use strict"
;var i=n(3497),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(20),u=n(28),d=n(500),p=n(3498),h=n(3501),f=c.a.Layout.extend({template:r.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(Object(u.r)(u.f)),this.agentTypes.push(Object(u.r)(u.k)),this.agentTypes.push(Object(u.r)(u.b)),this.agentTypes.push(Object(u.r)(u.a)),this.agentTypes.push(Object(u.r)(u.g)),this.currentType=o.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}),this.agents.populate({reset:!0,scope:"page"}).done(o.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 h.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"})),l.a.when.apply(l.a,e).done(o.a.bind(this.onContributorsReset,this))},onAgentsReset:function(){if(this.agentsList.show(new p.a({
collection:this.agents})),this.agents.length){var e=this.agents.findWhere({selected:!0})||this.agents.first();this.selectAgent(e)}},onContributorsReset:function(){var e=o.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=Object(u.r)(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);i&&this.selectAgent(i)},onContributorsSave:function(e){this.currentAgent.url="system/agents/"+this.currentAgent.id+"/config/"+this.currentType.id,this.currentAgent.save({order:e}).done(o.a.bind(function(){this.additionalAgents.fetch({silent:!0}),this.contributors.fetch({silent:!0})},this))}});t.a=f
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t,r){var a,o="";return o+=' <li class="',a=i(n(25)).call(e,(a=r&&r.currentType,null==a||!1===a?a:a.id),e&&e.id,{hash:{},inverse:d.noop,fn:d.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+='"> <a class="btn-gray" data-type="'+h((a=e&&e.typeString,typeof a===p?a.apply(e):a))+'" href="#">'+h(i(n(3)).call(e,e&&e.plural,{hash:{},data:t}))+"</a> </li> "}
function l(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this,p="function",h=this.escapeExpression;return u+='<ul class="agent-types-nav nav nav-pills"> ',c=r.each.call(t,t&&t.agentTypes,{hash:{},inverse:d.noop,fn:d.programWithDepth(1,s,o,t),data:o}),(c||0===c)&&(u+=c),
u+=' </ul> <div class="agents-list-container"></div> <p class="help-block sortable-help-block">'+h(i(n(3)).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:o}))+'</p> <div class="contributors-list-container"></div> '})},function(e,t,n){"use strict";var i=n(63),r=n(3499),a=i.a.extend({tagName:"ul",className:"agents-nav nav nav-pills nav-pills-sm",itemView:r.a});t.a=a
},function(e,t,n){"use strict";var i=n(3500),r=n.n(i),a=n(20),o=a.a.ItemView.extend({tagName:"li",template:r.a,bindings:{a:{modelAttribute:"selected",manual:!0,formatter:function(e){this.$el.toggleClass("active",!!e)}}}});t.a=o},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,o,s="",l=this.escapeExpression;return s+='<a class="btn-gray" data-identifier="',(o=n.identifier)?a=o.call(t,{
hash:{},data:r}):(o=t&&t.identifier,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),s+=l(a)+'" href="#">',(o=n.name)?a=o.call(t,{hash:{},data:r}):(o=t&&t.name,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),s+=l(a)+"</a> "})},function(e,t,n){"use strict";var i=n(805),r=n.n(i),a=n(63),o=n(3502),s=a.a.extend({tagName:"ul",className:"list contributor-list",itemView:o.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 r.a(this.$el[0],{draggable:".card-sortable",animation:200})},onClose:function(){this.sortable.destroy()}});t.a=s},function(e,t,n){"use strict";var i=n(3503),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(17),c=n(245),u=n(574),d=n(3504),p=s.a.ItemView.extend({tagName:"li",className:"card card-sortable",template:r.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(o.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=p},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"checked"}function l(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var c,u="",d=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="'+d((c=t&&t.identifier,"function"==typeof c?c.apply(t):c))+'"> <input id="'+d((c=t&&t.identifier,
"function"==typeof c?c.apply(t):c))+'" name="'+d((c=t&&t.identifier,"function"==typeof c?c.apply(t):c))+'" type="checkbox" ',c=r.if.call(t,t&&t.enabled,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+=" ",c=r.if.call(t,t&&t.isPrimary,{hash:{},inverse:p.noop,fn:p.program(3,l,o),data:o}),(c||0===c)&&(u+=c),u+="> "+d(i(n(3)).call(t,t&&t.name,{hash:{},data:o}))+" </label> "})},function(e,t,n){"use strict";var i=n(3505),r=n.n(i),a=n(70),o=n(333),s=a.a.extend({
name:"agentInfoModal",className:"agent-info-modal modal fade",template:r.a,regions:{icon:".agent-icon-container"},serializeData:function(){return{agent:this.model.toJSON(),attribution:this.model.get("attribution").get("content")}},onRender:function(){a.a.prototype.onRender.apply(this,arguments),this.icon.show(new o.a({model:this.model,url:"/system/agents/attribution/image?identifier="+this.model.id,className:"agent-icon",width:100,height:100}))}});t.a=s},function(e,t,n){var i=n(14)
;e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,o,s="";return s+='<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> '+(0,this.escapeExpression)((a=t&&t.agent,a=null==a||!1===a?a:a.name,
"function"==typeof a?a.apply(t):a))+' </h4> </div> <div class="modal-body"> <p class="agent-icon-container"></p> <p>',(o=n.attribution)?a=o.call(t,{hash:{},data:r}):(o=t&&t.attribution,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),(a||0===a)&&(s+=a),s+="</p> </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(311),o=a.a.extend({prefix:"channel.",serializeData:function(){
var e=a.a.prototype.serializeData.apply(this,arguments),t=this.options.channelSettings.toJSON();return r.a.each(t,function(e){e.id=this.prefix+e.id},this),e.unshift.apply(e,t),e},updateModel:function(e,t){var n=a.a.prototype.updateModel.apply(this,arguments);if(n)return n;var i=e.replace(this.prefix,""),r=this.options.channelSettings.get(i);return r?r.set("value",t):void 0}});t.a=o},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(4),o=n(426),s=n(311),l=s.a.extend({prefix:"account.",
serializeData:function(){var e=this.options.account,t=[],n=r.a.map(o.b,function(e,t){return{value:t,label:e}});return t.push({id:this.prefix+"autoSelectAudio",label:Object(a.default)("Automatically select audio and subtitle tracks"),summary:Object(a.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:Object(a.default)("Prefer audio tracks in"),default:"en",value:e.get("defaultAudioLanguage"),type:"text",group:"account.language",advanced:!1,hidden:!1,enumValues:n}),t.push({id:this.prefix+"subtitleMode",label:Object(a.default)("Subtitle mode"),default:1,value:parseInt(e.get("subtitleMode"),10),type:"int",group:"account.language",advanced:!1,hidden:!1,enumValues:[{value:0,label:Object(a.default)("Manually selected")},{value:1,label:Object(a.default)("Shown with foreign audio")},{value:2,
label:Object(a.default)("Always enabled")}]}),t.push({id:this.prefix+"defaultSubtitleLanguage",label:Object(a.default)("Prefer subtitles in"),default:"en",value:e.get("defaultSubtitleLanguage"),type:"text",group:"account.language",advanced:!1,hidden:!1,enumValues:n}),t},updateModel:function(e,t){var n=s.a.prototype.updateModel.apply(this,arguments);if(n)return n;var i=e.replace(this.prefix,""),r=this.options.account;return r.has(i)?r.set(i,t):void 0}});t.a=l},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(3509),o=n.n(a),s=n(20),l=n(0),c=(n.n(l),n(84)),u=n.n(c),d=n(11),p=n(15),h=n(3510),f=r()(h.a,{}),v=s.a.ItemView.extend({className:"livetv-epg-settings",template:o.a,mountReact:function(){var e=Object(p.d)("appStore");u.a.render(r()(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=v},function(e,t){e.exports=function(){return""}},function(e,t,n){"use strict";function i(){return Object(f.createSelector)(function(e){return e.primaryServer},function(e){return{serverEntityID:e}})}var r=n(8),a=n.n(r),o=n(9),s=n.n(o),l=n(10),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(11),f=n(6),v=(n.n(f),n(1233)),g=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.render=function(){
return this.props.serverEntityID?p.a.createElement(v.a,this.props):null},t}(d.Component);t.a=Object(h.b)(i)(g)},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"hidden"}function l(e,t){var a,o="";return o+=' <div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> <li> <a class="home-card card btn-gray ',a=i(n(25)).call(e,e&&e.subset,"home",{hash:{},inverse:h.noop,fn:h.program(4,c,t),
data:t}),(a||0===a)&&(o+=a),o+='" href="#!/settings/users/home"> <span class="badge"></span> '+f(i(n(3)).call(e,"My Home",{hash:{},data:t}))+" </a> </li> ",a=r.if.call(e,e&&e.showFriends,{hash:{},inverse:h.noop,fn:h.program(6,u,t),data:t}),(a||0===a)&&(o+=a),o+=" </ul> </div> "}function c(e,t){return"selected"}function u(e,t){var r,a="";return a+=' <li> <a class="friends-card card btn-gray ',r=i(n(25)).call(e,e&&e.subset,"friends",{hash:{},inverse:h.noop,fn:h.program(4,c,t),data:t}),
(r||0===r)&&(a+=r),a+='" href="#!/settings/users/friends"> <span class="badge"></span> '+f(i(n(3)).call(e,"Friends",{hash:{},data:t}))+" </a> </li> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var d,p="",h=this,f=this.escapeExpression;return p+='<div class="filter-bar"> <div class="filter-bar-right"> <span class="user-actions ',d=r.unless.call(t,t&&t.showUserActions,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),(d||0===d)&&(p+=d),
p+='"> <button class="add-user-btn btn btn-sm btn-default">'+f(i(n(3)).call(t,"Add User",{hash:{},data:o}))+'</button> <button class="enable-guest-btn btn btn-sm btn-default ',d=r.unless.call(t,t&&t.showEnableGuest,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),(d||0===d)&&(p+=d),p+='">'+f(i(n(3)).call(t,"Enable Guest",{hash:{},data:o}))+'</button> <button class="disable-guest-btn btn btn-sm btn-danger ',d=r.unless.call(t,t&&t.showDisableGuest,{hash:{},inverse:h.noop,fn:h.program(1,s,o),
data:o}),(d||0===d)&&(p+=d),p+='">'+f(i(n(3)).call(t,"Disable Guest",{hash:{},data:o}))+'</button> </span> <button class="leave-home-btn btn btn-sm btn-danger ',d=r.unless.call(t,t&&t.showLeaveHome,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),(d||0===d)&&(p+=d),p+='">'+f(i(n(3)).call(t,"Leave Home",{hash:{},data:o}))+'</button> <button class="invite-friend-btn btn btn-sm btn-default">'+f(i(n(3)).call(t,"Invite Friend",{hash:{},data:o
}))+'</button> </div> </div> <div class="users-row row"> ',d=r.if.call(t,t&&t.showNavLinks,{hash:{},inverse:h.noop,fn:h.program(3,l,o),data:o}),(d||0===d)&&(p+=d),p+=" </div> "})},function(e,t,n){"use strict";var i=n(3513),r=n.n(i),a=n(15),o=n(1251),s=n(1252),l=n(3523),c=o.a.extend({template:r.a,initialize:function(e){var t=a.d("appModel"),n=t.get("user");this.collection=n.get("homeUsers"),this.invites=n.get("desktop").get("invites").filterByHome(),
this.sentInvites=n.get("desktop").get("sentInvites").filterByHome(),this.signedInHomeUser=this.collection.get(n.id),this.itemViewOptions={isAdmin:!(!this.signedInHomeUser||!this.signedInHomeUser.get("admin"))},this.hideNavLinks=e.hideNavLinks,this.addListeners()},addListeners:function(){o.a.prototype.addListeners.apply(this,arguments),this.signedInHomeUser&&this.listenTo(this.signedInHomeUser,"change:admin",this.onAdminChange)},onRender:function(){this.setContainerClass(),
this.friendList.show(new l.a({collection:this.collection,itemViewOptions:this.itemViewOptions})),this.inviteList.show(new s.a({collection:this.invites})),this.pendingList.show(new s.a({collection:this.sentInvites})),this.updateHeaders()},onAdminChange:function(e,t){this.friendList.currentView&&(this.itemViewOptions.isAdmin=t)}});t.a=c},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression;return s+='<h3 class="invite-list-header top">'+l(i(n(3)).call(t,"Invites",{hash:{},data:o}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+l(i(n(3)).call(t,"My Home",{hash:{},data:o}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+l(i(n(3)).call(t,"Pending",{hash:{},data:o
}))+'</h3> <div class="pending-list-container"></div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression;return s+='<h3 class="invite-list-header top">'+l(i(n(3)).call(t,"Invites",{hash:{},data:o
}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+l(i(n(3)).call(t,"Friends",{hash:{},data:o}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+l(i(n(3)).call(t,"Pending",{hash:{},data:o}))+'</h3> <div class="pending-list-container"></div> </div> '})},function(e,t,n){"use strict";var i=n(3516),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(4),c=n(478),u=n(295),d=n(32),p=n(247),h=s.a.ItemView.extend({tagName:"li",
className:"card-tile-list-item card-2-col-item",template:r.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 p.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?Object(l.default)("invite sent {1}",Object(u.a)(t)):Object(l.default)("invite sent to {1}",this.model.get("email"))}var n=this.model.get("friend"),i=this.model.get("server"),r=this.model.get("home");if(i){var a=o.a.reduce(e,function(e,t){return e+=t.numLibraries},0),s=Object(c.a)(Object(l.default)("library"),a,Object(l.default)("libraries"))
;return r?Object(l.default)("wants you to join their home and share {1} {2} with you",a,s):n?Object(l.default)("wants to be friends and share {1} {2} with you",a,s):Object(l.default)("wants to share {1} {2} with you",a,s)}return r?Object(l.default)("wants you to join their home"):Object(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=h},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(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),r=r||{};var o,s="",l=this
;return s+='<div class="card card-user"> <div class="card-poster media-poster img-circle"></div> <div class="card-actions"> ',o=n.if.call(t,t&&t.showAccept,{hash:{},inverse:l.noop,fn:l.program(1,a,r),data:r}),(o||0===o)&&(s+=o),s+=' <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){"use strict"
;var i=n(63),r=n(3518),a=n(3521),o=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:r.a,emptyView:a.a,sorted:!0});t.a=o},function(e,t,n){"use strict";var i=n(3519),r=n.n(i),a=n(20),o=n(17),s=n(32),l=n(247),c=n(1253),u=n(364),d=a.a.Layout.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:r.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(),o.a.trigger("show:modal",new u.a({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),s.a.execute("removeFriend",{friend:this.model})}})
;t.a=d},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},
'<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 r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(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 '+m((n=e&&e.shared,n=null==n||!1===n?n:n.status,typeof n===y?n.apply(e):n))+" ",n=r.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=r.if.call(e,(n=e&&e.shared,null==n||!1===n?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 r,a="";return a+=" "+m(i(n(3)).call(e,"shares {1} {2} with you",(r=e&&e.shared,null==r||!1===r?r:r.numLibraries),(r=e&&e.shared,null==r||!1===r?r:r.libraryLabel),{hash:{},data:t}))+" "}function u(e,t){var r,a="";return a+=" "+m(i(n(3)).call(e,"wants to share {1} {2} with you",(r=e&&e.shared,null==r||!1===r?r:r.numLibraries),(r=e&&e.shared,null==r||!1===r?r:r.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 '+m((n=e&&e.owned,n=null==n||!1===n?n:n.status,typeof n===y?n.apply(e):n))+" ",n=r.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=r.if.call(e,(n=e&&e.owned,null==n||!1===n?n:n.hasActiveShare),{hash:{},inverse:b.program(11,h,t),fn:b.program(9,p,t),data:t}),(n||0===n)&&(i+=n),i+=" </p> "}function p(e,t){
var r,a="";return a+=" "+m(i(n(3)).call(e,"sharing {1} {2} with this {3}",(r=e&&e.owned,null==r||!1===r?r:r.numLibraries),(r=e&&e.owned,null==r||!1===r?r:r.libraryLabel),(r=e&&e.owned,null==r||!1===r?r:r.friendLabel),{hash:{},data:t}))+" "}function h(e,t){var r,a="";return a+=" "+m(i(n(3)).call(e,"invited to share {1} {2}",(r=e&&e.owned,null==r||!1===r?r:r.numLibraries),(r=e&&e.owned,null==r||!1===r?r:r.libraryLabel),{hash:{},data:t}))+" "}function f(e,t){var r=""
;return r+=' <p class="user-summary server-share-empty-message">'+m(i(n(3)).call(e,"no shared libraries",{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var v,g="",m=this.escapeExpression,y="function",b=this;return v=r.if.call(t,(v=t&&t.shared,null==v||!1===v?v:v.numLibraries),{hash:{},inverse:b.noop,fn:b.program(1,s,o),data:o}),(v||0===v)&&(g+=v),g+=" ",v=r.if.call(t,(v=t&&t.owned,null==v||!1===v?v:v.numLibraries),{hash:{},inverse:b.noop,
fn:b.program(8,d,o),data:o}),(v||0===v)&&(g+=v),g+=" ",v=r.if.call(t,t&&t.showEmptyMessage,{hash:{},inverse:b.noop,fn:b.program(13,f,o),data:o}),(v||0===v)&&(g+=v),g+=" "})},function(e,t,n){"use strict";var i=n(3522),r=n.n(i),a=n(20),o=a.a.ItemView.extend({template:r.a});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s=""
;return s+='<h4 class="text-muted text-center">'+(0,this.escapeExpression)(i(n(3)).call(t,"No friends yet. {1}Invite a friend{2} and share your libraries.",'<a class="invite-friend-btn" href="#">',"</a>",{hash:{},data:o}))+"</h4> "})},function(e,t,n){"use strict";var i=n(63),r=n(1254),a=n(3525),o=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:r.a,emptyView:a.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=o},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return'<div class="selected-user-icon"></div>'}
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var o,s="",l=this;return s+='<div class="card card-user card-friend card-home-user"> ',o=n.if.call(t,t&&t.isSignedInUser,{hash:{},inverse:l.noop,fn:l.program(1,a,r),data:r}),(o||0===o)&&(s+=o),
s+=' <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){"use strict";var i=n(3526),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(15),c=n(52),u=n(1254),d=s.a.Layout.extend({template:r.a,regions:{card:".centered-home-user-container"},initialize:function(e){this.itemViewOptions=e},serializeData:function(){var e=l.d("appModel"),t=e.get("user");return{hasHomeFeature:!!t.get("features").get(c.d),plexPassUrl:t.server.get("plexPassUrl")}},onRender:function(){var e=l.d("appModel"),t=e.get("user"),n=t.get("homeUsers")
;n.length&&this.card.show(new u.a(o.a.extend({},this.itemViewOptions,{model:n.first()})))}});t.a=d},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=' <h4 class="text-muted text-center">'+d(i(n(3)).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 r,a=""
;return a+=' <h4 class="text-muted text-center">'+d(i(n(3)).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((r=e&&e.plexPassUrl,typeof r===p?r.apply(e):r))+'" target="_blank">'+d(i(n(3)).call(e,"Learn More",{hash:{},data:t}))+"</a> </p> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this.escapeExpression,p="function",h=this
;return c=r.if.call(t,t&&t.hasHomeFeature,{hash:{},inverse:h.program(3,l,o),fn:h.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+=' <ul class="list centered-home-user-container"></ul> '})},function(e,t,n){"use strict";function i(e,t,n){var i=e.find(function(e){return e.key===t});return i?i.groups.find(function(e){return e.key===n}):null}var r=n(11),a=n(6),o=(n.n(a),n(1237)),s=n(3528),l=Object(a.createSelector)(function(e,t){return t.settingsSection},function(e,t){return t.settingsGroup
},Object(o.a)(),function(e,t,n){var r=i(n,e,t);return{isSettingAccessible:!!r,SettingsPane:r&&r.paneComponent}});t.a=Object(r.b)(l)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.isSettingAccessible,i=e.settingsSection,r=e.settingsGroup,o=e.SettingsPane,l=e.contentView,u=c()(e,["serverEntityID","isSettingAccessible","settingsSection","settingsGroup","SettingsPane","contentView"]);return n?d.a.createElement(y.a,Object(h.a)(i,r),s()(m.a,{serverEntityID:t,
settingsSection:i,settingsGroup:r}),o?s()(o,{serverEntityID:t}):s()(v.a,{view:l||b.a,viewOptions:a()({},u,{hideNavLinks:!0})})):s()(g.a,{title:Object(f.default)("You're not supposed to be here"),description:Object(f.default)("This page doesn't exist")})}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(0),d=n.n(u),p=n(1),h=(n.n(p),n(3529)),f=n(4),v=n(577),g=n(126),m=n(3530),y=n(207),b=n(1244);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=a.a.findWhere(o.a,{key:e
}),i=a.a.findWhere(n.groups,{key:t});return i.metricsPage?{metricsPage:i.metricsPage,metricsPane:i.metricsPane}:{metricsPage:n.metricsPage,metricsPane:n.metricsPanePrefix+i.key}}t.a=i;var r=n(5),a=n.n(r),o=n(576)},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(function(e,t){return t.settingsSection},function(e,t){return t.settingsGroup},function(e,t){var n=o.a.findWhere(u.a,{key:e});return o.a.findWhere(n.groups,{key:t}).title()})}function r(){
return Object(l.createSelector)(Object(c.a)(),i(),function(e,t){return{friendlyName:e?e.friendlyName:"",settingsTitle:t}})}var a=n(5),o=n.n(a),s=n(11),l=n(6),c=(n.n(l),n(42)),u=n(576),d=n(3531);t.a=Object(s.b)(r)(d.a)},function(e,t,n){"use strict";function i(e){var t=e.friendlyName,n=e.settingsTitle;return a()(l.a,{},void 0,t,u,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(208)),c=n(86),u=a()(c.a,{});t.a=i},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(126),u=n(0),d=(n.n(u),n(56)),p=n(1250),h=n(66),f=n(207),v=n(208),g=n(577),m=n(237),y=d.a.extend({component:function(e){var t=e.userSettingsSubset,n=e.usersError,i=l()(e,["userSettingsSubset","usersError"]);return o()(h.a,{},void 0,o()(m.a,{selectedKey:"users--"+t.key}),n&&o()(c.a,{title:t.errorTitle()}),!n&&o()(f.a,{metricsPage:t.metricsPage},void 0,o()(v.a,{},void 0,t.title()),o()(g.a,{view:p.a,viewOptions:r()({},i,{usersSubset:t.key,
hideNavLinks:!0})})))}});t.a=y},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(2),o=n.n(a),s=n(13),l=n.n(s),c=n(0),u=(n.n(c),n(4)),d=n(35),p=n(17),h=n(56),f=n(1241),v=n(66),g=n(86),m=n(207),y=n(208),b=n(577),I=n(237),S=o()(g.a,{}),M=h.a.extend({initialize:function(){this.listenTo(p.a,"change:language",this.render)},component:function(e){var t=e.webSettingsSubset,n=t.key,i=t.title,a=l()(e,["webSettingsSubset"]);return o()(v.a,{},void 0,o()(I.a,{selectedKey:"web-client--settings--"+n
}),o()(m.a,{metricsPage:d.W,metricsPane:"web:"+n},void 0,o()(y.a,{},void 0,Object(u.default)("Web Client"),S,i()),o()(b.a,{view:f.a,viewOptions:r()({},a,{settingsGroup:n,hideNavLinks:!0})})))}});t.a=M},function(e,t,n){"use strict";var i=n(248),r=n(3535),a=i.a.extend({controller:new r.a,appRoutes:{"!/settings/server/:serverID/status/alerts":"alerts","!/settings/server/:serverID/status/sync(/:deviceID)":"sync","!/settings/server/:serverID/status/conversion":"conversion",
"!/settings/server/:serverID/status/now-playing":"nowPlaying","!/activity":"activity","!/activity/alerts(/:serverID)":"legacyAlerts","!/activity/sync(/:serverID)(/:deviceID)":"legacySync","!/activity/conversion(/:serverID)":"legacyConversion","!/activity/playing(/:serverID)":"legacyNowPlaying","!/status":"activity","!/status/alerts(/:serverID)":"legacyAlerts","!/status/sync(/:serverID)(/:deviceID)":"legacySync","!/status/conversion(/:serverID)":"legacyConversion",
"!/status/playing(/:serverID)":"legacyNowPlaying"}});t.a=a},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(15),u=n(4),d=n(17),p=n(52),h=n(249),f=n(172),v=n(1256),g=n(687),m=n(3537),y=n(1257),b=n(1260),I=n(1262),S=n(1258),M=n(1255),D=n(383),C=h.a.extend({activity:function(){this.populateView({primaryServer:!0}).done(o.a.bind(function(e){var t=e.server
;t.get("shared")?this.sync(t.id):this.findHasTypeFirstSettings()?this.alerts(t.id):d.a.trigger("show:view",new m.a({model:t,collection:t.get("desktop").get("alerts"),subset:"alerts"}))},this))},alerts:function(e){this.showAlertsView({serverID:e})},legacyAlerts:function(e){var t=this.getLegacyPopulateOptions(e);this.showAlertsView(t)},showAlertsView:function(e){var t=this;this.populateView(e).done(function(e){var n=e.server,i={model:n,collection:n.get("desktop").get("alerts"),subset:"alerts"}
;t.findHasTypeFirstSettings()?d.a.trigger("show:view",new M.a(r()({},i,{machineIdentifier:n.id,settingsSection:"status",settingsGroup:"alerts",contentView:y.a}))):d.a.trigger("show:view",new m.a(i))})},sync:function(e,t){this.showSyncView({serverID:e},t)},legacySync:function(e,t){var n=this.getLegacyPopulateOptions(e);this.showSyncView(n,t)},showSyncView:function(e,t){var n=this,i=this.populateView({serverID:f.a});i=i.then(function(){return n.populateView(e)}),i.done(function(e){
var i=c.d("appModel"),a=i.get("user"),o=a.get("desktop").get("devices"),s=e.server,l=n.findHasTypeFirstSettings(),p={machineIdentifier:s.id,settingsSection:"status",settingsGroup:"sync",contentView:S.a},h=o.populate();h.done(function(){var e=o.filterSyncDevices(),n=t?e.get(t):null,i={model:s,collection:e,selectedDevice:n,subset:"sync"};l?d.a.trigger("show:view",new M.a(r()({},i,p))):d.a.trigger("show:view",new m.a(i))}),h.fail(function(){l?d.a.trigger("show:view",new M.a(r()({},p,{hasError:!0,
errorMessage:Object(u.default)("Sync status is unavailable.")}))):d.a.trigger("show:view",new D.a({title:Object(u.default)("Sync status is unavailable.")}))})})},conversion:function(e){this.showConversionView({serverID:e})},legacyConversion:function(e){var t=this.getLegacyPopulateOptions(e);this.showConversionView(t)},showConversionView:function(e){var t=this;this.populateView(e).done(function(e){var n=e.server,i=new v.a([],{server:n,allowInCache:!0
}),a=n.get("desktop").get("backgroundTranscodeJobs"),o=new g.a([],{server:n,allowInCache:!0}),s=void 0,c=void 0,p=l.a.when(i.populate(),a.fetch(),n.get("desktop").get("settings").fetch(),o.populate()).then(function(){s=i.first();var e=o.first();return s&&e?(c=e.get("children"),l.a.when(s.fetch(),c.fetch())):l.a.Deferred().reject().promise()}),h=t.findHasTypeFirstSettings(),f={machineIdentifier:n.id,settingsSection:"status",settingsGroup:"conversion",contentView:b.a};p.done(function(){var e={
model:n,playQueue:s,transcodeJobs:a,generators:c,subset:"conversion"};h?d.a.trigger("show:view",new M.a(r()({},e,f))):d.a.trigger("show:view",new m.a(e))}),p.fail(function(){h?d.a.trigger("show:view",new M.a(r()({},f,{hasError:!0,errorMessage:Object(u.default)("The conversion queue is unavailable.")}))):d.a.trigger("show:view",new D.a({title:Object(u.default)("The conversion queue is unavailable.")}))})})},nowPlaying:function(e){this.showNowPlayingView({serverID:e})},
legacyNowPlaying:function(e){var t=this.getLegacyPopulateOptions(e);this.showNowPlayingView(t)},showNowPlayingView:function(e){var t=this;this.populateView(e).done(function(e){var n=e.server,i={model:n,collection:n.get("desktop").get("sessions"),subset:"now-playing"};t.findHasTypeFirstSettings()?d.a.trigger("show:view",new M.a(r()({},i,{machineIdentifier:n.id,settingsSection:"status",settingsGroup:"now-playing",contentView:I.a}))):d.a.trigger("show:view",new m.a(i))})},
getLegacyPopulateOptions:function(e){return e?{serverID:e}:{primaryServer:!0}},findHasTypeFirstSettings:function(){return c.d("appModel").get("user").get("features").get(p.i)}});t.a=C},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(17),l=n(67),c=n(19),u=n(117),d=n(658),p=u.a.extend({idAttribute:"playQueueID",
whitelistedAttrs:["playQueueID","playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID","playQueueLastAddedItemID","playQueueShuffled","playQueueSourceURI","playQueueTotalCount","playQueueVersion","message"],defaults:{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)},_fetch:function(){var e=r.a.result(this,"url");return this._ajax("GET",e)},convert:function(e){var t=r.a.isObject(e)?e:l.a.parseXML(e);return l.a.parseBoolean(t,"playQueueShuffled"),l.a.parseInteger(t,["playQueueSelectedItemOffset","playQueueTotalCount","playQueueVersion"]),l.a.parseArray(t,"Metadata"),t},parse:function(e,t){r.a.isString(e)&&(e=l.a.replaceXMLElementNames(e,this.metadataElementNames,"Metadata"));var n=this.convert(e)
;n.id&&(n.playQueueID=n.id);var i=r.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,a=r.a.pluck(n,"playQueueItemID").indexOf(e.playQueueSelectedItemID),o=e.playQueueSelectedItemOffset,s=o-a;r.a.each(n,function(t,n){t.queueIndex=s+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:s,end:s+t.length}},moveItem:function(e,t){if(e===this.get("playQueueSelectedItemID"))return o.a.Deferred().resolve().promise();this.set("hasUserAdditions",!0);var n={after:t||-1},i=c.join([r.a.result(this,"url"),"/items/",e,"/move"],n);return this._ajax("PUT",i)},
getUpNextRange:function(){var e=this.get("collection"),t=e.get(this.get("playQueueSelectedItemID")),n=e.indexOf(t),i=Math.max(n,0),r=i,a=this.get("playQueueLastAddedItemID");if(null!=a){var o=e.get(a),s=e.indexOf(o);s>i&&(r=s)}return{start:i,end:r}},getCurrentItem:function(){var e=this.get("playQueueSelectedItemID");return this.get("collection").findWhere({playQueueItemID:e})||null},_ajax:function(e,t){var n=r.a.extend(this.server.getXHROptions(t),{type:e}),i=o.a.ajax(n)
;return i.done(r.a.bind(function(e){this.set(this.parse(e)),r.a.isEmpty(this.pendingChanges)||(r.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&&s.a.trigger("show:alert",{type:"error",message:t})}});t.a=p},function(e,t,n){"use strict"
;var i=n(3538),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(15),c=n(203),u=n(1257),d=n(1258),p=n(1260),h=n(1262),f={alerts:u.a,sync:d.a,conversion:p.a,"now-playing":h.a},v=s.a.Layout.extend({className:"container",template:r.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",(0,Object(l.d)("appStore").dispatch)(Object(c.a)({allowLightPreset:!1}));var t=this.model.get("desktop").get("backgroundTranscodeJobs");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};o.a.each(o.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()}});t.a=v},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};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(25)).call(t,t&&t.subset,"alerts",{hash:{},inverse:u.noop,fn:u.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+='" href="#!/status/alerts">'+d(i(n(3)).call(t,"Alerts",{hash:{},data:o
}))+'</a></li> <li class="sync-nav-item"><a class="sync-btn btn-gray ',l=i(n(25)).call(t,t&&t.subset,"sync",{hash:{},inverse:u.noop,fn:u.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+='" href="#!/status/sync">'+d(i(n(3)).call(t,"Sync",{hash:{},data:o}))+'</a></li> <li class="conversion-nav-item"><a class="conversion-btn btn-gray ',l=i(n(25)).call(t,t&&t.subset,"conversion",{hash:{},inverse:u.noop,fn:u.program(1,s,o),data:o}),(l||0===l)&&(c+=l),
c+='" href="#!/status/conversion">'+d(i(n(3)).call(t,"Conversion",{hash:{},data:o}))+'<span class="badge"></span></a></li> <li class="now-playing-nav-item"><a class="now-playing-btn btn-gray ',l=i(n(25)).call(t,t&&t.subset,"now-playing",{hash:{},inverse:u.noop,fn:u.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+='" href="#!/status/playing">'+d(i(n(3)).call(t,"Now Playing",{hash:{},data:o}))+'<span class="badge"></span></a></li> </ul> <h2>'+d(i(n(3)).call(t,"Status",{hash:{},data:o
}))+'</h2> <div class="activity-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+='<span class="page-count">'+f(i(n(3)).call(e,"Page {1} of {2}",e&&e.page,e&&e.pages,{hash:{},data:t}))+"</span>"}function l(e,t){var n,i="";return i+=' <div class="filter-bar-right"> ',n=r.if.call(e,e&&e.showNavLinks,{hash:{},inverse:v.noop,fn:v.program(1,s,t),data:t}),
(n||0===n)&&(i+=n),i+=' <a class="previous-btn btn-gray ',n=r.unless.call(e,e&&e.enablePrevious,{hash:{},inverse:v.noop,fn:v.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+='" href="#"> <i class="glyphicon chevron-left"></i> </a> <a class="next-btn btn-gray ',n=r.unless.call(e,e&&e.enableNext,{hash:{},inverse:v.noop,fn:v.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+='" href="#"> <i class="glyphicon chevron-right"></i> </a> </div> '}function c(e,t){return"disabled"}function u(e,t){var r=""
;return r+=' <div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h4 class="text-muted text-center">'+f(i(n(3)).call(e,"Alerts are restricted from shared users.",{hash:{},data:t}))+"</h4> </div> </div> "}function d(e,t){return' <div class="alert-list-container"></div> '}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var p,h="",f=this.escapeExpression,v=this;return h+='<div class="filter-bar"> ',p=r.unless.call(t,t&&t.showNavLinks,{hash:{},inverse:v.noop,
fn:v.program(1,s,o),data:o}),(p||0===p)&&(h+=p),h+=" ",p=r.unless.call(t,t&&t.shared,{hash:{},inverse:v.noop,fn:v.program(3,l,o),data:o}),(p||0===p)&&(h+=p),h+=" </div> ",p=r.if.call(t,t&&t.shared,{hash:{},inverse:v.program(8,d,o),fn:v.program(6,u,o),data:o}),(p||0===p)&&(h+=p),h+=" "})},function(e,t,n){"use strict";var i=n(63),r=n(3541),a=i.a.extend({tagName:"ul",className:"list card-list alert-list",itemView:r.a,reversed:!0});t.a=a},function(e,t,n){"use strict"
;var i=n(3542),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(15),c=n(4),u=s.a.ItemView.extend({tagName:"li",className:"card-collapsed striped-list-item alert-list-item",template:r.a,serializeData:function(){var e=Object(l.d)("appModel"),t=this.model.toJSON(),n={serverID:this.model.server.id,serverName:o.a.escape(this.model.server.get("friendlyName")),itemKey:"/library/metadata/"+this.model.get("itemID"),event:t,timeFormat:e.get("experienceSettings").get("timeFormat")};if(t.label=o.a.escape(t.label),
t.value=o.a.escape(t.value),"playing"===t._type&&(t.username=o.a.escape(t.username),t.title=o.a.escape(t.title),t.player=o.a.escape(t.player)),"timeline"===t._type)switch(t.mediaTitle=this.model.get("title")||"an item",this.model.get("state")){case 0:t.stateString=Object(c.default)("Created");break;case 1:t.stateString=Object(c.default)("Progress for");break;case 2:t.stateString=Object(c.default)("Matching");break;case 3:t.stateString=Object(c.default)("Downloading metadata for");break;case 4:
t.stateString=Object(c.default)("Loading metadata for");break;case 5:t.stateString=Object(c.default)("Finished processing");break;case 6:t.stateString=Object(c.default)("Analyzing");break;case 9:t.stateString=Object(c.default)("Deleted")}return n}});t.a=u},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return' <i class="server-alert-icon glyphicon cogwheel"></i> '}function l(e,t){var r
;return r=i(n(25)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"status",{hash:{},inverse:F.program(6,u,t),fn:F.program(4,c,t),data:t}),r||0===r?r:""}function c(e,t){return' <i class="server-alert-icon glyphicon bullhorn"></i> '}function u(e,t){var r;return r=i(n(25)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"playing",{hash:{},inverse:F.program(9,p,t),fn:F.program(7,d,t),data:t}),r||0===r?r:""}function d(e,t){return' <i class="server-alert-icon glyphicon imac"></i> '}function p(e,t){
var r;return r=i(n(25)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"websocket",{hash:{},inverse:F.program(13,v,t),fn:F.program(10,h,t),data:t}),r||0===r?r:""}function h(e,t){var n,i="";return i+=" ",n=r.if.call(e,(n=e&&e.event,null==n||!1===n?n:n.opened),{hash:{},inverse:F.program(11,f,t),fn:F.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 v(e,t){var r;return r=i(n(25)).call(e,(r=e&&e.event,
null==r||!1===r?r:r.state),0,{hash:{},inverse:F.program(16,m,t),fn:F.program(14,g,t),data:t}),r||0===r?r:""}function g(e,t){return' <i class="server-alert-icon glyphicon plus"></i> '}function m(e,t){var r;return r=i(n(25)).call(e,(r=e&&e.event,null==r||!1===r?r:r.state),5,{hash:{},inverse:F.program(19,b,t),fn:F.program(17,y,t),data:t}),r||0===r?r:""}function y(e,t){return' <i class="server-alert-icon glyphicon ok-2"></i> '}function b(e,t){var r;return r=i(n(25)).call(e,(r=e&&e.event,
null==r||!1===r?r:r.state),6,{hash:{},inverse:F.program(22,S,t),fn:F.program(20,I,t),data:t}),r||0===r?r:""}function I(e,t){return' <i class="server-alert-icon glyphicon magic"></i> '}function S(e,t){var r;return r=i(n(25)).call(e,(r=e&&e.event,null==r||!1===r?r:r.state),9,{hash:{},inverse:F.program(25,D,t),fn:F.program(23,M,t),data:t}),r||0===r?r:""}function M(e,t){return' <i class="server-alert-icon glyphicon bin"></i> '}function D(e,t){
return' <i class="server-alert-icon glyphicon tags"></i> '}function C(e,t){var r,a="";return a+=" "+Q(i(n(3)).call(e,"{1} set to {2}.",(r=e&&e.event,null==r||!1===r?r:r.label),(r=e&&e.event,null==r||!1===r?r:r.value),{hash:{},data:t}))+" "}function O(e,t){var r;return r=i(n(25)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"status",{hash:{},inverse:F.program(36,E,t),fn:F.program(30,j,t),data:t}),r||0===r?r:""}function j(e,t){var n,i="";return i+=" ",n=r.if.call(e,(n=e&&e.event,
null==n||!1===n?n:n.message),{hash:{},inverse:F.program(33,w,t),fn:F.program(31,P,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function P(e,t){var r,a="";return a+=" "+Q(i(n(3)).call(e,(r=e&&e.event,null==r||!1===r?r:r.message),{hash:{},data:t}))+" "}function w(e,t){var a,o="";return o+=" "+Q(i(n(3)).call(e,(a=e&&e.event,null==a||!1===a?a:a.title),{hash:{},data:t})),a=r.if.call(e,(a=e&&e.event,null==a||!1===a?a:a.description),{hash:{},inverse:F.noop,fn:F.program(34,T,t),data:t}),(a||0===a)&&(o+=a),
o+=" "}function T(e,t){var r,a="";return a+=": "+Q(i(n(3)).call(e,(r=e&&e.event,null==r||!1===r?r:r.description),{hash:{},data:t}))}function E(e,t){var r;return r=i(n(25)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"timeline",{hash:{},inverse:F.program(39,N,t),fn:F.program(37,x,t),data:t}),r||0===r?r:""}function x(e,t){var r,a="";return a+=" "+Q(i(n(3)).call(e,(r=e&&e.event,null==r||!1===r?r:r.stateString),{hash:{},data:t}))+' <a href="#!/server/'+Q(i(n(190)).call(e,e&&e.serverID,{hash:{},
data:t}))+"/details?key="+Q(i(n(190)).call(e,e&&e.itemKey,{hash:{},data:t}))+'">'+Q((r=e&&e.event,r=null==r||!1===r?r:r.mediaTitle,typeof r===H?r.apply(e):r))+"</a> "}function N(e,t){var r;return r=i(n(25)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"playing",{hash:{},inverse:F.program(42,L,t),fn:F.program(40,A,t),data:t}),r||0===r?r:""}function A(e,t){var r,a="";return a+=" "+Q(i(n(3)).call(e,"{1} started playing {2} on {3}.",(r=e&&e.event,null==r||!1===r?r:r.username),(r=e&&e.event,
null==r||!1===r?r:r.title),(r=e&&e.event,null==r||!1===r?r:r.player),{hash:{},data:t}))+" "}function L(e,t){var r;return r=i(n(25)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"websocket",{hash:{},inverse:F.noop,fn:F.program(43,k,t),data:t}),r||0===r?r:""}function k(e,t){var n,i="";return i+=" ",n=r.if.call(e,(n=e&&e.event,null==n||!1===n?n:n.opened),{hash:{},inverse:F.program(46,R,t),fn:F.program(44,_,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function _(e,t){var r=""
;return r+=" "+Q(i(n(3)).call(e,"Opened connection to {1}, listening for events.",e&&e.serverName,{hash:{},data:t}))+" "}function R(e,t){var n;return n=r.if.call(e,(n=e&&e.event,null==n||!1===n?n:n.closed),{hash:{},inverse:F.program(49,U,t),fn:F.program(47,z,t),data:t}),n||0===n?n:""}function z(e,t){var r="";return r+=" "+Q(i(n(3)).call(e,"Connection to {1} closed.",e&&e.serverName,{hash:{},data:t}))+" "}function U(e,t){var r=""
;return r+=" "+Q(i(n(3)).call(e,"Unable to listen for events on {1}.",e&&e.serverName,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var B,V="",F=this,Q=this.escapeExpression,H="function";return V+='<div class="striped-list-inner-item alert-list-inner-item"> ',B=i(n(25)).call(t,(B=t&&t.event,null==B||!1===B?B:B._type),"setting",{hash:{},inverse:F.program(3,l,o),fn:F.program(1,s,o),data:o}),(B||0===B)&&(V+=B),
V+=' <div class="server-alert-details"> <span class="server-alert-time">'+Q(i(n(1073)).call(t,(B=t&&t.event,null==B||!1===B?B:B.time),t&&t.timeFormat,{hash:{},data:o}))+"</span> ",B=i(n(25)).call(t,(B=t&&t.event,null==B||!1===B?B:B._type),"setting",{hash:{},inverse:F.program(29,O,o),fn:F.program(27,C,o),data:o}),(B||0===B)&&(V+=B),V+=" </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){
function s(e,t){var n,i="";return i+=' <span class="dropdown"> <a class="dropdown-toggle" href="#device-dropdown" data-toggle="dropdown"> <span class="dropdown-friendly-name">'+T((n=e&&e.selectedDevice,n=null==n||!1===n?n:n.name,typeof n===w?n.apply(e):n))+'</span> <i class="caret-icon"></i> </a> <ul class="dropdown-menu"> ',n=r.each.call(e,e&&e.devices,{hash:{},inverse:E.noop,fn:E.programWithDepth(2,l,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> </span> "}function l(e,t,r){var a,o=""
;return o+=' <li><a data-id="'+T((a=e&&e.id,typeof a===w?a.apply(e):a))+'" href="#"><span class="dropdown-truncated-label">'+T((a=e&&e.name,typeof a===w?a.apply(e):a))+"</span>",a=i(n(25)).call(e,(a=r&&r.selectedDevice,null==a||!1===a?a:a.id),e&&e.id,{hash:{},inverse:E.noop,fn:E.program(3,c,t),data:t}),(a||0===a)&&(o+=a),o+="</a></li> "}function c(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function u(e,t){
return'<a class="edit-btn btn-gray" href="#"><i class="glyphicon pencil"></i></a>'}function d(e,t){return'<a class="cloud-sync-settings-btn btn-gray" href="#"><i class="glyphicon cogwheel"></i></a>'}function p(e,t){var n,i="";return i+=" ",n=r.if.call(e,e&&e.devices,{hash:{},inverse:E.program(23,S,t),fn:E.program(10,h,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function h(e,t){var n,i="";return i+=' <div class="row"> ',n=r.if.call(e,e&&e.showNavLinks,{hash:{},inverse:E.program(21,I,t),
fn:E.program(11,f,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> "}function f(e,t){var n,i="";return i+=' <div class="col-sm-4 col-md-3"> <ul class="nav nav-cards sync-nav"> ',n=r.each.call(e,e&&e.devices,{hash:{},inverse:E.noop,fn:E.programWithDepth(12,v,t,e),data:t}),(n||0===n)&&(i+=n),i+=' </ul> </div> <div class="sync-device-container col-sm-8 col-md-9"></div> '}function v(e,t,a){var o,s="";return s+=' <li> <a class="card btn-gray ',o=i(n(25)).call(e,(o=a&&a.selectedDevice,
null==o||!1===o?o:o.id),e&&e.id,{hash:{},inverse:E.noop,fn:E.program(13,g,t),data:t}),(o||0===o)&&(s+=o),s+='" data-id="'+T((o=e&&e.id,typeof o===w?o.apply(e):o))+'" href="#"> ',o=r.if.call(e,e&&e.name,{hash:{},inverse:E.program(17,y,t),fn:E.program(15,m,t),data:t}),(o||0===o)&&(s+=o),s+=" ",o=r.if.call(e,e&&e.isCloudSync,{hash:{},inverse:E.noop,fn:E.program(19,b,t),data:t}),(o||0===o)&&(s+=o),s+=" </a> </li> "}function g(e,t){return"selected"}function m(e,t){var n;return T((n=e&&e.name,
typeof n===w?n.apply(e):n))}function y(e,t){var n;return T((n=e&&e.device,typeof n===w?n.apply(e):n))}function b(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 I(e,t){return' <div class="sync-device-container col-sm-12 col-md-12"></div> '}function S(e,t){var r=""
;return r+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+T(i(n(3)).call(e,"You have no sync capable devices.",{hash:{},data:t}))+"</h4> </div> "}function M(e,t){var n,i="";return i+=" ",n=r.if.call(e,e&&e.sync,{hash:{},inverse:E.program(29,O,t),fn:E.program(26,D,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function D(e,t){var n,i="";return i+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+T((n=e&&e.plexPassInfo,n=null==n||!1===n?n:n.message,
typeof n===w?n.apply(e):n))+'</h4> <p class="text-center ',n=r.unless.call(e,(n=e&&e.plexPassInfo,null==n||!1===n?n:n.showButton),{hash:{},inverse:E.noop,fn:E.program(27,C,t),data:t}),(n||0===n)&&(i+=n),i+='"> <a class="btn btn-sm btn-primary" href="'+T((n=e&&e.plexPassInfo,n=null==n||!1===n?n:n.url,typeof n===w?n.apply(e):n))+'" target="'+T((n=e&&e.plexPassInfo,n=null==n||!1===n?n:n.target,typeof n===w?n.apply(e):n))+'">'+T((n=e&&e.plexPassInfo,n=null==n||!1===n?n:n.buttonText,
typeof n===w?n.apply(e):n))+"</a> </p> </div> "}function C(e,t){return"hidden"}function O(e,t){var r="";return r+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+T(i(n(3)).call(e,"This server does not support sync.",{hash:{},data:t}))+"</h4> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var j,P="",w="function",T=this.escapeExpression,E=this;return P+='<div class="filter-bar"> ',j=r.if.call(t,t&&t.showDeviceDropdown,{hash:{},inverse:E.noop,
fn:E.program(1,s,o),data:o}),(j||0===j)&&(P+=j),P+=' <div class="filter-bar-right"> ',j=r.if.call(t,t&&t.hasTouchScreen,{hash:{},inverse:E.noop,fn:E.program(5,u,o),data:o}),(j||0===j)&&(P+=j),P+=" ",j=r.if.call(t,t&&t.showCloudSyncFilterBarButton,{hash:{},inverse:E.noop,fn:E.program(7,d,o),data:o}),(j||0===j)&&(P+=j),P+=' <a class="refresh-btn btn-gray" href="#"><i class="glyphicon repeat"></i></a> </div> </div> ',j=r.if.call(t,t&&t.allowSync,{hash:{},inverse:E.program(25,M,o),
fn:E.program(9,p,o),data:o}),(j||0===j)&&(P+=j),P+=" "})},function(e,t,n){"use strict";var i=n(3545),r=n.n(i),a=n(20),o=n(4),s=n(295),l=n(3546),c=a.a.Layout.extend({className:"sync-device-items-container",template:r.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 n=this.syncList.device,i=n.get("lastSeenAt");if(!i)return;this.ui.deviceMessageText.text(Object(o.default)("{1} was last seen {2}. Syncing will resume next time you launch Plex on this device.",n.get("name"),Object(s.a)(i)))}},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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s=""
;return s+='<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"> '+(0,this.escapeExpression)(i(n(3)).call(t,"Nothing is synced to this device.",{hash:{},data:o}))+' </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){"use strict"
;var i=n(63),r=n(3547),a=i.a.extend({tagName:"ul",className:"tile-list media-tile-list sync-tile-list show-context",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(3548),r=n.n(i),a=n(5),o=n.n(a),s=n(68),l=n(20),c=n(4),u=n(17),d=n(277),p=n(285),h=n(32),f=n(3549),v=n(167),g=n(1249),m=n(3550),y=n(868),b=l.a.Layout.extend({tagName:"li",className:"poster-item media-tile-list-item sync-tile-list-item",template:r.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 v.a({server:this.server,type:t,width:i}),
this.progressModel=new s.c.Model({current:0});var r=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(r,"reset",this.onTranscodeJobsReset),this.metadataItems.fetch({reset:!0}),
this.server.supports("syncNotifications")?this.listenTo(this.metadataItems,"change:Media",this.onMediaChange):this.metadataItemsInterval=setInterval(o.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",r=[],a=[],s=0;s<n;s++){var l=t[s],c=l.get("Media");if(r.push(l.get("grandparentKey")),a.push(l.get("parentKey")),c.length||(i="unknown"),"failed"!==i&&"unknown"!==i)for(var u=0,p=c.length;u<p;u++)for(var h=c[u].Part,f=0,v=h.length;f<v;f++){var g=h[f],m=d.a.getSyncStateFromPart(g);d.a.failedRegex.test(m)&&(i="failed"),d.a.processingRegex.test(m)&&(i="processing"),d.a.waitingRegex.test(m)&&"processing"!==i&&(i=g.key?"waiting":"processing")}}
return this.hasMultipleItems=n>1,this.hasSameGrandparents=1===o.a.compact(o.a.uniq(r)).length,this.hasSameParents=1===o.a.compact(o.a.uniq(a)).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 g.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 n=t[0],i=n.get("progress");if(this.ui.statusIcons.addClass("hidden"),i>0){this.ui.transcodeStatus.removeClass("hidden")
;var r=n.get("type"),a=Object(p.a)(n.get("remaining"));if(this.progressModel.set("progress",i),"download"===r)this.progressModel.set("text",i.toString()+"%"),this.ui.transcodeTimeRemaining.text(Object(c.default)("Downloading"));else if("upload"===r)this.progressModel.set("text",i.toString()+"%"),this.ui.transcodeTimeRemaining.text(Object(c.default)("Uploading"));else{var o=n.get("speed");if(o){var s=Math.round(10*n.get("speed"))/10;s>10&&(s=Math.round(s)),
this.progressModel.set("text",s.toString()+"x")}else this.progressModel.set("text","");this.ui.transcodeTimeRemaining.text(a)}this.updatePoster(n.get("thumb"))}else this.ui.transcodeStatus.addClass("hidden"),this.ui.processingIcon.removeClass("hidden")},onClick:function(e){e.preventDefault(),u.a.trigger("show:modal",new m.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(),h.a.execute("deleteSyncItem",{syncItem:this.model,server:this.server})}});t.a=b},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return"cloud-download"}function o(e,t){return"circle-arrow-down"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};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,o,r),fn:u.program(1,a,r),data:r}),(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,s,r),data:r}),(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,s,r),data:r}),(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){"use strict"
;var i=n(94),r=n(51),a=n(23),o=n(1259),s=a.a.extend({name:"SyncMetadataCollection",context:["server","device","syncItemId"],model:o.a,url:function(){return"/sync/items/"+this.syncItemId},augmentResponseText:function(e,t){return t===r.a.xml?Object(i.b)(e):e}});t.a=s},function(e,t,n){"use strict";var i=n(3551),r=n.n(i),a=n(70),o=n(3552),s=a.a.extend({name:"syncStatusModal",template:r.a,regions:{list:".sync-status-list-container"},onRender:function(){a.a.prototype.onRender.apply(this,arguments),
this.list.show(new o.a({collection:this.collection,itemViewOptions:{syncItem:this.model}}))}});t.a=s},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(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||!1===n?n:n.failure,typeof n===u?n.apply(e):n))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var l,c="",u="function",d=this.escapeExpression,p=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(3)).call(t,"Sync Status",{hash:{},data:o}))+'</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=r.if.call(t,(l=t&&t.Status,null==l||!1===l?l:l.failure),{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+=' <div class="sync-status-list-container"></div> </div> </div> </div> '})},function(e,t,n){"use strict";var i=n(63),r=n(3553),a=i.a.extend({tagName:"ul",className:"list sync-status-list",itemView:r.a});t.a=a},function(e,t,n){"use strict"
;var i=n(3554),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(4),c=n(277),u=n(285),d=n(167),p=s.a.ItemView.extend({tagName:"li",className:"sync-status-list-item",template:r.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(o.a.bind(function(t){if(this.syncItem.id===t.get("syncItemId")){
var n=this.model.get("thumb"),i=this.model.get("title"),r=t.get("transcodeThumb"),a=t.get("title"),o=a&&a.indexOf(i)>-1,s=!0;if(n&&r){s=new RegExp("(.+)"+t.get("thumb")+"$").exec(n)}o&&s&&(e=t)}},this)),e&&e.get("progress")>0){return{active:!0,speed:Math.round(10*e.get("speed"))/10,remaining:Object(u.a)(e.get("remaining"))||Object(l.default)("done"),progress:Math.round(10*e.get("progress"))/10,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 r=t[n].Part,a=0,o=r.length;a<o;a++){var s=r[a],l=c.a.getSyncStateFromPart(s);c.a.failedRegex.test(l)&&(e=c.a.getSyncStateContextFromPart(s)),c.a.processingRegex.test(l)&&(e="downloading"===l?"downloading":"processing"),c.a.waitingRegex.test(l)&&"processing"!==e&&(e=s.key?"waiting":"processing")}return e},getErrorMessage:function(e){switch(e){case"sourceFileUnavailable":
return Object(l.default)("This media is inaccessible. Please check that the file exists with the correct permissions.");case"sourceFileMetadataError":return Object(l.default)("The metadata for this media is invalid. Please reanalyze the media and try again.");case"clientProfileError":return Object(l.default)("The client profile for the sync target is invalid.");case"ioError":return Object(l.default)("An error occurred processing this media. Please check that the disk is not full.")
;case"transcoderError":return Object(l.default)("The transcoder was unable to process this media.");case"mediaAnalysisError":return Object(l.default)("This media was unable to be analyzed.");case"downloadFailed":return Object(l.default)("This media was unable to be downloaded. Please check that it is still available and try again.");case"unknownError":return Object(l.default)("An error occurred while syncing this media.")}return Object(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=p},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r=""
;return r+=' <i class="glyphicon cloud-download"></i> <span class="cloud-sync-waiting">'+d(i(n(3)).call(e,"Waiting to be uploaded",{hash:{},data:t}))+'</span> <span class="cloud-sync-uploading hidden">'+d(i(n(3)).call(e,"Uploading",{hash:{},data:t}))+' &middot; <span class="transcode-progress"></span>%</span> '}function l(e,t){var r="";return r+=' <i class="glyphicon circle-arrow-down"></i> '+d(i(n(3)).call(e,"Waiting to be downloaded",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this.escapeExpression,p=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(3)).call(t,"Synced",{hash:{},data:o}))+' </p> <p class="waiting-subtitle subtitle hidden"> ',c=r.if.call(t,t&&t.isCloudSync,{hash:{},inverse:p.program(3,l,o),fn:p.program(1,s,o),data:o}),(c||0===c)&&(u+=c),
u+=' </p> <p class="downloading-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(i(n(3)).call(t,"Downloading",{hash:{},data:o}))+' &middot; <span class="transcode-progress"></span>% </p> <p class="converting-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(i(n(3)).call(t,"Converting",{hash:{},data:o
}))+' &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(3)).call(t,"Waiting to be converted",{hash:{},data:o}))+' </p> <p class="unknown-subtitle subtitle hidden"> <i class="glyphicon circle-question-mark"></i> '+d(i(n(3)).call(t,"Unknown",{hash:{},data:o
}))+' </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 r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var a,o="";return o+=' <div class="filter-bar-right"> <button class="pause-btn btn btn-sm btn-default ',a=r.if.call(e,e&&e.isPaused,{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),(a||0===a)&&(o+=a),
o+='">'+g(i(n(3)).call(e,"Pause",{hash:{},data:t}))+'</button> <button class="resume-btn btn btn-sm btn-primary ',a=r.unless.call(e,e&&e.isPaused,{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+='">'+g(i(n(3)).call(e,"Resume",{hash:{},data:t}))+"</button> </div> "}function l(e,t){return"hidden"}function c(e,t){var r,a=""
;return a+=' <p class="conversion-error-message"><i class="conversion-error-icon glyphicon circle-exclamation-mark text-danger"></i> '+g((r=e&&e.errorMessage,typeof r===m?r.apply(e):r))+" "+g(i(n(3)).call(e,"Check the status in {1}Optimized Versions Settings{2}.",'<a href="{3}">',"</a>",e&&e.manageVersionsRoute,{hash:{},data:t}))+"</p> "}function u(e,t){var r=""
;return r+=' <p class="conversion-status-message">'+g(i(n(3)).call(e,"Manage your completed conversions in {1}Optimized Versions Settings{2}.",'<a href="{3}">',"</a>",e&&e.manageVersionsRoute,{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=r.unless.call(e,e&&e.shouldShowDivider,{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),
(n||0===n)&&(i+=n),i+='"> <div class="conversion-queue-after-up-next-list-region"></div> '}function p(e,t){var r="";return r+=' <div class="row row-padded"> <h4 class="text-muted text-center"> '+g(i(n(3)).call(e,"This requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" </h4> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var h,f="",v=this,g=this.escapeExpression,m="function";return f+='<div class="conversion-filter-bar filter-bar"> ',
h=r.if.call(t,t&&t.hasPausedSetting,{hash:{},inverse:v.noop,fn:v.program(1,s,o),data:o}),(h||0===h)&&(f+=h),f+=" </div> ",h=r.if.call(t,t&&t.errorMessage,{hash:{},inverse:v.program(6,u,o),fn:v.program(4,c,o),data:o}),(h||0===h)&&(f+=h),f+=" ",h=r.if.call(t,t&&t.shouldShowList,{hash:{},inverse:v.program(10,p,o),fn:v.program(8,d,o),data:o}),(h||0===h)&&(f+=h),f+=" "})},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(68),o=n(69),s=n(89),l=o.a.extend({mixins:[s.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 a.c.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={};r.a.each(r.a.functions(a.c.Collection.prototype),function(n){r.a.contains(this.blacklistedMethods,n)||(t[n]=function(){return e[n].apply(e,arguments)})},this),
r.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=r.a.toArray(arguments),i="change"===t||"change:"===t.slice(0,7);"reset"===t&&(this.models=e.models),r.a.contains(this.whitelistedEvents,t)?(r.a.contains(["add","remove","destroy"],t)?n[2]=this:r.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),r.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 r.a.keys(this._filters)},hasFilter:function(e){return r.a.contains(this.getFilters(),e)},refilter:function(e){return r.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(r.a.isFunction(e))return e;throw new Error("Unsupported filter type")},_execFilters:function(e){e||(e={});var t=[];this.superset&&(t=this.superset.filter(r.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(r.a.has(this._filters,n)&&(r.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)r.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(5),r=n.n(i),a=n(1261),o=a.a.extend({initialize:function(e){this.playQueue=e.playQueue,this.addFilter(r.a.bind(this.filterAfterUpNext,this)),this.listenForUpNextChanges()},filterAfterUpNext:function(e){return this.superset.indexOf(e)>this.playQueue.getUpNextRange().end}});t.a=o},function(e,t,n){"use strict";var i=n(12),r=n.n(i),a=n(5),o=n.n(a),s=n(805),l=n.n(s),c=n(4),u=n(17),d=n(49),p=n(63),h=n(3559),f=p.a.extend({tagName:"ol",
className:"list media-list playlist-items",itemView:h.a,sorted:!0,itemEvents:{sort:"onSort"},initialize:function(){o.a.bindAll(this,"onItemMove")},onRender:function(){this.sortable&&this.sortable.destroy(),this.sortable=new l.a(this.el,o.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=r()(e.item).data("queue-item-id"),n=r()(e.item).prev().data("queue-item-id"),i=this.options.playQueue;if(n)return void i.moveItem(t,n);var a=i.get("selectedItem").get("title"),s=new d.a({title:Object(c.default)("Convert Immediately"),message:Object(c.default)("Do you want to start converting this item immediately? Any conversion progress for '{1}' will be lost.",a)}),l=s.promise;l.done(function(){i.moveItem(t)}),l.fail(o.a.bind(this.render,this)),
u.a.trigger("show:modal",s)}});t.a=f},function(e,t,n){"use strict";var i=n(3560),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(15),c=n(4),u=n(278),d=n(477),p=n(32),h=n(627),f=n(401),v=n(167),g=n(1248),m=s.a.Layout.extend({className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:r.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 v.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")?Object(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.d("appModel"),t=new h.a({id:this.model.get("syncItemId"),
clientIdentifier:this.model.get("clientIdentifier")},{server:e.get("user").server});return p.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 p.a.execute("disableVersionGenerator",{generator:e,ratingKey:this.metadataItem.get("ratingKey")})},onRender:function(){this.image.setElement(this.ui.poster),
this.statusRegion.show(new g.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",o.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=m},function(e,t,n){var i=n(14);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(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),r=r||{};var o,s,l="",c=this.escapeExpression,u=this
;return l+='<div class="show-actions striped-list-inner-item playlist-inner-item ',(s=n.type)?o=s.call(t,{hash:{},data:r}):(s=t&&t.type,o="function"==typeof s?s.call(t,{hash:{},data:r}):s),l+=c(o)+'"> <div class="media-actions media-reorder"> ',o=n.unless.call(t,t&&t.hideDragHandle,{hash:{},inverse:u.noop,fn:u.program(1,a,r),data:r}),(o||0===o)&&(l+=o),
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){"use strict";var i=n(3562),r=n.n(i),a=n(20),o=n(15),s=n(52),l=n(213),c=a.a.ItemView.extend({template:r.a,serializeData:function(){return{manageVersionsRoute:Object(o.d)("appModel").get("user").get("features").get(s.i)?Object(l.a)(this.model.id,"manage","versions"):"#!/settings/server/"+encodeURIComponent(this.model.id)+"/versions"}}});t.a=c},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="",l=this.escapeExpression;return s+='<div class="row row-padded"> <h4 class="text-muted text-center"> <p>'+l(i(n(3)).call(t,"Conversions for sync and media optimization will appear here.",{hash:{},data:o}))+"</p> <p>"+l(i(n(3)).call(t,"Manage your optimized versions in {1}Optimized Versions Settings{2}.",'<a href="{3}">',"</a>",t&&t.manageVersionsRoute,{hash:{},data:o}))+"</p> </h4> </div> "})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(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=r.if.call(e,e&&e.shared,{hash:{},inverse:g.program(6,u,t),fn:g.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+=" </h4> </div> "}function c(e,t){var r=""
;return r+=" "+v(i(n(3)).call(e,"Now Playing is restricted from shared users.",{hash:{},data:t}))+" "}function u(e,t){var n;return n=r.if.call(e,e&&e.synced,{hash:{},inverse:g.program(9,p,t),fn:g.program(7,d,t),data:t}),n||0===n?n:""}function d(e,t){var r="";return r+=" "+v(i(n(3)).call(e,"Now Playing is unavailable with synced servers.",{hash:{},data:t}))+" "}function p(e,t){var r="";return r+=" "+v(i(n(3)).call(e,"Now Playing requires Plex Media Server {1} or later.",e&&e.minServerVersion,{
hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var h,f="",v=this.escapeExpression,g=this;return f+='<div class="filter-bar"></div> ',h=r.if.call(t,t&&t.shouldShowList,{hash:{},inverse:g.program(3,l,o),fn:g.program(1,s,o),data:o}),(h||0===h)&&(f+=h),f+=" "})},function(e,t,n){"use strict";var i=n(63),r=n(3565),a=n(3569),o=i.a.extend({tagName:"ul",className:"tile-list session-tile-list",itemView:r.a,emptyView:a.a});t.a=o},function(e,t,n){"use strict"
;var i=n(3566),r=n.n(i),a=n(5),o=n.n(a),s=n(4),l=n(283),c=n(3567),u=n(3568),d=n(405),p=n(1236),h=n(32),f=n(575),v=n(167),g=f.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 .stop-btn":"onStopClick"},f.a.prototype.events),modelEvents:{
"change:viewOffset":"onViewOffsetChange","change:Player":"onPlayerChange"},initialize:function(e){f.a.prototype.initialize.apply(this,arguments);var t=this.getScreenshotUrl(this.model.get("Media"));this.image=new v.a({model:this.model,modelAttribute:"ratingKey",type:"clip",getUrl:this.getPosterUrl,width:350,url:t||null}),this.userImage=new v.a({model:this.model,modelAttribute:"User",type:"friend",getUrl:this.getUserPosterUrl,width:44}),this.posterFade=new v.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===l.a.states.PLAYING&&(this.screenshotInterval=setInterval(o.a.bind(this.updateScreenshot,this),this.screenshotIntervalDelay)),this.listenTo(this.model,"change:Player",this.onPlayerChange)},serializeData:function(){var e=f.a.prototype.serializeData.apply(this,arguments)
;return e.showStopButton=this.model.server.hasOwnerFeature("session_kick")&&this.model.get("Session"),e},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 n=this.model.get("viewOffset")||0,i=this.screenshotCount*this.screenshotIntervalDelay+n+4e3
;return Object(c.a)(t,i,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),r=n.get(n.getItemCacheKey({url:i}));r&&n.remove(r)}}),800)})))}},bindings:o.a.extend({},f.a.prototype.bindings,{".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=f.a.prototype.bindings[".media-subtitle-1"].formatter.apply(this,arguments),n=f.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=Object(p.a)(e.product,e.platform);t.attr("src",n)}},".session-player":{modelAttribute:"Player",formatter:function(e){return e.title||e.product}},".session-state":{modelAttribute:"Player",formatter:function(e){return Object(u.a)(e.state)}},".session-transcode":{modelAttribute:"TranscodeSession",formatter:function(e){
return e&&(e.videoCodec||e.audioCodec)?Object(s.default)("Converting"):Object(s.default)("Direct Play")}},".session-transcode-throttled":{modelAttribute:"TranscodeSession",autohide:!0,formatter:function(e){return e&&"1"===e.throttled?Object(s.default)("(throttled)"):""}},".session-transcode-video-decision":{modelAttribute:"TranscodeSession",formatter:function(e,t){var n=!(!e||!e.videoCodec);if(t.parent().toggleClass("hidden",!n),n){
if("copy"===e.videoDecision)return Object(s.default)("Direct Stream");var i=this.model.get("Media")[0],r=e.sourceVideoCodec||i.videoCodec,a=Object(d.a)(r)+(e.transcodeHwDecoding?" (hw)":""),o=Object(d.a)(e.videoCodec)+(e.transcodeHwEncoding?" (hw)":"");return Object(s.default)("Transcoding {sourceCodec} to {targetCodec}",{sourceCodec:a,targetCodec:o})}return""}},".session-transcode-audio-decision":{modelAttribute:"TranscodeSession",formatter:function(e,t){var n=!(!e||!e.audioCodec)
;if(t.parent().toggleClass("hidden",!n),n){if("copy"===e.audioDecision)return Object(s.default)("Direct Stream");var i=this.model.get("Media")[0],r=e.sourceAudioCodec||i.audioCodec,a=Object(d.a)(r),o=Object(d.a)(e.audioCodec);return Object(s.default)("Transcoding {sourceCodec} to {targetCodec}",{sourceCodec:a,targetCodec:o})}return""}},".session-username":{modelAttribute:"User",formatter:function(e){return e.title}}}),onRender:function(){f.a.prototype.onRender.apply(this,arguments),
this.userImage.setElement(this.ui.userPoster),this.posterFade.setElement(this.ui.posterFade)},onClose:function(){f.a.prototype.onClose.call(this),clearTimeout(this.posterFadeDelay),clearInterval(this.screenshotInterval),this.posterFade&&this.posterFade.close()},onClick:function(){},onViewOffsetChange:function(e,t){this.screenshotCount=0},onPlayerChange:function(e,t){t&&(t.state!==l.a.states.PLAYING&&this.screenshotInterval?(this.screenshotInterval=clearInterval(this.screenshotInterval),
this.screenshotCount=0):t.state!==l.a.states.PLAYING||this.screenshotInterval||(this.screenshotInterval=setInterval(o.a.bind(this.updateScreenshot,this),this.screenshotIntervalDelay)))},onStopClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),h.a.execute("stopMedia",{model:this.model})}});t.a=g},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"hide-actions"}function l(e,t){
return"hidden"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this,p=this.escapeExpression;return u+='<a class="media-poster-container ',c=r.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+='" href="'+p((c=t&&t.url,
"function"==typeof c?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=r.unless.call(t,t&&t.showStopButton,{hash:{},inverse:d.noop,fn:d.program(3,l,o),data:o}),(c||0===c)&&(u+=c),
u+='"> <button class="stop-btn media-poster-btn btn-link" tabindex="-1"> <i class="glyphicon remove-2"></i> <span class="media-poster-btn-text">'+p(i(n(3)).call(t,"Stop playback",{hash:{},data:o
}))+'</span> </button> </div> <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(3)).call(t,"Video",{hash:{},data:o
}))+'</span> <span class="session-transcode-video-decision"></span> </p> <p class="session-transcode-audio"> <span class="session-transcode-label">'+p(i(n(3)).call(t,"Audio",{hash:{},data:o
}))+'</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){"use strict";function i(e,t,n){var i=Object(r.a)(e,t);if(n=Object(a.a)(i,n)){
var s=Object(o.a)(e,i,t);return"/library/parts/"+i.id+"/indexes/"+n+"/"+s}}var r=n(947),a=n(968),o=n(948);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";var i=n(3570),r=n.n(i),a=n(20),o=a.a.ItemView.extend({template:r.a});t.a=o},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="";return s+='<div class="row row-padded"> <h4 class="text-muted text-center"> '+(0,this.escapeExpression)(i(n(3)).call(t,"Nothing is currently being played.",{hash:{},data:o}))+" </h4> </div> "})},function(e,t,n){"use strict";var i=n(248),r=n(3572),a=i.a.extend({controller:new r.a,appRoutes:{"!/settings/account":"account","!/settings/plex-cloud":"personalCloud",
"!/settings/webhooks":"webhooks","!/settings/online-media-sources":"onlineMediaSources","!/settings/audio-subtitle":"audioSubtitleSettings","!/cpms":"cpms","!/playlist/queue/help":"queueHelp","!/playlist/:key(/:subset)":"userPlaylist","!/playlist/:key/details/:itemID":"userPlaylistDetails","!/announcements":"announcements","!/account":"account","!/account/plex-cloud":"personalCloud","!/account/webhooks":"webhooks","!/account/online-media-sources":"onlineMediaSources",
"!/account/audio-subtitle":"audioSubtitleSettings"}});t.a=a},function(e,t,n){"use strict";var i=n(15),r=n(4),a=n(17),o=n(34),s=n(249),l=n(3573),c=n(3591),u=n(3599),d=n(3603),p=n(3610),h=n(3616),f=n(1270),v=n(807),g=n(3622),m=n(172),y=n(3627),b=n(1231),I=n(383),S=n(3633),M=s.a.extend({account:function(){this.populateView({serverID:m.a}).done(function(){Object(o.a)(),a.a.trigger("show:view",new l.a)})},personalCloud:function(){var e=i.d("appModel"),t=e.get("user");this.populateView({serverID:m.a
}).done(function(){Object(o.a)(),a.a.trigger("show:view",new c.a({model:t}))})},onlineMediaSources:function(){this.populateView({serverID:m.a}).done(function(){Object(o.a)(),a.a.trigger("show:view",new u.a)})},audioSubtitleSettings:function(){this.populateView({serverID:m.a}).done(function(){Object(o.a)(),a.a.trigger("show:view",new d.a)})},webhooks:function(){var e=i.d("appModel"),t=e.get("user");this.populateView({serverID:m.a}).done(function(){Object(o.a)(),a.a.trigger("show:view",new p.a({
model:t}))})},cpms:function(){this.populateView({serverID:m.a}).done(function(){a.a.trigger("show:view",new h.a)})},userPlaylist:function(e,t){this.populateView({serverID:m.a}).done(function(n){var o=i.d("appModel"),s=o.get("user"),l=new v.a({key:e},{server:s.server,parent:s}),c=l.fetch({scope:"page"});c.done(function(){a.a.trigger("show:view",new g.a({model:o.get("user"),listModel:l,subset:t}))}),c.fail(function(){a.a.trigger("show:view",new I.a({
title:Object(r.default)("This playlist is unavailable.")}))})})},userPlaylistDetails:function(e,t){this.populateView({serverID:m.a}).done(function(n){var o=i.d("appModel"),s=o.get("user"),l=new f.a({id:parseInt(t,10)},{server:n.server,parent:s,containerKey:e}),c=l.fetch({scope:"page"});c.done(function(){a.a.trigger("show:view",new b.a({model:l}))}),c.fail(function(){a.a.trigger("show:view",new I.a({title:Object(r.default)("This playlist item is unavailable.")}))})})},queueHelp:function(){
this.populateView({serverID:m.a}).done(function(){var e=i.d("appModel"),t=e.get("user");a.a.trigger("show:view",new S.a({queueEmail:t.get("queueEmail")}))})},announcements:function(){this.populateView().done(function(){var e=i.d("appModel"),t=e.get("user"),n=t.get("desktop").get("announcements"),o=n.fetch({scope:"page"});o.done(function(){a.a.trigger("show:view",new y.a({collection:n}))}),o.fail(function(){a.a.trigger("show:view",new I.a({
title:Object(r.default)("Announcements are not available.")}))})})}});t.a=M},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(56)),s=n(237),l=n(3574),c=n(66),u=r()(c.a,{},void 0,r()(s.a,{selectedKey:"account"}),r()(l.a,{})),d=o.a.extend({component:function(){return u}});t.a=d},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(5),m=n.n(g),y=n(11),b=n(6),I=(n.n(b),
n(19)),S=n(200),M=n(548),D=n(440),C=n(3575),O=Object(b.createSelector)(S.a,M.a,function(e,t){var n=e.desktop;return{serverEntityID:t.entityID,user:m.a.pick(e,"username","email","emailOnlyAuth","thumb","locked","locale","hasPlexPass","hasPassword","isEmployee","isNinja","mailingListActive","restricted"),isUpdatingUser:n.isUpdatingUser,updateUserError:n.updateUserError,deleteAccountUrl:I.join(["https://plex.tv","/users/delete"])}}),j={dispatchUpdateUser:D.j,dispatchClearUpdateUserError:D.b
},P=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onErrorDismiss=function(){i.props.dispatchClearUpdateUserError()},i.onFormSubmit=function(e){i.props.dispatchUpdateUser(e)},r=n,u()(i,r)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=(e.dispatchUpdateUser,e.dispatchClearUpdateUserError,o()(e,["dispatchUpdateUser","dispatchClearUpdateUserError"]))
;return v.a.createElement(C.a,r()({},t,{onErrorDismiss:this.onErrorDismiss,onFormSubmit:this.onFormSubmit}))},t}(f.Component);t.a=Object(y.b)(O,j)(P)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),h=n(10),f=n.n(h),v=n(5),g=n.n(v),m=n(1),y=(n.n(m),
n(0)),b=n.n(y),I=n(4),S=n(35),M=n(24),D=n(426),C=n(329),O=n(1263),j=n(199),P=n(22),w=n(133),T=n(504),E=n(503),x=n(3576),N=n(428),A=n(207),L=n(208),k=n(450),_=n(308),R=n(1247),z=n(3578),U=n(3580),B=n(3583),V=n(3590),F=n.n(V),Q=r()(z.a,{}),H=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r.createToggleHandler=function(e){return function(t){t.preventDefault();var n=r.state[e];r.props.updateUserError&&r.props.onErrorDismiss(),
r.setState(g.a.mapObject(r.state,function(t,i){return i===e&&!n}))}},r.getSubmittableFormSectionProps=function(e,t){var n=r.state[t];return{title:e,onTogglePress:r.createToggleHandler(t),isOpen:n,onSubmit:r.props.onFormSubmit,onErrorDismiss:r.props.onErrorDismiss,isUpdating:r.props.isUpdatingUser,errorMessage:r.props.updateUserError?Object(C.a)(g.a.first(r.props.updateUserError.request))||Object(I.default)("An unknown error occurred"):null}},r.onCreatePassword=function(e){
r.createToggleHandler("isPasswordOpen")(e)},r.onAccountEmailFormSubmit=function(e){var t=r.props.user;t.username===t.email?r.props.onFormSubmit(l()({},e,{username:e.email})):r.props.onFormSubmit(e)},r.state={isUsernameOpen:!1,isEmailOpen:!1,isPasswordOpen:!1,isLinkedAccountsOpen:!1,isLocaleOpen:!1,isPhotoOpen:!1,isNewsletterOpen:!1},r}return f()(t,e),t.prototype.componentWillReceiveProps=function(e){
!this.props.isUpdatingUser||e.isUpdatingUser||e.updateUserError||this.setState(g.a.mapObject(this.state,function(){return!1}))},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.user,i=e.deleteAccountUrl,a=o()(e,["serverEntityID","user","deleteAccountUrl"]),s=g.a.mapObject(a.updateUserError,function(e){return e.map(function(e){return Object(C.a)(e)})}),c=Object(I.default)("System Default"),u=g.a.map(D.b,function(e,t){var n;return n={},n[t]=e,n
}),d=!n.restricted,p=n.username===n.email;return r()(A.a,{metricsPage:S.a,metricsPane:"account"},void 0,r()(L.a,{className:F.a.header},void 0,Object(I.default)("Account"),(n.hasPlexPass||n.isEmployee||n.isNinja)&&r()("span",{className:F.a.dash},void 0,"\u2014"),n.hasPlexPass&&r()("span",{className:F.a.badge},void 0,Q),n.isEmployee&&r()("span",{className:F.a.textBadge},void 0,"Employee"),n.isNinja&&!n.isEmployee&&r()("span",{className:F.a.textBadge
},void 0,"Ninja")),b.a.createElement(_.a,l()({},this.getSubmittableFormSectionProps(Object(I.default)("Photo"),"isPhotoOpen"),{closedNode:r()(R.a,{serverEntityID:t,url:this.props.user.thumb,width:80,height:80})}),r()(w.a,{},void 0,Object(I.default)("Photo")),r()(U.a,{serverEntityID:t,name:"avatar",width:180,height:180,isDeletingAvatar:this.props.isDeletingAvatar,initialValue:this.props.user.thumb,url:this.props.user.thumb
})),b.a.createElement(_.a,l()({},this.getSubmittableFormSectionProps(Object(I.default)("Language"),"isLocaleOpen"),{closedNode:D.b[n.locale]||c}),r()(N.a,{labelText:Object(I.default)("Language"),helpText:Object(I.default)("This sets the default language for Plex applications that do not provide their own language setting."),name:"locale",initialValue:n.locale,values:[{"":c}].concat(u)
})),d&&b.a.createElement(_.a,l()({},this.getSubmittableFormSectionProps(Object(I.default)("Username"),"isUsernameOpen"),{closedNode:p?Object(I.default)("Not set"):n.username}),r()(E.a,{labelText:Object(I.default)("Username"),helpText:Object(I.default)("Your username will be visible to friends with whom you have shared your server."),name:"username",initialValue:p?"":n.username,errors:s.username,validations:[O.g]}),r()(T.a,{name:"emailOnlyAuth",
checkboxText:Object(I.default)("Allow username to be used when signing in"),helpText:Object(I.default)("Your email address will be required to sign in when username sign-in is not allowed."),initialValue:n.emailOnlyAuth,checkedValue:!1,uncheckedValue:!0})),d&&b.a.createElement(_.a,l()({},this.getSubmittableFormSectionProps(Object(I.default)("Email Address"),"isEmailOpen"),{closedNode:n.email,onSubmit:this.onAccountEmailFormSubmit}),r()(E.a,{labelText:Object(I.default)("Email Address"),
name:"email",initialValue:n.email,errors:s.email,validations:[O.d]}),r()(E.a,{labelText:Object(I.default)("Password"),type:"password",name:"currentPassword",initialValue:"",validations:[O.e]})),d&&b.a.createElement(_.a,l()({},this.getSubmittableFormSectionProps(Object(I.default)("Password"),"isPasswordOpen"),{closedNode:n.hasPassword?"**********":Object(I.default)("Not set")}),r()(x.a,{labelText:n.hasPassword?Object(I.default)("New Password"):Object(I.default)("Choose Password"),name:"password",
initialValue:"",errors:s.password,validations:[O.e,O.h]}),r()(E.a,{labelText:n.hasPassword?Object(I.default)("Confirm New Password"):Object(I.default)("Confirm Password"),type:"password",name:"passwordConfirmation",initialValue:"",validations:[O.b,O.a]}),n.hasPassword&&r()(E.a,{labelText:Object(I.default)("Current Password"),type:"password",name:"currentPassword",initialValue:"",validations:[O.c]}),n.hasPassword&&r()(T.a,{
checkboxText:Object(I.default)("Sign out connected devices after password change"),name:"resetDevices",initialValue:!1})),d&&b.a.createElement(B.a,l()({},this.getSubmittableFormSectionProps(Object(I.default)("Linked Accounts"),"isLinkedAccountsOpen"),{hasPassword:n.hasPassword,onCreatePassword:this.onCreatePassword})),d&&b.a.createElement(_.a,l()({},this.getSubmittableFormSectionProps(Object(I.default)("Newsletter"),"isNewsletterOpen"),{
closedNode:n.mailingListActive?Object(I.default)("You are currently subscribed"):Object(I.default)("You are not subscribed")}),r()(T.a,{name:"mailingListActive",initialValue:n.mailingListActive,labelText:Object(I.default)("Newsletter"),checkboxText:Object(I.default)("Subscribe to our amazing, but infrequent email newsletter")})),d&&r()(k.a,{},void 0,r()(w.a,{},void 0,Object(I.default)("Privacy")),r()(j.a,{className:F.a.description,
message:Object(I.default)("Review our {openPolicyLink}Privacy Policy{closePolicyLink} for more information on the data that we collect, how it is used, and understand your {openAdChoicesLink}AdChoices{closeAdChoicesLink}. You can opt out of sending us certain data using your {openPreferencesLink}Privacy Preferences{closePreferencesLink} page."),tags:[{open:"openPolicyLink",close:"closePolicyLink",component:P.a,kind:M.b.PRIMARY,to:"https://www.plex.tv/about/privacy-legal/",target:"_blank"},{
open:"openAdChoicesLink",close:"closeAdChoicesLink",component:P.a,kind:M.b.PRIMARY,to:"https://www.plex.tv/about/privacy-legal/#adchoices",target:"_blank"},{open:"openPreferencesLink",close:"closePreferencesLink",component:P.a,kind:M.b.PRIMARY,to:"https://www.plex.tv/about/privacy-legal/privacy-preferences/#opd",target:"_blank"}]})),d&&r()(k.a,{},void 0,r()(P.a,{kind:M.b.DANGER,to:i,target:"_blank"},void 0,Object(I.default)("Delete your account"))))},t}(y.Component);t.a=H},function(e,t,n){
"use strict";function i(e){var t=e.formGroupClassName,n=e.formLabelClassName,i=e.formInputClassName,r=e.name,o=e.value,l=e.labelText,u=e.showErrors,d=e.errors,h=e.zxcvbn,f=c()(e,["formGroupClassName","formLabelClassName","formInputClassName","name","value","labelText","showErrors","errors","zxcvbn"]),v=h&&""!==o,I=v?b[h(o).score]:null,S=d[0];return s()(g.a,{className:t},void 0,s()(m.a,{hasError:u,name:r,className:n},void 0,l,I&&!u&&s()("span",{},void 0," \u2014 ",s()("span",{style:{color:I.color
}},void 0,I.translateFn())),u&&" \u2014 "+S),p.a.createElement(y.a,a()({className:i,name:r,type:"password",value:o,hasError:u},f)))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(4),f=n(3577),v=n(146),g=n(181),m=n(133),y=n(226),b={0:{color:"#ff5533",translateFn:function(){return Object(h.default)("Too weak")}},1:{color:"#ee8833",translateFn:function(){return Object(h.default)("Very weak")}},2:{color:"#eebb00",translateFn:function(){
return Object(h.default)("Somewhat weak")}},3:{color:"#bbbb33",translateFn:function(){return Object(h.default)("Somewhat Strong")}},4:{color:"#66bb55",translateFn:function(){return Object(h.default)("Very Strong")}}};i.defaultProps={showErrors:!1},t.a=Object(f.a)(Object(v.a)(i),{zxcvbn:function(){return n.e(0).then(n.bind(null,3920))}})},function(e,t,n){"use strict";function i(e,t){var n=h()(t),i=function(i){function r(e,t){s()(this,r);var a=c()(this,i.call(this,e,t))
;return a.state=n.reduce(function(e,t){return e[t]=null,e},{}),a}return d()(r,i),r.prototype.componentDidMount=function(){var e=this;n.forEach(function(n){t[n]().then(function(t){var i;e.setState((i={},i[n]=t,i))})})},r.prototype.render=function(){return v.a.createElement(e,a()({},this.props,this.state))},r}(f.Component);return i.displayName="AsyncProps("+Object(g.a)(e)+":"+n.join(",")+")",i.WrappedComponent=e,i}
var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(50),h=n.n(p),f=n(0),v=n.n(f),g=n(153);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=s()(e,["className"]);return u.a.createElement(d.a,a()({name:"plex-icon-pp-badge-560",className:(h.a.plexPassIcon||"")+" "+(t||"")},n))}var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(26),p=n(3579),h=n.n(p);t.a=i},function(e,t){e.exports={plexPassIcon:"PlexPassBadge-plexPassIcon-256yq"}
},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{url:e}})}var r=n(11),a=n(6),o=(n.n(a),n(898)),s=n(3581);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(7),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(19),m=n(4),y=n(332),b=n(683),I=n(29),S=n(26),M=n(286),D=n(47),C=n(146),O=n(3582),j=n.n(O),P=r()(S.a,{name:"plex-icon-avatar-crop-min-560"}),w=r()(S.a,{
name:"plex-icon-avatar-crop-max-560"}),T=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.setCanvasRef=function(e){r.canvas=e},r.onMouseDown=function(e){e.preventDefault(),r.startAvatarDrag(e.clientX,e.clientY)},r.onTouchStart=function(e){e.preventDefault();var t=e.touches.item(0);t&&r.startAvatarDrag(t.clientX,t.clientY,!0)},r.onTouchMove=function(e){var t=e.touches.item(0);t&&r.dragAvatar(t.clientX,t.clientY)},r.onMouseMove=function(e){
r.dragAvatar(e.clientX,e.clientY)},r.onMouseUp=function(){r.stopAvatarDrag()},r.onTouchEnd=function(){r.stopAvatarDrag()},r.onFileDrop=function(e){e.preventDefault(),r.setState({isOverDropTarget:!1}),r.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 r.loadImage(e.target.result)},n.readAsDataURL(t)}},
r.onDragEnter=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event).preventDefault(),r.dropTargetEnteredCounter++,r.setOverDropTargetState()},r.onDragLeave=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event).preventDefault(),r.dropTargetEnteredCounter--,r.setOverDropTargetState()},r.onSliderChange=function(e){var t=e.steppedValue;r.setState(function(e){
var n=e.offsetX,i=e.offsetY,a=r.initialWidth*t,s=r.initialHeight*t,l=(r.imageWidth-a)/2,c=(r.imageHeight-s)/2,u=r.props.width-a,d=r.props.height-s,p=Math.max(u,Math.min(n+l,0)),h=Math.max(d,Math.min(i+c,0));return o()({},e,{scale:t,offsetX:p,offsetY:h})},function(){return r.props.onChange(r.getImageDataUrl())})},r.state={drag:!1,dragX:0,dragY:0,minScale:.1,maxScale:1,scale:.1,offsetX:0,offsetY:0,isOverDropTarget:!1},r.dropTargetEnteredCounter=0,r}return p()(t,e),
t.prototype.componentDidMount=function(){window.addEventListener("dragover",this.onWindowDragOver),window.addEventListener("drop",this.onWindowDrop),this.paint(),this.loadImage(this.props.url,!0)},t.prototype.componentWillReceiveProps=function(e){this.props.url!==e.url&&this.loadImage(e.url)},t.prototype.shouldComponentUpdate=function(e,t){return Object(I.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 r=i.offsetX,a=i.offsetY,s=i.dragX,l=i.dragY,c=n.props.width-n.imageWidth,u=n.props.height-n.imageHeight,d=Math.max(c,Math.min(r+(e-s),0)),p=Math.max(u,Math.min(a+(t-l),0));return o()({},i,{dragX:e,dragY:t,offsetX:d,offsetY:p})})},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,t){
var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props,r=new window.Image;r.onload=function(){return n.onImageLoad(r,t)},/^https?:\/\//.test(e)&&r.setAttribute("crossOrigin","anonymous");var a=e;if(0!==e.indexOf("data:")){var o=Object(y.a)(),s={width:Math.round(i.width*o),height:Math.round(i.height*o),minSize:1},l=e.indexOf("?");l>-1?(a=g.join(e.substring(0,l),s),a+=-1===a.indexOf("?")?"?":"&",a+=e.substring(l+1)):a=g.join(a,s)}r.src=a},t.prototype.paint=function(){
var e=this.props,t=e.width,n=e.height,i=this.canvas.getContext("2d");i.clearRect(0,0,t,n),this.image&&this.drawImage(i);var r=document.createElement("canvas"),a=r.getContext("2d");r.width=t,r.height=n,a.fillStyle="rgba(0,0,0,0.6)",a.fillRect(0,0,r.width,r.height),a.globalCompositeOperation="destination-out",a.arc(t/2,n/2,t/2,0,2*Math.PI),a.fill(),i.drawImage(r,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,t){var n=this;this.image=e,this.initialWidth=Math.max(this.props.width,e.width),this.initialHeight=Math.max(this.props.height,e.height);var i=e.width>e.height?e.height:e.width,r=i>this.props.width?this.props.width/i:1,a=i<=this.props.width?2:1;this.setState({drag:!1,dragX:0,dragY:0,minScale:r,maxScale:a,scale:r,offsetX:0,offsetY:0},t?null:function(){
return n.props.onChange(n.getImageDataUrl())})},t.prototype.onWindowDrop=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event).preventDefault()},t.prototype.onWindowDragOver=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event).preventDefault()},t.prototype.onDragStart=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event).dataTransfer.effectAllowed="copyMove"},t.prototype.onDragOver=function(){
(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event).dataTransfer.dropEffect="copy"},t.prototype.render=function(){var e=this.state.isOverDropTarget;return r()("div",{className:j.a.avatarContainer,onDrop:this.onFileDrop,onDragOver:this.onDragOver,onDragStart:this.onDragStart,onDragLeave:this.onDragLeave,onDragEnter:this.onDragEnter},void 0,r()("div",{className:j.a.avatarPane},void 0,v.a.createElement("canvas",{className:e?j.a.isOverDropTarget:"",width:this.props.width,
height:this.props.height,ref:this.setCanvasRef,onTouchStart:this.onTouchStart,onMouseDown:this.onMouseDown}),r()("div",{className:j.a.sliderContainer},void 0,r()("span",{className:j.a.sliderEnd},void 0,P),r()("span",{className:j.a.sliderWrapper},void 0,r()(M.a,{className:j.a.slider,min:this.state.minScale,max:this.state.maxScale,step:.1,value:this.state.scale,onChange:this.onSliderChange})),r()("span",{className:j.a.sliderEnd},void 0,w))),r()("div",{className:j.a.avatarTextPane
},void 0,r()("p",{},void 0,Object(b.a)()?r()("input",{type:"file",accept:"image/*",onChange:this.onFileDrop}):r()(D.a,{className:j.a.avatarActionButtons,component:"label"},void 0,Object(m.default)("Choose Photo"),r()("input",{className:j.a.avatarFileInput,type:"file",accept:"image/*",onChange:this.onFileDrop}))),r()("p",{className:j.a.help},void 0,Object(m.default)("You can scale your photo using the slider below, and adjust the crop by dragging it within the circle."))))},t}(f.Component)
;T.defaultProps={height:200,width:200,onChange:function(){}},t.a=Object(C.a)(T)},function(e,t){e.exports={avatarContainer:"AvatarEditor-avatarContainer-3eqle",isOverDropTarget:"AvatarEditor-isOverDropTarget-xHyXA",avatarPane:"AvatarEditor-avatarPane-ZIMdI",sliderContainer:"AvatarEditor-sliderContainer-1XP4N",sliderEnd:"AvatarEditor-sliderEnd-LMe5u",sliderWrapper:"AvatarEditor-sliderWrapper-2-DX7",slider:"AvatarEditor-slider-1DyFR Slider-slider-2oLVT",help:"AvatarEditor-help-9JA7x",
avatarTextPane:"AvatarEditor-avatarTextPane-3QTnN",avatarActionButtons:"AvatarEditor-avatarActionButtons-29uxG",avatarFileInput:"AvatarEditor-avatarFileInput-2RZv1"}},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(7),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(11),m=n(6),y=(n.n(m),n(236)),b=n(371),I=n(1264),S=n(209),M=n(451),D=n(3584),C=Object(m.createSelector)(I.a,S.a,function(e,t){var n=e.oauthProviders,i=n.filter(function(e){
return e.linked}),r=1===i.length?i[0].authName:null;return p()({linkedOauthProviders:i.map(function(e){return e.label}).join(", "),lastLinkedAuthProviderID:r,returnUrl:window.location.href,isPollClient:Object(M.a)()},e,t)}),O={dispatchFetchOauthProviders:b.a,dispatchBeginPolling:y.b},j=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onLink=function(){
i.props.isPollClient&&i.props.dispatchBeginPolling({pinID:i.props.pinID})},r=n,l()(i,r)}return u()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchFetchOauthProviders()},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchOauthProviders,r()(e,["dispatchFetchOauthProviders"]));return v.a.createElement(D.a,p()({onLink:this.onLink},t))},t}(f.Component);t.a=Object(g.b)(C,O)(j)},function(e,t,n){"use strict";function i(e){
var t=e.isPollClient,n=e.returnUrl,i=e.hasPassword,r=e.linkedOauthProviders,o=e.isOauthProvidersPending,l=e.isOauthProvidersPopulated,u=e.oauthProvidersError,d=e.lastLinkedAuthProviderID,m=e.onCreatePassword,y=e.onLink,S=c()(e,["isPollClient","returnUrl","hasPassword","linkedOauthProviders","isOauthProvidersPending","isOauthProvidersPopulated","oauthProvidersError","lastLinkedAuthProviderID","onCreatePassword","onLink"]),M=void 0;return M=o?s()("span",{className:b.a.dim
},void 0,Object(h.default)("Loading\u2026")):u?s()("span",{className:b.a.dim},void 0,Object(h.default)("Error")):r||s()("span",{className:b.a.dim},void 0,Object(h.default)("None")),p.a.createElement(v.a,a()({},S,{closedNode:M,showButton:!1}),s()(f.a,{},void 0,Object(h.default)("Linked Accounts")),s()("div",{className:b.a.description
},void 0,Object(h.default)("You can link your Google or Facebook account to simplify signing in to Plex."),t&&I),l&&e.oauthProviders&&e.oauthProviders.map(function(e){return s()(g.a,{isUnlinking:o,hasPassword:i,isLastLinkedAccount:d===e.authName,providerID:e.providerID,url:e.url,returnUrl:n,onCreatePassword:m,onLink:y},e.url)}))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(4),f=n(133),v=n(308),g=n(3585),m=n(3588),y=n(3589),b=n.n(y),I=s()(m.a,{});t.a=i
},function(e,t,n){"use strict";function i(){var e=Object(m.createSelector)(function(e,t){return t.url},C.a,function(e,t){return t.oauthProviders.find(function(t){return t.url===e})});return Object(m.createSelector)(function(e,t){return{url:t.url}},function(e,t){return t.returnUrl},Object(D.a)("email"),Object(D.a)("authToken"),e,j.a,function(e,t,n,i,r,a){var o=(a.authToken,h()(a,["authToken"])),s=!r.linked&&(r.isUnlinking||Object(I.a)()&&!a.code||a.isBusy);return d()({},r,{
isPollClient:Object(I.a)(),userAuthToken:i,email:n,providerID:r.authName,originalUrl:r.url,url:Object(b.a)(r.url,t),metricsProperties:e,isDisabled:s},o)})}var r=n(8),a=n.n(r),o=n(9),s=n.n(o),l=n(10),c=n.n(l),u=n(7),d=n.n(u),p=n(13),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(6),y=(n.n(m),n(11)),b=n(1265),I=n(451),S=n(371),M=n(236),D=n(423),C=n(1264),O=n(380),j=n(209),P=n(3586),w={dispatchUnlinkOauthProvider:S.c,dispatchPreloadPIN:M.c},T=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.onUnlink=function(){i.props.dispatchUnlinkOauthProvider({url:i.props.originalUrl})},i.onStillTherePress=function(){i.props.dispatchPreloadPIN()},r=n,s()(i,r)}return c()(t,e),t.prototype.render=function(){var e=this.props,t=(e.dispatchUnlinkOauthProvider,h()(e,["dispatchUnlinkOauthProvider"]));return g.a.createElement(O.a,d()({component:P.a},t,{onUnlink:this.onUnlink,
onStillTherePress:this.onStillTherePress}))},t}(v.Component);t.a=Object(y.b)(i,w)(T)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(35),v=n(65),g=n(199),m=(n(806),n(47)),y=n(22),b=n(154),I=n(3587),S=n.n(I),M={facebook:S.a.buttonFacebook,google:S.a.buttonGoogle},D=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onUnlinkPress=function(e){
!r.props.hasPassword&&r.props.isLastLinkedAccount?r.setState({isUnlinkOauthProviderModalOpen:!0}):r.props.onCreatePassword(e)},r.onUnlinkCancel=function(){r.setState({isUnlinkOauthProviderModalOpen:!1})},r.state={isUnlinkOauthProviderModalOpen:!1},r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isUnlinking&&!e.isUnlinking&&this.setState({isUnlinkOauthProviderModalOpen:!1})},t.prototype.render=function(){
var e=this.props,t=e.to,n=e.isPollClient,i=e.isBusy,a=e.code,o=e.providerID,s=e.metricsProperties,l=e.isDisabled,c=e.isLastLinkedAccount,u=e.hasPassword,d=e.label,p=e.linked,I=e.onUnlink,D=e.onLink,C=e.onCreatePassword,O=e.onStillTherePress,j=this.state.isUnlinkOauthProviderModalOpen,P=p,w=!p&&!l,T=!(w||i||a||P),E=P||w||T,x=!u&&c,N=x?this.onUnlinkPress:I;return r()("div",{className:p?S.a.rowLinked:S.a.rowUnlinked},void 0,r()(m.a,{className:M[o],isDisabled:l,onPress:w?D:N
}),p?Object(h.default)("Your {oauthProvider} account is linked",{oauthProvider:d}):Object(h.default)("Your {oauthProvider} account is not linked",{oauthProvider:d}),E&&r()("span",{className:S.a.separator},void 0,"\u2014"),P&&r()(y.a,{kind:v.PRIMARY,isDisabled:l,onPress:N},void 0,Object(h.default)("Unlink")),x&&r()(b.a,{isConfirmButtonSpinning:l,isCancelButtonDisabled:l,isOpen:j,metricsPage:f.u,metricsProperties:s,title:Object(h.default)("Unlink {oauthProvider}",{oauthProvider:d}),
message:Object(h.default)("To unlink, first set a password to use when signing in"),confirmLabel:Object(h.default)("Set Password"),kind:v.DANGER,onConfirm:C,onCancel:this.onUnlinkCancel}),w&&r()(y.a,{kind:v.PRIMARY,to:t,target:n?"_blank":null,onPress:D},void 0,Object(h.default)("Link")),T&&r()(g.a,{message:Object(h.default)("Account linking timed out. {openLink}Try again?{closeLink}"),tags:[{open:"openLink",close:"closeLink",component:y.a,kind:v.PRIMARY,onPress:O}]}))},t}(p.Component);t.a=D
},function(e,t){e.exports={row:"LinkedAccount-row-B2dK4",rowLinked:"LinkedAccount-rowLinked-1oGBH LinkedAccount-row-B2dK4",rowUnlinked:"LinkedAccount-rowUnlinked-1CEr_ LinkedAccount-row-B2dK4",separator:"LinkedAccount-separator-2K5SK",button:"LinkedAccount-button-2xPPX",buttonGoogle:"LinkedAccount-buttonGoogle-3vahJ LinkedAccount-button-2xPPX",buttonFacebook:"LinkedAccount-buttonFacebook-1qn9Y LinkedAccount-button-2xPPX"}},function(e,t,n){"use strict"
;var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=(n.n(u),n(11)),p=n(236),h=n(1266),f=n(209),v={dispatchPreloadPIN:p.c,dispatchStopPolling:p.g,dispatchNavigateRefresh:h.b},g=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchPreloadPIN()},t.prototype.componentDidUpdate=function(e){
this.props.authToken!==e.authToken&&this.props.authToken&&this.props.dispatchNavigateRefresh()},t.prototype.componentWillUnmount=function(){this.props.dispatchStopPolling()},t.prototype.render=function(){return null},t}(u.Component);t.a=Object(d.b)(f.a,v)(g)},function(e,t){e.exports={description:"LinkedAccounts-description-JKP8i",dim:"LinkedAccounts-dim-2wlJA"}},function(e,t){e.exports={description:"AccountPage-description-2EgbI",header:"AccountPage-header-CjwDC SettingsPageHeader-header-1ugtI",
dash:"AccountPage-dash-3elb4",badge:"AccountPage-badge-1cMoO",textBadge:"AccountPage-textBadge-21mVe"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(56)),s=n(237),l=n(66),c=n(3592),u=r()(l.a,{},void 0,r()(s.a,{selectedKey:"plex-cloud"}),r()(c.a,{})),d=o.a.extend({component:function(){return u}});t.a=d},function(e,t,n){"use strict";var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(7),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(11),v=n(6),g=(n.n(v),
n(52)),m=n(232),y=n(753),b=n(754),I=n(1122),S=n(371),M=n(3593),D=Object(v.createSelector)(y.a,I.a,b.a,Object(m.a)(g.i),function(e,t,n,i){var r=t.isOauthProvidersPopulated,a=t.oauthProviders,o=r&&a.filter(function(e){return e.linked}),s=o&&1===o.length&&o[0];return u()({},t,{lastLinkedProviderUrl:s?s.url:null,hasOwnedPersonalCloudServer:!!e,isUnauthorized:!n.cpms,hasTypeFirstSettings:i})}),C={dispatchFetchOauthProviders:S.a},O=function(e){function t(){return r()(this,t),
o()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchFetchOauthProviders()},t.prototype.render=function(){return h.a.createElement(M.a,this.props)},t}(p.Component);t.a=Object(f.b)(D,C)(O)},function(e,t,n){"use strict";function i(e){var t=e.hasOwnedPersonalCloudServer,n=e.isUnauthorized,i=e.oauthProviders,r=e.isOauthProvidersPending,o=e.isOauthProvidersPopulated,l=e.oauthProvidersError,c=e.lastLinkedProviderUrl,f=e.hasTypeFirstSettings
;return n?s()(m.a,{title:Object(d.default)("You're not supposed to be here"),description:Object(d.default)("You don't have access to Plex Cloud settings")}):s()(v.a,{metricsPage:p.a,metricsPane:"plexCloud"},void 0,s()(g.a,{},void 0,Object(d.default)("Plex Cloud")),t&&I,r&&!o&&S,o&&i.map(function(e){return u.a.createElement(y.a,a()({key:e.url,
unlinkConfirmMessage:c===e.url?Object(d.default)("If you unlink {personalCloudServerProvider}, all of your Plex Cloud libraries, shares, and metadata will be deleted! However, your media files will not be affected. This cannot be undone.",{personalCloudServerProvider:e.label}):Object(d.default)("Plex Cloud will no longer be able to access media stored on this provider and it will be removed from your library."),
unlinkAccordMessage:c===e.url?Object(d.default)("Yes, unlink {personalCloudServerProvider}",{personalCloudServerProvider:e.label}):null,returnUrl:t?Object(h.default)("#!/account/plex-cloud",f):"#!/cpms"},e))}),l&&Object(d.default)("An error occurred retrieving cloud storage providers. Please try again."))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(4),p=n(35),h=n(444),f=n(1267),v=n(207),g=n(208),m=n(126),y=n(3595),b=n(3597),I=s()(b.a,{}),S=s()(f.a,{});t.a=i
},function(e,t){e.exports={spinnerContainer:"SettingsPageLoadingSpinner-spinnerContainer-oodfM"}},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=n.n(h),v=n(0),g=n.n(v),m=n(11),y=n(6),b=(n.n(y),n(1265)),I=n(371),S=(n(806),n(3596)),M=Object(y.createSelector)(function(e,t){return t.url},function(e,t){return t.returnUrl},function(e,t){return{url:t.url}},function(e,t,n){return{originalUrl:e,url:Object(b.a)(e,t),
metricsProperties:n}}),D={dispatchUnlinkOauthProvider:I.c},C=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onUnlink=function(){i.props.dispatchUnlinkOauthProvider({url:i.props.originalUrl})},r=n,u()(i,r)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.url,n=e.metricsProperties,i=(e.dispatchUnlinkOauthProvider,
o()(e,["url","metricsProperties","dispatchUnlinkOauthProvider"]));return g.a.createElement(S.a,r()({},i,{url:t,metricsProperties:n,onUnlink:this.onUnlink}))},t}(v.Component),O=Object(m.b)(M,D)(C);O.propTypes={url:f.a.string.isRequired,returnUrl:f.a.string.isRequired},t.a=O},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(35),v=n(65),g=(n(806),
n(22)),m=n(133),y=n(154),b=n(450),I=n(791),S=n(792),M=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onUnlinkPress=function(){r.setState({isUnlinkOauthProviderModalOpen:!0})},r.onUnlinkCancel=function(){r.setState({isUnlinkOauthProviderModalOpen:!1})},r.state={isUnlinkOauthProviderModalOpen:!1},r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isUnlinking&&!e.isUnlinking&&this.setState({isUnlinkOauthProviderModalOpen:!1})},
t.prototype.render=function(){var e=this.props,t=e.unlinkConfirmMessage,n=e.unlinkAccordMessage,i=e.isUnlinking,a=e.label,o=e.linked,s=e.nickname,l=e.url,c=e.metricsProperties,u=e.onUnlink,d=this.state.isUnlinkOauthProviderModalOpen;return r()(b.a,{},l,r()(I.a,{},void 0,o&&r()(g.a,{kind:v.PRIMARY,to:l},void 0,Object(h.default)("Reauthorize")),o&&r()(g.a,{isDisabled:i,kind:v.PRIMARY,onPress:this.onUnlinkPress},void 0,Object(h.default)("Unlink")),o&&r()(y.a,{isConfirmButtonSpinning:i,
isCancelButtonDisabled:i,isOpen:d,metricsPage:f.u,metricsProperties:c,title:Object(h.default)("Unlink {oauthProvider}",{oauthProvider:a}),message:t,accordMessage:n,confirmLabel:Object(h.default)("Unlink"),kind:v.DANGER,onConfirm:u,onCancel:this.onUnlinkCancel}),!o&&r()(g.a,{kind:v.PRIMARY,to:l},void 0,Object(h.default)("Link"))),r()(S.a,{},void 0,r()(m.a,{},void 0,a),s||Object(h.default)("No account linked")))},t}(p.Component);t.a=M},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(11),m=n(6),y=(n.n(m),n(34)),b=n(548),I=n(372),S=n(258),M=n(3598),D=Object(m.createSelector)(b.a,function(e){if(!e)return{};var t=e.desktop,n=t.personalCloudServerStatus;return{isError:!!t.personalCloudServerStatusError,isPending:t.isPersonalCloudServerStatusPending,isRunning:!(!n||!n.running),isRestarting:t.isPersonalCloudServerRestarting}}),C={
dispatchFetchPersonalCloudServerStatus:I.b,dispatchRestartPersonalCloudServer:S.l},O=function(e){function t(){var n,i,r;l()(this,t);for(var a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=i=u()(this,e.call.apply(e,[this].concat(o))),i.onRestartPress=function(e){Object(y.a)(function(){i.props.dispatchRestartPersonalCloudServer()})},r=n,u()(i,r)}return p()(t,e),t.prototype.componentDidMount=function(){var e=this;Object(y.a)(function(){
e.props.dispatchFetchPersonalCloudServerStatus()})},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchPersonalCloudServerStatus,e.dispatchRestartPersonalCloudServer,o()(e,["dispatchFetchPersonalCloudServerStatus","dispatchRestartPersonalCloudServer"]));return v.a.createElement(M.a,r()({},t,{onRestartPress:this.onRestartPress}))},t}(f.Component);t.a=Object(g.b)(D,C)(O)},function(e,t,n){"use strict";function i(e){
var t=e.isError,n=e.isPending,i=e.isRunning,r=e.isRestarting,o=e.onRestartPress,s=void 0;return s=i?Object(l.default)("Active"):t?Object(l.default)("Error checking server status"):Object(l.default)("Sleeping"),a()(f.a,{},void 0,a()(v.a,{},void 0,r?m:a()(p.a,{kind:u.PRIMARY,onPress:o},void 0,Object(l.default)("Restart Plex Cloud"))),a()(g.a,{},void 0,a()(h.a,{},void 0,Object(l.default)("Plex Cloud Server")),n?y:s))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(4)),c=n(61),u=n(65),d=n(39),p=n(22),h=n(133),f=n(450),v=n(791),g=n(792),m=a()(d.a,{size:c.SMALL}),y=a()(d.a,{size:c.SMALL});t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(237)),s=n(3600),l=n(66),c=n(56),u=r()(l.a,{},void 0,r()(o.a,{selectedKey:"online-media-sources"}),r()(s.a,{})),d=c.a.extend({component:function(e){return u}});t.a=d},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(11)),f=n(6),v=(n.n(f),n(34)),g=n(1268),m=n(200),y=n(3602),b=Object(f.createSelector)(function(e){return e.ui.onlineMediaSourcesPage},m.a,function(e,t){return{isUnauthorized:t.restricted,availableProviders:e.availableProviders,optOutStatuses:e.optOutStatuses,isAvailableProvidersPending:e.isAvailableProvidersPending,availableProvidersError:e.availableProvidersError,isOptOutStatusesPending:e.isOptOutStatusesPending,optOutStatusesError:e.optOutStatusesError,isUpdatePending:e.isUpdatePending,
updateError:e.updateError}}),I={dispatchInitOnlineMediaSourcesPage:g.b,dispatchClearOnlineMediaSourcesUpdateError:g.a,dispatchUpdateOptOutStatuses:g.d},S=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onErrorDismiss=function(){i.props.dispatchClearOnlineMediaSourcesUpdateError()},i.onUpdateStatus=function(e){i.props.dispatchUpdateOptOutStatuses({optOutStatuses:e})},r=n,
l()(i,r)}return u()(t,e),t.prototype.componentDidMount=function(){var e=this;Object(v.a)(function(){e.props.dispatchInitOnlineMediaSourcesPage()})},t.prototype.render=function(){var e=this.props,t=e.isUnauthorized,n=e.isAvailableProvidersPending,i=e.availableProvidersError,a=e.isOptOutStatusesPending,o=e.optOutStatusesError,s=e.availableProviders,l=e.optOutStatuses,c=e.updateError,u=e.isUpdatePending;return r()(y.a,{isUnauthorized:t,loadSettingsError:!(!i&&!o),showSpinner:n||a,
availableProviders:s,optOutStatuses:l,isUpdatePending:u,updateError:c,onErrorDismiss:this.onErrorDismiss,onUpdateStatus:this.onUpdateStatus})},t}(p.Component);t.a=Object(h.b)(b,I)(S)},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({name:"AvailableProviderModel",context:["server"],rootPropertyName:"MediaProvider",syncedAttrs:{identifier:r.a.string,title:r.a.string}});t.a=a},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(5),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(4)),g=n(35),m=n(302),y=n(126),b=n(157),I=n(207),S=n(208),M=n(39),D=n(308),C=n(428),O=r()(b.a,{},void 0,r()(M.a,{})),j=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.createToggleHandler=function(e){return function(t){t.preventDefault();var n=r.state[e];r.props.updateError&&r.props.onErrorDismiss(),
r.setState(p.a.mapObject(r.state,function(t,i){return i===e&&!n}))}},r.state=r._getDefaultOpenStates(r.props.availableProviders),r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.props.showSpinner&&!e.showSpinner,n=this.props.isUpdatePending&&!e.isUpdatePending&&!e.updateError;(t||n)&&this.setState(this._getDefaultOpenStates(e.availableProviders))},t.prototype._getDefaultOpenStates=function(){
return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t){return e[t.identifier]=!1,e},{})},t.prototype._getOptOutStatus=function(e){var t=this.props.optOutStatuses;return t[e]?t[e]:"opt_out_managed"},t.prototype.render=function(){var e=this,t=this.props,n=t.isUnauthorized,i=t.loadSettingsError,a=t.showSpinner,o=t.availableProviders,s=t.isUpdatePending,l=t.updateError,c=t.onUpdateStatus,u=t.onErrorDismiss;if(n)return r()(y.a,{
title:Object(v.default)("You're not supposed to be here"),description:Object(v.default)("You don't have access to Online Media Sources")});if(i)return r()(m.a,{title:Object(v.default)("There was an unexpected error loading Online Media Sources")});if(a)return O;var d=[{opt_in:Object(v.default)("Enabled")},{opt_out:Object(v.default)("Disabled")},{opt_out_managed:Object(v.default)("Disabled for Managed Users")}];return r()(I.a,{metricsPage:g.a,metricsPane:"onlineMediaSources"
},void 0,r()(S.a,{},void 0,Object(v.default)("Online Media Sources")),o.map(function(t){var n=e._getOptOutStatus(t.identifier),i=d.find(function(e){return e[n]})[n];return r()(D.a,{closedNode:i,title:t.title,isOpen:e.state[t.identifier],isUpdating:s,errorMessage:l&&Object(v.default)("Unable to save settings"),onTogglePress:e.createToggleHandler(t.identifier),onUpdateStatus:c,onErrorDismiss:u,onSubmit:c},t.identifier,r()(C.a,{labelText:t.title,
helpText:Object(v.default)("Disabling {onlineMediaSource} will remove it from all Plex apps signed in with your account.",{onlineMediaSource:t.title}),name:t.identifier,initialValue:n,values:d}))}))},t}(f.Component);t.a=j},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(56)),s=n(237),l=n(66),c=n(3604),u=r()(l.a,{},void 0,r()(s.a,{selectedKey:"audio-subtitle-settings"}),r()(c.a,{})),d=o.a.extend({component:function(){return u}});t.a=d},function(e,t,n){"use strict"
;var i=n(11),r=n(6),a=(n.n(r),n(3605)),o=n(423),s=n(3606),l=Object(r.createSelector)(Object(o.a)("profile"),function(e){return e.ui.audioSubtitleSettingsPage},function(e,t){return{userProfile:e,isUpdatingUserProfile:t.isUpdatingUserProfile,updateUserProfileError:t.updateUserProfileError}}),c={onSubmit:a.b,onErrorDismiss:a.a};t.a=Object(i.b)(l,c)(s.a)},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return o})
;var i=n(36),r=n(82),a=Object(i.a)(r._12),o=Object(i.a)(r.f)},function(e,t,n){"use strict";function i(e){return a()(u.a,{metricsPage:c.a,metricsPane:"audioSubtitleSettings"},void 0,a()(d.a,{},void 0,Object(l.default)("Audio & Subtitle Settings")),a()("p",{},void 0,Object(l.default)("These settings determine how Plex will try to select audio and subtitle tracks when playing media in a Plex app while using your account.")),a()("p",{},void 0,a()(h.a,{kind:p.PRIMARY,
to:"https://support.plex.tv/hc/en-us/articles/204985278",target:"_blank"},void 0,Object(l.default)("Learn more"))),s.a.createElement(f.a,e))}var r=n(2),a=n.n(r),o=n(0),s=n.n(o),l=n(4),c=n(35),u=n(207),d=n(208),p=n(65),h=n(22),f=n(3607);t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(65),v=n(450),g=n(145),m=n(102),y=n(504),b=n(428),I=n(3608),S=n(3609),M=n.n(S),D=n(553),C=function(e){
function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onFormSubmit=function(e){e.autoSelectSubtitle&&(e.autoSelectSubtitle=parseInt(e.autoSelectSubtitle,10)),r.props.onSubmit(e)},r.onFormChange=function(e){var t=e.autoSelectAudio;t.value!==r.state.isAutoSelectAudio&&r.setState({isAutoSelectAudio:t.value}),r.props.onDirtyChange()},r.state={isAutoSelectAudio:n.userProfile.autoSelectAudio},r._autoSelectSubtitleOptions=[{0:Object(h.default)("Manually selected")},{
1:Object(h.default)("Shown with foreign audio")},{2:Object(h.default)("Always enabled")}],r._languageOptions=[{"":Object(h.default)("Select Language")}].concat(Object(I.a)()),r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.isDirty,n=e.isUpdatingUserProfile,i=e.updateUserProfileError,a=e.userProfile,o=e.onErrorDismiss,s=this.state.isAutoSelectAudio;return r()(g.b,{onSubmit:this.onFormSubmit,onChange:this.onFormChange},void 0,r()(v.a,{className:M.a.formSection,errorMessage:i,
onErrorDismiss:o},void 0,r()(y.a,{name:"autoSelectAudio",checkboxText:Object(h.default)("Automatically select audio and subtitle tracks"),initialValue:a.autoSelectAudio}),s&&r()(b.a,{labelText:Object(h.default)("Preferred audio language"),name:"defaultAudioLanguage",initialValue:a.defaultAudioLanguage,values:this._languageOptions}),s&&r()(b.a,{labelText:Object(h.default)("Preferred subtitle language"),name:"defaultSubtitleLanguage",initialValue:a.defaultSubtitleLanguage,
values:this._languageOptions}),s&&r()(b.a,{labelText:Object(h.default)("Auto-select subtitle mode"),name:"autoSelectSubtitle",initialValue:a.autoSelectSubtitle,values:this._autoSelectSubtitleOptions}),r()("div",{className:M.a.submitButton},void 0,r()(m.a,{type:"submit",kind:f.PRIMARY,isDisabled:!t,isSpinning:n},void 0,Object(h.default)("Save Changes")))))},t}(p.Component);t.a=Object(D.a)(C,{isUpdatingPropName:"isUpdatingUserProfile",errorPropName:"updateUserProfileError"})},function(e,t,n){
"use strict";function i(){return a()(o.b).filter(function(e){return 2===e.length&&-1===o.a.indexOf(e)}).map(function(e){var t;return t={},t[e]=o.b[e],t})}t.a=i;var r=n(50),a=n.n(r),o=n(426)},function(e,t){e.exports={formSection:"AudioSubtitleSettingsForm-formSection-2OFZr",submitButton:"AudioSubtitleSettingsForm-submitButton-fWGSg"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(56)),s=n(237),l=n(66),c=n(3611),u=r()(l.a,{},void 0,r()(s.a,{selectedKey:"webhooks"
}),r()(c.a,{})),d=o.a.extend({component:function(){return u}});t.a=d},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(7),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(11),m=n(6),y=(n.n(m),n(52)),b=n(200),I=n(232),S=n(440),M=n(3612),D=n(5),C=n.n(D),O=Object(m.createSelector)(b.a,Object(I.a)(y.j),function(e,t){
var n=C.a.pick(e.desktop,["webhooks","isWebhooksPending","isWebhooksPopulated","webhooksError","isUpdatingWebhooks","isRemovingWebhooks","updateWebhooksError"]);return p()({},n,{isUnauthorized:!t})}),j={dispatchFetchWebhooks:S.e,onAddWebhookPress:function(){return Object(S.a)()},onErrorDismiss:S.c,onRemove:function(e){return Object(S.f)(e)},onSubmit:function(e,t){return Object(S.g)({oldUrl:e,newUrl:t})},onToggle:function(){return Object(S.f)("")}},P=function(e){function t(){return o()(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,r()(e,["dispatchFetchWebhooks"]));return v.a.createElement(M.a,t)},t}(f.Component);t.a=Object(g.b)(O,j)(P)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(5),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),
n(4)),g=n(35),m=n(65),y=n(1267),b=n(207),I=n(208),S=n(126),M=n(3613),D=n(47),C=n(22),O=n(154),j=n(3615),P=n.n(j),w=r()(y.a,{}),T=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onToggle=function(e){var t=r.state.openFormSectionIndex===e;r.props.onErrorDismiss(),r.props.onToggle(),r.setState({openFormSectionIndex:t?null:e})},r.onRemove=function(e){r.setState({removeWebhookModalURL:e,isRemoveWebhookModalOpen:!0})},r.onSubmit=function(e,t){e===t?(r.setState({
openFormSectionIndex:null}),r.props.onToggle()):r.props.onSubmit(e,t)},r.onRemoveWebhookConfirmPress=function(e){var t=r.state.removeWebhookModalURL;r.props.onRemove(t)},r.onRemoveWebhookCancelPress=function(e){r.setState({isRemoveWebhookModalOpen:!1})},r.state={openFormSectionIndex:null,isRemoveWebhookModalOpen:!1},r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){!e.isRemovingWebhooks&&this.props.isRemovingWebhooks&&this.setState({openFormSectionIndex:null,
isRemoveWebhookModalOpen:!1});var t=e.webhooks===this.props.webhooks?-1:p.a.findIndex(e.webhooks,function(e){return""===e.url}),n=-1!==t,i=!e.isUpdatingWebhooks&&!e.updateWebhooksError&&this.props.isUpdatingWebhooks;n?this.setState({openFormSectionIndex:t}):i&&this.setState({openFormSectionIndex:null})},t.prototype.render=function(){
var e=this,t=this.props,n=t.isUnauthorized,i=t.isWebhooksPending,a=t.isWebhooksPopulated,o=t.webhooksError,s=t.isUpdatingWebhooks,l=t.isRemovingWebhooks,c=t.updateWebhooksError,u=t.webhooks,d=t.onAddWebhookPress,h=t.onErrorDismiss,f=this.state,y=f.openFormSectionIndex,j=f.removeWebhookModalURL,T=f.isRemoveWebhookModalOpen;if(n)return r()(S.a,{title:Object(v.default)("You're not supposed to be here"),description:Object(v.default)("You don't have access to webhooks settings")})
;var E=u&&u.length,x=u&&p.a.find(u,function(e){return""===e.url}),N=a&&u&&E<5&&!x;return r()(b.a,{metricsPage:g.a,metricsPane:"webhooks"},void 0,r()(I.a,{},void 0,Object(v.default)("Webhooks")),r()("p",{},void 0,Object(v.default)("Plex Media Server will make requests to these webhooks on various media playback events.")),r()("p",{},void 0,r()(C.a,{kind:m.PRIMARY,to:"https://support.plex.tv/hc/en-us/articles/115002267687",target:"_blank"
},void 0,Object(v.default)("Learn more"))),i&&!a&&w,a&&!!E&&u.map(function(t,n){var i=y===n;return r()(M.a,{index:n,url:t.url,isOpen:i,isUpdating:i&&s,isRemoving:i&&l,error:i?c:null,onErrorDismiss:h,onRemove:e.onRemove,onToggle:e.onToggle,onSubmit:e.onSubmit},n)}),N&&r()("div",{className:P.a.buttons},void 0,r()(D.a,{kind:m.PRIMARY,onPress:d},void 0,Object(v.default)("Add webhook"))),o&&Object(v.default)("An error occurred retrieving webhooks. Please try again."),r()(O.a,{
isConfirmButtonSpinning:l,isCancelButtonDisabled:l,isOpen:T,metricsPage:g.t,title:Object(v.default)("Remove Webhook"),message:Object(v.default)("Plex will no longer post updates to {url}.",{url:j}),confirmLabel:Object(v.default)("Remove"),kind:m.DANGER,onConfirm:this.onRemoveWebhookConfirmPress,onCancel:this.onRemoveWebhookCancelPress}))},t}(f.Component);t.a=T},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),
n(4)),f=n(329),v=n(1263),g=n(65),m=n(1201),y=n(503),b=n(102),I=n(145),S=n(133),M=n(3614),D=n.n(M),C=n(553),O=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),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)},r=n,l()(i,r)}return u()(t,e),
t.prototype.render=function(){var e=this.props,t=e.isDirty,n=e.isOpen,i=e.isUpdating,a=e.isRemoving,o=e.url,s=e.error,l=e.onDirtyChange,c=e.onErrorDismiss,u=i||a;return r()(m.a,{isOpen:n,closedNode:r()("div",{},void 0,r()(S.a,{className:D.a.label},void 0,Object(h.default)("URL")),o),errorMessage:Object(f.a)(s),onErrorDismiss:c,onTogglePress:this.onTogglePress},void 0,r()(I.b,{onSubmit:this.onSubmit,onChange:l},void 0,r()(y.a,{focusOnMount:!0,selectTextOnFocus:!0,
labelText:Object(h.default)("URL"),isDisabled:u,name:"url",initialValue:o,validations:o?[v.f]:[]}),r()("div",{className:D.a.buttons},void 0,o&&r()(b.a,{className:D.a.dangerButton,kind:g.DANGER,isSpinning:a,isDisabled:u,onPress:this.onRemovePress},void 0,Object(h.default)("Remove")),r()(b.a,{className:D.a.button,type:"submit",kind:g.PRIMARY,isSpinning:i,isDisabled:u||!t},void 0,Object(h.default)("Save Changes")))))},t}(p.Component);t.a=Object(C.a)(O,{isUpdatingPropName:"isUpdating",
errorPropName:"error",clearDirtyOnChangePropName:"isOpen"})},function(e,t){e.exports={buttons:"WebhookFormSection-buttons-1bW9A",button:"WebhookFormSection-button-2hUeX",dangerButton:"WebhookFormSection-dangerButton-1Hm32",label:"WebhookFormSection-label-1llL2 FormLabel-label-2aLJ9 CloseableFormSection-isPressable-3BPTn"}},function(e,t){e.exports={buttons:"WebhooksSettingsPage-buttons-2wdUh"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),
n(56)),s=n(3617),l=n(66),c=r()(l.a,{},void 0,r()(s.a,{})),u=o.a.extend({component:function(){return c}});t.a=u},function(e,t,n){"use strict";var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(7),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(11),v=n(6),g=(n.n(v),n(19)),m=n(34),y=n(753),b=n(372),I=n(3618),S=Object(v.createSelector)(y.a,function(e){return e?"#!/server/"+e.machineIdentifier+"/dashboard":null}),M=Object(v.createSelector)(function(e){return e.ui.provisionPersonalCloudServerPage
},S,function(e,t){return u()({},e,{provisionPersonalCloudServerUrl:g.join(["https://plex.tv","/api/v2/cloud_server/provision"]),ownedPersonalCloudServerUrl:t})}),D={provisionPersonalCloudServer:b.e,populatePersonalCloudServerCache:b.d,connectToOwnedPersonalCloudServer:b.a},C=function(e){function t(){return r()(this,t),o()(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;Object(m.a)(function(){e.provisionPersonalCloudServer({url:t.props.provisionPersonalCloudServerUrl})})},t.prototype.render=function(){
return h.a.createElement(I.a,this.props)},t}(p.Component);t.a=Object(f.b)(M,D)(C)},function(e,t,n){"use strict";function i(e){var t=e.isProvisionPersonalCloudServerPending,n=e.provisionPersonalCloudServerError,i=e.isConnectToPersonalCloudServerPending,r=e.connectToPersonalCloudServerError,o=e.isPersonalCloudServerDriveCachePending,s=e.isPersonalCloudServerDriveCachePopulated,p=e.personalCloudServerDriveCacheError,g=e.ownedPersonalCloudServerUrl,m=Object(c.default)("Plex Cloud Setup")
;return t?a()(u.a,{title:m,description:Object(c.default)("Creating a new Plex Cloud server just for you!")},void 0,h):n?a()(u.a,{title:m,description:Object(c.default)("An error occurred creating your Plex Cloud server.")},void 0,a()(d.a,{to:"#!/dashboard",kind:l.b.PRIMARY},void 0,Object(c.default)("Continue"))):i?a()(u.a,{title:m,description:Object(c.default)("Your Plex Cloud server is waking up.")},void 0,f):r?a()(u.a,{title:m,
description:Object(c.default)("Your Plex Cloud server is taking longer than expected to wake up. Check again later.")},void 0,a()(d.a,{to:"#!/dashboard",kind:l.b.PRIMARY},void 0,Object(c.default)("Continue"))):o?a()(u.a,{title:m,description:Object(c.default)("Scanning your cloud storage. If you have lots of data, this may take a while.")},void 0,v):p?a()(u.a,{title:m,description:Object(c.default)("Scanning your cloud storage is taking longer than expected. Check again later.")},void 0,a()(d.a,{
to:"#!/dashboard",kind:l.b.PRIMARY},void 0,Object(c.default)("Continue"))):s?a()(u.a,{title:m,description:Object(c.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,a()(d.a,{to:g,kind:l.b.PRIMARY},void 0,Object(c.default)("Continue"))):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(24)),c=n(4),u=n(157),d=n(47),p=n(39),h=a()(p.a,{}),f=a()(p.a,{}),v=a()(p.a,{});t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"ALL",function(){return i}),n.d(t,"UNWATCHED",function(){return r}),n.d(t,"WATCHED",function(){return a});var i="all",r="unwatched",a="watched"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"WATCH_LATER",function(){return i}),n.d(t,"RECOMMENDED",function(){return r})
;var i="queue",r="recommendations"},function(e,t,n){"use strict";var i=n(23),r=n(1270),a=i.a.extend({name:"UserPlaylistItemCollection",context:["server","identifier","mediaTagPrefix","mediaTagVersion","containerKey","userPlaylistKey"],model:r.a});t.a=a},function(e,t,n){"use strict";function i(e){var t=e.get("key");if(t===g.a.keys.WATCH_LATER){e.server;return"#!/playlist/"+t+"/help"}}var r=n(3623),a=n.n(r),o=n(5),s=n.n(o),l=n(12),c=n.n(l),u=n(20),d=n(15),p=n(4),h=n(17),f=(n(19),
n(203)),v=n(3624),g=n(807),m=u.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"),(0,Object(d.d)("appStore").dispatch)(Object(f.a)({allowLightPreset:!1})),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,n=this.listModel.get("key")+"!subset",i=Object(d.d)("appModel").get("settings");t||(t=i.get(n)),t||(t="unwatched"),i.save(n,t),this.subset=t},serializeData:function(){var e=this.listModel.get("key");return{
label:this.listModel.get("label"),helpRoute:i(this.listModel),defaultTarget:"_blank",filters:[{title:Object(p.default)("All"),key:e,subset:"all"},{title:Object(p.default)("Unwatched"),key:e,subset:"unwatched"},{title:Object(p.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 v.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"),
c()(e.currentTarget).addClass("selected"),this.initSubset({subset:s.a.last(e.currentTarget.href.split("/"))}),this.list.show(new v.a({collection:this.subsets[this.subset]})),h.a.trigger("navigate","userPlaylist",{key:this.listModel.get("key"),subset:this.subset,trigger:!1})}});t.a=m},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i="";return i+=' <li><a class="'+p((n=e&&e.subset,
typeof n===d?n.apply(e):n))+'-btn btn-gray" href="#!/playlist/'+p((n=e&&e.key,typeof n===d?n.apply(e):n))+"/"+p((n=e&&e.subset,typeof n===d?n.apply(e):n))+'">'+p((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="'+p((n=e&&e.helpRoute,typeof n===d?n.apply(e):n))+'" target="'+p((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"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d="function",p=this.escapeExpression,h=this;return u+='<ul class="nav nav-header pull-right"> ',c=r.each.call(t,t&&t.filters,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+=" </ul> <h2> "+p(i(n(3)).call(t,t&&t.label,{hash:{},data:o}))+" ",c=r.if.call(t,t&&t.helpRoute,{hash:{},inverse:h.noop,fn:h.program(3,l,o),data:o}),(c||0===c)&&(u+=c),
u+=' </h2> <div class="user-playlist-container"></div> '})},function(e,t,n){"use strict";var i=n(63),r=n(3625),a=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(3626),r=n.n(i),a=n(5),o=n.n(a),s=n(15),l=n(32),c=n(60),u=n(1230),d=u.a.extend({template:r.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(){return u.a.prototype.serializeData.apply(this,arguments)},bindings:o.a.extend({},u.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(),Object(s.d)("appStore").dispatch(Object(c.k)({serverModel:this.model.server,metadataItemModel:this.model}))},onMarkWatchedClick:function(e){e.preventDefault(),l.a.execute("markWatched",{item:this.model})},onMarkUnwatchedClick:function(e){e.preventDefault(),l.a.execute("markUnwatched",{item:this.model})},onDeleteClick:function(e){e.preventDefault(),this.model.destroy()}});t.a=d},function(e,t,n){var i=n(14)
;e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,o,s="",l=this.escapeExpression;return s+='<a class="card card-user-playlist" href="',(o=n.url)?a=o.call(t,{hash:{},data:r}):(o=t&&t.url,a="function"==typeof o?o.call(t,{hash:{},data:r}):o),
s+=l(a)+'"> <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){"use strict";var i=n(3628),r=n.n(i),a=n(20),o=n(15),s=n(203),l=n(3629),c=a.a.Layout.extend({className:"container",template:r.a,regions:{list:".announcements-container"},initialize:function(){(0,Object(o.d)("appStore").dispatch)(Object(s.a)({allowLightPreset:!1}))},onRender:function(){this.list.show(new l.a({collection:this.collection}))}});t.a=c},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="";return s+="<h2>"+(0,this.escapeExpression)(i(n(3)).call(t,"Announcements",{hash:{},data:o}))+'</h2> <div class="announcements-container"></div> '})},function(e,t,n){"use strict";var i=n(63),r=n(3630),a=i.a.extend({className:"list announcement-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(3631),r=n.n(i),a=n(20),o=n(333),s=a.a.ItemView.extend({
className:"announcement-list-item",template:r.a,ui:{thumb:".thumb",unread:".unread"},initialize:function(){this.image=new o.a({url:this.model.get("imageUrl")})},onRender:function(){this.image.setElement(this.ui.thumb),this.model.markAsRead()},onClose:function(){this.image.close()}});t.a=s},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"hidden"}function l(e,t){var n,i=""
;return i+=' <h4><a href="'+h((n=e&&e.url,typeof n===p?n.apply(e):n))+'" target="_blank">'+h((n=e&&e.title,typeof n===p?n.apply(e):n))+'</a></h4> <a href="'+h((n=e&&e.url,typeof n===p?n.apply(e):n))+'" target="_blank"> <img class="thumb"/> </a> '}function c(e,t){var n,i="";return i+=" <h4>"+h((n=e&&e.title,typeof n===p?n.apply(e):n))+'</h4> <img class="thumb"/> '}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var u,d="",p="function",h=this.escapeExpression,f=this
;return d+='<div class="card card-announcement"> <div class="unread ',u=r.if.call(t,t&&t.read,{hash:{},inverse:f.noop,fn:f.program(1,s,o),data:o}),(u||0===u)&&(d+=u),d+='"></div> ',u=r.if.call(t,t&&t.url,{hash:{},inverse:f.program(5,c,o),fn:f.program(3,l,o),data:o}),(u||0===u)&&(d+=u),d+=' <div class="date">'+h(i(n(3632)).call(t,t&&t.notifyAt,{hash:{},data:o}))+'</div> <div class="description">',u=t&&t.content,u=typeof u===p?u.apply(t):u,(u||0===u)&&(d+=u),d+="</div> </div> "})},function(e,t,n){
var i=n(354).default,r=n(152);e.exports=r(i)},function(e,t,n){"use strict";var i=n(3634),r=n.n(i),a=n(5),o=n.n(a),s=n(20),l=n(4),c=n(38),u=n(49),d=n(17),p=n(3635),h=n.n(p),f=n(3636),v=n.n(f),g=n(3637),m=n.n(g),y=s.a.ItemView.extend({className:"container queue-help-container",template:r.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=h.a,this.modalText=Object(l.default)('Right click the "Plex It!" button and choose Add to Favorites so you can save videos to Watch Later.'),this.firstStepText=Object(l.default)("Add the button above to your favorites bar.")):(this.stepsImgSrc=v.a,
this.modalText=Object(l.default)('Drag the "Plex it!" button to your Bookmarks Bar so you can save videos to your Watch Later.'),this.firstStepText=Object(l.default)("Drag the button above to your bookmarks bar."));var t=["OSX","Windows","Linux"];if(-1!==o.a.indexOf(t,c.a.platform)){var n="OSX"===c.a.platform?Object(l.default)("\u2318 C"):Object(l.default)("Ctrl C");this.copyCommand=Object(l.default)("{1} to copy",n)}},serializeData:function(){return{queueEmail:this.queueEmail,
copyCommand:this.copyCommand,stepsImgSrc:this.stepsImgSrc,emailImgSrc:m.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:Object(l.default)("Plex It!"),message:this.modalText,confirmLabel:Object(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){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s,l="",c=this.escapeExpression;return l+="<h2>"+c(i(n(3)).call(t,"Watch Later Help",{hash:{},data:o
}))+'</h2> <div class="filter-bar"> <h4>'+c(i(n(3)).call(t,"Add videos from your browser",{hash:{},data:o
}))+'</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((s=t&&t.firstStepText,
"function"==typeof s?s.apply(t):s))+"</li> <li>"+c(i(n(3)).call(t,'To save a video to Watch Later, click "Plex It!" in your Bookmarks Bar.',{hash:{},data:o}))+"</li> <li>"+c(i(n(3)).call(t,"A panel will appear on the left side of the page to let you know the video has been saved.",{hash:{},data:o}))+"</li> <li>"+c(i(n(3)).call(t,'You can also recommend the video to friends or "fling" it to a Plex player and watch it there.',{hash:{},data:o
}))+'</li> </ol> </div> <div class="col-md-7 text-right"> <img class="plexit-img" src="'+c((s=t&&t.stepsImgSrc,"function"==typeof s?s.apply(t):s))+'"/> </div> </div> <div class="filter-bar"> <h4>'+c(i(n(3)).call(t,"Add videos by email",{hash:{},data:o}))+'</h4> </div> <div class="row text-muted"> <div class="col-md-5"> <div class="queue-email form-control input-lg disabled" title="'+c((s=t&&t.copyCommand,"function"==typeof s?s.apply(t):s))+'" tabindex="-1">'+c((s=t&&t.queueEmail,
"function"==typeof s?s.apply(t):s))+'</div> <ol class="steps-list"> <li>'+c(i(n(3)).call(t,"Send an email to the address above with any link(s) you want added to Watch Later.",{hash:{},data:o}))+"</li> <li>"+c(i(n(3)).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:o}))+'</li> </ol> </div> <div class="col-md-7 text-right"> <img class="email-links" src="'+c((s=t&&t.emailImgSrc,
"function"==typeof s?s.apply(t):s))+'"/> </div> </div> '})},function(e,t,n){e.exports=n.p+"desktop/common/img/queue/bookmarklet-steps-ie.e1c6fdac9ebb412b44c23020cdcd9732.png"},function(e,t,n){e.exports=n.p+"desktop/common/img/queue/bookmarklet-steps.3efabfa27f2ed5f581e1ea9b13c4e408.png"},function(e,t,n){e.exports=n.p+"desktop/common/img/queue/email-links.6297c2e03777223f23acafccfe90ebbc.png"},function(e,t,n){"use strict";var i=n(248),r=n(3639),a=i.a.extend({controller:new r.a,appRoutes:{
"!(/server/:serverID)/schedule":"schedule"}});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(19),a=n(249),o=n(3640),s=a.a.extend({schedule:function(e,t){this.populateView().done(function(){i.a.trigger("show:view",new o.a({selectedServerID:e,params:r.parseParams(t)}))})}});t.a=s},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(56)),s=n(138),l=n(66),c=n(234),u=n(235),d=n(3641),p=r()(s.a,{}),h=o.a.extend({component:function(e){var t=e.selectedServerID,n=e.params||{}
;return r()(l.a,{},void 0,p,r()(c.a,{machineIdentifier:t},void 0,r()(u.a,{},void 0,r()(d.a,{machineIdentifier:t,selectedViewType:n.view}))))}});t.a=h},function(e,t,n){"use strict";function i(){return Object(m.createSelector)(S.a,Object(M.a)(b.b.SUBSCRIBE),function(e,t){var n=t[0];if(n){var i=e[n];return i&&i.identifier}})}function r(){return Object(m.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e,t){return t.selectedViewType},Object(I.a)(),i(),D.a,function(e,t,n,i,r){
var a=e.isPagePopulated,o=e.isCalendarPopulated,s=e.calendarError,l=e.isMediaSubscriptionsPopulated,c=e.mediaSubscriptionsError,u=e.calendar,d=!o&&!s,p=!l&&!c,h=d||p,f=!h&&l&&!e.mediaSubscriptions.length&&o&&!u.scheduled.length;return{isPagePopulated:a,machineIdentifier:n.machineIdentifier,showSpinner:h,showEmptyState:f,programGuideIdentifier:i,time:u?u.time:void 0,selectedViewType:t||r.calendarViewType}})}var a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(7),p=n.n(d),h=n(1),f=(n.n(h),
n(0)),v=n.n(f),g=n(11),m=n(6),y=(n.n(m),n(34)),b=n(76),I=n(42),S=n(194),M=n(1193),D=n(100),C=n(453),O=n(106),j=n(3642),P=p()({saveExperienceSettings:O.h},C),w=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r._updateCalendar=function(){r.props.goToToday(),r.props.fetchCalendar(),r._resetUpdateTimeout()},r._updateTimeoutID=null,r}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;Object(y.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,36e5)},t.prototype._saveViewType=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props
;e.saveExperienceSettings({calendarViewType:e.selectedViewType})},t.prototype.render=function(){return this.props.isPagePopulated?v.a.createElement(j.a,this.props):null},t}(f.Component);t.a=Object(g.b)(r,P)(w)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(35),v=n(29),g=n(508),m=n(24),y=n(187),b=n(3643),I=n(3645),S=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return Object(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.machineIdentifier,n=e.selectedViewType;return r()(y.a,{metricsPage:f._1,metricsProperties:{pane:n},scrollDirection:m.d.NONE},void 0,r()(b.a,{machineIdentifier:t,selectedViewType:n}),h.a.createElement(I.a,this.props))},t}(p.Component);t.a=Object(g.a)(S)},function(e,t,n){"use strict";function i(e){
return e===m.c.AGENDA?Object(f.default)("Agenda View"):Object(f.default)("Calendar View")}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),n(4)),v=n(29),g=n(54),m=n(24),y=n(75),b=n(188),I=n(189),S=n(767),M=n(205),D=n(3644),C=a()(S.a,{}),O=function(e){function t(n,i){s()(this,t);var r=c()(this,e.call(this,n,i));return r.onViewsMenuButtonPress=function(e){r.setState({isViewsMenuOpen:!r.state.isViewsMenuOpen})},r.onViewsMenuClose=function(){
r.setState({isViewsMenuOpen:!1})},r.state={isViewsMenuOpen:!1},r._viewsMenuButtonID=Object(g.a)(),r}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.machineIdentifier,n=e.selectedViewType,r=this.state.isViewsMenuOpen;return a()(b.a,{},void 0,a()(I.a,{},void 0,a()("span",{},void 0,Object(f.default)("Recordings"),C),a()(M.a,{id:this._viewsMenuButtonID,title:i(n),hasMenu:!0,isMenuOpen:r,isSelected:!0,
onPress:this.onViewsMenuButtonPress}),a()(y.a,{target:this._viewsMenuButtonID,isOpen:r,onMenuClose:this.onViewsMenuClose},void 0,m.c.all.map(function(e){return a()(D.a,{machineIdentifier:t,selectedViewType:n,viewType:e},e,i(e))}))))},t}(h.Component);t.a=O},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.machineIdentifier,i=e.selectedViewType,r=e.viewType,o=encodeURIComponent(n);return a()(l.a,{to:"#!/server/"+o+"/schedule?view="+r,isSelected:i===r},void 0,t)}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(108));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.machineIdentifier,i=e.showSpinner,r=e.showEmptyState,o=e.programGuideIdentifier,s=e.selectedViewType;if(i)return I;if(r&&o){var p=encodeURIComponent(n),y=encodeURIComponent(o);return a()(h.a,{},void 0,a()(f.a,{icon:"plex-icon-calendar-560",title:Object(l.default)("You have no recordings scheduled")},void 0,a()("span",{className:b.a.emptyDescription
},void 0,a()(c.a,{message:Object(l.default)("Check out the {openLink}Guide{closeLink} to browse available programming"),tags:[{open:"openLink",close:"closeLink",component:d.a,kind:u.b.PRIMARY,to:"#!/server/"+p+"/provider/"+y}]}))))}return r&&!o?a()(h.a,{},void 0,a()(f.a,{icon:"plex-icon-calendar-560",title:Object(l.default)("You have no recordings scheduled"),description:Object(l.default)("You need a DVR before you can schedule recordings")})):a()("div",{className:b.a.schedulePageContent
},void 0,a()(h.a,{innerClassName:b.a.schedulePageInnerContent},void 0,s===u.c.CALENDAR&&a()(g.a,{serverEntityID:t}),s===u.c.AGENDA&&a()(m.a,{serverEntityID:t})),a()(v.a,{serverEntityID:t,machineIdentifier:n,providerID:o}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(199),u=n(24),d=n(22),p=n(39),h=n(261),f=n(182),v=n(3646),g=n(3661),m=n(3686),y=n(3695),b=n.n(y),I=a()(h.a,{},void 0,a()(f.a,{},void 0,a()(p.a,{})));t.a=i},function(e,t,n){"use strict";function i(){
return Object(g.createSelector)(function(e){return e.ui.recordingSchedulePage},Object(y.a)(),function(e,t){var n=e.mediaSubscriptions,i=e.isMediaSubscriptionsPopulated,r=e.mediaSubscriptionsError,a=i&&!r&&!n.length;return{providerEntityID:t,mediaSubscriptionEntityIDs:n,showError:!i&&!!r,showEmptyState:a}})}var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(34)),y=n(1273),b=n(453),I=n(3647),S=function(e){function t(n,i){
s()(this,t);var r=c()(this,e.call(this,n,i));return r.onSubscriptionDragMove=function(e){r.setState({moveIndex:e})},r.onSubscriptionDragEnd=function(e,t){var n=r.state.moveIndex;t&&null!=n&&Object(m.a)(function(){r.props.moveMediaSubscription(a()({},e,{moveIndex:n}))}),r.setState({moveIndex:null})},r.state={moveIndex:null},r}return d()(t,e),t.prototype.render=function(){return f.a.createElement(I.a,a()({moveIndex:this.state.moveIndex,onSubscriptionDragMove:this.onSubscriptionDragMove,
onSubscriptionDragEnd:this.onSubscriptionDragEnd},this.props))},t}(h.Component);t.a=Object(v.b)(i,{moveMediaSubscription:b.moveMediaSubscription})(S)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.mediaSubscriptionEntityIDs,r=e.showError,o=e.showEmptyState,s=e.moveIndex,v=e.machineIdentifier,m=e.providerID,y=e.onSubscriptionDragMove,b=e.onSubscriptionDragEnd,I=encodeURIComponent(v),S=encodeURIComponent(m);return a()("div",{className:g.a.pane
},void 0,a()("div",{className:g.a.paneHeader},void 0,Object(l.default)("Recording Priority")),a()(p.a,{className:g.a.paneScroller,autoScroll:!0},void 0,r&&a()("div",{className:g.a.error},void 0,a()("div",{},void 0,Object(l.default)("There was an error loading recordings.")),a()("div",{},void 0,Object(l.default)("Please try again."))),o&&a()("div",{className:g.a.empty},void 0,a()("div",{},void 0,Object(l.default)("You have no recordings scheduled.")),a()("div",{},void 0,a()(c.a,{
message:Object(l.default)("Check out the {openLink}Guide{closeLink} to browse available programming."),tags:[{open:"openLink",close:"closeLink",component:d.a,kind:u.b.PRIMARY,to:"#!/server/"+I+"/provider/"+S}]}))),!r&&!o&&i.map(function(e,i){var r=null!=s,o=r&&s===i,l=r&&s===i+1;return a()(h.a,{serverEntityID:t,providerEntityID:n,mediaSubscriptionEntityID:e,isDraggingBefore:o,isDraggingAfter:l,sortIndex:i,onSubscriptionDragMove:y,onSubscriptionDragEnd:b},e)})),a()(f.a,{serverEntityID:t,
providerEntityID:n}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(199),u=n(24),d=n(22),p=n(80),h=n(3648),f=n(3658),v=n(3660),g=n.n(v);t.a=i},function(e,t,n){"use strict";function i(e,t){return{connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}}function r(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver()}}var a=n(2),o=n.n(a),s=n(8),l=n.n(s),c=n(9),u=n.n(c),d=n(10),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),
n(84)),g=(n.n(v),n(227)),m=(n.n(g),n(432)),y=(n.n(m),n(29)),b=n(293),I=n(348),S=n(1274),M=n(3657),D=n.n(M),C={beginDrag:function(e){return{mediaSubscriptionEntityID:e.mediaSubscriptionEntityID}},endDrag:function(e,t,n){e.onSubscriptionDragEnd(t.getItem(),t.didDrop())}},O={hover:function(e,t,n){var i=Object(v.findDOMNode)(n).getBoundingClientRect(),r=(i.bottom-i.top)/2,a=t.getClientOffset(),o=a.y-i.top,s=e.sortIndex,l=o>r?s+1:s;e.onSubscriptionDragMove(l)}},j=function(e){function t(){
return l()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.componentDidMount=function(){this.props.connectDragPreview(Object(m.getEmptyImage)())},t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.mediaSubscriptionEntityID,r=e.isDragging,a=e.isDraggingBefore,s=e.isDraggingAfter,l=e.isOver,c=e.connectDropTarget,u=e.connectDragSource;return c(o()("div",{
className:(D.a.dragSource||"")+" "+(r&&I.c||"")+" "+(a&&l&&I.e||"")+" "+(s&&l&&I.d||""||"")},void 0,o()(S.a,{serverEntityID:t,providerEntityID:n,mediaSubscriptionEntityID:i,connectDragSource:u})))},t}(f.Component);t.a=Object(g.DropTarget)(b.d,O,r)(Object(g.DragSource)(b.d,C,i)(j))},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.mediaSubscriptionEntityID},a.a,function(e,t){return t[e]})}t.a=i;var r=n(6),a=(n.n(r),n(726))},function(e,t,n){
"use strict";function i(e){var t=void 0;switch(e){case"movie":t=[O.a,P.a];break;case"show":t=[O.a,x.a];break;case"episode":t=[j.a,w.a];break;case"playlist":t=[O.a,x.a];break;default:t=[O.a]}return t.push(N.a),t}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(8),d=n.n(u),p=n(9),h=n.n(p),f=n(10),v=n.n(f),g=n(1),m=(n.n(g),
n(0)),y=n.n(m),b=n(29),I=n(121),S=n(26),M=n(22),D=n(296),C=n(256),O=n(517),j=n(730),P=n(1030),w=n(713),T=n(231),E=n(3651),x=n(3653),N=n(3655),A=n(3656),L=n.n(A),k=function(e){function t(n,i){d()(this,t);var r=h()(this,e.call(this,n,i));return r.onLinkPress=function(e){r.setState({isSubscribeModalOpen:!0})},r.onSubscribeModalClose=function(){r.setState({isSubscribeModalOpen:!1})},r.state={isSubscribeModalOpen:!1},r}return v()(t,e),t.prototype.shouldComponentUpdate=function(e,t){
return Object(b.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,r=e.mediaSubscriptionEntityID,o=e.type,l=e.subtype,u=e.thumb,d=e.grandparentThumb,p=e.connectDragSource,h=c()(e,["serverEntityID","providerEntityID","mediaSubscriptionEntityID","type","subtype","thumb","grandparentThumb","connectDragSource"]),f=this.state.isSubscribeModalOpen,v="playlist"===o?"show":o;return s()("div",{className:L.a.subscription},void 0,s()(M.a,{
className:L.a.link,onPress:this.onLinkPress},void 0,s()("div",{className:L.a.linkContainer},void 0,s()(D.a,{className:L.a.posterContainer,serverEntityID:t,providerEntityID:n,component:C.a,type:v,width:48,height:Object(I.d)(48,v,l),url:d||u}),s()("div",{className:L.a.titleContainer},void 0,i(o).map(function(e,t){return y.a.createElement(E.a,a()({key:t,component:e,isSecondary:t>0,type:o},h))})))),p(s()("div",{className:L.a.dragHandle},void 0,s()(S.a,{className:L.a.dragIcon,
name:"plex-icon-reorder-560"})),{dropEffect:"copy"}),s()(T.a,{isOpen:f,serverEntityID:t,providerEntityID:n,mediaSubscriptionEntityID:r,subscriptionType:o,onModalClose:this.onSubscribeModalClose}))},t}(m.Component);k.defaultProps={connectDragSource:function(e){return e}},t.a=k},function(e,t,n){"use strict";function i(e){var t=e.component,n=e.isSecondary,i=s()(e,["component","isSecondary"]);return u.a.createElement(t,a()({className:n?p.a.secondaryTitle:p.a.title},i))}
var r=n(7),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(3652),p=n.n(d);t.a=i},function(e,t){e.exports={title:"RecordingPrioritySubscriptionTitle-title-3QS81",secondaryTitle:"RecordingPrioritySubscriptionTitle-secondaryTitle-2Wl5u"}},function(e,t,n){"use strict";function i(e){if("show"===e)return Object(c.default)("Series")}function r(e){var t=e.className,n=e.type;return o()("span",{className:t},void 0,o()(u.a,{className:p.a.seriesIcon,name:"plex-icon-dvr-series-560"}),i(n))}
var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(4)),u=n(26),d=n(3654),p=n.n(d);t.a=r},function(e,t){e.exports={seriesIcon:"RecordingPrioritySubscriptionSeriesTitle-seriesIcon-1yyj_"}},function(e,t,n){"use strict";function i(e,t,n){return e?Object(d.a)(e,t)?Object(c.default)("Airing now"):Object(u.a)(e,null,{timeFormat:n}):Object(c.default)("No upcoming airings")}function r(e){var t=e.className,n=e.beginsAt,r=e.endsAt,a=e.timeFormat,s=i(n,r,a);return o()("span",{className:t},void 0,s)}
var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(4)),u=n(1046),d=n(1045);t.a=r},function(e,t){e.exports={subscription:"RecordingPrioritySubscription-subscription-sOfYq",link:"RecordingPrioritySubscription-link-2-ONe",linkContainer:"RecordingPrioritySubscription-linkContainer-35Li6",posterContainer:"RecordingPrioritySubscription-posterContainer-1ZjTK",titleContainer:"RecordingPrioritySubscription-titleContainer-2zfvG",
dragHandle:"RecordingPrioritySubscription-dragHandle-1KbYq Link-link-2n0yJ",dragIcon:"RecordingPrioritySubscription-dragIcon-2zAik"}},function(e,t){e.exports={dragSource:"RecordingPrioritySubscriptionDragSource-dragSource-2qcUl"}},function(e,t,n){"use strict";function i(e){return{item:e.getItem(),itemType:e.getItemType(),currentOffset:e.getSourceClientOffset()}}var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=(n.n(h),n(227)),v=(n.n(f),
n(29)),g=n(45),m=n.n(g),y=n(293),b=n(525),I=n(1274),S=n(3659),M=n.n(S),D=parseInt(m.a.recordingPriorityPaneWidth,10),C=parseInt(m.a.recordingPriorityDragHandleWidth,10),O=function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.item,r=e.itemType,o=e.currentOffset;if(!o||r!==y.d)return null
;var s=o.x,l=o.y,c=D-C,u="translate3d("+(s-c)+"px, "+l+"px, 0)",d={position:"absolute",WebkitTransform:u,msTransform:u,transform:u};return a()(b.a,{},void 0,a()("div",{className:M.a.dragPreview,style:d},void 0,a()(I.a,{serverEntityID:t,providerEntityID:n,mediaSubscriptionEntityID:i.mediaSubscriptionEntityID})))},t}(h.Component);t.a=Object(f.DragLayer)(i)(O)},function(e,t){e.exports={dragPreview:"RecordingPrioritySubscriptionDragPreview-dragPreview-3q037"}},function(e,t){e.exports={
pane:"RecordingPriorityPane-pane-7ENL7",paneHeader:"RecordingPriorityPane-paneHeader-2HEZ3",paneScroller:"RecordingPriorityPane-paneScroller-FXVrB Scroller-vertical-VScFL",error:"RecordingPriorityPane-error-2oNO_",empty:"RecordingPriorityPane-empty-23sH1"}},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.mediaSubscriptions,n=e.calendar,i=e.isCalendarPopulated,r=e.calendarError;return{showError:!i&&!!r,
isEmpty:!n.scheduled.length,subscriptionCount:t.length,visibleDays:n.visibleDays}})}var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(6),m=(n.n(g),n(34)),y=n(453),b=n(3662),I=function(e){function t(){var n,i,r;s()(this,t);for(var a=arguments.length,o=Array(a),l=0;l<a;l++)o[l]=arguments[l];return n=i=c()(this,e.call.apply(e,[this].concat(o))),i.onVisibleDaysChange=function(e){Object(m.a)(function(){i.props.setVisibleDays({
visibleDays:e})})},i.onGoToPreviousRangePress=function(){i.props.goToPreviousRange()},i.onGoToNextRangePress=function(){i.props.goToNextRange()},r=n,c()(i,r)}return d()(t,e),t.prototype.render=function(){return f.a.createElement(b.a,a()({onVisibleDaysChange:this.onVisibleDaysChange,onGoToPreviousRangePress:this.onGoToPreviousRangePress,onGoToNextRangePress:this.onGoToNextRangePress},this.props))},t}(h.Component);t.a=Object(v.b)(i,y)(I)},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(4)),f=n(72),v=n(262),g=n(3663),m=n(3667),y=n(3672),b=n(1279),I=n(3685),S=n.n(I),M=r()(m.a,{}),D=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onMeasure=function(e){var t=e.width,n=r.state.visibleDays,i=Math.min(Math.floor(t/120),7);i!==n&&r.props.onVisibleDaysChange(i),r.setState({isMeasured:!0,width:t,visibleDays:i})},r.state={isMeasured:!1,width:null,
visibleDays:0},r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.showError,i=e.isEmpty,a=e.subscriptionCount,o=e.visibleDays,s=e.onGoToPreviousRangePress,l=e.onGoToNextRangePress;return n?r()(v.a,{title:Object(h.default)("There was an error loading the calendar")}):i?r()(b.a,{subscriptionCount:a}):r()(f.a,{className:S.a.calendar,ignoreHeight:!0,onMeasure:this.onMeasure},void 0,o===this.state.visibleDays&&r()("div",{},void 0,r()(g.a,{
onGoToPreviousRangePress:s,onGoToNextRangePress:l}),M,r()(y.a,{serverEntityID:t})))},t}(p.Component);t.a=D},function(e,t,n){"use strict";function i(){return Object(p.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=l.a.pick(e.calendar,"time","startTime","endTime","hasPastEvents","hasFutureEvents");return o()({},t)})}function r(e){return u.a.createElement(h.a,e)}var a=n(7),o=n.n(a),s=n(5),l=n.n(s),c=n(0),u=n.n(c),d=n(11),p=n(6),h=(n.n(p),n(3664))
;t.a=Object(d.b)(i)(r)},function(e,t,n){"use strict";function i(e){var t=e.hasPastEvents,n=e.hasFutureEvents,i=e.onGoToPreviousRangePress,r=e.onGoToNextRangePress;return a()("div",{className:v.a.calendarHeader},void 0,a()("div",{className:v.a.calendarHeader},void 0,a()(p.a,{className:(v.a.calendarNav||"")+" "+(!t&&v.a.calendarNavDisabled||""||""),kind:u.b.DEFAULT,size:u.e.MEDIUM,isDisabled:!t,onPress:i},void 0,a()(d.a,{name:"plex-icon-hub-prev-560","aria-label":Object(c.default)("Previous Page")
})),l.a.createElement(h.a,e),a()(p.a,{className:(v.a.calendarNav||"")+" "+(!n&&v.a.calendarNavDisabled||""||""),kind:u.b.DEFAULT,size:u.e.MEDIUM,isDisabled:!n,onPress:r},void 0,a()(d.a,{name:"plex-icon-hub-next-560","aria-label":Object(c.default)("Next Page")}))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(4),u=n(24),d=n(26),p=n(22),h=n(1275),f=n(3666),v=n.n(f);t.a=i},function(e,t){e.exports={title:"CalendarHeaderTitle-title-15Pr3"}},function(e,t){e.exports={
calendarHeaderContainer:"CalendarHeader-calendarHeaderContainer-2f7fS",calendarHeader:"CalendarHeader-calendarHeader-moR_H",calendarNav:"CalendarHeader-calendarNav-rIR1k Link-link-2n0yJ",calendarNavDisabled:"CalendarHeader-calendarNavDisabled-1bqai"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar},function(e){return{daysOfWeek:e.daysOfWeek}})}var r=n(11),a=n(6),o=(n.n(a),n(3668));t.a=Object(r.b)(i)(o.a)
},function(e,t,n){"use strict";function i(e){var t=e.daysOfWeek,n=c()(e,["daysOfWeek"]);return s()("div",{className:v.a.container},void 0,t.map(function(e){return p.a.createElement(h.a,a()({key:e,date:e},n))}))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(3669),f=n(3671),v=n.n(f);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.date,n=l.a.unix(t),i=Object(h.a)(t),r=void 0
;return r=Object(p.a)(t)?Object(o.default)("Yesterday"):i?Object(o.default)("Today"):Object(o.default)("{dayOfWeek} {monthNumber}/{dayNumber}",{dayOfWeek:Object(d.a)(t,{abbreviate:!0}),monthNumber:n.month()+1,dayNumber:n.date()}),a()("div",{className:(v.a.dayOfWeek||"")+" "+(i&&v.a.isToday||""||""),title:r},void 0,r)}var r=n(2),a=n.n(r),o=n(4),s=n(41),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=(n.n(u),n(1050)),p=n(521),h=n(359),f=n(3670),v=n.n(f);t.a=i},function(e,t){e.exports={
dayOfWeek:"CalendarDayOfWeek-dayOfWeek-3dQ59",isToday:"CalendarDayOfWeek-isToday-2rPYN"}},function(e,t){e.exports={container:"CalendarDaysOfWeek-container-1MoYj"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){return{days:e.calendar.days}})}var r=n(11),a=n(6),o=(n.n(a),n(3673));t.a=Object(r.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.days,n=c()(e,["days"]);return s()("div",{
className:v.a.calendarDays},void 0,t.map(function(e){return p.a.createElement(h.a,a()({key:e,date:e},n))}))}var r=n(7),a=n.n(r),o=n(2),s=n.n(o),l=n(13),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(3674),f=n(3684),v=n.n(f);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.date;return a()("div",{className:u.a.day},void 0,a()(l.a,{serverEntityID:t,date:n}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3675)),c=n(3683),u=n.n(c);t.a=i},function(e,t,n){"use strict"
;function i(){return Object(d.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar},function(e,t){return t.date},function(e,t){var n=h.a.unix(t);return{events:o.a.filter(e.scheduled,function(e){return h.a.unix(e.beginsAt).isSame(n,"day")})}})}function r(e){return c.a.createElement(f.a,e)}var a=n(5),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(6),p=(n.n(d),n(41)),h=n.n(p),f=n(3676);t.a=Object(u.b)(i)(r)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.events;return a()("div",{},void 0,n.map(function(e,n){var i=Object(l.a)(c.e,e.mediaSubscriptionID,t);return a()(u.a,{component:d.a,serverEntityID:t,providerID:e.identifier||e.provider,mediaSubscriptionEntityID:i,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 r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(40)),c=n(43),u=n(1276),d=n(3677);t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=(n.n(p),n(114)),f=n(434),v=n(29),g=n(22),m=n(260),y=n(173),b=n(1277),I=n(231),S=n(784),M=n(1278),D=n(3682),C=n.n(D),O={context:h.b},j=r()("div",{},void 0,r()(S.a,{})),P=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onLinkPress=function(e){
r.setState({isAiringDetailsModalOpen:!0})},r.onConflictIconPress=function(e){r.setState({isConflictsModalOpen:!0})},r.onRecordingModify=function(){r.setState({isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!0})},r.onAiringDetailsModalClose=function(){r.setState({isAiringDetailsModalOpen:!1})},r.onSubscribeModalClose=function(){r.setState({isSubscribeModalOpen:!1,isConflictsModalOpen:!1})},r.state={isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!1,isConflictsModalOpen:!1},r}return u()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return Object(v.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.mediaSubscriptionEntityID,a=e.metadataItemEntityID,o=e.prePlayRoute,s=e.type,l=e.grandparentTitle,c=e.title,u=e.error,d=e.mediaItem,p=e.isRecording,h=e.recordingProgress,v=e.isComplete,S=e.hasError,D=e.hasSubscription,P=e.hasConflicts,w=e.showPlay,T=e.timeFormat,E=e.onPlayPress,x=this.state,N=x.isAiringDetailsModalOpen,A=x.isSubscribeModalOpen,L=x.isConflictsModalOpen,k=d.beginsAt,_=d.endsAt,R=d.startOffsetSeconds,z=void 0===R?0:R,U=d.endOffsetSeconds,B=void 0===U?0:U,V=d.premiere,F=Object(f.a)(k-z,_+B,{
includeMinuteZero:!1,timeFormat:T}),Q=l||c;return r()("div",{className:(C.a.event||"")+" "+(v&&C.a.isComplete||"")+" "+(S&&C.a.hasError||""||"")},void 0,r()(g.a,{className:C.a.underlay,to:o,onPress:o?void 0:this.onLinkPress}),r()("div",{className:C.a.overlay},void 0,r()("div",{className:C.a.title,title:Q},void 0,Q),r()("div",{className:C.a.secondary},void 0,r()("div",{className:C.a.secondaryInfo},void 0,r()("div",{className:C.a.time},void 0,F),V&&j),r()("div",{className:C.a.status
},void 0,p&&!S&&r()("div",{className:C.a.recording},void 0,r()(m.a,{size:24,backgroundClassName:C.a.recordingProgressBackground,lineWidth:2,progress:h,showProgressText:!1}),r()("span",{className:C.a.recordingIcon})),w&&r()(y.a,{title:c,onPress:E}),S&&r()(M.a,{error:u,onPress:P?this.onConflictIconPress:this.onLinkPress})))),D&&r()(b.a,{isOpen:N,metricsProperties:O,serverEntityID:t,providerEntityID:n,metadataItemEntityID:a,error:u,mediaItem:d,isComplete:v,hasError:S,isRecording:p,
recordingProgress:h,onRecordingModify:this.onRecordingModify,onModalClose:this.onAiringDetailsModalClose}),D&&r()(I.a,{isOpen:A||L,metricsProperties:O,serverEntityID:t,providerEntityID:n,mediaSubscriptionEntityID:i,metadataItemEntityID:a,subscriptionType:s,showConflicts:L,isRecordingSchedule:!0,onModalClose:this.onSubscribeModalClose}))},t}(p.Component);t.a=P},function(e,t,n){"use strict";function i(){return Object(d.createSelector)(function(e){return e.experienceSettings.timeFormat
},Object(p.a)(),function(e,t){var n=o.a.pick(t,"type","title","parentTitle","grandparentTitle","thumb","parentThumb","grandparentThumb","index","parentIndex","originallyAvailableAt","summary");return n.timeFormat=e,n})}function r(e){return c.a.createElement(h.a,e)}var a=n(5),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(6),p=(n.n(d),n(21)),h=n(3679);t.a=Object(u.b)(i)(r)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.summary,r=e.error,o=e.mediaItem,l=e.isComplete,c=e.hasError,D=e.isRecording,O=e.recordingProgress,j=e.timeFormat,P=e.onRecordingModify,w=e.onModalClose,T=s()(e,["serverEntityID","providerEntityID","summary","error","mediaItem","isComplete","hasError","isRecording","recordingProgress","timeFormat","onRecordingModify","onModalClose"]),E=o.beginsAt,x=o.endsAt,N=o.startOffsetSeconds,A=o.endOffsetSeconds,L=o.channelTitle,k=!(!N&&!A),_=N&&Math.round(N/60),R=A&&Math.round(A/60)
;return a()(v.a,{onModalClose:w},void 0,a()(g.a,{},void 0,Object(u.default)("Airing Details")),a()(m.a,{},void 0,a()(M.a,{serverEntityID:t,providerEntityID:n,target:T},void 0,a()(I.a,{mediaItem:o},void 0,a()(S.a,{beginsAt:E,endsAt:x,channel:L,showFullTime:!0,showChannel:!0,timeFormat:j},void 0,a()("div",{},void 0,l&&a()("span",{},void 0,a()(p.a,{className:C.a.completeIcon,name:"plex-icon-selected-560"}),Object(u.default)("Recorded successfully")),D&&a()("span",{},void 0,a()(p.a,{
className:C.a.recordingIcon,name:"plex-icon-dvr-single-560"}),Object(u.default)("Recording"),a()(h.a,{className:C.a.separator}),Object(u.default)("{recordingProgress}% complete",{recordingProgress:O})),c&&a()("span",{},void 0,a()(p.a,{className:C.a.errorIcon,name:"plex-icon-alert-560"}),r),!l&&!D&&!c&&k&&a()("span",{},void 0,_?a()("span",{},void 0,Object(u.default)("Recording starts {minuteOffset} min early",{minuteOffset:_}),!!R&&a()("span",{},void 0,a()(h.a,{className:C.a.separator
}),Object(u.default)("Ends {minuteOffset} min late",{minuteOffset:R}))):a()("span",{},void 0,Object(u.default)("Recording ends {minuteOffset} min late",{minuteOffset:R})))))),a()("div",{className:C.a.summary},void 0,i))),a()(y.a,{},void 0,a()(b.a,{},void 0,a()(f.a,{kind:d.b.DEFAULT,size:d.e.MEDIUM,onPress:P},void 0,Object(u.default)("Modify Recording")),a()(f.a,{kind:d.b.PRIMARY,size:d.e.MEDIUM,onPress:w},void 0,Object(u.default)("Close")))))}
var r=n(2),a=n.n(r),o=n(13),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(4)),d=n(24),p=n(26),h=n(86),f=n(47),v=n(103),g=n(111),m=n(74),y=n(112),b=n(92),I=n(1220),S=n(1222),M=n(531),D=n(3680),C=n.n(D);t.a=i},function(e,t){e.exports={completeIcon:"AiringDetailsModalContent-completeIcon-38k0Q",recordingIcon:"AiringDetailsModalContent-recordingIcon-LbdQN",errorIcon:"AiringDetailsModalContent-errorIcon-3syeN",separator:"AiringDetailsModalContent-separator-3OQLc DashSeparator-separator-2a3yn",
summary:"AiringDetailsModalContent-summary-vVorL"}},function(e,t){e.exports={errorButton:"CalendarErrorButton-errorButton-1z8H1",errorTooltip:"CalendarErrorButton-errorTooltip-lo9O- Tooltip-bottomCenter-2yj43 Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipCenterAlignArrow-35uHt"}},function(e,t){e.exports={event:"CalendarEvent-event-1N79n",isComplete:"CalendarEvent-isComplete-3BKnC",hasError:"CalendarEvent-hasError-2mgqY",
underlay:"CalendarEvent-underlay-2LGTN",overlay:"CalendarEvent-overlay-3RDXN",errorIcon:"CalendarEvent-errorIcon-3q6lK",title:"CalendarEvent-title-K5q2k",secondary:"CalendarEvent-secondary-2ufz9",secondaryInfo:"CalendarEvent-secondaryInfo-3pj4z",time:"CalendarEvent-time-sjVsB",status:"CalendarEvent-status-27k9Y",recording:"CalendarEvent-recording-1igLY",
recordingProgressBackground:"CalendarEvent-recordingProgressBackground-1vuJU CircularProgressBar-circularProgressBarBackground-1a1VU CircularProgressBar-circularProgressBarBackground-RvD8O",recordingIcon:"CalendarEvent-recordingIcon-3BTdu"}},function(e,t){e.exports={day:"CalendarDay-day-1O4pX"}},function(e,t){e.exports={calendarDays:"CalendarDays-calendarDays-2ORCe"}},function(e,t){e.exports={calendar:"Calendar-calendar-231Oo"}},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.mediaSubscriptions,n=e.calendar,i=e.isCalendarPopulated,r=e.calendarError;return{showError:!i&&!!r,isEmpty:!n.scheduled.length,subscriptionCount:t.length}})}var r=n(11),a=n(6),o=(n.n(a),n(3687));t.a=Object(r.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.showError,i=e.isEmpty,r=e.subscriptionCount;return n?a()(c.a,{
title:Object(l.default)("There was an error loading the agenda")}):i?a()(u.a,{subscriptionCount:r}):a()("div",{},void 0,h,a()(p.a,{serverEntityID:t}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(4)),c=n(262),u=n(1279),d=n(3688),p=n(3691),h=a()(d.a,{});t.a=i},function(e,t,n){"use strict";function i(){return Object(a.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 r=n(11),a=n(6),o=(n.n(a),n(3689));t.a=Object(r.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){return a()("div",{className:u.a.agendaHeader},void 0,s.a.createElement(l.a,e))}var r=n(2),a=n.n(r),o=n(0),s=n.n(o),l=n(1275),c=n(3690),u=n.n(c);t.a=i},function(e,t){e.exports={agendaHeader:"AgendaHeader-agendaHeader-66Y_9"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar
},function(e){return{events:e.scheduled}})}var r=n(11),a=n(6),o=(n.n(a),n(3692));t.a=Object(r.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.events;return a()("div",{},void 0,n.map(function(e,i){var r=s.a.unix(e.beginsAt),o=0===i||!s.a.unix(n[i-1].beginsAt).isSame(r,"day"),l=Object(u.a)(d.e,e.mediaSubscriptionID,t);return a()(p.a,{component:h.a,serverEntityID:t,providerID:e.identifier||e.provider,metadataItemEntityID:e.metadataItem,mediaSubscriptionEntityID:l,
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:o},i)}))}var r=n(2),a=n.n(r),o=n(41),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(40)),d=n(43),p=n(1276),h=n(3693);t.a=i},function(e,t,n){"use strict";function i(e,t,n,i,r,a){return"episode"!==e?n:t+" - "+Object(S.a)({seasonIndex:i,episodeIndex:r,date:a})+" - "+n}
var r=n(2),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(4),h=n(41),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=(n.n(g),n(114)),y=n(521),b=n(359),I=n(434),S=n(399),M=n(29),D=n(22),C=n(260),O=n(173),j=n(1277),P=n(231),w=n(1278),T=n(294),E=n(255),x=n(784),N=n(3694),A=n.n(N),L={context:m.a},k=a()(x.a,{}),_=function(e){function t(n,i){s()(this,t);var r=c()(this,e.call(this,n,i));return r.onLinkPress=function(e){r.setState({isAiringDetailsModalOpen:!0})},r.onConflictIconPress=function(e){
r.setState({isConflictsModalOpen:!0})},r.onRecordingModify=function(){r.setState({isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!0})},r.onAiringDetailsModalClose=function(){r.setState({isAiringDetailsModalOpen:!1})},r.onSubscribeModalClose=function(){r.setState({isSubscribeModalOpen:!1,isConflictsModalOpen:!1})},r.state={isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!1,isConflictsModalOpen:!1},r}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(M.a)(this,e,t)},
t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,r=e.mediaSubscriptionEntityID,o=e.metadataItemEntityID,s=e.prePlayRoute,l=e.type,c=e.title,u=e.grandparentTitle,d=e.index,h=e.parentIndex,v=e.originallyAvailableAt,g=e.error,m=e.mediaItem,S=e.isRecording,M=e.recordingProgress,x=e.isComplete,N=e.hasError,_=e.hasSubscription,R=e.hasConflicts,z=e.showPlay,U=e.showDate,B=e.timeFormat,V=e.onPlayPress,F=this.state,Q=F.isAiringDetailsModalOpen,H=F.isSubscribeModalOpen,Y=F.isConflictsModalOpen,W=m.beginsAt,G=m.endsAt,K=m.startOffsetSeconds,q=void 0===K?0:K,Z=m.endOffsetSeconds,X=void 0===Z?0:Z,J=m.premiere,$=f.a.unix(W),ee=Object(I.a)(W-q,G+X,{
timeFormat:B}),te=Object(b.a)(W),ne=$.format("ddd, MMM D");Object(y.a)(W)?ne=Object(p.default)("Yesterday"):te&&(ne=Object(p.default)("Today"));var ie=u||c,re=i(l,u,c,h,d,v);return a()("div",{className:(A.a.event||"")+" "+(x&&A.a.isComplete||"")+" "+(N&&A.a.hasError||""||"")},void 0,a()(D.a,{className:A.a.underlay,to:s,onPress:s?void 0:this.onLinkPress}),a()("div",{className:A.a.overlay},void 0,a()("div",{className:(A.a.date||"")+" "+(te&&A.a.isToday||""||"")},void 0,U&&ne),a()("div",{
className:A.a.time},void 0,ee),a()("div",{className:A.a.title,title:re},void 0,J&&k,ie,a()("div",{className:A.a.titleDetails},void 0,"movie"===l&&a()(T.a,{metadataItemEntityID:o}),"episode"===l&&a()(E.a,{metadataItemEntityID:o}))),a()("div",{className:A.a.status},void 0,S&&!N&&a()("div",{className:A.a.recording},void 0,a()(C.a,{size:24,backgroundClassName:A.a.recordingProgressBackground,lineWidth:2,progress:M,showProgressText:!1}),a()("span",{className:A.a.recordingIcon})),z&&a()(O.a,{title:c,
onPress:V}),N&&a()(w.a,{error:g,onPress:R?this.onConflictIconPress:this.onLinkPress}))),_&&a()(j.a,{isOpen:Q,metricsProperties:L,serverEntityID:t,metadataItemEntityID:o,error:g,mediaItem:m,hasSubscription:_,isComplete:x,hasError:N,isRecording:S,recordingProgress:M,onRecordingModify:this.onRecordingModify,onModalClose:this.onAiringDetailsModalClose}),_&&a()(P.a,{isOpen:H||Y,metricsProperties:L,serverEntityID:t,providerEntityID:n,mediaSubscriptionEntityID:r,metadataItemEntityID:o,
subscriptionType:l,showConflicts:Y,isRecordingSchedule:!0,onModalClose:this.onSubscribeModalClose}))},t}(g.Component);t.a=_},function(e,t){e.exports={event:"AgendaEvent-event-1CGOu",isComplete:"AgendaEvent-isComplete-1Qgi-",hasError:"AgendaEvent-hasError-3_JkX",underlay:"AgendaEvent-underlay-3aB2_",overlay:"AgendaEvent-overlay-F0jvn",statusIcon:"AgendaEvent-statusIcon-2HvuT",date:"AgendaEvent-date-14otD",isToday:"AgendaEvent-isToday-WyLYs",time:"AgendaEvent-time-1gWgj",
title:"AgendaEvent-title-2XPt5",titleDetails:"AgendaEvent-titleDetails-1_26S",status:"AgendaEvent-status-3bBTH",recording:"AgendaEvent-recording-R38Vn",recordingProgressBackground:"AgendaEvent-recordingProgressBackground-3zpaH CircularProgressBar-circularProgressBarBackground-1a1VU CircularProgressBar-circularProgressBarBackground-RvD8O",recordingIcon:"AgendaEvent-recordingIcon-2abV-"}},function(e,t){e.exports={
schedulePageContent:"RecordingSchedulePageContent-schedulePageContent-2kZUq PageContent-pageContent-16mK6",schedulePageInnerContent:"RecordingSchedulePageContent-schedulePageInnerContent-1wYEs PageContent-innerPageContent-3ktLT",emptyDescription:"RecordingSchedulePageContent-emptyDescription-2Oudl EmptyPage-description-oYWtW"}},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 r=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(r,t),this},e(function(){e.support.transition=t()})}(e)}).call(t,n(12))},function(e,t,n){(function(e){+function(e){"use strict";function t(){e(i).remove(),
e(r).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",r="[data-toggle=dropdown]",a=function(t){e(t).on("click.bs.dropdown",this.toggle)};a.prototype.toggle=function(i){var r=e(this)
;if(!r.is(".disabled, :disabled")){var a=n(r),o=a.hasClass("open");if(t(),!o){if("ontouchstart"in document.documentElement&&!a.closest(".navbar-nav").length&&e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click",t),a.trigger(i=e.Event("show.bs.dropdown")),i.isDefaultPrevented())return;a.toggleClass("open").trigger("shown.bs.dropdown"),r.focus()}return!1}},a.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 a=n(i),o=a.hasClass("open");if(!o||o&&27==t.keyCode)return 27==t.which&&a.find(r).focus(),i.click();var s=e("[role=menu] li:not(.divider):visible a",a);if(s.length){var l=s.index(s.filter(":focus"));38==t.keyCode&&l>0&&l--,40==t.keyCode&&l<s.length-1&&l++,~l||(l=0),s.eq(l).focus()}}}};var o=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 a(this)),"string"==typeof t&&i[t].call(n)})
},e.fn.dropdown.Constructor=a,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,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",r,a.prototype.toggle).on("keydown.bs.dropdown.data-api",r+", [role=menu]",a.prototype.keydown)}(e)}).call(t,n(12))},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 r=this.options.trigger.split(" "),a=r.length;a--;){
var o=r[a];if("click"==o)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=o){var s="hover"==o?"mouseenter":"focus",l="hover"==o?"mouseleave":"blur";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},
t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},t.prototype.enter=function(t){
var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(n.timeout),n.hoverState="out",
!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.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,r=/\s?auto?\s?/i,a=r.test(i);a&&(i=i.replace(r,"")||"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 o=this.getPosition(),s=n[0].offsetWidth,l=n[0].offsetHeight;if(a){
var c=this.$element.parent(),u=i,d=document.documentElement.scrollTop||document.body.scrollTop,p="body"==this.options.container?window.innerWidth:c.outerWidth(),h="body"==this.options.container?window.innerHeight:c.outerHeight(),f="body"==this.options.container?0:c.offset().left;i="bottom"==i&&o.top+o.height+l-d>h?"top":"top"==i&&o.top-d-l<0?"bottom":"right"==i&&o.right+s>p?"left":"left"==i&&o.left-s<f?"right":i,n.removeClass(u).addClass(i)}var v=this.getCalculatedOffset(i,o,s,l)
;this.applyPlacement(v,i),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,i=this.tip(),r=i[0].offsetWidth,a=i[0].offsetHeight,o=parseInt(i.css("margin-top"),10),s=parseInt(i.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(s)&&(s=0),e.top=e.top+o,e.left=e.left+s,i.offset(e).addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;if("top"==t&&c!=a&&(n=!0,e.top=e.top+a-c),/bottom|top/.test(t)){var u=0;e.left<0&&(u=-2*e.left,e.left=0,i.offset(e),
l=i[0].offsetWidth,c=i[0].offsetHeight),this.replaceArrow(u-r+l,l,"left")}else this.replaceArrow(c-a,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(),r=e.Event("hide.bs."+this.type);if(this.$element.trigger(r),!r.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=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.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),r=i.data("bs.tooltip"),a="object"==typeof n&&n;r||i.data("bs.tooltip",r=new t(this,a)),"string"==typeof n&&r[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(e)}).call(t,n(12))},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",r=n.data();e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[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){
"radio"===this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change").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),r=i.data("bs.button"),a="object"==typeof n&&n;r||i.data("bs.button",r=new t(this,a)),"toggle"==n?r.toggle():n&&r.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},
e(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle"),t.preventDefault()})}(e)}).call(t,n(12))},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 r=e.Event("shown.bs.modal",{relatedTarget:t});i?n.$element.find(".modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(r)}).emulateTransitionEnd(300):n.$element.focus().trigger(r)}))},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.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 r=e(this),a=r.data("bs.modal"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);a||r.data("bs.modal",a=new t(this,o)),
"string"==typeof n?a[n](i):o.show&&a.show(i)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),i=n.attr("href"),r=e(n.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),a=r.data("modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},r.data(),n.data());t.preventDefault(),r.modal(a,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(12))},function(e,t,n){"use strict";function i(){return Object(r.a)().then(function(){return a.a.registerAll()})}t.a=i;var r=n(3702),a=n(3841)},function(e,t,n){"use strict";function i(){s.a.register(new l.a),Object(o.c)({sessionStats:new S.a,metricsReporter:[Object(d.a)(),u.a],testServerConnection:p.a}),
Object(o.c)({UserFlexModel:y.a,ServerFlexModel:b.a,CloudServerFlexModel:I.a});var e=new m.a,t=Object(g.a)(e);return Object(o.c)({appModel:e,appStore:t,logs:new M.a([],{parent:e})}),Object(o.c)({metrics:[new D.a({isPlaybackActive:f.a}),c.a],serverManager:new C.a({appModel:e}),primaryServerManager:new O.a({appModel:e}),manualServerManager:new j.a({appModel:e}),serverConnectionManager:new P.a({appModel:e}),serverConnectionTestManager:new w.a({appModel:e}),serverUpdateManager:new T.b({appModel:e}),
remoteCastPlayerManager:Object(E.a)(e,t),remotePlexPlayerManager:Object(x.a)(e,t),localCompanionTimelineManager:Object(N.a)(e,t,{companionPlayerProfile:v.a,getPlayerModels:function(e){var t=e.get("ui");return[t.get("audioVideoPlayer"),t.get("photoPlayer")]},getVolume:function(e){return e.get("experienceSettings").get("volume")}}),localCompanionCommandHandler:h.a}),a.a.Deferred().resolve().promise()}t.a=i
;var r=n(12),a=n.n(r),o=n(15),s=n(467),l=n(3703),c=n(3707),u=n(3708),d=n(3709),p=n(3711),h=n(3712),f=n(3713),v=n(3714),g=n(3716),m=n(3741),y=n(3781),b=n(3799),I=n(3811),S=n(3816),M=n(3817),D=n(3820),C=n(3823),O=n(3825),j=n(3829),P=n(3831),w=n(3833),T=n(1289),E=n(3836),x=n(3838),N=n(3839)},function(e,t,n){"use strict";var i=n(15),r=n(19),a=n(69),o=n(3704),s=a.a.extend({mixins:o.a,constructor:function(){this.basePath=Object(r.join)(["/web/","translations"]),this.translations={},
Object(i.e)("appModel").done(this.onAppModelRegistered.bind(this))},onAppModelRegistered:function(e){var t=this,n=e.get("settings");n&&n.on("change:language",function(e,n){t.load(n)})}});t.a=s},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(19),l=n(17),c=n(3705),u=n(3706),d={languages:c.a,loadingPromise:null,loadingLanguage:null,getLanguages:function(){return this.languages},getTranslation:function(e){
if(this.translations[this.language])return this.translations[this.language][e]},t:Object(u.a)(function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return this.getTranslation.apply(this,[e].concat(n))}),load:function(e){if(this.loadingLanguage&&this.loadingLanguage===e)return this.loadingPromise;var t,n=this.getLanguages();return t=r.a.has(n,e)?r.a.has(this.translations,e)?o.a.Deferred().resolve().promise():o.a.ajax({dataType:"json",
url:Object(s.join)([this.basePath,n[e]])}):o.a.Deferred().reject().promise(),this.loadingLanguage=e,this.loadingPromise=t,t.done(r.a.bind(this.onLoadSuccess,this,t)),t.fail(r.a.bind(this.onLoadError,this,t)),t},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=d},function(e,t,n){"use strict";var i={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"};t.a=i},function(e,t,n){"use strict";function i(e,t){return e.replace(/\{([a-z0-9]+?)\}/gi,function(e,n){return t.hasOwnProperty(n)?t[n]:e})}function r(e){for(var t=void 0,n=1,i=arguments.length<=1?0:arguments.length-1;n<=i;)t=d[n],t||(t=new RegExp(Object(u.a)("{"+n+"}"),"g"),d[n]=t),
e=e.replace(t,arguments.length<=n-1+1?void 0:arguments[n-1+1]),n++;return e}function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return c.a.isObject(n[0])?i(e,n[0]):c.a.isObject(n[n.length-1])?(n.pop(),r.apply(void 0,[e].concat(n))):r.apply(void 0,[e].concat(n))}function o(e){var t;if(!e)return"";var n=(t=(arguments.length<=1?0:arguments.length-1)-1+1,arguments.length<=t?void 0:arguments[t]);return c.a.isObject(n)&&n&&n.escape?c.a.escape(e):e}function s(e){
return function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];var s=o.apply(void 0,[e.call(this,t)||t,t].concat(i));return a.apply(void 0,[s].concat(i))}}var l=n(5),c=n.n(l),u=n(215),d={};t.a=s},function(e,t,n){"use strict";var i=["enable","disable","set","start","trackClick","trackEvent","trackView","incrementPlaybackCount","addPlaybackTime","toJSON"];t.a=i},function(e,t,n){"use strict";var i=["setBaseUrl","trackEvent"];t.a=i},function(e,t,n){"use strict"
;function i(){var e=new l.a,t=null;return{setBaseUrl:function(e){t=e},trackEvent:function(n){if(!t)return void Object(o.a)(!1,"Network metrics reporters requires a base URL to be set before tracking events");var i=s.join([t,"collect/event"]),r=a()(n);e.send({type:"POST",url:i,contentType:"text/plain",data:r})}}}t.a=i;var r=n(178),a=n.n(r),o=n(33),s=n(19),l=n(3710);n(755)},function(e,t,n){"use strict";var i=n(12),r=n.n(i),a=n(89),o=n(69),s=o.a.extend({mixins:[a.a],name:"AjaxQueue",queue:null,
request:null,enabled:!1,destroyed:!1,initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.queue=[],!1!==e.enabled&&this.enable()},enable:function(){this.enabled||this.destroyed||(this.enabled=!0,this.onEnabled())},disable:function(){this.enabled&&(this.enabled=!1,this.request=null,this.onDisabled())},destroy:function(){this.destroyed||(this.disable(),this.queue.length=0,this.destroyed=!0,this.onDestroyed())},send:function(e){e&&(this.queue.push(e),
this._next())},_next:function(){if(this._canNext()){var e=this.queue.shift(),t=e&&this._getAjaxOptions(e);if(t){var n=r.a.ajax(t);n.always(this.onAjaxAlways.bind(this,n)),this.request=n}}},_canNext:function(){return this.enabled&&!this.request},_getAjaxOptions:function(e){return e},onAjaxAlways:function(e){this.enabled&&e===this.request&&(this.request=null,this._next())},onEnabled:function(){this._next()},onDisabled:function(){},onDestroyed:function(){}});t.a=s},function(e,t,n){"use strict"
;function i(e){return 401===e.status||403===e.status||406===e.status}function r(e){var t=e.server,n=e.connection;return!I.a.get("testPrivateConnectionsWhenPublicAddressDoesNotMatch")&&!t.get("isCloud")&&!t.get("isTransient")&&!t.get("publicAddressMatches")&&n.get("isPrivate")}function a(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 o(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 s(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=g.a.Deferred();return f.a.defer(function(){n.set({currentTest:null,testState:S.a.testStates.UNAVAILABLE}),i.reject(n)}),i.promise()}function u(e){e.url="fail"+e.url}function d(e,t){function n(t){Object(b.a)("[Connections] %s connected at %s",l,e),o.set({currentTest:null,testState:S.a.testStates.CONNECTED,serverAttrs:t}),s.resolve(o)}function r(t){var n={currentTest:null}
;if(t.aborting)Object(b.a)("[Connections] Aborted pending connection test for %s at %s",l,e),n.testState=S.a.testStates.ABORTED;else{var r=i(t)?S.a.testStates.UNAUTHORIZED:S.a.testStates.UNAVAILABLE;b.a.warn("[Connections] %s is %s at %s (Status %s)",l,r,e,t.status),n.testState=r}o.set(n),s.reject(o,t)}var a=t.server,o=t.connection,s=g.a.Deferred(),l=a.get("debugName");Object(b.a)("[Connections] Testing connection for %s at %s",l,e);var c=a.getXHROptions(e);c.timeout=a.connectionTestTimeout,
I.a.get("emulateCNP")&&!I.a.get("proxied")&&o.get("isPrivate")&&u(c);var d=I.a.get("emulateBrokenHTTPS");if(d){var p=o.get("isHttps")&&!a.get("isCloudBased"),h="private"!==d||o.get("isPrivate");p&&h&&u(c)}var f=g.a.ajax(c);return o.set({currentTest:f,testState:S.a.testStates.PENDING}),f.done(function(t,i,o){if(a.get("isCloud"))return void n();var s=a.parse(t),c=!!s.machineIdentifier
;a.get("isTransient")&&s.machineIdentifier===a.get("originalMachineIdentifier")&&(s.machineIdentifier=a.get("machineIdentifier")),!c||a.id&&s.machineIdentifier!==a.id?(b.a.warn("[Connections] %s has an unexpected machine identifier at %s",l,e),r(o)):n(s)}),f.fail(r),s.promise()}function p(e){var t=e.server,n=e.connection,i=t.resolveUrl(e.url||"/",{connection:n}),c=Object(m.d)("appModel").get("settings")
;return I.a.get("allowHttpsMediaServerConnections")||!n.get("isHttps")||t.get("isCloudBased")?I.a.get("allowMixedContent")||!y.a.isHostedHttps||n.get("isHttps")?r(e)?o(i,e):t.get("isCloud")||n.get("relay")||!c.get("rejectDirectConnections")&&!I.a.get("rejectDirectConnections")?d(i,e):l(i,e):s(i,e):a(i,e)}t.a=p;var h=n(5),f=n.n(h),v=n(12),g=n.n(v),m=n(15),y=n(83),b=n(30),I=n(62),S=n(274)},function(e,t,n){"use strict";function i(e,t,n){return{commandID:e,body:w.a.writeXml({Response:{_code:t,
_status:n}}),responseCode:t}}function r(e){Object(j.d)("appStore").dispatch(e)}function a(e,t){var n=e.type&&e.type[0];n?(t.type===V.a&&d(),r(H.d({type:n,action:t}))):T.a.warn("[Companion] Ignored playback action due to missing type")}function o(){var e=Object(j.d)("appModel"),t=e.get("inputActivity");t&&t.notice()}function s(e){var t=e.machineIdentifier[0],n="node"===t,i=Object(j.d)("appModel"),a=i.get("servers"),o=a.get(n?k.a:t),s=i.get("transientServer");G=t;var l=void 0
;if(o&&o.get("isCloud"))l=o;else{var c={machineIdentifier:"transient-"+t,originalMachineIdentifier:t,accessToken:e.token&&e.token[0]};o&&(c.serverClass=o.get("serverClass"),c.publicAddressMatches=o.get("publicAddressMatches"),c.version=o.get("version")),s&&s.get("originalMachineIdentifier")===t?(l=s,l.set(c)):l=new _.a(c,{parent:i})}var u=o&&o.get("isConnected")&&o.get("activeConnection"),d=void 0;if(u)d={scheme:u.get("scheme"),address:u.get("address"),port:u.get("port"),uri:u.get("uri")};else{
var p=e.port&&e.port[0],h=e.protocol&&e.protocol[0],f=e.address&&e.address[0],v=f,g=void 0;if(!h&&!f)return T.a.warn("[Companion] Unable to create a transient server without a protocol or address"),O.a.Deferred().reject().promise();"https"===h&&(f=Object(x.a)(f),L.a.get("allowHttpsMediaServerConnections")||(h="http",v=f)),g=h+"://"+v,p&&(g+=":"+p),d={scheme:h,address:f,port:p,uri:g}}return l.addConnection(d),l.testOnlyUntestedConnections().then(function(){
return G!==t?O.a.Deferred().reject().promise():(l.get("isTransient")&&r(H.e(l)),l)})}function l(e,t){var n=Object(j.d)("appModel"),i=n.get("user");return(e.get("isCloud")?i.get("desktop").get("providers"):e.get("desktop").get("providers")).populate()}function c(e,t,n){var i=n.key&&n.key[0],r=i.replace("/children",""),a=new z.a({key:r},{server:e});return K=r,a.populate().then(function(){return K!==r?O.a.Deferred().reject().promise():{metadataItemModel:a}})}function u(){var e=O.a.Deferred()
;return Object(j.d)("appModel").get("user").get("isLocked")?e.reject():e.resolve(),e.promise()}function d(){Object(j.d)("appModel").get("user").get("isRemote")&&r(Object(B.a)())}function p(){Object(j.d)("localCompanionTimelineManager").start()}function h(){d(),Object(j.d)("localCompanionTimelineManager").stop()}function f(e){
var t=e.providerIdentifier&&e.providerIdentifier[0],n=e.type&&e.type[0],i=e.offset&&e.offset[0],a=e.mediaIndex&&e.mediaIndex[0],o=e.containerKey&&e.containerKey[0],u=void 0,d=void 0;return E.a.execute("remotePlaybackUnlock").then(function(){return s(e)}).then(function(t){return u=t,l(u,e)}).then(function(n){var i=Object(Y.a)(o);if(i){if(d=n.get(t||R.c.LIBRARY_PROVIDER_IDENTIFIER))return O.a.Deferred().resolve({playQueueID:i}).promise()
}else if(d=n.get(t||R.c.CHANNEL_PROVIDER_IDENTIFIER))return c(u,d,e);return O.a.Deferred().reject().promise()}).then(function(e){var t=e.metadataItemModel,s=e.playQueueID,l=u.entityID(),c=d.entityID(),p=N.e(n),h=null==i?null:parseInt(i,10),f=null==a?null:parseInt(a,10);if(t){var v=t.entityID();r(V.m({serverEntityID:l,providerEntityID:c,metadataItemEntityID:v,startMetadataItemEntityID:v,startOffsetMilliseconds:h,startMediaIndex:f,confirmPlayback:!0,confirmOffset:!0,options:{type:p,containerKey:o}
}))}else r(V.j({serverEntityID:l,providerEntityID:c,playQueueType:p,playQueueID:s,startOffsetMilliseconds:h,startMediaIndex:f}))})}function v(e){var t=e.providerIdentifier&&e.providerIdentifier[0],n=void 0,i=void 0;return u().then(function(){return s(e)}).then(function(t){return n=t,l(n,e)}).then(function(r){return i=r.get(t||R.c.LIBRARY_PROVIDER_IDENTIFIER),i?c(n,i,e):O.a.Deferred().reject().promise()}).then(function(e){var t=e.metadataItemModel;r(H.c({serverEntityID:n.entityID(),
providerEntityID:i.entityID(),key:t.get("key"),parentKey:t.get("parentKey"),type:t.get("type")}))})}function g(e){var t=decodeURIComponent(e.key[0]);a(e,Q.g({key:t}))}function m(e){var t=parseInt(e.offset[0],10);a(e,F.m({positionSeconds:Math.floor(t/1e3)}))}function y(e){a(e,Q.c())}function b(e){var t=e.volume&&e.volume[0],n=e.repeat&&e.repeat[0],i=e.shuffle&&e.shuffle[0];if(null!=t){var r=parseInt(t,10);a(e,F.h({volume:r}))}if(null!=n){var o=parseInt(n,10);a(e,Q.p({repeatAll:o===A.a,
repeatOne:o===A.c}))}null!=i&&a(e,Q.u())}function I(e){var t=e.audioStreamID&&e.audioStreamID[0],n=e.subtitleStreamID&&e.subtitleStreamID[0];null!=t&&a(e,F.f({streamTypeString:"audio",streamID:parseInt(t,10)})),null!=n&&a(e,F.f({streamTypeString:"subtitles",streamID:parseInt(n,10)}))}function S(e){P.a.trigger("companion:"+e),P.a.trigger("companion:key",e)}function M(){u().then(function(){r(Object(U.f)())})}function D(e){
var t=e.path,n=e.query,r=e.commandID,a=e.supportsTimeline,s=O.a.Deferred(),l=W[t];if(o(),!1!==a&&Object(j.d)("localCompanionTimelineManager").start(),l){(l(n)||O.a.Deferred().resolve().promise()).done(function(){Object(T.a)('[Companion] Successfully processed command from path "'+t+'"');var e=i(r,200,"OK");s.resolve({controllerResponse:e})}).fail(function(){T.a.warn('[Companion] Failed to process command from path "'+t+'"');var e=i(r,400,"Bad Request");s.resolve({controllerResponse:e})})}else{
T.a.warn('[Companion] Unable to handle command from unknown path "'+t+'"');var c=i(r,400,"Bad Request");s.resolve({controllerResponse:c})}return s.promise()}t.a=D;var C=n(12),O=n.n(C),j=n(15),P=n(17),w=n(1280),T=n(30),E=n(32),x=n(839),N=n(345),A=n(416),L=n(62),k=n(172),_=n(1281),R=n(55),z=n(77),U=n(240),B=n(1086),V=n(60),F=n(131),Q=n(118),H=n(1282),Y=n(675),W={"/player/timeline/subscribe":p,"/player/timeline/unsubscribe":h,"/player/mirror/details":v,"/player/playback/playMedia":f,
"/player/playback/pause":function(e){return a(e,F.j())},"/player/playback/play":function(e){return a(e,F.k())},"/player/playback/stop":function(e){return a(e,V.f())},"/player/playback/skipNext":function(e){return a(e,Q.h())},"/player/playback/skipPrevious":function(e){return a(e,Q.i())},"/player/playback/stepForward":function(e){return a(e,F.p())},"/player/playback/stepBack":function(e){return a(e,F.o())},"/player/playback/skipTo":g,"/player/playback/seekTo":m,
"/player/playback/refreshPlayQueue":y,"/player/playback/setParameters":b,"/player/playback/setStreams":I,"/player/navigation/moveLeft":function(){return S("moveLeft")},"/player/navigation/moveRight":function(){return S("moveRight")},"/player/navigation/moveUp":function(){return S("moveUp")},"/player/navigation/moveDown":function(){return S("moveDown")},"/player/navigation/select":function(){return S("select")},"/player/navigation/back":function(){return S("back")},"/player/navigation/home":M
},G=void 0,K=void 0},function(e,t,n){"use strict";function i(){var e=Object(r.d)("appModel"),t=e.get("ui"),n=t.get("audioVideoPlayer"),i=t.get("photoPlayer"),s=Object(a.a)(n),l=Object(a.a)(i);return s===o.d||l===o.d}var r=n(15),a=n(665),o=n(491);t.a=i},function(e,t,n){"use strict";var i=n(3715),r={video:i.c,music:i.a,photo:i.b};t.a=r},function(e,t,n){"use strict";n.d(t,"c",function(){return r}),n.d(t,"a",function(){return a}),n.d(t,"b",function(){return o})
;var i="playPause,stop,skipPrevious,skipNext,seekTo,stepBack,stepForward,subtitleStream",r=i+",volume",a="playPause,stop,skipPrevious,skipNext,seekTo,repeat,shuffle,volume",o="playPause,stop,skipPrevious,skipNext"},function(e,t,n){"use strict";function i(e){var t=Object(r.a)(a.a,e);return t}t.a=i;var r=n(3717),a=n(3718)},function(e,t,n){"use strict";function i(e,t){function n(){u===c&&(u=c.slice())}function i(){return t.getState()}function r(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 a(e){var n=e.payload,i=e.type,r=i&&d[i];if(Array.isArray(r))for(var o=0,s=r.length;o<s;o++)r[o](t,n,a);else r&&r(t,n,a);return e}function o(e){d=s(e)}function s(e){for(var t={},n=0,i=e.length;n<i;n++){var r=e[n];for(var a in r){var o=t[a],s=r[a];o?Array.isArray(o)?o.push(s):t[a]=[o,s]:t[a]=s}}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 o(e),t.on("statechange",l),{dispatch:a,subscribe:r,
getState:i,replaceActionHandlers:o}}t.a=i;n(392),n(33),n(18)},function(e,t,n){"use strict"
;var i=n(497),r=n(417),a=n(131),o=n(155),s=n(1003),l=n(1065),c=n(453),u=n(266),d=n(1200),p=n(1206),h=n(385),f=n(1266),v=n(236),g=n(106),m=n(440),y=n(258),b=n(1196),I=n(120),S=n(137),M=n(366),D=n(371),C=n(139),O=n(3719),j=n(3720),P=n(3721),w=n(3722),T=n(369),E=n(3726),x=n(1213),N=n(3729),A=n(3730),L=n(3731),k=n(3732),_=n(3737),R=n(3738),z=n(769),U=n(135),B=n(3739),V=n(706),F=n(222),Q=n(505),H=n(3740),Y=n(1268),W=n(1136),G=[p.a,h.b,f.a,v.a,g.a,m.k,y.m,b.f,I.metadataActionHandlers,S.e,M.m,D.b,W.c,d.e,Y.c,C.c,O.a,j.a,P.a,w.a,T.h,E.a,x.a,N.a,A.a,L.a,u.a,k.a,_.a,z.c,U.k,R.a,c.recordingSchedulePageActionHandlers,l.f,i.c,r.c,a.l,o.f,B.a,V.a,s.b,F.h,Q.c,H.a]
;t.a=G},function(e,t,n){"use strict";function i(e){return e.get("ui").get("background")}var r,a=n(104),o=n(105),s=n(82),l=Object(o.a)((r={},r[s.a]=function(e,t){var n=t.serverEntityID,r=t.providerEntityID,o=t.imageUrl,s=t.allowLightPreset,l=void 0!==s&&s,c=i(e),u=n?Object(a.h)(e,t):void 0,d=r?Object(a.e)(e,t):void 0;c.set({server:u,provider:d,imageUrl:o,allowLightPreset:l,isBackgroundPending:!1})},r[s.d]=function(e,t){
var n=t.serverEntityID,r=t.theme,o=i(e),s=n?Object(a.h)(e,t):void 0,l=s&&r?s.resolveUrl(r,{appendHeaders:!0}):void 0;o.set("themeMusicUrl",l)},r[s.Z]=function(e){i(e).restoreDefaults({isBackgroundPending:!0})},r));t.a=l},function(e,t,n){"use strict";function i(e){return e.get("ui").get("dashboardPage")}var r,a=n(12),o=n.n(a),s=n(30),l=n(78),c=n(104),u=n(140),d=n(212),p=n(613),h=n(90),f=n(105),v=n(139),g=n(137),m=n(82),y=n(1100),b=n(55),I=n(1130),S=Object(f.a)((r={},r[m.A]=function(e,t){
var n=i(e),r=Object(c.h)(e,t),a=Object(c.e)(e,t),o=t.providerEntityID,s=t.hubKey;if(o!==n.get("providerEntityID")||s!==n.get("hubKey")){var l=new d.default([],{server:r,provider:a,hubKey:s,count:16,includeEmpty:!0,includeFeaturedTags:!0,excludes:["playlists"]}),u=new d.default([],{server:e.get("cloudServer"),url:"https://services.provider.plex.tv/home/hubs",deferred:!0});l.reset(),l.abortPendingPopulate(),l.resetPopulatePromise(null),u.reset(),u.abortPendingPopulate(),
u.resetPopulatePromise(null),n.restoreDefaults({providerEntityID:o,hubKey:s,hubs:l,promotedHubs:u})}},r[m.o]=Object(h.a)({key:"hubs",getModel:i}),r[m.u]=function(e,t){var n=i(e),r=n.get("promotedHubs");n.set("isPromotedHubsPending",!0);var a=r.server.getXHROptions(r.url,{dataType:"json"});o.a.ajax(a).then(function(t){var i=t.MediaContainer;i=void 0===i?{}:i;var a=i.Hub;(void 0===a?[]:a).forEach(function(t,i){var a=t.source,o=Object(y.a)(a)
;if(!o)return void s.a.error('Hub source "'+a+'" not in correct format.');var u=Object(c.k)(e,o);if(!u)return void s.a.error('Server with entity id "'+u.serverEntityID+'" not found.');var d=Object(c.j)(e,o);if(!d)return void s.a.error('Provider with entity id "'+o.providerEntityID+'" not found.');if(!(t.source.indexOf(b.c.PODCASTS_PROVIDER_IDENTIFER)>-1&&"home.recommended"===t.hubIdentifier)){var h=new p.a(t,{server:u,provider:d,parse:!0});r.add(h);var f=Object(l.k)(e);n.set({
isPromotedHubsPending:!1,isPromotedHubsPopulated:!0,promotedHubsError:null,knownPromotedHubCloudProviderIDs:f.get("providers").map(function(e){return e.entityID()})})}})},function(e,t){n.set({isPromotedHubsPending:!1,promotedHubsError:Object(u.a)(t)})})},r[m.R]=function(e,t,n){i(e).get("isPromotedHubsPopulated")||n(Object(I.b)(t))},r[v.a]=function(e,t,n){if(!t.metadataItemEntityID&&!t.containerKeyPattern){var r=Object(c.h)(e,t),a=i(e),o=a.get("hubs");o&&o.server===r&&o.each(function(e){
var t=e.get("metadataList")||e.get("directoryList");!e.get("random")&&t.get("containerKey")&&n(Object(g.i)({metadataListEntityID:t.entityID(),count:o.count}))})}},r));t.a=S},function(e,t,n){"use strict";function i(e){return e.get("ui").get("metadataListPage")}var r,a=n(104),o=n(98),s=n(105),l=n(139),c=n(137),u=n(82),d=Object(s.a)((r={},r[u.E]=function(e,t){var n=i(e),r=Object(a.h)(e,t),s=Object(a.e)(e,t),l=t.providerEntityID,c=t.listKey,u=t.listTitle
;if(l!==n.get("providerEntityID")||c!==n.get("listKey")){var d=new o.default({containerKey:c,containerTitle:u},{server:r,provider:s});n.restoreDefaults({providerEntityID:l,listKey:c,metadataList:d})}},r[l.a]=function(e,t,n){var r=t.metadataItemEntityID,o=t.containerKeyPattern;if(!r){var s=Object(a.h)(e,t),l=i(e),u=l.get("metadataList");u&&u.server===s&&(o&&!u.get("containerKey").match(o)||n(Object(c.i)({metadataListEntityID:u.entityID()})))}},r));t.a=d},function(e,t,n){"use strict"
;function i(e){return e.get("ui").get("libraryPage")}var r,a=n(7),o=n.n(a),s=n(5),l=n.n(s),c=n(19),u=n(28),d=n(104),p=n(554),h=n(98),f=n(614),v=n(384),g=n(621),m=n(471),y=n(1283),b=n(105),I=n(90),S=n(193),M=n(139),D=n(137),C=n(307),O=n(82),j=Object(b.a)((r={},r[O.B]=function(e,t){var n=i(e),r=n.get("details"),a=Object(d.h)(e,t),o=Object(d.e)(e,t),s=t.providerEntityID,l=t.libraryKey;if(s!==n.get("providerEntityID")||l!==n.get("libraryKey")){var c={providerEntityID:s,libraryKey:l}
;r&&r.get("libraryKey")===l?(c.details=r,c.isDetailsPending=n.get("isDetailsPending"),c.isDetailsPopulated=n.get("isDetailsPopulated"),c.detailsError=n.get("detailsError")):c.details=new v.a({key:l},{server:a,provider:o,includeAdvanced:!0,includeCollections:o.get("isLibraryProvider")}),n.restoreDefaults(c)}},r[O.D]=function(e,t){var n=i(e),r=n.get("queryParse"),a=Object(d.h)(e,t),o=Object(d.e)(e,t),s=t.containerKey,l=t.typeKey,p=t.firstCharacterKey,f=t.queryParseKey
;if(s!==n.get("containerKey")||l!==n.get("typeKey")){var v=n.get("details").get("types"),m=v.get(l),b=m&&u.r(m.get("type")),I=b&&b.typeString===u.l,S=new h.default({containerKey:s},{server:a,provider:o,includeCollections:o.get("isLibraryProvider")?1:0,includeRelated:I?1:0}),M=new g.a([],{server:a,provider:o,url:c.join(p,{includeCollections:1})}),D={containerKey:s,typeKey:l,firstCharacters:M,metadataList:S,isFirstCharactersPending:!0,isFirstCharactersPopulated:!1,firstCharactersError:null}
;r&&r.get("key")===f||(D.queryParse=new y.a({key:f},{server:a}),D.isQueryParsePending=!0,D.isQueryParsePopulated=!1,D.queryParseError=null),n.set(D)}},r[O.C]=function(e,t){var n=i(e),r=Object(d.h)(e,t),a=Object(d.e)(e,t),o=t.containerKey,s=t.typeKey;o===n.get("containerKey")&&s===n.get("typeKey")||n.set({containerKey:o,typeKey:s,directoryList:new f.a({containerKey:o},{server:r,provider:a})})},r[O.p]=Object(I.a)({key:"details",getModel:i}),r[O.M]=Object(S.a)({key:"details",
actionSuffix:"libraryDetails",getModel:i}),r[O.r]=Object(I.a)({key:"firstCharacters",getModel:i}),r[O.O]=Object(S.a)({key:"firstCharacters",actionSuffix:"libraryFirstCharacters",getModel:i}),r[O.v]=Object(I.a)({key:"queryParse",getModel:i}),r[O.S]=Object(S.a)({key:"queryParse",getModel:i}),r[M.a]=function(e,t,n){var r=t.metadataItemEntityID,a=t.containerKeyPattern;if(!r){var o=Object(d.h)(e,t),s=i(e),l=s.get("metadataList");l&&l.server===o&&(a&&!l.get("containerKey").match(a)||(n(Object(D.i)({
metadataListEntityID:l.entityID()})),n(Object(C.fetchLibraryFirstCharacters)())))}},r[O._6]=function(e,t){var n=i(e),r=n.get("selectedFilterOptions"),a=Object(d.h)(e,t),o=Object(d.e)(e,t),s=t.key,l={selectedFilterKey:s};r&&r.url===s||(l.selectedFilterOptions=new m.a([],{server:a,provider:o,url:s}),l.isSelectedFilterOptionsPending=!0,l.isSelectedFilterOptionsPopulated=!1,l.selectedFilterOptionsError=null),n.set(l)},r[O.i]=function(e){i(e).set({selectedFilterKey:void 0,
selectedFilterOptions:void 0,filterOptionQuery:""})},r[O.q]=Object(I.a)({key:"selectedFilterOptions",getModel:i}),r[O.N]=Object(S.a)({key:"selectedFilterOptions",actionSuffix:"libraryFilterOptions",getModel:i}),r[O._2]=function(e,t){i(e).set("filterOptionQuery",t)},r[O._7]=function(e,t){var n,i=t.type,r=t.subtype,a=t.activeTableColumns,s=t.key;if(-1===l.a.findIndex(a,function(e){return e.key===s})){
var c=Object(p.a)(i,r),u=e.get("experienceSettings"),d=u.get("libraryTableColumns"),h=a.map(function(e){return e.key}).concat(s);u.save("libraryTableColumns",o()({},d,(n={},n[c]=h,n)))}},r[O.j]=function(e,t){var n,i=t.type,r=t.subtype,a=t.activeTableColumns,s=t.key;if(!(a.length<=1)){var c=l.a.findIndex(a,function(e){return e.key===s});if(-1!==c){var u=Object(p.a)(i,r),d=e.get("experienceSettings"),h=d.get("libraryTableColumns"),f=a.slice(0,c).concat(a.slice(c+1)).map(function(e){return e.key})
;d.save("libraryTableColumns",o()({},h,(n={},n[u]=f,n)))}}},r));t.a=j},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),r=n(1284),a=i.a.extend({name:"QueryRuleCollection",model:r.a});t.default=a},function(e,t,n){"use strict";var i=n(23),r=n(3725),a=i.a.extend({name:"QueryLimitCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"QueryLimitModel",rootPropertyName:"Limit",syncedAttrs:{limit:i.a.integer,
unit:i.a.string}});t.a=a},function(e,t,n){"use strict";function i(e){return e.get("ui").get("timelinePage")}function r(e,t){var n=i(e),r=Object(o.h)(e,t),a=n.get("momentList");a.fetch().done(function(){var e=a.get("key")||"empty",t=n.get("metadataList"),i=void 0;i=t&&t.server===r&&t.get("containerKey")===e?t:new p.default({containerKey:e},{server:r}),n.set({isMomentListPending:!1,isMomentListPopulated:!0,momentListError:null,metadataList:i})}).fail(function(e,t){n.set({isMomentListPending:!1,
momentListError:t})})}var a,o=n(104),s=n(384),l=n(1285),c=n(105),u=n(90),d=n(193),p=n(98),h=n(139),f=n(82),v=Object(c.a)((a={},a[f.I]=function(e,t){var n=i(e),a=Object(o.h)(e,t),c=t.serverEntityID,u=t.libraryKey,d=t.momentKey;if(c!==n.get("serverEntityID")||d!==n.get("momentKey")){var p=new s.a({key:u},{server:a}),h=new l.a({momentKey:d},{server:a});n.restoreDefaults({serverEntityID:c,details:p,momentKey:d,momentList:h}),r(e,t)}},a[f.g]=function(e){i(e).set({momentKey:""})},a[f.y]=Object(u.a)({
key:"details",getModel:i}),a[f.U]=Object(d.a)({key:"details",actionSuffix:"timelineDetails",getModel:i}),a[h.a]=function(e,t){var n=t.metadataItemEntityID,a=t.containerKeyPattern,s=Object(o.h)(e,t),l=i(e),c=l.get("metadataList"),u=l.get("momentKey");if(!n&&u&&c&&c.server===s){var d=c.get("containerKey");d&&(a&&!d.match(a)||r(e,t))}},a));t.a=v},function(e,t,n){"use strict";var i=n(23),r=n(3728),a=i.a.extend({name:"MomentCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){
"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"MomentModel",context:["server"],idAttribute:"id",rootPropertyName:"Directory",syncedAttrs:{id:i.a.string,title:i.a.string,size:i.a.integer,avgAR:i.a.float,startsAt:i.a.integer,endsAt:i.a.integer}});t.a=a},function(e,t,n){"use strict";function i(e){return e.get("user").get("profile")}function r(e){return e.get("ui").get("audioSubtitleSettingsPage")}var a,o=n(105),s=n(82),l=n(329),c=Object(o.a)((a={},a[s._12]=function(e,t){var n=i(e),a=r(e)
;a.set({isUpdatingUserProfile:!0,updateUserProfileError:null}),n.save(t,{type:"PUT"}).done(function(){a.set({isUpdatingUserProfile:!1,updateUserProfileError:null})}).fail(function(e){a.set({isUpdatingUserProfile:!1,updateUserProfileError:Object(l.a)(e)})})},a[s.f]=function(e){r(e).set("updateUserProfileError",null)},a));t.a=c},function(e,t,n){"use strict";function i(e){return e.get("ui").get("playlistPage")}
var r,a=n(12),o=n.n(a),s=n(4),l=n(19),c=n(28),u=n(498),d=n(34),p=n(1091),h=n(732),f=n(105),v=n(90),g=n(624),m=n(77),y=n(104),b=n(246),I=n(309),S=n(120),M=n(366),D=n(82),C=Object(f.a)((r={},r[D.G]=function(e,t){var n=i(e),r=Object(y.h)(e,t),a=t.serverEntityID,o=t.providerEntityID,s=t.metadataKey;if(a!==n.get("serverEntityID")||s!==n.get("metadataKey")){var l=new m.a({key:s,type:c.i},{server:r});n.restoreDefaults({serverEntityID:a,providerEntityID:o,metadataKey:s,playlist:l})}},
r[D.F]=function(e,t){var n=i(e),r=Object(y.h)(e,t),a=n.get("playlist"),o=t.serverEntityID,s=t.metadataKey;if(o!==n.get("serverEntityID")||s!==n.get("metadataKey")||!n.get("playlistItemList")){var l=a.get("childrenKey"),c=new g.a({containerKey:l},{server:r});n.set({playlistItemList:c})}},r[D.t]=Object(v.a)({key:"playlist",getModel:i}),r[D.Q]=Object(p.a)({key:"playlistItemList",getModel:i}),r[D.Y]=Object(h.a)({key:"playlistItemList",getModel:i}),r[D._8]=function(e,t,n){
var r=t.id,a=t.type,o=t.isRangeSelect,s=void 0!==o&&o,l=Object(y.d)(e,{playlistItemEntityID:r}),c=i(e),u=c.get("playlistItemList"),d=u.getCollection();l&&n(Object(M.r)({type:a,model:l,collection:d,isRangeSelect:s}))},r[D.k]=function(e,t,n){var i=Object(y.d)(e,{playlistItemEntityID:t.id});i&&n(Object(M.g)([i.id]))},r[D.J]=function(e,t){var n=Object(y.d)(e,t),r=i(e),a=r.get("playlistItemList"),s=a.getCollection(),c=s.indexOf(n),u=t.moveIndex,p=u-1;if(c!==u&&c!==p){
var h=u>c?u-1:u,f=l.join([a.get("containerKey"),n.get("playlistItemID"),"move"],p>=0&&"after="+s.at(p).id),v=n.server,g=v.getXHROptions(f,{type:"PUT"});Object(d.a)(function(){s.remove(n),s.add(n,{at:h}),o.a.ajax(g).fail(function(){s.indexOf(n)===h&&(s.remove(n),s.add(n,{at:c}))})})}},r[D.W]=function(e,t,n){var r=Object(y.d)(e,t),a=i(e),o=a.get("playlistItemList"),c=l.join([o.get("containerKey"),r.get("playlistItemID")]);r.destroy({url:c}).fail(function(){
n(Object(b.b)(Object(s.default)("There was an unexpected error removing this item.")))})},r[D.X]=function(e,t,n){var r=i(e),a=r.get("playlistItemList"),c=a.get("containerKey"),u=a.getCollection(),d=e.get("multiSelect"),p=d.get("activeSelectionItems").pluck("id"),h=o.a.Deferred().resolve().promise();p.forEach(function(e){var t=u.get(e),n=l.join([c,e]);h=h.then(function(){return t.destroy({url:n,wait:!0})})}),h.fail(function(){
n(Object(b.b)(Object(s.default)("There was an unexpected error removing an item.")))})},r[S.RATE_METADATA_ITEM]=function(e,t,n){var r=t.providerEntityID,a=t.rating,o=i(e),s=o.get("playlist");if(s){var l=o.get("playlistItemList");"favorites"===s.get("specialPlaylistType")&&r===o.get("providerEntityID")&&(a!==u.a&&a!==u.b||n(Object(I.i)({count:l.get("currentPageSize")})))}},r));t.a=C},function(e,t,n){"use strict"
;var i,r=n(12),a=n.n(r),o=n(727),s=n(439),l=n(105),c=n(90),u=n(1069),d=n(113),p=n(106),h=n(82),f={isFullOwnedServer:!0,isPersonalCloudServer:!0},v=Object(l.a)((i={},i[h._11]=function(e,t,n){e.get("ui").get("provisionPersonalCloudServerPage").set("isPersonalCloudServerModalOpen",!!t.open)},i[h.V]=function(e,t,n){function i(){return l.populate().then(function(){return a.a.ajax(l.getXHROptions(c,{type:"POST"}))})}var r=e.get("ui").get("provisionPersonalCloudServerPage")
;r.set("isProvisionPersonalCloudServerPending",!0);var l=e.get("cloudServer"),c=t.url,u=Object(o.a)(i,{times:10,delay:2e3,maxDuration:3e4});Object(s.a)(u,2e3).done(function(){r.set("isProvisionPersonalCloudServerPopulated",!0)}).fail(function(e){r.set("provisionPersonalCloudServerError",e)}).always(function(){r.set("isProvisionPersonalCloudServerPending",!1)})},i[h.h]=function(e,t,n){function i(){var t=e.get("servers").findWhere(f);return t?t.get("isResolved")||n(Object(d.q)({
serverEntityID:t.entityID()})):n(Object(p.b)()),e.get("servers").populateServer(f)}var r=e.get("ui").get("provisionPersonalCloudServerPage");r.set("isConnectToPersonalCloudServerPending",!0);var a=Object(o.a)(i,{times:10,delay:2e3,maxDuration:3e4});Object(s.a)(a,2e3).done(function(){r.set("isConnectToPersonalCloudServerPopulated",!0)}).fail(function(){r.set("connectToPersonalCloudServerError",{})}).always(function(){r.set("isConnectToPersonalCloudServerPending",!1)})},i[h.P]=function(e){
var t=e.get("ui").get("provisionPersonalCloudServerPage");t.set("isPersonalCloudServerDriveCachePending",!0);var n=e.get("servers").findWhere(f),i=new u.a({},{server:n}),r=Object(o.a)(function(){return i.fetchAndNotUpdating()},{times:30,delay:2e3,maxDuration:6e4});Object(s.a)(r,2e3).done(function(){t.set("isPersonalCloudServerDriveCachePopulated",!0)}).fail(function(e){t.set("personalCloudServerDriveCacheError",e)}).always(function(){t.set("isPersonalCloudServerDriveCachePending",!1)})},
i[h.s]=Object(c.a)({key:"personalCloudServerStatus",getModel:function(e){return e.get("cloudServer").get("desktop")}}),i[h.z]=function(e,t){e.get("experienceSettings").save("isNotInterestedInPersonalCloud",!t.interested)},i));t.a=v},function(e,t,n){"use strict";function i(e){return e.get("ui").get("quickSearch")}function r(e){return e.map(function(e){return e.entityID()})}function a(e){return e.reduce(function(e,t){var n=t.get("hubs").reduce(function(e,t){
return e.concat(r(t.get("metadataResults")),r(t.get("tagResults")))},[]);return e.concat(n)},[])}var o,s=n(7),l=n.n(s),c=n(17),u=n(19),d=n(35),p=n(104),h=n(361),f=n(140),v=n(55),g=n(76),m=n(808),y=n(105),b=n(122),I=n(1121),S=n(60),M=n(148),D=n(82),C=Object(y.a)((o={},o[D.H]=function(e,t,n){var r=i(e),a=r.get("searches"),o=t.providerEntityIDs,s=t.providerIdentifier;a.reset(o.reduce(function(t,n){var i=Object(p.e)(e,{providerEntityID:n
}),r=i.get("identifier"),a=i.get("isLibraryProvider"),o=i.get("features").get(g.b.SEARCH);(r===v.c.PODCASTS_PROVIDER_IDENTIFER||r===v.c.PODCASTS_STAGE_PROVIDER_IDENTIFER||o&&(a||r===s))&&t[s===r?"unshift":"push"](new m.a({providerEntityID:n,serverEntityID:i.server.entityID(),key:o?o.get("key"):"/hubs/search"},{server:i.server,provider:i,includeCollections:!0}));return t},[])),r.get("query")&&n(M.fetchQuickSearch())},o[D._1]=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"),serverEntityID:e.get("serverEntityID"),key:e.get("key")})})},o[D.w]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e),r=n.get("searches"),a=t.query,o=void 0===a?n.get("query"):a,s=t.limit;r.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:o,limit:s}}).done(function(){e.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(t){e.set({isSearchPending:!1,searchError:Object(f.a)(t)})}))})},o[D.b]=function(e,t,n){var r=i(e);""===t.trim()?n(M.resetQuickSearch()):(r.get("query").length>1&&t.length<2&&n(M.resetQuickSearch()),r.set("query",t))},o[D.c]=function(e,t){
var n=i(e),r=t.serverEntityID,a=void 0===r?n.get("serverEntityID"):r,o=t.providerEntityID,s=void 0===o?n.get("providerEntityID"):o,l=t.providerIdentifier,c=void 0===l?n.get("providerIdentifier"):l,u=t.sectionID,d=void 0===u?n.get("sectionID"):u,p=t.channelPlaceholder,h=void 0===p?n.get("channelPlaceholder"):p,f=t.channelID,v=void 0===f?n.get("channelID"):f,g=t.channelSearchKey,m=void 0===g?n.get("channelSearchKey"):g;n.set({serverEntityID:a,providerEntityID:s,providerIdentifier:c,sectionID:d,
channelPlaceholder:h,channelID:v,channelSearchKey:m})},o[D._9]=function(e,t){var n=i(e),r=t.searchResultEntityID,o=t.offset;if(r)return void n.set("selectedResultEntityID",r);var s=a(n.get("searches")),l=s.indexOf(n.get("selectedResultEntityID")),c=s.length-1,u=o>0?-1:c,d=l+o,p=d<-1||d>c,h=p?u:d,f=-1===h?null:s[h];n.set("selectedResultEntityID",f)},o[D.K]=function(e,t,n){
var r=i(e),a=t.serverEntityID,o=null!=t.searchResultEntityID?t.searchResultEntityID:r.get("selectedResultEntityID"),s=Object(p.f)(e,{searchResultEntityID:o});if(!s){var l=Object(p.h)(e,t),d=Object(p.e)(e,t),f=l.id,v=d.id,g=r.pick("query","channelID","channelSearchKey"),m=g.query,y=g.channelID,S=g.channelSearchKey;return null!=y&&null!=S?c.a.trigger("navigate","channel",{serverID:f,channelID:y,key:u.join(S,{query:m})}):l.get("isCloud")?c.a.trigger("navigate","providerSearch",{providerID:v,query:m
}):c.a.trigger("navigate","search",{serverID:f,query:m}),void n(M.resetQuickSearch({serverEntityID:a}))}var D=s.pick("tagItem","metadataItem"),C=D.tagItem,O=D.metadataItem;if(C){var j=h.a.get(C.get("tagType")),P=j.typeString,w=s.provider.get("isLibraryProvider")?s.get("reasonID"):C.get("librarySectionKey"),T=Object(b.a)(s.server.attributes,s.provider.attributes,w,{filters:C.has("filter")?C.get("filter"):P+"="+C.get("id"),filterLabel:C.get("tag"),context:s.metricsContext})
;return window.location.hash=T,void n(M.resetQuickSearch({serverEntityID:a}))}var E=Object(I.a)(s.server.attributes,s.provider.attributes,O.attributes,{context:s.metricsContext});if(!E)return void n(M.playQuickSearchResult({serverEntityID:a,searchResultEntityID:o}));window.location.hash=E,n(M.resetQuickSearch())},o[D.L]=function(e,t,n){var r=t.serverEntityID,a=t.options,o=i(e),s=null!=t.searchResultEntityID?t.searchResultEntityID:o.get("selectedResultEntityID"),c=Object(p.f)(e,{
searchResultEntityID:s});if(!c)return void n(M.navigateQuickSearchResult(t));var u=c.get("metadataItem");u&&(n(Object(S.m)({serverEntityID:c.server.entityID(),providerEntityID:c.provider.entityID(),metadataItemEntityID:u.entityID(),metricsPage:d.T,metricsContext:c.metricsContext,options:l()({containerKey:u.get("skipParent")?u.get("grandparentKey"):u.get("parentKey")},a)})),n(M.resetQuickSearch({serverEntityID:r})))},o));t.a=C},function(e,t,n){"use strict"
;var i=n(97),r=n(23),a=n(3734),o=r.a.extend({name:"SearchHubCollection",context:["server","provider"],model:a.a,responseType:function(){return Object(i.a)(this.server)}});t.a=o},function(e,t,n){"use strict";var i=n(97),r=n(16),a=n(18),o=n(3735),s=a.a.extend({name:"SearchHubModel",context:["server","provider"],responseType:function(){return Object(i.a)(this.server)},idAttribute:"hubIdentifier",syncedAttrs:{hubIdentifier:r.a.string,size:r.a.integer,type:r.a.string,subtype:r.a.string,
title:r.a.string,context:r.a.string},syncedRelations:{metadataResults:{relationClass:o.a,rootPropertyName:"Metadata",options:function(e){return{metricsContext:e.context}}},tagResults:{relationClass:o.a,rootPropertyName:"Directory",options:function(e){return{metricsContext:e.context}}}}});t.a=s},function(e,t,n){"use strict";var i=n(97),r=n(23),a=n(3736),o=r.a.extend({name:"SearchResultCollection",context:["server","provider","metricsContext"],model:a.a,responseType:function(){
return Object(i.a)(this.server)}});t.a=o},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(13),o=n.n(a),s=n(16),l=n(287),c=n(40),u=n(97),d=n(18),p=n(982),h=n(77),f=d.a.extend({name:"SearchResultModel",context:["server","provider","metricsContext"],entityType:l.SEARCH_RESULT,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(c.a)(this.entityType,e.key,this.server.entityID())},responseType:function(){return Object(u.a)(this.server)},
idAttribute:"key",syncedAttrs:{key:s.a.string,reasonID:s.a.integer,reason:s.a.string,reasonTitle:s.a.string},syncedRelations:{metadataItem:{relationClass:h.a,deferred:!0},tagItem:{relationClass:p.a,deferred:!0}},augmentResponse:function(e){var t,n=e.key,i=e.reason,a=e.reasonTitle,s=e.reasonID,l=o()(e,["key","reason","reasonTitle","reasonID"]),c=l.tag?"tagItem":"metadataItem";return t={key:n,reason:i,reasonTitle:a,reasonID:s},t[c]=r()({key:n},l),t}});t.a=f},function(e,t,n){"use strict"
;function i(e){return e.get("ui").get("searchPage")}var r,a=n(50),o=n.n(a),s=n(104),l=n(140),c=n(76),u=n(808),d=n(105),p=n(113),h=n(82),f=Object(d.a)((r={},r[h.T]=function(e,t,n){t.forEach(function(e){n(Object(p.l)({serverEntityID:e}))})},r[h.x]=function(e,t,n){var r=i(e),a=r.get("searches"),d=t.availableProviders,p=t.query,h=t.limit;o()(d).forEach(function(t){var n=d[t],i=Object(s.h)(e,{serverEntityID:n.serverEntityID}),r=Object(s.e)(e,{providerEntityID:t}),o=r.get("features").get(c.b.SEARCH)
;o&&!a.get(t)&&a.add(new u.a({providerEntityID:t,key:o.get("key")},{server:i,provider:r,includeCollections:!0}))}),a.each(function(e){e.populatePromise||(e.set("isSearchPending",!0),e.fetch({data:{query:p,limit:h}}).done(function(){e.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(t){e.set({isSearchPending:!1,searchError:Object(l.a)(t)})}))})},r[h.e]=function(e,t,n){var r=i(e);r.get("searches").each(function(e){e.abortPendingPopulate()}),r.restoreDefaults()},r))
;t.a=f},function(e,t,n){"use strict";function i(e,t){var n=t.serverEntityID;return Object(h.a)(e,p.m,n)}function r(e){return e.get("ui").get("dvrSettingsUI").get("dvrSetup")}function a(e,t){return r(e,t).get("epgSettings")}function o(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r(e,t),s=a(e,t),l=s.get(n);return l.abortPendingPopulate(),o.get("setupErrorMessages").remove("programGuideSettings"),s.set("isFetching",!0),l.fetch(i).done(function(){s.set({isFetching:!1,
isPopulated:!0})}).fail(function(){s.set({isFetching:!1,isPopulated:!1}),o.get("setupErrorMessages").add({id:"programGuideSettings",message:Object(u.default)("Unable to fetch Guide settings")})})}var s,l=n(7),c=n.n(l),u=n(4),d=n(19),p=n(43),h=n(632),f=n(105),v=n(556),g=n(82),m=Object(f.a)((s={},s[g._0]=function(e,t){a(e,t).restoreDefaults()},s[g.l]=function(e,t,n){var r=i(e,t);o(e,t,"countries").done(function(){var e=r.get("countryCode");e&&n(Object(v.selectEPGCountry)(c()({},t,{countryCode:e
})))})},s[g.m]=function(e,t,n){var i=a(e,t);o(e,t,"languages").done(function(){var e=i.get("selectedCountry");e&&n(Object(v.selectEPGLanguage)(c()({},t,{languageCode:e.get("language")})))})},s[g._3]=function(e,t,n){var i=a(e,t),r=i.get("countries").get(t.countryCode);if(i.set({selectedCountry:r,postalCode:""}),i.get("regions").reset(),i.get("lineupGroup").get("lineups").reset(),r){var s=r.get("flavor"),l=d.join([i.get("baseUrl"),r.get("key")]);n(Object(v.fetchEPGLanguages)(c()({},t,{
languageCode:r.get("language")}))),0===s?o(e,t,"regions",{url:l}):2===s&&(i.set("postalCode",r.get("example")),n(Object(v.fetchEPGLineups)(t)))}},s[g._4]=function(e,t,n){var i=a(e,t),r=i.get("languages").get(t.languageCode);i.set("selectedLanguage",r)},s[g._5]=function(e,t,n){var i=a(e,t),r=i.get("regions").get(t.regionKey);i.set("selectedRegion",r),i.get("lineupGroup").get("lineups").reset(),r&&n(Object(v.fetchEPGLineups)(t))},s[g._10]=function(e,t,n){var i=a(e,t),r=t.postalCode
;i.set("postalCode",r),i.get("lineupGroup").get("lineups").reset()},s[g.n]=function(e,t,n){var i=a(e,t),r=i.get("selectedCountry"),s=[i.get("baseUrl"),r.get("key")],l={};0===r.get("flavor")?s.push(i.get("selectedRegion").get("key")):l.postalCode=i.get("postalCode"),o(e,t,"lineupGroup",{url:d.join(s,l)})},s));t.a=m},function(e,t,n){"use strict";n.d(t,"a",function(){return m})
;var i,r=n(7),a=n.n(r),o=n(4),s=n(214),l=n(85),c=n(197),u=n(28),d=n(34),p=n(78),h=n(171),f=n(657),v=n(415),g=n(60),m=a()({},g.g,(i={},i[g.c]=function(e,t,n){var i=Object(f.a)(e,t),r=Object(v.a)(i),m=t.playerType||l.c(r),y=Object(h.b)(e,m),b=Object(p.h)(e,t),I=Object(p.d)(e,t),S=e.get("experienceSettings");if(e.get("remotePlayer")&&!b.get("allowRemotePlayer"))return void Object(d.a)(function(){y.set({hasError:!0,
errorMessage:Object(o.default)("This content is not currently supported when connected to a remote player.")})});var M=void 0;M=y.get("isOpen")?y.get("openState"):r===s.a?c.b:c.a;var D=!1;r===s.b&&t.metadataItemEntityID&&(D=I.get("type")===u.g),g.g[g.c](e,a()({extrasPrefixCount:S.get("extrasPrefixCount"),openState:M,isPaused:D},t),n)},i[g.b]=function(e,t,n){g.g[g.b](e,a()({openState:c.b},t),n)},i))},function(e,t,n){"use strict";n.d(t,"a",function(){return c})
;var i,r=n(7),a=n.n(r),o=n(78),s=n(1282),l=n(134),c=a()({},s.b,(i={},i[s.a]=function(e,t){var n=Object(o.j)(e,t),i=Object(o.h)(e,t),r=void 0;if(n.get("isTransient")){r="#!/transient/provider/"+encodeURIComponent(i.get("identifier"))+"/details?key="+encodeURIComponent(t.key)}else{var a={machineIdentifier:n.get("machineIdentifier")},s={identifier:i.get("identifier"),isLibraryProvider:i.get("isLibraryProvider")};r=Object(l.a)(a,s,t.key)}
/\/transient\//.test(window.location.hash)?window.location.replace(r):window.location.hash=r},i))},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(287),o=n(3742),s=n(16),l=n(18),c=n(3745),u=n(3748),d=n(660),p=n(77),h=n(3750),f=n(496),v=n(3753),g=n(3775),m=c.a.extend({name:"DesktopAppModel",sessionAttrs:r()({},c.a.prototype.sessionAttrs,{isFirstRun:s.a.boolean.isRequired,isSigningOut:s.a.boolean.isRequired,isCastApiAvailable:s.a.boolean.isRequired,settings:s.a.instanceOf(g.a)}),
sessionRelations:r()({},c.a.prototype.sessionRelations,{entities:{relationClass:Object(o.a)(a)},players:{relationClass:u.a},remotePlayer:{relationClass:l.a,deferred:!0},legacyChannelProvider:{relationClass:d.a,deferred:!0},legacyChannelMetadataItem:{relationClass:p.a,deferred:!0},multiSelect:{relationClass:h.a},experienceSettings:{relationClass:f.a},ui:{relationClass:v.a}}),defaults:function(){var e=c.a.prototype.defaults.apply(this,arguments);return r()({},e,{isFirstRun:!1,isSigningOut:!1,
isCastApiAvailable:!1,settings:new g.a})}});t.a=m},function(e,t,n){"use strict";function i(e){var t={};for(var n in e){t[e[n]]={relationClass:a.a}}return r.a.extend({name:"EntitiesModel",sessionRelations:t})}t.a=i;var r=n(18),a=n(3743)},function(e,t,n){"use strict";var i=n(23),r=n(3744),a=i.a.extend({name:"EntityCollection",model:r.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=a},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(16),o=n(18),s=o.a.extend({name:"EntityModel",sessionAttrs:{id:a.a.string.isRequired},sessionRelations:{model:{relationClass:o.a,deferred:!0}},toState:function(){var e=this.get("model"),t=r()({entityID:this.id},e.state);return Object.defineProperty(t,"possibleEntityContainers",{value:e.state.possibleEntityContainers,enumerable:!1}),t},
shouldUpdateRelationState:function(){return!0}});t.a=s},function(e,t,n){"use strict";var i=n(16),r=n(3746),a=n(99),o=n(172),s=n(1281),l=n(241),c=n(3747),u=c.a.extend({name:"AppModel",sessionAttrs:{clientID:i.a.string,anonymousClientID:i.a.string,authorized:i.a.boolean.isRequired,skipSignIn:i.a.boolean.isRequired,isWaitingForServers:i.a.boolean.isRequired,isWaitingForPrimaryServer:i.a.boolean.isRequired,history:i.a.array.isRequired,forwardHistory:i.a.array.isRequired},sessionRelations:{servers:{
relationClass:r.a},cloudServer:{relationClass:o.b,deferred:!0},primaryServer:{relationClass:a.c,deferred:!0},transientServer:{relationClass:s.a,deferred:!0},user:{relationClass:l.a,deferred:!0}},defaults:function(){var e=new o.b({machineIdentifier:o.a},{parent:this});return{authorized:!1,skipSignIn:!1,isWaitingForServers:!1,isWaitingForPrimaryServer:!1,history:[],forwardHistory:[],cloudServer:e,user:new l.a({},{server:e,parent:this})}}});t.a=u},function(e,t,n){"use strict";function i(e){
return e.length?a.a.map(e,function(e){return e.get("debugName")}).join(", "):"(none)"}var r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(30),c=n(607),u=n(23),d=n(99),p=u.a.extend({mixins:[c.a],name:"ServerCollection",model:d.c,initialize:function(){this._resetPopulate()},comparator:function(e){var t=e.get("isFullOwnedServer"),n=e.get("isShared"),i=e.get("friendlyName")||"",r=t?"0":"1";return r+=n?"1":"0",r+=i.toLowerCase()},shouldWaitForInitialServers:function(){var e=this.filter(function(e){
return(!e.id||!!e.get("resources"))&&e.isPopulating()});return!!e.length&&(Object(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"),r=i&&i.isPopulating();return n&&r&&e.push(t),e},[]);return!!e.length&&(Object(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&&(Object(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);Object(l.a)("[Servers] Found all servers =",t),e.length?this._resolvePopulate():this._rejectPopulate()},populateAnyServer:function(){function e(e){var t=u.indexOf(e);t>-1&&(u.splice(t,1),this.hasOnlyRejectedServers(u)&&c.reject())}
function t(e,t){a.a.contains(u,e)&&t&&c.resolve(e)}function n(e,t){a.a.contains(u,e)&&t&&this.hasOnlyRejectedServers(u)&&c.reject()}var r=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.models,c=s.a.Deferred(),u=o.slice(0),d=a.a.find(u,function(e){return e.get("isCloud")?e.get("isResolved"):e.get("isConnected")});return d?(Object(l.a)("[Servers] Populate any server chose %s where servers = %s",d.get("debugName"),i(u)),
c.resolve(d).promise()):this.hasOnlyRejectedServers(u)?c.reject().promise():(this.on({remove:e,"change:isResolved":t,"change:isRejected":n},this),c.always(function(){r.off("change:isResolved",t,r),r.off("change:isRejected",n,r)}),c.promise())},populateServer:function(e){return this.findServer(e,!0).then(function(e){return e.get("isConnected")&&!e.get("isCloud")?s.a.Deferred().resolve(e):e.populate()})},findServer:function(e,t){function n(){var e=this,i=this.filterServers(o,t);i?(h=i,
i.done(function(e){h===i&&l.resolve(e)}),i.fail(function(){h===i&&(u||!e.isPopulating()?l.reject():e.populate().always(n.bind(e)))})):this.isPopulating()||l.reject()}var i=this,r=a.a.isString(e),o=r?{machineIdentifier:e}:e,l=s.a.Deferred();if(r){var c=this.get(o.machineIdentifier);if(c&&c.get("isResolved"))return setTimeout(l.resolve.bind(l,c),0),l.promise()}var u=a.a.has(o,"machineIdentifier"),d=a.a.map(a.a.keys(o),function(e){return"change:"+e}),p="add "+d.join(" "),h=void 0
;return n.call(this),this.on(p,n,this),this.populate().always(function(){h||l.reject()}),l.always(function(){i.off(p,n,i)}),l.promise()},filterServers:function(e,t){var n=this.where(e);if(n.length)return t?this.populateAnyServer(n):s.a.Deferred().resolve(n[0]).promise()},hasOnlyRejectedServers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.models;return a.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!!a.a.find(e,function(e){var t=e.get("activeConnection");return!!t&&t.get("isLoopback")})}});t.a=p},function(e,t,n){"use strict";var i=n(17),r=n(33),a=n(18),o=a.a.extend({name:"BaseAppModel",isStateTreeRoot:!0,constructor:function(){this._pendingEntities=[],this.listenTo(i.a,"change:entity",this.onEntityChange),a.a.prototype.constructor.apply(this,arguments)},initialize:function(){
this._pendingEntities.forEach(this._addEntity.bind(this))},_addEntity:function(e){var t=e.type,n=e.id,i=e.model,a=this.get("entities");Object(r.a)(a,"Use `createEntitiesModelClass` to create an `entities` session relation in a platform's app model"),a.get(t).add({id:n,model:i},{merge:!0})},onEntityChange:function(e){this.has("entities")?this._addEntity(e):this._pendingEntities.push(e)}});t.a=o},function(e,t,n){"use strict";var i=n(15),r=n(23),a=n(3749),o=r.a.extend({name:"PlexPlayerCollection",
context:["server"],model:a.a,url:"/clients",augmentResponse:function(e){var t=Object(i.d)("appModel"),n=t.get("clientID"),r=parseInt(e.size,10);return 1===r&&e.Server.machineIdentifier===n?(delete e.Server,e.size="0"):r>1&&(e.Server=e.Server.filter(function(e){return e.machineIdentifier!==n}),e.size=e.Server.length.toString()),e}});t.a=o},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"PlexPlayerModel",context:["server"],idAttribute:"machineIdentifier",
rootPropertyName:"Server",sessionAttrs:{volume:i.a.integer},syncedAttrs:{machineIdentifier:i.a.string,name:i.a.string,address:i.a.string,port:i.a.string,deviceClass:i.a.string,version:i.a.string,product:i.a.string,protocol:i.a.string,protocolVersion:i.a.string,protocolCapabilities:i.a.list},derivedAttrs:{friendlyName:function(){return this.get("name")||this.get("product")}},defaults:{volume:100}});t.a=a},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(16),o=n(18),s=n(3751),l=o.a.extend({
name:"MultiSelectModel",sessionAttrs:{activeSelectionRange:a.a.object},sessionRelations:{activeSelectionItems:{relationClass:s.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;r.a.each(i,function(t){e.contains(t)||n.remove(t.id)})},onCollectionRemove:function(e){this.get("activeSelectionItems").remove(e.id)}});t.a=l},function(e,t,n){"use strict";var i=n(23),r=n(3752),a=i.a.extend({name:"MultiSelectItemCollection",model:r.a});t.a=a},function(e,t,n){"use strict"
;var i=n(16),r=n(18),a=r.a.extend({name:"MultiSelectItemModel",sessionAttrs:{id:i.a.any.isRequired,type:i.a.string.isRequired},sessionRelations:{model:{relationClass:r.a,deferred:!0}}});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(3754),a=n(3755),o=n(3756),s=n(3757),l=n(3758),c=n(3759),u=n(3760),d=n(3761),p=n(3762),h=n(3763),f=n(3764),v=n(3765),g=n(3766),m=n(3767),y=n(3768),b=n(3769),I=n(3770),S=n(3771),M=n(3772),D=n(3773),C=n(3774),O=i.a.extend({name:"DesktopUIModel",sessionRelations:{
background:{relationClass:c.a},authCodeExchange:{relationClass:m.a},dashboardPage:{relationClass:u.a},metadataListPage:{relationClass:d.a},libraryPage:{relationClass:p.a},prePlayPage:{relationClass:h.a},timelinePage:{relationClass:f.a},playlistsPage:{relationClass:v.a},dvrSettingsUI:{relationClass:g.a},recordingSchedulePage:{relationClass:o.a},channelGridPage:{relationClass:s.a},mediaSubscriptionModal:{relationClass:a.a},provisionPersonalCloudServerPage:{relationClass:y.a},searchPage:{
relationClass:b.a},quickSearch:{relationClass:I.a},photoPlayer:{relationClass:r.a},audioVideoPlayer:{relationClass:r.a},onlineMediaSourcesPage:{relationClass:S.a},audioSubtitleSettingsPage:{relationClass:M.a},playlistPage:{relationClass:D.a},providerSettingsPage:{relationClass:l.a},addToCatalogModal:{relationClass:C.a}}});t.a=O},function(e,t,n){"use strict";var i=n(197),r=n(16),a=n(18),o=n(212),s=n(964),l=a.a.extend({name:"PlayerModel",sessionAttrs:{serverEntityID:r.a.string,
providerEntityID:r.a.string,isOpen:r.a.boolean,previousOpenState:r.a.oneOf(i.a,i.b),openState:r.a.oneOf(i.a,i.b),isPlayQueueVisible:r.a.boolean,isAlsoAiringVisible:r.a.boolean,isLyricsVisible:r.a.boolean,isPostPlayVisible:r.a.boolean,isSettingsVisible:r.a.boolean,confirmPlaybackPayload:r.a.object,confirmOffsetPayload:r.a.object,confirmRemoteToLocal:r.a.boolean,confirmLocalToRemote:r.a.boolean,decisions:r.a.object.isRequired,currentDecision:r.a.object,startMetadataItemEntityID:r.a.string,
startOffsetMilliseconds:r.a.integer,startMediaIndex:r.a.integer,positionSeconds:r.a.integer,lastSeekPositionSeconds:r.a.integer,durationSeconds:r.a.integer,seekStartSeconds:r.a.integer,seekEndSeconds:r.a.integer,bandwidthTimeline:r.a.object,lastInteractedAt:r.a.integer,playbackSpeed:r.a.float,isPlayQueueLoading:r.a.boolean.isRequired,isMediaLoading:r.a.boolean.isRequired,isPostPlayLoading:r.a.boolean.isRequired,isPaused:r.a.boolean.isRequired,isBuffering:r.a.boolean.isRequired,
repeatAll:r.a.boolean.isRequired,repeatOne:r.a.boolean.isRequired,mediaIndex:r.a.integer,partIndex:r.a.integer,qualityIndex:r.a.integer,availableQualities:r.a.array.isRequired,controllable:r.a.object,metricsPage:r.a.string,metricsContext:r.a.string,metricsAutoPlay:r.a.boolean,hasError:r.a.boolean.isRequired,errorMessage:r.a.string,errorCode:r.a.string,errorCategory:r.a.string,hasConflicts:r.a.boolean.isRequired,isConflictCancelling:r.a.boolean,cancelConflictError:r.a.object,
confirmLiveTVPlayback:r.a.boolean.isRequired},sessionRelations:{playQueue:{relationClass:a.a,deferred:!0},relatedHubs:{relationClass:o.default,deferred:!0},liveTVSession:{relationClass:s.a,deferred:!0}},defaults:function(){return{isOpen:!1,openState:i.a,isPlayQueueVisible:!1,isAlsoAiringVisible:!1,isLyricsVisible:!1,isPostPlayVisible:!1,isSettingsVisible:!1,confirmPlaybackPayload:null,confirmOffsetPayload:null,confirmRemoteToLocal:!1,confirmLocalToRemote:!1,decisions:{},
startMetadataItemEntityID:null,startOffsetMilliseconds:null,startMediaIndex:null,positionSeconds:0,lastSeekPositionSeconds:null,durationSeconds:0,seekStartSeconds:0,seekEndSeconds:0,isPlayQueueLoading:!1,isMediaLoading:!1,isPostPlayLoading:!1,isPaused:!1,isBuffering:!1,repeatAll:!1,repeatOne:!1,availableQualities:[],metricsAutoPlay:!1,hasError:!1,errorMessage:null,errorCode:null,errorCategory:null,hasConflicts:!1,isConflictCancelling:!1,cancelConflictError:null,confirmLiveTVPlayback:!1}}});t.a=l
},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(1067),o=n(527),s=r.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:a.a,deferred:!0},mediaSubscription:{relationClass:o.a,deferred:!0}},defaults:{isMediaSubscriptionPending:!0,isMediaSubscriptionPopulated:!1,mediaSubscriptionError:null,isMediaSubscriptionSaving:!1,mediaSubscriptionSaveError:null,isMediaSubscriptionMoving:!1,mediaSubscriptionMoveError:null,isMediaSubscriptionDeleting:!1,mediaSubscriptionDeleteError:null}});t.a=s},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(1271),o=n(1272),s=r.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:a.a,deferred:!0},calendar:{relationClass:o.a,deferred:!0}},defaults:{isPagePopulated:!1,isMediaSubscriptionsPending:!1,isMediaSubscriptionsPopulated:!1,
mediaSubscriptionsError:null,isCalendarPending:!1,isCalendarPopulated:!1,calendarError:null}});t.a=s},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(1184),o=n(1185),s=r.a.extend({name:"ChannelGridPageModel",sessionAttrs:{serverEntityID:i.a.string,providerEntityID:i.a.string,containerKey:i.a.string,directoryKey:i.a.string,startTime:i.a.integer,visibleColumns:i.a.integer,columnTimes:i.a.array,columnWidth:i.a.float,viewportWidth:i.a.integer,viewportHeight:i.a.integer,airedProgress:i.a.float,
isChannelsListPending:i.a.boolean,isChannelsListPopulated:i.a.boolean,channelsListError:i.a.object},sessionRelations:{metadataList:{relationClass:a.a,deferred:!0},channelsList:{relationClass:o.a,deferred:!0}},defaults:function(){return{startTime:0,visibleColumns:1,columnTimes:[],columnWidth:0,viewportWidth:0,viewportHeight:0,airedProgress:0,isChannelsListPending:!0,isChannelsListPopulated:!1,channelsListError:null}}});t.a=s},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({
name:"ProviderSettingsPageModel",context:["server","provider"],sessionAttrs:{isUpdatePending:r.a.boolean,updateError:r.a.object},defaults:{isUpdatePending:!1,updateError:null}});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(99),o=n(55),s=r.a.extend({name:"BackgroundModel",sessionAttrs:{imageUrl:i.a.string,themeMusicUrl:i.a.string,allowLightPreset:i.a.boolean,isBackgroundPending:i.a.boolean},sessionRelations:{server:{relationClass:a.c,deferred:!0},provider:{relationClass:o.a,
deferred:!0}},defaults:{allowLightPreset:!1,isBackgroundPending:!1}});t.a=s},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(212),o=r.a.extend({name:"DashboardPageModel",sessionAttrs:{providerEntityID:i.a.string,hubKey:i.a.string,isHubsPending:i.a.boolean.isRequired,isHubsPopulated:i.a.boolean.isRequired,hubsError:i.a.object,isPromotedHubsPending:i.a.boolean.isRequired,isPromotedHubsPopulated:i.a.boolean.isRequired,promotedHubsError:i.a.object,
knownPromotedHubCloudProviderIDs:i.a.array.isRequired},sessionRelations:{hubs:{relationClass:a.default,deferred:!0},promotedHubs:{relationClass:a.default,deferred:!0}},defaults:function(){return{isHubsPending:!0,isHubsPopulated:!1,hubsError:null,isPromotedHubsPending:!0,isPromotedHubsPopulated:!1,promotedHubsError:null,knownPromotedHubCloudProviderIDs:[]}}});t.a=o},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(98),o=r.a.extend({name:"MetadataListPageModel",sessionAttrs:{
providerEntityID:i.a.string,listKey:i.a.string},sessionRelations:{metadataList:{relationClass:a.default,deferred:!0}}});t.a=o},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(98),o=n(614),s=n(384),l=n(621),c=n(471),u=n(1283),d=r.a.extend({name:"LibraryPageModel",sessionAttrs:{providerEntityID:i.a.string,libraryKey:i.a.string,containerKey:i.a.string,isDetailsPending:i.a.boolean.isRequired,isDetailsPopulated:i.a.boolean.isRequired,detailsError: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,isQueryParsePending:i.a.boolean.isRequired,isQueryParsePopulated:i.a.boolean.isRequired,queryParseError:i.a.object,typeKey:i.a.string},sessionRelations:{
metadataList:{relationClass:a.default,deferred:!0},directoryList:{relationClass:o.a,deferred:!0},details:{relationClass:s.a,deferred:!0},firstCharacters:{relationClass:l.a,deferred:!0},selectedFilterOptions:{relationClass:c.a,deferred:!0},queryParse:{relationClass:u.a,deferred:!0}},defaults:{isDetailsPending:!0,isDetailsPopulated:!1,detailsError:null,isFirstCharactersPending:!0,isFirstCharactersPopulated:!1,firstCharactersError:null,selectedFilterKey:null,filterOptionQuery:"",
isSelectedFilterOptionsPending:!0,isSelectedFilterOptionsPopulated:!1,selectedFilterOptionsError:null,isQueryParsePending:!0,isQueryParsePopulated:!1,queryParseError:null}});t.a=d},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(77),o=n(98),s=n(212),l=r.a.extend({name:"PrePlayPageModel",sessionAttrs:{providerEntityID:i.a.string,metadataKey:i.a.string,descendantKey:i.a.string,siblingKey:i.a.string,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,isFileUnavailable:i.a.boolean,decisionMediaItem:i.a.object},sessionRelations:{metadataItem:{relationClass:a.a,deferred:!0},descendantList:{relationClass:o.default,deferred:!0},siblingList:{relationClass:o.default,deferred:!0},relatedHubs:{relationClass:s.default,deferred:!0}},defaults:{isMetadataItemPending:!0,isMetadataItemPopulated:!1,
metadataItemError:null,isRelatedHubsPending:!0,isRelatedHubsPopulated:!1,relatedHubsError:null,isFileUnavailable:!1}});t.a=l},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(98),o=n(384),s=n(1285),l=r.a.extend({name:"TimelinePageModel",sessionAttrs:{serverEntityID:i.a.string,momentKey:i.a.string,isDetailsPending:i.a.boolean.isRequired,isDetailsPopulated:i.a.boolean.isRequired,detailsError:i.a.object,isMomentListPending:i.a.boolean.isRequired,isMomentListPopulated:i.a.boolean.isRequired,
momentListError:i.a.object},sessionRelations:{metadataList:{relationClass:a.default,deferred:!0},details:{relationClass:o.a,deferred:!0},momentList:{relationClass:s.a,deferred:!0}},defaults:{isDetailsPending:!0,isDetailsPopulated:!1,detailsError:null,isMomentListPending:!0,isMomentListPopulated:!1,momentListError:null}});t.a=l},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(384),o=n(398),s=n(98),l=r.a.extend({name:"PlaylistsPageModel",sessionAttrs:{serverEntityID:i.a.string,
libraryKey:i.a.string,containerKey:i.a.string,isLibraryDetailsPending:i.a.boolean.isRequired,isLibraryDetailsPopulated:i.a.boolean.isRequired,libraryDetailsError:i.a.object,isSortsPending:i.a.boolean.isRequired,isSortsPopulated:i.a.boolean.isRequired,sortsError:i.a.object},sessionRelations:{libraryDetails:{relationClass:a.a,deferred:!0},playlists:{relationClass:s.default,deferred:!0},sorts:{relationClass:o.a,deferred:!0}},defaults:{isLibraryDetailsPending:!0,isLibraryDetailsPopulated:!1,
libraryDetailsError:null,isSortsPending:!0,isSortsPopulated:!1,sortsError:null}});t.a=l},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(1138),o=n(529),s=r.a.extend({name:"DVRSettingsUIModel",sessionAttrs:{isDvrsPending:i.a.boolean,isDvrsPopulated:i.a.boolean,dvrsError:i.a.object,isUIPopulated:i.a.boolean},sessionRelations:{dvrs:{relationClass:a.a,deferred:!0},dvrSetup:{relationClass:o.a,deferred:!0}},defaults:{isDvrsPending:!1,isDvrsPopulated:!1,dvrsError:null,isUIPopulated:!1}});t.a=s
},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"AuthCodeExchangeModel",sessionAttrs:{code:i.a.string,pinID:i.a.integer,pinIDInitial:i.a.integer,pinTimeout:i.a.integer,authToken:i.a.string,isBusy:i.a.boolean.isRequired,errorMessage:i.a.string,fatalErrorMessage:i.a.string},defaults:{code:null,pinID:null,pinIDInitial:null,pinTimeout:null,authToken:null,isBusy:!1,errorMessage:null,fatalErrorMessage:null}});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({
name:"ProvisionPersonalCloudServerModel",sessionAttrs:{isPersonalCloudServerModalOpen:r.a.boolean,isProvisionPersonalCloudServerPending:r.a.boolean,isProvisionPersonalCloudServerPopulated:r.a.boolean,provisionPersonalCloudServerError:r.a.object,isConnectToPersonalCloudServerPending:r.a.boolean,isConnectToPersonalCloudServerPopulated:r.a.boolean,connectToPersonalCloudServerError:r.a.object,isPersonalCloudServerDriveCachePending:r.a.boolean,isPersonalCloudServerDriveCachePopulated:r.a.boolean,
personalCloudServerDriveCacheError:r.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=a},function(e,t,n){
"use strict";var i=n(18),r=n(1286),a=i.a.extend({name:"SearchPageModel",sessionRelations:{searches:{relationClass:r.a}}});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(1286),o=r.a.extend({name:"QuickSearchModel",sessionAttrs:{query:i.a.string,serverEntityID:i.a.string,providerEntityID: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:a.a}},defaults:{query:"",selectedResultEntityID:null}});t.a=o},function(e,t,n){"use strict";var i=n(18),r=n(16),a=n(1269),o=i.a.extend({name:"OnlineMediaSourcesPageModel",sessionAttrs:{optOutStatuses:r.a.object,isOptOutStatusesPending:r.a.boolean,optOutStatusesError:r.a.object,isAvailableProvidersPending:r.a.boolean,isAvailableProvidersPopulated:r.a.boolean,availableProvidersError:r.a.object,isUpdatePending:r.a.boolean,updateError:r.a.object},sessionRelations:{
availableProviders:{relationClass:a.a,deferred:!0}},defaults:{isOptOutStatusesPending:!0,optOutStatusesError:null,isAvailableProvidersPending:!0,isAvailableProvidersPopulated:!1,availableProvidersError:null,isUpdatePending:!1,updateError:null}});t.a=o},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({name:"AudioSubtitleSettingsPageModel",sessionAttrs:{isUpdatingUserProfile:r.a.boolean.isRequired,updateUserProfileError:r.a.string},defaults:{isUpdatingUserProfile:!1,
updateUserProfileError:null}});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(77),o=n(624),s=r.a.extend({name:"PlaylistPageModel",sessionAttrs:{serverEntityID:i.a.string,providerEntityID:i.a.string,metadataKey:i.a.string,isPlaylistPending:i.a.boolean.isRequired,isPlaylistPopulated:i.a.boolean.isRequired,playlistError:i.a.object,isPlaylistItemListPending:i.a.boolean.isRequired,isPlaylistItemListPopulated:i.a.boolean.isRequired,playlistItemListError:i.a.object},sessionRelations:{
playlist:{relationClass:a.a,deferred:!0},playlistItemList:{relationClass:o.a,deferred:!0}},defaults:{isPlaylistPending:!0,isPlaylistPopulated:!1,playlistError:null,isPlaylistItemListPending:!0,isPlaylistItemListPopulated:!1,playlistItemListError:null}});t.a=s},function(e,t,n){"use strict";var i=n(18),r=n(16),a=i.a.extend({name:"AddToCatalogModalModel",sessionAttrs:{isUpdating:r.a.boolean.isRequired,error:r.a.object},defaults:{isUpdating:!1,error:null}});t.a=a},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(396),o=n(3776),s=o.a.extend({storageKey:"settingsv2",defaults:r()({},o.a.prototype.defaults,{allowHttpFallback:a.a.NEVER,companion:!0,directPlay:!0,directStream:!0,audioBoost:100,"syncQuality!video":8,"syncQuality!music":2,"syncQuality!photo":2,announcementsLastReadTimestamp:0,serverUpdateDismissedVersion:"",hasDismissedPremiumMusicAlert:!1,hasSkippedInstallServer:!1,viewedUnclaimedServers:[],dismissedUnclaimedServers:[],relayConfirmed:!1,
suppressLimitedPlaybackMessage:!1})});t.a=s},function(e,t,n){"use strict";var i=n(1287),r=n(3777),a=i.a.extend({defaults:r.a});t.a=a},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(5),r=n.n(i),a=n(3778),o=n(396),s=n(1242),l=n(16),c=Object(a.a)(window.PLEXWEB_INLINE&&window.PLEXWEB_INLINE.acceptLanguage),u={allowHttpFallback:{type:l.a.string,defaultValue:o.a.NEVER},companion:{type:l.a.boolean,defaultValue:!0},language:{type:l.a.string,defaultValue:c},autoLogin:{
type:l.a.boolean,defaultValue:!1},extrasPrefixCount:{type:l.a.integer,defaultValue:0},debugLevel:{type:l.a.integer,defaultValue:s.a.DISABLED}},d=(r.a.mapObject(u,function(e){return e.type}),r.a.mapObject(u,function(e){return e.defaultValue}))},function(e,t,n){"use strict";function i(e){var t=window.navigator,n=void 0;return e?n=Object(a.a)(e):t.languages?n=t.languages:t.language?n=[t.language]:t.userLanguage&&(n=[t.userLanguage]),Object(r.a)(n)||"en"}t.a=i;var r=n(3779),a=n(3780)
},function(e,t,n){"use strict";function i(e){e=e||[];for(var t=0,n=e.length;t<n;t++){var o=e[t];if("xx"!==o&&"xn"!==o){if(r.b[o])return o;var s=o.match(a),l=s&&i([s[1]]);if(l)return l}}}t.a=i;var r=n(426),a=/(^[^-]+)\-/},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(7),r=n.n(i),a=n(5),o=n.n(a),s=n(16),l=n(3782),c=n(3784),u=n(3785),d=n(3787),p=n(3789),h=n(3791),f=n(3795),v=n(3797),g=l.a.prototype,m=l.a.extend({
sessionAttrs:r()({},g.sessionAttrs,{friends:s.a.instanceOf(c.a).isRequired,invites:s.a.instanceOf(u.a).isRequired,sentInvites:s.a.instanceOf(u.a).isRequired,socialNetworks:s.a.instanceOf(d.a).isRequired,isPlansPending:s.a.boolean.isRequired,isPlansPopulated:s.a.boolean.isRequired,plansError:s.a.object,isDeletingAvatar:s.a.boolean.isRequired,isUpdatingUser:s.a.boolean.isRequired,updateUserError:s.a.object,isWebhooksPending:s.a.boolean,isWebhooksPopulated:s.a.boolean,webhooksError:s.a.object,
isUpdatingWebhooks:s.a.boolean,isRemovingWebhooks:s.a.boolean,updateWebhooksError:s.a.object}),sessionRelations:r()({},g.sessionRelations,{devices:{relationClass:h.a},announcements:{relationClass:p.a},plans:{relationClass:f.a},webhooks:{relationClass:v.a}}),defaults:function(){var e={server:this.server,parent:this};return r()({},g.defaults,{devices:new h.a([],e),friends:new c.a([],e),invites:new u.a([],e),sentInvites:new u.a([],o.a.extend({subset:"requested"},e)),socialNetworks:new d.a([],e),
isPlansPending:!0,isPlansPopulated:!1,plansError:null,isDeletingAvatar:!1,isUpdatingUser:!1,updateUserError:null,isWebhooksPending:!1,isWebhooksPopulated:!1,webhooksError:null,isUpdatingWebhooks:!1,isRemovingWebhooks:!1,updateWebhooksError:null})}});t.a=m},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(807),o=n(1288),s=r.a.extend({name:"UserFlexModel",context:["server"],sessionAttrs:{isUnwatchedWatchLaterListPending:i.a.boolean.isRequired,
isUnwatchedWatchLaterListPopulated:i.a.boolean.isRequired,unwatchedWatchLaterListError:i.a.object,isUnwatchedRecommendedListPending:i.a.boolean.isRequired,isUnwatchedRecommendedListPopulated:i.a.boolean.isRequired,unwatchedRecommendedListError:i.a.object,isProvidersPending:i.a.boolean.isRequired,isProvidersPopulated:i.a.boolean.isRequired,providersError:i.a.object},sessionRelations:{unwatchedWatchLaterList:{relationClass:a.a,attrs:{key:a.a.keys.WATCH_LATER,subset:a.a.subsets.UNWATCHED}},
unwatchedRecommendedList:{relationClass:a.a,attrs:{key:a.a.keys.RECOMMENDED,subset:a.a.subsets.UNWATCHED}},providers:{relationClass:o.a}},defaults:{isUnwatchedWatchLaterListPending:!0,isUnwatchedWatchLaterListPopulated:!1,unwatchedWatchLaterListError:null,isUnwatchedRecommendedListPending:!0,isUnwatchedRecommendedListPopulated:!1,unwatchedRecommendedListError:null,isProvidersPending:!0,isProvidersPopulated:!1,providersError:null}});t.a=s},function(e,t,n){"use strict"
;var i=n(4),r=n(55),a=n(855),o=n(76),s=n(324),l=r.a.extend({name:"LegacyLibraryProviderModel",defaults:function(){var e=this.server,t=e.get("isFullServer"),n=e.get("isFullOwnedServer"),l=[{type:o.b.CONTENT,key:"/library/sections"},{type:o.b.MATCH,key:"/library/matches"},{type:o.b.METADATA,key:"/library/metadata"}];return t&&l.push({type:o.b.SEARCH,key:"/hubs/search"},{type:o.b.PLAY_QUEUE,key:"/playQueues"},{type:o.b.RATE,key:"/:/rate"},{type:o.b.TIMELINE,key:"/:/timeline"},{type:o.b.ACTIONS,
actions:[{id:s.b.SCROBBLE,key:"/:/scrobble",reverseKey:"/:/unscrobble"}]}),n&&l.push({type:o.b.MANAGE}),{identifier:r.c.LIBRARY_PROVIDER_IDENTIFIER,title:Object(i.default)("Library"),types:["video","audio","photo"],protocols:n?["stream","download"]:["stream"],features:new a.a(l,{parse:!0,server:e})}}});t.a=l},function(e,t,n){"use strict";var i=n(501),r=n.n(i),a=n(165),o=n(1071),s=a.a.extend({model:o.a,url:"/api/users",parse:function(e){return this.convert(e,"User")},filterByHome:function(){
var e=new r.a(this);return e.filterBy(function(e){return e.get("home")}),e},filterByUnrestricted:function(){var e=new r.a(this);return e.filterBy(function(e){return!e.get("restricted")}),e},filterByServerShares:function(e){var t=new r.a(this);return t.filterBy(function(t){return!!t.get("serverShares").findWhere({machineIdentifier:e})}),t}});t.a=s},function(e,t,n){"use strict";var i=n(501),r=n.n(i),a=n(165),o=n(3786),s=a.a.extend({model:o.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 r.a(this);return e.filterBy(function(e){return e.get("home")}),e},filterByFriends:function(){var e=new r.a(this);return e.filterBy(function(e){return!e.get("home")}),e}});t.a=s},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(67),o=n(19),s=n(117),l=s.a.extend({
whitelistedAttrs:["id","friend","server","home","friendlyName","username","email","thumb","createdAt","Server"],urlRoot:"/api/invites/requests",url:function(){var e=void 0;if(this.isNew())e=r.a.result(this,"urlRoot");else{var t=this.pick("friend","server","home");r.a.each(r.a.keys(t),function(e){t[e]=t[e]?"1":"0"}),e=this.collection?r.a.result(this.collection,"url"):r.a.result(this,"urlRoot"),e=e.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.get("id")),e=o.join(e,t)}return e},
convert:function(e){var t=r.a.isObject(e)?e:a.a.parseXML(e);a.a.parseInteger(t,"createdAt"),a.a.parseBoolean(t,["friend","server","home"]),a.a.parseArray(t,"Server");var n=t.Server;return r.a.each(n,function(e){a.a.parseInteger(e,"numLibraries")}),t},parse:function(e){var t=this.convert(e);return t=r.a.pick(t,this.whitelistedAttrs)}});t.a=l},function(e,t,n){"use strict";var i=n(165),r=n(3788),a=i.a.extend({model:r.a,url:"/pms/social/networks",parse:function(e){return this.convert(e,"Directory")}
});t.a=a},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(67),o=n(117),s=o.a.extend({idAttribute:"key",whitelistedAttrs:["key","title","linked","maxLength"],convert:function(e){var t=r.a.isObject(e)?e:a.a.parseXML(e);return a.a.parseBoolean(t,["linked","maxLength"]),t},parse:function(e){var t=this.convert(e);return t=r.a.pick(t,this.whitelistedAttrs)}});t.a=s},function(e,t,n){"use strict";var i=n(23),r=n(3790),a=i.a.extend({name:"AnnouncementCollection",model:r.a,context:["server"],
url:"api/announcements"});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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=a},function(e,t,n){"use strict"
;var i=n(5),r=n.n(i),a=n(23),o=n(3792),s=a.a.extend({name:"DeviceCollection",context:["server"],model:o.a,url:"/devices.xml",filterSyncDevices:function(e){var t=!(!e||!e.channel),n=!!e&&e.server.get("isShared"),i=!!e&&e.get("isPlaylist"),a=this.filter(function(e){var r=e.get("syncList"),a=r&&r.get("version")>=2,o=(t||n)&&e.get("isCloudSync"),s=i&&!a;return e.supports("sync-target")&&!o&&!s}),o=r.a.sortBy(a,function(e){return!e.get("isCloudSync")});return this.clone(o)},
filterByProducts:function(e){var t=this.filter(function(t){return r.a.contains(e,t.get("product"))});return this.clone(t)},products:function(){var e=this.map(function(e){return e.get("product")});return r.a.uniq(e)}});t.a=s},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(3793),o=r.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:a.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-1!==this.get("provides").indexOf(e)}});t.a=o},function(e,t,n){"use strict";var i=n(277),r=n(16),a=n(18),o=n(3794),s={ACTIVE:"active",SNOOZED:"snoozed",DEAD:"dead"},l=a.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:r.a.oneOf("active","snoozed","dead"),clientIdentifier:r.a.string,version:r.a.integer,
itemsCompleteCount:r.a.integer,totalSize:r.a.integer},syncedRelations:{syncItems:{relationClass:o.a,rootPropertyName:"SyncItems"}},derivedAttrs:{isActive:function(){return"active"===this.get("status")}},augmentResponse:function(e){return e.SyncItems&&(e.SyncItems=e.SyncItems.SyncItem),e},sync:function(e,t,n){var r=i.a.addVersionHeaderForDevice(this.get("device"),n);return a.a.prototype.sync.call(this,e,t,r)},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:s});t.a=l},function(e,t,n){"use strict";var i=n(23),r=n(627),a=i.a.extend({name:"SyncItemCollection",context:["server","device"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(23),r=n(3796),a=i.a.extend({name:"SubscriptionPlanCollection",context:["server"],model:r.a,url:"/api/subscriptions/plans"});t.a=a},function(e,t,n){"use strict"
;var i=n(16),r=n(18),a=r.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=a},function(e,t,n){"use strict";var i=n(23),r=n(51),a=n(3798),o=i.a.extend({name:"WebhookCollection",context:["server"],model:a.a,url:"/api/v2/user/webhooks",responseType:r.a.json});t.a=o},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"WebhookModel",
syncedAttrs:{url:i.a.string},defaults:{url:""}});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(62),a=n(18),o=n(3800),s=n(1288),l=n(619),c=n(473),u=n(3802),d=n(245),p=n(3803),h=n(3806),f=n(3808),v=n(3810),g=a.a.extend({name:"ServerFlexModel",context:["server"],sessionAttrs:{update:i.a.instanceOf(u.a),alerts:i.a.instanceOf(p.a).isRequired,transcodeJobs:i.a.instanceOf(h.a).isRequired,hasiTunes:i.a.boolean,isSettingsPending:i.a.boolean,isSettingsPopulated:i.a.boolean,settingsError:i.a.object,
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:{settings:{relationClass:d.a,rootPropertyName:"Setting"},cloudAccount:{relationClass:c.i},providers:{relationClass:s.a},libraries:{relationClass:l.a},sessions:{relationClass:f.a},activities:{relationClass:v.a},backgroundTranscodeJobs:{relationClass:o.a}},
defaults:function(){return{update:r.a.get("allowServerUpdates")?new u.a({},{server:this.server}):null,alerts:new p.a([],{server:this.server}),transcodeJobs:new h.a([],{server:this.server}),sessions:new f.a([],{server:this.server}),hasiTunes:!1,isSettingsPending:!0,isSettingsPopulated:!1,settingsError:null,isProvidersPending:!0,isProvidersPopulated:!1,providersError:null,isLibrariesPending:!0,isLibrariesPopulated:!1,librariesError:null}}});t.a=g},function(e,t,n){"use strict"
;var i=n(23),r=n(3801),a=i.a.extend({name:"BackgroundTranscodeJobCollection",model:r.a,context:["server"],url:"/status/sessions/background"});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(40),o=n(287),s=r.a.extend({name:"BackgroundTranscodeJobModel",context:["server"],entityType:o.BACKGROUND_TRANSCODE_JOBS,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(a.a)(this.entityType,e.key,this.server.entityID())},idAttribute:"key",
rootPropertyName:"TranscodeJob",syncedAttrs:{queueItemID:i.a.integer,generatorID:i.a.integer,targetTagID:i.a.integer,syncItemId:i.a.integer,syncItemTitle:i.a.string,key:i.a.string,type:i.a.string,progress:i.a.float,speed:i.a.float,remaining:i.a.integer,size:i.a.integer,ratingKey:i.a.string,title:i.a.string,thumb:i.a.string}});t.a=s},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(67),l=n(117),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):o.a.Deferred().reject().promise()},convert:function(e){var t=r.a.isObject(e)?e:s.a.parseXML(e);return s.a.parseBoolean(t,"canInstall"),s.a.parseInteger(t,"status"),
t.Release&&s.a.parseInteger(t.Release,"progress"),t},parse:function(e,t){var n=this.convert(e);return n=r.a.extend(n,n.Release),n=r.a.pick(n,this.whitelistedAttrs),0!==n.status&&(n.state="error"),n}});t.a=c},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(3804),o=n(3805),s=a.a.extend({model:o.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)),a.a.prototype.add.apply(this,arguments)},onSettingChange:function(e){e.label&&this.add(r.a.extend({_type:"setting"},e),{parse:!0})},onTimeline:function(e){
1===e.state||e.sectionID<0||this.add(r.a.extend({_type:"timeline"},e),{parse:!0})},onStatus:function(e){"ProgressNotification"!==e._elementType&&this.add(r.a.extend({_type:"status"},e),{parse:!0})},onPlaying:function(e){this.add(r.a.extend({_type:"playing"},e),{parse:!0})},onWebSocket:function(e){this.add(r.a.extend({_type:"websocket"},e),{parse:!0})}});t.a=s},function(e,t,n){"use strict";var i=n(165),r=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=r},function(e,t,n){"use strict";var i=n(117),r=0,a=i.a.extend({idAttribute:"id",parse:function(e){var t=e;return t.time=new Date,t.id="evt"+r++,"preference"===t._type&&(t.value=String(t.value)),t}});t.a=a},function(e,t,n){"use strict"
;var i=n(165),r=n(3807),a=i.a.extend({model:r.a,url:"/sync/transcodeQueue",parse:function(e){return this.convert(e,"TranscodeJob")}});t.a=a},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(67),o=n(117),s=o.a.extend({idAttribute:"syncItemId",whitelistedAttrs:["syncItemId","syncItemTitle","key","type","progress","speed","remaining","size","title","thumb"],convert:function(e){var t=r.a.isObject(e)?e:a.a.parseXML(e);return a.a.parseInteger(t,"syncItemId"),a.a.parseFloat(t,["progress","speed"]),
t},parse:function(e){var t=this.convert(e);return t=r.a.pick(t,this.whitelistedAttrs)}});t.a=s},function(e,t,n){"use strict";var i=n(51),r=n(325),a=n(3809),o=r.a.extend({name:"SessionCollection",model:a.a,url:"/status/sessions",responseType:function(){return i.a.xml}});t.a=o},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(43),o=n(40),s=n(242),l=n(51),c=n(16),u=n(77),d=u.a.extend({name:"SessionModel",entityType:a.n,entityID:function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(o.a)(this.entityType,e.sessionKey,this.server.entityID())},idAttribute:"sessionKey",cache:new s.a,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.sessionKey)},responseType:function(){return l.a.xml},syncedAttrs:r()({},u.a.prototype.syncedAttrs,{sessionKey:c.a.string,Player:c.a.object,Session:c.a.object,User:c.a.object,TranscodeSession:c.a.object,delegated:c.a.boolean}),
defaults:r()({},u.a.prototype.defaults,{delegated:!1})});t.a=d},function(e,t,n){"use strict";var i=n(23),r=n(97),a=n(175),o=i.a.extend({name:"ActivityCollection",context:["server"],model:a.b,url:"/activities",responseType:function(){return Object(r.a)(this.server)}});t.a=o},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(3812),o=n(3815),s=r.a.extend({name:"CloudServerFlexModel",context:["server"],sessionAttrs:{isPersonalCloudServerRestarting:i.a.boolean,
personalCloudServerRestartError:i.a.object,isOauthProvidersPending:i.a.boolean,isOauthProvidersPopulated:i.a.boolean,oauthProvidersError:i.a.object,isPersonalCloudServerStatusPending:i.a.boolean,isPersonalCloudServerStatusPopulated:i.a.boolean,personalCloudServerStatusError:i.a.object},sessionRelations:{oauthProviders:{relationClass:a.a},personalCloudServerStatus:{relationClass:o.a}},defaults:{isPersonalCloudServerRestarting:!1,personalCloudServerRestartError:null,isOauthProvidersPending:!1,
isOauthProvidersPopulated:!1,oauthProvidersError:null,isPersonalCloudServerStatusPending:!1,isPersonalCloudServerStatusPopulated:!1,personalCloudServerStatusError:null}});t.a=s},function(e,t,n){"use strict";var i=n(23),r=n(51),a=n(3813),o=i.a.extend({name:"OauthProviderCollection",model:a.a,context:["server"],url:"/api/v2/authentications/providers",responseType:r.a.json});t.a=o},function(e,t,n){"use strict";var i=n(16),r=n(18),a=n(3814),o=r.a.extend({name:"OauthProviderModel",
rootPropertyName:"provider",sessionAttrs:{isUnlinking:i.a.boolean.isRequired,unlinkError:i.a.object},syncedAttrs:{authName:i.a.string,image:i.a.string,label:i.a.string.isRequired,linked:i.a.boolean.isRequired,nickname:i.a.string,url:i.a.string.isRequired},syncedRelations:{usage:{relationClass:a.a}},defaults:{isUnlinking:!1}});t.a=o},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.a.extend({name:"OauthProviderUsageModel",syncedAttrs:{plexCloud:i.a.boolean,cloudSync:i.a.boolean,
federatedAuth:i.a.boolean,other:i.a.boolean}});t.a=a},function(e,t,n){"use strict";var i=n(16),r=n(18),a=r.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=a},function(e,t,n){"use strict";var i=n(609),r=n(16),a=i.a.extend({name:"SessionStatsModel",storageKey:"sessionstats",syncedAttrs:{
heartbeatTime:r.a.integer,lastPlayingHeartbeatTime:r.a.integer,playbackCount:r.a.integer,playbackTime:r.a.integer,sessionId:r.a.string,anonymousSessionId:r.a.string,startTime:r.a.integer,lastInteractionTime:r.a.integer},defaults:{playbackCount:0,playbackTime:0}});t.a=a},function(e,t,n){"use strict"
;var i=n(178),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(68),u=n(15),d=n(17),p=n(3818),h=n(3819),f=/(auth_token=|accessToken=|X-Plex-Token=|authToken=)(\"?\w+\"?)/g,v=/(email=)(\"?[^&]+\"?)/g,g=/(password=)([^&]+)/,m=/(address=|host=|uri=)(\"?[^&]+\"?)/g,y=function(e){return e=e.replace(f,"$1TOKEN"),e.replace(g,"$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
},I=function(e){if(e)return e=e.replace(f,'$1"TOKEN"'),e=e.replace(v,'$1"EMAIL"'),e=e.replace(m,'$1"IP ADRRESS"')},S=c.c.Collection.extend({model:h.a,initialize:function(e,t){o.a.bindAll(this,"onAjaxComplete","onAppModelRegistered"),this.parent=t.parent,p.a.parent=t.parent,Object(u.e)("appModel").done(this.onAppModelRegistered)},reconfigure:function(){Object(u.d)("appModel").get("settings").get("debugLevel")?this.start():this.stop()},start:function(){this.enabled||(this.enabled=!0,this.reset(),
this.listenTo(d.a,"log:message",this.onLogMessage),c.c.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.c.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.c.Collection.prototype.add.apply(this,arguments)},toJSON:function(){
var e=c.c.Collection.prototype.toJSON.apply(this,arguments);return e.unshift(o.a.extend({type:"info"},p.a.toJSON())),e},toJSONString:function(){return r()(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,n){
var i=Object(u.d)("appModel").get("settings"),r={type:"ajax",url:y(n.url),status:t.status};o.a.isEmpty(n.headers)||(r.headers=b(n.headers)),o.a.isEmpty(n.data)||(r.params=y(n.data)),200===t.status?2===i.get("debugLevel")?r.response=I(t.responseText):r.responseLength=t.responseText?t.responseText.length:0:(r.statusText=t.statusText,r.response=I(t.responseText)),this.add(r)}});t.a=S},function(e,t,n){"use strict";var i=n(68),r=n(38),a=i.c.Model.extend({initialize:function(e,t){
this.set("host",window.location.host),this.set("userAgent",window.navigator.userAgent),this.set("browser",r.a)},toJSON:function(){var e=this.parent,t=e.get("primaryServer"),n=e.get("user");return this.set("version","3.53.7"),t&&(t.get("activeConnection")&&this.set("primaryServerUrl",t.url()),this.set("primaryServerAuthToken",!!t.get("accessToken")),this.set("primaryServerVersion",t.get("versionFull"))),this.set("username",n.get("username")),this.set("cloudUrl",n.server.get("connections")),
i.c.Model.prototype.toJSON.apply(this,arguments)}});t.a=new a},function(e,t,n){"use strict";var i=n(68),r=i.c.Model.extend({initialize:function(e,t){this.set("time",new Date)}});t.a=r},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=(n(30),n(89)),u=(n(33),n(3821)),d=n(15),p=n(603),h=n(69),f=n(151),v=n(956),g=n(929),m=n(3822),y=n(62),b=h.a.extend({mixins:c.a,initialize:function(e){this.privacySettings=null,this.defaults={},this._anonymousClientID=null,
this._pendingPrivacyRequest=null,this._pendingEvents=[],this.debouncedFetchPrivacySettings=o.a.debounce(this.fetchPrivacySettings,250),this.isPlaybackActive=e.isPlaybackActive,this.enable()},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},set:function(e){this.defaults=r()({},this.defaults,e)},fetchPrivacySettings:function(){var e=this;this.privacySettings=null,this._pendingPrivacyRequest&&(this._pendingPrivacyRequest.abort(),this._pendingPrivacyRequest=null)
;var t=Object(d.d)("appModel").get("user");if(!t.server.get("isConnected"))return l.a.Deferred().reject().promise();var n=t.server.getXHROptions("/api/v2/user/privacy",{dataType:"json"});return this._pendingPrivacyRequest=l.a.ajax(n),this._pendingPrivacyRequest.promise().done(function(n){e.set({userId:t.id}),e.setPrivacySettings(n),e.trackPendingEvents()}).always(function(){e._pendingPrivacyRequest=null})},setPrivacySettings:function(e){if(e&&e.metrics){this.privacySettings=r()({},e,{
metrics:e.metrics.reduce(function(e,t){return e[t.event]=t.status,e},{})});Object(d.d)("metricsReporter").setBaseUrl(e.baseUrl)}},incrementPlaybackCount:function(){var e="playbackCount",t=Object(d.d)("sessionStats");t.save(e,t.get(e)+1)},addPlaybackTime:function(e){var t="playbackTime",n=Object(d.d)("sessionStats");n.save(t,n.get(t)+e)},trackView:function(e,t){var n="client:view",i=r()({event:n,interaction:!0,properties:e},t),a=p.a.measure(Object(m.a)(n,e),n+":"+e.page+"-start")
;a&&(i.properties=r()({},i.properties,{latency:Math.round(a.duration)})),this.trackEvent(i)},trackClick:function(e,t){this.trackEvent(r()({event:"client:click",interaction:!0,properties:e},t))},trackEvent:function(e){var t=this;if(this.enabled){var n=Object(d.d)("sessionStats"),i=n.get("sessionId"),a=n.get("anonymousSessionId");if(!this.privacySettings)return void this._pendingEvents.push(r()({},e,{sessionIdentifier:i,anonymousSessionIdentifier:a}));var o=l.a.extend(!0,{},this.defaults,e)
;o.sessionIdentifier||(o.sessionIdentifier=i),o.anonymousSessionIdentifier||(o.anonymousSessionIdentifier=a);var s=Date.now();if(!("client:shutdown"===e.event||"client:start"===e.event)){var c=n.get("lastInteractionTime"),u=n.get("lastPlayingHeartbeatTime");if(s-Math.max(c,u)>18e5)return void this.flushSession().then(function(){t.trackEvent(e)})}var p=this.privacySettings.metrics,h=p[o.event];if(h)if("off"===h);else{o.interaction&&Object(g.a)(),"anonymous"===h&&(delete o.userId,
o.deviceIdentifier=Object(d.d)("appModel").get("anonymousClientID"),o.sessionIdentifier=o.anonymousSessionIdentifier),delete o.anonymousSessionIdentifier;var f=Object(d.d)("metricsReporter");f.trackEvent(o)}}},trackPendingEvents:function(){for(var e=this._pendingEvents,t=0;t<e.length;)this.trackEvent(e[t]),t++;this._pendingEvents=[]},start:function(){var e=this,t=Object(d.d)("appModel").get("user");return this.flushSession().then(function(){return Object(f.a)(t.server.populate())
}).then(function(){return e.fetchPrivacySettings()}).always(function(){e.listenTo(t.server,"change:isConnected",e.onCloudServerChange),e.listenTo(t,"change:id",e.onUserIDChange)}),l.a.Deferred().resolve().promise()},flushSession:function(){var e=this,t=Object(d.d)("sessionStats"),n=t.populate().then(function(){e.stopSession(),e.startSession()},function(){e.startSession()});return Object(f.a)(n)},startSession:function(){var e=this,t=Date.now(),n=Object(d.d)("sessionStats");if(!this.interval){
var i=y.a.get("heartbeatInterval");this.interval=setInterval(function(){var t=Date.now(),i={heartbeatTime:t};e.isPlaybackActive()&&(i.lastPlayingHeartbeatTime=t),n.set(i)},i)}n.save({sessionId:Object(u.a)(),anonymousSessionId:Object(u.a)(),startTime:t,lastInteractionTime:t,heartbeatTime:t,lastPlayingHeartbeatTime:null,playbackCount:0,playbackTime:0});var r=p.a.endPeriod("client:start"),a={event:"client:start",interaction:!0};r&&(a.properties={latency:Math.round(r.duration)}),this.trackEvent(a)},
stopSession:function(){var e=Object(d.d)("sessionStats"),t=e.get("heartbeatTime"),n=e.get("playbackCount"),i=e.get("playbackTime"),r=e.get("startTime");this.trackEvent({event:"client:shutdown",interaction:!1,properties:{sessionLength:Math.floor((t-r)/1e3),playbackCount:n,playbackTime:Object(v.a)(i)}})},toJSON:function(){return r()({},this.defaults)},onCloudServerChange:function(e,t){t?this.fetchPrivacySettings():this.privacySettings=null},onUserIDChange:function(e,t){
this.debouncedFetchPrivacySettings()}});t.a=b},function(e,t,n){"use strict";function i(){return r.replace(a,o)}var r="00000000-0000-4000-8000-000000000000",a=/0/g,o=function(){return(0|16*Math.random()).toString(16)};t.a=i},function(e,t,n){"use strict";function i(e,t){for(var n=e,i=0;i<r.length;i++){var a=t[r[i]];null!=a&&(n=n+":"+a)}return n}t.a=i;var r=["page","type","style","mode"]},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(17),o=n(32),s=n(3824),l=n(99),c=n(83),u=s.a.extend({
start:function(){s.a.prototype.start.call(this),this.listenTo(this.servers,"change:isClaimed",this.onClaimedChange),this.listenTo(a.a,"cloudServer:addUnclaimedServer",this.onAddClaimedServer)},onAddClaimedServer:function(e){var t=this.appModel,n=t.get("cloudServer"),i=new l.c({},{parent:t}),a=Array.isArray(e.Device.Connection)?e.Device.Connection:[e.Device.Connection];r.a.each(a,function(e){var t=e.uri,r=e.port,a=e.address,o=e.protocol;i.addConnection({uri:t,port:r,address:a,scheme:o,sources:[{
id:n.id}]})},this),c.a.isHostedHttps&&!i.get("isSecure")?o.a.execute("showClaimServerAlertBar",i):t.get("servers").add(i)},onClaimedChange:function(e,t){var n=e.get("isFullOwnedServer")&&e.get("isConnected"),i=!1===t&&!e.previous("isClaimed");n&&i&&o.a.execute("showClaimServerAlertBar",e)}});t.a=u},function(e,t,n){"use strict";var i=n(50),r=n.n(i),a=n(12),o=n.n(a),s=n(5),l=n.n(s),c=n(69),u=n(17),d=n(30),p=n(89),h=n(99),f=n(847),v=n(164),g=r()(f.a.prototype.syncedAttrs),m=c.a.extend({
mixins:[p.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,"change:resources.change:connections.update":this.onResourceConnectionsUpdate}),g.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 o.a.Deferred().reject().promise();if(!e.get("isResolved"))return Object(d.a)("[Servers] Finding resources through unresolved cloud server %o, resolving",e.get("debugName")),e.populate().then(function(){return t._fetchResources(e)});Object(d.a)("[Servers] Finding resources through %s",e.get("debugName")),this._waitForServers(),e.set("isResourcesPending",!0);var n=e.get("resources");return n.fetch().done(function(){
Object(d.a)("[Servers] Found %s resources through %s",n.length,e.get("debugName")),e.set({isResourcesPending:!1,hasFailedResources:!1,isDownForMaintenance:!1})}).fail(function(t,n){d.a.warn("[Servers] Failed to request resources through %s",e.get("debugName")),e.set({isResourcesPending:!1,hasFailedResources:!0,isDownForMaintenance:503===n.status})}).always(function(){t._checkFoundAllServers()})},_convertResourceToServer:function(e){
Object(d.a)("[Servers] %s was found through %s",e.get("name"),e.server.get("debugName"));var t="Plex Media Server"===e.get("product"),n="Plex Cloud Server"===e.get("product"),i=new h.c({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||n?void 0:h.c.serverClasses.SECONDARY,createdAt:e.get("createdAt"),lastSeenAt:e.get("lastSeenAt"),ownerId:e.get("ownerId")},{parent:this.appModel});return this._addResourceConnectionsToServer(e,i),i},_addResourceConnectionsToServer:function(e,t){e.get("connections").each(function(n){var i=[{id:e.server.id}],r=l.a.extend(n.toJSON(),{sources:i});t.addConnection(r)})},
_removeResource:function(e){Object(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),r=t.get(i.id);if(r)for(var a=i.get("connections"),o=a.length-1;o>=0;){var s=a.at(o),l=s.get("sources");if(l.get(e.id)){var c=r.get("connections");c.get(s.id)||s.get("sources").remove(e.id)}o--
}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===h.c.promiseStates.RESOLVED){e.get("resources")&&this._fetchResources(e)}this._setAuthorized(),this._checkFoundAllServers()},onStoredServerAttributeChange:function(e,t,n){var i=v.a.getActiveServers(),r=i&&i.get(t.id)
;r&&null!=n&&r.get(e)!==n&&(r.set(e,n),v.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"))},onResourceConnectionsUpdate:function(e){
var t=e.parent,n=this.servers.get(t.id);n&&(this._addResourceConnectionsToServer(t,n),this._pruneStaleSources(e.server),this._checkFoundAllServers())}});t.a=m},function(e,t,n){"use strict";var i=n(17),r=n(3826),a=n(3827),o=r.a.extend({fetchPrimaryRelations:function(e){var t=this,n=e.get("isFullOwnedServer"),i=e.get("isShared")&&e.supports("sharedSettings"),r=e.get("desktop").get("settings");if(n||i){var a=r.populate();n&&a.done(function(){var n=t.appModel.get("primaryServer")
;n&&n.id===e.id&&t.handlePrimarySettings(e,r)})}if(n){e.get("desktop").get("sessions").fetch({reset:!0})}var o=e.get("home");if(e.get("activeConnection").get("isPrivate")||n||o){var s=this.appModel.get("players");s.reset(),s.setContext("server",e),s.fetch()}},handlePrimarySettings:function(e,t){var n=t.get("AcceptedEULA");n&&!1===n.get("value")&&i.a.trigger("navigate","setupBasic",{serverID:e.id})},onPrimaryServerChange:function(e,t){if(r.a.prototype.onPrimaryServerChange.call(this,e,t),
t&&t.get("isPersonalCloudServer")){e.get("experienceSettings").get("hasDismissedPersonalCloudScanAlert")||i.a.trigger("show:bar","alertbar",new a.a({}))}}});t.a=o},function(e,t,n){"use strict";var i=n(12),r=n.n(i),a=n(15),o=n(89),s=n(69),l=n(30),c=n(114),u=n(164),d=n(240),p=n(113),h=s.a.extend({mixins:[o.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(c.m)},stop:function(){this.stopListening(),
this._primaryServerPromise=null},fetchPrimaryRelations:function(e){},_setPrimaryServer:function(e){var t=this;if(this._primaryServerPromise)return this._primaryServerPromise;var n=Object(a.d)("appStore");n.dispatch(Object(d.g)());var i=this._waitForPrimaryServer();return this._primaryServerPromise=i,i.done(function(r){if(i===t._primaryServerPromise){if(t._primaryServerPromise=null,t.appModel.get("primaryServer"))return;var a=!r.get("version")&&!r.get("isRejected")
;r.get("isOutOfDate")||a?(Object(l.a)("[Primary Server] The server, %s, is waiting for a version",r.get("debugName")),t._setPrimaryServer(e)):n.dispatch(Object(d.d)({machineIdentifier:r.id,metricsProperties:{context:e}}))}}).fail(function(){i===t._primaryServerPromise&&(t._primaryServerPromise=null,t.appModel.set("isWaitingForPrimaryServer",!1))}),i},_waitForPrimaryServer:function(){var e=this,t=this.appModel.get("user"),n=t.get("lastPrimaryServerID"),i=void 0
;return n?(Object(l.a)("[Primary Server] Waiting for the last primary server, %s, to connect",n),i=this.servers.populateServer({machineIdentifier:n,isPrimaryEligible:!0,isOutOfDate:!1})):i=r.a.Deferred().reject().promise(),i=i.then(null,function(){return Object(l.a)("[Primary Server] Waiting for any owned server to connect"),e.servers.populateServer({isFullOwnedServer:!0,isPersonalCloudServer:!1,isPrimaryEligible:!0,isOutOfDate:!1})}),i=i.then(null,function(){
return Object(l.a)("[Primary Server] Waiting for any eligible server to connect"),e.servers.populateServer({isPrimaryEligible:!0,isOutOfDate:!1})}),i=i.then(null,function(){return Object(l.a)("[Primary Server] Waiting for any eligible server"),e.servers.findServer({isPrimaryEligible:!0,isOutOfDate:!1})})},onPrimaryServerChange:function(e,t){u.a.flushDebouncedSave();var n=e.previous("primaryServer");if(n&&this.stopListening(n),t){
l.a.info("[Primary Server] %s is now the primary server",t.get("debugName"));if(e.get("user").set("lastPrimaryServerID",t.id),t.get("isConnected")?this.fetchPrimaryRelations(t):this.listenTo(t,"change:isConnected",this.onPrimaryServerConnectedChange),t.get("isRelayed")){Object(a.d)("appStore").dispatch(Object(p.d)({machineIdentifier:t.id,serverName:t.get("friendlyName")}))}
}else e.get("isWaitingForPrimaryServer")?Object(l.a)("[Primary Server] Waiting to set the primary server"):l.a.warn("[Primary Server] No primary server found")},onPrimaryServerEligibleChange:function(e,t){var n=this.appModel.get("user");t||(Object(l.a)("[Primary Server] The previous primary server, %s, is unauthorized",e.get("debugName")),n.unset("lastPrimaryServerID"),this._setPrimaryServer(c.c))},onPrimaryServerOutOfDateChange:function(e,t){var n=this.appModel.get("user")
;t&&(Object(l.a)("[Primary Server] The previous primary server, %s, is out of date",e.get("debugName")),n.unset("lastPrimaryServerID"),this._setPrimaryServer(c.c))},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),r=e.get("isWaitingForPrimaryServer");i&&!r&&this._setPrimaryServer(c.c)}},onPrimaryServerIsRelayedChange:function(e,t){if(t){
Object(a.d)("appStore").dispatch(Object(p.d)({machineIdentifier:e.id,serverName:e.get("friendlyName")}))}},onServersUpdate:function(){var e=this.appModel.get("user"),t=this.appModel.get("primaryServer");if(t){t&&!this.servers.get(t.id)&&(Object(l.a)("[Primary Server] The previous primary server, %s, was removed",t.get("debugName")),e.unset("lastPrimaryServerID"),this._setPrimaryServer(c.c))}else this._setPrimaryServer(c.m)}});t.a=h},function(e,t,n){"use strict"
;var i=n(3828),r=n.n(i),a=n(15),o=n(280),s=o.a.extend({className:"alert-bar notify",template:r.a,onCloseClick:function(e){o.a.prototype.onCloseClick.apply(this,arguments),Object(a.d)("appModel").get("experienceSettings").save("hasDismissedPersonalCloudScanAlert",!0)}});t.a=s},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{}
;var s="",l=this.escapeExpression;return s+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message" title="'+l(i(n(3)).call(t,"Plex Cloud no longer scans new files automatically. Please select {1}Scan Library Files{2} after uploading new media to a Plex Cloud library to see it.","","",{hash:{},data:o
}))+'"> '+l(i(n(3)).call(t,"Plex Cloud no longer scans new files automatically. Please select {1}Scan Library Files{2} after uploading new media to a Plex Cloud library to see it.",'<a class="link" href="https://support.plex.tv/articles/200289306-scanning-vs-refreshing-a-library/" target="_blank" style="display: inline; margin-left: 0">',"</a>",{hash:{},data:o}))+" </span> "})},function(e,t,n){"use strict";var i=n(50),r=n.n(i),a=n(69),o=n(17),s=n(89),l=n(99),c=n(3830),u=a.a.extend({mixins:[s.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"),r="manualServer"+n,a=this.servers.find(function(e){return e.hasSource(r)});if(a){a.removeSource("internal"),a.removeSource(r);a.get("connections").findWhere({isConnected:!0})||a!==i||o.a.trigger("navigate","dashboard",{replace:!0})}},addManualConnection:function(e,t,n){var i="manualServer"+n,r={scheme:"http",address:e,port:t.toString(),sources:{id:i}},a=new l.c({friendlyName:e});a.addConnection(r),this.servers.add(a)},onManualConnectionChange:function(e){
var t=r()(e.changed)[0],n=t.slice(-1),i="ip"+n,a="port"+n,o=e.previous(i),s=e.previous(a),l=e.get(i),c=e.get(a);o&&s&&this.removeManualConnection(o,s,n),l&&c&&this.addManualConnection(l,c,n)}});t.a=u},function(e,t,n){"use strict";var i=n(1287),r=i.a.extend({storageKey:"manualServers",defaults:{port1:"32400",port2:"32400"}});t.a=new r},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(5),o=n.n(a),s=n(12),l=n.n(s),c=n(17),u=n(69),d=n(845),p=n(3832),h=n(89),f=n(30),v=n(164),g=n(99),m=u.a.extend({mixins:[h.a],browserConnectionChangeDelay:2e3,initialize:function(e){o.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 p.a(r()({},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,n=v.a.getActiveServers();if(Object(f.a)("[Connections] Removed connection %s from %s",e.id,t.get("debugName")),t.abortConnectionTest(e),n){var i=n.get(t.id),r=i&&i.get("connections");r&&r.get(e.id)&&(r.remove(e.id),
r.length||n.remove(t.id),v.a.debouncedSave())}},onBrowserConnectionChange:function(e){var t=this;Object(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=v.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.set("machineIdentifier",e.id),v.a.debouncedSave())}else(n=t.get(e.id))&&(t.remove(e.id),v.a.debouncedSave())},onServersReset:function(e,t){var n=this,i=t.previousModels;o.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")){this.appModel.get("user").signInUnsupervised()}else e.testAllConnections()},onServerConnectionAdd:function(e){var t=e.server;Object(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;o.a.each(i,function(t){e.contains(t)||n._removeConnection(t)})},onServerConnectionConnectedChange:function(e,t){var n=e.server,i=e.get("isBundled"),r=e.get("isFallback"),a=t&&!i&&!r,s=v.a.getActiveServers();if(n.id&&!n.get("isCloud")&&a&&s){var l=s.get(n.id)
;if(l)l.copyFromServer(n);else{var c=o.a.omit(n.toJSON(),"connections");l=s.add(c,{merge:!0,parse:!0})}l.get("connections").add(e.toJSON(),{merge:!0,parse:!0}),v.a.debouncedSave()}},onServerConnectionSourcesChange:function(e,t){var n=e.server,i=v.a.getActiveServers(),r=i&&i.get(n.id);if(r){var a=r.get("connections"),o=a.get(e.id);if(o){o.get("sources").set(t.toJSON()),v.a.debouncedSave()}}},onServerAccessTokenChange:function(e,t){if(!e.get("isCloud")){
Object(f.a)("[Connections] Access token for %s changed to %s",e.get("debugName"),t);var n=v.a.getActiveServers(),i=n&&n.get(e.id);i&&(i.set("accessToken",t),v.a.debouncedSave()),e.get("isUnauthorized")&&e.set("connectionTestResult",g.c.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=m},function(e,t,n){"use strict";var i=n(89),r=n(604),a=r.a.extend({mixins:[i.a],initialize:function(e){var t=e.appModel;r.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=a},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 r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(15),c=n(30),u=n(69),d=n(211),p=n(62),h=u.a.extend({initialize:function(e){this.appModel=e.appModel,this.queued=[],this.executing=[],this.maximumConcurrent=p.a.get("maximumConcurrentConnectionTests"),this.throttledStartProcessing=a.a.throttle(this._startProcessing.bind(this),50,{
leading:!1})},queueConnectionTest:function(e){var t=e.server,n=e.connection,i=e.url,r=this._queuedOrExecuting(t,n,i);if(r)return r.deferred.promise();var a=s.a.Deferred();return this.queued.push({server:t,connection:n,url:i,deferred:a}),this._sortQueue(),this.throttledStartProcessing(),a.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),s.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 r=n.server,a=i.server,o=n.connection,s=i.connection,l=e._isManualConnection(o),c=e._isManualConnection(s),u=e._isMatchingLocation(r,o),d=e._isMatchingLocation(a,s)
;return r.id===t&&a.id!==t?-1:a.id===t&&r.id!==t?1:r.get("isCloud")&&!a.get("isCloud")?-1:a.get("isCloud")&&!r.get("isCloud")?1:!o.get("relay")&&s.get("relay")?-1:!s.get("relay")&&o.get("relay")?1:!o.get("isConnected")&&s.get("isConnected")?-1:!s.get("isConnected")&&o.get("isConnected")?1:!r.get("isShared")&&a.get("isShared")?-1:!a.get("isShared")&&r.get("isShared")?1:r.get("isFullServer")&&!a.get("isFullServer")?-1:a.get("isFullServer")&&!r.get("isFullServer")?1:!r.get("isCloudSyncServer")&&a.get("isCloudSyncServer")?-1:!a.get("isCloudSyncServer")&&r.get("isCloudSyncServer")?1:l&&!c?-1:c&&!l?1:o.get("isBundled")&&!s.get("isBundled")?-1:s.get("isBundled")&&!o.get("isBundled")?1:u&&!d?-1:d&&!u?1:0
})},_startProcessing:function(){a.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(),n=t.server,i=t.connection,r=t.url;this._abortCurrentTest(n,i,r);var a=Object(l.d)("testServerConnection"),o=a({server:n,connection:i,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,n){var i=t.get("currentTest"),r=e.resolveUrl(n||"/",{connection:t});i&&"pending"===i.state()&&(Object(c.a)("[Connections] Aborting pending connection test for %s at %s",e.get("debugName"),r),d.a.abort(i.rid),i.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 r=i(e,t,n);return a.a.find(this.executing,r)||a.a.find(this.queued,r)},_removeQueuedOrExecuting:function(e,t,n){var r=i(e,t,n),o=a.a.findIndex(this.executing,r),s=a.a.findIndex(this.queued,r);o>=0&&this.executing.splice(o,1),s>=0&&this.queued.splice(s,1)}});t.a=h},function(e,t,n){"use strict"
;var i=n(3835),r=n.n(i),a=n(5),o=n.n(a),s=n(15),l=n(4),c=n(618),u=n(32),d=n(109),p=n(1289),h=n(280),f=h.a.extend({className:"alert-bar server-update-alert-bar notify",template:r.a,events:o.a.extend({"click .download-link":"onDownloadClick","click .install-link":"onInstallClick","click .skip-version-link":"onSkipThisVersionClick"},h.a.prototype.events),initialize:function(){this.server=this.model.server},serializeData:function(){var e=Object(s.d)("appModel"),t=e.get("user").server;return{
state:this.model.get("state"),downloadURL:this.model.get("downloadURL")||t.get("appsUrl"),version:Object(c.a)(this.model.get("version")),serverUpdateAvailableMessage:Object(l.default)("A Plex Media Server update is available for the server {serverName}!",{serverName:this.model.server.get("friendlyName")})}},onDownloadClick:function(e){e.preventDefault(),u.a.execute("checkForServerUpdates",{server:this.server,download:!0,initialState:"downloading"}),Object(d.a)("serverSettings",{
serverID:this.server.id,group:"general"})},onInstallClick:function(e){e.preventDefault(),this.model.set("shouldInstall",!0),Object(d.a)("serverSettings",{serverID:this.server.id,group:"general"})},onSkipThisVersionClick:function(e){h.a.prototype.onCloseClick.apply(this,arguments);var t=Object(c.a)(this.model.get("version"))||p.a;Object(s.d)("appModel").get("settings").save("serverUpdateDismissedVersion",t)}});t.a=f},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=' <a class="download-link link" href="#">'+h(i(n(3)).call(e,"Download now",{hash:{},data:t}))+"</a> "}function l(e,t){var r;return r=i(n(25)).call(e,e&&e.state,"downloaded",{hash:{},inverse:v.program(6,u,t),fn:v.program(4,c,t),data:t}),r||0===r?r:""}function c(e,t){var r="";return r+=' <a class="install-link link" href="#">'+h(i(n(3)).call(e,"Install now",{hash:{},data:t}))+"</a> "}function u(e,t){
var r,a="";return a+=' <a class="link" href="'+h((r=e&&e.downloadURL,typeof r===f?r.apply(e):r))+'" target="_blank">'+h(i(n(3)).call(e,"Download now",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var d,p="",h=this.escapeExpression,f="function",v=this;return p+='<span class="message"> '+h((d=t&&t.serverUpdateAvailableMessage,typeof d===f?d.apply(t):d))+' <span class="server-update-message-version">'+h((d=t&&t.version,
typeof d===f?d.apply(t):d))+"</span> </span> ",d=i(n(25)).call(t,t&&t.state,"available",{hash:{},inverse:v.program(3,l,o),fn:v.program(1,s,o),data:o}),(d||0===d)&&(p+=d),p+=' <a class="link skip-version-link" href="#">'+h(i(n(3)).call(t,"Skip this version",{hash:{},data:o}))+'</a> <button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> '})},function(e,t,n){"use strict";function i(e,t){function n(){
var t=e.get("settings"),n=t.get("chromecastAppID"),i=t.get("chromecastCustomAppID");return n===m.a.CUSTOM&&i?i:n||m.a.PRODUCTION}function i(){if(e.get("isCastApiAvailable"))return window.cast.framework.CastContext.getInstance()}function r(){if(X)return X.customData}function o(e){return e.isMute()?0:Math.round(100*e.getVolume())}function w(e){if(e){var t=e.customData,n=e.media;if(t&&t.playQueueType)return t.playQueueType;if(n&&n.metadata&&n.metadata.metadataType){
var i=window.chrome.cast.media.MetadataType;switch(n.metadata.metadataType){case i.MOVIE:case i.TV_SHOW:return h.c;case i.MUSIC_TRACK:return h.a;case i.PHOTO:return h.b}}}}function T(e){var t=r();t&&q(M.m({playQueueType:w(X),playerState:a()({},e,{mediaIndex:t.mediaIndex,partIndex:t.partIndex})}))}function E(){var e=window.chrome.cast.media.PlayerState,t=r();if(t){var n=t.providerIdentifier,i=t.containerKey,a=t.key,o=t.playQueueItemID,s=t.mediaIndex,l=t.partIndex,c=t.bitrate,u=t.server,d=o!==ne
;ne=o,q(M.l({playQueueType:w(X),options:{machineIdentifier:u.machineIdentifier,providerIdentifier:n,containerKey:i,key:a,mediaIndex:s,didPlayQueueItemChange:d,bitrate:c,initialState:{isPaused:X.playerState===e.PAUSED,isBuffering:X.playerState===e.BUFFERING,positionSeconds:Math.round(X.currentTime||0),durationSeconds:Math.round(X.media.duration||0),controllable:P,mediaIndex:s,partIndex:l}}}))}}function x(){te||ee||Z&&q(M.b(o(Z)))}function N(){te&&te--}function A(){ee&&ee--}function L(){var e=r()
;if(e){var t=e.mediaIndex,n=e.bitrate;q(M.n({playQueueType:w(X),mediaIndex:t,bitrate:n}))}}function k(){var e=r();if(e){var t=e.key,n=e.mediaIndex,i=e.partIndex,a=e.audioStreamID,o=e.subtitleStreamID;null==a&&null==o||q(M.o({playQueueType:w(X),key:t,mediaIndex:n,partIndex:i,audioStreamID:a,subtitleStreamID:o}))}}function _(e){var t=!!(e&&window.cast&&window.chrome&&window.chrome.cast);if(q(D.a(t)),!t)return void c.a.warn("[Cast] API is not available");var r=window.cast.framework,a=i()
;a.setOptions({receiverApplicationId:n(),autoJoinPolicy:window.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED}),a.addEventListener(r.CastContextEventType.SESSION_STATE_CHANGED,R)}function R(e){var t=window.cast.framework,n=e.session,i=e.sessionState,r=e.errorCode;switch(i){case t.SessionState.NO_SESSION:Object(c.a)("[Cast] Session is not established");break;case t.SessionState.SESSION_STARTED:Object(c.a)("[Cast] Session is established");break;case t.SessionState.SESSION_START_FAILED:
Object(c.a)('[Cast] Session failed to start with code "'+r+'"');break;case t.SessionState.SESSION_RESUMED:Object(c.a)("[Cast] Connection to an already existing session is established");break;case t.SessionState.SESSION_ENDED:c.a.warn("[Cast] Session has disconnected")}switch(Z&&(Z.removeEventListener(t.SessionEventType.MEDIA_SESSION,z),n.removeEventListener(t.SessionEventType.VOLUME_CHANGED,V)),ne=null,i){case t.SessionState.NO_SESSION:case t.SessionState.SESSION_START_FAILED:
case t.SessionState.SESSION_ENDED:U(!1),Z=null,q(M.i());break;case t.SessionState.SESSION_STARTED:case t.SessionState.SESSION_RESUMED:Z=n,n.addEventListener(t.SessionEventType.MEDIA_SESSION,z),n.addEventListener(t.SessionEventType.VOLUME_CHANGED,V),q(D.b(a()({},n.getCastDevice(),{volume:o(n)})));var s=n.getMediaSession();s&&z({mediaSession:s})}}function z(e){var t=e.mediaSession;X&&X.removeUpdateListener(U),X=t,t.addUpdateListener(U),ne=null}function U(e){
var t=window.chrome.cast.media.PlayerState;if(X&&e){var n=X.playerState;T({isPaused:n===t.PAUSED,isBuffering:n===t.BUFFERING,positionSeconds:Math.round(X.currentTime||0),durationSeconds:Math.round(X.media.duration||0),controllable:P}),E(),L(),k(),n===t.PLAYING?J||(J=setTimeout(B,j)):J&&(clearTimeout(J),J=null)}else if(c.a.warn("[Cast] Update ignored; no alive media session"),J&&(clearTimeout(J),J=null),X&&!$){var i=w(X);i&&X.playerState===t.IDLE&&q(M.f({playQueueType:i}))}}function B(){X?(T({
positionSeconds:Math.round(X.getEstimatedTime()||0)}),J=setTimeout(B,j)):c.a.warn("[Cast] Position update ignored; no media session")}function V(){x()}function F(){var e=i();e?(Object(c.a)("[Cast] Requesting session"),e.requestSession()):c.a.warn("[Cast] Request session ignored; no cast context")}function Q(){var e=i();e?(Object(c.a)("[Cast] Ending session"),e.endCurrentSession()):c.a.warn("[Cast] End session ignored; no cast context")}function H(e,t,n){var i=t.get("qualityIndex")
;if(null!=i)return i;var r=e.server.get("isPrivateConnection");if(r&&n.get("useHomeStreamingRecommendedSettings"))return C.b;var a=Object(v.a)(e,r);return n.get(a)}function Y(t){if(!Z)return void c.a.warn("[Cast] Start playback ignored; no cast session")
;var n=e.get("user"),i=e.get("settings"),r=e.get("experienceSettings"),a=e.get("primaryServer"),o=t.get("playQueue"),h=o.get("type"),f=o.get("playQueueItems"),v=f.get(o.get("playQueueSelectedItemID")),m=v.get("metadataItem"),D=t.get("startMediaIndex"),C=o.server,O=t.get("providerEntityID"),j=Object(b.e)(e,{providerEntityID:O}),P=Object(p.r)(v.get("type")),w=P&&P.mediaType===d.a?d.a:d.d,E=void 0;if(w===d.d){var x=H(m,t,r),N=g.a.getQualityByIndex(x);E=N.bitrate}
var A=t.get("positionSeconds")||Math.floor(Object(S.a)(t,m)/1e3),L=void 0;Object(I.a)(C).then(function(e){return L=e,a&&a!==C?Object(I.a)(a):e}).done(function(e){var a={playQueueType:h,providerIdentifier:j.get("identifier"),containerKey:u.join([s.a.result(o,"url")],{own:1}),offset:A,directPlay:i.get("directPlay"),directStream:i.get("directStream"),mediaIndex:D,bitrate:E,audioBoost:i.get("audioBoost"),subtitleSize:r.get("subtitleSize"),autoPlay:r.get("autoPlay"),repeat:Object(y.a)({
repeatOne:t.get("repeatOne"),repeatAll:t.get("repeatAll")}),audioForceMultiChannel:r.get("audioForceMultiChannel"),server:L,primaryServer:e,user:{username:n.get("username")}},l=window.chrome.cast.media,d=new l.MediaInfo(m.get("key"));d.customData=a;var p=new l.LoadRequest(d);p.currentTime=A,p.autoplay=!t.get("isPaused"),$=!0,Object(c.a)("[Cast] Sending load media request"),Z.loadMedia(p).then(function(){Object(c.a)("[Cast] Load media success"),$=!1,T({isMediaLoading:!1})},function(e){
c.a.warn('[Cast] Failed to load media with error "'+e+'"'),$=!1,q(M.j({playQueueType:h}))})}).fail(function(){q(M.j({playQueueType:h,errorMessage:Object(l.default)('The server "{serverName}" does not have a valid connection for casting. Check that the server is claimed in server settings.',{serverName:C.get("friendlyName")})}))})}function W(t){if(!Z)return void c.a.warn("[Cast] Mirror details ignored; no cast session");var n=e.get("user"),i=t.server;Object(I.a)(i).done(function(e){var i={
server:e,user:{username:n.get("username")}},r=window.chrome.cast.media,a=new r.MediaInfo(t.get("key"));a.customData=i,G({type:f.l,media:a})})}function G(e){Z?(Object(c.a)('[Cast] Sending custom message with type "'+e.type+'"'),Z.sendMessage(O,e,null,function(e){c.a.warn('[Cast] Failed to send custom message with error "'+e+'"')})):c.a.warn('[Cast] Custom message "'+e.type+'" ignored; no cast session')}function K(e){if(!Z)return void c.a.warn("[Cast] Set volume ignored; no cast session")
;Object(c.a)('[Cast] Setting volume to "'+e+'"'),q(M.b(e)),e?(Z.isMute()&&(ee++,Z.setMute(!1).then(A,A)),te++,Z.setVolume(e/100).then(N,N)):(ee++,Z.setMute(!0).then(A,A))}var q=t.dispatch,Z=void 0,X=void 0,J=void 0,$=!1,ee=0,te=0,ne=void 0;window.__onGCastApiAvailable=_;var ie=document.createElement("script");return ie.src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",document.head.appendChild(ie),{requestSession:F,endSession:Q,startPlayback:Y,mirrorDetails:W,
sendMessage:G,setVolume:K}}t.a=i;var r=n(7),a=n.n(r),o=n(5),s=n.n(o),l=n(4),c=n(30),u=n(19),d=n(59),p=n(28),h=n(214),f=n(933),v=n(476),g=n(130),m=n(1243),y=n(934),b=n(104),I=n(1290),S=n(489),M=n(222),D=n(505),C=n(496),O="urn:x-cast:plex",j=1e3,P={volume:!0,shuffle:!0,quality:!0,audioStream:!0,videoStream:!0,subtitleStream:!0,subtitleSize:!0,skipPrevious:!0,skipNext:!0,autoPlay:!0,seekTo:!0,stepBack:!0,stepForward:!0,stop:!0,playPause:!0,repeat:!0}},function(e,t,n){"use strict";function i(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.get("accessToken");if(!e.supports("transientToken")||/^transient-/.test(n))return a.a.Deferred().resolve(n).promise();var i={type:t.type||"delegation",scope:t.scope||"all"},r=s.join("/security/token",i);return a.a.ajax(e.getXHROptions(r)).promise().then(function(e){return Object(o.a)(e).token||a.a.Deferred().reject().promise()})}t.a=i;var r=n(12),a=n.n(r),o=n(465),s=n(19)},function(e,t,n){"use strict";function i(e,t){
function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=v.join(e,a()({},t,{commandID:z})),r=R.server,o=r.getXHROptions(i,a()({},n,{scope:w,headers:{"X-Plex-Target-Client-Identifier":R.get("machineIdentifier")}}));return c.a.ajax(o)}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R&&n("/player/timeline/poll",e,{timeout:O}).done(function(t,n,a){U=0;var o=Object(b.a)(t)
;if(Object(g.a)(o.disconnected)&&e.wait)return void _(D.i());var l=R.get("machineIdentifier"),c=a.getResponseHeader("X-Plex-Client-Identifier"),u=Object(m.a)(o.commandID);if(l===c&&u>=z){var p=Object(y.a)(o.Timeline),h=s.a.findWhere(p,{type:"video"}),f=s.a.findWhere(p,{type:"music"}),v=s.a.findWhere(p,{type:"photo"});!h||f&&f.state&&f.state!==d.d?f&&r(f):r(h),v&&r(v),z=u}i({wait:1})}).fail(function(t,n){t.aborting||("error"===n?(U++,
e.wait&&U<=C?(f.a.warn("[Companion] Poll request failed; retrying..."),i({wait:1})):(f.a.warn("[Companion] Poll request failed 3 times in a row; giving up"),_(D.i()))):i({wait:1}))})}function r(e){var t=e.type,n=e.state,i=e.machineIdentifier,r=e.containerKey,a=e.key,o=e.playQueueItemID,s=p.e(t),l=Object(g.a)(e.continuing);if(n===d.d&&!l)return H[t]=null,void _(D.f({playQueueType:s}))
;var c=Object(m.a)(e.playQueueVersion),u=Object(m.a)(e.time),f=Object(m.a)(e.duration),v=Object(m.a)(e.mediaIndex),y=Object(m.a)(e.partIndex),b=e.audioStreamID?Object(m.a)(e.audioStreamID):null,I=e.subtitleStreamID?Object(m.a)(e.subtitleStreamID):null,S=Object(m.a)(e.volume),M=Object(m.a)(e.repeat),C=(e.controllable||"").split(","),O={positionSeconds:Math.floor(u/1e3),durationSeconds:Math.floor(f/1e3),mediaIndex:v,partIndex:y,isPaused:n===d.c,isBuffering:n===d.a,hasError:n===d.b,
controllable:C.reduce(function(e,t){return e[t]=!0,e},{})},j=H[t],P=o!==j;H[t]=o,_(D.l({playQueueType:s,options:{machineIdentifier:i,containerKey:r,key:a,playQueueItemID:o,didPlayQueueItemChange:P,initialState:O}})),_(D.m({playQueueType:s,playerState:O})),_(D.k({playQueueType:s,playQueueVersion:c,repeatAll:M===h.a||M===h.c,repeatOne:M===h.c})),_(D.o({playQueueType:s,key:a,mediaIndex:v,partIndex:y,audioStreamID:b,subtitleStreamID:I})),null!=e.volume&&_(D.b(S))}function o(){B=null,null!=V&&(L(V),
V=null)}function l(){F=null,null!=Q&&(k(Q),Q=null)}function T(t){R=e.get("players").get(t),R?(_(D.a(t)),z=0,U=0,i()):f.a.warn('[Companion] Request session ignored; no player with identifier "'+t+'"')}function E(){if(!R)return void f.a.warn("[Companion] End session ignored; no current player");B&&(clearTimeout(B),B=null),F&&(clearTimeout(F),F=null),I.a.abortAll(w),n("/player/timeline/unsubscribe"),R=null,V=null,Q=null,H={}}function x(e){
if(!R)return void f.a.warn("[Companion] Start playback ignored; no current player");var t=e.get("playQueue"),n=t.get("type"),i=t.get("playQueueItems"),r=i.get(t.get("playQueueSelectedItemID")),a=r.get("metadataItem"),o=t.server,l=1e3*e.get("positionSeconds")||Math.floor(Object(M.a)(e,a));Object(S.a)(o).done(function(e){var i={type:p.d(t.get("type")),containerKey:v.join([s.a.result(t,"url")],{own:1}),key:a.get("key"),offset:l,machineIdentifier:e.machineIdentifier,protocol:e.protocol,
address:e.address,port:e.port,token:e.accessToken};Object(f.a)("[Companion] Sending play media request"),A("/player/playback/playMedia",i).done(function(){Object(f.a)("[Companion] Play media success"),_(D.m({playQueueType:n,playerState:{isMediaLoading:!1}}))}).fail(function(e){f.a.warn('[Companion] Failed to play media with error "'+e.status+'"'),_(D.j({playQueueType:n}))})}).fail(function(){_(D.j({playQueueType:n,
errorMessage:Object(u.default)('The server "{serverName}" does not have a valid connection for casting. Check that the server is claimed in server settings.',{serverName:o.get("friendlyName")})}))})}function N(e){if(!R)return void f.a.warn("[Companion] Mirror details ignored; no current player");var t=R.get("protocolCapabilities");if(!t||-1===t.indexOf("mirror"))return void f.a.warn("[Companion] Mirror details ignored; player does not advertise support for the `mirror` capability")
;var i=e.server;Object(S.a)(i).done(function(t){n("/player/mirror/details",{key:e.get("key"),machineIdentifier:t.machineIdentifier,protocol:t.protocol,address:t.address,port:t.port,token:t.accessToken})})}function A(e,t){return R?(z++,n(e,t)):(f.a.warn("[Companion] Command for "+e+" ignored; no current player"),c.a.Deferred().reject().promise())}function L(e){B?(clearTimeout(B),V=e):A("/player/playback/seekTo",e),B=setTimeout(o,j)}function k(e){F?(clearTimeout(F),
Q=e):A("/player/playback/setParameters",e),F=setTimeout(l,P)}var _=t.dispatch,R=void 0,z=0,U=0,B=void 0,V=void 0,F=void 0,Q=void 0,H={};return{requestSession:T,endSession:E,startPlayback:x,mirrorDetails:N,sendCommand:A,seek:L,changeVolume:k}}t.a=i;var r=n(7),a=n.n(r),o=n(5),s=n.n(o),l=n(12),c=n.n(l),u=n(4),d=n(1292),p=n(345),h=n(416),f=n(30),v=n(19),g=n(602),m=n(464),y=n(601),b=n(465),I=n(211),S=n(1290),M=n(489),D=n(222),C=3,O=2e4,j=200,P=200,w="remoteCastPlayerManager"},function(e,t,n){
"use strict";function i(e,t,n){function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(A)return void(N=!0);if(N=!1,!D()){var t=r(f.c),n=r(f.a),i=r(f.b),a=t._location||i._location||n._location||v.a,o={MediaContainer:{_location:a,Timeline:[t,n,i]}};e.requestDisconnect&&(o.MediaContainer._disconnected=1),Object(c.a)(o),u.a.publish(o),A=setTimeout(O,M)}}function r(t){var n={_type:t,_state:p.d,_volume:E(e),_controllable:w[t]},i=o(t);if(!i)return n
;var r=i.get("serverEntityID"),l=i.get("providerEntityID"),c=Object(d.j)(e,{serverEntityID:r}),u=Object(d.h)(e,{providerEntityID:l}),m=Object(I.a)(c),S=i.get("decisions"),M=i.get("playQueue"),D=M.get("playQueueItems"),O=M.get("playQueueSelectedItemID"),j=D.get(O),P=j.get("metadataItem"),T=Object(y.a)({metadataItemModel:P}),x=f.d(T),N=1e3*i.get("positionSeconds"),A=1e3*i.get("durationSeconds"),L=h.b;return i.get("repeatOne")?L=h.c:i.get("repeatAll")&&(L=h.a),
m?(n._machineIdentifier=m.machineIdentifier,n._protocol=m.protocol,n._address=m.address,n._port=m.port):n._machineIdentifier=c.get("originalMachineIdentifier")||c.get("machineIdentifier"),n._providerIdentifier=u.get("identifier"),n._itemType=x,n._key=P.get("key"),n._ratingKey=P.get("ratingKey"),n._containerKey=s.a.result(M,"url"),M.get("isLocal")||(n._playQueueID=M.get("playQueueID"),n._playQueueItemID=O,n._playQueueVersion=M.get("playQueueVersion")),n._state=Object(b.a)(i),n._time=N,
n._duration=A,n._seekRange="0-"+A,n._shuffle=M.get("playQueueShuffled")?1:0,n._repeat=L,i.get("openState")===g.a&&(n._location=v.b(t)),a()({},n,C(j,S))}function o(t){var n=f.e(t);return T(e).find(function(e){var t=e.get("playQueue");if(t&&t.get("type")===n)return e})}function D(){return!!T(e).find(function(e){return e.get("isPlayQueueLoading")})}function C(e,t){var n=e.get("metadataItem"),i=t[e.entityID()];if(!i)return{};var r={_mediaIndex:i.mediaIndex,_partIndex:i.partIndex,
_partCount:i.partCount},a=n.get("Media"),o=a[i.mediaIndex],s=o&&o.Part,l=s&&s[i.partIndex];return(l?l.Stream:[]).reduce(function(e,t){var n=t.id,i=t.streamType,r=t.selected;return n?(i===m.a.get("video").id?e._videoStreamID=n:r&&(i===m.a.get("audio").id?e._audioStreamID=n:i===m.a.get("subtitles").id&&(e._subtitleStreamID=n)),e):e},r)}function O(){A=null,N&&i()}function j(){if(!x){x=!0,(Object(l.a)("remoteCastPlayerManager")||Object(l.a)("remotePlexPlayerManager"))&&t.dispatch(Object(S.i)())
;T(e).forEach(function(e){e.on("change",i)})}}function P(t){x=!1,A&&(clearTimeout(A),A=null),T(e).forEach(function(e){e.off("change",i)}),t&&i({requestDisconnect:t})}var w=n.companionPlayerProfile,T=n.getPlayerModels,E=n.getVolume,x=!1,N=!1,A=void 0;return{start:j,stop:P}}t.a=i;var r=n(7),a=n.n(r),o=n(5),s=n.n(o),l=n(15),c=n(30),u=n(605),d=n(78),p=n(1292),h=n(416),f=n(345),v=n(3840),g=n(197),m=n(129),y=n(415),b=n(665),I=n(1291),S=n(222),M=1e3},function(e,t,n){"use strict";function i(e){
return s[e]}n.d(t,"a",function(){return o}),t.b=i;var r,a=n(345),o="navigation",s=(r={},r[a.c]="fullScreenVideo",r[a.a]="fullScreenMusic",r[a.b]="fullScreenPhoto",r)},function(e,t,n){"use strict";var i=n(15),r=n(3842),a=n(163),o=n(474),s=n(3851),l=n(3852),c=n(391),u=n(3853),d=n(634),p=n(3854),h=n(422),f=n(3855),v=n(3856),g=n(3862),m=n(3868),y=n(605),b=n(3869),I={registerAll:function(){var e=u.a.init();e.done(function(e){return c.a.register(e)});var t=new s.a;return a.a.register(t),
o.a.register(new l.a),d.a.register(new p.a),h.a.register(f.a),i.c({getDecisionOptions:v.a,mediaComponent:g.a,fullscreenManager:Object(m.a)()}),y.a.register(new b.a),r.a.registerAll(),e}};t.a=I},function(e,t,n){"use strict";var i=n(15),r=n(838),a=n(3843),o=n(3848),s={registerAll:function(){r.a.register(a.a),Object(i.b)("mediaServerEventConnection",o.a)}};t.a=s},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(1293),o=n.n(a),s=n(3847),l=n(215),c=r()({},s.a,{init:function(e){
var t=new RegExp(Object(l.a)("-plex-3.53.7-1c80782"));o.a.config(e,{shouldSendCallback:function(e){return t.test(e.culprit)}})}});t.a=c},function(e,t,n){"use strict";(function(t){function i(){return+new Date}function r(){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 a=n(3845),o=n(3846),s=n(1294),l=s.isFunction,c=s.isUndefined,u=s.isError,d=s.isEmptyObject,p=s.hasKey,h=s.joinRegExp,f=s.each,v=s.objectMerge,g=s.truncate,m=s.urlencode,y=s.uuid4,b="source protocol user pass host port path".split(" "),I=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;r.prototype={VERSION:"2.2.0",debug:!1,TraceKit:a,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),r=i.path.lastIndexOf("/"),o=i.path.substr(1,r);return this._dsn=e,this._globalOptions.ignoreErrors.push(/^Script error\.?$/),this._globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),this._globalOptions.ignoreErrors=h(this._globalOptions.ignoreErrors),
this._globalOptions.ignoreUrls=!!this._globalOptions.ignoreUrls.length&&h(this._globalOptions.ignoreUrls),this._globalOptions.whitelistUrls=!!this._globalOptions.whitelistUrls.length&&h(this._globalOptions.whitelistUrls),this._globalOptions.includePaths=h(this._globalOptions.includePaths),this._globalKey=i.user,this._globalSecret=i.pass&&i.pass.substr(1),this._globalProject=i.path.substr(r+1),this._globalServer=this._getGlobalServer(i),
this._globalEndpoint=this._globalServer+"/"+o+"api/"+this._globalProject+"/store/",this._globalOptions.fetchContext&&(a.remoteFetching=!0),this._globalOptions.linesOfContext&&(a.linesOfContext=this._globalOptions.linesOfContext),a.collectWindowErrors=!!this._globalOptions.collectWindowErrors,this},install:function(){var e=this;return this.isSetup()&&!this._isRavenInstalled&&(a.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=[],r=arguments.length,a=!e||e&&!1!==e.deep;r--;)n[r]=a?i.wrap(e,arguments[r]):arguments[r];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 r in t)p(t,r)&&(n[r]=t[r]);return t.__raven_wrapper__=n,n.prototype=t.prototype,n.__raven__=!0,n.__inner__=t,n},uninstall:function(){return a.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=a.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(v({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 o("Missing eventId");var n=e.dsn||this._dsn;if(!n)throw new o("Missing DSN");var i=encodeURIComponent,r="";r+="?eventId="+i(t),r+="&dsn="+i(n);var a=e.user||this._globalContext.user;a&&(a.name&&(r+="&name="+i(a.name)),a.email&&(r+="&email="+i(a.email)));var s=this._getGlobalServer(this._parseDSN(n)),l=document.createElement("script");l.async=!0,
l.src=s+"/api/embed/error-page/"+r,(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)p(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,r){var a=e[t];e[t]=n(a),r||i._wrappedBuiltIns.push([e,t,a])}function n(e){return function(t,n){var r=[].slice.call(arguments),a=r[0];return l(a)&&(r[0]=i.wrap(a)),e.apply?e.apply(this,r):e(r[0],r[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,r,a){try{n&&n.handleEvent&&(n.handleEvent=i.wrap(n.handleEvent))}catch(e){}return e.call(this,t,i.wrap(n),r,a)}}),e(n,"removeEventListener",function(e){return function(t,n,i,r){return n=n&&(n.__raven_wrapper__?n.__raven_wrapper__:n),e.call(this,t,n,i,r)}}))}),"XMLHttpRequest"in window&&e(XMLHttpRequest.prototype,"send",function(t){return function(n){var r=this
;return"onreadystatechange onload onerror onprogress".replace(/\w+/g,function(t){t in r&&"[object Function]"===Object.prototype.toString.call(r[t])&&e(r,t,function(e){return i.wrap(e)},!0)}),t.apply(this,arguments)}});var r=t||window.$;r&&r.fn&&r.fn.ready&&e(r.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],r=n[1];i.apply(e,[e].concat(r))})},_parseDSN:function(e){var t=I.exec(e),n={},i=7;try{for(;i--;)n[b[i]]=t[i]||""}catch(t){throw new o("Invalid DSN: "+e)}if(n.pass&&!this._globalOptions.allowSecretKey)throw new o("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 r=n._normalizeFrame(t);r&&i.push(r)}),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 r=["pre_context","context_line","post_context"];for(t=3;t--;)n[r[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,r=!1;i--;)if(t[i].length>300){r=!0
;break}if(r){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,r,a){var o,s;if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t))&&(t+="",t=g(t,this._globalOptions.maxMessageLength),s=e+": "+t,s=g(s,this._globalOptions.maxMessageLength),r&&r.length?(n=r[0].filename||n,r.reverse(),o={frames:r}):n&&(o={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=v({exception:{values:[{type:e,value:t,stacktrace:o}]},culprit:n,message:s},a);this._send(l)}},_trimPacket:function(e){var t=this._globalOptions.maxMessageLength;if(e.message=g(e.message,t),e.exception){var n=e.exception.values[0];n.value=g(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,r={project:this._globalProject,logger:n.logger,platform:"javascript"},a=this._getHttpData();if(a&&(r.request=a),e=v(r,e),e.tags=v(v({},this._globalContext.tags),e.tags),e.extra=v(v({},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 o={sentry_version:"7",
sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(o.sentry_secret=this._globalSecret);var s=this._globalEndpoint;(n.transport||this._makeRequest).call(this,{url:s,auth:o,data:e,options:n,onSuccess:function(){t._triggerEvent("success",{data:e,src:s})},onError:function(){t._triggerEvent("failure",{data:e,src:s})}})}},_makeImageRequest:function(e){e.auth.sentry_data=JSON.stringify(e.data);var t=this._newImage(),n=e.url+"?"+m(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+"?"+m(e.auth)),n.send(JSON.stringify(e.data))},_makeRequest:function(e){
return("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest?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]=v(this._globalContext[e]||{},t)}},
r.prototype.setUser=r.prototype.setUserContext,r.prototype.setReleaseContext=r.prototype.setRelease,e.exports=r}).call(t,n(12))},function(e,t,n){"use strict";function i(){return"undefined"==typeof document?"":document.location.href}var r=n(1294),a=r.hasKey,o=r.isString,s=r.isUndefined,l={remoteFetching:!1,collectWindowErrors:!0,linesOfContext:7,debug:!1},c=[].slice,u="?";l.report=function(){function e(e){s(),v.push(e)}function t(e){for(var t=v.length-1;t>=0;--t)v[t]===e&&v.splice(t,1)}
function n(){u(),v=[]}function r(e,t){var n=null;if(!t||l.collectWindowErrors){for(var i in v)if(a(v,i))try{v[i].apply(null,[e].concat(c.call(arguments,2)))}catch(e){n=e}if(n)throw n}}function o(e,t,n,a,o){var s=null;if(y)l.computeStackTrace.augmentStackTraceWithInitialElement(y,t,n,e),d();else if(o)s=l.computeStackTrace(o),r(s,!0);else{var c={url:t,line:n,column:a};c.func=l.computeStackTrace.guessFunctionName(c.url,c.line),c.context=l.computeStackTrace.gatherContext(c.url,c.line),s={message:e,
url:i(),stack:[c]},r(s,!0)}return!!h&&h.apply(this,arguments)}function s(){f||(h=window.onerror,window.onerror=o,f=!0)}function u(){f&&(window.onerror=h,f=!1,h=void 0)}function d(){var e=y,t=g;g=null,y=null,m=null,r.apply(null,[e,!1].concat(t))}function p(e,t){var n=c.call(arguments,1);if(y){if(m===e)return;d()}var i=l.computeStackTrace(e);if(y=i,m=e,g=n,window.setTimeout(function(){m===e&&d()},i.incomplete?2e3:0),!1!==t)throw e}var h,f,v=[],g=null,m=null,y=null;return p.subscribe=e,
p.unsubscribe=t,p.uninstall=n,p}(),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")}}();return t.open("GET",e,!1),t.send(""),t.responseText}catch(e){return""}}function t(t){if(!o(t))return[];if(!a(S,t)){var n="",i="";try{i=document.domain}catch(e){}-1!==t.indexOf(i)&&(n=e(t)),S[t]=n?n.split("\n"):[]}return S[t]}function n(e,n){
var i,r=/function ([^(]*)\(([^)]*)\)/,a=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,o="",l=t(e);if(!l.length)return u;for(var c=0;c<10;++c)if(o=l[n-c]+o,!s(o)){if(i=a.exec(o))return i[1];if(i=r.exec(o))return i[1]}return u}function r(e,n){var i=t(e);if(!i.length)return null;var r=[],a=Math.floor(l.linesOfContext/2),o=a+l.linesOfContext%2,c=Math.max(0,n-a-1),u=Math.min(i.length,n+o-1);n-=1;for(var d=c;d<u;++d)s(i[d])||r.push(i[d]);return r.length>0?r: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 p(e,n){for(var i,r,a=0,o=n.length;a<o;++a)if((i=t(n[a])).length&&(i=i.join("\n"),r=e.exec(i)))return{url:n[a],line:i.substring(0,r.index).split("\n").length,column:r.index-i.lastIndexOf("\n",r.index)-1};return null}function h(e,n,i){var r,a=t(n),o=new RegExp("\\b"+c(e)+"\\b")
;return i-=1,a&&a.length>i&&(r=o.exec(a[i]))?r.index:null}function f(e){if("undefined"!=typeof document){for(var t,n,i,r,a=[window.location.href],o=document.getElementsByTagName("script"),s=""+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*$/,h=0;h<o.length;++h){var f=o[h];f.src&&a.push(f.src)}if(i=l.exec(s)){var v=i[1]?"\\s+"+i[1]:"",g=i[2].split(",").join("\\s*,\\s*");t=c(i[3]).replace(/;$/,";?"),
n=new RegExp("function"+v+"\\s*\\(\\s*"+g+"\\s*\\)\\s*{\\s*"+t+"\\s*}")}else n=new RegExp(c(s).replace(/\s+/g,"\\s+"));if(r=p(n,a))return r;if(i=u.exec(s)){var m=i[1];if(t=d(i[2]),n=new RegExp("on"+m+"=[\\'\"]\\s*"+t+"\\s*[\\'\"]","i"),r=p(n,a[0]))return r;if(n=new RegExp(t),r=p(n,a))return r}return null}}function v(e){if(!s(e.stack)&&e.stack){
for(var t,a,o=/^\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"),p=[],f=/^(.*) is undefined$/.exec(e.message),v=0,g=d.length;v<g;++v){if(t=o.exec(d[v])){var m=t[2]&&-1!==t[2].indexOf("native");a={url:m?null:t[2],
func:t[1]||u,args:m?[t[2]]:[],line:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}else if(t=c.exec(d[v]))a={url:t[2],func:t[1]||u,args:[],line:+t[3],column:t[4]?+t[4]:null};else{if(!(t=l.exec(d[v])))continue;a={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}}!a.func&&a.line&&(a.func=n(a.url,a.line)),a.line&&(a.context=r(a.url,a.line)),p.push(a)}
return p.length?(p[0].line&&!p[0].column&&f?p[0].column=h(f[1],p[0].url,p[0].line):p[0].column||s(e.columnNumber)||(p[0].column=e.columnNumber+1),{name:e.name,message:e.message,url:i(),stack:p}):null}}function g(e){var t=e.stacktrace;if(!s(e.stacktrace)&&e.stacktrace){for(var a,o=/ 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 p=null
;if((a=o.exec(c[d]))?p={url:a[2],line:+a[1],column:null,func:a[3],args:[]}:(a=l.exec(c[d]))&&(p={url:a[6],line:+a[1],column:+a[2],func:a[3]||a[4],args:a[5]?a[5].split(","):[]}),p){if(!p.func&&p.line&&(p.func=n(p.url,p.line)),p.line)try{p.context=r(p.url,p.line)}catch(e){}p.context||(p.context=[c[d+1]]),u.push(p)}}return u.length?{name:e.name,message:e.message,url:i(),stack:u}:null}}function m(e){var o=e.message.split("\n");if(o.length<4)return null
;var s,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,h=[],f=document.getElementsByTagName("script"),v=[];for(var g in f)a(f,g)&&!f[g].src&&v.push(f[g]);for(var m=2;m<o.length;m+=2){var y=null;if(s=l.exec(o[m]))y={url:s[2],func:s[3],args:[],line:+s[1],column:null};else if(s=c.exec(o[m])){y={url:s[3],func:s[4],
args:[],line:+s[1],column:null};var b=+s[1],I=v[s[2]-1];if(I){var S=t(y.url);if(S){S=S.join("\n");var M=S.indexOf(I.innerText);M>=0&&(y.line=b+S.substring(0,M).split("\n").length)}}}else if(s=u.exec(o[m])){var D=window.location.href.replace(/#.*$/,""),C=new RegExp(d(o[m+1])),O=p(C,[D]);y={url:D,func:"",args:[],line:O?O.line:s[1],column:null}}if(y){y.func||(y.func=n(y.url,y.line));var j=r(y.url,y.line),P=j?j[Math.floor(j.length/2)]:null
;j&&P.replace(/^\s*/,"")===o[m+1].replace(/^\s*/,"")?y.context=j:y.context=[o[m+1]],h.push(y)}}return h.length?{name:e.name,message:o[0],url:i(),stack:h}:null}function y(e,t,i,a){var o={url:t,line:i};if(o.url&&o.line){e.incomplete=!1,o.func||(o.func=n(o.url,o.line)),o.context||(o.context=r(o.url,o.line));var s=/ '([^']+)' /.exec(a);if(s&&(o.column=h(s[1],o.url,o.line)),e.stack.length>0&&e.stack[0].url===o.url){if(e.stack[0].line===o.line)return!1
;if(!e.stack[0].line&&e.stack[0].func===o.func)return e.stack[0].line=o.line,e.stack[0].context=o.context,!1}return e.stack.unshift(o),e.partial=!0,!0}return e.incomplete=!0,!1}function b(e,t){for(var r,a,o,s=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,c=[],d={},p=!1,v=b.caller;v&&!p;v=v.caller)if(v!==I&&v!==l.report){if(a={url:null,func:u,line:null,column:null},v.name?a.func=v.name:(r=s.exec(v.toString()))&&(a.func=r[1]),void 0===a.func)try{
a.func=r.input.substring(0,r.input.indexOf("{"))}catch(e){}if(o=f(v)){a.url=o.url,a.line=o.line,a.func===u&&(a.func=n(a.url,a.line));var g=/ '([^']+)' /.exec(e.message||e.description);g&&(a.column=h(g[1],o.url,o.line))}d[""+v]?p=!0:d[""+v]=!0,c.push(a)}t&&c.splice(0,t);var m={name:e.name,message:e.message,url:i(),stack:c};return y(m,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),m}function I(e,t){var n=null;t=null==t?0:+t;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=m(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 S={};return I.augmentStackTraceWithInitialElement=y,I.computeStackTraceFromStackProp=v,I.guessFunctionName=n,I.gatherContext=r,I}(),e.exports=l},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";var i=n(1293),r=n.n(i);r.a.debug=!1;var a={},o={},s={userTitle:"username",userID:"id"},l=!1,c={init:function(e){r.a.config(e)},enable:function(){l||(l=!0,r.a.install())},disable:function(){l&&(l=!1,r.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?r.a.setRelease(n):s[t]?(o[s[t]]=n,r.a.setUserContext(o)):(a[t]=n,r.a.setTagsContext(a))}},capture:function(e,t){
r.a.captureException(e,t)}};t.a=c},function(e,t,n){"use strict";var i,r=n(5),a=n.n(r),o=n(12),s=n.n(o),l=n(4),c=n(17),u=n(283),d=n(277),p=n(3849),h=n(844),f=n(85),v=n(215),g=n(43),m=n(40),y=n(28),b=n(15),I=n(282),S=n(113),M=n(258),D=n(120),C=n(139),O=n(155),j=n(55),P=n(3850),w=n(1259),T=n(401),E=n(1256),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",GRABBER_DEVICE:"grabber.device",CONTENT_CHANGE:"provider.content.change",SUBSCRIPTION_CHANGE:"provider.subscription.change"},N={started:S.o,updated:S.r,ended:S.i
},A=0,L=void 0,k=void 0,_=P.a.extend((i={updateLiveTVMetadata:function(){var e=b.d("appStore"),t=this.server.entityID();e.dispatch(O.n({serverEntityID:t,playerType:f.a})),j.c.EPG_IDENTIFIER.test(window.location.hash)&&e.dispatch(C.b({serverEntityID:t}))},getMessages:function(e){var t;return(t={},t[x.PREFERENCE]=e.Setting,t[x.TIMELINE]=e.TimelineEntry,t[x.STATUS]=e.StatusNotification,t[x.PROGRESS]=e.ProgressNotification,t[x.PLAYING]=e.PlaySessionStateNotification,
t[x.SYNC_STATE]=e.SyncStateNotification,t[x.BACKGROUND_GENERATOR_STATE]=e.BackgroundGeneratorStateNotification,t[x.VERSION_STATE]=e.VersionStateNotification,t[x.BACKGROUND_PROCESSING_QUEUE]=e.BackgroundProcessingQueueEventNotification,t[x.TRANSCODE_START]=e.TranscodeSession,t[x.TRANSCODE_UPDATE]=e.TranscodeSession,t[x.TRANSCODE_END]=e.TranscodeSession,t[x.UPDATE_STATE_CHANGE]=e.AutoUpdateNotification,t[x.REACHABILITY]=e.ReachabilityNotification,t[x.ACCOUNT]=e.AccountUpdateNotification,
t[x.ACTIVITY]=e.ActivityNotification,t[x.GRABBER_DEVICE]=e.MediaGrabberDeviceNotification,t[x.CONTENT_CHANGE]=e.MediaProviderContentNotification,t[x.SUBSCRIPTION_CHANGE]=e.MediaProviderSubscriptionNotification,t)[e.type]||[]}},i[x.PREFERENCE]=function(e){e.key=e.id,e.server=this.server,this.server.trigger("socket:setting",e),(0,b.d("appStore").dispatch)(Object(M.p)({serverEntityID:this.server.entityID(),setting:e}))},i[x.TIMELINE]=function(e){function t(){A=Date.now(),L=i,k=null,d(C.b({
serverEntityID:p,containerKeyPattern:new RegExp("^"+Object(v.a)("/library/sections/"+i)+"\\b")}))}if(!j.c.EPG_IDENTIFIER.test(e.identifier)){var n=e.state,i=e.sectionID,r=e.rootItemID,a=e.parentItemID,o=e.itemID,s=e.metadataState,l=e.mediaState,u=e.type,d=b.d("appStore").dispatch,p=this.server.entityID(),f="/library/metadata/"+o,S=Object(m.a)(g.g,f,p);if(d(Object(D.updateMetadataItemRefreshingState)({serverEntityID:p,metadataItemEntityID:S,metadataState:s,mediaState:l})),
n===h.a.PROCESSED&&d(Object(I.d)({serverEntityID:p,metadataItemEntityID:S})),n===h.a.DELETED&&d(Object(I.c)({serverEntityID:p,metadataItemEntityID:S})),n===h.a.CREATED||n===h.a.DELETED){if(i>0){var M=Date.now()-A;i===L&&M<5e3?k||(k=setTimeout(t,5e3-M)):t()}if(r>0){var O="/library/metadata/"+r,P=Object(m.a)(g.g,O,p);d(C.b({serverEntityID:p,metadataItemEntityID:P,rootMetadataKey:O}))}if(a>0){var w="/library/metadata/"+a,T=Object(m.a)(g.g,w,p);d(C.b({serverEntityID:p,metadataItemEntityID:T,
parentMetadataKey:w}))}var E=Object(y.r)(u);E&&E.typeString===y.i&&d(C.b({serverEntityID:p,containerKeyPattern:new RegExp("^/playlists")}))}e.server=this.server,this.server.trigger("socket:timeline",e),c.a.trigger("timeline",e)}},i[x.STATUS]=function(e){var t=e.title+(e.description?": "+e.description:"");if(c.a.trigger("show:status",this.server,t),this.server.trigger("socket:status",e),"LIBRARY_UPDATE"===e.notificationName){var n=b.d("appStore").dispatch,i=this.server.entityID()
;i&&(n(Object(S.g)({serverEntityID:i})),n(C.b({serverEntityID:i})))}},i[x.PROGRESS]=function(e){c.a.trigger("show:status",this.server,e.message),this.server.trigger("socket:status",e)},i[x.PLAYING]=function(e){var t=this;if(e.sessionKey&&!this.server.get("shared")){var n=this.server.get("desktop").get("sessions"),i=n.get(e.sessionKey);if(i&&i.get("key")===e.key)if(e.state===u.a.states.STOPPED){i.trigger("destroy",i,i.collection),i.cache.remove(i)
;var r=b.d("appStore").dispatch,o=this.server.entityID();o&&r(C.b({serverEntityID:o}))}else{var s=i.get("Player");s&&(s.state=e.state,i.trigger("change:Player",i,s)),i.set("viewOffset",e.viewOffset)}else{if(n.isPopulating())return;n.fetch().done(function(){if(i=n.get(e.sessionKey)){var r=b.d("appModel"),o=r.get("user"),s=i.get("Player").title,u=i.get("User").title,d=i.get("grandparentTitle"),p=i.get("title");d&&(p=d+" - "+p);var h=Object(l.default)("{1} started playing {2} on {3}.",u,p,s)
;u&&u!==o.get("username")&&c.a.trigger("show:status",t.server,h),t.server.trigger("socket:playing",a.a.extend(e,{username:u||Object(l.default)("Unknown"),title:p,player:s}))}})}}},i[x.SYNC_STATE]=function(e){var t=new w.a({key:e.key},{server:this.server,syncItemId:e.syncItemId,onlyIfCached:!0});if(!a.a.isEmpty(t)){t.get("Media").forEach(function(n){n.Part.forEach(function(n){n.transcodeState=e.syncFileState,n.transcodeStateContext=e.syncFileStateContext,n.syncState=e.syncState,
n.syncStateContext=e.syncStateContext;var i=d.a.getSyncStateFromPart(n);d.a.waitingRegex.test(i)&&(n.key="placeholder"),t.trigger("change:Media",t,t.get("Media"))})})}},i[x.BACKGROUND_GENERATOR_STATE]=function(e){var t={server:this.server,onlyIfCached:!0},n=new T.a({id:e.generatorID},t);a.a.isEmpty(n)||n.fetch()},i[x.VERSION_STATE]=function(e){var t={server:this.server,onlyIfCached:!0},n=new T.a({id:e.generatorID},t);if(!a.a.isEmpty(n)){
var i=n.get("children").getCollection(),r=i.get(e.metadataItemID);r&&r.set({processingState:e.state,processingStateContext:e.stateContext})}},i[x.BACKGROUND_PROCESSING_QUEUE]=function(e){var t=new E.a([],{server:this.server,allowInCache:!0,onlyIfCached:!0});if(!a.a.isEmpty(t)){var n=t.first();n&&n.fetch()}},i[x.TRANSCODE_START]=function(e){if("static"===e.context){this.server.get("desktop").get("backgroundTranscodeJobs").fetch()}else{this.server.get("desktop").get("sessions").fetch()}},
i[x.TRANSCODE_UPDATE]=function(e){if("static"===e.context){var t=this.server.get("desktop").get("backgroundTranscodeJobs"),n=t.get(e.key);n?n.set(n.parse(e)):t.fetch()}},i[x.TRANSCODE_END]=function(e){this["transcodeSession.start"].apply(this,arguments)},i[x.UPDATE_STATE_CHANGE]=function(e){var t=this.server.get("desktop").get("update"),n=a.a.pick(e,t.whitelistedAttrs);a.a.defaults(n,a.a.result(t,"defaults")),"downloading"===t.get("state")&&"available"===n.state&&(n.state="downloading"),t.set(n)
},i[x.REACHABILITY]=function(e){this.server.get("desktop").get("cloudAccount").fetch()},i[x.ACCOUNT]=function(e){if(this.server.set("myPlexSubscription",e.hasPlexPass),this.server.supports("reachability")){var t=a.a.extend(this.server.getXHROptions("/myplex/refreshReachability"),{type:"PUT"});s.a.ajax(t)}b.d("appModel").get("user").get("isSignedIn")&&c.a.trigger("discover:servers")},i[x.ACTIVITY]=function(e){var t=Object(p.a)(e),n=b.d("appStore"),i=this.server.entityID(),r=t.Activity||t
;if(r.Context=r.Context||{},r.Response=r.Response||{},i){var a=N[t.event];a&&n.dispatch(a({serverEntityID:i,activity:r}))}},i[x.GRABBER_DEVICE]=function(e){var t=b.d("appStore"),n=this.server.entityID();n&&"appeared"===e.event&&t.dispatch(Object(M.f)({serverEntityID:n,device:e.Device}))},i[x.CONTENT_CHANGE]=function(){this.updateLiveTVMetadata()},i[x.SUBSCRIPTION_CHANGE]=function(){this.updateLiveTVMetadata()},i));t.a=_},function(e,t,n){"use strict";function i(e){if(!e||!e._children)return e
;var t=a.a.clone(e),n=t._children;return Array.isArray(n)&&(n.forEach(function(e){var n=e._elementType;if(e._elementType=null,e.elementName=n,n){var r=s[n]||n,a=t[r],o=i(e);a?Array.isArray(a)?a.push(o):t[r]=[a,o]:t[r]=o}}),t._children=null),t}var r=n(5),a=n.n(r),o=n(94),s=a.a.reduce(o.a,function(e,t){return e[t]="Metadata",e},{});t.a=i},function(e,t,n){"use strict";var i=n(5),r=n.n(i),a=n(12),o=n.n(a),s=n(69),l=n(89),c=n(30),u=n(15),d=n(113),p=n(274),h=s.a.extend({mixins:l.a,url:function(){
var e=this.server.get("activeConnection"),t=e.id.replace(/^http/,"ws");return this.server.resolveUrl("/:/websockets/notifications",{connection:new p.a({uri:t}),appendToken:!0})},initialize:function(e){r.a.bindAll(this,"onOpen","onClose","onError","onMessage","getMessages"),this.server=e.server},open:function(){return this.socket&&this.close(),this._deferred=o.a.Deferred(),this.socket=new window.WebSocket(r.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.socket&&(this.socket.onopen=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close(),this.socket=null,this._deferred&&"pending"===this._deferred.state()&&this._deferred.reject())},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)}},getMessages:function(e){return[]},onOpen:function(e){var t=u.d("appStore"),n=this.server.entityID();n&&t.dispatch(Object(d.f)({serverEntityID:n,event:e})),this.server.trigger("socket:websocket",{opened:!0}),this.trigger("open",this.server,e),this._deferred.resolve(this.server,e)},onClose:function(e){this.close();var t=u.d("appStore"),n=this.server.entityID()
;n&&t.dispatch(Object(d.e)({serverEntityID:n,event:e})),this.server.trigger("socket:websocket",{closed:!0}),this.trigger("close",this.server,e),this._deferred.reject(this.server,e),this.testConnection()},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()},onMessage:function(e){var t=this,n=void 0;try{n=JSON.parse(e.data)}catch(t){
return void c.a.warn("[Connections] Error formatting message:\n%s",e.data)}var i=!!n._elementType,a=i?r.a.first(n._children):n.NotificationContainer;if(a){var o=i?n.type:a.type,s=this[o],l=void 0;l=i?Array.isArray(a)?a:[a]:this.getMessages(a),l.forEach(function(e){t.trigger("message",e),r.a.isFunction(s)&&s.call(t,e)})}}});t.a=h},function(e,t,n){"use strict";var i=n(631),r=i.a.extend({name:"PersistentWebStorage",getStorage:function(){return window.localStorage}});t.a=r},function(e,t,n){
"use strict";var i=n(631),r=i.a.extend({name:"VolatileWebStorage",getStorage:function(){return window.sessionStorage}});t.a=r},function(e,t,n){"use strict";var i=n(12),r=n.n(i),a=n(15),o=n(38),s={init:function(){var e=Object(a.d)("appModel"),t=window.innerWidth+"x"+window.innerHeight,n=window.screen.width+"x"+window.screen.height,i={"X-Plex-Product":"Plex Web","X-Plex-Version":"3.53.7","X-Plex-Client-Identifier":e.get("clientID"),"X-Plex-Platform":o.a.name,"X-Plex-Platform-Version":o.a.version,
"X-Plex-Sync-Version":2,"X-Plex-Device":o.a.platform,"X-Plex-Device-Name":o.a.name,"X-Plex-Device-Screen-Resolution":t+","+n};return e.on("change:clientID",function(e,t){i["X-Plex-Client-Identifier"]=t}),r.a.Deferred().resolve(i).promise()}};t.a=s},function(e,t,n){"use strict";var i=n(15),r=n(17),a=n(69),o=n(109),s=n(1124),l=a.a.extend({shortcuts:[{keys:["?"],fn:"help",group:"navigation",label:"Open Keyboard Shortcuts"},{keys:["esc"],fn:"escape",group:"navigation",label:"Close Modal or Menu"},{
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:"playSelected",group:"actions",label:"Open Player"},{keys:["w"],fn:"toggleWatched",group:"actions",label:"Toggle as Watched/Unwatched"},{keys:["e"],fn:"edit",group:"actions",label:"Edit Metadata"},{keys:["i"],fn:"info",group:"actions",label:"Get Info"},{keys:["shift+s"],fn:"save",group:"actions",label:"Save Changes"},{keys:["space","play_pause"],fn:"playPause",group:"player",label:"Play or Pause"},{keys:["play"],fn:"play",group:"player",
label:"Play"},{keys:["pause"],fn:"pause",group:"player",label:"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"},{keys:["x"],fn:"stop",group:"player",label:"Close Player"}],triggerShortcut:function(e){var t="shortcut:"+e
;if(r.a.hasListener(t))return r.a.trigger(t),!1},help:function(e){r.a.trigger("show:modal",new s.a({shortcuts:this.shortcuts}))},escape:function(e){r.a.trigger("shortcut:escape")},dashboard:function(e){r.a.trigger("navigate","dashboard")},settings:function(e){Object(o.a)("webSettings",{settingsSubset:"general"})},activity:function(e){var t=i.d("appModel"),n=t.get("primaryServer");n&&!n.get("isShared")&&Object(o.a)("nowPlaying",{serverID:n.id})},watchLater:function(e){
r.a.trigger("navigate","userPlaylist",{key:"queue"})},recommendations:function(e){r.a.trigger("navigate","userPlaylist",{key:"recommendations"})},users:function(e){r.a.trigger("navigate","users")},search:function(e){return this.triggerShortcut("search")},playSelected:function(e){return this.triggerShortcut("playSelected")},toggleWatched:function(e){return this.triggerShortcut("toggleWatched")},edit:function(e){return this.triggerShortcut("edit")},info:function(e){
return this.triggerShortcut("info")},save:function(e){return this.triggerShortcut("save")},playPause:function(e){return this.triggerShortcut("playPause")},play:function(e){return this.triggerShortcut("play")},pause:function(e){return this.triggerShortcut("pause")},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")},stop:function(e){return this.triggerShortcut("stop")}});t.a=l},function(e,t,n){"use strict"
;var i=n(38),r={capabilities:{embed:!0,redirect:!0},video:{lowestQualityIndex:2,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:{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:{}}}},flac:{mimeType:"audio/flac",audio:{codecs:{flac:{}}}}},directStream:{audio:{codecs:{mp3:{}},maxBitrate:320,maxChannels:2}}}}
;"ie"===i.a.id&&"9.0"===i.a.version&&(r.video.directPlay.mp4.optimizedForStreaming=!0),t.a=r},function(e,t,n){"use strict";function i(){var e=[];return b&&e.push("add-transcode-target(type=musicProfile&context=streaming&protocol=dash&container=mp4&audioCodec=aac,mp3)"),I&&e.push("add-transcode-target(type=musicProfile&context=streaming&protocol=hls&container=mpegts&audioCodec=aac,mp3)"),{type:v.a.types.MUSIC,profile:s.a.prop("music"),allowDirectPlay:!0,hasNativeHLS:I,hasDASH:b,transcoder:u.a,
transcoderOptions:{directStreamAudio:1,mediaBufferSize:m},profileExtra:e.length?e.join("+"):null}}function r(e,t,n){var i=Object(o.d)("appModel"),r=i.get("experienceSettings"),a=null;"safari"===l.a.id&&"osx"===l.a.platformID&&Object(c.a)(l.a.platformVersion,"10.11")&&(a="append-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=ac3,eac3)");var s={hasNativeHLS:I,hasDASH:b,hasStreamingMKV:!1,subtitlesBurnLevel:r.get("subtitlesBurnLevel"),transcoder:u.a,
profileExtra:a},d={subtitleSize:r.get("subtitleSize"),mediaBufferSize:y};return Object(g.a)(e,t,s,d,n)}function a(e,t,n){var a=h.r(e.get("type"));return a&&a.mediaType===f.a?i():r(e,t,n)}var o=n(15),s=n(422),l=n(38),c=n(395),u=n(876),d=n(3857),p=n(3858),h=n(28),f=n(59),v=n(283),g=n(3859),m=12288,y=102400,b=Object(p.a)(),I=!b&&Object(d.a)();t.a=a},function(e,t,n){"use strict";function i(){return Object(r.a)({mimeType:"application/x-mpegURL"})}t.a=i;var r=n(960)},function(e,t,n){"use strict"
;function i(){return!(!window.MediaSource||!window.MediaSource.isTypeSupported)}t.a=i},function(e,t,n){"use strict";function i(e,t){var n=e.server.get("isPrivateConnection");if(Object(p.a)(e,n)&&t.get("useHomeStreamingRecommendedSettings"))return h.a.getQualityByIndex(g.b);var i=Object(f.a)(e,n),r=t.get(i);return h.a.getQualityByIndex(r)}function r(e,t,n){
var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},d=arguments[4],p=Object(l.d)("appModel"),f=p.get("experienceSettings"),g=p.get("settings"),m=c.a.prop("video"),y=a(p,e),b=Object(v.a)({profile:m,metadataItem:e,qualityIndex:t,mediaItem:d,canPlayAdaptiveBitrate:y,settings:f
}),I=b.qualityIndex,S=I===h.a.CONVERT_AUTOMATICALLY&&y,M=g.get("directPlay")&&!S,D=g.get("directStream")&&!S?1:0,C=y&&p.get("experienceSettings").get("autoAdjustQuality")&&e.server.supports("adaptiveBitrateFallback")&&!h.a.isExplicitQuality(I),O=b.quality;S&&(O=i(e,f));var j=void 0;return I!==h.a.ORIGINAL&&(j=r(e,h.a.ORIGINAL,n,o,d)),s()({type:u.a.types.VIDEO,profile:m,allowDirectPlay:M,subtitlesBurnLevel:f.get("subtitlesBurnLevel"),availableQualities:b.availableQualities,qualityIndex:I,
quality:O,transcoderOptions:s()({addDebugOverlay:f.get("debugVideoQualityOverlay")?1:0,autoAdjustQuality:C||S?1:0,directStream:D,directStreamAudio:D,audioBoost:g.get("audioBoost")},o),originalQualityDecisionOptions:j},n)}function a(e,t){return!(!e.get("user").get("features").get(d.a)||!t.server.get("hasAdaptiveBitrate")||e.get("remotePlayer"))}var o=n(7),s=n.n(o),l=n(15),c=n(422),u=n(283),d=n(52),p=n(628),h=n(130),f=n(476),v=n(3860),g=n(496);t.a=r},function(e,t,n){"use strict";function i(e){
var t=e.profile,n=e.metadataItem,i=e.mediaItem,o=e.canPlayAdaptiveBitrate,s=e.settings,l=e.qualityIndex,c=i?[i]:n.get("Media"),u=r.a.getAvailableQualitiesFor(c,n.server,{lowestQualityIndex:t.lowestQualityIndex,highestQualityIndex:t.highestQualityIndex});return null==l?l=Object(a.a)({mediaItems:c,transcodeServer:n.server,metadataItem:n,canPlayAdaptiveBitrate:o,settings:s,availableQualities:u}):r.a.isExplicitQuality(l)&&!u.find(function(e){return e.index===l})&&(l=r.a.ORIGINAL),{
availableQualities:u,quality:r.a.getQualityByIndex(l),qualityIndex:l}}t.a=i;var r=n(130),a=n(3861)},function(e,t,n){"use strict";function i(e){var t=e.mediaItems,n=e.transcodeServer,i=e.metadataItem,s=e.canPlayAdaptiveBitrate,l=e.settings,p=e.availableQualities,h=o(t),f=n.get("maxUploadBitrate"),v=n.get("isPrivateConnection"),g=s&&l.get("autoAdjustQuality"),m=l.localQualityDefault;void 0===m&&(m=c.a.ORIGINAL);var y=Object(u.a)(i,v),b=Object(d.a)(i,v),I=c.a.getQualityByIndex(l.get(b));if(y){
var S=l.get("useHomeStreamingRecommendedSettings")?m:I.index,M=c.a.getQualityByIndex(S),D=c.a.isExplicitQuality(M.index)&&a(M.bitrate,h);return M.index===c.a.ORIGINAL||D?c.a.ORIGINAL:g?c.a.CONVERT_AUTOMATICALLY:r(M,p)}var C=a(f,h),O=I.index===c.a.ORIGINAL,j=a(I.bitrate,h);return l.get("remoteSmallVideoAtOriginalQuality")&&C&&(O||j)?c.a.ORIGINAL:g?c.a.CONVERT_AUTOMATICALLY:O&&C?c.a.ORIGINAL:r(I,p)}function r(e,t){return 0===t.length?c.a.ORIGINAL:t.find(function(t){return t.index===e.index
})?e.index:l.a.last(t).index}function a(e,t){return!e||!!t&&e>=t}function o(e){return Math.max.apply(Math,e.map(function(e){return e.bitrate}))}t.a=i;var s=n(5),l=n.n(s),c=n(130),u=n(628),d=n(476)},function(e,t,n){"use strict";var i=n(1295),r=n(3864),a={getComponent:function(e){return"dash"===e.protocol?r.a:i.a}};t.a=a},function(e,t,n){"use strict";var i=n(8),r=n.n(i),a=n(9),o=n.n(a),s=n(10),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=(n.n(u),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.onTick=function(){var e=Date.now()-i._initialMilliseconds;i.props.onTick&&i.props.onTick(Math.floor(e/1e3))},a=n,o()(i,a)}return l()(t,e),t.prototype.componentDidMount=function(){this._initialMilliseconds=Date.now(),this._positionTimer=setInterval(this.props.onPositionUpdate,40),this._tickTimer=setInterval(this.onTick,1e3)},t.prototype.componentWillUnmount=function(){
clearInterval(this._positionTimer),clearInterval(this._tickTimer)},t.prototype.render=function(){return null},t}(u.Component));t.a=d},function(e,t,n){"use strict";function i(e){switch(e){case 1:return Object(g.default)("Network");case 2:return Object(g.default)("Text");case 3:return Object(g.default)("Media");case 4:return Object(g.default)("Manifest");case 5:return Object(g.default)("Streaming");case 6:return Object(g.default)("DRM");case 7:return Object(g.default)("Player");case 8:
return Object(g.default)("Cast");case 9:return Object(g.default)("Storage")}}var r=n(7),a=n.n(r),o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(1296),g=(n.n(v),n(4)),m=n(30),y=n(3865),b=n(3867),I=n(1295),S=1,M=2,D=70,C=function(e){function t(n,r){s()(this,t);var a=c()(this,e.call(this,n,r));return a.onElementChange=function(e){var t=a.props.Player;a._shaka=new t(e),a._shaka.addEventListener("buffering",a.onBufferingChange),
a._shaka.addEventListener("error",a.onError),a._shaka.configure({streaming:{bufferingGoal:D,jumpLargeGaps:!0,retryParameters:{maxAttempts:1/0}}}),a._shaka.load(a.props.src,a.props.positionSeconds).then(null,function(e){a._shaka&&a.onError({detail:e})}),a.setState({isReadyToPlay:!0})},a.onHTMLError=function(){},a.onBufferingChange=function(e){e.buffering},a.onPositionMillisecondsChange=function(e){a.props.onPositionMillisecondsChange(e)},a.onError=function(e){
var t=e.detail,n=void 0===t?{}:t,r=n.severity,o=n.category,s=n.code,l=i(o),c=s+" ("+(l||"Unknown")+")";r===M?(m.a.warn("[Player] A critical Shaka error occurred: "+c+"; the player cannot recover"),a.props.onError&&a.props.onError({code:"s"+s,category:l})):r===S?m.a.warn("[Player] A Shaka error occurred: "+c+"; the player will attempt to recover"):m.a.warn("[Player] A Shaka error occurred: "+c+"; the severity is unknown")},Object(y.a)(),a.state={isReadyToPlay:!1},a}return d()(t,e),
t.prototype.componentWillUnmount=function(){this._shaka&&(this._shaka.removeEventListener("buffering",this.onBufferingChange),this._shaka.removeEventListener("error",this.onError),this._shaka.unload(),this._shaka=null)},t.prototype.render=function(){return f.a.createElement(b.a,a()({},this.props,{healthCheckSecondsFromEnd:D,mediaComponent:I.a,isReadyToPlay:this.state.isReadyToPlay,onElementChange:this.onElementChange,onPositionMillisecondsChange:this.onPositionMillisecondsChange,
onError:this.onHTMLError}))},t}(h.Component);C.defaultProps=a()({},I.a.defaultProps,{Player:v.Player}),t.a=C},function(e,t,n){"use strict";var i=n(1296),r=(n.n(i),n(3866));t.a=Object(r.a)(function(){i.polyfill.installAll()})},function(e,t,n){"use strict";function i(e){var t=!1;return function(){if(!t)return t=!0,e.apply(void 0,arguments)}}t.a=i},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(8),o=n.n(a),s=n(9),l=n.n(s),c=n(10),u=n.n(c),d=n(0),p=n.n(d),h=n(1),f=(n.n(h),
n(30)),v=function(e){function t(){var n,i,r;o()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(s))),i.onTimeout=function(){var e=i.props,t=e.positionSeconds,n=e.durationSeconds,r=e.onEnd,a=n-t;f.a.warn("[Player] Manually ending while stalled within the last %ss.",a),i.props.onBufferingChange&&i.props.onBufferingChange(!1),r()},r=n,l()(i,r)}return u()(t,e),t.prototype.componentDidUpdate=function(e){
var t=this.props,n=t.healthCheckSecondsFromEnd,i=t.positionSeconds,r=t.durationSeconds,a=t.paused,o=t.onEnd,s=!1;o&&r>0&&i>=r&&(s=!0,o());var l=i!==e.positionSeconds,c=a&&a!==e.paused,u=s||l||c;this._timeoutID&&u&&clearTimeout(this._timeoutID);var d=!s&&!a,p=r-i;if(r>0&&o&&d&&p>=0&&p<n){var h=Math.round(1e3*p)+250;clearTimeout(this._timeoutID),this._timeoutID=setTimeout(this.onTimeout,h)}},t.prototype.componentWillUnmount=function(){this._timeoutID&&clearTimeout(this._timeoutID)},
t.prototype.render=function(){var e=this.props,t=e.mediaComponent,n=r()(e,["mediaComponent"]);return p.a.createElement(t,n)},t}(d.Component);t.a=v},function(e,t,n){"use strict";function i(){function e(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}function t(){for(var t=0;t<a.length;t++)a[t](e())}
var n=document.documentElement,i=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullscreen,r=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen,a=[];return document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t),{subscribe:function(e){var t=!0
;return a.push(e),function(){if(t){t=!1;var n=a.indexOf(e);a.splice(n,1)}}},hasFullscreen:!!i,shouldExitOnPlayerClose:!0,isFullscreen:e,enter:function(){i&&i.call(n)},exit:function(){r&&r.call(document)}}}t.a=i},function(e,t,n){"use strict";function i(e){return e&&!e.get("isCloud")&&"iOS"!==e.get("platform")&&e.supports("companionProxy")}function r(e){return e&&e.get("isPrivate")&&e.get("isConnected")&&!e.get("isPossiblyCrossNetworkProtected")}function a(e){e.forEach(function(e){e.resolve()}),
e.length=0}function o(e){e.forEach(function(e){e.reject()}),e.length=0}var s=n(12),l=n.n(s),c=n(5),u=n.n(c),d=n(15),p=n(69),h=n(1280),f=n(58),v=n(30),g=n(89),m=n(62),y=p.a.extend({mixins:[g.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=h.a.writeXml(e),i=u.a.result(this.proxyServer,"url"),r=this.proxyServer.getXHROptions(i+"player/proxy/timeline?commandID="+this.commandID);r.data="timeline="+encodeURIComponent(n),r.method="POST",r.contentType="application/x-www-form-urlencoded",l.a.ajax(r).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=Object(d.d)("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()},debugStatus:function(){var e=this.proxyServer;return e?"Proxied: "+e.get("debugName"):void 0},_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(),v.a.info("[Companion] Found proxy",this.proxyServer.get("debugName")),this._poll()):v.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":m.a.get("allowCloudPubSub")?"client,player,pubsub-player":"client,player"},data:{_method:"PUT",proxiedBy:this.proxyServer.id}});l.a.ajax(t).done(function(){a(e._playerRegistrationDeferreds)}).fail(function(){o(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(){a(t._playerUnregistrationDeferreds)}).fail(function(){o(t._playerUnregistrationDeferreds)})}},_poll:function(){if(this.started){var e=this.proxyServer;if(!e)return void v.a.info("[Companion] No proxy server available to long poll");if(this._isPollRequestPending())return void v.a.info("[Companion] Long poll already open to ",e.get("debugName"));this._clearPollRequestStatusCheck(),
this._checkPollRequestStatusLater();var t=e.getXHROptions("/player/proxy/poll",{data:{deviceClass:"pc",protocolVersion:"1",protocolCapabilities:"timeline,playback,navigation,mirror,playqueues",timeout:1}});v.a.info("[Companion] Opening long poll to %s at %s",e.get("debugName"),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()&&this.proxyServer&&(v.a.info("[Companion] Poll connection successfully opened with ",this.proxyServer.get("debugName")),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],mediaIndex:[e.queryMediaIndex],containerKey:[e.queryContainerKey],playQueueID:[e.queryPlayqueueid],type:[e.queryType],volume:[e.queryVolume],repeat:[e.queryRepeat],audioStreamID:[e.queryAudioStreamID],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="/player/proxy/response?commandID="+e.commandID,i=this.proxyServer.getXHROptions(n,{method:"POST",contentType:"application/x-www-form-urlencoded",data:{response:e.body}});l.a.ajax(i)}},_incrementPollErrorCount:function(e){var t=e.get("machineIdentifier");t in this._pollErrorCountByServerID||(this._pollErrorCountByServerID[t]=0),this._pollErrorCountByServerID[t]++,v.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)&&r(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
;return e?(n?i||v.a.warn("[Companion] Poll succeeded without a Command response",n):v.a.warn("[Companion] Poll succeeded without a parseable response",e),i?(this._resetPollErrorCount(this.proxyServer),this._repoll(),void(Array.isArray(i)?i:[i]).forEach(function(e){try{v.a.info("[Companion] Received %s from %s",e.path,e.deviceName),t._processCommand(e)}catch(t){v.a.warn("[Companion] encountered %s while processing %s",t.message,e)}},this)):void this.onPollError()):void this._repoll()},
onPollError:function(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.proxyServer);if(this.started&&t){var n=t.get("isConnected"),i=t.get("debugName"),r=function(){v.a.warn("[Companion] Poll failed to %s; attempting to pick new proxy",i),e._pickProxyServer()};if(this.proxyServer=null,this._clearPollRequestStatusCheck(),this._incrementPollErrorCount(t),this._exceedsPollErrorCount(t))return v.a.warn("[Companion] Poll failed to %s; is no longer an eligible proxy",i),
void r();n?(v.a.warn("[Companion] Poll failed to %s; testing all connections",i),t.testAllConnections().done(function(){v.a.info("[Companion] Poll failed to %s; server is available",i)}).fail(function(){v.a.warn("[Companion] Poll failed to %s; unable to reconnect",i)}).always(r)):r()}}});t.a=y},function(e,t,n){"use strict";var i=n(3871),r=n.n(i),a=n(3872),o=n.n(a),s=n(3873),l=n.n(s),c=n(3874),u=n.n(c),d=n(3875),p=n.n(d),h=n(3876),f=n.n(h),v=n(3877),g=n.n(v),m=n(14),y=n.n(m)
;y.a.registerPartial("setting",r.a),y.a.registerPartial("lockableTagInput",o.a),y.a.registerPartial("lockableTextInput",l.a),y.a.registerPartial("lockableNumericInput",u.a),y.a.registerPartial("textInput",p.a),y.a.registerPartial("autocompleteTextInput",f.a),y.a.registerPartial("connectError",g.a)},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"advanced-setting"}function l(e,t){var a,o=""
;return o+=' <label class="control-label" for="input_'+S((a=e&&e.id,typeof a===M?a.apply(e):a))+S((a=e&&e.idSuffix,typeof a===M?a.apply(e):a))+'"> <input type="checkbox" id="input_'+S((a=e&&e.id,typeof a===M?a.apply(e):a))+S((a=e&&e.idSuffix,typeof a===M?a.apply(e):a))+'" name="'+S((a=e&&e.id,typeof a===M?a.apply(e):a))+'" value="1" ',a=r.if.call(e,e&&e.value,{hash:{},inverse:D.noop,fn:D.program(4,c,t),data:t}),(a||0===a)&&(o+=a),o+="> "+S(i(n(3)).call(e,e&&e.label,{hash:{},data:t
}))+" </label> ",a=r.if.call(e,e&&e.summary,{hash:{},inverse:D.noop,fn:D.program(6,u,t),data:t}),(a||0===a)&&(o+=a),o+=" "}function c(e,t){return"checked"}function u(e,t){var r="";return r+=' <p class="help-block">'+S(i(n(3)).call(e,e&&e.summary,{hash:{},data:t}))+"</p> "}function d(e,t){var a,o="";return o+=' <label class="control-label" for="input_'+S((a=e&&e.id,typeof a===M?a.apply(e):a))+S((a=e&&e.idSuffix,typeof a===M?a.apply(e):a))+'">'+S(i(n(3)).call(e,e&&e.label,{hash:{},data:t
}))+"</label> ",a=r.if.call(e,e&&e.enumValues,{hash:{},inverse:D.program(13,v,t),fn:D.program(9,p,t),data:t}),(a||0===a)&&(o+=a),o+=" ",a=r.if.call(e,e&&e.summary,{hash:{},inverse:D.noop,fn:D.program(6,u,t),data:t}),(a||0===a)&&(o+=a),o+=" "}function p(e,t){var n,i="";return i+=' <select id="input_'+S((n=e&&e.id,typeof n===M?n.apply(e):n))+S((n=e&&e.idSuffix,typeof n===M?n.apply(e):n))+'" name="'+S((n=e&&e.id,typeof n===M?n.apply(e):n))+'"> ',n=r.each.call(e,e&&e.enumValues,{hash:{},
inverse:D.noop,fn:D.programWithDepth(10,h,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function h(e,t,r){var a,o="";return o+=' <option value="'+S((a=e&&e.value,typeof a===M?a.apply(e):a))+'" ',a=i(n(25)).call(e,e&&e.value,r&&r.value,{hash:{},inverse:D.noop,fn:D.program(11,f,t),data:t}),(a||0===a)&&(o+=a),o+=">"+S(i(n(3)).call(e,e&&e.label,{hash:{},data:t}))+"</option> "}function f(e,t){return'selected="selected"'}function v(e,t){var a,o="";return o+=' <input type="',
a=i(n(25)).call(e,e&&e.option,"hidden",{hash:{},inverse:D.program(16,m,t),fn:D.program(14,g,t),data:t}),(a||0===a)&&(o+=a),o+='" id="input_'+S((a=e&&e.id,typeof a===M?a.apply(e):a))+S((a=e&&e.idSuffix,typeof a===M?a.apply(e):a))+'" class="form-control" name="'+S((a=e&&e.id,typeof a===M?a.apply(e):a))+'" value="'+S((a=e&&e.value,typeof a===M?a.apply(e):a))+'" ',a=r.if.call(e,e&&e.placeholder,{hash:{},inverse:D.noop,fn:D.program(18,y,t),data:t}),(a||0===a)&&(o+=a),o+="> "}function g(e,t){
return"password"}function m(e,t){return"text"}function y(e,t){var n,i="";return i+='placeholder="'+S((n=e&&e.placeholder,typeof n===M?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var b,I="",S=this.escapeExpression,M="function",D=this;return I+='<div class="form-group ',b=r.if.call(t,t&&t.advanced,{hash:{},inverse:D.noop,fn:D.program(1,s,o),data:o}),(b||0===b)&&(I+=b),I+='"> ',b=i(n(25)).call(t,t&&t.type,"bool",{hash:{},inverse:D.program(8,d,o),
fn:D.program(3,l,o),data:o}),(b||0===b)&&(I+=b),I+=" </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return" locked"}function l(e,t){var n,i="";return i+='data-query="'+p((n=e&&e.query,typeof n===d?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d="function",p=this.escapeExpression,h=this
;return u+='<div class="form-group"> <label for="lockable-'+p((c=t&&t.name,typeof c===d?c.apply(t):c))+'">'+p(i(n(3)).call(t,t&&t.label,{hash:{},data:o}))+'</label> <div class="input-group selectize-group"> <a href="#" data-field="'+p((c=t&&t.name,typeof c===d?c.apply(t):c))+'" class="input-group-addon edit-lock-addon',c=r.if.call(t,t&&t.locked,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),(c||0===c)&&(u+=c),
u+='"><i class="glyphicon lock"></i></a> <input type="text" id="lockable-'+p((c=t&&t.name,typeof c===d?c.apply(t):c))+'" class="form-control lockable-field tag-input-hidden" data-name="'+p((c=t&&t.name,typeof c===d?c.apply(t):c))+'" data-attr="'+p((c=t&&t.attribute,typeof c===d?c.apply(t):c))+'" data-only-delete="'+p((c=t&&t.onlyDelete,typeof c===d?c.apply(t):c))+'" ',c=r.if.call(t,t&&t.query,{hash:{},inverse:h.noop,fn:h.program(3,l,o),data:o}),(c||0===c)&&(u+=c),u+="> </div> </div> "})
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return" locked"}function l(e,t){var n,i="";return i+=' <textarea class="form-control lockable-field" id="lockable-'+g((n=e&&e.name,typeof n===v?n.apply(e):n))+'" name="'+g((n=e&&e.name,typeof n===v?n.apply(e):n))+'"',n=r.if.call(e,e&&e.rows,{hash:{},inverse:m.noop,fn:m.program(4,c,t),data:t}),(n||0===n)&&(i+=n),
i+=' placeholder="'+g((n=e&&e.placeholder,typeof n===v?n.apply(e):n))+'">'+g((n=e&&e.value,typeof n===v?n.apply(e):n))+"</textarea> "}function c(e,t){var n,i="";return i+=' rows="'+g((n=e&&e.rows,typeof n===v?n.apply(e):n))+'"'}function u(e,t){var n,i="";return i+=' <input type="text" id="lockable-'+g((n=e&&e.name,typeof n===v?n.apply(e):n))+'" class="form-control lockable-field" name="'+g((n=e&&e.name,typeof n===v?n.apply(e):n))+'" value="'+g((n=e&&e.value,
typeof n===v?n.apply(e):n))+'" placeholder="'+g((n=e&&e.placeholder,typeof n===v?n.apply(e):n))+'" ',n=r.if.call(e,e&&e.scopeToAttr,{hash:{},inverse:m.noop,fn:m.program(7,d,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=r.if.call(e,e&&e.ratingKey,{hash:{},inverse:m.noop,fn:m.program(9,p,t),data:t}),(n||0===n)&&(i+=n),i+="> "}function d(e,t){var n,i="";return i+='data-scope-to-attr="'+g((n=e&&e.scopeToAttr,typeof n===v?n.apply(e):n))+'" data-scope-to-param="'+g((n=e&&e.scopeToParam,
typeof n===v?n.apply(e):n))+'"'}function p(e,t){var n,i="";return i+='data-rating-key="'+g((n=e&&e.ratingKey,typeof n===v?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var h,f="",v="function",g=this.escapeExpression,m=this;return f+='<div class="form-group selectize-group" data-attr="'+g((h=t&&t.name,typeof h===v?h.apply(t):h))+'"> <label for="lockable-'+g((h=t&&t.name,typeof h===v?h.apply(t):h))+'">'+g(i(n(3)).call(t,t&&t.label,{hash:{},data:o
}))+'</label> <div class="input-group"> <a href="#" data-field="'+g((h=t&&t.name,typeof h===v?h.apply(t):h))+'" class="input-group-addon edit-lock-addon',h=r.if.call(t,t&&t.locked,{hash:{},inverse:m.noop,fn:m.program(1,s,o),data:o}),(h||0===h)&&(f+=h),f+='" tabindex="-1"><i class="glyphicon lock"></i></a> ',h=i(n(25)).call(t,t&&t.type,"textarea",{hash:{},inverse:m.program(6,u,o),fn:m.program(3,l,o),data:o}),(h||0===h)&&(f+=h),f+=" </div> </div> "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){return"locked"}function l(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var c,u="",d=this.escapeExpression,p=this;return u+='<div class="form-group"> <label for="lockable-'+d((c=t&&t.name,"function"==typeof c?c.apply(t):c))+'">'+d(i(n(3)).call(t,t&&t.label,{hash:{},data:o
}))+'</label> <div class="input-group"> <a href="#" data-field="'+d((c=t&&t.name,"function"==typeof c?c.apply(t):c))+'" class="input-group-addon edit-lock-addon ',c=r.if.call(t,t&&t.locked,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(c||0===c)&&(u+=c),u+=" ",c=r.if.call(t,t&&t.disabled,{hash:{},inverse:p.noop,fn:p.program(3,l,o),data:o}),(c||0===c)&&(u+=c),u+='" tabindex="-1"><i class="glyphicon lock"></i></a> <input type="number" id="lockable-'+d((c=t&&t.name,
"function"==typeof c?c.apply(t):c))+'" class="form-control lockable-field" name="'+d((c=t&&t.name,"function"==typeof c?c.apply(t):c))+'" value="'+d((c=t&&t.value,"function"==typeof c?c.apply(t):c))+'" placeholder="'+d((c=t&&t.placeholder,"function"==typeof c?c.apply(t):c))+'" ',c=r.if.call(t,t&&t.disabled,{hash:{},inverse:p.noop,fn:p.program(3,l,o),data:o}),(c||0===c)&&(u+=c),u+="> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14)
;e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var n,i="";return i+=' <textarea class="form-control text-field" id="text-'+f((n=e&&e.name,typeof n===h?n.apply(e):n))+'" name="'+f((n=e&&e.name,typeof n===h?n.apply(e):n))+'"',n=r.if.call(e,e&&e.rows,{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=' placeholder="'+f((n=e&&e.placeholder,typeof n===h?n.apply(e):n))+'">'+f((n=e&&e.value,typeof n===h?n.apply(e):n))+"</textarea> "}function l(e,t){
var n,i="";return i+=' rows="'+f((n=e&&e.rows,typeof n===h?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===h?n.apply(e):n))+'" class="form-control text-field" name="'+f((n=e&&e.name,typeof n===h?n.apply(e):n))+'" value="'+f((n=e&&e.value,typeof n===h?n.apply(e):n))+'" placeholder="'+f((n=e&&e.placeholder,typeof n===h?n.apply(e):n))+'" ',n=r.if.call(e,e&&e.excludeParam,{hash:{},inverse:v.noop,fn:v.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===h?n.apply(e):n))+'" data-exclude-value="'+f((n=e&&e.excludeValue,typeof n===h?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var d,p="",h="function",f=this.escapeExpression,v=this;return p+='<div class="form-group"> <label for="text-'+f((d=t&&t.name,typeof d===h?d.apply(t):d))+'">'+f(i(n(3)).call(t,t&&t.label,{hash:{},data:o
}))+"</label> ",d=i(n(25)).call(t,t&&t.type,"textarea",{hash:{},inverse:v.program(4,c,o),fn:v.program(1,s,o),data:o}),(d||0===d)&&(p+=d),p+=" </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(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"],r=this.merge(r,e.helpers),o=o||{};var l,c="",u="function",d=this.escapeExpression,p=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(3)).call(t,t&&t.label,{hash:{},data:o}))+'<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=r.if.call(t,t&&t.scopeToAttr,{hash:{},inverse:p.noop,fn:p.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+="> </div> </div> "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var r=n(14);e.exports=(r.default||r).template(function(e,t,r,a,o){function s(e,t){var r="";return r+=' <h4 class="server-connect-error-header">'+f(i(n(3)).call(e,"Problem Connecting to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+f(i(n(3)).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 r,a="";return r=i(n(25)).call(e,e&&e.mappingError,"myplexgone",{
hash:{},inverse:v.program(6,u,t),fn:v.program(4,c,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function c(e,t){var r="";return r+=' <h4 class="server-connect-error-header">'+f(i(n(3)).call(e,"Problem Connecting to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+f(i(n(3)).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 r=""
;return r+=' <h4 class="server-connect-error-header">'+f(i(n(3)).call(e,"Signed in to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+f(i(n(3)).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 r=""
;return r+=' <p class="text-muted">'+f(i(n(3)).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"],r=this.merge(r,e.helpers),o=o||{};var p,h="",f=this.escapeExpression,v=this;return p=i(n(25)).call(t,t&&t.mappingError,"badauth",{hash:{},inverse:v.program(3,l,o),fn:v.program(1,s,o),data:o}),(p||0===p)&&(h+=p),h+=" ",
p=i(n(223)).call(t,t&&t.context,"settings",{hash:{},inverse:v.noop,fn:v.program(8,d,o),data:o}),(p||0===p)&&(h+=p),h+=' <p class="text-muted">'+f(i(n(3)).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:o}))+"</p> "
})}],[1313]);